1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_io__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14pub type Token = fidl::Event;
17
18#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19pub struct DirectoryCreateSymlinkRequest {
20 pub name: String,
21 pub target: Vec<u8>,
22 pub connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
23}
24
25impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
26 for DirectoryCreateSymlinkRequest
27{
28}
29
30#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31pub struct DirectoryDeprecatedOpenRequest {
32 pub flags: OpenFlags,
33 pub mode: ModeType,
34 pub path: String,
35 pub object: fidl::endpoints::ServerEnd<NodeMarker>,
36}
37
38impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
39 for DirectoryDeprecatedOpenRequest
40{
41}
42
43#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44pub struct DirectoryGetTokenResponse {
45 pub s: i32,
46 pub token: Option<fidl::NullableHandle>,
47}
48
49impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryGetTokenResponse {}
50
51#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
52pub struct DirectoryLinkRequest {
53 pub src: String,
54 pub dst_parent_token: fidl::NullableHandle,
55 pub dst: String,
56}
57
58impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryLinkRequest {}
59
60#[derive(Debug, PartialEq)]
61pub struct DirectoryOpenRequest {
62 pub path: String,
63 pub flags: Flags,
64 pub options: Options,
65 pub object: fidl::Channel,
66}
67
68impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryOpenRequest {}
69
70#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
71pub struct DirectoryRenameRequest {
72 pub src: String,
73 pub dst_parent_token: fidl::Event,
74 pub dst: String,
75}
76
77impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryRenameRequest {}
78
79#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
80pub struct DirectoryWatchRequest {
81 pub mask: WatchMask,
82 pub options: u32,
83 pub watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
84}
85
86impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryWatchRequest {}
87
88#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
89pub struct FileAllocateRequest {
90 pub offset: u64,
91 pub length: u64,
92 pub mode: AllocateMode,
97}
98
99impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileAllocateRequest {}
100
101#[derive(Debug, PartialEq)]
102pub struct FileEnableVerityRequest {
103 pub options: VerificationOptions,
104}
105
106impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileEnableVerityRequest {}
107
108#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
109pub struct FileObject {
110 pub event: Option<fidl::Event>,
117 pub stream: Option<fidl::Stream>,
121}
122
123impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {}
124
125#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
126pub struct FileGetBackingMemoryResponse {
127 pub vmo: fidl::Vmo,
128}
129
130impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
131 for FileGetBackingMemoryResponse
132{
133}
134
135#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
136pub struct LinkableLinkIntoRequest {
137 pub dst_parent_token: fidl::Event,
138 pub dst: String,
139}
140
141impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for LinkableLinkIntoRequest {}
142
143#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
144pub struct NodeDeprecatedCloneRequest {
145 pub flags: OpenFlags,
146 pub object: fidl::endpoints::ServerEnd<NodeMarker>,
147}
148
149impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
150 for NodeDeprecatedCloneRequest
151{
152}
153
154#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
155pub struct NodeListExtendedAttributesRequest {
156 pub iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
157}
158
159impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
160 for NodeListExtendedAttributesRequest
161{
162}
163
164#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
165pub struct NodeOnOpenRequest {
166 pub s: i32,
167 pub info: Option<Box<NodeInfoDeprecated>>,
168}
169
170impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeOnOpenRequest {}
171
172#[derive(Debug, PartialEq)]
173pub struct NodeSetExtendedAttributeRequest {
174 pub name: Vec<u8>,
175 pub value: ExtendedAttributeValue,
176 pub mode: SetExtendedAttributeMode,
178}
179
180impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
181 for NodeSetExtendedAttributeRequest
182{
183}
184
185#[derive(Debug, Default, PartialEq)]
186pub struct ConnectionInfo {
187 pub rights: Option<Operations>,
194 #[doc(hidden)]
195 pub __source_breaking: fidl::marker::SourceBreaking,
196}
197
198impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ConnectionInfo {}
199
200#[derive(Debug, Default, PartialEq)]
202pub struct FileInfo {
203 pub is_append: Option<bool>,
207 pub observer: Option<fidl::Event>,
220 pub stream: Option<fidl::Stream>,
227 pub attributes: Option<NodeAttributes2>,
229 #[doc(hidden)]
230 pub __source_breaking: fidl::marker::SourceBreaking,
231}
232
233impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {}
234
235#[derive(Debug)]
239pub enum ExtendedAttributeValue {
240 Bytes(Vec<u8>),
241 Buffer(fidl::Vmo),
242 #[doc(hidden)]
243 __SourceBreaking {
244 unknown_ordinal: u64,
245 },
246}
247
248#[macro_export]
250macro_rules! ExtendedAttributeValueUnknown {
251 () => {
252 _
253 };
254}
255
256impl PartialEq for ExtendedAttributeValue {
258 fn eq(&self, other: &Self) -> bool {
259 match (self, other) {
260 (Self::Bytes(x), Self::Bytes(y)) => *x == *y,
261 (Self::Buffer(x), Self::Buffer(y)) => *x == *y,
262 _ => false,
263 }
264 }
265}
266
267impl ExtendedAttributeValue {
268 #[inline]
269 pub fn ordinal(&self) -> u64 {
270 match *self {
271 Self::Bytes(_) => 1,
272 Self::Buffer(_) => 2,
273 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
274 }
275 }
276
277 #[inline]
278 pub fn unknown_variant_for_testing() -> Self {
279 Self::__SourceBreaking { unknown_ordinal: 0 }
280 }
281
282 #[inline]
283 pub fn is_unknown(&self) -> bool {
284 match self {
285 Self::__SourceBreaking { .. } => true,
286 _ => false,
287 }
288 }
289}
290
291impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ExtendedAttributeValue {}
292
293#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
294pub enum NodeInfoDeprecated {
295 Service(Service),
297 File(FileObject),
299 Directory(DirectoryObject),
301 Symlink(SymlinkObject),
303}
304
305impl NodeInfoDeprecated {
306 #[inline]
307 pub fn ordinal(&self) -> u64 {
308 match *self {
309 Self::Service(_) => 1,
310 Self::File(_) => 2,
311 Self::Directory(_) => 3,
312 Self::Symlink(_) => 4,
313 }
314 }
315}
316
317impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeInfoDeprecated {}
318
319#[derive(Debug)]
320pub enum Representation {
321 Node(NodeInfo),
323 Directory(DirectoryInfo),
325 File(FileInfo),
327 Symlink(SymlinkInfo),
329 #[doc(hidden)]
330 __SourceBreaking { unknown_ordinal: u64 },
331}
332
333#[macro_export]
335macro_rules! RepresentationUnknown {
336 () => {
337 _
338 };
339}
340
341impl PartialEq for Representation {
343 fn eq(&self, other: &Self) -> bool {
344 match (self, other) {
345 (Self::Node(x), Self::Node(y)) => *x == *y,
346 (Self::Directory(x), Self::Directory(y)) => *x == *y,
347 (Self::File(x), Self::File(y)) => *x == *y,
348 (Self::Symlink(x), Self::Symlink(y)) => *x == *y,
349 _ => false,
350 }
351 }
352}
353
354impl Representation {
355 #[inline]
356 pub fn ordinal(&self) -> u64 {
357 match *self {
358 Self::Node(_) => 1,
359 Self::Directory(_) => 2,
360 Self::File(_) => 3,
361 Self::Symlink(_) => 4,
362 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
363 }
364 }
365
366 #[inline]
367 pub fn unknown_variant_for_testing() -> Self {
368 Self::__SourceBreaking { unknown_ordinal: 0 }
369 }
370
371 #[inline]
372 pub fn is_unknown(&self) -> bool {
373 match self {
374 Self::__SourceBreaking { .. } => true,
375 _ => false,
376 }
377 }
378}
379
380impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Representation {}
381
382#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
383pub struct AdvisoryLockingMarker;
384
385impl fidl::endpoints::ProtocolMarker for AdvisoryLockingMarker {
386 type Proxy = AdvisoryLockingProxy;
387 type RequestStream = AdvisoryLockingRequestStream;
388 #[cfg(target_os = "fuchsia")]
389 type SynchronousProxy = AdvisoryLockingSynchronousProxy;
390
391 const DEBUG_NAME: &'static str = "(anonymous) AdvisoryLocking";
392}
393pub type AdvisoryLockingAdvisoryLockResult = Result<(), i32>;
394
395pub trait AdvisoryLockingProxyInterface: Send + Sync {
396 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
397 + Send;
398 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
399}
400#[derive(Debug)]
401#[cfg(target_os = "fuchsia")]
402pub struct AdvisoryLockingSynchronousProxy {
403 client: fidl::client::sync::Client,
404}
405
406#[cfg(target_os = "fuchsia")]
407impl fidl::endpoints::SynchronousProxy for AdvisoryLockingSynchronousProxy {
408 type Proxy = AdvisoryLockingProxy;
409 type Protocol = AdvisoryLockingMarker;
410
411 fn from_channel(inner: fidl::Channel) -> Self {
412 Self::new(inner)
413 }
414
415 fn into_channel(self) -> fidl::Channel {
416 self.client.into_channel()
417 }
418
419 fn as_channel(&self) -> &fidl::Channel {
420 self.client.as_channel()
421 }
422}
423
424#[cfg(target_os = "fuchsia")]
425impl AdvisoryLockingSynchronousProxy {
426 pub fn new(channel: fidl::Channel) -> Self {
427 Self { client: fidl::client::sync::Client::new(channel) }
428 }
429
430 pub fn into_channel(self) -> fidl::Channel {
431 self.client.into_channel()
432 }
433
434 pub fn wait_for_event(
437 &self,
438 deadline: zx::MonotonicInstant,
439 ) -> Result<AdvisoryLockingEvent, fidl::Error> {
440 AdvisoryLockingEvent::decode(self.client.wait_for_event::<AdvisoryLockingMarker>(deadline)?)
441 }
442
443 pub fn r#advisory_lock(
467 &self,
468 mut request: &AdvisoryLockRequest,
469 ___deadline: zx::MonotonicInstant,
470 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
471 let _response = self.client.send_query::<
472 AdvisoryLockingAdvisoryLockRequest,
473 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
474 AdvisoryLockingMarker,
475 >(
476 (request,),
477 0x6ee9c0ad53ec87aa,
478 fidl::encoding::DynamicFlags::empty(),
479 ___deadline,
480 )?;
481 Ok(_response.map(|x| x))
482 }
483}
484
485#[cfg(target_os = "fuchsia")]
486impl From<AdvisoryLockingSynchronousProxy> for zx::NullableHandle {
487 fn from(value: AdvisoryLockingSynchronousProxy) -> Self {
488 value.into_channel().into()
489 }
490}
491
492#[cfg(target_os = "fuchsia")]
493impl From<fidl::Channel> for AdvisoryLockingSynchronousProxy {
494 fn from(value: fidl::Channel) -> Self {
495 Self::new(value)
496 }
497}
498
499#[cfg(target_os = "fuchsia")]
500impl fidl::endpoints::FromClient for AdvisoryLockingSynchronousProxy {
501 type Protocol = AdvisoryLockingMarker;
502
503 fn from_client(value: fidl::endpoints::ClientEnd<AdvisoryLockingMarker>) -> Self {
504 Self::new(value.into_channel())
505 }
506}
507
508#[derive(Debug, Clone)]
509pub struct AdvisoryLockingProxy {
510 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
511}
512
513impl fidl::endpoints::Proxy for AdvisoryLockingProxy {
514 type Protocol = AdvisoryLockingMarker;
515
516 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
517 Self::new(inner)
518 }
519
520 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
521 self.client.into_channel().map_err(|client| Self { client })
522 }
523
524 fn as_channel(&self) -> &::fidl::AsyncChannel {
525 self.client.as_channel()
526 }
527}
528
529impl AdvisoryLockingProxy {
530 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
532 let protocol_name = <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
533 Self { client: fidl::client::Client::new(channel, protocol_name) }
534 }
535
536 pub fn take_event_stream(&self) -> AdvisoryLockingEventStream {
542 AdvisoryLockingEventStream { event_receiver: self.client.take_event_receiver() }
543 }
544
545 pub fn r#advisory_lock(
569 &self,
570 mut request: &AdvisoryLockRequest,
571 ) -> fidl::client::QueryResponseFut<
572 AdvisoryLockingAdvisoryLockResult,
573 fidl::encoding::DefaultFuchsiaResourceDialect,
574 > {
575 AdvisoryLockingProxyInterface::r#advisory_lock(self, request)
576 }
577}
578
579impl AdvisoryLockingProxyInterface for AdvisoryLockingProxy {
580 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
581 AdvisoryLockingAdvisoryLockResult,
582 fidl::encoding::DefaultFuchsiaResourceDialect,
583 >;
584 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
585 fn _decode(
586 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
587 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
588 let _response = fidl::client::decode_transaction_body::<
589 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
590 fidl::encoding::DefaultFuchsiaResourceDialect,
591 0x6ee9c0ad53ec87aa,
592 >(_buf?)?;
593 Ok(_response.map(|x| x))
594 }
595 self.client.send_query_and_decode::<
596 AdvisoryLockingAdvisoryLockRequest,
597 AdvisoryLockingAdvisoryLockResult,
598 >(
599 (request,),
600 0x6ee9c0ad53ec87aa,
601 fidl::encoding::DynamicFlags::empty(),
602 _decode,
603 )
604 }
605}
606
607pub struct AdvisoryLockingEventStream {
608 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
609}
610
611impl std::marker::Unpin for AdvisoryLockingEventStream {}
612
613impl futures::stream::FusedStream for AdvisoryLockingEventStream {
614 fn is_terminated(&self) -> bool {
615 self.event_receiver.is_terminated()
616 }
617}
618
619impl futures::Stream for AdvisoryLockingEventStream {
620 type Item = Result<AdvisoryLockingEvent, fidl::Error>;
621
622 fn poll_next(
623 mut self: std::pin::Pin<&mut Self>,
624 cx: &mut std::task::Context<'_>,
625 ) -> std::task::Poll<Option<Self::Item>> {
626 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
627 &mut self.event_receiver,
628 cx
629 )?) {
630 Some(buf) => std::task::Poll::Ready(Some(AdvisoryLockingEvent::decode(buf))),
631 None => std::task::Poll::Ready(None),
632 }
633 }
634}
635
636#[derive(Debug)]
637pub enum AdvisoryLockingEvent {}
638
639impl AdvisoryLockingEvent {
640 fn decode(
642 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
643 ) -> Result<AdvisoryLockingEvent, fidl::Error> {
644 let (bytes, _handles) = buf.split_mut();
645 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
646 debug_assert_eq!(tx_header.tx_id, 0);
647 match tx_header.ordinal {
648 _ => Err(fidl::Error::UnknownOrdinal {
649 ordinal: tx_header.ordinal,
650 protocol_name:
651 <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
652 }),
653 }
654 }
655}
656
657pub struct AdvisoryLockingRequestStream {
659 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
660 is_terminated: bool,
661}
662
663impl std::marker::Unpin for AdvisoryLockingRequestStream {}
664
665impl futures::stream::FusedStream for AdvisoryLockingRequestStream {
666 fn is_terminated(&self) -> bool {
667 self.is_terminated
668 }
669}
670
671impl fidl::endpoints::RequestStream for AdvisoryLockingRequestStream {
672 type Protocol = AdvisoryLockingMarker;
673 type ControlHandle = AdvisoryLockingControlHandle;
674
675 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
676 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
677 }
678
679 fn control_handle(&self) -> Self::ControlHandle {
680 AdvisoryLockingControlHandle { inner: self.inner.clone() }
681 }
682
683 fn into_inner(
684 self,
685 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
686 {
687 (self.inner, self.is_terminated)
688 }
689
690 fn from_inner(
691 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
692 is_terminated: bool,
693 ) -> Self {
694 Self { inner, is_terminated }
695 }
696}
697
698impl futures::Stream for AdvisoryLockingRequestStream {
699 type Item = Result<AdvisoryLockingRequest, fidl::Error>;
700
701 fn poll_next(
702 mut self: std::pin::Pin<&mut Self>,
703 cx: &mut std::task::Context<'_>,
704 ) -> std::task::Poll<Option<Self::Item>> {
705 let this = &mut *self;
706 if this.inner.check_shutdown(cx) {
707 this.is_terminated = true;
708 return std::task::Poll::Ready(None);
709 }
710 if this.is_terminated {
711 panic!("polled AdvisoryLockingRequestStream after completion");
712 }
713 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
714 |bytes, handles| {
715 match this.inner.channel().read_etc(cx, bytes, handles) {
716 std::task::Poll::Ready(Ok(())) => {}
717 std::task::Poll::Pending => return std::task::Poll::Pending,
718 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
719 this.is_terminated = true;
720 return std::task::Poll::Ready(None);
721 }
722 std::task::Poll::Ready(Err(e)) => {
723 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
724 e.into(),
725 ))));
726 }
727 }
728
729 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
731
732 std::task::Poll::Ready(Some(match header.ordinal {
733 0x6ee9c0ad53ec87aa => {
734 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
735 let mut req = fidl::new_empty!(
736 AdvisoryLockingAdvisoryLockRequest,
737 fidl::encoding::DefaultFuchsiaResourceDialect
738 );
739 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
740 let control_handle =
741 AdvisoryLockingControlHandle { inner: this.inner.clone() };
742 Ok(AdvisoryLockingRequest::AdvisoryLock {
743 request: req.request,
744
745 responder: AdvisoryLockingAdvisoryLockResponder {
746 control_handle: std::mem::ManuallyDrop::new(control_handle),
747 tx_id: header.tx_id,
748 },
749 })
750 }
751 _ => Err(fidl::Error::UnknownOrdinal {
752 ordinal: header.ordinal,
753 protocol_name:
754 <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
755 }),
756 }))
757 },
758 )
759 }
760}
761
762#[derive(Debug)]
775pub enum AdvisoryLockingRequest {
776 AdvisoryLock { request: AdvisoryLockRequest, responder: AdvisoryLockingAdvisoryLockResponder },
800}
801
802impl AdvisoryLockingRequest {
803 #[allow(irrefutable_let_patterns)]
804 pub fn into_advisory_lock(
805 self,
806 ) -> Option<(AdvisoryLockRequest, AdvisoryLockingAdvisoryLockResponder)> {
807 if let AdvisoryLockingRequest::AdvisoryLock { request, responder } = self {
808 Some((request, responder))
809 } else {
810 None
811 }
812 }
813
814 pub fn method_name(&self) -> &'static str {
816 match *self {
817 AdvisoryLockingRequest::AdvisoryLock { .. } => "advisory_lock",
818 }
819 }
820}
821
822#[derive(Debug, Clone)]
823pub struct AdvisoryLockingControlHandle {
824 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
825}
826
827impl fidl::endpoints::ControlHandle for AdvisoryLockingControlHandle {
828 fn shutdown(&self) {
829 self.inner.shutdown()
830 }
831
832 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
833 self.inner.shutdown_with_epitaph(status)
834 }
835
836 fn is_closed(&self) -> bool {
837 self.inner.channel().is_closed()
838 }
839 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
840 self.inner.channel().on_closed()
841 }
842
843 #[cfg(target_os = "fuchsia")]
844 fn signal_peer(
845 &self,
846 clear_mask: zx::Signals,
847 set_mask: zx::Signals,
848 ) -> Result<(), zx_status::Status> {
849 use fidl::Peered;
850 self.inner.channel().signal_peer(clear_mask, set_mask)
851 }
852}
853
854impl AdvisoryLockingControlHandle {}
855
856#[must_use = "FIDL methods require a response to be sent"]
857#[derive(Debug)]
858pub struct AdvisoryLockingAdvisoryLockResponder {
859 control_handle: std::mem::ManuallyDrop<AdvisoryLockingControlHandle>,
860 tx_id: u32,
861}
862
863impl std::ops::Drop for AdvisoryLockingAdvisoryLockResponder {
867 fn drop(&mut self) {
868 self.control_handle.shutdown();
869 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
871 }
872}
873
874impl fidl::endpoints::Responder for AdvisoryLockingAdvisoryLockResponder {
875 type ControlHandle = AdvisoryLockingControlHandle;
876
877 fn control_handle(&self) -> &AdvisoryLockingControlHandle {
878 &self.control_handle
879 }
880
881 fn drop_without_shutdown(mut self) {
882 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
884 std::mem::forget(self);
886 }
887}
888
889impl AdvisoryLockingAdvisoryLockResponder {
890 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
894 let _result = self.send_raw(result);
895 if _result.is_err() {
896 self.control_handle.shutdown();
897 }
898 self.drop_without_shutdown();
899 _result
900 }
901
902 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
904 let _result = self.send_raw(result);
905 self.drop_without_shutdown();
906 _result
907 }
908
909 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
910 self.control_handle
911 .inner
912 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
913 result,
914 self.tx_id,
915 0x6ee9c0ad53ec87aa,
916 fidl::encoding::DynamicFlags::empty(),
917 )
918 }
919}
920
921#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
922pub struct DirectoryMarker;
923
924impl fidl::endpoints::ProtocolMarker for DirectoryMarker {
925 type Proxy = DirectoryProxy;
926 type RequestStream = DirectoryRequestStream;
927 #[cfg(target_os = "fuchsia")]
928 type SynchronousProxy = DirectorySynchronousProxy;
929
930 const DEBUG_NAME: &'static str = "fuchsia.io.Directory";
931}
932impl fidl::endpoints::DiscoverableProtocolMarker for DirectoryMarker {}
933pub type DirectoryUnlinkResult = Result<(), i32>;
934pub type DirectoryRenameResult = Result<(), i32>;
935pub type DirectoryCreateSymlinkResult = Result<(), i32>;
936
937pub trait DirectoryProxyInterface: Send + Sync {
938 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
939 + Send;
940 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
941 fn r#clone(
942 &self,
943 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
944 ) -> Result<(), fidl::Error>;
945 type CloseResponseFut: std::future::Future<
946 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
947 > + Send;
948 fn r#close(&self) -> Self::CloseResponseFut;
949 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
950 fn r#query(&self) -> Self::QueryResponseFut;
951 fn r#deprecated_clone(
952 &self,
953 flags: OpenFlags,
954 object: fidl::endpoints::ServerEnd<NodeMarker>,
955 ) -> Result<(), fidl::Error>;
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 GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
981 + Send;
982 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
983 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
984 + Send;
985 fn r#update_attributes(
986 &self,
987 payload: &MutableNodeAttributes,
988 ) -> Self::UpdateAttributesResponseFut;
989 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
990 fn r#sync(&self) -> Self::SyncResponseFut;
991 fn r#list_extended_attributes(
992 &self,
993 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
994 ) -> Result<(), fidl::Error>;
995 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
996 + Send;
997 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
998 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
999 + Send;
1000 fn r#set_extended_attribute(
1001 &self,
1002 name: &[u8],
1003 value: ExtendedAttributeValue,
1004 mode: SetExtendedAttributeMode,
1005 ) -> Self::SetExtendedAttributeResponseFut;
1006 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
1007 + Send;
1008 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
1009 fn r#deprecated_open(
1010 &self,
1011 flags: OpenFlags,
1012 mode: ModeType,
1013 path: &str,
1014 object: fidl::endpoints::ServerEnd<NodeMarker>,
1015 ) -> Result<(), fidl::Error>;
1016 fn r#open(
1017 &self,
1018 path: &str,
1019 flags: Flags,
1020 options: &Options,
1021 object: fidl::Channel,
1022 ) -> Result<(), fidl::Error>;
1023 type ReadDirentsResponseFut: std::future::Future<Output = Result<(i32, Vec<u8>), fidl::Error>>
1024 + Send;
1025 fn r#read_dirents(&self, max_bytes: u64) -> Self::ReadDirentsResponseFut;
1026 type RewindResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1027 fn r#rewind(&self) -> Self::RewindResponseFut;
1028 type GetTokenResponseFut: std::future::Future<Output = Result<(i32, Option<fidl::NullableHandle>), fidl::Error>>
1029 + Send;
1030 fn r#get_token(&self) -> Self::GetTokenResponseFut;
1031 type LinkResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1032 fn r#link(
1033 &self,
1034 src: &str,
1035 dst_parent_token: fidl::NullableHandle,
1036 dst: &str,
1037 ) -> Self::LinkResponseFut;
1038 type UnlinkResponseFut: std::future::Future<Output = Result<DirectoryUnlinkResult, fidl::Error>>
1039 + Send;
1040 fn r#unlink(&self, name: &str, options: &UnlinkOptions) -> Self::UnlinkResponseFut;
1041 type RenameResponseFut: std::future::Future<Output = Result<DirectoryRenameResult, fidl::Error>>
1042 + Send;
1043 fn r#rename(
1044 &self,
1045 src: &str,
1046 dst_parent_token: fidl::Event,
1047 dst: &str,
1048 ) -> Self::RenameResponseFut;
1049 type CreateSymlinkResponseFut: std::future::Future<Output = Result<DirectoryCreateSymlinkResult, fidl::Error>>
1050 + Send;
1051 fn r#create_symlink(
1052 &self,
1053 name: &str,
1054 target: &[u8],
1055 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1056 ) -> Self::CreateSymlinkResponseFut;
1057 type WatchResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1058 fn r#watch(
1059 &self,
1060 mask: WatchMask,
1061 options: u32,
1062 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1063 ) -> Self::WatchResponseFut;
1064}
1065#[derive(Debug)]
1066#[cfg(target_os = "fuchsia")]
1067pub struct DirectorySynchronousProxy {
1068 client: fidl::client::sync::Client,
1069}
1070
1071#[cfg(target_os = "fuchsia")]
1072impl fidl::endpoints::SynchronousProxy for DirectorySynchronousProxy {
1073 type Proxy = DirectoryProxy;
1074 type Protocol = DirectoryMarker;
1075
1076 fn from_channel(inner: fidl::Channel) -> Self {
1077 Self::new(inner)
1078 }
1079
1080 fn into_channel(self) -> fidl::Channel {
1081 self.client.into_channel()
1082 }
1083
1084 fn as_channel(&self) -> &fidl::Channel {
1085 self.client.as_channel()
1086 }
1087}
1088
1089#[cfg(target_os = "fuchsia")]
1090impl DirectorySynchronousProxy {
1091 pub fn new(channel: fidl::Channel) -> Self {
1092 Self { client: fidl::client::sync::Client::new(channel) }
1093 }
1094
1095 pub fn into_channel(self) -> fidl::Channel {
1096 self.client.into_channel()
1097 }
1098
1099 pub fn wait_for_event(
1102 &self,
1103 deadline: zx::MonotonicInstant,
1104 ) -> Result<DirectoryEvent, fidl::Error> {
1105 DirectoryEvent::decode(self.client.wait_for_event::<DirectoryMarker>(deadline)?)
1106 }
1107
1108 pub fn r#advisory_lock(
1132 &self,
1133 mut request: &AdvisoryLockRequest,
1134 ___deadline: zx::MonotonicInstant,
1135 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1136 let _response = self.client.send_query::<
1137 AdvisoryLockingAdvisoryLockRequest,
1138 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1139 DirectoryMarker,
1140 >(
1141 (request,),
1142 0x6ee9c0ad53ec87aa,
1143 fidl::encoding::DynamicFlags::empty(),
1144 ___deadline,
1145 )?;
1146 Ok(_response.map(|x| x))
1147 }
1148
1149 pub fn r#clone(
1150 &self,
1151 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1152 ) -> Result<(), fidl::Error> {
1153 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
1154 (request,),
1155 0x20d8a7aba2168a79,
1156 fidl::encoding::DynamicFlags::empty(),
1157 )
1158 }
1159
1160 pub fn r#close(
1171 &self,
1172 ___deadline: zx::MonotonicInstant,
1173 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1174 let _response = self.client.send_query::<
1175 fidl::encoding::EmptyPayload,
1176 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1177 DirectoryMarker,
1178 >(
1179 (),
1180 0x5ac5d459ad7f657e,
1181 fidl::encoding::DynamicFlags::empty(),
1182 ___deadline,
1183 )?;
1184 Ok(_response.map(|x| x))
1185 }
1186
1187 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
1188 let _response = self.client.send_query::<
1189 fidl::encoding::EmptyPayload,
1190 fidl_fuchsia_unknown::QueryableQueryResponse,
1191 DirectoryMarker,
1192 >(
1193 (),
1194 0x2658edee9decfc06,
1195 fidl::encoding::DynamicFlags::empty(),
1196 ___deadline,
1197 )?;
1198 Ok(_response.protocol)
1199 }
1200
1201 pub fn r#deprecated_clone(
1203 &self,
1204 mut flags: OpenFlags,
1205 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1206 ) -> Result<(), fidl::Error> {
1207 self.client.send::<NodeDeprecatedCloneRequest>(
1208 (flags, object),
1209 0x5a61678f293ce16f,
1210 fidl::encoding::DynamicFlags::FLEXIBLE,
1211 )
1212 }
1213
1214 pub fn r#deprecated_get_attr(
1216 &self,
1217 ___deadline: zx::MonotonicInstant,
1218 ) -> Result<(i32, NodeAttributes), fidl::Error> {
1219 let _response = self.client.send_query::<
1220 fidl::encoding::EmptyPayload,
1221 NodeDeprecatedGetAttrResponse,
1222 DirectoryMarker,
1223 >(
1224 (),
1225 0x78985e216314dafd,
1226 fidl::encoding::DynamicFlags::empty(),
1227 ___deadline,
1228 )?;
1229 Ok((_response.s, _response.attributes))
1230 }
1231
1232 pub fn r#deprecated_set_attr(
1234 &self,
1235 mut flags: NodeAttributeFlags,
1236 mut attributes: &NodeAttributes,
1237 ___deadline: zx::MonotonicInstant,
1238 ) -> Result<i32, fidl::Error> {
1239 let _response = self.client.send_query::<
1240 NodeDeprecatedSetAttrRequest,
1241 NodeDeprecatedSetAttrResponse,
1242 DirectoryMarker,
1243 >(
1244 (flags, attributes,),
1245 0x4186c0f40d938f46,
1246 fidl::encoding::DynamicFlags::empty(),
1247 ___deadline,
1248 )?;
1249 Ok(_response.s)
1250 }
1251
1252 pub fn r#deprecated_get_flags(
1254 &self,
1255 ___deadline: zx::MonotonicInstant,
1256 ) -> Result<(i32, OpenFlags), fidl::Error> {
1257 let _response = self.client.send_query::<
1258 fidl::encoding::EmptyPayload,
1259 NodeDeprecatedGetFlagsResponse,
1260 DirectoryMarker,
1261 >(
1262 (),
1263 0x5b88fffb8eda3aa1,
1264 fidl::encoding::DynamicFlags::empty(),
1265 ___deadline,
1266 )?;
1267 Ok((_response.s, _response.flags))
1268 }
1269
1270 pub fn r#deprecated_set_flags(
1272 &self,
1273 mut flags: OpenFlags,
1274 ___deadline: zx::MonotonicInstant,
1275 ) -> Result<i32, fidl::Error> {
1276 let _response = self.client.send_query::<
1277 NodeDeprecatedSetFlagsRequest,
1278 NodeDeprecatedSetFlagsResponse,
1279 DirectoryMarker,
1280 >(
1281 (flags,),
1282 0x5295b76c71fde733,
1283 fidl::encoding::DynamicFlags::empty(),
1284 ___deadline,
1285 )?;
1286 Ok(_response.s)
1287 }
1288
1289 pub fn r#get_flags(
1298 &self,
1299 ___deadline: zx::MonotonicInstant,
1300 ) -> Result<NodeGetFlagsResult, fidl::Error> {
1301 let _response = self.client.send_query::<
1302 fidl::encoding::EmptyPayload,
1303 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1304 DirectoryMarker,
1305 >(
1306 (),
1307 0x176eb318f64ec23,
1308 fidl::encoding::DynamicFlags::FLEXIBLE,
1309 ___deadline,
1310 )?
1311 .into_result::<DirectoryMarker>("get_flags")?;
1312 Ok(_response.map(|x| x.flags))
1313 }
1314
1315 pub fn r#set_flags(
1325 &self,
1326 mut flags: Flags,
1327 ___deadline: zx::MonotonicInstant,
1328 ) -> Result<NodeSetFlagsResult, fidl::Error> {
1329 let _response = self.client.send_query::<
1330 NodeSetFlagsRequest,
1331 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1332 DirectoryMarker,
1333 >(
1334 (flags,),
1335 0x55a8028685791ea8,
1336 fidl::encoding::DynamicFlags::FLEXIBLE,
1337 ___deadline,
1338 )?
1339 .into_result::<DirectoryMarker>("set_flags")?;
1340 Ok(_response.map(|x| x))
1341 }
1342
1343 pub fn r#query_filesystem(
1347 &self,
1348 ___deadline: zx::MonotonicInstant,
1349 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1350 let _response = self.client.send_query::<
1351 fidl::encoding::EmptyPayload,
1352 NodeQueryFilesystemResponse,
1353 DirectoryMarker,
1354 >(
1355 (),
1356 0x6f344a1c6b0a0610,
1357 fidl::encoding::DynamicFlags::empty(),
1358 ___deadline,
1359 )?;
1360 Ok((_response.s, _response.info))
1361 }
1362
1363 pub fn r#get_attributes(
1377 &self,
1378 mut query: NodeAttributesQuery,
1379 ___deadline: zx::MonotonicInstant,
1380 ) -> Result<NodeGetAttributesResult, fidl::Error> {
1381 let _response = self.client.send_query::<
1382 NodeGetAttributesRequest,
1383 fidl::encoding::ResultType<NodeAttributes2, i32>,
1384 DirectoryMarker,
1385 >(
1386 (query,),
1387 0x3d4396a638ea053b,
1388 fidl::encoding::DynamicFlags::empty(),
1389 ___deadline,
1390 )?;
1391 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1392 }
1393
1394 pub fn r#update_attributes(
1403 &self,
1404 mut payload: &MutableNodeAttributes,
1405 ___deadline: zx::MonotonicInstant,
1406 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1407 let _response = self.client.send_query::<
1408 MutableNodeAttributes,
1409 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1410 DirectoryMarker,
1411 >(
1412 payload,
1413 0x3308c1da5a89bf08,
1414 fidl::encoding::DynamicFlags::empty(),
1415 ___deadline,
1416 )?;
1417 Ok(_response.map(|x| x))
1418 }
1419
1420 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
1430 let _response = self.client.send_query::<
1431 fidl::encoding::EmptyPayload,
1432 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1433 DirectoryMarker,
1434 >(
1435 (),
1436 0x2c5c27ca0ab5dc49,
1437 fidl::encoding::DynamicFlags::empty(),
1438 ___deadline,
1439 )?;
1440 Ok(_response.map(|x| x))
1441 }
1442
1443 pub fn r#list_extended_attributes(
1452 &self,
1453 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
1454 ) -> Result<(), fidl::Error> {
1455 self.client.send::<NodeListExtendedAttributesRequest>(
1456 (iterator,),
1457 0x4b61033de007fcd0,
1458 fidl::encoding::DynamicFlags::empty(),
1459 )
1460 }
1461
1462 pub fn r#get_extended_attribute(
1469 &self,
1470 mut name: &[u8],
1471 ___deadline: zx::MonotonicInstant,
1472 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1473 let _response = self.client.send_query::<
1474 NodeGetExtendedAttributeRequest,
1475 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1476 DirectoryMarker,
1477 >(
1478 (name,),
1479 0x45ffa3ccfdeb76db,
1480 fidl::encoding::DynamicFlags::empty(),
1481 ___deadline,
1482 )?;
1483 Ok(_response.map(|x| x))
1484 }
1485
1486 pub fn r#set_extended_attribute(
1494 &self,
1495 mut name: &[u8],
1496 mut value: ExtendedAttributeValue,
1497 mut mode: SetExtendedAttributeMode,
1498 ___deadline: zx::MonotonicInstant,
1499 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1500 let _response = self.client.send_query::<
1501 NodeSetExtendedAttributeRequest,
1502 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1503 DirectoryMarker,
1504 >(
1505 (name, &mut value, mode,),
1506 0x4a951362f681f23c,
1507 fidl::encoding::DynamicFlags::empty(),
1508 ___deadline,
1509 )?;
1510 Ok(_response.map(|x| x))
1511 }
1512
1513 pub fn r#remove_extended_attribute(
1519 &self,
1520 mut name: &[u8],
1521 ___deadline: zx::MonotonicInstant,
1522 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1523 let _response = self.client.send_query::<
1524 NodeRemoveExtendedAttributeRequest,
1525 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1526 DirectoryMarker,
1527 >(
1528 (name,),
1529 0x7a0b9f3a9bf9032d,
1530 fidl::encoding::DynamicFlags::empty(),
1531 ___deadline,
1532 )?;
1533 Ok(_response.map(|x| x))
1534 }
1535
1536 pub fn r#deprecated_open(
1538 &self,
1539 mut flags: OpenFlags,
1540 mut mode: ModeType,
1541 mut path: &str,
1542 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1543 ) -> Result<(), fidl::Error> {
1544 self.client.send::<DirectoryDeprecatedOpenRequest>(
1545 (flags, mode, path, object),
1546 0x2c5044561d685ec0,
1547 fidl::encoding::DynamicFlags::FLEXIBLE,
1548 )
1549 }
1550
1551 pub fn r#open(
1558 &self,
1559 mut path: &str,
1560 mut flags: Flags,
1561 mut options: &Options,
1562 mut object: fidl::Channel,
1563 ) -> Result<(), fidl::Error> {
1564 self.client.send::<DirectoryOpenRequest>(
1565 (path, flags, options, object),
1566 0x568ddcb9a9cbb6d9,
1567 fidl::encoding::DynamicFlags::empty(),
1568 )
1569 }
1570
1571 pub fn r#read_dirents(
1597 &self,
1598 mut max_bytes: u64,
1599 ___deadline: zx::MonotonicInstant,
1600 ) -> Result<(i32, Vec<u8>), fidl::Error> {
1601 let _response = self.client.send_query::<
1602 DirectoryReadDirentsRequest,
1603 DirectoryReadDirentsResponse,
1604 DirectoryMarker,
1605 >(
1606 (max_bytes,),
1607 0x3582806bf27faa0a,
1608 fidl::encoding::DynamicFlags::empty(),
1609 ___deadline,
1610 )?;
1611 Ok((_response.s, _response.dirents))
1612 }
1613
1614 pub fn r#rewind(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
1618 let _response = self
1619 .client
1620 .send_query::<fidl::encoding::EmptyPayload, DirectoryRewindResponse, DirectoryMarker>(
1621 (),
1622 0x16b1202af0f34c71,
1623 fidl::encoding::DynamicFlags::empty(),
1624 ___deadline,
1625 )?;
1626 Ok(_response.s)
1627 }
1628
1629 pub fn r#get_token(
1636 &self,
1637 ___deadline: zx::MonotonicInstant,
1638 ) -> Result<(i32, Option<fidl::NullableHandle>), fidl::Error> {
1639 let _response = self
1640 .client
1641 .send_query::<fidl::encoding::EmptyPayload, DirectoryGetTokenResponse, DirectoryMarker>(
1642 (),
1643 0x26ae9d18763c8655,
1644 fidl::encoding::DynamicFlags::empty(),
1645 ___deadline,
1646 )?;
1647 Ok((_response.s, _response.token))
1648 }
1649
1650 pub fn r#link(
1667 &self,
1668 mut src: &str,
1669 mut dst_parent_token: fidl::NullableHandle,
1670 mut dst: &str,
1671 ___deadline: zx::MonotonicInstant,
1672 ) -> Result<i32, fidl::Error> {
1673 let _response = self
1674 .client
1675 .send_query::<DirectoryLinkRequest, DirectoryLinkResponse, DirectoryMarker>(
1676 (src, dst_parent_token, dst),
1677 0x740604c0c7c930e7,
1678 fidl::encoding::DynamicFlags::empty(),
1679 ___deadline,
1680 )?;
1681 Ok(_response.s)
1682 }
1683
1684 pub fn r#unlink(
1709 &self,
1710 mut name: &str,
1711 mut options: &UnlinkOptions,
1712 ___deadline: zx::MonotonicInstant,
1713 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
1714 let _response = self.client.send_query::<
1715 DirectoryUnlinkRequest,
1716 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1717 DirectoryMarker,
1718 >(
1719 (name, options,),
1720 0x750a0326a78d7bed,
1721 fidl::encoding::DynamicFlags::empty(),
1722 ___deadline,
1723 )?;
1724 Ok(_response.map(|x| x))
1725 }
1726
1727 pub fn r#rename(
1753 &self,
1754 mut src: &str,
1755 mut dst_parent_token: fidl::Event,
1756 mut dst: &str,
1757 ___deadline: zx::MonotonicInstant,
1758 ) -> Result<DirectoryRenameResult, fidl::Error> {
1759 let _response = self.client.send_query::<
1760 DirectoryRenameRequest,
1761 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1762 DirectoryMarker,
1763 >(
1764 (src, dst_parent_token, dst,),
1765 0x7060e7723b9928de,
1766 fidl::encoding::DynamicFlags::empty(),
1767 ___deadline,
1768 )?;
1769 Ok(_response.map(|x| x))
1770 }
1771
1772 pub fn r#create_symlink(
1787 &self,
1788 mut name: &str,
1789 mut target: &[u8],
1790 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1791 ___deadline: zx::MonotonicInstant,
1792 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
1793 let _response = self.client.send_query::<
1794 DirectoryCreateSymlinkRequest,
1795 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1796 DirectoryMarker,
1797 >(
1798 (name, target, connection,),
1799 0x21ce0f19ec043889,
1800 fidl::encoding::DynamicFlags::empty(),
1801 ___deadline,
1802 )?;
1803 Ok(_response.map(|x| x))
1804 }
1805
1806 pub fn r#watch(
1813 &self,
1814 mut mask: WatchMask,
1815 mut options: u32,
1816 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1817 ___deadline: zx::MonotonicInstant,
1818 ) -> Result<i32, fidl::Error> {
1819 let _response = self
1820 .client
1821 .send_query::<DirectoryWatchRequest, DirectoryWatchResponse, DirectoryMarker>(
1822 (mask, options, watcher),
1823 0x5717193a59d66d91,
1824 fidl::encoding::DynamicFlags::empty(),
1825 ___deadline,
1826 )?;
1827 Ok(_response.s)
1828 }
1829}
1830
1831#[cfg(target_os = "fuchsia")]
1832impl From<DirectorySynchronousProxy> for zx::NullableHandle {
1833 fn from(value: DirectorySynchronousProxy) -> Self {
1834 value.into_channel().into()
1835 }
1836}
1837
1838#[cfg(target_os = "fuchsia")]
1839impl From<fidl::Channel> for DirectorySynchronousProxy {
1840 fn from(value: fidl::Channel) -> Self {
1841 Self::new(value)
1842 }
1843}
1844
1845#[cfg(target_os = "fuchsia")]
1846impl fidl::endpoints::FromClient for DirectorySynchronousProxy {
1847 type Protocol = DirectoryMarker;
1848
1849 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryMarker>) -> Self {
1850 Self::new(value.into_channel())
1851 }
1852}
1853
1854#[derive(Debug, Clone)]
1855pub struct DirectoryProxy {
1856 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1857}
1858
1859impl fidl::endpoints::Proxy for DirectoryProxy {
1860 type Protocol = DirectoryMarker;
1861
1862 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1863 Self::new(inner)
1864 }
1865
1866 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1867 self.client.into_channel().map_err(|client| Self { client })
1868 }
1869
1870 fn as_channel(&self) -> &::fidl::AsyncChannel {
1871 self.client.as_channel()
1872 }
1873}
1874
1875impl DirectoryProxy {
1876 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1878 let protocol_name = <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1879 Self { client: fidl::client::Client::new(channel, protocol_name) }
1880 }
1881
1882 pub fn take_event_stream(&self) -> DirectoryEventStream {
1888 DirectoryEventStream { event_receiver: self.client.take_event_receiver() }
1889 }
1890
1891 pub fn r#advisory_lock(
1915 &self,
1916 mut request: &AdvisoryLockRequest,
1917 ) -> fidl::client::QueryResponseFut<
1918 AdvisoryLockingAdvisoryLockResult,
1919 fidl::encoding::DefaultFuchsiaResourceDialect,
1920 > {
1921 DirectoryProxyInterface::r#advisory_lock(self, request)
1922 }
1923
1924 pub fn r#clone(
1925 &self,
1926 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1927 ) -> Result<(), fidl::Error> {
1928 DirectoryProxyInterface::r#clone(self, request)
1929 }
1930
1931 pub fn r#close(
1942 &self,
1943 ) -> fidl::client::QueryResponseFut<
1944 fidl_fuchsia_unknown::CloseableCloseResult,
1945 fidl::encoding::DefaultFuchsiaResourceDialect,
1946 > {
1947 DirectoryProxyInterface::r#close(self)
1948 }
1949
1950 pub fn r#query(
1951 &self,
1952 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
1953 {
1954 DirectoryProxyInterface::r#query(self)
1955 }
1956
1957 pub fn r#deprecated_clone(
1959 &self,
1960 mut flags: OpenFlags,
1961 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1962 ) -> Result<(), fidl::Error> {
1963 DirectoryProxyInterface::r#deprecated_clone(self, flags, object)
1964 }
1965
1966 pub fn r#deprecated_get_attr(
1968 &self,
1969 ) -> fidl::client::QueryResponseFut<
1970 (i32, NodeAttributes),
1971 fidl::encoding::DefaultFuchsiaResourceDialect,
1972 > {
1973 DirectoryProxyInterface::r#deprecated_get_attr(self)
1974 }
1975
1976 pub fn r#deprecated_set_attr(
1978 &self,
1979 mut flags: NodeAttributeFlags,
1980 mut attributes: &NodeAttributes,
1981 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
1982 DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
1983 }
1984
1985 pub fn r#deprecated_get_flags(
1987 &self,
1988 ) -> fidl::client::QueryResponseFut<
1989 (i32, OpenFlags),
1990 fidl::encoding::DefaultFuchsiaResourceDialect,
1991 > {
1992 DirectoryProxyInterface::r#deprecated_get_flags(self)
1993 }
1994
1995 pub fn r#deprecated_set_flags(
1997 &self,
1998 mut flags: OpenFlags,
1999 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2000 DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
2001 }
2002
2003 pub fn r#get_flags(
2012 &self,
2013 ) -> fidl::client::QueryResponseFut<
2014 NodeGetFlagsResult,
2015 fidl::encoding::DefaultFuchsiaResourceDialect,
2016 > {
2017 DirectoryProxyInterface::r#get_flags(self)
2018 }
2019
2020 pub fn r#set_flags(
2030 &self,
2031 mut flags: Flags,
2032 ) -> fidl::client::QueryResponseFut<
2033 NodeSetFlagsResult,
2034 fidl::encoding::DefaultFuchsiaResourceDialect,
2035 > {
2036 DirectoryProxyInterface::r#set_flags(self, flags)
2037 }
2038
2039 pub fn r#query_filesystem(
2043 &self,
2044 ) -> fidl::client::QueryResponseFut<
2045 (i32, Option<Box<FilesystemInfo>>),
2046 fidl::encoding::DefaultFuchsiaResourceDialect,
2047 > {
2048 DirectoryProxyInterface::r#query_filesystem(self)
2049 }
2050
2051 pub fn r#get_attributes(
2065 &self,
2066 mut query: NodeAttributesQuery,
2067 ) -> fidl::client::QueryResponseFut<
2068 NodeGetAttributesResult,
2069 fidl::encoding::DefaultFuchsiaResourceDialect,
2070 > {
2071 DirectoryProxyInterface::r#get_attributes(self, query)
2072 }
2073
2074 pub fn r#update_attributes(
2083 &self,
2084 mut payload: &MutableNodeAttributes,
2085 ) -> fidl::client::QueryResponseFut<
2086 NodeUpdateAttributesResult,
2087 fidl::encoding::DefaultFuchsiaResourceDialect,
2088 > {
2089 DirectoryProxyInterface::r#update_attributes(self, payload)
2090 }
2091
2092 pub fn r#sync(
2102 &self,
2103 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
2104 {
2105 DirectoryProxyInterface::r#sync(self)
2106 }
2107
2108 pub fn r#list_extended_attributes(
2117 &self,
2118 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2119 ) -> Result<(), fidl::Error> {
2120 DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
2121 }
2122
2123 pub fn r#get_extended_attribute(
2130 &self,
2131 mut name: &[u8],
2132 ) -> fidl::client::QueryResponseFut<
2133 NodeGetExtendedAttributeResult,
2134 fidl::encoding::DefaultFuchsiaResourceDialect,
2135 > {
2136 DirectoryProxyInterface::r#get_extended_attribute(self, name)
2137 }
2138
2139 pub fn r#set_extended_attribute(
2147 &self,
2148 mut name: &[u8],
2149 mut value: ExtendedAttributeValue,
2150 mut mode: SetExtendedAttributeMode,
2151 ) -> fidl::client::QueryResponseFut<
2152 NodeSetExtendedAttributeResult,
2153 fidl::encoding::DefaultFuchsiaResourceDialect,
2154 > {
2155 DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
2156 }
2157
2158 pub fn r#remove_extended_attribute(
2164 &self,
2165 mut name: &[u8],
2166 ) -> fidl::client::QueryResponseFut<
2167 NodeRemoveExtendedAttributeResult,
2168 fidl::encoding::DefaultFuchsiaResourceDialect,
2169 > {
2170 DirectoryProxyInterface::r#remove_extended_attribute(self, name)
2171 }
2172
2173 pub fn r#deprecated_open(
2175 &self,
2176 mut flags: OpenFlags,
2177 mut mode: ModeType,
2178 mut path: &str,
2179 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2180 ) -> Result<(), fidl::Error> {
2181 DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
2182 }
2183
2184 pub fn r#open(
2191 &self,
2192 mut path: &str,
2193 mut flags: Flags,
2194 mut options: &Options,
2195 mut object: fidl::Channel,
2196 ) -> Result<(), fidl::Error> {
2197 DirectoryProxyInterface::r#open(self, path, flags, options, object)
2198 }
2199
2200 pub fn r#read_dirents(
2226 &self,
2227 mut max_bytes: u64,
2228 ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fidl::encoding::DefaultFuchsiaResourceDialect>
2229 {
2230 DirectoryProxyInterface::r#read_dirents(self, max_bytes)
2231 }
2232
2233 pub fn r#rewind(
2237 &self,
2238 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2239 DirectoryProxyInterface::r#rewind(self)
2240 }
2241
2242 pub fn r#get_token(
2249 &self,
2250 ) -> fidl::client::QueryResponseFut<
2251 (i32, Option<fidl::NullableHandle>),
2252 fidl::encoding::DefaultFuchsiaResourceDialect,
2253 > {
2254 DirectoryProxyInterface::r#get_token(self)
2255 }
2256
2257 pub fn r#link(
2274 &self,
2275 mut src: &str,
2276 mut dst_parent_token: fidl::NullableHandle,
2277 mut dst: &str,
2278 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2279 DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
2280 }
2281
2282 pub fn r#unlink(
2307 &self,
2308 mut name: &str,
2309 mut options: &UnlinkOptions,
2310 ) -> fidl::client::QueryResponseFut<
2311 DirectoryUnlinkResult,
2312 fidl::encoding::DefaultFuchsiaResourceDialect,
2313 > {
2314 DirectoryProxyInterface::r#unlink(self, name, options)
2315 }
2316
2317 pub fn r#rename(
2343 &self,
2344 mut src: &str,
2345 mut dst_parent_token: fidl::Event,
2346 mut dst: &str,
2347 ) -> fidl::client::QueryResponseFut<
2348 DirectoryRenameResult,
2349 fidl::encoding::DefaultFuchsiaResourceDialect,
2350 > {
2351 DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
2352 }
2353
2354 pub fn r#create_symlink(
2369 &self,
2370 mut name: &str,
2371 mut target: &[u8],
2372 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
2373 ) -> fidl::client::QueryResponseFut<
2374 DirectoryCreateSymlinkResult,
2375 fidl::encoding::DefaultFuchsiaResourceDialect,
2376 > {
2377 DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
2378 }
2379
2380 pub fn r#watch(
2387 &self,
2388 mut mask: WatchMask,
2389 mut options: u32,
2390 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
2391 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2392 DirectoryProxyInterface::r#watch(self, mask, options, watcher)
2393 }
2394}
2395
2396impl DirectoryProxyInterface for DirectoryProxy {
2397 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
2398 AdvisoryLockingAdvisoryLockResult,
2399 fidl::encoding::DefaultFuchsiaResourceDialect,
2400 >;
2401 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
2402 fn _decode(
2403 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2404 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
2405 let _response = fidl::client::decode_transaction_body::<
2406 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2407 fidl::encoding::DefaultFuchsiaResourceDialect,
2408 0x6ee9c0ad53ec87aa,
2409 >(_buf?)?;
2410 Ok(_response.map(|x| x))
2411 }
2412 self.client.send_query_and_decode::<
2413 AdvisoryLockingAdvisoryLockRequest,
2414 AdvisoryLockingAdvisoryLockResult,
2415 >(
2416 (request,),
2417 0x6ee9c0ad53ec87aa,
2418 fidl::encoding::DynamicFlags::empty(),
2419 _decode,
2420 )
2421 }
2422
2423 fn r#clone(
2424 &self,
2425 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
2426 ) -> Result<(), fidl::Error> {
2427 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
2428 (request,),
2429 0x20d8a7aba2168a79,
2430 fidl::encoding::DynamicFlags::empty(),
2431 )
2432 }
2433
2434 type CloseResponseFut = fidl::client::QueryResponseFut<
2435 fidl_fuchsia_unknown::CloseableCloseResult,
2436 fidl::encoding::DefaultFuchsiaResourceDialect,
2437 >;
2438 fn r#close(&self) -> Self::CloseResponseFut {
2439 fn _decode(
2440 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2441 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
2442 let _response = fidl::client::decode_transaction_body::<
2443 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2444 fidl::encoding::DefaultFuchsiaResourceDialect,
2445 0x5ac5d459ad7f657e,
2446 >(_buf?)?;
2447 Ok(_response.map(|x| x))
2448 }
2449 self.client.send_query_and_decode::<
2450 fidl::encoding::EmptyPayload,
2451 fidl_fuchsia_unknown::CloseableCloseResult,
2452 >(
2453 (),
2454 0x5ac5d459ad7f657e,
2455 fidl::encoding::DynamicFlags::empty(),
2456 _decode,
2457 )
2458 }
2459
2460 type QueryResponseFut =
2461 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
2462 fn r#query(&self) -> Self::QueryResponseFut {
2463 fn _decode(
2464 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2465 ) -> Result<Vec<u8>, fidl::Error> {
2466 let _response = fidl::client::decode_transaction_body::<
2467 fidl_fuchsia_unknown::QueryableQueryResponse,
2468 fidl::encoding::DefaultFuchsiaResourceDialect,
2469 0x2658edee9decfc06,
2470 >(_buf?)?;
2471 Ok(_response.protocol)
2472 }
2473 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
2474 (),
2475 0x2658edee9decfc06,
2476 fidl::encoding::DynamicFlags::empty(),
2477 _decode,
2478 )
2479 }
2480
2481 fn r#deprecated_clone(
2482 &self,
2483 mut flags: OpenFlags,
2484 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2485 ) -> Result<(), fidl::Error> {
2486 self.client.send::<NodeDeprecatedCloneRequest>(
2487 (flags, object),
2488 0x5a61678f293ce16f,
2489 fidl::encoding::DynamicFlags::FLEXIBLE,
2490 )
2491 }
2492
2493 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
2494 (i32, NodeAttributes),
2495 fidl::encoding::DefaultFuchsiaResourceDialect,
2496 >;
2497 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
2498 fn _decode(
2499 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2500 ) -> Result<(i32, NodeAttributes), fidl::Error> {
2501 let _response = fidl::client::decode_transaction_body::<
2502 NodeDeprecatedGetAttrResponse,
2503 fidl::encoding::DefaultFuchsiaResourceDialect,
2504 0x78985e216314dafd,
2505 >(_buf?)?;
2506 Ok((_response.s, _response.attributes))
2507 }
2508 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
2509 (),
2510 0x78985e216314dafd,
2511 fidl::encoding::DynamicFlags::empty(),
2512 _decode,
2513 )
2514 }
2515
2516 type DeprecatedSetAttrResponseFut =
2517 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2518 fn r#deprecated_set_attr(
2519 &self,
2520 mut flags: NodeAttributeFlags,
2521 mut attributes: &NodeAttributes,
2522 ) -> Self::DeprecatedSetAttrResponseFut {
2523 fn _decode(
2524 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2525 ) -> Result<i32, fidl::Error> {
2526 let _response = fidl::client::decode_transaction_body::<
2527 NodeDeprecatedSetAttrResponse,
2528 fidl::encoding::DefaultFuchsiaResourceDialect,
2529 0x4186c0f40d938f46,
2530 >(_buf?)?;
2531 Ok(_response.s)
2532 }
2533 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
2534 (flags, attributes),
2535 0x4186c0f40d938f46,
2536 fidl::encoding::DynamicFlags::empty(),
2537 _decode,
2538 )
2539 }
2540
2541 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
2542 (i32, OpenFlags),
2543 fidl::encoding::DefaultFuchsiaResourceDialect,
2544 >;
2545 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
2546 fn _decode(
2547 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2548 ) -> Result<(i32, OpenFlags), fidl::Error> {
2549 let _response = fidl::client::decode_transaction_body::<
2550 NodeDeprecatedGetFlagsResponse,
2551 fidl::encoding::DefaultFuchsiaResourceDialect,
2552 0x5b88fffb8eda3aa1,
2553 >(_buf?)?;
2554 Ok((_response.s, _response.flags))
2555 }
2556 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
2557 (),
2558 0x5b88fffb8eda3aa1,
2559 fidl::encoding::DynamicFlags::empty(),
2560 _decode,
2561 )
2562 }
2563
2564 type DeprecatedSetFlagsResponseFut =
2565 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2566 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
2567 fn _decode(
2568 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2569 ) -> Result<i32, fidl::Error> {
2570 let _response = fidl::client::decode_transaction_body::<
2571 NodeDeprecatedSetFlagsResponse,
2572 fidl::encoding::DefaultFuchsiaResourceDialect,
2573 0x5295b76c71fde733,
2574 >(_buf?)?;
2575 Ok(_response.s)
2576 }
2577 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
2578 (flags,),
2579 0x5295b76c71fde733,
2580 fidl::encoding::DynamicFlags::empty(),
2581 _decode,
2582 )
2583 }
2584
2585 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
2586 NodeGetFlagsResult,
2587 fidl::encoding::DefaultFuchsiaResourceDialect,
2588 >;
2589 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
2590 fn _decode(
2591 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2592 ) -> Result<NodeGetFlagsResult, fidl::Error> {
2593 let _response = fidl::client::decode_transaction_body::<
2594 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
2595 fidl::encoding::DefaultFuchsiaResourceDialect,
2596 0x176eb318f64ec23,
2597 >(_buf?)?
2598 .into_result::<DirectoryMarker>("get_flags")?;
2599 Ok(_response.map(|x| x.flags))
2600 }
2601 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
2602 (),
2603 0x176eb318f64ec23,
2604 fidl::encoding::DynamicFlags::FLEXIBLE,
2605 _decode,
2606 )
2607 }
2608
2609 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
2610 NodeSetFlagsResult,
2611 fidl::encoding::DefaultFuchsiaResourceDialect,
2612 >;
2613 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
2614 fn _decode(
2615 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2616 ) -> Result<NodeSetFlagsResult, fidl::Error> {
2617 let _response = fidl::client::decode_transaction_body::<
2618 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2619 fidl::encoding::DefaultFuchsiaResourceDialect,
2620 0x55a8028685791ea8,
2621 >(_buf?)?
2622 .into_result::<DirectoryMarker>("set_flags")?;
2623 Ok(_response.map(|x| x))
2624 }
2625 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
2626 (flags,),
2627 0x55a8028685791ea8,
2628 fidl::encoding::DynamicFlags::FLEXIBLE,
2629 _decode,
2630 )
2631 }
2632
2633 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
2634 (i32, Option<Box<FilesystemInfo>>),
2635 fidl::encoding::DefaultFuchsiaResourceDialect,
2636 >;
2637 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
2638 fn _decode(
2639 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2640 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
2641 let _response = fidl::client::decode_transaction_body::<
2642 NodeQueryFilesystemResponse,
2643 fidl::encoding::DefaultFuchsiaResourceDialect,
2644 0x6f344a1c6b0a0610,
2645 >(_buf?)?;
2646 Ok((_response.s, _response.info))
2647 }
2648 self.client.send_query_and_decode::<
2649 fidl::encoding::EmptyPayload,
2650 (i32, Option<Box<FilesystemInfo>>),
2651 >(
2652 (),
2653 0x6f344a1c6b0a0610,
2654 fidl::encoding::DynamicFlags::empty(),
2655 _decode,
2656 )
2657 }
2658
2659 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
2660 NodeGetAttributesResult,
2661 fidl::encoding::DefaultFuchsiaResourceDialect,
2662 >;
2663 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
2664 fn _decode(
2665 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2666 ) -> Result<NodeGetAttributesResult, fidl::Error> {
2667 let _response = fidl::client::decode_transaction_body::<
2668 fidl::encoding::ResultType<NodeAttributes2, i32>,
2669 fidl::encoding::DefaultFuchsiaResourceDialect,
2670 0x3d4396a638ea053b,
2671 >(_buf?)?;
2672 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
2673 }
2674 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
2675 (query,),
2676 0x3d4396a638ea053b,
2677 fidl::encoding::DynamicFlags::empty(),
2678 _decode,
2679 )
2680 }
2681
2682 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
2683 NodeUpdateAttributesResult,
2684 fidl::encoding::DefaultFuchsiaResourceDialect,
2685 >;
2686 fn r#update_attributes(
2687 &self,
2688 mut payload: &MutableNodeAttributes,
2689 ) -> Self::UpdateAttributesResponseFut {
2690 fn _decode(
2691 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2692 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
2693 let _response = fidl::client::decode_transaction_body::<
2694 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2695 fidl::encoding::DefaultFuchsiaResourceDialect,
2696 0x3308c1da5a89bf08,
2697 >(_buf?)?;
2698 Ok(_response.map(|x| x))
2699 }
2700 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
2701 payload,
2702 0x3308c1da5a89bf08,
2703 fidl::encoding::DynamicFlags::empty(),
2704 _decode,
2705 )
2706 }
2707
2708 type SyncResponseFut = fidl::client::QueryResponseFut<
2709 NodeSyncResult,
2710 fidl::encoding::DefaultFuchsiaResourceDialect,
2711 >;
2712 fn r#sync(&self) -> Self::SyncResponseFut {
2713 fn _decode(
2714 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2715 ) -> Result<NodeSyncResult, fidl::Error> {
2716 let _response = fidl::client::decode_transaction_body::<
2717 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2718 fidl::encoding::DefaultFuchsiaResourceDialect,
2719 0x2c5c27ca0ab5dc49,
2720 >(_buf?)?;
2721 Ok(_response.map(|x| x))
2722 }
2723 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
2724 (),
2725 0x2c5c27ca0ab5dc49,
2726 fidl::encoding::DynamicFlags::empty(),
2727 _decode,
2728 )
2729 }
2730
2731 fn r#list_extended_attributes(
2732 &self,
2733 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2734 ) -> Result<(), fidl::Error> {
2735 self.client.send::<NodeListExtendedAttributesRequest>(
2736 (iterator,),
2737 0x4b61033de007fcd0,
2738 fidl::encoding::DynamicFlags::empty(),
2739 )
2740 }
2741
2742 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2743 NodeGetExtendedAttributeResult,
2744 fidl::encoding::DefaultFuchsiaResourceDialect,
2745 >;
2746 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
2747 fn _decode(
2748 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2749 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
2750 let _response = fidl::client::decode_transaction_body::<
2751 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
2752 fidl::encoding::DefaultFuchsiaResourceDialect,
2753 0x45ffa3ccfdeb76db,
2754 >(_buf?)?;
2755 Ok(_response.map(|x| x))
2756 }
2757 self.client.send_query_and_decode::<
2758 NodeGetExtendedAttributeRequest,
2759 NodeGetExtendedAttributeResult,
2760 >(
2761 (name,),
2762 0x45ffa3ccfdeb76db,
2763 fidl::encoding::DynamicFlags::empty(),
2764 _decode,
2765 )
2766 }
2767
2768 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2769 NodeSetExtendedAttributeResult,
2770 fidl::encoding::DefaultFuchsiaResourceDialect,
2771 >;
2772 fn r#set_extended_attribute(
2773 &self,
2774 mut name: &[u8],
2775 mut value: ExtendedAttributeValue,
2776 mut mode: SetExtendedAttributeMode,
2777 ) -> Self::SetExtendedAttributeResponseFut {
2778 fn _decode(
2779 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2780 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
2781 let _response = fidl::client::decode_transaction_body::<
2782 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2783 fidl::encoding::DefaultFuchsiaResourceDialect,
2784 0x4a951362f681f23c,
2785 >(_buf?)?;
2786 Ok(_response.map(|x| x))
2787 }
2788 self.client.send_query_and_decode::<
2789 NodeSetExtendedAttributeRequest,
2790 NodeSetExtendedAttributeResult,
2791 >(
2792 (name, &mut value, mode,),
2793 0x4a951362f681f23c,
2794 fidl::encoding::DynamicFlags::empty(),
2795 _decode,
2796 )
2797 }
2798
2799 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2800 NodeRemoveExtendedAttributeResult,
2801 fidl::encoding::DefaultFuchsiaResourceDialect,
2802 >;
2803 fn r#remove_extended_attribute(
2804 &self,
2805 mut name: &[u8],
2806 ) -> Self::RemoveExtendedAttributeResponseFut {
2807 fn _decode(
2808 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2809 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
2810 let _response = fidl::client::decode_transaction_body::<
2811 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2812 fidl::encoding::DefaultFuchsiaResourceDialect,
2813 0x7a0b9f3a9bf9032d,
2814 >(_buf?)?;
2815 Ok(_response.map(|x| x))
2816 }
2817 self.client.send_query_and_decode::<
2818 NodeRemoveExtendedAttributeRequest,
2819 NodeRemoveExtendedAttributeResult,
2820 >(
2821 (name,),
2822 0x7a0b9f3a9bf9032d,
2823 fidl::encoding::DynamicFlags::empty(),
2824 _decode,
2825 )
2826 }
2827
2828 fn r#deprecated_open(
2829 &self,
2830 mut flags: OpenFlags,
2831 mut mode: ModeType,
2832 mut path: &str,
2833 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2834 ) -> Result<(), fidl::Error> {
2835 self.client.send::<DirectoryDeprecatedOpenRequest>(
2836 (flags, mode, path, object),
2837 0x2c5044561d685ec0,
2838 fidl::encoding::DynamicFlags::FLEXIBLE,
2839 )
2840 }
2841
2842 fn r#open(
2843 &self,
2844 mut path: &str,
2845 mut flags: Flags,
2846 mut options: &Options,
2847 mut object: fidl::Channel,
2848 ) -> Result<(), fidl::Error> {
2849 self.client.send::<DirectoryOpenRequest>(
2850 (path, flags, options, object),
2851 0x568ddcb9a9cbb6d9,
2852 fidl::encoding::DynamicFlags::empty(),
2853 )
2854 }
2855
2856 type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
2857 (i32, Vec<u8>),
2858 fidl::encoding::DefaultFuchsiaResourceDialect,
2859 >;
2860 fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
2861 fn _decode(
2862 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2863 ) -> Result<(i32, Vec<u8>), fidl::Error> {
2864 let _response = fidl::client::decode_transaction_body::<
2865 DirectoryReadDirentsResponse,
2866 fidl::encoding::DefaultFuchsiaResourceDialect,
2867 0x3582806bf27faa0a,
2868 >(_buf?)?;
2869 Ok((_response.s, _response.dirents))
2870 }
2871 self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
2872 (max_bytes,),
2873 0x3582806bf27faa0a,
2874 fidl::encoding::DynamicFlags::empty(),
2875 _decode,
2876 )
2877 }
2878
2879 type RewindResponseFut =
2880 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2881 fn r#rewind(&self) -> Self::RewindResponseFut {
2882 fn _decode(
2883 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2884 ) -> Result<i32, fidl::Error> {
2885 let _response = fidl::client::decode_transaction_body::<
2886 DirectoryRewindResponse,
2887 fidl::encoding::DefaultFuchsiaResourceDialect,
2888 0x16b1202af0f34c71,
2889 >(_buf?)?;
2890 Ok(_response.s)
2891 }
2892 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
2893 (),
2894 0x16b1202af0f34c71,
2895 fidl::encoding::DynamicFlags::empty(),
2896 _decode,
2897 )
2898 }
2899
2900 type GetTokenResponseFut = fidl::client::QueryResponseFut<
2901 (i32, Option<fidl::NullableHandle>),
2902 fidl::encoding::DefaultFuchsiaResourceDialect,
2903 >;
2904 fn r#get_token(&self) -> Self::GetTokenResponseFut {
2905 fn _decode(
2906 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2907 ) -> Result<(i32, Option<fidl::NullableHandle>), fidl::Error> {
2908 let _response = fidl::client::decode_transaction_body::<
2909 DirectoryGetTokenResponse,
2910 fidl::encoding::DefaultFuchsiaResourceDialect,
2911 0x26ae9d18763c8655,
2912 >(_buf?)?;
2913 Ok((_response.s, _response.token))
2914 }
2915 self.client.send_query_and_decode::<
2916 fidl::encoding::EmptyPayload,
2917 (i32, Option<fidl::NullableHandle>),
2918 >(
2919 (),
2920 0x26ae9d18763c8655,
2921 fidl::encoding::DynamicFlags::empty(),
2922 _decode,
2923 )
2924 }
2925
2926 type LinkResponseFut =
2927 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2928 fn r#link(
2929 &self,
2930 mut src: &str,
2931 mut dst_parent_token: fidl::NullableHandle,
2932 mut dst: &str,
2933 ) -> Self::LinkResponseFut {
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 DirectoryLinkResponse,
2939 fidl::encoding::DefaultFuchsiaResourceDialect,
2940 0x740604c0c7c930e7,
2941 >(_buf?)?;
2942 Ok(_response.s)
2943 }
2944 self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2945 (src, dst_parent_token, dst),
2946 0x740604c0c7c930e7,
2947 fidl::encoding::DynamicFlags::empty(),
2948 _decode,
2949 )
2950 }
2951
2952 type UnlinkResponseFut = fidl::client::QueryResponseFut<
2953 DirectoryUnlinkResult,
2954 fidl::encoding::DefaultFuchsiaResourceDialect,
2955 >;
2956 fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
2957 fn _decode(
2958 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2959 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
2960 let _response = fidl::client::decode_transaction_body::<
2961 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2962 fidl::encoding::DefaultFuchsiaResourceDialect,
2963 0x750a0326a78d7bed,
2964 >(_buf?)?;
2965 Ok(_response.map(|x| x))
2966 }
2967 self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
2968 (name, options),
2969 0x750a0326a78d7bed,
2970 fidl::encoding::DynamicFlags::empty(),
2971 _decode,
2972 )
2973 }
2974
2975 type RenameResponseFut = fidl::client::QueryResponseFut<
2976 DirectoryRenameResult,
2977 fidl::encoding::DefaultFuchsiaResourceDialect,
2978 >;
2979 fn r#rename(
2980 &self,
2981 mut src: &str,
2982 mut dst_parent_token: fidl::Event,
2983 mut dst: &str,
2984 ) -> Self::RenameResponseFut {
2985 fn _decode(
2986 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2987 ) -> Result<DirectoryRenameResult, fidl::Error> {
2988 let _response = fidl::client::decode_transaction_body::<
2989 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2990 fidl::encoding::DefaultFuchsiaResourceDialect,
2991 0x7060e7723b9928de,
2992 >(_buf?)?;
2993 Ok(_response.map(|x| x))
2994 }
2995 self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
2996 (src, dst_parent_token, dst),
2997 0x7060e7723b9928de,
2998 fidl::encoding::DynamicFlags::empty(),
2999 _decode,
3000 )
3001 }
3002
3003 type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
3004 DirectoryCreateSymlinkResult,
3005 fidl::encoding::DefaultFuchsiaResourceDialect,
3006 >;
3007 fn r#create_symlink(
3008 &self,
3009 mut name: &str,
3010 mut target: &[u8],
3011 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
3012 ) -> Self::CreateSymlinkResponseFut {
3013 fn _decode(
3014 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3015 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
3016 let _response = fidl::client::decode_transaction_body::<
3017 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3018 fidl::encoding::DefaultFuchsiaResourceDialect,
3019 0x21ce0f19ec043889,
3020 >(_buf?)?;
3021 Ok(_response.map(|x| x))
3022 }
3023 self.client
3024 .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
3025 (name, target, connection),
3026 0x21ce0f19ec043889,
3027 fidl::encoding::DynamicFlags::empty(),
3028 _decode,
3029 )
3030 }
3031
3032 type WatchResponseFut =
3033 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3034 fn r#watch(
3035 &self,
3036 mut mask: WatchMask,
3037 mut options: u32,
3038 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
3039 ) -> Self::WatchResponseFut {
3040 fn _decode(
3041 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3042 ) -> Result<i32, fidl::Error> {
3043 let _response = fidl::client::decode_transaction_body::<
3044 DirectoryWatchResponse,
3045 fidl::encoding::DefaultFuchsiaResourceDialect,
3046 0x5717193a59d66d91,
3047 >(_buf?)?;
3048 Ok(_response.s)
3049 }
3050 self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
3051 (mask, options, watcher),
3052 0x5717193a59d66d91,
3053 fidl::encoding::DynamicFlags::empty(),
3054 _decode,
3055 )
3056 }
3057}
3058
3059pub struct DirectoryEventStream {
3060 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3061}
3062
3063impl std::marker::Unpin for DirectoryEventStream {}
3064
3065impl futures::stream::FusedStream for DirectoryEventStream {
3066 fn is_terminated(&self) -> bool {
3067 self.event_receiver.is_terminated()
3068 }
3069}
3070
3071impl futures::Stream for DirectoryEventStream {
3072 type Item = Result<DirectoryEvent, fidl::Error>;
3073
3074 fn poll_next(
3075 mut self: std::pin::Pin<&mut Self>,
3076 cx: &mut std::task::Context<'_>,
3077 ) -> std::task::Poll<Option<Self::Item>> {
3078 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3079 &mut self.event_receiver,
3080 cx
3081 )?) {
3082 Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
3083 None => std::task::Poll::Ready(None),
3084 }
3085 }
3086}
3087
3088#[derive(Debug)]
3089pub enum DirectoryEvent {
3090 OnOpen_ {
3091 s: i32,
3092 info: Option<Box<NodeInfoDeprecated>>,
3093 },
3094 OnRepresentation {
3095 payload: Representation,
3096 },
3097 #[non_exhaustive]
3098 _UnknownEvent {
3099 ordinal: u64,
3101 },
3102}
3103
3104impl DirectoryEvent {
3105 #[allow(irrefutable_let_patterns)]
3106 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
3107 if let DirectoryEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
3108 }
3109 #[allow(irrefutable_let_patterns)]
3110 pub fn into_on_representation(self) -> Option<Representation> {
3111 if let DirectoryEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
3112 }
3113
3114 fn decode(
3116 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3117 ) -> Result<DirectoryEvent, fidl::Error> {
3118 let (bytes, _handles) = buf.split_mut();
3119 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3120 debug_assert_eq!(tx_header.tx_id, 0);
3121 match tx_header.ordinal {
3122 0x7fc7bbb1dbfd1972 => {
3123 let mut out = fidl::new_empty!(
3124 NodeOnOpenRequest,
3125 fidl::encoding::DefaultFuchsiaResourceDialect
3126 );
3127 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3128 Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
3129 }
3130 0x5cb40567d80a510c => {
3131 let mut out =
3132 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
3133 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
3134 Ok((DirectoryEvent::OnRepresentation { payload: out }))
3135 }
3136 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3137 Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3138 }
3139 _ => Err(fidl::Error::UnknownOrdinal {
3140 ordinal: tx_header.ordinal,
3141 protocol_name: <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3142 }),
3143 }
3144 }
3145}
3146
3147pub struct DirectoryRequestStream {
3149 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3150 is_terminated: bool,
3151}
3152
3153impl std::marker::Unpin for DirectoryRequestStream {}
3154
3155impl futures::stream::FusedStream for DirectoryRequestStream {
3156 fn is_terminated(&self) -> bool {
3157 self.is_terminated
3158 }
3159}
3160
3161impl fidl::endpoints::RequestStream for DirectoryRequestStream {
3162 type Protocol = DirectoryMarker;
3163 type ControlHandle = DirectoryControlHandle;
3164
3165 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3166 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3167 }
3168
3169 fn control_handle(&self) -> Self::ControlHandle {
3170 DirectoryControlHandle { inner: self.inner.clone() }
3171 }
3172
3173 fn into_inner(
3174 self,
3175 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3176 {
3177 (self.inner, self.is_terminated)
3178 }
3179
3180 fn from_inner(
3181 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3182 is_terminated: bool,
3183 ) -> Self {
3184 Self { inner, is_terminated }
3185 }
3186}
3187
3188impl futures::Stream for DirectoryRequestStream {
3189 type Item = Result<DirectoryRequest, fidl::Error>;
3190
3191 fn poll_next(
3192 mut self: std::pin::Pin<&mut Self>,
3193 cx: &mut std::task::Context<'_>,
3194 ) -> std::task::Poll<Option<Self::Item>> {
3195 let this = &mut *self;
3196 if this.inner.check_shutdown(cx) {
3197 this.is_terminated = true;
3198 return std::task::Poll::Ready(None);
3199 }
3200 if this.is_terminated {
3201 panic!("polled DirectoryRequestStream after completion");
3202 }
3203 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3204 |bytes, handles| {
3205 match this.inner.channel().read_etc(cx, bytes, handles) {
3206 std::task::Poll::Ready(Ok(())) => {}
3207 std::task::Poll::Pending => return std::task::Poll::Pending,
3208 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3209 this.is_terminated = true;
3210 return std::task::Poll::Ready(None);
3211 }
3212 std::task::Poll::Ready(Err(e)) => {
3213 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3214 e.into(),
3215 ))));
3216 }
3217 }
3218
3219 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3221
3222 std::task::Poll::Ready(Some(match header.ordinal {
3223 0x6ee9c0ad53ec87aa => {
3224 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3225 let mut req = fidl::new_empty!(
3226 AdvisoryLockingAdvisoryLockRequest,
3227 fidl::encoding::DefaultFuchsiaResourceDialect
3228 );
3229 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
3230 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3231 Ok(DirectoryRequest::AdvisoryLock {
3232 request: req.request,
3233
3234 responder: DirectoryAdvisoryLockResponder {
3235 control_handle: std::mem::ManuallyDrop::new(control_handle),
3236 tx_id: header.tx_id,
3237 },
3238 })
3239 }
3240 0x20d8a7aba2168a79 => {
3241 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3242 let mut req = fidl::new_empty!(
3243 fidl_fuchsia_unknown::CloneableCloneRequest,
3244 fidl::encoding::DefaultFuchsiaResourceDialect
3245 );
3246 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3247 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3248 Ok(DirectoryRequest::Clone { request: req.request, control_handle })
3249 }
3250 0x5ac5d459ad7f657e => {
3251 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3252 let mut req = fidl::new_empty!(
3253 fidl::encoding::EmptyPayload,
3254 fidl::encoding::DefaultFuchsiaResourceDialect
3255 );
3256 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3257 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3258 Ok(DirectoryRequest::Close {
3259 responder: DirectoryCloseResponder {
3260 control_handle: std::mem::ManuallyDrop::new(control_handle),
3261 tx_id: header.tx_id,
3262 },
3263 })
3264 }
3265 0x2658edee9decfc06 => {
3266 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3267 let mut req = fidl::new_empty!(
3268 fidl::encoding::EmptyPayload,
3269 fidl::encoding::DefaultFuchsiaResourceDialect
3270 );
3271 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3272 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3273 Ok(DirectoryRequest::Query {
3274 responder: DirectoryQueryResponder {
3275 control_handle: std::mem::ManuallyDrop::new(control_handle),
3276 tx_id: header.tx_id,
3277 },
3278 })
3279 }
3280 0x5a61678f293ce16f => {
3281 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3282 let mut req = fidl::new_empty!(
3283 NodeDeprecatedCloneRequest,
3284 fidl::encoding::DefaultFuchsiaResourceDialect
3285 );
3286 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3287 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3288 Ok(DirectoryRequest::DeprecatedClone {
3289 flags: req.flags,
3290 object: req.object,
3291
3292 control_handle,
3293 })
3294 }
3295 0x78985e216314dafd => {
3296 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3297 let mut req = fidl::new_empty!(
3298 fidl::encoding::EmptyPayload,
3299 fidl::encoding::DefaultFuchsiaResourceDialect
3300 );
3301 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3302 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3303 Ok(DirectoryRequest::DeprecatedGetAttr {
3304 responder: DirectoryDeprecatedGetAttrResponder {
3305 control_handle: std::mem::ManuallyDrop::new(control_handle),
3306 tx_id: header.tx_id,
3307 },
3308 })
3309 }
3310 0x4186c0f40d938f46 => {
3311 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3312 let mut req = fidl::new_empty!(
3313 NodeDeprecatedSetAttrRequest,
3314 fidl::encoding::DefaultFuchsiaResourceDialect
3315 );
3316 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
3317 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3318 Ok(DirectoryRequest::DeprecatedSetAttr {
3319 flags: req.flags,
3320 attributes: req.attributes,
3321
3322 responder: DirectoryDeprecatedSetAttrResponder {
3323 control_handle: std::mem::ManuallyDrop::new(control_handle),
3324 tx_id: header.tx_id,
3325 },
3326 })
3327 }
3328 0x5b88fffb8eda3aa1 => {
3329 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3330 let mut req = fidl::new_empty!(
3331 fidl::encoding::EmptyPayload,
3332 fidl::encoding::DefaultFuchsiaResourceDialect
3333 );
3334 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3335 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3336 Ok(DirectoryRequest::DeprecatedGetFlags {
3337 responder: DirectoryDeprecatedGetFlagsResponder {
3338 control_handle: std::mem::ManuallyDrop::new(control_handle),
3339 tx_id: header.tx_id,
3340 },
3341 })
3342 }
3343 0x5295b76c71fde733 => {
3344 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3345 let mut req = fidl::new_empty!(
3346 NodeDeprecatedSetFlagsRequest,
3347 fidl::encoding::DefaultFuchsiaResourceDialect
3348 );
3349 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3350 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3351 Ok(DirectoryRequest::DeprecatedSetFlags {
3352 flags: req.flags,
3353
3354 responder: DirectoryDeprecatedSetFlagsResponder {
3355 control_handle: std::mem::ManuallyDrop::new(control_handle),
3356 tx_id: header.tx_id,
3357 },
3358 })
3359 }
3360 0x176eb318f64ec23 => {
3361 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3362 let mut req = fidl::new_empty!(
3363 fidl::encoding::EmptyPayload,
3364 fidl::encoding::DefaultFuchsiaResourceDialect
3365 );
3366 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3367 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3368 Ok(DirectoryRequest::GetFlags {
3369 responder: DirectoryGetFlagsResponder {
3370 control_handle: std::mem::ManuallyDrop::new(control_handle),
3371 tx_id: header.tx_id,
3372 },
3373 })
3374 }
3375 0x55a8028685791ea8 => {
3376 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3377 let mut req = fidl::new_empty!(
3378 NodeSetFlagsRequest,
3379 fidl::encoding::DefaultFuchsiaResourceDialect
3380 );
3381 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3382 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3383 Ok(DirectoryRequest::SetFlags {
3384 flags: req.flags,
3385
3386 responder: DirectorySetFlagsResponder {
3387 control_handle: std::mem::ManuallyDrop::new(control_handle),
3388 tx_id: header.tx_id,
3389 },
3390 })
3391 }
3392 0x6f344a1c6b0a0610 => {
3393 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3394 let mut req = fidl::new_empty!(
3395 fidl::encoding::EmptyPayload,
3396 fidl::encoding::DefaultFuchsiaResourceDialect
3397 );
3398 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3399 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3400 Ok(DirectoryRequest::QueryFilesystem {
3401 responder: DirectoryQueryFilesystemResponder {
3402 control_handle: std::mem::ManuallyDrop::new(control_handle),
3403 tx_id: header.tx_id,
3404 },
3405 })
3406 }
3407 0x3d4396a638ea053b => {
3408 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3409 let mut req = fidl::new_empty!(
3410 NodeGetAttributesRequest,
3411 fidl::encoding::DefaultFuchsiaResourceDialect
3412 );
3413 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3414 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3415 Ok(DirectoryRequest::GetAttributes {
3416 query: req.query,
3417
3418 responder: DirectoryGetAttributesResponder {
3419 control_handle: std::mem::ManuallyDrop::new(control_handle),
3420 tx_id: header.tx_id,
3421 },
3422 })
3423 }
3424 0x3308c1da5a89bf08 => {
3425 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3426 let mut req = fidl::new_empty!(
3427 MutableNodeAttributes,
3428 fidl::encoding::DefaultFuchsiaResourceDialect
3429 );
3430 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
3431 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3432 Ok(DirectoryRequest::UpdateAttributes {
3433 payload: req,
3434 responder: DirectoryUpdateAttributesResponder {
3435 control_handle: std::mem::ManuallyDrop::new(control_handle),
3436 tx_id: header.tx_id,
3437 },
3438 })
3439 }
3440 0x2c5c27ca0ab5dc49 => {
3441 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3442 let mut req = fidl::new_empty!(
3443 fidl::encoding::EmptyPayload,
3444 fidl::encoding::DefaultFuchsiaResourceDialect
3445 );
3446 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3447 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3448 Ok(DirectoryRequest::Sync {
3449 responder: DirectorySyncResponder {
3450 control_handle: std::mem::ManuallyDrop::new(control_handle),
3451 tx_id: header.tx_id,
3452 },
3453 })
3454 }
3455 0x4b61033de007fcd0 => {
3456 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3457 let mut req = fidl::new_empty!(
3458 NodeListExtendedAttributesRequest,
3459 fidl::encoding::DefaultFuchsiaResourceDialect
3460 );
3461 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3462 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3463 Ok(DirectoryRequest::ListExtendedAttributes {
3464 iterator: req.iterator,
3465
3466 control_handle,
3467 })
3468 }
3469 0x45ffa3ccfdeb76db => {
3470 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3471 let mut req = fidl::new_empty!(
3472 NodeGetExtendedAttributeRequest,
3473 fidl::encoding::DefaultFuchsiaResourceDialect
3474 );
3475 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3476 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3477 Ok(DirectoryRequest::GetExtendedAttribute {
3478 name: req.name,
3479
3480 responder: DirectoryGetExtendedAttributeResponder {
3481 control_handle: std::mem::ManuallyDrop::new(control_handle),
3482 tx_id: header.tx_id,
3483 },
3484 })
3485 }
3486 0x4a951362f681f23c => {
3487 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3488 let mut req = fidl::new_empty!(
3489 NodeSetExtendedAttributeRequest,
3490 fidl::encoding::DefaultFuchsiaResourceDialect
3491 );
3492 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3493 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3494 Ok(DirectoryRequest::SetExtendedAttribute {
3495 name: req.name,
3496 value: req.value,
3497 mode: req.mode,
3498
3499 responder: DirectorySetExtendedAttributeResponder {
3500 control_handle: std::mem::ManuallyDrop::new(control_handle),
3501 tx_id: header.tx_id,
3502 },
3503 })
3504 }
3505 0x7a0b9f3a9bf9032d => {
3506 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3507 let mut req = fidl::new_empty!(
3508 NodeRemoveExtendedAttributeRequest,
3509 fidl::encoding::DefaultFuchsiaResourceDialect
3510 );
3511 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3512 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3513 Ok(DirectoryRequest::RemoveExtendedAttribute {
3514 name: req.name,
3515
3516 responder: DirectoryRemoveExtendedAttributeResponder {
3517 control_handle: std::mem::ManuallyDrop::new(control_handle),
3518 tx_id: header.tx_id,
3519 },
3520 })
3521 }
3522 0x2c5044561d685ec0 => {
3523 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3524 let mut req = fidl::new_empty!(
3525 DirectoryDeprecatedOpenRequest,
3526 fidl::encoding::DefaultFuchsiaResourceDialect
3527 );
3528 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3529 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3530 Ok(DirectoryRequest::DeprecatedOpen {
3531 flags: req.flags,
3532 mode: req.mode,
3533 path: req.path,
3534 object: req.object,
3535
3536 control_handle,
3537 })
3538 }
3539 0x568ddcb9a9cbb6d9 => {
3540 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3541 let mut req = fidl::new_empty!(
3542 DirectoryOpenRequest,
3543 fidl::encoding::DefaultFuchsiaResourceDialect
3544 );
3545 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3546 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3547 Ok(DirectoryRequest::Open {
3548 path: req.path,
3549 flags: req.flags,
3550 options: req.options,
3551 object: req.object,
3552
3553 control_handle,
3554 })
3555 }
3556 0x3582806bf27faa0a => {
3557 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3558 let mut req = fidl::new_empty!(
3559 DirectoryReadDirentsRequest,
3560 fidl::encoding::DefaultFuchsiaResourceDialect
3561 );
3562 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
3563 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3564 Ok(DirectoryRequest::ReadDirents {
3565 max_bytes: req.max_bytes,
3566
3567 responder: DirectoryReadDirentsResponder {
3568 control_handle: std::mem::ManuallyDrop::new(control_handle),
3569 tx_id: header.tx_id,
3570 },
3571 })
3572 }
3573 0x16b1202af0f34c71 => {
3574 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3575 let mut req = fidl::new_empty!(
3576 fidl::encoding::EmptyPayload,
3577 fidl::encoding::DefaultFuchsiaResourceDialect
3578 );
3579 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3580 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3581 Ok(DirectoryRequest::Rewind {
3582 responder: DirectoryRewindResponder {
3583 control_handle: std::mem::ManuallyDrop::new(control_handle),
3584 tx_id: header.tx_id,
3585 },
3586 })
3587 }
3588 0x26ae9d18763c8655 => {
3589 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3590 let mut req = fidl::new_empty!(
3591 fidl::encoding::EmptyPayload,
3592 fidl::encoding::DefaultFuchsiaResourceDialect
3593 );
3594 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3595 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3596 Ok(DirectoryRequest::GetToken {
3597 responder: DirectoryGetTokenResponder {
3598 control_handle: std::mem::ManuallyDrop::new(control_handle),
3599 tx_id: header.tx_id,
3600 },
3601 })
3602 }
3603 0x740604c0c7c930e7 => {
3604 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3605 let mut req = fidl::new_empty!(
3606 DirectoryLinkRequest,
3607 fidl::encoding::DefaultFuchsiaResourceDialect
3608 );
3609 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
3610 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3611 Ok(DirectoryRequest::Link {
3612 src: req.src,
3613 dst_parent_token: req.dst_parent_token,
3614 dst: req.dst,
3615
3616 responder: DirectoryLinkResponder {
3617 control_handle: std::mem::ManuallyDrop::new(control_handle),
3618 tx_id: header.tx_id,
3619 },
3620 })
3621 }
3622 0x750a0326a78d7bed => {
3623 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3624 let mut req = fidl::new_empty!(
3625 DirectoryUnlinkRequest,
3626 fidl::encoding::DefaultFuchsiaResourceDialect
3627 );
3628 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3629 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3630 Ok(DirectoryRequest::Unlink {
3631 name: req.name,
3632 options: req.options,
3633
3634 responder: DirectoryUnlinkResponder {
3635 control_handle: std::mem::ManuallyDrop::new(control_handle),
3636 tx_id: header.tx_id,
3637 },
3638 })
3639 }
3640 0x7060e7723b9928de => {
3641 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3642 let mut req = fidl::new_empty!(
3643 DirectoryRenameRequest,
3644 fidl::encoding::DefaultFuchsiaResourceDialect
3645 );
3646 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
3647 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3648 Ok(DirectoryRequest::Rename {
3649 src: req.src,
3650 dst_parent_token: req.dst_parent_token,
3651 dst: req.dst,
3652
3653 responder: DirectoryRenameResponder {
3654 control_handle: std::mem::ManuallyDrop::new(control_handle),
3655 tx_id: header.tx_id,
3656 },
3657 })
3658 }
3659 0x21ce0f19ec043889 => {
3660 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3661 let mut req = fidl::new_empty!(
3662 DirectoryCreateSymlinkRequest,
3663 fidl::encoding::DefaultFuchsiaResourceDialect
3664 );
3665 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3666 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3667 Ok(DirectoryRequest::CreateSymlink {
3668 name: req.name,
3669 target: req.target,
3670 connection: req.connection,
3671
3672 responder: DirectoryCreateSymlinkResponder {
3673 control_handle: std::mem::ManuallyDrop::new(control_handle),
3674 tx_id: header.tx_id,
3675 },
3676 })
3677 }
3678 0x5717193a59d66d91 => {
3679 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3680 let mut req = fidl::new_empty!(
3681 DirectoryWatchRequest,
3682 fidl::encoding::DefaultFuchsiaResourceDialect
3683 );
3684 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
3685 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3686 Ok(DirectoryRequest::Watch {
3687 mask: req.mask,
3688 options: req.options,
3689 watcher: req.watcher,
3690
3691 responder: DirectoryWatchResponder {
3692 control_handle: std::mem::ManuallyDrop::new(control_handle),
3693 tx_id: header.tx_id,
3694 },
3695 })
3696 }
3697 _ if header.tx_id == 0
3698 && header
3699 .dynamic_flags()
3700 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3701 {
3702 Ok(DirectoryRequest::_UnknownMethod {
3703 ordinal: header.ordinal,
3704 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3705 method_type: fidl::MethodType::OneWay,
3706 })
3707 }
3708 _ if header
3709 .dynamic_flags()
3710 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3711 {
3712 this.inner.send_framework_err(
3713 fidl::encoding::FrameworkErr::UnknownMethod,
3714 header.tx_id,
3715 header.ordinal,
3716 header.dynamic_flags(),
3717 (bytes, handles),
3718 )?;
3719 Ok(DirectoryRequest::_UnknownMethod {
3720 ordinal: header.ordinal,
3721 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3722 method_type: fidl::MethodType::TwoWay,
3723 })
3724 }
3725 _ => Err(fidl::Error::UnknownOrdinal {
3726 ordinal: header.ordinal,
3727 protocol_name:
3728 <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3729 }),
3730 }))
3731 },
3732 )
3733 }
3734}
3735
3736#[derive(Debug)]
3738pub enum DirectoryRequest {
3739 AdvisoryLock {
3763 request: AdvisoryLockRequest,
3764 responder: DirectoryAdvisoryLockResponder,
3765 },
3766 Clone {
3767 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
3768 control_handle: DirectoryControlHandle,
3769 },
3770 Close {
3781 responder: DirectoryCloseResponder,
3782 },
3783 Query {
3784 responder: DirectoryQueryResponder,
3785 },
3786 DeprecatedClone {
3788 flags: OpenFlags,
3789 object: fidl::endpoints::ServerEnd<NodeMarker>,
3790 control_handle: DirectoryControlHandle,
3791 },
3792 DeprecatedGetAttr {
3794 responder: DirectoryDeprecatedGetAttrResponder,
3795 },
3796 DeprecatedSetAttr {
3798 flags: NodeAttributeFlags,
3799 attributes: NodeAttributes,
3800 responder: DirectoryDeprecatedSetAttrResponder,
3801 },
3802 DeprecatedGetFlags {
3804 responder: DirectoryDeprecatedGetFlagsResponder,
3805 },
3806 DeprecatedSetFlags {
3808 flags: OpenFlags,
3809 responder: DirectoryDeprecatedSetFlagsResponder,
3810 },
3811 GetFlags {
3820 responder: DirectoryGetFlagsResponder,
3821 },
3822 SetFlags {
3832 flags: Flags,
3833 responder: DirectorySetFlagsResponder,
3834 },
3835 QueryFilesystem {
3839 responder: DirectoryQueryFilesystemResponder,
3840 },
3841 GetAttributes {
3855 query: NodeAttributesQuery,
3856 responder: DirectoryGetAttributesResponder,
3857 },
3858 UpdateAttributes {
3867 payload: MutableNodeAttributes,
3868 responder: DirectoryUpdateAttributesResponder,
3869 },
3870 Sync {
3880 responder: DirectorySyncResponder,
3881 },
3882 ListExtendedAttributes {
3891 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
3892 control_handle: DirectoryControlHandle,
3893 },
3894 GetExtendedAttribute {
3901 name: Vec<u8>,
3902 responder: DirectoryGetExtendedAttributeResponder,
3903 },
3904 SetExtendedAttribute {
3912 name: Vec<u8>,
3913 value: ExtendedAttributeValue,
3914 mode: SetExtendedAttributeMode,
3915 responder: DirectorySetExtendedAttributeResponder,
3916 },
3917 RemoveExtendedAttribute {
3923 name: Vec<u8>,
3924 responder: DirectoryRemoveExtendedAttributeResponder,
3925 },
3926 DeprecatedOpen {
3928 flags: OpenFlags,
3929 mode: ModeType,
3930 path: String,
3931 object: fidl::endpoints::ServerEnd<NodeMarker>,
3932 control_handle: DirectoryControlHandle,
3933 },
3934 Open {
3941 path: String,
3942 flags: Flags,
3943 options: Options,
3944 object: fidl::Channel,
3945 control_handle: DirectoryControlHandle,
3946 },
3947 ReadDirents {
3973 max_bytes: u64,
3974 responder: DirectoryReadDirentsResponder,
3975 },
3976 Rewind {
3980 responder: DirectoryRewindResponder,
3981 },
3982 GetToken {
3989 responder: DirectoryGetTokenResponder,
3990 },
3991 Link {
4008 src: String,
4009 dst_parent_token: fidl::NullableHandle,
4010 dst: String,
4011 responder: DirectoryLinkResponder,
4012 },
4013 Unlink {
4038 name: String,
4039 options: UnlinkOptions,
4040 responder: DirectoryUnlinkResponder,
4041 },
4042 Rename {
4068 src: String,
4069 dst_parent_token: fidl::Event,
4070 dst: String,
4071 responder: DirectoryRenameResponder,
4072 },
4073 CreateSymlink {
4088 name: String,
4089 target: Vec<u8>,
4090 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4091 responder: DirectoryCreateSymlinkResponder,
4092 },
4093 Watch {
4100 mask: WatchMask,
4101 options: u32,
4102 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4103 responder: DirectoryWatchResponder,
4104 },
4105 #[non_exhaustive]
4107 _UnknownMethod {
4108 ordinal: u64,
4110 control_handle: DirectoryControlHandle,
4111 method_type: fidl::MethodType,
4112 },
4113}
4114
4115impl DirectoryRequest {
4116 #[allow(irrefutable_let_patterns)]
4117 pub fn into_advisory_lock(
4118 self,
4119 ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
4120 if let DirectoryRequest::AdvisoryLock { request, responder } = self {
4121 Some((request, responder))
4122 } else {
4123 None
4124 }
4125 }
4126
4127 #[allow(irrefutable_let_patterns)]
4128 pub fn into_clone(
4129 self,
4130 ) -> Option<(
4131 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
4132 DirectoryControlHandle,
4133 )> {
4134 if let DirectoryRequest::Clone { request, control_handle } = self {
4135 Some((request, control_handle))
4136 } else {
4137 None
4138 }
4139 }
4140
4141 #[allow(irrefutable_let_patterns)]
4142 pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
4143 if let DirectoryRequest::Close { responder } = self { Some((responder)) } else { None }
4144 }
4145
4146 #[allow(irrefutable_let_patterns)]
4147 pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
4148 if let DirectoryRequest::Query { responder } = self { Some((responder)) } else { None }
4149 }
4150
4151 #[allow(irrefutable_let_patterns)]
4152 pub fn into_deprecated_clone(
4153 self,
4154 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, DirectoryControlHandle)> {
4155 if let DirectoryRequest::DeprecatedClone { flags, object, control_handle } = self {
4156 Some((flags, object, control_handle))
4157 } else {
4158 None
4159 }
4160 }
4161
4162 #[allow(irrefutable_let_patterns)]
4163 pub fn into_deprecated_get_attr(self) -> Option<(DirectoryDeprecatedGetAttrResponder)> {
4164 if let DirectoryRequest::DeprecatedGetAttr { responder } = self {
4165 Some((responder))
4166 } else {
4167 None
4168 }
4169 }
4170
4171 #[allow(irrefutable_let_patterns)]
4172 pub fn into_deprecated_set_attr(
4173 self,
4174 ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
4175 if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
4176 Some((flags, attributes, responder))
4177 } else {
4178 None
4179 }
4180 }
4181
4182 #[allow(irrefutable_let_patterns)]
4183 pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
4184 if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
4185 Some((responder))
4186 } else {
4187 None
4188 }
4189 }
4190
4191 #[allow(irrefutable_let_patterns)]
4192 pub fn into_deprecated_set_flags(
4193 self,
4194 ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
4195 if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
4196 Some((flags, responder))
4197 } else {
4198 None
4199 }
4200 }
4201
4202 #[allow(irrefutable_let_patterns)]
4203 pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
4204 if let DirectoryRequest::GetFlags { responder } = self { Some((responder)) } else { None }
4205 }
4206
4207 #[allow(irrefutable_let_patterns)]
4208 pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
4209 if let DirectoryRequest::SetFlags { flags, responder } = self {
4210 Some((flags, responder))
4211 } else {
4212 None
4213 }
4214 }
4215
4216 #[allow(irrefutable_let_patterns)]
4217 pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
4218 if let DirectoryRequest::QueryFilesystem { responder } = self {
4219 Some((responder))
4220 } else {
4221 None
4222 }
4223 }
4224
4225 #[allow(irrefutable_let_patterns)]
4226 pub fn into_get_attributes(
4227 self,
4228 ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
4229 if let DirectoryRequest::GetAttributes { query, responder } = self {
4230 Some((query, responder))
4231 } else {
4232 None
4233 }
4234 }
4235
4236 #[allow(irrefutable_let_patterns)]
4237 pub fn into_update_attributes(
4238 self,
4239 ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
4240 if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
4241 Some((payload, responder))
4242 } else {
4243 None
4244 }
4245 }
4246
4247 #[allow(irrefutable_let_patterns)]
4248 pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
4249 if let DirectoryRequest::Sync { responder } = self { Some((responder)) } else { None }
4250 }
4251
4252 #[allow(irrefutable_let_patterns)]
4253 pub fn into_list_extended_attributes(
4254 self,
4255 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, DirectoryControlHandle)>
4256 {
4257 if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
4258 Some((iterator, control_handle))
4259 } else {
4260 None
4261 }
4262 }
4263
4264 #[allow(irrefutable_let_patterns)]
4265 pub fn into_get_extended_attribute(
4266 self,
4267 ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
4268 if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
4269 Some((name, responder))
4270 } else {
4271 None
4272 }
4273 }
4274
4275 #[allow(irrefutable_let_patterns)]
4276 pub fn into_set_extended_attribute(
4277 self,
4278 ) -> Option<(
4279 Vec<u8>,
4280 ExtendedAttributeValue,
4281 SetExtendedAttributeMode,
4282 DirectorySetExtendedAttributeResponder,
4283 )> {
4284 if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
4285 Some((name, value, mode, responder))
4286 } else {
4287 None
4288 }
4289 }
4290
4291 #[allow(irrefutable_let_patterns)]
4292 pub fn into_remove_extended_attribute(
4293 self,
4294 ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
4295 if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
4296 Some((name, responder))
4297 } else {
4298 None
4299 }
4300 }
4301
4302 #[allow(irrefutable_let_patterns)]
4303 pub fn into_deprecated_open(
4304 self,
4305 ) -> Option<(
4306 OpenFlags,
4307 ModeType,
4308 String,
4309 fidl::endpoints::ServerEnd<NodeMarker>,
4310 DirectoryControlHandle,
4311 )> {
4312 if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
4313 {
4314 Some((flags, mode, path, object, control_handle))
4315 } else {
4316 None
4317 }
4318 }
4319
4320 #[allow(irrefutable_let_patterns)]
4321 pub fn into_open(
4322 self,
4323 ) -> Option<(String, Flags, Options, fidl::Channel, DirectoryControlHandle)> {
4324 if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
4325 Some((path, flags, options, object, control_handle))
4326 } else {
4327 None
4328 }
4329 }
4330
4331 #[allow(irrefutable_let_patterns)]
4332 pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
4333 if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
4334 Some((max_bytes, responder))
4335 } else {
4336 None
4337 }
4338 }
4339
4340 #[allow(irrefutable_let_patterns)]
4341 pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
4342 if let DirectoryRequest::Rewind { responder } = self { Some((responder)) } else { None }
4343 }
4344
4345 #[allow(irrefutable_let_patterns)]
4346 pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
4347 if let DirectoryRequest::GetToken { responder } = self { Some((responder)) } else { None }
4348 }
4349
4350 #[allow(irrefutable_let_patterns)]
4351 pub fn into_link(
4352 self,
4353 ) -> Option<(String, fidl::NullableHandle, String, DirectoryLinkResponder)> {
4354 if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
4355 Some((src, dst_parent_token, dst, responder))
4356 } else {
4357 None
4358 }
4359 }
4360
4361 #[allow(irrefutable_let_patterns)]
4362 pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
4363 if let DirectoryRequest::Unlink { name, options, responder } = self {
4364 Some((name, options, responder))
4365 } else {
4366 None
4367 }
4368 }
4369
4370 #[allow(irrefutable_let_patterns)]
4371 pub fn into_rename(self) -> Option<(String, fidl::Event, String, DirectoryRenameResponder)> {
4372 if let DirectoryRequest::Rename { src, dst_parent_token, dst, responder } = self {
4373 Some((src, dst_parent_token, dst, responder))
4374 } else {
4375 None
4376 }
4377 }
4378
4379 #[allow(irrefutable_let_patterns)]
4380 pub fn into_create_symlink(
4381 self,
4382 ) -> Option<(
4383 String,
4384 Vec<u8>,
4385 Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4386 DirectoryCreateSymlinkResponder,
4387 )> {
4388 if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
4389 Some((name, target, connection, responder))
4390 } else {
4391 None
4392 }
4393 }
4394
4395 #[allow(irrefutable_let_patterns)]
4396 pub fn into_watch(
4397 self,
4398 ) -> Option<(
4399 WatchMask,
4400 u32,
4401 fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4402 DirectoryWatchResponder,
4403 )> {
4404 if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
4405 Some((mask, options, watcher, responder))
4406 } else {
4407 None
4408 }
4409 }
4410
4411 pub fn method_name(&self) -> &'static str {
4413 match *self {
4414 DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
4415 DirectoryRequest::Clone { .. } => "clone",
4416 DirectoryRequest::Close { .. } => "close",
4417 DirectoryRequest::Query { .. } => "query",
4418 DirectoryRequest::DeprecatedClone { .. } => "deprecated_clone",
4419 DirectoryRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
4420 DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
4421 DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
4422 DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
4423 DirectoryRequest::GetFlags { .. } => "get_flags",
4424 DirectoryRequest::SetFlags { .. } => "set_flags",
4425 DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
4426 DirectoryRequest::GetAttributes { .. } => "get_attributes",
4427 DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
4428 DirectoryRequest::Sync { .. } => "sync",
4429 DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
4430 DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
4431 DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
4432 DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
4433 DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
4434 DirectoryRequest::Open { .. } => "open",
4435 DirectoryRequest::ReadDirents { .. } => "read_dirents",
4436 DirectoryRequest::Rewind { .. } => "rewind",
4437 DirectoryRequest::GetToken { .. } => "get_token",
4438 DirectoryRequest::Link { .. } => "link",
4439 DirectoryRequest::Unlink { .. } => "unlink",
4440 DirectoryRequest::Rename { .. } => "rename",
4441 DirectoryRequest::CreateSymlink { .. } => "create_symlink",
4442 DirectoryRequest::Watch { .. } => "watch",
4443 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4444 "unknown one-way method"
4445 }
4446 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4447 "unknown two-way method"
4448 }
4449 }
4450 }
4451}
4452
4453#[derive(Debug, Clone)]
4454pub struct DirectoryControlHandle {
4455 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4456}
4457
4458impl fidl::endpoints::ControlHandle for DirectoryControlHandle {
4459 fn shutdown(&self) {
4460 self.inner.shutdown()
4461 }
4462
4463 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4464 self.inner.shutdown_with_epitaph(status)
4465 }
4466
4467 fn is_closed(&self) -> bool {
4468 self.inner.channel().is_closed()
4469 }
4470 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4471 self.inner.channel().on_closed()
4472 }
4473
4474 #[cfg(target_os = "fuchsia")]
4475 fn signal_peer(
4476 &self,
4477 clear_mask: zx::Signals,
4478 set_mask: zx::Signals,
4479 ) -> Result<(), zx_status::Status> {
4480 use fidl::Peered;
4481 self.inner.channel().signal_peer(clear_mask, set_mask)
4482 }
4483}
4484
4485impl DirectoryControlHandle {
4486 pub fn send_on_open_(
4487 &self,
4488 mut s: i32,
4489 mut info: Option<NodeInfoDeprecated>,
4490 ) -> Result<(), fidl::Error> {
4491 self.inner.send::<NodeOnOpenRequest>(
4492 (s, info.as_mut()),
4493 0,
4494 0x7fc7bbb1dbfd1972,
4495 fidl::encoding::DynamicFlags::FLEXIBLE,
4496 )
4497 }
4498
4499 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
4500 self.inner.send::<Representation>(
4501 &mut payload,
4502 0,
4503 0x5cb40567d80a510c,
4504 fidl::encoding::DynamicFlags::empty(),
4505 )
4506 }
4507}
4508
4509#[must_use = "FIDL methods require a response to be sent"]
4510#[derive(Debug)]
4511pub struct DirectoryAdvisoryLockResponder {
4512 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4513 tx_id: u32,
4514}
4515
4516impl std::ops::Drop for DirectoryAdvisoryLockResponder {
4520 fn drop(&mut self) {
4521 self.control_handle.shutdown();
4522 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4524 }
4525}
4526
4527impl fidl::endpoints::Responder for DirectoryAdvisoryLockResponder {
4528 type ControlHandle = DirectoryControlHandle;
4529
4530 fn control_handle(&self) -> &DirectoryControlHandle {
4531 &self.control_handle
4532 }
4533
4534 fn drop_without_shutdown(mut self) {
4535 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4537 std::mem::forget(self);
4539 }
4540}
4541
4542impl DirectoryAdvisoryLockResponder {
4543 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4547 let _result = self.send_raw(result);
4548 if _result.is_err() {
4549 self.control_handle.shutdown();
4550 }
4551 self.drop_without_shutdown();
4552 _result
4553 }
4554
4555 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4557 let _result = self.send_raw(result);
4558 self.drop_without_shutdown();
4559 _result
4560 }
4561
4562 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4563 self.control_handle
4564 .inner
4565 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4566 result,
4567 self.tx_id,
4568 0x6ee9c0ad53ec87aa,
4569 fidl::encoding::DynamicFlags::empty(),
4570 )
4571 }
4572}
4573
4574#[must_use = "FIDL methods require a response to be sent"]
4575#[derive(Debug)]
4576pub struct DirectoryCloseResponder {
4577 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4578 tx_id: u32,
4579}
4580
4581impl std::ops::Drop for DirectoryCloseResponder {
4585 fn drop(&mut self) {
4586 self.control_handle.shutdown();
4587 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4589 }
4590}
4591
4592impl fidl::endpoints::Responder for DirectoryCloseResponder {
4593 type ControlHandle = DirectoryControlHandle;
4594
4595 fn control_handle(&self) -> &DirectoryControlHandle {
4596 &self.control_handle
4597 }
4598
4599 fn drop_without_shutdown(mut self) {
4600 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4602 std::mem::forget(self);
4604 }
4605}
4606
4607impl DirectoryCloseResponder {
4608 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4612 let _result = self.send_raw(result);
4613 if _result.is_err() {
4614 self.control_handle.shutdown();
4615 }
4616 self.drop_without_shutdown();
4617 _result
4618 }
4619
4620 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4622 let _result = self.send_raw(result);
4623 self.drop_without_shutdown();
4624 _result
4625 }
4626
4627 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4628 self.control_handle
4629 .inner
4630 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4631 result,
4632 self.tx_id,
4633 0x5ac5d459ad7f657e,
4634 fidl::encoding::DynamicFlags::empty(),
4635 )
4636 }
4637}
4638
4639#[must_use = "FIDL methods require a response to be sent"]
4640#[derive(Debug)]
4641pub struct DirectoryQueryResponder {
4642 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4643 tx_id: u32,
4644}
4645
4646impl std::ops::Drop for DirectoryQueryResponder {
4650 fn drop(&mut self) {
4651 self.control_handle.shutdown();
4652 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4654 }
4655}
4656
4657impl fidl::endpoints::Responder for DirectoryQueryResponder {
4658 type ControlHandle = DirectoryControlHandle;
4659
4660 fn control_handle(&self) -> &DirectoryControlHandle {
4661 &self.control_handle
4662 }
4663
4664 fn drop_without_shutdown(mut self) {
4665 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4667 std::mem::forget(self);
4669 }
4670}
4671
4672impl DirectoryQueryResponder {
4673 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4677 let _result = self.send_raw(protocol);
4678 if _result.is_err() {
4679 self.control_handle.shutdown();
4680 }
4681 self.drop_without_shutdown();
4682 _result
4683 }
4684
4685 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4687 let _result = self.send_raw(protocol);
4688 self.drop_without_shutdown();
4689 _result
4690 }
4691
4692 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4693 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
4694 (protocol,),
4695 self.tx_id,
4696 0x2658edee9decfc06,
4697 fidl::encoding::DynamicFlags::empty(),
4698 )
4699 }
4700}
4701
4702#[must_use = "FIDL methods require a response to be sent"]
4703#[derive(Debug)]
4704pub struct DirectoryDeprecatedGetAttrResponder {
4705 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4706 tx_id: u32,
4707}
4708
4709impl std::ops::Drop for DirectoryDeprecatedGetAttrResponder {
4713 fn drop(&mut self) {
4714 self.control_handle.shutdown();
4715 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4717 }
4718}
4719
4720impl fidl::endpoints::Responder for DirectoryDeprecatedGetAttrResponder {
4721 type ControlHandle = DirectoryControlHandle;
4722
4723 fn control_handle(&self) -> &DirectoryControlHandle {
4724 &self.control_handle
4725 }
4726
4727 fn drop_without_shutdown(mut self) {
4728 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4730 std::mem::forget(self);
4732 }
4733}
4734
4735impl DirectoryDeprecatedGetAttrResponder {
4736 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4740 let _result = self.send_raw(s, attributes);
4741 if _result.is_err() {
4742 self.control_handle.shutdown();
4743 }
4744 self.drop_without_shutdown();
4745 _result
4746 }
4747
4748 pub fn send_no_shutdown_on_err(
4750 self,
4751 mut s: i32,
4752 mut attributes: &NodeAttributes,
4753 ) -> Result<(), fidl::Error> {
4754 let _result = self.send_raw(s, attributes);
4755 self.drop_without_shutdown();
4756 _result
4757 }
4758
4759 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4760 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
4761 (s, attributes),
4762 self.tx_id,
4763 0x78985e216314dafd,
4764 fidl::encoding::DynamicFlags::empty(),
4765 )
4766 }
4767}
4768
4769#[must_use = "FIDL methods require a response to be sent"]
4770#[derive(Debug)]
4771pub struct DirectoryDeprecatedSetAttrResponder {
4772 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4773 tx_id: u32,
4774}
4775
4776impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
4780 fn drop(&mut self) {
4781 self.control_handle.shutdown();
4782 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4784 }
4785}
4786
4787impl fidl::endpoints::Responder for DirectoryDeprecatedSetAttrResponder {
4788 type ControlHandle = DirectoryControlHandle;
4789
4790 fn control_handle(&self) -> &DirectoryControlHandle {
4791 &self.control_handle
4792 }
4793
4794 fn drop_without_shutdown(mut self) {
4795 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4797 std::mem::forget(self);
4799 }
4800}
4801
4802impl DirectoryDeprecatedSetAttrResponder {
4803 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4807 let _result = self.send_raw(s);
4808 if _result.is_err() {
4809 self.control_handle.shutdown();
4810 }
4811 self.drop_without_shutdown();
4812 _result
4813 }
4814
4815 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4817 let _result = self.send_raw(s);
4818 self.drop_without_shutdown();
4819 _result
4820 }
4821
4822 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4823 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
4824 (s,),
4825 self.tx_id,
4826 0x4186c0f40d938f46,
4827 fidl::encoding::DynamicFlags::empty(),
4828 )
4829 }
4830}
4831
4832#[must_use = "FIDL methods require a response to be sent"]
4833#[derive(Debug)]
4834pub struct DirectoryDeprecatedGetFlagsResponder {
4835 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4836 tx_id: u32,
4837}
4838
4839impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
4843 fn drop(&mut self) {
4844 self.control_handle.shutdown();
4845 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4847 }
4848}
4849
4850impl fidl::endpoints::Responder for DirectoryDeprecatedGetFlagsResponder {
4851 type ControlHandle = DirectoryControlHandle;
4852
4853 fn control_handle(&self) -> &DirectoryControlHandle {
4854 &self.control_handle
4855 }
4856
4857 fn drop_without_shutdown(mut self) {
4858 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4860 std::mem::forget(self);
4862 }
4863}
4864
4865impl DirectoryDeprecatedGetFlagsResponder {
4866 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4870 let _result = self.send_raw(s, flags);
4871 if _result.is_err() {
4872 self.control_handle.shutdown();
4873 }
4874 self.drop_without_shutdown();
4875 _result
4876 }
4877
4878 pub fn send_no_shutdown_on_err(
4880 self,
4881 mut s: i32,
4882 mut flags: OpenFlags,
4883 ) -> Result<(), fidl::Error> {
4884 let _result = self.send_raw(s, flags);
4885 self.drop_without_shutdown();
4886 _result
4887 }
4888
4889 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4890 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
4891 (s, flags),
4892 self.tx_id,
4893 0x5b88fffb8eda3aa1,
4894 fidl::encoding::DynamicFlags::empty(),
4895 )
4896 }
4897}
4898
4899#[must_use = "FIDL methods require a response to be sent"]
4900#[derive(Debug)]
4901pub struct DirectoryDeprecatedSetFlagsResponder {
4902 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4903 tx_id: u32,
4904}
4905
4906impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
4910 fn drop(&mut self) {
4911 self.control_handle.shutdown();
4912 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4914 }
4915}
4916
4917impl fidl::endpoints::Responder for DirectoryDeprecatedSetFlagsResponder {
4918 type ControlHandle = DirectoryControlHandle;
4919
4920 fn control_handle(&self) -> &DirectoryControlHandle {
4921 &self.control_handle
4922 }
4923
4924 fn drop_without_shutdown(mut self) {
4925 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4927 std::mem::forget(self);
4929 }
4930}
4931
4932impl DirectoryDeprecatedSetFlagsResponder {
4933 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4937 let _result = self.send_raw(s);
4938 if _result.is_err() {
4939 self.control_handle.shutdown();
4940 }
4941 self.drop_without_shutdown();
4942 _result
4943 }
4944
4945 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4947 let _result = self.send_raw(s);
4948 self.drop_without_shutdown();
4949 _result
4950 }
4951
4952 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4953 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
4954 (s,),
4955 self.tx_id,
4956 0x5295b76c71fde733,
4957 fidl::encoding::DynamicFlags::empty(),
4958 )
4959 }
4960}
4961
4962#[must_use = "FIDL methods require a response to be sent"]
4963#[derive(Debug)]
4964pub struct DirectoryGetFlagsResponder {
4965 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4966 tx_id: u32,
4967}
4968
4969impl std::ops::Drop for DirectoryGetFlagsResponder {
4973 fn drop(&mut self) {
4974 self.control_handle.shutdown();
4975 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4977 }
4978}
4979
4980impl fidl::endpoints::Responder for DirectoryGetFlagsResponder {
4981 type ControlHandle = DirectoryControlHandle;
4982
4983 fn control_handle(&self) -> &DirectoryControlHandle {
4984 &self.control_handle
4985 }
4986
4987 fn drop_without_shutdown(mut self) {
4988 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4990 std::mem::forget(self);
4992 }
4993}
4994
4995impl DirectoryGetFlagsResponder {
4996 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
5000 let _result = self.send_raw(result);
5001 if _result.is_err() {
5002 self.control_handle.shutdown();
5003 }
5004 self.drop_without_shutdown();
5005 _result
5006 }
5007
5008 pub fn send_no_shutdown_on_err(
5010 self,
5011 mut result: Result<Flags, i32>,
5012 ) -> Result<(), fidl::Error> {
5013 let _result = self.send_raw(result);
5014 self.drop_without_shutdown();
5015 _result
5016 }
5017
5018 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
5019 self.control_handle
5020 .inner
5021 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
5022 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
5023 self.tx_id,
5024 0x176eb318f64ec23,
5025 fidl::encoding::DynamicFlags::FLEXIBLE,
5026 )
5027 }
5028}
5029
5030#[must_use = "FIDL methods require a response to be sent"]
5031#[derive(Debug)]
5032pub struct DirectorySetFlagsResponder {
5033 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5034 tx_id: u32,
5035}
5036
5037impl std::ops::Drop for DirectorySetFlagsResponder {
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 DirectorySetFlagsResponder {
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 DirectorySetFlagsResponder {
5064 pub fn send(self, mut result: Result<(), 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(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5078 let _result = self.send_raw(result);
5079 self.drop_without_shutdown();
5080 _result
5081 }
5082
5083 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5084 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5085 fidl::encoding::EmptyStruct,
5086 i32,
5087 >>(
5088 fidl::encoding::FlexibleResult::new(result),
5089 self.tx_id,
5090 0x55a8028685791ea8,
5091 fidl::encoding::DynamicFlags::FLEXIBLE,
5092 )
5093 }
5094}
5095
5096#[must_use = "FIDL methods require a response to be sent"]
5097#[derive(Debug)]
5098pub struct DirectoryQueryFilesystemResponder {
5099 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5100 tx_id: u32,
5101}
5102
5103impl std::ops::Drop for DirectoryQueryFilesystemResponder {
5107 fn drop(&mut self) {
5108 self.control_handle.shutdown();
5109 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5111 }
5112}
5113
5114impl fidl::endpoints::Responder for DirectoryQueryFilesystemResponder {
5115 type ControlHandle = DirectoryControlHandle;
5116
5117 fn control_handle(&self) -> &DirectoryControlHandle {
5118 &self.control_handle
5119 }
5120
5121 fn drop_without_shutdown(mut self) {
5122 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5124 std::mem::forget(self);
5126 }
5127}
5128
5129impl DirectoryQueryFilesystemResponder {
5130 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5134 let _result = self.send_raw(s, info);
5135 if _result.is_err() {
5136 self.control_handle.shutdown();
5137 }
5138 self.drop_without_shutdown();
5139 _result
5140 }
5141
5142 pub fn send_no_shutdown_on_err(
5144 self,
5145 mut s: i32,
5146 mut info: Option<&FilesystemInfo>,
5147 ) -> Result<(), fidl::Error> {
5148 let _result = self.send_raw(s, info);
5149 self.drop_without_shutdown();
5150 _result
5151 }
5152
5153 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5154 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
5155 (s, info),
5156 self.tx_id,
5157 0x6f344a1c6b0a0610,
5158 fidl::encoding::DynamicFlags::empty(),
5159 )
5160 }
5161}
5162
5163#[must_use = "FIDL methods require a response to be sent"]
5164#[derive(Debug)]
5165pub struct DirectoryGetAttributesResponder {
5166 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5167 tx_id: u32,
5168}
5169
5170impl std::ops::Drop for DirectoryGetAttributesResponder {
5174 fn drop(&mut self) {
5175 self.control_handle.shutdown();
5176 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5178 }
5179}
5180
5181impl fidl::endpoints::Responder for DirectoryGetAttributesResponder {
5182 type ControlHandle = DirectoryControlHandle;
5183
5184 fn control_handle(&self) -> &DirectoryControlHandle {
5185 &self.control_handle
5186 }
5187
5188 fn drop_without_shutdown(mut self) {
5189 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5191 std::mem::forget(self);
5193 }
5194}
5195
5196impl DirectoryGetAttributesResponder {
5197 pub fn send(
5201 self,
5202 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5203 ) -> Result<(), fidl::Error> {
5204 let _result = self.send_raw(result);
5205 if _result.is_err() {
5206 self.control_handle.shutdown();
5207 }
5208 self.drop_without_shutdown();
5209 _result
5210 }
5211
5212 pub fn send_no_shutdown_on_err(
5214 self,
5215 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5216 ) -> Result<(), fidl::Error> {
5217 let _result = self.send_raw(result);
5218 self.drop_without_shutdown();
5219 _result
5220 }
5221
5222 fn send_raw(
5223 &self,
5224 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5225 ) -> Result<(), fidl::Error> {
5226 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
5227 result,
5228 self.tx_id,
5229 0x3d4396a638ea053b,
5230 fidl::encoding::DynamicFlags::empty(),
5231 )
5232 }
5233}
5234
5235#[must_use = "FIDL methods require a response to be sent"]
5236#[derive(Debug)]
5237pub struct DirectoryUpdateAttributesResponder {
5238 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5239 tx_id: u32,
5240}
5241
5242impl std::ops::Drop for DirectoryUpdateAttributesResponder {
5246 fn drop(&mut self) {
5247 self.control_handle.shutdown();
5248 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5250 }
5251}
5252
5253impl fidl::endpoints::Responder for DirectoryUpdateAttributesResponder {
5254 type ControlHandle = DirectoryControlHandle;
5255
5256 fn control_handle(&self) -> &DirectoryControlHandle {
5257 &self.control_handle
5258 }
5259
5260 fn drop_without_shutdown(mut self) {
5261 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5263 std::mem::forget(self);
5265 }
5266}
5267
5268impl DirectoryUpdateAttributesResponder {
5269 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5273 let _result = self.send_raw(result);
5274 if _result.is_err() {
5275 self.control_handle.shutdown();
5276 }
5277 self.drop_without_shutdown();
5278 _result
5279 }
5280
5281 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5283 let _result = self.send_raw(result);
5284 self.drop_without_shutdown();
5285 _result
5286 }
5287
5288 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5289 self.control_handle
5290 .inner
5291 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5292 result,
5293 self.tx_id,
5294 0x3308c1da5a89bf08,
5295 fidl::encoding::DynamicFlags::empty(),
5296 )
5297 }
5298}
5299
5300#[must_use = "FIDL methods require a response to be sent"]
5301#[derive(Debug)]
5302pub struct DirectorySyncResponder {
5303 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5304 tx_id: u32,
5305}
5306
5307impl std::ops::Drop for DirectorySyncResponder {
5311 fn drop(&mut self) {
5312 self.control_handle.shutdown();
5313 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5315 }
5316}
5317
5318impl fidl::endpoints::Responder for DirectorySyncResponder {
5319 type ControlHandle = DirectoryControlHandle;
5320
5321 fn control_handle(&self) -> &DirectoryControlHandle {
5322 &self.control_handle
5323 }
5324
5325 fn drop_without_shutdown(mut self) {
5326 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5328 std::mem::forget(self);
5330 }
5331}
5332
5333impl DirectorySyncResponder {
5334 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5338 let _result = self.send_raw(result);
5339 if _result.is_err() {
5340 self.control_handle.shutdown();
5341 }
5342 self.drop_without_shutdown();
5343 _result
5344 }
5345
5346 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5348 let _result = self.send_raw(result);
5349 self.drop_without_shutdown();
5350 _result
5351 }
5352
5353 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5354 self.control_handle
5355 .inner
5356 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5357 result,
5358 self.tx_id,
5359 0x2c5c27ca0ab5dc49,
5360 fidl::encoding::DynamicFlags::empty(),
5361 )
5362 }
5363}
5364
5365#[must_use = "FIDL methods require a response to be sent"]
5366#[derive(Debug)]
5367pub struct DirectoryGetExtendedAttributeResponder {
5368 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5369 tx_id: u32,
5370}
5371
5372impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
5376 fn drop(&mut self) {
5377 self.control_handle.shutdown();
5378 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5380 }
5381}
5382
5383impl fidl::endpoints::Responder for DirectoryGetExtendedAttributeResponder {
5384 type ControlHandle = DirectoryControlHandle;
5385
5386 fn control_handle(&self) -> &DirectoryControlHandle {
5387 &self.control_handle
5388 }
5389
5390 fn drop_without_shutdown(mut self) {
5391 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5393 std::mem::forget(self);
5395 }
5396}
5397
5398impl DirectoryGetExtendedAttributeResponder {
5399 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5403 let _result = self.send_raw(result);
5404 if _result.is_err() {
5405 self.control_handle.shutdown();
5406 }
5407 self.drop_without_shutdown();
5408 _result
5409 }
5410
5411 pub fn send_no_shutdown_on_err(
5413 self,
5414 mut result: Result<ExtendedAttributeValue, i32>,
5415 ) -> Result<(), fidl::Error> {
5416 let _result = self.send_raw(result);
5417 self.drop_without_shutdown();
5418 _result
5419 }
5420
5421 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5422 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
5423 result.as_mut().map_err(|e| *e),
5424 self.tx_id,
5425 0x45ffa3ccfdeb76db,
5426 fidl::encoding::DynamicFlags::empty(),
5427 )
5428 }
5429}
5430
5431#[must_use = "FIDL methods require a response to be sent"]
5432#[derive(Debug)]
5433pub struct DirectorySetExtendedAttributeResponder {
5434 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5435 tx_id: u32,
5436}
5437
5438impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
5442 fn drop(&mut self) {
5443 self.control_handle.shutdown();
5444 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5446 }
5447}
5448
5449impl fidl::endpoints::Responder for DirectorySetExtendedAttributeResponder {
5450 type ControlHandle = DirectoryControlHandle;
5451
5452 fn control_handle(&self) -> &DirectoryControlHandle {
5453 &self.control_handle
5454 }
5455
5456 fn drop_without_shutdown(mut self) {
5457 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5459 std::mem::forget(self);
5461 }
5462}
5463
5464impl DirectorySetExtendedAttributeResponder {
5465 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5469 let _result = self.send_raw(result);
5470 if _result.is_err() {
5471 self.control_handle.shutdown();
5472 }
5473 self.drop_without_shutdown();
5474 _result
5475 }
5476
5477 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5479 let _result = self.send_raw(result);
5480 self.drop_without_shutdown();
5481 _result
5482 }
5483
5484 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5485 self.control_handle
5486 .inner
5487 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5488 result,
5489 self.tx_id,
5490 0x4a951362f681f23c,
5491 fidl::encoding::DynamicFlags::empty(),
5492 )
5493 }
5494}
5495
5496#[must_use = "FIDL methods require a response to be sent"]
5497#[derive(Debug)]
5498pub struct DirectoryRemoveExtendedAttributeResponder {
5499 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5500 tx_id: u32,
5501}
5502
5503impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
5507 fn drop(&mut self) {
5508 self.control_handle.shutdown();
5509 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5511 }
5512}
5513
5514impl fidl::endpoints::Responder for DirectoryRemoveExtendedAttributeResponder {
5515 type ControlHandle = DirectoryControlHandle;
5516
5517 fn control_handle(&self) -> &DirectoryControlHandle {
5518 &self.control_handle
5519 }
5520
5521 fn drop_without_shutdown(mut self) {
5522 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5524 std::mem::forget(self);
5526 }
5527}
5528
5529impl DirectoryRemoveExtendedAttributeResponder {
5530 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5534 let _result = self.send_raw(result);
5535 if _result.is_err() {
5536 self.control_handle.shutdown();
5537 }
5538 self.drop_without_shutdown();
5539 _result
5540 }
5541
5542 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5544 let _result = self.send_raw(result);
5545 self.drop_without_shutdown();
5546 _result
5547 }
5548
5549 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5550 self.control_handle
5551 .inner
5552 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5553 result,
5554 self.tx_id,
5555 0x7a0b9f3a9bf9032d,
5556 fidl::encoding::DynamicFlags::empty(),
5557 )
5558 }
5559}
5560
5561#[must_use = "FIDL methods require a response to be sent"]
5562#[derive(Debug)]
5563pub struct DirectoryReadDirentsResponder {
5564 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5565 tx_id: u32,
5566}
5567
5568impl std::ops::Drop for DirectoryReadDirentsResponder {
5572 fn drop(&mut self) {
5573 self.control_handle.shutdown();
5574 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5576 }
5577}
5578
5579impl fidl::endpoints::Responder for DirectoryReadDirentsResponder {
5580 type ControlHandle = DirectoryControlHandle;
5581
5582 fn control_handle(&self) -> &DirectoryControlHandle {
5583 &self.control_handle
5584 }
5585
5586 fn drop_without_shutdown(mut self) {
5587 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5589 std::mem::forget(self);
5591 }
5592}
5593
5594impl DirectoryReadDirentsResponder {
5595 pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5599 let _result = self.send_raw(s, dirents);
5600 if _result.is_err() {
5601 self.control_handle.shutdown();
5602 }
5603 self.drop_without_shutdown();
5604 _result
5605 }
5606
5607 pub fn send_no_shutdown_on_err(
5609 self,
5610 mut s: i32,
5611 mut dirents: &[u8],
5612 ) -> Result<(), fidl::Error> {
5613 let _result = self.send_raw(s, dirents);
5614 self.drop_without_shutdown();
5615 _result
5616 }
5617
5618 fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5619 self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
5620 (s, dirents),
5621 self.tx_id,
5622 0x3582806bf27faa0a,
5623 fidl::encoding::DynamicFlags::empty(),
5624 )
5625 }
5626}
5627
5628#[must_use = "FIDL methods require a response to be sent"]
5629#[derive(Debug)]
5630pub struct DirectoryRewindResponder {
5631 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5632 tx_id: u32,
5633}
5634
5635impl std::ops::Drop for DirectoryRewindResponder {
5639 fn drop(&mut self) {
5640 self.control_handle.shutdown();
5641 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5643 }
5644}
5645
5646impl fidl::endpoints::Responder for DirectoryRewindResponder {
5647 type ControlHandle = DirectoryControlHandle;
5648
5649 fn control_handle(&self) -> &DirectoryControlHandle {
5650 &self.control_handle
5651 }
5652
5653 fn drop_without_shutdown(mut self) {
5654 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5656 std::mem::forget(self);
5658 }
5659}
5660
5661impl DirectoryRewindResponder {
5662 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5666 let _result = self.send_raw(s);
5667 if _result.is_err() {
5668 self.control_handle.shutdown();
5669 }
5670 self.drop_without_shutdown();
5671 _result
5672 }
5673
5674 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5676 let _result = self.send_raw(s);
5677 self.drop_without_shutdown();
5678 _result
5679 }
5680
5681 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5682 self.control_handle.inner.send::<DirectoryRewindResponse>(
5683 (s,),
5684 self.tx_id,
5685 0x16b1202af0f34c71,
5686 fidl::encoding::DynamicFlags::empty(),
5687 )
5688 }
5689}
5690
5691#[must_use = "FIDL methods require a response to be sent"]
5692#[derive(Debug)]
5693pub struct DirectoryGetTokenResponder {
5694 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5695 tx_id: u32,
5696}
5697
5698impl std::ops::Drop for DirectoryGetTokenResponder {
5702 fn drop(&mut self) {
5703 self.control_handle.shutdown();
5704 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5706 }
5707}
5708
5709impl fidl::endpoints::Responder for DirectoryGetTokenResponder {
5710 type ControlHandle = DirectoryControlHandle;
5711
5712 fn control_handle(&self) -> &DirectoryControlHandle {
5713 &self.control_handle
5714 }
5715
5716 fn drop_without_shutdown(mut self) {
5717 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5719 std::mem::forget(self);
5721 }
5722}
5723
5724impl DirectoryGetTokenResponder {
5725 pub fn send(
5729 self,
5730 mut s: i32,
5731 mut token: Option<fidl::NullableHandle>,
5732 ) -> Result<(), fidl::Error> {
5733 let _result = self.send_raw(s, token);
5734 if _result.is_err() {
5735 self.control_handle.shutdown();
5736 }
5737 self.drop_without_shutdown();
5738 _result
5739 }
5740
5741 pub fn send_no_shutdown_on_err(
5743 self,
5744 mut s: i32,
5745 mut token: Option<fidl::NullableHandle>,
5746 ) -> Result<(), fidl::Error> {
5747 let _result = self.send_raw(s, token);
5748 self.drop_without_shutdown();
5749 _result
5750 }
5751
5752 fn send_raw(
5753 &self,
5754 mut s: i32,
5755 mut token: Option<fidl::NullableHandle>,
5756 ) -> Result<(), fidl::Error> {
5757 self.control_handle.inner.send::<DirectoryGetTokenResponse>(
5758 (s, token),
5759 self.tx_id,
5760 0x26ae9d18763c8655,
5761 fidl::encoding::DynamicFlags::empty(),
5762 )
5763 }
5764}
5765
5766#[must_use = "FIDL methods require a response to be sent"]
5767#[derive(Debug)]
5768pub struct DirectoryLinkResponder {
5769 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5770 tx_id: u32,
5771}
5772
5773impl std::ops::Drop for DirectoryLinkResponder {
5777 fn drop(&mut self) {
5778 self.control_handle.shutdown();
5779 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5781 }
5782}
5783
5784impl fidl::endpoints::Responder for DirectoryLinkResponder {
5785 type ControlHandle = DirectoryControlHandle;
5786
5787 fn control_handle(&self) -> &DirectoryControlHandle {
5788 &self.control_handle
5789 }
5790
5791 fn drop_without_shutdown(mut self) {
5792 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5794 std::mem::forget(self);
5796 }
5797}
5798
5799impl DirectoryLinkResponder {
5800 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5804 let _result = self.send_raw(s);
5805 if _result.is_err() {
5806 self.control_handle.shutdown();
5807 }
5808 self.drop_without_shutdown();
5809 _result
5810 }
5811
5812 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5814 let _result = self.send_raw(s);
5815 self.drop_without_shutdown();
5816 _result
5817 }
5818
5819 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5820 self.control_handle.inner.send::<DirectoryLinkResponse>(
5821 (s,),
5822 self.tx_id,
5823 0x740604c0c7c930e7,
5824 fidl::encoding::DynamicFlags::empty(),
5825 )
5826 }
5827}
5828
5829#[must_use = "FIDL methods require a response to be sent"]
5830#[derive(Debug)]
5831pub struct DirectoryUnlinkResponder {
5832 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5833 tx_id: u32,
5834}
5835
5836impl std::ops::Drop for DirectoryUnlinkResponder {
5840 fn drop(&mut self) {
5841 self.control_handle.shutdown();
5842 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5844 }
5845}
5846
5847impl fidl::endpoints::Responder for DirectoryUnlinkResponder {
5848 type ControlHandle = DirectoryControlHandle;
5849
5850 fn control_handle(&self) -> &DirectoryControlHandle {
5851 &self.control_handle
5852 }
5853
5854 fn drop_without_shutdown(mut self) {
5855 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5857 std::mem::forget(self);
5859 }
5860}
5861
5862impl DirectoryUnlinkResponder {
5863 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5867 let _result = self.send_raw(result);
5868 if _result.is_err() {
5869 self.control_handle.shutdown();
5870 }
5871 self.drop_without_shutdown();
5872 _result
5873 }
5874
5875 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5877 let _result = self.send_raw(result);
5878 self.drop_without_shutdown();
5879 _result
5880 }
5881
5882 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5883 self.control_handle
5884 .inner
5885 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5886 result,
5887 self.tx_id,
5888 0x750a0326a78d7bed,
5889 fidl::encoding::DynamicFlags::empty(),
5890 )
5891 }
5892}
5893
5894#[must_use = "FIDL methods require a response to be sent"]
5895#[derive(Debug)]
5896pub struct DirectoryRenameResponder {
5897 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5898 tx_id: u32,
5899}
5900
5901impl std::ops::Drop for DirectoryRenameResponder {
5905 fn drop(&mut self) {
5906 self.control_handle.shutdown();
5907 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5909 }
5910}
5911
5912impl fidl::endpoints::Responder for DirectoryRenameResponder {
5913 type ControlHandle = DirectoryControlHandle;
5914
5915 fn control_handle(&self) -> &DirectoryControlHandle {
5916 &self.control_handle
5917 }
5918
5919 fn drop_without_shutdown(mut self) {
5920 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5922 std::mem::forget(self);
5924 }
5925}
5926
5927impl DirectoryRenameResponder {
5928 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5932 let _result = self.send_raw(result);
5933 if _result.is_err() {
5934 self.control_handle.shutdown();
5935 }
5936 self.drop_without_shutdown();
5937 _result
5938 }
5939
5940 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5942 let _result = self.send_raw(result);
5943 self.drop_without_shutdown();
5944 _result
5945 }
5946
5947 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5948 self.control_handle
5949 .inner
5950 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5951 result,
5952 self.tx_id,
5953 0x7060e7723b9928de,
5954 fidl::encoding::DynamicFlags::empty(),
5955 )
5956 }
5957}
5958
5959#[must_use = "FIDL methods require a response to be sent"]
5960#[derive(Debug)]
5961pub struct DirectoryCreateSymlinkResponder {
5962 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5963 tx_id: u32,
5964}
5965
5966impl std::ops::Drop for DirectoryCreateSymlinkResponder {
5970 fn drop(&mut self) {
5971 self.control_handle.shutdown();
5972 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5974 }
5975}
5976
5977impl fidl::endpoints::Responder for DirectoryCreateSymlinkResponder {
5978 type ControlHandle = DirectoryControlHandle;
5979
5980 fn control_handle(&self) -> &DirectoryControlHandle {
5981 &self.control_handle
5982 }
5983
5984 fn drop_without_shutdown(mut self) {
5985 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5987 std::mem::forget(self);
5989 }
5990}
5991
5992impl DirectoryCreateSymlinkResponder {
5993 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5997 let _result = self.send_raw(result);
5998 if _result.is_err() {
5999 self.control_handle.shutdown();
6000 }
6001 self.drop_without_shutdown();
6002 _result
6003 }
6004
6005 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6007 let _result = self.send_raw(result);
6008 self.drop_without_shutdown();
6009 _result
6010 }
6011
6012 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6013 self.control_handle
6014 .inner
6015 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6016 result,
6017 self.tx_id,
6018 0x21ce0f19ec043889,
6019 fidl::encoding::DynamicFlags::empty(),
6020 )
6021 }
6022}
6023
6024#[must_use = "FIDL methods require a response to be sent"]
6025#[derive(Debug)]
6026pub struct DirectoryWatchResponder {
6027 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
6028 tx_id: u32,
6029}
6030
6031impl std::ops::Drop for DirectoryWatchResponder {
6035 fn drop(&mut self) {
6036 self.control_handle.shutdown();
6037 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6039 }
6040}
6041
6042impl fidl::endpoints::Responder for DirectoryWatchResponder {
6043 type ControlHandle = DirectoryControlHandle;
6044
6045 fn control_handle(&self) -> &DirectoryControlHandle {
6046 &self.control_handle
6047 }
6048
6049 fn drop_without_shutdown(mut self) {
6050 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6052 std::mem::forget(self);
6054 }
6055}
6056
6057impl DirectoryWatchResponder {
6058 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
6062 let _result = self.send_raw(s);
6063 if _result.is_err() {
6064 self.control_handle.shutdown();
6065 }
6066 self.drop_without_shutdown();
6067 _result
6068 }
6069
6070 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
6072 let _result = self.send_raw(s);
6073 self.drop_without_shutdown();
6074 _result
6075 }
6076
6077 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
6078 self.control_handle.inner.send::<DirectoryWatchResponse>(
6079 (s,),
6080 self.tx_id,
6081 0x5717193a59d66d91,
6082 fidl::encoding::DynamicFlags::empty(),
6083 )
6084 }
6085}
6086
6087#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6088pub struct DirectoryWatcherMarker;
6089
6090impl fidl::endpoints::ProtocolMarker for DirectoryWatcherMarker {
6091 type Proxy = DirectoryWatcherProxy;
6092 type RequestStream = DirectoryWatcherRequestStream;
6093 #[cfg(target_os = "fuchsia")]
6094 type SynchronousProxy = DirectoryWatcherSynchronousProxy;
6095
6096 const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
6097}
6098
6099pub trait DirectoryWatcherProxyInterface: Send + Sync {}
6100#[derive(Debug)]
6101#[cfg(target_os = "fuchsia")]
6102pub struct DirectoryWatcherSynchronousProxy {
6103 client: fidl::client::sync::Client,
6104}
6105
6106#[cfg(target_os = "fuchsia")]
6107impl fidl::endpoints::SynchronousProxy for DirectoryWatcherSynchronousProxy {
6108 type Proxy = DirectoryWatcherProxy;
6109 type Protocol = DirectoryWatcherMarker;
6110
6111 fn from_channel(inner: fidl::Channel) -> Self {
6112 Self::new(inner)
6113 }
6114
6115 fn into_channel(self) -> fidl::Channel {
6116 self.client.into_channel()
6117 }
6118
6119 fn as_channel(&self) -> &fidl::Channel {
6120 self.client.as_channel()
6121 }
6122}
6123
6124#[cfg(target_os = "fuchsia")]
6125impl DirectoryWatcherSynchronousProxy {
6126 pub fn new(channel: fidl::Channel) -> Self {
6127 Self { client: fidl::client::sync::Client::new(channel) }
6128 }
6129
6130 pub fn into_channel(self) -> fidl::Channel {
6131 self.client.into_channel()
6132 }
6133
6134 pub fn wait_for_event(
6137 &self,
6138 deadline: zx::MonotonicInstant,
6139 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6140 DirectoryWatcherEvent::decode(
6141 self.client.wait_for_event::<DirectoryWatcherMarker>(deadline)?,
6142 )
6143 }
6144}
6145
6146#[cfg(target_os = "fuchsia")]
6147impl From<DirectoryWatcherSynchronousProxy> for zx::NullableHandle {
6148 fn from(value: DirectoryWatcherSynchronousProxy) -> Self {
6149 value.into_channel().into()
6150 }
6151}
6152
6153#[cfg(target_os = "fuchsia")]
6154impl From<fidl::Channel> for DirectoryWatcherSynchronousProxy {
6155 fn from(value: fidl::Channel) -> Self {
6156 Self::new(value)
6157 }
6158}
6159
6160#[cfg(target_os = "fuchsia")]
6161impl fidl::endpoints::FromClient for DirectoryWatcherSynchronousProxy {
6162 type Protocol = DirectoryWatcherMarker;
6163
6164 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryWatcherMarker>) -> Self {
6165 Self::new(value.into_channel())
6166 }
6167}
6168
6169#[derive(Debug, Clone)]
6170pub struct DirectoryWatcherProxy {
6171 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6172}
6173
6174impl fidl::endpoints::Proxy for DirectoryWatcherProxy {
6175 type Protocol = DirectoryWatcherMarker;
6176
6177 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6178 Self::new(inner)
6179 }
6180
6181 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6182 self.client.into_channel().map_err(|client| Self { client })
6183 }
6184
6185 fn as_channel(&self) -> &::fidl::AsyncChannel {
6186 self.client.as_channel()
6187 }
6188}
6189
6190impl DirectoryWatcherProxy {
6191 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6193 let protocol_name = <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6194 Self { client: fidl::client::Client::new(channel, protocol_name) }
6195 }
6196
6197 pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
6203 DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
6204 }
6205}
6206
6207impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
6208
6209pub struct DirectoryWatcherEventStream {
6210 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6211}
6212
6213impl std::marker::Unpin for DirectoryWatcherEventStream {}
6214
6215impl futures::stream::FusedStream for DirectoryWatcherEventStream {
6216 fn is_terminated(&self) -> bool {
6217 self.event_receiver.is_terminated()
6218 }
6219}
6220
6221impl futures::Stream for DirectoryWatcherEventStream {
6222 type Item = Result<DirectoryWatcherEvent, fidl::Error>;
6223
6224 fn poll_next(
6225 mut self: std::pin::Pin<&mut Self>,
6226 cx: &mut std::task::Context<'_>,
6227 ) -> std::task::Poll<Option<Self::Item>> {
6228 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6229 &mut self.event_receiver,
6230 cx
6231 )?) {
6232 Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
6233 None => std::task::Poll::Ready(None),
6234 }
6235 }
6236}
6237
6238#[derive(Debug)]
6239pub enum DirectoryWatcherEvent {}
6240
6241impl DirectoryWatcherEvent {
6242 fn decode(
6244 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6245 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6246 let (bytes, _handles) = buf.split_mut();
6247 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6248 debug_assert_eq!(tx_header.tx_id, 0);
6249 match tx_header.ordinal {
6250 _ => Err(fidl::Error::UnknownOrdinal {
6251 ordinal: tx_header.ordinal,
6252 protocol_name:
6253 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6254 }),
6255 }
6256 }
6257}
6258
6259pub struct DirectoryWatcherRequestStream {
6261 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6262 is_terminated: bool,
6263}
6264
6265impl std::marker::Unpin for DirectoryWatcherRequestStream {}
6266
6267impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
6268 fn is_terminated(&self) -> bool {
6269 self.is_terminated
6270 }
6271}
6272
6273impl fidl::endpoints::RequestStream for DirectoryWatcherRequestStream {
6274 type Protocol = DirectoryWatcherMarker;
6275 type ControlHandle = DirectoryWatcherControlHandle;
6276
6277 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6278 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6279 }
6280
6281 fn control_handle(&self) -> Self::ControlHandle {
6282 DirectoryWatcherControlHandle { inner: self.inner.clone() }
6283 }
6284
6285 fn into_inner(
6286 self,
6287 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6288 {
6289 (self.inner, self.is_terminated)
6290 }
6291
6292 fn from_inner(
6293 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6294 is_terminated: bool,
6295 ) -> Self {
6296 Self { inner, is_terminated }
6297 }
6298}
6299
6300impl futures::Stream for DirectoryWatcherRequestStream {
6301 type Item = Result<DirectoryWatcherRequest, fidl::Error>;
6302
6303 fn poll_next(
6304 mut self: std::pin::Pin<&mut Self>,
6305 cx: &mut std::task::Context<'_>,
6306 ) -> std::task::Poll<Option<Self::Item>> {
6307 let this = &mut *self;
6308 if this.inner.check_shutdown(cx) {
6309 this.is_terminated = true;
6310 return std::task::Poll::Ready(None);
6311 }
6312 if this.is_terminated {
6313 panic!("polled DirectoryWatcherRequestStream after completion");
6314 }
6315 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6316 |bytes, handles| {
6317 match this.inner.channel().read_etc(cx, bytes, handles) {
6318 std::task::Poll::Ready(Ok(())) => {}
6319 std::task::Poll::Pending => return std::task::Poll::Pending,
6320 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6321 this.is_terminated = true;
6322 return std::task::Poll::Ready(None);
6323 }
6324 std::task::Poll::Ready(Err(e)) => {
6325 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6326 e.into(),
6327 ))));
6328 }
6329 }
6330
6331 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6333
6334 std::task::Poll::Ready(Some(match header.ordinal {
6335 _ => Err(fidl::Error::UnknownOrdinal {
6336 ordinal: header.ordinal,
6337 protocol_name:
6338 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6339 }),
6340 }))
6341 },
6342 )
6343 }
6344}
6345
6346#[derive(Debug)]
6364pub enum DirectoryWatcherRequest {}
6365
6366impl DirectoryWatcherRequest {
6367 pub fn method_name(&self) -> &'static str {
6369 match *self {}
6370 }
6371}
6372
6373#[derive(Debug, Clone)]
6374pub struct DirectoryWatcherControlHandle {
6375 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6376}
6377
6378impl fidl::endpoints::ControlHandle for DirectoryWatcherControlHandle {
6379 fn shutdown(&self) {
6380 self.inner.shutdown()
6381 }
6382
6383 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6384 self.inner.shutdown_with_epitaph(status)
6385 }
6386
6387 fn is_closed(&self) -> bool {
6388 self.inner.channel().is_closed()
6389 }
6390 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6391 self.inner.channel().on_closed()
6392 }
6393
6394 #[cfg(target_os = "fuchsia")]
6395 fn signal_peer(
6396 &self,
6397 clear_mask: zx::Signals,
6398 set_mask: zx::Signals,
6399 ) -> Result<(), zx_status::Status> {
6400 use fidl::Peered;
6401 self.inner.channel().signal_peer(clear_mask, set_mask)
6402 }
6403}
6404
6405impl DirectoryWatcherControlHandle {}
6406
6407#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6408pub struct ExtendedAttributeIteratorMarker;
6409
6410impl fidl::endpoints::ProtocolMarker for ExtendedAttributeIteratorMarker {
6411 type Proxy = ExtendedAttributeIteratorProxy;
6412 type RequestStream = ExtendedAttributeIteratorRequestStream;
6413 #[cfg(target_os = "fuchsia")]
6414 type SynchronousProxy = ExtendedAttributeIteratorSynchronousProxy;
6415
6416 const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
6417}
6418pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
6419
6420pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
6421 type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
6422 + Send;
6423 fn r#get_next(&self) -> Self::GetNextResponseFut;
6424}
6425#[derive(Debug)]
6426#[cfg(target_os = "fuchsia")]
6427pub struct ExtendedAttributeIteratorSynchronousProxy {
6428 client: fidl::client::sync::Client,
6429}
6430
6431#[cfg(target_os = "fuchsia")]
6432impl fidl::endpoints::SynchronousProxy for ExtendedAttributeIteratorSynchronousProxy {
6433 type Proxy = ExtendedAttributeIteratorProxy;
6434 type Protocol = ExtendedAttributeIteratorMarker;
6435
6436 fn from_channel(inner: fidl::Channel) -> Self {
6437 Self::new(inner)
6438 }
6439
6440 fn into_channel(self) -> fidl::Channel {
6441 self.client.into_channel()
6442 }
6443
6444 fn as_channel(&self) -> &fidl::Channel {
6445 self.client.as_channel()
6446 }
6447}
6448
6449#[cfg(target_os = "fuchsia")]
6450impl ExtendedAttributeIteratorSynchronousProxy {
6451 pub fn new(channel: fidl::Channel) -> Self {
6452 Self { client: fidl::client::sync::Client::new(channel) }
6453 }
6454
6455 pub fn into_channel(self) -> fidl::Channel {
6456 self.client.into_channel()
6457 }
6458
6459 pub fn wait_for_event(
6462 &self,
6463 deadline: zx::MonotonicInstant,
6464 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6465 ExtendedAttributeIteratorEvent::decode(
6466 self.client.wait_for_event::<ExtendedAttributeIteratorMarker>(deadline)?,
6467 )
6468 }
6469
6470 pub fn r#get_next(
6474 &self,
6475 ___deadline: zx::MonotonicInstant,
6476 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6477 let _response = self.client.send_query::<
6478 fidl::encoding::EmptyPayload,
6479 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6480 ExtendedAttributeIteratorMarker,
6481 >(
6482 (),
6483 0x3ba664a1c2e45a7,
6484 fidl::encoding::DynamicFlags::empty(),
6485 ___deadline,
6486 )?;
6487 Ok(_response.map(|x| (x.attributes, x.last)))
6488 }
6489}
6490
6491#[cfg(target_os = "fuchsia")]
6492impl From<ExtendedAttributeIteratorSynchronousProxy> for zx::NullableHandle {
6493 fn from(value: ExtendedAttributeIteratorSynchronousProxy) -> Self {
6494 value.into_channel().into()
6495 }
6496}
6497
6498#[cfg(target_os = "fuchsia")]
6499impl From<fidl::Channel> for ExtendedAttributeIteratorSynchronousProxy {
6500 fn from(value: fidl::Channel) -> Self {
6501 Self::new(value)
6502 }
6503}
6504
6505#[cfg(target_os = "fuchsia")]
6506impl fidl::endpoints::FromClient for ExtendedAttributeIteratorSynchronousProxy {
6507 type Protocol = ExtendedAttributeIteratorMarker;
6508
6509 fn from_client(value: fidl::endpoints::ClientEnd<ExtendedAttributeIteratorMarker>) -> Self {
6510 Self::new(value.into_channel())
6511 }
6512}
6513
6514#[derive(Debug, Clone)]
6515pub struct ExtendedAttributeIteratorProxy {
6516 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6517}
6518
6519impl fidl::endpoints::Proxy for ExtendedAttributeIteratorProxy {
6520 type Protocol = ExtendedAttributeIteratorMarker;
6521
6522 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6523 Self::new(inner)
6524 }
6525
6526 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6527 self.client.into_channel().map_err(|client| Self { client })
6528 }
6529
6530 fn as_channel(&self) -> &::fidl::AsyncChannel {
6531 self.client.as_channel()
6532 }
6533}
6534
6535impl ExtendedAttributeIteratorProxy {
6536 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6538 let protocol_name =
6539 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6540 Self { client: fidl::client::Client::new(channel, protocol_name) }
6541 }
6542
6543 pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
6549 ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6550 }
6551
6552 pub fn r#get_next(
6556 &self,
6557 ) -> fidl::client::QueryResponseFut<
6558 ExtendedAttributeIteratorGetNextResult,
6559 fidl::encoding::DefaultFuchsiaResourceDialect,
6560 > {
6561 ExtendedAttributeIteratorProxyInterface::r#get_next(self)
6562 }
6563}
6564
6565impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
6566 type GetNextResponseFut = fidl::client::QueryResponseFut<
6567 ExtendedAttributeIteratorGetNextResult,
6568 fidl::encoding::DefaultFuchsiaResourceDialect,
6569 >;
6570 fn r#get_next(&self) -> Self::GetNextResponseFut {
6571 fn _decode(
6572 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6573 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6574 let _response = fidl::client::decode_transaction_body::<
6575 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6576 fidl::encoding::DefaultFuchsiaResourceDialect,
6577 0x3ba664a1c2e45a7,
6578 >(_buf?)?;
6579 Ok(_response.map(|x| (x.attributes, x.last)))
6580 }
6581 self.client.send_query_and_decode::<
6582 fidl::encoding::EmptyPayload,
6583 ExtendedAttributeIteratorGetNextResult,
6584 >(
6585 (),
6586 0x3ba664a1c2e45a7,
6587 fidl::encoding::DynamicFlags::empty(),
6588 _decode,
6589 )
6590 }
6591}
6592
6593pub struct ExtendedAttributeIteratorEventStream {
6594 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6595}
6596
6597impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
6598
6599impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
6600 fn is_terminated(&self) -> bool {
6601 self.event_receiver.is_terminated()
6602 }
6603}
6604
6605impl futures::Stream for ExtendedAttributeIteratorEventStream {
6606 type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
6607
6608 fn poll_next(
6609 mut self: std::pin::Pin<&mut Self>,
6610 cx: &mut std::task::Context<'_>,
6611 ) -> std::task::Poll<Option<Self::Item>> {
6612 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6613 &mut self.event_receiver,
6614 cx
6615 )?) {
6616 Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
6617 None => std::task::Poll::Ready(None),
6618 }
6619 }
6620}
6621
6622#[derive(Debug)]
6623pub enum ExtendedAttributeIteratorEvent {}
6624
6625impl ExtendedAttributeIteratorEvent {
6626 fn decode(
6628 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6629 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6630 let (bytes, _handles) = buf.split_mut();
6631 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6632 debug_assert_eq!(tx_header.tx_id, 0);
6633 match tx_header.ordinal {
6634 _ => Err(fidl::Error::UnknownOrdinal {
6635 ordinal: tx_header.ordinal,
6636 protocol_name:
6637 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6638 }),
6639 }
6640 }
6641}
6642
6643pub struct ExtendedAttributeIteratorRequestStream {
6645 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6646 is_terminated: bool,
6647}
6648
6649impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
6650
6651impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
6652 fn is_terminated(&self) -> bool {
6653 self.is_terminated
6654 }
6655}
6656
6657impl fidl::endpoints::RequestStream for ExtendedAttributeIteratorRequestStream {
6658 type Protocol = ExtendedAttributeIteratorMarker;
6659 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6660
6661 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6662 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6663 }
6664
6665 fn control_handle(&self) -> Self::ControlHandle {
6666 ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
6667 }
6668
6669 fn into_inner(
6670 self,
6671 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6672 {
6673 (self.inner, self.is_terminated)
6674 }
6675
6676 fn from_inner(
6677 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6678 is_terminated: bool,
6679 ) -> Self {
6680 Self { inner, is_terminated }
6681 }
6682}
6683
6684impl futures::Stream for ExtendedAttributeIteratorRequestStream {
6685 type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
6686
6687 fn poll_next(
6688 mut self: std::pin::Pin<&mut Self>,
6689 cx: &mut std::task::Context<'_>,
6690 ) -> std::task::Poll<Option<Self::Item>> {
6691 let this = &mut *self;
6692 if this.inner.check_shutdown(cx) {
6693 this.is_terminated = true;
6694 return std::task::Poll::Ready(None);
6695 }
6696 if this.is_terminated {
6697 panic!("polled ExtendedAttributeIteratorRequestStream after completion");
6698 }
6699 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6700 |bytes, handles| {
6701 match this.inner.channel().read_etc(cx, bytes, handles) {
6702 std::task::Poll::Ready(Ok(())) => {}
6703 std::task::Poll::Pending => return std::task::Poll::Pending,
6704 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6705 this.is_terminated = true;
6706 return std::task::Poll::Ready(None);
6707 }
6708 std::task::Poll::Ready(Err(e)) => {
6709 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6710 e.into(),
6711 ))));
6712 }
6713 }
6714
6715 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6717
6718 std::task::Poll::Ready(Some(match header.ordinal {
6719 0x3ba664a1c2e45a7 => {
6720 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6721 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
6722 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6723 let control_handle = ExtendedAttributeIteratorControlHandle {
6724 inner: this.inner.clone(),
6725 };
6726 Ok(ExtendedAttributeIteratorRequest::GetNext {
6727 responder: ExtendedAttributeIteratorGetNextResponder {
6728 control_handle: std::mem::ManuallyDrop::new(control_handle),
6729 tx_id: header.tx_id,
6730 },
6731 })
6732 }
6733 _ => Err(fidl::Error::UnknownOrdinal {
6734 ordinal: header.ordinal,
6735 protocol_name: <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6736 }),
6737 }))
6738 },
6739 )
6740 }
6741}
6742
6743#[derive(Debug)]
6744pub enum ExtendedAttributeIteratorRequest {
6745 GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
6749}
6750
6751impl ExtendedAttributeIteratorRequest {
6752 #[allow(irrefutable_let_patterns)]
6753 pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
6754 if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
6755 Some((responder))
6756 } else {
6757 None
6758 }
6759 }
6760
6761 pub fn method_name(&self) -> &'static str {
6763 match *self {
6764 ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
6765 }
6766 }
6767}
6768
6769#[derive(Debug, Clone)]
6770pub struct ExtendedAttributeIteratorControlHandle {
6771 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6772}
6773
6774impl fidl::endpoints::ControlHandle for ExtendedAttributeIteratorControlHandle {
6775 fn shutdown(&self) {
6776 self.inner.shutdown()
6777 }
6778
6779 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6780 self.inner.shutdown_with_epitaph(status)
6781 }
6782
6783 fn is_closed(&self) -> bool {
6784 self.inner.channel().is_closed()
6785 }
6786 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6787 self.inner.channel().on_closed()
6788 }
6789
6790 #[cfg(target_os = "fuchsia")]
6791 fn signal_peer(
6792 &self,
6793 clear_mask: zx::Signals,
6794 set_mask: zx::Signals,
6795 ) -> Result<(), zx_status::Status> {
6796 use fidl::Peered;
6797 self.inner.channel().signal_peer(clear_mask, set_mask)
6798 }
6799}
6800
6801impl ExtendedAttributeIteratorControlHandle {}
6802
6803#[must_use = "FIDL methods require a response to be sent"]
6804#[derive(Debug)]
6805pub struct ExtendedAttributeIteratorGetNextResponder {
6806 control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
6807 tx_id: u32,
6808}
6809
6810impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
6814 fn drop(&mut self) {
6815 self.control_handle.shutdown();
6816 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6818 }
6819}
6820
6821impl fidl::endpoints::Responder for ExtendedAttributeIteratorGetNextResponder {
6822 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6823
6824 fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
6825 &self.control_handle
6826 }
6827
6828 fn drop_without_shutdown(mut self) {
6829 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6831 std::mem::forget(self);
6833 }
6834}
6835
6836impl ExtendedAttributeIteratorGetNextResponder {
6837 pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
6841 let _result = self.send_raw(result);
6842 if _result.is_err() {
6843 self.control_handle.shutdown();
6844 }
6845 self.drop_without_shutdown();
6846 _result
6847 }
6848
6849 pub fn send_no_shutdown_on_err(
6851 self,
6852 mut result: Result<(&[Vec<u8>], bool), i32>,
6853 ) -> Result<(), fidl::Error> {
6854 let _result = self.send_raw(result);
6855 self.drop_without_shutdown();
6856 _result
6857 }
6858
6859 fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
6860 self.control_handle.inner.send::<fidl::encoding::ResultType<
6861 ExtendedAttributeIteratorGetNextResponse,
6862 i32,
6863 >>(
6864 result,
6865 self.tx_id,
6866 0x3ba664a1c2e45a7,
6867 fidl::encoding::DynamicFlags::empty(),
6868 )
6869 }
6870}
6871
6872#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6873pub struct FileMarker;
6874
6875impl fidl::endpoints::ProtocolMarker for FileMarker {
6876 type Proxy = FileProxy;
6877 type RequestStream = FileRequestStream;
6878 #[cfg(target_os = "fuchsia")]
6879 type SynchronousProxy = FileSynchronousProxy;
6880
6881 const DEBUG_NAME: &'static str = "fuchsia.io.File";
6882}
6883impl fidl::endpoints::DiscoverableProtocolMarker for FileMarker {}
6884pub type FileSeekResult = Result<u64, i32>;
6885pub type FileReadAtResult = Result<Vec<u8>, i32>;
6886pub type FileWriteAtResult = Result<u64, i32>;
6887pub type FileResizeResult = Result<(), i32>;
6888pub type FileGetBackingMemoryResult = Result<fidl::Vmo, i32>;
6889pub type FileAllocateResult = Result<(), i32>;
6890pub type FileEnableVerityResult = Result<(), i32>;
6891
6892pub trait FileProxyInterface: Send + Sync {
6893 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
6894 + Send;
6895 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
6896 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
6897 + Send;
6898 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
6899 fn r#clone(
6900 &self,
6901 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
6902 ) -> Result<(), fidl::Error>;
6903 type CloseResponseFut: std::future::Future<
6904 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
6905 > + Send;
6906 fn r#close(&self) -> Self::CloseResponseFut;
6907 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
6908 fn r#query(&self) -> Self::QueryResponseFut;
6909 fn r#deprecated_clone(
6910 &self,
6911 flags: OpenFlags,
6912 object: fidl::endpoints::ServerEnd<NodeMarker>,
6913 ) -> Result<(), fidl::Error>;
6914 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
6915 + Send;
6916 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
6917 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
6918 fn r#deprecated_set_attr(
6919 &self,
6920 flags: NodeAttributeFlags,
6921 attributes: &NodeAttributes,
6922 ) -> Self::DeprecatedSetAttrResponseFut;
6923 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
6924 + Send;
6925 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
6926 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
6927 + Send;
6928 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
6929 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
6930 + Send;
6931 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
6932 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
6933 + Send;
6934 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
6935 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
6936 + Send;
6937 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
6938 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
6939 + Send;
6940 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
6941 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
6942 + Send;
6943 fn r#update_attributes(
6944 &self,
6945 payload: &MutableNodeAttributes,
6946 ) -> Self::UpdateAttributesResponseFut;
6947 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
6948 fn r#sync(&self) -> Self::SyncResponseFut;
6949 fn r#list_extended_attributes(
6950 &self,
6951 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
6952 ) -> Result<(), fidl::Error>;
6953 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
6954 + Send;
6955 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
6956 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
6957 + Send;
6958 fn r#set_extended_attribute(
6959 &self,
6960 name: &[u8],
6961 value: ExtendedAttributeValue,
6962 mode: SetExtendedAttributeMode,
6963 ) -> Self::SetExtendedAttributeResponseFut;
6964 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
6965 + Send;
6966 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
6967 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
6968 + Send;
6969 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
6970 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
6971 + Send;
6972 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
6973 type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
6974 fn r#describe(&self) -> Self::DescribeResponseFut;
6975 type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
6976 fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
6977 type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
6978 + Send;
6979 fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
6980 type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
6981 + Send;
6982 fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
6983 type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
6984 + Send;
6985 fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
6986 type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
6987 + Send;
6988 fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
6989 type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
6990 + Send;
6991 fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
6992 -> Self::AllocateResponseFut;
6993 type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
6994 + Send;
6995 fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
6996}
6997#[derive(Debug)]
6998#[cfg(target_os = "fuchsia")]
6999pub struct FileSynchronousProxy {
7000 client: fidl::client::sync::Client,
7001}
7002
7003#[cfg(target_os = "fuchsia")]
7004impl fidl::endpoints::SynchronousProxy for FileSynchronousProxy {
7005 type Proxy = FileProxy;
7006 type Protocol = FileMarker;
7007
7008 fn from_channel(inner: fidl::Channel) -> Self {
7009 Self::new(inner)
7010 }
7011
7012 fn into_channel(self) -> fidl::Channel {
7013 self.client.into_channel()
7014 }
7015
7016 fn as_channel(&self) -> &fidl::Channel {
7017 self.client.as_channel()
7018 }
7019}
7020
7021#[cfg(target_os = "fuchsia")]
7022impl FileSynchronousProxy {
7023 pub fn new(channel: fidl::Channel) -> Self {
7024 Self { client: fidl::client::sync::Client::new(channel) }
7025 }
7026
7027 pub fn into_channel(self) -> fidl::Channel {
7028 self.client.into_channel()
7029 }
7030
7031 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<FileEvent, fidl::Error> {
7034 FileEvent::decode(self.client.wait_for_event::<FileMarker>(deadline)?)
7035 }
7036
7037 pub fn r#advisory_lock(
7061 &self,
7062 mut request: &AdvisoryLockRequest,
7063 ___deadline: zx::MonotonicInstant,
7064 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
7065 let _response = self.client.send_query::<
7066 AdvisoryLockingAdvisoryLockRequest,
7067 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7068 FileMarker,
7069 >(
7070 (request,),
7071 0x6ee9c0ad53ec87aa,
7072 fidl::encoding::DynamicFlags::empty(),
7073 ___deadline,
7074 )?;
7075 Ok(_response.map(|x| x))
7076 }
7077
7078 pub fn r#link_into(
7101 &self,
7102 mut dst_parent_token: fidl::Event,
7103 mut dst: &str,
7104 ___deadline: zx::MonotonicInstant,
7105 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
7106 let _response = self.client.send_query::<
7107 LinkableLinkIntoRequest,
7108 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7109 FileMarker,
7110 >(
7111 (dst_parent_token, dst,),
7112 0x54f3949246a03e74,
7113 fidl::encoding::DynamicFlags::empty(),
7114 ___deadline,
7115 )?;
7116 Ok(_response.map(|x| x))
7117 }
7118
7119 pub fn r#clone(
7120 &self,
7121 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7122 ) -> Result<(), fidl::Error> {
7123 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
7124 (request,),
7125 0x20d8a7aba2168a79,
7126 fidl::encoding::DynamicFlags::empty(),
7127 )
7128 }
7129
7130 pub fn r#close(
7141 &self,
7142 ___deadline: zx::MonotonicInstant,
7143 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
7144 let _response = self.client.send_query::<
7145 fidl::encoding::EmptyPayload,
7146 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7147 FileMarker,
7148 >(
7149 (),
7150 0x5ac5d459ad7f657e,
7151 fidl::encoding::DynamicFlags::empty(),
7152 ___deadline,
7153 )?;
7154 Ok(_response.map(|x| x))
7155 }
7156
7157 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
7158 let _response = self.client.send_query::<
7159 fidl::encoding::EmptyPayload,
7160 fidl_fuchsia_unknown::QueryableQueryResponse,
7161 FileMarker,
7162 >(
7163 (),
7164 0x2658edee9decfc06,
7165 fidl::encoding::DynamicFlags::empty(),
7166 ___deadline,
7167 )?;
7168 Ok(_response.protocol)
7169 }
7170
7171 pub fn r#deprecated_clone(
7173 &self,
7174 mut flags: OpenFlags,
7175 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
7176 ) -> Result<(), fidl::Error> {
7177 self.client.send::<NodeDeprecatedCloneRequest>(
7178 (flags, object),
7179 0x5a61678f293ce16f,
7180 fidl::encoding::DynamicFlags::FLEXIBLE,
7181 )
7182 }
7183
7184 pub fn r#deprecated_get_attr(
7186 &self,
7187 ___deadline: zx::MonotonicInstant,
7188 ) -> Result<(i32, NodeAttributes), fidl::Error> {
7189 let _response = self
7190 .client
7191 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse, FileMarker>(
7192 (),
7193 0x78985e216314dafd,
7194 fidl::encoding::DynamicFlags::empty(),
7195 ___deadline,
7196 )?;
7197 Ok((_response.s, _response.attributes))
7198 }
7199
7200 pub fn r#deprecated_set_attr(
7202 &self,
7203 mut flags: NodeAttributeFlags,
7204 mut attributes: &NodeAttributes,
7205 ___deadline: zx::MonotonicInstant,
7206 ) -> Result<i32, fidl::Error> {
7207 let _response = self
7208 .client
7209 .send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse, FileMarker>(
7210 (flags, attributes),
7211 0x4186c0f40d938f46,
7212 fidl::encoding::DynamicFlags::empty(),
7213 ___deadline,
7214 )?;
7215 Ok(_response.s)
7216 }
7217
7218 pub fn r#deprecated_get_flags(
7220 &self,
7221 ___deadline: zx::MonotonicInstant,
7222 ) -> Result<(i32, OpenFlags), fidl::Error> {
7223 let _response = self
7224 .client
7225 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse, FileMarker>(
7226 (),
7227 0x5b88fffb8eda3aa1,
7228 fidl::encoding::DynamicFlags::empty(),
7229 ___deadline,
7230 )?;
7231 Ok((_response.s, _response.flags))
7232 }
7233
7234 pub fn r#deprecated_set_flags(
7236 &self,
7237 mut flags: OpenFlags,
7238 ___deadline: zx::MonotonicInstant,
7239 ) -> Result<i32, fidl::Error> {
7240 let _response = self.client.send_query::<
7241 NodeDeprecatedSetFlagsRequest,
7242 NodeDeprecatedSetFlagsResponse,
7243 FileMarker,
7244 >(
7245 (flags,),
7246 0x5295b76c71fde733,
7247 fidl::encoding::DynamicFlags::empty(),
7248 ___deadline,
7249 )?;
7250 Ok(_response.s)
7251 }
7252
7253 pub fn r#get_flags(
7262 &self,
7263 ___deadline: zx::MonotonicInstant,
7264 ) -> Result<NodeGetFlagsResult, fidl::Error> {
7265 let _response = self.client.send_query::<
7266 fidl::encoding::EmptyPayload,
7267 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
7268 FileMarker,
7269 >(
7270 (),
7271 0x176eb318f64ec23,
7272 fidl::encoding::DynamicFlags::FLEXIBLE,
7273 ___deadline,
7274 )?
7275 .into_result::<FileMarker>("get_flags")?;
7276 Ok(_response.map(|x| x.flags))
7277 }
7278
7279 pub fn r#set_flags(
7289 &self,
7290 mut flags: Flags,
7291 ___deadline: zx::MonotonicInstant,
7292 ) -> Result<NodeSetFlagsResult, fidl::Error> {
7293 let _response = self.client.send_query::<
7294 NodeSetFlagsRequest,
7295 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7296 FileMarker,
7297 >(
7298 (flags,),
7299 0x55a8028685791ea8,
7300 fidl::encoding::DynamicFlags::FLEXIBLE,
7301 ___deadline,
7302 )?
7303 .into_result::<FileMarker>("set_flags")?;
7304 Ok(_response.map(|x| x))
7305 }
7306
7307 pub fn r#query_filesystem(
7311 &self,
7312 ___deadline: zx::MonotonicInstant,
7313 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
7314 let _response = self
7315 .client
7316 .send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse, FileMarker>(
7317 (),
7318 0x6f344a1c6b0a0610,
7319 fidl::encoding::DynamicFlags::empty(),
7320 ___deadline,
7321 )?;
7322 Ok((_response.s, _response.info))
7323 }
7324
7325 pub fn r#get_attributes(
7339 &self,
7340 mut query: NodeAttributesQuery,
7341 ___deadline: zx::MonotonicInstant,
7342 ) -> Result<NodeGetAttributesResult, fidl::Error> {
7343 let _response = self.client.send_query::<
7344 NodeGetAttributesRequest,
7345 fidl::encoding::ResultType<NodeAttributes2, i32>,
7346 FileMarker,
7347 >(
7348 (query,),
7349 0x3d4396a638ea053b,
7350 fidl::encoding::DynamicFlags::empty(),
7351 ___deadline,
7352 )?;
7353 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
7354 }
7355
7356 pub fn r#update_attributes(
7365 &self,
7366 mut payload: &MutableNodeAttributes,
7367 ___deadline: zx::MonotonicInstant,
7368 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
7369 let _response = self.client.send_query::<
7370 MutableNodeAttributes,
7371 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7372 FileMarker,
7373 >(
7374 payload,
7375 0x3308c1da5a89bf08,
7376 fidl::encoding::DynamicFlags::empty(),
7377 ___deadline,
7378 )?;
7379 Ok(_response.map(|x| x))
7380 }
7381
7382 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
7392 let _response = self.client.send_query::<
7393 fidl::encoding::EmptyPayload,
7394 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7395 FileMarker,
7396 >(
7397 (),
7398 0x2c5c27ca0ab5dc49,
7399 fidl::encoding::DynamicFlags::empty(),
7400 ___deadline,
7401 )?;
7402 Ok(_response.map(|x| x))
7403 }
7404
7405 pub fn r#list_extended_attributes(
7414 &self,
7415 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
7416 ) -> Result<(), fidl::Error> {
7417 self.client.send::<NodeListExtendedAttributesRequest>(
7418 (iterator,),
7419 0x4b61033de007fcd0,
7420 fidl::encoding::DynamicFlags::empty(),
7421 )
7422 }
7423
7424 pub fn r#get_extended_attribute(
7431 &self,
7432 mut name: &[u8],
7433 ___deadline: zx::MonotonicInstant,
7434 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
7435 let _response = self.client.send_query::<
7436 NodeGetExtendedAttributeRequest,
7437 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
7438 FileMarker,
7439 >(
7440 (name,),
7441 0x45ffa3ccfdeb76db,
7442 fidl::encoding::DynamicFlags::empty(),
7443 ___deadline,
7444 )?;
7445 Ok(_response.map(|x| x))
7446 }
7447
7448 pub fn r#set_extended_attribute(
7456 &self,
7457 mut name: &[u8],
7458 mut value: ExtendedAttributeValue,
7459 mut mode: SetExtendedAttributeMode,
7460 ___deadline: zx::MonotonicInstant,
7461 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
7462 let _response = self.client.send_query::<
7463 NodeSetExtendedAttributeRequest,
7464 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7465 FileMarker,
7466 >(
7467 (name, &mut value, mode,),
7468 0x4a951362f681f23c,
7469 fidl::encoding::DynamicFlags::empty(),
7470 ___deadline,
7471 )?;
7472 Ok(_response.map(|x| x))
7473 }
7474
7475 pub fn r#remove_extended_attribute(
7481 &self,
7482 mut name: &[u8],
7483 ___deadline: zx::MonotonicInstant,
7484 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
7485 let _response = self.client.send_query::<
7486 NodeRemoveExtendedAttributeRequest,
7487 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7488 FileMarker,
7489 >(
7490 (name,),
7491 0x7a0b9f3a9bf9032d,
7492 fidl::encoding::DynamicFlags::empty(),
7493 ___deadline,
7494 )?;
7495 Ok(_response.map(|x| x))
7496 }
7497
7498 pub fn r#read(
7517 &self,
7518 mut count: u64,
7519 ___deadline: zx::MonotonicInstant,
7520 ) -> Result<ReadableReadResult, fidl::Error> {
7521 let _response = self.client.send_query::<
7522 ReadableReadRequest,
7523 fidl::encoding::ResultType<ReadableReadResponse, i32>,
7524 FileMarker,
7525 >(
7526 (count,),
7527 0x57e419a298c8ede,
7528 fidl::encoding::DynamicFlags::empty(),
7529 ___deadline,
7530 )?;
7531 Ok(_response.map(|x| x.data))
7532 }
7533
7534 pub fn r#write(
7558 &self,
7559 mut data: &[u8],
7560 ___deadline: zx::MonotonicInstant,
7561 ) -> Result<WritableWriteResult, fidl::Error> {
7562 let _response = self.client.send_query::<
7563 WritableWriteRequest,
7564 fidl::encoding::ResultType<WritableWriteResponse, i32>,
7565 FileMarker,
7566 >(
7567 (data,),
7568 0x6a31437832469f82,
7569 fidl::encoding::DynamicFlags::empty(),
7570 ___deadline,
7571 )?;
7572 Ok(_response.map(|x| x.actual_count))
7573 }
7574
7575 pub fn r#describe(&self, ___deadline: zx::MonotonicInstant) -> Result<FileInfo, fidl::Error> {
7576 let _response =
7577 self.client.send_query::<fidl::encoding::EmptyPayload, FileInfo, FileMarker>(
7578 (),
7579 0x68b5ac00c62906bc,
7580 fidl::encoding::DynamicFlags::empty(),
7581 ___deadline,
7582 )?;
7583 Ok(_response)
7584 }
7585
7586 pub fn r#seek(
7596 &self,
7597 mut origin: SeekOrigin,
7598 mut offset: i64,
7599 ___deadline: zx::MonotonicInstant,
7600 ) -> Result<FileSeekResult, fidl::Error> {
7601 let _response = self.client.send_query::<
7602 FileSeekRequest,
7603 fidl::encoding::ResultType<FileSeekResponse, i32>,
7604 FileMarker,
7605 >(
7606 (origin, offset,),
7607 0x78079168162c5207,
7608 fidl::encoding::DynamicFlags::empty(),
7609 ___deadline,
7610 )?;
7611 Ok(_response.map(|x| x.offset_from_start))
7612 }
7613
7614 pub fn r#read_at(
7632 &self,
7633 mut count: u64,
7634 mut offset: u64,
7635 ___deadline: zx::MonotonicInstant,
7636 ) -> Result<FileReadAtResult, fidl::Error> {
7637 let _response = self.client.send_query::<
7638 FileReadAtRequest,
7639 fidl::encoding::ResultType<FileReadAtResponse, i32>,
7640 FileMarker,
7641 >(
7642 (count, offset,),
7643 0x1607a293a60d723e,
7644 fidl::encoding::DynamicFlags::empty(),
7645 ___deadline,
7646 )?;
7647 Ok(_response.map(|x| x.data))
7648 }
7649
7650 pub fn r#write_at(
7672 &self,
7673 mut data: &[u8],
7674 mut offset: u64,
7675 ___deadline: zx::MonotonicInstant,
7676 ) -> Result<FileWriteAtResult, fidl::Error> {
7677 let _response = self.client.send_query::<
7678 FileWriteAtRequest,
7679 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
7680 FileMarker,
7681 >(
7682 (data, offset,),
7683 0x793eefc0045e792b,
7684 fidl::encoding::DynamicFlags::empty(),
7685 ___deadline,
7686 )?;
7687 Ok(_response.map(|x| x.actual_count))
7688 }
7689
7690 pub fn r#resize(
7699 &self,
7700 mut length: u64,
7701 ___deadline: zx::MonotonicInstant,
7702 ) -> Result<FileResizeResult, fidl::Error> {
7703 let _response = self.client.send_query::<
7704 FileResizeRequest,
7705 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7706 FileMarker,
7707 >(
7708 (length,),
7709 0x2b80825f0535743a,
7710 fidl::encoding::DynamicFlags::empty(),
7711 ___deadline,
7712 )?;
7713 Ok(_response.map(|x| x))
7714 }
7715
7716 pub fn r#get_backing_memory(
7737 &self,
7738 mut flags: VmoFlags,
7739 ___deadline: zx::MonotonicInstant,
7740 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7741 let _response = self.client.send_query::<
7742 FileGetBackingMemoryRequest,
7743 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7744 FileMarker,
7745 >(
7746 (flags,),
7747 0xa6a9e654cbf62b,
7748 fidl::encoding::DynamicFlags::empty(),
7749 ___deadline,
7750 )?;
7751 Ok(_response.map(|x| x.vmo))
7752 }
7753
7754 pub fn r#allocate(
7756 &self,
7757 mut offset: u64,
7758 mut length: u64,
7759 mut mode: AllocateMode,
7760 ___deadline: zx::MonotonicInstant,
7761 ) -> Result<FileAllocateResult, fidl::Error> {
7762 let _response = self.client.send_query::<
7763 FileAllocateRequest,
7764 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7765 FileMarker,
7766 >(
7767 (offset, length, mode,),
7768 0x77fa0c330b57fd2e,
7769 fidl::encoding::DynamicFlags::FLEXIBLE,
7770 ___deadline,
7771 )?
7772 .into_result::<FileMarker>("allocate")?;
7773 Ok(_response.map(|x| x))
7774 }
7775
7776 pub fn r#enable_verity(
7788 &self,
7789 mut options: &VerificationOptions,
7790 ___deadline: zx::MonotonicInstant,
7791 ) -> Result<FileEnableVerityResult, fidl::Error> {
7792 let _response = self.client.send_query::<
7793 FileEnableVerityRequest,
7794 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7795 FileMarker,
7796 >(
7797 (options,),
7798 0x2c421ec3faaeb8bb,
7799 fidl::encoding::DynamicFlags::FLEXIBLE,
7800 ___deadline,
7801 )?
7802 .into_result::<FileMarker>("enable_verity")?;
7803 Ok(_response.map(|x| x))
7804 }
7805}
7806
7807#[cfg(target_os = "fuchsia")]
7808impl From<FileSynchronousProxy> for zx::NullableHandle {
7809 fn from(value: FileSynchronousProxy) -> Self {
7810 value.into_channel().into()
7811 }
7812}
7813
7814#[cfg(target_os = "fuchsia")]
7815impl From<fidl::Channel> for FileSynchronousProxy {
7816 fn from(value: fidl::Channel) -> Self {
7817 Self::new(value)
7818 }
7819}
7820
7821#[cfg(target_os = "fuchsia")]
7822impl fidl::endpoints::FromClient for FileSynchronousProxy {
7823 type Protocol = FileMarker;
7824
7825 fn from_client(value: fidl::endpoints::ClientEnd<FileMarker>) -> Self {
7826 Self::new(value.into_channel())
7827 }
7828}
7829
7830#[derive(Debug, Clone)]
7831pub struct FileProxy {
7832 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7833}
7834
7835impl fidl::endpoints::Proxy for FileProxy {
7836 type Protocol = FileMarker;
7837
7838 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7839 Self::new(inner)
7840 }
7841
7842 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7843 self.client.into_channel().map_err(|client| Self { client })
7844 }
7845
7846 fn as_channel(&self) -> &::fidl::AsyncChannel {
7847 self.client.as_channel()
7848 }
7849}
7850
7851impl FileProxy {
7852 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7854 let protocol_name = <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7855 Self { client: fidl::client::Client::new(channel, protocol_name) }
7856 }
7857
7858 pub fn take_event_stream(&self) -> FileEventStream {
7864 FileEventStream { event_receiver: self.client.take_event_receiver() }
7865 }
7866
7867 pub fn r#advisory_lock(
7891 &self,
7892 mut request: &AdvisoryLockRequest,
7893 ) -> fidl::client::QueryResponseFut<
7894 AdvisoryLockingAdvisoryLockResult,
7895 fidl::encoding::DefaultFuchsiaResourceDialect,
7896 > {
7897 FileProxyInterface::r#advisory_lock(self, request)
7898 }
7899
7900 pub fn r#link_into(
7923 &self,
7924 mut dst_parent_token: fidl::Event,
7925 mut dst: &str,
7926 ) -> fidl::client::QueryResponseFut<
7927 LinkableLinkIntoResult,
7928 fidl::encoding::DefaultFuchsiaResourceDialect,
7929 > {
7930 FileProxyInterface::r#link_into(self, dst_parent_token, dst)
7931 }
7932
7933 pub fn r#clone(
7934 &self,
7935 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7936 ) -> Result<(), fidl::Error> {
7937 FileProxyInterface::r#clone(self, request)
7938 }
7939
7940 pub fn r#close(
7951 &self,
7952 ) -> fidl::client::QueryResponseFut<
7953 fidl_fuchsia_unknown::CloseableCloseResult,
7954 fidl::encoding::DefaultFuchsiaResourceDialect,
7955 > {
7956 FileProxyInterface::r#close(self)
7957 }
7958
7959 pub fn r#query(
7960 &self,
7961 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
7962 {
7963 FileProxyInterface::r#query(self)
7964 }
7965
7966 pub fn r#deprecated_clone(
7968 &self,
7969 mut flags: OpenFlags,
7970 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
7971 ) -> Result<(), fidl::Error> {
7972 FileProxyInterface::r#deprecated_clone(self, flags, object)
7973 }
7974
7975 pub fn r#deprecated_get_attr(
7977 &self,
7978 ) -> fidl::client::QueryResponseFut<
7979 (i32, NodeAttributes),
7980 fidl::encoding::DefaultFuchsiaResourceDialect,
7981 > {
7982 FileProxyInterface::r#deprecated_get_attr(self)
7983 }
7984
7985 pub fn r#deprecated_set_attr(
7987 &self,
7988 mut flags: NodeAttributeFlags,
7989 mut attributes: &NodeAttributes,
7990 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7991 FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
7992 }
7993
7994 pub fn r#deprecated_get_flags(
7996 &self,
7997 ) -> fidl::client::QueryResponseFut<
7998 (i32, OpenFlags),
7999 fidl::encoding::DefaultFuchsiaResourceDialect,
8000 > {
8001 FileProxyInterface::r#deprecated_get_flags(self)
8002 }
8003
8004 pub fn r#deprecated_set_flags(
8006 &self,
8007 mut flags: OpenFlags,
8008 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
8009 FileProxyInterface::r#deprecated_set_flags(self, flags)
8010 }
8011
8012 pub fn r#get_flags(
8021 &self,
8022 ) -> fidl::client::QueryResponseFut<
8023 NodeGetFlagsResult,
8024 fidl::encoding::DefaultFuchsiaResourceDialect,
8025 > {
8026 FileProxyInterface::r#get_flags(self)
8027 }
8028
8029 pub fn r#set_flags(
8039 &self,
8040 mut flags: Flags,
8041 ) -> fidl::client::QueryResponseFut<
8042 NodeSetFlagsResult,
8043 fidl::encoding::DefaultFuchsiaResourceDialect,
8044 > {
8045 FileProxyInterface::r#set_flags(self, flags)
8046 }
8047
8048 pub fn r#query_filesystem(
8052 &self,
8053 ) -> fidl::client::QueryResponseFut<
8054 (i32, Option<Box<FilesystemInfo>>),
8055 fidl::encoding::DefaultFuchsiaResourceDialect,
8056 > {
8057 FileProxyInterface::r#query_filesystem(self)
8058 }
8059
8060 pub fn r#get_attributes(
8074 &self,
8075 mut query: NodeAttributesQuery,
8076 ) -> fidl::client::QueryResponseFut<
8077 NodeGetAttributesResult,
8078 fidl::encoding::DefaultFuchsiaResourceDialect,
8079 > {
8080 FileProxyInterface::r#get_attributes(self, query)
8081 }
8082
8083 pub fn r#update_attributes(
8092 &self,
8093 mut payload: &MutableNodeAttributes,
8094 ) -> fidl::client::QueryResponseFut<
8095 NodeUpdateAttributesResult,
8096 fidl::encoding::DefaultFuchsiaResourceDialect,
8097 > {
8098 FileProxyInterface::r#update_attributes(self, payload)
8099 }
8100
8101 pub fn r#sync(
8111 &self,
8112 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8113 {
8114 FileProxyInterface::r#sync(self)
8115 }
8116
8117 pub fn r#list_extended_attributes(
8126 &self,
8127 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8128 ) -> Result<(), fidl::Error> {
8129 FileProxyInterface::r#list_extended_attributes(self, iterator)
8130 }
8131
8132 pub fn r#get_extended_attribute(
8139 &self,
8140 mut name: &[u8],
8141 ) -> fidl::client::QueryResponseFut<
8142 NodeGetExtendedAttributeResult,
8143 fidl::encoding::DefaultFuchsiaResourceDialect,
8144 > {
8145 FileProxyInterface::r#get_extended_attribute(self, name)
8146 }
8147
8148 pub fn r#set_extended_attribute(
8156 &self,
8157 mut name: &[u8],
8158 mut value: ExtendedAttributeValue,
8159 mut mode: SetExtendedAttributeMode,
8160 ) -> fidl::client::QueryResponseFut<
8161 NodeSetExtendedAttributeResult,
8162 fidl::encoding::DefaultFuchsiaResourceDialect,
8163 > {
8164 FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
8165 }
8166
8167 pub fn r#remove_extended_attribute(
8173 &self,
8174 mut name: &[u8],
8175 ) -> fidl::client::QueryResponseFut<
8176 NodeRemoveExtendedAttributeResult,
8177 fidl::encoding::DefaultFuchsiaResourceDialect,
8178 > {
8179 FileProxyInterface::r#remove_extended_attribute(self, name)
8180 }
8181
8182 pub fn r#read(
8201 &self,
8202 mut count: u64,
8203 ) -> fidl::client::QueryResponseFut<
8204 ReadableReadResult,
8205 fidl::encoding::DefaultFuchsiaResourceDialect,
8206 > {
8207 FileProxyInterface::r#read(self, count)
8208 }
8209
8210 pub fn r#write(
8234 &self,
8235 mut data: &[u8],
8236 ) -> fidl::client::QueryResponseFut<
8237 WritableWriteResult,
8238 fidl::encoding::DefaultFuchsiaResourceDialect,
8239 > {
8240 FileProxyInterface::r#write(self, data)
8241 }
8242
8243 pub fn r#describe(
8244 &self,
8245 ) -> fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
8246 {
8247 FileProxyInterface::r#describe(self)
8248 }
8249
8250 pub fn r#seek(
8260 &self,
8261 mut origin: SeekOrigin,
8262 mut offset: i64,
8263 ) -> fidl::client::QueryResponseFut<FileSeekResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8264 {
8265 FileProxyInterface::r#seek(self, origin, offset)
8266 }
8267
8268 pub fn r#read_at(
8286 &self,
8287 mut count: u64,
8288 mut offset: u64,
8289 ) -> fidl::client::QueryResponseFut<
8290 FileReadAtResult,
8291 fidl::encoding::DefaultFuchsiaResourceDialect,
8292 > {
8293 FileProxyInterface::r#read_at(self, count, offset)
8294 }
8295
8296 pub fn r#write_at(
8318 &self,
8319 mut data: &[u8],
8320 mut offset: u64,
8321 ) -> fidl::client::QueryResponseFut<
8322 FileWriteAtResult,
8323 fidl::encoding::DefaultFuchsiaResourceDialect,
8324 > {
8325 FileProxyInterface::r#write_at(self, data, offset)
8326 }
8327
8328 pub fn r#resize(
8337 &self,
8338 mut length: u64,
8339 ) -> fidl::client::QueryResponseFut<
8340 FileResizeResult,
8341 fidl::encoding::DefaultFuchsiaResourceDialect,
8342 > {
8343 FileProxyInterface::r#resize(self, length)
8344 }
8345
8346 pub fn r#get_backing_memory(
8367 &self,
8368 mut flags: VmoFlags,
8369 ) -> fidl::client::QueryResponseFut<
8370 FileGetBackingMemoryResult,
8371 fidl::encoding::DefaultFuchsiaResourceDialect,
8372 > {
8373 FileProxyInterface::r#get_backing_memory(self, flags)
8374 }
8375
8376 pub fn r#allocate(
8378 &self,
8379 mut offset: u64,
8380 mut length: u64,
8381 mut mode: AllocateMode,
8382 ) -> fidl::client::QueryResponseFut<
8383 FileAllocateResult,
8384 fidl::encoding::DefaultFuchsiaResourceDialect,
8385 > {
8386 FileProxyInterface::r#allocate(self, offset, length, mode)
8387 }
8388
8389 pub fn r#enable_verity(
8401 &self,
8402 mut options: &VerificationOptions,
8403 ) -> fidl::client::QueryResponseFut<
8404 FileEnableVerityResult,
8405 fidl::encoding::DefaultFuchsiaResourceDialect,
8406 > {
8407 FileProxyInterface::r#enable_verity(self, options)
8408 }
8409}
8410
8411impl FileProxyInterface for FileProxy {
8412 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
8413 AdvisoryLockingAdvisoryLockResult,
8414 fidl::encoding::DefaultFuchsiaResourceDialect,
8415 >;
8416 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
8417 fn _decode(
8418 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8419 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
8420 let _response = fidl::client::decode_transaction_body::<
8421 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8422 fidl::encoding::DefaultFuchsiaResourceDialect,
8423 0x6ee9c0ad53ec87aa,
8424 >(_buf?)?;
8425 Ok(_response.map(|x| x))
8426 }
8427 self.client.send_query_and_decode::<
8428 AdvisoryLockingAdvisoryLockRequest,
8429 AdvisoryLockingAdvisoryLockResult,
8430 >(
8431 (request,),
8432 0x6ee9c0ad53ec87aa,
8433 fidl::encoding::DynamicFlags::empty(),
8434 _decode,
8435 )
8436 }
8437
8438 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
8439 LinkableLinkIntoResult,
8440 fidl::encoding::DefaultFuchsiaResourceDialect,
8441 >;
8442 fn r#link_into(
8443 &self,
8444 mut dst_parent_token: fidl::Event,
8445 mut dst: &str,
8446 ) -> Self::LinkIntoResponseFut {
8447 fn _decode(
8448 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8449 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
8450 let _response = fidl::client::decode_transaction_body::<
8451 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8452 fidl::encoding::DefaultFuchsiaResourceDialect,
8453 0x54f3949246a03e74,
8454 >(_buf?)?;
8455 Ok(_response.map(|x| x))
8456 }
8457 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
8458 (dst_parent_token, dst),
8459 0x54f3949246a03e74,
8460 fidl::encoding::DynamicFlags::empty(),
8461 _decode,
8462 )
8463 }
8464
8465 fn r#clone(
8466 &self,
8467 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
8468 ) -> Result<(), fidl::Error> {
8469 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
8470 (request,),
8471 0x20d8a7aba2168a79,
8472 fidl::encoding::DynamicFlags::empty(),
8473 )
8474 }
8475
8476 type CloseResponseFut = fidl::client::QueryResponseFut<
8477 fidl_fuchsia_unknown::CloseableCloseResult,
8478 fidl::encoding::DefaultFuchsiaResourceDialect,
8479 >;
8480 fn r#close(&self) -> Self::CloseResponseFut {
8481 fn _decode(
8482 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8483 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
8484 let _response = fidl::client::decode_transaction_body::<
8485 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8486 fidl::encoding::DefaultFuchsiaResourceDialect,
8487 0x5ac5d459ad7f657e,
8488 >(_buf?)?;
8489 Ok(_response.map(|x| x))
8490 }
8491 self.client.send_query_and_decode::<
8492 fidl::encoding::EmptyPayload,
8493 fidl_fuchsia_unknown::CloseableCloseResult,
8494 >(
8495 (),
8496 0x5ac5d459ad7f657e,
8497 fidl::encoding::DynamicFlags::empty(),
8498 _decode,
8499 )
8500 }
8501
8502 type QueryResponseFut =
8503 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
8504 fn r#query(&self) -> Self::QueryResponseFut {
8505 fn _decode(
8506 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8507 ) -> Result<Vec<u8>, fidl::Error> {
8508 let _response = fidl::client::decode_transaction_body::<
8509 fidl_fuchsia_unknown::QueryableQueryResponse,
8510 fidl::encoding::DefaultFuchsiaResourceDialect,
8511 0x2658edee9decfc06,
8512 >(_buf?)?;
8513 Ok(_response.protocol)
8514 }
8515 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
8516 (),
8517 0x2658edee9decfc06,
8518 fidl::encoding::DynamicFlags::empty(),
8519 _decode,
8520 )
8521 }
8522
8523 fn r#deprecated_clone(
8524 &self,
8525 mut flags: OpenFlags,
8526 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
8527 ) -> Result<(), fidl::Error> {
8528 self.client.send::<NodeDeprecatedCloneRequest>(
8529 (flags, object),
8530 0x5a61678f293ce16f,
8531 fidl::encoding::DynamicFlags::FLEXIBLE,
8532 )
8533 }
8534
8535 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
8536 (i32, NodeAttributes),
8537 fidl::encoding::DefaultFuchsiaResourceDialect,
8538 >;
8539 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
8540 fn _decode(
8541 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8542 ) -> Result<(i32, NodeAttributes), fidl::Error> {
8543 let _response = fidl::client::decode_transaction_body::<
8544 NodeDeprecatedGetAttrResponse,
8545 fidl::encoding::DefaultFuchsiaResourceDialect,
8546 0x78985e216314dafd,
8547 >(_buf?)?;
8548 Ok((_response.s, _response.attributes))
8549 }
8550 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
8551 (),
8552 0x78985e216314dafd,
8553 fidl::encoding::DynamicFlags::empty(),
8554 _decode,
8555 )
8556 }
8557
8558 type DeprecatedSetAttrResponseFut =
8559 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8560 fn r#deprecated_set_attr(
8561 &self,
8562 mut flags: NodeAttributeFlags,
8563 mut attributes: &NodeAttributes,
8564 ) -> Self::DeprecatedSetAttrResponseFut {
8565 fn _decode(
8566 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8567 ) -> Result<i32, fidl::Error> {
8568 let _response = fidl::client::decode_transaction_body::<
8569 NodeDeprecatedSetAttrResponse,
8570 fidl::encoding::DefaultFuchsiaResourceDialect,
8571 0x4186c0f40d938f46,
8572 >(_buf?)?;
8573 Ok(_response.s)
8574 }
8575 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
8576 (flags, attributes),
8577 0x4186c0f40d938f46,
8578 fidl::encoding::DynamicFlags::empty(),
8579 _decode,
8580 )
8581 }
8582
8583 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
8584 (i32, OpenFlags),
8585 fidl::encoding::DefaultFuchsiaResourceDialect,
8586 >;
8587 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
8588 fn _decode(
8589 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8590 ) -> Result<(i32, OpenFlags), fidl::Error> {
8591 let _response = fidl::client::decode_transaction_body::<
8592 NodeDeprecatedGetFlagsResponse,
8593 fidl::encoding::DefaultFuchsiaResourceDialect,
8594 0x5b88fffb8eda3aa1,
8595 >(_buf?)?;
8596 Ok((_response.s, _response.flags))
8597 }
8598 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
8599 (),
8600 0x5b88fffb8eda3aa1,
8601 fidl::encoding::DynamicFlags::empty(),
8602 _decode,
8603 )
8604 }
8605
8606 type DeprecatedSetFlagsResponseFut =
8607 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8608 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
8609 fn _decode(
8610 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8611 ) -> Result<i32, fidl::Error> {
8612 let _response = fidl::client::decode_transaction_body::<
8613 NodeDeprecatedSetFlagsResponse,
8614 fidl::encoding::DefaultFuchsiaResourceDialect,
8615 0x5295b76c71fde733,
8616 >(_buf?)?;
8617 Ok(_response.s)
8618 }
8619 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
8620 (flags,),
8621 0x5295b76c71fde733,
8622 fidl::encoding::DynamicFlags::empty(),
8623 _decode,
8624 )
8625 }
8626
8627 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
8628 NodeGetFlagsResult,
8629 fidl::encoding::DefaultFuchsiaResourceDialect,
8630 >;
8631 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
8632 fn _decode(
8633 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8634 ) -> Result<NodeGetFlagsResult, fidl::Error> {
8635 let _response = fidl::client::decode_transaction_body::<
8636 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
8637 fidl::encoding::DefaultFuchsiaResourceDialect,
8638 0x176eb318f64ec23,
8639 >(_buf?)?
8640 .into_result::<FileMarker>("get_flags")?;
8641 Ok(_response.map(|x| x.flags))
8642 }
8643 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
8644 (),
8645 0x176eb318f64ec23,
8646 fidl::encoding::DynamicFlags::FLEXIBLE,
8647 _decode,
8648 )
8649 }
8650
8651 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
8652 NodeSetFlagsResult,
8653 fidl::encoding::DefaultFuchsiaResourceDialect,
8654 >;
8655 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
8656 fn _decode(
8657 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8658 ) -> Result<NodeSetFlagsResult, fidl::Error> {
8659 let _response = fidl::client::decode_transaction_body::<
8660 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
8661 fidl::encoding::DefaultFuchsiaResourceDialect,
8662 0x55a8028685791ea8,
8663 >(_buf?)?
8664 .into_result::<FileMarker>("set_flags")?;
8665 Ok(_response.map(|x| x))
8666 }
8667 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
8668 (flags,),
8669 0x55a8028685791ea8,
8670 fidl::encoding::DynamicFlags::FLEXIBLE,
8671 _decode,
8672 )
8673 }
8674
8675 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
8676 (i32, Option<Box<FilesystemInfo>>),
8677 fidl::encoding::DefaultFuchsiaResourceDialect,
8678 >;
8679 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
8680 fn _decode(
8681 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8682 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
8683 let _response = fidl::client::decode_transaction_body::<
8684 NodeQueryFilesystemResponse,
8685 fidl::encoding::DefaultFuchsiaResourceDialect,
8686 0x6f344a1c6b0a0610,
8687 >(_buf?)?;
8688 Ok((_response.s, _response.info))
8689 }
8690 self.client.send_query_and_decode::<
8691 fidl::encoding::EmptyPayload,
8692 (i32, Option<Box<FilesystemInfo>>),
8693 >(
8694 (),
8695 0x6f344a1c6b0a0610,
8696 fidl::encoding::DynamicFlags::empty(),
8697 _decode,
8698 )
8699 }
8700
8701 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
8702 NodeGetAttributesResult,
8703 fidl::encoding::DefaultFuchsiaResourceDialect,
8704 >;
8705 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
8706 fn _decode(
8707 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8708 ) -> Result<NodeGetAttributesResult, fidl::Error> {
8709 let _response = fidl::client::decode_transaction_body::<
8710 fidl::encoding::ResultType<NodeAttributes2, i32>,
8711 fidl::encoding::DefaultFuchsiaResourceDialect,
8712 0x3d4396a638ea053b,
8713 >(_buf?)?;
8714 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
8715 }
8716 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
8717 (query,),
8718 0x3d4396a638ea053b,
8719 fidl::encoding::DynamicFlags::empty(),
8720 _decode,
8721 )
8722 }
8723
8724 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
8725 NodeUpdateAttributesResult,
8726 fidl::encoding::DefaultFuchsiaResourceDialect,
8727 >;
8728 fn r#update_attributes(
8729 &self,
8730 mut payload: &MutableNodeAttributes,
8731 ) -> Self::UpdateAttributesResponseFut {
8732 fn _decode(
8733 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8734 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
8735 let _response = fidl::client::decode_transaction_body::<
8736 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8737 fidl::encoding::DefaultFuchsiaResourceDialect,
8738 0x3308c1da5a89bf08,
8739 >(_buf?)?;
8740 Ok(_response.map(|x| x))
8741 }
8742 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
8743 payload,
8744 0x3308c1da5a89bf08,
8745 fidl::encoding::DynamicFlags::empty(),
8746 _decode,
8747 )
8748 }
8749
8750 type SyncResponseFut = fidl::client::QueryResponseFut<
8751 NodeSyncResult,
8752 fidl::encoding::DefaultFuchsiaResourceDialect,
8753 >;
8754 fn r#sync(&self) -> Self::SyncResponseFut {
8755 fn _decode(
8756 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8757 ) -> Result<NodeSyncResult, fidl::Error> {
8758 let _response = fidl::client::decode_transaction_body::<
8759 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8760 fidl::encoding::DefaultFuchsiaResourceDialect,
8761 0x2c5c27ca0ab5dc49,
8762 >(_buf?)?;
8763 Ok(_response.map(|x| x))
8764 }
8765 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
8766 (),
8767 0x2c5c27ca0ab5dc49,
8768 fidl::encoding::DynamicFlags::empty(),
8769 _decode,
8770 )
8771 }
8772
8773 fn r#list_extended_attributes(
8774 &self,
8775 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8776 ) -> Result<(), fidl::Error> {
8777 self.client.send::<NodeListExtendedAttributesRequest>(
8778 (iterator,),
8779 0x4b61033de007fcd0,
8780 fidl::encoding::DynamicFlags::empty(),
8781 )
8782 }
8783
8784 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8785 NodeGetExtendedAttributeResult,
8786 fidl::encoding::DefaultFuchsiaResourceDialect,
8787 >;
8788 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
8789 fn _decode(
8790 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8791 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
8792 let _response = fidl::client::decode_transaction_body::<
8793 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
8794 fidl::encoding::DefaultFuchsiaResourceDialect,
8795 0x45ffa3ccfdeb76db,
8796 >(_buf?)?;
8797 Ok(_response.map(|x| x))
8798 }
8799 self.client.send_query_and_decode::<
8800 NodeGetExtendedAttributeRequest,
8801 NodeGetExtendedAttributeResult,
8802 >(
8803 (name,),
8804 0x45ffa3ccfdeb76db,
8805 fidl::encoding::DynamicFlags::empty(),
8806 _decode,
8807 )
8808 }
8809
8810 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8811 NodeSetExtendedAttributeResult,
8812 fidl::encoding::DefaultFuchsiaResourceDialect,
8813 >;
8814 fn r#set_extended_attribute(
8815 &self,
8816 mut name: &[u8],
8817 mut value: ExtendedAttributeValue,
8818 mut mode: SetExtendedAttributeMode,
8819 ) -> Self::SetExtendedAttributeResponseFut {
8820 fn _decode(
8821 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8822 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
8823 let _response = fidl::client::decode_transaction_body::<
8824 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8825 fidl::encoding::DefaultFuchsiaResourceDialect,
8826 0x4a951362f681f23c,
8827 >(_buf?)?;
8828 Ok(_response.map(|x| x))
8829 }
8830 self.client.send_query_and_decode::<
8831 NodeSetExtendedAttributeRequest,
8832 NodeSetExtendedAttributeResult,
8833 >(
8834 (name, &mut value, mode,),
8835 0x4a951362f681f23c,
8836 fidl::encoding::DynamicFlags::empty(),
8837 _decode,
8838 )
8839 }
8840
8841 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8842 NodeRemoveExtendedAttributeResult,
8843 fidl::encoding::DefaultFuchsiaResourceDialect,
8844 >;
8845 fn r#remove_extended_attribute(
8846 &self,
8847 mut name: &[u8],
8848 ) -> Self::RemoveExtendedAttributeResponseFut {
8849 fn _decode(
8850 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8851 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
8852 let _response = fidl::client::decode_transaction_body::<
8853 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8854 fidl::encoding::DefaultFuchsiaResourceDialect,
8855 0x7a0b9f3a9bf9032d,
8856 >(_buf?)?;
8857 Ok(_response.map(|x| x))
8858 }
8859 self.client.send_query_and_decode::<
8860 NodeRemoveExtendedAttributeRequest,
8861 NodeRemoveExtendedAttributeResult,
8862 >(
8863 (name,),
8864 0x7a0b9f3a9bf9032d,
8865 fidl::encoding::DynamicFlags::empty(),
8866 _decode,
8867 )
8868 }
8869
8870 type ReadResponseFut = fidl::client::QueryResponseFut<
8871 ReadableReadResult,
8872 fidl::encoding::DefaultFuchsiaResourceDialect,
8873 >;
8874 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
8875 fn _decode(
8876 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8877 ) -> Result<ReadableReadResult, fidl::Error> {
8878 let _response = fidl::client::decode_transaction_body::<
8879 fidl::encoding::ResultType<ReadableReadResponse, i32>,
8880 fidl::encoding::DefaultFuchsiaResourceDialect,
8881 0x57e419a298c8ede,
8882 >(_buf?)?;
8883 Ok(_response.map(|x| x.data))
8884 }
8885 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
8886 (count,),
8887 0x57e419a298c8ede,
8888 fidl::encoding::DynamicFlags::empty(),
8889 _decode,
8890 )
8891 }
8892
8893 type WriteResponseFut = fidl::client::QueryResponseFut<
8894 WritableWriteResult,
8895 fidl::encoding::DefaultFuchsiaResourceDialect,
8896 >;
8897 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
8898 fn _decode(
8899 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8900 ) -> Result<WritableWriteResult, fidl::Error> {
8901 let _response = fidl::client::decode_transaction_body::<
8902 fidl::encoding::ResultType<WritableWriteResponse, i32>,
8903 fidl::encoding::DefaultFuchsiaResourceDialect,
8904 0x6a31437832469f82,
8905 >(_buf?)?;
8906 Ok(_response.map(|x| x.actual_count))
8907 }
8908 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
8909 (data,),
8910 0x6a31437832469f82,
8911 fidl::encoding::DynamicFlags::empty(),
8912 _decode,
8913 )
8914 }
8915
8916 type DescribeResponseFut =
8917 fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
8918 fn r#describe(&self) -> Self::DescribeResponseFut {
8919 fn _decode(
8920 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8921 ) -> Result<FileInfo, fidl::Error> {
8922 let _response = fidl::client::decode_transaction_body::<
8923 FileInfo,
8924 fidl::encoding::DefaultFuchsiaResourceDialect,
8925 0x68b5ac00c62906bc,
8926 >(_buf?)?;
8927 Ok(_response)
8928 }
8929 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
8930 (),
8931 0x68b5ac00c62906bc,
8932 fidl::encoding::DynamicFlags::empty(),
8933 _decode,
8934 )
8935 }
8936
8937 type SeekResponseFut = fidl::client::QueryResponseFut<
8938 FileSeekResult,
8939 fidl::encoding::DefaultFuchsiaResourceDialect,
8940 >;
8941 fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
8942 fn _decode(
8943 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8944 ) -> Result<FileSeekResult, fidl::Error> {
8945 let _response = fidl::client::decode_transaction_body::<
8946 fidl::encoding::ResultType<FileSeekResponse, i32>,
8947 fidl::encoding::DefaultFuchsiaResourceDialect,
8948 0x78079168162c5207,
8949 >(_buf?)?;
8950 Ok(_response.map(|x| x.offset_from_start))
8951 }
8952 self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
8953 (origin, offset),
8954 0x78079168162c5207,
8955 fidl::encoding::DynamicFlags::empty(),
8956 _decode,
8957 )
8958 }
8959
8960 type ReadAtResponseFut = fidl::client::QueryResponseFut<
8961 FileReadAtResult,
8962 fidl::encoding::DefaultFuchsiaResourceDialect,
8963 >;
8964 fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
8965 fn _decode(
8966 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8967 ) -> Result<FileReadAtResult, fidl::Error> {
8968 let _response = fidl::client::decode_transaction_body::<
8969 fidl::encoding::ResultType<FileReadAtResponse, i32>,
8970 fidl::encoding::DefaultFuchsiaResourceDialect,
8971 0x1607a293a60d723e,
8972 >(_buf?)?;
8973 Ok(_response.map(|x| x.data))
8974 }
8975 self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
8976 (count, offset),
8977 0x1607a293a60d723e,
8978 fidl::encoding::DynamicFlags::empty(),
8979 _decode,
8980 )
8981 }
8982
8983 type WriteAtResponseFut = fidl::client::QueryResponseFut<
8984 FileWriteAtResult,
8985 fidl::encoding::DefaultFuchsiaResourceDialect,
8986 >;
8987 fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
8988 fn _decode(
8989 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8990 ) -> Result<FileWriteAtResult, fidl::Error> {
8991 let _response = fidl::client::decode_transaction_body::<
8992 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
8993 fidl::encoding::DefaultFuchsiaResourceDialect,
8994 0x793eefc0045e792b,
8995 >(_buf?)?;
8996 Ok(_response.map(|x| x.actual_count))
8997 }
8998 self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
8999 (data, offset),
9000 0x793eefc0045e792b,
9001 fidl::encoding::DynamicFlags::empty(),
9002 _decode,
9003 )
9004 }
9005
9006 type ResizeResponseFut = fidl::client::QueryResponseFut<
9007 FileResizeResult,
9008 fidl::encoding::DefaultFuchsiaResourceDialect,
9009 >;
9010 fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
9011 fn _decode(
9012 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9013 ) -> Result<FileResizeResult, fidl::Error> {
9014 let _response = fidl::client::decode_transaction_body::<
9015 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
9016 fidl::encoding::DefaultFuchsiaResourceDialect,
9017 0x2b80825f0535743a,
9018 >(_buf?)?;
9019 Ok(_response.map(|x| x))
9020 }
9021 self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
9022 (length,),
9023 0x2b80825f0535743a,
9024 fidl::encoding::DynamicFlags::empty(),
9025 _decode,
9026 )
9027 }
9028
9029 type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
9030 FileGetBackingMemoryResult,
9031 fidl::encoding::DefaultFuchsiaResourceDialect,
9032 >;
9033 fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
9034 fn _decode(
9035 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9036 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
9037 let _response = fidl::client::decode_transaction_body::<
9038 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
9039 fidl::encoding::DefaultFuchsiaResourceDialect,
9040 0xa6a9e654cbf62b,
9041 >(_buf?)?;
9042 Ok(_response.map(|x| x.vmo))
9043 }
9044 self.client
9045 .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
9046 (flags,),
9047 0xa6a9e654cbf62b,
9048 fidl::encoding::DynamicFlags::empty(),
9049 _decode,
9050 )
9051 }
9052
9053 type AllocateResponseFut = fidl::client::QueryResponseFut<
9054 FileAllocateResult,
9055 fidl::encoding::DefaultFuchsiaResourceDialect,
9056 >;
9057 fn r#allocate(
9058 &self,
9059 mut offset: u64,
9060 mut length: u64,
9061 mut mode: AllocateMode,
9062 ) -> Self::AllocateResponseFut {
9063 fn _decode(
9064 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9065 ) -> Result<FileAllocateResult, fidl::Error> {
9066 let _response = fidl::client::decode_transaction_body::<
9067 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
9068 fidl::encoding::DefaultFuchsiaResourceDialect,
9069 0x77fa0c330b57fd2e,
9070 >(_buf?)?
9071 .into_result::<FileMarker>("allocate")?;
9072 Ok(_response.map(|x| x))
9073 }
9074 self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
9075 (offset, length, mode),
9076 0x77fa0c330b57fd2e,
9077 fidl::encoding::DynamicFlags::FLEXIBLE,
9078 _decode,
9079 )
9080 }
9081
9082 type EnableVerityResponseFut = fidl::client::QueryResponseFut<
9083 FileEnableVerityResult,
9084 fidl::encoding::DefaultFuchsiaResourceDialect,
9085 >;
9086 fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
9087 fn _decode(
9088 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9089 ) -> Result<FileEnableVerityResult, fidl::Error> {
9090 let _response = fidl::client::decode_transaction_body::<
9091 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
9092 fidl::encoding::DefaultFuchsiaResourceDialect,
9093 0x2c421ec3faaeb8bb,
9094 >(_buf?)?
9095 .into_result::<FileMarker>("enable_verity")?;
9096 Ok(_response.map(|x| x))
9097 }
9098 self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
9099 (options,),
9100 0x2c421ec3faaeb8bb,
9101 fidl::encoding::DynamicFlags::FLEXIBLE,
9102 _decode,
9103 )
9104 }
9105}
9106
9107pub struct FileEventStream {
9108 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9109}
9110
9111impl std::marker::Unpin for FileEventStream {}
9112
9113impl futures::stream::FusedStream for FileEventStream {
9114 fn is_terminated(&self) -> bool {
9115 self.event_receiver.is_terminated()
9116 }
9117}
9118
9119impl futures::Stream for FileEventStream {
9120 type Item = Result<FileEvent, fidl::Error>;
9121
9122 fn poll_next(
9123 mut self: std::pin::Pin<&mut Self>,
9124 cx: &mut std::task::Context<'_>,
9125 ) -> std::task::Poll<Option<Self::Item>> {
9126 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9127 &mut self.event_receiver,
9128 cx
9129 )?) {
9130 Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
9131 None => std::task::Poll::Ready(None),
9132 }
9133 }
9134}
9135
9136#[derive(Debug)]
9137pub enum FileEvent {
9138 OnOpen_ {
9139 s: i32,
9140 info: Option<Box<NodeInfoDeprecated>>,
9141 },
9142 OnRepresentation {
9143 payload: Representation,
9144 },
9145 #[non_exhaustive]
9146 _UnknownEvent {
9147 ordinal: u64,
9149 },
9150}
9151
9152impl FileEvent {
9153 #[allow(irrefutable_let_patterns)]
9154 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
9155 if let FileEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
9156 }
9157 #[allow(irrefutable_let_patterns)]
9158 pub fn into_on_representation(self) -> Option<Representation> {
9159 if let FileEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
9160 }
9161
9162 fn decode(
9164 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9165 ) -> Result<FileEvent, fidl::Error> {
9166 let (bytes, _handles) = buf.split_mut();
9167 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9168 debug_assert_eq!(tx_header.tx_id, 0);
9169 match tx_header.ordinal {
9170 0x7fc7bbb1dbfd1972 => {
9171 let mut out = fidl::new_empty!(
9172 NodeOnOpenRequest,
9173 fidl::encoding::DefaultFuchsiaResourceDialect
9174 );
9175 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
9176 Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
9177 }
9178 0x5cb40567d80a510c => {
9179 let mut out =
9180 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
9181 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
9182 Ok((FileEvent::OnRepresentation { payload: out }))
9183 }
9184 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
9185 Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
9186 }
9187 _ => Err(fidl::Error::UnknownOrdinal {
9188 ordinal: tx_header.ordinal,
9189 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9190 }),
9191 }
9192 }
9193}
9194
9195pub struct FileRequestStream {
9197 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9198 is_terminated: bool,
9199}
9200
9201impl std::marker::Unpin for FileRequestStream {}
9202
9203impl futures::stream::FusedStream for FileRequestStream {
9204 fn is_terminated(&self) -> bool {
9205 self.is_terminated
9206 }
9207}
9208
9209impl fidl::endpoints::RequestStream for FileRequestStream {
9210 type Protocol = FileMarker;
9211 type ControlHandle = FileControlHandle;
9212
9213 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9214 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9215 }
9216
9217 fn control_handle(&self) -> Self::ControlHandle {
9218 FileControlHandle { inner: self.inner.clone() }
9219 }
9220
9221 fn into_inner(
9222 self,
9223 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9224 {
9225 (self.inner, self.is_terminated)
9226 }
9227
9228 fn from_inner(
9229 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9230 is_terminated: bool,
9231 ) -> Self {
9232 Self { inner, is_terminated }
9233 }
9234}
9235
9236impl futures::Stream for FileRequestStream {
9237 type Item = Result<FileRequest, fidl::Error>;
9238
9239 fn poll_next(
9240 mut self: std::pin::Pin<&mut Self>,
9241 cx: &mut std::task::Context<'_>,
9242 ) -> std::task::Poll<Option<Self::Item>> {
9243 let this = &mut *self;
9244 if this.inner.check_shutdown(cx) {
9245 this.is_terminated = true;
9246 return std::task::Poll::Ready(None);
9247 }
9248 if this.is_terminated {
9249 panic!("polled FileRequestStream after completion");
9250 }
9251 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9252 |bytes, handles| {
9253 match this.inner.channel().read_etc(cx, bytes, handles) {
9254 std::task::Poll::Ready(Ok(())) => {}
9255 std::task::Poll::Pending => return std::task::Poll::Pending,
9256 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9257 this.is_terminated = true;
9258 return std::task::Poll::Ready(None);
9259 }
9260 std::task::Poll::Ready(Err(e)) => {
9261 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9262 e.into(),
9263 ))));
9264 }
9265 }
9266
9267 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9269
9270 std::task::Poll::Ready(Some(match header.ordinal {
9271 0x6ee9c0ad53ec87aa => {
9272 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9273 let mut req = fidl::new_empty!(
9274 AdvisoryLockingAdvisoryLockRequest,
9275 fidl::encoding::DefaultFuchsiaResourceDialect
9276 );
9277 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
9278 let control_handle = FileControlHandle { inner: this.inner.clone() };
9279 Ok(FileRequest::AdvisoryLock {
9280 request: req.request,
9281
9282 responder: FileAdvisoryLockResponder {
9283 control_handle: std::mem::ManuallyDrop::new(control_handle),
9284 tx_id: header.tx_id,
9285 },
9286 })
9287 }
9288 0x54f3949246a03e74 => {
9289 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9290 let mut req = fidl::new_empty!(
9291 LinkableLinkIntoRequest,
9292 fidl::encoding::DefaultFuchsiaResourceDialect
9293 );
9294 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
9295 let control_handle = FileControlHandle { inner: this.inner.clone() };
9296 Ok(FileRequest::LinkInto {
9297 dst_parent_token: req.dst_parent_token,
9298 dst: req.dst,
9299
9300 responder: FileLinkIntoResponder {
9301 control_handle: std::mem::ManuallyDrop::new(control_handle),
9302 tx_id: header.tx_id,
9303 },
9304 })
9305 }
9306 0x20d8a7aba2168a79 => {
9307 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9308 let mut req = fidl::new_empty!(
9309 fidl_fuchsia_unknown::CloneableCloneRequest,
9310 fidl::encoding::DefaultFuchsiaResourceDialect
9311 );
9312 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
9313 let control_handle = FileControlHandle { inner: this.inner.clone() };
9314 Ok(FileRequest::Clone { request: req.request, control_handle })
9315 }
9316 0x5ac5d459ad7f657e => {
9317 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9318 let mut req = fidl::new_empty!(
9319 fidl::encoding::EmptyPayload,
9320 fidl::encoding::DefaultFuchsiaResourceDialect
9321 );
9322 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9323 let control_handle = FileControlHandle { inner: this.inner.clone() };
9324 Ok(FileRequest::Close {
9325 responder: FileCloseResponder {
9326 control_handle: std::mem::ManuallyDrop::new(control_handle),
9327 tx_id: header.tx_id,
9328 },
9329 })
9330 }
9331 0x2658edee9decfc06 => {
9332 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9333 let mut req = fidl::new_empty!(
9334 fidl::encoding::EmptyPayload,
9335 fidl::encoding::DefaultFuchsiaResourceDialect
9336 );
9337 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9338 let control_handle = FileControlHandle { inner: this.inner.clone() };
9339 Ok(FileRequest::Query {
9340 responder: FileQueryResponder {
9341 control_handle: std::mem::ManuallyDrop::new(control_handle),
9342 tx_id: header.tx_id,
9343 },
9344 })
9345 }
9346 0x5a61678f293ce16f => {
9347 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9348 let mut req = fidl::new_empty!(
9349 NodeDeprecatedCloneRequest,
9350 fidl::encoding::DefaultFuchsiaResourceDialect
9351 );
9352 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
9353 let control_handle = FileControlHandle { inner: this.inner.clone() };
9354 Ok(FileRequest::DeprecatedClone {
9355 flags: req.flags,
9356 object: req.object,
9357
9358 control_handle,
9359 })
9360 }
9361 0x78985e216314dafd => {
9362 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9363 let mut req = fidl::new_empty!(
9364 fidl::encoding::EmptyPayload,
9365 fidl::encoding::DefaultFuchsiaResourceDialect
9366 );
9367 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9368 let control_handle = FileControlHandle { inner: this.inner.clone() };
9369 Ok(FileRequest::DeprecatedGetAttr {
9370 responder: FileDeprecatedGetAttrResponder {
9371 control_handle: std::mem::ManuallyDrop::new(control_handle),
9372 tx_id: header.tx_id,
9373 },
9374 })
9375 }
9376 0x4186c0f40d938f46 => {
9377 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9378 let mut req = fidl::new_empty!(
9379 NodeDeprecatedSetAttrRequest,
9380 fidl::encoding::DefaultFuchsiaResourceDialect
9381 );
9382 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
9383 let control_handle = FileControlHandle { inner: this.inner.clone() };
9384 Ok(FileRequest::DeprecatedSetAttr {
9385 flags: req.flags,
9386 attributes: req.attributes,
9387
9388 responder: FileDeprecatedSetAttrResponder {
9389 control_handle: std::mem::ManuallyDrop::new(control_handle),
9390 tx_id: header.tx_id,
9391 },
9392 })
9393 }
9394 0x5b88fffb8eda3aa1 => {
9395 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9396 let mut req = fidl::new_empty!(
9397 fidl::encoding::EmptyPayload,
9398 fidl::encoding::DefaultFuchsiaResourceDialect
9399 );
9400 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9401 let control_handle = FileControlHandle { inner: this.inner.clone() };
9402 Ok(FileRequest::DeprecatedGetFlags {
9403 responder: FileDeprecatedGetFlagsResponder {
9404 control_handle: std::mem::ManuallyDrop::new(control_handle),
9405 tx_id: header.tx_id,
9406 },
9407 })
9408 }
9409 0x5295b76c71fde733 => {
9410 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9411 let mut req = fidl::new_empty!(
9412 NodeDeprecatedSetFlagsRequest,
9413 fidl::encoding::DefaultFuchsiaResourceDialect
9414 );
9415 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9416 let control_handle = FileControlHandle { inner: this.inner.clone() };
9417 Ok(FileRequest::DeprecatedSetFlags {
9418 flags: req.flags,
9419
9420 responder: FileDeprecatedSetFlagsResponder {
9421 control_handle: std::mem::ManuallyDrop::new(control_handle),
9422 tx_id: header.tx_id,
9423 },
9424 })
9425 }
9426 0x176eb318f64ec23 => {
9427 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9428 let mut req = fidl::new_empty!(
9429 fidl::encoding::EmptyPayload,
9430 fidl::encoding::DefaultFuchsiaResourceDialect
9431 );
9432 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9433 let control_handle = FileControlHandle { inner: this.inner.clone() };
9434 Ok(FileRequest::GetFlags {
9435 responder: FileGetFlagsResponder {
9436 control_handle: std::mem::ManuallyDrop::new(control_handle),
9437 tx_id: header.tx_id,
9438 },
9439 })
9440 }
9441 0x55a8028685791ea8 => {
9442 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9443 let mut req = fidl::new_empty!(
9444 NodeSetFlagsRequest,
9445 fidl::encoding::DefaultFuchsiaResourceDialect
9446 );
9447 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9448 let control_handle = FileControlHandle { inner: this.inner.clone() };
9449 Ok(FileRequest::SetFlags {
9450 flags: req.flags,
9451
9452 responder: FileSetFlagsResponder {
9453 control_handle: std::mem::ManuallyDrop::new(control_handle),
9454 tx_id: header.tx_id,
9455 },
9456 })
9457 }
9458 0x6f344a1c6b0a0610 => {
9459 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9460 let mut req = fidl::new_empty!(
9461 fidl::encoding::EmptyPayload,
9462 fidl::encoding::DefaultFuchsiaResourceDialect
9463 );
9464 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9465 let control_handle = FileControlHandle { inner: this.inner.clone() };
9466 Ok(FileRequest::QueryFilesystem {
9467 responder: FileQueryFilesystemResponder {
9468 control_handle: std::mem::ManuallyDrop::new(control_handle),
9469 tx_id: header.tx_id,
9470 },
9471 })
9472 }
9473 0x3d4396a638ea053b => {
9474 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9475 let mut req = fidl::new_empty!(
9476 NodeGetAttributesRequest,
9477 fidl::encoding::DefaultFuchsiaResourceDialect
9478 );
9479 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9480 let control_handle = FileControlHandle { inner: this.inner.clone() };
9481 Ok(FileRequest::GetAttributes {
9482 query: req.query,
9483
9484 responder: FileGetAttributesResponder {
9485 control_handle: std::mem::ManuallyDrop::new(control_handle),
9486 tx_id: header.tx_id,
9487 },
9488 })
9489 }
9490 0x3308c1da5a89bf08 => {
9491 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9492 let mut req = fidl::new_empty!(
9493 MutableNodeAttributes,
9494 fidl::encoding::DefaultFuchsiaResourceDialect
9495 );
9496 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
9497 let control_handle = FileControlHandle { inner: this.inner.clone() };
9498 Ok(FileRequest::UpdateAttributes {
9499 payload: req,
9500 responder: FileUpdateAttributesResponder {
9501 control_handle: std::mem::ManuallyDrop::new(control_handle),
9502 tx_id: header.tx_id,
9503 },
9504 })
9505 }
9506 0x2c5c27ca0ab5dc49 => {
9507 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9508 let mut req = fidl::new_empty!(
9509 fidl::encoding::EmptyPayload,
9510 fidl::encoding::DefaultFuchsiaResourceDialect
9511 );
9512 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9513 let control_handle = FileControlHandle { inner: this.inner.clone() };
9514 Ok(FileRequest::Sync {
9515 responder: FileSyncResponder {
9516 control_handle: std::mem::ManuallyDrop::new(control_handle),
9517 tx_id: header.tx_id,
9518 },
9519 })
9520 }
9521 0x4b61033de007fcd0 => {
9522 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9523 let mut req = fidl::new_empty!(
9524 NodeListExtendedAttributesRequest,
9525 fidl::encoding::DefaultFuchsiaResourceDialect
9526 );
9527 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9528 let control_handle = FileControlHandle { inner: this.inner.clone() };
9529 Ok(FileRequest::ListExtendedAttributes {
9530 iterator: req.iterator,
9531
9532 control_handle,
9533 })
9534 }
9535 0x45ffa3ccfdeb76db => {
9536 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9537 let mut req = fidl::new_empty!(
9538 NodeGetExtendedAttributeRequest,
9539 fidl::encoding::DefaultFuchsiaResourceDialect
9540 );
9541 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9542 let control_handle = FileControlHandle { inner: this.inner.clone() };
9543 Ok(FileRequest::GetExtendedAttribute {
9544 name: req.name,
9545
9546 responder: FileGetExtendedAttributeResponder {
9547 control_handle: std::mem::ManuallyDrop::new(control_handle),
9548 tx_id: header.tx_id,
9549 },
9550 })
9551 }
9552 0x4a951362f681f23c => {
9553 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9554 let mut req = fidl::new_empty!(
9555 NodeSetExtendedAttributeRequest,
9556 fidl::encoding::DefaultFuchsiaResourceDialect
9557 );
9558 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9559 let control_handle = FileControlHandle { inner: this.inner.clone() };
9560 Ok(FileRequest::SetExtendedAttribute {
9561 name: req.name,
9562 value: req.value,
9563 mode: req.mode,
9564
9565 responder: FileSetExtendedAttributeResponder {
9566 control_handle: std::mem::ManuallyDrop::new(control_handle),
9567 tx_id: header.tx_id,
9568 },
9569 })
9570 }
9571 0x7a0b9f3a9bf9032d => {
9572 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9573 let mut req = fidl::new_empty!(
9574 NodeRemoveExtendedAttributeRequest,
9575 fidl::encoding::DefaultFuchsiaResourceDialect
9576 );
9577 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9578 let control_handle = FileControlHandle { inner: this.inner.clone() };
9579 Ok(FileRequest::RemoveExtendedAttribute {
9580 name: req.name,
9581
9582 responder: FileRemoveExtendedAttributeResponder {
9583 control_handle: std::mem::ManuallyDrop::new(control_handle),
9584 tx_id: header.tx_id,
9585 },
9586 })
9587 }
9588 0x57e419a298c8ede => {
9589 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9590 let mut req = fidl::new_empty!(
9591 ReadableReadRequest,
9592 fidl::encoding::DefaultFuchsiaResourceDialect
9593 );
9594 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
9595 let control_handle = FileControlHandle { inner: this.inner.clone() };
9596 Ok(FileRequest::Read {
9597 count: req.count,
9598
9599 responder: FileReadResponder {
9600 control_handle: std::mem::ManuallyDrop::new(control_handle),
9601 tx_id: header.tx_id,
9602 },
9603 })
9604 }
9605 0x6a31437832469f82 => {
9606 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9607 let mut req = fidl::new_empty!(
9608 WritableWriteRequest,
9609 fidl::encoding::DefaultFuchsiaResourceDialect
9610 );
9611 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
9612 let control_handle = FileControlHandle { inner: this.inner.clone() };
9613 Ok(FileRequest::Write {
9614 data: req.data,
9615
9616 responder: FileWriteResponder {
9617 control_handle: std::mem::ManuallyDrop::new(control_handle),
9618 tx_id: header.tx_id,
9619 },
9620 })
9621 }
9622 0x68b5ac00c62906bc => {
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::Describe {
9631 responder: FileDescribeResponder {
9632 control_handle: std::mem::ManuallyDrop::new(control_handle),
9633 tx_id: header.tx_id,
9634 },
9635 })
9636 }
9637 0x78079168162c5207 => {
9638 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9639 let mut req = fidl::new_empty!(
9640 FileSeekRequest,
9641 fidl::encoding::DefaultFuchsiaResourceDialect
9642 );
9643 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
9644 let control_handle = FileControlHandle { inner: this.inner.clone() };
9645 Ok(FileRequest::Seek {
9646 origin: req.origin,
9647 offset: req.offset,
9648
9649 responder: FileSeekResponder {
9650 control_handle: std::mem::ManuallyDrop::new(control_handle),
9651 tx_id: header.tx_id,
9652 },
9653 })
9654 }
9655 0x1607a293a60d723e => {
9656 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9657 let mut req = fidl::new_empty!(
9658 FileReadAtRequest,
9659 fidl::encoding::DefaultFuchsiaResourceDialect
9660 );
9661 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
9662 let control_handle = FileControlHandle { inner: this.inner.clone() };
9663 Ok(FileRequest::ReadAt {
9664 count: req.count,
9665 offset: req.offset,
9666
9667 responder: FileReadAtResponder {
9668 control_handle: std::mem::ManuallyDrop::new(control_handle),
9669 tx_id: header.tx_id,
9670 },
9671 })
9672 }
9673 0x793eefc0045e792b => {
9674 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9675 let mut req = fidl::new_empty!(
9676 FileWriteAtRequest,
9677 fidl::encoding::DefaultFuchsiaResourceDialect
9678 );
9679 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
9680 let control_handle = FileControlHandle { inner: this.inner.clone() };
9681 Ok(FileRequest::WriteAt {
9682 data: req.data,
9683 offset: req.offset,
9684
9685 responder: FileWriteAtResponder {
9686 control_handle: std::mem::ManuallyDrop::new(control_handle),
9687 tx_id: header.tx_id,
9688 },
9689 })
9690 }
9691 0x2b80825f0535743a => {
9692 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9693 let mut req = fidl::new_empty!(
9694 FileResizeRequest,
9695 fidl::encoding::DefaultFuchsiaResourceDialect
9696 );
9697 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
9698 let control_handle = FileControlHandle { inner: this.inner.clone() };
9699 Ok(FileRequest::Resize {
9700 length: req.length,
9701
9702 responder: FileResizeResponder {
9703 control_handle: std::mem::ManuallyDrop::new(control_handle),
9704 tx_id: header.tx_id,
9705 },
9706 })
9707 }
9708 0xa6a9e654cbf62b => {
9709 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9710 let mut req = fidl::new_empty!(
9711 FileGetBackingMemoryRequest,
9712 fidl::encoding::DefaultFuchsiaResourceDialect
9713 );
9714 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
9715 let control_handle = FileControlHandle { inner: this.inner.clone() };
9716 Ok(FileRequest::GetBackingMemory {
9717 flags: req.flags,
9718
9719 responder: FileGetBackingMemoryResponder {
9720 control_handle: std::mem::ManuallyDrop::new(control_handle),
9721 tx_id: header.tx_id,
9722 },
9723 })
9724 }
9725 0x77fa0c330b57fd2e => {
9726 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9727 let mut req = fidl::new_empty!(
9728 FileAllocateRequest,
9729 fidl::encoding::DefaultFuchsiaResourceDialect
9730 );
9731 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
9732 let control_handle = FileControlHandle { inner: this.inner.clone() };
9733 Ok(FileRequest::Allocate {
9734 offset: req.offset,
9735 length: req.length,
9736 mode: req.mode,
9737
9738 responder: FileAllocateResponder {
9739 control_handle: std::mem::ManuallyDrop::new(control_handle),
9740 tx_id: header.tx_id,
9741 },
9742 })
9743 }
9744 0x2c421ec3faaeb8bb => {
9745 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9746 let mut req = fidl::new_empty!(
9747 FileEnableVerityRequest,
9748 fidl::encoding::DefaultFuchsiaResourceDialect
9749 );
9750 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
9751 let control_handle = FileControlHandle { inner: this.inner.clone() };
9752 Ok(FileRequest::EnableVerity {
9753 options: req.options,
9754
9755 responder: FileEnableVerityResponder {
9756 control_handle: std::mem::ManuallyDrop::new(control_handle),
9757 tx_id: header.tx_id,
9758 },
9759 })
9760 }
9761 _ if header.tx_id == 0
9762 && header
9763 .dynamic_flags()
9764 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9765 {
9766 Ok(FileRequest::_UnknownMethod {
9767 ordinal: header.ordinal,
9768 control_handle: FileControlHandle { inner: this.inner.clone() },
9769 method_type: fidl::MethodType::OneWay,
9770 })
9771 }
9772 _ if header
9773 .dynamic_flags()
9774 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9775 {
9776 this.inner.send_framework_err(
9777 fidl::encoding::FrameworkErr::UnknownMethod,
9778 header.tx_id,
9779 header.ordinal,
9780 header.dynamic_flags(),
9781 (bytes, handles),
9782 )?;
9783 Ok(FileRequest::_UnknownMethod {
9784 ordinal: header.ordinal,
9785 control_handle: FileControlHandle { inner: this.inner.clone() },
9786 method_type: fidl::MethodType::TwoWay,
9787 })
9788 }
9789 _ => Err(fidl::Error::UnknownOrdinal {
9790 ordinal: header.ordinal,
9791 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9792 }),
9793 }))
9794 },
9795 )
9796 }
9797}
9798
9799#[derive(Debug)]
9804pub enum FileRequest {
9805 AdvisoryLock {
9829 request: AdvisoryLockRequest,
9830 responder: FileAdvisoryLockResponder,
9831 },
9832 LinkInto {
9855 dst_parent_token: fidl::Event,
9856 dst: String,
9857 responder: FileLinkIntoResponder,
9858 },
9859 Clone {
9860 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
9861 control_handle: FileControlHandle,
9862 },
9863 Close {
9874 responder: FileCloseResponder,
9875 },
9876 Query {
9877 responder: FileQueryResponder,
9878 },
9879 DeprecatedClone {
9881 flags: OpenFlags,
9882 object: fidl::endpoints::ServerEnd<NodeMarker>,
9883 control_handle: FileControlHandle,
9884 },
9885 DeprecatedGetAttr {
9887 responder: FileDeprecatedGetAttrResponder,
9888 },
9889 DeprecatedSetAttr {
9891 flags: NodeAttributeFlags,
9892 attributes: NodeAttributes,
9893 responder: FileDeprecatedSetAttrResponder,
9894 },
9895 DeprecatedGetFlags {
9897 responder: FileDeprecatedGetFlagsResponder,
9898 },
9899 DeprecatedSetFlags {
9901 flags: OpenFlags,
9902 responder: FileDeprecatedSetFlagsResponder,
9903 },
9904 GetFlags {
9913 responder: FileGetFlagsResponder,
9914 },
9915 SetFlags {
9925 flags: Flags,
9926 responder: FileSetFlagsResponder,
9927 },
9928 QueryFilesystem {
9932 responder: FileQueryFilesystemResponder,
9933 },
9934 GetAttributes {
9948 query: NodeAttributesQuery,
9949 responder: FileGetAttributesResponder,
9950 },
9951 UpdateAttributes {
9960 payload: MutableNodeAttributes,
9961 responder: FileUpdateAttributesResponder,
9962 },
9963 Sync {
9973 responder: FileSyncResponder,
9974 },
9975 ListExtendedAttributes {
9984 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
9985 control_handle: FileControlHandle,
9986 },
9987 GetExtendedAttribute {
9994 name: Vec<u8>,
9995 responder: FileGetExtendedAttributeResponder,
9996 },
9997 SetExtendedAttribute {
10005 name: Vec<u8>,
10006 value: ExtendedAttributeValue,
10007 mode: SetExtendedAttributeMode,
10008 responder: FileSetExtendedAttributeResponder,
10009 },
10010 RemoveExtendedAttribute {
10016 name: Vec<u8>,
10017 responder: FileRemoveExtendedAttributeResponder,
10018 },
10019 Read {
10038 count: u64,
10039 responder: FileReadResponder,
10040 },
10041 Write {
10065 data: Vec<u8>,
10066 responder: FileWriteResponder,
10067 },
10068 Describe {
10069 responder: FileDescribeResponder,
10070 },
10071 Seek {
10081 origin: SeekOrigin,
10082 offset: i64,
10083 responder: FileSeekResponder,
10084 },
10085 ReadAt {
10103 count: u64,
10104 offset: u64,
10105 responder: FileReadAtResponder,
10106 },
10107 WriteAt {
10129 data: Vec<u8>,
10130 offset: u64,
10131 responder: FileWriteAtResponder,
10132 },
10133 Resize {
10142 length: u64,
10143 responder: FileResizeResponder,
10144 },
10145 GetBackingMemory {
10166 flags: VmoFlags,
10167 responder: FileGetBackingMemoryResponder,
10168 },
10169 Allocate {
10171 offset: u64,
10172 length: u64,
10173 mode: AllocateMode,
10174 responder: FileAllocateResponder,
10175 },
10176 EnableVerity {
10188 options: VerificationOptions,
10189 responder: FileEnableVerityResponder,
10190 },
10191 #[non_exhaustive]
10193 _UnknownMethod {
10194 ordinal: u64,
10196 control_handle: FileControlHandle,
10197 method_type: fidl::MethodType,
10198 },
10199}
10200
10201impl FileRequest {
10202 #[allow(irrefutable_let_patterns)]
10203 pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
10204 if let FileRequest::AdvisoryLock { request, responder } = self {
10205 Some((request, responder))
10206 } else {
10207 None
10208 }
10209 }
10210
10211 #[allow(irrefutable_let_patterns)]
10212 pub fn into_link_into(self) -> Option<(fidl::Event, String, FileLinkIntoResponder)> {
10213 if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
10214 Some((dst_parent_token, dst, responder))
10215 } else {
10216 None
10217 }
10218 }
10219
10220 #[allow(irrefutable_let_patterns)]
10221 pub fn into_clone(
10222 self,
10223 ) -> Option<(
10224 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
10225 FileControlHandle,
10226 )> {
10227 if let FileRequest::Clone { request, control_handle } = self {
10228 Some((request, control_handle))
10229 } else {
10230 None
10231 }
10232 }
10233
10234 #[allow(irrefutable_let_patterns)]
10235 pub fn into_close(self) -> Option<(FileCloseResponder)> {
10236 if let FileRequest::Close { responder } = self { Some((responder)) } else { None }
10237 }
10238
10239 #[allow(irrefutable_let_patterns)]
10240 pub fn into_query(self) -> Option<(FileQueryResponder)> {
10241 if let FileRequest::Query { responder } = self { Some((responder)) } else { None }
10242 }
10243
10244 #[allow(irrefutable_let_patterns)]
10245 pub fn into_deprecated_clone(
10246 self,
10247 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, FileControlHandle)> {
10248 if let FileRequest::DeprecatedClone { flags, object, control_handle } = self {
10249 Some((flags, object, control_handle))
10250 } else {
10251 None
10252 }
10253 }
10254
10255 #[allow(irrefutable_let_patterns)]
10256 pub fn into_deprecated_get_attr(self) -> Option<(FileDeprecatedGetAttrResponder)> {
10257 if let FileRequest::DeprecatedGetAttr { responder } = self {
10258 Some((responder))
10259 } else {
10260 None
10261 }
10262 }
10263
10264 #[allow(irrefutable_let_patterns)]
10265 pub fn into_deprecated_set_attr(
10266 self,
10267 ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
10268 if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
10269 Some((flags, attributes, responder))
10270 } else {
10271 None
10272 }
10273 }
10274
10275 #[allow(irrefutable_let_patterns)]
10276 pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
10277 if let FileRequest::DeprecatedGetFlags { responder } = self {
10278 Some((responder))
10279 } else {
10280 None
10281 }
10282 }
10283
10284 #[allow(irrefutable_let_patterns)]
10285 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
10286 if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
10287 Some((flags, responder))
10288 } else {
10289 None
10290 }
10291 }
10292
10293 #[allow(irrefutable_let_patterns)]
10294 pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
10295 if let FileRequest::GetFlags { responder } = self { Some((responder)) } else { None }
10296 }
10297
10298 #[allow(irrefutable_let_patterns)]
10299 pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
10300 if let FileRequest::SetFlags { flags, responder } = self {
10301 Some((flags, responder))
10302 } else {
10303 None
10304 }
10305 }
10306
10307 #[allow(irrefutable_let_patterns)]
10308 pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
10309 if let FileRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
10310 }
10311
10312 #[allow(irrefutable_let_patterns)]
10313 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
10314 if let FileRequest::GetAttributes { query, responder } = self {
10315 Some((query, responder))
10316 } else {
10317 None
10318 }
10319 }
10320
10321 #[allow(irrefutable_let_patterns)]
10322 pub fn into_update_attributes(
10323 self,
10324 ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
10325 if let FileRequest::UpdateAttributes { payload, responder } = self {
10326 Some((payload, responder))
10327 } else {
10328 None
10329 }
10330 }
10331
10332 #[allow(irrefutable_let_patterns)]
10333 pub fn into_sync(self) -> Option<(FileSyncResponder)> {
10334 if let FileRequest::Sync { responder } = self { Some((responder)) } else { None }
10335 }
10336
10337 #[allow(irrefutable_let_patterns)]
10338 pub fn into_list_extended_attributes(
10339 self,
10340 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
10341 {
10342 if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
10343 Some((iterator, control_handle))
10344 } else {
10345 None
10346 }
10347 }
10348
10349 #[allow(irrefutable_let_patterns)]
10350 pub fn into_get_extended_attribute(
10351 self,
10352 ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
10353 if let FileRequest::GetExtendedAttribute { name, responder } = self {
10354 Some((name, responder))
10355 } else {
10356 None
10357 }
10358 }
10359
10360 #[allow(irrefutable_let_patterns)]
10361 pub fn into_set_extended_attribute(
10362 self,
10363 ) -> Option<(
10364 Vec<u8>,
10365 ExtendedAttributeValue,
10366 SetExtendedAttributeMode,
10367 FileSetExtendedAttributeResponder,
10368 )> {
10369 if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
10370 Some((name, value, mode, responder))
10371 } else {
10372 None
10373 }
10374 }
10375
10376 #[allow(irrefutable_let_patterns)]
10377 pub fn into_remove_extended_attribute(
10378 self,
10379 ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
10380 if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
10381 Some((name, responder))
10382 } else {
10383 None
10384 }
10385 }
10386
10387 #[allow(irrefutable_let_patterns)]
10388 pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
10389 if let FileRequest::Read { count, responder } = self {
10390 Some((count, responder))
10391 } else {
10392 None
10393 }
10394 }
10395
10396 #[allow(irrefutable_let_patterns)]
10397 pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
10398 if let FileRequest::Write { data, responder } = self {
10399 Some((data, responder))
10400 } else {
10401 None
10402 }
10403 }
10404
10405 #[allow(irrefutable_let_patterns)]
10406 pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
10407 if let FileRequest::Describe { responder } = self { Some((responder)) } else { None }
10408 }
10409
10410 #[allow(irrefutable_let_patterns)]
10411 pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
10412 if let FileRequest::Seek { origin, offset, responder } = self {
10413 Some((origin, offset, responder))
10414 } else {
10415 None
10416 }
10417 }
10418
10419 #[allow(irrefutable_let_patterns)]
10420 pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
10421 if let FileRequest::ReadAt { count, offset, responder } = self {
10422 Some((count, offset, responder))
10423 } else {
10424 None
10425 }
10426 }
10427
10428 #[allow(irrefutable_let_patterns)]
10429 pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
10430 if let FileRequest::WriteAt { data, offset, responder } = self {
10431 Some((data, offset, responder))
10432 } else {
10433 None
10434 }
10435 }
10436
10437 #[allow(irrefutable_let_patterns)]
10438 pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
10439 if let FileRequest::Resize { length, responder } = self {
10440 Some((length, responder))
10441 } else {
10442 None
10443 }
10444 }
10445
10446 #[allow(irrefutable_let_patterns)]
10447 pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
10448 if let FileRequest::GetBackingMemory { flags, responder } = self {
10449 Some((flags, responder))
10450 } else {
10451 None
10452 }
10453 }
10454
10455 #[allow(irrefutable_let_patterns)]
10456 pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
10457 if let FileRequest::Allocate { offset, length, mode, responder } = self {
10458 Some((offset, length, mode, responder))
10459 } else {
10460 None
10461 }
10462 }
10463
10464 #[allow(irrefutable_let_patterns)]
10465 pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
10466 if let FileRequest::EnableVerity { options, responder } = self {
10467 Some((options, responder))
10468 } else {
10469 None
10470 }
10471 }
10472
10473 pub fn method_name(&self) -> &'static str {
10475 match *self {
10476 FileRequest::AdvisoryLock { .. } => "advisory_lock",
10477 FileRequest::LinkInto { .. } => "link_into",
10478 FileRequest::Clone { .. } => "clone",
10479 FileRequest::Close { .. } => "close",
10480 FileRequest::Query { .. } => "query",
10481 FileRequest::DeprecatedClone { .. } => "deprecated_clone",
10482 FileRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
10483 FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
10484 FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
10485 FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
10486 FileRequest::GetFlags { .. } => "get_flags",
10487 FileRequest::SetFlags { .. } => "set_flags",
10488 FileRequest::QueryFilesystem { .. } => "query_filesystem",
10489 FileRequest::GetAttributes { .. } => "get_attributes",
10490 FileRequest::UpdateAttributes { .. } => "update_attributes",
10491 FileRequest::Sync { .. } => "sync",
10492 FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
10493 FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
10494 FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
10495 FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
10496 FileRequest::Read { .. } => "read",
10497 FileRequest::Write { .. } => "write",
10498 FileRequest::Describe { .. } => "describe",
10499 FileRequest::Seek { .. } => "seek",
10500 FileRequest::ReadAt { .. } => "read_at",
10501 FileRequest::WriteAt { .. } => "write_at",
10502 FileRequest::Resize { .. } => "resize",
10503 FileRequest::GetBackingMemory { .. } => "get_backing_memory",
10504 FileRequest::Allocate { .. } => "allocate",
10505 FileRequest::EnableVerity { .. } => "enable_verity",
10506 FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
10507 "unknown one-way method"
10508 }
10509 FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
10510 "unknown two-way method"
10511 }
10512 }
10513 }
10514}
10515
10516#[derive(Debug, Clone)]
10517pub struct FileControlHandle {
10518 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10519}
10520
10521impl fidl::endpoints::ControlHandle for FileControlHandle {
10522 fn shutdown(&self) {
10523 self.inner.shutdown()
10524 }
10525
10526 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10527 self.inner.shutdown_with_epitaph(status)
10528 }
10529
10530 fn is_closed(&self) -> bool {
10531 self.inner.channel().is_closed()
10532 }
10533 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10534 self.inner.channel().on_closed()
10535 }
10536
10537 #[cfg(target_os = "fuchsia")]
10538 fn signal_peer(
10539 &self,
10540 clear_mask: zx::Signals,
10541 set_mask: zx::Signals,
10542 ) -> Result<(), zx_status::Status> {
10543 use fidl::Peered;
10544 self.inner.channel().signal_peer(clear_mask, set_mask)
10545 }
10546}
10547
10548impl FileControlHandle {
10549 pub fn send_on_open_(
10550 &self,
10551 mut s: i32,
10552 mut info: Option<NodeInfoDeprecated>,
10553 ) -> Result<(), fidl::Error> {
10554 self.inner.send::<NodeOnOpenRequest>(
10555 (s, info.as_mut()),
10556 0,
10557 0x7fc7bbb1dbfd1972,
10558 fidl::encoding::DynamicFlags::FLEXIBLE,
10559 )
10560 }
10561
10562 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
10563 self.inner.send::<Representation>(
10564 &mut payload,
10565 0,
10566 0x5cb40567d80a510c,
10567 fidl::encoding::DynamicFlags::empty(),
10568 )
10569 }
10570}
10571
10572#[must_use = "FIDL methods require a response to be sent"]
10573#[derive(Debug)]
10574pub struct FileAdvisoryLockResponder {
10575 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10576 tx_id: u32,
10577}
10578
10579impl std::ops::Drop for FileAdvisoryLockResponder {
10583 fn drop(&mut self) {
10584 self.control_handle.shutdown();
10585 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10587 }
10588}
10589
10590impl fidl::endpoints::Responder for FileAdvisoryLockResponder {
10591 type ControlHandle = FileControlHandle;
10592
10593 fn control_handle(&self) -> &FileControlHandle {
10594 &self.control_handle
10595 }
10596
10597 fn drop_without_shutdown(mut self) {
10598 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10600 std::mem::forget(self);
10602 }
10603}
10604
10605impl FileAdvisoryLockResponder {
10606 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10610 let _result = self.send_raw(result);
10611 if _result.is_err() {
10612 self.control_handle.shutdown();
10613 }
10614 self.drop_without_shutdown();
10615 _result
10616 }
10617
10618 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10620 let _result = self.send_raw(result);
10621 self.drop_without_shutdown();
10622 _result
10623 }
10624
10625 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10626 self.control_handle
10627 .inner
10628 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10629 result,
10630 self.tx_id,
10631 0x6ee9c0ad53ec87aa,
10632 fidl::encoding::DynamicFlags::empty(),
10633 )
10634 }
10635}
10636
10637#[must_use = "FIDL methods require a response to be sent"]
10638#[derive(Debug)]
10639pub struct FileLinkIntoResponder {
10640 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10641 tx_id: u32,
10642}
10643
10644impl std::ops::Drop for FileLinkIntoResponder {
10648 fn drop(&mut self) {
10649 self.control_handle.shutdown();
10650 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10652 }
10653}
10654
10655impl fidl::endpoints::Responder for FileLinkIntoResponder {
10656 type ControlHandle = FileControlHandle;
10657
10658 fn control_handle(&self) -> &FileControlHandle {
10659 &self.control_handle
10660 }
10661
10662 fn drop_without_shutdown(mut self) {
10663 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10665 std::mem::forget(self);
10667 }
10668}
10669
10670impl FileLinkIntoResponder {
10671 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10675 let _result = self.send_raw(result);
10676 if _result.is_err() {
10677 self.control_handle.shutdown();
10678 }
10679 self.drop_without_shutdown();
10680 _result
10681 }
10682
10683 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10685 let _result = self.send_raw(result);
10686 self.drop_without_shutdown();
10687 _result
10688 }
10689
10690 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10691 self.control_handle
10692 .inner
10693 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10694 result,
10695 self.tx_id,
10696 0x54f3949246a03e74,
10697 fidl::encoding::DynamicFlags::empty(),
10698 )
10699 }
10700}
10701
10702#[must_use = "FIDL methods require a response to be sent"]
10703#[derive(Debug)]
10704pub struct FileCloseResponder {
10705 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10706 tx_id: u32,
10707}
10708
10709impl std::ops::Drop for FileCloseResponder {
10713 fn drop(&mut self) {
10714 self.control_handle.shutdown();
10715 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10717 }
10718}
10719
10720impl fidl::endpoints::Responder for FileCloseResponder {
10721 type ControlHandle = FileControlHandle;
10722
10723 fn control_handle(&self) -> &FileControlHandle {
10724 &self.control_handle
10725 }
10726
10727 fn drop_without_shutdown(mut self) {
10728 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10730 std::mem::forget(self);
10732 }
10733}
10734
10735impl FileCloseResponder {
10736 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10740 let _result = self.send_raw(result);
10741 if _result.is_err() {
10742 self.control_handle.shutdown();
10743 }
10744 self.drop_without_shutdown();
10745 _result
10746 }
10747
10748 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10750 let _result = self.send_raw(result);
10751 self.drop_without_shutdown();
10752 _result
10753 }
10754
10755 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10756 self.control_handle
10757 .inner
10758 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10759 result,
10760 self.tx_id,
10761 0x5ac5d459ad7f657e,
10762 fidl::encoding::DynamicFlags::empty(),
10763 )
10764 }
10765}
10766
10767#[must_use = "FIDL methods require a response to be sent"]
10768#[derive(Debug)]
10769pub struct FileQueryResponder {
10770 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10771 tx_id: u32,
10772}
10773
10774impl std::ops::Drop for FileQueryResponder {
10778 fn drop(&mut self) {
10779 self.control_handle.shutdown();
10780 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10782 }
10783}
10784
10785impl fidl::endpoints::Responder for FileQueryResponder {
10786 type ControlHandle = FileControlHandle;
10787
10788 fn control_handle(&self) -> &FileControlHandle {
10789 &self.control_handle
10790 }
10791
10792 fn drop_without_shutdown(mut self) {
10793 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10795 std::mem::forget(self);
10797 }
10798}
10799
10800impl FileQueryResponder {
10801 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10805 let _result = self.send_raw(protocol);
10806 if _result.is_err() {
10807 self.control_handle.shutdown();
10808 }
10809 self.drop_without_shutdown();
10810 _result
10811 }
10812
10813 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10815 let _result = self.send_raw(protocol);
10816 self.drop_without_shutdown();
10817 _result
10818 }
10819
10820 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10821 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
10822 (protocol,),
10823 self.tx_id,
10824 0x2658edee9decfc06,
10825 fidl::encoding::DynamicFlags::empty(),
10826 )
10827 }
10828}
10829
10830#[must_use = "FIDL methods require a response to be sent"]
10831#[derive(Debug)]
10832pub struct FileDeprecatedGetAttrResponder {
10833 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10834 tx_id: u32,
10835}
10836
10837impl std::ops::Drop for FileDeprecatedGetAttrResponder {
10841 fn drop(&mut self) {
10842 self.control_handle.shutdown();
10843 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10845 }
10846}
10847
10848impl fidl::endpoints::Responder for FileDeprecatedGetAttrResponder {
10849 type ControlHandle = FileControlHandle;
10850
10851 fn control_handle(&self) -> &FileControlHandle {
10852 &self.control_handle
10853 }
10854
10855 fn drop_without_shutdown(mut self) {
10856 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10858 std::mem::forget(self);
10860 }
10861}
10862
10863impl FileDeprecatedGetAttrResponder {
10864 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
10868 let _result = self.send_raw(s, attributes);
10869 if _result.is_err() {
10870 self.control_handle.shutdown();
10871 }
10872 self.drop_without_shutdown();
10873 _result
10874 }
10875
10876 pub fn send_no_shutdown_on_err(
10878 self,
10879 mut s: i32,
10880 mut attributes: &NodeAttributes,
10881 ) -> Result<(), fidl::Error> {
10882 let _result = self.send_raw(s, attributes);
10883 self.drop_without_shutdown();
10884 _result
10885 }
10886
10887 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
10888 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
10889 (s, attributes),
10890 self.tx_id,
10891 0x78985e216314dafd,
10892 fidl::encoding::DynamicFlags::empty(),
10893 )
10894 }
10895}
10896
10897#[must_use = "FIDL methods require a response to be sent"]
10898#[derive(Debug)]
10899pub struct FileDeprecatedSetAttrResponder {
10900 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10901 tx_id: u32,
10902}
10903
10904impl std::ops::Drop for FileDeprecatedSetAttrResponder {
10908 fn drop(&mut self) {
10909 self.control_handle.shutdown();
10910 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10912 }
10913}
10914
10915impl fidl::endpoints::Responder for FileDeprecatedSetAttrResponder {
10916 type ControlHandle = FileControlHandle;
10917
10918 fn control_handle(&self) -> &FileControlHandle {
10919 &self.control_handle
10920 }
10921
10922 fn drop_without_shutdown(mut self) {
10923 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10925 std::mem::forget(self);
10927 }
10928}
10929
10930impl FileDeprecatedSetAttrResponder {
10931 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
10935 let _result = self.send_raw(s);
10936 if _result.is_err() {
10937 self.control_handle.shutdown();
10938 }
10939 self.drop_without_shutdown();
10940 _result
10941 }
10942
10943 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
10945 let _result = self.send_raw(s);
10946 self.drop_without_shutdown();
10947 _result
10948 }
10949
10950 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
10951 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
10952 (s,),
10953 self.tx_id,
10954 0x4186c0f40d938f46,
10955 fidl::encoding::DynamicFlags::empty(),
10956 )
10957 }
10958}
10959
10960#[must_use = "FIDL methods require a response to be sent"]
10961#[derive(Debug)]
10962pub struct FileDeprecatedGetFlagsResponder {
10963 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10964 tx_id: u32,
10965}
10966
10967impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
10971 fn drop(&mut self) {
10972 self.control_handle.shutdown();
10973 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10975 }
10976}
10977
10978impl fidl::endpoints::Responder for FileDeprecatedGetFlagsResponder {
10979 type ControlHandle = FileControlHandle;
10980
10981 fn control_handle(&self) -> &FileControlHandle {
10982 &self.control_handle
10983 }
10984
10985 fn drop_without_shutdown(mut self) {
10986 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10988 std::mem::forget(self);
10990 }
10991}
10992
10993impl FileDeprecatedGetFlagsResponder {
10994 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
10998 let _result = self.send_raw(s, flags);
10999 if _result.is_err() {
11000 self.control_handle.shutdown();
11001 }
11002 self.drop_without_shutdown();
11003 _result
11004 }
11005
11006 pub fn send_no_shutdown_on_err(
11008 self,
11009 mut s: i32,
11010 mut flags: OpenFlags,
11011 ) -> Result<(), fidl::Error> {
11012 let _result = self.send_raw(s, flags);
11013 self.drop_without_shutdown();
11014 _result
11015 }
11016
11017 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
11018 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
11019 (s, flags),
11020 self.tx_id,
11021 0x5b88fffb8eda3aa1,
11022 fidl::encoding::DynamicFlags::empty(),
11023 )
11024 }
11025}
11026
11027#[must_use = "FIDL methods require a response to be sent"]
11028#[derive(Debug)]
11029pub struct FileDeprecatedSetFlagsResponder {
11030 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11031 tx_id: u32,
11032}
11033
11034impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
11038 fn drop(&mut self) {
11039 self.control_handle.shutdown();
11040 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11042 }
11043}
11044
11045impl fidl::endpoints::Responder for FileDeprecatedSetFlagsResponder {
11046 type ControlHandle = FileControlHandle;
11047
11048 fn control_handle(&self) -> &FileControlHandle {
11049 &self.control_handle
11050 }
11051
11052 fn drop_without_shutdown(mut self) {
11053 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11055 std::mem::forget(self);
11057 }
11058}
11059
11060impl FileDeprecatedSetFlagsResponder {
11061 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
11065 let _result = self.send_raw(s);
11066 if _result.is_err() {
11067 self.control_handle.shutdown();
11068 }
11069 self.drop_without_shutdown();
11070 _result
11071 }
11072
11073 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
11075 let _result = self.send_raw(s);
11076 self.drop_without_shutdown();
11077 _result
11078 }
11079
11080 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
11081 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
11082 (s,),
11083 self.tx_id,
11084 0x5295b76c71fde733,
11085 fidl::encoding::DynamicFlags::empty(),
11086 )
11087 }
11088}
11089
11090#[must_use = "FIDL methods require a response to be sent"]
11091#[derive(Debug)]
11092pub struct FileGetFlagsResponder {
11093 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11094 tx_id: u32,
11095}
11096
11097impl std::ops::Drop for FileGetFlagsResponder {
11101 fn drop(&mut self) {
11102 self.control_handle.shutdown();
11103 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11105 }
11106}
11107
11108impl fidl::endpoints::Responder for FileGetFlagsResponder {
11109 type ControlHandle = FileControlHandle;
11110
11111 fn control_handle(&self) -> &FileControlHandle {
11112 &self.control_handle
11113 }
11114
11115 fn drop_without_shutdown(mut self) {
11116 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11118 std::mem::forget(self);
11120 }
11121}
11122
11123impl FileGetFlagsResponder {
11124 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11128 let _result = self.send_raw(result);
11129 if _result.is_err() {
11130 self.control_handle.shutdown();
11131 }
11132 self.drop_without_shutdown();
11133 _result
11134 }
11135
11136 pub fn send_no_shutdown_on_err(
11138 self,
11139 mut result: Result<Flags, i32>,
11140 ) -> Result<(), fidl::Error> {
11141 let _result = self.send_raw(result);
11142 self.drop_without_shutdown();
11143 _result
11144 }
11145
11146 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11147 self.control_handle
11148 .inner
11149 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
11150 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
11151 self.tx_id,
11152 0x176eb318f64ec23,
11153 fidl::encoding::DynamicFlags::FLEXIBLE,
11154 )
11155 }
11156}
11157
11158#[must_use = "FIDL methods require a response to be sent"]
11159#[derive(Debug)]
11160pub struct FileSetFlagsResponder {
11161 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11162 tx_id: u32,
11163}
11164
11165impl std::ops::Drop for FileSetFlagsResponder {
11169 fn drop(&mut self) {
11170 self.control_handle.shutdown();
11171 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11173 }
11174}
11175
11176impl fidl::endpoints::Responder for FileSetFlagsResponder {
11177 type ControlHandle = FileControlHandle;
11178
11179 fn control_handle(&self) -> &FileControlHandle {
11180 &self.control_handle
11181 }
11182
11183 fn drop_without_shutdown(mut self) {
11184 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11186 std::mem::forget(self);
11188 }
11189}
11190
11191impl FileSetFlagsResponder {
11192 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11196 let _result = self.send_raw(result);
11197 if _result.is_err() {
11198 self.control_handle.shutdown();
11199 }
11200 self.drop_without_shutdown();
11201 _result
11202 }
11203
11204 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11206 let _result = self.send_raw(result);
11207 self.drop_without_shutdown();
11208 _result
11209 }
11210
11211 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11212 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
11213 fidl::encoding::EmptyStruct,
11214 i32,
11215 >>(
11216 fidl::encoding::FlexibleResult::new(result),
11217 self.tx_id,
11218 0x55a8028685791ea8,
11219 fidl::encoding::DynamicFlags::FLEXIBLE,
11220 )
11221 }
11222}
11223
11224#[must_use = "FIDL methods require a response to be sent"]
11225#[derive(Debug)]
11226pub struct FileQueryFilesystemResponder {
11227 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11228 tx_id: u32,
11229}
11230
11231impl std::ops::Drop for FileQueryFilesystemResponder {
11235 fn drop(&mut self) {
11236 self.control_handle.shutdown();
11237 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11239 }
11240}
11241
11242impl fidl::endpoints::Responder for FileQueryFilesystemResponder {
11243 type ControlHandle = FileControlHandle;
11244
11245 fn control_handle(&self) -> &FileControlHandle {
11246 &self.control_handle
11247 }
11248
11249 fn drop_without_shutdown(mut self) {
11250 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11252 std::mem::forget(self);
11254 }
11255}
11256
11257impl FileQueryFilesystemResponder {
11258 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11262 let _result = self.send_raw(s, info);
11263 if _result.is_err() {
11264 self.control_handle.shutdown();
11265 }
11266 self.drop_without_shutdown();
11267 _result
11268 }
11269
11270 pub fn send_no_shutdown_on_err(
11272 self,
11273 mut s: i32,
11274 mut info: Option<&FilesystemInfo>,
11275 ) -> Result<(), fidl::Error> {
11276 let _result = self.send_raw(s, info);
11277 self.drop_without_shutdown();
11278 _result
11279 }
11280
11281 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11282 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
11283 (s, info),
11284 self.tx_id,
11285 0x6f344a1c6b0a0610,
11286 fidl::encoding::DynamicFlags::empty(),
11287 )
11288 }
11289}
11290
11291#[must_use = "FIDL methods require a response to be sent"]
11292#[derive(Debug)]
11293pub struct FileGetAttributesResponder {
11294 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11295 tx_id: u32,
11296}
11297
11298impl std::ops::Drop for FileGetAttributesResponder {
11302 fn drop(&mut self) {
11303 self.control_handle.shutdown();
11304 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11306 }
11307}
11308
11309impl fidl::endpoints::Responder for FileGetAttributesResponder {
11310 type ControlHandle = FileControlHandle;
11311
11312 fn control_handle(&self) -> &FileControlHandle {
11313 &self.control_handle
11314 }
11315
11316 fn drop_without_shutdown(mut self) {
11317 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11319 std::mem::forget(self);
11321 }
11322}
11323
11324impl FileGetAttributesResponder {
11325 pub fn send(
11329 self,
11330 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11331 ) -> Result<(), fidl::Error> {
11332 let _result = self.send_raw(result);
11333 if _result.is_err() {
11334 self.control_handle.shutdown();
11335 }
11336 self.drop_without_shutdown();
11337 _result
11338 }
11339
11340 pub fn send_no_shutdown_on_err(
11342 self,
11343 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11344 ) -> Result<(), fidl::Error> {
11345 let _result = self.send_raw(result);
11346 self.drop_without_shutdown();
11347 _result
11348 }
11349
11350 fn send_raw(
11351 &self,
11352 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11353 ) -> Result<(), fidl::Error> {
11354 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
11355 result,
11356 self.tx_id,
11357 0x3d4396a638ea053b,
11358 fidl::encoding::DynamicFlags::empty(),
11359 )
11360 }
11361}
11362
11363#[must_use = "FIDL methods require a response to be sent"]
11364#[derive(Debug)]
11365pub struct FileUpdateAttributesResponder {
11366 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11367 tx_id: u32,
11368}
11369
11370impl std::ops::Drop for FileUpdateAttributesResponder {
11374 fn drop(&mut self) {
11375 self.control_handle.shutdown();
11376 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11378 }
11379}
11380
11381impl fidl::endpoints::Responder for FileUpdateAttributesResponder {
11382 type ControlHandle = FileControlHandle;
11383
11384 fn control_handle(&self) -> &FileControlHandle {
11385 &self.control_handle
11386 }
11387
11388 fn drop_without_shutdown(mut self) {
11389 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11391 std::mem::forget(self);
11393 }
11394}
11395
11396impl FileUpdateAttributesResponder {
11397 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11401 let _result = self.send_raw(result);
11402 if _result.is_err() {
11403 self.control_handle.shutdown();
11404 }
11405 self.drop_without_shutdown();
11406 _result
11407 }
11408
11409 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11411 let _result = self.send_raw(result);
11412 self.drop_without_shutdown();
11413 _result
11414 }
11415
11416 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11417 self.control_handle
11418 .inner
11419 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11420 result,
11421 self.tx_id,
11422 0x3308c1da5a89bf08,
11423 fidl::encoding::DynamicFlags::empty(),
11424 )
11425 }
11426}
11427
11428#[must_use = "FIDL methods require a response to be sent"]
11429#[derive(Debug)]
11430pub struct FileSyncResponder {
11431 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11432 tx_id: u32,
11433}
11434
11435impl std::ops::Drop for FileSyncResponder {
11439 fn drop(&mut self) {
11440 self.control_handle.shutdown();
11441 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11443 }
11444}
11445
11446impl fidl::endpoints::Responder for FileSyncResponder {
11447 type ControlHandle = FileControlHandle;
11448
11449 fn control_handle(&self) -> &FileControlHandle {
11450 &self.control_handle
11451 }
11452
11453 fn drop_without_shutdown(mut self) {
11454 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11456 std::mem::forget(self);
11458 }
11459}
11460
11461impl FileSyncResponder {
11462 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11466 let _result = self.send_raw(result);
11467 if _result.is_err() {
11468 self.control_handle.shutdown();
11469 }
11470 self.drop_without_shutdown();
11471 _result
11472 }
11473
11474 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11476 let _result = self.send_raw(result);
11477 self.drop_without_shutdown();
11478 _result
11479 }
11480
11481 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11482 self.control_handle
11483 .inner
11484 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11485 result,
11486 self.tx_id,
11487 0x2c5c27ca0ab5dc49,
11488 fidl::encoding::DynamicFlags::empty(),
11489 )
11490 }
11491}
11492
11493#[must_use = "FIDL methods require a response to be sent"]
11494#[derive(Debug)]
11495pub struct FileGetExtendedAttributeResponder {
11496 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11497 tx_id: u32,
11498}
11499
11500impl std::ops::Drop for FileGetExtendedAttributeResponder {
11504 fn drop(&mut self) {
11505 self.control_handle.shutdown();
11506 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11508 }
11509}
11510
11511impl fidl::endpoints::Responder for FileGetExtendedAttributeResponder {
11512 type ControlHandle = FileControlHandle;
11513
11514 fn control_handle(&self) -> &FileControlHandle {
11515 &self.control_handle
11516 }
11517
11518 fn drop_without_shutdown(mut self) {
11519 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11521 std::mem::forget(self);
11523 }
11524}
11525
11526impl FileGetExtendedAttributeResponder {
11527 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11531 let _result = self.send_raw(result);
11532 if _result.is_err() {
11533 self.control_handle.shutdown();
11534 }
11535 self.drop_without_shutdown();
11536 _result
11537 }
11538
11539 pub fn send_no_shutdown_on_err(
11541 self,
11542 mut result: Result<ExtendedAttributeValue, i32>,
11543 ) -> Result<(), fidl::Error> {
11544 let _result = self.send_raw(result);
11545 self.drop_without_shutdown();
11546 _result
11547 }
11548
11549 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11550 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
11551 result.as_mut().map_err(|e| *e),
11552 self.tx_id,
11553 0x45ffa3ccfdeb76db,
11554 fidl::encoding::DynamicFlags::empty(),
11555 )
11556 }
11557}
11558
11559#[must_use = "FIDL methods require a response to be sent"]
11560#[derive(Debug)]
11561pub struct FileSetExtendedAttributeResponder {
11562 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11563 tx_id: u32,
11564}
11565
11566impl std::ops::Drop for FileSetExtendedAttributeResponder {
11570 fn drop(&mut self) {
11571 self.control_handle.shutdown();
11572 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11574 }
11575}
11576
11577impl fidl::endpoints::Responder for FileSetExtendedAttributeResponder {
11578 type ControlHandle = FileControlHandle;
11579
11580 fn control_handle(&self) -> &FileControlHandle {
11581 &self.control_handle
11582 }
11583
11584 fn drop_without_shutdown(mut self) {
11585 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11587 std::mem::forget(self);
11589 }
11590}
11591
11592impl FileSetExtendedAttributeResponder {
11593 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11597 let _result = self.send_raw(result);
11598 if _result.is_err() {
11599 self.control_handle.shutdown();
11600 }
11601 self.drop_without_shutdown();
11602 _result
11603 }
11604
11605 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11607 let _result = self.send_raw(result);
11608 self.drop_without_shutdown();
11609 _result
11610 }
11611
11612 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11613 self.control_handle
11614 .inner
11615 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11616 result,
11617 self.tx_id,
11618 0x4a951362f681f23c,
11619 fidl::encoding::DynamicFlags::empty(),
11620 )
11621 }
11622}
11623
11624#[must_use = "FIDL methods require a response to be sent"]
11625#[derive(Debug)]
11626pub struct FileRemoveExtendedAttributeResponder {
11627 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11628 tx_id: u32,
11629}
11630
11631impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
11635 fn drop(&mut self) {
11636 self.control_handle.shutdown();
11637 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11639 }
11640}
11641
11642impl fidl::endpoints::Responder for FileRemoveExtendedAttributeResponder {
11643 type ControlHandle = FileControlHandle;
11644
11645 fn control_handle(&self) -> &FileControlHandle {
11646 &self.control_handle
11647 }
11648
11649 fn drop_without_shutdown(mut self) {
11650 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11652 std::mem::forget(self);
11654 }
11655}
11656
11657impl FileRemoveExtendedAttributeResponder {
11658 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11662 let _result = self.send_raw(result);
11663 if _result.is_err() {
11664 self.control_handle.shutdown();
11665 }
11666 self.drop_without_shutdown();
11667 _result
11668 }
11669
11670 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11672 let _result = self.send_raw(result);
11673 self.drop_without_shutdown();
11674 _result
11675 }
11676
11677 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11678 self.control_handle
11679 .inner
11680 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11681 result,
11682 self.tx_id,
11683 0x7a0b9f3a9bf9032d,
11684 fidl::encoding::DynamicFlags::empty(),
11685 )
11686 }
11687}
11688
11689#[must_use = "FIDL methods require a response to be sent"]
11690#[derive(Debug)]
11691pub struct FileReadResponder {
11692 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11693 tx_id: u32,
11694}
11695
11696impl std::ops::Drop for FileReadResponder {
11700 fn drop(&mut self) {
11701 self.control_handle.shutdown();
11702 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11704 }
11705}
11706
11707impl fidl::endpoints::Responder for FileReadResponder {
11708 type ControlHandle = FileControlHandle;
11709
11710 fn control_handle(&self) -> &FileControlHandle {
11711 &self.control_handle
11712 }
11713
11714 fn drop_without_shutdown(mut self) {
11715 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11717 std::mem::forget(self);
11719 }
11720}
11721
11722impl FileReadResponder {
11723 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11727 let _result = self.send_raw(result);
11728 if _result.is_err() {
11729 self.control_handle.shutdown();
11730 }
11731 self.drop_without_shutdown();
11732 _result
11733 }
11734
11735 pub fn send_no_shutdown_on_err(
11737 self,
11738 mut result: Result<&[u8], i32>,
11739 ) -> Result<(), fidl::Error> {
11740 let _result = self.send_raw(result);
11741 self.drop_without_shutdown();
11742 _result
11743 }
11744
11745 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11746 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
11747 result.map(|data| (data,)),
11748 self.tx_id,
11749 0x57e419a298c8ede,
11750 fidl::encoding::DynamicFlags::empty(),
11751 )
11752 }
11753}
11754
11755#[must_use = "FIDL methods require a response to be sent"]
11756#[derive(Debug)]
11757pub struct FileWriteResponder {
11758 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11759 tx_id: u32,
11760}
11761
11762impl std::ops::Drop for FileWriteResponder {
11766 fn drop(&mut self) {
11767 self.control_handle.shutdown();
11768 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11770 }
11771}
11772
11773impl fidl::endpoints::Responder for FileWriteResponder {
11774 type ControlHandle = FileControlHandle;
11775
11776 fn control_handle(&self) -> &FileControlHandle {
11777 &self.control_handle
11778 }
11779
11780 fn drop_without_shutdown(mut self) {
11781 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11783 std::mem::forget(self);
11785 }
11786}
11787
11788impl FileWriteResponder {
11789 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11793 let _result = self.send_raw(result);
11794 if _result.is_err() {
11795 self.control_handle.shutdown();
11796 }
11797 self.drop_without_shutdown();
11798 _result
11799 }
11800
11801 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11803 let _result = self.send_raw(result);
11804 self.drop_without_shutdown();
11805 _result
11806 }
11807
11808 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11809 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
11810 result.map(|actual_count| (actual_count,)),
11811 self.tx_id,
11812 0x6a31437832469f82,
11813 fidl::encoding::DynamicFlags::empty(),
11814 )
11815 }
11816}
11817
11818#[must_use = "FIDL methods require a response to be sent"]
11819#[derive(Debug)]
11820pub struct FileDescribeResponder {
11821 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11822 tx_id: u32,
11823}
11824
11825impl std::ops::Drop for FileDescribeResponder {
11829 fn drop(&mut self) {
11830 self.control_handle.shutdown();
11831 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11833 }
11834}
11835
11836impl fidl::endpoints::Responder for FileDescribeResponder {
11837 type ControlHandle = FileControlHandle;
11838
11839 fn control_handle(&self) -> &FileControlHandle {
11840 &self.control_handle
11841 }
11842
11843 fn drop_without_shutdown(mut self) {
11844 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11846 std::mem::forget(self);
11848 }
11849}
11850
11851impl FileDescribeResponder {
11852 pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11856 let _result = self.send_raw(payload);
11857 if _result.is_err() {
11858 self.control_handle.shutdown();
11859 }
11860 self.drop_without_shutdown();
11861 _result
11862 }
11863
11864 pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11866 let _result = self.send_raw(payload);
11867 self.drop_without_shutdown();
11868 _result
11869 }
11870
11871 fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11872 self.control_handle.inner.send::<FileInfo>(
11873 &mut payload,
11874 self.tx_id,
11875 0x68b5ac00c62906bc,
11876 fidl::encoding::DynamicFlags::empty(),
11877 )
11878 }
11879}
11880
11881#[must_use = "FIDL methods require a response to be sent"]
11882#[derive(Debug)]
11883pub struct FileSeekResponder {
11884 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11885 tx_id: u32,
11886}
11887
11888impl std::ops::Drop for FileSeekResponder {
11892 fn drop(&mut self) {
11893 self.control_handle.shutdown();
11894 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11896 }
11897}
11898
11899impl fidl::endpoints::Responder for FileSeekResponder {
11900 type ControlHandle = FileControlHandle;
11901
11902 fn control_handle(&self) -> &FileControlHandle {
11903 &self.control_handle
11904 }
11905
11906 fn drop_without_shutdown(mut self) {
11907 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11909 std::mem::forget(self);
11911 }
11912}
11913
11914impl FileSeekResponder {
11915 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11919 let _result = self.send_raw(result);
11920 if _result.is_err() {
11921 self.control_handle.shutdown();
11922 }
11923 self.drop_without_shutdown();
11924 _result
11925 }
11926
11927 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11929 let _result = self.send_raw(result);
11930 self.drop_without_shutdown();
11931 _result
11932 }
11933
11934 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11935 self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
11936 result.map(|offset_from_start| (offset_from_start,)),
11937 self.tx_id,
11938 0x78079168162c5207,
11939 fidl::encoding::DynamicFlags::empty(),
11940 )
11941 }
11942}
11943
11944#[must_use = "FIDL methods require a response to be sent"]
11945#[derive(Debug)]
11946pub struct FileReadAtResponder {
11947 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11948 tx_id: u32,
11949}
11950
11951impl std::ops::Drop for FileReadAtResponder {
11955 fn drop(&mut self) {
11956 self.control_handle.shutdown();
11957 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11959 }
11960}
11961
11962impl fidl::endpoints::Responder for FileReadAtResponder {
11963 type ControlHandle = FileControlHandle;
11964
11965 fn control_handle(&self) -> &FileControlHandle {
11966 &self.control_handle
11967 }
11968
11969 fn drop_without_shutdown(mut self) {
11970 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11972 std::mem::forget(self);
11974 }
11975}
11976
11977impl FileReadAtResponder {
11978 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11982 let _result = self.send_raw(result);
11983 if _result.is_err() {
11984 self.control_handle.shutdown();
11985 }
11986 self.drop_without_shutdown();
11987 _result
11988 }
11989
11990 pub fn send_no_shutdown_on_err(
11992 self,
11993 mut result: Result<&[u8], i32>,
11994 ) -> Result<(), fidl::Error> {
11995 let _result = self.send_raw(result);
11996 self.drop_without_shutdown();
11997 _result
11998 }
11999
12000 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
12001 self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
12002 result.map(|data| (data,)),
12003 self.tx_id,
12004 0x1607a293a60d723e,
12005 fidl::encoding::DynamicFlags::empty(),
12006 )
12007 }
12008}
12009
12010#[must_use = "FIDL methods require a response to be sent"]
12011#[derive(Debug)]
12012pub struct FileWriteAtResponder {
12013 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12014 tx_id: u32,
12015}
12016
12017impl std::ops::Drop for FileWriteAtResponder {
12021 fn drop(&mut self) {
12022 self.control_handle.shutdown();
12023 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12025 }
12026}
12027
12028impl fidl::endpoints::Responder for FileWriteAtResponder {
12029 type ControlHandle = FileControlHandle;
12030
12031 fn control_handle(&self) -> &FileControlHandle {
12032 &self.control_handle
12033 }
12034
12035 fn drop_without_shutdown(mut self) {
12036 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12038 std::mem::forget(self);
12040 }
12041}
12042
12043impl FileWriteAtResponder {
12044 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12048 let _result = self.send_raw(result);
12049 if _result.is_err() {
12050 self.control_handle.shutdown();
12051 }
12052 self.drop_without_shutdown();
12053 _result
12054 }
12055
12056 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12058 let _result = self.send_raw(result);
12059 self.drop_without_shutdown();
12060 _result
12061 }
12062
12063 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12064 self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
12065 result.map(|actual_count| (actual_count,)),
12066 self.tx_id,
12067 0x793eefc0045e792b,
12068 fidl::encoding::DynamicFlags::empty(),
12069 )
12070 }
12071}
12072
12073#[must_use = "FIDL methods require a response to be sent"]
12074#[derive(Debug)]
12075pub struct FileResizeResponder {
12076 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12077 tx_id: u32,
12078}
12079
12080impl std::ops::Drop for FileResizeResponder {
12084 fn drop(&mut self) {
12085 self.control_handle.shutdown();
12086 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12088 }
12089}
12090
12091impl fidl::endpoints::Responder for FileResizeResponder {
12092 type ControlHandle = FileControlHandle;
12093
12094 fn control_handle(&self) -> &FileControlHandle {
12095 &self.control_handle
12096 }
12097
12098 fn drop_without_shutdown(mut self) {
12099 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12101 std::mem::forget(self);
12103 }
12104}
12105
12106impl FileResizeResponder {
12107 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12111 let _result = self.send_raw(result);
12112 if _result.is_err() {
12113 self.control_handle.shutdown();
12114 }
12115 self.drop_without_shutdown();
12116 _result
12117 }
12118
12119 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12121 let _result = self.send_raw(result);
12122 self.drop_without_shutdown();
12123 _result
12124 }
12125
12126 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12127 self.control_handle
12128 .inner
12129 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12130 result,
12131 self.tx_id,
12132 0x2b80825f0535743a,
12133 fidl::encoding::DynamicFlags::empty(),
12134 )
12135 }
12136}
12137
12138#[must_use = "FIDL methods require a response to be sent"]
12139#[derive(Debug)]
12140pub struct FileGetBackingMemoryResponder {
12141 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12142 tx_id: u32,
12143}
12144
12145impl std::ops::Drop for FileGetBackingMemoryResponder {
12149 fn drop(&mut self) {
12150 self.control_handle.shutdown();
12151 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12153 }
12154}
12155
12156impl fidl::endpoints::Responder for FileGetBackingMemoryResponder {
12157 type ControlHandle = FileControlHandle;
12158
12159 fn control_handle(&self) -> &FileControlHandle {
12160 &self.control_handle
12161 }
12162
12163 fn drop_without_shutdown(mut self) {
12164 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12166 std::mem::forget(self);
12168 }
12169}
12170
12171impl FileGetBackingMemoryResponder {
12172 pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12176 let _result = self.send_raw(result);
12177 if _result.is_err() {
12178 self.control_handle.shutdown();
12179 }
12180 self.drop_without_shutdown();
12181 _result
12182 }
12183
12184 pub fn send_no_shutdown_on_err(
12186 self,
12187 mut result: Result<fidl::Vmo, i32>,
12188 ) -> Result<(), fidl::Error> {
12189 let _result = self.send_raw(result);
12190 self.drop_without_shutdown();
12191 _result
12192 }
12193
12194 fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12195 self.control_handle
12196 .inner
12197 .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
12198 result.map(|vmo| (vmo,)),
12199 self.tx_id,
12200 0xa6a9e654cbf62b,
12201 fidl::encoding::DynamicFlags::empty(),
12202 )
12203 }
12204}
12205
12206#[must_use = "FIDL methods require a response to be sent"]
12207#[derive(Debug)]
12208pub struct FileAllocateResponder {
12209 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12210 tx_id: u32,
12211}
12212
12213impl std::ops::Drop for FileAllocateResponder {
12217 fn drop(&mut self) {
12218 self.control_handle.shutdown();
12219 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12221 }
12222}
12223
12224impl fidl::endpoints::Responder for FileAllocateResponder {
12225 type ControlHandle = FileControlHandle;
12226
12227 fn control_handle(&self) -> &FileControlHandle {
12228 &self.control_handle
12229 }
12230
12231 fn drop_without_shutdown(mut self) {
12232 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12234 std::mem::forget(self);
12236 }
12237}
12238
12239impl FileAllocateResponder {
12240 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12244 let _result = self.send_raw(result);
12245 if _result.is_err() {
12246 self.control_handle.shutdown();
12247 }
12248 self.drop_without_shutdown();
12249 _result
12250 }
12251
12252 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12254 let _result = self.send_raw(result);
12255 self.drop_without_shutdown();
12256 _result
12257 }
12258
12259 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12260 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12261 fidl::encoding::EmptyStruct,
12262 i32,
12263 >>(
12264 fidl::encoding::FlexibleResult::new(result),
12265 self.tx_id,
12266 0x77fa0c330b57fd2e,
12267 fidl::encoding::DynamicFlags::FLEXIBLE,
12268 )
12269 }
12270}
12271
12272#[must_use = "FIDL methods require a response to be sent"]
12273#[derive(Debug)]
12274pub struct FileEnableVerityResponder {
12275 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12276 tx_id: u32,
12277}
12278
12279impl std::ops::Drop for FileEnableVerityResponder {
12283 fn drop(&mut self) {
12284 self.control_handle.shutdown();
12285 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12287 }
12288}
12289
12290impl fidl::endpoints::Responder for FileEnableVerityResponder {
12291 type ControlHandle = FileControlHandle;
12292
12293 fn control_handle(&self) -> &FileControlHandle {
12294 &self.control_handle
12295 }
12296
12297 fn drop_without_shutdown(mut self) {
12298 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12300 std::mem::forget(self);
12302 }
12303}
12304
12305impl FileEnableVerityResponder {
12306 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12310 let _result = self.send_raw(result);
12311 if _result.is_err() {
12312 self.control_handle.shutdown();
12313 }
12314 self.drop_without_shutdown();
12315 _result
12316 }
12317
12318 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12320 let _result = self.send_raw(result);
12321 self.drop_without_shutdown();
12322 _result
12323 }
12324
12325 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12326 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12327 fidl::encoding::EmptyStruct,
12328 i32,
12329 >>(
12330 fidl::encoding::FlexibleResult::new(result),
12331 self.tx_id,
12332 0x2c421ec3faaeb8bb,
12333 fidl::encoding::DynamicFlags::FLEXIBLE,
12334 )
12335 }
12336}
12337
12338#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
12339pub struct LinkableMarker;
12340
12341impl fidl::endpoints::ProtocolMarker for LinkableMarker {
12342 type Proxy = LinkableProxy;
12343 type RequestStream = LinkableRequestStream;
12344 #[cfg(target_os = "fuchsia")]
12345 type SynchronousProxy = LinkableSynchronousProxy;
12346
12347 const DEBUG_NAME: &'static str = "(anonymous) Linkable";
12348}
12349pub type LinkableLinkIntoResult = Result<(), i32>;
12350
12351pub trait LinkableProxyInterface: Send + Sync {
12352 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
12353 + Send;
12354 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
12355}
12356#[derive(Debug)]
12357#[cfg(target_os = "fuchsia")]
12358pub struct LinkableSynchronousProxy {
12359 client: fidl::client::sync::Client,
12360}
12361
12362#[cfg(target_os = "fuchsia")]
12363impl fidl::endpoints::SynchronousProxy for LinkableSynchronousProxy {
12364 type Proxy = LinkableProxy;
12365 type Protocol = LinkableMarker;
12366
12367 fn from_channel(inner: fidl::Channel) -> Self {
12368 Self::new(inner)
12369 }
12370
12371 fn into_channel(self) -> fidl::Channel {
12372 self.client.into_channel()
12373 }
12374
12375 fn as_channel(&self) -> &fidl::Channel {
12376 self.client.as_channel()
12377 }
12378}
12379
12380#[cfg(target_os = "fuchsia")]
12381impl LinkableSynchronousProxy {
12382 pub fn new(channel: fidl::Channel) -> Self {
12383 Self { client: fidl::client::sync::Client::new(channel) }
12384 }
12385
12386 pub fn into_channel(self) -> fidl::Channel {
12387 self.client.into_channel()
12388 }
12389
12390 pub fn wait_for_event(
12393 &self,
12394 deadline: zx::MonotonicInstant,
12395 ) -> Result<LinkableEvent, fidl::Error> {
12396 LinkableEvent::decode(self.client.wait_for_event::<LinkableMarker>(deadline)?)
12397 }
12398
12399 pub fn r#link_into(
12422 &self,
12423 mut dst_parent_token: fidl::Event,
12424 mut dst: &str,
12425 ___deadline: zx::MonotonicInstant,
12426 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12427 let _response = self.client.send_query::<
12428 LinkableLinkIntoRequest,
12429 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12430 LinkableMarker,
12431 >(
12432 (dst_parent_token, dst,),
12433 0x54f3949246a03e74,
12434 fidl::encoding::DynamicFlags::empty(),
12435 ___deadline,
12436 )?;
12437 Ok(_response.map(|x| x))
12438 }
12439}
12440
12441#[cfg(target_os = "fuchsia")]
12442impl From<LinkableSynchronousProxy> for zx::NullableHandle {
12443 fn from(value: LinkableSynchronousProxy) -> Self {
12444 value.into_channel().into()
12445 }
12446}
12447
12448#[cfg(target_os = "fuchsia")]
12449impl From<fidl::Channel> for LinkableSynchronousProxy {
12450 fn from(value: fidl::Channel) -> Self {
12451 Self::new(value)
12452 }
12453}
12454
12455#[cfg(target_os = "fuchsia")]
12456impl fidl::endpoints::FromClient for LinkableSynchronousProxy {
12457 type Protocol = LinkableMarker;
12458
12459 fn from_client(value: fidl::endpoints::ClientEnd<LinkableMarker>) -> Self {
12460 Self::new(value.into_channel())
12461 }
12462}
12463
12464#[derive(Debug, Clone)]
12465pub struct LinkableProxy {
12466 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
12467}
12468
12469impl fidl::endpoints::Proxy for LinkableProxy {
12470 type Protocol = LinkableMarker;
12471
12472 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
12473 Self::new(inner)
12474 }
12475
12476 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
12477 self.client.into_channel().map_err(|client| Self { client })
12478 }
12479
12480 fn as_channel(&self) -> &::fidl::AsyncChannel {
12481 self.client.as_channel()
12482 }
12483}
12484
12485impl LinkableProxy {
12486 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
12488 let protocol_name = <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12489 Self { client: fidl::client::Client::new(channel, protocol_name) }
12490 }
12491
12492 pub fn take_event_stream(&self) -> LinkableEventStream {
12498 LinkableEventStream { event_receiver: self.client.take_event_receiver() }
12499 }
12500
12501 pub fn r#link_into(
12524 &self,
12525 mut dst_parent_token: fidl::Event,
12526 mut dst: &str,
12527 ) -> fidl::client::QueryResponseFut<
12528 LinkableLinkIntoResult,
12529 fidl::encoding::DefaultFuchsiaResourceDialect,
12530 > {
12531 LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
12532 }
12533}
12534
12535impl LinkableProxyInterface for LinkableProxy {
12536 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
12537 LinkableLinkIntoResult,
12538 fidl::encoding::DefaultFuchsiaResourceDialect,
12539 >;
12540 fn r#link_into(
12541 &self,
12542 mut dst_parent_token: fidl::Event,
12543 mut dst: &str,
12544 ) -> Self::LinkIntoResponseFut {
12545 fn _decode(
12546 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
12547 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12548 let _response = fidl::client::decode_transaction_body::<
12549 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12550 fidl::encoding::DefaultFuchsiaResourceDialect,
12551 0x54f3949246a03e74,
12552 >(_buf?)?;
12553 Ok(_response.map(|x| x))
12554 }
12555 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
12556 (dst_parent_token, dst),
12557 0x54f3949246a03e74,
12558 fidl::encoding::DynamicFlags::empty(),
12559 _decode,
12560 )
12561 }
12562}
12563
12564pub struct LinkableEventStream {
12565 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
12566}
12567
12568impl std::marker::Unpin for LinkableEventStream {}
12569
12570impl futures::stream::FusedStream for LinkableEventStream {
12571 fn is_terminated(&self) -> bool {
12572 self.event_receiver.is_terminated()
12573 }
12574}
12575
12576impl futures::Stream for LinkableEventStream {
12577 type Item = Result<LinkableEvent, fidl::Error>;
12578
12579 fn poll_next(
12580 mut self: std::pin::Pin<&mut Self>,
12581 cx: &mut std::task::Context<'_>,
12582 ) -> std::task::Poll<Option<Self::Item>> {
12583 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
12584 &mut self.event_receiver,
12585 cx
12586 )?) {
12587 Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
12588 None => std::task::Poll::Ready(None),
12589 }
12590 }
12591}
12592
12593#[derive(Debug)]
12594pub enum LinkableEvent {}
12595
12596impl LinkableEvent {
12597 fn decode(
12599 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
12600 ) -> Result<LinkableEvent, fidl::Error> {
12601 let (bytes, _handles) = buf.split_mut();
12602 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12603 debug_assert_eq!(tx_header.tx_id, 0);
12604 match tx_header.ordinal {
12605 _ => Err(fidl::Error::UnknownOrdinal {
12606 ordinal: tx_header.ordinal,
12607 protocol_name: <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12608 }),
12609 }
12610 }
12611}
12612
12613pub struct LinkableRequestStream {
12615 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12616 is_terminated: bool,
12617}
12618
12619impl std::marker::Unpin for LinkableRequestStream {}
12620
12621impl futures::stream::FusedStream for LinkableRequestStream {
12622 fn is_terminated(&self) -> bool {
12623 self.is_terminated
12624 }
12625}
12626
12627impl fidl::endpoints::RequestStream for LinkableRequestStream {
12628 type Protocol = LinkableMarker;
12629 type ControlHandle = LinkableControlHandle;
12630
12631 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
12632 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
12633 }
12634
12635 fn control_handle(&self) -> Self::ControlHandle {
12636 LinkableControlHandle { inner: self.inner.clone() }
12637 }
12638
12639 fn into_inner(
12640 self,
12641 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
12642 {
12643 (self.inner, self.is_terminated)
12644 }
12645
12646 fn from_inner(
12647 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12648 is_terminated: bool,
12649 ) -> Self {
12650 Self { inner, is_terminated }
12651 }
12652}
12653
12654impl futures::Stream for LinkableRequestStream {
12655 type Item = Result<LinkableRequest, fidl::Error>;
12656
12657 fn poll_next(
12658 mut self: std::pin::Pin<&mut Self>,
12659 cx: &mut std::task::Context<'_>,
12660 ) -> std::task::Poll<Option<Self::Item>> {
12661 let this = &mut *self;
12662 if this.inner.check_shutdown(cx) {
12663 this.is_terminated = true;
12664 return std::task::Poll::Ready(None);
12665 }
12666 if this.is_terminated {
12667 panic!("polled LinkableRequestStream after completion");
12668 }
12669 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
12670 |bytes, handles| {
12671 match this.inner.channel().read_etc(cx, bytes, handles) {
12672 std::task::Poll::Ready(Ok(())) => {}
12673 std::task::Poll::Pending => return std::task::Poll::Pending,
12674 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
12675 this.is_terminated = true;
12676 return std::task::Poll::Ready(None);
12677 }
12678 std::task::Poll::Ready(Err(e)) => {
12679 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
12680 e.into(),
12681 ))));
12682 }
12683 }
12684
12685 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12687
12688 std::task::Poll::Ready(Some(match header.ordinal {
12689 0x54f3949246a03e74 => {
12690 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12691 let mut req = fidl::new_empty!(
12692 LinkableLinkIntoRequest,
12693 fidl::encoding::DefaultFuchsiaResourceDialect
12694 );
12695 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
12696 let control_handle = LinkableControlHandle { inner: this.inner.clone() };
12697 Ok(LinkableRequest::LinkInto {
12698 dst_parent_token: req.dst_parent_token,
12699 dst: req.dst,
12700
12701 responder: LinkableLinkIntoResponder {
12702 control_handle: std::mem::ManuallyDrop::new(control_handle),
12703 tx_id: header.tx_id,
12704 },
12705 })
12706 }
12707 _ => Err(fidl::Error::UnknownOrdinal {
12708 ordinal: header.ordinal,
12709 protocol_name:
12710 <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12711 }),
12712 }))
12713 },
12714 )
12715 }
12716}
12717
12718#[derive(Debug)]
12719pub enum LinkableRequest {
12720 LinkInto { dst_parent_token: fidl::Event, dst: String, responder: LinkableLinkIntoResponder },
12743}
12744
12745impl LinkableRequest {
12746 #[allow(irrefutable_let_patterns)]
12747 pub fn into_link_into(self) -> Option<(fidl::Event, String, LinkableLinkIntoResponder)> {
12748 if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
12749 Some((dst_parent_token, dst, responder))
12750 } else {
12751 None
12752 }
12753 }
12754
12755 pub fn method_name(&self) -> &'static str {
12757 match *self {
12758 LinkableRequest::LinkInto { .. } => "link_into",
12759 }
12760 }
12761}
12762
12763#[derive(Debug, Clone)]
12764pub struct LinkableControlHandle {
12765 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12766}
12767
12768impl fidl::endpoints::ControlHandle for LinkableControlHandle {
12769 fn shutdown(&self) {
12770 self.inner.shutdown()
12771 }
12772
12773 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
12774 self.inner.shutdown_with_epitaph(status)
12775 }
12776
12777 fn is_closed(&self) -> bool {
12778 self.inner.channel().is_closed()
12779 }
12780 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
12781 self.inner.channel().on_closed()
12782 }
12783
12784 #[cfg(target_os = "fuchsia")]
12785 fn signal_peer(
12786 &self,
12787 clear_mask: zx::Signals,
12788 set_mask: zx::Signals,
12789 ) -> Result<(), zx_status::Status> {
12790 use fidl::Peered;
12791 self.inner.channel().signal_peer(clear_mask, set_mask)
12792 }
12793}
12794
12795impl LinkableControlHandle {}
12796
12797#[must_use = "FIDL methods require a response to be sent"]
12798#[derive(Debug)]
12799pub struct LinkableLinkIntoResponder {
12800 control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
12801 tx_id: u32,
12802}
12803
12804impl std::ops::Drop for LinkableLinkIntoResponder {
12808 fn drop(&mut self) {
12809 self.control_handle.shutdown();
12810 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12812 }
12813}
12814
12815impl fidl::endpoints::Responder for LinkableLinkIntoResponder {
12816 type ControlHandle = LinkableControlHandle;
12817
12818 fn control_handle(&self) -> &LinkableControlHandle {
12819 &self.control_handle
12820 }
12821
12822 fn drop_without_shutdown(mut self) {
12823 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12825 std::mem::forget(self);
12827 }
12828}
12829
12830impl LinkableLinkIntoResponder {
12831 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12835 let _result = self.send_raw(result);
12836 if _result.is_err() {
12837 self.control_handle.shutdown();
12838 }
12839 self.drop_without_shutdown();
12840 _result
12841 }
12842
12843 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12845 let _result = self.send_raw(result);
12846 self.drop_without_shutdown();
12847 _result
12848 }
12849
12850 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12851 self.control_handle
12852 .inner
12853 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12854 result,
12855 self.tx_id,
12856 0x54f3949246a03e74,
12857 fidl::encoding::DynamicFlags::empty(),
12858 )
12859 }
12860}
12861
12862#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
12863pub struct NodeMarker;
12864
12865impl fidl::endpoints::ProtocolMarker for NodeMarker {
12866 type Proxy = NodeProxy;
12867 type RequestStream = NodeRequestStream;
12868 #[cfg(target_os = "fuchsia")]
12869 type SynchronousProxy = NodeSynchronousProxy;
12870
12871 const DEBUG_NAME: &'static str = "fuchsia.io.Node";
12872}
12873impl fidl::endpoints::DiscoverableProtocolMarker for NodeMarker {}
12874pub type NodeGetFlagsResult = Result<Flags, i32>;
12875pub type NodeSetFlagsResult = Result<(), i32>;
12876pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
12877pub type NodeUpdateAttributesResult = Result<(), i32>;
12878pub type NodeSyncResult = Result<(), i32>;
12879pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
12880pub type NodeSetExtendedAttributeResult = Result<(), i32>;
12881pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
12882
12883pub trait NodeProxyInterface: Send + Sync {
12884 fn r#clone(
12885 &self,
12886 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
12887 ) -> Result<(), fidl::Error>;
12888 type CloseResponseFut: std::future::Future<
12889 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
12890 > + Send;
12891 fn r#close(&self) -> Self::CloseResponseFut;
12892 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
12893 fn r#query(&self) -> Self::QueryResponseFut;
12894 fn r#deprecated_clone(
12895 &self,
12896 flags: OpenFlags,
12897 object: fidl::endpoints::ServerEnd<NodeMarker>,
12898 ) -> Result<(), fidl::Error>;
12899 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
12900 + Send;
12901 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
12902 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
12903 fn r#deprecated_set_attr(
12904 &self,
12905 flags: NodeAttributeFlags,
12906 attributes: &NodeAttributes,
12907 ) -> Self::DeprecatedSetAttrResponseFut;
12908 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
12909 + Send;
12910 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
12911 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
12912 + Send;
12913 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
12914 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
12915 + Send;
12916 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
12917 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
12918 + Send;
12919 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
12920 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
12921 + Send;
12922 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
12923 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
12924 + Send;
12925 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
12926 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
12927 + Send;
12928 fn r#update_attributes(
12929 &self,
12930 payload: &MutableNodeAttributes,
12931 ) -> Self::UpdateAttributesResponseFut;
12932 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
12933 fn r#sync(&self) -> Self::SyncResponseFut;
12934 fn r#list_extended_attributes(
12935 &self,
12936 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
12937 ) -> Result<(), fidl::Error>;
12938 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
12939 + Send;
12940 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
12941 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
12942 + Send;
12943 fn r#set_extended_attribute(
12944 &self,
12945 name: &[u8],
12946 value: ExtendedAttributeValue,
12947 mode: SetExtendedAttributeMode,
12948 ) -> Self::SetExtendedAttributeResponseFut;
12949 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
12950 + Send;
12951 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
12952}
12953#[derive(Debug)]
12954#[cfg(target_os = "fuchsia")]
12955pub struct NodeSynchronousProxy {
12956 client: fidl::client::sync::Client,
12957}
12958
12959#[cfg(target_os = "fuchsia")]
12960impl fidl::endpoints::SynchronousProxy for NodeSynchronousProxy {
12961 type Proxy = NodeProxy;
12962 type Protocol = NodeMarker;
12963
12964 fn from_channel(inner: fidl::Channel) -> Self {
12965 Self::new(inner)
12966 }
12967
12968 fn into_channel(self) -> fidl::Channel {
12969 self.client.into_channel()
12970 }
12971
12972 fn as_channel(&self) -> &fidl::Channel {
12973 self.client.as_channel()
12974 }
12975}
12976
12977#[cfg(target_os = "fuchsia")]
12978impl NodeSynchronousProxy {
12979 pub fn new(channel: fidl::Channel) -> Self {
12980 Self { client: fidl::client::sync::Client::new(channel) }
12981 }
12982
12983 pub fn into_channel(self) -> fidl::Channel {
12984 self.client.into_channel()
12985 }
12986
12987 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<NodeEvent, fidl::Error> {
12990 NodeEvent::decode(self.client.wait_for_event::<NodeMarker>(deadline)?)
12991 }
12992
12993 pub fn r#clone(
12994 &self,
12995 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
12996 ) -> Result<(), fidl::Error> {
12997 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
12998 (request,),
12999 0x20d8a7aba2168a79,
13000 fidl::encoding::DynamicFlags::empty(),
13001 )
13002 }
13003
13004 pub fn r#close(
13015 &self,
13016 ___deadline: zx::MonotonicInstant,
13017 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
13018 let _response = self.client.send_query::<
13019 fidl::encoding::EmptyPayload,
13020 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13021 NodeMarker,
13022 >(
13023 (),
13024 0x5ac5d459ad7f657e,
13025 fidl::encoding::DynamicFlags::empty(),
13026 ___deadline,
13027 )?;
13028 Ok(_response.map(|x| x))
13029 }
13030
13031 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
13032 let _response = self.client.send_query::<
13033 fidl::encoding::EmptyPayload,
13034 fidl_fuchsia_unknown::QueryableQueryResponse,
13035 NodeMarker,
13036 >(
13037 (),
13038 0x2658edee9decfc06,
13039 fidl::encoding::DynamicFlags::empty(),
13040 ___deadline,
13041 )?;
13042 Ok(_response.protocol)
13043 }
13044
13045 pub fn r#deprecated_clone(
13047 &self,
13048 mut flags: OpenFlags,
13049 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13050 ) -> Result<(), fidl::Error> {
13051 self.client.send::<NodeDeprecatedCloneRequest>(
13052 (flags, object),
13053 0x5a61678f293ce16f,
13054 fidl::encoding::DynamicFlags::FLEXIBLE,
13055 )
13056 }
13057
13058 pub fn r#deprecated_get_attr(
13060 &self,
13061 ___deadline: zx::MonotonicInstant,
13062 ) -> Result<(i32, NodeAttributes), fidl::Error> {
13063 let _response = self
13064 .client
13065 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse, NodeMarker>(
13066 (),
13067 0x78985e216314dafd,
13068 fidl::encoding::DynamicFlags::empty(),
13069 ___deadline,
13070 )?;
13071 Ok((_response.s, _response.attributes))
13072 }
13073
13074 pub fn r#deprecated_set_attr(
13076 &self,
13077 mut flags: NodeAttributeFlags,
13078 mut attributes: &NodeAttributes,
13079 ___deadline: zx::MonotonicInstant,
13080 ) -> Result<i32, fidl::Error> {
13081 let _response = self
13082 .client
13083 .send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse, NodeMarker>(
13084 (flags, attributes),
13085 0x4186c0f40d938f46,
13086 fidl::encoding::DynamicFlags::empty(),
13087 ___deadline,
13088 )?;
13089 Ok(_response.s)
13090 }
13091
13092 pub fn r#deprecated_get_flags(
13094 &self,
13095 ___deadline: zx::MonotonicInstant,
13096 ) -> Result<(i32, OpenFlags), fidl::Error> {
13097 let _response = self
13098 .client
13099 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse, NodeMarker>(
13100 (),
13101 0x5b88fffb8eda3aa1,
13102 fidl::encoding::DynamicFlags::empty(),
13103 ___deadline,
13104 )?;
13105 Ok((_response.s, _response.flags))
13106 }
13107
13108 pub fn r#deprecated_set_flags(
13110 &self,
13111 mut flags: OpenFlags,
13112 ___deadline: zx::MonotonicInstant,
13113 ) -> Result<i32, fidl::Error> {
13114 let _response = self.client.send_query::<
13115 NodeDeprecatedSetFlagsRequest,
13116 NodeDeprecatedSetFlagsResponse,
13117 NodeMarker,
13118 >(
13119 (flags,),
13120 0x5295b76c71fde733,
13121 fidl::encoding::DynamicFlags::empty(),
13122 ___deadline,
13123 )?;
13124 Ok(_response.s)
13125 }
13126
13127 pub fn r#get_flags(
13136 &self,
13137 ___deadline: zx::MonotonicInstant,
13138 ) -> Result<NodeGetFlagsResult, fidl::Error> {
13139 let _response = self.client.send_query::<
13140 fidl::encoding::EmptyPayload,
13141 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
13142 NodeMarker,
13143 >(
13144 (),
13145 0x176eb318f64ec23,
13146 fidl::encoding::DynamicFlags::FLEXIBLE,
13147 ___deadline,
13148 )?
13149 .into_result::<NodeMarker>("get_flags")?;
13150 Ok(_response.map(|x| x.flags))
13151 }
13152
13153 pub fn r#set_flags(
13163 &self,
13164 mut flags: Flags,
13165 ___deadline: zx::MonotonicInstant,
13166 ) -> Result<NodeSetFlagsResult, fidl::Error> {
13167 let _response = self.client.send_query::<
13168 NodeSetFlagsRequest,
13169 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
13170 NodeMarker,
13171 >(
13172 (flags,),
13173 0x55a8028685791ea8,
13174 fidl::encoding::DynamicFlags::FLEXIBLE,
13175 ___deadline,
13176 )?
13177 .into_result::<NodeMarker>("set_flags")?;
13178 Ok(_response.map(|x| x))
13179 }
13180
13181 pub fn r#query_filesystem(
13185 &self,
13186 ___deadline: zx::MonotonicInstant,
13187 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
13188 let _response = self
13189 .client
13190 .send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse, NodeMarker>(
13191 (),
13192 0x6f344a1c6b0a0610,
13193 fidl::encoding::DynamicFlags::empty(),
13194 ___deadline,
13195 )?;
13196 Ok((_response.s, _response.info))
13197 }
13198
13199 pub fn r#get_attributes(
13213 &self,
13214 mut query: NodeAttributesQuery,
13215 ___deadline: zx::MonotonicInstant,
13216 ) -> Result<NodeGetAttributesResult, fidl::Error> {
13217 let _response = self.client.send_query::<
13218 NodeGetAttributesRequest,
13219 fidl::encoding::ResultType<NodeAttributes2, i32>,
13220 NodeMarker,
13221 >(
13222 (query,),
13223 0x3d4396a638ea053b,
13224 fidl::encoding::DynamicFlags::empty(),
13225 ___deadline,
13226 )?;
13227 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
13228 }
13229
13230 pub fn r#update_attributes(
13239 &self,
13240 mut payload: &MutableNodeAttributes,
13241 ___deadline: zx::MonotonicInstant,
13242 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
13243 let _response = self.client.send_query::<
13244 MutableNodeAttributes,
13245 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13246 NodeMarker,
13247 >(
13248 payload,
13249 0x3308c1da5a89bf08,
13250 fidl::encoding::DynamicFlags::empty(),
13251 ___deadline,
13252 )?;
13253 Ok(_response.map(|x| x))
13254 }
13255
13256 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
13266 let _response = self.client.send_query::<
13267 fidl::encoding::EmptyPayload,
13268 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13269 NodeMarker,
13270 >(
13271 (),
13272 0x2c5c27ca0ab5dc49,
13273 fidl::encoding::DynamicFlags::empty(),
13274 ___deadline,
13275 )?;
13276 Ok(_response.map(|x| x))
13277 }
13278
13279 pub fn r#list_extended_attributes(
13288 &self,
13289 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13290 ) -> Result<(), fidl::Error> {
13291 self.client.send::<NodeListExtendedAttributesRequest>(
13292 (iterator,),
13293 0x4b61033de007fcd0,
13294 fidl::encoding::DynamicFlags::empty(),
13295 )
13296 }
13297
13298 pub fn r#get_extended_attribute(
13305 &self,
13306 mut name: &[u8],
13307 ___deadline: zx::MonotonicInstant,
13308 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
13309 let _response = self.client.send_query::<
13310 NodeGetExtendedAttributeRequest,
13311 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
13312 NodeMarker,
13313 >(
13314 (name,),
13315 0x45ffa3ccfdeb76db,
13316 fidl::encoding::DynamicFlags::empty(),
13317 ___deadline,
13318 )?;
13319 Ok(_response.map(|x| x))
13320 }
13321
13322 pub fn r#set_extended_attribute(
13330 &self,
13331 mut name: &[u8],
13332 mut value: ExtendedAttributeValue,
13333 mut mode: SetExtendedAttributeMode,
13334 ___deadline: zx::MonotonicInstant,
13335 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
13336 let _response = self.client.send_query::<
13337 NodeSetExtendedAttributeRequest,
13338 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13339 NodeMarker,
13340 >(
13341 (name, &mut value, mode,),
13342 0x4a951362f681f23c,
13343 fidl::encoding::DynamicFlags::empty(),
13344 ___deadline,
13345 )?;
13346 Ok(_response.map(|x| x))
13347 }
13348
13349 pub fn r#remove_extended_attribute(
13355 &self,
13356 mut name: &[u8],
13357 ___deadline: zx::MonotonicInstant,
13358 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
13359 let _response = self.client.send_query::<
13360 NodeRemoveExtendedAttributeRequest,
13361 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13362 NodeMarker,
13363 >(
13364 (name,),
13365 0x7a0b9f3a9bf9032d,
13366 fidl::encoding::DynamicFlags::empty(),
13367 ___deadline,
13368 )?;
13369 Ok(_response.map(|x| x))
13370 }
13371}
13372
13373#[cfg(target_os = "fuchsia")]
13374impl From<NodeSynchronousProxy> for zx::NullableHandle {
13375 fn from(value: NodeSynchronousProxy) -> Self {
13376 value.into_channel().into()
13377 }
13378}
13379
13380#[cfg(target_os = "fuchsia")]
13381impl From<fidl::Channel> for NodeSynchronousProxy {
13382 fn from(value: fidl::Channel) -> Self {
13383 Self::new(value)
13384 }
13385}
13386
13387#[cfg(target_os = "fuchsia")]
13388impl fidl::endpoints::FromClient for NodeSynchronousProxy {
13389 type Protocol = NodeMarker;
13390
13391 fn from_client(value: fidl::endpoints::ClientEnd<NodeMarker>) -> Self {
13392 Self::new(value.into_channel())
13393 }
13394}
13395
13396#[derive(Debug, Clone)]
13397pub struct NodeProxy {
13398 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
13399}
13400
13401impl fidl::endpoints::Proxy for NodeProxy {
13402 type Protocol = NodeMarker;
13403
13404 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
13405 Self::new(inner)
13406 }
13407
13408 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
13409 self.client.into_channel().map_err(|client| Self { client })
13410 }
13411
13412 fn as_channel(&self) -> &::fidl::AsyncChannel {
13413 self.client.as_channel()
13414 }
13415}
13416
13417impl NodeProxy {
13418 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
13420 let protocol_name = <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
13421 Self { client: fidl::client::Client::new(channel, protocol_name) }
13422 }
13423
13424 pub fn take_event_stream(&self) -> NodeEventStream {
13430 NodeEventStream { event_receiver: self.client.take_event_receiver() }
13431 }
13432
13433 pub fn r#clone(
13434 &self,
13435 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13436 ) -> Result<(), fidl::Error> {
13437 NodeProxyInterface::r#clone(self, request)
13438 }
13439
13440 pub fn r#close(
13451 &self,
13452 ) -> fidl::client::QueryResponseFut<
13453 fidl_fuchsia_unknown::CloseableCloseResult,
13454 fidl::encoding::DefaultFuchsiaResourceDialect,
13455 > {
13456 NodeProxyInterface::r#close(self)
13457 }
13458
13459 pub fn r#query(
13460 &self,
13461 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
13462 {
13463 NodeProxyInterface::r#query(self)
13464 }
13465
13466 pub fn r#deprecated_clone(
13468 &self,
13469 mut flags: OpenFlags,
13470 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13471 ) -> Result<(), fidl::Error> {
13472 NodeProxyInterface::r#deprecated_clone(self, flags, object)
13473 }
13474
13475 pub fn r#deprecated_get_attr(
13477 &self,
13478 ) -> fidl::client::QueryResponseFut<
13479 (i32, NodeAttributes),
13480 fidl::encoding::DefaultFuchsiaResourceDialect,
13481 > {
13482 NodeProxyInterface::r#deprecated_get_attr(self)
13483 }
13484
13485 pub fn r#deprecated_set_attr(
13487 &self,
13488 mut flags: NodeAttributeFlags,
13489 mut attributes: &NodeAttributes,
13490 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13491 NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
13492 }
13493
13494 pub fn r#deprecated_get_flags(
13496 &self,
13497 ) -> fidl::client::QueryResponseFut<
13498 (i32, OpenFlags),
13499 fidl::encoding::DefaultFuchsiaResourceDialect,
13500 > {
13501 NodeProxyInterface::r#deprecated_get_flags(self)
13502 }
13503
13504 pub fn r#deprecated_set_flags(
13506 &self,
13507 mut flags: OpenFlags,
13508 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13509 NodeProxyInterface::r#deprecated_set_flags(self, flags)
13510 }
13511
13512 pub fn r#get_flags(
13521 &self,
13522 ) -> fidl::client::QueryResponseFut<
13523 NodeGetFlagsResult,
13524 fidl::encoding::DefaultFuchsiaResourceDialect,
13525 > {
13526 NodeProxyInterface::r#get_flags(self)
13527 }
13528
13529 pub fn r#set_flags(
13539 &self,
13540 mut flags: Flags,
13541 ) -> fidl::client::QueryResponseFut<
13542 NodeSetFlagsResult,
13543 fidl::encoding::DefaultFuchsiaResourceDialect,
13544 > {
13545 NodeProxyInterface::r#set_flags(self, flags)
13546 }
13547
13548 pub fn r#query_filesystem(
13552 &self,
13553 ) -> fidl::client::QueryResponseFut<
13554 (i32, Option<Box<FilesystemInfo>>),
13555 fidl::encoding::DefaultFuchsiaResourceDialect,
13556 > {
13557 NodeProxyInterface::r#query_filesystem(self)
13558 }
13559
13560 pub fn r#get_attributes(
13574 &self,
13575 mut query: NodeAttributesQuery,
13576 ) -> fidl::client::QueryResponseFut<
13577 NodeGetAttributesResult,
13578 fidl::encoding::DefaultFuchsiaResourceDialect,
13579 > {
13580 NodeProxyInterface::r#get_attributes(self, query)
13581 }
13582
13583 pub fn r#update_attributes(
13592 &self,
13593 mut payload: &MutableNodeAttributes,
13594 ) -> fidl::client::QueryResponseFut<
13595 NodeUpdateAttributesResult,
13596 fidl::encoding::DefaultFuchsiaResourceDialect,
13597 > {
13598 NodeProxyInterface::r#update_attributes(self, payload)
13599 }
13600
13601 pub fn r#sync(
13611 &self,
13612 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
13613 {
13614 NodeProxyInterface::r#sync(self)
13615 }
13616
13617 pub fn r#list_extended_attributes(
13626 &self,
13627 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13628 ) -> Result<(), fidl::Error> {
13629 NodeProxyInterface::r#list_extended_attributes(self, iterator)
13630 }
13631
13632 pub fn r#get_extended_attribute(
13639 &self,
13640 mut name: &[u8],
13641 ) -> fidl::client::QueryResponseFut<
13642 NodeGetExtendedAttributeResult,
13643 fidl::encoding::DefaultFuchsiaResourceDialect,
13644 > {
13645 NodeProxyInterface::r#get_extended_attribute(self, name)
13646 }
13647
13648 pub fn r#set_extended_attribute(
13656 &self,
13657 mut name: &[u8],
13658 mut value: ExtendedAttributeValue,
13659 mut mode: SetExtendedAttributeMode,
13660 ) -> fidl::client::QueryResponseFut<
13661 NodeSetExtendedAttributeResult,
13662 fidl::encoding::DefaultFuchsiaResourceDialect,
13663 > {
13664 NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
13665 }
13666
13667 pub fn r#remove_extended_attribute(
13673 &self,
13674 mut name: &[u8],
13675 ) -> fidl::client::QueryResponseFut<
13676 NodeRemoveExtendedAttributeResult,
13677 fidl::encoding::DefaultFuchsiaResourceDialect,
13678 > {
13679 NodeProxyInterface::r#remove_extended_attribute(self, name)
13680 }
13681}
13682
13683impl NodeProxyInterface for NodeProxy {
13684 fn r#clone(
13685 &self,
13686 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13687 ) -> Result<(), fidl::Error> {
13688 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
13689 (request,),
13690 0x20d8a7aba2168a79,
13691 fidl::encoding::DynamicFlags::empty(),
13692 )
13693 }
13694
13695 type CloseResponseFut = fidl::client::QueryResponseFut<
13696 fidl_fuchsia_unknown::CloseableCloseResult,
13697 fidl::encoding::DefaultFuchsiaResourceDialect,
13698 >;
13699 fn r#close(&self) -> Self::CloseResponseFut {
13700 fn _decode(
13701 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13702 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
13703 let _response = fidl::client::decode_transaction_body::<
13704 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13705 fidl::encoding::DefaultFuchsiaResourceDialect,
13706 0x5ac5d459ad7f657e,
13707 >(_buf?)?;
13708 Ok(_response.map(|x| x))
13709 }
13710 self.client.send_query_and_decode::<
13711 fidl::encoding::EmptyPayload,
13712 fidl_fuchsia_unknown::CloseableCloseResult,
13713 >(
13714 (),
13715 0x5ac5d459ad7f657e,
13716 fidl::encoding::DynamicFlags::empty(),
13717 _decode,
13718 )
13719 }
13720
13721 type QueryResponseFut =
13722 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
13723 fn r#query(&self) -> Self::QueryResponseFut {
13724 fn _decode(
13725 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13726 ) -> Result<Vec<u8>, fidl::Error> {
13727 let _response = fidl::client::decode_transaction_body::<
13728 fidl_fuchsia_unknown::QueryableQueryResponse,
13729 fidl::encoding::DefaultFuchsiaResourceDialect,
13730 0x2658edee9decfc06,
13731 >(_buf?)?;
13732 Ok(_response.protocol)
13733 }
13734 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
13735 (),
13736 0x2658edee9decfc06,
13737 fidl::encoding::DynamicFlags::empty(),
13738 _decode,
13739 )
13740 }
13741
13742 fn r#deprecated_clone(
13743 &self,
13744 mut flags: OpenFlags,
13745 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13746 ) -> Result<(), fidl::Error> {
13747 self.client.send::<NodeDeprecatedCloneRequest>(
13748 (flags, object),
13749 0x5a61678f293ce16f,
13750 fidl::encoding::DynamicFlags::FLEXIBLE,
13751 )
13752 }
13753
13754 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
13755 (i32, NodeAttributes),
13756 fidl::encoding::DefaultFuchsiaResourceDialect,
13757 >;
13758 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
13759 fn _decode(
13760 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13761 ) -> Result<(i32, NodeAttributes), fidl::Error> {
13762 let _response = fidl::client::decode_transaction_body::<
13763 NodeDeprecatedGetAttrResponse,
13764 fidl::encoding::DefaultFuchsiaResourceDialect,
13765 0x78985e216314dafd,
13766 >(_buf?)?;
13767 Ok((_response.s, _response.attributes))
13768 }
13769 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
13770 (),
13771 0x78985e216314dafd,
13772 fidl::encoding::DynamicFlags::empty(),
13773 _decode,
13774 )
13775 }
13776
13777 type DeprecatedSetAttrResponseFut =
13778 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
13779 fn r#deprecated_set_attr(
13780 &self,
13781 mut flags: NodeAttributeFlags,
13782 mut attributes: &NodeAttributes,
13783 ) -> Self::DeprecatedSetAttrResponseFut {
13784 fn _decode(
13785 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13786 ) -> Result<i32, fidl::Error> {
13787 let _response = fidl::client::decode_transaction_body::<
13788 NodeDeprecatedSetAttrResponse,
13789 fidl::encoding::DefaultFuchsiaResourceDialect,
13790 0x4186c0f40d938f46,
13791 >(_buf?)?;
13792 Ok(_response.s)
13793 }
13794 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
13795 (flags, attributes),
13796 0x4186c0f40d938f46,
13797 fidl::encoding::DynamicFlags::empty(),
13798 _decode,
13799 )
13800 }
13801
13802 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
13803 (i32, OpenFlags),
13804 fidl::encoding::DefaultFuchsiaResourceDialect,
13805 >;
13806 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
13807 fn _decode(
13808 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13809 ) -> Result<(i32, OpenFlags), fidl::Error> {
13810 let _response = fidl::client::decode_transaction_body::<
13811 NodeDeprecatedGetFlagsResponse,
13812 fidl::encoding::DefaultFuchsiaResourceDialect,
13813 0x5b88fffb8eda3aa1,
13814 >(_buf?)?;
13815 Ok((_response.s, _response.flags))
13816 }
13817 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
13818 (),
13819 0x5b88fffb8eda3aa1,
13820 fidl::encoding::DynamicFlags::empty(),
13821 _decode,
13822 )
13823 }
13824
13825 type DeprecatedSetFlagsResponseFut =
13826 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
13827 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
13828 fn _decode(
13829 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13830 ) -> Result<i32, fidl::Error> {
13831 let _response = fidl::client::decode_transaction_body::<
13832 NodeDeprecatedSetFlagsResponse,
13833 fidl::encoding::DefaultFuchsiaResourceDialect,
13834 0x5295b76c71fde733,
13835 >(_buf?)?;
13836 Ok(_response.s)
13837 }
13838 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
13839 (flags,),
13840 0x5295b76c71fde733,
13841 fidl::encoding::DynamicFlags::empty(),
13842 _decode,
13843 )
13844 }
13845
13846 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
13847 NodeGetFlagsResult,
13848 fidl::encoding::DefaultFuchsiaResourceDialect,
13849 >;
13850 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
13851 fn _decode(
13852 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13853 ) -> Result<NodeGetFlagsResult, fidl::Error> {
13854 let _response = fidl::client::decode_transaction_body::<
13855 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
13856 fidl::encoding::DefaultFuchsiaResourceDialect,
13857 0x176eb318f64ec23,
13858 >(_buf?)?
13859 .into_result::<NodeMarker>("get_flags")?;
13860 Ok(_response.map(|x| x.flags))
13861 }
13862 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
13863 (),
13864 0x176eb318f64ec23,
13865 fidl::encoding::DynamicFlags::FLEXIBLE,
13866 _decode,
13867 )
13868 }
13869
13870 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
13871 NodeSetFlagsResult,
13872 fidl::encoding::DefaultFuchsiaResourceDialect,
13873 >;
13874 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
13875 fn _decode(
13876 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13877 ) -> Result<NodeSetFlagsResult, fidl::Error> {
13878 let _response = fidl::client::decode_transaction_body::<
13879 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
13880 fidl::encoding::DefaultFuchsiaResourceDialect,
13881 0x55a8028685791ea8,
13882 >(_buf?)?
13883 .into_result::<NodeMarker>("set_flags")?;
13884 Ok(_response.map(|x| x))
13885 }
13886 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
13887 (flags,),
13888 0x55a8028685791ea8,
13889 fidl::encoding::DynamicFlags::FLEXIBLE,
13890 _decode,
13891 )
13892 }
13893
13894 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
13895 (i32, Option<Box<FilesystemInfo>>),
13896 fidl::encoding::DefaultFuchsiaResourceDialect,
13897 >;
13898 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
13899 fn _decode(
13900 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13901 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
13902 let _response = fidl::client::decode_transaction_body::<
13903 NodeQueryFilesystemResponse,
13904 fidl::encoding::DefaultFuchsiaResourceDialect,
13905 0x6f344a1c6b0a0610,
13906 >(_buf?)?;
13907 Ok((_response.s, _response.info))
13908 }
13909 self.client.send_query_and_decode::<
13910 fidl::encoding::EmptyPayload,
13911 (i32, Option<Box<FilesystemInfo>>),
13912 >(
13913 (),
13914 0x6f344a1c6b0a0610,
13915 fidl::encoding::DynamicFlags::empty(),
13916 _decode,
13917 )
13918 }
13919
13920 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
13921 NodeGetAttributesResult,
13922 fidl::encoding::DefaultFuchsiaResourceDialect,
13923 >;
13924 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
13925 fn _decode(
13926 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13927 ) -> Result<NodeGetAttributesResult, fidl::Error> {
13928 let _response = fidl::client::decode_transaction_body::<
13929 fidl::encoding::ResultType<NodeAttributes2, i32>,
13930 fidl::encoding::DefaultFuchsiaResourceDialect,
13931 0x3d4396a638ea053b,
13932 >(_buf?)?;
13933 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
13934 }
13935 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
13936 (query,),
13937 0x3d4396a638ea053b,
13938 fidl::encoding::DynamicFlags::empty(),
13939 _decode,
13940 )
13941 }
13942
13943 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
13944 NodeUpdateAttributesResult,
13945 fidl::encoding::DefaultFuchsiaResourceDialect,
13946 >;
13947 fn r#update_attributes(
13948 &self,
13949 mut payload: &MutableNodeAttributes,
13950 ) -> Self::UpdateAttributesResponseFut {
13951 fn _decode(
13952 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13953 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
13954 let _response = fidl::client::decode_transaction_body::<
13955 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13956 fidl::encoding::DefaultFuchsiaResourceDialect,
13957 0x3308c1da5a89bf08,
13958 >(_buf?)?;
13959 Ok(_response.map(|x| x))
13960 }
13961 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
13962 payload,
13963 0x3308c1da5a89bf08,
13964 fidl::encoding::DynamicFlags::empty(),
13965 _decode,
13966 )
13967 }
13968
13969 type SyncResponseFut = fidl::client::QueryResponseFut<
13970 NodeSyncResult,
13971 fidl::encoding::DefaultFuchsiaResourceDialect,
13972 >;
13973 fn r#sync(&self) -> Self::SyncResponseFut {
13974 fn _decode(
13975 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13976 ) -> Result<NodeSyncResult, fidl::Error> {
13977 let _response = fidl::client::decode_transaction_body::<
13978 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13979 fidl::encoding::DefaultFuchsiaResourceDialect,
13980 0x2c5c27ca0ab5dc49,
13981 >(_buf?)?;
13982 Ok(_response.map(|x| x))
13983 }
13984 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
13985 (),
13986 0x2c5c27ca0ab5dc49,
13987 fidl::encoding::DynamicFlags::empty(),
13988 _decode,
13989 )
13990 }
13991
13992 fn r#list_extended_attributes(
13993 &self,
13994 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13995 ) -> Result<(), fidl::Error> {
13996 self.client.send::<NodeListExtendedAttributesRequest>(
13997 (iterator,),
13998 0x4b61033de007fcd0,
13999 fidl::encoding::DynamicFlags::empty(),
14000 )
14001 }
14002
14003 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14004 NodeGetExtendedAttributeResult,
14005 fidl::encoding::DefaultFuchsiaResourceDialect,
14006 >;
14007 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
14008 fn _decode(
14009 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14010 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
14011 let _response = fidl::client::decode_transaction_body::<
14012 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
14013 fidl::encoding::DefaultFuchsiaResourceDialect,
14014 0x45ffa3ccfdeb76db,
14015 >(_buf?)?;
14016 Ok(_response.map(|x| x))
14017 }
14018 self.client.send_query_and_decode::<
14019 NodeGetExtendedAttributeRequest,
14020 NodeGetExtendedAttributeResult,
14021 >(
14022 (name,),
14023 0x45ffa3ccfdeb76db,
14024 fidl::encoding::DynamicFlags::empty(),
14025 _decode,
14026 )
14027 }
14028
14029 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14030 NodeSetExtendedAttributeResult,
14031 fidl::encoding::DefaultFuchsiaResourceDialect,
14032 >;
14033 fn r#set_extended_attribute(
14034 &self,
14035 mut name: &[u8],
14036 mut value: ExtendedAttributeValue,
14037 mut mode: SetExtendedAttributeMode,
14038 ) -> Self::SetExtendedAttributeResponseFut {
14039 fn _decode(
14040 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14041 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
14042 let _response = fidl::client::decode_transaction_body::<
14043 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14044 fidl::encoding::DefaultFuchsiaResourceDialect,
14045 0x4a951362f681f23c,
14046 >(_buf?)?;
14047 Ok(_response.map(|x| x))
14048 }
14049 self.client.send_query_and_decode::<
14050 NodeSetExtendedAttributeRequest,
14051 NodeSetExtendedAttributeResult,
14052 >(
14053 (name, &mut value, mode,),
14054 0x4a951362f681f23c,
14055 fidl::encoding::DynamicFlags::empty(),
14056 _decode,
14057 )
14058 }
14059
14060 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14061 NodeRemoveExtendedAttributeResult,
14062 fidl::encoding::DefaultFuchsiaResourceDialect,
14063 >;
14064 fn r#remove_extended_attribute(
14065 &self,
14066 mut name: &[u8],
14067 ) -> Self::RemoveExtendedAttributeResponseFut {
14068 fn _decode(
14069 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14070 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
14071 let _response = fidl::client::decode_transaction_body::<
14072 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14073 fidl::encoding::DefaultFuchsiaResourceDialect,
14074 0x7a0b9f3a9bf9032d,
14075 >(_buf?)?;
14076 Ok(_response.map(|x| x))
14077 }
14078 self.client.send_query_and_decode::<
14079 NodeRemoveExtendedAttributeRequest,
14080 NodeRemoveExtendedAttributeResult,
14081 >(
14082 (name,),
14083 0x7a0b9f3a9bf9032d,
14084 fidl::encoding::DynamicFlags::empty(),
14085 _decode,
14086 )
14087 }
14088}
14089
14090pub struct NodeEventStream {
14091 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
14092}
14093
14094impl std::marker::Unpin for NodeEventStream {}
14095
14096impl futures::stream::FusedStream for NodeEventStream {
14097 fn is_terminated(&self) -> bool {
14098 self.event_receiver.is_terminated()
14099 }
14100}
14101
14102impl futures::Stream for NodeEventStream {
14103 type Item = Result<NodeEvent, fidl::Error>;
14104
14105 fn poll_next(
14106 mut self: std::pin::Pin<&mut Self>,
14107 cx: &mut std::task::Context<'_>,
14108 ) -> std::task::Poll<Option<Self::Item>> {
14109 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
14110 &mut self.event_receiver,
14111 cx
14112 )?) {
14113 Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
14114 None => std::task::Poll::Ready(None),
14115 }
14116 }
14117}
14118
14119#[derive(Debug)]
14120pub enum NodeEvent {
14121 OnOpen_ {
14122 s: i32,
14123 info: Option<Box<NodeInfoDeprecated>>,
14124 },
14125 OnRepresentation {
14126 payload: Representation,
14127 },
14128 #[non_exhaustive]
14129 _UnknownEvent {
14130 ordinal: u64,
14132 },
14133}
14134
14135impl NodeEvent {
14136 #[allow(irrefutable_let_patterns)]
14137 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
14138 if let NodeEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
14139 }
14140 #[allow(irrefutable_let_patterns)]
14141 pub fn into_on_representation(self) -> Option<Representation> {
14142 if let NodeEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
14143 }
14144
14145 fn decode(
14147 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
14148 ) -> Result<NodeEvent, fidl::Error> {
14149 let (bytes, _handles) = buf.split_mut();
14150 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14151 debug_assert_eq!(tx_header.tx_id, 0);
14152 match tx_header.ordinal {
14153 0x7fc7bbb1dbfd1972 => {
14154 let mut out = fidl::new_empty!(
14155 NodeOnOpenRequest,
14156 fidl::encoding::DefaultFuchsiaResourceDialect
14157 );
14158 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
14159 Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
14160 }
14161 0x5cb40567d80a510c => {
14162 let mut out =
14163 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
14164 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
14165 Ok((NodeEvent::OnRepresentation { payload: out }))
14166 }
14167 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
14168 Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
14169 }
14170 _ => Err(fidl::Error::UnknownOrdinal {
14171 ordinal: tx_header.ordinal,
14172 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14173 }),
14174 }
14175 }
14176}
14177
14178pub struct NodeRequestStream {
14180 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14181 is_terminated: bool,
14182}
14183
14184impl std::marker::Unpin for NodeRequestStream {}
14185
14186impl futures::stream::FusedStream for NodeRequestStream {
14187 fn is_terminated(&self) -> bool {
14188 self.is_terminated
14189 }
14190}
14191
14192impl fidl::endpoints::RequestStream for NodeRequestStream {
14193 type Protocol = NodeMarker;
14194 type ControlHandle = NodeControlHandle;
14195
14196 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
14197 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14198 }
14199
14200 fn control_handle(&self) -> Self::ControlHandle {
14201 NodeControlHandle { inner: self.inner.clone() }
14202 }
14203
14204 fn into_inner(
14205 self,
14206 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
14207 {
14208 (self.inner, self.is_terminated)
14209 }
14210
14211 fn from_inner(
14212 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14213 is_terminated: bool,
14214 ) -> Self {
14215 Self { inner, is_terminated }
14216 }
14217}
14218
14219impl futures::Stream for NodeRequestStream {
14220 type Item = Result<NodeRequest, fidl::Error>;
14221
14222 fn poll_next(
14223 mut self: std::pin::Pin<&mut Self>,
14224 cx: &mut std::task::Context<'_>,
14225 ) -> std::task::Poll<Option<Self::Item>> {
14226 let this = &mut *self;
14227 if this.inner.check_shutdown(cx) {
14228 this.is_terminated = true;
14229 return std::task::Poll::Ready(None);
14230 }
14231 if this.is_terminated {
14232 panic!("polled NodeRequestStream after completion");
14233 }
14234 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
14235 |bytes, handles| {
14236 match this.inner.channel().read_etc(cx, bytes, handles) {
14237 std::task::Poll::Ready(Ok(())) => {}
14238 std::task::Poll::Pending => return std::task::Poll::Pending,
14239 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
14240 this.is_terminated = true;
14241 return std::task::Poll::Ready(None);
14242 }
14243 std::task::Poll::Ready(Err(e)) => {
14244 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14245 e.into(),
14246 ))));
14247 }
14248 }
14249
14250 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14252
14253 std::task::Poll::Ready(Some(match header.ordinal {
14254 0x20d8a7aba2168a79 => {
14255 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14256 let mut req = fidl::new_empty!(
14257 fidl_fuchsia_unknown::CloneableCloneRequest,
14258 fidl::encoding::DefaultFuchsiaResourceDialect
14259 );
14260 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14261 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14262 Ok(NodeRequest::Clone { request: req.request, control_handle })
14263 }
14264 0x5ac5d459ad7f657e => {
14265 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14266 let mut req = fidl::new_empty!(
14267 fidl::encoding::EmptyPayload,
14268 fidl::encoding::DefaultFuchsiaResourceDialect
14269 );
14270 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14271 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14272 Ok(NodeRequest::Close {
14273 responder: NodeCloseResponder {
14274 control_handle: std::mem::ManuallyDrop::new(control_handle),
14275 tx_id: header.tx_id,
14276 },
14277 })
14278 }
14279 0x2658edee9decfc06 => {
14280 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14281 let mut req = fidl::new_empty!(
14282 fidl::encoding::EmptyPayload,
14283 fidl::encoding::DefaultFuchsiaResourceDialect
14284 );
14285 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14286 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14287 Ok(NodeRequest::Query {
14288 responder: NodeQueryResponder {
14289 control_handle: std::mem::ManuallyDrop::new(control_handle),
14290 tx_id: header.tx_id,
14291 },
14292 })
14293 }
14294 0x5a61678f293ce16f => {
14295 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14296 let mut req = fidl::new_empty!(
14297 NodeDeprecatedCloneRequest,
14298 fidl::encoding::DefaultFuchsiaResourceDialect
14299 );
14300 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14301 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14302 Ok(NodeRequest::DeprecatedClone {
14303 flags: req.flags,
14304 object: req.object,
14305
14306 control_handle,
14307 })
14308 }
14309 0x78985e216314dafd => {
14310 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14311 let mut req = fidl::new_empty!(
14312 fidl::encoding::EmptyPayload,
14313 fidl::encoding::DefaultFuchsiaResourceDialect
14314 );
14315 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14316 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14317 Ok(NodeRequest::DeprecatedGetAttr {
14318 responder: NodeDeprecatedGetAttrResponder {
14319 control_handle: std::mem::ManuallyDrop::new(control_handle),
14320 tx_id: header.tx_id,
14321 },
14322 })
14323 }
14324 0x4186c0f40d938f46 => {
14325 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14326 let mut req = fidl::new_empty!(
14327 NodeDeprecatedSetAttrRequest,
14328 fidl::encoding::DefaultFuchsiaResourceDialect
14329 );
14330 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
14331 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14332 Ok(NodeRequest::DeprecatedSetAttr {
14333 flags: req.flags,
14334 attributes: req.attributes,
14335
14336 responder: NodeDeprecatedSetAttrResponder {
14337 control_handle: std::mem::ManuallyDrop::new(control_handle),
14338 tx_id: header.tx_id,
14339 },
14340 })
14341 }
14342 0x5b88fffb8eda3aa1 => {
14343 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14344 let mut req = fidl::new_empty!(
14345 fidl::encoding::EmptyPayload,
14346 fidl::encoding::DefaultFuchsiaResourceDialect
14347 );
14348 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14349 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14350 Ok(NodeRequest::DeprecatedGetFlags {
14351 responder: NodeDeprecatedGetFlagsResponder {
14352 control_handle: std::mem::ManuallyDrop::new(control_handle),
14353 tx_id: header.tx_id,
14354 },
14355 })
14356 }
14357 0x5295b76c71fde733 => {
14358 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14359 let mut req = fidl::new_empty!(
14360 NodeDeprecatedSetFlagsRequest,
14361 fidl::encoding::DefaultFuchsiaResourceDialect
14362 );
14363 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14364 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14365 Ok(NodeRequest::DeprecatedSetFlags {
14366 flags: req.flags,
14367
14368 responder: NodeDeprecatedSetFlagsResponder {
14369 control_handle: std::mem::ManuallyDrop::new(control_handle),
14370 tx_id: header.tx_id,
14371 },
14372 })
14373 }
14374 0x176eb318f64ec23 => {
14375 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14376 let mut req = fidl::new_empty!(
14377 fidl::encoding::EmptyPayload,
14378 fidl::encoding::DefaultFuchsiaResourceDialect
14379 );
14380 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14381 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14382 Ok(NodeRequest::GetFlags {
14383 responder: NodeGetFlagsResponder {
14384 control_handle: std::mem::ManuallyDrop::new(control_handle),
14385 tx_id: header.tx_id,
14386 },
14387 })
14388 }
14389 0x55a8028685791ea8 => {
14390 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14391 let mut req = fidl::new_empty!(
14392 NodeSetFlagsRequest,
14393 fidl::encoding::DefaultFuchsiaResourceDialect
14394 );
14395 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14396 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14397 Ok(NodeRequest::SetFlags {
14398 flags: req.flags,
14399
14400 responder: NodeSetFlagsResponder {
14401 control_handle: std::mem::ManuallyDrop::new(control_handle),
14402 tx_id: header.tx_id,
14403 },
14404 })
14405 }
14406 0x6f344a1c6b0a0610 => {
14407 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14408 let mut req = fidl::new_empty!(
14409 fidl::encoding::EmptyPayload,
14410 fidl::encoding::DefaultFuchsiaResourceDialect
14411 );
14412 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14413 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14414 Ok(NodeRequest::QueryFilesystem {
14415 responder: NodeQueryFilesystemResponder {
14416 control_handle: std::mem::ManuallyDrop::new(control_handle),
14417 tx_id: header.tx_id,
14418 },
14419 })
14420 }
14421 0x3d4396a638ea053b => {
14422 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14423 let mut req = fidl::new_empty!(
14424 NodeGetAttributesRequest,
14425 fidl::encoding::DefaultFuchsiaResourceDialect
14426 );
14427 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14428 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14429 Ok(NodeRequest::GetAttributes {
14430 query: req.query,
14431
14432 responder: NodeGetAttributesResponder {
14433 control_handle: std::mem::ManuallyDrop::new(control_handle),
14434 tx_id: header.tx_id,
14435 },
14436 })
14437 }
14438 0x3308c1da5a89bf08 => {
14439 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14440 let mut req = fidl::new_empty!(
14441 MutableNodeAttributes,
14442 fidl::encoding::DefaultFuchsiaResourceDialect
14443 );
14444 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
14445 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14446 Ok(NodeRequest::UpdateAttributes {
14447 payload: req,
14448 responder: NodeUpdateAttributesResponder {
14449 control_handle: std::mem::ManuallyDrop::new(control_handle),
14450 tx_id: header.tx_id,
14451 },
14452 })
14453 }
14454 0x2c5c27ca0ab5dc49 => {
14455 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14456 let mut req = fidl::new_empty!(
14457 fidl::encoding::EmptyPayload,
14458 fidl::encoding::DefaultFuchsiaResourceDialect
14459 );
14460 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14461 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14462 Ok(NodeRequest::Sync {
14463 responder: NodeSyncResponder {
14464 control_handle: std::mem::ManuallyDrop::new(control_handle),
14465 tx_id: header.tx_id,
14466 },
14467 })
14468 }
14469 0x4b61033de007fcd0 => {
14470 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14471 let mut req = fidl::new_empty!(
14472 NodeListExtendedAttributesRequest,
14473 fidl::encoding::DefaultFuchsiaResourceDialect
14474 );
14475 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14476 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14477 Ok(NodeRequest::ListExtendedAttributes {
14478 iterator: req.iterator,
14479
14480 control_handle,
14481 })
14482 }
14483 0x45ffa3ccfdeb76db => {
14484 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14485 let mut req = fidl::new_empty!(
14486 NodeGetExtendedAttributeRequest,
14487 fidl::encoding::DefaultFuchsiaResourceDialect
14488 );
14489 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14490 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14491 Ok(NodeRequest::GetExtendedAttribute {
14492 name: req.name,
14493
14494 responder: NodeGetExtendedAttributeResponder {
14495 control_handle: std::mem::ManuallyDrop::new(control_handle),
14496 tx_id: header.tx_id,
14497 },
14498 })
14499 }
14500 0x4a951362f681f23c => {
14501 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14502 let mut req = fidl::new_empty!(
14503 NodeSetExtendedAttributeRequest,
14504 fidl::encoding::DefaultFuchsiaResourceDialect
14505 );
14506 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14507 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14508 Ok(NodeRequest::SetExtendedAttribute {
14509 name: req.name,
14510 value: req.value,
14511 mode: req.mode,
14512
14513 responder: NodeSetExtendedAttributeResponder {
14514 control_handle: std::mem::ManuallyDrop::new(control_handle),
14515 tx_id: header.tx_id,
14516 },
14517 })
14518 }
14519 0x7a0b9f3a9bf9032d => {
14520 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14521 let mut req = fidl::new_empty!(
14522 NodeRemoveExtendedAttributeRequest,
14523 fidl::encoding::DefaultFuchsiaResourceDialect
14524 );
14525 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14526 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14527 Ok(NodeRequest::RemoveExtendedAttribute {
14528 name: req.name,
14529
14530 responder: NodeRemoveExtendedAttributeResponder {
14531 control_handle: std::mem::ManuallyDrop::new(control_handle),
14532 tx_id: header.tx_id,
14533 },
14534 })
14535 }
14536 _ if header.tx_id == 0
14537 && header
14538 .dynamic_flags()
14539 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14540 {
14541 Ok(NodeRequest::_UnknownMethod {
14542 ordinal: header.ordinal,
14543 control_handle: NodeControlHandle { inner: this.inner.clone() },
14544 method_type: fidl::MethodType::OneWay,
14545 })
14546 }
14547 _ if header
14548 .dynamic_flags()
14549 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14550 {
14551 this.inner.send_framework_err(
14552 fidl::encoding::FrameworkErr::UnknownMethod,
14553 header.tx_id,
14554 header.ordinal,
14555 header.dynamic_flags(),
14556 (bytes, handles),
14557 )?;
14558 Ok(NodeRequest::_UnknownMethod {
14559 ordinal: header.ordinal,
14560 control_handle: NodeControlHandle { inner: this.inner.clone() },
14561 method_type: fidl::MethodType::TwoWay,
14562 })
14563 }
14564 _ => Err(fidl::Error::UnknownOrdinal {
14565 ordinal: header.ordinal,
14566 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14567 }),
14568 }))
14569 },
14570 )
14571 }
14572}
14573
14574#[derive(Debug)]
14576pub enum NodeRequest {
14577 Clone {
14578 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
14579 control_handle: NodeControlHandle,
14580 },
14581 Close {
14592 responder: NodeCloseResponder,
14593 },
14594 Query {
14595 responder: NodeQueryResponder,
14596 },
14597 DeprecatedClone {
14599 flags: OpenFlags,
14600 object: fidl::endpoints::ServerEnd<NodeMarker>,
14601 control_handle: NodeControlHandle,
14602 },
14603 DeprecatedGetAttr {
14605 responder: NodeDeprecatedGetAttrResponder,
14606 },
14607 DeprecatedSetAttr {
14609 flags: NodeAttributeFlags,
14610 attributes: NodeAttributes,
14611 responder: NodeDeprecatedSetAttrResponder,
14612 },
14613 DeprecatedGetFlags {
14615 responder: NodeDeprecatedGetFlagsResponder,
14616 },
14617 DeprecatedSetFlags {
14619 flags: OpenFlags,
14620 responder: NodeDeprecatedSetFlagsResponder,
14621 },
14622 GetFlags {
14631 responder: NodeGetFlagsResponder,
14632 },
14633 SetFlags {
14643 flags: Flags,
14644 responder: NodeSetFlagsResponder,
14645 },
14646 QueryFilesystem {
14650 responder: NodeQueryFilesystemResponder,
14651 },
14652 GetAttributes {
14666 query: NodeAttributesQuery,
14667 responder: NodeGetAttributesResponder,
14668 },
14669 UpdateAttributes {
14678 payload: MutableNodeAttributes,
14679 responder: NodeUpdateAttributesResponder,
14680 },
14681 Sync {
14691 responder: NodeSyncResponder,
14692 },
14693 ListExtendedAttributes {
14702 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
14703 control_handle: NodeControlHandle,
14704 },
14705 GetExtendedAttribute {
14712 name: Vec<u8>,
14713 responder: NodeGetExtendedAttributeResponder,
14714 },
14715 SetExtendedAttribute {
14723 name: Vec<u8>,
14724 value: ExtendedAttributeValue,
14725 mode: SetExtendedAttributeMode,
14726 responder: NodeSetExtendedAttributeResponder,
14727 },
14728 RemoveExtendedAttribute {
14734 name: Vec<u8>,
14735 responder: NodeRemoveExtendedAttributeResponder,
14736 },
14737 #[non_exhaustive]
14739 _UnknownMethod {
14740 ordinal: u64,
14742 control_handle: NodeControlHandle,
14743 method_type: fidl::MethodType,
14744 },
14745}
14746
14747impl NodeRequest {
14748 #[allow(irrefutable_let_patterns)]
14749 pub fn into_clone(
14750 self,
14751 ) -> Option<(
14752 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
14753 NodeControlHandle,
14754 )> {
14755 if let NodeRequest::Clone { request, control_handle } = self {
14756 Some((request, control_handle))
14757 } else {
14758 None
14759 }
14760 }
14761
14762 #[allow(irrefutable_let_patterns)]
14763 pub fn into_close(self) -> Option<(NodeCloseResponder)> {
14764 if let NodeRequest::Close { responder } = self { Some((responder)) } else { None }
14765 }
14766
14767 #[allow(irrefutable_let_patterns)]
14768 pub fn into_query(self) -> Option<(NodeQueryResponder)> {
14769 if let NodeRequest::Query { responder } = self { Some((responder)) } else { None }
14770 }
14771
14772 #[allow(irrefutable_let_patterns)]
14773 pub fn into_deprecated_clone(
14774 self,
14775 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, NodeControlHandle)> {
14776 if let NodeRequest::DeprecatedClone { flags, object, control_handle } = self {
14777 Some((flags, object, control_handle))
14778 } else {
14779 None
14780 }
14781 }
14782
14783 #[allow(irrefutable_let_patterns)]
14784 pub fn into_deprecated_get_attr(self) -> Option<(NodeDeprecatedGetAttrResponder)> {
14785 if let NodeRequest::DeprecatedGetAttr { responder } = self {
14786 Some((responder))
14787 } else {
14788 None
14789 }
14790 }
14791
14792 #[allow(irrefutable_let_patterns)]
14793 pub fn into_deprecated_set_attr(
14794 self,
14795 ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
14796 if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
14797 Some((flags, attributes, responder))
14798 } else {
14799 None
14800 }
14801 }
14802
14803 #[allow(irrefutable_let_patterns)]
14804 pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
14805 if let NodeRequest::DeprecatedGetFlags { responder } = self {
14806 Some((responder))
14807 } else {
14808 None
14809 }
14810 }
14811
14812 #[allow(irrefutable_let_patterns)]
14813 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
14814 if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
14815 Some((flags, responder))
14816 } else {
14817 None
14818 }
14819 }
14820
14821 #[allow(irrefutable_let_patterns)]
14822 pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
14823 if let NodeRequest::GetFlags { responder } = self { Some((responder)) } else { None }
14824 }
14825
14826 #[allow(irrefutable_let_patterns)]
14827 pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
14828 if let NodeRequest::SetFlags { flags, responder } = self {
14829 Some((flags, responder))
14830 } else {
14831 None
14832 }
14833 }
14834
14835 #[allow(irrefutable_let_patterns)]
14836 pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
14837 if let NodeRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
14838 }
14839
14840 #[allow(irrefutable_let_patterns)]
14841 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
14842 if let NodeRequest::GetAttributes { query, responder } = self {
14843 Some((query, responder))
14844 } else {
14845 None
14846 }
14847 }
14848
14849 #[allow(irrefutable_let_patterns)]
14850 pub fn into_update_attributes(
14851 self,
14852 ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
14853 if let NodeRequest::UpdateAttributes { payload, responder } = self {
14854 Some((payload, responder))
14855 } else {
14856 None
14857 }
14858 }
14859
14860 #[allow(irrefutable_let_patterns)]
14861 pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
14862 if let NodeRequest::Sync { responder } = self { Some((responder)) } else { None }
14863 }
14864
14865 #[allow(irrefutable_let_patterns)]
14866 pub fn into_list_extended_attributes(
14867 self,
14868 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
14869 {
14870 if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
14871 Some((iterator, control_handle))
14872 } else {
14873 None
14874 }
14875 }
14876
14877 #[allow(irrefutable_let_patterns)]
14878 pub fn into_get_extended_attribute(
14879 self,
14880 ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
14881 if let NodeRequest::GetExtendedAttribute { name, responder } = self {
14882 Some((name, responder))
14883 } else {
14884 None
14885 }
14886 }
14887
14888 #[allow(irrefutable_let_patterns)]
14889 pub fn into_set_extended_attribute(
14890 self,
14891 ) -> Option<(
14892 Vec<u8>,
14893 ExtendedAttributeValue,
14894 SetExtendedAttributeMode,
14895 NodeSetExtendedAttributeResponder,
14896 )> {
14897 if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
14898 Some((name, value, mode, responder))
14899 } else {
14900 None
14901 }
14902 }
14903
14904 #[allow(irrefutable_let_patterns)]
14905 pub fn into_remove_extended_attribute(
14906 self,
14907 ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
14908 if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
14909 Some((name, responder))
14910 } else {
14911 None
14912 }
14913 }
14914
14915 pub fn method_name(&self) -> &'static str {
14917 match *self {
14918 NodeRequest::Clone { .. } => "clone",
14919 NodeRequest::Close { .. } => "close",
14920 NodeRequest::Query { .. } => "query",
14921 NodeRequest::DeprecatedClone { .. } => "deprecated_clone",
14922 NodeRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
14923 NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
14924 NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
14925 NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
14926 NodeRequest::GetFlags { .. } => "get_flags",
14927 NodeRequest::SetFlags { .. } => "set_flags",
14928 NodeRequest::QueryFilesystem { .. } => "query_filesystem",
14929 NodeRequest::GetAttributes { .. } => "get_attributes",
14930 NodeRequest::UpdateAttributes { .. } => "update_attributes",
14931 NodeRequest::Sync { .. } => "sync",
14932 NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
14933 NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
14934 NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
14935 NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
14936 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
14937 "unknown one-way method"
14938 }
14939 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
14940 "unknown two-way method"
14941 }
14942 }
14943 }
14944}
14945
14946#[derive(Debug, Clone)]
14947pub struct NodeControlHandle {
14948 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14949}
14950
14951impl fidl::endpoints::ControlHandle for NodeControlHandle {
14952 fn shutdown(&self) {
14953 self.inner.shutdown()
14954 }
14955
14956 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
14957 self.inner.shutdown_with_epitaph(status)
14958 }
14959
14960 fn is_closed(&self) -> bool {
14961 self.inner.channel().is_closed()
14962 }
14963 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
14964 self.inner.channel().on_closed()
14965 }
14966
14967 #[cfg(target_os = "fuchsia")]
14968 fn signal_peer(
14969 &self,
14970 clear_mask: zx::Signals,
14971 set_mask: zx::Signals,
14972 ) -> Result<(), zx_status::Status> {
14973 use fidl::Peered;
14974 self.inner.channel().signal_peer(clear_mask, set_mask)
14975 }
14976}
14977
14978impl NodeControlHandle {
14979 pub fn send_on_open_(
14980 &self,
14981 mut s: i32,
14982 mut info: Option<NodeInfoDeprecated>,
14983 ) -> Result<(), fidl::Error> {
14984 self.inner.send::<NodeOnOpenRequest>(
14985 (s, info.as_mut()),
14986 0,
14987 0x7fc7bbb1dbfd1972,
14988 fidl::encoding::DynamicFlags::FLEXIBLE,
14989 )
14990 }
14991
14992 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
14993 self.inner.send::<Representation>(
14994 &mut payload,
14995 0,
14996 0x5cb40567d80a510c,
14997 fidl::encoding::DynamicFlags::empty(),
14998 )
14999 }
15000}
15001
15002#[must_use = "FIDL methods require a response to be sent"]
15003#[derive(Debug)]
15004pub struct NodeCloseResponder {
15005 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15006 tx_id: u32,
15007}
15008
15009impl std::ops::Drop for NodeCloseResponder {
15013 fn drop(&mut self) {
15014 self.control_handle.shutdown();
15015 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15017 }
15018}
15019
15020impl fidl::endpoints::Responder for NodeCloseResponder {
15021 type ControlHandle = NodeControlHandle;
15022
15023 fn control_handle(&self) -> &NodeControlHandle {
15024 &self.control_handle
15025 }
15026
15027 fn drop_without_shutdown(mut self) {
15028 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15030 std::mem::forget(self);
15032 }
15033}
15034
15035impl NodeCloseResponder {
15036 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15040 let _result = self.send_raw(result);
15041 if _result.is_err() {
15042 self.control_handle.shutdown();
15043 }
15044 self.drop_without_shutdown();
15045 _result
15046 }
15047
15048 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15050 let _result = self.send_raw(result);
15051 self.drop_without_shutdown();
15052 _result
15053 }
15054
15055 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15056 self.control_handle
15057 .inner
15058 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15059 result,
15060 self.tx_id,
15061 0x5ac5d459ad7f657e,
15062 fidl::encoding::DynamicFlags::empty(),
15063 )
15064 }
15065}
15066
15067#[must_use = "FIDL methods require a response to be sent"]
15068#[derive(Debug)]
15069pub struct NodeQueryResponder {
15070 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15071 tx_id: u32,
15072}
15073
15074impl std::ops::Drop for NodeQueryResponder {
15078 fn drop(&mut self) {
15079 self.control_handle.shutdown();
15080 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15082 }
15083}
15084
15085impl fidl::endpoints::Responder for NodeQueryResponder {
15086 type ControlHandle = NodeControlHandle;
15087
15088 fn control_handle(&self) -> &NodeControlHandle {
15089 &self.control_handle
15090 }
15091
15092 fn drop_without_shutdown(mut self) {
15093 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15095 std::mem::forget(self);
15097 }
15098}
15099
15100impl NodeQueryResponder {
15101 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15105 let _result = self.send_raw(protocol);
15106 if _result.is_err() {
15107 self.control_handle.shutdown();
15108 }
15109 self.drop_without_shutdown();
15110 _result
15111 }
15112
15113 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15115 let _result = self.send_raw(protocol);
15116 self.drop_without_shutdown();
15117 _result
15118 }
15119
15120 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15121 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
15122 (protocol,),
15123 self.tx_id,
15124 0x2658edee9decfc06,
15125 fidl::encoding::DynamicFlags::empty(),
15126 )
15127 }
15128}
15129
15130#[must_use = "FIDL methods require a response to be sent"]
15131#[derive(Debug)]
15132pub struct NodeDeprecatedGetAttrResponder {
15133 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15134 tx_id: u32,
15135}
15136
15137impl std::ops::Drop for NodeDeprecatedGetAttrResponder {
15141 fn drop(&mut self) {
15142 self.control_handle.shutdown();
15143 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15145 }
15146}
15147
15148impl fidl::endpoints::Responder for NodeDeprecatedGetAttrResponder {
15149 type ControlHandle = NodeControlHandle;
15150
15151 fn control_handle(&self) -> &NodeControlHandle {
15152 &self.control_handle
15153 }
15154
15155 fn drop_without_shutdown(mut self) {
15156 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15158 std::mem::forget(self);
15160 }
15161}
15162
15163impl NodeDeprecatedGetAttrResponder {
15164 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15168 let _result = self.send_raw(s, attributes);
15169 if _result.is_err() {
15170 self.control_handle.shutdown();
15171 }
15172 self.drop_without_shutdown();
15173 _result
15174 }
15175
15176 pub fn send_no_shutdown_on_err(
15178 self,
15179 mut s: i32,
15180 mut attributes: &NodeAttributes,
15181 ) -> Result<(), fidl::Error> {
15182 let _result = self.send_raw(s, attributes);
15183 self.drop_without_shutdown();
15184 _result
15185 }
15186
15187 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15188 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
15189 (s, attributes),
15190 self.tx_id,
15191 0x78985e216314dafd,
15192 fidl::encoding::DynamicFlags::empty(),
15193 )
15194 }
15195}
15196
15197#[must_use = "FIDL methods require a response to be sent"]
15198#[derive(Debug)]
15199pub struct NodeDeprecatedSetAttrResponder {
15200 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15201 tx_id: u32,
15202}
15203
15204impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
15208 fn drop(&mut self) {
15209 self.control_handle.shutdown();
15210 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15212 }
15213}
15214
15215impl fidl::endpoints::Responder for NodeDeprecatedSetAttrResponder {
15216 type ControlHandle = NodeControlHandle;
15217
15218 fn control_handle(&self) -> &NodeControlHandle {
15219 &self.control_handle
15220 }
15221
15222 fn drop_without_shutdown(mut self) {
15223 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15225 std::mem::forget(self);
15227 }
15228}
15229
15230impl NodeDeprecatedSetAttrResponder {
15231 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15235 let _result = self.send_raw(s);
15236 if _result.is_err() {
15237 self.control_handle.shutdown();
15238 }
15239 self.drop_without_shutdown();
15240 _result
15241 }
15242
15243 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15245 let _result = self.send_raw(s);
15246 self.drop_without_shutdown();
15247 _result
15248 }
15249
15250 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15251 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
15252 (s,),
15253 self.tx_id,
15254 0x4186c0f40d938f46,
15255 fidl::encoding::DynamicFlags::empty(),
15256 )
15257 }
15258}
15259
15260#[must_use = "FIDL methods require a response to be sent"]
15261#[derive(Debug)]
15262pub struct NodeDeprecatedGetFlagsResponder {
15263 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15264 tx_id: u32,
15265}
15266
15267impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
15271 fn drop(&mut self) {
15272 self.control_handle.shutdown();
15273 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15275 }
15276}
15277
15278impl fidl::endpoints::Responder for NodeDeprecatedGetFlagsResponder {
15279 type ControlHandle = NodeControlHandle;
15280
15281 fn control_handle(&self) -> &NodeControlHandle {
15282 &self.control_handle
15283 }
15284
15285 fn drop_without_shutdown(mut self) {
15286 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15288 std::mem::forget(self);
15290 }
15291}
15292
15293impl NodeDeprecatedGetFlagsResponder {
15294 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15298 let _result = self.send_raw(s, flags);
15299 if _result.is_err() {
15300 self.control_handle.shutdown();
15301 }
15302 self.drop_without_shutdown();
15303 _result
15304 }
15305
15306 pub fn send_no_shutdown_on_err(
15308 self,
15309 mut s: i32,
15310 mut flags: OpenFlags,
15311 ) -> Result<(), fidl::Error> {
15312 let _result = self.send_raw(s, flags);
15313 self.drop_without_shutdown();
15314 _result
15315 }
15316
15317 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15318 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
15319 (s, flags),
15320 self.tx_id,
15321 0x5b88fffb8eda3aa1,
15322 fidl::encoding::DynamicFlags::empty(),
15323 )
15324 }
15325}
15326
15327#[must_use = "FIDL methods require a response to be sent"]
15328#[derive(Debug)]
15329pub struct NodeDeprecatedSetFlagsResponder {
15330 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15331 tx_id: u32,
15332}
15333
15334impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
15338 fn drop(&mut self) {
15339 self.control_handle.shutdown();
15340 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15342 }
15343}
15344
15345impl fidl::endpoints::Responder for NodeDeprecatedSetFlagsResponder {
15346 type ControlHandle = NodeControlHandle;
15347
15348 fn control_handle(&self) -> &NodeControlHandle {
15349 &self.control_handle
15350 }
15351
15352 fn drop_without_shutdown(mut self) {
15353 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15355 std::mem::forget(self);
15357 }
15358}
15359
15360impl NodeDeprecatedSetFlagsResponder {
15361 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15365 let _result = self.send_raw(s);
15366 if _result.is_err() {
15367 self.control_handle.shutdown();
15368 }
15369 self.drop_without_shutdown();
15370 _result
15371 }
15372
15373 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15375 let _result = self.send_raw(s);
15376 self.drop_without_shutdown();
15377 _result
15378 }
15379
15380 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15381 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
15382 (s,),
15383 self.tx_id,
15384 0x5295b76c71fde733,
15385 fidl::encoding::DynamicFlags::empty(),
15386 )
15387 }
15388}
15389
15390#[must_use = "FIDL methods require a response to be sent"]
15391#[derive(Debug)]
15392pub struct NodeGetFlagsResponder {
15393 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15394 tx_id: u32,
15395}
15396
15397impl std::ops::Drop for NodeGetFlagsResponder {
15401 fn drop(&mut self) {
15402 self.control_handle.shutdown();
15403 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15405 }
15406}
15407
15408impl fidl::endpoints::Responder for NodeGetFlagsResponder {
15409 type ControlHandle = NodeControlHandle;
15410
15411 fn control_handle(&self) -> &NodeControlHandle {
15412 &self.control_handle
15413 }
15414
15415 fn drop_without_shutdown(mut self) {
15416 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15418 std::mem::forget(self);
15420 }
15421}
15422
15423impl NodeGetFlagsResponder {
15424 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15428 let _result = self.send_raw(result);
15429 if _result.is_err() {
15430 self.control_handle.shutdown();
15431 }
15432 self.drop_without_shutdown();
15433 _result
15434 }
15435
15436 pub fn send_no_shutdown_on_err(
15438 self,
15439 mut result: Result<Flags, i32>,
15440 ) -> Result<(), fidl::Error> {
15441 let _result = self.send_raw(result);
15442 self.drop_without_shutdown();
15443 _result
15444 }
15445
15446 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15447 self.control_handle
15448 .inner
15449 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
15450 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
15451 self.tx_id,
15452 0x176eb318f64ec23,
15453 fidl::encoding::DynamicFlags::FLEXIBLE,
15454 )
15455 }
15456}
15457
15458#[must_use = "FIDL methods require a response to be sent"]
15459#[derive(Debug)]
15460pub struct NodeSetFlagsResponder {
15461 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15462 tx_id: u32,
15463}
15464
15465impl std::ops::Drop for NodeSetFlagsResponder {
15469 fn drop(&mut self) {
15470 self.control_handle.shutdown();
15471 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15473 }
15474}
15475
15476impl fidl::endpoints::Responder for NodeSetFlagsResponder {
15477 type ControlHandle = NodeControlHandle;
15478
15479 fn control_handle(&self) -> &NodeControlHandle {
15480 &self.control_handle
15481 }
15482
15483 fn drop_without_shutdown(mut self) {
15484 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15486 std::mem::forget(self);
15488 }
15489}
15490
15491impl NodeSetFlagsResponder {
15492 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15496 let _result = self.send_raw(result);
15497 if _result.is_err() {
15498 self.control_handle.shutdown();
15499 }
15500 self.drop_without_shutdown();
15501 _result
15502 }
15503
15504 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15506 let _result = self.send_raw(result);
15507 self.drop_without_shutdown();
15508 _result
15509 }
15510
15511 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15512 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
15513 fidl::encoding::EmptyStruct,
15514 i32,
15515 >>(
15516 fidl::encoding::FlexibleResult::new(result),
15517 self.tx_id,
15518 0x55a8028685791ea8,
15519 fidl::encoding::DynamicFlags::FLEXIBLE,
15520 )
15521 }
15522}
15523
15524#[must_use = "FIDL methods require a response to be sent"]
15525#[derive(Debug)]
15526pub struct NodeQueryFilesystemResponder {
15527 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15528 tx_id: u32,
15529}
15530
15531impl std::ops::Drop for NodeQueryFilesystemResponder {
15535 fn drop(&mut self) {
15536 self.control_handle.shutdown();
15537 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15539 }
15540}
15541
15542impl fidl::endpoints::Responder for NodeQueryFilesystemResponder {
15543 type ControlHandle = NodeControlHandle;
15544
15545 fn control_handle(&self) -> &NodeControlHandle {
15546 &self.control_handle
15547 }
15548
15549 fn drop_without_shutdown(mut self) {
15550 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15552 std::mem::forget(self);
15554 }
15555}
15556
15557impl NodeQueryFilesystemResponder {
15558 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15562 let _result = self.send_raw(s, info);
15563 if _result.is_err() {
15564 self.control_handle.shutdown();
15565 }
15566 self.drop_without_shutdown();
15567 _result
15568 }
15569
15570 pub fn send_no_shutdown_on_err(
15572 self,
15573 mut s: i32,
15574 mut info: Option<&FilesystemInfo>,
15575 ) -> Result<(), fidl::Error> {
15576 let _result = self.send_raw(s, info);
15577 self.drop_without_shutdown();
15578 _result
15579 }
15580
15581 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15582 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
15583 (s, info),
15584 self.tx_id,
15585 0x6f344a1c6b0a0610,
15586 fidl::encoding::DynamicFlags::empty(),
15587 )
15588 }
15589}
15590
15591#[must_use = "FIDL methods require a response to be sent"]
15592#[derive(Debug)]
15593pub struct NodeGetAttributesResponder {
15594 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15595 tx_id: u32,
15596}
15597
15598impl std::ops::Drop for NodeGetAttributesResponder {
15602 fn drop(&mut self) {
15603 self.control_handle.shutdown();
15604 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15606 }
15607}
15608
15609impl fidl::endpoints::Responder for NodeGetAttributesResponder {
15610 type ControlHandle = NodeControlHandle;
15611
15612 fn control_handle(&self) -> &NodeControlHandle {
15613 &self.control_handle
15614 }
15615
15616 fn drop_without_shutdown(mut self) {
15617 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15619 std::mem::forget(self);
15621 }
15622}
15623
15624impl NodeGetAttributesResponder {
15625 pub fn send(
15629 self,
15630 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15631 ) -> Result<(), fidl::Error> {
15632 let _result = self.send_raw(result);
15633 if _result.is_err() {
15634 self.control_handle.shutdown();
15635 }
15636 self.drop_without_shutdown();
15637 _result
15638 }
15639
15640 pub fn send_no_shutdown_on_err(
15642 self,
15643 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15644 ) -> Result<(), fidl::Error> {
15645 let _result = self.send_raw(result);
15646 self.drop_without_shutdown();
15647 _result
15648 }
15649
15650 fn send_raw(
15651 &self,
15652 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15653 ) -> Result<(), fidl::Error> {
15654 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
15655 result,
15656 self.tx_id,
15657 0x3d4396a638ea053b,
15658 fidl::encoding::DynamicFlags::empty(),
15659 )
15660 }
15661}
15662
15663#[must_use = "FIDL methods require a response to be sent"]
15664#[derive(Debug)]
15665pub struct NodeUpdateAttributesResponder {
15666 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15667 tx_id: u32,
15668}
15669
15670impl std::ops::Drop for NodeUpdateAttributesResponder {
15674 fn drop(&mut self) {
15675 self.control_handle.shutdown();
15676 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15678 }
15679}
15680
15681impl fidl::endpoints::Responder for NodeUpdateAttributesResponder {
15682 type ControlHandle = NodeControlHandle;
15683
15684 fn control_handle(&self) -> &NodeControlHandle {
15685 &self.control_handle
15686 }
15687
15688 fn drop_without_shutdown(mut self) {
15689 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15691 std::mem::forget(self);
15693 }
15694}
15695
15696impl NodeUpdateAttributesResponder {
15697 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15701 let _result = self.send_raw(result);
15702 if _result.is_err() {
15703 self.control_handle.shutdown();
15704 }
15705 self.drop_without_shutdown();
15706 _result
15707 }
15708
15709 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15711 let _result = self.send_raw(result);
15712 self.drop_without_shutdown();
15713 _result
15714 }
15715
15716 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15717 self.control_handle
15718 .inner
15719 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15720 result,
15721 self.tx_id,
15722 0x3308c1da5a89bf08,
15723 fidl::encoding::DynamicFlags::empty(),
15724 )
15725 }
15726}
15727
15728#[must_use = "FIDL methods require a response to be sent"]
15729#[derive(Debug)]
15730pub struct NodeSyncResponder {
15731 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15732 tx_id: u32,
15733}
15734
15735impl std::ops::Drop for NodeSyncResponder {
15739 fn drop(&mut self) {
15740 self.control_handle.shutdown();
15741 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15743 }
15744}
15745
15746impl fidl::endpoints::Responder for NodeSyncResponder {
15747 type ControlHandle = NodeControlHandle;
15748
15749 fn control_handle(&self) -> &NodeControlHandle {
15750 &self.control_handle
15751 }
15752
15753 fn drop_without_shutdown(mut self) {
15754 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15756 std::mem::forget(self);
15758 }
15759}
15760
15761impl NodeSyncResponder {
15762 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15766 let _result = self.send_raw(result);
15767 if _result.is_err() {
15768 self.control_handle.shutdown();
15769 }
15770 self.drop_without_shutdown();
15771 _result
15772 }
15773
15774 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15776 let _result = self.send_raw(result);
15777 self.drop_without_shutdown();
15778 _result
15779 }
15780
15781 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15782 self.control_handle
15783 .inner
15784 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15785 result,
15786 self.tx_id,
15787 0x2c5c27ca0ab5dc49,
15788 fidl::encoding::DynamicFlags::empty(),
15789 )
15790 }
15791}
15792
15793#[must_use = "FIDL methods require a response to be sent"]
15794#[derive(Debug)]
15795pub struct NodeGetExtendedAttributeResponder {
15796 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15797 tx_id: u32,
15798}
15799
15800impl std::ops::Drop for NodeGetExtendedAttributeResponder {
15804 fn drop(&mut self) {
15805 self.control_handle.shutdown();
15806 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15808 }
15809}
15810
15811impl fidl::endpoints::Responder for NodeGetExtendedAttributeResponder {
15812 type ControlHandle = NodeControlHandle;
15813
15814 fn control_handle(&self) -> &NodeControlHandle {
15815 &self.control_handle
15816 }
15817
15818 fn drop_without_shutdown(mut self) {
15819 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15821 std::mem::forget(self);
15823 }
15824}
15825
15826impl NodeGetExtendedAttributeResponder {
15827 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
15831 let _result = self.send_raw(result);
15832 if _result.is_err() {
15833 self.control_handle.shutdown();
15834 }
15835 self.drop_without_shutdown();
15836 _result
15837 }
15838
15839 pub fn send_no_shutdown_on_err(
15841 self,
15842 mut result: Result<ExtendedAttributeValue, i32>,
15843 ) -> Result<(), fidl::Error> {
15844 let _result = self.send_raw(result);
15845 self.drop_without_shutdown();
15846 _result
15847 }
15848
15849 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
15850 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
15851 result.as_mut().map_err(|e| *e),
15852 self.tx_id,
15853 0x45ffa3ccfdeb76db,
15854 fidl::encoding::DynamicFlags::empty(),
15855 )
15856 }
15857}
15858
15859#[must_use = "FIDL methods require a response to be sent"]
15860#[derive(Debug)]
15861pub struct NodeSetExtendedAttributeResponder {
15862 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15863 tx_id: u32,
15864}
15865
15866impl std::ops::Drop for NodeSetExtendedAttributeResponder {
15870 fn drop(&mut self) {
15871 self.control_handle.shutdown();
15872 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15874 }
15875}
15876
15877impl fidl::endpoints::Responder for NodeSetExtendedAttributeResponder {
15878 type ControlHandle = NodeControlHandle;
15879
15880 fn control_handle(&self) -> &NodeControlHandle {
15881 &self.control_handle
15882 }
15883
15884 fn drop_without_shutdown(mut self) {
15885 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15887 std::mem::forget(self);
15889 }
15890}
15891
15892impl NodeSetExtendedAttributeResponder {
15893 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15897 let _result = self.send_raw(result);
15898 if _result.is_err() {
15899 self.control_handle.shutdown();
15900 }
15901 self.drop_without_shutdown();
15902 _result
15903 }
15904
15905 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15907 let _result = self.send_raw(result);
15908 self.drop_without_shutdown();
15909 _result
15910 }
15911
15912 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15913 self.control_handle
15914 .inner
15915 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15916 result,
15917 self.tx_id,
15918 0x4a951362f681f23c,
15919 fidl::encoding::DynamicFlags::empty(),
15920 )
15921 }
15922}
15923
15924#[must_use = "FIDL methods require a response to be sent"]
15925#[derive(Debug)]
15926pub struct NodeRemoveExtendedAttributeResponder {
15927 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15928 tx_id: u32,
15929}
15930
15931impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
15935 fn drop(&mut self) {
15936 self.control_handle.shutdown();
15937 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15939 }
15940}
15941
15942impl fidl::endpoints::Responder for NodeRemoveExtendedAttributeResponder {
15943 type ControlHandle = NodeControlHandle;
15944
15945 fn control_handle(&self) -> &NodeControlHandle {
15946 &self.control_handle
15947 }
15948
15949 fn drop_without_shutdown(mut self) {
15950 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15952 std::mem::forget(self);
15954 }
15955}
15956
15957impl NodeRemoveExtendedAttributeResponder {
15958 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15962 let _result = self.send_raw(result);
15963 if _result.is_err() {
15964 self.control_handle.shutdown();
15965 }
15966 self.drop_without_shutdown();
15967 _result
15968 }
15969
15970 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15972 let _result = self.send_raw(result);
15973 self.drop_without_shutdown();
15974 _result
15975 }
15976
15977 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15978 self.control_handle
15979 .inner
15980 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15981 result,
15982 self.tx_id,
15983 0x7a0b9f3a9bf9032d,
15984 fidl::encoding::DynamicFlags::empty(),
15985 )
15986 }
15987}
15988
15989#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
15990pub struct ReadableMarker;
15991
15992impl fidl::endpoints::ProtocolMarker for ReadableMarker {
15993 type Proxy = ReadableProxy;
15994 type RequestStream = ReadableRequestStream;
15995 #[cfg(target_os = "fuchsia")]
15996 type SynchronousProxy = ReadableSynchronousProxy;
15997
15998 const DEBUG_NAME: &'static str = "(anonymous) Readable";
15999}
16000pub type ReadableReadResult = Result<Vec<u8>, i32>;
16001
16002pub trait ReadableProxyInterface: Send + Sync {
16003 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
16004 + Send;
16005 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
16006}
16007#[derive(Debug)]
16008#[cfg(target_os = "fuchsia")]
16009pub struct ReadableSynchronousProxy {
16010 client: fidl::client::sync::Client,
16011}
16012
16013#[cfg(target_os = "fuchsia")]
16014impl fidl::endpoints::SynchronousProxy for ReadableSynchronousProxy {
16015 type Proxy = ReadableProxy;
16016 type Protocol = ReadableMarker;
16017
16018 fn from_channel(inner: fidl::Channel) -> Self {
16019 Self::new(inner)
16020 }
16021
16022 fn into_channel(self) -> fidl::Channel {
16023 self.client.into_channel()
16024 }
16025
16026 fn as_channel(&self) -> &fidl::Channel {
16027 self.client.as_channel()
16028 }
16029}
16030
16031#[cfg(target_os = "fuchsia")]
16032impl ReadableSynchronousProxy {
16033 pub fn new(channel: fidl::Channel) -> Self {
16034 Self { client: fidl::client::sync::Client::new(channel) }
16035 }
16036
16037 pub fn into_channel(self) -> fidl::Channel {
16038 self.client.into_channel()
16039 }
16040
16041 pub fn wait_for_event(
16044 &self,
16045 deadline: zx::MonotonicInstant,
16046 ) -> Result<ReadableEvent, fidl::Error> {
16047 ReadableEvent::decode(self.client.wait_for_event::<ReadableMarker>(deadline)?)
16048 }
16049
16050 pub fn r#read(
16069 &self,
16070 mut count: u64,
16071 ___deadline: zx::MonotonicInstant,
16072 ) -> Result<ReadableReadResult, fidl::Error> {
16073 let _response = self.client.send_query::<
16074 ReadableReadRequest,
16075 fidl::encoding::ResultType<ReadableReadResponse, i32>,
16076 ReadableMarker,
16077 >(
16078 (count,),
16079 0x57e419a298c8ede,
16080 fidl::encoding::DynamicFlags::empty(),
16081 ___deadline,
16082 )?;
16083 Ok(_response.map(|x| x.data))
16084 }
16085}
16086
16087#[cfg(target_os = "fuchsia")]
16088impl From<ReadableSynchronousProxy> for zx::NullableHandle {
16089 fn from(value: ReadableSynchronousProxy) -> Self {
16090 value.into_channel().into()
16091 }
16092}
16093
16094#[cfg(target_os = "fuchsia")]
16095impl From<fidl::Channel> for ReadableSynchronousProxy {
16096 fn from(value: fidl::Channel) -> Self {
16097 Self::new(value)
16098 }
16099}
16100
16101#[cfg(target_os = "fuchsia")]
16102impl fidl::endpoints::FromClient for ReadableSynchronousProxy {
16103 type Protocol = ReadableMarker;
16104
16105 fn from_client(value: fidl::endpoints::ClientEnd<ReadableMarker>) -> Self {
16106 Self::new(value.into_channel())
16107 }
16108}
16109
16110#[derive(Debug, Clone)]
16111pub struct ReadableProxy {
16112 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
16113}
16114
16115impl fidl::endpoints::Proxy for ReadableProxy {
16116 type Protocol = ReadableMarker;
16117
16118 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
16119 Self::new(inner)
16120 }
16121
16122 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
16123 self.client.into_channel().map_err(|client| Self { client })
16124 }
16125
16126 fn as_channel(&self) -> &::fidl::AsyncChannel {
16127 self.client.as_channel()
16128 }
16129}
16130
16131impl ReadableProxy {
16132 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
16134 let protocol_name = <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16135 Self { client: fidl::client::Client::new(channel, protocol_name) }
16136 }
16137
16138 pub fn take_event_stream(&self) -> ReadableEventStream {
16144 ReadableEventStream { event_receiver: self.client.take_event_receiver() }
16145 }
16146
16147 pub fn r#read(
16166 &self,
16167 mut count: u64,
16168 ) -> fidl::client::QueryResponseFut<
16169 ReadableReadResult,
16170 fidl::encoding::DefaultFuchsiaResourceDialect,
16171 > {
16172 ReadableProxyInterface::r#read(self, count)
16173 }
16174}
16175
16176impl ReadableProxyInterface for ReadableProxy {
16177 type ReadResponseFut = fidl::client::QueryResponseFut<
16178 ReadableReadResult,
16179 fidl::encoding::DefaultFuchsiaResourceDialect,
16180 >;
16181 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
16182 fn _decode(
16183 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
16184 ) -> Result<ReadableReadResult, fidl::Error> {
16185 let _response = fidl::client::decode_transaction_body::<
16186 fidl::encoding::ResultType<ReadableReadResponse, i32>,
16187 fidl::encoding::DefaultFuchsiaResourceDialect,
16188 0x57e419a298c8ede,
16189 >(_buf?)?;
16190 Ok(_response.map(|x| x.data))
16191 }
16192 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
16193 (count,),
16194 0x57e419a298c8ede,
16195 fidl::encoding::DynamicFlags::empty(),
16196 _decode,
16197 )
16198 }
16199}
16200
16201pub struct ReadableEventStream {
16202 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
16203}
16204
16205impl std::marker::Unpin for ReadableEventStream {}
16206
16207impl futures::stream::FusedStream for ReadableEventStream {
16208 fn is_terminated(&self) -> bool {
16209 self.event_receiver.is_terminated()
16210 }
16211}
16212
16213impl futures::Stream for ReadableEventStream {
16214 type Item = Result<ReadableEvent, fidl::Error>;
16215
16216 fn poll_next(
16217 mut self: std::pin::Pin<&mut Self>,
16218 cx: &mut std::task::Context<'_>,
16219 ) -> std::task::Poll<Option<Self::Item>> {
16220 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
16221 &mut self.event_receiver,
16222 cx
16223 )?) {
16224 Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
16225 None => std::task::Poll::Ready(None),
16226 }
16227 }
16228}
16229
16230#[derive(Debug)]
16231pub enum ReadableEvent {}
16232
16233impl ReadableEvent {
16234 fn decode(
16236 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
16237 ) -> Result<ReadableEvent, fidl::Error> {
16238 let (bytes, _handles) = buf.split_mut();
16239 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16240 debug_assert_eq!(tx_header.tx_id, 0);
16241 match tx_header.ordinal {
16242 _ => Err(fidl::Error::UnknownOrdinal {
16243 ordinal: tx_header.ordinal,
16244 protocol_name: <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16245 }),
16246 }
16247 }
16248}
16249
16250pub struct ReadableRequestStream {
16252 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16253 is_terminated: bool,
16254}
16255
16256impl std::marker::Unpin for ReadableRequestStream {}
16257
16258impl futures::stream::FusedStream for ReadableRequestStream {
16259 fn is_terminated(&self) -> bool {
16260 self.is_terminated
16261 }
16262}
16263
16264impl fidl::endpoints::RequestStream for ReadableRequestStream {
16265 type Protocol = ReadableMarker;
16266 type ControlHandle = ReadableControlHandle;
16267
16268 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
16269 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
16270 }
16271
16272 fn control_handle(&self) -> Self::ControlHandle {
16273 ReadableControlHandle { inner: self.inner.clone() }
16274 }
16275
16276 fn into_inner(
16277 self,
16278 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
16279 {
16280 (self.inner, self.is_terminated)
16281 }
16282
16283 fn from_inner(
16284 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16285 is_terminated: bool,
16286 ) -> Self {
16287 Self { inner, is_terminated }
16288 }
16289}
16290
16291impl futures::Stream for ReadableRequestStream {
16292 type Item = Result<ReadableRequest, fidl::Error>;
16293
16294 fn poll_next(
16295 mut self: std::pin::Pin<&mut Self>,
16296 cx: &mut std::task::Context<'_>,
16297 ) -> std::task::Poll<Option<Self::Item>> {
16298 let this = &mut *self;
16299 if this.inner.check_shutdown(cx) {
16300 this.is_terminated = true;
16301 return std::task::Poll::Ready(None);
16302 }
16303 if this.is_terminated {
16304 panic!("polled ReadableRequestStream after completion");
16305 }
16306 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
16307 |bytes, handles| {
16308 match this.inner.channel().read_etc(cx, bytes, handles) {
16309 std::task::Poll::Ready(Ok(())) => {}
16310 std::task::Poll::Pending => return std::task::Poll::Pending,
16311 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
16312 this.is_terminated = true;
16313 return std::task::Poll::Ready(None);
16314 }
16315 std::task::Poll::Ready(Err(e)) => {
16316 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
16317 e.into(),
16318 ))));
16319 }
16320 }
16321
16322 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16324
16325 std::task::Poll::Ready(Some(match header.ordinal {
16326 0x57e419a298c8ede => {
16327 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
16328 let mut req = fidl::new_empty!(
16329 ReadableReadRequest,
16330 fidl::encoding::DefaultFuchsiaResourceDialect
16331 );
16332 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
16333 let control_handle = ReadableControlHandle { inner: this.inner.clone() };
16334 Ok(ReadableRequest::Read {
16335 count: req.count,
16336
16337 responder: ReadableReadResponder {
16338 control_handle: std::mem::ManuallyDrop::new(control_handle),
16339 tx_id: header.tx_id,
16340 },
16341 })
16342 }
16343 _ => Err(fidl::Error::UnknownOrdinal {
16344 ordinal: header.ordinal,
16345 protocol_name:
16346 <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16347 }),
16348 }))
16349 },
16350 )
16351 }
16352}
16353
16354#[derive(Debug)]
16355pub enum ReadableRequest {
16356 Read { count: u64, responder: ReadableReadResponder },
16375}
16376
16377impl ReadableRequest {
16378 #[allow(irrefutable_let_patterns)]
16379 pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
16380 if let ReadableRequest::Read { count, responder } = self {
16381 Some((count, responder))
16382 } else {
16383 None
16384 }
16385 }
16386
16387 pub fn method_name(&self) -> &'static str {
16389 match *self {
16390 ReadableRequest::Read { .. } => "read",
16391 }
16392 }
16393}
16394
16395#[derive(Debug, Clone)]
16396pub struct ReadableControlHandle {
16397 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16398}
16399
16400impl fidl::endpoints::ControlHandle for ReadableControlHandle {
16401 fn shutdown(&self) {
16402 self.inner.shutdown()
16403 }
16404
16405 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
16406 self.inner.shutdown_with_epitaph(status)
16407 }
16408
16409 fn is_closed(&self) -> bool {
16410 self.inner.channel().is_closed()
16411 }
16412 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
16413 self.inner.channel().on_closed()
16414 }
16415
16416 #[cfg(target_os = "fuchsia")]
16417 fn signal_peer(
16418 &self,
16419 clear_mask: zx::Signals,
16420 set_mask: zx::Signals,
16421 ) -> Result<(), zx_status::Status> {
16422 use fidl::Peered;
16423 self.inner.channel().signal_peer(clear_mask, set_mask)
16424 }
16425}
16426
16427impl ReadableControlHandle {}
16428
16429#[must_use = "FIDL methods require a response to be sent"]
16430#[derive(Debug)]
16431pub struct ReadableReadResponder {
16432 control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
16433 tx_id: u32,
16434}
16435
16436impl std::ops::Drop for ReadableReadResponder {
16440 fn drop(&mut self) {
16441 self.control_handle.shutdown();
16442 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16444 }
16445}
16446
16447impl fidl::endpoints::Responder for ReadableReadResponder {
16448 type ControlHandle = ReadableControlHandle;
16449
16450 fn control_handle(&self) -> &ReadableControlHandle {
16451 &self.control_handle
16452 }
16453
16454 fn drop_without_shutdown(mut self) {
16455 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16457 std::mem::forget(self);
16459 }
16460}
16461
16462impl ReadableReadResponder {
16463 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
16467 let _result = self.send_raw(result);
16468 if _result.is_err() {
16469 self.control_handle.shutdown();
16470 }
16471 self.drop_without_shutdown();
16472 _result
16473 }
16474
16475 pub fn send_no_shutdown_on_err(
16477 self,
16478 mut result: Result<&[u8], i32>,
16479 ) -> Result<(), fidl::Error> {
16480 let _result = self.send_raw(result);
16481 self.drop_without_shutdown();
16482 _result
16483 }
16484
16485 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
16486 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
16487 result.map(|data| (data,)),
16488 self.tx_id,
16489 0x57e419a298c8ede,
16490 fidl::encoding::DynamicFlags::empty(),
16491 )
16492 }
16493}
16494
16495#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16496pub struct SymlinkMarker;
16497
16498impl fidl::endpoints::ProtocolMarker for SymlinkMarker {
16499 type Proxy = SymlinkProxy;
16500 type RequestStream = SymlinkRequestStream;
16501 #[cfg(target_os = "fuchsia")]
16502 type SynchronousProxy = SymlinkSynchronousProxy;
16503
16504 const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
16505}
16506impl fidl::endpoints::DiscoverableProtocolMarker for SymlinkMarker {}
16507
16508pub trait SymlinkProxyInterface: Send + Sync {
16509 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
16510 + Send;
16511 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
16512 fn r#clone(
16513 &self,
16514 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
16515 ) -> Result<(), fidl::Error>;
16516 type CloseResponseFut: std::future::Future<
16517 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
16518 > + Send;
16519 fn r#close(&self) -> Self::CloseResponseFut;
16520 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
16521 fn r#query(&self) -> Self::QueryResponseFut;
16522 fn r#deprecated_clone(
16523 &self,
16524 flags: OpenFlags,
16525 object: fidl::endpoints::ServerEnd<NodeMarker>,
16526 ) -> Result<(), fidl::Error>;
16527 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
16528 + Send;
16529 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
16530 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
16531 fn r#deprecated_set_attr(
16532 &self,
16533 flags: NodeAttributeFlags,
16534 attributes: &NodeAttributes,
16535 ) -> Self::DeprecatedSetAttrResponseFut;
16536 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
16537 + Send;
16538 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
16539 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
16540 + Send;
16541 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
16542 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
16543 + Send;
16544 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
16545 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
16546 + Send;
16547 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
16548 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
16549 + Send;
16550 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
16551 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
16552 + Send;
16553 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
16554 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
16555 + Send;
16556 fn r#update_attributes(
16557 &self,
16558 payload: &MutableNodeAttributes,
16559 ) -> Self::UpdateAttributesResponseFut;
16560 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
16561 fn r#sync(&self) -> Self::SyncResponseFut;
16562 fn r#list_extended_attributes(
16563 &self,
16564 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
16565 ) -> Result<(), fidl::Error>;
16566 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
16567 + Send;
16568 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
16569 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
16570 + Send;
16571 fn r#set_extended_attribute(
16572 &self,
16573 name: &[u8],
16574 value: ExtendedAttributeValue,
16575 mode: SetExtendedAttributeMode,
16576 ) -> Self::SetExtendedAttributeResponseFut;
16577 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
16578 + Send;
16579 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
16580 type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
16581 fn r#describe(&self) -> Self::DescribeResponseFut;
16582}
16583#[derive(Debug)]
16584#[cfg(target_os = "fuchsia")]
16585pub struct SymlinkSynchronousProxy {
16586 client: fidl::client::sync::Client,
16587}
16588
16589#[cfg(target_os = "fuchsia")]
16590impl fidl::endpoints::SynchronousProxy for SymlinkSynchronousProxy {
16591 type Proxy = SymlinkProxy;
16592 type Protocol = SymlinkMarker;
16593
16594 fn from_channel(inner: fidl::Channel) -> Self {
16595 Self::new(inner)
16596 }
16597
16598 fn into_channel(self) -> fidl::Channel {
16599 self.client.into_channel()
16600 }
16601
16602 fn as_channel(&self) -> &fidl::Channel {
16603 self.client.as_channel()
16604 }
16605}
16606
16607#[cfg(target_os = "fuchsia")]
16608impl SymlinkSynchronousProxy {
16609 pub fn new(channel: fidl::Channel) -> Self {
16610 Self { client: fidl::client::sync::Client::new(channel) }
16611 }
16612
16613 pub fn into_channel(self) -> fidl::Channel {
16614 self.client.into_channel()
16615 }
16616
16617 pub fn wait_for_event(
16620 &self,
16621 deadline: zx::MonotonicInstant,
16622 ) -> Result<SymlinkEvent, fidl::Error> {
16623 SymlinkEvent::decode(self.client.wait_for_event::<SymlinkMarker>(deadline)?)
16624 }
16625
16626 pub fn r#link_into(
16649 &self,
16650 mut dst_parent_token: fidl::Event,
16651 mut dst: &str,
16652 ___deadline: zx::MonotonicInstant,
16653 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
16654 let _response = self.client.send_query::<
16655 LinkableLinkIntoRequest,
16656 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16657 SymlinkMarker,
16658 >(
16659 (dst_parent_token, dst,),
16660 0x54f3949246a03e74,
16661 fidl::encoding::DynamicFlags::empty(),
16662 ___deadline,
16663 )?;
16664 Ok(_response.map(|x| x))
16665 }
16666
16667 pub fn r#clone(
16668 &self,
16669 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
16670 ) -> Result<(), fidl::Error> {
16671 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
16672 (request,),
16673 0x20d8a7aba2168a79,
16674 fidl::encoding::DynamicFlags::empty(),
16675 )
16676 }
16677
16678 pub fn r#close(
16689 &self,
16690 ___deadline: zx::MonotonicInstant,
16691 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
16692 let _response = self.client.send_query::<
16693 fidl::encoding::EmptyPayload,
16694 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16695 SymlinkMarker,
16696 >(
16697 (),
16698 0x5ac5d459ad7f657e,
16699 fidl::encoding::DynamicFlags::empty(),
16700 ___deadline,
16701 )?;
16702 Ok(_response.map(|x| x))
16703 }
16704
16705 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
16706 let _response = self.client.send_query::<
16707 fidl::encoding::EmptyPayload,
16708 fidl_fuchsia_unknown::QueryableQueryResponse,
16709 SymlinkMarker,
16710 >(
16711 (),
16712 0x2658edee9decfc06,
16713 fidl::encoding::DynamicFlags::empty(),
16714 ___deadline,
16715 )?;
16716 Ok(_response.protocol)
16717 }
16718
16719 pub fn r#deprecated_clone(
16721 &self,
16722 mut flags: OpenFlags,
16723 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
16724 ) -> Result<(), fidl::Error> {
16725 self.client.send::<NodeDeprecatedCloneRequest>(
16726 (flags, object),
16727 0x5a61678f293ce16f,
16728 fidl::encoding::DynamicFlags::FLEXIBLE,
16729 )
16730 }
16731
16732 pub fn r#deprecated_get_attr(
16734 &self,
16735 ___deadline: zx::MonotonicInstant,
16736 ) -> Result<(i32, NodeAttributes), fidl::Error> {
16737 let _response = self.client.send_query::<
16738 fidl::encoding::EmptyPayload,
16739 NodeDeprecatedGetAttrResponse,
16740 SymlinkMarker,
16741 >(
16742 (),
16743 0x78985e216314dafd,
16744 fidl::encoding::DynamicFlags::empty(),
16745 ___deadline,
16746 )?;
16747 Ok((_response.s, _response.attributes))
16748 }
16749
16750 pub fn r#deprecated_set_attr(
16752 &self,
16753 mut flags: NodeAttributeFlags,
16754 mut attributes: &NodeAttributes,
16755 ___deadline: zx::MonotonicInstant,
16756 ) -> Result<i32, fidl::Error> {
16757 let _response = self.client.send_query::<
16758 NodeDeprecatedSetAttrRequest,
16759 NodeDeprecatedSetAttrResponse,
16760 SymlinkMarker,
16761 >(
16762 (flags, attributes,),
16763 0x4186c0f40d938f46,
16764 fidl::encoding::DynamicFlags::empty(),
16765 ___deadline,
16766 )?;
16767 Ok(_response.s)
16768 }
16769
16770 pub fn r#deprecated_get_flags(
16772 &self,
16773 ___deadline: zx::MonotonicInstant,
16774 ) -> Result<(i32, OpenFlags), fidl::Error> {
16775 let _response = self.client.send_query::<
16776 fidl::encoding::EmptyPayload,
16777 NodeDeprecatedGetFlagsResponse,
16778 SymlinkMarker,
16779 >(
16780 (),
16781 0x5b88fffb8eda3aa1,
16782 fidl::encoding::DynamicFlags::empty(),
16783 ___deadline,
16784 )?;
16785 Ok((_response.s, _response.flags))
16786 }
16787
16788 pub fn r#deprecated_set_flags(
16790 &self,
16791 mut flags: OpenFlags,
16792 ___deadline: zx::MonotonicInstant,
16793 ) -> Result<i32, fidl::Error> {
16794 let _response = self.client.send_query::<
16795 NodeDeprecatedSetFlagsRequest,
16796 NodeDeprecatedSetFlagsResponse,
16797 SymlinkMarker,
16798 >(
16799 (flags,),
16800 0x5295b76c71fde733,
16801 fidl::encoding::DynamicFlags::empty(),
16802 ___deadline,
16803 )?;
16804 Ok(_response.s)
16805 }
16806
16807 pub fn r#get_flags(
16816 &self,
16817 ___deadline: zx::MonotonicInstant,
16818 ) -> Result<NodeGetFlagsResult, fidl::Error> {
16819 let _response = self.client.send_query::<
16820 fidl::encoding::EmptyPayload,
16821 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
16822 SymlinkMarker,
16823 >(
16824 (),
16825 0x176eb318f64ec23,
16826 fidl::encoding::DynamicFlags::FLEXIBLE,
16827 ___deadline,
16828 )?
16829 .into_result::<SymlinkMarker>("get_flags")?;
16830 Ok(_response.map(|x| x.flags))
16831 }
16832
16833 pub fn r#set_flags(
16843 &self,
16844 mut flags: Flags,
16845 ___deadline: zx::MonotonicInstant,
16846 ) -> Result<NodeSetFlagsResult, fidl::Error> {
16847 let _response = self.client.send_query::<
16848 NodeSetFlagsRequest,
16849 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
16850 SymlinkMarker,
16851 >(
16852 (flags,),
16853 0x55a8028685791ea8,
16854 fidl::encoding::DynamicFlags::FLEXIBLE,
16855 ___deadline,
16856 )?
16857 .into_result::<SymlinkMarker>("set_flags")?;
16858 Ok(_response.map(|x| x))
16859 }
16860
16861 pub fn r#query_filesystem(
16865 &self,
16866 ___deadline: zx::MonotonicInstant,
16867 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
16868 let _response = self
16869 .client
16870 .send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse, SymlinkMarker>(
16871 (),
16872 0x6f344a1c6b0a0610,
16873 fidl::encoding::DynamicFlags::empty(),
16874 ___deadline,
16875 )?;
16876 Ok((_response.s, _response.info))
16877 }
16878
16879 pub fn r#get_attributes(
16893 &self,
16894 mut query: NodeAttributesQuery,
16895 ___deadline: zx::MonotonicInstant,
16896 ) -> Result<NodeGetAttributesResult, fidl::Error> {
16897 let _response = self.client.send_query::<
16898 NodeGetAttributesRequest,
16899 fidl::encoding::ResultType<NodeAttributes2, i32>,
16900 SymlinkMarker,
16901 >(
16902 (query,),
16903 0x3d4396a638ea053b,
16904 fidl::encoding::DynamicFlags::empty(),
16905 ___deadline,
16906 )?;
16907 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
16908 }
16909
16910 pub fn r#update_attributes(
16919 &self,
16920 mut payload: &MutableNodeAttributes,
16921 ___deadline: zx::MonotonicInstant,
16922 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
16923 let _response = self.client.send_query::<
16924 MutableNodeAttributes,
16925 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16926 SymlinkMarker,
16927 >(
16928 payload,
16929 0x3308c1da5a89bf08,
16930 fidl::encoding::DynamicFlags::empty(),
16931 ___deadline,
16932 )?;
16933 Ok(_response.map(|x| x))
16934 }
16935
16936 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
16946 let _response = self.client.send_query::<
16947 fidl::encoding::EmptyPayload,
16948 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16949 SymlinkMarker,
16950 >(
16951 (),
16952 0x2c5c27ca0ab5dc49,
16953 fidl::encoding::DynamicFlags::empty(),
16954 ___deadline,
16955 )?;
16956 Ok(_response.map(|x| x))
16957 }
16958
16959 pub fn r#list_extended_attributes(
16968 &self,
16969 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
16970 ) -> Result<(), fidl::Error> {
16971 self.client.send::<NodeListExtendedAttributesRequest>(
16972 (iterator,),
16973 0x4b61033de007fcd0,
16974 fidl::encoding::DynamicFlags::empty(),
16975 )
16976 }
16977
16978 pub fn r#get_extended_attribute(
16985 &self,
16986 mut name: &[u8],
16987 ___deadline: zx::MonotonicInstant,
16988 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
16989 let _response = self.client.send_query::<
16990 NodeGetExtendedAttributeRequest,
16991 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
16992 SymlinkMarker,
16993 >(
16994 (name,),
16995 0x45ffa3ccfdeb76db,
16996 fidl::encoding::DynamicFlags::empty(),
16997 ___deadline,
16998 )?;
16999 Ok(_response.map(|x| x))
17000 }
17001
17002 pub fn r#set_extended_attribute(
17010 &self,
17011 mut name: &[u8],
17012 mut value: ExtendedAttributeValue,
17013 mut mode: SetExtendedAttributeMode,
17014 ___deadline: zx::MonotonicInstant,
17015 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
17016 let _response = self.client.send_query::<
17017 NodeSetExtendedAttributeRequest,
17018 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17019 SymlinkMarker,
17020 >(
17021 (name, &mut value, mode,),
17022 0x4a951362f681f23c,
17023 fidl::encoding::DynamicFlags::empty(),
17024 ___deadline,
17025 )?;
17026 Ok(_response.map(|x| x))
17027 }
17028
17029 pub fn r#remove_extended_attribute(
17035 &self,
17036 mut name: &[u8],
17037 ___deadline: zx::MonotonicInstant,
17038 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
17039 let _response = self.client.send_query::<
17040 NodeRemoveExtendedAttributeRequest,
17041 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17042 SymlinkMarker,
17043 >(
17044 (name,),
17045 0x7a0b9f3a9bf9032d,
17046 fidl::encoding::DynamicFlags::empty(),
17047 ___deadline,
17048 )?;
17049 Ok(_response.map(|x| x))
17050 }
17051
17052 pub fn r#describe(
17053 &self,
17054 ___deadline: zx::MonotonicInstant,
17055 ) -> Result<SymlinkInfo, fidl::Error> {
17056 let _response = self.client.send_query::<
17057 fidl::encoding::EmptyPayload,
17058 fidl::encoding::FlexibleType<SymlinkInfo>,
17059 SymlinkMarker,
17060 >(
17061 (),
17062 0x742c2ea5e89831f3,
17063 fidl::encoding::DynamicFlags::FLEXIBLE,
17064 ___deadline,
17065 )?
17066 .into_result::<SymlinkMarker>("describe")?;
17067 Ok(_response)
17068 }
17069}
17070
17071#[cfg(target_os = "fuchsia")]
17072impl From<SymlinkSynchronousProxy> for zx::NullableHandle {
17073 fn from(value: SymlinkSynchronousProxy) -> Self {
17074 value.into_channel().into()
17075 }
17076}
17077
17078#[cfg(target_os = "fuchsia")]
17079impl From<fidl::Channel> for SymlinkSynchronousProxy {
17080 fn from(value: fidl::Channel) -> Self {
17081 Self::new(value)
17082 }
17083}
17084
17085#[cfg(target_os = "fuchsia")]
17086impl fidl::endpoints::FromClient for SymlinkSynchronousProxy {
17087 type Protocol = SymlinkMarker;
17088
17089 fn from_client(value: fidl::endpoints::ClientEnd<SymlinkMarker>) -> Self {
17090 Self::new(value.into_channel())
17091 }
17092}
17093
17094#[derive(Debug, Clone)]
17095pub struct SymlinkProxy {
17096 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
17097}
17098
17099impl fidl::endpoints::Proxy for SymlinkProxy {
17100 type Protocol = SymlinkMarker;
17101
17102 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
17103 Self::new(inner)
17104 }
17105
17106 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
17107 self.client.into_channel().map_err(|client| Self { client })
17108 }
17109
17110 fn as_channel(&self) -> &::fidl::AsyncChannel {
17111 self.client.as_channel()
17112 }
17113}
17114
17115impl SymlinkProxy {
17116 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
17118 let protocol_name = <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
17119 Self { client: fidl::client::Client::new(channel, protocol_name) }
17120 }
17121
17122 pub fn take_event_stream(&self) -> SymlinkEventStream {
17128 SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
17129 }
17130
17131 pub fn r#link_into(
17154 &self,
17155 mut dst_parent_token: fidl::Event,
17156 mut dst: &str,
17157 ) -> fidl::client::QueryResponseFut<
17158 LinkableLinkIntoResult,
17159 fidl::encoding::DefaultFuchsiaResourceDialect,
17160 > {
17161 SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
17162 }
17163
17164 pub fn r#clone(
17165 &self,
17166 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17167 ) -> Result<(), fidl::Error> {
17168 SymlinkProxyInterface::r#clone(self, request)
17169 }
17170
17171 pub fn r#close(
17182 &self,
17183 ) -> fidl::client::QueryResponseFut<
17184 fidl_fuchsia_unknown::CloseableCloseResult,
17185 fidl::encoding::DefaultFuchsiaResourceDialect,
17186 > {
17187 SymlinkProxyInterface::r#close(self)
17188 }
17189
17190 pub fn r#query(
17191 &self,
17192 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
17193 {
17194 SymlinkProxyInterface::r#query(self)
17195 }
17196
17197 pub fn r#deprecated_clone(
17199 &self,
17200 mut flags: OpenFlags,
17201 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
17202 ) -> Result<(), fidl::Error> {
17203 SymlinkProxyInterface::r#deprecated_clone(self, flags, object)
17204 }
17205
17206 pub fn r#deprecated_get_attr(
17208 &self,
17209 ) -> fidl::client::QueryResponseFut<
17210 (i32, NodeAttributes),
17211 fidl::encoding::DefaultFuchsiaResourceDialect,
17212 > {
17213 SymlinkProxyInterface::r#deprecated_get_attr(self)
17214 }
17215
17216 pub fn r#deprecated_set_attr(
17218 &self,
17219 mut flags: NodeAttributeFlags,
17220 mut attributes: &NodeAttributes,
17221 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
17222 SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
17223 }
17224
17225 pub fn r#deprecated_get_flags(
17227 &self,
17228 ) -> fidl::client::QueryResponseFut<
17229 (i32, OpenFlags),
17230 fidl::encoding::DefaultFuchsiaResourceDialect,
17231 > {
17232 SymlinkProxyInterface::r#deprecated_get_flags(self)
17233 }
17234
17235 pub fn r#deprecated_set_flags(
17237 &self,
17238 mut flags: OpenFlags,
17239 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
17240 SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
17241 }
17242
17243 pub fn r#get_flags(
17252 &self,
17253 ) -> fidl::client::QueryResponseFut<
17254 NodeGetFlagsResult,
17255 fidl::encoding::DefaultFuchsiaResourceDialect,
17256 > {
17257 SymlinkProxyInterface::r#get_flags(self)
17258 }
17259
17260 pub fn r#set_flags(
17270 &self,
17271 mut flags: Flags,
17272 ) -> fidl::client::QueryResponseFut<
17273 NodeSetFlagsResult,
17274 fidl::encoding::DefaultFuchsiaResourceDialect,
17275 > {
17276 SymlinkProxyInterface::r#set_flags(self, flags)
17277 }
17278
17279 pub fn r#query_filesystem(
17283 &self,
17284 ) -> fidl::client::QueryResponseFut<
17285 (i32, Option<Box<FilesystemInfo>>),
17286 fidl::encoding::DefaultFuchsiaResourceDialect,
17287 > {
17288 SymlinkProxyInterface::r#query_filesystem(self)
17289 }
17290
17291 pub fn r#get_attributes(
17305 &self,
17306 mut query: NodeAttributesQuery,
17307 ) -> fidl::client::QueryResponseFut<
17308 NodeGetAttributesResult,
17309 fidl::encoding::DefaultFuchsiaResourceDialect,
17310 > {
17311 SymlinkProxyInterface::r#get_attributes(self, query)
17312 }
17313
17314 pub fn r#update_attributes(
17323 &self,
17324 mut payload: &MutableNodeAttributes,
17325 ) -> fidl::client::QueryResponseFut<
17326 NodeUpdateAttributesResult,
17327 fidl::encoding::DefaultFuchsiaResourceDialect,
17328 > {
17329 SymlinkProxyInterface::r#update_attributes(self, payload)
17330 }
17331
17332 pub fn r#sync(
17342 &self,
17343 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
17344 {
17345 SymlinkProxyInterface::r#sync(self)
17346 }
17347
17348 pub fn r#list_extended_attributes(
17357 &self,
17358 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17359 ) -> Result<(), fidl::Error> {
17360 SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
17361 }
17362
17363 pub fn r#get_extended_attribute(
17370 &self,
17371 mut name: &[u8],
17372 ) -> fidl::client::QueryResponseFut<
17373 NodeGetExtendedAttributeResult,
17374 fidl::encoding::DefaultFuchsiaResourceDialect,
17375 > {
17376 SymlinkProxyInterface::r#get_extended_attribute(self, name)
17377 }
17378
17379 pub fn r#set_extended_attribute(
17387 &self,
17388 mut name: &[u8],
17389 mut value: ExtendedAttributeValue,
17390 mut mode: SetExtendedAttributeMode,
17391 ) -> fidl::client::QueryResponseFut<
17392 NodeSetExtendedAttributeResult,
17393 fidl::encoding::DefaultFuchsiaResourceDialect,
17394 > {
17395 SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
17396 }
17397
17398 pub fn r#remove_extended_attribute(
17404 &self,
17405 mut name: &[u8],
17406 ) -> fidl::client::QueryResponseFut<
17407 NodeRemoveExtendedAttributeResult,
17408 fidl::encoding::DefaultFuchsiaResourceDialect,
17409 > {
17410 SymlinkProxyInterface::r#remove_extended_attribute(self, name)
17411 }
17412
17413 pub fn r#describe(
17414 &self,
17415 ) -> fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
17416 {
17417 SymlinkProxyInterface::r#describe(self)
17418 }
17419}
17420
17421impl SymlinkProxyInterface for SymlinkProxy {
17422 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
17423 LinkableLinkIntoResult,
17424 fidl::encoding::DefaultFuchsiaResourceDialect,
17425 >;
17426 fn r#link_into(
17427 &self,
17428 mut dst_parent_token: fidl::Event,
17429 mut dst: &str,
17430 ) -> Self::LinkIntoResponseFut {
17431 fn _decode(
17432 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17433 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
17434 let _response = fidl::client::decode_transaction_body::<
17435 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17436 fidl::encoding::DefaultFuchsiaResourceDialect,
17437 0x54f3949246a03e74,
17438 >(_buf?)?;
17439 Ok(_response.map(|x| x))
17440 }
17441 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
17442 (dst_parent_token, dst),
17443 0x54f3949246a03e74,
17444 fidl::encoding::DynamicFlags::empty(),
17445 _decode,
17446 )
17447 }
17448
17449 fn r#clone(
17450 &self,
17451 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17452 ) -> Result<(), fidl::Error> {
17453 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
17454 (request,),
17455 0x20d8a7aba2168a79,
17456 fidl::encoding::DynamicFlags::empty(),
17457 )
17458 }
17459
17460 type CloseResponseFut = fidl::client::QueryResponseFut<
17461 fidl_fuchsia_unknown::CloseableCloseResult,
17462 fidl::encoding::DefaultFuchsiaResourceDialect,
17463 >;
17464 fn r#close(&self) -> Self::CloseResponseFut {
17465 fn _decode(
17466 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17467 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
17468 let _response = fidl::client::decode_transaction_body::<
17469 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17470 fidl::encoding::DefaultFuchsiaResourceDialect,
17471 0x5ac5d459ad7f657e,
17472 >(_buf?)?;
17473 Ok(_response.map(|x| x))
17474 }
17475 self.client.send_query_and_decode::<
17476 fidl::encoding::EmptyPayload,
17477 fidl_fuchsia_unknown::CloseableCloseResult,
17478 >(
17479 (),
17480 0x5ac5d459ad7f657e,
17481 fidl::encoding::DynamicFlags::empty(),
17482 _decode,
17483 )
17484 }
17485
17486 type QueryResponseFut =
17487 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
17488 fn r#query(&self) -> Self::QueryResponseFut {
17489 fn _decode(
17490 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17491 ) -> Result<Vec<u8>, fidl::Error> {
17492 let _response = fidl::client::decode_transaction_body::<
17493 fidl_fuchsia_unknown::QueryableQueryResponse,
17494 fidl::encoding::DefaultFuchsiaResourceDialect,
17495 0x2658edee9decfc06,
17496 >(_buf?)?;
17497 Ok(_response.protocol)
17498 }
17499 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
17500 (),
17501 0x2658edee9decfc06,
17502 fidl::encoding::DynamicFlags::empty(),
17503 _decode,
17504 )
17505 }
17506
17507 fn r#deprecated_clone(
17508 &self,
17509 mut flags: OpenFlags,
17510 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
17511 ) -> Result<(), fidl::Error> {
17512 self.client.send::<NodeDeprecatedCloneRequest>(
17513 (flags, object),
17514 0x5a61678f293ce16f,
17515 fidl::encoding::DynamicFlags::FLEXIBLE,
17516 )
17517 }
17518
17519 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
17520 (i32, NodeAttributes),
17521 fidl::encoding::DefaultFuchsiaResourceDialect,
17522 >;
17523 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
17524 fn _decode(
17525 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17526 ) -> Result<(i32, NodeAttributes), fidl::Error> {
17527 let _response = fidl::client::decode_transaction_body::<
17528 NodeDeprecatedGetAttrResponse,
17529 fidl::encoding::DefaultFuchsiaResourceDialect,
17530 0x78985e216314dafd,
17531 >(_buf?)?;
17532 Ok((_response.s, _response.attributes))
17533 }
17534 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
17535 (),
17536 0x78985e216314dafd,
17537 fidl::encoding::DynamicFlags::empty(),
17538 _decode,
17539 )
17540 }
17541
17542 type DeprecatedSetAttrResponseFut =
17543 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
17544 fn r#deprecated_set_attr(
17545 &self,
17546 mut flags: NodeAttributeFlags,
17547 mut attributes: &NodeAttributes,
17548 ) -> Self::DeprecatedSetAttrResponseFut {
17549 fn _decode(
17550 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17551 ) -> Result<i32, fidl::Error> {
17552 let _response = fidl::client::decode_transaction_body::<
17553 NodeDeprecatedSetAttrResponse,
17554 fidl::encoding::DefaultFuchsiaResourceDialect,
17555 0x4186c0f40d938f46,
17556 >(_buf?)?;
17557 Ok(_response.s)
17558 }
17559 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
17560 (flags, attributes),
17561 0x4186c0f40d938f46,
17562 fidl::encoding::DynamicFlags::empty(),
17563 _decode,
17564 )
17565 }
17566
17567 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
17568 (i32, OpenFlags),
17569 fidl::encoding::DefaultFuchsiaResourceDialect,
17570 >;
17571 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
17572 fn _decode(
17573 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17574 ) -> Result<(i32, OpenFlags), fidl::Error> {
17575 let _response = fidl::client::decode_transaction_body::<
17576 NodeDeprecatedGetFlagsResponse,
17577 fidl::encoding::DefaultFuchsiaResourceDialect,
17578 0x5b88fffb8eda3aa1,
17579 >(_buf?)?;
17580 Ok((_response.s, _response.flags))
17581 }
17582 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
17583 (),
17584 0x5b88fffb8eda3aa1,
17585 fidl::encoding::DynamicFlags::empty(),
17586 _decode,
17587 )
17588 }
17589
17590 type DeprecatedSetFlagsResponseFut =
17591 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
17592 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
17593 fn _decode(
17594 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17595 ) -> Result<i32, fidl::Error> {
17596 let _response = fidl::client::decode_transaction_body::<
17597 NodeDeprecatedSetFlagsResponse,
17598 fidl::encoding::DefaultFuchsiaResourceDialect,
17599 0x5295b76c71fde733,
17600 >(_buf?)?;
17601 Ok(_response.s)
17602 }
17603 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
17604 (flags,),
17605 0x5295b76c71fde733,
17606 fidl::encoding::DynamicFlags::empty(),
17607 _decode,
17608 )
17609 }
17610
17611 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
17612 NodeGetFlagsResult,
17613 fidl::encoding::DefaultFuchsiaResourceDialect,
17614 >;
17615 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
17616 fn _decode(
17617 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17618 ) -> Result<NodeGetFlagsResult, fidl::Error> {
17619 let _response = fidl::client::decode_transaction_body::<
17620 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
17621 fidl::encoding::DefaultFuchsiaResourceDialect,
17622 0x176eb318f64ec23,
17623 >(_buf?)?
17624 .into_result::<SymlinkMarker>("get_flags")?;
17625 Ok(_response.map(|x| x.flags))
17626 }
17627 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
17628 (),
17629 0x176eb318f64ec23,
17630 fidl::encoding::DynamicFlags::FLEXIBLE,
17631 _decode,
17632 )
17633 }
17634
17635 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
17636 NodeSetFlagsResult,
17637 fidl::encoding::DefaultFuchsiaResourceDialect,
17638 >;
17639 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
17640 fn _decode(
17641 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17642 ) -> Result<NodeSetFlagsResult, fidl::Error> {
17643 let _response = fidl::client::decode_transaction_body::<
17644 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
17645 fidl::encoding::DefaultFuchsiaResourceDialect,
17646 0x55a8028685791ea8,
17647 >(_buf?)?
17648 .into_result::<SymlinkMarker>("set_flags")?;
17649 Ok(_response.map(|x| x))
17650 }
17651 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
17652 (flags,),
17653 0x55a8028685791ea8,
17654 fidl::encoding::DynamicFlags::FLEXIBLE,
17655 _decode,
17656 )
17657 }
17658
17659 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
17660 (i32, Option<Box<FilesystemInfo>>),
17661 fidl::encoding::DefaultFuchsiaResourceDialect,
17662 >;
17663 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
17664 fn _decode(
17665 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17666 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
17667 let _response = fidl::client::decode_transaction_body::<
17668 NodeQueryFilesystemResponse,
17669 fidl::encoding::DefaultFuchsiaResourceDialect,
17670 0x6f344a1c6b0a0610,
17671 >(_buf?)?;
17672 Ok((_response.s, _response.info))
17673 }
17674 self.client.send_query_and_decode::<
17675 fidl::encoding::EmptyPayload,
17676 (i32, Option<Box<FilesystemInfo>>),
17677 >(
17678 (),
17679 0x6f344a1c6b0a0610,
17680 fidl::encoding::DynamicFlags::empty(),
17681 _decode,
17682 )
17683 }
17684
17685 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
17686 NodeGetAttributesResult,
17687 fidl::encoding::DefaultFuchsiaResourceDialect,
17688 >;
17689 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
17690 fn _decode(
17691 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17692 ) -> Result<NodeGetAttributesResult, fidl::Error> {
17693 let _response = fidl::client::decode_transaction_body::<
17694 fidl::encoding::ResultType<NodeAttributes2, i32>,
17695 fidl::encoding::DefaultFuchsiaResourceDialect,
17696 0x3d4396a638ea053b,
17697 >(_buf?)?;
17698 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
17699 }
17700 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
17701 (query,),
17702 0x3d4396a638ea053b,
17703 fidl::encoding::DynamicFlags::empty(),
17704 _decode,
17705 )
17706 }
17707
17708 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
17709 NodeUpdateAttributesResult,
17710 fidl::encoding::DefaultFuchsiaResourceDialect,
17711 >;
17712 fn r#update_attributes(
17713 &self,
17714 mut payload: &MutableNodeAttributes,
17715 ) -> Self::UpdateAttributesResponseFut {
17716 fn _decode(
17717 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17718 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
17719 let _response = fidl::client::decode_transaction_body::<
17720 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17721 fidl::encoding::DefaultFuchsiaResourceDialect,
17722 0x3308c1da5a89bf08,
17723 >(_buf?)?;
17724 Ok(_response.map(|x| x))
17725 }
17726 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
17727 payload,
17728 0x3308c1da5a89bf08,
17729 fidl::encoding::DynamicFlags::empty(),
17730 _decode,
17731 )
17732 }
17733
17734 type SyncResponseFut = fidl::client::QueryResponseFut<
17735 NodeSyncResult,
17736 fidl::encoding::DefaultFuchsiaResourceDialect,
17737 >;
17738 fn r#sync(&self) -> Self::SyncResponseFut {
17739 fn _decode(
17740 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17741 ) -> Result<NodeSyncResult, fidl::Error> {
17742 let _response = fidl::client::decode_transaction_body::<
17743 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17744 fidl::encoding::DefaultFuchsiaResourceDialect,
17745 0x2c5c27ca0ab5dc49,
17746 >(_buf?)?;
17747 Ok(_response.map(|x| x))
17748 }
17749 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
17750 (),
17751 0x2c5c27ca0ab5dc49,
17752 fidl::encoding::DynamicFlags::empty(),
17753 _decode,
17754 )
17755 }
17756
17757 fn r#list_extended_attributes(
17758 &self,
17759 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17760 ) -> Result<(), fidl::Error> {
17761 self.client.send::<NodeListExtendedAttributesRequest>(
17762 (iterator,),
17763 0x4b61033de007fcd0,
17764 fidl::encoding::DynamicFlags::empty(),
17765 )
17766 }
17767
17768 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17769 NodeGetExtendedAttributeResult,
17770 fidl::encoding::DefaultFuchsiaResourceDialect,
17771 >;
17772 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
17773 fn _decode(
17774 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17775 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
17776 let _response = fidl::client::decode_transaction_body::<
17777 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
17778 fidl::encoding::DefaultFuchsiaResourceDialect,
17779 0x45ffa3ccfdeb76db,
17780 >(_buf?)?;
17781 Ok(_response.map(|x| x))
17782 }
17783 self.client.send_query_and_decode::<
17784 NodeGetExtendedAttributeRequest,
17785 NodeGetExtendedAttributeResult,
17786 >(
17787 (name,),
17788 0x45ffa3ccfdeb76db,
17789 fidl::encoding::DynamicFlags::empty(),
17790 _decode,
17791 )
17792 }
17793
17794 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17795 NodeSetExtendedAttributeResult,
17796 fidl::encoding::DefaultFuchsiaResourceDialect,
17797 >;
17798 fn r#set_extended_attribute(
17799 &self,
17800 mut name: &[u8],
17801 mut value: ExtendedAttributeValue,
17802 mut mode: SetExtendedAttributeMode,
17803 ) -> Self::SetExtendedAttributeResponseFut {
17804 fn _decode(
17805 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17806 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
17807 let _response = fidl::client::decode_transaction_body::<
17808 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17809 fidl::encoding::DefaultFuchsiaResourceDialect,
17810 0x4a951362f681f23c,
17811 >(_buf?)?;
17812 Ok(_response.map(|x| x))
17813 }
17814 self.client.send_query_and_decode::<
17815 NodeSetExtendedAttributeRequest,
17816 NodeSetExtendedAttributeResult,
17817 >(
17818 (name, &mut value, mode,),
17819 0x4a951362f681f23c,
17820 fidl::encoding::DynamicFlags::empty(),
17821 _decode,
17822 )
17823 }
17824
17825 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17826 NodeRemoveExtendedAttributeResult,
17827 fidl::encoding::DefaultFuchsiaResourceDialect,
17828 >;
17829 fn r#remove_extended_attribute(
17830 &self,
17831 mut name: &[u8],
17832 ) -> Self::RemoveExtendedAttributeResponseFut {
17833 fn _decode(
17834 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17835 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
17836 let _response = fidl::client::decode_transaction_body::<
17837 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17838 fidl::encoding::DefaultFuchsiaResourceDialect,
17839 0x7a0b9f3a9bf9032d,
17840 >(_buf?)?;
17841 Ok(_response.map(|x| x))
17842 }
17843 self.client.send_query_and_decode::<
17844 NodeRemoveExtendedAttributeRequest,
17845 NodeRemoveExtendedAttributeResult,
17846 >(
17847 (name,),
17848 0x7a0b9f3a9bf9032d,
17849 fidl::encoding::DynamicFlags::empty(),
17850 _decode,
17851 )
17852 }
17853
17854 type DescribeResponseFut =
17855 fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
17856 fn r#describe(&self) -> Self::DescribeResponseFut {
17857 fn _decode(
17858 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17859 ) -> Result<SymlinkInfo, fidl::Error> {
17860 let _response = fidl::client::decode_transaction_body::<
17861 fidl::encoding::FlexibleType<SymlinkInfo>,
17862 fidl::encoding::DefaultFuchsiaResourceDialect,
17863 0x742c2ea5e89831f3,
17864 >(_buf?)?
17865 .into_result::<SymlinkMarker>("describe")?;
17866 Ok(_response)
17867 }
17868 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
17869 (),
17870 0x742c2ea5e89831f3,
17871 fidl::encoding::DynamicFlags::FLEXIBLE,
17872 _decode,
17873 )
17874 }
17875}
17876
17877pub struct SymlinkEventStream {
17878 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
17879}
17880
17881impl std::marker::Unpin for SymlinkEventStream {}
17882
17883impl futures::stream::FusedStream for SymlinkEventStream {
17884 fn is_terminated(&self) -> bool {
17885 self.event_receiver.is_terminated()
17886 }
17887}
17888
17889impl futures::Stream for SymlinkEventStream {
17890 type Item = Result<SymlinkEvent, fidl::Error>;
17891
17892 fn poll_next(
17893 mut self: std::pin::Pin<&mut Self>,
17894 cx: &mut std::task::Context<'_>,
17895 ) -> std::task::Poll<Option<Self::Item>> {
17896 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
17897 &mut self.event_receiver,
17898 cx
17899 )?) {
17900 Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
17901 None => std::task::Poll::Ready(None),
17902 }
17903 }
17904}
17905
17906#[derive(Debug)]
17907pub enum SymlinkEvent {
17908 OnOpen_ {
17909 s: i32,
17910 info: Option<Box<NodeInfoDeprecated>>,
17911 },
17912 OnRepresentation {
17913 payload: Representation,
17914 },
17915 #[non_exhaustive]
17916 _UnknownEvent {
17917 ordinal: u64,
17919 },
17920}
17921
17922impl SymlinkEvent {
17923 #[allow(irrefutable_let_patterns)]
17924 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
17925 if let SymlinkEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
17926 }
17927 #[allow(irrefutable_let_patterns)]
17928 pub fn into_on_representation(self) -> Option<Representation> {
17929 if let SymlinkEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
17930 }
17931
17932 fn decode(
17934 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
17935 ) -> Result<SymlinkEvent, fidl::Error> {
17936 let (bytes, _handles) = buf.split_mut();
17937 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17938 debug_assert_eq!(tx_header.tx_id, 0);
17939 match tx_header.ordinal {
17940 0x7fc7bbb1dbfd1972 => {
17941 let mut out = fidl::new_empty!(
17942 NodeOnOpenRequest,
17943 fidl::encoding::DefaultFuchsiaResourceDialect
17944 );
17945 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
17946 Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
17947 }
17948 0x5cb40567d80a510c => {
17949 let mut out =
17950 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
17951 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
17952 Ok((SymlinkEvent::OnRepresentation { payload: out }))
17953 }
17954 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
17955 Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
17956 }
17957 _ => Err(fidl::Error::UnknownOrdinal {
17958 ordinal: tx_header.ordinal,
17959 protocol_name: <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
17960 }),
17961 }
17962 }
17963}
17964
17965pub struct SymlinkRequestStream {
17967 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
17968 is_terminated: bool,
17969}
17970
17971impl std::marker::Unpin for SymlinkRequestStream {}
17972
17973impl futures::stream::FusedStream for SymlinkRequestStream {
17974 fn is_terminated(&self) -> bool {
17975 self.is_terminated
17976 }
17977}
17978
17979impl fidl::endpoints::RequestStream for SymlinkRequestStream {
17980 type Protocol = SymlinkMarker;
17981 type ControlHandle = SymlinkControlHandle;
17982
17983 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
17984 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
17985 }
17986
17987 fn control_handle(&self) -> Self::ControlHandle {
17988 SymlinkControlHandle { inner: self.inner.clone() }
17989 }
17990
17991 fn into_inner(
17992 self,
17993 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
17994 {
17995 (self.inner, self.is_terminated)
17996 }
17997
17998 fn from_inner(
17999 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
18000 is_terminated: bool,
18001 ) -> Self {
18002 Self { inner, is_terminated }
18003 }
18004}
18005
18006impl futures::Stream for SymlinkRequestStream {
18007 type Item = Result<SymlinkRequest, fidl::Error>;
18008
18009 fn poll_next(
18010 mut self: std::pin::Pin<&mut Self>,
18011 cx: &mut std::task::Context<'_>,
18012 ) -> std::task::Poll<Option<Self::Item>> {
18013 let this = &mut *self;
18014 if this.inner.check_shutdown(cx) {
18015 this.is_terminated = true;
18016 return std::task::Poll::Ready(None);
18017 }
18018 if this.is_terminated {
18019 panic!("polled SymlinkRequestStream after completion");
18020 }
18021 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
18022 |bytes, handles| {
18023 match this.inner.channel().read_etc(cx, bytes, handles) {
18024 std::task::Poll::Ready(Ok(())) => {}
18025 std::task::Poll::Pending => return std::task::Poll::Pending,
18026 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
18027 this.is_terminated = true;
18028 return std::task::Poll::Ready(None);
18029 }
18030 std::task::Poll::Ready(Err(e)) => {
18031 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
18032 e.into(),
18033 ))));
18034 }
18035 }
18036
18037 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
18039
18040 std::task::Poll::Ready(Some(match header.ordinal {
18041 0x54f3949246a03e74 => {
18042 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18043 let mut req = fidl::new_empty!(
18044 LinkableLinkIntoRequest,
18045 fidl::encoding::DefaultFuchsiaResourceDialect
18046 );
18047 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
18048 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18049 Ok(SymlinkRequest::LinkInto {
18050 dst_parent_token: req.dst_parent_token,
18051 dst: req.dst,
18052
18053 responder: SymlinkLinkIntoResponder {
18054 control_handle: std::mem::ManuallyDrop::new(control_handle),
18055 tx_id: header.tx_id,
18056 },
18057 })
18058 }
18059 0x20d8a7aba2168a79 => {
18060 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18061 let mut req = fidl::new_empty!(
18062 fidl_fuchsia_unknown::CloneableCloneRequest,
18063 fidl::encoding::DefaultFuchsiaResourceDialect
18064 );
18065 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
18066 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18067 Ok(SymlinkRequest::Clone { request: req.request, control_handle })
18068 }
18069 0x5ac5d459ad7f657e => {
18070 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18071 let mut req = fidl::new_empty!(
18072 fidl::encoding::EmptyPayload,
18073 fidl::encoding::DefaultFuchsiaResourceDialect
18074 );
18075 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18076 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18077 Ok(SymlinkRequest::Close {
18078 responder: SymlinkCloseResponder {
18079 control_handle: std::mem::ManuallyDrop::new(control_handle),
18080 tx_id: header.tx_id,
18081 },
18082 })
18083 }
18084 0x2658edee9decfc06 => {
18085 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18086 let mut req = fidl::new_empty!(
18087 fidl::encoding::EmptyPayload,
18088 fidl::encoding::DefaultFuchsiaResourceDialect
18089 );
18090 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18091 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18092 Ok(SymlinkRequest::Query {
18093 responder: SymlinkQueryResponder {
18094 control_handle: std::mem::ManuallyDrop::new(control_handle),
18095 tx_id: header.tx_id,
18096 },
18097 })
18098 }
18099 0x5a61678f293ce16f => {
18100 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18101 let mut req = fidl::new_empty!(
18102 NodeDeprecatedCloneRequest,
18103 fidl::encoding::DefaultFuchsiaResourceDialect
18104 );
18105 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
18106 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18107 Ok(SymlinkRequest::DeprecatedClone {
18108 flags: req.flags,
18109 object: req.object,
18110
18111 control_handle,
18112 })
18113 }
18114 0x78985e216314dafd => {
18115 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18116 let mut req = fidl::new_empty!(
18117 fidl::encoding::EmptyPayload,
18118 fidl::encoding::DefaultFuchsiaResourceDialect
18119 );
18120 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18121 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18122 Ok(SymlinkRequest::DeprecatedGetAttr {
18123 responder: SymlinkDeprecatedGetAttrResponder {
18124 control_handle: std::mem::ManuallyDrop::new(control_handle),
18125 tx_id: header.tx_id,
18126 },
18127 })
18128 }
18129 0x4186c0f40d938f46 => {
18130 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18131 let mut req = fidl::new_empty!(
18132 NodeDeprecatedSetAttrRequest,
18133 fidl::encoding::DefaultFuchsiaResourceDialect
18134 );
18135 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
18136 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18137 Ok(SymlinkRequest::DeprecatedSetAttr {
18138 flags: req.flags,
18139 attributes: req.attributes,
18140
18141 responder: SymlinkDeprecatedSetAttrResponder {
18142 control_handle: std::mem::ManuallyDrop::new(control_handle),
18143 tx_id: header.tx_id,
18144 },
18145 })
18146 }
18147 0x5b88fffb8eda3aa1 => {
18148 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18149 let mut req = fidl::new_empty!(
18150 fidl::encoding::EmptyPayload,
18151 fidl::encoding::DefaultFuchsiaResourceDialect
18152 );
18153 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18154 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18155 Ok(SymlinkRequest::DeprecatedGetFlags {
18156 responder: SymlinkDeprecatedGetFlagsResponder {
18157 control_handle: std::mem::ManuallyDrop::new(control_handle),
18158 tx_id: header.tx_id,
18159 },
18160 })
18161 }
18162 0x5295b76c71fde733 => {
18163 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18164 let mut req = fidl::new_empty!(
18165 NodeDeprecatedSetFlagsRequest,
18166 fidl::encoding::DefaultFuchsiaResourceDialect
18167 );
18168 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
18169 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18170 Ok(SymlinkRequest::DeprecatedSetFlags {
18171 flags: req.flags,
18172
18173 responder: SymlinkDeprecatedSetFlagsResponder {
18174 control_handle: std::mem::ManuallyDrop::new(control_handle),
18175 tx_id: header.tx_id,
18176 },
18177 })
18178 }
18179 0x176eb318f64ec23 => {
18180 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18181 let mut req = fidl::new_empty!(
18182 fidl::encoding::EmptyPayload,
18183 fidl::encoding::DefaultFuchsiaResourceDialect
18184 );
18185 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18186 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18187 Ok(SymlinkRequest::GetFlags {
18188 responder: SymlinkGetFlagsResponder {
18189 control_handle: std::mem::ManuallyDrop::new(control_handle),
18190 tx_id: header.tx_id,
18191 },
18192 })
18193 }
18194 0x55a8028685791ea8 => {
18195 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18196 let mut req = fidl::new_empty!(
18197 NodeSetFlagsRequest,
18198 fidl::encoding::DefaultFuchsiaResourceDialect
18199 );
18200 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
18201 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18202 Ok(SymlinkRequest::SetFlags {
18203 flags: req.flags,
18204
18205 responder: SymlinkSetFlagsResponder {
18206 control_handle: std::mem::ManuallyDrop::new(control_handle),
18207 tx_id: header.tx_id,
18208 },
18209 })
18210 }
18211 0x6f344a1c6b0a0610 => {
18212 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18213 let mut req = fidl::new_empty!(
18214 fidl::encoding::EmptyPayload,
18215 fidl::encoding::DefaultFuchsiaResourceDialect
18216 );
18217 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18218 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18219 Ok(SymlinkRequest::QueryFilesystem {
18220 responder: SymlinkQueryFilesystemResponder {
18221 control_handle: std::mem::ManuallyDrop::new(control_handle),
18222 tx_id: header.tx_id,
18223 },
18224 })
18225 }
18226 0x3d4396a638ea053b => {
18227 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18228 let mut req = fidl::new_empty!(
18229 NodeGetAttributesRequest,
18230 fidl::encoding::DefaultFuchsiaResourceDialect
18231 );
18232 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
18233 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18234 Ok(SymlinkRequest::GetAttributes {
18235 query: req.query,
18236
18237 responder: SymlinkGetAttributesResponder {
18238 control_handle: std::mem::ManuallyDrop::new(control_handle),
18239 tx_id: header.tx_id,
18240 },
18241 })
18242 }
18243 0x3308c1da5a89bf08 => {
18244 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18245 let mut req = fidl::new_empty!(
18246 MutableNodeAttributes,
18247 fidl::encoding::DefaultFuchsiaResourceDialect
18248 );
18249 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
18250 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18251 Ok(SymlinkRequest::UpdateAttributes {
18252 payload: req,
18253 responder: SymlinkUpdateAttributesResponder {
18254 control_handle: std::mem::ManuallyDrop::new(control_handle),
18255 tx_id: header.tx_id,
18256 },
18257 })
18258 }
18259 0x2c5c27ca0ab5dc49 => {
18260 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18261 let mut req = fidl::new_empty!(
18262 fidl::encoding::EmptyPayload,
18263 fidl::encoding::DefaultFuchsiaResourceDialect
18264 );
18265 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18266 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18267 Ok(SymlinkRequest::Sync {
18268 responder: SymlinkSyncResponder {
18269 control_handle: std::mem::ManuallyDrop::new(control_handle),
18270 tx_id: header.tx_id,
18271 },
18272 })
18273 }
18274 0x4b61033de007fcd0 => {
18275 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18276 let mut req = fidl::new_empty!(
18277 NodeListExtendedAttributesRequest,
18278 fidl::encoding::DefaultFuchsiaResourceDialect
18279 );
18280 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
18281 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18282 Ok(SymlinkRequest::ListExtendedAttributes {
18283 iterator: req.iterator,
18284
18285 control_handle,
18286 })
18287 }
18288 0x45ffa3ccfdeb76db => {
18289 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18290 let mut req = fidl::new_empty!(
18291 NodeGetExtendedAttributeRequest,
18292 fidl::encoding::DefaultFuchsiaResourceDialect
18293 );
18294 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18295 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18296 Ok(SymlinkRequest::GetExtendedAttribute {
18297 name: req.name,
18298
18299 responder: SymlinkGetExtendedAttributeResponder {
18300 control_handle: std::mem::ManuallyDrop::new(control_handle),
18301 tx_id: header.tx_id,
18302 },
18303 })
18304 }
18305 0x4a951362f681f23c => {
18306 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18307 let mut req = fidl::new_empty!(
18308 NodeSetExtendedAttributeRequest,
18309 fidl::encoding::DefaultFuchsiaResourceDialect
18310 );
18311 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18312 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18313 Ok(SymlinkRequest::SetExtendedAttribute {
18314 name: req.name,
18315 value: req.value,
18316 mode: req.mode,
18317
18318 responder: SymlinkSetExtendedAttributeResponder {
18319 control_handle: std::mem::ManuallyDrop::new(control_handle),
18320 tx_id: header.tx_id,
18321 },
18322 })
18323 }
18324 0x7a0b9f3a9bf9032d => {
18325 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18326 let mut req = fidl::new_empty!(
18327 NodeRemoveExtendedAttributeRequest,
18328 fidl::encoding::DefaultFuchsiaResourceDialect
18329 );
18330 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18331 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18332 Ok(SymlinkRequest::RemoveExtendedAttribute {
18333 name: req.name,
18334
18335 responder: SymlinkRemoveExtendedAttributeResponder {
18336 control_handle: std::mem::ManuallyDrop::new(control_handle),
18337 tx_id: header.tx_id,
18338 },
18339 })
18340 }
18341 0x742c2ea5e89831f3 => {
18342 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18343 let mut req = fidl::new_empty!(
18344 fidl::encoding::EmptyPayload,
18345 fidl::encoding::DefaultFuchsiaResourceDialect
18346 );
18347 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18348 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18349 Ok(SymlinkRequest::Describe {
18350 responder: SymlinkDescribeResponder {
18351 control_handle: std::mem::ManuallyDrop::new(control_handle),
18352 tx_id: header.tx_id,
18353 },
18354 })
18355 }
18356 _ if header.tx_id == 0
18357 && header
18358 .dynamic_flags()
18359 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
18360 {
18361 Ok(SymlinkRequest::_UnknownMethod {
18362 ordinal: header.ordinal,
18363 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
18364 method_type: fidl::MethodType::OneWay,
18365 })
18366 }
18367 _ if header
18368 .dynamic_flags()
18369 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
18370 {
18371 this.inner.send_framework_err(
18372 fidl::encoding::FrameworkErr::UnknownMethod,
18373 header.tx_id,
18374 header.ordinal,
18375 header.dynamic_flags(),
18376 (bytes, handles),
18377 )?;
18378 Ok(SymlinkRequest::_UnknownMethod {
18379 ordinal: header.ordinal,
18380 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
18381 method_type: fidl::MethodType::TwoWay,
18382 })
18383 }
18384 _ => Err(fidl::Error::UnknownOrdinal {
18385 ordinal: header.ordinal,
18386 protocol_name:
18387 <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
18388 }),
18389 }))
18390 },
18391 )
18392 }
18393}
18394
18395#[derive(Debug)]
18397pub enum SymlinkRequest {
18398 LinkInto {
18421 dst_parent_token: fidl::Event,
18422 dst: String,
18423 responder: SymlinkLinkIntoResponder,
18424 },
18425 Clone {
18426 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
18427 control_handle: SymlinkControlHandle,
18428 },
18429 Close {
18440 responder: SymlinkCloseResponder,
18441 },
18442 Query {
18443 responder: SymlinkQueryResponder,
18444 },
18445 DeprecatedClone {
18447 flags: OpenFlags,
18448 object: fidl::endpoints::ServerEnd<NodeMarker>,
18449 control_handle: SymlinkControlHandle,
18450 },
18451 DeprecatedGetAttr {
18453 responder: SymlinkDeprecatedGetAttrResponder,
18454 },
18455 DeprecatedSetAttr {
18457 flags: NodeAttributeFlags,
18458 attributes: NodeAttributes,
18459 responder: SymlinkDeprecatedSetAttrResponder,
18460 },
18461 DeprecatedGetFlags {
18463 responder: SymlinkDeprecatedGetFlagsResponder,
18464 },
18465 DeprecatedSetFlags {
18467 flags: OpenFlags,
18468 responder: SymlinkDeprecatedSetFlagsResponder,
18469 },
18470 GetFlags {
18479 responder: SymlinkGetFlagsResponder,
18480 },
18481 SetFlags {
18491 flags: Flags,
18492 responder: SymlinkSetFlagsResponder,
18493 },
18494 QueryFilesystem {
18498 responder: SymlinkQueryFilesystemResponder,
18499 },
18500 GetAttributes {
18514 query: NodeAttributesQuery,
18515 responder: SymlinkGetAttributesResponder,
18516 },
18517 UpdateAttributes {
18526 payload: MutableNodeAttributes,
18527 responder: SymlinkUpdateAttributesResponder,
18528 },
18529 Sync {
18539 responder: SymlinkSyncResponder,
18540 },
18541 ListExtendedAttributes {
18550 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
18551 control_handle: SymlinkControlHandle,
18552 },
18553 GetExtendedAttribute {
18560 name: Vec<u8>,
18561 responder: SymlinkGetExtendedAttributeResponder,
18562 },
18563 SetExtendedAttribute {
18571 name: Vec<u8>,
18572 value: ExtendedAttributeValue,
18573 mode: SetExtendedAttributeMode,
18574 responder: SymlinkSetExtendedAttributeResponder,
18575 },
18576 RemoveExtendedAttribute {
18582 name: Vec<u8>,
18583 responder: SymlinkRemoveExtendedAttributeResponder,
18584 },
18585 Describe {
18586 responder: SymlinkDescribeResponder,
18587 },
18588 #[non_exhaustive]
18590 _UnknownMethod {
18591 ordinal: u64,
18593 control_handle: SymlinkControlHandle,
18594 method_type: fidl::MethodType,
18595 },
18596}
18597
18598impl SymlinkRequest {
18599 #[allow(irrefutable_let_patterns)]
18600 pub fn into_link_into(self) -> Option<(fidl::Event, String, SymlinkLinkIntoResponder)> {
18601 if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
18602 Some((dst_parent_token, dst, responder))
18603 } else {
18604 None
18605 }
18606 }
18607
18608 #[allow(irrefutable_let_patterns)]
18609 pub fn into_clone(
18610 self,
18611 ) -> Option<(
18612 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
18613 SymlinkControlHandle,
18614 )> {
18615 if let SymlinkRequest::Clone { request, control_handle } = self {
18616 Some((request, control_handle))
18617 } else {
18618 None
18619 }
18620 }
18621
18622 #[allow(irrefutable_let_patterns)]
18623 pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
18624 if let SymlinkRequest::Close { responder } = self { Some((responder)) } else { None }
18625 }
18626
18627 #[allow(irrefutable_let_patterns)]
18628 pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
18629 if let SymlinkRequest::Query { responder } = self { Some((responder)) } else { None }
18630 }
18631
18632 #[allow(irrefutable_let_patterns)]
18633 pub fn into_deprecated_clone(
18634 self,
18635 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, SymlinkControlHandle)> {
18636 if let SymlinkRequest::DeprecatedClone { flags, object, control_handle } = self {
18637 Some((flags, object, control_handle))
18638 } else {
18639 None
18640 }
18641 }
18642
18643 #[allow(irrefutable_let_patterns)]
18644 pub fn into_deprecated_get_attr(self) -> Option<(SymlinkDeprecatedGetAttrResponder)> {
18645 if let SymlinkRequest::DeprecatedGetAttr { responder } = self {
18646 Some((responder))
18647 } else {
18648 None
18649 }
18650 }
18651
18652 #[allow(irrefutable_let_patterns)]
18653 pub fn into_deprecated_set_attr(
18654 self,
18655 ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
18656 if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
18657 Some((flags, attributes, responder))
18658 } else {
18659 None
18660 }
18661 }
18662
18663 #[allow(irrefutable_let_patterns)]
18664 pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
18665 if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
18666 Some((responder))
18667 } else {
18668 None
18669 }
18670 }
18671
18672 #[allow(irrefutable_let_patterns)]
18673 pub fn into_deprecated_set_flags(
18674 self,
18675 ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
18676 if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
18677 Some((flags, responder))
18678 } else {
18679 None
18680 }
18681 }
18682
18683 #[allow(irrefutable_let_patterns)]
18684 pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
18685 if let SymlinkRequest::GetFlags { responder } = self { Some((responder)) } else { None }
18686 }
18687
18688 #[allow(irrefutable_let_patterns)]
18689 pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
18690 if let SymlinkRequest::SetFlags { flags, responder } = self {
18691 Some((flags, responder))
18692 } else {
18693 None
18694 }
18695 }
18696
18697 #[allow(irrefutable_let_patterns)]
18698 pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
18699 if let SymlinkRequest::QueryFilesystem { responder } = self {
18700 Some((responder))
18701 } else {
18702 None
18703 }
18704 }
18705
18706 #[allow(irrefutable_let_patterns)]
18707 pub fn into_get_attributes(
18708 self,
18709 ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
18710 if let SymlinkRequest::GetAttributes { query, responder } = self {
18711 Some((query, responder))
18712 } else {
18713 None
18714 }
18715 }
18716
18717 #[allow(irrefutable_let_patterns)]
18718 pub fn into_update_attributes(
18719 self,
18720 ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
18721 if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
18722 Some((payload, responder))
18723 } else {
18724 None
18725 }
18726 }
18727
18728 #[allow(irrefutable_let_patterns)]
18729 pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
18730 if let SymlinkRequest::Sync { responder } = self { Some((responder)) } else { None }
18731 }
18732
18733 #[allow(irrefutable_let_patterns)]
18734 pub fn into_list_extended_attributes(
18735 self,
18736 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, SymlinkControlHandle)>
18737 {
18738 if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
18739 Some((iterator, control_handle))
18740 } else {
18741 None
18742 }
18743 }
18744
18745 #[allow(irrefutable_let_patterns)]
18746 pub fn into_get_extended_attribute(
18747 self,
18748 ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
18749 if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
18750 Some((name, responder))
18751 } else {
18752 None
18753 }
18754 }
18755
18756 #[allow(irrefutable_let_patterns)]
18757 pub fn into_set_extended_attribute(
18758 self,
18759 ) -> Option<(
18760 Vec<u8>,
18761 ExtendedAttributeValue,
18762 SetExtendedAttributeMode,
18763 SymlinkSetExtendedAttributeResponder,
18764 )> {
18765 if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
18766 Some((name, value, mode, responder))
18767 } else {
18768 None
18769 }
18770 }
18771
18772 #[allow(irrefutable_let_patterns)]
18773 pub fn into_remove_extended_attribute(
18774 self,
18775 ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
18776 if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
18777 Some((name, responder))
18778 } else {
18779 None
18780 }
18781 }
18782
18783 #[allow(irrefutable_let_patterns)]
18784 pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
18785 if let SymlinkRequest::Describe { responder } = self { Some((responder)) } else { None }
18786 }
18787
18788 pub fn method_name(&self) -> &'static str {
18790 match *self {
18791 SymlinkRequest::LinkInto { .. } => "link_into",
18792 SymlinkRequest::Clone { .. } => "clone",
18793 SymlinkRequest::Close { .. } => "close",
18794 SymlinkRequest::Query { .. } => "query",
18795 SymlinkRequest::DeprecatedClone { .. } => "deprecated_clone",
18796 SymlinkRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
18797 SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
18798 SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
18799 SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
18800 SymlinkRequest::GetFlags { .. } => "get_flags",
18801 SymlinkRequest::SetFlags { .. } => "set_flags",
18802 SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
18803 SymlinkRequest::GetAttributes { .. } => "get_attributes",
18804 SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
18805 SymlinkRequest::Sync { .. } => "sync",
18806 SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
18807 SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
18808 SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
18809 SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
18810 SymlinkRequest::Describe { .. } => "describe",
18811 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
18812 "unknown one-way method"
18813 }
18814 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
18815 "unknown two-way method"
18816 }
18817 }
18818 }
18819}
18820
18821#[derive(Debug, Clone)]
18822pub struct SymlinkControlHandle {
18823 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
18824}
18825
18826impl fidl::endpoints::ControlHandle for SymlinkControlHandle {
18827 fn shutdown(&self) {
18828 self.inner.shutdown()
18829 }
18830
18831 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
18832 self.inner.shutdown_with_epitaph(status)
18833 }
18834
18835 fn is_closed(&self) -> bool {
18836 self.inner.channel().is_closed()
18837 }
18838 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
18839 self.inner.channel().on_closed()
18840 }
18841
18842 #[cfg(target_os = "fuchsia")]
18843 fn signal_peer(
18844 &self,
18845 clear_mask: zx::Signals,
18846 set_mask: zx::Signals,
18847 ) -> Result<(), zx_status::Status> {
18848 use fidl::Peered;
18849 self.inner.channel().signal_peer(clear_mask, set_mask)
18850 }
18851}
18852
18853impl SymlinkControlHandle {
18854 pub fn send_on_open_(
18855 &self,
18856 mut s: i32,
18857 mut info: Option<NodeInfoDeprecated>,
18858 ) -> Result<(), fidl::Error> {
18859 self.inner.send::<NodeOnOpenRequest>(
18860 (s, info.as_mut()),
18861 0,
18862 0x7fc7bbb1dbfd1972,
18863 fidl::encoding::DynamicFlags::FLEXIBLE,
18864 )
18865 }
18866
18867 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
18868 self.inner.send::<Representation>(
18869 &mut payload,
18870 0,
18871 0x5cb40567d80a510c,
18872 fidl::encoding::DynamicFlags::empty(),
18873 )
18874 }
18875}
18876
18877#[must_use = "FIDL methods require a response to be sent"]
18878#[derive(Debug)]
18879pub struct SymlinkLinkIntoResponder {
18880 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18881 tx_id: u32,
18882}
18883
18884impl std::ops::Drop for SymlinkLinkIntoResponder {
18888 fn drop(&mut self) {
18889 self.control_handle.shutdown();
18890 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18892 }
18893}
18894
18895impl fidl::endpoints::Responder for SymlinkLinkIntoResponder {
18896 type ControlHandle = SymlinkControlHandle;
18897
18898 fn control_handle(&self) -> &SymlinkControlHandle {
18899 &self.control_handle
18900 }
18901
18902 fn drop_without_shutdown(mut self) {
18903 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18905 std::mem::forget(self);
18907 }
18908}
18909
18910impl SymlinkLinkIntoResponder {
18911 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18915 let _result = self.send_raw(result);
18916 if _result.is_err() {
18917 self.control_handle.shutdown();
18918 }
18919 self.drop_without_shutdown();
18920 _result
18921 }
18922
18923 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18925 let _result = self.send_raw(result);
18926 self.drop_without_shutdown();
18927 _result
18928 }
18929
18930 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18931 self.control_handle
18932 .inner
18933 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
18934 result,
18935 self.tx_id,
18936 0x54f3949246a03e74,
18937 fidl::encoding::DynamicFlags::empty(),
18938 )
18939 }
18940}
18941
18942#[must_use = "FIDL methods require a response to be sent"]
18943#[derive(Debug)]
18944pub struct SymlinkCloseResponder {
18945 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18946 tx_id: u32,
18947}
18948
18949impl std::ops::Drop for SymlinkCloseResponder {
18953 fn drop(&mut self) {
18954 self.control_handle.shutdown();
18955 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18957 }
18958}
18959
18960impl fidl::endpoints::Responder for SymlinkCloseResponder {
18961 type ControlHandle = SymlinkControlHandle;
18962
18963 fn control_handle(&self) -> &SymlinkControlHandle {
18964 &self.control_handle
18965 }
18966
18967 fn drop_without_shutdown(mut self) {
18968 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18970 std::mem::forget(self);
18972 }
18973}
18974
18975impl SymlinkCloseResponder {
18976 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18980 let _result = self.send_raw(result);
18981 if _result.is_err() {
18982 self.control_handle.shutdown();
18983 }
18984 self.drop_without_shutdown();
18985 _result
18986 }
18987
18988 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18990 let _result = self.send_raw(result);
18991 self.drop_without_shutdown();
18992 _result
18993 }
18994
18995 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18996 self.control_handle
18997 .inner
18998 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
18999 result,
19000 self.tx_id,
19001 0x5ac5d459ad7f657e,
19002 fidl::encoding::DynamicFlags::empty(),
19003 )
19004 }
19005}
19006
19007#[must_use = "FIDL methods require a response to be sent"]
19008#[derive(Debug)]
19009pub struct SymlinkQueryResponder {
19010 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19011 tx_id: u32,
19012}
19013
19014impl std::ops::Drop for SymlinkQueryResponder {
19018 fn drop(&mut self) {
19019 self.control_handle.shutdown();
19020 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19022 }
19023}
19024
19025impl fidl::endpoints::Responder for SymlinkQueryResponder {
19026 type ControlHandle = SymlinkControlHandle;
19027
19028 fn control_handle(&self) -> &SymlinkControlHandle {
19029 &self.control_handle
19030 }
19031
19032 fn drop_without_shutdown(mut self) {
19033 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19035 std::mem::forget(self);
19037 }
19038}
19039
19040impl SymlinkQueryResponder {
19041 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
19045 let _result = self.send_raw(protocol);
19046 if _result.is_err() {
19047 self.control_handle.shutdown();
19048 }
19049 self.drop_without_shutdown();
19050 _result
19051 }
19052
19053 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
19055 let _result = self.send_raw(protocol);
19056 self.drop_without_shutdown();
19057 _result
19058 }
19059
19060 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
19061 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
19062 (protocol,),
19063 self.tx_id,
19064 0x2658edee9decfc06,
19065 fidl::encoding::DynamicFlags::empty(),
19066 )
19067 }
19068}
19069
19070#[must_use = "FIDL methods require a response to be sent"]
19071#[derive(Debug)]
19072pub struct SymlinkDeprecatedGetAttrResponder {
19073 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19074 tx_id: u32,
19075}
19076
19077impl std::ops::Drop for SymlinkDeprecatedGetAttrResponder {
19081 fn drop(&mut self) {
19082 self.control_handle.shutdown();
19083 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19085 }
19086}
19087
19088impl fidl::endpoints::Responder for SymlinkDeprecatedGetAttrResponder {
19089 type ControlHandle = SymlinkControlHandle;
19090
19091 fn control_handle(&self) -> &SymlinkControlHandle {
19092 &self.control_handle
19093 }
19094
19095 fn drop_without_shutdown(mut self) {
19096 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19098 std::mem::forget(self);
19100 }
19101}
19102
19103impl SymlinkDeprecatedGetAttrResponder {
19104 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
19108 let _result = self.send_raw(s, attributes);
19109 if _result.is_err() {
19110 self.control_handle.shutdown();
19111 }
19112 self.drop_without_shutdown();
19113 _result
19114 }
19115
19116 pub fn send_no_shutdown_on_err(
19118 self,
19119 mut s: i32,
19120 mut attributes: &NodeAttributes,
19121 ) -> Result<(), fidl::Error> {
19122 let _result = self.send_raw(s, attributes);
19123 self.drop_without_shutdown();
19124 _result
19125 }
19126
19127 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
19128 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
19129 (s, attributes),
19130 self.tx_id,
19131 0x78985e216314dafd,
19132 fidl::encoding::DynamicFlags::empty(),
19133 )
19134 }
19135}
19136
19137#[must_use = "FIDL methods require a response to be sent"]
19138#[derive(Debug)]
19139pub struct SymlinkDeprecatedSetAttrResponder {
19140 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19141 tx_id: u32,
19142}
19143
19144impl std::ops::Drop for SymlinkDeprecatedSetAttrResponder {
19148 fn drop(&mut self) {
19149 self.control_handle.shutdown();
19150 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19152 }
19153}
19154
19155impl fidl::endpoints::Responder for SymlinkDeprecatedSetAttrResponder {
19156 type ControlHandle = SymlinkControlHandle;
19157
19158 fn control_handle(&self) -> &SymlinkControlHandle {
19159 &self.control_handle
19160 }
19161
19162 fn drop_without_shutdown(mut self) {
19163 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19165 std::mem::forget(self);
19167 }
19168}
19169
19170impl SymlinkDeprecatedSetAttrResponder {
19171 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
19175 let _result = self.send_raw(s);
19176 if _result.is_err() {
19177 self.control_handle.shutdown();
19178 }
19179 self.drop_without_shutdown();
19180 _result
19181 }
19182
19183 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
19185 let _result = self.send_raw(s);
19186 self.drop_without_shutdown();
19187 _result
19188 }
19189
19190 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
19191 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
19192 (s,),
19193 self.tx_id,
19194 0x4186c0f40d938f46,
19195 fidl::encoding::DynamicFlags::empty(),
19196 )
19197 }
19198}
19199
19200#[must_use = "FIDL methods require a response to be sent"]
19201#[derive(Debug)]
19202pub struct SymlinkDeprecatedGetFlagsResponder {
19203 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19204 tx_id: u32,
19205}
19206
19207impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
19211 fn drop(&mut self) {
19212 self.control_handle.shutdown();
19213 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19215 }
19216}
19217
19218impl fidl::endpoints::Responder for SymlinkDeprecatedGetFlagsResponder {
19219 type ControlHandle = SymlinkControlHandle;
19220
19221 fn control_handle(&self) -> &SymlinkControlHandle {
19222 &self.control_handle
19223 }
19224
19225 fn drop_without_shutdown(mut self) {
19226 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19228 std::mem::forget(self);
19230 }
19231}
19232
19233impl SymlinkDeprecatedGetFlagsResponder {
19234 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
19238 let _result = self.send_raw(s, flags);
19239 if _result.is_err() {
19240 self.control_handle.shutdown();
19241 }
19242 self.drop_without_shutdown();
19243 _result
19244 }
19245
19246 pub fn send_no_shutdown_on_err(
19248 self,
19249 mut s: i32,
19250 mut flags: OpenFlags,
19251 ) -> Result<(), fidl::Error> {
19252 let _result = self.send_raw(s, flags);
19253 self.drop_without_shutdown();
19254 _result
19255 }
19256
19257 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
19258 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
19259 (s, flags),
19260 self.tx_id,
19261 0x5b88fffb8eda3aa1,
19262 fidl::encoding::DynamicFlags::empty(),
19263 )
19264 }
19265}
19266
19267#[must_use = "FIDL methods require a response to be sent"]
19268#[derive(Debug)]
19269pub struct SymlinkDeprecatedSetFlagsResponder {
19270 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19271 tx_id: u32,
19272}
19273
19274impl std::ops::Drop for SymlinkDeprecatedSetFlagsResponder {
19278 fn drop(&mut self) {
19279 self.control_handle.shutdown();
19280 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19282 }
19283}
19284
19285impl fidl::endpoints::Responder for SymlinkDeprecatedSetFlagsResponder {
19286 type ControlHandle = SymlinkControlHandle;
19287
19288 fn control_handle(&self) -> &SymlinkControlHandle {
19289 &self.control_handle
19290 }
19291
19292 fn drop_without_shutdown(mut self) {
19293 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19295 std::mem::forget(self);
19297 }
19298}
19299
19300impl SymlinkDeprecatedSetFlagsResponder {
19301 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
19305 let _result = self.send_raw(s);
19306 if _result.is_err() {
19307 self.control_handle.shutdown();
19308 }
19309 self.drop_without_shutdown();
19310 _result
19311 }
19312
19313 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
19315 let _result = self.send_raw(s);
19316 self.drop_without_shutdown();
19317 _result
19318 }
19319
19320 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
19321 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
19322 (s,),
19323 self.tx_id,
19324 0x5295b76c71fde733,
19325 fidl::encoding::DynamicFlags::empty(),
19326 )
19327 }
19328}
19329
19330#[must_use = "FIDL methods require a response to be sent"]
19331#[derive(Debug)]
19332pub struct SymlinkGetFlagsResponder {
19333 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19334 tx_id: u32,
19335}
19336
19337impl std::ops::Drop for SymlinkGetFlagsResponder {
19341 fn drop(&mut self) {
19342 self.control_handle.shutdown();
19343 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19345 }
19346}
19347
19348impl fidl::endpoints::Responder for SymlinkGetFlagsResponder {
19349 type ControlHandle = SymlinkControlHandle;
19350
19351 fn control_handle(&self) -> &SymlinkControlHandle {
19352 &self.control_handle
19353 }
19354
19355 fn drop_without_shutdown(mut self) {
19356 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19358 std::mem::forget(self);
19360 }
19361}
19362
19363impl SymlinkGetFlagsResponder {
19364 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
19368 let _result = self.send_raw(result);
19369 if _result.is_err() {
19370 self.control_handle.shutdown();
19371 }
19372 self.drop_without_shutdown();
19373 _result
19374 }
19375
19376 pub fn send_no_shutdown_on_err(
19378 self,
19379 mut result: Result<Flags, i32>,
19380 ) -> Result<(), fidl::Error> {
19381 let _result = self.send_raw(result);
19382 self.drop_without_shutdown();
19383 _result
19384 }
19385
19386 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
19387 self.control_handle
19388 .inner
19389 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
19390 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
19391 self.tx_id,
19392 0x176eb318f64ec23,
19393 fidl::encoding::DynamicFlags::FLEXIBLE,
19394 )
19395 }
19396}
19397
19398#[must_use = "FIDL methods require a response to be sent"]
19399#[derive(Debug)]
19400pub struct SymlinkSetFlagsResponder {
19401 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19402 tx_id: u32,
19403}
19404
19405impl std::ops::Drop for SymlinkSetFlagsResponder {
19409 fn drop(&mut self) {
19410 self.control_handle.shutdown();
19411 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19413 }
19414}
19415
19416impl fidl::endpoints::Responder for SymlinkSetFlagsResponder {
19417 type ControlHandle = SymlinkControlHandle;
19418
19419 fn control_handle(&self) -> &SymlinkControlHandle {
19420 &self.control_handle
19421 }
19422
19423 fn drop_without_shutdown(mut self) {
19424 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19426 std::mem::forget(self);
19428 }
19429}
19430
19431impl SymlinkSetFlagsResponder {
19432 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19436 let _result = self.send_raw(result);
19437 if _result.is_err() {
19438 self.control_handle.shutdown();
19439 }
19440 self.drop_without_shutdown();
19441 _result
19442 }
19443
19444 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19446 let _result = self.send_raw(result);
19447 self.drop_without_shutdown();
19448 _result
19449 }
19450
19451 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19452 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
19453 fidl::encoding::EmptyStruct,
19454 i32,
19455 >>(
19456 fidl::encoding::FlexibleResult::new(result),
19457 self.tx_id,
19458 0x55a8028685791ea8,
19459 fidl::encoding::DynamicFlags::FLEXIBLE,
19460 )
19461 }
19462}
19463
19464#[must_use = "FIDL methods require a response to be sent"]
19465#[derive(Debug)]
19466pub struct SymlinkQueryFilesystemResponder {
19467 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19468 tx_id: u32,
19469}
19470
19471impl std::ops::Drop for SymlinkQueryFilesystemResponder {
19475 fn drop(&mut self) {
19476 self.control_handle.shutdown();
19477 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19479 }
19480}
19481
19482impl fidl::endpoints::Responder for SymlinkQueryFilesystemResponder {
19483 type ControlHandle = SymlinkControlHandle;
19484
19485 fn control_handle(&self) -> &SymlinkControlHandle {
19486 &self.control_handle
19487 }
19488
19489 fn drop_without_shutdown(mut self) {
19490 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19492 std::mem::forget(self);
19494 }
19495}
19496
19497impl SymlinkQueryFilesystemResponder {
19498 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
19502 let _result = self.send_raw(s, info);
19503 if _result.is_err() {
19504 self.control_handle.shutdown();
19505 }
19506 self.drop_without_shutdown();
19507 _result
19508 }
19509
19510 pub fn send_no_shutdown_on_err(
19512 self,
19513 mut s: i32,
19514 mut info: Option<&FilesystemInfo>,
19515 ) -> Result<(), fidl::Error> {
19516 let _result = self.send_raw(s, info);
19517 self.drop_without_shutdown();
19518 _result
19519 }
19520
19521 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
19522 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
19523 (s, info),
19524 self.tx_id,
19525 0x6f344a1c6b0a0610,
19526 fidl::encoding::DynamicFlags::empty(),
19527 )
19528 }
19529}
19530
19531#[must_use = "FIDL methods require a response to be sent"]
19532#[derive(Debug)]
19533pub struct SymlinkGetAttributesResponder {
19534 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19535 tx_id: u32,
19536}
19537
19538impl std::ops::Drop for SymlinkGetAttributesResponder {
19542 fn drop(&mut self) {
19543 self.control_handle.shutdown();
19544 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19546 }
19547}
19548
19549impl fidl::endpoints::Responder for SymlinkGetAttributesResponder {
19550 type ControlHandle = SymlinkControlHandle;
19551
19552 fn control_handle(&self) -> &SymlinkControlHandle {
19553 &self.control_handle
19554 }
19555
19556 fn drop_without_shutdown(mut self) {
19557 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19559 std::mem::forget(self);
19561 }
19562}
19563
19564impl SymlinkGetAttributesResponder {
19565 pub fn send(
19569 self,
19570 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19571 ) -> Result<(), fidl::Error> {
19572 let _result = self.send_raw(result);
19573 if _result.is_err() {
19574 self.control_handle.shutdown();
19575 }
19576 self.drop_without_shutdown();
19577 _result
19578 }
19579
19580 pub fn send_no_shutdown_on_err(
19582 self,
19583 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19584 ) -> Result<(), fidl::Error> {
19585 let _result = self.send_raw(result);
19586 self.drop_without_shutdown();
19587 _result
19588 }
19589
19590 fn send_raw(
19591 &self,
19592 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19593 ) -> Result<(), fidl::Error> {
19594 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
19595 result,
19596 self.tx_id,
19597 0x3d4396a638ea053b,
19598 fidl::encoding::DynamicFlags::empty(),
19599 )
19600 }
19601}
19602
19603#[must_use = "FIDL methods require a response to be sent"]
19604#[derive(Debug)]
19605pub struct SymlinkUpdateAttributesResponder {
19606 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19607 tx_id: u32,
19608}
19609
19610impl std::ops::Drop for SymlinkUpdateAttributesResponder {
19614 fn drop(&mut self) {
19615 self.control_handle.shutdown();
19616 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19618 }
19619}
19620
19621impl fidl::endpoints::Responder for SymlinkUpdateAttributesResponder {
19622 type ControlHandle = SymlinkControlHandle;
19623
19624 fn control_handle(&self) -> &SymlinkControlHandle {
19625 &self.control_handle
19626 }
19627
19628 fn drop_without_shutdown(mut self) {
19629 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19631 std::mem::forget(self);
19633 }
19634}
19635
19636impl SymlinkUpdateAttributesResponder {
19637 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19641 let _result = self.send_raw(result);
19642 if _result.is_err() {
19643 self.control_handle.shutdown();
19644 }
19645 self.drop_without_shutdown();
19646 _result
19647 }
19648
19649 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19651 let _result = self.send_raw(result);
19652 self.drop_without_shutdown();
19653 _result
19654 }
19655
19656 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19657 self.control_handle
19658 .inner
19659 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19660 result,
19661 self.tx_id,
19662 0x3308c1da5a89bf08,
19663 fidl::encoding::DynamicFlags::empty(),
19664 )
19665 }
19666}
19667
19668#[must_use = "FIDL methods require a response to be sent"]
19669#[derive(Debug)]
19670pub struct SymlinkSyncResponder {
19671 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19672 tx_id: u32,
19673}
19674
19675impl std::ops::Drop for SymlinkSyncResponder {
19679 fn drop(&mut self) {
19680 self.control_handle.shutdown();
19681 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19683 }
19684}
19685
19686impl fidl::endpoints::Responder for SymlinkSyncResponder {
19687 type ControlHandle = SymlinkControlHandle;
19688
19689 fn control_handle(&self) -> &SymlinkControlHandle {
19690 &self.control_handle
19691 }
19692
19693 fn drop_without_shutdown(mut self) {
19694 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19696 std::mem::forget(self);
19698 }
19699}
19700
19701impl SymlinkSyncResponder {
19702 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19706 let _result = self.send_raw(result);
19707 if _result.is_err() {
19708 self.control_handle.shutdown();
19709 }
19710 self.drop_without_shutdown();
19711 _result
19712 }
19713
19714 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19716 let _result = self.send_raw(result);
19717 self.drop_without_shutdown();
19718 _result
19719 }
19720
19721 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19722 self.control_handle
19723 .inner
19724 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19725 result,
19726 self.tx_id,
19727 0x2c5c27ca0ab5dc49,
19728 fidl::encoding::DynamicFlags::empty(),
19729 )
19730 }
19731}
19732
19733#[must_use = "FIDL methods require a response to be sent"]
19734#[derive(Debug)]
19735pub struct SymlinkGetExtendedAttributeResponder {
19736 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19737 tx_id: u32,
19738}
19739
19740impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
19744 fn drop(&mut self) {
19745 self.control_handle.shutdown();
19746 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19748 }
19749}
19750
19751impl fidl::endpoints::Responder for SymlinkGetExtendedAttributeResponder {
19752 type ControlHandle = SymlinkControlHandle;
19753
19754 fn control_handle(&self) -> &SymlinkControlHandle {
19755 &self.control_handle
19756 }
19757
19758 fn drop_without_shutdown(mut self) {
19759 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19761 std::mem::forget(self);
19763 }
19764}
19765
19766impl SymlinkGetExtendedAttributeResponder {
19767 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
19771 let _result = self.send_raw(result);
19772 if _result.is_err() {
19773 self.control_handle.shutdown();
19774 }
19775 self.drop_without_shutdown();
19776 _result
19777 }
19778
19779 pub fn send_no_shutdown_on_err(
19781 self,
19782 mut result: Result<ExtendedAttributeValue, i32>,
19783 ) -> Result<(), fidl::Error> {
19784 let _result = self.send_raw(result);
19785 self.drop_without_shutdown();
19786 _result
19787 }
19788
19789 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
19790 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
19791 result.as_mut().map_err(|e| *e),
19792 self.tx_id,
19793 0x45ffa3ccfdeb76db,
19794 fidl::encoding::DynamicFlags::empty(),
19795 )
19796 }
19797}
19798
19799#[must_use = "FIDL methods require a response to be sent"]
19800#[derive(Debug)]
19801pub struct SymlinkSetExtendedAttributeResponder {
19802 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19803 tx_id: u32,
19804}
19805
19806impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
19810 fn drop(&mut self) {
19811 self.control_handle.shutdown();
19812 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19814 }
19815}
19816
19817impl fidl::endpoints::Responder for SymlinkSetExtendedAttributeResponder {
19818 type ControlHandle = SymlinkControlHandle;
19819
19820 fn control_handle(&self) -> &SymlinkControlHandle {
19821 &self.control_handle
19822 }
19823
19824 fn drop_without_shutdown(mut self) {
19825 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19827 std::mem::forget(self);
19829 }
19830}
19831
19832impl SymlinkSetExtendedAttributeResponder {
19833 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19837 let _result = self.send_raw(result);
19838 if _result.is_err() {
19839 self.control_handle.shutdown();
19840 }
19841 self.drop_without_shutdown();
19842 _result
19843 }
19844
19845 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19847 let _result = self.send_raw(result);
19848 self.drop_without_shutdown();
19849 _result
19850 }
19851
19852 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19853 self.control_handle
19854 .inner
19855 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19856 result,
19857 self.tx_id,
19858 0x4a951362f681f23c,
19859 fidl::encoding::DynamicFlags::empty(),
19860 )
19861 }
19862}
19863
19864#[must_use = "FIDL methods require a response to be sent"]
19865#[derive(Debug)]
19866pub struct SymlinkRemoveExtendedAttributeResponder {
19867 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19868 tx_id: u32,
19869}
19870
19871impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
19875 fn drop(&mut self) {
19876 self.control_handle.shutdown();
19877 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19879 }
19880}
19881
19882impl fidl::endpoints::Responder for SymlinkRemoveExtendedAttributeResponder {
19883 type ControlHandle = SymlinkControlHandle;
19884
19885 fn control_handle(&self) -> &SymlinkControlHandle {
19886 &self.control_handle
19887 }
19888
19889 fn drop_without_shutdown(mut self) {
19890 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19892 std::mem::forget(self);
19894 }
19895}
19896
19897impl SymlinkRemoveExtendedAttributeResponder {
19898 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19902 let _result = self.send_raw(result);
19903 if _result.is_err() {
19904 self.control_handle.shutdown();
19905 }
19906 self.drop_without_shutdown();
19907 _result
19908 }
19909
19910 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19912 let _result = self.send_raw(result);
19913 self.drop_without_shutdown();
19914 _result
19915 }
19916
19917 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19918 self.control_handle
19919 .inner
19920 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19921 result,
19922 self.tx_id,
19923 0x7a0b9f3a9bf9032d,
19924 fidl::encoding::DynamicFlags::empty(),
19925 )
19926 }
19927}
19928
19929#[must_use = "FIDL methods require a response to be sent"]
19930#[derive(Debug)]
19931pub struct SymlinkDescribeResponder {
19932 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19933 tx_id: u32,
19934}
19935
19936impl std::ops::Drop for SymlinkDescribeResponder {
19940 fn drop(&mut self) {
19941 self.control_handle.shutdown();
19942 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19944 }
19945}
19946
19947impl fidl::endpoints::Responder for SymlinkDescribeResponder {
19948 type ControlHandle = SymlinkControlHandle;
19949
19950 fn control_handle(&self) -> &SymlinkControlHandle {
19951 &self.control_handle
19952 }
19953
19954 fn drop_without_shutdown(mut self) {
19955 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19957 std::mem::forget(self);
19959 }
19960}
19961
19962impl SymlinkDescribeResponder {
19963 pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19967 let _result = self.send_raw(payload);
19968 if _result.is_err() {
19969 self.control_handle.shutdown();
19970 }
19971 self.drop_without_shutdown();
19972 _result
19973 }
19974
19975 pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19977 let _result = self.send_raw(payload);
19978 self.drop_without_shutdown();
19979 _result
19980 }
19981
19982 fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19983 self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
19984 fidl::encoding::Flexible::new(payload),
19985 self.tx_id,
19986 0x742c2ea5e89831f3,
19987 fidl::encoding::DynamicFlags::FLEXIBLE,
19988 )
19989 }
19990}
19991
19992#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19993pub struct WritableMarker;
19994
19995impl fidl::endpoints::ProtocolMarker for WritableMarker {
19996 type Proxy = WritableProxy;
19997 type RequestStream = WritableRequestStream;
19998 #[cfg(target_os = "fuchsia")]
19999 type SynchronousProxy = WritableSynchronousProxy;
20000
20001 const DEBUG_NAME: &'static str = "(anonymous) Writable";
20002}
20003pub type WritableWriteResult = Result<u64, i32>;
20004
20005pub trait WritableProxyInterface: Send + Sync {
20006 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
20007 + Send;
20008 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
20009}
20010#[derive(Debug)]
20011#[cfg(target_os = "fuchsia")]
20012pub struct WritableSynchronousProxy {
20013 client: fidl::client::sync::Client,
20014}
20015
20016#[cfg(target_os = "fuchsia")]
20017impl fidl::endpoints::SynchronousProxy for WritableSynchronousProxy {
20018 type Proxy = WritableProxy;
20019 type Protocol = WritableMarker;
20020
20021 fn from_channel(inner: fidl::Channel) -> Self {
20022 Self::new(inner)
20023 }
20024
20025 fn into_channel(self) -> fidl::Channel {
20026 self.client.into_channel()
20027 }
20028
20029 fn as_channel(&self) -> &fidl::Channel {
20030 self.client.as_channel()
20031 }
20032}
20033
20034#[cfg(target_os = "fuchsia")]
20035impl WritableSynchronousProxy {
20036 pub fn new(channel: fidl::Channel) -> Self {
20037 Self { client: fidl::client::sync::Client::new(channel) }
20038 }
20039
20040 pub fn into_channel(self) -> fidl::Channel {
20041 self.client.into_channel()
20042 }
20043
20044 pub fn wait_for_event(
20047 &self,
20048 deadline: zx::MonotonicInstant,
20049 ) -> Result<WritableEvent, fidl::Error> {
20050 WritableEvent::decode(self.client.wait_for_event::<WritableMarker>(deadline)?)
20051 }
20052
20053 pub fn r#write(
20077 &self,
20078 mut data: &[u8],
20079 ___deadline: zx::MonotonicInstant,
20080 ) -> Result<WritableWriteResult, fidl::Error> {
20081 let _response = self.client.send_query::<
20082 WritableWriteRequest,
20083 fidl::encoding::ResultType<WritableWriteResponse, i32>,
20084 WritableMarker,
20085 >(
20086 (data,),
20087 0x6a31437832469f82,
20088 fidl::encoding::DynamicFlags::empty(),
20089 ___deadline,
20090 )?;
20091 Ok(_response.map(|x| x.actual_count))
20092 }
20093}
20094
20095#[cfg(target_os = "fuchsia")]
20096impl From<WritableSynchronousProxy> for zx::NullableHandle {
20097 fn from(value: WritableSynchronousProxy) -> Self {
20098 value.into_channel().into()
20099 }
20100}
20101
20102#[cfg(target_os = "fuchsia")]
20103impl From<fidl::Channel> for WritableSynchronousProxy {
20104 fn from(value: fidl::Channel) -> Self {
20105 Self::new(value)
20106 }
20107}
20108
20109#[cfg(target_os = "fuchsia")]
20110impl fidl::endpoints::FromClient for WritableSynchronousProxy {
20111 type Protocol = WritableMarker;
20112
20113 fn from_client(value: fidl::endpoints::ClientEnd<WritableMarker>) -> Self {
20114 Self::new(value.into_channel())
20115 }
20116}
20117
20118#[derive(Debug, Clone)]
20119pub struct WritableProxy {
20120 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
20121}
20122
20123impl fidl::endpoints::Proxy for WritableProxy {
20124 type Protocol = WritableMarker;
20125
20126 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
20127 Self::new(inner)
20128 }
20129
20130 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
20131 self.client.into_channel().map_err(|client| Self { client })
20132 }
20133
20134 fn as_channel(&self) -> &::fidl::AsyncChannel {
20135 self.client.as_channel()
20136 }
20137}
20138
20139impl WritableProxy {
20140 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
20142 let protocol_name = <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
20143 Self { client: fidl::client::Client::new(channel, protocol_name) }
20144 }
20145
20146 pub fn take_event_stream(&self) -> WritableEventStream {
20152 WritableEventStream { event_receiver: self.client.take_event_receiver() }
20153 }
20154
20155 pub fn r#write(
20179 &self,
20180 mut data: &[u8],
20181 ) -> fidl::client::QueryResponseFut<
20182 WritableWriteResult,
20183 fidl::encoding::DefaultFuchsiaResourceDialect,
20184 > {
20185 WritableProxyInterface::r#write(self, data)
20186 }
20187}
20188
20189impl WritableProxyInterface for WritableProxy {
20190 type WriteResponseFut = fidl::client::QueryResponseFut<
20191 WritableWriteResult,
20192 fidl::encoding::DefaultFuchsiaResourceDialect,
20193 >;
20194 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
20195 fn _decode(
20196 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
20197 ) -> Result<WritableWriteResult, fidl::Error> {
20198 let _response = fidl::client::decode_transaction_body::<
20199 fidl::encoding::ResultType<WritableWriteResponse, i32>,
20200 fidl::encoding::DefaultFuchsiaResourceDialect,
20201 0x6a31437832469f82,
20202 >(_buf?)?;
20203 Ok(_response.map(|x| x.actual_count))
20204 }
20205 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
20206 (data,),
20207 0x6a31437832469f82,
20208 fidl::encoding::DynamicFlags::empty(),
20209 _decode,
20210 )
20211 }
20212}
20213
20214pub struct WritableEventStream {
20215 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
20216}
20217
20218impl std::marker::Unpin for WritableEventStream {}
20219
20220impl futures::stream::FusedStream for WritableEventStream {
20221 fn is_terminated(&self) -> bool {
20222 self.event_receiver.is_terminated()
20223 }
20224}
20225
20226impl futures::Stream for WritableEventStream {
20227 type Item = Result<WritableEvent, fidl::Error>;
20228
20229 fn poll_next(
20230 mut self: std::pin::Pin<&mut Self>,
20231 cx: &mut std::task::Context<'_>,
20232 ) -> std::task::Poll<Option<Self::Item>> {
20233 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
20234 &mut self.event_receiver,
20235 cx
20236 )?) {
20237 Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
20238 None => std::task::Poll::Ready(None),
20239 }
20240 }
20241}
20242
20243#[derive(Debug)]
20244pub enum WritableEvent {}
20245
20246impl WritableEvent {
20247 fn decode(
20249 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
20250 ) -> Result<WritableEvent, fidl::Error> {
20251 let (bytes, _handles) = buf.split_mut();
20252 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
20253 debug_assert_eq!(tx_header.tx_id, 0);
20254 match tx_header.ordinal {
20255 _ => Err(fidl::Error::UnknownOrdinal {
20256 ordinal: tx_header.ordinal,
20257 protocol_name: <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
20258 }),
20259 }
20260 }
20261}
20262
20263pub struct WritableRequestStream {
20265 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20266 is_terminated: bool,
20267}
20268
20269impl std::marker::Unpin for WritableRequestStream {}
20270
20271impl futures::stream::FusedStream for WritableRequestStream {
20272 fn is_terminated(&self) -> bool {
20273 self.is_terminated
20274 }
20275}
20276
20277impl fidl::endpoints::RequestStream for WritableRequestStream {
20278 type Protocol = WritableMarker;
20279 type ControlHandle = WritableControlHandle;
20280
20281 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
20282 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
20283 }
20284
20285 fn control_handle(&self) -> Self::ControlHandle {
20286 WritableControlHandle { inner: self.inner.clone() }
20287 }
20288
20289 fn into_inner(
20290 self,
20291 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
20292 {
20293 (self.inner, self.is_terminated)
20294 }
20295
20296 fn from_inner(
20297 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20298 is_terminated: bool,
20299 ) -> Self {
20300 Self { inner, is_terminated }
20301 }
20302}
20303
20304impl futures::Stream for WritableRequestStream {
20305 type Item = Result<WritableRequest, fidl::Error>;
20306
20307 fn poll_next(
20308 mut self: std::pin::Pin<&mut Self>,
20309 cx: &mut std::task::Context<'_>,
20310 ) -> std::task::Poll<Option<Self::Item>> {
20311 let this = &mut *self;
20312 if this.inner.check_shutdown(cx) {
20313 this.is_terminated = true;
20314 return std::task::Poll::Ready(None);
20315 }
20316 if this.is_terminated {
20317 panic!("polled WritableRequestStream after completion");
20318 }
20319 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
20320 |bytes, handles| {
20321 match this.inner.channel().read_etc(cx, bytes, handles) {
20322 std::task::Poll::Ready(Ok(())) => {}
20323 std::task::Poll::Pending => return std::task::Poll::Pending,
20324 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
20325 this.is_terminated = true;
20326 return std::task::Poll::Ready(None);
20327 }
20328 std::task::Poll::Ready(Err(e)) => {
20329 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
20330 e.into(),
20331 ))));
20332 }
20333 }
20334
20335 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
20337
20338 std::task::Poll::Ready(Some(match header.ordinal {
20339 0x6a31437832469f82 => {
20340 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
20341 let mut req = fidl::new_empty!(
20342 WritableWriteRequest,
20343 fidl::encoding::DefaultFuchsiaResourceDialect
20344 );
20345 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
20346 let control_handle = WritableControlHandle { inner: this.inner.clone() };
20347 Ok(WritableRequest::Write {
20348 data: req.data,
20349
20350 responder: WritableWriteResponder {
20351 control_handle: std::mem::ManuallyDrop::new(control_handle),
20352 tx_id: header.tx_id,
20353 },
20354 })
20355 }
20356 _ => Err(fidl::Error::UnknownOrdinal {
20357 ordinal: header.ordinal,
20358 protocol_name:
20359 <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
20360 }),
20361 }))
20362 },
20363 )
20364 }
20365}
20366
20367#[derive(Debug)]
20368pub enum WritableRequest {
20369 Write { data: Vec<u8>, responder: WritableWriteResponder },
20393}
20394
20395impl WritableRequest {
20396 #[allow(irrefutable_let_patterns)]
20397 pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
20398 if let WritableRequest::Write { data, responder } = self {
20399 Some((data, responder))
20400 } else {
20401 None
20402 }
20403 }
20404
20405 pub fn method_name(&self) -> &'static str {
20407 match *self {
20408 WritableRequest::Write { .. } => "write",
20409 }
20410 }
20411}
20412
20413#[derive(Debug, Clone)]
20414pub struct WritableControlHandle {
20415 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20416}
20417
20418impl fidl::endpoints::ControlHandle for WritableControlHandle {
20419 fn shutdown(&self) {
20420 self.inner.shutdown()
20421 }
20422
20423 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
20424 self.inner.shutdown_with_epitaph(status)
20425 }
20426
20427 fn is_closed(&self) -> bool {
20428 self.inner.channel().is_closed()
20429 }
20430 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
20431 self.inner.channel().on_closed()
20432 }
20433
20434 #[cfg(target_os = "fuchsia")]
20435 fn signal_peer(
20436 &self,
20437 clear_mask: zx::Signals,
20438 set_mask: zx::Signals,
20439 ) -> Result<(), zx_status::Status> {
20440 use fidl::Peered;
20441 self.inner.channel().signal_peer(clear_mask, set_mask)
20442 }
20443}
20444
20445impl WritableControlHandle {}
20446
20447#[must_use = "FIDL methods require a response to be sent"]
20448#[derive(Debug)]
20449pub struct WritableWriteResponder {
20450 control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
20451 tx_id: u32,
20452}
20453
20454impl std::ops::Drop for WritableWriteResponder {
20458 fn drop(&mut self) {
20459 self.control_handle.shutdown();
20460 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20462 }
20463}
20464
20465impl fidl::endpoints::Responder for WritableWriteResponder {
20466 type ControlHandle = WritableControlHandle;
20467
20468 fn control_handle(&self) -> &WritableControlHandle {
20469 &self.control_handle
20470 }
20471
20472 fn drop_without_shutdown(mut self) {
20473 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20475 std::mem::forget(self);
20477 }
20478}
20479
20480impl WritableWriteResponder {
20481 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20485 let _result = self.send_raw(result);
20486 if _result.is_err() {
20487 self.control_handle.shutdown();
20488 }
20489 self.drop_without_shutdown();
20490 _result
20491 }
20492
20493 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20495 let _result = self.send_raw(result);
20496 self.drop_without_shutdown();
20497 _result
20498 }
20499
20500 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20501 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
20502 result.map(|actual_count| (actual_count,)),
20503 self.tx_id,
20504 0x6a31437832469f82,
20505 fidl::encoding::DynamicFlags::empty(),
20506 )
20507 }
20508}
20509
20510mod internal {
20511 use super::*;
20512
20513 impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
20514 type Borrowed<'a> = &'a mut Self;
20515 fn take_or_borrow<'a>(
20516 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20517 ) -> Self::Borrowed<'a> {
20518 value
20519 }
20520 }
20521
20522 unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
20523 type Owned = Self;
20524
20525 #[inline(always)]
20526 fn inline_align(_context: fidl::encoding::Context) -> usize {
20527 8
20528 }
20529
20530 #[inline(always)]
20531 fn inline_size(_context: fidl::encoding::Context) -> usize {
20532 40
20533 }
20534 }
20535
20536 unsafe impl
20537 fidl::encoding::Encode<
20538 DirectoryCreateSymlinkRequest,
20539 fidl::encoding::DefaultFuchsiaResourceDialect,
20540 > for &mut DirectoryCreateSymlinkRequest
20541 {
20542 #[inline]
20543 unsafe fn encode(
20544 self,
20545 encoder: &mut fidl::encoding::Encoder<
20546 '_,
20547 fidl::encoding::DefaultFuchsiaResourceDialect,
20548 >,
20549 offset: usize,
20550 _depth: fidl::encoding::Depth,
20551 ) -> fidl::Result<()> {
20552 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
20553 fidl::encoding::Encode::<
20555 DirectoryCreateSymlinkRequest,
20556 fidl::encoding::DefaultFuchsiaResourceDialect,
20557 >::encode(
20558 (
20559 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
20560 &self.name,
20561 ),
20562 <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
20563 &self.target,
20564 ),
20565 <fidl::encoding::Optional<
20566 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20567 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20568 &mut self.connection
20569 ),
20570 ),
20571 encoder,
20572 offset,
20573 _depth,
20574 )
20575 }
20576 }
20577 unsafe impl<
20578 T0: fidl::encoding::Encode<
20579 fidl::encoding::BoundedString<255>,
20580 fidl::encoding::DefaultFuchsiaResourceDialect,
20581 >,
20582 T1: fidl::encoding::Encode<
20583 fidl::encoding::Vector<u8, 4095>,
20584 fidl::encoding::DefaultFuchsiaResourceDialect,
20585 >,
20586 T2: fidl::encoding::Encode<
20587 fidl::encoding::Optional<
20588 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20589 >,
20590 fidl::encoding::DefaultFuchsiaResourceDialect,
20591 >,
20592 >
20593 fidl::encoding::Encode<
20594 DirectoryCreateSymlinkRequest,
20595 fidl::encoding::DefaultFuchsiaResourceDialect,
20596 > for (T0, T1, T2)
20597 {
20598 #[inline]
20599 unsafe fn encode(
20600 self,
20601 encoder: &mut fidl::encoding::Encoder<
20602 '_,
20603 fidl::encoding::DefaultFuchsiaResourceDialect,
20604 >,
20605 offset: usize,
20606 depth: fidl::encoding::Depth,
20607 ) -> fidl::Result<()> {
20608 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
20609 unsafe {
20612 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
20613 (ptr as *mut u64).write_unaligned(0);
20614 }
20615 self.0.encode(encoder, offset + 0, depth)?;
20617 self.1.encode(encoder, offset + 16, depth)?;
20618 self.2.encode(encoder, offset + 32, depth)?;
20619 Ok(())
20620 }
20621 }
20622
20623 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20624 for DirectoryCreateSymlinkRequest
20625 {
20626 #[inline(always)]
20627 fn new_empty() -> Self {
20628 Self {
20629 name: fidl::new_empty!(
20630 fidl::encoding::BoundedString<255>,
20631 fidl::encoding::DefaultFuchsiaResourceDialect
20632 ),
20633 target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect),
20634 connection: fidl::new_empty!(
20635 fidl::encoding::Optional<
20636 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20637 >,
20638 fidl::encoding::DefaultFuchsiaResourceDialect
20639 ),
20640 }
20641 }
20642
20643 #[inline]
20644 unsafe fn decode(
20645 &mut self,
20646 decoder: &mut fidl::encoding::Decoder<
20647 '_,
20648 fidl::encoding::DefaultFuchsiaResourceDialect,
20649 >,
20650 offset: usize,
20651 _depth: fidl::encoding::Depth,
20652 ) -> fidl::Result<()> {
20653 decoder.debug_check_bounds::<Self>(offset);
20654 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
20656 let padval = unsafe { (ptr as *const u64).read_unaligned() };
20657 let mask = 0xffffffff00000000u64;
20658 let maskedval = padval & mask;
20659 if maskedval != 0 {
20660 return Err(fidl::Error::NonZeroPadding {
20661 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
20662 });
20663 }
20664 fidl::decode!(
20665 fidl::encoding::BoundedString<255>,
20666 fidl::encoding::DefaultFuchsiaResourceDialect,
20667 &mut self.name,
20668 decoder,
20669 offset + 0,
20670 _depth
20671 )?;
20672 fidl::decode!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
20673 fidl::decode!(
20674 fidl::encoding::Optional<
20675 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20676 >,
20677 fidl::encoding::DefaultFuchsiaResourceDialect,
20678 &mut self.connection,
20679 decoder,
20680 offset + 32,
20681 _depth
20682 )?;
20683 Ok(())
20684 }
20685 }
20686
20687 impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
20688 type Borrowed<'a> = &'a mut Self;
20689 fn take_or_borrow<'a>(
20690 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20691 ) -> Self::Borrowed<'a> {
20692 value
20693 }
20694 }
20695
20696 unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
20697 type Owned = Self;
20698
20699 #[inline(always)]
20700 fn inline_align(_context: fidl::encoding::Context) -> usize {
20701 8
20702 }
20703
20704 #[inline(always)]
20705 fn inline_size(_context: fidl::encoding::Context) -> usize {
20706 32
20707 }
20708 }
20709
20710 unsafe impl
20711 fidl::encoding::Encode<
20712 DirectoryDeprecatedOpenRequest,
20713 fidl::encoding::DefaultFuchsiaResourceDialect,
20714 > for &mut DirectoryDeprecatedOpenRequest
20715 {
20716 #[inline]
20717 unsafe fn encode(
20718 self,
20719 encoder: &mut fidl::encoding::Encoder<
20720 '_,
20721 fidl::encoding::DefaultFuchsiaResourceDialect,
20722 >,
20723 offset: usize,
20724 _depth: fidl::encoding::Depth,
20725 ) -> fidl::Result<()> {
20726 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
20727 fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
20729 (
20730 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
20731 <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
20732 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
20733 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
20734 ),
20735 encoder, offset, _depth
20736 )
20737 }
20738 }
20739 unsafe impl<
20740 T0: fidl::encoding::Encode<OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect>,
20741 T1: fidl::encoding::Encode<ModeType, fidl::encoding::DefaultFuchsiaResourceDialect>,
20742 T2: fidl::encoding::Encode<
20743 fidl::encoding::BoundedString<4095>,
20744 fidl::encoding::DefaultFuchsiaResourceDialect,
20745 >,
20746 T3: fidl::encoding::Encode<
20747 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20748 fidl::encoding::DefaultFuchsiaResourceDialect,
20749 >,
20750 >
20751 fidl::encoding::Encode<
20752 DirectoryDeprecatedOpenRequest,
20753 fidl::encoding::DefaultFuchsiaResourceDialect,
20754 > for (T0, T1, T2, T3)
20755 {
20756 #[inline]
20757 unsafe fn encode(
20758 self,
20759 encoder: &mut fidl::encoding::Encoder<
20760 '_,
20761 fidl::encoding::DefaultFuchsiaResourceDialect,
20762 >,
20763 offset: usize,
20764 depth: fidl::encoding::Depth,
20765 ) -> fidl::Result<()> {
20766 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
20767 unsafe {
20770 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
20771 (ptr as *mut u64).write_unaligned(0);
20772 }
20773 self.0.encode(encoder, offset + 0, depth)?;
20775 self.1.encode(encoder, offset + 4, depth)?;
20776 self.2.encode(encoder, offset + 8, depth)?;
20777 self.3.encode(encoder, offset + 24, depth)?;
20778 Ok(())
20779 }
20780 }
20781
20782 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20783 for DirectoryDeprecatedOpenRequest
20784 {
20785 #[inline(always)]
20786 fn new_empty() -> Self {
20787 Self {
20788 flags: fidl::new_empty!(OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect),
20789 mode: fidl::new_empty!(ModeType, fidl::encoding::DefaultFuchsiaResourceDialect),
20790 path: fidl::new_empty!(
20791 fidl::encoding::BoundedString<4095>,
20792 fidl::encoding::DefaultFuchsiaResourceDialect
20793 ),
20794 object: fidl::new_empty!(
20795 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20796 fidl::encoding::DefaultFuchsiaResourceDialect
20797 ),
20798 }
20799 }
20800
20801 #[inline]
20802 unsafe fn decode(
20803 &mut self,
20804 decoder: &mut fidl::encoding::Decoder<
20805 '_,
20806 fidl::encoding::DefaultFuchsiaResourceDialect,
20807 >,
20808 offset: usize,
20809 _depth: fidl::encoding::Depth,
20810 ) -> fidl::Result<()> {
20811 decoder.debug_check_bounds::<Self>(offset);
20812 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
20814 let padval = unsafe { (ptr as *const u64).read_unaligned() };
20815 let mask = 0xffffffff00000000u64;
20816 let maskedval = padval & mask;
20817 if maskedval != 0 {
20818 return Err(fidl::Error::NonZeroPadding {
20819 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
20820 });
20821 }
20822 fidl::decode!(
20823 OpenFlags,
20824 fidl::encoding::DefaultFuchsiaResourceDialect,
20825 &mut self.flags,
20826 decoder,
20827 offset + 0,
20828 _depth
20829 )?;
20830 fidl::decode!(
20831 ModeType,
20832 fidl::encoding::DefaultFuchsiaResourceDialect,
20833 &mut self.mode,
20834 decoder,
20835 offset + 4,
20836 _depth
20837 )?;
20838 fidl::decode!(
20839 fidl::encoding::BoundedString<4095>,
20840 fidl::encoding::DefaultFuchsiaResourceDialect,
20841 &mut self.path,
20842 decoder,
20843 offset + 8,
20844 _depth
20845 )?;
20846 fidl::decode!(
20847 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20848 fidl::encoding::DefaultFuchsiaResourceDialect,
20849 &mut self.object,
20850 decoder,
20851 offset + 24,
20852 _depth
20853 )?;
20854 Ok(())
20855 }
20856 }
20857
20858 impl fidl::encoding::ResourceTypeMarker for DirectoryGetTokenResponse {
20859 type Borrowed<'a> = &'a mut Self;
20860 fn take_or_borrow<'a>(
20861 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20862 ) -> Self::Borrowed<'a> {
20863 value
20864 }
20865 }
20866
20867 unsafe impl fidl::encoding::TypeMarker for DirectoryGetTokenResponse {
20868 type Owned = Self;
20869
20870 #[inline(always)]
20871 fn inline_align(_context: fidl::encoding::Context) -> usize {
20872 4
20873 }
20874
20875 #[inline(always)]
20876 fn inline_size(_context: fidl::encoding::Context) -> usize {
20877 8
20878 }
20879 }
20880
20881 unsafe impl
20882 fidl::encoding::Encode<
20883 DirectoryGetTokenResponse,
20884 fidl::encoding::DefaultFuchsiaResourceDialect,
20885 > for &mut DirectoryGetTokenResponse
20886 {
20887 #[inline]
20888 unsafe fn encode(
20889 self,
20890 encoder: &mut fidl::encoding::Encoder<
20891 '_,
20892 fidl::encoding::DefaultFuchsiaResourceDialect,
20893 >,
20894 offset: usize,
20895 _depth: fidl::encoding::Depth,
20896 ) -> fidl::Result<()> {
20897 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
20898 fidl::encoding::Encode::<
20900 DirectoryGetTokenResponse,
20901 fidl::encoding::DefaultFuchsiaResourceDialect,
20902 >::encode(
20903 (
20904 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
20905 <fidl::encoding::Optional<
20906 fidl::encoding::HandleType<
20907 fidl::NullableHandle,
20908 { fidl::ObjectType::NONE.into_raw() },
20909 2147483648,
20910 >,
20911 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20912 &mut self.token
20913 ),
20914 ),
20915 encoder,
20916 offset,
20917 _depth,
20918 )
20919 }
20920 }
20921 unsafe impl<
20922 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
20923 T1: fidl::encoding::Encode<
20924 fidl::encoding::Optional<
20925 fidl::encoding::HandleType<
20926 fidl::NullableHandle,
20927 { fidl::ObjectType::NONE.into_raw() },
20928 2147483648,
20929 >,
20930 >,
20931 fidl::encoding::DefaultFuchsiaResourceDialect,
20932 >,
20933 >
20934 fidl::encoding::Encode<
20935 DirectoryGetTokenResponse,
20936 fidl::encoding::DefaultFuchsiaResourceDialect,
20937 > for (T0, T1)
20938 {
20939 #[inline]
20940 unsafe fn encode(
20941 self,
20942 encoder: &mut fidl::encoding::Encoder<
20943 '_,
20944 fidl::encoding::DefaultFuchsiaResourceDialect,
20945 >,
20946 offset: usize,
20947 depth: fidl::encoding::Depth,
20948 ) -> fidl::Result<()> {
20949 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
20950 self.0.encode(encoder, offset + 0, depth)?;
20954 self.1.encode(encoder, offset + 4, depth)?;
20955 Ok(())
20956 }
20957 }
20958
20959 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20960 for DirectoryGetTokenResponse
20961 {
20962 #[inline(always)]
20963 fn new_empty() -> Self {
20964 Self {
20965 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
20966 token: fidl::new_empty!(
20967 fidl::encoding::Optional<
20968 fidl::encoding::HandleType<
20969 fidl::NullableHandle,
20970 { fidl::ObjectType::NONE.into_raw() },
20971 2147483648,
20972 >,
20973 >,
20974 fidl::encoding::DefaultFuchsiaResourceDialect
20975 ),
20976 }
20977 }
20978
20979 #[inline]
20980 unsafe fn decode(
20981 &mut self,
20982 decoder: &mut fidl::encoding::Decoder<
20983 '_,
20984 fidl::encoding::DefaultFuchsiaResourceDialect,
20985 >,
20986 offset: usize,
20987 _depth: fidl::encoding::Depth,
20988 ) -> fidl::Result<()> {
20989 decoder.debug_check_bounds::<Self>(offset);
20990 fidl::decode!(
20992 i32,
20993 fidl::encoding::DefaultFuchsiaResourceDialect,
20994 &mut self.s,
20995 decoder,
20996 offset + 0,
20997 _depth
20998 )?;
20999 fidl::decode!(
21000 fidl::encoding::Optional<
21001 fidl::encoding::HandleType<
21002 fidl::NullableHandle,
21003 { fidl::ObjectType::NONE.into_raw() },
21004 2147483648,
21005 >,
21006 >,
21007 fidl::encoding::DefaultFuchsiaResourceDialect,
21008 &mut self.token,
21009 decoder,
21010 offset + 4,
21011 _depth
21012 )?;
21013 Ok(())
21014 }
21015 }
21016
21017 impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
21018 type Borrowed<'a> = &'a mut Self;
21019 fn take_or_borrow<'a>(
21020 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21021 ) -> Self::Borrowed<'a> {
21022 value
21023 }
21024 }
21025
21026 unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
21027 type Owned = Self;
21028
21029 #[inline(always)]
21030 fn inline_align(_context: fidl::encoding::Context) -> usize {
21031 8
21032 }
21033
21034 #[inline(always)]
21035 fn inline_size(_context: fidl::encoding::Context) -> usize {
21036 40
21037 }
21038 }
21039
21040 unsafe impl
21041 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21042 for &mut DirectoryLinkRequest
21043 {
21044 #[inline]
21045 unsafe fn encode(
21046 self,
21047 encoder: &mut fidl::encoding::Encoder<
21048 '_,
21049 fidl::encoding::DefaultFuchsiaResourceDialect,
21050 >,
21051 offset: usize,
21052 _depth: fidl::encoding::Depth,
21053 ) -> fidl::Result<()> {
21054 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
21055 fidl::encoding::Encode::<
21057 DirectoryLinkRequest,
21058 fidl::encoding::DefaultFuchsiaResourceDialect,
21059 >::encode(
21060 (
21061 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21062 &self.src,
21063 ),
21064 <fidl::encoding::HandleType<
21065 fidl::NullableHandle,
21066 { fidl::ObjectType::NONE.into_raw() },
21067 2147483648,
21068 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21069 &mut self.dst_parent_token,
21070 ),
21071 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21072 &self.dst,
21073 ),
21074 ),
21075 encoder,
21076 offset,
21077 _depth,
21078 )
21079 }
21080 }
21081 unsafe impl<
21082 T0: fidl::encoding::Encode<
21083 fidl::encoding::BoundedString<255>,
21084 fidl::encoding::DefaultFuchsiaResourceDialect,
21085 >,
21086 T1: fidl::encoding::Encode<
21087 fidl::encoding::HandleType<
21088 fidl::NullableHandle,
21089 { fidl::ObjectType::NONE.into_raw() },
21090 2147483648,
21091 >,
21092 fidl::encoding::DefaultFuchsiaResourceDialect,
21093 >,
21094 T2: fidl::encoding::Encode<
21095 fidl::encoding::BoundedString<255>,
21096 fidl::encoding::DefaultFuchsiaResourceDialect,
21097 >,
21098 >
21099 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21100 for (T0, T1, T2)
21101 {
21102 #[inline]
21103 unsafe fn encode(
21104 self,
21105 encoder: &mut fidl::encoding::Encoder<
21106 '_,
21107 fidl::encoding::DefaultFuchsiaResourceDialect,
21108 >,
21109 offset: usize,
21110 depth: fidl::encoding::Depth,
21111 ) -> fidl::Result<()> {
21112 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
21113 unsafe {
21116 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21117 (ptr as *mut u64).write_unaligned(0);
21118 }
21119 self.0.encode(encoder, offset + 0, depth)?;
21121 self.1.encode(encoder, offset + 16, depth)?;
21122 self.2.encode(encoder, offset + 24, depth)?;
21123 Ok(())
21124 }
21125 }
21126
21127 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21128 for DirectoryLinkRequest
21129 {
21130 #[inline(always)]
21131 fn new_empty() -> Self {
21132 Self {
21133 src: fidl::new_empty!(
21134 fidl::encoding::BoundedString<255>,
21135 fidl::encoding::DefaultFuchsiaResourceDialect
21136 ),
21137 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21138 dst: fidl::new_empty!(
21139 fidl::encoding::BoundedString<255>,
21140 fidl::encoding::DefaultFuchsiaResourceDialect
21141 ),
21142 }
21143 }
21144
21145 #[inline]
21146 unsafe fn decode(
21147 &mut self,
21148 decoder: &mut fidl::encoding::Decoder<
21149 '_,
21150 fidl::encoding::DefaultFuchsiaResourceDialect,
21151 >,
21152 offset: usize,
21153 _depth: fidl::encoding::Depth,
21154 ) -> fidl::Result<()> {
21155 decoder.debug_check_bounds::<Self>(offset);
21156 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21158 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21159 let mask = 0xffffffff00000000u64;
21160 let maskedval = padval & mask;
21161 if maskedval != 0 {
21162 return Err(fidl::Error::NonZeroPadding {
21163 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21164 });
21165 }
21166 fidl::decode!(
21167 fidl::encoding::BoundedString<255>,
21168 fidl::encoding::DefaultFuchsiaResourceDialect,
21169 &mut self.src,
21170 decoder,
21171 offset + 0,
21172 _depth
21173 )?;
21174 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)?;
21175 fidl::decode!(
21176 fidl::encoding::BoundedString<255>,
21177 fidl::encoding::DefaultFuchsiaResourceDialect,
21178 &mut self.dst,
21179 decoder,
21180 offset + 24,
21181 _depth
21182 )?;
21183 Ok(())
21184 }
21185 }
21186
21187 impl fidl::encoding::ResourceTypeMarker for DirectoryOpenRequest {
21188 type Borrowed<'a> = &'a mut Self;
21189 fn take_or_borrow<'a>(
21190 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21191 ) -> Self::Borrowed<'a> {
21192 value
21193 }
21194 }
21195
21196 unsafe impl fidl::encoding::TypeMarker for DirectoryOpenRequest {
21197 type Owned = Self;
21198
21199 #[inline(always)]
21200 fn inline_align(_context: fidl::encoding::Context) -> usize {
21201 8
21202 }
21203
21204 #[inline(always)]
21205 fn inline_size(_context: fidl::encoding::Context) -> usize {
21206 48
21207 }
21208 }
21209
21210 unsafe impl
21211 fidl::encoding::Encode<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21212 for &mut DirectoryOpenRequest
21213 {
21214 #[inline]
21215 unsafe fn encode(
21216 self,
21217 encoder: &mut fidl::encoding::Encoder<
21218 '_,
21219 fidl::encoding::DefaultFuchsiaResourceDialect,
21220 >,
21221 offset: usize,
21222 _depth: fidl::encoding::Depth,
21223 ) -> fidl::Result<()> {
21224 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
21225 fidl::encoding::Encode::<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21227 (
21228 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
21229 <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
21230 <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
21231 <fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
21232 ),
21233 encoder, offset, _depth
21234 )
21235 }
21236 }
21237 unsafe impl<
21238 T0: fidl::encoding::Encode<
21239 fidl::encoding::BoundedString<4095>,
21240 fidl::encoding::DefaultFuchsiaResourceDialect,
21241 >,
21242 T1: fidl::encoding::Encode<Flags, fidl::encoding::DefaultFuchsiaResourceDialect>,
21243 T2: fidl::encoding::Encode<Options, fidl::encoding::DefaultFuchsiaResourceDialect>,
21244 T3: fidl::encoding::Encode<
21245 fidl::encoding::HandleType<
21246 fidl::Channel,
21247 { fidl::ObjectType::CHANNEL.into_raw() },
21248 2147483648,
21249 >,
21250 fidl::encoding::DefaultFuchsiaResourceDialect,
21251 >,
21252 >
21253 fidl::encoding::Encode<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21254 for (T0, T1, T2, T3)
21255 {
21256 #[inline]
21257 unsafe fn encode(
21258 self,
21259 encoder: &mut fidl::encoding::Encoder<
21260 '_,
21261 fidl::encoding::DefaultFuchsiaResourceDialect,
21262 >,
21263 offset: usize,
21264 depth: fidl::encoding::Depth,
21265 ) -> fidl::Result<()> {
21266 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
21267 unsafe {
21270 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
21271 (ptr as *mut u64).write_unaligned(0);
21272 }
21273 self.0.encode(encoder, offset + 0, depth)?;
21275 self.1.encode(encoder, offset + 16, depth)?;
21276 self.2.encode(encoder, offset + 24, depth)?;
21277 self.3.encode(encoder, offset + 40, depth)?;
21278 Ok(())
21279 }
21280 }
21281
21282 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21283 for DirectoryOpenRequest
21284 {
21285 #[inline(always)]
21286 fn new_empty() -> Self {
21287 Self {
21288 path: fidl::new_empty!(
21289 fidl::encoding::BoundedString<4095>,
21290 fidl::encoding::DefaultFuchsiaResourceDialect
21291 ),
21292 flags: fidl::new_empty!(Flags, fidl::encoding::DefaultFuchsiaResourceDialect),
21293 options: fidl::new_empty!(Options, fidl::encoding::DefaultFuchsiaResourceDialect),
21294 object: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21295 }
21296 }
21297
21298 #[inline]
21299 unsafe fn decode(
21300 &mut self,
21301 decoder: &mut fidl::encoding::Decoder<
21302 '_,
21303 fidl::encoding::DefaultFuchsiaResourceDialect,
21304 >,
21305 offset: usize,
21306 _depth: fidl::encoding::Depth,
21307 ) -> fidl::Result<()> {
21308 decoder.debug_check_bounds::<Self>(offset);
21309 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
21311 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21312 let mask = 0xffffffff00000000u64;
21313 let maskedval = padval & mask;
21314 if maskedval != 0 {
21315 return Err(fidl::Error::NonZeroPadding {
21316 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
21317 });
21318 }
21319 fidl::decode!(
21320 fidl::encoding::BoundedString<4095>,
21321 fidl::encoding::DefaultFuchsiaResourceDialect,
21322 &mut self.path,
21323 decoder,
21324 offset + 0,
21325 _depth
21326 )?;
21327 fidl::decode!(
21328 Flags,
21329 fidl::encoding::DefaultFuchsiaResourceDialect,
21330 &mut self.flags,
21331 decoder,
21332 offset + 16,
21333 _depth
21334 )?;
21335 fidl::decode!(
21336 Options,
21337 fidl::encoding::DefaultFuchsiaResourceDialect,
21338 &mut self.options,
21339 decoder,
21340 offset + 24,
21341 _depth
21342 )?;
21343 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.object, decoder, offset + 40, _depth)?;
21344 Ok(())
21345 }
21346 }
21347
21348 impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
21349 type Borrowed<'a> = &'a mut Self;
21350 fn take_or_borrow<'a>(
21351 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21352 ) -> Self::Borrowed<'a> {
21353 value
21354 }
21355 }
21356
21357 unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
21358 type Owned = Self;
21359
21360 #[inline(always)]
21361 fn inline_align(_context: fidl::encoding::Context) -> usize {
21362 8
21363 }
21364
21365 #[inline(always)]
21366 fn inline_size(_context: fidl::encoding::Context) -> usize {
21367 40
21368 }
21369 }
21370
21371 unsafe impl
21372 fidl::encoding::Encode<
21373 DirectoryRenameRequest,
21374 fidl::encoding::DefaultFuchsiaResourceDialect,
21375 > for &mut DirectoryRenameRequest
21376 {
21377 #[inline]
21378 unsafe fn encode(
21379 self,
21380 encoder: &mut fidl::encoding::Encoder<
21381 '_,
21382 fidl::encoding::DefaultFuchsiaResourceDialect,
21383 >,
21384 offset: usize,
21385 _depth: fidl::encoding::Depth,
21386 ) -> fidl::Result<()> {
21387 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
21388 fidl::encoding::Encode::<
21390 DirectoryRenameRequest,
21391 fidl::encoding::DefaultFuchsiaResourceDialect,
21392 >::encode(
21393 (
21394 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21395 &self.src,
21396 ),
21397 <fidl::encoding::HandleType<
21398 fidl::Event,
21399 { fidl::ObjectType::EVENT.into_raw() },
21400 2147483648,
21401 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21402 &mut self.dst_parent_token,
21403 ),
21404 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21405 &self.dst,
21406 ),
21407 ),
21408 encoder,
21409 offset,
21410 _depth,
21411 )
21412 }
21413 }
21414 unsafe impl<
21415 T0: fidl::encoding::Encode<
21416 fidl::encoding::BoundedString<255>,
21417 fidl::encoding::DefaultFuchsiaResourceDialect,
21418 >,
21419 T1: fidl::encoding::Encode<
21420 fidl::encoding::HandleType<
21421 fidl::Event,
21422 { fidl::ObjectType::EVENT.into_raw() },
21423 2147483648,
21424 >,
21425 fidl::encoding::DefaultFuchsiaResourceDialect,
21426 >,
21427 T2: fidl::encoding::Encode<
21428 fidl::encoding::BoundedString<255>,
21429 fidl::encoding::DefaultFuchsiaResourceDialect,
21430 >,
21431 >
21432 fidl::encoding::Encode<
21433 DirectoryRenameRequest,
21434 fidl::encoding::DefaultFuchsiaResourceDialect,
21435 > for (T0, T1, T2)
21436 {
21437 #[inline]
21438 unsafe fn encode(
21439 self,
21440 encoder: &mut fidl::encoding::Encoder<
21441 '_,
21442 fidl::encoding::DefaultFuchsiaResourceDialect,
21443 >,
21444 offset: usize,
21445 depth: fidl::encoding::Depth,
21446 ) -> fidl::Result<()> {
21447 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
21448 unsafe {
21451 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21452 (ptr as *mut u64).write_unaligned(0);
21453 }
21454 self.0.encode(encoder, offset + 0, depth)?;
21456 self.1.encode(encoder, offset + 16, depth)?;
21457 self.2.encode(encoder, offset + 24, depth)?;
21458 Ok(())
21459 }
21460 }
21461
21462 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21463 for DirectoryRenameRequest
21464 {
21465 #[inline(always)]
21466 fn new_empty() -> Self {
21467 Self {
21468 src: fidl::new_empty!(
21469 fidl::encoding::BoundedString<255>,
21470 fidl::encoding::DefaultFuchsiaResourceDialect
21471 ),
21472 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21473 dst: fidl::new_empty!(
21474 fidl::encoding::BoundedString<255>,
21475 fidl::encoding::DefaultFuchsiaResourceDialect
21476 ),
21477 }
21478 }
21479
21480 #[inline]
21481 unsafe fn decode(
21482 &mut self,
21483 decoder: &mut fidl::encoding::Decoder<
21484 '_,
21485 fidl::encoding::DefaultFuchsiaResourceDialect,
21486 >,
21487 offset: usize,
21488 _depth: fidl::encoding::Depth,
21489 ) -> fidl::Result<()> {
21490 decoder.debug_check_bounds::<Self>(offset);
21491 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21493 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21494 let mask = 0xffffffff00000000u64;
21495 let maskedval = padval & mask;
21496 if maskedval != 0 {
21497 return Err(fidl::Error::NonZeroPadding {
21498 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21499 });
21500 }
21501 fidl::decode!(
21502 fidl::encoding::BoundedString<255>,
21503 fidl::encoding::DefaultFuchsiaResourceDialect,
21504 &mut self.src,
21505 decoder,
21506 offset + 0,
21507 _depth
21508 )?;
21509 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)?;
21510 fidl::decode!(
21511 fidl::encoding::BoundedString<255>,
21512 fidl::encoding::DefaultFuchsiaResourceDialect,
21513 &mut self.dst,
21514 decoder,
21515 offset + 24,
21516 _depth
21517 )?;
21518 Ok(())
21519 }
21520 }
21521
21522 impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
21523 type Borrowed<'a> = &'a mut Self;
21524 fn take_or_borrow<'a>(
21525 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21526 ) -> Self::Borrowed<'a> {
21527 value
21528 }
21529 }
21530
21531 unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
21532 type Owned = Self;
21533
21534 #[inline(always)]
21535 fn inline_align(_context: fidl::encoding::Context) -> usize {
21536 4
21537 }
21538
21539 #[inline(always)]
21540 fn inline_size(_context: fidl::encoding::Context) -> usize {
21541 12
21542 }
21543 }
21544
21545 unsafe impl
21546 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21547 for &mut DirectoryWatchRequest
21548 {
21549 #[inline]
21550 unsafe fn encode(
21551 self,
21552 encoder: &mut fidl::encoding::Encoder<
21553 '_,
21554 fidl::encoding::DefaultFuchsiaResourceDialect,
21555 >,
21556 offset: usize,
21557 _depth: fidl::encoding::Depth,
21558 ) -> fidl::Result<()> {
21559 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
21560 fidl::encoding::Encode::<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21562 (
21563 <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
21564 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
21565 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.watcher),
21566 ),
21567 encoder, offset, _depth
21568 )
21569 }
21570 }
21571 unsafe impl<
21572 T0: fidl::encoding::Encode<WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect>,
21573 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
21574 T2: fidl::encoding::Encode<
21575 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21576 fidl::encoding::DefaultFuchsiaResourceDialect,
21577 >,
21578 >
21579 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21580 for (T0, T1, T2)
21581 {
21582 #[inline]
21583 unsafe fn encode(
21584 self,
21585 encoder: &mut fidl::encoding::Encoder<
21586 '_,
21587 fidl::encoding::DefaultFuchsiaResourceDialect,
21588 >,
21589 offset: usize,
21590 depth: fidl::encoding::Depth,
21591 ) -> fidl::Result<()> {
21592 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
21593 self.0.encode(encoder, offset + 0, depth)?;
21597 self.1.encode(encoder, offset + 4, depth)?;
21598 self.2.encode(encoder, offset + 8, depth)?;
21599 Ok(())
21600 }
21601 }
21602
21603 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21604 for DirectoryWatchRequest
21605 {
21606 #[inline(always)]
21607 fn new_empty() -> Self {
21608 Self {
21609 mask: fidl::new_empty!(WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect),
21610 options: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
21611 watcher: fidl::new_empty!(
21612 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21613 fidl::encoding::DefaultFuchsiaResourceDialect
21614 ),
21615 }
21616 }
21617
21618 #[inline]
21619 unsafe fn decode(
21620 &mut self,
21621 decoder: &mut fidl::encoding::Decoder<
21622 '_,
21623 fidl::encoding::DefaultFuchsiaResourceDialect,
21624 >,
21625 offset: usize,
21626 _depth: fidl::encoding::Depth,
21627 ) -> fidl::Result<()> {
21628 decoder.debug_check_bounds::<Self>(offset);
21629 fidl::decode!(
21631 WatchMask,
21632 fidl::encoding::DefaultFuchsiaResourceDialect,
21633 &mut self.mask,
21634 decoder,
21635 offset + 0,
21636 _depth
21637 )?;
21638 fidl::decode!(
21639 u32,
21640 fidl::encoding::DefaultFuchsiaResourceDialect,
21641 &mut self.options,
21642 decoder,
21643 offset + 4,
21644 _depth
21645 )?;
21646 fidl::decode!(
21647 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21648 fidl::encoding::DefaultFuchsiaResourceDialect,
21649 &mut self.watcher,
21650 decoder,
21651 offset + 8,
21652 _depth
21653 )?;
21654 Ok(())
21655 }
21656 }
21657
21658 impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
21659 type Borrowed<'a> = &'a mut Self;
21660 fn take_or_borrow<'a>(
21661 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21662 ) -> Self::Borrowed<'a> {
21663 value
21664 }
21665 }
21666
21667 unsafe impl fidl::encoding::TypeMarker for FileAllocateRequest {
21668 type Owned = Self;
21669
21670 #[inline(always)]
21671 fn inline_align(_context: fidl::encoding::Context) -> usize {
21672 8
21673 }
21674
21675 #[inline(always)]
21676 fn inline_size(_context: fidl::encoding::Context) -> usize {
21677 24
21678 }
21679 }
21680
21681 unsafe impl
21682 fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21683 for &mut FileAllocateRequest
21684 {
21685 #[inline]
21686 unsafe fn encode(
21687 self,
21688 encoder: &mut fidl::encoding::Encoder<
21689 '_,
21690 fidl::encoding::DefaultFuchsiaResourceDialect,
21691 >,
21692 offset: usize,
21693 _depth: fidl::encoding::Depth,
21694 ) -> fidl::Result<()> {
21695 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
21696 fidl::encoding::Encode::<
21698 FileAllocateRequest,
21699 fidl::encoding::DefaultFuchsiaResourceDialect,
21700 >::encode(
21701 (
21702 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
21703 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
21704 <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
21705 ),
21706 encoder,
21707 offset,
21708 _depth,
21709 )
21710 }
21711 }
21712 unsafe impl<
21713 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
21714 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
21715 T2: fidl::encoding::Encode<AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect>,
21716 > fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21717 for (T0, T1, T2)
21718 {
21719 #[inline]
21720 unsafe fn encode(
21721 self,
21722 encoder: &mut fidl::encoding::Encoder<
21723 '_,
21724 fidl::encoding::DefaultFuchsiaResourceDialect,
21725 >,
21726 offset: usize,
21727 depth: fidl::encoding::Depth,
21728 ) -> fidl::Result<()> {
21729 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
21730 unsafe {
21733 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21734 (ptr as *mut u64).write_unaligned(0);
21735 }
21736 self.0.encode(encoder, offset + 0, depth)?;
21738 self.1.encode(encoder, offset + 8, depth)?;
21739 self.2.encode(encoder, offset + 16, depth)?;
21740 Ok(())
21741 }
21742 }
21743
21744 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21745 for FileAllocateRequest
21746 {
21747 #[inline(always)]
21748 fn new_empty() -> Self {
21749 Self {
21750 offset: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
21751 length: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
21752 mode: fidl::new_empty!(AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect),
21753 }
21754 }
21755
21756 #[inline]
21757 unsafe fn decode(
21758 &mut self,
21759 decoder: &mut fidl::encoding::Decoder<
21760 '_,
21761 fidl::encoding::DefaultFuchsiaResourceDialect,
21762 >,
21763 offset: usize,
21764 _depth: fidl::encoding::Depth,
21765 ) -> fidl::Result<()> {
21766 decoder.debug_check_bounds::<Self>(offset);
21767 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21769 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21770 let mask = 0xffffffff00000000u64;
21771 let maskedval = padval & mask;
21772 if maskedval != 0 {
21773 return Err(fidl::Error::NonZeroPadding {
21774 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21775 });
21776 }
21777 fidl::decode!(
21778 u64,
21779 fidl::encoding::DefaultFuchsiaResourceDialect,
21780 &mut self.offset,
21781 decoder,
21782 offset + 0,
21783 _depth
21784 )?;
21785 fidl::decode!(
21786 u64,
21787 fidl::encoding::DefaultFuchsiaResourceDialect,
21788 &mut self.length,
21789 decoder,
21790 offset + 8,
21791 _depth
21792 )?;
21793 fidl::decode!(
21794 AllocateMode,
21795 fidl::encoding::DefaultFuchsiaResourceDialect,
21796 &mut self.mode,
21797 decoder,
21798 offset + 16,
21799 _depth
21800 )?;
21801 Ok(())
21802 }
21803 }
21804
21805 impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
21806 type Borrowed<'a> = &'a mut Self;
21807 fn take_or_borrow<'a>(
21808 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21809 ) -> Self::Borrowed<'a> {
21810 value
21811 }
21812 }
21813
21814 unsafe impl fidl::encoding::TypeMarker for FileEnableVerityRequest {
21815 type Owned = Self;
21816
21817 #[inline(always)]
21818 fn inline_align(_context: fidl::encoding::Context) -> usize {
21819 8
21820 }
21821
21822 #[inline(always)]
21823 fn inline_size(_context: fidl::encoding::Context) -> usize {
21824 16
21825 }
21826 }
21827
21828 unsafe impl
21829 fidl::encoding::Encode<
21830 FileEnableVerityRequest,
21831 fidl::encoding::DefaultFuchsiaResourceDialect,
21832 > for &mut FileEnableVerityRequest
21833 {
21834 #[inline]
21835 unsafe fn encode(
21836 self,
21837 encoder: &mut fidl::encoding::Encoder<
21838 '_,
21839 fidl::encoding::DefaultFuchsiaResourceDialect,
21840 >,
21841 offset: usize,
21842 _depth: fidl::encoding::Depth,
21843 ) -> fidl::Result<()> {
21844 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
21845 fidl::encoding::Encode::<
21847 FileEnableVerityRequest,
21848 fidl::encoding::DefaultFuchsiaResourceDialect,
21849 >::encode(
21850 (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
21851 encoder,
21852 offset,
21853 _depth,
21854 )
21855 }
21856 }
21857 unsafe impl<
21858 T0: fidl::encoding::Encode<VerificationOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
21859 >
21860 fidl::encoding::Encode<
21861 FileEnableVerityRequest,
21862 fidl::encoding::DefaultFuchsiaResourceDialect,
21863 > for (T0,)
21864 {
21865 #[inline]
21866 unsafe fn encode(
21867 self,
21868 encoder: &mut fidl::encoding::Encoder<
21869 '_,
21870 fidl::encoding::DefaultFuchsiaResourceDialect,
21871 >,
21872 offset: usize,
21873 depth: fidl::encoding::Depth,
21874 ) -> fidl::Result<()> {
21875 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
21876 self.0.encode(encoder, offset + 0, depth)?;
21880 Ok(())
21881 }
21882 }
21883
21884 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21885 for FileEnableVerityRequest
21886 {
21887 #[inline(always)]
21888 fn new_empty() -> Self {
21889 Self {
21890 options: fidl::new_empty!(
21891 VerificationOptions,
21892 fidl::encoding::DefaultFuchsiaResourceDialect
21893 ),
21894 }
21895 }
21896
21897 #[inline]
21898 unsafe fn decode(
21899 &mut self,
21900 decoder: &mut fidl::encoding::Decoder<
21901 '_,
21902 fidl::encoding::DefaultFuchsiaResourceDialect,
21903 >,
21904 offset: usize,
21905 _depth: fidl::encoding::Depth,
21906 ) -> fidl::Result<()> {
21907 decoder.debug_check_bounds::<Self>(offset);
21908 fidl::decode!(
21910 VerificationOptions,
21911 fidl::encoding::DefaultFuchsiaResourceDialect,
21912 &mut self.options,
21913 decoder,
21914 offset + 0,
21915 _depth
21916 )?;
21917 Ok(())
21918 }
21919 }
21920
21921 impl fidl::encoding::ResourceTypeMarker for FileObject {
21922 type Borrowed<'a> = &'a mut Self;
21923 fn take_or_borrow<'a>(
21924 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21925 ) -> Self::Borrowed<'a> {
21926 value
21927 }
21928 }
21929
21930 unsafe impl fidl::encoding::TypeMarker for FileObject {
21931 type Owned = Self;
21932
21933 #[inline(always)]
21934 fn inline_align(_context: fidl::encoding::Context) -> usize {
21935 4
21936 }
21937
21938 #[inline(always)]
21939 fn inline_size(_context: fidl::encoding::Context) -> usize {
21940 8
21941 }
21942 }
21943
21944 unsafe impl fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
21945 for &mut FileObject
21946 {
21947 #[inline]
21948 unsafe fn encode(
21949 self,
21950 encoder: &mut fidl::encoding::Encoder<
21951 '_,
21952 fidl::encoding::DefaultFuchsiaResourceDialect,
21953 >,
21954 offset: usize,
21955 _depth: fidl::encoding::Depth,
21956 ) -> fidl::Result<()> {
21957 encoder.debug_check_bounds::<FileObject>(offset);
21958 fidl::encoding::Encode::<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21960 (
21961 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.event),
21962 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.stream),
21963 ),
21964 encoder, offset, _depth
21965 )
21966 }
21967 }
21968 unsafe impl<
21969 T0: fidl::encoding::Encode<
21970 fidl::encoding::Optional<
21971 fidl::encoding::HandleType<
21972 fidl::Event,
21973 { fidl::ObjectType::EVENT.into_raw() },
21974 2147483648,
21975 >,
21976 >,
21977 fidl::encoding::DefaultFuchsiaResourceDialect,
21978 >,
21979 T1: fidl::encoding::Encode<
21980 fidl::encoding::Optional<
21981 fidl::encoding::HandleType<
21982 fidl::Stream,
21983 { fidl::ObjectType::STREAM.into_raw() },
21984 2147483648,
21985 >,
21986 >,
21987 fidl::encoding::DefaultFuchsiaResourceDialect,
21988 >,
21989 > fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
21990 for (T0, T1)
21991 {
21992 #[inline]
21993 unsafe fn encode(
21994 self,
21995 encoder: &mut fidl::encoding::Encoder<
21996 '_,
21997 fidl::encoding::DefaultFuchsiaResourceDialect,
21998 >,
21999 offset: usize,
22000 depth: fidl::encoding::Depth,
22001 ) -> fidl::Result<()> {
22002 encoder.debug_check_bounds::<FileObject>(offset);
22003 self.0.encode(encoder, offset + 0, depth)?;
22007 self.1.encode(encoder, offset + 4, depth)?;
22008 Ok(())
22009 }
22010 }
22011
22012 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {
22013 #[inline(always)]
22014 fn new_empty() -> Self {
22015 Self {
22016 event: fidl::new_empty!(
22017 fidl::encoding::Optional<
22018 fidl::encoding::HandleType<
22019 fidl::Event,
22020 { fidl::ObjectType::EVENT.into_raw() },
22021 2147483648,
22022 >,
22023 >,
22024 fidl::encoding::DefaultFuchsiaResourceDialect
22025 ),
22026 stream: fidl::new_empty!(
22027 fidl::encoding::Optional<
22028 fidl::encoding::HandleType<
22029 fidl::Stream,
22030 { fidl::ObjectType::STREAM.into_raw() },
22031 2147483648,
22032 >,
22033 >,
22034 fidl::encoding::DefaultFuchsiaResourceDialect
22035 ),
22036 }
22037 }
22038
22039 #[inline]
22040 unsafe fn decode(
22041 &mut self,
22042 decoder: &mut fidl::encoding::Decoder<
22043 '_,
22044 fidl::encoding::DefaultFuchsiaResourceDialect,
22045 >,
22046 offset: usize,
22047 _depth: fidl::encoding::Depth,
22048 ) -> fidl::Result<()> {
22049 decoder.debug_check_bounds::<Self>(offset);
22050 fidl::decode!(
22052 fidl::encoding::Optional<
22053 fidl::encoding::HandleType<
22054 fidl::Event,
22055 { fidl::ObjectType::EVENT.into_raw() },
22056 2147483648,
22057 >,
22058 >,
22059 fidl::encoding::DefaultFuchsiaResourceDialect,
22060 &mut self.event,
22061 decoder,
22062 offset + 0,
22063 _depth
22064 )?;
22065 fidl::decode!(
22066 fidl::encoding::Optional<
22067 fidl::encoding::HandleType<
22068 fidl::Stream,
22069 { fidl::ObjectType::STREAM.into_raw() },
22070 2147483648,
22071 >,
22072 >,
22073 fidl::encoding::DefaultFuchsiaResourceDialect,
22074 &mut self.stream,
22075 decoder,
22076 offset + 4,
22077 _depth
22078 )?;
22079 Ok(())
22080 }
22081 }
22082
22083 impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
22084 type Borrowed<'a> = &'a mut Self;
22085 fn take_or_borrow<'a>(
22086 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22087 ) -> Self::Borrowed<'a> {
22088 value
22089 }
22090 }
22091
22092 unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
22093 type Owned = Self;
22094
22095 #[inline(always)]
22096 fn inline_align(_context: fidl::encoding::Context) -> usize {
22097 4
22098 }
22099
22100 #[inline(always)]
22101 fn inline_size(_context: fidl::encoding::Context) -> usize {
22102 4
22103 }
22104 }
22105
22106 unsafe impl
22107 fidl::encoding::Encode<
22108 FileGetBackingMemoryResponse,
22109 fidl::encoding::DefaultFuchsiaResourceDialect,
22110 > for &mut FileGetBackingMemoryResponse
22111 {
22112 #[inline]
22113 unsafe fn encode(
22114 self,
22115 encoder: &mut fidl::encoding::Encoder<
22116 '_,
22117 fidl::encoding::DefaultFuchsiaResourceDialect,
22118 >,
22119 offset: usize,
22120 _depth: fidl::encoding::Depth,
22121 ) -> fidl::Result<()> {
22122 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
22123 fidl::encoding::Encode::<
22125 FileGetBackingMemoryResponse,
22126 fidl::encoding::DefaultFuchsiaResourceDialect,
22127 >::encode(
22128 (<fidl::encoding::HandleType<
22129 fidl::Vmo,
22130 { fidl::ObjectType::VMO.into_raw() },
22131 2147483648,
22132 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22133 &mut self.vmo
22134 ),),
22135 encoder,
22136 offset,
22137 _depth,
22138 )
22139 }
22140 }
22141 unsafe impl<
22142 T0: fidl::encoding::Encode<
22143 fidl::encoding::HandleType<
22144 fidl::Vmo,
22145 { fidl::ObjectType::VMO.into_raw() },
22146 2147483648,
22147 >,
22148 fidl::encoding::DefaultFuchsiaResourceDialect,
22149 >,
22150 >
22151 fidl::encoding::Encode<
22152 FileGetBackingMemoryResponse,
22153 fidl::encoding::DefaultFuchsiaResourceDialect,
22154 > for (T0,)
22155 {
22156 #[inline]
22157 unsafe fn encode(
22158 self,
22159 encoder: &mut fidl::encoding::Encoder<
22160 '_,
22161 fidl::encoding::DefaultFuchsiaResourceDialect,
22162 >,
22163 offset: usize,
22164 depth: fidl::encoding::Depth,
22165 ) -> fidl::Result<()> {
22166 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
22167 self.0.encode(encoder, offset + 0, depth)?;
22171 Ok(())
22172 }
22173 }
22174
22175 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22176 for FileGetBackingMemoryResponse
22177 {
22178 #[inline(always)]
22179 fn new_empty() -> Self {
22180 Self {
22181 vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22182 }
22183 }
22184
22185 #[inline]
22186 unsafe fn decode(
22187 &mut self,
22188 decoder: &mut fidl::encoding::Decoder<
22189 '_,
22190 fidl::encoding::DefaultFuchsiaResourceDialect,
22191 >,
22192 offset: usize,
22193 _depth: fidl::encoding::Depth,
22194 ) -> fidl::Result<()> {
22195 decoder.debug_check_bounds::<Self>(offset);
22196 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
22198 Ok(())
22199 }
22200 }
22201
22202 impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
22203 type Borrowed<'a> = &'a mut Self;
22204 fn take_or_borrow<'a>(
22205 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22206 ) -> Self::Borrowed<'a> {
22207 value
22208 }
22209 }
22210
22211 unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
22212 type Owned = Self;
22213
22214 #[inline(always)]
22215 fn inline_align(_context: fidl::encoding::Context) -> usize {
22216 8
22217 }
22218
22219 #[inline(always)]
22220 fn inline_size(_context: fidl::encoding::Context) -> usize {
22221 24
22222 }
22223 }
22224
22225 unsafe impl
22226 fidl::encoding::Encode<
22227 LinkableLinkIntoRequest,
22228 fidl::encoding::DefaultFuchsiaResourceDialect,
22229 > for &mut LinkableLinkIntoRequest
22230 {
22231 #[inline]
22232 unsafe fn encode(
22233 self,
22234 encoder: &mut fidl::encoding::Encoder<
22235 '_,
22236 fidl::encoding::DefaultFuchsiaResourceDialect,
22237 >,
22238 offset: usize,
22239 _depth: fidl::encoding::Depth,
22240 ) -> fidl::Result<()> {
22241 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
22242 fidl::encoding::Encode::<
22244 LinkableLinkIntoRequest,
22245 fidl::encoding::DefaultFuchsiaResourceDialect,
22246 >::encode(
22247 (
22248 <fidl::encoding::HandleType<
22249 fidl::Event,
22250 { fidl::ObjectType::EVENT.into_raw() },
22251 2147483648,
22252 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22253 &mut self.dst_parent_token,
22254 ),
22255 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
22256 &self.dst,
22257 ),
22258 ),
22259 encoder,
22260 offset,
22261 _depth,
22262 )
22263 }
22264 }
22265 unsafe impl<
22266 T0: fidl::encoding::Encode<
22267 fidl::encoding::HandleType<
22268 fidl::Event,
22269 { fidl::ObjectType::EVENT.into_raw() },
22270 2147483648,
22271 >,
22272 fidl::encoding::DefaultFuchsiaResourceDialect,
22273 >,
22274 T1: fidl::encoding::Encode<
22275 fidl::encoding::BoundedString<255>,
22276 fidl::encoding::DefaultFuchsiaResourceDialect,
22277 >,
22278 >
22279 fidl::encoding::Encode<
22280 LinkableLinkIntoRequest,
22281 fidl::encoding::DefaultFuchsiaResourceDialect,
22282 > for (T0, T1)
22283 {
22284 #[inline]
22285 unsafe fn encode(
22286 self,
22287 encoder: &mut fidl::encoding::Encoder<
22288 '_,
22289 fidl::encoding::DefaultFuchsiaResourceDialect,
22290 >,
22291 offset: usize,
22292 depth: fidl::encoding::Depth,
22293 ) -> fidl::Result<()> {
22294 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
22295 unsafe {
22298 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22299 (ptr as *mut u64).write_unaligned(0);
22300 }
22301 self.0.encode(encoder, offset + 0, depth)?;
22303 self.1.encode(encoder, offset + 8, depth)?;
22304 Ok(())
22305 }
22306 }
22307
22308 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22309 for LinkableLinkIntoRequest
22310 {
22311 #[inline(always)]
22312 fn new_empty() -> Self {
22313 Self {
22314 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22315 dst: fidl::new_empty!(
22316 fidl::encoding::BoundedString<255>,
22317 fidl::encoding::DefaultFuchsiaResourceDialect
22318 ),
22319 }
22320 }
22321
22322 #[inline]
22323 unsafe fn decode(
22324 &mut self,
22325 decoder: &mut fidl::encoding::Decoder<
22326 '_,
22327 fidl::encoding::DefaultFuchsiaResourceDialect,
22328 >,
22329 offset: usize,
22330 _depth: fidl::encoding::Depth,
22331 ) -> fidl::Result<()> {
22332 decoder.debug_check_bounds::<Self>(offset);
22333 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
22335 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22336 let mask = 0xffffffff00000000u64;
22337 let maskedval = padval & mask;
22338 if maskedval != 0 {
22339 return Err(fidl::Error::NonZeroPadding {
22340 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22341 });
22342 }
22343 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)?;
22344 fidl::decode!(
22345 fidl::encoding::BoundedString<255>,
22346 fidl::encoding::DefaultFuchsiaResourceDialect,
22347 &mut self.dst,
22348 decoder,
22349 offset + 8,
22350 _depth
22351 )?;
22352 Ok(())
22353 }
22354 }
22355
22356 impl fidl::encoding::ResourceTypeMarker for NodeDeprecatedCloneRequest {
22357 type Borrowed<'a> = &'a mut Self;
22358 fn take_or_borrow<'a>(
22359 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22360 ) -> Self::Borrowed<'a> {
22361 value
22362 }
22363 }
22364
22365 unsafe impl fidl::encoding::TypeMarker for NodeDeprecatedCloneRequest {
22366 type Owned = Self;
22367
22368 #[inline(always)]
22369 fn inline_align(_context: fidl::encoding::Context) -> usize {
22370 4
22371 }
22372
22373 #[inline(always)]
22374 fn inline_size(_context: fidl::encoding::Context) -> usize {
22375 8
22376 }
22377 }
22378
22379 unsafe impl
22380 fidl::encoding::Encode<
22381 NodeDeprecatedCloneRequest,
22382 fidl::encoding::DefaultFuchsiaResourceDialect,
22383 > for &mut NodeDeprecatedCloneRequest
22384 {
22385 #[inline]
22386 unsafe fn encode(
22387 self,
22388 encoder: &mut fidl::encoding::Encoder<
22389 '_,
22390 fidl::encoding::DefaultFuchsiaResourceDialect,
22391 >,
22392 offset: usize,
22393 _depth: fidl::encoding::Depth,
22394 ) -> fidl::Result<()> {
22395 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
22396 fidl::encoding::Encode::<NodeDeprecatedCloneRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22398 (
22399 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
22400 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
22401 ),
22402 encoder, offset, _depth
22403 )
22404 }
22405 }
22406 unsafe impl<
22407 T0: fidl::encoding::Encode<OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect>,
22408 T1: fidl::encoding::Encode<
22409 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22410 fidl::encoding::DefaultFuchsiaResourceDialect,
22411 >,
22412 >
22413 fidl::encoding::Encode<
22414 NodeDeprecatedCloneRequest,
22415 fidl::encoding::DefaultFuchsiaResourceDialect,
22416 > for (T0, T1)
22417 {
22418 #[inline]
22419 unsafe fn encode(
22420 self,
22421 encoder: &mut fidl::encoding::Encoder<
22422 '_,
22423 fidl::encoding::DefaultFuchsiaResourceDialect,
22424 >,
22425 offset: usize,
22426 depth: fidl::encoding::Depth,
22427 ) -> fidl::Result<()> {
22428 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
22429 self.0.encode(encoder, offset + 0, depth)?;
22433 self.1.encode(encoder, offset + 4, depth)?;
22434 Ok(())
22435 }
22436 }
22437
22438 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22439 for NodeDeprecatedCloneRequest
22440 {
22441 #[inline(always)]
22442 fn new_empty() -> Self {
22443 Self {
22444 flags: fidl::new_empty!(OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect),
22445 object: fidl::new_empty!(
22446 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22447 fidl::encoding::DefaultFuchsiaResourceDialect
22448 ),
22449 }
22450 }
22451
22452 #[inline]
22453 unsafe fn decode(
22454 &mut self,
22455 decoder: &mut fidl::encoding::Decoder<
22456 '_,
22457 fidl::encoding::DefaultFuchsiaResourceDialect,
22458 >,
22459 offset: usize,
22460 _depth: fidl::encoding::Depth,
22461 ) -> fidl::Result<()> {
22462 decoder.debug_check_bounds::<Self>(offset);
22463 fidl::decode!(
22465 OpenFlags,
22466 fidl::encoding::DefaultFuchsiaResourceDialect,
22467 &mut self.flags,
22468 decoder,
22469 offset + 0,
22470 _depth
22471 )?;
22472 fidl::decode!(
22473 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22474 fidl::encoding::DefaultFuchsiaResourceDialect,
22475 &mut self.object,
22476 decoder,
22477 offset + 4,
22478 _depth
22479 )?;
22480 Ok(())
22481 }
22482 }
22483
22484 impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
22485 type Borrowed<'a> = &'a mut Self;
22486 fn take_or_borrow<'a>(
22487 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22488 ) -> Self::Borrowed<'a> {
22489 value
22490 }
22491 }
22492
22493 unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
22494 type Owned = Self;
22495
22496 #[inline(always)]
22497 fn inline_align(_context: fidl::encoding::Context) -> usize {
22498 4
22499 }
22500
22501 #[inline(always)]
22502 fn inline_size(_context: fidl::encoding::Context) -> usize {
22503 4
22504 }
22505 }
22506
22507 unsafe impl
22508 fidl::encoding::Encode<
22509 NodeListExtendedAttributesRequest,
22510 fidl::encoding::DefaultFuchsiaResourceDialect,
22511 > for &mut NodeListExtendedAttributesRequest
22512 {
22513 #[inline]
22514 unsafe fn encode(
22515 self,
22516 encoder: &mut fidl::encoding::Encoder<
22517 '_,
22518 fidl::encoding::DefaultFuchsiaResourceDialect,
22519 >,
22520 offset: usize,
22521 _depth: fidl::encoding::Depth,
22522 ) -> fidl::Result<()> {
22523 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
22524 fidl::encoding::Encode::<
22526 NodeListExtendedAttributesRequest,
22527 fidl::encoding::DefaultFuchsiaResourceDialect,
22528 >::encode(
22529 (<fidl::encoding::Endpoint<
22530 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22531 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22532 &mut self.iterator
22533 ),),
22534 encoder,
22535 offset,
22536 _depth,
22537 )
22538 }
22539 }
22540 unsafe impl<
22541 T0: fidl::encoding::Encode<
22542 fidl::encoding::Endpoint<
22543 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22544 >,
22545 fidl::encoding::DefaultFuchsiaResourceDialect,
22546 >,
22547 >
22548 fidl::encoding::Encode<
22549 NodeListExtendedAttributesRequest,
22550 fidl::encoding::DefaultFuchsiaResourceDialect,
22551 > for (T0,)
22552 {
22553 #[inline]
22554 unsafe fn encode(
22555 self,
22556 encoder: &mut fidl::encoding::Encoder<
22557 '_,
22558 fidl::encoding::DefaultFuchsiaResourceDialect,
22559 >,
22560 offset: usize,
22561 depth: fidl::encoding::Depth,
22562 ) -> fidl::Result<()> {
22563 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
22564 self.0.encode(encoder, offset + 0, depth)?;
22568 Ok(())
22569 }
22570 }
22571
22572 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22573 for NodeListExtendedAttributesRequest
22574 {
22575 #[inline(always)]
22576 fn new_empty() -> Self {
22577 Self {
22578 iterator: fidl::new_empty!(
22579 fidl::encoding::Endpoint<
22580 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22581 >,
22582 fidl::encoding::DefaultFuchsiaResourceDialect
22583 ),
22584 }
22585 }
22586
22587 #[inline]
22588 unsafe fn decode(
22589 &mut self,
22590 decoder: &mut fidl::encoding::Decoder<
22591 '_,
22592 fidl::encoding::DefaultFuchsiaResourceDialect,
22593 >,
22594 offset: usize,
22595 _depth: fidl::encoding::Depth,
22596 ) -> fidl::Result<()> {
22597 decoder.debug_check_bounds::<Self>(offset);
22598 fidl::decode!(
22600 fidl::encoding::Endpoint<
22601 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22602 >,
22603 fidl::encoding::DefaultFuchsiaResourceDialect,
22604 &mut self.iterator,
22605 decoder,
22606 offset + 0,
22607 _depth
22608 )?;
22609 Ok(())
22610 }
22611 }
22612
22613 impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
22614 type Borrowed<'a> = &'a mut Self;
22615 fn take_or_borrow<'a>(
22616 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22617 ) -> Self::Borrowed<'a> {
22618 value
22619 }
22620 }
22621
22622 unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
22623 type Owned = Self;
22624
22625 #[inline(always)]
22626 fn inline_align(_context: fidl::encoding::Context) -> usize {
22627 8
22628 }
22629
22630 #[inline(always)]
22631 fn inline_size(_context: fidl::encoding::Context) -> usize {
22632 24
22633 }
22634 }
22635
22636 unsafe impl
22637 fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22638 for &mut NodeOnOpenRequest
22639 {
22640 #[inline]
22641 unsafe fn encode(
22642 self,
22643 encoder: &mut fidl::encoding::Encoder<
22644 '_,
22645 fidl::encoding::DefaultFuchsiaResourceDialect,
22646 >,
22647 offset: usize,
22648 _depth: fidl::encoding::Depth,
22649 ) -> fidl::Result<()> {
22650 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
22651 fidl::encoding::Encode::<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22653 (
22654 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
22655 <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
22656 ),
22657 encoder, offset, _depth
22658 )
22659 }
22660 }
22661 unsafe impl<
22662 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
22663 T1: fidl::encoding::Encode<
22664 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22665 fidl::encoding::DefaultFuchsiaResourceDialect,
22666 >,
22667 > fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22668 for (T0, T1)
22669 {
22670 #[inline]
22671 unsafe fn encode(
22672 self,
22673 encoder: &mut fidl::encoding::Encoder<
22674 '_,
22675 fidl::encoding::DefaultFuchsiaResourceDialect,
22676 >,
22677 offset: usize,
22678 depth: fidl::encoding::Depth,
22679 ) -> fidl::Result<()> {
22680 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
22681 unsafe {
22684 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22685 (ptr as *mut u64).write_unaligned(0);
22686 }
22687 self.0.encode(encoder, offset + 0, depth)?;
22689 self.1.encode(encoder, offset + 8, depth)?;
22690 Ok(())
22691 }
22692 }
22693
22694 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22695 for NodeOnOpenRequest
22696 {
22697 #[inline(always)]
22698 fn new_empty() -> Self {
22699 Self {
22700 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
22701 info: fidl::new_empty!(
22702 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22703 fidl::encoding::DefaultFuchsiaResourceDialect
22704 ),
22705 }
22706 }
22707
22708 #[inline]
22709 unsafe fn decode(
22710 &mut self,
22711 decoder: &mut fidl::encoding::Decoder<
22712 '_,
22713 fidl::encoding::DefaultFuchsiaResourceDialect,
22714 >,
22715 offset: usize,
22716 _depth: fidl::encoding::Depth,
22717 ) -> fidl::Result<()> {
22718 decoder.debug_check_bounds::<Self>(offset);
22719 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
22721 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22722 let mask = 0xffffffff00000000u64;
22723 let maskedval = padval & mask;
22724 if maskedval != 0 {
22725 return Err(fidl::Error::NonZeroPadding {
22726 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22727 });
22728 }
22729 fidl::decode!(
22730 i32,
22731 fidl::encoding::DefaultFuchsiaResourceDialect,
22732 &mut self.s,
22733 decoder,
22734 offset + 0,
22735 _depth
22736 )?;
22737 fidl::decode!(
22738 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22739 fidl::encoding::DefaultFuchsiaResourceDialect,
22740 &mut self.info,
22741 decoder,
22742 offset + 8,
22743 _depth
22744 )?;
22745 Ok(())
22746 }
22747 }
22748
22749 impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
22750 type Borrowed<'a> = &'a mut Self;
22751 fn take_or_borrow<'a>(
22752 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22753 ) -> Self::Borrowed<'a> {
22754 value
22755 }
22756 }
22757
22758 unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
22759 type Owned = Self;
22760
22761 #[inline(always)]
22762 fn inline_align(_context: fidl::encoding::Context) -> usize {
22763 8
22764 }
22765
22766 #[inline(always)]
22767 fn inline_size(_context: fidl::encoding::Context) -> usize {
22768 40
22769 }
22770 }
22771
22772 unsafe impl
22773 fidl::encoding::Encode<
22774 NodeSetExtendedAttributeRequest,
22775 fidl::encoding::DefaultFuchsiaResourceDialect,
22776 > for &mut NodeSetExtendedAttributeRequest
22777 {
22778 #[inline]
22779 unsafe fn encode(
22780 self,
22781 encoder: &mut fidl::encoding::Encoder<
22782 '_,
22783 fidl::encoding::DefaultFuchsiaResourceDialect,
22784 >,
22785 offset: usize,
22786 _depth: fidl::encoding::Depth,
22787 ) -> fidl::Result<()> {
22788 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
22789 fidl::encoding::Encode::<
22791 NodeSetExtendedAttributeRequest,
22792 fidl::encoding::DefaultFuchsiaResourceDialect,
22793 >::encode(
22794 (
22795 <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
22796 &self.name,
22797 ),
22798 <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22799 &mut self.value,
22800 ),
22801 <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
22802 &self.mode,
22803 ),
22804 ),
22805 encoder,
22806 offset,
22807 _depth,
22808 )
22809 }
22810 }
22811 unsafe impl<
22812 T0: fidl::encoding::Encode<
22813 fidl::encoding::Vector<u8, 255>,
22814 fidl::encoding::DefaultFuchsiaResourceDialect,
22815 >,
22816 T1: fidl::encoding::Encode<
22817 ExtendedAttributeValue,
22818 fidl::encoding::DefaultFuchsiaResourceDialect,
22819 >,
22820 T2: fidl::encoding::Encode<
22821 SetExtendedAttributeMode,
22822 fidl::encoding::DefaultFuchsiaResourceDialect,
22823 >,
22824 >
22825 fidl::encoding::Encode<
22826 NodeSetExtendedAttributeRequest,
22827 fidl::encoding::DefaultFuchsiaResourceDialect,
22828 > for (T0, T1, T2)
22829 {
22830 #[inline]
22831 unsafe fn encode(
22832 self,
22833 encoder: &mut fidl::encoding::Encoder<
22834 '_,
22835 fidl::encoding::DefaultFuchsiaResourceDialect,
22836 >,
22837 offset: usize,
22838 depth: fidl::encoding::Depth,
22839 ) -> fidl::Result<()> {
22840 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
22841 unsafe {
22844 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
22845 (ptr as *mut u64).write_unaligned(0);
22846 }
22847 self.0.encode(encoder, offset + 0, depth)?;
22849 self.1.encode(encoder, offset + 16, depth)?;
22850 self.2.encode(encoder, offset + 32, depth)?;
22851 Ok(())
22852 }
22853 }
22854
22855 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22856 for NodeSetExtendedAttributeRequest
22857 {
22858 #[inline(always)]
22859 fn new_empty() -> Self {
22860 Self {
22861 name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect),
22862 value: fidl::new_empty!(
22863 ExtendedAttributeValue,
22864 fidl::encoding::DefaultFuchsiaResourceDialect
22865 ),
22866 mode: fidl::new_empty!(
22867 SetExtendedAttributeMode,
22868 fidl::encoding::DefaultFuchsiaResourceDialect
22869 ),
22870 }
22871 }
22872
22873 #[inline]
22874 unsafe fn decode(
22875 &mut self,
22876 decoder: &mut fidl::encoding::Decoder<
22877 '_,
22878 fidl::encoding::DefaultFuchsiaResourceDialect,
22879 >,
22880 offset: usize,
22881 _depth: fidl::encoding::Depth,
22882 ) -> fidl::Result<()> {
22883 decoder.debug_check_bounds::<Self>(offset);
22884 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
22886 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22887 let mask = 0xffffffff00000000u64;
22888 let maskedval = padval & mask;
22889 if maskedval != 0 {
22890 return Err(fidl::Error::NonZeroPadding {
22891 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
22892 });
22893 }
22894 fidl::decode!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
22895 fidl::decode!(
22896 ExtendedAttributeValue,
22897 fidl::encoding::DefaultFuchsiaResourceDialect,
22898 &mut self.value,
22899 decoder,
22900 offset + 16,
22901 _depth
22902 )?;
22903 fidl::decode!(
22904 SetExtendedAttributeMode,
22905 fidl::encoding::DefaultFuchsiaResourceDialect,
22906 &mut self.mode,
22907 decoder,
22908 offset + 32,
22909 _depth
22910 )?;
22911 Ok(())
22912 }
22913 }
22914
22915 impl ConnectionInfo {
22916 #[inline(always)]
22917 fn max_ordinal_present(&self) -> u64 {
22918 if let Some(_) = self.rights {
22919 return 1;
22920 }
22921 0
22922 }
22923 }
22924
22925 impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
22926 type Borrowed<'a> = &'a mut Self;
22927 fn take_or_borrow<'a>(
22928 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22929 ) -> Self::Borrowed<'a> {
22930 value
22931 }
22932 }
22933
22934 unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
22935 type Owned = Self;
22936
22937 #[inline(always)]
22938 fn inline_align(_context: fidl::encoding::Context) -> usize {
22939 8
22940 }
22941
22942 #[inline(always)]
22943 fn inline_size(_context: fidl::encoding::Context) -> usize {
22944 16
22945 }
22946 }
22947
22948 unsafe impl
22949 fidl::encoding::Encode<ConnectionInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
22950 for &mut ConnectionInfo
22951 {
22952 unsafe fn encode(
22953 self,
22954 encoder: &mut fidl::encoding::Encoder<
22955 '_,
22956 fidl::encoding::DefaultFuchsiaResourceDialect,
22957 >,
22958 offset: usize,
22959 mut depth: fidl::encoding::Depth,
22960 ) -> fidl::Result<()> {
22961 encoder.debug_check_bounds::<ConnectionInfo>(offset);
22962 let max_ordinal: u64 = self.max_ordinal_present();
22964 encoder.write_num(max_ordinal, offset);
22965 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
22966 if max_ordinal == 0 {
22968 return Ok(());
22969 }
22970 depth.increment()?;
22971 let envelope_size = 8;
22972 let bytes_len = max_ordinal as usize * envelope_size;
22973 #[allow(unused_variables)]
22974 let offset = encoder.out_of_line_offset(bytes_len);
22975 let mut _prev_end_offset: usize = 0;
22976 if 1 > max_ordinal {
22977 return Ok(());
22978 }
22979
22980 let cur_offset: usize = (1 - 1) * envelope_size;
22983
22984 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
22986
22987 fidl::encoding::encode_in_envelope_optional::<
22992 Operations,
22993 fidl::encoding::DefaultFuchsiaResourceDialect,
22994 >(
22995 self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
22996 encoder,
22997 offset + cur_offset,
22998 depth,
22999 )?;
23000
23001 _prev_end_offset = cur_offset + envelope_size;
23002
23003 Ok(())
23004 }
23005 }
23006
23007 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23008 for ConnectionInfo
23009 {
23010 #[inline(always)]
23011 fn new_empty() -> Self {
23012 Self::default()
23013 }
23014
23015 unsafe fn decode(
23016 &mut self,
23017 decoder: &mut fidl::encoding::Decoder<
23018 '_,
23019 fidl::encoding::DefaultFuchsiaResourceDialect,
23020 >,
23021 offset: usize,
23022 mut depth: fidl::encoding::Depth,
23023 ) -> fidl::Result<()> {
23024 decoder.debug_check_bounds::<Self>(offset);
23025 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
23026 None => return Err(fidl::Error::NotNullable),
23027 Some(len) => len,
23028 };
23029 if len == 0 {
23031 return Ok(());
23032 };
23033 depth.increment()?;
23034 let envelope_size = 8;
23035 let bytes_len = len * envelope_size;
23036 let offset = decoder.out_of_line_offset(bytes_len)?;
23037 let mut _next_ordinal_to_read = 0;
23039 let mut next_offset = offset;
23040 let end_offset = offset + bytes_len;
23041 _next_ordinal_to_read += 1;
23042 if next_offset >= end_offset {
23043 return Ok(());
23044 }
23045
23046 while _next_ordinal_to_read < 1 {
23048 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23049 _next_ordinal_to_read += 1;
23050 next_offset += envelope_size;
23051 }
23052
23053 let next_out_of_line = decoder.next_out_of_line();
23054 let handles_before = decoder.remaining_handles();
23055 if let Some((inlined, num_bytes, num_handles)) =
23056 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23057 {
23058 let member_inline_size =
23059 <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
23060 if inlined != (member_inline_size <= 4) {
23061 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23062 }
23063 let inner_offset;
23064 let mut inner_depth = depth.clone();
23065 if inlined {
23066 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23067 inner_offset = next_offset;
23068 } else {
23069 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23070 inner_depth.increment()?;
23071 }
23072 let val_ref = self.rights.get_or_insert_with(|| {
23073 fidl::new_empty!(Operations, fidl::encoding::DefaultFuchsiaResourceDialect)
23074 });
23075 fidl::decode!(
23076 Operations,
23077 fidl::encoding::DefaultFuchsiaResourceDialect,
23078 val_ref,
23079 decoder,
23080 inner_offset,
23081 inner_depth
23082 )?;
23083 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23084 {
23085 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23086 }
23087 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23088 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23089 }
23090 }
23091
23092 next_offset += envelope_size;
23093
23094 while next_offset < end_offset {
23096 _next_ordinal_to_read += 1;
23097 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23098 next_offset += envelope_size;
23099 }
23100
23101 Ok(())
23102 }
23103 }
23104
23105 impl FileInfo {
23106 #[inline(always)]
23107 fn max_ordinal_present(&self) -> u64 {
23108 if let Some(_) = self.attributes {
23109 return 4;
23110 }
23111 if let Some(_) = self.stream {
23112 return 3;
23113 }
23114 if let Some(_) = self.observer {
23115 return 2;
23116 }
23117 if let Some(_) = self.is_append {
23118 return 1;
23119 }
23120 0
23121 }
23122 }
23123
23124 impl fidl::encoding::ResourceTypeMarker for FileInfo {
23125 type Borrowed<'a> = &'a mut Self;
23126 fn take_or_borrow<'a>(
23127 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23128 ) -> Self::Borrowed<'a> {
23129 value
23130 }
23131 }
23132
23133 unsafe impl fidl::encoding::TypeMarker for FileInfo {
23134 type Owned = Self;
23135
23136 #[inline(always)]
23137 fn inline_align(_context: fidl::encoding::Context) -> usize {
23138 8
23139 }
23140
23141 #[inline(always)]
23142 fn inline_size(_context: fidl::encoding::Context) -> usize {
23143 16
23144 }
23145 }
23146
23147 unsafe impl fidl::encoding::Encode<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
23148 for &mut FileInfo
23149 {
23150 unsafe fn encode(
23151 self,
23152 encoder: &mut fidl::encoding::Encoder<
23153 '_,
23154 fidl::encoding::DefaultFuchsiaResourceDialect,
23155 >,
23156 offset: usize,
23157 mut depth: fidl::encoding::Depth,
23158 ) -> fidl::Result<()> {
23159 encoder.debug_check_bounds::<FileInfo>(offset);
23160 let max_ordinal: u64 = self.max_ordinal_present();
23162 encoder.write_num(max_ordinal, offset);
23163 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
23164 if max_ordinal == 0 {
23166 return Ok(());
23167 }
23168 depth.increment()?;
23169 let envelope_size = 8;
23170 let bytes_len = max_ordinal as usize * envelope_size;
23171 #[allow(unused_variables)]
23172 let offset = encoder.out_of_line_offset(bytes_len);
23173 let mut _prev_end_offset: usize = 0;
23174 if 1 > max_ordinal {
23175 return Ok(());
23176 }
23177
23178 let cur_offset: usize = (1 - 1) * envelope_size;
23181
23182 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23184
23185 fidl::encoding::encode_in_envelope_optional::<
23190 bool,
23191 fidl::encoding::DefaultFuchsiaResourceDialect,
23192 >(
23193 self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
23194 encoder,
23195 offset + cur_offset,
23196 depth,
23197 )?;
23198
23199 _prev_end_offset = cur_offset + envelope_size;
23200 if 2 > max_ordinal {
23201 return Ok(());
23202 }
23203
23204 let cur_offset: usize = (2 - 1) * envelope_size;
23207
23208 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23210
23211 fidl::encoding::encode_in_envelope_optional::<
23216 fidl::encoding::HandleType<
23217 fidl::Event,
23218 { fidl::ObjectType::EVENT.into_raw() },
23219 2147483648,
23220 >,
23221 fidl::encoding::DefaultFuchsiaResourceDialect,
23222 >(
23223 self.observer.as_mut().map(
23224 <fidl::encoding::HandleType<
23225 fidl::Event,
23226 { fidl::ObjectType::EVENT.into_raw() },
23227 2147483648,
23228 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
23229 ),
23230 encoder,
23231 offset + cur_offset,
23232 depth,
23233 )?;
23234
23235 _prev_end_offset = cur_offset + envelope_size;
23236 if 3 > max_ordinal {
23237 return Ok(());
23238 }
23239
23240 let cur_offset: usize = (3 - 1) * envelope_size;
23243
23244 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23246
23247 fidl::encoding::encode_in_envelope_optional::<
23252 fidl::encoding::HandleType<
23253 fidl::Stream,
23254 { fidl::ObjectType::STREAM.into_raw() },
23255 2147483648,
23256 >,
23257 fidl::encoding::DefaultFuchsiaResourceDialect,
23258 >(
23259 self.stream.as_mut().map(
23260 <fidl::encoding::HandleType<
23261 fidl::Stream,
23262 { fidl::ObjectType::STREAM.into_raw() },
23263 2147483648,
23264 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
23265 ),
23266 encoder,
23267 offset + cur_offset,
23268 depth,
23269 )?;
23270
23271 _prev_end_offset = cur_offset + envelope_size;
23272 if 4 > max_ordinal {
23273 return Ok(());
23274 }
23275
23276 let cur_offset: usize = (4 - 1) * envelope_size;
23279
23280 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23282
23283 fidl::encoding::encode_in_envelope_optional::<
23288 NodeAttributes2,
23289 fidl::encoding::DefaultFuchsiaResourceDialect,
23290 >(
23291 self.attributes
23292 .as_ref()
23293 .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
23294 encoder,
23295 offset + cur_offset,
23296 depth,
23297 )?;
23298
23299 _prev_end_offset = cur_offset + envelope_size;
23300
23301 Ok(())
23302 }
23303 }
23304
23305 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {
23306 #[inline(always)]
23307 fn new_empty() -> Self {
23308 Self::default()
23309 }
23310
23311 unsafe fn decode(
23312 &mut self,
23313 decoder: &mut fidl::encoding::Decoder<
23314 '_,
23315 fidl::encoding::DefaultFuchsiaResourceDialect,
23316 >,
23317 offset: usize,
23318 mut depth: fidl::encoding::Depth,
23319 ) -> fidl::Result<()> {
23320 decoder.debug_check_bounds::<Self>(offset);
23321 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
23322 None => return Err(fidl::Error::NotNullable),
23323 Some(len) => len,
23324 };
23325 if len == 0 {
23327 return Ok(());
23328 };
23329 depth.increment()?;
23330 let envelope_size = 8;
23331 let bytes_len = len * envelope_size;
23332 let offset = decoder.out_of_line_offset(bytes_len)?;
23333 let mut _next_ordinal_to_read = 0;
23335 let mut next_offset = offset;
23336 let end_offset = offset + bytes_len;
23337 _next_ordinal_to_read += 1;
23338 if next_offset >= end_offset {
23339 return Ok(());
23340 }
23341
23342 while _next_ordinal_to_read < 1 {
23344 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23345 _next_ordinal_to_read += 1;
23346 next_offset += envelope_size;
23347 }
23348
23349 let next_out_of_line = decoder.next_out_of_line();
23350 let handles_before = decoder.remaining_handles();
23351 if let Some((inlined, num_bytes, num_handles)) =
23352 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23353 {
23354 let member_inline_size =
23355 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
23356 if inlined != (member_inline_size <= 4) {
23357 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23358 }
23359 let inner_offset;
23360 let mut inner_depth = depth.clone();
23361 if inlined {
23362 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23363 inner_offset = next_offset;
23364 } else {
23365 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23366 inner_depth.increment()?;
23367 }
23368 let val_ref = self.is_append.get_or_insert_with(|| {
23369 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
23370 });
23371 fidl::decode!(
23372 bool,
23373 fidl::encoding::DefaultFuchsiaResourceDialect,
23374 val_ref,
23375 decoder,
23376 inner_offset,
23377 inner_depth
23378 )?;
23379 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23380 {
23381 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23382 }
23383 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23384 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23385 }
23386 }
23387
23388 next_offset += envelope_size;
23389 _next_ordinal_to_read += 1;
23390 if next_offset >= end_offset {
23391 return Ok(());
23392 }
23393
23394 while _next_ordinal_to_read < 2 {
23396 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23397 _next_ordinal_to_read += 1;
23398 next_offset += envelope_size;
23399 }
23400
23401 let next_out_of_line = decoder.next_out_of_line();
23402 let handles_before = decoder.remaining_handles();
23403 if let Some((inlined, num_bytes, num_handles)) =
23404 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23405 {
23406 let member_inline_size = <fidl::encoding::HandleType<
23407 fidl::Event,
23408 { fidl::ObjectType::EVENT.into_raw() },
23409 2147483648,
23410 > as fidl::encoding::TypeMarker>::inline_size(
23411 decoder.context
23412 );
23413 if inlined != (member_inline_size <= 4) {
23414 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23415 }
23416 let inner_offset;
23417 let mut inner_depth = depth.clone();
23418 if inlined {
23419 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23420 inner_offset = next_offset;
23421 } else {
23422 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23423 inner_depth.increment()?;
23424 }
23425 let val_ref =
23426 self.observer.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
23427 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
23428 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23429 {
23430 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23431 }
23432 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23433 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23434 }
23435 }
23436
23437 next_offset += envelope_size;
23438 _next_ordinal_to_read += 1;
23439 if next_offset >= end_offset {
23440 return Ok(());
23441 }
23442
23443 while _next_ordinal_to_read < 3 {
23445 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23446 _next_ordinal_to_read += 1;
23447 next_offset += envelope_size;
23448 }
23449
23450 let next_out_of_line = decoder.next_out_of_line();
23451 let handles_before = decoder.remaining_handles();
23452 if let Some((inlined, num_bytes, num_handles)) =
23453 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23454 {
23455 let member_inline_size = <fidl::encoding::HandleType<
23456 fidl::Stream,
23457 { fidl::ObjectType::STREAM.into_raw() },
23458 2147483648,
23459 > as fidl::encoding::TypeMarker>::inline_size(
23460 decoder.context
23461 );
23462 if inlined != (member_inline_size <= 4) {
23463 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23464 }
23465 let inner_offset;
23466 let mut inner_depth = depth.clone();
23467 if inlined {
23468 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23469 inner_offset = next_offset;
23470 } else {
23471 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23472 inner_depth.increment()?;
23473 }
23474 let val_ref =
23475 self.stream.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
23476 fidl::decode!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
23477 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23478 {
23479 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23480 }
23481 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23482 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23483 }
23484 }
23485
23486 next_offset += envelope_size;
23487 _next_ordinal_to_read += 1;
23488 if next_offset >= end_offset {
23489 return Ok(());
23490 }
23491
23492 while _next_ordinal_to_read < 4 {
23494 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23495 _next_ordinal_to_read += 1;
23496 next_offset += envelope_size;
23497 }
23498
23499 let next_out_of_line = decoder.next_out_of_line();
23500 let handles_before = decoder.remaining_handles();
23501 if let Some((inlined, num_bytes, num_handles)) =
23502 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23503 {
23504 let member_inline_size =
23505 <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
23506 if inlined != (member_inline_size <= 4) {
23507 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23508 }
23509 let inner_offset;
23510 let mut inner_depth = depth.clone();
23511 if inlined {
23512 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23513 inner_offset = next_offset;
23514 } else {
23515 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23516 inner_depth.increment()?;
23517 }
23518 let val_ref = self.attributes.get_or_insert_with(|| {
23519 fidl::new_empty!(NodeAttributes2, fidl::encoding::DefaultFuchsiaResourceDialect)
23520 });
23521 fidl::decode!(
23522 NodeAttributes2,
23523 fidl::encoding::DefaultFuchsiaResourceDialect,
23524 val_ref,
23525 decoder,
23526 inner_offset,
23527 inner_depth
23528 )?;
23529 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23530 {
23531 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23532 }
23533 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23534 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23535 }
23536 }
23537
23538 next_offset += envelope_size;
23539
23540 while next_offset < end_offset {
23542 _next_ordinal_to_read += 1;
23543 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23544 next_offset += envelope_size;
23545 }
23546
23547 Ok(())
23548 }
23549 }
23550
23551 impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
23552 type Borrowed<'a> = &'a mut Self;
23553 fn take_or_borrow<'a>(
23554 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23555 ) -> Self::Borrowed<'a> {
23556 value
23557 }
23558 }
23559
23560 unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
23561 type Owned = Self;
23562
23563 #[inline(always)]
23564 fn inline_align(_context: fidl::encoding::Context) -> usize {
23565 8
23566 }
23567
23568 #[inline(always)]
23569 fn inline_size(_context: fidl::encoding::Context) -> usize {
23570 16
23571 }
23572 }
23573
23574 unsafe impl
23575 fidl::encoding::Encode<
23576 ExtendedAttributeValue,
23577 fidl::encoding::DefaultFuchsiaResourceDialect,
23578 > for &mut ExtendedAttributeValue
23579 {
23580 #[inline]
23581 unsafe fn encode(
23582 self,
23583 encoder: &mut fidl::encoding::Encoder<
23584 '_,
23585 fidl::encoding::DefaultFuchsiaResourceDialect,
23586 >,
23587 offset: usize,
23588 _depth: fidl::encoding::Depth,
23589 ) -> fidl::Result<()> {
23590 encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
23591 encoder.write_num::<u64>(self.ordinal(), offset);
23592 match self {
23593 ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
23594 fidl::encoding::Vector<u8, 32768>,
23595 fidl::encoding::DefaultFuchsiaResourceDialect,
23596 >(
23597 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
23598 val,
23599 ),
23600 encoder,
23601 offset + 8,
23602 _depth,
23603 ),
23604 ExtendedAttributeValue::Buffer(ref mut val) => {
23605 fidl::encoding::encode_in_envelope::<
23606 fidl::encoding::HandleType<
23607 fidl::Vmo,
23608 { fidl::ObjectType::VMO.into_raw() },
23609 2147483648,
23610 >,
23611 fidl::encoding::DefaultFuchsiaResourceDialect,
23612 >(
23613 <fidl::encoding::HandleType<
23614 fidl::Vmo,
23615 { fidl::ObjectType::VMO.into_raw() },
23616 2147483648,
23617 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
23618 val
23619 ),
23620 encoder,
23621 offset + 8,
23622 _depth,
23623 )
23624 }
23625 ExtendedAttributeValue::__SourceBreaking { .. } => {
23626 Err(fidl::Error::UnknownUnionTag)
23627 }
23628 }
23629 }
23630 }
23631
23632 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23633 for ExtendedAttributeValue
23634 {
23635 #[inline(always)]
23636 fn new_empty() -> Self {
23637 Self::__SourceBreaking { unknown_ordinal: 0 }
23638 }
23639
23640 #[inline]
23641 unsafe fn decode(
23642 &mut self,
23643 decoder: &mut fidl::encoding::Decoder<
23644 '_,
23645 fidl::encoding::DefaultFuchsiaResourceDialect,
23646 >,
23647 offset: usize,
23648 mut depth: fidl::encoding::Depth,
23649 ) -> fidl::Result<()> {
23650 decoder.debug_check_bounds::<Self>(offset);
23651 #[allow(unused_variables)]
23652 let next_out_of_line = decoder.next_out_of_line();
23653 let handles_before = decoder.remaining_handles();
23654 let (ordinal, inlined, num_bytes, num_handles) =
23655 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
23656
23657 let member_inline_size = match ordinal {
23658 1 => {
23659 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
23660 decoder.context,
23661 )
23662 }
23663 2 => <fidl::encoding::HandleType<
23664 fidl::Vmo,
23665 { fidl::ObjectType::VMO.into_raw() },
23666 2147483648,
23667 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23668 0 => return Err(fidl::Error::UnknownUnionTag),
23669 _ => num_bytes as usize,
23670 };
23671
23672 if inlined != (member_inline_size <= 4) {
23673 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23674 }
23675 let _inner_offset;
23676 if inlined {
23677 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
23678 _inner_offset = offset + 8;
23679 } else {
23680 depth.increment()?;
23681 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23682 }
23683 match ordinal {
23684 1 => {
23685 #[allow(irrefutable_let_patterns)]
23686 if let ExtendedAttributeValue::Bytes(_) = self {
23687 } else {
23689 *self = ExtendedAttributeValue::Bytes(
23691 fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect),
23692 );
23693 }
23694 #[allow(irrefutable_let_patterns)]
23695 if let ExtendedAttributeValue::Bytes(ref mut val) = self {
23696 fidl::decode!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
23697 } else {
23698 unreachable!()
23699 }
23700 }
23701 2 => {
23702 #[allow(irrefutable_let_patterns)]
23703 if let ExtendedAttributeValue::Buffer(_) = self {
23704 } else {
23706 *self = ExtendedAttributeValue::Buffer(
23708 fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
23709 );
23710 }
23711 #[allow(irrefutable_let_patterns)]
23712 if let ExtendedAttributeValue::Buffer(ref mut val) = self {
23713 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
23714 } else {
23715 unreachable!()
23716 }
23717 }
23718 #[allow(deprecated)]
23719 ordinal => {
23720 for _ in 0..num_handles {
23721 decoder.drop_next_handle()?;
23722 }
23723 *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
23724 }
23725 }
23726 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
23727 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23728 }
23729 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23730 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23731 }
23732 Ok(())
23733 }
23734 }
23735
23736 impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
23737 type Borrowed<'a> = &'a mut Self;
23738 fn take_or_borrow<'a>(
23739 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23740 ) -> Self::Borrowed<'a> {
23741 value
23742 }
23743 }
23744
23745 unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
23746 type Owned = Self;
23747
23748 #[inline(always)]
23749 fn inline_align(_context: fidl::encoding::Context) -> usize {
23750 8
23751 }
23752
23753 #[inline(always)]
23754 fn inline_size(_context: fidl::encoding::Context) -> usize {
23755 16
23756 }
23757 }
23758
23759 unsafe impl
23760 fidl::encoding::Encode<NodeInfoDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>
23761 for &mut NodeInfoDeprecated
23762 {
23763 #[inline]
23764 unsafe fn encode(
23765 self,
23766 encoder: &mut fidl::encoding::Encoder<
23767 '_,
23768 fidl::encoding::DefaultFuchsiaResourceDialect,
23769 >,
23770 offset: usize,
23771 _depth: fidl::encoding::Depth,
23772 ) -> fidl::Result<()> {
23773 encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
23774 encoder.write_num::<u64>(self.ordinal(), offset);
23775 match self {
23776 NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
23777 Service,
23778 fidl::encoding::DefaultFuchsiaResourceDialect,
23779 >(
23780 <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
23781 encoder,
23782 offset + 8,
23783 _depth,
23784 ),
23785 NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
23786 FileObject,
23787 fidl::encoding::DefaultFuchsiaResourceDialect,
23788 >(
23789 <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
23790 encoder,
23791 offset + 8,
23792 _depth,
23793 ),
23794 NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
23795 DirectoryObject,
23796 fidl::encoding::DefaultFuchsiaResourceDialect,
23797 >(
23798 <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
23799 encoder,
23800 offset + 8,
23801 _depth,
23802 ),
23803 NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
23804 SymlinkObject,
23805 fidl::encoding::DefaultFuchsiaResourceDialect,
23806 >(
23807 <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
23808 encoder,
23809 offset + 8,
23810 _depth,
23811 ),
23812 }
23813 }
23814 }
23815
23816 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23817 for NodeInfoDeprecated
23818 {
23819 #[inline(always)]
23820 fn new_empty() -> Self {
23821 Self::Service(fidl::new_empty!(Service, fidl::encoding::DefaultFuchsiaResourceDialect))
23822 }
23823
23824 #[inline]
23825 unsafe fn decode(
23826 &mut self,
23827 decoder: &mut fidl::encoding::Decoder<
23828 '_,
23829 fidl::encoding::DefaultFuchsiaResourceDialect,
23830 >,
23831 offset: usize,
23832 mut depth: fidl::encoding::Depth,
23833 ) -> fidl::Result<()> {
23834 decoder.debug_check_bounds::<Self>(offset);
23835 #[allow(unused_variables)]
23836 let next_out_of_line = decoder.next_out_of_line();
23837 let handles_before = decoder.remaining_handles();
23838 let (ordinal, inlined, num_bytes, num_handles) =
23839 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
23840
23841 let member_inline_size = match ordinal {
23842 1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23843 2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23844 3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23845 4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23846 _ => return Err(fidl::Error::UnknownUnionTag),
23847 };
23848
23849 if inlined != (member_inline_size <= 4) {
23850 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23851 }
23852 let _inner_offset;
23853 if inlined {
23854 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
23855 _inner_offset = offset + 8;
23856 } else {
23857 depth.increment()?;
23858 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23859 }
23860 match ordinal {
23861 1 => {
23862 #[allow(irrefutable_let_patterns)]
23863 if let NodeInfoDeprecated::Service(_) = self {
23864 } else {
23866 *self = NodeInfoDeprecated::Service(fidl::new_empty!(
23868 Service,
23869 fidl::encoding::DefaultFuchsiaResourceDialect
23870 ));
23871 }
23872 #[allow(irrefutable_let_patterns)]
23873 if let NodeInfoDeprecated::Service(ref mut val) = self {
23874 fidl::decode!(
23875 Service,
23876 fidl::encoding::DefaultFuchsiaResourceDialect,
23877 val,
23878 decoder,
23879 _inner_offset,
23880 depth
23881 )?;
23882 } else {
23883 unreachable!()
23884 }
23885 }
23886 2 => {
23887 #[allow(irrefutable_let_patterns)]
23888 if let NodeInfoDeprecated::File(_) = self {
23889 } else {
23891 *self = NodeInfoDeprecated::File(fidl::new_empty!(
23893 FileObject,
23894 fidl::encoding::DefaultFuchsiaResourceDialect
23895 ));
23896 }
23897 #[allow(irrefutable_let_patterns)]
23898 if let NodeInfoDeprecated::File(ref mut val) = self {
23899 fidl::decode!(
23900 FileObject,
23901 fidl::encoding::DefaultFuchsiaResourceDialect,
23902 val,
23903 decoder,
23904 _inner_offset,
23905 depth
23906 )?;
23907 } else {
23908 unreachable!()
23909 }
23910 }
23911 3 => {
23912 #[allow(irrefutable_let_patterns)]
23913 if let NodeInfoDeprecated::Directory(_) = self {
23914 } else {
23916 *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
23918 DirectoryObject,
23919 fidl::encoding::DefaultFuchsiaResourceDialect
23920 ));
23921 }
23922 #[allow(irrefutable_let_patterns)]
23923 if let NodeInfoDeprecated::Directory(ref mut val) = self {
23924 fidl::decode!(
23925 DirectoryObject,
23926 fidl::encoding::DefaultFuchsiaResourceDialect,
23927 val,
23928 decoder,
23929 _inner_offset,
23930 depth
23931 )?;
23932 } else {
23933 unreachable!()
23934 }
23935 }
23936 4 => {
23937 #[allow(irrefutable_let_patterns)]
23938 if let NodeInfoDeprecated::Symlink(_) = self {
23939 } else {
23941 *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
23943 SymlinkObject,
23944 fidl::encoding::DefaultFuchsiaResourceDialect
23945 ));
23946 }
23947 #[allow(irrefutable_let_patterns)]
23948 if let NodeInfoDeprecated::Symlink(ref mut val) = self {
23949 fidl::decode!(
23950 SymlinkObject,
23951 fidl::encoding::DefaultFuchsiaResourceDialect,
23952 val,
23953 decoder,
23954 _inner_offset,
23955 depth
23956 )?;
23957 } else {
23958 unreachable!()
23959 }
23960 }
23961 ordinal => panic!("unexpected ordinal {:?}", ordinal),
23962 }
23963 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
23964 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23965 }
23966 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23967 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23968 }
23969 Ok(())
23970 }
23971 }
23972
23973 impl fidl::encoding::ResourceTypeMarker for Representation {
23974 type Borrowed<'a> = &'a mut Self;
23975 fn take_or_borrow<'a>(
23976 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23977 ) -> Self::Borrowed<'a> {
23978 value
23979 }
23980 }
23981
23982 unsafe impl fidl::encoding::TypeMarker for Representation {
23983 type Owned = Self;
23984
23985 #[inline(always)]
23986 fn inline_align(_context: fidl::encoding::Context) -> usize {
23987 8
23988 }
23989
23990 #[inline(always)]
23991 fn inline_size(_context: fidl::encoding::Context) -> usize {
23992 16
23993 }
23994 }
23995
23996 unsafe impl
23997 fidl::encoding::Encode<Representation, fidl::encoding::DefaultFuchsiaResourceDialect>
23998 for &mut Representation
23999 {
24000 #[inline]
24001 unsafe fn encode(
24002 self,
24003 encoder: &mut fidl::encoding::Encoder<
24004 '_,
24005 fidl::encoding::DefaultFuchsiaResourceDialect,
24006 >,
24007 offset: usize,
24008 _depth: fidl::encoding::Depth,
24009 ) -> fidl::Result<()> {
24010 encoder.debug_check_bounds::<Representation>(offset);
24011 encoder.write_num::<u64>(self.ordinal(), offset);
24012 match self {
24013 Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
24014 NodeInfo,
24015 fidl::encoding::DefaultFuchsiaResourceDialect,
24016 >(
24017 <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
24018 encoder,
24019 offset + 8,
24020 _depth,
24021 ),
24022 Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
24023 DirectoryInfo,
24024 fidl::encoding::DefaultFuchsiaResourceDialect,
24025 >(
24026 <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
24027 encoder,
24028 offset + 8,
24029 _depth,
24030 ),
24031 Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
24032 FileInfo,
24033 fidl::encoding::DefaultFuchsiaResourceDialect,
24034 >(
24035 <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
24036 encoder,
24037 offset + 8,
24038 _depth,
24039 ),
24040 Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
24041 SymlinkInfo,
24042 fidl::encoding::DefaultFuchsiaResourceDialect,
24043 >(
24044 <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
24045 encoder,
24046 offset + 8,
24047 _depth,
24048 ),
24049 Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
24050 }
24051 }
24052 }
24053
24054 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
24055 for Representation
24056 {
24057 #[inline(always)]
24058 fn new_empty() -> Self {
24059 Self::__SourceBreaking { unknown_ordinal: 0 }
24060 }
24061
24062 #[inline]
24063 unsafe fn decode(
24064 &mut self,
24065 decoder: &mut fidl::encoding::Decoder<
24066 '_,
24067 fidl::encoding::DefaultFuchsiaResourceDialect,
24068 >,
24069 offset: usize,
24070 mut depth: fidl::encoding::Depth,
24071 ) -> fidl::Result<()> {
24072 decoder.debug_check_bounds::<Self>(offset);
24073 #[allow(unused_variables)]
24074 let next_out_of_line = decoder.next_out_of_line();
24075 let handles_before = decoder.remaining_handles();
24076 let (ordinal, inlined, num_bytes, num_handles) =
24077 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
24078
24079 let member_inline_size = match ordinal {
24080 1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24081 2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24082 3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24083 4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24084 0 => return Err(fidl::Error::UnknownUnionTag),
24085 _ => num_bytes as usize,
24086 };
24087
24088 if inlined != (member_inline_size <= 4) {
24089 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24090 }
24091 let _inner_offset;
24092 if inlined {
24093 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
24094 _inner_offset = offset + 8;
24095 } else {
24096 depth.increment()?;
24097 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24098 }
24099 match ordinal {
24100 1 => {
24101 #[allow(irrefutable_let_patterns)]
24102 if let Representation::Node(_) = self {
24103 } else {
24105 *self = Representation::Node(fidl::new_empty!(
24107 NodeInfo,
24108 fidl::encoding::DefaultFuchsiaResourceDialect
24109 ));
24110 }
24111 #[allow(irrefutable_let_patterns)]
24112 if let Representation::Node(ref mut val) = self {
24113 fidl::decode!(
24114 NodeInfo,
24115 fidl::encoding::DefaultFuchsiaResourceDialect,
24116 val,
24117 decoder,
24118 _inner_offset,
24119 depth
24120 )?;
24121 } else {
24122 unreachable!()
24123 }
24124 }
24125 2 => {
24126 #[allow(irrefutable_let_patterns)]
24127 if let Representation::Directory(_) = self {
24128 } else {
24130 *self = Representation::Directory(fidl::new_empty!(
24132 DirectoryInfo,
24133 fidl::encoding::DefaultFuchsiaResourceDialect
24134 ));
24135 }
24136 #[allow(irrefutable_let_patterns)]
24137 if let Representation::Directory(ref mut val) = self {
24138 fidl::decode!(
24139 DirectoryInfo,
24140 fidl::encoding::DefaultFuchsiaResourceDialect,
24141 val,
24142 decoder,
24143 _inner_offset,
24144 depth
24145 )?;
24146 } else {
24147 unreachable!()
24148 }
24149 }
24150 3 => {
24151 #[allow(irrefutable_let_patterns)]
24152 if let Representation::File(_) = self {
24153 } else {
24155 *self = Representation::File(fidl::new_empty!(
24157 FileInfo,
24158 fidl::encoding::DefaultFuchsiaResourceDialect
24159 ));
24160 }
24161 #[allow(irrefutable_let_patterns)]
24162 if let Representation::File(ref mut val) = self {
24163 fidl::decode!(
24164 FileInfo,
24165 fidl::encoding::DefaultFuchsiaResourceDialect,
24166 val,
24167 decoder,
24168 _inner_offset,
24169 depth
24170 )?;
24171 } else {
24172 unreachable!()
24173 }
24174 }
24175 4 => {
24176 #[allow(irrefutable_let_patterns)]
24177 if let Representation::Symlink(_) = self {
24178 } else {
24180 *self = Representation::Symlink(fidl::new_empty!(
24182 SymlinkInfo,
24183 fidl::encoding::DefaultFuchsiaResourceDialect
24184 ));
24185 }
24186 #[allow(irrefutable_let_patterns)]
24187 if let Representation::Symlink(ref mut val) = self {
24188 fidl::decode!(
24189 SymlinkInfo,
24190 fidl::encoding::DefaultFuchsiaResourceDialect,
24191 val,
24192 decoder,
24193 _inner_offset,
24194 depth
24195 )?;
24196 } else {
24197 unreachable!()
24198 }
24199 }
24200 #[allow(deprecated)]
24201 ordinal => {
24202 for _ in 0..num_handles {
24203 decoder.drop_next_handle()?;
24204 }
24205 *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
24206 }
24207 }
24208 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
24209 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24210 }
24211 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24212 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24213 }
24214 Ok(())
24215 }
24216 }
24217}