1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_io__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14pub type Token = fidl::Event;
17
18#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19pub struct DirectoryCreateSymlinkRequest {
20 pub name: String,
21 pub target: Vec<u8>,
22 pub connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
23}
24
25impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
26 for DirectoryCreateSymlinkRequest
27{
28}
29
30#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31pub struct DirectoryDeprecatedOpenRequest {
32 pub flags: OpenFlags,
33 pub mode: ModeType,
34 pub path: String,
35 pub object: fidl::endpoints::ServerEnd<NodeMarker>,
36}
37
38impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
39 for DirectoryDeprecatedOpenRequest
40{
41}
42
43#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44pub struct DirectoryGetTokenResponse {
45 pub s: i32,
46 pub token: Option<fidl::Handle>,
47}
48
49impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryGetTokenResponse {}
50
51#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
52pub struct DirectoryLinkRequest {
53 pub src: String,
54 pub dst_parent_token: fidl::Handle,
55 pub dst: String,
56}
57
58impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryLinkRequest {}
59
60#[derive(Debug, PartialEq)]
61pub struct DirectoryOpenRequest {
62 pub path: String,
63 pub flags: Flags,
64 pub options: Options,
65 pub object: fidl::Channel,
66}
67
68impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryOpenRequest {}
69
70#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
71pub struct DirectoryRenameRequest {
72 pub src: String,
73 pub dst_parent_token: fidl::Event,
74 pub dst: String,
75}
76
77impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryRenameRequest {}
78
79#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
80pub struct DirectoryWatchRequest {
81 pub mask: WatchMask,
82 pub options: u32,
83 pub watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
84}
85
86impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryWatchRequest {}
87
88#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
89pub struct FileAllocateRequest {
90 pub offset: u64,
91 pub length: u64,
92 pub mode: AllocateMode,
97}
98
99impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileAllocateRequest {}
100
101#[derive(Debug, PartialEq)]
102pub struct FileEnableVerityRequest {
103 pub options: VerificationOptions,
104}
105
106impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileEnableVerityRequest {}
107
108#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
109pub struct FileObject {
110 pub event: Option<fidl::Event>,
117 pub stream: Option<fidl::Stream>,
121}
122
123impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {}
124
125#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
126pub struct FileGetBackingMemoryResponse {
127 pub vmo: fidl::Vmo,
128}
129
130impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
131 for FileGetBackingMemoryResponse
132{
133}
134
135#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
136pub struct LinkableLinkIntoRequest {
137 pub dst_parent_token: fidl::Event,
138 pub dst: String,
139}
140
141impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for LinkableLinkIntoRequest {}
142
143#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
144pub struct NodeDeprecatedCloneRequest {
145 pub flags: OpenFlags,
146 pub object: fidl::endpoints::ServerEnd<NodeMarker>,
147}
148
149impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
150 for NodeDeprecatedCloneRequest
151{
152}
153
154#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
155pub struct NodeListExtendedAttributesRequest {
156 pub iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
157}
158
159impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
160 for NodeListExtendedAttributesRequest
161{
162}
163
164#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
165pub struct NodeOnOpenRequest {
166 pub s: i32,
167 pub info: Option<Box<NodeInfoDeprecated>>,
168}
169
170impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeOnOpenRequest {}
171
172#[derive(Debug, PartialEq)]
173pub struct NodeSetExtendedAttributeRequest {
174 pub name: Vec<u8>,
175 pub value: ExtendedAttributeValue,
176 pub mode: SetExtendedAttributeMode,
178}
179
180impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
181 for NodeSetExtendedAttributeRequest
182{
183}
184
185#[derive(Debug, Default, PartialEq)]
186pub struct ConnectionInfo {
187 pub rights: Option<Operations>,
194 #[doc(hidden)]
195 pub __source_breaking: fidl::marker::SourceBreaking,
196}
197
198impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ConnectionInfo {}
199
200#[derive(Debug, Default, PartialEq)]
202pub struct FileInfo {
203 pub is_append: Option<bool>,
207 pub observer: Option<fidl::Event>,
220 pub stream: Option<fidl::Stream>,
227 pub attributes: Option<NodeAttributes2>,
229 #[doc(hidden)]
230 pub __source_breaking: fidl::marker::SourceBreaking,
231}
232
233impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {}
234
235#[derive(Debug)]
239pub enum ExtendedAttributeValue {
240 Bytes(Vec<u8>),
241 Buffer(fidl::Vmo),
242 #[doc(hidden)]
243 __SourceBreaking {
244 unknown_ordinal: u64,
245 },
246}
247
248#[macro_export]
250macro_rules! ExtendedAttributeValueUnknown {
251 () => {
252 _
253 };
254}
255
256impl PartialEq for ExtendedAttributeValue {
258 fn eq(&self, other: &Self) -> bool {
259 match (self, other) {
260 (Self::Bytes(x), Self::Bytes(y)) => *x == *y,
261 (Self::Buffer(x), Self::Buffer(y)) => *x == *y,
262 _ => false,
263 }
264 }
265}
266
267impl ExtendedAttributeValue {
268 #[inline]
269 pub fn ordinal(&self) -> u64 {
270 match *self {
271 Self::Bytes(_) => 1,
272 Self::Buffer(_) => 2,
273 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
274 }
275 }
276
277 #[inline]
278 pub fn unknown_variant_for_testing() -> Self {
279 Self::__SourceBreaking { unknown_ordinal: 0 }
280 }
281
282 #[inline]
283 pub fn is_unknown(&self) -> bool {
284 match self {
285 Self::__SourceBreaking { .. } => true,
286 _ => false,
287 }
288 }
289}
290
291impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ExtendedAttributeValue {}
292
293#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
294pub enum NodeInfoDeprecated {
295 Service(Service),
297 File(FileObject),
299 Directory(DirectoryObject),
301 Symlink(SymlinkObject),
303}
304
305impl NodeInfoDeprecated {
306 #[inline]
307 pub fn ordinal(&self) -> u64 {
308 match *self {
309 Self::Service(_) => 1,
310 Self::File(_) => 2,
311 Self::Directory(_) => 3,
312 Self::Symlink(_) => 4,
313 }
314 }
315}
316
317impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeInfoDeprecated {}
318
319#[derive(Debug)]
320pub enum Representation {
321 Node(NodeInfo),
323 Directory(DirectoryInfo),
325 File(FileInfo),
327 Symlink(SymlinkInfo),
329 #[doc(hidden)]
330 __SourceBreaking { unknown_ordinal: u64 },
331}
332
333#[macro_export]
335macro_rules! RepresentationUnknown {
336 () => {
337 _
338 };
339}
340
341impl PartialEq for Representation {
343 fn eq(&self, other: &Self) -> bool {
344 match (self, other) {
345 (Self::Node(x), Self::Node(y)) => *x == *y,
346 (Self::Directory(x), Self::Directory(y)) => *x == *y,
347 (Self::File(x), Self::File(y)) => *x == *y,
348 (Self::Symlink(x), Self::Symlink(y)) => *x == *y,
349 _ => false,
350 }
351 }
352}
353
354impl Representation {
355 #[inline]
356 pub fn ordinal(&self) -> u64 {
357 match *self {
358 Self::Node(_) => 1,
359 Self::Directory(_) => 2,
360 Self::File(_) => 3,
361 Self::Symlink(_) => 4,
362 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
363 }
364 }
365
366 #[inline]
367 pub fn unknown_variant_for_testing() -> Self {
368 Self::__SourceBreaking { unknown_ordinal: 0 }
369 }
370
371 #[inline]
372 pub fn is_unknown(&self) -> bool {
373 match self {
374 Self::__SourceBreaking { .. } => true,
375 _ => false,
376 }
377 }
378}
379
380impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Representation {}
381
382#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
383pub struct AdvisoryLockingMarker;
384
385impl fidl::endpoints::ProtocolMarker for AdvisoryLockingMarker {
386 type Proxy = AdvisoryLockingProxy;
387 type RequestStream = AdvisoryLockingRequestStream;
388 #[cfg(target_os = "fuchsia")]
389 type SynchronousProxy = AdvisoryLockingSynchronousProxy;
390
391 const DEBUG_NAME: &'static str = "(anonymous) AdvisoryLocking";
392}
393pub type AdvisoryLockingAdvisoryLockResult = Result<(), i32>;
394
395pub trait AdvisoryLockingProxyInterface: Send + Sync {
396 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
397 + Send;
398 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
399}
400#[derive(Debug)]
401#[cfg(target_os = "fuchsia")]
402pub struct AdvisoryLockingSynchronousProxy {
403 client: fidl::client::sync::Client,
404}
405
406#[cfg(target_os = "fuchsia")]
407impl fidl::endpoints::SynchronousProxy for AdvisoryLockingSynchronousProxy {
408 type Proxy = AdvisoryLockingProxy;
409 type Protocol = AdvisoryLockingMarker;
410
411 fn from_channel(inner: fidl::Channel) -> Self {
412 Self::new(inner)
413 }
414
415 fn into_channel(self) -> fidl::Channel {
416 self.client.into_channel()
417 }
418
419 fn as_channel(&self) -> &fidl::Channel {
420 self.client.as_channel()
421 }
422}
423
424#[cfg(target_os = "fuchsia")]
425impl AdvisoryLockingSynchronousProxy {
426 pub fn new(channel: fidl::Channel) -> Self {
427 let protocol_name = <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
428 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
429 }
430
431 pub fn into_channel(self) -> fidl::Channel {
432 self.client.into_channel()
433 }
434
435 pub fn wait_for_event(
438 &self,
439 deadline: zx::MonotonicInstant,
440 ) -> Result<AdvisoryLockingEvent, fidl::Error> {
441 AdvisoryLockingEvent::decode(self.client.wait_for_event(deadline)?)
442 }
443
444 pub fn r#advisory_lock(
468 &self,
469 mut request: &AdvisoryLockRequest,
470 ___deadline: zx::MonotonicInstant,
471 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
472 let _response = self.client.send_query::<
473 AdvisoryLockingAdvisoryLockRequest,
474 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
475 >(
476 (request,),
477 0x6ee9c0ad53ec87aa,
478 fidl::encoding::DynamicFlags::empty(),
479 ___deadline,
480 )?;
481 Ok(_response.map(|x| x))
482 }
483}
484
485#[cfg(target_os = "fuchsia")]
486impl From<AdvisoryLockingSynchronousProxy> for zx::Handle {
487 fn from(value: AdvisoryLockingSynchronousProxy) -> Self {
488 value.into_channel().into()
489 }
490}
491
492#[cfg(target_os = "fuchsia")]
493impl From<fidl::Channel> for AdvisoryLockingSynchronousProxy {
494 fn from(value: fidl::Channel) -> Self {
495 Self::new(value)
496 }
497}
498
499#[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 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
832 self.inner.shutdown_with_epitaph(status)
833 }
834
835 fn is_closed(&self) -> bool {
836 self.inner.channel().is_closed()
837 }
838 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
839 self.inner.channel().on_closed()
840 }
841
842 #[cfg(target_os = "fuchsia")]
843 fn signal_peer(
844 &self,
845 clear_mask: zx::Signals,
846 set_mask: zx::Signals,
847 ) -> Result<(), zx_status::Status> {
848 use fidl::Peered;
849 self.inner.channel().signal_peer(clear_mask, set_mask)
850 }
851}
852
853impl AdvisoryLockingControlHandle {}
854
855#[must_use = "FIDL methods require a response to be sent"]
856#[derive(Debug)]
857pub struct AdvisoryLockingAdvisoryLockResponder {
858 control_handle: std::mem::ManuallyDrop<AdvisoryLockingControlHandle>,
859 tx_id: u32,
860}
861
862impl std::ops::Drop for AdvisoryLockingAdvisoryLockResponder {
866 fn drop(&mut self) {
867 self.control_handle.shutdown();
868 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
870 }
871}
872
873impl fidl::endpoints::Responder for AdvisoryLockingAdvisoryLockResponder {
874 type ControlHandle = AdvisoryLockingControlHandle;
875
876 fn control_handle(&self) -> &AdvisoryLockingControlHandle {
877 &self.control_handle
878 }
879
880 fn drop_without_shutdown(mut self) {
881 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
883 std::mem::forget(self);
885 }
886}
887
888impl AdvisoryLockingAdvisoryLockResponder {
889 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
893 let _result = self.send_raw(result);
894 if _result.is_err() {
895 self.control_handle.shutdown();
896 }
897 self.drop_without_shutdown();
898 _result
899 }
900
901 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
903 let _result = self.send_raw(result);
904 self.drop_without_shutdown();
905 _result
906 }
907
908 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
909 self.control_handle
910 .inner
911 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
912 result,
913 self.tx_id,
914 0x6ee9c0ad53ec87aa,
915 fidl::encoding::DynamicFlags::empty(),
916 )
917 }
918}
919
920#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
921pub struct DirectoryMarker;
922
923impl fidl::endpoints::ProtocolMarker for DirectoryMarker {
924 type Proxy = DirectoryProxy;
925 type RequestStream = DirectoryRequestStream;
926 #[cfg(target_os = "fuchsia")]
927 type SynchronousProxy = DirectorySynchronousProxy;
928
929 const DEBUG_NAME: &'static str = "fuchsia.io.Directory";
930}
931impl fidl::endpoints::DiscoverableProtocolMarker for DirectoryMarker {}
932pub type DirectoryUnlinkResult = Result<(), i32>;
933pub type DirectoryRenameResult = Result<(), i32>;
934pub type DirectoryCreateSymlinkResult = Result<(), i32>;
935
936pub trait DirectoryProxyInterface: Send + Sync {
937 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
938 + Send;
939 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
940 fn r#clone(
941 &self,
942 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
943 ) -> Result<(), fidl::Error>;
944 type CloseResponseFut: std::future::Future<
945 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
946 > + Send;
947 fn r#close(&self) -> Self::CloseResponseFut;
948 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
949 fn r#query(&self) -> Self::QueryResponseFut;
950 fn r#deprecated_clone(
951 &self,
952 flags: OpenFlags,
953 object: fidl::endpoints::ServerEnd<NodeMarker>,
954 ) -> Result<(), fidl::Error>;
955 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
956 + Send;
957 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
958 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
959 fn r#deprecated_set_attr(
960 &self,
961 flags: NodeAttributeFlags,
962 attributes: &NodeAttributes,
963 ) -> Self::DeprecatedSetAttrResponseFut;
964 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
965 + Send;
966 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
967 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
968 + Send;
969 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
970 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
971 + Send;
972 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
973 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
974 + Send;
975 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
976 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
977 + Send;
978 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
979 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
980 + Send;
981 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
982 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
983 + Send;
984 fn r#update_attributes(
985 &self,
986 payload: &MutableNodeAttributes,
987 ) -> Self::UpdateAttributesResponseFut;
988 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
989 fn r#sync(&self) -> Self::SyncResponseFut;
990 fn r#list_extended_attributes(
991 &self,
992 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
993 ) -> Result<(), fidl::Error>;
994 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
995 + Send;
996 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
997 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
998 + Send;
999 fn r#set_extended_attribute(
1000 &self,
1001 name: &[u8],
1002 value: ExtendedAttributeValue,
1003 mode: SetExtendedAttributeMode,
1004 ) -> Self::SetExtendedAttributeResponseFut;
1005 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
1006 + Send;
1007 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
1008 fn r#deprecated_open(
1009 &self,
1010 flags: OpenFlags,
1011 mode: ModeType,
1012 path: &str,
1013 object: fidl::endpoints::ServerEnd<NodeMarker>,
1014 ) -> Result<(), fidl::Error>;
1015 fn r#open(
1016 &self,
1017 path: &str,
1018 flags: Flags,
1019 options: &Options,
1020 object: fidl::Channel,
1021 ) -> Result<(), fidl::Error>;
1022 type ReadDirentsResponseFut: std::future::Future<Output = Result<(i32, Vec<u8>), fidl::Error>>
1023 + Send;
1024 fn r#read_dirents(&self, max_bytes: u64) -> Self::ReadDirentsResponseFut;
1025 type RewindResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1026 fn r#rewind(&self) -> Self::RewindResponseFut;
1027 type GetTokenResponseFut: std::future::Future<Output = Result<(i32, Option<fidl::Handle>), fidl::Error>>
1028 + Send;
1029 fn r#get_token(&self) -> Self::GetTokenResponseFut;
1030 type LinkResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1031 fn r#link(&self, src: &str, dst_parent_token: fidl::Handle, dst: &str)
1032 -> Self::LinkResponseFut;
1033 type UnlinkResponseFut: std::future::Future<Output = Result<DirectoryUnlinkResult, fidl::Error>>
1034 + Send;
1035 fn r#unlink(&self, name: &str, options: &UnlinkOptions) -> Self::UnlinkResponseFut;
1036 type RenameResponseFut: std::future::Future<Output = Result<DirectoryRenameResult, fidl::Error>>
1037 + Send;
1038 fn r#rename(
1039 &self,
1040 src: &str,
1041 dst_parent_token: fidl::Event,
1042 dst: &str,
1043 ) -> Self::RenameResponseFut;
1044 type CreateSymlinkResponseFut: std::future::Future<Output = Result<DirectoryCreateSymlinkResult, fidl::Error>>
1045 + Send;
1046 fn r#create_symlink(
1047 &self,
1048 name: &str,
1049 target: &[u8],
1050 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1051 ) -> Self::CreateSymlinkResponseFut;
1052 type WatchResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1053 fn r#watch(
1054 &self,
1055 mask: WatchMask,
1056 options: u32,
1057 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1058 ) -> Self::WatchResponseFut;
1059}
1060#[derive(Debug)]
1061#[cfg(target_os = "fuchsia")]
1062pub struct DirectorySynchronousProxy {
1063 client: fidl::client::sync::Client,
1064}
1065
1066#[cfg(target_os = "fuchsia")]
1067impl fidl::endpoints::SynchronousProxy for DirectorySynchronousProxy {
1068 type Proxy = DirectoryProxy;
1069 type Protocol = DirectoryMarker;
1070
1071 fn from_channel(inner: fidl::Channel) -> Self {
1072 Self::new(inner)
1073 }
1074
1075 fn into_channel(self) -> fidl::Channel {
1076 self.client.into_channel()
1077 }
1078
1079 fn as_channel(&self) -> &fidl::Channel {
1080 self.client.as_channel()
1081 }
1082}
1083
1084#[cfg(target_os = "fuchsia")]
1085impl DirectorySynchronousProxy {
1086 pub fn new(channel: fidl::Channel) -> Self {
1087 let protocol_name = <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1088 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1089 }
1090
1091 pub fn into_channel(self) -> fidl::Channel {
1092 self.client.into_channel()
1093 }
1094
1095 pub fn wait_for_event(
1098 &self,
1099 deadline: zx::MonotonicInstant,
1100 ) -> Result<DirectoryEvent, fidl::Error> {
1101 DirectoryEvent::decode(self.client.wait_for_event(deadline)?)
1102 }
1103
1104 pub fn r#advisory_lock(
1128 &self,
1129 mut request: &AdvisoryLockRequest,
1130 ___deadline: zx::MonotonicInstant,
1131 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1132 let _response = self.client.send_query::<
1133 AdvisoryLockingAdvisoryLockRequest,
1134 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1135 >(
1136 (request,),
1137 0x6ee9c0ad53ec87aa,
1138 fidl::encoding::DynamicFlags::empty(),
1139 ___deadline,
1140 )?;
1141 Ok(_response.map(|x| x))
1142 }
1143
1144 pub fn r#clone(
1145 &self,
1146 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1147 ) -> Result<(), fidl::Error> {
1148 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
1149 (request,),
1150 0x20d8a7aba2168a79,
1151 fidl::encoding::DynamicFlags::empty(),
1152 )
1153 }
1154
1155 pub fn r#close(
1166 &self,
1167 ___deadline: zx::MonotonicInstant,
1168 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1169 let _response = self.client.send_query::<
1170 fidl::encoding::EmptyPayload,
1171 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1172 >(
1173 (),
1174 0x5ac5d459ad7f657e,
1175 fidl::encoding::DynamicFlags::empty(),
1176 ___deadline,
1177 )?;
1178 Ok(_response.map(|x| x))
1179 }
1180
1181 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
1182 let _response = self.client.send_query::<
1183 fidl::encoding::EmptyPayload,
1184 fidl_fuchsia_unknown::QueryableQueryResponse,
1185 >(
1186 (),
1187 0x2658edee9decfc06,
1188 fidl::encoding::DynamicFlags::empty(),
1189 ___deadline,
1190 )?;
1191 Ok(_response.protocol)
1192 }
1193
1194 pub fn r#deprecated_clone(
1196 &self,
1197 mut flags: OpenFlags,
1198 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1199 ) -> Result<(), fidl::Error> {
1200 self.client.send::<NodeDeprecatedCloneRequest>(
1201 (flags, object),
1202 0x5a61678f293ce16f,
1203 fidl::encoding::DynamicFlags::FLEXIBLE,
1204 )
1205 }
1206
1207 pub fn r#deprecated_get_attr(
1209 &self,
1210 ___deadline: zx::MonotonicInstant,
1211 ) -> Result<(i32, NodeAttributes), fidl::Error> {
1212 let _response =
1213 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
1214 (),
1215 0x78985e216314dafd,
1216 fidl::encoding::DynamicFlags::empty(),
1217 ___deadline,
1218 )?;
1219 Ok((_response.s, _response.attributes))
1220 }
1221
1222 pub fn r#deprecated_set_attr(
1224 &self,
1225 mut flags: NodeAttributeFlags,
1226 mut attributes: &NodeAttributes,
1227 ___deadline: zx::MonotonicInstant,
1228 ) -> Result<i32, fidl::Error> {
1229 let _response =
1230 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
1231 (flags, attributes),
1232 0x4186c0f40d938f46,
1233 fidl::encoding::DynamicFlags::empty(),
1234 ___deadline,
1235 )?;
1236 Ok(_response.s)
1237 }
1238
1239 pub fn r#deprecated_get_flags(
1241 &self,
1242 ___deadline: zx::MonotonicInstant,
1243 ) -> Result<(i32, OpenFlags), fidl::Error> {
1244 let _response = self
1245 .client
1246 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
1247 (),
1248 0x5b88fffb8eda3aa1,
1249 fidl::encoding::DynamicFlags::empty(),
1250 ___deadline,
1251 )?;
1252 Ok((_response.s, _response.flags))
1253 }
1254
1255 pub fn r#deprecated_set_flags(
1257 &self,
1258 mut flags: OpenFlags,
1259 ___deadline: zx::MonotonicInstant,
1260 ) -> Result<i32, fidl::Error> {
1261 let _response = self
1262 .client
1263 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
1264 (flags,),
1265 0x5295b76c71fde733,
1266 fidl::encoding::DynamicFlags::empty(),
1267 ___deadline,
1268 )?;
1269 Ok(_response.s)
1270 }
1271
1272 pub fn r#get_flags(
1281 &self,
1282 ___deadline: zx::MonotonicInstant,
1283 ) -> Result<NodeGetFlagsResult, fidl::Error> {
1284 let _response = self.client.send_query::<
1285 fidl::encoding::EmptyPayload,
1286 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1287 >(
1288 (),
1289 0x176eb318f64ec23,
1290 fidl::encoding::DynamicFlags::FLEXIBLE,
1291 ___deadline,
1292 )?
1293 .into_result::<DirectoryMarker>("get_flags")?;
1294 Ok(_response.map(|x| x.flags))
1295 }
1296
1297 pub fn r#set_flags(
1307 &self,
1308 mut flags: Flags,
1309 ___deadline: zx::MonotonicInstant,
1310 ) -> Result<NodeSetFlagsResult, fidl::Error> {
1311 let _response = self.client.send_query::<
1312 NodeSetFlagsRequest,
1313 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1314 >(
1315 (flags,),
1316 0x55a8028685791ea8,
1317 fidl::encoding::DynamicFlags::FLEXIBLE,
1318 ___deadline,
1319 )?
1320 .into_result::<DirectoryMarker>("set_flags")?;
1321 Ok(_response.map(|x| x))
1322 }
1323
1324 pub fn r#query_filesystem(
1326 &self,
1327 ___deadline: zx::MonotonicInstant,
1328 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1329 let _response =
1330 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
1331 (),
1332 0x6f344a1c6b0a0610,
1333 fidl::encoding::DynamicFlags::empty(),
1334 ___deadline,
1335 )?;
1336 Ok((_response.s, _response.info))
1337 }
1338
1339 pub fn r#get_attributes(
1353 &self,
1354 mut query: NodeAttributesQuery,
1355 ___deadline: zx::MonotonicInstant,
1356 ) -> Result<NodeGetAttributesResult, fidl::Error> {
1357 let _response = self.client.send_query::<
1358 NodeGetAttributesRequest,
1359 fidl::encoding::ResultType<NodeAttributes2, i32>,
1360 >(
1361 (query,),
1362 0x3d4396a638ea053b,
1363 fidl::encoding::DynamicFlags::empty(),
1364 ___deadline,
1365 )?;
1366 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1367 }
1368
1369 pub fn r#update_attributes(
1378 &self,
1379 mut payload: &MutableNodeAttributes,
1380 ___deadline: zx::MonotonicInstant,
1381 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1382 let _response = self.client.send_query::<
1383 MutableNodeAttributes,
1384 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1385 >(
1386 payload,
1387 0x3308c1da5a89bf08,
1388 fidl::encoding::DynamicFlags::empty(),
1389 ___deadline,
1390 )?;
1391 Ok(_response.map(|x| x))
1392 }
1393
1394 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
1404 let _response = self.client.send_query::<
1405 fidl::encoding::EmptyPayload,
1406 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1407 >(
1408 (),
1409 0x2c5c27ca0ab5dc49,
1410 fidl::encoding::DynamicFlags::empty(),
1411 ___deadline,
1412 )?;
1413 Ok(_response.map(|x| x))
1414 }
1415
1416 pub fn r#list_extended_attributes(
1425 &self,
1426 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
1427 ) -> Result<(), fidl::Error> {
1428 self.client.send::<NodeListExtendedAttributesRequest>(
1429 (iterator,),
1430 0x4b61033de007fcd0,
1431 fidl::encoding::DynamicFlags::empty(),
1432 )
1433 }
1434
1435 pub fn r#get_extended_attribute(
1442 &self,
1443 mut name: &[u8],
1444 ___deadline: zx::MonotonicInstant,
1445 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1446 let _response = self.client.send_query::<
1447 NodeGetExtendedAttributeRequest,
1448 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1449 >(
1450 (name,),
1451 0x45ffa3ccfdeb76db,
1452 fidl::encoding::DynamicFlags::empty(),
1453 ___deadline,
1454 )?;
1455 Ok(_response.map(|x| x))
1456 }
1457
1458 pub fn r#set_extended_attribute(
1466 &self,
1467 mut name: &[u8],
1468 mut value: ExtendedAttributeValue,
1469 mut mode: SetExtendedAttributeMode,
1470 ___deadline: zx::MonotonicInstant,
1471 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1472 let _response = self.client.send_query::<
1473 NodeSetExtendedAttributeRequest,
1474 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1475 >(
1476 (name, &mut value, mode,),
1477 0x4a951362f681f23c,
1478 fidl::encoding::DynamicFlags::empty(),
1479 ___deadline,
1480 )?;
1481 Ok(_response.map(|x| x))
1482 }
1483
1484 pub fn r#remove_extended_attribute(
1490 &self,
1491 mut name: &[u8],
1492 ___deadline: zx::MonotonicInstant,
1493 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1494 let _response = self.client.send_query::<
1495 NodeRemoveExtendedAttributeRequest,
1496 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1497 >(
1498 (name,),
1499 0x7a0b9f3a9bf9032d,
1500 fidl::encoding::DynamicFlags::empty(),
1501 ___deadline,
1502 )?;
1503 Ok(_response.map(|x| x))
1504 }
1505
1506 pub fn r#deprecated_open(
1508 &self,
1509 mut flags: OpenFlags,
1510 mut mode: ModeType,
1511 mut path: &str,
1512 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1513 ) -> Result<(), fidl::Error> {
1514 self.client.send::<DirectoryDeprecatedOpenRequest>(
1515 (flags, mode, path, object),
1516 0x2c5044561d685ec0,
1517 fidl::encoding::DynamicFlags::FLEXIBLE,
1518 )
1519 }
1520
1521 pub fn r#open(
1528 &self,
1529 mut path: &str,
1530 mut flags: Flags,
1531 mut options: &Options,
1532 mut object: fidl::Channel,
1533 ) -> Result<(), fidl::Error> {
1534 self.client.send::<DirectoryOpenRequest>(
1535 (path, flags, options, object),
1536 0x568ddcb9a9cbb6d9,
1537 fidl::encoding::DynamicFlags::empty(),
1538 )
1539 }
1540
1541 pub fn r#read_dirents(
1567 &self,
1568 mut max_bytes: u64,
1569 ___deadline: zx::MonotonicInstant,
1570 ) -> Result<(i32, Vec<u8>), fidl::Error> {
1571 let _response =
1572 self.client.send_query::<DirectoryReadDirentsRequest, DirectoryReadDirentsResponse>(
1573 (max_bytes,),
1574 0x3582806bf27faa0a,
1575 fidl::encoding::DynamicFlags::empty(),
1576 ___deadline,
1577 )?;
1578 Ok((_response.s, _response.dirents))
1579 }
1580
1581 pub fn r#rewind(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
1585 let _response =
1586 self.client.send_query::<fidl::encoding::EmptyPayload, DirectoryRewindResponse>(
1587 (),
1588 0x16b1202af0f34c71,
1589 fidl::encoding::DynamicFlags::empty(),
1590 ___deadline,
1591 )?;
1592 Ok(_response.s)
1593 }
1594
1595 pub fn r#get_token(
1602 &self,
1603 ___deadline: zx::MonotonicInstant,
1604 ) -> Result<(i32, Option<fidl::Handle>), fidl::Error> {
1605 let _response =
1606 self.client.send_query::<fidl::encoding::EmptyPayload, DirectoryGetTokenResponse>(
1607 (),
1608 0x26ae9d18763c8655,
1609 fidl::encoding::DynamicFlags::empty(),
1610 ___deadline,
1611 )?;
1612 Ok((_response.s, _response.token))
1613 }
1614
1615 pub fn r#link(
1632 &self,
1633 mut src: &str,
1634 mut dst_parent_token: fidl::Handle,
1635 mut dst: &str,
1636 ___deadline: zx::MonotonicInstant,
1637 ) -> Result<i32, fidl::Error> {
1638 let _response = self.client.send_query::<DirectoryLinkRequest, DirectoryLinkResponse>(
1639 (src, dst_parent_token, dst),
1640 0x740604c0c7c930e7,
1641 fidl::encoding::DynamicFlags::empty(),
1642 ___deadline,
1643 )?;
1644 Ok(_response.s)
1645 }
1646
1647 pub fn r#unlink(
1672 &self,
1673 mut name: &str,
1674 mut options: &UnlinkOptions,
1675 ___deadline: zx::MonotonicInstant,
1676 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
1677 let _response = self.client.send_query::<
1678 DirectoryUnlinkRequest,
1679 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1680 >(
1681 (name, options,),
1682 0x750a0326a78d7bed,
1683 fidl::encoding::DynamicFlags::empty(),
1684 ___deadline,
1685 )?;
1686 Ok(_response.map(|x| x))
1687 }
1688
1689 pub fn r#rename(
1715 &self,
1716 mut src: &str,
1717 mut dst_parent_token: fidl::Event,
1718 mut dst: &str,
1719 ___deadline: zx::MonotonicInstant,
1720 ) -> Result<DirectoryRenameResult, fidl::Error> {
1721 let _response = self.client.send_query::<
1722 DirectoryRenameRequest,
1723 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1724 >(
1725 (src, dst_parent_token, dst,),
1726 0x7060e7723b9928de,
1727 fidl::encoding::DynamicFlags::empty(),
1728 ___deadline,
1729 )?;
1730 Ok(_response.map(|x| x))
1731 }
1732
1733 pub fn r#create_symlink(
1748 &self,
1749 mut name: &str,
1750 mut target: &[u8],
1751 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1752 ___deadline: zx::MonotonicInstant,
1753 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
1754 let _response = self.client.send_query::<
1755 DirectoryCreateSymlinkRequest,
1756 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1757 >(
1758 (name, target, connection,),
1759 0x21ce0f19ec043889,
1760 fidl::encoding::DynamicFlags::empty(),
1761 ___deadline,
1762 )?;
1763 Ok(_response.map(|x| x))
1764 }
1765
1766 pub fn r#watch(
1773 &self,
1774 mut mask: WatchMask,
1775 mut options: u32,
1776 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1777 ___deadline: zx::MonotonicInstant,
1778 ) -> Result<i32, fidl::Error> {
1779 let _response = self.client.send_query::<DirectoryWatchRequest, DirectoryWatchResponse>(
1780 (mask, options, watcher),
1781 0x5717193a59d66d91,
1782 fidl::encoding::DynamicFlags::empty(),
1783 ___deadline,
1784 )?;
1785 Ok(_response.s)
1786 }
1787}
1788
1789#[cfg(target_os = "fuchsia")]
1790impl From<DirectorySynchronousProxy> for zx::Handle {
1791 fn from(value: DirectorySynchronousProxy) -> Self {
1792 value.into_channel().into()
1793 }
1794}
1795
1796#[cfg(target_os = "fuchsia")]
1797impl From<fidl::Channel> for DirectorySynchronousProxy {
1798 fn from(value: fidl::Channel) -> Self {
1799 Self::new(value)
1800 }
1801}
1802
1803#[cfg(target_os = "fuchsia")]
1804impl fidl::endpoints::FromClient for DirectorySynchronousProxy {
1805 type Protocol = DirectoryMarker;
1806
1807 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryMarker>) -> Self {
1808 Self::new(value.into_channel())
1809 }
1810}
1811
1812#[derive(Debug, Clone)]
1813pub struct DirectoryProxy {
1814 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1815}
1816
1817impl fidl::endpoints::Proxy for DirectoryProxy {
1818 type Protocol = DirectoryMarker;
1819
1820 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1821 Self::new(inner)
1822 }
1823
1824 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1825 self.client.into_channel().map_err(|client| Self { client })
1826 }
1827
1828 fn as_channel(&self) -> &::fidl::AsyncChannel {
1829 self.client.as_channel()
1830 }
1831}
1832
1833impl DirectoryProxy {
1834 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1836 let protocol_name = <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1837 Self { client: fidl::client::Client::new(channel, protocol_name) }
1838 }
1839
1840 pub fn take_event_stream(&self) -> DirectoryEventStream {
1846 DirectoryEventStream { event_receiver: self.client.take_event_receiver() }
1847 }
1848
1849 pub fn r#advisory_lock(
1873 &self,
1874 mut request: &AdvisoryLockRequest,
1875 ) -> fidl::client::QueryResponseFut<
1876 AdvisoryLockingAdvisoryLockResult,
1877 fidl::encoding::DefaultFuchsiaResourceDialect,
1878 > {
1879 DirectoryProxyInterface::r#advisory_lock(self, request)
1880 }
1881
1882 pub fn r#clone(
1883 &self,
1884 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1885 ) -> Result<(), fidl::Error> {
1886 DirectoryProxyInterface::r#clone(self, request)
1887 }
1888
1889 pub fn r#close(
1900 &self,
1901 ) -> fidl::client::QueryResponseFut<
1902 fidl_fuchsia_unknown::CloseableCloseResult,
1903 fidl::encoding::DefaultFuchsiaResourceDialect,
1904 > {
1905 DirectoryProxyInterface::r#close(self)
1906 }
1907
1908 pub fn r#query(
1909 &self,
1910 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
1911 {
1912 DirectoryProxyInterface::r#query(self)
1913 }
1914
1915 pub fn r#deprecated_clone(
1917 &self,
1918 mut flags: OpenFlags,
1919 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1920 ) -> Result<(), fidl::Error> {
1921 DirectoryProxyInterface::r#deprecated_clone(self, flags, object)
1922 }
1923
1924 pub fn r#deprecated_get_attr(
1926 &self,
1927 ) -> fidl::client::QueryResponseFut<
1928 (i32, NodeAttributes),
1929 fidl::encoding::DefaultFuchsiaResourceDialect,
1930 > {
1931 DirectoryProxyInterface::r#deprecated_get_attr(self)
1932 }
1933
1934 pub fn r#deprecated_set_attr(
1936 &self,
1937 mut flags: NodeAttributeFlags,
1938 mut attributes: &NodeAttributes,
1939 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
1940 DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
1941 }
1942
1943 pub fn r#deprecated_get_flags(
1945 &self,
1946 ) -> fidl::client::QueryResponseFut<
1947 (i32, OpenFlags),
1948 fidl::encoding::DefaultFuchsiaResourceDialect,
1949 > {
1950 DirectoryProxyInterface::r#deprecated_get_flags(self)
1951 }
1952
1953 pub fn r#deprecated_set_flags(
1955 &self,
1956 mut flags: OpenFlags,
1957 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
1958 DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
1959 }
1960
1961 pub fn r#get_flags(
1970 &self,
1971 ) -> fidl::client::QueryResponseFut<
1972 NodeGetFlagsResult,
1973 fidl::encoding::DefaultFuchsiaResourceDialect,
1974 > {
1975 DirectoryProxyInterface::r#get_flags(self)
1976 }
1977
1978 pub fn r#set_flags(
1988 &self,
1989 mut flags: Flags,
1990 ) -> fidl::client::QueryResponseFut<
1991 NodeSetFlagsResult,
1992 fidl::encoding::DefaultFuchsiaResourceDialect,
1993 > {
1994 DirectoryProxyInterface::r#set_flags(self, flags)
1995 }
1996
1997 pub fn r#query_filesystem(
1999 &self,
2000 ) -> fidl::client::QueryResponseFut<
2001 (i32, Option<Box<FilesystemInfo>>),
2002 fidl::encoding::DefaultFuchsiaResourceDialect,
2003 > {
2004 DirectoryProxyInterface::r#query_filesystem(self)
2005 }
2006
2007 pub fn r#get_attributes(
2021 &self,
2022 mut query: NodeAttributesQuery,
2023 ) -> fidl::client::QueryResponseFut<
2024 NodeGetAttributesResult,
2025 fidl::encoding::DefaultFuchsiaResourceDialect,
2026 > {
2027 DirectoryProxyInterface::r#get_attributes(self, query)
2028 }
2029
2030 pub fn r#update_attributes(
2039 &self,
2040 mut payload: &MutableNodeAttributes,
2041 ) -> fidl::client::QueryResponseFut<
2042 NodeUpdateAttributesResult,
2043 fidl::encoding::DefaultFuchsiaResourceDialect,
2044 > {
2045 DirectoryProxyInterface::r#update_attributes(self, payload)
2046 }
2047
2048 pub fn r#sync(
2058 &self,
2059 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
2060 {
2061 DirectoryProxyInterface::r#sync(self)
2062 }
2063
2064 pub fn r#list_extended_attributes(
2073 &self,
2074 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2075 ) -> Result<(), fidl::Error> {
2076 DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
2077 }
2078
2079 pub fn r#get_extended_attribute(
2086 &self,
2087 mut name: &[u8],
2088 ) -> fidl::client::QueryResponseFut<
2089 NodeGetExtendedAttributeResult,
2090 fidl::encoding::DefaultFuchsiaResourceDialect,
2091 > {
2092 DirectoryProxyInterface::r#get_extended_attribute(self, name)
2093 }
2094
2095 pub fn r#set_extended_attribute(
2103 &self,
2104 mut name: &[u8],
2105 mut value: ExtendedAttributeValue,
2106 mut mode: SetExtendedAttributeMode,
2107 ) -> fidl::client::QueryResponseFut<
2108 NodeSetExtendedAttributeResult,
2109 fidl::encoding::DefaultFuchsiaResourceDialect,
2110 > {
2111 DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
2112 }
2113
2114 pub fn r#remove_extended_attribute(
2120 &self,
2121 mut name: &[u8],
2122 ) -> fidl::client::QueryResponseFut<
2123 NodeRemoveExtendedAttributeResult,
2124 fidl::encoding::DefaultFuchsiaResourceDialect,
2125 > {
2126 DirectoryProxyInterface::r#remove_extended_attribute(self, name)
2127 }
2128
2129 pub fn r#deprecated_open(
2131 &self,
2132 mut flags: OpenFlags,
2133 mut mode: ModeType,
2134 mut path: &str,
2135 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2136 ) -> Result<(), fidl::Error> {
2137 DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
2138 }
2139
2140 pub fn r#open(
2147 &self,
2148 mut path: &str,
2149 mut flags: Flags,
2150 mut options: &Options,
2151 mut object: fidl::Channel,
2152 ) -> Result<(), fidl::Error> {
2153 DirectoryProxyInterface::r#open(self, path, flags, options, object)
2154 }
2155
2156 pub fn r#read_dirents(
2182 &self,
2183 mut max_bytes: u64,
2184 ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fidl::encoding::DefaultFuchsiaResourceDialect>
2185 {
2186 DirectoryProxyInterface::r#read_dirents(self, max_bytes)
2187 }
2188
2189 pub fn r#rewind(
2193 &self,
2194 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2195 DirectoryProxyInterface::r#rewind(self)
2196 }
2197
2198 pub fn r#get_token(
2205 &self,
2206 ) -> fidl::client::QueryResponseFut<
2207 (i32, Option<fidl::Handle>),
2208 fidl::encoding::DefaultFuchsiaResourceDialect,
2209 > {
2210 DirectoryProxyInterface::r#get_token(self)
2211 }
2212
2213 pub fn r#link(
2230 &self,
2231 mut src: &str,
2232 mut dst_parent_token: fidl::Handle,
2233 mut dst: &str,
2234 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2235 DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
2236 }
2237
2238 pub fn r#unlink(
2263 &self,
2264 mut name: &str,
2265 mut options: &UnlinkOptions,
2266 ) -> fidl::client::QueryResponseFut<
2267 DirectoryUnlinkResult,
2268 fidl::encoding::DefaultFuchsiaResourceDialect,
2269 > {
2270 DirectoryProxyInterface::r#unlink(self, name, options)
2271 }
2272
2273 pub fn r#rename(
2299 &self,
2300 mut src: &str,
2301 mut dst_parent_token: fidl::Event,
2302 mut dst: &str,
2303 ) -> fidl::client::QueryResponseFut<
2304 DirectoryRenameResult,
2305 fidl::encoding::DefaultFuchsiaResourceDialect,
2306 > {
2307 DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
2308 }
2309
2310 pub fn r#create_symlink(
2325 &self,
2326 mut name: &str,
2327 mut target: &[u8],
2328 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
2329 ) -> fidl::client::QueryResponseFut<
2330 DirectoryCreateSymlinkResult,
2331 fidl::encoding::DefaultFuchsiaResourceDialect,
2332 > {
2333 DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
2334 }
2335
2336 pub fn r#watch(
2343 &self,
2344 mut mask: WatchMask,
2345 mut options: u32,
2346 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
2347 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2348 DirectoryProxyInterface::r#watch(self, mask, options, watcher)
2349 }
2350}
2351
2352impl DirectoryProxyInterface for DirectoryProxy {
2353 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
2354 AdvisoryLockingAdvisoryLockResult,
2355 fidl::encoding::DefaultFuchsiaResourceDialect,
2356 >;
2357 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
2358 fn _decode(
2359 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2360 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
2361 let _response = fidl::client::decode_transaction_body::<
2362 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2363 fidl::encoding::DefaultFuchsiaResourceDialect,
2364 0x6ee9c0ad53ec87aa,
2365 >(_buf?)?;
2366 Ok(_response.map(|x| x))
2367 }
2368 self.client.send_query_and_decode::<
2369 AdvisoryLockingAdvisoryLockRequest,
2370 AdvisoryLockingAdvisoryLockResult,
2371 >(
2372 (request,),
2373 0x6ee9c0ad53ec87aa,
2374 fidl::encoding::DynamicFlags::empty(),
2375 _decode,
2376 )
2377 }
2378
2379 fn r#clone(
2380 &self,
2381 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
2382 ) -> Result<(), fidl::Error> {
2383 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
2384 (request,),
2385 0x20d8a7aba2168a79,
2386 fidl::encoding::DynamicFlags::empty(),
2387 )
2388 }
2389
2390 type CloseResponseFut = fidl::client::QueryResponseFut<
2391 fidl_fuchsia_unknown::CloseableCloseResult,
2392 fidl::encoding::DefaultFuchsiaResourceDialect,
2393 >;
2394 fn r#close(&self) -> Self::CloseResponseFut {
2395 fn _decode(
2396 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2397 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
2398 let _response = fidl::client::decode_transaction_body::<
2399 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2400 fidl::encoding::DefaultFuchsiaResourceDialect,
2401 0x5ac5d459ad7f657e,
2402 >(_buf?)?;
2403 Ok(_response.map(|x| x))
2404 }
2405 self.client.send_query_and_decode::<
2406 fidl::encoding::EmptyPayload,
2407 fidl_fuchsia_unknown::CloseableCloseResult,
2408 >(
2409 (),
2410 0x5ac5d459ad7f657e,
2411 fidl::encoding::DynamicFlags::empty(),
2412 _decode,
2413 )
2414 }
2415
2416 type QueryResponseFut =
2417 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
2418 fn r#query(&self) -> Self::QueryResponseFut {
2419 fn _decode(
2420 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2421 ) -> Result<Vec<u8>, fidl::Error> {
2422 let _response = fidl::client::decode_transaction_body::<
2423 fidl_fuchsia_unknown::QueryableQueryResponse,
2424 fidl::encoding::DefaultFuchsiaResourceDialect,
2425 0x2658edee9decfc06,
2426 >(_buf?)?;
2427 Ok(_response.protocol)
2428 }
2429 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
2430 (),
2431 0x2658edee9decfc06,
2432 fidl::encoding::DynamicFlags::empty(),
2433 _decode,
2434 )
2435 }
2436
2437 fn r#deprecated_clone(
2438 &self,
2439 mut flags: OpenFlags,
2440 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2441 ) -> Result<(), fidl::Error> {
2442 self.client.send::<NodeDeprecatedCloneRequest>(
2443 (flags, object),
2444 0x5a61678f293ce16f,
2445 fidl::encoding::DynamicFlags::FLEXIBLE,
2446 )
2447 }
2448
2449 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
2450 (i32, NodeAttributes),
2451 fidl::encoding::DefaultFuchsiaResourceDialect,
2452 >;
2453 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
2454 fn _decode(
2455 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2456 ) -> Result<(i32, NodeAttributes), fidl::Error> {
2457 let _response = fidl::client::decode_transaction_body::<
2458 NodeDeprecatedGetAttrResponse,
2459 fidl::encoding::DefaultFuchsiaResourceDialect,
2460 0x78985e216314dafd,
2461 >(_buf?)?;
2462 Ok((_response.s, _response.attributes))
2463 }
2464 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
2465 (),
2466 0x78985e216314dafd,
2467 fidl::encoding::DynamicFlags::empty(),
2468 _decode,
2469 )
2470 }
2471
2472 type DeprecatedSetAttrResponseFut =
2473 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2474 fn r#deprecated_set_attr(
2475 &self,
2476 mut flags: NodeAttributeFlags,
2477 mut attributes: &NodeAttributes,
2478 ) -> Self::DeprecatedSetAttrResponseFut {
2479 fn _decode(
2480 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2481 ) -> Result<i32, fidl::Error> {
2482 let _response = fidl::client::decode_transaction_body::<
2483 NodeDeprecatedSetAttrResponse,
2484 fidl::encoding::DefaultFuchsiaResourceDialect,
2485 0x4186c0f40d938f46,
2486 >(_buf?)?;
2487 Ok(_response.s)
2488 }
2489 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
2490 (flags, attributes),
2491 0x4186c0f40d938f46,
2492 fidl::encoding::DynamicFlags::empty(),
2493 _decode,
2494 )
2495 }
2496
2497 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
2498 (i32, OpenFlags),
2499 fidl::encoding::DefaultFuchsiaResourceDialect,
2500 >;
2501 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
2502 fn _decode(
2503 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2504 ) -> Result<(i32, OpenFlags), fidl::Error> {
2505 let _response = fidl::client::decode_transaction_body::<
2506 NodeDeprecatedGetFlagsResponse,
2507 fidl::encoding::DefaultFuchsiaResourceDialect,
2508 0x5b88fffb8eda3aa1,
2509 >(_buf?)?;
2510 Ok((_response.s, _response.flags))
2511 }
2512 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
2513 (),
2514 0x5b88fffb8eda3aa1,
2515 fidl::encoding::DynamicFlags::empty(),
2516 _decode,
2517 )
2518 }
2519
2520 type DeprecatedSetFlagsResponseFut =
2521 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2522 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
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 NodeDeprecatedSetFlagsResponse,
2528 fidl::encoding::DefaultFuchsiaResourceDialect,
2529 0x5295b76c71fde733,
2530 >(_buf?)?;
2531 Ok(_response.s)
2532 }
2533 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
2534 (flags,),
2535 0x5295b76c71fde733,
2536 fidl::encoding::DynamicFlags::empty(),
2537 _decode,
2538 )
2539 }
2540
2541 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
2542 NodeGetFlagsResult,
2543 fidl::encoding::DefaultFuchsiaResourceDialect,
2544 >;
2545 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
2546 fn _decode(
2547 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2548 ) -> Result<NodeGetFlagsResult, fidl::Error> {
2549 let _response = fidl::client::decode_transaction_body::<
2550 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
2551 fidl::encoding::DefaultFuchsiaResourceDialect,
2552 0x176eb318f64ec23,
2553 >(_buf?)?
2554 .into_result::<DirectoryMarker>("get_flags")?;
2555 Ok(_response.map(|x| x.flags))
2556 }
2557 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
2558 (),
2559 0x176eb318f64ec23,
2560 fidl::encoding::DynamicFlags::FLEXIBLE,
2561 _decode,
2562 )
2563 }
2564
2565 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
2566 NodeSetFlagsResult,
2567 fidl::encoding::DefaultFuchsiaResourceDialect,
2568 >;
2569 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
2570 fn _decode(
2571 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2572 ) -> Result<NodeSetFlagsResult, fidl::Error> {
2573 let _response = fidl::client::decode_transaction_body::<
2574 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2575 fidl::encoding::DefaultFuchsiaResourceDialect,
2576 0x55a8028685791ea8,
2577 >(_buf?)?
2578 .into_result::<DirectoryMarker>("set_flags")?;
2579 Ok(_response.map(|x| x))
2580 }
2581 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
2582 (flags,),
2583 0x55a8028685791ea8,
2584 fidl::encoding::DynamicFlags::FLEXIBLE,
2585 _decode,
2586 )
2587 }
2588
2589 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
2590 (i32, Option<Box<FilesystemInfo>>),
2591 fidl::encoding::DefaultFuchsiaResourceDialect,
2592 >;
2593 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
2594 fn _decode(
2595 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2596 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
2597 let _response = fidl::client::decode_transaction_body::<
2598 NodeQueryFilesystemResponse,
2599 fidl::encoding::DefaultFuchsiaResourceDialect,
2600 0x6f344a1c6b0a0610,
2601 >(_buf?)?;
2602 Ok((_response.s, _response.info))
2603 }
2604 self.client.send_query_and_decode::<
2605 fidl::encoding::EmptyPayload,
2606 (i32, Option<Box<FilesystemInfo>>),
2607 >(
2608 (),
2609 0x6f344a1c6b0a0610,
2610 fidl::encoding::DynamicFlags::empty(),
2611 _decode,
2612 )
2613 }
2614
2615 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
2616 NodeGetAttributesResult,
2617 fidl::encoding::DefaultFuchsiaResourceDialect,
2618 >;
2619 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
2620 fn _decode(
2621 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2622 ) -> Result<NodeGetAttributesResult, fidl::Error> {
2623 let _response = fidl::client::decode_transaction_body::<
2624 fidl::encoding::ResultType<NodeAttributes2, i32>,
2625 fidl::encoding::DefaultFuchsiaResourceDialect,
2626 0x3d4396a638ea053b,
2627 >(_buf?)?;
2628 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
2629 }
2630 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
2631 (query,),
2632 0x3d4396a638ea053b,
2633 fidl::encoding::DynamicFlags::empty(),
2634 _decode,
2635 )
2636 }
2637
2638 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
2639 NodeUpdateAttributesResult,
2640 fidl::encoding::DefaultFuchsiaResourceDialect,
2641 >;
2642 fn r#update_attributes(
2643 &self,
2644 mut payload: &MutableNodeAttributes,
2645 ) -> Self::UpdateAttributesResponseFut {
2646 fn _decode(
2647 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2648 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
2649 let _response = fidl::client::decode_transaction_body::<
2650 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2651 fidl::encoding::DefaultFuchsiaResourceDialect,
2652 0x3308c1da5a89bf08,
2653 >(_buf?)?;
2654 Ok(_response.map(|x| x))
2655 }
2656 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
2657 payload,
2658 0x3308c1da5a89bf08,
2659 fidl::encoding::DynamicFlags::empty(),
2660 _decode,
2661 )
2662 }
2663
2664 type SyncResponseFut = fidl::client::QueryResponseFut<
2665 NodeSyncResult,
2666 fidl::encoding::DefaultFuchsiaResourceDialect,
2667 >;
2668 fn r#sync(&self) -> Self::SyncResponseFut {
2669 fn _decode(
2670 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2671 ) -> Result<NodeSyncResult, fidl::Error> {
2672 let _response = fidl::client::decode_transaction_body::<
2673 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2674 fidl::encoding::DefaultFuchsiaResourceDialect,
2675 0x2c5c27ca0ab5dc49,
2676 >(_buf?)?;
2677 Ok(_response.map(|x| x))
2678 }
2679 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
2680 (),
2681 0x2c5c27ca0ab5dc49,
2682 fidl::encoding::DynamicFlags::empty(),
2683 _decode,
2684 )
2685 }
2686
2687 fn r#list_extended_attributes(
2688 &self,
2689 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2690 ) -> Result<(), fidl::Error> {
2691 self.client.send::<NodeListExtendedAttributesRequest>(
2692 (iterator,),
2693 0x4b61033de007fcd0,
2694 fidl::encoding::DynamicFlags::empty(),
2695 )
2696 }
2697
2698 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2699 NodeGetExtendedAttributeResult,
2700 fidl::encoding::DefaultFuchsiaResourceDialect,
2701 >;
2702 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
2703 fn _decode(
2704 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2705 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
2706 let _response = fidl::client::decode_transaction_body::<
2707 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
2708 fidl::encoding::DefaultFuchsiaResourceDialect,
2709 0x45ffa3ccfdeb76db,
2710 >(_buf?)?;
2711 Ok(_response.map(|x| x))
2712 }
2713 self.client.send_query_and_decode::<
2714 NodeGetExtendedAttributeRequest,
2715 NodeGetExtendedAttributeResult,
2716 >(
2717 (name,),
2718 0x45ffa3ccfdeb76db,
2719 fidl::encoding::DynamicFlags::empty(),
2720 _decode,
2721 )
2722 }
2723
2724 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2725 NodeSetExtendedAttributeResult,
2726 fidl::encoding::DefaultFuchsiaResourceDialect,
2727 >;
2728 fn r#set_extended_attribute(
2729 &self,
2730 mut name: &[u8],
2731 mut value: ExtendedAttributeValue,
2732 mut mode: SetExtendedAttributeMode,
2733 ) -> Self::SetExtendedAttributeResponseFut {
2734 fn _decode(
2735 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2736 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
2737 let _response = fidl::client::decode_transaction_body::<
2738 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2739 fidl::encoding::DefaultFuchsiaResourceDialect,
2740 0x4a951362f681f23c,
2741 >(_buf?)?;
2742 Ok(_response.map(|x| x))
2743 }
2744 self.client.send_query_and_decode::<
2745 NodeSetExtendedAttributeRequest,
2746 NodeSetExtendedAttributeResult,
2747 >(
2748 (name, &mut value, mode,),
2749 0x4a951362f681f23c,
2750 fidl::encoding::DynamicFlags::empty(),
2751 _decode,
2752 )
2753 }
2754
2755 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2756 NodeRemoveExtendedAttributeResult,
2757 fidl::encoding::DefaultFuchsiaResourceDialect,
2758 >;
2759 fn r#remove_extended_attribute(
2760 &self,
2761 mut name: &[u8],
2762 ) -> Self::RemoveExtendedAttributeResponseFut {
2763 fn _decode(
2764 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2765 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
2766 let _response = fidl::client::decode_transaction_body::<
2767 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2768 fidl::encoding::DefaultFuchsiaResourceDialect,
2769 0x7a0b9f3a9bf9032d,
2770 >(_buf?)?;
2771 Ok(_response.map(|x| x))
2772 }
2773 self.client.send_query_and_decode::<
2774 NodeRemoveExtendedAttributeRequest,
2775 NodeRemoveExtendedAttributeResult,
2776 >(
2777 (name,),
2778 0x7a0b9f3a9bf9032d,
2779 fidl::encoding::DynamicFlags::empty(),
2780 _decode,
2781 )
2782 }
2783
2784 fn r#deprecated_open(
2785 &self,
2786 mut flags: OpenFlags,
2787 mut mode: ModeType,
2788 mut path: &str,
2789 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2790 ) -> Result<(), fidl::Error> {
2791 self.client.send::<DirectoryDeprecatedOpenRequest>(
2792 (flags, mode, path, object),
2793 0x2c5044561d685ec0,
2794 fidl::encoding::DynamicFlags::FLEXIBLE,
2795 )
2796 }
2797
2798 fn r#open(
2799 &self,
2800 mut path: &str,
2801 mut flags: Flags,
2802 mut options: &Options,
2803 mut object: fidl::Channel,
2804 ) -> Result<(), fidl::Error> {
2805 self.client.send::<DirectoryOpenRequest>(
2806 (path, flags, options, object),
2807 0x568ddcb9a9cbb6d9,
2808 fidl::encoding::DynamicFlags::empty(),
2809 )
2810 }
2811
2812 type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
2813 (i32, Vec<u8>),
2814 fidl::encoding::DefaultFuchsiaResourceDialect,
2815 >;
2816 fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
2817 fn _decode(
2818 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2819 ) -> Result<(i32, Vec<u8>), fidl::Error> {
2820 let _response = fidl::client::decode_transaction_body::<
2821 DirectoryReadDirentsResponse,
2822 fidl::encoding::DefaultFuchsiaResourceDialect,
2823 0x3582806bf27faa0a,
2824 >(_buf?)?;
2825 Ok((_response.s, _response.dirents))
2826 }
2827 self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
2828 (max_bytes,),
2829 0x3582806bf27faa0a,
2830 fidl::encoding::DynamicFlags::empty(),
2831 _decode,
2832 )
2833 }
2834
2835 type RewindResponseFut =
2836 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2837 fn r#rewind(&self) -> Self::RewindResponseFut {
2838 fn _decode(
2839 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2840 ) -> Result<i32, fidl::Error> {
2841 let _response = fidl::client::decode_transaction_body::<
2842 DirectoryRewindResponse,
2843 fidl::encoding::DefaultFuchsiaResourceDialect,
2844 0x16b1202af0f34c71,
2845 >(_buf?)?;
2846 Ok(_response.s)
2847 }
2848 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
2849 (),
2850 0x16b1202af0f34c71,
2851 fidl::encoding::DynamicFlags::empty(),
2852 _decode,
2853 )
2854 }
2855
2856 type GetTokenResponseFut = fidl::client::QueryResponseFut<
2857 (i32, Option<fidl::Handle>),
2858 fidl::encoding::DefaultFuchsiaResourceDialect,
2859 >;
2860 fn r#get_token(&self) -> Self::GetTokenResponseFut {
2861 fn _decode(
2862 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2863 ) -> Result<(i32, Option<fidl::Handle>), fidl::Error> {
2864 let _response = fidl::client::decode_transaction_body::<
2865 DirectoryGetTokenResponse,
2866 fidl::encoding::DefaultFuchsiaResourceDialect,
2867 0x26ae9d18763c8655,
2868 >(_buf?)?;
2869 Ok((_response.s, _response.token))
2870 }
2871 self.client
2872 .send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, Option<fidl::Handle>)>(
2873 (),
2874 0x26ae9d18763c8655,
2875 fidl::encoding::DynamicFlags::empty(),
2876 _decode,
2877 )
2878 }
2879
2880 type LinkResponseFut =
2881 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2882 fn r#link(
2883 &self,
2884 mut src: &str,
2885 mut dst_parent_token: fidl::Handle,
2886 mut dst: &str,
2887 ) -> Self::LinkResponseFut {
2888 fn _decode(
2889 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2890 ) -> Result<i32, fidl::Error> {
2891 let _response = fidl::client::decode_transaction_body::<
2892 DirectoryLinkResponse,
2893 fidl::encoding::DefaultFuchsiaResourceDialect,
2894 0x740604c0c7c930e7,
2895 >(_buf?)?;
2896 Ok(_response.s)
2897 }
2898 self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2899 (src, dst_parent_token, dst),
2900 0x740604c0c7c930e7,
2901 fidl::encoding::DynamicFlags::empty(),
2902 _decode,
2903 )
2904 }
2905
2906 type UnlinkResponseFut = fidl::client::QueryResponseFut<
2907 DirectoryUnlinkResult,
2908 fidl::encoding::DefaultFuchsiaResourceDialect,
2909 >;
2910 fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
2911 fn _decode(
2912 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2913 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
2914 let _response = fidl::client::decode_transaction_body::<
2915 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2916 fidl::encoding::DefaultFuchsiaResourceDialect,
2917 0x750a0326a78d7bed,
2918 >(_buf?)?;
2919 Ok(_response.map(|x| x))
2920 }
2921 self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
2922 (name, options),
2923 0x750a0326a78d7bed,
2924 fidl::encoding::DynamicFlags::empty(),
2925 _decode,
2926 )
2927 }
2928
2929 type RenameResponseFut = fidl::client::QueryResponseFut<
2930 DirectoryRenameResult,
2931 fidl::encoding::DefaultFuchsiaResourceDialect,
2932 >;
2933 fn r#rename(
2934 &self,
2935 mut src: &str,
2936 mut dst_parent_token: fidl::Event,
2937 mut dst: &str,
2938 ) -> Self::RenameResponseFut {
2939 fn _decode(
2940 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2941 ) -> Result<DirectoryRenameResult, fidl::Error> {
2942 let _response = fidl::client::decode_transaction_body::<
2943 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2944 fidl::encoding::DefaultFuchsiaResourceDialect,
2945 0x7060e7723b9928de,
2946 >(_buf?)?;
2947 Ok(_response.map(|x| x))
2948 }
2949 self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
2950 (src, dst_parent_token, dst),
2951 0x7060e7723b9928de,
2952 fidl::encoding::DynamicFlags::empty(),
2953 _decode,
2954 )
2955 }
2956
2957 type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
2958 DirectoryCreateSymlinkResult,
2959 fidl::encoding::DefaultFuchsiaResourceDialect,
2960 >;
2961 fn r#create_symlink(
2962 &self,
2963 mut name: &str,
2964 mut target: &[u8],
2965 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
2966 ) -> Self::CreateSymlinkResponseFut {
2967 fn _decode(
2968 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2969 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
2970 let _response = fidl::client::decode_transaction_body::<
2971 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2972 fidl::encoding::DefaultFuchsiaResourceDialect,
2973 0x21ce0f19ec043889,
2974 >(_buf?)?;
2975 Ok(_response.map(|x| x))
2976 }
2977 self.client
2978 .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
2979 (name, target, connection),
2980 0x21ce0f19ec043889,
2981 fidl::encoding::DynamicFlags::empty(),
2982 _decode,
2983 )
2984 }
2985
2986 type WatchResponseFut =
2987 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2988 fn r#watch(
2989 &self,
2990 mut mask: WatchMask,
2991 mut options: u32,
2992 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
2993 ) -> Self::WatchResponseFut {
2994 fn _decode(
2995 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2996 ) -> Result<i32, fidl::Error> {
2997 let _response = fidl::client::decode_transaction_body::<
2998 DirectoryWatchResponse,
2999 fidl::encoding::DefaultFuchsiaResourceDialect,
3000 0x5717193a59d66d91,
3001 >(_buf?)?;
3002 Ok(_response.s)
3003 }
3004 self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
3005 (mask, options, watcher),
3006 0x5717193a59d66d91,
3007 fidl::encoding::DynamicFlags::empty(),
3008 _decode,
3009 )
3010 }
3011}
3012
3013pub struct DirectoryEventStream {
3014 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3015}
3016
3017impl std::marker::Unpin for DirectoryEventStream {}
3018
3019impl futures::stream::FusedStream for DirectoryEventStream {
3020 fn is_terminated(&self) -> bool {
3021 self.event_receiver.is_terminated()
3022 }
3023}
3024
3025impl futures::Stream for DirectoryEventStream {
3026 type Item = Result<DirectoryEvent, fidl::Error>;
3027
3028 fn poll_next(
3029 mut self: std::pin::Pin<&mut Self>,
3030 cx: &mut std::task::Context<'_>,
3031 ) -> std::task::Poll<Option<Self::Item>> {
3032 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3033 &mut self.event_receiver,
3034 cx
3035 )?) {
3036 Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
3037 None => std::task::Poll::Ready(None),
3038 }
3039 }
3040}
3041
3042#[derive(Debug)]
3043pub enum DirectoryEvent {
3044 OnOpen_ {
3045 s: i32,
3046 info: Option<Box<NodeInfoDeprecated>>,
3047 },
3048 OnRepresentation {
3049 payload: Representation,
3050 },
3051 #[non_exhaustive]
3052 _UnknownEvent {
3053 ordinal: u64,
3055 },
3056}
3057
3058impl DirectoryEvent {
3059 #[allow(irrefutable_let_patterns)]
3060 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
3061 if let DirectoryEvent::OnOpen_ { s, info } = self {
3062 Some((s, info))
3063 } else {
3064 None
3065 }
3066 }
3067 #[allow(irrefutable_let_patterns)]
3068 pub fn into_on_representation(self) -> Option<Representation> {
3069 if let DirectoryEvent::OnRepresentation { payload } = self {
3070 Some((payload))
3071 } else {
3072 None
3073 }
3074 }
3075
3076 fn decode(
3078 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3079 ) -> Result<DirectoryEvent, fidl::Error> {
3080 let (bytes, _handles) = buf.split_mut();
3081 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3082 debug_assert_eq!(tx_header.tx_id, 0);
3083 match tx_header.ordinal {
3084 0x7fc7bbb1dbfd1972 => {
3085 let mut out = fidl::new_empty!(
3086 NodeOnOpenRequest,
3087 fidl::encoding::DefaultFuchsiaResourceDialect
3088 );
3089 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3090 Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
3091 }
3092 0x5cb40567d80a510c => {
3093 let mut out =
3094 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
3095 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
3096 Ok((DirectoryEvent::OnRepresentation { payload: out }))
3097 }
3098 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3099 Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3100 }
3101 _ => Err(fidl::Error::UnknownOrdinal {
3102 ordinal: tx_header.ordinal,
3103 protocol_name: <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3104 }),
3105 }
3106 }
3107}
3108
3109pub struct DirectoryRequestStream {
3111 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3112 is_terminated: bool,
3113}
3114
3115impl std::marker::Unpin for DirectoryRequestStream {}
3116
3117impl futures::stream::FusedStream for DirectoryRequestStream {
3118 fn is_terminated(&self) -> bool {
3119 self.is_terminated
3120 }
3121}
3122
3123impl fidl::endpoints::RequestStream for DirectoryRequestStream {
3124 type Protocol = DirectoryMarker;
3125 type ControlHandle = DirectoryControlHandle;
3126
3127 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3128 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3129 }
3130
3131 fn control_handle(&self) -> Self::ControlHandle {
3132 DirectoryControlHandle { inner: self.inner.clone() }
3133 }
3134
3135 fn into_inner(
3136 self,
3137 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3138 {
3139 (self.inner, self.is_terminated)
3140 }
3141
3142 fn from_inner(
3143 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3144 is_terminated: bool,
3145 ) -> Self {
3146 Self { inner, is_terminated }
3147 }
3148}
3149
3150impl futures::Stream for DirectoryRequestStream {
3151 type Item = Result<DirectoryRequest, fidl::Error>;
3152
3153 fn poll_next(
3154 mut self: std::pin::Pin<&mut Self>,
3155 cx: &mut std::task::Context<'_>,
3156 ) -> std::task::Poll<Option<Self::Item>> {
3157 let this = &mut *self;
3158 if this.inner.check_shutdown(cx) {
3159 this.is_terminated = true;
3160 return std::task::Poll::Ready(None);
3161 }
3162 if this.is_terminated {
3163 panic!("polled DirectoryRequestStream after completion");
3164 }
3165 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3166 |bytes, handles| {
3167 match this.inner.channel().read_etc(cx, bytes, handles) {
3168 std::task::Poll::Ready(Ok(())) => {}
3169 std::task::Poll::Pending => return std::task::Poll::Pending,
3170 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3171 this.is_terminated = true;
3172 return std::task::Poll::Ready(None);
3173 }
3174 std::task::Poll::Ready(Err(e)) => {
3175 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3176 e.into(),
3177 ))))
3178 }
3179 }
3180
3181 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3183
3184 std::task::Poll::Ready(Some(match header.ordinal {
3185 0x6ee9c0ad53ec87aa => {
3186 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3187 let mut req = fidl::new_empty!(
3188 AdvisoryLockingAdvisoryLockRequest,
3189 fidl::encoding::DefaultFuchsiaResourceDialect
3190 );
3191 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
3192 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3193 Ok(DirectoryRequest::AdvisoryLock {
3194 request: req.request,
3195
3196 responder: DirectoryAdvisoryLockResponder {
3197 control_handle: std::mem::ManuallyDrop::new(control_handle),
3198 tx_id: header.tx_id,
3199 },
3200 })
3201 }
3202 0x20d8a7aba2168a79 => {
3203 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3204 let mut req = fidl::new_empty!(
3205 fidl_fuchsia_unknown::CloneableCloneRequest,
3206 fidl::encoding::DefaultFuchsiaResourceDialect
3207 );
3208 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3209 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3210 Ok(DirectoryRequest::Clone { request: req.request, control_handle })
3211 }
3212 0x5ac5d459ad7f657e => {
3213 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3214 let mut req = fidl::new_empty!(
3215 fidl::encoding::EmptyPayload,
3216 fidl::encoding::DefaultFuchsiaResourceDialect
3217 );
3218 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3219 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3220 Ok(DirectoryRequest::Close {
3221 responder: DirectoryCloseResponder {
3222 control_handle: std::mem::ManuallyDrop::new(control_handle),
3223 tx_id: header.tx_id,
3224 },
3225 })
3226 }
3227 0x2658edee9decfc06 => {
3228 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3229 let mut req = fidl::new_empty!(
3230 fidl::encoding::EmptyPayload,
3231 fidl::encoding::DefaultFuchsiaResourceDialect
3232 );
3233 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3234 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3235 Ok(DirectoryRequest::Query {
3236 responder: DirectoryQueryResponder {
3237 control_handle: std::mem::ManuallyDrop::new(control_handle),
3238 tx_id: header.tx_id,
3239 },
3240 })
3241 }
3242 0x5a61678f293ce16f => {
3243 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3244 let mut req = fidl::new_empty!(
3245 NodeDeprecatedCloneRequest,
3246 fidl::encoding::DefaultFuchsiaResourceDialect
3247 );
3248 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3249 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3250 Ok(DirectoryRequest::DeprecatedClone {
3251 flags: req.flags,
3252 object: req.object,
3253
3254 control_handle,
3255 })
3256 }
3257 0x78985e216314dafd => {
3258 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3259 let mut req = fidl::new_empty!(
3260 fidl::encoding::EmptyPayload,
3261 fidl::encoding::DefaultFuchsiaResourceDialect
3262 );
3263 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3264 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3265 Ok(DirectoryRequest::DeprecatedGetAttr {
3266 responder: DirectoryDeprecatedGetAttrResponder {
3267 control_handle: std::mem::ManuallyDrop::new(control_handle),
3268 tx_id: header.tx_id,
3269 },
3270 })
3271 }
3272 0x4186c0f40d938f46 => {
3273 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3274 let mut req = fidl::new_empty!(
3275 NodeDeprecatedSetAttrRequest,
3276 fidl::encoding::DefaultFuchsiaResourceDialect
3277 );
3278 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
3279 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3280 Ok(DirectoryRequest::DeprecatedSetAttr {
3281 flags: req.flags,
3282 attributes: req.attributes,
3283
3284 responder: DirectoryDeprecatedSetAttrResponder {
3285 control_handle: std::mem::ManuallyDrop::new(control_handle),
3286 tx_id: header.tx_id,
3287 },
3288 })
3289 }
3290 0x5b88fffb8eda3aa1 => {
3291 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3292 let mut req = fidl::new_empty!(
3293 fidl::encoding::EmptyPayload,
3294 fidl::encoding::DefaultFuchsiaResourceDialect
3295 );
3296 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3297 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3298 Ok(DirectoryRequest::DeprecatedGetFlags {
3299 responder: DirectoryDeprecatedGetFlagsResponder {
3300 control_handle: std::mem::ManuallyDrop::new(control_handle),
3301 tx_id: header.tx_id,
3302 },
3303 })
3304 }
3305 0x5295b76c71fde733 => {
3306 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3307 let mut req = fidl::new_empty!(
3308 NodeDeprecatedSetFlagsRequest,
3309 fidl::encoding::DefaultFuchsiaResourceDialect
3310 );
3311 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3312 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3313 Ok(DirectoryRequest::DeprecatedSetFlags {
3314 flags: req.flags,
3315
3316 responder: DirectoryDeprecatedSetFlagsResponder {
3317 control_handle: std::mem::ManuallyDrop::new(control_handle),
3318 tx_id: header.tx_id,
3319 },
3320 })
3321 }
3322 0x176eb318f64ec23 => {
3323 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3324 let mut req = fidl::new_empty!(
3325 fidl::encoding::EmptyPayload,
3326 fidl::encoding::DefaultFuchsiaResourceDialect
3327 );
3328 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3329 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3330 Ok(DirectoryRequest::GetFlags {
3331 responder: DirectoryGetFlagsResponder {
3332 control_handle: std::mem::ManuallyDrop::new(control_handle),
3333 tx_id: header.tx_id,
3334 },
3335 })
3336 }
3337 0x55a8028685791ea8 => {
3338 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3339 let mut req = fidl::new_empty!(
3340 NodeSetFlagsRequest,
3341 fidl::encoding::DefaultFuchsiaResourceDialect
3342 );
3343 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3344 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3345 Ok(DirectoryRequest::SetFlags {
3346 flags: req.flags,
3347
3348 responder: DirectorySetFlagsResponder {
3349 control_handle: std::mem::ManuallyDrop::new(control_handle),
3350 tx_id: header.tx_id,
3351 },
3352 })
3353 }
3354 0x6f344a1c6b0a0610 => {
3355 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3356 let mut req = fidl::new_empty!(
3357 fidl::encoding::EmptyPayload,
3358 fidl::encoding::DefaultFuchsiaResourceDialect
3359 );
3360 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3361 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3362 Ok(DirectoryRequest::QueryFilesystem {
3363 responder: DirectoryQueryFilesystemResponder {
3364 control_handle: std::mem::ManuallyDrop::new(control_handle),
3365 tx_id: header.tx_id,
3366 },
3367 })
3368 }
3369 0x3d4396a638ea053b => {
3370 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3371 let mut req = fidl::new_empty!(
3372 NodeGetAttributesRequest,
3373 fidl::encoding::DefaultFuchsiaResourceDialect
3374 );
3375 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3376 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3377 Ok(DirectoryRequest::GetAttributes {
3378 query: req.query,
3379
3380 responder: DirectoryGetAttributesResponder {
3381 control_handle: std::mem::ManuallyDrop::new(control_handle),
3382 tx_id: header.tx_id,
3383 },
3384 })
3385 }
3386 0x3308c1da5a89bf08 => {
3387 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3388 let mut req = fidl::new_empty!(
3389 MutableNodeAttributes,
3390 fidl::encoding::DefaultFuchsiaResourceDialect
3391 );
3392 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
3393 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3394 Ok(DirectoryRequest::UpdateAttributes {
3395 payload: req,
3396 responder: DirectoryUpdateAttributesResponder {
3397 control_handle: std::mem::ManuallyDrop::new(control_handle),
3398 tx_id: header.tx_id,
3399 },
3400 })
3401 }
3402 0x2c5c27ca0ab5dc49 => {
3403 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3404 let mut req = fidl::new_empty!(
3405 fidl::encoding::EmptyPayload,
3406 fidl::encoding::DefaultFuchsiaResourceDialect
3407 );
3408 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3409 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3410 Ok(DirectoryRequest::Sync {
3411 responder: DirectorySyncResponder {
3412 control_handle: std::mem::ManuallyDrop::new(control_handle),
3413 tx_id: header.tx_id,
3414 },
3415 })
3416 }
3417 0x4b61033de007fcd0 => {
3418 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3419 let mut req = fidl::new_empty!(
3420 NodeListExtendedAttributesRequest,
3421 fidl::encoding::DefaultFuchsiaResourceDialect
3422 );
3423 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3424 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3425 Ok(DirectoryRequest::ListExtendedAttributes {
3426 iterator: req.iterator,
3427
3428 control_handle,
3429 })
3430 }
3431 0x45ffa3ccfdeb76db => {
3432 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3433 let mut req = fidl::new_empty!(
3434 NodeGetExtendedAttributeRequest,
3435 fidl::encoding::DefaultFuchsiaResourceDialect
3436 );
3437 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3438 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3439 Ok(DirectoryRequest::GetExtendedAttribute {
3440 name: req.name,
3441
3442 responder: DirectoryGetExtendedAttributeResponder {
3443 control_handle: std::mem::ManuallyDrop::new(control_handle),
3444 tx_id: header.tx_id,
3445 },
3446 })
3447 }
3448 0x4a951362f681f23c => {
3449 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3450 let mut req = fidl::new_empty!(
3451 NodeSetExtendedAttributeRequest,
3452 fidl::encoding::DefaultFuchsiaResourceDialect
3453 );
3454 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3455 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3456 Ok(DirectoryRequest::SetExtendedAttribute {
3457 name: req.name,
3458 value: req.value,
3459 mode: req.mode,
3460
3461 responder: DirectorySetExtendedAttributeResponder {
3462 control_handle: std::mem::ManuallyDrop::new(control_handle),
3463 tx_id: header.tx_id,
3464 },
3465 })
3466 }
3467 0x7a0b9f3a9bf9032d => {
3468 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3469 let mut req = fidl::new_empty!(
3470 NodeRemoveExtendedAttributeRequest,
3471 fidl::encoding::DefaultFuchsiaResourceDialect
3472 );
3473 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3474 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3475 Ok(DirectoryRequest::RemoveExtendedAttribute {
3476 name: req.name,
3477
3478 responder: DirectoryRemoveExtendedAttributeResponder {
3479 control_handle: std::mem::ManuallyDrop::new(control_handle),
3480 tx_id: header.tx_id,
3481 },
3482 })
3483 }
3484 0x2c5044561d685ec0 => {
3485 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3486 let mut req = fidl::new_empty!(
3487 DirectoryDeprecatedOpenRequest,
3488 fidl::encoding::DefaultFuchsiaResourceDialect
3489 );
3490 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3491 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3492 Ok(DirectoryRequest::DeprecatedOpen {
3493 flags: req.flags,
3494 mode: req.mode,
3495 path: req.path,
3496 object: req.object,
3497
3498 control_handle,
3499 })
3500 }
3501 0x568ddcb9a9cbb6d9 => {
3502 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3503 let mut req = fidl::new_empty!(
3504 DirectoryOpenRequest,
3505 fidl::encoding::DefaultFuchsiaResourceDialect
3506 );
3507 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3508 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3509 Ok(DirectoryRequest::Open {
3510 path: req.path,
3511 flags: req.flags,
3512 options: req.options,
3513 object: req.object,
3514
3515 control_handle,
3516 })
3517 }
3518 0x3582806bf27faa0a => {
3519 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3520 let mut req = fidl::new_empty!(
3521 DirectoryReadDirentsRequest,
3522 fidl::encoding::DefaultFuchsiaResourceDialect
3523 );
3524 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
3525 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3526 Ok(DirectoryRequest::ReadDirents {
3527 max_bytes: req.max_bytes,
3528
3529 responder: DirectoryReadDirentsResponder {
3530 control_handle: std::mem::ManuallyDrop::new(control_handle),
3531 tx_id: header.tx_id,
3532 },
3533 })
3534 }
3535 0x16b1202af0f34c71 => {
3536 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3537 let mut req = fidl::new_empty!(
3538 fidl::encoding::EmptyPayload,
3539 fidl::encoding::DefaultFuchsiaResourceDialect
3540 );
3541 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3542 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3543 Ok(DirectoryRequest::Rewind {
3544 responder: DirectoryRewindResponder {
3545 control_handle: std::mem::ManuallyDrop::new(control_handle),
3546 tx_id: header.tx_id,
3547 },
3548 })
3549 }
3550 0x26ae9d18763c8655 => {
3551 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3552 let mut req = fidl::new_empty!(
3553 fidl::encoding::EmptyPayload,
3554 fidl::encoding::DefaultFuchsiaResourceDialect
3555 );
3556 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3557 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3558 Ok(DirectoryRequest::GetToken {
3559 responder: DirectoryGetTokenResponder {
3560 control_handle: std::mem::ManuallyDrop::new(control_handle),
3561 tx_id: header.tx_id,
3562 },
3563 })
3564 }
3565 0x740604c0c7c930e7 => {
3566 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3567 let mut req = fidl::new_empty!(
3568 DirectoryLinkRequest,
3569 fidl::encoding::DefaultFuchsiaResourceDialect
3570 );
3571 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
3572 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3573 Ok(DirectoryRequest::Link {
3574 src: req.src,
3575 dst_parent_token: req.dst_parent_token,
3576 dst: req.dst,
3577
3578 responder: DirectoryLinkResponder {
3579 control_handle: std::mem::ManuallyDrop::new(control_handle),
3580 tx_id: header.tx_id,
3581 },
3582 })
3583 }
3584 0x750a0326a78d7bed => {
3585 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3586 let mut req = fidl::new_empty!(
3587 DirectoryUnlinkRequest,
3588 fidl::encoding::DefaultFuchsiaResourceDialect
3589 );
3590 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3591 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3592 Ok(DirectoryRequest::Unlink {
3593 name: req.name,
3594 options: req.options,
3595
3596 responder: DirectoryUnlinkResponder {
3597 control_handle: std::mem::ManuallyDrop::new(control_handle),
3598 tx_id: header.tx_id,
3599 },
3600 })
3601 }
3602 0x7060e7723b9928de => {
3603 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3604 let mut req = fidl::new_empty!(
3605 DirectoryRenameRequest,
3606 fidl::encoding::DefaultFuchsiaResourceDialect
3607 );
3608 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
3609 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3610 Ok(DirectoryRequest::Rename {
3611 src: req.src,
3612 dst_parent_token: req.dst_parent_token,
3613 dst: req.dst,
3614
3615 responder: DirectoryRenameResponder {
3616 control_handle: std::mem::ManuallyDrop::new(control_handle),
3617 tx_id: header.tx_id,
3618 },
3619 })
3620 }
3621 0x21ce0f19ec043889 => {
3622 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3623 let mut req = fidl::new_empty!(
3624 DirectoryCreateSymlinkRequest,
3625 fidl::encoding::DefaultFuchsiaResourceDialect
3626 );
3627 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3628 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3629 Ok(DirectoryRequest::CreateSymlink {
3630 name: req.name,
3631 target: req.target,
3632 connection: req.connection,
3633
3634 responder: DirectoryCreateSymlinkResponder {
3635 control_handle: std::mem::ManuallyDrop::new(control_handle),
3636 tx_id: header.tx_id,
3637 },
3638 })
3639 }
3640 0x5717193a59d66d91 => {
3641 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3642 let mut req = fidl::new_empty!(
3643 DirectoryWatchRequest,
3644 fidl::encoding::DefaultFuchsiaResourceDialect
3645 );
3646 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
3647 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3648 Ok(DirectoryRequest::Watch {
3649 mask: req.mask,
3650 options: req.options,
3651 watcher: req.watcher,
3652
3653 responder: DirectoryWatchResponder {
3654 control_handle: std::mem::ManuallyDrop::new(control_handle),
3655 tx_id: header.tx_id,
3656 },
3657 })
3658 }
3659 _ if header.tx_id == 0
3660 && header
3661 .dynamic_flags()
3662 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3663 {
3664 Ok(DirectoryRequest::_UnknownMethod {
3665 ordinal: header.ordinal,
3666 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3667 method_type: fidl::MethodType::OneWay,
3668 })
3669 }
3670 _ if header
3671 .dynamic_flags()
3672 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3673 {
3674 this.inner.send_framework_err(
3675 fidl::encoding::FrameworkErr::UnknownMethod,
3676 header.tx_id,
3677 header.ordinal,
3678 header.dynamic_flags(),
3679 (bytes, handles),
3680 )?;
3681 Ok(DirectoryRequest::_UnknownMethod {
3682 ordinal: header.ordinal,
3683 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3684 method_type: fidl::MethodType::TwoWay,
3685 })
3686 }
3687 _ => Err(fidl::Error::UnknownOrdinal {
3688 ordinal: header.ordinal,
3689 protocol_name:
3690 <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3691 }),
3692 }))
3693 },
3694 )
3695 }
3696}
3697
3698#[derive(Debug)]
3700pub enum DirectoryRequest {
3701 AdvisoryLock {
3725 request: AdvisoryLockRequest,
3726 responder: DirectoryAdvisoryLockResponder,
3727 },
3728 Clone {
3729 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
3730 control_handle: DirectoryControlHandle,
3731 },
3732 Close {
3743 responder: DirectoryCloseResponder,
3744 },
3745 Query {
3746 responder: DirectoryQueryResponder,
3747 },
3748 DeprecatedClone {
3750 flags: OpenFlags,
3751 object: fidl::endpoints::ServerEnd<NodeMarker>,
3752 control_handle: DirectoryControlHandle,
3753 },
3754 DeprecatedGetAttr {
3756 responder: DirectoryDeprecatedGetAttrResponder,
3757 },
3758 DeprecatedSetAttr {
3760 flags: NodeAttributeFlags,
3761 attributes: NodeAttributes,
3762 responder: DirectoryDeprecatedSetAttrResponder,
3763 },
3764 DeprecatedGetFlags {
3766 responder: DirectoryDeprecatedGetFlagsResponder,
3767 },
3768 DeprecatedSetFlags {
3770 flags: OpenFlags,
3771 responder: DirectoryDeprecatedSetFlagsResponder,
3772 },
3773 GetFlags {
3782 responder: DirectoryGetFlagsResponder,
3783 },
3784 SetFlags {
3794 flags: Flags,
3795 responder: DirectorySetFlagsResponder,
3796 },
3797 QueryFilesystem {
3799 responder: DirectoryQueryFilesystemResponder,
3800 },
3801 GetAttributes {
3815 query: NodeAttributesQuery,
3816 responder: DirectoryGetAttributesResponder,
3817 },
3818 UpdateAttributes {
3827 payload: MutableNodeAttributes,
3828 responder: DirectoryUpdateAttributesResponder,
3829 },
3830 Sync {
3840 responder: DirectorySyncResponder,
3841 },
3842 ListExtendedAttributes {
3851 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
3852 control_handle: DirectoryControlHandle,
3853 },
3854 GetExtendedAttribute {
3861 name: Vec<u8>,
3862 responder: DirectoryGetExtendedAttributeResponder,
3863 },
3864 SetExtendedAttribute {
3872 name: Vec<u8>,
3873 value: ExtendedAttributeValue,
3874 mode: SetExtendedAttributeMode,
3875 responder: DirectorySetExtendedAttributeResponder,
3876 },
3877 RemoveExtendedAttribute {
3883 name: Vec<u8>,
3884 responder: DirectoryRemoveExtendedAttributeResponder,
3885 },
3886 DeprecatedOpen {
3888 flags: OpenFlags,
3889 mode: ModeType,
3890 path: String,
3891 object: fidl::endpoints::ServerEnd<NodeMarker>,
3892 control_handle: DirectoryControlHandle,
3893 },
3894 Open {
3901 path: String,
3902 flags: Flags,
3903 options: Options,
3904 object: fidl::Channel,
3905 control_handle: DirectoryControlHandle,
3906 },
3907 ReadDirents {
3933 max_bytes: u64,
3934 responder: DirectoryReadDirentsResponder,
3935 },
3936 Rewind {
3940 responder: DirectoryRewindResponder,
3941 },
3942 GetToken {
3949 responder: DirectoryGetTokenResponder,
3950 },
3951 Link {
3968 src: String,
3969 dst_parent_token: fidl::Handle,
3970 dst: String,
3971 responder: DirectoryLinkResponder,
3972 },
3973 Unlink {
3998 name: String,
3999 options: UnlinkOptions,
4000 responder: DirectoryUnlinkResponder,
4001 },
4002 Rename {
4028 src: String,
4029 dst_parent_token: fidl::Event,
4030 dst: String,
4031 responder: DirectoryRenameResponder,
4032 },
4033 CreateSymlink {
4048 name: String,
4049 target: Vec<u8>,
4050 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4051 responder: DirectoryCreateSymlinkResponder,
4052 },
4053 Watch {
4060 mask: WatchMask,
4061 options: u32,
4062 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4063 responder: DirectoryWatchResponder,
4064 },
4065 #[non_exhaustive]
4067 _UnknownMethod {
4068 ordinal: u64,
4070 control_handle: DirectoryControlHandle,
4071 method_type: fidl::MethodType,
4072 },
4073}
4074
4075impl DirectoryRequest {
4076 #[allow(irrefutable_let_patterns)]
4077 pub fn into_advisory_lock(
4078 self,
4079 ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
4080 if let DirectoryRequest::AdvisoryLock { request, responder } = self {
4081 Some((request, responder))
4082 } else {
4083 None
4084 }
4085 }
4086
4087 #[allow(irrefutable_let_patterns)]
4088 pub fn into_clone(
4089 self,
4090 ) -> Option<(
4091 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
4092 DirectoryControlHandle,
4093 )> {
4094 if let DirectoryRequest::Clone { request, control_handle } = self {
4095 Some((request, control_handle))
4096 } else {
4097 None
4098 }
4099 }
4100
4101 #[allow(irrefutable_let_patterns)]
4102 pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
4103 if let DirectoryRequest::Close { responder } = self {
4104 Some((responder))
4105 } else {
4106 None
4107 }
4108 }
4109
4110 #[allow(irrefutable_let_patterns)]
4111 pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
4112 if let DirectoryRequest::Query { responder } = self {
4113 Some((responder))
4114 } else {
4115 None
4116 }
4117 }
4118
4119 #[allow(irrefutable_let_patterns)]
4120 pub fn into_deprecated_clone(
4121 self,
4122 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, DirectoryControlHandle)> {
4123 if let DirectoryRequest::DeprecatedClone { flags, object, control_handle } = self {
4124 Some((flags, object, control_handle))
4125 } else {
4126 None
4127 }
4128 }
4129
4130 #[allow(irrefutable_let_patterns)]
4131 pub fn into_deprecated_get_attr(self) -> Option<(DirectoryDeprecatedGetAttrResponder)> {
4132 if let DirectoryRequest::DeprecatedGetAttr { responder } = self {
4133 Some((responder))
4134 } else {
4135 None
4136 }
4137 }
4138
4139 #[allow(irrefutable_let_patterns)]
4140 pub fn into_deprecated_set_attr(
4141 self,
4142 ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
4143 if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
4144 Some((flags, attributes, responder))
4145 } else {
4146 None
4147 }
4148 }
4149
4150 #[allow(irrefutable_let_patterns)]
4151 pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
4152 if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
4153 Some((responder))
4154 } else {
4155 None
4156 }
4157 }
4158
4159 #[allow(irrefutable_let_patterns)]
4160 pub fn into_deprecated_set_flags(
4161 self,
4162 ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
4163 if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
4164 Some((flags, responder))
4165 } else {
4166 None
4167 }
4168 }
4169
4170 #[allow(irrefutable_let_patterns)]
4171 pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
4172 if let DirectoryRequest::GetFlags { responder } = self {
4173 Some((responder))
4174 } else {
4175 None
4176 }
4177 }
4178
4179 #[allow(irrefutable_let_patterns)]
4180 pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
4181 if let DirectoryRequest::SetFlags { flags, responder } = self {
4182 Some((flags, responder))
4183 } else {
4184 None
4185 }
4186 }
4187
4188 #[allow(irrefutable_let_patterns)]
4189 pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
4190 if let DirectoryRequest::QueryFilesystem { responder } = self {
4191 Some((responder))
4192 } else {
4193 None
4194 }
4195 }
4196
4197 #[allow(irrefutable_let_patterns)]
4198 pub fn into_get_attributes(
4199 self,
4200 ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
4201 if let DirectoryRequest::GetAttributes { query, responder } = self {
4202 Some((query, responder))
4203 } else {
4204 None
4205 }
4206 }
4207
4208 #[allow(irrefutable_let_patterns)]
4209 pub fn into_update_attributes(
4210 self,
4211 ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
4212 if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
4213 Some((payload, responder))
4214 } else {
4215 None
4216 }
4217 }
4218
4219 #[allow(irrefutable_let_patterns)]
4220 pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
4221 if let DirectoryRequest::Sync { responder } = self {
4222 Some((responder))
4223 } else {
4224 None
4225 }
4226 }
4227
4228 #[allow(irrefutable_let_patterns)]
4229 pub fn into_list_extended_attributes(
4230 self,
4231 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, DirectoryControlHandle)>
4232 {
4233 if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
4234 Some((iterator, control_handle))
4235 } else {
4236 None
4237 }
4238 }
4239
4240 #[allow(irrefutable_let_patterns)]
4241 pub fn into_get_extended_attribute(
4242 self,
4243 ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
4244 if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
4245 Some((name, responder))
4246 } else {
4247 None
4248 }
4249 }
4250
4251 #[allow(irrefutable_let_patterns)]
4252 pub fn into_set_extended_attribute(
4253 self,
4254 ) -> Option<(
4255 Vec<u8>,
4256 ExtendedAttributeValue,
4257 SetExtendedAttributeMode,
4258 DirectorySetExtendedAttributeResponder,
4259 )> {
4260 if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
4261 Some((name, value, mode, responder))
4262 } else {
4263 None
4264 }
4265 }
4266
4267 #[allow(irrefutable_let_patterns)]
4268 pub fn into_remove_extended_attribute(
4269 self,
4270 ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
4271 if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
4272 Some((name, responder))
4273 } else {
4274 None
4275 }
4276 }
4277
4278 #[allow(irrefutable_let_patterns)]
4279 pub fn into_deprecated_open(
4280 self,
4281 ) -> Option<(
4282 OpenFlags,
4283 ModeType,
4284 String,
4285 fidl::endpoints::ServerEnd<NodeMarker>,
4286 DirectoryControlHandle,
4287 )> {
4288 if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
4289 {
4290 Some((flags, mode, path, object, control_handle))
4291 } else {
4292 None
4293 }
4294 }
4295
4296 #[allow(irrefutable_let_patterns)]
4297 pub fn into_open(
4298 self,
4299 ) -> Option<(String, Flags, Options, fidl::Channel, DirectoryControlHandle)> {
4300 if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
4301 Some((path, flags, options, object, control_handle))
4302 } else {
4303 None
4304 }
4305 }
4306
4307 #[allow(irrefutable_let_patterns)]
4308 pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
4309 if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
4310 Some((max_bytes, responder))
4311 } else {
4312 None
4313 }
4314 }
4315
4316 #[allow(irrefutable_let_patterns)]
4317 pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
4318 if let DirectoryRequest::Rewind { responder } = self {
4319 Some((responder))
4320 } else {
4321 None
4322 }
4323 }
4324
4325 #[allow(irrefutable_let_patterns)]
4326 pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
4327 if let DirectoryRequest::GetToken { responder } = self {
4328 Some((responder))
4329 } else {
4330 None
4331 }
4332 }
4333
4334 #[allow(irrefutable_let_patterns)]
4335 pub fn into_link(self) -> Option<(String, fidl::Handle, String, DirectoryLinkResponder)> {
4336 if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
4337 Some((src, dst_parent_token, dst, responder))
4338 } else {
4339 None
4340 }
4341 }
4342
4343 #[allow(irrefutable_let_patterns)]
4344 pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
4345 if let DirectoryRequest::Unlink { name, options, responder } = self {
4346 Some((name, options, responder))
4347 } else {
4348 None
4349 }
4350 }
4351
4352 #[allow(irrefutable_let_patterns)]
4353 pub fn into_rename(self) -> Option<(String, fidl::Event, String, DirectoryRenameResponder)> {
4354 if let DirectoryRequest::Rename { 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_create_symlink(
4363 self,
4364 ) -> Option<(
4365 String,
4366 Vec<u8>,
4367 Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4368 DirectoryCreateSymlinkResponder,
4369 )> {
4370 if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
4371 Some((name, target, connection, responder))
4372 } else {
4373 None
4374 }
4375 }
4376
4377 #[allow(irrefutable_let_patterns)]
4378 pub fn into_watch(
4379 self,
4380 ) -> Option<(
4381 WatchMask,
4382 u32,
4383 fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4384 DirectoryWatchResponder,
4385 )> {
4386 if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
4387 Some((mask, options, watcher, responder))
4388 } else {
4389 None
4390 }
4391 }
4392
4393 pub fn method_name(&self) -> &'static str {
4395 match *self {
4396 DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
4397 DirectoryRequest::Clone { .. } => "clone",
4398 DirectoryRequest::Close { .. } => "close",
4399 DirectoryRequest::Query { .. } => "query",
4400 DirectoryRequest::DeprecatedClone { .. } => "deprecated_clone",
4401 DirectoryRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
4402 DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
4403 DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
4404 DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
4405 DirectoryRequest::GetFlags { .. } => "get_flags",
4406 DirectoryRequest::SetFlags { .. } => "set_flags",
4407 DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
4408 DirectoryRequest::GetAttributes { .. } => "get_attributes",
4409 DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
4410 DirectoryRequest::Sync { .. } => "sync",
4411 DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
4412 DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
4413 DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
4414 DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
4415 DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
4416 DirectoryRequest::Open { .. } => "open",
4417 DirectoryRequest::ReadDirents { .. } => "read_dirents",
4418 DirectoryRequest::Rewind { .. } => "rewind",
4419 DirectoryRequest::GetToken { .. } => "get_token",
4420 DirectoryRequest::Link { .. } => "link",
4421 DirectoryRequest::Unlink { .. } => "unlink",
4422 DirectoryRequest::Rename { .. } => "rename",
4423 DirectoryRequest::CreateSymlink { .. } => "create_symlink",
4424 DirectoryRequest::Watch { .. } => "watch",
4425 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4426 "unknown one-way method"
4427 }
4428 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4429 "unknown two-way method"
4430 }
4431 }
4432 }
4433}
4434
4435#[derive(Debug, Clone)]
4436pub struct DirectoryControlHandle {
4437 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4438}
4439
4440impl fidl::endpoints::ControlHandle for DirectoryControlHandle {
4441 fn shutdown(&self) {
4442 self.inner.shutdown()
4443 }
4444 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4445 self.inner.shutdown_with_epitaph(status)
4446 }
4447
4448 fn is_closed(&self) -> bool {
4449 self.inner.channel().is_closed()
4450 }
4451 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4452 self.inner.channel().on_closed()
4453 }
4454
4455 #[cfg(target_os = "fuchsia")]
4456 fn signal_peer(
4457 &self,
4458 clear_mask: zx::Signals,
4459 set_mask: zx::Signals,
4460 ) -> Result<(), zx_status::Status> {
4461 use fidl::Peered;
4462 self.inner.channel().signal_peer(clear_mask, set_mask)
4463 }
4464}
4465
4466impl DirectoryControlHandle {
4467 pub fn send_on_open_(
4468 &self,
4469 mut s: i32,
4470 mut info: Option<NodeInfoDeprecated>,
4471 ) -> Result<(), fidl::Error> {
4472 self.inner.send::<NodeOnOpenRequest>(
4473 (s, info.as_mut()),
4474 0,
4475 0x7fc7bbb1dbfd1972,
4476 fidl::encoding::DynamicFlags::empty(),
4477 )
4478 }
4479
4480 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
4481 self.inner.send::<Representation>(
4482 &mut payload,
4483 0,
4484 0x5cb40567d80a510c,
4485 fidl::encoding::DynamicFlags::empty(),
4486 )
4487 }
4488}
4489
4490#[must_use = "FIDL methods require a response to be sent"]
4491#[derive(Debug)]
4492pub struct DirectoryAdvisoryLockResponder {
4493 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4494 tx_id: u32,
4495}
4496
4497impl std::ops::Drop for DirectoryAdvisoryLockResponder {
4501 fn drop(&mut self) {
4502 self.control_handle.shutdown();
4503 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4505 }
4506}
4507
4508impl fidl::endpoints::Responder for DirectoryAdvisoryLockResponder {
4509 type ControlHandle = DirectoryControlHandle;
4510
4511 fn control_handle(&self) -> &DirectoryControlHandle {
4512 &self.control_handle
4513 }
4514
4515 fn drop_without_shutdown(mut self) {
4516 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4518 std::mem::forget(self);
4520 }
4521}
4522
4523impl DirectoryAdvisoryLockResponder {
4524 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4528 let _result = self.send_raw(result);
4529 if _result.is_err() {
4530 self.control_handle.shutdown();
4531 }
4532 self.drop_without_shutdown();
4533 _result
4534 }
4535
4536 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4538 let _result = self.send_raw(result);
4539 self.drop_without_shutdown();
4540 _result
4541 }
4542
4543 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4544 self.control_handle
4545 .inner
4546 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4547 result,
4548 self.tx_id,
4549 0x6ee9c0ad53ec87aa,
4550 fidl::encoding::DynamicFlags::empty(),
4551 )
4552 }
4553}
4554
4555#[must_use = "FIDL methods require a response to be sent"]
4556#[derive(Debug)]
4557pub struct DirectoryCloseResponder {
4558 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4559 tx_id: u32,
4560}
4561
4562impl std::ops::Drop for DirectoryCloseResponder {
4566 fn drop(&mut self) {
4567 self.control_handle.shutdown();
4568 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4570 }
4571}
4572
4573impl fidl::endpoints::Responder for DirectoryCloseResponder {
4574 type ControlHandle = DirectoryControlHandle;
4575
4576 fn control_handle(&self) -> &DirectoryControlHandle {
4577 &self.control_handle
4578 }
4579
4580 fn drop_without_shutdown(mut self) {
4581 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4583 std::mem::forget(self);
4585 }
4586}
4587
4588impl DirectoryCloseResponder {
4589 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4593 let _result = self.send_raw(result);
4594 if _result.is_err() {
4595 self.control_handle.shutdown();
4596 }
4597 self.drop_without_shutdown();
4598 _result
4599 }
4600
4601 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4603 let _result = self.send_raw(result);
4604 self.drop_without_shutdown();
4605 _result
4606 }
4607
4608 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4609 self.control_handle
4610 .inner
4611 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4612 result,
4613 self.tx_id,
4614 0x5ac5d459ad7f657e,
4615 fidl::encoding::DynamicFlags::empty(),
4616 )
4617 }
4618}
4619
4620#[must_use = "FIDL methods require a response to be sent"]
4621#[derive(Debug)]
4622pub struct DirectoryQueryResponder {
4623 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4624 tx_id: u32,
4625}
4626
4627impl std::ops::Drop for DirectoryQueryResponder {
4631 fn drop(&mut self) {
4632 self.control_handle.shutdown();
4633 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4635 }
4636}
4637
4638impl fidl::endpoints::Responder for DirectoryQueryResponder {
4639 type ControlHandle = DirectoryControlHandle;
4640
4641 fn control_handle(&self) -> &DirectoryControlHandle {
4642 &self.control_handle
4643 }
4644
4645 fn drop_without_shutdown(mut self) {
4646 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4648 std::mem::forget(self);
4650 }
4651}
4652
4653impl DirectoryQueryResponder {
4654 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4658 let _result = self.send_raw(protocol);
4659 if _result.is_err() {
4660 self.control_handle.shutdown();
4661 }
4662 self.drop_without_shutdown();
4663 _result
4664 }
4665
4666 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4668 let _result = self.send_raw(protocol);
4669 self.drop_without_shutdown();
4670 _result
4671 }
4672
4673 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4674 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
4675 (protocol,),
4676 self.tx_id,
4677 0x2658edee9decfc06,
4678 fidl::encoding::DynamicFlags::empty(),
4679 )
4680 }
4681}
4682
4683#[must_use = "FIDL methods require a response to be sent"]
4684#[derive(Debug)]
4685pub struct DirectoryDeprecatedGetAttrResponder {
4686 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4687 tx_id: u32,
4688}
4689
4690impl std::ops::Drop for DirectoryDeprecatedGetAttrResponder {
4694 fn drop(&mut self) {
4695 self.control_handle.shutdown();
4696 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4698 }
4699}
4700
4701impl fidl::endpoints::Responder for DirectoryDeprecatedGetAttrResponder {
4702 type ControlHandle = DirectoryControlHandle;
4703
4704 fn control_handle(&self) -> &DirectoryControlHandle {
4705 &self.control_handle
4706 }
4707
4708 fn drop_without_shutdown(mut self) {
4709 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4711 std::mem::forget(self);
4713 }
4714}
4715
4716impl DirectoryDeprecatedGetAttrResponder {
4717 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4721 let _result = self.send_raw(s, attributes);
4722 if _result.is_err() {
4723 self.control_handle.shutdown();
4724 }
4725 self.drop_without_shutdown();
4726 _result
4727 }
4728
4729 pub fn send_no_shutdown_on_err(
4731 self,
4732 mut s: i32,
4733 mut attributes: &NodeAttributes,
4734 ) -> Result<(), fidl::Error> {
4735 let _result = self.send_raw(s, attributes);
4736 self.drop_without_shutdown();
4737 _result
4738 }
4739
4740 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4741 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
4742 (s, attributes),
4743 self.tx_id,
4744 0x78985e216314dafd,
4745 fidl::encoding::DynamicFlags::empty(),
4746 )
4747 }
4748}
4749
4750#[must_use = "FIDL methods require a response to be sent"]
4751#[derive(Debug)]
4752pub struct DirectoryDeprecatedSetAttrResponder {
4753 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4754 tx_id: u32,
4755}
4756
4757impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
4761 fn drop(&mut self) {
4762 self.control_handle.shutdown();
4763 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4765 }
4766}
4767
4768impl fidl::endpoints::Responder for DirectoryDeprecatedSetAttrResponder {
4769 type ControlHandle = DirectoryControlHandle;
4770
4771 fn control_handle(&self) -> &DirectoryControlHandle {
4772 &self.control_handle
4773 }
4774
4775 fn drop_without_shutdown(mut self) {
4776 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4778 std::mem::forget(self);
4780 }
4781}
4782
4783impl DirectoryDeprecatedSetAttrResponder {
4784 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4788 let _result = self.send_raw(s);
4789 if _result.is_err() {
4790 self.control_handle.shutdown();
4791 }
4792 self.drop_without_shutdown();
4793 _result
4794 }
4795
4796 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4798 let _result = self.send_raw(s);
4799 self.drop_without_shutdown();
4800 _result
4801 }
4802
4803 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4804 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
4805 (s,),
4806 self.tx_id,
4807 0x4186c0f40d938f46,
4808 fidl::encoding::DynamicFlags::empty(),
4809 )
4810 }
4811}
4812
4813#[must_use = "FIDL methods require a response to be sent"]
4814#[derive(Debug)]
4815pub struct DirectoryDeprecatedGetFlagsResponder {
4816 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4817 tx_id: u32,
4818}
4819
4820impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
4824 fn drop(&mut self) {
4825 self.control_handle.shutdown();
4826 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4828 }
4829}
4830
4831impl fidl::endpoints::Responder for DirectoryDeprecatedGetFlagsResponder {
4832 type ControlHandle = DirectoryControlHandle;
4833
4834 fn control_handle(&self) -> &DirectoryControlHandle {
4835 &self.control_handle
4836 }
4837
4838 fn drop_without_shutdown(mut self) {
4839 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4841 std::mem::forget(self);
4843 }
4844}
4845
4846impl DirectoryDeprecatedGetFlagsResponder {
4847 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4851 let _result = self.send_raw(s, flags);
4852 if _result.is_err() {
4853 self.control_handle.shutdown();
4854 }
4855 self.drop_without_shutdown();
4856 _result
4857 }
4858
4859 pub fn send_no_shutdown_on_err(
4861 self,
4862 mut s: i32,
4863 mut flags: OpenFlags,
4864 ) -> Result<(), fidl::Error> {
4865 let _result = self.send_raw(s, flags);
4866 self.drop_without_shutdown();
4867 _result
4868 }
4869
4870 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4871 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
4872 (s, flags),
4873 self.tx_id,
4874 0x5b88fffb8eda3aa1,
4875 fidl::encoding::DynamicFlags::empty(),
4876 )
4877 }
4878}
4879
4880#[must_use = "FIDL methods require a response to be sent"]
4881#[derive(Debug)]
4882pub struct DirectoryDeprecatedSetFlagsResponder {
4883 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4884 tx_id: u32,
4885}
4886
4887impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
4891 fn drop(&mut self) {
4892 self.control_handle.shutdown();
4893 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4895 }
4896}
4897
4898impl fidl::endpoints::Responder for DirectoryDeprecatedSetFlagsResponder {
4899 type ControlHandle = DirectoryControlHandle;
4900
4901 fn control_handle(&self) -> &DirectoryControlHandle {
4902 &self.control_handle
4903 }
4904
4905 fn drop_without_shutdown(mut self) {
4906 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4908 std::mem::forget(self);
4910 }
4911}
4912
4913impl DirectoryDeprecatedSetFlagsResponder {
4914 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4918 let _result = self.send_raw(s);
4919 if _result.is_err() {
4920 self.control_handle.shutdown();
4921 }
4922 self.drop_without_shutdown();
4923 _result
4924 }
4925
4926 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4928 let _result = self.send_raw(s);
4929 self.drop_without_shutdown();
4930 _result
4931 }
4932
4933 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4934 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
4935 (s,),
4936 self.tx_id,
4937 0x5295b76c71fde733,
4938 fidl::encoding::DynamicFlags::empty(),
4939 )
4940 }
4941}
4942
4943#[must_use = "FIDL methods require a response to be sent"]
4944#[derive(Debug)]
4945pub struct DirectoryGetFlagsResponder {
4946 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4947 tx_id: u32,
4948}
4949
4950impl std::ops::Drop for DirectoryGetFlagsResponder {
4954 fn drop(&mut self) {
4955 self.control_handle.shutdown();
4956 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4958 }
4959}
4960
4961impl fidl::endpoints::Responder for DirectoryGetFlagsResponder {
4962 type ControlHandle = DirectoryControlHandle;
4963
4964 fn control_handle(&self) -> &DirectoryControlHandle {
4965 &self.control_handle
4966 }
4967
4968 fn drop_without_shutdown(mut self) {
4969 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4971 std::mem::forget(self);
4973 }
4974}
4975
4976impl DirectoryGetFlagsResponder {
4977 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4981 let _result = self.send_raw(result);
4982 if _result.is_err() {
4983 self.control_handle.shutdown();
4984 }
4985 self.drop_without_shutdown();
4986 _result
4987 }
4988
4989 pub fn send_no_shutdown_on_err(
4991 self,
4992 mut result: Result<Flags, i32>,
4993 ) -> Result<(), fidl::Error> {
4994 let _result = self.send_raw(result);
4995 self.drop_without_shutdown();
4996 _result
4997 }
4998
4999 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
5000 self.control_handle
5001 .inner
5002 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
5003 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
5004 self.tx_id,
5005 0x176eb318f64ec23,
5006 fidl::encoding::DynamicFlags::FLEXIBLE,
5007 )
5008 }
5009}
5010
5011#[must_use = "FIDL methods require a response to be sent"]
5012#[derive(Debug)]
5013pub struct DirectorySetFlagsResponder {
5014 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5015 tx_id: u32,
5016}
5017
5018impl std::ops::Drop for DirectorySetFlagsResponder {
5022 fn drop(&mut self) {
5023 self.control_handle.shutdown();
5024 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5026 }
5027}
5028
5029impl fidl::endpoints::Responder for DirectorySetFlagsResponder {
5030 type ControlHandle = DirectoryControlHandle;
5031
5032 fn control_handle(&self) -> &DirectoryControlHandle {
5033 &self.control_handle
5034 }
5035
5036 fn drop_without_shutdown(mut self) {
5037 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5039 std::mem::forget(self);
5041 }
5042}
5043
5044impl DirectorySetFlagsResponder {
5045 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5049 let _result = self.send_raw(result);
5050 if _result.is_err() {
5051 self.control_handle.shutdown();
5052 }
5053 self.drop_without_shutdown();
5054 _result
5055 }
5056
5057 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5059 let _result = self.send_raw(result);
5060 self.drop_without_shutdown();
5061 _result
5062 }
5063
5064 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5065 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5066 fidl::encoding::EmptyStruct,
5067 i32,
5068 >>(
5069 fidl::encoding::FlexibleResult::new(result),
5070 self.tx_id,
5071 0x55a8028685791ea8,
5072 fidl::encoding::DynamicFlags::FLEXIBLE,
5073 )
5074 }
5075}
5076
5077#[must_use = "FIDL methods require a response to be sent"]
5078#[derive(Debug)]
5079pub struct DirectoryQueryFilesystemResponder {
5080 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5081 tx_id: u32,
5082}
5083
5084impl std::ops::Drop for DirectoryQueryFilesystemResponder {
5088 fn drop(&mut self) {
5089 self.control_handle.shutdown();
5090 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5092 }
5093}
5094
5095impl fidl::endpoints::Responder for DirectoryQueryFilesystemResponder {
5096 type ControlHandle = DirectoryControlHandle;
5097
5098 fn control_handle(&self) -> &DirectoryControlHandle {
5099 &self.control_handle
5100 }
5101
5102 fn drop_without_shutdown(mut self) {
5103 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5105 std::mem::forget(self);
5107 }
5108}
5109
5110impl DirectoryQueryFilesystemResponder {
5111 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5115 let _result = self.send_raw(s, info);
5116 if _result.is_err() {
5117 self.control_handle.shutdown();
5118 }
5119 self.drop_without_shutdown();
5120 _result
5121 }
5122
5123 pub fn send_no_shutdown_on_err(
5125 self,
5126 mut s: i32,
5127 mut info: Option<&FilesystemInfo>,
5128 ) -> Result<(), fidl::Error> {
5129 let _result = self.send_raw(s, info);
5130 self.drop_without_shutdown();
5131 _result
5132 }
5133
5134 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5135 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
5136 (s, info),
5137 self.tx_id,
5138 0x6f344a1c6b0a0610,
5139 fidl::encoding::DynamicFlags::empty(),
5140 )
5141 }
5142}
5143
5144#[must_use = "FIDL methods require a response to be sent"]
5145#[derive(Debug)]
5146pub struct DirectoryGetAttributesResponder {
5147 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5148 tx_id: u32,
5149}
5150
5151impl std::ops::Drop for DirectoryGetAttributesResponder {
5155 fn drop(&mut self) {
5156 self.control_handle.shutdown();
5157 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5159 }
5160}
5161
5162impl fidl::endpoints::Responder for DirectoryGetAttributesResponder {
5163 type ControlHandle = DirectoryControlHandle;
5164
5165 fn control_handle(&self) -> &DirectoryControlHandle {
5166 &self.control_handle
5167 }
5168
5169 fn drop_without_shutdown(mut self) {
5170 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5172 std::mem::forget(self);
5174 }
5175}
5176
5177impl DirectoryGetAttributesResponder {
5178 pub fn send(
5182 self,
5183 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5184 ) -> Result<(), fidl::Error> {
5185 let _result = self.send_raw(result);
5186 if _result.is_err() {
5187 self.control_handle.shutdown();
5188 }
5189 self.drop_without_shutdown();
5190 _result
5191 }
5192
5193 pub fn send_no_shutdown_on_err(
5195 self,
5196 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5197 ) -> Result<(), fidl::Error> {
5198 let _result = self.send_raw(result);
5199 self.drop_without_shutdown();
5200 _result
5201 }
5202
5203 fn send_raw(
5204 &self,
5205 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5206 ) -> Result<(), fidl::Error> {
5207 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
5208 result,
5209 self.tx_id,
5210 0x3d4396a638ea053b,
5211 fidl::encoding::DynamicFlags::empty(),
5212 )
5213 }
5214}
5215
5216#[must_use = "FIDL methods require a response to be sent"]
5217#[derive(Debug)]
5218pub struct DirectoryUpdateAttributesResponder {
5219 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5220 tx_id: u32,
5221}
5222
5223impl std::ops::Drop for DirectoryUpdateAttributesResponder {
5227 fn drop(&mut self) {
5228 self.control_handle.shutdown();
5229 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5231 }
5232}
5233
5234impl fidl::endpoints::Responder for DirectoryUpdateAttributesResponder {
5235 type ControlHandle = DirectoryControlHandle;
5236
5237 fn control_handle(&self) -> &DirectoryControlHandle {
5238 &self.control_handle
5239 }
5240
5241 fn drop_without_shutdown(mut self) {
5242 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5244 std::mem::forget(self);
5246 }
5247}
5248
5249impl DirectoryUpdateAttributesResponder {
5250 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5254 let _result = self.send_raw(result);
5255 if _result.is_err() {
5256 self.control_handle.shutdown();
5257 }
5258 self.drop_without_shutdown();
5259 _result
5260 }
5261
5262 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5264 let _result = self.send_raw(result);
5265 self.drop_without_shutdown();
5266 _result
5267 }
5268
5269 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5270 self.control_handle
5271 .inner
5272 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5273 result,
5274 self.tx_id,
5275 0x3308c1da5a89bf08,
5276 fidl::encoding::DynamicFlags::empty(),
5277 )
5278 }
5279}
5280
5281#[must_use = "FIDL methods require a response to be sent"]
5282#[derive(Debug)]
5283pub struct DirectorySyncResponder {
5284 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5285 tx_id: u32,
5286}
5287
5288impl std::ops::Drop for DirectorySyncResponder {
5292 fn drop(&mut self) {
5293 self.control_handle.shutdown();
5294 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5296 }
5297}
5298
5299impl fidl::endpoints::Responder for DirectorySyncResponder {
5300 type ControlHandle = DirectoryControlHandle;
5301
5302 fn control_handle(&self) -> &DirectoryControlHandle {
5303 &self.control_handle
5304 }
5305
5306 fn drop_without_shutdown(mut self) {
5307 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5309 std::mem::forget(self);
5311 }
5312}
5313
5314impl DirectorySyncResponder {
5315 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5319 let _result = self.send_raw(result);
5320 if _result.is_err() {
5321 self.control_handle.shutdown();
5322 }
5323 self.drop_without_shutdown();
5324 _result
5325 }
5326
5327 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5329 let _result = self.send_raw(result);
5330 self.drop_without_shutdown();
5331 _result
5332 }
5333
5334 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5335 self.control_handle
5336 .inner
5337 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5338 result,
5339 self.tx_id,
5340 0x2c5c27ca0ab5dc49,
5341 fidl::encoding::DynamicFlags::empty(),
5342 )
5343 }
5344}
5345
5346#[must_use = "FIDL methods require a response to be sent"]
5347#[derive(Debug)]
5348pub struct DirectoryGetExtendedAttributeResponder {
5349 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5350 tx_id: u32,
5351}
5352
5353impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
5357 fn drop(&mut self) {
5358 self.control_handle.shutdown();
5359 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5361 }
5362}
5363
5364impl fidl::endpoints::Responder for DirectoryGetExtendedAttributeResponder {
5365 type ControlHandle = DirectoryControlHandle;
5366
5367 fn control_handle(&self) -> &DirectoryControlHandle {
5368 &self.control_handle
5369 }
5370
5371 fn drop_without_shutdown(mut self) {
5372 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5374 std::mem::forget(self);
5376 }
5377}
5378
5379impl DirectoryGetExtendedAttributeResponder {
5380 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5384 let _result = self.send_raw(result);
5385 if _result.is_err() {
5386 self.control_handle.shutdown();
5387 }
5388 self.drop_without_shutdown();
5389 _result
5390 }
5391
5392 pub fn send_no_shutdown_on_err(
5394 self,
5395 mut result: Result<ExtendedAttributeValue, i32>,
5396 ) -> Result<(), fidl::Error> {
5397 let _result = self.send_raw(result);
5398 self.drop_without_shutdown();
5399 _result
5400 }
5401
5402 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5403 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
5404 result.as_mut().map_err(|e| *e),
5405 self.tx_id,
5406 0x45ffa3ccfdeb76db,
5407 fidl::encoding::DynamicFlags::empty(),
5408 )
5409 }
5410}
5411
5412#[must_use = "FIDL methods require a response to be sent"]
5413#[derive(Debug)]
5414pub struct DirectorySetExtendedAttributeResponder {
5415 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5416 tx_id: u32,
5417}
5418
5419impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
5423 fn drop(&mut self) {
5424 self.control_handle.shutdown();
5425 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5427 }
5428}
5429
5430impl fidl::endpoints::Responder for DirectorySetExtendedAttributeResponder {
5431 type ControlHandle = DirectoryControlHandle;
5432
5433 fn control_handle(&self) -> &DirectoryControlHandle {
5434 &self.control_handle
5435 }
5436
5437 fn drop_without_shutdown(mut self) {
5438 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5440 std::mem::forget(self);
5442 }
5443}
5444
5445impl DirectorySetExtendedAttributeResponder {
5446 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5450 let _result = self.send_raw(result);
5451 if _result.is_err() {
5452 self.control_handle.shutdown();
5453 }
5454 self.drop_without_shutdown();
5455 _result
5456 }
5457
5458 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5460 let _result = self.send_raw(result);
5461 self.drop_without_shutdown();
5462 _result
5463 }
5464
5465 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5466 self.control_handle
5467 .inner
5468 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5469 result,
5470 self.tx_id,
5471 0x4a951362f681f23c,
5472 fidl::encoding::DynamicFlags::empty(),
5473 )
5474 }
5475}
5476
5477#[must_use = "FIDL methods require a response to be sent"]
5478#[derive(Debug)]
5479pub struct DirectoryRemoveExtendedAttributeResponder {
5480 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5481 tx_id: u32,
5482}
5483
5484impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
5488 fn drop(&mut self) {
5489 self.control_handle.shutdown();
5490 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5492 }
5493}
5494
5495impl fidl::endpoints::Responder for DirectoryRemoveExtendedAttributeResponder {
5496 type ControlHandle = DirectoryControlHandle;
5497
5498 fn control_handle(&self) -> &DirectoryControlHandle {
5499 &self.control_handle
5500 }
5501
5502 fn drop_without_shutdown(mut self) {
5503 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5505 std::mem::forget(self);
5507 }
5508}
5509
5510impl DirectoryRemoveExtendedAttributeResponder {
5511 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5515 let _result = self.send_raw(result);
5516 if _result.is_err() {
5517 self.control_handle.shutdown();
5518 }
5519 self.drop_without_shutdown();
5520 _result
5521 }
5522
5523 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5525 let _result = self.send_raw(result);
5526 self.drop_without_shutdown();
5527 _result
5528 }
5529
5530 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5531 self.control_handle
5532 .inner
5533 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5534 result,
5535 self.tx_id,
5536 0x7a0b9f3a9bf9032d,
5537 fidl::encoding::DynamicFlags::empty(),
5538 )
5539 }
5540}
5541
5542#[must_use = "FIDL methods require a response to be sent"]
5543#[derive(Debug)]
5544pub struct DirectoryReadDirentsResponder {
5545 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5546 tx_id: u32,
5547}
5548
5549impl std::ops::Drop for DirectoryReadDirentsResponder {
5553 fn drop(&mut self) {
5554 self.control_handle.shutdown();
5555 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5557 }
5558}
5559
5560impl fidl::endpoints::Responder for DirectoryReadDirentsResponder {
5561 type ControlHandle = DirectoryControlHandle;
5562
5563 fn control_handle(&self) -> &DirectoryControlHandle {
5564 &self.control_handle
5565 }
5566
5567 fn drop_without_shutdown(mut self) {
5568 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5570 std::mem::forget(self);
5572 }
5573}
5574
5575impl DirectoryReadDirentsResponder {
5576 pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5580 let _result = self.send_raw(s, dirents);
5581 if _result.is_err() {
5582 self.control_handle.shutdown();
5583 }
5584 self.drop_without_shutdown();
5585 _result
5586 }
5587
5588 pub fn send_no_shutdown_on_err(
5590 self,
5591 mut s: i32,
5592 mut dirents: &[u8],
5593 ) -> Result<(), fidl::Error> {
5594 let _result = self.send_raw(s, dirents);
5595 self.drop_without_shutdown();
5596 _result
5597 }
5598
5599 fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5600 self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
5601 (s, dirents),
5602 self.tx_id,
5603 0x3582806bf27faa0a,
5604 fidl::encoding::DynamicFlags::empty(),
5605 )
5606 }
5607}
5608
5609#[must_use = "FIDL methods require a response to be sent"]
5610#[derive(Debug)]
5611pub struct DirectoryRewindResponder {
5612 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5613 tx_id: u32,
5614}
5615
5616impl std::ops::Drop for DirectoryRewindResponder {
5620 fn drop(&mut self) {
5621 self.control_handle.shutdown();
5622 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5624 }
5625}
5626
5627impl fidl::endpoints::Responder for DirectoryRewindResponder {
5628 type ControlHandle = DirectoryControlHandle;
5629
5630 fn control_handle(&self) -> &DirectoryControlHandle {
5631 &self.control_handle
5632 }
5633
5634 fn drop_without_shutdown(mut self) {
5635 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5637 std::mem::forget(self);
5639 }
5640}
5641
5642impl DirectoryRewindResponder {
5643 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5647 let _result = self.send_raw(s);
5648 if _result.is_err() {
5649 self.control_handle.shutdown();
5650 }
5651 self.drop_without_shutdown();
5652 _result
5653 }
5654
5655 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5657 let _result = self.send_raw(s);
5658 self.drop_without_shutdown();
5659 _result
5660 }
5661
5662 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5663 self.control_handle.inner.send::<DirectoryRewindResponse>(
5664 (s,),
5665 self.tx_id,
5666 0x16b1202af0f34c71,
5667 fidl::encoding::DynamicFlags::empty(),
5668 )
5669 }
5670}
5671
5672#[must_use = "FIDL methods require a response to be sent"]
5673#[derive(Debug)]
5674pub struct DirectoryGetTokenResponder {
5675 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5676 tx_id: u32,
5677}
5678
5679impl std::ops::Drop for DirectoryGetTokenResponder {
5683 fn drop(&mut self) {
5684 self.control_handle.shutdown();
5685 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5687 }
5688}
5689
5690impl fidl::endpoints::Responder for DirectoryGetTokenResponder {
5691 type ControlHandle = DirectoryControlHandle;
5692
5693 fn control_handle(&self) -> &DirectoryControlHandle {
5694 &self.control_handle
5695 }
5696
5697 fn drop_without_shutdown(mut self) {
5698 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5700 std::mem::forget(self);
5702 }
5703}
5704
5705impl DirectoryGetTokenResponder {
5706 pub fn send(self, mut s: i32, mut token: Option<fidl::Handle>) -> Result<(), fidl::Error> {
5710 let _result = self.send_raw(s, token);
5711 if _result.is_err() {
5712 self.control_handle.shutdown();
5713 }
5714 self.drop_without_shutdown();
5715 _result
5716 }
5717
5718 pub fn send_no_shutdown_on_err(
5720 self,
5721 mut s: i32,
5722 mut token: Option<fidl::Handle>,
5723 ) -> Result<(), fidl::Error> {
5724 let _result = self.send_raw(s, token);
5725 self.drop_without_shutdown();
5726 _result
5727 }
5728
5729 fn send_raw(&self, mut s: i32, mut token: Option<fidl::Handle>) -> Result<(), fidl::Error> {
5730 self.control_handle.inner.send::<DirectoryGetTokenResponse>(
5731 (s, token),
5732 self.tx_id,
5733 0x26ae9d18763c8655,
5734 fidl::encoding::DynamicFlags::empty(),
5735 )
5736 }
5737}
5738
5739#[must_use = "FIDL methods require a response to be sent"]
5740#[derive(Debug)]
5741pub struct DirectoryLinkResponder {
5742 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5743 tx_id: u32,
5744}
5745
5746impl std::ops::Drop for DirectoryLinkResponder {
5750 fn drop(&mut self) {
5751 self.control_handle.shutdown();
5752 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5754 }
5755}
5756
5757impl fidl::endpoints::Responder for DirectoryLinkResponder {
5758 type ControlHandle = DirectoryControlHandle;
5759
5760 fn control_handle(&self) -> &DirectoryControlHandle {
5761 &self.control_handle
5762 }
5763
5764 fn drop_without_shutdown(mut self) {
5765 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5767 std::mem::forget(self);
5769 }
5770}
5771
5772impl DirectoryLinkResponder {
5773 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5777 let _result = self.send_raw(s);
5778 if _result.is_err() {
5779 self.control_handle.shutdown();
5780 }
5781 self.drop_without_shutdown();
5782 _result
5783 }
5784
5785 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5787 let _result = self.send_raw(s);
5788 self.drop_without_shutdown();
5789 _result
5790 }
5791
5792 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5793 self.control_handle.inner.send::<DirectoryLinkResponse>(
5794 (s,),
5795 self.tx_id,
5796 0x740604c0c7c930e7,
5797 fidl::encoding::DynamicFlags::empty(),
5798 )
5799 }
5800}
5801
5802#[must_use = "FIDL methods require a response to be sent"]
5803#[derive(Debug)]
5804pub struct DirectoryUnlinkResponder {
5805 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5806 tx_id: u32,
5807}
5808
5809impl std::ops::Drop for DirectoryUnlinkResponder {
5813 fn drop(&mut self) {
5814 self.control_handle.shutdown();
5815 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5817 }
5818}
5819
5820impl fidl::endpoints::Responder for DirectoryUnlinkResponder {
5821 type ControlHandle = DirectoryControlHandle;
5822
5823 fn control_handle(&self) -> &DirectoryControlHandle {
5824 &self.control_handle
5825 }
5826
5827 fn drop_without_shutdown(mut self) {
5828 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5830 std::mem::forget(self);
5832 }
5833}
5834
5835impl DirectoryUnlinkResponder {
5836 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5840 let _result = self.send_raw(result);
5841 if _result.is_err() {
5842 self.control_handle.shutdown();
5843 }
5844 self.drop_without_shutdown();
5845 _result
5846 }
5847
5848 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5850 let _result = self.send_raw(result);
5851 self.drop_without_shutdown();
5852 _result
5853 }
5854
5855 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5856 self.control_handle
5857 .inner
5858 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5859 result,
5860 self.tx_id,
5861 0x750a0326a78d7bed,
5862 fidl::encoding::DynamicFlags::empty(),
5863 )
5864 }
5865}
5866
5867#[must_use = "FIDL methods require a response to be sent"]
5868#[derive(Debug)]
5869pub struct DirectoryRenameResponder {
5870 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5871 tx_id: u32,
5872}
5873
5874impl std::ops::Drop for DirectoryRenameResponder {
5878 fn drop(&mut self) {
5879 self.control_handle.shutdown();
5880 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5882 }
5883}
5884
5885impl fidl::endpoints::Responder for DirectoryRenameResponder {
5886 type ControlHandle = DirectoryControlHandle;
5887
5888 fn control_handle(&self) -> &DirectoryControlHandle {
5889 &self.control_handle
5890 }
5891
5892 fn drop_without_shutdown(mut self) {
5893 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5895 std::mem::forget(self);
5897 }
5898}
5899
5900impl DirectoryRenameResponder {
5901 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5905 let _result = self.send_raw(result);
5906 if _result.is_err() {
5907 self.control_handle.shutdown();
5908 }
5909 self.drop_without_shutdown();
5910 _result
5911 }
5912
5913 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5915 let _result = self.send_raw(result);
5916 self.drop_without_shutdown();
5917 _result
5918 }
5919
5920 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5921 self.control_handle
5922 .inner
5923 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5924 result,
5925 self.tx_id,
5926 0x7060e7723b9928de,
5927 fidl::encoding::DynamicFlags::empty(),
5928 )
5929 }
5930}
5931
5932#[must_use = "FIDL methods require a response to be sent"]
5933#[derive(Debug)]
5934pub struct DirectoryCreateSymlinkResponder {
5935 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5936 tx_id: u32,
5937}
5938
5939impl std::ops::Drop for DirectoryCreateSymlinkResponder {
5943 fn drop(&mut self) {
5944 self.control_handle.shutdown();
5945 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5947 }
5948}
5949
5950impl fidl::endpoints::Responder for DirectoryCreateSymlinkResponder {
5951 type ControlHandle = DirectoryControlHandle;
5952
5953 fn control_handle(&self) -> &DirectoryControlHandle {
5954 &self.control_handle
5955 }
5956
5957 fn drop_without_shutdown(mut self) {
5958 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5960 std::mem::forget(self);
5962 }
5963}
5964
5965impl DirectoryCreateSymlinkResponder {
5966 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5970 let _result = self.send_raw(result);
5971 if _result.is_err() {
5972 self.control_handle.shutdown();
5973 }
5974 self.drop_without_shutdown();
5975 _result
5976 }
5977
5978 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5980 let _result = self.send_raw(result);
5981 self.drop_without_shutdown();
5982 _result
5983 }
5984
5985 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5986 self.control_handle
5987 .inner
5988 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5989 result,
5990 self.tx_id,
5991 0x21ce0f19ec043889,
5992 fidl::encoding::DynamicFlags::empty(),
5993 )
5994 }
5995}
5996
5997#[must_use = "FIDL methods require a response to be sent"]
5998#[derive(Debug)]
5999pub struct DirectoryWatchResponder {
6000 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
6001 tx_id: u32,
6002}
6003
6004impl std::ops::Drop for DirectoryWatchResponder {
6008 fn drop(&mut self) {
6009 self.control_handle.shutdown();
6010 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6012 }
6013}
6014
6015impl fidl::endpoints::Responder for DirectoryWatchResponder {
6016 type ControlHandle = DirectoryControlHandle;
6017
6018 fn control_handle(&self) -> &DirectoryControlHandle {
6019 &self.control_handle
6020 }
6021
6022 fn drop_without_shutdown(mut self) {
6023 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6025 std::mem::forget(self);
6027 }
6028}
6029
6030impl DirectoryWatchResponder {
6031 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
6035 let _result = self.send_raw(s);
6036 if _result.is_err() {
6037 self.control_handle.shutdown();
6038 }
6039 self.drop_without_shutdown();
6040 _result
6041 }
6042
6043 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
6045 let _result = self.send_raw(s);
6046 self.drop_without_shutdown();
6047 _result
6048 }
6049
6050 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
6051 self.control_handle.inner.send::<DirectoryWatchResponse>(
6052 (s,),
6053 self.tx_id,
6054 0x5717193a59d66d91,
6055 fidl::encoding::DynamicFlags::empty(),
6056 )
6057 }
6058}
6059
6060#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6061pub struct DirectoryWatcherMarker;
6062
6063impl fidl::endpoints::ProtocolMarker for DirectoryWatcherMarker {
6064 type Proxy = DirectoryWatcherProxy;
6065 type RequestStream = DirectoryWatcherRequestStream;
6066 #[cfg(target_os = "fuchsia")]
6067 type SynchronousProxy = DirectoryWatcherSynchronousProxy;
6068
6069 const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
6070}
6071
6072pub trait DirectoryWatcherProxyInterface: Send + Sync {}
6073#[derive(Debug)]
6074#[cfg(target_os = "fuchsia")]
6075pub struct DirectoryWatcherSynchronousProxy {
6076 client: fidl::client::sync::Client,
6077}
6078
6079#[cfg(target_os = "fuchsia")]
6080impl fidl::endpoints::SynchronousProxy for DirectoryWatcherSynchronousProxy {
6081 type Proxy = DirectoryWatcherProxy;
6082 type Protocol = DirectoryWatcherMarker;
6083
6084 fn from_channel(inner: fidl::Channel) -> Self {
6085 Self::new(inner)
6086 }
6087
6088 fn into_channel(self) -> fidl::Channel {
6089 self.client.into_channel()
6090 }
6091
6092 fn as_channel(&self) -> &fidl::Channel {
6093 self.client.as_channel()
6094 }
6095}
6096
6097#[cfg(target_os = "fuchsia")]
6098impl DirectoryWatcherSynchronousProxy {
6099 pub fn new(channel: fidl::Channel) -> Self {
6100 let protocol_name = <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6101 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6102 }
6103
6104 pub fn into_channel(self) -> fidl::Channel {
6105 self.client.into_channel()
6106 }
6107
6108 pub fn wait_for_event(
6111 &self,
6112 deadline: zx::MonotonicInstant,
6113 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6114 DirectoryWatcherEvent::decode(self.client.wait_for_event(deadline)?)
6115 }
6116}
6117
6118#[cfg(target_os = "fuchsia")]
6119impl From<DirectoryWatcherSynchronousProxy> for zx::Handle {
6120 fn from(value: DirectoryWatcherSynchronousProxy) -> Self {
6121 value.into_channel().into()
6122 }
6123}
6124
6125#[cfg(target_os = "fuchsia")]
6126impl From<fidl::Channel> for DirectoryWatcherSynchronousProxy {
6127 fn from(value: fidl::Channel) -> Self {
6128 Self::new(value)
6129 }
6130}
6131
6132#[cfg(target_os = "fuchsia")]
6133impl fidl::endpoints::FromClient for DirectoryWatcherSynchronousProxy {
6134 type Protocol = DirectoryWatcherMarker;
6135
6136 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryWatcherMarker>) -> Self {
6137 Self::new(value.into_channel())
6138 }
6139}
6140
6141#[derive(Debug, Clone)]
6142pub struct DirectoryWatcherProxy {
6143 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6144}
6145
6146impl fidl::endpoints::Proxy for DirectoryWatcherProxy {
6147 type Protocol = DirectoryWatcherMarker;
6148
6149 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6150 Self::new(inner)
6151 }
6152
6153 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6154 self.client.into_channel().map_err(|client| Self { client })
6155 }
6156
6157 fn as_channel(&self) -> &::fidl::AsyncChannel {
6158 self.client.as_channel()
6159 }
6160}
6161
6162impl DirectoryWatcherProxy {
6163 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6165 let protocol_name = <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6166 Self { client: fidl::client::Client::new(channel, protocol_name) }
6167 }
6168
6169 pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
6175 DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
6176 }
6177}
6178
6179impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
6180
6181pub struct DirectoryWatcherEventStream {
6182 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6183}
6184
6185impl std::marker::Unpin for DirectoryWatcherEventStream {}
6186
6187impl futures::stream::FusedStream for DirectoryWatcherEventStream {
6188 fn is_terminated(&self) -> bool {
6189 self.event_receiver.is_terminated()
6190 }
6191}
6192
6193impl futures::Stream for DirectoryWatcherEventStream {
6194 type Item = Result<DirectoryWatcherEvent, fidl::Error>;
6195
6196 fn poll_next(
6197 mut self: std::pin::Pin<&mut Self>,
6198 cx: &mut std::task::Context<'_>,
6199 ) -> std::task::Poll<Option<Self::Item>> {
6200 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6201 &mut self.event_receiver,
6202 cx
6203 )?) {
6204 Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
6205 None => std::task::Poll::Ready(None),
6206 }
6207 }
6208}
6209
6210#[derive(Debug)]
6211pub enum DirectoryWatcherEvent {}
6212
6213impl DirectoryWatcherEvent {
6214 fn decode(
6216 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6217 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6218 let (bytes, _handles) = buf.split_mut();
6219 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6220 debug_assert_eq!(tx_header.tx_id, 0);
6221 match tx_header.ordinal {
6222 _ => Err(fidl::Error::UnknownOrdinal {
6223 ordinal: tx_header.ordinal,
6224 protocol_name:
6225 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6226 }),
6227 }
6228 }
6229}
6230
6231pub struct DirectoryWatcherRequestStream {
6233 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6234 is_terminated: bool,
6235}
6236
6237impl std::marker::Unpin for DirectoryWatcherRequestStream {}
6238
6239impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
6240 fn is_terminated(&self) -> bool {
6241 self.is_terminated
6242 }
6243}
6244
6245impl fidl::endpoints::RequestStream for DirectoryWatcherRequestStream {
6246 type Protocol = DirectoryWatcherMarker;
6247 type ControlHandle = DirectoryWatcherControlHandle;
6248
6249 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6250 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6251 }
6252
6253 fn control_handle(&self) -> Self::ControlHandle {
6254 DirectoryWatcherControlHandle { inner: self.inner.clone() }
6255 }
6256
6257 fn into_inner(
6258 self,
6259 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6260 {
6261 (self.inner, self.is_terminated)
6262 }
6263
6264 fn from_inner(
6265 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6266 is_terminated: bool,
6267 ) -> Self {
6268 Self { inner, is_terminated }
6269 }
6270}
6271
6272impl futures::Stream for DirectoryWatcherRequestStream {
6273 type Item = Result<DirectoryWatcherRequest, fidl::Error>;
6274
6275 fn poll_next(
6276 mut self: std::pin::Pin<&mut Self>,
6277 cx: &mut std::task::Context<'_>,
6278 ) -> std::task::Poll<Option<Self::Item>> {
6279 let this = &mut *self;
6280 if this.inner.check_shutdown(cx) {
6281 this.is_terminated = true;
6282 return std::task::Poll::Ready(None);
6283 }
6284 if this.is_terminated {
6285 panic!("polled DirectoryWatcherRequestStream after completion");
6286 }
6287 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6288 |bytes, handles| {
6289 match this.inner.channel().read_etc(cx, bytes, handles) {
6290 std::task::Poll::Ready(Ok(())) => {}
6291 std::task::Poll::Pending => return std::task::Poll::Pending,
6292 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6293 this.is_terminated = true;
6294 return std::task::Poll::Ready(None);
6295 }
6296 std::task::Poll::Ready(Err(e)) => {
6297 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6298 e.into(),
6299 ))))
6300 }
6301 }
6302
6303 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6305
6306 std::task::Poll::Ready(Some(match header.ordinal {
6307 _ => Err(fidl::Error::UnknownOrdinal {
6308 ordinal: header.ordinal,
6309 protocol_name:
6310 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6311 }),
6312 }))
6313 },
6314 )
6315 }
6316}
6317
6318#[derive(Debug)]
6336pub enum DirectoryWatcherRequest {}
6337
6338impl DirectoryWatcherRequest {
6339 pub fn method_name(&self) -> &'static str {
6341 match *self {}
6342 }
6343}
6344
6345#[derive(Debug, Clone)]
6346pub struct DirectoryWatcherControlHandle {
6347 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6348}
6349
6350impl fidl::endpoints::ControlHandle for DirectoryWatcherControlHandle {
6351 fn shutdown(&self) {
6352 self.inner.shutdown()
6353 }
6354 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6355 self.inner.shutdown_with_epitaph(status)
6356 }
6357
6358 fn is_closed(&self) -> bool {
6359 self.inner.channel().is_closed()
6360 }
6361 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6362 self.inner.channel().on_closed()
6363 }
6364
6365 #[cfg(target_os = "fuchsia")]
6366 fn signal_peer(
6367 &self,
6368 clear_mask: zx::Signals,
6369 set_mask: zx::Signals,
6370 ) -> Result<(), zx_status::Status> {
6371 use fidl::Peered;
6372 self.inner.channel().signal_peer(clear_mask, set_mask)
6373 }
6374}
6375
6376impl DirectoryWatcherControlHandle {}
6377
6378#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6379pub struct ExtendedAttributeIteratorMarker;
6380
6381impl fidl::endpoints::ProtocolMarker for ExtendedAttributeIteratorMarker {
6382 type Proxy = ExtendedAttributeIteratorProxy;
6383 type RequestStream = ExtendedAttributeIteratorRequestStream;
6384 #[cfg(target_os = "fuchsia")]
6385 type SynchronousProxy = ExtendedAttributeIteratorSynchronousProxy;
6386
6387 const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
6388}
6389pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
6390
6391pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
6392 type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
6393 + Send;
6394 fn r#get_next(&self) -> Self::GetNextResponseFut;
6395}
6396#[derive(Debug)]
6397#[cfg(target_os = "fuchsia")]
6398pub struct ExtendedAttributeIteratorSynchronousProxy {
6399 client: fidl::client::sync::Client,
6400}
6401
6402#[cfg(target_os = "fuchsia")]
6403impl fidl::endpoints::SynchronousProxy for ExtendedAttributeIteratorSynchronousProxy {
6404 type Proxy = ExtendedAttributeIteratorProxy;
6405 type Protocol = ExtendedAttributeIteratorMarker;
6406
6407 fn from_channel(inner: fidl::Channel) -> Self {
6408 Self::new(inner)
6409 }
6410
6411 fn into_channel(self) -> fidl::Channel {
6412 self.client.into_channel()
6413 }
6414
6415 fn as_channel(&self) -> &fidl::Channel {
6416 self.client.as_channel()
6417 }
6418}
6419
6420#[cfg(target_os = "fuchsia")]
6421impl ExtendedAttributeIteratorSynchronousProxy {
6422 pub fn new(channel: fidl::Channel) -> Self {
6423 let protocol_name =
6424 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6425 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6426 }
6427
6428 pub fn into_channel(self) -> fidl::Channel {
6429 self.client.into_channel()
6430 }
6431
6432 pub fn wait_for_event(
6435 &self,
6436 deadline: zx::MonotonicInstant,
6437 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6438 ExtendedAttributeIteratorEvent::decode(self.client.wait_for_event(deadline)?)
6439 }
6440
6441 pub fn r#get_next(
6445 &self,
6446 ___deadline: zx::MonotonicInstant,
6447 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6448 let _response = self.client.send_query::<
6449 fidl::encoding::EmptyPayload,
6450 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6451 >(
6452 (),
6453 0x3ba664a1c2e45a7,
6454 fidl::encoding::DynamicFlags::empty(),
6455 ___deadline,
6456 )?;
6457 Ok(_response.map(|x| (x.attributes, x.last)))
6458 }
6459}
6460
6461#[cfg(target_os = "fuchsia")]
6462impl From<ExtendedAttributeIteratorSynchronousProxy> for zx::Handle {
6463 fn from(value: ExtendedAttributeIteratorSynchronousProxy) -> Self {
6464 value.into_channel().into()
6465 }
6466}
6467
6468#[cfg(target_os = "fuchsia")]
6469impl From<fidl::Channel> for ExtendedAttributeIteratorSynchronousProxy {
6470 fn from(value: fidl::Channel) -> Self {
6471 Self::new(value)
6472 }
6473}
6474
6475#[cfg(target_os = "fuchsia")]
6476impl fidl::endpoints::FromClient for ExtendedAttributeIteratorSynchronousProxy {
6477 type Protocol = ExtendedAttributeIteratorMarker;
6478
6479 fn from_client(value: fidl::endpoints::ClientEnd<ExtendedAttributeIteratorMarker>) -> Self {
6480 Self::new(value.into_channel())
6481 }
6482}
6483
6484#[derive(Debug, Clone)]
6485pub struct ExtendedAttributeIteratorProxy {
6486 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6487}
6488
6489impl fidl::endpoints::Proxy for ExtendedAttributeIteratorProxy {
6490 type Protocol = ExtendedAttributeIteratorMarker;
6491
6492 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6493 Self::new(inner)
6494 }
6495
6496 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6497 self.client.into_channel().map_err(|client| Self { client })
6498 }
6499
6500 fn as_channel(&self) -> &::fidl::AsyncChannel {
6501 self.client.as_channel()
6502 }
6503}
6504
6505impl ExtendedAttributeIteratorProxy {
6506 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6508 let protocol_name =
6509 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6510 Self { client: fidl::client::Client::new(channel, protocol_name) }
6511 }
6512
6513 pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
6519 ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6520 }
6521
6522 pub fn r#get_next(
6526 &self,
6527 ) -> fidl::client::QueryResponseFut<
6528 ExtendedAttributeIteratorGetNextResult,
6529 fidl::encoding::DefaultFuchsiaResourceDialect,
6530 > {
6531 ExtendedAttributeIteratorProxyInterface::r#get_next(self)
6532 }
6533}
6534
6535impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
6536 type GetNextResponseFut = fidl::client::QueryResponseFut<
6537 ExtendedAttributeIteratorGetNextResult,
6538 fidl::encoding::DefaultFuchsiaResourceDialect,
6539 >;
6540 fn r#get_next(&self) -> Self::GetNextResponseFut {
6541 fn _decode(
6542 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6543 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6544 let _response = fidl::client::decode_transaction_body::<
6545 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6546 fidl::encoding::DefaultFuchsiaResourceDialect,
6547 0x3ba664a1c2e45a7,
6548 >(_buf?)?;
6549 Ok(_response.map(|x| (x.attributes, x.last)))
6550 }
6551 self.client.send_query_and_decode::<
6552 fidl::encoding::EmptyPayload,
6553 ExtendedAttributeIteratorGetNextResult,
6554 >(
6555 (),
6556 0x3ba664a1c2e45a7,
6557 fidl::encoding::DynamicFlags::empty(),
6558 _decode,
6559 )
6560 }
6561}
6562
6563pub struct ExtendedAttributeIteratorEventStream {
6564 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6565}
6566
6567impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
6568
6569impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
6570 fn is_terminated(&self) -> bool {
6571 self.event_receiver.is_terminated()
6572 }
6573}
6574
6575impl futures::Stream for ExtendedAttributeIteratorEventStream {
6576 type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
6577
6578 fn poll_next(
6579 mut self: std::pin::Pin<&mut Self>,
6580 cx: &mut std::task::Context<'_>,
6581 ) -> std::task::Poll<Option<Self::Item>> {
6582 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6583 &mut self.event_receiver,
6584 cx
6585 )?) {
6586 Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
6587 None => std::task::Poll::Ready(None),
6588 }
6589 }
6590}
6591
6592#[derive(Debug)]
6593pub enum ExtendedAttributeIteratorEvent {}
6594
6595impl ExtendedAttributeIteratorEvent {
6596 fn decode(
6598 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6599 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6600 let (bytes, _handles) = buf.split_mut();
6601 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6602 debug_assert_eq!(tx_header.tx_id, 0);
6603 match tx_header.ordinal {
6604 _ => Err(fidl::Error::UnknownOrdinal {
6605 ordinal: tx_header.ordinal,
6606 protocol_name:
6607 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6608 }),
6609 }
6610 }
6611}
6612
6613pub struct ExtendedAttributeIteratorRequestStream {
6615 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6616 is_terminated: bool,
6617}
6618
6619impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
6620
6621impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
6622 fn is_terminated(&self) -> bool {
6623 self.is_terminated
6624 }
6625}
6626
6627impl fidl::endpoints::RequestStream for ExtendedAttributeIteratorRequestStream {
6628 type Protocol = ExtendedAttributeIteratorMarker;
6629 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6630
6631 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6632 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6633 }
6634
6635 fn control_handle(&self) -> Self::ControlHandle {
6636 ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
6637 }
6638
6639 fn into_inner(
6640 self,
6641 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6642 {
6643 (self.inner, self.is_terminated)
6644 }
6645
6646 fn from_inner(
6647 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6648 is_terminated: bool,
6649 ) -> Self {
6650 Self { inner, is_terminated }
6651 }
6652}
6653
6654impl futures::Stream for ExtendedAttributeIteratorRequestStream {
6655 type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
6656
6657 fn poll_next(
6658 mut self: std::pin::Pin<&mut Self>,
6659 cx: &mut std::task::Context<'_>,
6660 ) -> std::task::Poll<Option<Self::Item>> {
6661 let this = &mut *self;
6662 if this.inner.check_shutdown(cx) {
6663 this.is_terminated = true;
6664 return std::task::Poll::Ready(None);
6665 }
6666 if this.is_terminated {
6667 panic!("polled ExtendedAttributeIteratorRequestStream after completion");
6668 }
6669 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6670 |bytes, handles| {
6671 match this.inner.channel().read_etc(cx, bytes, handles) {
6672 std::task::Poll::Ready(Ok(())) => {}
6673 std::task::Poll::Pending => return std::task::Poll::Pending,
6674 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6675 this.is_terminated = true;
6676 return std::task::Poll::Ready(None);
6677 }
6678 std::task::Poll::Ready(Err(e)) => {
6679 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6680 e.into(),
6681 ))))
6682 }
6683 }
6684
6685 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6687
6688 std::task::Poll::Ready(Some(match header.ordinal {
6689 0x3ba664a1c2e45a7 => {
6690 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6691 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
6692 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6693 let control_handle = ExtendedAttributeIteratorControlHandle {
6694 inner: this.inner.clone(),
6695 };
6696 Ok(ExtendedAttributeIteratorRequest::GetNext {
6697 responder: ExtendedAttributeIteratorGetNextResponder {
6698 control_handle: std::mem::ManuallyDrop::new(control_handle),
6699 tx_id: header.tx_id,
6700 },
6701 })
6702 }
6703 _ => Err(fidl::Error::UnknownOrdinal {
6704 ordinal: header.ordinal,
6705 protocol_name: <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6706 }),
6707 }))
6708 },
6709 )
6710 }
6711}
6712
6713#[derive(Debug)]
6714pub enum ExtendedAttributeIteratorRequest {
6715 GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
6719}
6720
6721impl ExtendedAttributeIteratorRequest {
6722 #[allow(irrefutable_let_patterns)]
6723 pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
6724 if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
6725 Some((responder))
6726 } else {
6727 None
6728 }
6729 }
6730
6731 pub fn method_name(&self) -> &'static str {
6733 match *self {
6734 ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
6735 }
6736 }
6737}
6738
6739#[derive(Debug, Clone)]
6740pub struct ExtendedAttributeIteratorControlHandle {
6741 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6742}
6743
6744impl fidl::endpoints::ControlHandle for ExtendedAttributeIteratorControlHandle {
6745 fn shutdown(&self) {
6746 self.inner.shutdown()
6747 }
6748 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6749 self.inner.shutdown_with_epitaph(status)
6750 }
6751
6752 fn is_closed(&self) -> bool {
6753 self.inner.channel().is_closed()
6754 }
6755 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6756 self.inner.channel().on_closed()
6757 }
6758
6759 #[cfg(target_os = "fuchsia")]
6760 fn signal_peer(
6761 &self,
6762 clear_mask: zx::Signals,
6763 set_mask: zx::Signals,
6764 ) -> Result<(), zx_status::Status> {
6765 use fidl::Peered;
6766 self.inner.channel().signal_peer(clear_mask, set_mask)
6767 }
6768}
6769
6770impl ExtendedAttributeIteratorControlHandle {}
6771
6772#[must_use = "FIDL methods require a response to be sent"]
6773#[derive(Debug)]
6774pub struct ExtendedAttributeIteratorGetNextResponder {
6775 control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
6776 tx_id: u32,
6777}
6778
6779impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
6783 fn drop(&mut self) {
6784 self.control_handle.shutdown();
6785 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6787 }
6788}
6789
6790impl fidl::endpoints::Responder for ExtendedAttributeIteratorGetNextResponder {
6791 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6792
6793 fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
6794 &self.control_handle
6795 }
6796
6797 fn drop_without_shutdown(mut self) {
6798 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6800 std::mem::forget(self);
6802 }
6803}
6804
6805impl ExtendedAttributeIteratorGetNextResponder {
6806 pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
6810 let _result = self.send_raw(result);
6811 if _result.is_err() {
6812 self.control_handle.shutdown();
6813 }
6814 self.drop_without_shutdown();
6815 _result
6816 }
6817
6818 pub fn send_no_shutdown_on_err(
6820 self,
6821 mut result: Result<(&[Vec<u8>], bool), i32>,
6822 ) -> Result<(), fidl::Error> {
6823 let _result = self.send_raw(result);
6824 self.drop_without_shutdown();
6825 _result
6826 }
6827
6828 fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
6829 self.control_handle.inner.send::<fidl::encoding::ResultType<
6830 ExtendedAttributeIteratorGetNextResponse,
6831 i32,
6832 >>(
6833 result,
6834 self.tx_id,
6835 0x3ba664a1c2e45a7,
6836 fidl::encoding::DynamicFlags::empty(),
6837 )
6838 }
6839}
6840
6841#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6842pub struct FileMarker;
6843
6844impl fidl::endpoints::ProtocolMarker for FileMarker {
6845 type Proxy = FileProxy;
6846 type RequestStream = FileRequestStream;
6847 #[cfg(target_os = "fuchsia")]
6848 type SynchronousProxy = FileSynchronousProxy;
6849
6850 const DEBUG_NAME: &'static str = "fuchsia.io.File";
6851}
6852impl fidl::endpoints::DiscoverableProtocolMarker for FileMarker {}
6853pub type FileSeekResult = Result<u64, i32>;
6854pub type FileReadAtResult = Result<Vec<u8>, i32>;
6855pub type FileWriteAtResult = Result<u64, i32>;
6856pub type FileResizeResult = Result<(), i32>;
6857pub type FileGetBackingMemoryResult = Result<fidl::Vmo, i32>;
6858pub type FileAllocateResult = Result<(), i32>;
6859pub type FileEnableVerityResult = Result<(), i32>;
6860
6861pub trait FileProxyInterface: Send + Sync {
6862 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
6863 + Send;
6864 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
6865 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
6866 + Send;
6867 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
6868 fn r#clone(
6869 &self,
6870 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
6871 ) -> Result<(), fidl::Error>;
6872 type CloseResponseFut: std::future::Future<
6873 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
6874 > + Send;
6875 fn r#close(&self) -> Self::CloseResponseFut;
6876 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
6877 fn r#query(&self) -> Self::QueryResponseFut;
6878 fn r#deprecated_clone(
6879 &self,
6880 flags: OpenFlags,
6881 object: fidl::endpoints::ServerEnd<NodeMarker>,
6882 ) -> Result<(), fidl::Error>;
6883 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
6884 + Send;
6885 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
6886 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
6887 fn r#deprecated_set_attr(
6888 &self,
6889 flags: NodeAttributeFlags,
6890 attributes: &NodeAttributes,
6891 ) -> Self::DeprecatedSetAttrResponseFut;
6892 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
6893 + Send;
6894 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
6895 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
6896 + Send;
6897 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
6898 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
6899 + Send;
6900 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
6901 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
6902 + Send;
6903 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
6904 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
6905 + Send;
6906 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
6907 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
6908 + Send;
6909 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
6910 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
6911 + Send;
6912 fn r#update_attributes(
6913 &self,
6914 payload: &MutableNodeAttributes,
6915 ) -> Self::UpdateAttributesResponseFut;
6916 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
6917 fn r#sync(&self) -> Self::SyncResponseFut;
6918 fn r#list_extended_attributes(
6919 &self,
6920 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
6921 ) -> Result<(), fidl::Error>;
6922 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
6923 + Send;
6924 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
6925 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
6926 + Send;
6927 fn r#set_extended_attribute(
6928 &self,
6929 name: &[u8],
6930 value: ExtendedAttributeValue,
6931 mode: SetExtendedAttributeMode,
6932 ) -> Self::SetExtendedAttributeResponseFut;
6933 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
6934 + Send;
6935 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
6936 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
6937 + Send;
6938 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
6939 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
6940 + Send;
6941 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
6942 type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
6943 fn r#describe(&self) -> Self::DescribeResponseFut;
6944 type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
6945 fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
6946 type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
6947 + Send;
6948 fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
6949 type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
6950 + Send;
6951 fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
6952 type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
6953 + Send;
6954 fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
6955 type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
6956 + Send;
6957 fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
6958 type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
6959 + Send;
6960 fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
6961 -> Self::AllocateResponseFut;
6962 type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
6963 + Send;
6964 fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
6965}
6966#[derive(Debug)]
6967#[cfg(target_os = "fuchsia")]
6968pub struct FileSynchronousProxy {
6969 client: fidl::client::sync::Client,
6970}
6971
6972#[cfg(target_os = "fuchsia")]
6973impl fidl::endpoints::SynchronousProxy for FileSynchronousProxy {
6974 type Proxy = FileProxy;
6975 type Protocol = FileMarker;
6976
6977 fn from_channel(inner: fidl::Channel) -> Self {
6978 Self::new(inner)
6979 }
6980
6981 fn into_channel(self) -> fidl::Channel {
6982 self.client.into_channel()
6983 }
6984
6985 fn as_channel(&self) -> &fidl::Channel {
6986 self.client.as_channel()
6987 }
6988}
6989
6990#[cfg(target_os = "fuchsia")]
6991impl FileSynchronousProxy {
6992 pub fn new(channel: fidl::Channel) -> Self {
6993 let protocol_name = <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6994 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6995 }
6996
6997 pub fn into_channel(self) -> fidl::Channel {
6998 self.client.into_channel()
6999 }
7000
7001 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<FileEvent, fidl::Error> {
7004 FileEvent::decode(self.client.wait_for_event(deadline)?)
7005 }
7006
7007 pub fn r#advisory_lock(
7031 &self,
7032 mut request: &AdvisoryLockRequest,
7033 ___deadline: zx::MonotonicInstant,
7034 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
7035 let _response = self.client.send_query::<
7036 AdvisoryLockingAdvisoryLockRequest,
7037 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7038 >(
7039 (request,),
7040 0x6ee9c0ad53ec87aa,
7041 fidl::encoding::DynamicFlags::empty(),
7042 ___deadline,
7043 )?;
7044 Ok(_response.map(|x| x))
7045 }
7046
7047 pub fn r#link_into(
7070 &self,
7071 mut dst_parent_token: fidl::Event,
7072 mut dst: &str,
7073 ___deadline: zx::MonotonicInstant,
7074 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
7075 let _response = self.client.send_query::<
7076 LinkableLinkIntoRequest,
7077 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7078 >(
7079 (dst_parent_token, dst,),
7080 0x54f3949246a03e74,
7081 fidl::encoding::DynamicFlags::empty(),
7082 ___deadline,
7083 )?;
7084 Ok(_response.map(|x| x))
7085 }
7086
7087 pub fn r#clone(
7088 &self,
7089 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7090 ) -> Result<(), fidl::Error> {
7091 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
7092 (request,),
7093 0x20d8a7aba2168a79,
7094 fidl::encoding::DynamicFlags::empty(),
7095 )
7096 }
7097
7098 pub fn r#close(
7109 &self,
7110 ___deadline: zx::MonotonicInstant,
7111 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
7112 let _response = self.client.send_query::<
7113 fidl::encoding::EmptyPayload,
7114 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7115 >(
7116 (),
7117 0x5ac5d459ad7f657e,
7118 fidl::encoding::DynamicFlags::empty(),
7119 ___deadline,
7120 )?;
7121 Ok(_response.map(|x| x))
7122 }
7123
7124 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
7125 let _response = self.client.send_query::<
7126 fidl::encoding::EmptyPayload,
7127 fidl_fuchsia_unknown::QueryableQueryResponse,
7128 >(
7129 (),
7130 0x2658edee9decfc06,
7131 fidl::encoding::DynamicFlags::empty(),
7132 ___deadline,
7133 )?;
7134 Ok(_response.protocol)
7135 }
7136
7137 pub fn r#deprecated_clone(
7139 &self,
7140 mut flags: OpenFlags,
7141 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
7142 ) -> Result<(), fidl::Error> {
7143 self.client.send::<NodeDeprecatedCloneRequest>(
7144 (flags, object),
7145 0x5a61678f293ce16f,
7146 fidl::encoding::DynamicFlags::FLEXIBLE,
7147 )
7148 }
7149
7150 pub fn r#deprecated_get_attr(
7152 &self,
7153 ___deadline: zx::MonotonicInstant,
7154 ) -> Result<(i32, NodeAttributes), fidl::Error> {
7155 let _response =
7156 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
7157 (),
7158 0x78985e216314dafd,
7159 fidl::encoding::DynamicFlags::empty(),
7160 ___deadline,
7161 )?;
7162 Ok((_response.s, _response.attributes))
7163 }
7164
7165 pub fn r#deprecated_set_attr(
7167 &self,
7168 mut flags: NodeAttributeFlags,
7169 mut attributes: &NodeAttributes,
7170 ___deadline: zx::MonotonicInstant,
7171 ) -> Result<i32, fidl::Error> {
7172 let _response =
7173 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
7174 (flags, attributes),
7175 0x4186c0f40d938f46,
7176 fidl::encoding::DynamicFlags::empty(),
7177 ___deadline,
7178 )?;
7179 Ok(_response.s)
7180 }
7181
7182 pub fn r#deprecated_get_flags(
7184 &self,
7185 ___deadline: zx::MonotonicInstant,
7186 ) -> Result<(i32, OpenFlags), fidl::Error> {
7187 let _response = self
7188 .client
7189 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
7190 (),
7191 0x5b88fffb8eda3aa1,
7192 fidl::encoding::DynamicFlags::empty(),
7193 ___deadline,
7194 )?;
7195 Ok((_response.s, _response.flags))
7196 }
7197
7198 pub fn r#deprecated_set_flags(
7200 &self,
7201 mut flags: OpenFlags,
7202 ___deadline: zx::MonotonicInstant,
7203 ) -> Result<i32, fidl::Error> {
7204 let _response = self
7205 .client
7206 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
7207 (flags,),
7208 0x5295b76c71fde733,
7209 fidl::encoding::DynamicFlags::empty(),
7210 ___deadline,
7211 )?;
7212 Ok(_response.s)
7213 }
7214
7215 pub fn r#get_flags(
7224 &self,
7225 ___deadline: zx::MonotonicInstant,
7226 ) -> Result<NodeGetFlagsResult, fidl::Error> {
7227 let _response = self.client.send_query::<
7228 fidl::encoding::EmptyPayload,
7229 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
7230 >(
7231 (),
7232 0x176eb318f64ec23,
7233 fidl::encoding::DynamicFlags::FLEXIBLE,
7234 ___deadline,
7235 )?
7236 .into_result::<FileMarker>("get_flags")?;
7237 Ok(_response.map(|x| x.flags))
7238 }
7239
7240 pub fn r#set_flags(
7250 &self,
7251 mut flags: Flags,
7252 ___deadline: zx::MonotonicInstant,
7253 ) -> Result<NodeSetFlagsResult, fidl::Error> {
7254 let _response = self.client.send_query::<
7255 NodeSetFlagsRequest,
7256 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7257 >(
7258 (flags,),
7259 0x55a8028685791ea8,
7260 fidl::encoding::DynamicFlags::FLEXIBLE,
7261 ___deadline,
7262 )?
7263 .into_result::<FileMarker>("set_flags")?;
7264 Ok(_response.map(|x| x))
7265 }
7266
7267 pub fn r#query_filesystem(
7269 &self,
7270 ___deadline: zx::MonotonicInstant,
7271 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
7272 let _response =
7273 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
7274 (),
7275 0x6f344a1c6b0a0610,
7276 fidl::encoding::DynamicFlags::empty(),
7277 ___deadline,
7278 )?;
7279 Ok((_response.s, _response.info))
7280 }
7281
7282 pub fn r#get_attributes(
7296 &self,
7297 mut query: NodeAttributesQuery,
7298 ___deadline: zx::MonotonicInstant,
7299 ) -> Result<NodeGetAttributesResult, fidl::Error> {
7300 let _response = self.client.send_query::<
7301 NodeGetAttributesRequest,
7302 fidl::encoding::ResultType<NodeAttributes2, i32>,
7303 >(
7304 (query,),
7305 0x3d4396a638ea053b,
7306 fidl::encoding::DynamicFlags::empty(),
7307 ___deadline,
7308 )?;
7309 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
7310 }
7311
7312 pub fn r#update_attributes(
7321 &self,
7322 mut payload: &MutableNodeAttributes,
7323 ___deadline: zx::MonotonicInstant,
7324 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
7325 let _response = self.client.send_query::<
7326 MutableNodeAttributes,
7327 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7328 >(
7329 payload,
7330 0x3308c1da5a89bf08,
7331 fidl::encoding::DynamicFlags::empty(),
7332 ___deadline,
7333 )?;
7334 Ok(_response.map(|x| x))
7335 }
7336
7337 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
7347 let _response = self.client.send_query::<
7348 fidl::encoding::EmptyPayload,
7349 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7350 >(
7351 (),
7352 0x2c5c27ca0ab5dc49,
7353 fidl::encoding::DynamicFlags::empty(),
7354 ___deadline,
7355 )?;
7356 Ok(_response.map(|x| x))
7357 }
7358
7359 pub fn r#list_extended_attributes(
7368 &self,
7369 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
7370 ) -> Result<(), fidl::Error> {
7371 self.client.send::<NodeListExtendedAttributesRequest>(
7372 (iterator,),
7373 0x4b61033de007fcd0,
7374 fidl::encoding::DynamicFlags::empty(),
7375 )
7376 }
7377
7378 pub fn r#get_extended_attribute(
7385 &self,
7386 mut name: &[u8],
7387 ___deadline: zx::MonotonicInstant,
7388 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
7389 let _response = self.client.send_query::<
7390 NodeGetExtendedAttributeRequest,
7391 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
7392 >(
7393 (name,),
7394 0x45ffa3ccfdeb76db,
7395 fidl::encoding::DynamicFlags::empty(),
7396 ___deadline,
7397 )?;
7398 Ok(_response.map(|x| x))
7399 }
7400
7401 pub fn r#set_extended_attribute(
7409 &self,
7410 mut name: &[u8],
7411 mut value: ExtendedAttributeValue,
7412 mut mode: SetExtendedAttributeMode,
7413 ___deadline: zx::MonotonicInstant,
7414 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
7415 let _response = self.client.send_query::<
7416 NodeSetExtendedAttributeRequest,
7417 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7418 >(
7419 (name, &mut value, mode,),
7420 0x4a951362f681f23c,
7421 fidl::encoding::DynamicFlags::empty(),
7422 ___deadline,
7423 )?;
7424 Ok(_response.map(|x| x))
7425 }
7426
7427 pub fn r#remove_extended_attribute(
7433 &self,
7434 mut name: &[u8],
7435 ___deadline: zx::MonotonicInstant,
7436 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
7437 let _response = self.client.send_query::<
7438 NodeRemoveExtendedAttributeRequest,
7439 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7440 >(
7441 (name,),
7442 0x7a0b9f3a9bf9032d,
7443 fidl::encoding::DynamicFlags::empty(),
7444 ___deadline,
7445 )?;
7446 Ok(_response.map(|x| x))
7447 }
7448
7449 pub fn r#read(
7468 &self,
7469 mut count: u64,
7470 ___deadline: zx::MonotonicInstant,
7471 ) -> Result<ReadableReadResult, fidl::Error> {
7472 let _response = self.client.send_query::<
7473 ReadableReadRequest,
7474 fidl::encoding::ResultType<ReadableReadResponse, i32>,
7475 >(
7476 (count,),
7477 0x57e419a298c8ede,
7478 fidl::encoding::DynamicFlags::empty(),
7479 ___deadline,
7480 )?;
7481 Ok(_response.map(|x| x.data))
7482 }
7483
7484 pub fn r#write(
7508 &self,
7509 mut data: &[u8],
7510 ___deadline: zx::MonotonicInstant,
7511 ) -> Result<WritableWriteResult, fidl::Error> {
7512 let _response = self.client.send_query::<
7513 WritableWriteRequest,
7514 fidl::encoding::ResultType<WritableWriteResponse, i32>,
7515 >(
7516 (data,),
7517 0x6a31437832469f82,
7518 fidl::encoding::DynamicFlags::empty(),
7519 ___deadline,
7520 )?;
7521 Ok(_response.map(|x| x.actual_count))
7522 }
7523
7524 pub fn r#describe(&self, ___deadline: zx::MonotonicInstant) -> Result<FileInfo, fidl::Error> {
7525 let _response = self.client.send_query::<fidl::encoding::EmptyPayload, FileInfo>(
7526 (),
7527 0x68b5ac00c62906bc,
7528 fidl::encoding::DynamicFlags::empty(),
7529 ___deadline,
7530 )?;
7531 Ok(_response)
7532 }
7533
7534 pub fn r#seek(
7544 &self,
7545 mut origin: SeekOrigin,
7546 mut offset: i64,
7547 ___deadline: zx::MonotonicInstant,
7548 ) -> Result<FileSeekResult, fidl::Error> {
7549 let _response = self
7550 .client
7551 .send_query::<FileSeekRequest, fidl::encoding::ResultType<FileSeekResponse, i32>>(
7552 (origin, offset),
7553 0x78079168162c5207,
7554 fidl::encoding::DynamicFlags::empty(),
7555 ___deadline,
7556 )?;
7557 Ok(_response.map(|x| x.offset_from_start))
7558 }
7559
7560 pub fn r#read_at(
7578 &self,
7579 mut count: u64,
7580 mut offset: u64,
7581 ___deadline: zx::MonotonicInstant,
7582 ) -> Result<FileReadAtResult, fidl::Error> {
7583 let _response = self
7584 .client
7585 .send_query::<FileReadAtRequest, fidl::encoding::ResultType<FileReadAtResponse, i32>>(
7586 (count, offset),
7587 0x1607a293a60d723e,
7588 fidl::encoding::DynamicFlags::empty(),
7589 ___deadline,
7590 )?;
7591 Ok(_response.map(|x| x.data))
7592 }
7593
7594 pub fn r#write_at(
7616 &self,
7617 mut data: &[u8],
7618 mut offset: u64,
7619 ___deadline: zx::MonotonicInstant,
7620 ) -> Result<FileWriteAtResult, fidl::Error> {
7621 let _response = self
7622 .client
7623 .send_query::<FileWriteAtRequest, fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
7624 (data, offset),
7625 0x793eefc0045e792b,
7626 fidl::encoding::DynamicFlags::empty(),
7627 ___deadline,
7628 )?;
7629 Ok(_response.map(|x| x.actual_count))
7630 }
7631
7632 pub fn r#resize(
7641 &self,
7642 mut length: u64,
7643 ___deadline: zx::MonotonicInstant,
7644 ) -> Result<FileResizeResult, fidl::Error> {
7645 let _response = self.client.send_query::<
7646 FileResizeRequest,
7647 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7648 >(
7649 (length,),
7650 0x2b80825f0535743a,
7651 fidl::encoding::DynamicFlags::empty(),
7652 ___deadline,
7653 )?;
7654 Ok(_response.map(|x| x))
7655 }
7656
7657 pub fn r#get_backing_memory(
7678 &self,
7679 mut flags: VmoFlags,
7680 ___deadline: zx::MonotonicInstant,
7681 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7682 let _response = self.client.send_query::<
7683 FileGetBackingMemoryRequest,
7684 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7685 >(
7686 (flags,),
7687 0xa6a9e654cbf62b,
7688 fidl::encoding::DynamicFlags::empty(),
7689 ___deadline,
7690 )?;
7691 Ok(_response.map(|x| x.vmo))
7692 }
7693
7694 pub fn r#allocate(
7696 &self,
7697 mut offset: u64,
7698 mut length: u64,
7699 mut mode: AllocateMode,
7700 ___deadline: zx::MonotonicInstant,
7701 ) -> Result<FileAllocateResult, fidl::Error> {
7702 let _response = self.client.send_query::<
7703 FileAllocateRequest,
7704 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7705 >(
7706 (offset, length, mode,),
7707 0x77fa0c330b57fd2e,
7708 fidl::encoding::DynamicFlags::FLEXIBLE,
7709 ___deadline,
7710 )?
7711 .into_result::<FileMarker>("allocate")?;
7712 Ok(_response.map(|x| x))
7713 }
7714
7715 pub fn r#enable_verity(
7727 &self,
7728 mut options: &VerificationOptions,
7729 ___deadline: zx::MonotonicInstant,
7730 ) -> Result<FileEnableVerityResult, fidl::Error> {
7731 let _response = self.client.send_query::<
7732 FileEnableVerityRequest,
7733 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7734 >(
7735 (options,),
7736 0x2c421ec3faaeb8bb,
7737 fidl::encoding::DynamicFlags::FLEXIBLE,
7738 ___deadline,
7739 )?
7740 .into_result::<FileMarker>("enable_verity")?;
7741 Ok(_response.map(|x| x))
7742 }
7743}
7744
7745#[cfg(target_os = "fuchsia")]
7746impl From<FileSynchronousProxy> for zx::Handle {
7747 fn from(value: FileSynchronousProxy) -> Self {
7748 value.into_channel().into()
7749 }
7750}
7751
7752#[cfg(target_os = "fuchsia")]
7753impl From<fidl::Channel> for FileSynchronousProxy {
7754 fn from(value: fidl::Channel) -> Self {
7755 Self::new(value)
7756 }
7757}
7758
7759#[cfg(target_os = "fuchsia")]
7760impl fidl::endpoints::FromClient for FileSynchronousProxy {
7761 type Protocol = FileMarker;
7762
7763 fn from_client(value: fidl::endpoints::ClientEnd<FileMarker>) -> Self {
7764 Self::new(value.into_channel())
7765 }
7766}
7767
7768#[derive(Debug, Clone)]
7769pub struct FileProxy {
7770 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7771}
7772
7773impl fidl::endpoints::Proxy for FileProxy {
7774 type Protocol = FileMarker;
7775
7776 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7777 Self::new(inner)
7778 }
7779
7780 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7781 self.client.into_channel().map_err(|client| Self { client })
7782 }
7783
7784 fn as_channel(&self) -> &::fidl::AsyncChannel {
7785 self.client.as_channel()
7786 }
7787}
7788
7789impl FileProxy {
7790 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7792 let protocol_name = <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7793 Self { client: fidl::client::Client::new(channel, protocol_name) }
7794 }
7795
7796 pub fn take_event_stream(&self) -> FileEventStream {
7802 FileEventStream { event_receiver: self.client.take_event_receiver() }
7803 }
7804
7805 pub fn r#advisory_lock(
7829 &self,
7830 mut request: &AdvisoryLockRequest,
7831 ) -> fidl::client::QueryResponseFut<
7832 AdvisoryLockingAdvisoryLockResult,
7833 fidl::encoding::DefaultFuchsiaResourceDialect,
7834 > {
7835 FileProxyInterface::r#advisory_lock(self, request)
7836 }
7837
7838 pub fn r#link_into(
7861 &self,
7862 mut dst_parent_token: fidl::Event,
7863 mut dst: &str,
7864 ) -> fidl::client::QueryResponseFut<
7865 LinkableLinkIntoResult,
7866 fidl::encoding::DefaultFuchsiaResourceDialect,
7867 > {
7868 FileProxyInterface::r#link_into(self, dst_parent_token, dst)
7869 }
7870
7871 pub fn r#clone(
7872 &self,
7873 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7874 ) -> Result<(), fidl::Error> {
7875 FileProxyInterface::r#clone(self, request)
7876 }
7877
7878 pub fn r#close(
7889 &self,
7890 ) -> fidl::client::QueryResponseFut<
7891 fidl_fuchsia_unknown::CloseableCloseResult,
7892 fidl::encoding::DefaultFuchsiaResourceDialect,
7893 > {
7894 FileProxyInterface::r#close(self)
7895 }
7896
7897 pub fn r#query(
7898 &self,
7899 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
7900 {
7901 FileProxyInterface::r#query(self)
7902 }
7903
7904 pub fn r#deprecated_clone(
7906 &self,
7907 mut flags: OpenFlags,
7908 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
7909 ) -> Result<(), fidl::Error> {
7910 FileProxyInterface::r#deprecated_clone(self, flags, object)
7911 }
7912
7913 pub fn r#deprecated_get_attr(
7915 &self,
7916 ) -> fidl::client::QueryResponseFut<
7917 (i32, NodeAttributes),
7918 fidl::encoding::DefaultFuchsiaResourceDialect,
7919 > {
7920 FileProxyInterface::r#deprecated_get_attr(self)
7921 }
7922
7923 pub fn r#deprecated_set_attr(
7925 &self,
7926 mut flags: NodeAttributeFlags,
7927 mut attributes: &NodeAttributes,
7928 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7929 FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
7930 }
7931
7932 pub fn r#deprecated_get_flags(
7934 &self,
7935 ) -> fidl::client::QueryResponseFut<
7936 (i32, OpenFlags),
7937 fidl::encoding::DefaultFuchsiaResourceDialect,
7938 > {
7939 FileProxyInterface::r#deprecated_get_flags(self)
7940 }
7941
7942 pub fn r#deprecated_set_flags(
7944 &self,
7945 mut flags: OpenFlags,
7946 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7947 FileProxyInterface::r#deprecated_set_flags(self, flags)
7948 }
7949
7950 pub fn r#get_flags(
7959 &self,
7960 ) -> fidl::client::QueryResponseFut<
7961 NodeGetFlagsResult,
7962 fidl::encoding::DefaultFuchsiaResourceDialect,
7963 > {
7964 FileProxyInterface::r#get_flags(self)
7965 }
7966
7967 pub fn r#set_flags(
7977 &self,
7978 mut flags: Flags,
7979 ) -> fidl::client::QueryResponseFut<
7980 NodeSetFlagsResult,
7981 fidl::encoding::DefaultFuchsiaResourceDialect,
7982 > {
7983 FileProxyInterface::r#set_flags(self, flags)
7984 }
7985
7986 pub fn r#query_filesystem(
7988 &self,
7989 ) -> fidl::client::QueryResponseFut<
7990 (i32, Option<Box<FilesystemInfo>>),
7991 fidl::encoding::DefaultFuchsiaResourceDialect,
7992 > {
7993 FileProxyInterface::r#query_filesystem(self)
7994 }
7995
7996 pub fn r#get_attributes(
8010 &self,
8011 mut query: NodeAttributesQuery,
8012 ) -> fidl::client::QueryResponseFut<
8013 NodeGetAttributesResult,
8014 fidl::encoding::DefaultFuchsiaResourceDialect,
8015 > {
8016 FileProxyInterface::r#get_attributes(self, query)
8017 }
8018
8019 pub fn r#update_attributes(
8028 &self,
8029 mut payload: &MutableNodeAttributes,
8030 ) -> fidl::client::QueryResponseFut<
8031 NodeUpdateAttributesResult,
8032 fidl::encoding::DefaultFuchsiaResourceDialect,
8033 > {
8034 FileProxyInterface::r#update_attributes(self, payload)
8035 }
8036
8037 pub fn r#sync(
8047 &self,
8048 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8049 {
8050 FileProxyInterface::r#sync(self)
8051 }
8052
8053 pub fn r#list_extended_attributes(
8062 &self,
8063 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8064 ) -> Result<(), fidl::Error> {
8065 FileProxyInterface::r#list_extended_attributes(self, iterator)
8066 }
8067
8068 pub fn r#get_extended_attribute(
8075 &self,
8076 mut name: &[u8],
8077 ) -> fidl::client::QueryResponseFut<
8078 NodeGetExtendedAttributeResult,
8079 fidl::encoding::DefaultFuchsiaResourceDialect,
8080 > {
8081 FileProxyInterface::r#get_extended_attribute(self, name)
8082 }
8083
8084 pub fn r#set_extended_attribute(
8092 &self,
8093 mut name: &[u8],
8094 mut value: ExtendedAttributeValue,
8095 mut mode: SetExtendedAttributeMode,
8096 ) -> fidl::client::QueryResponseFut<
8097 NodeSetExtendedAttributeResult,
8098 fidl::encoding::DefaultFuchsiaResourceDialect,
8099 > {
8100 FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
8101 }
8102
8103 pub fn r#remove_extended_attribute(
8109 &self,
8110 mut name: &[u8],
8111 ) -> fidl::client::QueryResponseFut<
8112 NodeRemoveExtendedAttributeResult,
8113 fidl::encoding::DefaultFuchsiaResourceDialect,
8114 > {
8115 FileProxyInterface::r#remove_extended_attribute(self, name)
8116 }
8117
8118 pub fn r#read(
8137 &self,
8138 mut count: u64,
8139 ) -> fidl::client::QueryResponseFut<
8140 ReadableReadResult,
8141 fidl::encoding::DefaultFuchsiaResourceDialect,
8142 > {
8143 FileProxyInterface::r#read(self, count)
8144 }
8145
8146 pub fn r#write(
8170 &self,
8171 mut data: &[u8],
8172 ) -> fidl::client::QueryResponseFut<
8173 WritableWriteResult,
8174 fidl::encoding::DefaultFuchsiaResourceDialect,
8175 > {
8176 FileProxyInterface::r#write(self, data)
8177 }
8178
8179 pub fn r#describe(
8180 &self,
8181 ) -> fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
8182 {
8183 FileProxyInterface::r#describe(self)
8184 }
8185
8186 pub fn r#seek(
8196 &self,
8197 mut origin: SeekOrigin,
8198 mut offset: i64,
8199 ) -> fidl::client::QueryResponseFut<FileSeekResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8200 {
8201 FileProxyInterface::r#seek(self, origin, offset)
8202 }
8203
8204 pub fn r#read_at(
8222 &self,
8223 mut count: u64,
8224 mut offset: u64,
8225 ) -> fidl::client::QueryResponseFut<
8226 FileReadAtResult,
8227 fidl::encoding::DefaultFuchsiaResourceDialect,
8228 > {
8229 FileProxyInterface::r#read_at(self, count, offset)
8230 }
8231
8232 pub fn r#write_at(
8254 &self,
8255 mut data: &[u8],
8256 mut offset: u64,
8257 ) -> fidl::client::QueryResponseFut<
8258 FileWriteAtResult,
8259 fidl::encoding::DefaultFuchsiaResourceDialect,
8260 > {
8261 FileProxyInterface::r#write_at(self, data, offset)
8262 }
8263
8264 pub fn r#resize(
8273 &self,
8274 mut length: u64,
8275 ) -> fidl::client::QueryResponseFut<
8276 FileResizeResult,
8277 fidl::encoding::DefaultFuchsiaResourceDialect,
8278 > {
8279 FileProxyInterface::r#resize(self, length)
8280 }
8281
8282 pub fn r#get_backing_memory(
8303 &self,
8304 mut flags: VmoFlags,
8305 ) -> fidl::client::QueryResponseFut<
8306 FileGetBackingMemoryResult,
8307 fidl::encoding::DefaultFuchsiaResourceDialect,
8308 > {
8309 FileProxyInterface::r#get_backing_memory(self, flags)
8310 }
8311
8312 pub fn r#allocate(
8314 &self,
8315 mut offset: u64,
8316 mut length: u64,
8317 mut mode: AllocateMode,
8318 ) -> fidl::client::QueryResponseFut<
8319 FileAllocateResult,
8320 fidl::encoding::DefaultFuchsiaResourceDialect,
8321 > {
8322 FileProxyInterface::r#allocate(self, offset, length, mode)
8323 }
8324
8325 pub fn r#enable_verity(
8337 &self,
8338 mut options: &VerificationOptions,
8339 ) -> fidl::client::QueryResponseFut<
8340 FileEnableVerityResult,
8341 fidl::encoding::DefaultFuchsiaResourceDialect,
8342 > {
8343 FileProxyInterface::r#enable_verity(self, options)
8344 }
8345}
8346
8347impl FileProxyInterface for FileProxy {
8348 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
8349 AdvisoryLockingAdvisoryLockResult,
8350 fidl::encoding::DefaultFuchsiaResourceDialect,
8351 >;
8352 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
8353 fn _decode(
8354 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8355 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
8356 let _response = fidl::client::decode_transaction_body::<
8357 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8358 fidl::encoding::DefaultFuchsiaResourceDialect,
8359 0x6ee9c0ad53ec87aa,
8360 >(_buf?)?;
8361 Ok(_response.map(|x| x))
8362 }
8363 self.client.send_query_and_decode::<
8364 AdvisoryLockingAdvisoryLockRequest,
8365 AdvisoryLockingAdvisoryLockResult,
8366 >(
8367 (request,),
8368 0x6ee9c0ad53ec87aa,
8369 fidl::encoding::DynamicFlags::empty(),
8370 _decode,
8371 )
8372 }
8373
8374 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
8375 LinkableLinkIntoResult,
8376 fidl::encoding::DefaultFuchsiaResourceDialect,
8377 >;
8378 fn r#link_into(
8379 &self,
8380 mut dst_parent_token: fidl::Event,
8381 mut dst: &str,
8382 ) -> Self::LinkIntoResponseFut {
8383 fn _decode(
8384 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8385 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
8386 let _response = fidl::client::decode_transaction_body::<
8387 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8388 fidl::encoding::DefaultFuchsiaResourceDialect,
8389 0x54f3949246a03e74,
8390 >(_buf?)?;
8391 Ok(_response.map(|x| x))
8392 }
8393 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
8394 (dst_parent_token, dst),
8395 0x54f3949246a03e74,
8396 fidl::encoding::DynamicFlags::empty(),
8397 _decode,
8398 )
8399 }
8400
8401 fn r#clone(
8402 &self,
8403 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
8404 ) -> Result<(), fidl::Error> {
8405 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
8406 (request,),
8407 0x20d8a7aba2168a79,
8408 fidl::encoding::DynamicFlags::empty(),
8409 )
8410 }
8411
8412 type CloseResponseFut = fidl::client::QueryResponseFut<
8413 fidl_fuchsia_unknown::CloseableCloseResult,
8414 fidl::encoding::DefaultFuchsiaResourceDialect,
8415 >;
8416 fn r#close(&self) -> Self::CloseResponseFut {
8417 fn _decode(
8418 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8419 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
8420 let _response = fidl::client::decode_transaction_body::<
8421 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8422 fidl::encoding::DefaultFuchsiaResourceDialect,
8423 0x5ac5d459ad7f657e,
8424 >(_buf?)?;
8425 Ok(_response.map(|x| x))
8426 }
8427 self.client.send_query_and_decode::<
8428 fidl::encoding::EmptyPayload,
8429 fidl_fuchsia_unknown::CloseableCloseResult,
8430 >(
8431 (),
8432 0x5ac5d459ad7f657e,
8433 fidl::encoding::DynamicFlags::empty(),
8434 _decode,
8435 )
8436 }
8437
8438 type QueryResponseFut =
8439 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
8440 fn r#query(&self) -> Self::QueryResponseFut {
8441 fn _decode(
8442 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8443 ) -> Result<Vec<u8>, fidl::Error> {
8444 let _response = fidl::client::decode_transaction_body::<
8445 fidl_fuchsia_unknown::QueryableQueryResponse,
8446 fidl::encoding::DefaultFuchsiaResourceDialect,
8447 0x2658edee9decfc06,
8448 >(_buf?)?;
8449 Ok(_response.protocol)
8450 }
8451 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
8452 (),
8453 0x2658edee9decfc06,
8454 fidl::encoding::DynamicFlags::empty(),
8455 _decode,
8456 )
8457 }
8458
8459 fn r#deprecated_clone(
8460 &self,
8461 mut flags: OpenFlags,
8462 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
8463 ) -> Result<(), fidl::Error> {
8464 self.client.send::<NodeDeprecatedCloneRequest>(
8465 (flags, object),
8466 0x5a61678f293ce16f,
8467 fidl::encoding::DynamicFlags::FLEXIBLE,
8468 )
8469 }
8470
8471 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
8472 (i32, NodeAttributes),
8473 fidl::encoding::DefaultFuchsiaResourceDialect,
8474 >;
8475 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
8476 fn _decode(
8477 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8478 ) -> Result<(i32, NodeAttributes), fidl::Error> {
8479 let _response = fidl::client::decode_transaction_body::<
8480 NodeDeprecatedGetAttrResponse,
8481 fidl::encoding::DefaultFuchsiaResourceDialect,
8482 0x78985e216314dafd,
8483 >(_buf?)?;
8484 Ok((_response.s, _response.attributes))
8485 }
8486 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
8487 (),
8488 0x78985e216314dafd,
8489 fidl::encoding::DynamicFlags::empty(),
8490 _decode,
8491 )
8492 }
8493
8494 type DeprecatedSetAttrResponseFut =
8495 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8496 fn r#deprecated_set_attr(
8497 &self,
8498 mut flags: NodeAttributeFlags,
8499 mut attributes: &NodeAttributes,
8500 ) -> Self::DeprecatedSetAttrResponseFut {
8501 fn _decode(
8502 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8503 ) -> Result<i32, fidl::Error> {
8504 let _response = fidl::client::decode_transaction_body::<
8505 NodeDeprecatedSetAttrResponse,
8506 fidl::encoding::DefaultFuchsiaResourceDialect,
8507 0x4186c0f40d938f46,
8508 >(_buf?)?;
8509 Ok(_response.s)
8510 }
8511 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
8512 (flags, attributes),
8513 0x4186c0f40d938f46,
8514 fidl::encoding::DynamicFlags::empty(),
8515 _decode,
8516 )
8517 }
8518
8519 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
8520 (i32, OpenFlags),
8521 fidl::encoding::DefaultFuchsiaResourceDialect,
8522 >;
8523 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
8524 fn _decode(
8525 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8526 ) -> Result<(i32, OpenFlags), fidl::Error> {
8527 let _response = fidl::client::decode_transaction_body::<
8528 NodeDeprecatedGetFlagsResponse,
8529 fidl::encoding::DefaultFuchsiaResourceDialect,
8530 0x5b88fffb8eda3aa1,
8531 >(_buf?)?;
8532 Ok((_response.s, _response.flags))
8533 }
8534 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
8535 (),
8536 0x5b88fffb8eda3aa1,
8537 fidl::encoding::DynamicFlags::empty(),
8538 _decode,
8539 )
8540 }
8541
8542 type DeprecatedSetFlagsResponseFut =
8543 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8544 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
8545 fn _decode(
8546 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8547 ) -> Result<i32, fidl::Error> {
8548 let _response = fidl::client::decode_transaction_body::<
8549 NodeDeprecatedSetFlagsResponse,
8550 fidl::encoding::DefaultFuchsiaResourceDialect,
8551 0x5295b76c71fde733,
8552 >(_buf?)?;
8553 Ok(_response.s)
8554 }
8555 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
8556 (flags,),
8557 0x5295b76c71fde733,
8558 fidl::encoding::DynamicFlags::empty(),
8559 _decode,
8560 )
8561 }
8562
8563 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
8564 NodeGetFlagsResult,
8565 fidl::encoding::DefaultFuchsiaResourceDialect,
8566 >;
8567 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
8568 fn _decode(
8569 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8570 ) -> Result<NodeGetFlagsResult, fidl::Error> {
8571 let _response = fidl::client::decode_transaction_body::<
8572 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
8573 fidl::encoding::DefaultFuchsiaResourceDialect,
8574 0x176eb318f64ec23,
8575 >(_buf?)?
8576 .into_result::<FileMarker>("get_flags")?;
8577 Ok(_response.map(|x| x.flags))
8578 }
8579 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
8580 (),
8581 0x176eb318f64ec23,
8582 fidl::encoding::DynamicFlags::FLEXIBLE,
8583 _decode,
8584 )
8585 }
8586
8587 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
8588 NodeSetFlagsResult,
8589 fidl::encoding::DefaultFuchsiaResourceDialect,
8590 >;
8591 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
8592 fn _decode(
8593 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8594 ) -> Result<NodeSetFlagsResult, fidl::Error> {
8595 let _response = fidl::client::decode_transaction_body::<
8596 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
8597 fidl::encoding::DefaultFuchsiaResourceDialect,
8598 0x55a8028685791ea8,
8599 >(_buf?)?
8600 .into_result::<FileMarker>("set_flags")?;
8601 Ok(_response.map(|x| x))
8602 }
8603 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
8604 (flags,),
8605 0x55a8028685791ea8,
8606 fidl::encoding::DynamicFlags::FLEXIBLE,
8607 _decode,
8608 )
8609 }
8610
8611 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
8612 (i32, Option<Box<FilesystemInfo>>),
8613 fidl::encoding::DefaultFuchsiaResourceDialect,
8614 >;
8615 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
8616 fn _decode(
8617 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8618 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
8619 let _response = fidl::client::decode_transaction_body::<
8620 NodeQueryFilesystemResponse,
8621 fidl::encoding::DefaultFuchsiaResourceDialect,
8622 0x6f344a1c6b0a0610,
8623 >(_buf?)?;
8624 Ok((_response.s, _response.info))
8625 }
8626 self.client.send_query_and_decode::<
8627 fidl::encoding::EmptyPayload,
8628 (i32, Option<Box<FilesystemInfo>>),
8629 >(
8630 (),
8631 0x6f344a1c6b0a0610,
8632 fidl::encoding::DynamicFlags::empty(),
8633 _decode,
8634 )
8635 }
8636
8637 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
8638 NodeGetAttributesResult,
8639 fidl::encoding::DefaultFuchsiaResourceDialect,
8640 >;
8641 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
8642 fn _decode(
8643 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8644 ) -> Result<NodeGetAttributesResult, fidl::Error> {
8645 let _response = fidl::client::decode_transaction_body::<
8646 fidl::encoding::ResultType<NodeAttributes2, i32>,
8647 fidl::encoding::DefaultFuchsiaResourceDialect,
8648 0x3d4396a638ea053b,
8649 >(_buf?)?;
8650 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
8651 }
8652 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
8653 (query,),
8654 0x3d4396a638ea053b,
8655 fidl::encoding::DynamicFlags::empty(),
8656 _decode,
8657 )
8658 }
8659
8660 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
8661 NodeUpdateAttributesResult,
8662 fidl::encoding::DefaultFuchsiaResourceDialect,
8663 >;
8664 fn r#update_attributes(
8665 &self,
8666 mut payload: &MutableNodeAttributes,
8667 ) -> Self::UpdateAttributesResponseFut {
8668 fn _decode(
8669 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8670 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
8671 let _response = fidl::client::decode_transaction_body::<
8672 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8673 fidl::encoding::DefaultFuchsiaResourceDialect,
8674 0x3308c1da5a89bf08,
8675 >(_buf?)?;
8676 Ok(_response.map(|x| x))
8677 }
8678 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
8679 payload,
8680 0x3308c1da5a89bf08,
8681 fidl::encoding::DynamicFlags::empty(),
8682 _decode,
8683 )
8684 }
8685
8686 type SyncResponseFut = fidl::client::QueryResponseFut<
8687 NodeSyncResult,
8688 fidl::encoding::DefaultFuchsiaResourceDialect,
8689 >;
8690 fn r#sync(&self) -> Self::SyncResponseFut {
8691 fn _decode(
8692 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8693 ) -> Result<NodeSyncResult, fidl::Error> {
8694 let _response = fidl::client::decode_transaction_body::<
8695 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8696 fidl::encoding::DefaultFuchsiaResourceDialect,
8697 0x2c5c27ca0ab5dc49,
8698 >(_buf?)?;
8699 Ok(_response.map(|x| x))
8700 }
8701 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
8702 (),
8703 0x2c5c27ca0ab5dc49,
8704 fidl::encoding::DynamicFlags::empty(),
8705 _decode,
8706 )
8707 }
8708
8709 fn r#list_extended_attributes(
8710 &self,
8711 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8712 ) -> Result<(), fidl::Error> {
8713 self.client.send::<NodeListExtendedAttributesRequest>(
8714 (iterator,),
8715 0x4b61033de007fcd0,
8716 fidl::encoding::DynamicFlags::empty(),
8717 )
8718 }
8719
8720 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8721 NodeGetExtendedAttributeResult,
8722 fidl::encoding::DefaultFuchsiaResourceDialect,
8723 >;
8724 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
8725 fn _decode(
8726 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8727 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
8728 let _response = fidl::client::decode_transaction_body::<
8729 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
8730 fidl::encoding::DefaultFuchsiaResourceDialect,
8731 0x45ffa3ccfdeb76db,
8732 >(_buf?)?;
8733 Ok(_response.map(|x| x))
8734 }
8735 self.client.send_query_and_decode::<
8736 NodeGetExtendedAttributeRequest,
8737 NodeGetExtendedAttributeResult,
8738 >(
8739 (name,),
8740 0x45ffa3ccfdeb76db,
8741 fidl::encoding::DynamicFlags::empty(),
8742 _decode,
8743 )
8744 }
8745
8746 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8747 NodeSetExtendedAttributeResult,
8748 fidl::encoding::DefaultFuchsiaResourceDialect,
8749 >;
8750 fn r#set_extended_attribute(
8751 &self,
8752 mut name: &[u8],
8753 mut value: ExtendedAttributeValue,
8754 mut mode: SetExtendedAttributeMode,
8755 ) -> Self::SetExtendedAttributeResponseFut {
8756 fn _decode(
8757 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8758 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
8759 let _response = fidl::client::decode_transaction_body::<
8760 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8761 fidl::encoding::DefaultFuchsiaResourceDialect,
8762 0x4a951362f681f23c,
8763 >(_buf?)?;
8764 Ok(_response.map(|x| x))
8765 }
8766 self.client.send_query_and_decode::<
8767 NodeSetExtendedAttributeRequest,
8768 NodeSetExtendedAttributeResult,
8769 >(
8770 (name, &mut value, mode,),
8771 0x4a951362f681f23c,
8772 fidl::encoding::DynamicFlags::empty(),
8773 _decode,
8774 )
8775 }
8776
8777 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8778 NodeRemoveExtendedAttributeResult,
8779 fidl::encoding::DefaultFuchsiaResourceDialect,
8780 >;
8781 fn r#remove_extended_attribute(
8782 &self,
8783 mut name: &[u8],
8784 ) -> Self::RemoveExtendedAttributeResponseFut {
8785 fn _decode(
8786 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8787 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
8788 let _response = fidl::client::decode_transaction_body::<
8789 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8790 fidl::encoding::DefaultFuchsiaResourceDialect,
8791 0x7a0b9f3a9bf9032d,
8792 >(_buf?)?;
8793 Ok(_response.map(|x| x))
8794 }
8795 self.client.send_query_and_decode::<
8796 NodeRemoveExtendedAttributeRequest,
8797 NodeRemoveExtendedAttributeResult,
8798 >(
8799 (name,),
8800 0x7a0b9f3a9bf9032d,
8801 fidl::encoding::DynamicFlags::empty(),
8802 _decode,
8803 )
8804 }
8805
8806 type ReadResponseFut = fidl::client::QueryResponseFut<
8807 ReadableReadResult,
8808 fidl::encoding::DefaultFuchsiaResourceDialect,
8809 >;
8810 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
8811 fn _decode(
8812 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8813 ) -> Result<ReadableReadResult, fidl::Error> {
8814 let _response = fidl::client::decode_transaction_body::<
8815 fidl::encoding::ResultType<ReadableReadResponse, i32>,
8816 fidl::encoding::DefaultFuchsiaResourceDialect,
8817 0x57e419a298c8ede,
8818 >(_buf?)?;
8819 Ok(_response.map(|x| x.data))
8820 }
8821 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
8822 (count,),
8823 0x57e419a298c8ede,
8824 fidl::encoding::DynamicFlags::empty(),
8825 _decode,
8826 )
8827 }
8828
8829 type WriteResponseFut = fidl::client::QueryResponseFut<
8830 WritableWriteResult,
8831 fidl::encoding::DefaultFuchsiaResourceDialect,
8832 >;
8833 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
8834 fn _decode(
8835 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8836 ) -> Result<WritableWriteResult, fidl::Error> {
8837 let _response = fidl::client::decode_transaction_body::<
8838 fidl::encoding::ResultType<WritableWriteResponse, i32>,
8839 fidl::encoding::DefaultFuchsiaResourceDialect,
8840 0x6a31437832469f82,
8841 >(_buf?)?;
8842 Ok(_response.map(|x| x.actual_count))
8843 }
8844 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
8845 (data,),
8846 0x6a31437832469f82,
8847 fidl::encoding::DynamicFlags::empty(),
8848 _decode,
8849 )
8850 }
8851
8852 type DescribeResponseFut =
8853 fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
8854 fn r#describe(&self) -> Self::DescribeResponseFut {
8855 fn _decode(
8856 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8857 ) -> Result<FileInfo, fidl::Error> {
8858 let _response = fidl::client::decode_transaction_body::<
8859 FileInfo,
8860 fidl::encoding::DefaultFuchsiaResourceDialect,
8861 0x68b5ac00c62906bc,
8862 >(_buf?)?;
8863 Ok(_response)
8864 }
8865 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
8866 (),
8867 0x68b5ac00c62906bc,
8868 fidl::encoding::DynamicFlags::empty(),
8869 _decode,
8870 )
8871 }
8872
8873 type SeekResponseFut = fidl::client::QueryResponseFut<
8874 FileSeekResult,
8875 fidl::encoding::DefaultFuchsiaResourceDialect,
8876 >;
8877 fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
8878 fn _decode(
8879 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8880 ) -> Result<FileSeekResult, fidl::Error> {
8881 let _response = fidl::client::decode_transaction_body::<
8882 fidl::encoding::ResultType<FileSeekResponse, i32>,
8883 fidl::encoding::DefaultFuchsiaResourceDialect,
8884 0x78079168162c5207,
8885 >(_buf?)?;
8886 Ok(_response.map(|x| x.offset_from_start))
8887 }
8888 self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
8889 (origin, offset),
8890 0x78079168162c5207,
8891 fidl::encoding::DynamicFlags::empty(),
8892 _decode,
8893 )
8894 }
8895
8896 type ReadAtResponseFut = fidl::client::QueryResponseFut<
8897 FileReadAtResult,
8898 fidl::encoding::DefaultFuchsiaResourceDialect,
8899 >;
8900 fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
8901 fn _decode(
8902 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8903 ) -> Result<FileReadAtResult, fidl::Error> {
8904 let _response = fidl::client::decode_transaction_body::<
8905 fidl::encoding::ResultType<FileReadAtResponse, i32>,
8906 fidl::encoding::DefaultFuchsiaResourceDialect,
8907 0x1607a293a60d723e,
8908 >(_buf?)?;
8909 Ok(_response.map(|x| x.data))
8910 }
8911 self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
8912 (count, offset),
8913 0x1607a293a60d723e,
8914 fidl::encoding::DynamicFlags::empty(),
8915 _decode,
8916 )
8917 }
8918
8919 type WriteAtResponseFut = fidl::client::QueryResponseFut<
8920 FileWriteAtResult,
8921 fidl::encoding::DefaultFuchsiaResourceDialect,
8922 >;
8923 fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
8924 fn _decode(
8925 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8926 ) -> Result<FileWriteAtResult, fidl::Error> {
8927 let _response = fidl::client::decode_transaction_body::<
8928 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
8929 fidl::encoding::DefaultFuchsiaResourceDialect,
8930 0x793eefc0045e792b,
8931 >(_buf?)?;
8932 Ok(_response.map(|x| x.actual_count))
8933 }
8934 self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
8935 (data, offset),
8936 0x793eefc0045e792b,
8937 fidl::encoding::DynamicFlags::empty(),
8938 _decode,
8939 )
8940 }
8941
8942 type ResizeResponseFut = fidl::client::QueryResponseFut<
8943 FileResizeResult,
8944 fidl::encoding::DefaultFuchsiaResourceDialect,
8945 >;
8946 fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
8947 fn _decode(
8948 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8949 ) -> Result<FileResizeResult, fidl::Error> {
8950 let _response = fidl::client::decode_transaction_body::<
8951 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8952 fidl::encoding::DefaultFuchsiaResourceDialect,
8953 0x2b80825f0535743a,
8954 >(_buf?)?;
8955 Ok(_response.map(|x| x))
8956 }
8957 self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
8958 (length,),
8959 0x2b80825f0535743a,
8960 fidl::encoding::DynamicFlags::empty(),
8961 _decode,
8962 )
8963 }
8964
8965 type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
8966 FileGetBackingMemoryResult,
8967 fidl::encoding::DefaultFuchsiaResourceDialect,
8968 >;
8969 fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
8970 fn _decode(
8971 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8972 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
8973 let _response = fidl::client::decode_transaction_body::<
8974 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
8975 fidl::encoding::DefaultFuchsiaResourceDialect,
8976 0xa6a9e654cbf62b,
8977 >(_buf?)?;
8978 Ok(_response.map(|x| x.vmo))
8979 }
8980 self.client
8981 .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
8982 (flags,),
8983 0xa6a9e654cbf62b,
8984 fidl::encoding::DynamicFlags::empty(),
8985 _decode,
8986 )
8987 }
8988
8989 type AllocateResponseFut = fidl::client::QueryResponseFut<
8990 FileAllocateResult,
8991 fidl::encoding::DefaultFuchsiaResourceDialect,
8992 >;
8993 fn r#allocate(
8994 &self,
8995 mut offset: u64,
8996 mut length: u64,
8997 mut mode: AllocateMode,
8998 ) -> Self::AllocateResponseFut {
8999 fn _decode(
9000 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9001 ) -> Result<FileAllocateResult, fidl::Error> {
9002 let _response = fidl::client::decode_transaction_body::<
9003 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
9004 fidl::encoding::DefaultFuchsiaResourceDialect,
9005 0x77fa0c330b57fd2e,
9006 >(_buf?)?
9007 .into_result::<FileMarker>("allocate")?;
9008 Ok(_response.map(|x| x))
9009 }
9010 self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
9011 (offset, length, mode),
9012 0x77fa0c330b57fd2e,
9013 fidl::encoding::DynamicFlags::FLEXIBLE,
9014 _decode,
9015 )
9016 }
9017
9018 type EnableVerityResponseFut = fidl::client::QueryResponseFut<
9019 FileEnableVerityResult,
9020 fidl::encoding::DefaultFuchsiaResourceDialect,
9021 >;
9022 fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
9023 fn _decode(
9024 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9025 ) -> Result<FileEnableVerityResult, fidl::Error> {
9026 let _response = fidl::client::decode_transaction_body::<
9027 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
9028 fidl::encoding::DefaultFuchsiaResourceDialect,
9029 0x2c421ec3faaeb8bb,
9030 >(_buf?)?
9031 .into_result::<FileMarker>("enable_verity")?;
9032 Ok(_response.map(|x| x))
9033 }
9034 self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
9035 (options,),
9036 0x2c421ec3faaeb8bb,
9037 fidl::encoding::DynamicFlags::FLEXIBLE,
9038 _decode,
9039 )
9040 }
9041}
9042
9043pub struct FileEventStream {
9044 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9045}
9046
9047impl std::marker::Unpin for FileEventStream {}
9048
9049impl futures::stream::FusedStream for FileEventStream {
9050 fn is_terminated(&self) -> bool {
9051 self.event_receiver.is_terminated()
9052 }
9053}
9054
9055impl futures::Stream for FileEventStream {
9056 type Item = Result<FileEvent, fidl::Error>;
9057
9058 fn poll_next(
9059 mut self: std::pin::Pin<&mut Self>,
9060 cx: &mut std::task::Context<'_>,
9061 ) -> std::task::Poll<Option<Self::Item>> {
9062 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9063 &mut self.event_receiver,
9064 cx
9065 )?) {
9066 Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
9067 None => std::task::Poll::Ready(None),
9068 }
9069 }
9070}
9071
9072#[derive(Debug)]
9073pub enum FileEvent {
9074 OnOpen_ {
9075 s: i32,
9076 info: Option<Box<NodeInfoDeprecated>>,
9077 },
9078 OnRepresentation {
9079 payload: Representation,
9080 },
9081 #[non_exhaustive]
9082 _UnknownEvent {
9083 ordinal: u64,
9085 },
9086}
9087
9088impl FileEvent {
9089 #[allow(irrefutable_let_patterns)]
9090 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
9091 if let FileEvent::OnOpen_ { s, info } = self {
9092 Some((s, info))
9093 } else {
9094 None
9095 }
9096 }
9097 #[allow(irrefutable_let_patterns)]
9098 pub fn into_on_representation(self) -> Option<Representation> {
9099 if let FileEvent::OnRepresentation { payload } = self {
9100 Some((payload))
9101 } else {
9102 None
9103 }
9104 }
9105
9106 fn decode(
9108 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9109 ) -> Result<FileEvent, fidl::Error> {
9110 let (bytes, _handles) = buf.split_mut();
9111 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9112 debug_assert_eq!(tx_header.tx_id, 0);
9113 match tx_header.ordinal {
9114 0x7fc7bbb1dbfd1972 => {
9115 let mut out = fidl::new_empty!(
9116 NodeOnOpenRequest,
9117 fidl::encoding::DefaultFuchsiaResourceDialect
9118 );
9119 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
9120 Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
9121 }
9122 0x5cb40567d80a510c => {
9123 let mut out =
9124 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
9125 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
9126 Ok((FileEvent::OnRepresentation { payload: out }))
9127 }
9128 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
9129 Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
9130 }
9131 _ => Err(fidl::Error::UnknownOrdinal {
9132 ordinal: tx_header.ordinal,
9133 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9134 }),
9135 }
9136 }
9137}
9138
9139pub struct FileRequestStream {
9141 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9142 is_terminated: bool,
9143}
9144
9145impl std::marker::Unpin for FileRequestStream {}
9146
9147impl futures::stream::FusedStream for FileRequestStream {
9148 fn is_terminated(&self) -> bool {
9149 self.is_terminated
9150 }
9151}
9152
9153impl fidl::endpoints::RequestStream for FileRequestStream {
9154 type Protocol = FileMarker;
9155 type ControlHandle = FileControlHandle;
9156
9157 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9158 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9159 }
9160
9161 fn control_handle(&self) -> Self::ControlHandle {
9162 FileControlHandle { inner: self.inner.clone() }
9163 }
9164
9165 fn into_inner(
9166 self,
9167 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9168 {
9169 (self.inner, self.is_terminated)
9170 }
9171
9172 fn from_inner(
9173 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9174 is_terminated: bool,
9175 ) -> Self {
9176 Self { inner, is_terminated }
9177 }
9178}
9179
9180impl futures::Stream for FileRequestStream {
9181 type Item = Result<FileRequest, fidl::Error>;
9182
9183 fn poll_next(
9184 mut self: std::pin::Pin<&mut Self>,
9185 cx: &mut std::task::Context<'_>,
9186 ) -> std::task::Poll<Option<Self::Item>> {
9187 let this = &mut *self;
9188 if this.inner.check_shutdown(cx) {
9189 this.is_terminated = true;
9190 return std::task::Poll::Ready(None);
9191 }
9192 if this.is_terminated {
9193 panic!("polled FileRequestStream after completion");
9194 }
9195 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9196 |bytes, handles| {
9197 match this.inner.channel().read_etc(cx, bytes, handles) {
9198 std::task::Poll::Ready(Ok(())) => {}
9199 std::task::Poll::Pending => return std::task::Poll::Pending,
9200 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9201 this.is_terminated = true;
9202 return std::task::Poll::Ready(None);
9203 }
9204 std::task::Poll::Ready(Err(e)) => {
9205 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9206 e.into(),
9207 ))))
9208 }
9209 }
9210
9211 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9213
9214 std::task::Poll::Ready(Some(match header.ordinal {
9215 0x6ee9c0ad53ec87aa => {
9216 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9217 let mut req = fidl::new_empty!(
9218 AdvisoryLockingAdvisoryLockRequest,
9219 fidl::encoding::DefaultFuchsiaResourceDialect
9220 );
9221 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
9222 let control_handle = FileControlHandle { inner: this.inner.clone() };
9223 Ok(FileRequest::AdvisoryLock {
9224 request: req.request,
9225
9226 responder: FileAdvisoryLockResponder {
9227 control_handle: std::mem::ManuallyDrop::new(control_handle),
9228 tx_id: header.tx_id,
9229 },
9230 })
9231 }
9232 0x54f3949246a03e74 => {
9233 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9234 let mut req = fidl::new_empty!(
9235 LinkableLinkIntoRequest,
9236 fidl::encoding::DefaultFuchsiaResourceDialect
9237 );
9238 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
9239 let control_handle = FileControlHandle { inner: this.inner.clone() };
9240 Ok(FileRequest::LinkInto {
9241 dst_parent_token: req.dst_parent_token,
9242 dst: req.dst,
9243
9244 responder: FileLinkIntoResponder {
9245 control_handle: std::mem::ManuallyDrop::new(control_handle),
9246 tx_id: header.tx_id,
9247 },
9248 })
9249 }
9250 0x20d8a7aba2168a79 => {
9251 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9252 let mut req = fidl::new_empty!(
9253 fidl_fuchsia_unknown::CloneableCloneRequest,
9254 fidl::encoding::DefaultFuchsiaResourceDialect
9255 );
9256 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
9257 let control_handle = FileControlHandle { inner: this.inner.clone() };
9258 Ok(FileRequest::Clone { request: req.request, control_handle })
9259 }
9260 0x5ac5d459ad7f657e => {
9261 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9262 let mut req = fidl::new_empty!(
9263 fidl::encoding::EmptyPayload,
9264 fidl::encoding::DefaultFuchsiaResourceDialect
9265 );
9266 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9267 let control_handle = FileControlHandle { inner: this.inner.clone() };
9268 Ok(FileRequest::Close {
9269 responder: FileCloseResponder {
9270 control_handle: std::mem::ManuallyDrop::new(control_handle),
9271 tx_id: header.tx_id,
9272 },
9273 })
9274 }
9275 0x2658edee9decfc06 => {
9276 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9277 let mut req = fidl::new_empty!(
9278 fidl::encoding::EmptyPayload,
9279 fidl::encoding::DefaultFuchsiaResourceDialect
9280 );
9281 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9282 let control_handle = FileControlHandle { inner: this.inner.clone() };
9283 Ok(FileRequest::Query {
9284 responder: FileQueryResponder {
9285 control_handle: std::mem::ManuallyDrop::new(control_handle),
9286 tx_id: header.tx_id,
9287 },
9288 })
9289 }
9290 0x5a61678f293ce16f => {
9291 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9292 let mut req = fidl::new_empty!(
9293 NodeDeprecatedCloneRequest,
9294 fidl::encoding::DefaultFuchsiaResourceDialect
9295 );
9296 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
9297 let control_handle = FileControlHandle { inner: this.inner.clone() };
9298 Ok(FileRequest::DeprecatedClone {
9299 flags: req.flags,
9300 object: req.object,
9301
9302 control_handle,
9303 })
9304 }
9305 0x78985e216314dafd => {
9306 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9307 let mut req = fidl::new_empty!(
9308 fidl::encoding::EmptyPayload,
9309 fidl::encoding::DefaultFuchsiaResourceDialect
9310 );
9311 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9312 let control_handle = FileControlHandle { inner: this.inner.clone() };
9313 Ok(FileRequest::DeprecatedGetAttr {
9314 responder: FileDeprecatedGetAttrResponder {
9315 control_handle: std::mem::ManuallyDrop::new(control_handle),
9316 tx_id: header.tx_id,
9317 },
9318 })
9319 }
9320 0x4186c0f40d938f46 => {
9321 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9322 let mut req = fidl::new_empty!(
9323 NodeDeprecatedSetAttrRequest,
9324 fidl::encoding::DefaultFuchsiaResourceDialect
9325 );
9326 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
9327 let control_handle = FileControlHandle { inner: this.inner.clone() };
9328 Ok(FileRequest::DeprecatedSetAttr {
9329 flags: req.flags,
9330 attributes: req.attributes,
9331
9332 responder: FileDeprecatedSetAttrResponder {
9333 control_handle: std::mem::ManuallyDrop::new(control_handle),
9334 tx_id: header.tx_id,
9335 },
9336 })
9337 }
9338 0x5b88fffb8eda3aa1 => {
9339 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9340 let mut req = fidl::new_empty!(
9341 fidl::encoding::EmptyPayload,
9342 fidl::encoding::DefaultFuchsiaResourceDialect
9343 );
9344 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9345 let control_handle = FileControlHandle { inner: this.inner.clone() };
9346 Ok(FileRequest::DeprecatedGetFlags {
9347 responder: FileDeprecatedGetFlagsResponder {
9348 control_handle: std::mem::ManuallyDrop::new(control_handle),
9349 tx_id: header.tx_id,
9350 },
9351 })
9352 }
9353 0x5295b76c71fde733 => {
9354 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9355 let mut req = fidl::new_empty!(
9356 NodeDeprecatedSetFlagsRequest,
9357 fidl::encoding::DefaultFuchsiaResourceDialect
9358 );
9359 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9360 let control_handle = FileControlHandle { inner: this.inner.clone() };
9361 Ok(FileRequest::DeprecatedSetFlags {
9362 flags: req.flags,
9363
9364 responder: FileDeprecatedSetFlagsResponder {
9365 control_handle: std::mem::ManuallyDrop::new(control_handle),
9366 tx_id: header.tx_id,
9367 },
9368 })
9369 }
9370 0x176eb318f64ec23 => {
9371 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9372 let mut req = fidl::new_empty!(
9373 fidl::encoding::EmptyPayload,
9374 fidl::encoding::DefaultFuchsiaResourceDialect
9375 );
9376 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9377 let control_handle = FileControlHandle { inner: this.inner.clone() };
9378 Ok(FileRequest::GetFlags {
9379 responder: FileGetFlagsResponder {
9380 control_handle: std::mem::ManuallyDrop::new(control_handle),
9381 tx_id: header.tx_id,
9382 },
9383 })
9384 }
9385 0x55a8028685791ea8 => {
9386 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9387 let mut req = fidl::new_empty!(
9388 NodeSetFlagsRequest,
9389 fidl::encoding::DefaultFuchsiaResourceDialect
9390 );
9391 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9392 let control_handle = FileControlHandle { inner: this.inner.clone() };
9393 Ok(FileRequest::SetFlags {
9394 flags: req.flags,
9395
9396 responder: FileSetFlagsResponder {
9397 control_handle: std::mem::ManuallyDrop::new(control_handle),
9398 tx_id: header.tx_id,
9399 },
9400 })
9401 }
9402 0x6f344a1c6b0a0610 => {
9403 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9404 let mut req = fidl::new_empty!(
9405 fidl::encoding::EmptyPayload,
9406 fidl::encoding::DefaultFuchsiaResourceDialect
9407 );
9408 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9409 let control_handle = FileControlHandle { inner: this.inner.clone() };
9410 Ok(FileRequest::QueryFilesystem {
9411 responder: FileQueryFilesystemResponder {
9412 control_handle: std::mem::ManuallyDrop::new(control_handle),
9413 tx_id: header.tx_id,
9414 },
9415 })
9416 }
9417 0x3d4396a638ea053b => {
9418 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9419 let mut req = fidl::new_empty!(
9420 NodeGetAttributesRequest,
9421 fidl::encoding::DefaultFuchsiaResourceDialect
9422 );
9423 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9424 let control_handle = FileControlHandle { inner: this.inner.clone() };
9425 Ok(FileRequest::GetAttributes {
9426 query: req.query,
9427
9428 responder: FileGetAttributesResponder {
9429 control_handle: std::mem::ManuallyDrop::new(control_handle),
9430 tx_id: header.tx_id,
9431 },
9432 })
9433 }
9434 0x3308c1da5a89bf08 => {
9435 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9436 let mut req = fidl::new_empty!(
9437 MutableNodeAttributes,
9438 fidl::encoding::DefaultFuchsiaResourceDialect
9439 );
9440 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
9441 let control_handle = FileControlHandle { inner: this.inner.clone() };
9442 Ok(FileRequest::UpdateAttributes {
9443 payload: req,
9444 responder: FileUpdateAttributesResponder {
9445 control_handle: std::mem::ManuallyDrop::new(control_handle),
9446 tx_id: header.tx_id,
9447 },
9448 })
9449 }
9450 0x2c5c27ca0ab5dc49 => {
9451 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9452 let mut req = fidl::new_empty!(
9453 fidl::encoding::EmptyPayload,
9454 fidl::encoding::DefaultFuchsiaResourceDialect
9455 );
9456 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9457 let control_handle = FileControlHandle { inner: this.inner.clone() };
9458 Ok(FileRequest::Sync {
9459 responder: FileSyncResponder {
9460 control_handle: std::mem::ManuallyDrop::new(control_handle),
9461 tx_id: header.tx_id,
9462 },
9463 })
9464 }
9465 0x4b61033de007fcd0 => {
9466 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9467 let mut req = fidl::new_empty!(
9468 NodeListExtendedAttributesRequest,
9469 fidl::encoding::DefaultFuchsiaResourceDialect
9470 );
9471 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9472 let control_handle = FileControlHandle { inner: this.inner.clone() };
9473 Ok(FileRequest::ListExtendedAttributes {
9474 iterator: req.iterator,
9475
9476 control_handle,
9477 })
9478 }
9479 0x45ffa3ccfdeb76db => {
9480 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9481 let mut req = fidl::new_empty!(
9482 NodeGetExtendedAttributeRequest,
9483 fidl::encoding::DefaultFuchsiaResourceDialect
9484 );
9485 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9486 let control_handle = FileControlHandle { inner: this.inner.clone() };
9487 Ok(FileRequest::GetExtendedAttribute {
9488 name: req.name,
9489
9490 responder: FileGetExtendedAttributeResponder {
9491 control_handle: std::mem::ManuallyDrop::new(control_handle),
9492 tx_id: header.tx_id,
9493 },
9494 })
9495 }
9496 0x4a951362f681f23c => {
9497 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9498 let mut req = fidl::new_empty!(
9499 NodeSetExtendedAttributeRequest,
9500 fidl::encoding::DefaultFuchsiaResourceDialect
9501 );
9502 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9503 let control_handle = FileControlHandle { inner: this.inner.clone() };
9504 Ok(FileRequest::SetExtendedAttribute {
9505 name: req.name,
9506 value: req.value,
9507 mode: req.mode,
9508
9509 responder: FileSetExtendedAttributeResponder {
9510 control_handle: std::mem::ManuallyDrop::new(control_handle),
9511 tx_id: header.tx_id,
9512 },
9513 })
9514 }
9515 0x7a0b9f3a9bf9032d => {
9516 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9517 let mut req = fidl::new_empty!(
9518 NodeRemoveExtendedAttributeRequest,
9519 fidl::encoding::DefaultFuchsiaResourceDialect
9520 );
9521 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9522 let control_handle = FileControlHandle { inner: this.inner.clone() };
9523 Ok(FileRequest::RemoveExtendedAttribute {
9524 name: req.name,
9525
9526 responder: FileRemoveExtendedAttributeResponder {
9527 control_handle: std::mem::ManuallyDrop::new(control_handle),
9528 tx_id: header.tx_id,
9529 },
9530 })
9531 }
9532 0x57e419a298c8ede => {
9533 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9534 let mut req = fidl::new_empty!(
9535 ReadableReadRequest,
9536 fidl::encoding::DefaultFuchsiaResourceDialect
9537 );
9538 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
9539 let control_handle = FileControlHandle { inner: this.inner.clone() };
9540 Ok(FileRequest::Read {
9541 count: req.count,
9542
9543 responder: FileReadResponder {
9544 control_handle: std::mem::ManuallyDrop::new(control_handle),
9545 tx_id: header.tx_id,
9546 },
9547 })
9548 }
9549 0x6a31437832469f82 => {
9550 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9551 let mut req = fidl::new_empty!(
9552 WritableWriteRequest,
9553 fidl::encoding::DefaultFuchsiaResourceDialect
9554 );
9555 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
9556 let control_handle = FileControlHandle { inner: this.inner.clone() };
9557 Ok(FileRequest::Write {
9558 data: req.data,
9559
9560 responder: FileWriteResponder {
9561 control_handle: std::mem::ManuallyDrop::new(control_handle),
9562 tx_id: header.tx_id,
9563 },
9564 })
9565 }
9566 0x68b5ac00c62906bc => {
9567 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9568 let mut req = fidl::new_empty!(
9569 fidl::encoding::EmptyPayload,
9570 fidl::encoding::DefaultFuchsiaResourceDialect
9571 );
9572 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9573 let control_handle = FileControlHandle { inner: this.inner.clone() };
9574 Ok(FileRequest::Describe {
9575 responder: FileDescribeResponder {
9576 control_handle: std::mem::ManuallyDrop::new(control_handle),
9577 tx_id: header.tx_id,
9578 },
9579 })
9580 }
9581 0x78079168162c5207 => {
9582 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9583 let mut req = fidl::new_empty!(
9584 FileSeekRequest,
9585 fidl::encoding::DefaultFuchsiaResourceDialect
9586 );
9587 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
9588 let control_handle = FileControlHandle { inner: this.inner.clone() };
9589 Ok(FileRequest::Seek {
9590 origin: req.origin,
9591 offset: req.offset,
9592
9593 responder: FileSeekResponder {
9594 control_handle: std::mem::ManuallyDrop::new(control_handle),
9595 tx_id: header.tx_id,
9596 },
9597 })
9598 }
9599 0x1607a293a60d723e => {
9600 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9601 let mut req = fidl::new_empty!(
9602 FileReadAtRequest,
9603 fidl::encoding::DefaultFuchsiaResourceDialect
9604 );
9605 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
9606 let control_handle = FileControlHandle { inner: this.inner.clone() };
9607 Ok(FileRequest::ReadAt {
9608 count: req.count,
9609 offset: req.offset,
9610
9611 responder: FileReadAtResponder {
9612 control_handle: std::mem::ManuallyDrop::new(control_handle),
9613 tx_id: header.tx_id,
9614 },
9615 })
9616 }
9617 0x793eefc0045e792b => {
9618 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9619 let mut req = fidl::new_empty!(
9620 FileWriteAtRequest,
9621 fidl::encoding::DefaultFuchsiaResourceDialect
9622 );
9623 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
9624 let control_handle = FileControlHandle { inner: this.inner.clone() };
9625 Ok(FileRequest::WriteAt {
9626 data: req.data,
9627 offset: req.offset,
9628
9629 responder: FileWriteAtResponder {
9630 control_handle: std::mem::ManuallyDrop::new(control_handle),
9631 tx_id: header.tx_id,
9632 },
9633 })
9634 }
9635 0x2b80825f0535743a => {
9636 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9637 let mut req = fidl::new_empty!(
9638 FileResizeRequest,
9639 fidl::encoding::DefaultFuchsiaResourceDialect
9640 );
9641 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
9642 let control_handle = FileControlHandle { inner: this.inner.clone() };
9643 Ok(FileRequest::Resize {
9644 length: req.length,
9645
9646 responder: FileResizeResponder {
9647 control_handle: std::mem::ManuallyDrop::new(control_handle),
9648 tx_id: header.tx_id,
9649 },
9650 })
9651 }
9652 0xa6a9e654cbf62b => {
9653 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9654 let mut req = fidl::new_empty!(
9655 FileGetBackingMemoryRequest,
9656 fidl::encoding::DefaultFuchsiaResourceDialect
9657 );
9658 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
9659 let control_handle = FileControlHandle { inner: this.inner.clone() };
9660 Ok(FileRequest::GetBackingMemory {
9661 flags: req.flags,
9662
9663 responder: FileGetBackingMemoryResponder {
9664 control_handle: std::mem::ManuallyDrop::new(control_handle),
9665 tx_id: header.tx_id,
9666 },
9667 })
9668 }
9669 0x77fa0c330b57fd2e => {
9670 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9671 let mut req = fidl::new_empty!(
9672 FileAllocateRequest,
9673 fidl::encoding::DefaultFuchsiaResourceDialect
9674 );
9675 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
9676 let control_handle = FileControlHandle { inner: this.inner.clone() };
9677 Ok(FileRequest::Allocate {
9678 offset: req.offset,
9679 length: req.length,
9680 mode: req.mode,
9681
9682 responder: FileAllocateResponder {
9683 control_handle: std::mem::ManuallyDrop::new(control_handle),
9684 tx_id: header.tx_id,
9685 },
9686 })
9687 }
9688 0x2c421ec3faaeb8bb => {
9689 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9690 let mut req = fidl::new_empty!(
9691 FileEnableVerityRequest,
9692 fidl::encoding::DefaultFuchsiaResourceDialect
9693 );
9694 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
9695 let control_handle = FileControlHandle { inner: this.inner.clone() };
9696 Ok(FileRequest::EnableVerity {
9697 options: req.options,
9698
9699 responder: FileEnableVerityResponder {
9700 control_handle: std::mem::ManuallyDrop::new(control_handle),
9701 tx_id: header.tx_id,
9702 },
9703 })
9704 }
9705 _ if header.tx_id == 0
9706 && header
9707 .dynamic_flags()
9708 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9709 {
9710 Ok(FileRequest::_UnknownMethod {
9711 ordinal: header.ordinal,
9712 control_handle: FileControlHandle { inner: this.inner.clone() },
9713 method_type: fidl::MethodType::OneWay,
9714 })
9715 }
9716 _ if header
9717 .dynamic_flags()
9718 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9719 {
9720 this.inner.send_framework_err(
9721 fidl::encoding::FrameworkErr::UnknownMethod,
9722 header.tx_id,
9723 header.ordinal,
9724 header.dynamic_flags(),
9725 (bytes, handles),
9726 )?;
9727 Ok(FileRequest::_UnknownMethod {
9728 ordinal: header.ordinal,
9729 control_handle: FileControlHandle { inner: this.inner.clone() },
9730 method_type: fidl::MethodType::TwoWay,
9731 })
9732 }
9733 _ => Err(fidl::Error::UnknownOrdinal {
9734 ordinal: header.ordinal,
9735 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9736 }),
9737 }))
9738 },
9739 )
9740 }
9741}
9742
9743#[derive(Debug)]
9748pub enum FileRequest {
9749 AdvisoryLock {
9773 request: AdvisoryLockRequest,
9774 responder: FileAdvisoryLockResponder,
9775 },
9776 LinkInto {
9799 dst_parent_token: fidl::Event,
9800 dst: String,
9801 responder: FileLinkIntoResponder,
9802 },
9803 Clone {
9804 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
9805 control_handle: FileControlHandle,
9806 },
9807 Close {
9818 responder: FileCloseResponder,
9819 },
9820 Query {
9821 responder: FileQueryResponder,
9822 },
9823 DeprecatedClone {
9825 flags: OpenFlags,
9826 object: fidl::endpoints::ServerEnd<NodeMarker>,
9827 control_handle: FileControlHandle,
9828 },
9829 DeprecatedGetAttr {
9831 responder: FileDeprecatedGetAttrResponder,
9832 },
9833 DeprecatedSetAttr {
9835 flags: NodeAttributeFlags,
9836 attributes: NodeAttributes,
9837 responder: FileDeprecatedSetAttrResponder,
9838 },
9839 DeprecatedGetFlags {
9841 responder: FileDeprecatedGetFlagsResponder,
9842 },
9843 DeprecatedSetFlags {
9845 flags: OpenFlags,
9846 responder: FileDeprecatedSetFlagsResponder,
9847 },
9848 GetFlags {
9857 responder: FileGetFlagsResponder,
9858 },
9859 SetFlags {
9869 flags: Flags,
9870 responder: FileSetFlagsResponder,
9871 },
9872 QueryFilesystem {
9874 responder: FileQueryFilesystemResponder,
9875 },
9876 GetAttributes {
9890 query: NodeAttributesQuery,
9891 responder: FileGetAttributesResponder,
9892 },
9893 UpdateAttributes {
9902 payload: MutableNodeAttributes,
9903 responder: FileUpdateAttributesResponder,
9904 },
9905 Sync {
9915 responder: FileSyncResponder,
9916 },
9917 ListExtendedAttributes {
9926 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
9927 control_handle: FileControlHandle,
9928 },
9929 GetExtendedAttribute {
9936 name: Vec<u8>,
9937 responder: FileGetExtendedAttributeResponder,
9938 },
9939 SetExtendedAttribute {
9947 name: Vec<u8>,
9948 value: ExtendedAttributeValue,
9949 mode: SetExtendedAttributeMode,
9950 responder: FileSetExtendedAttributeResponder,
9951 },
9952 RemoveExtendedAttribute {
9958 name: Vec<u8>,
9959 responder: FileRemoveExtendedAttributeResponder,
9960 },
9961 Read {
9980 count: u64,
9981 responder: FileReadResponder,
9982 },
9983 Write {
10007 data: Vec<u8>,
10008 responder: FileWriteResponder,
10009 },
10010 Describe {
10011 responder: FileDescribeResponder,
10012 },
10013 Seek {
10023 origin: SeekOrigin,
10024 offset: i64,
10025 responder: FileSeekResponder,
10026 },
10027 ReadAt {
10045 count: u64,
10046 offset: u64,
10047 responder: FileReadAtResponder,
10048 },
10049 WriteAt {
10071 data: Vec<u8>,
10072 offset: u64,
10073 responder: FileWriteAtResponder,
10074 },
10075 Resize {
10084 length: u64,
10085 responder: FileResizeResponder,
10086 },
10087 GetBackingMemory {
10108 flags: VmoFlags,
10109 responder: FileGetBackingMemoryResponder,
10110 },
10111 Allocate {
10113 offset: u64,
10114 length: u64,
10115 mode: AllocateMode,
10116 responder: FileAllocateResponder,
10117 },
10118 EnableVerity {
10130 options: VerificationOptions,
10131 responder: FileEnableVerityResponder,
10132 },
10133 #[non_exhaustive]
10135 _UnknownMethod {
10136 ordinal: u64,
10138 control_handle: FileControlHandle,
10139 method_type: fidl::MethodType,
10140 },
10141}
10142
10143impl FileRequest {
10144 #[allow(irrefutable_let_patterns)]
10145 pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
10146 if let FileRequest::AdvisoryLock { request, responder } = self {
10147 Some((request, responder))
10148 } else {
10149 None
10150 }
10151 }
10152
10153 #[allow(irrefutable_let_patterns)]
10154 pub fn into_link_into(self) -> Option<(fidl::Event, String, FileLinkIntoResponder)> {
10155 if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
10156 Some((dst_parent_token, dst, responder))
10157 } else {
10158 None
10159 }
10160 }
10161
10162 #[allow(irrefutable_let_patterns)]
10163 pub fn into_clone(
10164 self,
10165 ) -> Option<(
10166 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
10167 FileControlHandle,
10168 )> {
10169 if let FileRequest::Clone { request, control_handle } = self {
10170 Some((request, control_handle))
10171 } else {
10172 None
10173 }
10174 }
10175
10176 #[allow(irrefutable_let_patterns)]
10177 pub fn into_close(self) -> Option<(FileCloseResponder)> {
10178 if let FileRequest::Close { responder } = self {
10179 Some((responder))
10180 } else {
10181 None
10182 }
10183 }
10184
10185 #[allow(irrefutable_let_patterns)]
10186 pub fn into_query(self) -> Option<(FileQueryResponder)> {
10187 if let FileRequest::Query { responder } = self {
10188 Some((responder))
10189 } else {
10190 None
10191 }
10192 }
10193
10194 #[allow(irrefutable_let_patterns)]
10195 pub fn into_deprecated_clone(
10196 self,
10197 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, FileControlHandle)> {
10198 if let FileRequest::DeprecatedClone { flags, object, control_handle } = self {
10199 Some((flags, object, control_handle))
10200 } else {
10201 None
10202 }
10203 }
10204
10205 #[allow(irrefutable_let_patterns)]
10206 pub fn into_deprecated_get_attr(self) -> Option<(FileDeprecatedGetAttrResponder)> {
10207 if let FileRequest::DeprecatedGetAttr { responder } = self {
10208 Some((responder))
10209 } else {
10210 None
10211 }
10212 }
10213
10214 #[allow(irrefutable_let_patterns)]
10215 pub fn into_deprecated_set_attr(
10216 self,
10217 ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
10218 if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
10219 Some((flags, attributes, responder))
10220 } else {
10221 None
10222 }
10223 }
10224
10225 #[allow(irrefutable_let_patterns)]
10226 pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
10227 if let FileRequest::DeprecatedGetFlags { responder } = self {
10228 Some((responder))
10229 } else {
10230 None
10231 }
10232 }
10233
10234 #[allow(irrefutable_let_patterns)]
10235 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
10236 if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
10237 Some((flags, responder))
10238 } else {
10239 None
10240 }
10241 }
10242
10243 #[allow(irrefutable_let_patterns)]
10244 pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
10245 if let FileRequest::GetFlags { responder } = self {
10246 Some((responder))
10247 } else {
10248 None
10249 }
10250 }
10251
10252 #[allow(irrefutable_let_patterns)]
10253 pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
10254 if let FileRequest::SetFlags { flags, responder } = self {
10255 Some((flags, responder))
10256 } else {
10257 None
10258 }
10259 }
10260
10261 #[allow(irrefutable_let_patterns)]
10262 pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
10263 if let FileRequest::QueryFilesystem { responder } = self {
10264 Some((responder))
10265 } else {
10266 None
10267 }
10268 }
10269
10270 #[allow(irrefutable_let_patterns)]
10271 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
10272 if let FileRequest::GetAttributes { query, responder } = self {
10273 Some((query, responder))
10274 } else {
10275 None
10276 }
10277 }
10278
10279 #[allow(irrefutable_let_patterns)]
10280 pub fn into_update_attributes(
10281 self,
10282 ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
10283 if let FileRequest::UpdateAttributes { payload, responder } = self {
10284 Some((payload, responder))
10285 } else {
10286 None
10287 }
10288 }
10289
10290 #[allow(irrefutable_let_patterns)]
10291 pub fn into_sync(self) -> Option<(FileSyncResponder)> {
10292 if let FileRequest::Sync { responder } = self {
10293 Some((responder))
10294 } else {
10295 None
10296 }
10297 }
10298
10299 #[allow(irrefutable_let_patterns)]
10300 pub fn into_list_extended_attributes(
10301 self,
10302 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
10303 {
10304 if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
10305 Some((iterator, control_handle))
10306 } else {
10307 None
10308 }
10309 }
10310
10311 #[allow(irrefutable_let_patterns)]
10312 pub fn into_get_extended_attribute(
10313 self,
10314 ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
10315 if let FileRequest::GetExtendedAttribute { name, responder } = self {
10316 Some((name, responder))
10317 } else {
10318 None
10319 }
10320 }
10321
10322 #[allow(irrefutable_let_patterns)]
10323 pub fn into_set_extended_attribute(
10324 self,
10325 ) -> Option<(
10326 Vec<u8>,
10327 ExtendedAttributeValue,
10328 SetExtendedAttributeMode,
10329 FileSetExtendedAttributeResponder,
10330 )> {
10331 if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
10332 Some((name, value, mode, responder))
10333 } else {
10334 None
10335 }
10336 }
10337
10338 #[allow(irrefutable_let_patterns)]
10339 pub fn into_remove_extended_attribute(
10340 self,
10341 ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
10342 if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
10343 Some((name, responder))
10344 } else {
10345 None
10346 }
10347 }
10348
10349 #[allow(irrefutable_let_patterns)]
10350 pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
10351 if let FileRequest::Read { count, responder } = self {
10352 Some((count, responder))
10353 } else {
10354 None
10355 }
10356 }
10357
10358 #[allow(irrefutable_let_patterns)]
10359 pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
10360 if let FileRequest::Write { data, responder } = self {
10361 Some((data, responder))
10362 } else {
10363 None
10364 }
10365 }
10366
10367 #[allow(irrefutable_let_patterns)]
10368 pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
10369 if let FileRequest::Describe { responder } = self {
10370 Some((responder))
10371 } else {
10372 None
10373 }
10374 }
10375
10376 #[allow(irrefutable_let_patterns)]
10377 pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
10378 if let FileRequest::Seek { origin, offset, responder } = self {
10379 Some((origin, offset, responder))
10380 } else {
10381 None
10382 }
10383 }
10384
10385 #[allow(irrefutable_let_patterns)]
10386 pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
10387 if let FileRequest::ReadAt { count, offset, responder } = self {
10388 Some((count, offset, responder))
10389 } else {
10390 None
10391 }
10392 }
10393
10394 #[allow(irrefutable_let_patterns)]
10395 pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
10396 if let FileRequest::WriteAt { data, offset, responder } = self {
10397 Some((data, offset, responder))
10398 } else {
10399 None
10400 }
10401 }
10402
10403 #[allow(irrefutable_let_patterns)]
10404 pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
10405 if let FileRequest::Resize { length, responder } = self {
10406 Some((length, responder))
10407 } else {
10408 None
10409 }
10410 }
10411
10412 #[allow(irrefutable_let_patterns)]
10413 pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
10414 if let FileRequest::GetBackingMemory { flags, responder } = self {
10415 Some((flags, responder))
10416 } else {
10417 None
10418 }
10419 }
10420
10421 #[allow(irrefutable_let_patterns)]
10422 pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
10423 if let FileRequest::Allocate { offset, length, mode, responder } = self {
10424 Some((offset, length, mode, responder))
10425 } else {
10426 None
10427 }
10428 }
10429
10430 #[allow(irrefutable_let_patterns)]
10431 pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
10432 if let FileRequest::EnableVerity { options, responder } = self {
10433 Some((options, responder))
10434 } else {
10435 None
10436 }
10437 }
10438
10439 pub fn method_name(&self) -> &'static str {
10441 match *self {
10442 FileRequest::AdvisoryLock { .. } => "advisory_lock",
10443 FileRequest::LinkInto { .. } => "link_into",
10444 FileRequest::Clone { .. } => "clone",
10445 FileRequest::Close { .. } => "close",
10446 FileRequest::Query { .. } => "query",
10447 FileRequest::DeprecatedClone { .. } => "deprecated_clone",
10448 FileRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
10449 FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
10450 FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
10451 FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
10452 FileRequest::GetFlags { .. } => "get_flags",
10453 FileRequest::SetFlags { .. } => "set_flags",
10454 FileRequest::QueryFilesystem { .. } => "query_filesystem",
10455 FileRequest::GetAttributes { .. } => "get_attributes",
10456 FileRequest::UpdateAttributes { .. } => "update_attributes",
10457 FileRequest::Sync { .. } => "sync",
10458 FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
10459 FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
10460 FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
10461 FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
10462 FileRequest::Read { .. } => "read",
10463 FileRequest::Write { .. } => "write",
10464 FileRequest::Describe { .. } => "describe",
10465 FileRequest::Seek { .. } => "seek",
10466 FileRequest::ReadAt { .. } => "read_at",
10467 FileRequest::WriteAt { .. } => "write_at",
10468 FileRequest::Resize { .. } => "resize",
10469 FileRequest::GetBackingMemory { .. } => "get_backing_memory",
10470 FileRequest::Allocate { .. } => "allocate",
10471 FileRequest::EnableVerity { .. } => "enable_verity",
10472 FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
10473 "unknown one-way method"
10474 }
10475 FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
10476 "unknown two-way method"
10477 }
10478 }
10479 }
10480}
10481
10482#[derive(Debug, Clone)]
10483pub struct FileControlHandle {
10484 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10485}
10486
10487impl fidl::endpoints::ControlHandle for FileControlHandle {
10488 fn shutdown(&self) {
10489 self.inner.shutdown()
10490 }
10491 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10492 self.inner.shutdown_with_epitaph(status)
10493 }
10494
10495 fn is_closed(&self) -> bool {
10496 self.inner.channel().is_closed()
10497 }
10498 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10499 self.inner.channel().on_closed()
10500 }
10501
10502 #[cfg(target_os = "fuchsia")]
10503 fn signal_peer(
10504 &self,
10505 clear_mask: zx::Signals,
10506 set_mask: zx::Signals,
10507 ) -> Result<(), zx_status::Status> {
10508 use fidl::Peered;
10509 self.inner.channel().signal_peer(clear_mask, set_mask)
10510 }
10511}
10512
10513impl FileControlHandle {
10514 pub fn send_on_open_(
10515 &self,
10516 mut s: i32,
10517 mut info: Option<NodeInfoDeprecated>,
10518 ) -> Result<(), fidl::Error> {
10519 self.inner.send::<NodeOnOpenRequest>(
10520 (s, info.as_mut()),
10521 0,
10522 0x7fc7bbb1dbfd1972,
10523 fidl::encoding::DynamicFlags::empty(),
10524 )
10525 }
10526
10527 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
10528 self.inner.send::<Representation>(
10529 &mut payload,
10530 0,
10531 0x5cb40567d80a510c,
10532 fidl::encoding::DynamicFlags::empty(),
10533 )
10534 }
10535}
10536
10537#[must_use = "FIDL methods require a response to be sent"]
10538#[derive(Debug)]
10539pub struct FileAdvisoryLockResponder {
10540 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10541 tx_id: u32,
10542}
10543
10544impl std::ops::Drop for FileAdvisoryLockResponder {
10548 fn drop(&mut self) {
10549 self.control_handle.shutdown();
10550 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10552 }
10553}
10554
10555impl fidl::endpoints::Responder for FileAdvisoryLockResponder {
10556 type ControlHandle = FileControlHandle;
10557
10558 fn control_handle(&self) -> &FileControlHandle {
10559 &self.control_handle
10560 }
10561
10562 fn drop_without_shutdown(mut self) {
10563 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10565 std::mem::forget(self);
10567 }
10568}
10569
10570impl FileAdvisoryLockResponder {
10571 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10575 let _result = self.send_raw(result);
10576 if _result.is_err() {
10577 self.control_handle.shutdown();
10578 }
10579 self.drop_without_shutdown();
10580 _result
10581 }
10582
10583 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10585 let _result = self.send_raw(result);
10586 self.drop_without_shutdown();
10587 _result
10588 }
10589
10590 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10591 self.control_handle
10592 .inner
10593 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10594 result,
10595 self.tx_id,
10596 0x6ee9c0ad53ec87aa,
10597 fidl::encoding::DynamicFlags::empty(),
10598 )
10599 }
10600}
10601
10602#[must_use = "FIDL methods require a response to be sent"]
10603#[derive(Debug)]
10604pub struct FileLinkIntoResponder {
10605 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10606 tx_id: u32,
10607}
10608
10609impl std::ops::Drop for FileLinkIntoResponder {
10613 fn drop(&mut self) {
10614 self.control_handle.shutdown();
10615 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10617 }
10618}
10619
10620impl fidl::endpoints::Responder for FileLinkIntoResponder {
10621 type ControlHandle = FileControlHandle;
10622
10623 fn control_handle(&self) -> &FileControlHandle {
10624 &self.control_handle
10625 }
10626
10627 fn drop_without_shutdown(mut self) {
10628 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10630 std::mem::forget(self);
10632 }
10633}
10634
10635impl FileLinkIntoResponder {
10636 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10640 let _result = self.send_raw(result);
10641 if _result.is_err() {
10642 self.control_handle.shutdown();
10643 }
10644 self.drop_without_shutdown();
10645 _result
10646 }
10647
10648 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10650 let _result = self.send_raw(result);
10651 self.drop_without_shutdown();
10652 _result
10653 }
10654
10655 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10656 self.control_handle
10657 .inner
10658 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10659 result,
10660 self.tx_id,
10661 0x54f3949246a03e74,
10662 fidl::encoding::DynamicFlags::empty(),
10663 )
10664 }
10665}
10666
10667#[must_use = "FIDL methods require a response to be sent"]
10668#[derive(Debug)]
10669pub struct FileCloseResponder {
10670 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10671 tx_id: u32,
10672}
10673
10674impl std::ops::Drop for FileCloseResponder {
10678 fn drop(&mut self) {
10679 self.control_handle.shutdown();
10680 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10682 }
10683}
10684
10685impl fidl::endpoints::Responder for FileCloseResponder {
10686 type ControlHandle = FileControlHandle;
10687
10688 fn control_handle(&self) -> &FileControlHandle {
10689 &self.control_handle
10690 }
10691
10692 fn drop_without_shutdown(mut self) {
10693 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10695 std::mem::forget(self);
10697 }
10698}
10699
10700impl FileCloseResponder {
10701 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10705 let _result = self.send_raw(result);
10706 if _result.is_err() {
10707 self.control_handle.shutdown();
10708 }
10709 self.drop_without_shutdown();
10710 _result
10711 }
10712
10713 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10715 let _result = self.send_raw(result);
10716 self.drop_without_shutdown();
10717 _result
10718 }
10719
10720 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10721 self.control_handle
10722 .inner
10723 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10724 result,
10725 self.tx_id,
10726 0x5ac5d459ad7f657e,
10727 fidl::encoding::DynamicFlags::empty(),
10728 )
10729 }
10730}
10731
10732#[must_use = "FIDL methods require a response to be sent"]
10733#[derive(Debug)]
10734pub struct FileQueryResponder {
10735 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10736 tx_id: u32,
10737}
10738
10739impl std::ops::Drop for FileQueryResponder {
10743 fn drop(&mut self) {
10744 self.control_handle.shutdown();
10745 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10747 }
10748}
10749
10750impl fidl::endpoints::Responder for FileQueryResponder {
10751 type ControlHandle = FileControlHandle;
10752
10753 fn control_handle(&self) -> &FileControlHandle {
10754 &self.control_handle
10755 }
10756
10757 fn drop_without_shutdown(mut self) {
10758 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10760 std::mem::forget(self);
10762 }
10763}
10764
10765impl FileQueryResponder {
10766 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10770 let _result = self.send_raw(protocol);
10771 if _result.is_err() {
10772 self.control_handle.shutdown();
10773 }
10774 self.drop_without_shutdown();
10775 _result
10776 }
10777
10778 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10780 let _result = self.send_raw(protocol);
10781 self.drop_without_shutdown();
10782 _result
10783 }
10784
10785 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10786 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
10787 (protocol,),
10788 self.tx_id,
10789 0x2658edee9decfc06,
10790 fidl::encoding::DynamicFlags::empty(),
10791 )
10792 }
10793}
10794
10795#[must_use = "FIDL methods require a response to be sent"]
10796#[derive(Debug)]
10797pub struct FileDeprecatedGetAttrResponder {
10798 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10799 tx_id: u32,
10800}
10801
10802impl std::ops::Drop for FileDeprecatedGetAttrResponder {
10806 fn drop(&mut self) {
10807 self.control_handle.shutdown();
10808 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10810 }
10811}
10812
10813impl fidl::endpoints::Responder for FileDeprecatedGetAttrResponder {
10814 type ControlHandle = FileControlHandle;
10815
10816 fn control_handle(&self) -> &FileControlHandle {
10817 &self.control_handle
10818 }
10819
10820 fn drop_without_shutdown(mut self) {
10821 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10823 std::mem::forget(self);
10825 }
10826}
10827
10828impl FileDeprecatedGetAttrResponder {
10829 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
10833 let _result = self.send_raw(s, attributes);
10834 if _result.is_err() {
10835 self.control_handle.shutdown();
10836 }
10837 self.drop_without_shutdown();
10838 _result
10839 }
10840
10841 pub fn send_no_shutdown_on_err(
10843 self,
10844 mut s: i32,
10845 mut attributes: &NodeAttributes,
10846 ) -> Result<(), fidl::Error> {
10847 let _result = self.send_raw(s, attributes);
10848 self.drop_without_shutdown();
10849 _result
10850 }
10851
10852 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
10853 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
10854 (s, attributes),
10855 self.tx_id,
10856 0x78985e216314dafd,
10857 fidl::encoding::DynamicFlags::empty(),
10858 )
10859 }
10860}
10861
10862#[must_use = "FIDL methods require a response to be sent"]
10863#[derive(Debug)]
10864pub struct FileDeprecatedSetAttrResponder {
10865 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10866 tx_id: u32,
10867}
10868
10869impl std::ops::Drop for FileDeprecatedSetAttrResponder {
10873 fn drop(&mut self) {
10874 self.control_handle.shutdown();
10875 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10877 }
10878}
10879
10880impl fidl::endpoints::Responder for FileDeprecatedSetAttrResponder {
10881 type ControlHandle = FileControlHandle;
10882
10883 fn control_handle(&self) -> &FileControlHandle {
10884 &self.control_handle
10885 }
10886
10887 fn drop_without_shutdown(mut self) {
10888 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10890 std::mem::forget(self);
10892 }
10893}
10894
10895impl FileDeprecatedSetAttrResponder {
10896 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
10900 let _result = self.send_raw(s);
10901 if _result.is_err() {
10902 self.control_handle.shutdown();
10903 }
10904 self.drop_without_shutdown();
10905 _result
10906 }
10907
10908 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
10910 let _result = self.send_raw(s);
10911 self.drop_without_shutdown();
10912 _result
10913 }
10914
10915 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
10916 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
10917 (s,),
10918 self.tx_id,
10919 0x4186c0f40d938f46,
10920 fidl::encoding::DynamicFlags::empty(),
10921 )
10922 }
10923}
10924
10925#[must_use = "FIDL methods require a response to be sent"]
10926#[derive(Debug)]
10927pub struct FileDeprecatedGetFlagsResponder {
10928 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10929 tx_id: u32,
10930}
10931
10932impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
10936 fn drop(&mut self) {
10937 self.control_handle.shutdown();
10938 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10940 }
10941}
10942
10943impl fidl::endpoints::Responder for FileDeprecatedGetFlagsResponder {
10944 type ControlHandle = FileControlHandle;
10945
10946 fn control_handle(&self) -> &FileControlHandle {
10947 &self.control_handle
10948 }
10949
10950 fn drop_without_shutdown(mut self) {
10951 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10953 std::mem::forget(self);
10955 }
10956}
10957
10958impl FileDeprecatedGetFlagsResponder {
10959 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
10963 let _result = self.send_raw(s, flags);
10964 if _result.is_err() {
10965 self.control_handle.shutdown();
10966 }
10967 self.drop_without_shutdown();
10968 _result
10969 }
10970
10971 pub fn send_no_shutdown_on_err(
10973 self,
10974 mut s: i32,
10975 mut flags: OpenFlags,
10976 ) -> Result<(), fidl::Error> {
10977 let _result = self.send_raw(s, flags);
10978 self.drop_without_shutdown();
10979 _result
10980 }
10981
10982 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
10983 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
10984 (s, flags),
10985 self.tx_id,
10986 0x5b88fffb8eda3aa1,
10987 fidl::encoding::DynamicFlags::empty(),
10988 )
10989 }
10990}
10991
10992#[must_use = "FIDL methods require a response to be sent"]
10993#[derive(Debug)]
10994pub struct FileDeprecatedSetFlagsResponder {
10995 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10996 tx_id: u32,
10997}
10998
10999impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
11003 fn drop(&mut self) {
11004 self.control_handle.shutdown();
11005 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11007 }
11008}
11009
11010impl fidl::endpoints::Responder for FileDeprecatedSetFlagsResponder {
11011 type ControlHandle = FileControlHandle;
11012
11013 fn control_handle(&self) -> &FileControlHandle {
11014 &self.control_handle
11015 }
11016
11017 fn drop_without_shutdown(mut self) {
11018 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11020 std::mem::forget(self);
11022 }
11023}
11024
11025impl FileDeprecatedSetFlagsResponder {
11026 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
11030 let _result = self.send_raw(s);
11031 if _result.is_err() {
11032 self.control_handle.shutdown();
11033 }
11034 self.drop_without_shutdown();
11035 _result
11036 }
11037
11038 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
11040 let _result = self.send_raw(s);
11041 self.drop_without_shutdown();
11042 _result
11043 }
11044
11045 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
11046 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
11047 (s,),
11048 self.tx_id,
11049 0x5295b76c71fde733,
11050 fidl::encoding::DynamicFlags::empty(),
11051 )
11052 }
11053}
11054
11055#[must_use = "FIDL methods require a response to be sent"]
11056#[derive(Debug)]
11057pub struct FileGetFlagsResponder {
11058 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11059 tx_id: u32,
11060}
11061
11062impl std::ops::Drop for FileGetFlagsResponder {
11066 fn drop(&mut self) {
11067 self.control_handle.shutdown();
11068 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11070 }
11071}
11072
11073impl fidl::endpoints::Responder for FileGetFlagsResponder {
11074 type ControlHandle = FileControlHandle;
11075
11076 fn control_handle(&self) -> &FileControlHandle {
11077 &self.control_handle
11078 }
11079
11080 fn drop_without_shutdown(mut self) {
11081 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11083 std::mem::forget(self);
11085 }
11086}
11087
11088impl FileGetFlagsResponder {
11089 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11093 let _result = self.send_raw(result);
11094 if _result.is_err() {
11095 self.control_handle.shutdown();
11096 }
11097 self.drop_without_shutdown();
11098 _result
11099 }
11100
11101 pub fn send_no_shutdown_on_err(
11103 self,
11104 mut result: Result<Flags, i32>,
11105 ) -> Result<(), fidl::Error> {
11106 let _result = self.send_raw(result);
11107 self.drop_without_shutdown();
11108 _result
11109 }
11110
11111 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11112 self.control_handle
11113 .inner
11114 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
11115 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
11116 self.tx_id,
11117 0x176eb318f64ec23,
11118 fidl::encoding::DynamicFlags::FLEXIBLE,
11119 )
11120 }
11121}
11122
11123#[must_use = "FIDL methods require a response to be sent"]
11124#[derive(Debug)]
11125pub struct FileSetFlagsResponder {
11126 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11127 tx_id: u32,
11128}
11129
11130impl std::ops::Drop for FileSetFlagsResponder {
11134 fn drop(&mut self) {
11135 self.control_handle.shutdown();
11136 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11138 }
11139}
11140
11141impl fidl::endpoints::Responder for FileSetFlagsResponder {
11142 type ControlHandle = FileControlHandle;
11143
11144 fn control_handle(&self) -> &FileControlHandle {
11145 &self.control_handle
11146 }
11147
11148 fn drop_without_shutdown(mut self) {
11149 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11151 std::mem::forget(self);
11153 }
11154}
11155
11156impl FileSetFlagsResponder {
11157 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11161 let _result = self.send_raw(result);
11162 if _result.is_err() {
11163 self.control_handle.shutdown();
11164 }
11165 self.drop_without_shutdown();
11166 _result
11167 }
11168
11169 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11171 let _result = self.send_raw(result);
11172 self.drop_without_shutdown();
11173 _result
11174 }
11175
11176 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11177 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
11178 fidl::encoding::EmptyStruct,
11179 i32,
11180 >>(
11181 fidl::encoding::FlexibleResult::new(result),
11182 self.tx_id,
11183 0x55a8028685791ea8,
11184 fidl::encoding::DynamicFlags::FLEXIBLE,
11185 )
11186 }
11187}
11188
11189#[must_use = "FIDL methods require a response to be sent"]
11190#[derive(Debug)]
11191pub struct FileQueryFilesystemResponder {
11192 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11193 tx_id: u32,
11194}
11195
11196impl std::ops::Drop for FileQueryFilesystemResponder {
11200 fn drop(&mut self) {
11201 self.control_handle.shutdown();
11202 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11204 }
11205}
11206
11207impl fidl::endpoints::Responder for FileQueryFilesystemResponder {
11208 type ControlHandle = FileControlHandle;
11209
11210 fn control_handle(&self) -> &FileControlHandle {
11211 &self.control_handle
11212 }
11213
11214 fn drop_without_shutdown(mut self) {
11215 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11217 std::mem::forget(self);
11219 }
11220}
11221
11222impl FileQueryFilesystemResponder {
11223 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11227 let _result = self.send_raw(s, info);
11228 if _result.is_err() {
11229 self.control_handle.shutdown();
11230 }
11231 self.drop_without_shutdown();
11232 _result
11233 }
11234
11235 pub fn send_no_shutdown_on_err(
11237 self,
11238 mut s: i32,
11239 mut info: Option<&FilesystemInfo>,
11240 ) -> Result<(), fidl::Error> {
11241 let _result = self.send_raw(s, info);
11242 self.drop_without_shutdown();
11243 _result
11244 }
11245
11246 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11247 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
11248 (s, info),
11249 self.tx_id,
11250 0x6f344a1c6b0a0610,
11251 fidl::encoding::DynamicFlags::empty(),
11252 )
11253 }
11254}
11255
11256#[must_use = "FIDL methods require a response to be sent"]
11257#[derive(Debug)]
11258pub struct FileGetAttributesResponder {
11259 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11260 tx_id: u32,
11261}
11262
11263impl std::ops::Drop for FileGetAttributesResponder {
11267 fn drop(&mut self) {
11268 self.control_handle.shutdown();
11269 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11271 }
11272}
11273
11274impl fidl::endpoints::Responder for FileGetAttributesResponder {
11275 type ControlHandle = FileControlHandle;
11276
11277 fn control_handle(&self) -> &FileControlHandle {
11278 &self.control_handle
11279 }
11280
11281 fn drop_without_shutdown(mut self) {
11282 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11284 std::mem::forget(self);
11286 }
11287}
11288
11289impl FileGetAttributesResponder {
11290 pub fn send(
11294 self,
11295 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11296 ) -> Result<(), fidl::Error> {
11297 let _result = self.send_raw(result);
11298 if _result.is_err() {
11299 self.control_handle.shutdown();
11300 }
11301 self.drop_without_shutdown();
11302 _result
11303 }
11304
11305 pub fn send_no_shutdown_on_err(
11307 self,
11308 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11309 ) -> Result<(), fidl::Error> {
11310 let _result = self.send_raw(result);
11311 self.drop_without_shutdown();
11312 _result
11313 }
11314
11315 fn send_raw(
11316 &self,
11317 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11318 ) -> Result<(), fidl::Error> {
11319 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
11320 result,
11321 self.tx_id,
11322 0x3d4396a638ea053b,
11323 fidl::encoding::DynamicFlags::empty(),
11324 )
11325 }
11326}
11327
11328#[must_use = "FIDL methods require a response to be sent"]
11329#[derive(Debug)]
11330pub struct FileUpdateAttributesResponder {
11331 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11332 tx_id: u32,
11333}
11334
11335impl std::ops::Drop for FileUpdateAttributesResponder {
11339 fn drop(&mut self) {
11340 self.control_handle.shutdown();
11341 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11343 }
11344}
11345
11346impl fidl::endpoints::Responder for FileUpdateAttributesResponder {
11347 type ControlHandle = FileControlHandle;
11348
11349 fn control_handle(&self) -> &FileControlHandle {
11350 &self.control_handle
11351 }
11352
11353 fn drop_without_shutdown(mut self) {
11354 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11356 std::mem::forget(self);
11358 }
11359}
11360
11361impl FileUpdateAttributesResponder {
11362 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11366 let _result = self.send_raw(result);
11367 if _result.is_err() {
11368 self.control_handle.shutdown();
11369 }
11370 self.drop_without_shutdown();
11371 _result
11372 }
11373
11374 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11376 let _result = self.send_raw(result);
11377 self.drop_without_shutdown();
11378 _result
11379 }
11380
11381 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11382 self.control_handle
11383 .inner
11384 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11385 result,
11386 self.tx_id,
11387 0x3308c1da5a89bf08,
11388 fidl::encoding::DynamicFlags::empty(),
11389 )
11390 }
11391}
11392
11393#[must_use = "FIDL methods require a response to be sent"]
11394#[derive(Debug)]
11395pub struct FileSyncResponder {
11396 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11397 tx_id: u32,
11398}
11399
11400impl std::ops::Drop for FileSyncResponder {
11404 fn drop(&mut self) {
11405 self.control_handle.shutdown();
11406 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11408 }
11409}
11410
11411impl fidl::endpoints::Responder for FileSyncResponder {
11412 type ControlHandle = FileControlHandle;
11413
11414 fn control_handle(&self) -> &FileControlHandle {
11415 &self.control_handle
11416 }
11417
11418 fn drop_without_shutdown(mut self) {
11419 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11421 std::mem::forget(self);
11423 }
11424}
11425
11426impl FileSyncResponder {
11427 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11431 let _result = self.send_raw(result);
11432 if _result.is_err() {
11433 self.control_handle.shutdown();
11434 }
11435 self.drop_without_shutdown();
11436 _result
11437 }
11438
11439 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11441 let _result = self.send_raw(result);
11442 self.drop_without_shutdown();
11443 _result
11444 }
11445
11446 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11447 self.control_handle
11448 .inner
11449 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11450 result,
11451 self.tx_id,
11452 0x2c5c27ca0ab5dc49,
11453 fidl::encoding::DynamicFlags::empty(),
11454 )
11455 }
11456}
11457
11458#[must_use = "FIDL methods require a response to be sent"]
11459#[derive(Debug)]
11460pub struct FileGetExtendedAttributeResponder {
11461 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11462 tx_id: u32,
11463}
11464
11465impl std::ops::Drop for FileGetExtendedAttributeResponder {
11469 fn drop(&mut self) {
11470 self.control_handle.shutdown();
11471 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11473 }
11474}
11475
11476impl fidl::endpoints::Responder for FileGetExtendedAttributeResponder {
11477 type ControlHandle = FileControlHandle;
11478
11479 fn control_handle(&self) -> &FileControlHandle {
11480 &self.control_handle
11481 }
11482
11483 fn drop_without_shutdown(mut self) {
11484 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11486 std::mem::forget(self);
11488 }
11489}
11490
11491impl FileGetExtendedAttributeResponder {
11492 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11496 let _result = self.send_raw(result);
11497 if _result.is_err() {
11498 self.control_handle.shutdown();
11499 }
11500 self.drop_without_shutdown();
11501 _result
11502 }
11503
11504 pub fn send_no_shutdown_on_err(
11506 self,
11507 mut result: Result<ExtendedAttributeValue, i32>,
11508 ) -> Result<(), fidl::Error> {
11509 let _result = self.send_raw(result);
11510 self.drop_without_shutdown();
11511 _result
11512 }
11513
11514 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11515 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
11516 result.as_mut().map_err(|e| *e),
11517 self.tx_id,
11518 0x45ffa3ccfdeb76db,
11519 fidl::encoding::DynamicFlags::empty(),
11520 )
11521 }
11522}
11523
11524#[must_use = "FIDL methods require a response to be sent"]
11525#[derive(Debug)]
11526pub struct FileSetExtendedAttributeResponder {
11527 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11528 tx_id: u32,
11529}
11530
11531impl std::ops::Drop for FileSetExtendedAttributeResponder {
11535 fn drop(&mut self) {
11536 self.control_handle.shutdown();
11537 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11539 }
11540}
11541
11542impl fidl::endpoints::Responder for FileSetExtendedAttributeResponder {
11543 type ControlHandle = FileControlHandle;
11544
11545 fn control_handle(&self) -> &FileControlHandle {
11546 &self.control_handle
11547 }
11548
11549 fn drop_without_shutdown(mut self) {
11550 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11552 std::mem::forget(self);
11554 }
11555}
11556
11557impl FileSetExtendedAttributeResponder {
11558 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11562 let _result = self.send_raw(result);
11563 if _result.is_err() {
11564 self.control_handle.shutdown();
11565 }
11566 self.drop_without_shutdown();
11567 _result
11568 }
11569
11570 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11572 let _result = self.send_raw(result);
11573 self.drop_without_shutdown();
11574 _result
11575 }
11576
11577 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11578 self.control_handle
11579 .inner
11580 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11581 result,
11582 self.tx_id,
11583 0x4a951362f681f23c,
11584 fidl::encoding::DynamicFlags::empty(),
11585 )
11586 }
11587}
11588
11589#[must_use = "FIDL methods require a response to be sent"]
11590#[derive(Debug)]
11591pub struct FileRemoveExtendedAttributeResponder {
11592 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11593 tx_id: u32,
11594}
11595
11596impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
11600 fn drop(&mut self) {
11601 self.control_handle.shutdown();
11602 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11604 }
11605}
11606
11607impl fidl::endpoints::Responder for FileRemoveExtendedAttributeResponder {
11608 type ControlHandle = FileControlHandle;
11609
11610 fn control_handle(&self) -> &FileControlHandle {
11611 &self.control_handle
11612 }
11613
11614 fn drop_without_shutdown(mut self) {
11615 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11617 std::mem::forget(self);
11619 }
11620}
11621
11622impl FileRemoveExtendedAttributeResponder {
11623 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11627 let _result = self.send_raw(result);
11628 if _result.is_err() {
11629 self.control_handle.shutdown();
11630 }
11631 self.drop_without_shutdown();
11632 _result
11633 }
11634
11635 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11637 let _result = self.send_raw(result);
11638 self.drop_without_shutdown();
11639 _result
11640 }
11641
11642 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11643 self.control_handle
11644 .inner
11645 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11646 result,
11647 self.tx_id,
11648 0x7a0b9f3a9bf9032d,
11649 fidl::encoding::DynamicFlags::empty(),
11650 )
11651 }
11652}
11653
11654#[must_use = "FIDL methods require a response to be sent"]
11655#[derive(Debug)]
11656pub struct FileReadResponder {
11657 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11658 tx_id: u32,
11659}
11660
11661impl std::ops::Drop for FileReadResponder {
11665 fn drop(&mut self) {
11666 self.control_handle.shutdown();
11667 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11669 }
11670}
11671
11672impl fidl::endpoints::Responder for FileReadResponder {
11673 type ControlHandle = FileControlHandle;
11674
11675 fn control_handle(&self) -> &FileControlHandle {
11676 &self.control_handle
11677 }
11678
11679 fn drop_without_shutdown(mut self) {
11680 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11682 std::mem::forget(self);
11684 }
11685}
11686
11687impl FileReadResponder {
11688 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11692 let _result = self.send_raw(result);
11693 if _result.is_err() {
11694 self.control_handle.shutdown();
11695 }
11696 self.drop_without_shutdown();
11697 _result
11698 }
11699
11700 pub fn send_no_shutdown_on_err(
11702 self,
11703 mut result: Result<&[u8], i32>,
11704 ) -> Result<(), fidl::Error> {
11705 let _result = self.send_raw(result);
11706 self.drop_without_shutdown();
11707 _result
11708 }
11709
11710 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11711 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
11712 result.map(|data| (data,)),
11713 self.tx_id,
11714 0x57e419a298c8ede,
11715 fidl::encoding::DynamicFlags::empty(),
11716 )
11717 }
11718}
11719
11720#[must_use = "FIDL methods require a response to be sent"]
11721#[derive(Debug)]
11722pub struct FileWriteResponder {
11723 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11724 tx_id: u32,
11725}
11726
11727impl std::ops::Drop for FileWriteResponder {
11731 fn drop(&mut self) {
11732 self.control_handle.shutdown();
11733 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11735 }
11736}
11737
11738impl fidl::endpoints::Responder for FileWriteResponder {
11739 type ControlHandle = FileControlHandle;
11740
11741 fn control_handle(&self) -> &FileControlHandle {
11742 &self.control_handle
11743 }
11744
11745 fn drop_without_shutdown(mut self) {
11746 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11748 std::mem::forget(self);
11750 }
11751}
11752
11753impl FileWriteResponder {
11754 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11758 let _result = self.send_raw(result);
11759 if _result.is_err() {
11760 self.control_handle.shutdown();
11761 }
11762 self.drop_without_shutdown();
11763 _result
11764 }
11765
11766 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11768 let _result = self.send_raw(result);
11769 self.drop_without_shutdown();
11770 _result
11771 }
11772
11773 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11774 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
11775 result.map(|actual_count| (actual_count,)),
11776 self.tx_id,
11777 0x6a31437832469f82,
11778 fidl::encoding::DynamicFlags::empty(),
11779 )
11780 }
11781}
11782
11783#[must_use = "FIDL methods require a response to be sent"]
11784#[derive(Debug)]
11785pub struct FileDescribeResponder {
11786 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11787 tx_id: u32,
11788}
11789
11790impl std::ops::Drop for FileDescribeResponder {
11794 fn drop(&mut self) {
11795 self.control_handle.shutdown();
11796 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11798 }
11799}
11800
11801impl fidl::endpoints::Responder for FileDescribeResponder {
11802 type ControlHandle = FileControlHandle;
11803
11804 fn control_handle(&self) -> &FileControlHandle {
11805 &self.control_handle
11806 }
11807
11808 fn drop_without_shutdown(mut self) {
11809 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11811 std::mem::forget(self);
11813 }
11814}
11815
11816impl FileDescribeResponder {
11817 pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11821 let _result = self.send_raw(payload);
11822 if _result.is_err() {
11823 self.control_handle.shutdown();
11824 }
11825 self.drop_without_shutdown();
11826 _result
11827 }
11828
11829 pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11831 let _result = self.send_raw(payload);
11832 self.drop_without_shutdown();
11833 _result
11834 }
11835
11836 fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11837 self.control_handle.inner.send::<FileInfo>(
11838 &mut payload,
11839 self.tx_id,
11840 0x68b5ac00c62906bc,
11841 fidl::encoding::DynamicFlags::empty(),
11842 )
11843 }
11844}
11845
11846#[must_use = "FIDL methods require a response to be sent"]
11847#[derive(Debug)]
11848pub struct FileSeekResponder {
11849 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11850 tx_id: u32,
11851}
11852
11853impl std::ops::Drop for FileSeekResponder {
11857 fn drop(&mut self) {
11858 self.control_handle.shutdown();
11859 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11861 }
11862}
11863
11864impl fidl::endpoints::Responder for FileSeekResponder {
11865 type ControlHandle = FileControlHandle;
11866
11867 fn control_handle(&self) -> &FileControlHandle {
11868 &self.control_handle
11869 }
11870
11871 fn drop_without_shutdown(mut self) {
11872 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11874 std::mem::forget(self);
11876 }
11877}
11878
11879impl FileSeekResponder {
11880 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11884 let _result = self.send_raw(result);
11885 if _result.is_err() {
11886 self.control_handle.shutdown();
11887 }
11888 self.drop_without_shutdown();
11889 _result
11890 }
11891
11892 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11894 let _result = self.send_raw(result);
11895 self.drop_without_shutdown();
11896 _result
11897 }
11898
11899 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11900 self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
11901 result.map(|offset_from_start| (offset_from_start,)),
11902 self.tx_id,
11903 0x78079168162c5207,
11904 fidl::encoding::DynamicFlags::empty(),
11905 )
11906 }
11907}
11908
11909#[must_use = "FIDL methods require a response to be sent"]
11910#[derive(Debug)]
11911pub struct FileReadAtResponder {
11912 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11913 tx_id: u32,
11914}
11915
11916impl std::ops::Drop for FileReadAtResponder {
11920 fn drop(&mut self) {
11921 self.control_handle.shutdown();
11922 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11924 }
11925}
11926
11927impl fidl::endpoints::Responder for FileReadAtResponder {
11928 type ControlHandle = FileControlHandle;
11929
11930 fn control_handle(&self) -> &FileControlHandle {
11931 &self.control_handle
11932 }
11933
11934 fn drop_without_shutdown(mut self) {
11935 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11937 std::mem::forget(self);
11939 }
11940}
11941
11942impl FileReadAtResponder {
11943 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11947 let _result = self.send_raw(result);
11948 if _result.is_err() {
11949 self.control_handle.shutdown();
11950 }
11951 self.drop_without_shutdown();
11952 _result
11953 }
11954
11955 pub fn send_no_shutdown_on_err(
11957 self,
11958 mut result: Result<&[u8], i32>,
11959 ) -> Result<(), fidl::Error> {
11960 let _result = self.send_raw(result);
11961 self.drop_without_shutdown();
11962 _result
11963 }
11964
11965 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11966 self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
11967 result.map(|data| (data,)),
11968 self.tx_id,
11969 0x1607a293a60d723e,
11970 fidl::encoding::DynamicFlags::empty(),
11971 )
11972 }
11973}
11974
11975#[must_use = "FIDL methods require a response to be sent"]
11976#[derive(Debug)]
11977pub struct FileWriteAtResponder {
11978 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11979 tx_id: u32,
11980}
11981
11982impl std::ops::Drop for FileWriteAtResponder {
11986 fn drop(&mut self) {
11987 self.control_handle.shutdown();
11988 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11990 }
11991}
11992
11993impl fidl::endpoints::Responder for FileWriteAtResponder {
11994 type ControlHandle = FileControlHandle;
11995
11996 fn control_handle(&self) -> &FileControlHandle {
11997 &self.control_handle
11998 }
11999
12000 fn drop_without_shutdown(mut self) {
12001 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12003 std::mem::forget(self);
12005 }
12006}
12007
12008impl FileWriteAtResponder {
12009 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12013 let _result = self.send_raw(result);
12014 if _result.is_err() {
12015 self.control_handle.shutdown();
12016 }
12017 self.drop_without_shutdown();
12018 _result
12019 }
12020
12021 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12023 let _result = self.send_raw(result);
12024 self.drop_without_shutdown();
12025 _result
12026 }
12027
12028 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12029 self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
12030 result.map(|actual_count| (actual_count,)),
12031 self.tx_id,
12032 0x793eefc0045e792b,
12033 fidl::encoding::DynamicFlags::empty(),
12034 )
12035 }
12036}
12037
12038#[must_use = "FIDL methods require a response to be sent"]
12039#[derive(Debug)]
12040pub struct FileResizeResponder {
12041 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12042 tx_id: u32,
12043}
12044
12045impl std::ops::Drop for FileResizeResponder {
12049 fn drop(&mut self) {
12050 self.control_handle.shutdown();
12051 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12053 }
12054}
12055
12056impl fidl::endpoints::Responder for FileResizeResponder {
12057 type ControlHandle = FileControlHandle;
12058
12059 fn control_handle(&self) -> &FileControlHandle {
12060 &self.control_handle
12061 }
12062
12063 fn drop_without_shutdown(mut self) {
12064 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12066 std::mem::forget(self);
12068 }
12069}
12070
12071impl FileResizeResponder {
12072 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12076 let _result = self.send_raw(result);
12077 if _result.is_err() {
12078 self.control_handle.shutdown();
12079 }
12080 self.drop_without_shutdown();
12081 _result
12082 }
12083
12084 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12086 let _result = self.send_raw(result);
12087 self.drop_without_shutdown();
12088 _result
12089 }
12090
12091 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12092 self.control_handle
12093 .inner
12094 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12095 result,
12096 self.tx_id,
12097 0x2b80825f0535743a,
12098 fidl::encoding::DynamicFlags::empty(),
12099 )
12100 }
12101}
12102
12103#[must_use = "FIDL methods require a response to be sent"]
12104#[derive(Debug)]
12105pub struct FileGetBackingMemoryResponder {
12106 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12107 tx_id: u32,
12108}
12109
12110impl std::ops::Drop for FileGetBackingMemoryResponder {
12114 fn drop(&mut self) {
12115 self.control_handle.shutdown();
12116 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12118 }
12119}
12120
12121impl fidl::endpoints::Responder for FileGetBackingMemoryResponder {
12122 type ControlHandle = FileControlHandle;
12123
12124 fn control_handle(&self) -> &FileControlHandle {
12125 &self.control_handle
12126 }
12127
12128 fn drop_without_shutdown(mut self) {
12129 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12131 std::mem::forget(self);
12133 }
12134}
12135
12136impl FileGetBackingMemoryResponder {
12137 pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12141 let _result = self.send_raw(result);
12142 if _result.is_err() {
12143 self.control_handle.shutdown();
12144 }
12145 self.drop_without_shutdown();
12146 _result
12147 }
12148
12149 pub fn send_no_shutdown_on_err(
12151 self,
12152 mut result: Result<fidl::Vmo, i32>,
12153 ) -> Result<(), fidl::Error> {
12154 let _result = self.send_raw(result);
12155 self.drop_without_shutdown();
12156 _result
12157 }
12158
12159 fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12160 self.control_handle
12161 .inner
12162 .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
12163 result.map(|vmo| (vmo,)),
12164 self.tx_id,
12165 0xa6a9e654cbf62b,
12166 fidl::encoding::DynamicFlags::empty(),
12167 )
12168 }
12169}
12170
12171#[must_use = "FIDL methods require a response to be sent"]
12172#[derive(Debug)]
12173pub struct FileAllocateResponder {
12174 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12175 tx_id: u32,
12176}
12177
12178impl std::ops::Drop for FileAllocateResponder {
12182 fn drop(&mut self) {
12183 self.control_handle.shutdown();
12184 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12186 }
12187}
12188
12189impl fidl::endpoints::Responder for FileAllocateResponder {
12190 type ControlHandle = FileControlHandle;
12191
12192 fn control_handle(&self) -> &FileControlHandle {
12193 &self.control_handle
12194 }
12195
12196 fn drop_without_shutdown(mut self) {
12197 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12199 std::mem::forget(self);
12201 }
12202}
12203
12204impl FileAllocateResponder {
12205 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12209 let _result = self.send_raw(result);
12210 if _result.is_err() {
12211 self.control_handle.shutdown();
12212 }
12213 self.drop_without_shutdown();
12214 _result
12215 }
12216
12217 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12219 let _result = self.send_raw(result);
12220 self.drop_without_shutdown();
12221 _result
12222 }
12223
12224 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12225 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12226 fidl::encoding::EmptyStruct,
12227 i32,
12228 >>(
12229 fidl::encoding::FlexibleResult::new(result),
12230 self.tx_id,
12231 0x77fa0c330b57fd2e,
12232 fidl::encoding::DynamicFlags::FLEXIBLE,
12233 )
12234 }
12235}
12236
12237#[must_use = "FIDL methods require a response to be sent"]
12238#[derive(Debug)]
12239pub struct FileEnableVerityResponder {
12240 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12241 tx_id: u32,
12242}
12243
12244impl std::ops::Drop for FileEnableVerityResponder {
12248 fn drop(&mut self) {
12249 self.control_handle.shutdown();
12250 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12252 }
12253}
12254
12255impl fidl::endpoints::Responder for FileEnableVerityResponder {
12256 type ControlHandle = FileControlHandle;
12257
12258 fn control_handle(&self) -> &FileControlHandle {
12259 &self.control_handle
12260 }
12261
12262 fn drop_without_shutdown(mut self) {
12263 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12265 std::mem::forget(self);
12267 }
12268}
12269
12270impl FileEnableVerityResponder {
12271 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12275 let _result = self.send_raw(result);
12276 if _result.is_err() {
12277 self.control_handle.shutdown();
12278 }
12279 self.drop_without_shutdown();
12280 _result
12281 }
12282
12283 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12285 let _result = self.send_raw(result);
12286 self.drop_without_shutdown();
12287 _result
12288 }
12289
12290 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12291 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12292 fidl::encoding::EmptyStruct,
12293 i32,
12294 >>(
12295 fidl::encoding::FlexibleResult::new(result),
12296 self.tx_id,
12297 0x2c421ec3faaeb8bb,
12298 fidl::encoding::DynamicFlags::FLEXIBLE,
12299 )
12300 }
12301}
12302
12303#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
12304pub struct LinkableMarker;
12305
12306impl fidl::endpoints::ProtocolMarker for LinkableMarker {
12307 type Proxy = LinkableProxy;
12308 type RequestStream = LinkableRequestStream;
12309 #[cfg(target_os = "fuchsia")]
12310 type SynchronousProxy = LinkableSynchronousProxy;
12311
12312 const DEBUG_NAME: &'static str = "(anonymous) Linkable";
12313}
12314pub type LinkableLinkIntoResult = Result<(), i32>;
12315
12316pub trait LinkableProxyInterface: Send + Sync {
12317 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
12318 + Send;
12319 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
12320}
12321#[derive(Debug)]
12322#[cfg(target_os = "fuchsia")]
12323pub struct LinkableSynchronousProxy {
12324 client: fidl::client::sync::Client,
12325}
12326
12327#[cfg(target_os = "fuchsia")]
12328impl fidl::endpoints::SynchronousProxy for LinkableSynchronousProxy {
12329 type Proxy = LinkableProxy;
12330 type Protocol = LinkableMarker;
12331
12332 fn from_channel(inner: fidl::Channel) -> Self {
12333 Self::new(inner)
12334 }
12335
12336 fn into_channel(self) -> fidl::Channel {
12337 self.client.into_channel()
12338 }
12339
12340 fn as_channel(&self) -> &fidl::Channel {
12341 self.client.as_channel()
12342 }
12343}
12344
12345#[cfg(target_os = "fuchsia")]
12346impl LinkableSynchronousProxy {
12347 pub fn new(channel: fidl::Channel) -> Self {
12348 let protocol_name = <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12349 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
12350 }
12351
12352 pub fn into_channel(self) -> fidl::Channel {
12353 self.client.into_channel()
12354 }
12355
12356 pub fn wait_for_event(
12359 &self,
12360 deadline: zx::MonotonicInstant,
12361 ) -> Result<LinkableEvent, fidl::Error> {
12362 LinkableEvent::decode(self.client.wait_for_event(deadline)?)
12363 }
12364
12365 pub fn r#link_into(
12388 &self,
12389 mut dst_parent_token: fidl::Event,
12390 mut dst: &str,
12391 ___deadline: zx::MonotonicInstant,
12392 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12393 let _response = self.client.send_query::<
12394 LinkableLinkIntoRequest,
12395 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12396 >(
12397 (dst_parent_token, dst,),
12398 0x54f3949246a03e74,
12399 fidl::encoding::DynamicFlags::empty(),
12400 ___deadline,
12401 )?;
12402 Ok(_response.map(|x| x))
12403 }
12404}
12405
12406#[cfg(target_os = "fuchsia")]
12407impl From<LinkableSynchronousProxy> for zx::Handle {
12408 fn from(value: LinkableSynchronousProxy) -> Self {
12409 value.into_channel().into()
12410 }
12411}
12412
12413#[cfg(target_os = "fuchsia")]
12414impl From<fidl::Channel> for LinkableSynchronousProxy {
12415 fn from(value: fidl::Channel) -> Self {
12416 Self::new(value)
12417 }
12418}
12419
12420#[cfg(target_os = "fuchsia")]
12421impl fidl::endpoints::FromClient for LinkableSynchronousProxy {
12422 type Protocol = LinkableMarker;
12423
12424 fn from_client(value: fidl::endpoints::ClientEnd<LinkableMarker>) -> Self {
12425 Self::new(value.into_channel())
12426 }
12427}
12428
12429#[derive(Debug, Clone)]
12430pub struct LinkableProxy {
12431 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
12432}
12433
12434impl fidl::endpoints::Proxy for LinkableProxy {
12435 type Protocol = LinkableMarker;
12436
12437 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
12438 Self::new(inner)
12439 }
12440
12441 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
12442 self.client.into_channel().map_err(|client| Self { client })
12443 }
12444
12445 fn as_channel(&self) -> &::fidl::AsyncChannel {
12446 self.client.as_channel()
12447 }
12448}
12449
12450impl LinkableProxy {
12451 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
12453 let protocol_name = <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12454 Self { client: fidl::client::Client::new(channel, protocol_name) }
12455 }
12456
12457 pub fn take_event_stream(&self) -> LinkableEventStream {
12463 LinkableEventStream { event_receiver: self.client.take_event_receiver() }
12464 }
12465
12466 pub fn r#link_into(
12489 &self,
12490 mut dst_parent_token: fidl::Event,
12491 mut dst: &str,
12492 ) -> fidl::client::QueryResponseFut<
12493 LinkableLinkIntoResult,
12494 fidl::encoding::DefaultFuchsiaResourceDialect,
12495 > {
12496 LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
12497 }
12498}
12499
12500impl LinkableProxyInterface for LinkableProxy {
12501 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
12502 LinkableLinkIntoResult,
12503 fidl::encoding::DefaultFuchsiaResourceDialect,
12504 >;
12505 fn r#link_into(
12506 &self,
12507 mut dst_parent_token: fidl::Event,
12508 mut dst: &str,
12509 ) -> Self::LinkIntoResponseFut {
12510 fn _decode(
12511 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
12512 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12513 let _response = fidl::client::decode_transaction_body::<
12514 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12515 fidl::encoding::DefaultFuchsiaResourceDialect,
12516 0x54f3949246a03e74,
12517 >(_buf?)?;
12518 Ok(_response.map(|x| x))
12519 }
12520 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
12521 (dst_parent_token, dst),
12522 0x54f3949246a03e74,
12523 fidl::encoding::DynamicFlags::empty(),
12524 _decode,
12525 )
12526 }
12527}
12528
12529pub struct LinkableEventStream {
12530 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
12531}
12532
12533impl std::marker::Unpin for LinkableEventStream {}
12534
12535impl futures::stream::FusedStream for LinkableEventStream {
12536 fn is_terminated(&self) -> bool {
12537 self.event_receiver.is_terminated()
12538 }
12539}
12540
12541impl futures::Stream for LinkableEventStream {
12542 type Item = Result<LinkableEvent, fidl::Error>;
12543
12544 fn poll_next(
12545 mut self: std::pin::Pin<&mut Self>,
12546 cx: &mut std::task::Context<'_>,
12547 ) -> std::task::Poll<Option<Self::Item>> {
12548 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
12549 &mut self.event_receiver,
12550 cx
12551 )?) {
12552 Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
12553 None => std::task::Poll::Ready(None),
12554 }
12555 }
12556}
12557
12558#[derive(Debug)]
12559pub enum LinkableEvent {}
12560
12561impl LinkableEvent {
12562 fn decode(
12564 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
12565 ) -> Result<LinkableEvent, fidl::Error> {
12566 let (bytes, _handles) = buf.split_mut();
12567 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12568 debug_assert_eq!(tx_header.tx_id, 0);
12569 match tx_header.ordinal {
12570 _ => Err(fidl::Error::UnknownOrdinal {
12571 ordinal: tx_header.ordinal,
12572 protocol_name: <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12573 }),
12574 }
12575 }
12576}
12577
12578pub struct LinkableRequestStream {
12580 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12581 is_terminated: bool,
12582}
12583
12584impl std::marker::Unpin for LinkableRequestStream {}
12585
12586impl futures::stream::FusedStream for LinkableRequestStream {
12587 fn is_terminated(&self) -> bool {
12588 self.is_terminated
12589 }
12590}
12591
12592impl fidl::endpoints::RequestStream for LinkableRequestStream {
12593 type Protocol = LinkableMarker;
12594 type ControlHandle = LinkableControlHandle;
12595
12596 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
12597 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
12598 }
12599
12600 fn control_handle(&self) -> Self::ControlHandle {
12601 LinkableControlHandle { inner: self.inner.clone() }
12602 }
12603
12604 fn into_inner(
12605 self,
12606 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
12607 {
12608 (self.inner, self.is_terminated)
12609 }
12610
12611 fn from_inner(
12612 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12613 is_terminated: bool,
12614 ) -> Self {
12615 Self { inner, is_terminated }
12616 }
12617}
12618
12619impl futures::Stream for LinkableRequestStream {
12620 type Item = Result<LinkableRequest, fidl::Error>;
12621
12622 fn poll_next(
12623 mut self: std::pin::Pin<&mut Self>,
12624 cx: &mut std::task::Context<'_>,
12625 ) -> std::task::Poll<Option<Self::Item>> {
12626 let this = &mut *self;
12627 if this.inner.check_shutdown(cx) {
12628 this.is_terminated = true;
12629 return std::task::Poll::Ready(None);
12630 }
12631 if this.is_terminated {
12632 panic!("polled LinkableRequestStream after completion");
12633 }
12634 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
12635 |bytes, handles| {
12636 match this.inner.channel().read_etc(cx, bytes, handles) {
12637 std::task::Poll::Ready(Ok(())) => {}
12638 std::task::Poll::Pending => return std::task::Poll::Pending,
12639 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
12640 this.is_terminated = true;
12641 return std::task::Poll::Ready(None);
12642 }
12643 std::task::Poll::Ready(Err(e)) => {
12644 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
12645 e.into(),
12646 ))))
12647 }
12648 }
12649
12650 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12652
12653 std::task::Poll::Ready(Some(match header.ordinal {
12654 0x54f3949246a03e74 => {
12655 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12656 let mut req = fidl::new_empty!(
12657 LinkableLinkIntoRequest,
12658 fidl::encoding::DefaultFuchsiaResourceDialect
12659 );
12660 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
12661 let control_handle = LinkableControlHandle { inner: this.inner.clone() };
12662 Ok(LinkableRequest::LinkInto {
12663 dst_parent_token: req.dst_parent_token,
12664 dst: req.dst,
12665
12666 responder: LinkableLinkIntoResponder {
12667 control_handle: std::mem::ManuallyDrop::new(control_handle),
12668 tx_id: header.tx_id,
12669 },
12670 })
12671 }
12672 _ => Err(fidl::Error::UnknownOrdinal {
12673 ordinal: header.ordinal,
12674 protocol_name:
12675 <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12676 }),
12677 }))
12678 },
12679 )
12680 }
12681}
12682
12683#[derive(Debug)]
12684pub enum LinkableRequest {
12685 LinkInto { dst_parent_token: fidl::Event, dst: String, responder: LinkableLinkIntoResponder },
12708}
12709
12710impl LinkableRequest {
12711 #[allow(irrefutable_let_patterns)]
12712 pub fn into_link_into(self) -> Option<(fidl::Event, String, LinkableLinkIntoResponder)> {
12713 if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
12714 Some((dst_parent_token, dst, responder))
12715 } else {
12716 None
12717 }
12718 }
12719
12720 pub fn method_name(&self) -> &'static str {
12722 match *self {
12723 LinkableRequest::LinkInto { .. } => "link_into",
12724 }
12725 }
12726}
12727
12728#[derive(Debug, Clone)]
12729pub struct LinkableControlHandle {
12730 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12731}
12732
12733impl fidl::endpoints::ControlHandle for LinkableControlHandle {
12734 fn shutdown(&self) {
12735 self.inner.shutdown()
12736 }
12737 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
12738 self.inner.shutdown_with_epitaph(status)
12739 }
12740
12741 fn is_closed(&self) -> bool {
12742 self.inner.channel().is_closed()
12743 }
12744 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
12745 self.inner.channel().on_closed()
12746 }
12747
12748 #[cfg(target_os = "fuchsia")]
12749 fn signal_peer(
12750 &self,
12751 clear_mask: zx::Signals,
12752 set_mask: zx::Signals,
12753 ) -> Result<(), zx_status::Status> {
12754 use fidl::Peered;
12755 self.inner.channel().signal_peer(clear_mask, set_mask)
12756 }
12757}
12758
12759impl LinkableControlHandle {}
12760
12761#[must_use = "FIDL methods require a response to be sent"]
12762#[derive(Debug)]
12763pub struct LinkableLinkIntoResponder {
12764 control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
12765 tx_id: u32,
12766}
12767
12768impl std::ops::Drop for LinkableLinkIntoResponder {
12772 fn drop(&mut self) {
12773 self.control_handle.shutdown();
12774 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12776 }
12777}
12778
12779impl fidl::endpoints::Responder for LinkableLinkIntoResponder {
12780 type ControlHandle = LinkableControlHandle;
12781
12782 fn control_handle(&self) -> &LinkableControlHandle {
12783 &self.control_handle
12784 }
12785
12786 fn drop_without_shutdown(mut self) {
12787 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12789 std::mem::forget(self);
12791 }
12792}
12793
12794impl LinkableLinkIntoResponder {
12795 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12799 let _result = self.send_raw(result);
12800 if _result.is_err() {
12801 self.control_handle.shutdown();
12802 }
12803 self.drop_without_shutdown();
12804 _result
12805 }
12806
12807 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12809 let _result = self.send_raw(result);
12810 self.drop_without_shutdown();
12811 _result
12812 }
12813
12814 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12815 self.control_handle
12816 .inner
12817 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12818 result,
12819 self.tx_id,
12820 0x54f3949246a03e74,
12821 fidl::encoding::DynamicFlags::empty(),
12822 )
12823 }
12824}
12825
12826#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
12827pub struct NodeMarker;
12828
12829impl fidl::endpoints::ProtocolMarker for NodeMarker {
12830 type Proxy = NodeProxy;
12831 type RequestStream = NodeRequestStream;
12832 #[cfg(target_os = "fuchsia")]
12833 type SynchronousProxy = NodeSynchronousProxy;
12834
12835 const DEBUG_NAME: &'static str = "fuchsia.io.Node";
12836}
12837impl fidl::endpoints::DiscoverableProtocolMarker for NodeMarker {}
12838pub type NodeGetFlagsResult = Result<Flags, i32>;
12839pub type NodeSetFlagsResult = Result<(), i32>;
12840pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
12841pub type NodeUpdateAttributesResult = Result<(), i32>;
12842pub type NodeSyncResult = Result<(), i32>;
12843pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
12844pub type NodeSetExtendedAttributeResult = Result<(), i32>;
12845pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
12846
12847pub trait NodeProxyInterface: Send + Sync {
12848 fn r#clone(
12849 &self,
12850 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
12851 ) -> Result<(), fidl::Error>;
12852 type CloseResponseFut: std::future::Future<
12853 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
12854 > + Send;
12855 fn r#close(&self) -> Self::CloseResponseFut;
12856 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
12857 fn r#query(&self) -> Self::QueryResponseFut;
12858 fn r#deprecated_clone(
12859 &self,
12860 flags: OpenFlags,
12861 object: fidl::endpoints::ServerEnd<NodeMarker>,
12862 ) -> Result<(), fidl::Error>;
12863 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
12864 + Send;
12865 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
12866 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
12867 fn r#deprecated_set_attr(
12868 &self,
12869 flags: NodeAttributeFlags,
12870 attributes: &NodeAttributes,
12871 ) -> Self::DeprecatedSetAttrResponseFut;
12872 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
12873 + Send;
12874 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
12875 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
12876 + Send;
12877 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
12878 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
12879 + Send;
12880 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
12881 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
12882 + Send;
12883 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
12884 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
12885 + Send;
12886 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
12887 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
12888 + Send;
12889 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
12890 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
12891 + Send;
12892 fn r#update_attributes(
12893 &self,
12894 payload: &MutableNodeAttributes,
12895 ) -> Self::UpdateAttributesResponseFut;
12896 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
12897 fn r#sync(&self) -> Self::SyncResponseFut;
12898 fn r#list_extended_attributes(
12899 &self,
12900 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
12901 ) -> Result<(), fidl::Error>;
12902 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
12903 + Send;
12904 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
12905 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
12906 + Send;
12907 fn r#set_extended_attribute(
12908 &self,
12909 name: &[u8],
12910 value: ExtendedAttributeValue,
12911 mode: SetExtendedAttributeMode,
12912 ) -> Self::SetExtendedAttributeResponseFut;
12913 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
12914 + Send;
12915 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
12916}
12917#[derive(Debug)]
12918#[cfg(target_os = "fuchsia")]
12919pub struct NodeSynchronousProxy {
12920 client: fidl::client::sync::Client,
12921}
12922
12923#[cfg(target_os = "fuchsia")]
12924impl fidl::endpoints::SynchronousProxy for NodeSynchronousProxy {
12925 type Proxy = NodeProxy;
12926 type Protocol = NodeMarker;
12927
12928 fn from_channel(inner: fidl::Channel) -> Self {
12929 Self::new(inner)
12930 }
12931
12932 fn into_channel(self) -> fidl::Channel {
12933 self.client.into_channel()
12934 }
12935
12936 fn as_channel(&self) -> &fidl::Channel {
12937 self.client.as_channel()
12938 }
12939}
12940
12941#[cfg(target_os = "fuchsia")]
12942impl NodeSynchronousProxy {
12943 pub fn new(channel: fidl::Channel) -> Self {
12944 let protocol_name = <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12945 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
12946 }
12947
12948 pub fn into_channel(self) -> fidl::Channel {
12949 self.client.into_channel()
12950 }
12951
12952 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<NodeEvent, fidl::Error> {
12955 NodeEvent::decode(self.client.wait_for_event(deadline)?)
12956 }
12957
12958 pub fn r#clone(
12959 &self,
12960 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
12961 ) -> Result<(), fidl::Error> {
12962 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
12963 (request,),
12964 0x20d8a7aba2168a79,
12965 fidl::encoding::DynamicFlags::empty(),
12966 )
12967 }
12968
12969 pub fn r#close(
12980 &self,
12981 ___deadline: zx::MonotonicInstant,
12982 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
12983 let _response = self.client.send_query::<
12984 fidl::encoding::EmptyPayload,
12985 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12986 >(
12987 (),
12988 0x5ac5d459ad7f657e,
12989 fidl::encoding::DynamicFlags::empty(),
12990 ___deadline,
12991 )?;
12992 Ok(_response.map(|x| x))
12993 }
12994
12995 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
12996 let _response = self.client.send_query::<
12997 fidl::encoding::EmptyPayload,
12998 fidl_fuchsia_unknown::QueryableQueryResponse,
12999 >(
13000 (),
13001 0x2658edee9decfc06,
13002 fidl::encoding::DynamicFlags::empty(),
13003 ___deadline,
13004 )?;
13005 Ok(_response.protocol)
13006 }
13007
13008 pub fn r#deprecated_clone(
13010 &self,
13011 mut flags: OpenFlags,
13012 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13013 ) -> Result<(), fidl::Error> {
13014 self.client.send::<NodeDeprecatedCloneRequest>(
13015 (flags, object),
13016 0x5a61678f293ce16f,
13017 fidl::encoding::DynamicFlags::FLEXIBLE,
13018 )
13019 }
13020
13021 pub fn r#deprecated_get_attr(
13023 &self,
13024 ___deadline: zx::MonotonicInstant,
13025 ) -> Result<(i32, NodeAttributes), fidl::Error> {
13026 let _response =
13027 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
13028 (),
13029 0x78985e216314dafd,
13030 fidl::encoding::DynamicFlags::empty(),
13031 ___deadline,
13032 )?;
13033 Ok((_response.s, _response.attributes))
13034 }
13035
13036 pub fn r#deprecated_set_attr(
13038 &self,
13039 mut flags: NodeAttributeFlags,
13040 mut attributes: &NodeAttributes,
13041 ___deadline: zx::MonotonicInstant,
13042 ) -> Result<i32, fidl::Error> {
13043 let _response =
13044 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
13045 (flags, attributes),
13046 0x4186c0f40d938f46,
13047 fidl::encoding::DynamicFlags::empty(),
13048 ___deadline,
13049 )?;
13050 Ok(_response.s)
13051 }
13052
13053 pub fn r#deprecated_get_flags(
13055 &self,
13056 ___deadline: zx::MonotonicInstant,
13057 ) -> Result<(i32, OpenFlags), fidl::Error> {
13058 let _response = self
13059 .client
13060 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
13061 (),
13062 0x5b88fffb8eda3aa1,
13063 fidl::encoding::DynamicFlags::empty(),
13064 ___deadline,
13065 )?;
13066 Ok((_response.s, _response.flags))
13067 }
13068
13069 pub fn r#deprecated_set_flags(
13071 &self,
13072 mut flags: OpenFlags,
13073 ___deadline: zx::MonotonicInstant,
13074 ) -> Result<i32, fidl::Error> {
13075 let _response = self
13076 .client
13077 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
13078 (flags,),
13079 0x5295b76c71fde733,
13080 fidl::encoding::DynamicFlags::empty(),
13081 ___deadline,
13082 )?;
13083 Ok(_response.s)
13084 }
13085
13086 pub fn r#get_flags(
13095 &self,
13096 ___deadline: zx::MonotonicInstant,
13097 ) -> Result<NodeGetFlagsResult, fidl::Error> {
13098 let _response = self.client.send_query::<
13099 fidl::encoding::EmptyPayload,
13100 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
13101 >(
13102 (),
13103 0x176eb318f64ec23,
13104 fidl::encoding::DynamicFlags::FLEXIBLE,
13105 ___deadline,
13106 )?
13107 .into_result::<NodeMarker>("get_flags")?;
13108 Ok(_response.map(|x| x.flags))
13109 }
13110
13111 pub fn r#set_flags(
13121 &self,
13122 mut flags: Flags,
13123 ___deadline: zx::MonotonicInstant,
13124 ) -> Result<NodeSetFlagsResult, fidl::Error> {
13125 let _response = self.client.send_query::<
13126 NodeSetFlagsRequest,
13127 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
13128 >(
13129 (flags,),
13130 0x55a8028685791ea8,
13131 fidl::encoding::DynamicFlags::FLEXIBLE,
13132 ___deadline,
13133 )?
13134 .into_result::<NodeMarker>("set_flags")?;
13135 Ok(_response.map(|x| x))
13136 }
13137
13138 pub fn r#query_filesystem(
13140 &self,
13141 ___deadline: zx::MonotonicInstant,
13142 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
13143 let _response =
13144 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
13145 (),
13146 0x6f344a1c6b0a0610,
13147 fidl::encoding::DynamicFlags::empty(),
13148 ___deadline,
13149 )?;
13150 Ok((_response.s, _response.info))
13151 }
13152
13153 pub fn r#get_attributes(
13167 &self,
13168 mut query: NodeAttributesQuery,
13169 ___deadline: zx::MonotonicInstant,
13170 ) -> Result<NodeGetAttributesResult, fidl::Error> {
13171 let _response = self.client.send_query::<
13172 NodeGetAttributesRequest,
13173 fidl::encoding::ResultType<NodeAttributes2, i32>,
13174 >(
13175 (query,),
13176 0x3d4396a638ea053b,
13177 fidl::encoding::DynamicFlags::empty(),
13178 ___deadline,
13179 )?;
13180 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
13181 }
13182
13183 pub fn r#update_attributes(
13192 &self,
13193 mut payload: &MutableNodeAttributes,
13194 ___deadline: zx::MonotonicInstant,
13195 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
13196 let _response = self.client.send_query::<
13197 MutableNodeAttributes,
13198 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13199 >(
13200 payload,
13201 0x3308c1da5a89bf08,
13202 fidl::encoding::DynamicFlags::empty(),
13203 ___deadline,
13204 )?;
13205 Ok(_response.map(|x| x))
13206 }
13207
13208 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
13218 let _response = self.client.send_query::<
13219 fidl::encoding::EmptyPayload,
13220 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13221 >(
13222 (),
13223 0x2c5c27ca0ab5dc49,
13224 fidl::encoding::DynamicFlags::empty(),
13225 ___deadline,
13226 )?;
13227 Ok(_response.map(|x| x))
13228 }
13229
13230 pub fn r#list_extended_attributes(
13239 &self,
13240 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13241 ) -> Result<(), fidl::Error> {
13242 self.client.send::<NodeListExtendedAttributesRequest>(
13243 (iterator,),
13244 0x4b61033de007fcd0,
13245 fidl::encoding::DynamicFlags::empty(),
13246 )
13247 }
13248
13249 pub fn r#get_extended_attribute(
13256 &self,
13257 mut name: &[u8],
13258 ___deadline: zx::MonotonicInstant,
13259 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
13260 let _response = self.client.send_query::<
13261 NodeGetExtendedAttributeRequest,
13262 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
13263 >(
13264 (name,),
13265 0x45ffa3ccfdeb76db,
13266 fidl::encoding::DynamicFlags::empty(),
13267 ___deadline,
13268 )?;
13269 Ok(_response.map(|x| x))
13270 }
13271
13272 pub fn r#set_extended_attribute(
13280 &self,
13281 mut name: &[u8],
13282 mut value: ExtendedAttributeValue,
13283 mut mode: SetExtendedAttributeMode,
13284 ___deadline: zx::MonotonicInstant,
13285 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
13286 let _response = self.client.send_query::<
13287 NodeSetExtendedAttributeRequest,
13288 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13289 >(
13290 (name, &mut value, mode,),
13291 0x4a951362f681f23c,
13292 fidl::encoding::DynamicFlags::empty(),
13293 ___deadline,
13294 )?;
13295 Ok(_response.map(|x| x))
13296 }
13297
13298 pub fn r#remove_extended_attribute(
13304 &self,
13305 mut name: &[u8],
13306 ___deadline: zx::MonotonicInstant,
13307 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
13308 let _response = self.client.send_query::<
13309 NodeRemoveExtendedAttributeRequest,
13310 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13311 >(
13312 (name,),
13313 0x7a0b9f3a9bf9032d,
13314 fidl::encoding::DynamicFlags::empty(),
13315 ___deadline,
13316 )?;
13317 Ok(_response.map(|x| x))
13318 }
13319}
13320
13321#[cfg(target_os = "fuchsia")]
13322impl From<NodeSynchronousProxy> for zx::Handle {
13323 fn from(value: NodeSynchronousProxy) -> Self {
13324 value.into_channel().into()
13325 }
13326}
13327
13328#[cfg(target_os = "fuchsia")]
13329impl From<fidl::Channel> for NodeSynchronousProxy {
13330 fn from(value: fidl::Channel) -> Self {
13331 Self::new(value)
13332 }
13333}
13334
13335#[cfg(target_os = "fuchsia")]
13336impl fidl::endpoints::FromClient for NodeSynchronousProxy {
13337 type Protocol = NodeMarker;
13338
13339 fn from_client(value: fidl::endpoints::ClientEnd<NodeMarker>) -> Self {
13340 Self::new(value.into_channel())
13341 }
13342}
13343
13344#[derive(Debug, Clone)]
13345pub struct NodeProxy {
13346 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
13347}
13348
13349impl fidl::endpoints::Proxy for NodeProxy {
13350 type Protocol = NodeMarker;
13351
13352 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
13353 Self::new(inner)
13354 }
13355
13356 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
13357 self.client.into_channel().map_err(|client| Self { client })
13358 }
13359
13360 fn as_channel(&self) -> &::fidl::AsyncChannel {
13361 self.client.as_channel()
13362 }
13363}
13364
13365impl NodeProxy {
13366 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
13368 let protocol_name = <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
13369 Self { client: fidl::client::Client::new(channel, protocol_name) }
13370 }
13371
13372 pub fn take_event_stream(&self) -> NodeEventStream {
13378 NodeEventStream { event_receiver: self.client.take_event_receiver() }
13379 }
13380
13381 pub fn r#clone(
13382 &self,
13383 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13384 ) -> Result<(), fidl::Error> {
13385 NodeProxyInterface::r#clone(self, request)
13386 }
13387
13388 pub fn r#close(
13399 &self,
13400 ) -> fidl::client::QueryResponseFut<
13401 fidl_fuchsia_unknown::CloseableCloseResult,
13402 fidl::encoding::DefaultFuchsiaResourceDialect,
13403 > {
13404 NodeProxyInterface::r#close(self)
13405 }
13406
13407 pub fn r#query(
13408 &self,
13409 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
13410 {
13411 NodeProxyInterface::r#query(self)
13412 }
13413
13414 pub fn r#deprecated_clone(
13416 &self,
13417 mut flags: OpenFlags,
13418 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13419 ) -> Result<(), fidl::Error> {
13420 NodeProxyInterface::r#deprecated_clone(self, flags, object)
13421 }
13422
13423 pub fn r#deprecated_get_attr(
13425 &self,
13426 ) -> fidl::client::QueryResponseFut<
13427 (i32, NodeAttributes),
13428 fidl::encoding::DefaultFuchsiaResourceDialect,
13429 > {
13430 NodeProxyInterface::r#deprecated_get_attr(self)
13431 }
13432
13433 pub fn r#deprecated_set_attr(
13435 &self,
13436 mut flags: NodeAttributeFlags,
13437 mut attributes: &NodeAttributes,
13438 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13439 NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
13440 }
13441
13442 pub fn r#deprecated_get_flags(
13444 &self,
13445 ) -> fidl::client::QueryResponseFut<
13446 (i32, OpenFlags),
13447 fidl::encoding::DefaultFuchsiaResourceDialect,
13448 > {
13449 NodeProxyInterface::r#deprecated_get_flags(self)
13450 }
13451
13452 pub fn r#deprecated_set_flags(
13454 &self,
13455 mut flags: OpenFlags,
13456 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13457 NodeProxyInterface::r#deprecated_set_flags(self, flags)
13458 }
13459
13460 pub fn r#get_flags(
13469 &self,
13470 ) -> fidl::client::QueryResponseFut<
13471 NodeGetFlagsResult,
13472 fidl::encoding::DefaultFuchsiaResourceDialect,
13473 > {
13474 NodeProxyInterface::r#get_flags(self)
13475 }
13476
13477 pub fn r#set_flags(
13487 &self,
13488 mut flags: Flags,
13489 ) -> fidl::client::QueryResponseFut<
13490 NodeSetFlagsResult,
13491 fidl::encoding::DefaultFuchsiaResourceDialect,
13492 > {
13493 NodeProxyInterface::r#set_flags(self, flags)
13494 }
13495
13496 pub fn r#query_filesystem(
13498 &self,
13499 ) -> fidl::client::QueryResponseFut<
13500 (i32, Option<Box<FilesystemInfo>>),
13501 fidl::encoding::DefaultFuchsiaResourceDialect,
13502 > {
13503 NodeProxyInterface::r#query_filesystem(self)
13504 }
13505
13506 pub fn r#get_attributes(
13520 &self,
13521 mut query: NodeAttributesQuery,
13522 ) -> fidl::client::QueryResponseFut<
13523 NodeGetAttributesResult,
13524 fidl::encoding::DefaultFuchsiaResourceDialect,
13525 > {
13526 NodeProxyInterface::r#get_attributes(self, query)
13527 }
13528
13529 pub fn r#update_attributes(
13538 &self,
13539 mut payload: &MutableNodeAttributes,
13540 ) -> fidl::client::QueryResponseFut<
13541 NodeUpdateAttributesResult,
13542 fidl::encoding::DefaultFuchsiaResourceDialect,
13543 > {
13544 NodeProxyInterface::r#update_attributes(self, payload)
13545 }
13546
13547 pub fn r#sync(
13557 &self,
13558 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
13559 {
13560 NodeProxyInterface::r#sync(self)
13561 }
13562
13563 pub fn r#list_extended_attributes(
13572 &self,
13573 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13574 ) -> Result<(), fidl::Error> {
13575 NodeProxyInterface::r#list_extended_attributes(self, iterator)
13576 }
13577
13578 pub fn r#get_extended_attribute(
13585 &self,
13586 mut name: &[u8],
13587 ) -> fidl::client::QueryResponseFut<
13588 NodeGetExtendedAttributeResult,
13589 fidl::encoding::DefaultFuchsiaResourceDialect,
13590 > {
13591 NodeProxyInterface::r#get_extended_attribute(self, name)
13592 }
13593
13594 pub fn r#set_extended_attribute(
13602 &self,
13603 mut name: &[u8],
13604 mut value: ExtendedAttributeValue,
13605 mut mode: SetExtendedAttributeMode,
13606 ) -> fidl::client::QueryResponseFut<
13607 NodeSetExtendedAttributeResult,
13608 fidl::encoding::DefaultFuchsiaResourceDialect,
13609 > {
13610 NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
13611 }
13612
13613 pub fn r#remove_extended_attribute(
13619 &self,
13620 mut name: &[u8],
13621 ) -> fidl::client::QueryResponseFut<
13622 NodeRemoveExtendedAttributeResult,
13623 fidl::encoding::DefaultFuchsiaResourceDialect,
13624 > {
13625 NodeProxyInterface::r#remove_extended_attribute(self, name)
13626 }
13627}
13628
13629impl NodeProxyInterface for NodeProxy {
13630 fn r#clone(
13631 &self,
13632 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13633 ) -> Result<(), fidl::Error> {
13634 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
13635 (request,),
13636 0x20d8a7aba2168a79,
13637 fidl::encoding::DynamicFlags::empty(),
13638 )
13639 }
13640
13641 type CloseResponseFut = fidl::client::QueryResponseFut<
13642 fidl_fuchsia_unknown::CloseableCloseResult,
13643 fidl::encoding::DefaultFuchsiaResourceDialect,
13644 >;
13645 fn r#close(&self) -> Self::CloseResponseFut {
13646 fn _decode(
13647 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13648 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
13649 let _response = fidl::client::decode_transaction_body::<
13650 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13651 fidl::encoding::DefaultFuchsiaResourceDialect,
13652 0x5ac5d459ad7f657e,
13653 >(_buf?)?;
13654 Ok(_response.map(|x| x))
13655 }
13656 self.client.send_query_and_decode::<
13657 fidl::encoding::EmptyPayload,
13658 fidl_fuchsia_unknown::CloseableCloseResult,
13659 >(
13660 (),
13661 0x5ac5d459ad7f657e,
13662 fidl::encoding::DynamicFlags::empty(),
13663 _decode,
13664 )
13665 }
13666
13667 type QueryResponseFut =
13668 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
13669 fn r#query(&self) -> Self::QueryResponseFut {
13670 fn _decode(
13671 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13672 ) -> Result<Vec<u8>, fidl::Error> {
13673 let _response = fidl::client::decode_transaction_body::<
13674 fidl_fuchsia_unknown::QueryableQueryResponse,
13675 fidl::encoding::DefaultFuchsiaResourceDialect,
13676 0x2658edee9decfc06,
13677 >(_buf?)?;
13678 Ok(_response.protocol)
13679 }
13680 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
13681 (),
13682 0x2658edee9decfc06,
13683 fidl::encoding::DynamicFlags::empty(),
13684 _decode,
13685 )
13686 }
13687
13688 fn r#deprecated_clone(
13689 &self,
13690 mut flags: OpenFlags,
13691 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13692 ) -> Result<(), fidl::Error> {
13693 self.client.send::<NodeDeprecatedCloneRequest>(
13694 (flags, object),
13695 0x5a61678f293ce16f,
13696 fidl::encoding::DynamicFlags::FLEXIBLE,
13697 )
13698 }
13699
13700 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
13701 (i32, NodeAttributes),
13702 fidl::encoding::DefaultFuchsiaResourceDialect,
13703 >;
13704 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
13705 fn _decode(
13706 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13707 ) -> Result<(i32, NodeAttributes), fidl::Error> {
13708 let _response = fidl::client::decode_transaction_body::<
13709 NodeDeprecatedGetAttrResponse,
13710 fidl::encoding::DefaultFuchsiaResourceDialect,
13711 0x78985e216314dafd,
13712 >(_buf?)?;
13713 Ok((_response.s, _response.attributes))
13714 }
13715 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
13716 (),
13717 0x78985e216314dafd,
13718 fidl::encoding::DynamicFlags::empty(),
13719 _decode,
13720 )
13721 }
13722
13723 type DeprecatedSetAttrResponseFut =
13724 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
13725 fn r#deprecated_set_attr(
13726 &self,
13727 mut flags: NodeAttributeFlags,
13728 mut attributes: &NodeAttributes,
13729 ) -> Self::DeprecatedSetAttrResponseFut {
13730 fn _decode(
13731 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13732 ) -> Result<i32, fidl::Error> {
13733 let _response = fidl::client::decode_transaction_body::<
13734 NodeDeprecatedSetAttrResponse,
13735 fidl::encoding::DefaultFuchsiaResourceDialect,
13736 0x4186c0f40d938f46,
13737 >(_buf?)?;
13738 Ok(_response.s)
13739 }
13740 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
13741 (flags, attributes),
13742 0x4186c0f40d938f46,
13743 fidl::encoding::DynamicFlags::empty(),
13744 _decode,
13745 )
13746 }
13747
13748 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
13749 (i32, OpenFlags),
13750 fidl::encoding::DefaultFuchsiaResourceDialect,
13751 >;
13752 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
13753 fn _decode(
13754 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13755 ) -> Result<(i32, OpenFlags), fidl::Error> {
13756 let _response = fidl::client::decode_transaction_body::<
13757 NodeDeprecatedGetFlagsResponse,
13758 fidl::encoding::DefaultFuchsiaResourceDialect,
13759 0x5b88fffb8eda3aa1,
13760 >(_buf?)?;
13761 Ok((_response.s, _response.flags))
13762 }
13763 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
13764 (),
13765 0x5b88fffb8eda3aa1,
13766 fidl::encoding::DynamicFlags::empty(),
13767 _decode,
13768 )
13769 }
13770
13771 type DeprecatedSetFlagsResponseFut =
13772 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
13773 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
13774 fn _decode(
13775 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13776 ) -> Result<i32, fidl::Error> {
13777 let _response = fidl::client::decode_transaction_body::<
13778 NodeDeprecatedSetFlagsResponse,
13779 fidl::encoding::DefaultFuchsiaResourceDialect,
13780 0x5295b76c71fde733,
13781 >(_buf?)?;
13782 Ok(_response.s)
13783 }
13784 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
13785 (flags,),
13786 0x5295b76c71fde733,
13787 fidl::encoding::DynamicFlags::empty(),
13788 _decode,
13789 )
13790 }
13791
13792 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
13793 NodeGetFlagsResult,
13794 fidl::encoding::DefaultFuchsiaResourceDialect,
13795 >;
13796 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
13797 fn _decode(
13798 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13799 ) -> Result<NodeGetFlagsResult, fidl::Error> {
13800 let _response = fidl::client::decode_transaction_body::<
13801 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
13802 fidl::encoding::DefaultFuchsiaResourceDialect,
13803 0x176eb318f64ec23,
13804 >(_buf?)?
13805 .into_result::<NodeMarker>("get_flags")?;
13806 Ok(_response.map(|x| x.flags))
13807 }
13808 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
13809 (),
13810 0x176eb318f64ec23,
13811 fidl::encoding::DynamicFlags::FLEXIBLE,
13812 _decode,
13813 )
13814 }
13815
13816 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
13817 NodeSetFlagsResult,
13818 fidl::encoding::DefaultFuchsiaResourceDialect,
13819 >;
13820 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
13821 fn _decode(
13822 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13823 ) -> Result<NodeSetFlagsResult, fidl::Error> {
13824 let _response = fidl::client::decode_transaction_body::<
13825 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
13826 fidl::encoding::DefaultFuchsiaResourceDialect,
13827 0x55a8028685791ea8,
13828 >(_buf?)?
13829 .into_result::<NodeMarker>("set_flags")?;
13830 Ok(_response.map(|x| x))
13831 }
13832 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
13833 (flags,),
13834 0x55a8028685791ea8,
13835 fidl::encoding::DynamicFlags::FLEXIBLE,
13836 _decode,
13837 )
13838 }
13839
13840 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
13841 (i32, Option<Box<FilesystemInfo>>),
13842 fidl::encoding::DefaultFuchsiaResourceDialect,
13843 >;
13844 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
13845 fn _decode(
13846 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13847 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
13848 let _response = fidl::client::decode_transaction_body::<
13849 NodeQueryFilesystemResponse,
13850 fidl::encoding::DefaultFuchsiaResourceDialect,
13851 0x6f344a1c6b0a0610,
13852 >(_buf?)?;
13853 Ok((_response.s, _response.info))
13854 }
13855 self.client.send_query_and_decode::<
13856 fidl::encoding::EmptyPayload,
13857 (i32, Option<Box<FilesystemInfo>>),
13858 >(
13859 (),
13860 0x6f344a1c6b0a0610,
13861 fidl::encoding::DynamicFlags::empty(),
13862 _decode,
13863 )
13864 }
13865
13866 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
13867 NodeGetAttributesResult,
13868 fidl::encoding::DefaultFuchsiaResourceDialect,
13869 >;
13870 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
13871 fn _decode(
13872 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13873 ) -> Result<NodeGetAttributesResult, fidl::Error> {
13874 let _response = fidl::client::decode_transaction_body::<
13875 fidl::encoding::ResultType<NodeAttributes2, i32>,
13876 fidl::encoding::DefaultFuchsiaResourceDialect,
13877 0x3d4396a638ea053b,
13878 >(_buf?)?;
13879 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
13880 }
13881 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
13882 (query,),
13883 0x3d4396a638ea053b,
13884 fidl::encoding::DynamicFlags::empty(),
13885 _decode,
13886 )
13887 }
13888
13889 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
13890 NodeUpdateAttributesResult,
13891 fidl::encoding::DefaultFuchsiaResourceDialect,
13892 >;
13893 fn r#update_attributes(
13894 &self,
13895 mut payload: &MutableNodeAttributes,
13896 ) -> Self::UpdateAttributesResponseFut {
13897 fn _decode(
13898 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13899 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
13900 let _response = fidl::client::decode_transaction_body::<
13901 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13902 fidl::encoding::DefaultFuchsiaResourceDialect,
13903 0x3308c1da5a89bf08,
13904 >(_buf?)?;
13905 Ok(_response.map(|x| x))
13906 }
13907 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
13908 payload,
13909 0x3308c1da5a89bf08,
13910 fidl::encoding::DynamicFlags::empty(),
13911 _decode,
13912 )
13913 }
13914
13915 type SyncResponseFut = fidl::client::QueryResponseFut<
13916 NodeSyncResult,
13917 fidl::encoding::DefaultFuchsiaResourceDialect,
13918 >;
13919 fn r#sync(&self) -> Self::SyncResponseFut {
13920 fn _decode(
13921 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13922 ) -> Result<NodeSyncResult, fidl::Error> {
13923 let _response = fidl::client::decode_transaction_body::<
13924 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13925 fidl::encoding::DefaultFuchsiaResourceDialect,
13926 0x2c5c27ca0ab5dc49,
13927 >(_buf?)?;
13928 Ok(_response.map(|x| x))
13929 }
13930 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
13931 (),
13932 0x2c5c27ca0ab5dc49,
13933 fidl::encoding::DynamicFlags::empty(),
13934 _decode,
13935 )
13936 }
13937
13938 fn r#list_extended_attributes(
13939 &self,
13940 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13941 ) -> Result<(), fidl::Error> {
13942 self.client.send::<NodeListExtendedAttributesRequest>(
13943 (iterator,),
13944 0x4b61033de007fcd0,
13945 fidl::encoding::DynamicFlags::empty(),
13946 )
13947 }
13948
13949 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
13950 NodeGetExtendedAttributeResult,
13951 fidl::encoding::DefaultFuchsiaResourceDialect,
13952 >;
13953 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
13954 fn _decode(
13955 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13956 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
13957 let _response = fidl::client::decode_transaction_body::<
13958 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
13959 fidl::encoding::DefaultFuchsiaResourceDialect,
13960 0x45ffa3ccfdeb76db,
13961 >(_buf?)?;
13962 Ok(_response.map(|x| x))
13963 }
13964 self.client.send_query_and_decode::<
13965 NodeGetExtendedAttributeRequest,
13966 NodeGetExtendedAttributeResult,
13967 >(
13968 (name,),
13969 0x45ffa3ccfdeb76db,
13970 fidl::encoding::DynamicFlags::empty(),
13971 _decode,
13972 )
13973 }
13974
13975 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
13976 NodeSetExtendedAttributeResult,
13977 fidl::encoding::DefaultFuchsiaResourceDialect,
13978 >;
13979 fn r#set_extended_attribute(
13980 &self,
13981 mut name: &[u8],
13982 mut value: ExtendedAttributeValue,
13983 mut mode: SetExtendedAttributeMode,
13984 ) -> Self::SetExtendedAttributeResponseFut {
13985 fn _decode(
13986 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13987 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
13988 let _response = fidl::client::decode_transaction_body::<
13989 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13990 fidl::encoding::DefaultFuchsiaResourceDialect,
13991 0x4a951362f681f23c,
13992 >(_buf?)?;
13993 Ok(_response.map(|x| x))
13994 }
13995 self.client.send_query_and_decode::<
13996 NodeSetExtendedAttributeRequest,
13997 NodeSetExtendedAttributeResult,
13998 >(
13999 (name, &mut value, mode,),
14000 0x4a951362f681f23c,
14001 fidl::encoding::DynamicFlags::empty(),
14002 _decode,
14003 )
14004 }
14005
14006 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14007 NodeRemoveExtendedAttributeResult,
14008 fidl::encoding::DefaultFuchsiaResourceDialect,
14009 >;
14010 fn r#remove_extended_attribute(
14011 &self,
14012 mut name: &[u8],
14013 ) -> Self::RemoveExtendedAttributeResponseFut {
14014 fn _decode(
14015 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14016 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
14017 let _response = fidl::client::decode_transaction_body::<
14018 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14019 fidl::encoding::DefaultFuchsiaResourceDialect,
14020 0x7a0b9f3a9bf9032d,
14021 >(_buf?)?;
14022 Ok(_response.map(|x| x))
14023 }
14024 self.client.send_query_and_decode::<
14025 NodeRemoveExtendedAttributeRequest,
14026 NodeRemoveExtendedAttributeResult,
14027 >(
14028 (name,),
14029 0x7a0b9f3a9bf9032d,
14030 fidl::encoding::DynamicFlags::empty(),
14031 _decode,
14032 )
14033 }
14034}
14035
14036pub struct NodeEventStream {
14037 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
14038}
14039
14040impl std::marker::Unpin for NodeEventStream {}
14041
14042impl futures::stream::FusedStream for NodeEventStream {
14043 fn is_terminated(&self) -> bool {
14044 self.event_receiver.is_terminated()
14045 }
14046}
14047
14048impl futures::Stream for NodeEventStream {
14049 type Item = Result<NodeEvent, fidl::Error>;
14050
14051 fn poll_next(
14052 mut self: std::pin::Pin<&mut Self>,
14053 cx: &mut std::task::Context<'_>,
14054 ) -> std::task::Poll<Option<Self::Item>> {
14055 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
14056 &mut self.event_receiver,
14057 cx
14058 )?) {
14059 Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
14060 None => std::task::Poll::Ready(None),
14061 }
14062 }
14063}
14064
14065#[derive(Debug)]
14066pub enum NodeEvent {
14067 OnOpen_ {
14068 s: i32,
14069 info: Option<Box<NodeInfoDeprecated>>,
14070 },
14071 OnRepresentation {
14072 payload: Representation,
14073 },
14074 #[non_exhaustive]
14075 _UnknownEvent {
14076 ordinal: u64,
14078 },
14079}
14080
14081impl NodeEvent {
14082 #[allow(irrefutable_let_patterns)]
14083 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
14084 if let NodeEvent::OnOpen_ { s, info } = self {
14085 Some((s, info))
14086 } else {
14087 None
14088 }
14089 }
14090 #[allow(irrefutable_let_patterns)]
14091 pub fn into_on_representation(self) -> Option<Representation> {
14092 if let NodeEvent::OnRepresentation { payload } = self {
14093 Some((payload))
14094 } else {
14095 None
14096 }
14097 }
14098
14099 fn decode(
14101 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
14102 ) -> Result<NodeEvent, fidl::Error> {
14103 let (bytes, _handles) = buf.split_mut();
14104 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14105 debug_assert_eq!(tx_header.tx_id, 0);
14106 match tx_header.ordinal {
14107 0x7fc7bbb1dbfd1972 => {
14108 let mut out = fidl::new_empty!(
14109 NodeOnOpenRequest,
14110 fidl::encoding::DefaultFuchsiaResourceDialect
14111 );
14112 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
14113 Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
14114 }
14115 0x5cb40567d80a510c => {
14116 let mut out =
14117 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
14118 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
14119 Ok((NodeEvent::OnRepresentation { payload: out }))
14120 }
14121 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
14122 Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
14123 }
14124 _ => Err(fidl::Error::UnknownOrdinal {
14125 ordinal: tx_header.ordinal,
14126 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14127 }),
14128 }
14129 }
14130}
14131
14132pub struct NodeRequestStream {
14134 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14135 is_terminated: bool,
14136}
14137
14138impl std::marker::Unpin for NodeRequestStream {}
14139
14140impl futures::stream::FusedStream for NodeRequestStream {
14141 fn is_terminated(&self) -> bool {
14142 self.is_terminated
14143 }
14144}
14145
14146impl fidl::endpoints::RequestStream for NodeRequestStream {
14147 type Protocol = NodeMarker;
14148 type ControlHandle = NodeControlHandle;
14149
14150 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
14151 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14152 }
14153
14154 fn control_handle(&self) -> Self::ControlHandle {
14155 NodeControlHandle { inner: self.inner.clone() }
14156 }
14157
14158 fn into_inner(
14159 self,
14160 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
14161 {
14162 (self.inner, self.is_terminated)
14163 }
14164
14165 fn from_inner(
14166 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14167 is_terminated: bool,
14168 ) -> Self {
14169 Self { inner, is_terminated }
14170 }
14171}
14172
14173impl futures::Stream for NodeRequestStream {
14174 type Item = Result<NodeRequest, fidl::Error>;
14175
14176 fn poll_next(
14177 mut self: std::pin::Pin<&mut Self>,
14178 cx: &mut std::task::Context<'_>,
14179 ) -> std::task::Poll<Option<Self::Item>> {
14180 let this = &mut *self;
14181 if this.inner.check_shutdown(cx) {
14182 this.is_terminated = true;
14183 return std::task::Poll::Ready(None);
14184 }
14185 if this.is_terminated {
14186 panic!("polled NodeRequestStream after completion");
14187 }
14188 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
14189 |bytes, handles| {
14190 match this.inner.channel().read_etc(cx, bytes, handles) {
14191 std::task::Poll::Ready(Ok(())) => {}
14192 std::task::Poll::Pending => return std::task::Poll::Pending,
14193 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
14194 this.is_terminated = true;
14195 return std::task::Poll::Ready(None);
14196 }
14197 std::task::Poll::Ready(Err(e)) => {
14198 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14199 e.into(),
14200 ))))
14201 }
14202 }
14203
14204 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14206
14207 std::task::Poll::Ready(Some(match header.ordinal {
14208 0x20d8a7aba2168a79 => {
14209 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14210 let mut req = fidl::new_empty!(
14211 fidl_fuchsia_unknown::CloneableCloneRequest,
14212 fidl::encoding::DefaultFuchsiaResourceDialect
14213 );
14214 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14215 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14216 Ok(NodeRequest::Clone { request: req.request, control_handle })
14217 }
14218 0x5ac5d459ad7f657e => {
14219 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14220 let mut req = fidl::new_empty!(
14221 fidl::encoding::EmptyPayload,
14222 fidl::encoding::DefaultFuchsiaResourceDialect
14223 );
14224 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14225 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14226 Ok(NodeRequest::Close {
14227 responder: NodeCloseResponder {
14228 control_handle: std::mem::ManuallyDrop::new(control_handle),
14229 tx_id: header.tx_id,
14230 },
14231 })
14232 }
14233 0x2658edee9decfc06 => {
14234 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14235 let mut req = fidl::new_empty!(
14236 fidl::encoding::EmptyPayload,
14237 fidl::encoding::DefaultFuchsiaResourceDialect
14238 );
14239 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14240 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14241 Ok(NodeRequest::Query {
14242 responder: NodeQueryResponder {
14243 control_handle: std::mem::ManuallyDrop::new(control_handle),
14244 tx_id: header.tx_id,
14245 },
14246 })
14247 }
14248 0x5a61678f293ce16f => {
14249 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14250 let mut req = fidl::new_empty!(
14251 NodeDeprecatedCloneRequest,
14252 fidl::encoding::DefaultFuchsiaResourceDialect
14253 );
14254 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14255 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14256 Ok(NodeRequest::DeprecatedClone {
14257 flags: req.flags,
14258 object: req.object,
14259
14260 control_handle,
14261 })
14262 }
14263 0x78985e216314dafd => {
14264 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14265 let mut req = fidl::new_empty!(
14266 fidl::encoding::EmptyPayload,
14267 fidl::encoding::DefaultFuchsiaResourceDialect
14268 );
14269 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14270 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14271 Ok(NodeRequest::DeprecatedGetAttr {
14272 responder: NodeDeprecatedGetAttrResponder {
14273 control_handle: std::mem::ManuallyDrop::new(control_handle),
14274 tx_id: header.tx_id,
14275 },
14276 })
14277 }
14278 0x4186c0f40d938f46 => {
14279 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14280 let mut req = fidl::new_empty!(
14281 NodeDeprecatedSetAttrRequest,
14282 fidl::encoding::DefaultFuchsiaResourceDialect
14283 );
14284 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
14285 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14286 Ok(NodeRequest::DeprecatedSetAttr {
14287 flags: req.flags,
14288 attributes: req.attributes,
14289
14290 responder: NodeDeprecatedSetAttrResponder {
14291 control_handle: std::mem::ManuallyDrop::new(control_handle),
14292 tx_id: header.tx_id,
14293 },
14294 })
14295 }
14296 0x5b88fffb8eda3aa1 => {
14297 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14298 let mut req = fidl::new_empty!(
14299 fidl::encoding::EmptyPayload,
14300 fidl::encoding::DefaultFuchsiaResourceDialect
14301 );
14302 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14303 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14304 Ok(NodeRequest::DeprecatedGetFlags {
14305 responder: NodeDeprecatedGetFlagsResponder {
14306 control_handle: std::mem::ManuallyDrop::new(control_handle),
14307 tx_id: header.tx_id,
14308 },
14309 })
14310 }
14311 0x5295b76c71fde733 => {
14312 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14313 let mut req = fidl::new_empty!(
14314 NodeDeprecatedSetFlagsRequest,
14315 fidl::encoding::DefaultFuchsiaResourceDialect
14316 );
14317 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14318 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14319 Ok(NodeRequest::DeprecatedSetFlags {
14320 flags: req.flags,
14321
14322 responder: NodeDeprecatedSetFlagsResponder {
14323 control_handle: std::mem::ManuallyDrop::new(control_handle),
14324 tx_id: header.tx_id,
14325 },
14326 })
14327 }
14328 0x176eb318f64ec23 => {
14329 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14330 let mut req = fidl::new_empty!(
14331 fidl::encoding::EmptyPayload,
14332 fidl::encoding::DefaultFuchsiaResourceDialect
14333 );
14334 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14335 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14336 Ok(NodeRequest::GetFlags {
14337 responder: NodeGetFlagsResponder {
14338 control_handle: std::mem::ManuallyDrop::new(control_handle),
14339 tx_id: header.tx_id,
14340 },
14341 })
14342 }
14343 0x55a8028685791ea8 => {
14344 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14345 let mut req = fidl::new_empty!(
14346 NodeSetFlagsRequest,
14347 fidl::encoding::DefaultFuchsiaResourceDialect
14348 );
14349 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14350 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14351 Ok(NodeRequest::SetFlags {
14352 flags: req.flags,
14353
14354 responder: NodeSetFlagsResponder {
14355 control_handle: std::mem::ManuallyDrop::new(control_handle),
14356 tx_id: header.tx_id,
14357 },
14358 })
14359 }
14360 0x6f344a1c6b0a0610 => {
14361 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14362 let mut req = fidl::new_empty!(
14363 fidl::encoding::EmptyPayload,
14364 fidl::encoding::DefaultFuchsiaResourceDialect
14365 );
14366 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14367 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14368 Ok(NodeRequest::QueryFilesystem {
14369 responder: NodeQueryFilesystemResponder {
14370 control_handle: std::mem::ManuallyDrop::new(control_handle),
14371 tx_id: header.tx_id,
14372 },
14373 })
14374 }
14375 0x3d4396a638ea053b => {
14376 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14377 let mut req = fidl::new_empty!(
14378 NodeGetAttributesRequest,
14379 fidl::encoding::DefaultFuchsiaResourceDialect
14380 );
14381 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14382 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14383 Ok(NodeRequest::GetAttributes {
14384 query: req.query,
14385
14386 responder: NodeGetAttributesResponder {
14387 control_handle: std::mem::ManuallyDrop::new(control_handle),
14388 tx_id: header.tx_id,
14389 },
14390 })
14391 }
14392 0x3308c1da5a89bf08 => {
14393 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14394 let mut req = fidl::new_empty!(
14395 MutableNodeAttributes,
14396 fidl::encoding::DefaultFuchsiaResourceDialect
14397 );
14398 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
14399 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14400 Ok(NodeRequest::UpdateAttributes {
14401 payload: req,
14402 responder: NodeUpdateAttributesResponder {
14403 control_handle: std::mem::ManuallyDrop::new(control_handle),
14404 tx_id: header.tx_id,
14405 },
14406 })
14407 }
14408 0x2c5c27ca0ab5dc49 => {
14409 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14410 let mut req = fidl::new_empty!(
14411 fidl::encoding::EmptyPayload,
14412 fidl::encoding::DefaultFuchsiaResourceDialect
14413 );
14414 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14415 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14416 Ok(NodeRequest::Sync {
14417 responder: NodeSyncResponder {
14418 control_handle: std::mem::ManuallyDrop::new(control_handle),
14419 tx_id: header.tx_id,
14420 },
14421 })
14422 }
14423 0x4b61033de007fcd0 => {
14424 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14425 let mut req = fidl::new_empty!(
14426 NodeListExtendedAttributesRequest,
14427 fidl::encoding::DefaultFuchsiaResourceDialect
14428 );
14429 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14430 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14431 Ok(NodeRequest::ListExtendedAttributes {
14432 iterator: req.iterator,
14433
14434 control_handle,
14435 })
14436 }
14437 0x45ffa3ccfdeb76db => {
14438 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14439 let mut req = fidl::new_empty!(
14440 NodeGetExtendedAttributeRequest,
14441 fidl::encoding::DefaultFuchsiaResourceDialect
14442 );
14443 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14444 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14445 Ok(NodeRequest::GetExtendedAttribute {
14446 name: req.name,
14447
14448 responder: NodeGetExtendedAttributeResponder {
14449 control_handle: std::mem::ManuallyDrop::new(control_handle),
14450 tx_id: header.tx_id,
14451 },
14452 })
14453 }
14454 0x4a951362f681f23c => {
14455 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14456 let mut req = fidl::new_empty!(
14457 NodeSetExtendedAttributeRequest,
14458 fidl::encoding::DefaultFuchsiaResourceDialect
14459 );
14460 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14461 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14462 Ok(NodeRequest::SetExtendedAttribute {
14463 name: req.name,
14464 value: req.value,
14465 mode: req.mode,
14466
14467 responder: NodeSetExtendedAttributeResponder {
14468 control_handle: std::mem::ManuallyDrop::new(control_handle),
14469 tx_id: header.tx_id,
14470 },
14471 })
14472 }
14473 0x7a0b9f3a9bf9032d => {
14474 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14475 let mut req = fidl::new_empty!(
14476 NodeRemoveExtendedAttributeRequest,
14477 fidl::encoding::DefaultFuchsiaResourceDialect
14478 );
14479 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14480 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14481 Ok(NodeRequest::RemoveExtendedAttribute {
14482 name: req.name,
14483
14484 responder: NodeRemoveExtendedAttributeResponder {
14485 control_handle: std::mem::ManuallyDrop::new(control_handle),
14486 tx_id: header.tx_id,
14487 },
14488 })
14489 }
14490 _ if header.tx_id == 0
14491 && header
14492 .dynamic_flags()
14493 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14494 {
14495 Ok(NodeRequest::_UnknownMethod {
14496 ordinal: header.ordinal,
14497 control_handle: NodeControlHandle { inner: this.inner.clone() },
14498 method_type: fidl::MethodType::OneWay,
14499 })
14500 }
14501 _ if header
14502 .dynamic_flags()
14503 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14504 {
14505 this.inner.send_framework_err(
14506 fidl::encoding::FrameworkErr::UnknownMethod,
14507 header.tx_id,
14508 header.ordinal,
14509 header.dynamic_flags(),
14510 (bytes, handles),
14511 )?;
14512 Ok(NodeRequest::_UnknownMethod {
14513 ordinal: header.ordinal,
14514 control_handle: NodeControlHandle { inner: this.inner.clone() },
14515 method_type: fidl::MethodType::TwoWay,
14516 })
14517 }
14518 _ => Err(fidl::Error::UnknownOrdinal {
14519 ordinal: header.ordinal,
14520 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14521 }),
14522 }))
14523 },
14524 )
14525 }
14526}
14527
14528#[derive(Debug)]
14530pub enum NodeRequest {
14531 Clone {
14532 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
14533 control_handle: NodeControlHandle,
14534 },
14535 Close {
14546 responder: NodeCloseResponder,
14547 },
14548 Query {
14549 responder: NodeQueryResponder,
14550 },
14551 DeprecatedClone {
14553 flags: OpenFlags,
14554 object: fidl::endpoints::ServerEnd<NodeMarker>,
14555 control_handle: NodeControlHandle,
14556 },
14557 DeprecatedGetAttr {
14559 responder: NodeDeprecatedGetAttrResponder,
14560 },
14561 DeprecatedSetAttr {
14563 flags: NodeAttributeFlags,
14564 attributes: NodeAttributes,
14565 responder: NodeDeprecatedSetAttrResponder,
14566 },
14567 DeprecatedGetFlags {
14569 responder: NodeDeprecatedGetFlagsResponder,
14570 },
14571 DeprecatedSetFlags {
14573 flags: OpenFlags,
14574 responder: NodeDeprecatedSetFlagsResponder,
14575 },
14576 GetFlags {
14585 responder: NodeGetFlagsResponder,
14586 },
14587 SetFlags {
14597 flags: Flags,
14598 responder: NodeSetFlagsResponder,
14599 },
14600 QueryFilesystem {
14602 responder: NodeQueryFilesystemResponder,
14603 },
14604 GetAttributes {
14618 query: NodeAttributesQuery,
14619 responder: NodeGetAttributesResponder,
14620 },
14621 UpdateAttributes {
14630 payload: MutableNodeAttributes,
14631 responder: NodeUpdateAttributesResponder,
14632 },
14633 Sync {
14643 responder: NodeSyncResponder,
14644 },
14645 ListExtendedAttributes {
14654 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
14655 control_handle: NodeControlHandle,
14656 },
14657 GetExtendedAttribute {
14664 name: Vec<u8>,
14665 responder: NodeGetExtendedAttributeResponder,
14666 },
14667 SetExtendedAttribute {
14675 name: Vec<u8>,
14676 value: ExtendedAttributeValue,
14677 mode: SetExtendedAttributeMode,
14678 responder: NodeSetExtendedAttributeResponder,
14679 },
14680 RemoveExtendedAttribute {
14686 name: Vec<u8>,
14687 responder: NodeRemoveExtendedAttributeResponder,
14688 },
14689 #[non_exhaustive]
14691 _UnknownMethod {
14692 ordinal: u64,
14694 control_handle: NodeControlHandle,
14695 method_type: fidl::MethodType,
14696 },
14697}
14698
14699impl NodeRequest {
14700 #[allow(irrefutable_let_patterns)]
14701 pub fn into_clone(
14702 self,
14703 ) -> Option<(
14704 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
14705 NodeControlHandle,
14706 )> {
14707 if let NodeRequest::Clone { request, control_handle } = self {
14708 Some((request, control_handle))
14709 } else {
14710 None
14711 }
14712 }
14713
14714 #[allow(irrefutable_let_patterns)]
14715 pub fn into_close(self) -> Option<(NodeCloseResponder)> {
14716 if let NodeRequest::Close { responder } = self {
14717 Some((responder))
14718 } else {
14719 None
14720 }
14721 }
14722
14723 #[allow(irrefutable_let_patterns)]
14724 pub fn into_query(self) -> Option<(NodeQueryResponder)> {
14725 if let NodeRequest::Query { responder } = self {
14726 Some((responder))
14727 } else {
14728 None
14729 }
14730 }
14731
14732 #[allow(irrefutable_let_patterns)]
14733 pub fn into_deprecated_clone(
14734 self,
14735 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, NodeControlHandle)> {
14736 if let NodeRequest::DeprecatedClone { flags, object, control_handle } = self {
14737 Some((flags, object, control_handle))
14738 } else {
14739 None
14740 }
14741 }
14742
14743 #[allow(irrefutable_let_patterns)]
14744 pub fn into_deprecated_get_attr(self) -> Option<(NodeDeprecatedGetAttrResponder)> {
14745 if let NodeRequest::DeprecatedGetAttr { responder } = self {
14746 Some((responder))
14747 } else {
14748 None
14749 }
14750 }
14751
14752 #[allow(irrefutable_let_patterns)]
14753 pub fn into_deprecated_set_attr(
14754 self,
14755 ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
14756 if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
14757 Some((flags, attributes, responder))
14758 } else {
14759 None
14760 }
14761 }
14762
14763 #[allow(irrefutable_let_patterns)]
14764 pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
14765 if let NodeRequest::DeprecatedGetFlags { responder } = self {
14766 Some((responder))
14767 } else {
14768 None
14769 }
14770 }
14771
14772 #[allow(irrefutable_let_patterns)]
14773 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
14774 if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
14775 Some((flags, responder))
14776 } else {
14777 None
14778 }
14779 }
14780
14781 #[allow(irrefutable_let_patterns)]
14782 pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
14783 if let NodeRequest::GetFlags { responder } = self {
14784 Some((responder))
14785 } else {
14786 None
14787 }
14788 }
14789
14790 #[allow(irrefutable_let_patterns)]
14791 pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
14792 if let NodeRequest::SetFlags { flags, responder } = self {
14793 Some((flags, responder))
14794 } else {
14795 None
14796 }
14797 }
14798
14799 #[allow(irrefutable_let_patterns)]
14800 pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
14801 if let NodeRequest::QueryFilesystem { responder } = self {
14802 Some((responder))
14803 } else {
14804 None
14805 }
14806 }
14807
14808 #[allow(irrefutable_let_patterns)]
14809 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
14810 if let NodeRequest::GetAttributes { query, responder } = self {
14811 Some((query, responder))
14812 } else {
14813 None
14814 }
14815 }
14816
14817 #[allow(irrefutable_let_patterns)]
14818 pub fn into_update_attributes(
14819 self,
14820 ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
14821 if let NodeRequest::UpdateAttributes { payload, responder } = self {
14822 Some((payload, responder))
14823 } else {
14824 None
14825 }
14826 }
14827
14828 #[allow(irrefutable_let_patterns)]
14829 pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
14830 if let NodeRequest::Sync { responder } = self {
14831 Some((responder))
14832 } else {
14833 None
14834 }
14835 }
14836
14837 #[allow(irrefutable_let_patterns)]
14838 pub fn into_list_extended_attributes(
14839 self,
14840 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
14841 {
14842 if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
14843 Some((iterator, control_handle))
14844 } else {
14845 None
14846 }
14847 }
14848
14849 #[allow(irrefutable_let_patterns)]
14850 pub fn into_get_extended_attribute(
14851 self,
14852 ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
14853 if let NodeRequest::GetExtendedAttribute { name, responder } = self {
14854 Some((name, responder))
14855 } else {
14856 None
14857 }
14858 }
14859
14860 #[allow(irrefutable_let_patterns)]
14861 pub fn into_set_extended_attribute(
14862 self,
14863 ) -> Option<(
14864 Vec<u8>,
14865 ExtendedAttributeValue,
14866 SetExtendedAttributeMode,
14867 NodeSetExtendedAttributeResponder,
14868 )> {
14869 if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
14870 Some((name, value, mode, responder))
14871 } else {
14872 None
14873 }
14874 }
14875
14876 #[allow(irrefutable_let_patterns)]
14877 pub fn into_remove_extended_attribute(
14878 self,
14879 ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
14880 if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
14881 Some((name, responder))
14882 } else {
14883 None
14884 }
14885 }
14886
14887 pub fn method_name(&self) -> &'static str {
14889 match *self {
14890 NodeRequest::Clone { .. } => "clone",
14891 NodeRequest::Close { .. } => "close",
14892 NodeRequest::Query { .. } => "query",
14893 NodeRequest::DeprecatedClone { .. } => "deprecated_clone",
14894 NodeRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
14895 NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
14896 NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
14897 NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
14898 NodeRequest::GetFlags { .. } => "get_flags",
14899 NodeRequest::SetFlags { .. } => "set_flags",
14900 NodeRequest::QueryFilesystem { .. } => "query_filesystem",
14901 NodeRequest::GetAttributes { .. } => "get_attributes",
14902 NodeRequest::UpdateAttributes { .. } => "update_attributes",
14903 NodeRequest::Sync { .. } => "sync",
14904 NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
14905 NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
14906 NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
14907 NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
14908 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
14909 "unknown one-way method"
14910 }
14911 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
14912 "unknown two-way method"
14913 }
14914 }
14915 }
14916}
14917
14918#[derive(Debug, Clone)]
14919pub struct NodeControlHandle {
14920 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14921}
14922
14923impl fidl::endpoints::ControlHandle for NodeControlHandle {
14924 fn shutdown(&self) {
14925 self.inner.shutdown()
14926 }
14927 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
14928 self.inner.shutdown_with_epitaph(status)
14929 }
14930
14931 fn is_closed(&self) -> bool {
14932 self.inner.channel().is_closed()
14933 }
14934 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
14935 self.inner.channel().on_closed()
14936 }
14937
14938 #[cfg(target_os = "fuchsia")]
14939 fn signal_peer(
14940 &self,
14941 clear_mask: zx::Signals,
14942 set_mask: zx::Signals,
14943 ) -> Result<(), zx_status::Status> {
14944 use fidl::Peered;
14945 self.inner.channel().signal_peer(clear_mask, set_mask)
14946 }
14947}
14948
14949impl NodeControlHandle {
14950 pub fn send_on_open_(
14951 &self,
14952 mut s: i32,
14953 mut info: Option<NodeInfoDeprecated>,
14954 ) -> Result<(), fidl::Error> {
14955 self.inner.send::<NodeOnOpenRequest>(
14956 (s, info.as_mut()),
14957 0,
14958 0x7fc7bbb1dbfd1972,
14959 fidl::encoding::DynamicFlags::empty(),
14960 )
14961 }
14962
14963 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
14964 self.inner.send::<Representation>(
14965 &mut payload,
14966 0,
14967 0x5cb40567d80a510c,
14968 fidl::encoding::DynamicFlags::empty(),
14969 )
14970 }
14971}
14972
14973#[must_use = "FIDL methods require a response to be sent"]
14974#[derive(Debug)]
14975pub struct NodeCloseResponder {
14976 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
14977 tx_id: u32,
14978}
14979
14980impl std::ops::Drop for NodeCloseResponder {
14984 fn drop(&mut self) {
14985 self.control_handle.shutdown();
14986 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
14988 }
14989}
14990
14991impl fidl::endpoints::Responder for NodeCloseResponder {
14992 type ControlHandle = NodeControlHandle;
14993
14994 fn control_handle(&self) -> &NodeControlHandle {
14995 &self.control_handle
14996 }
14997
14998 fn drop_without_shutdown(mut self) {
14999 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15001 std::mem::forget(self);
15003 }
15004}
15005
15006impl NodeCloseResponder {
15007 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15011 let _result = self.send_raw(result);
15012 if _result.is_err() {
15013 self.control_handle.shutdown();
15014 }
15015 self.drop_without_shutdown();
15016 _result
15017 }
15018
15019 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15021 let _result = self.send_raw(result);
15022 self.drop_without_shutdown();
15023 _result
15024 }
15025
15026 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15027 self.control_handle
15028 .inner
15029 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15030 result,
15031 self.tx_id,
15032 0x5ac5d459ad7f657e,
15033 fidl::encoding::DynamicFlags::empty(),
15034 )
15035 }
15036}
15037
15038#[must_use = "FIDL methods require a response to be sent"]
15039#[derive(Debug)]
15040pub struct NodeQueryResponder {
15041 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15042 tx_id: u32,
15043}
15044
15045impl std::ops::Drop for NodeQueryResponder {
15049 fn drop(&mut self) {
15050 self.control_handle.shutdown();
15051 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15053 }
15054}
15055
15056impl fidl::endpoints::Responder for NodeQueryResponder {
15057 type ControlHandle = NodeControlHandle;
15058
15059 fn control_handle(&self) -> &NodeControlHandle {
15060 &self.control_handle
15061 }
15062
15063 fn drop_without_shutdown(mut self) {
15064 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15066 std::mem::forget(self);
15068 }
15069}
15070
15071impl NodeQueryResponder {
15072 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15076 let _result = self.send_raw(protocol);
15077 if _result.is_err() {
15078 self.control_handle.shutdown();
15079 }
15080 self.drop_without_shutdown();
15081 _result
15082 }
15083
15084 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15086 let _result = self.send_raw(protocol);
15087 self.drop_without_shutdown();
15088 _result
15089 }
15090
15091 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15092 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
15093 (protocol,),
15094 self.tx_id,
15095 0x2658edee9decfc06,
15096 fidl::encoding::DynamicFlags::empty(),
15097 )
15098 }
15099}
15100
15101#[must_use = "FIDL methods require a response to be sent"]
15102#[derive(Debug)]
15103pub struct NodeDeprecatedGetAttrResponder {
15104 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15105 tx_id: u32,
15106}
15107
15108impl std::ops::Drop for NodeDeprecatedGetAttrResponder {
15112 fn drop(&mut self) {
15113 self.control_handle.shutdown();
15114 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15116 }
15117}
15118
15119impl fidl::endpoints::Responder for NodeDeprecatedGetAttrResponder {
15120 type ControlHandle = NodeControlHandle;
15121
15122 fn control_handle(&self) -> &NodeControlHandle {
15123 &self.control_handle
15124 }
15125
15126 fn drop_without_shutdown(mut self) {
15127 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15129 std::mem::forget(self);
15131 }
15132}
15133
15134impl NodeDeprecatedGetAttrResponder {
15135 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15139 let _result = self.send_raw(s, attributes);
15140 if _result.is_err() {
15141 self.control_handle.shutdown();
15142 }
15143 self.drop_without_shutdown();
15144 _result
15145 }
15146
15147 pub fn send_no_shutdown_on_err(
15149 self,
15150 mut s: i32,
15151 mut attributes: &NodeAttributes,
15152 ) -> Result<(), fidl::Error> {
15153 let _result = self.send_raw(s, attributes);
15154 self.drop_without_shutdown();
15155 _result
15156 }
15157
15158 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15159 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
15160 (s, attributes),
15161 self.tx_id,
15162 0x78985e216314dafd,
15163 fidl::encoding::DynamicFlags::empty(),
15164 )
15165 }
15166}
15167
15168#[must_use = "FIDL methods require a response to be sent"]
15169#[derive(Debug)]
15170pub struct NodeDeprecatedSetAttrResponder {
15171 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15172 tx_id: u32,
15173}
15174
15175impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
15179 fn drop(&mut self) {
15180 self.control_handle.shutdown();
15181 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15183 }
15184}
15185
15186impl fidl::endpoints::Responder for NodeDeprecatedSetAttrResponder {
15187 type ControlHandle = NodeControlHandle;
15188
15189 fn control_handle(&self) -> &NodeControlHandle {
15190 &self.control_handle
15191 }
15192
15193 fn drop_without_shutdown(mut self) {
15194 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15196 std::mem::forget(self);
15198 }
15199}
15200
15201impl NodeDeprecatedSetAttrResponder {
15202 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15206 let _result = self.send_raw(s);
15207 if _result.is_err() {
15208 self.control_handle.shutdown();
15209 }
15210 self.drop_without_shutdown();
15211 _result
15212 }
15213
15214 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15216 let _result = self.send_raw(s);
15217 self.drop_without_shutdown();
15218 _result
15219 }
15220
15221 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15222 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
15223 (s,),
15224 self.tx_id,
15225 0x4186c0f40d938f46,
15226 fidl::encoding::DynamicFlags::empty(),
15227 )
15228 }
15229}
15230
15231#[must_use = "FIDL methods require a response to be sent"]
15232#[derive(Debug)]
15233pub struct NodeDeprecatedGetFlagsResponder {
15234 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15235 tx_id: u32,
15236}
15237
15238impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
15242 fn drop(&mut self) {
15243 self.control_handle.shutdown();
15244 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15246 }
15247}
15248
15249impl fidl::endpoints::Responder for NodeDeprecatedGetFlagsResponder {
15250 type ControlHandle = NodeControlHandle;
15251
15252 fn control_handle(&self) -> &NodeControlHandle {
15253 &self.control_handle
15254 }
15255
15256 fn drop_without_shutdown(mut self) {
15257 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15259 std::mem::forget(self);
15261 }
15262}
15263
15264impl NodeDeprecatedGetFlagsResponder {
15265 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15269 let _result = self.send_raw(s, flags);
15270 if _result.is_err() {
15271 self.control_handle.shutdown();
15272 }
15273 self.drop_without_shutdown();
15274 _result
15275 }
15276
15277 pub fn send_no_shutdown_on_err(
15279 self,
15280 mut s: i32,
15281 mut flags: OpenFlags,
15282 ) -> Result<(), fidl::Error> {
15283 let _result = self.send_raw(s, flags);
15284 self.drop_without_shutdown();
15285 _result
15286 }
15287
15288 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15289 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
15290 (s, flags),
15291 self.tx_id,
15292 0x5b88fffb8eda3aa1,
15293 fidl::encoding::DynamicFlags::empty(),
15294 )
15295 }
15296}
15297
15298#[must_use = "FIDL methods require a response to be sent"]
15299#[derive(Debug)]
15300pub struct NodeDeprecatedSetFlagsResponder {
15301 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15302 tx_id: u32,
15303}
15304
15305impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
15309 fn drop(&mut self) {
15310 self.control_handle.shutdown();
15311 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15313 }
15314}
15315
15316impl fidl::endpoints::Responder for NodeDeprecatedSetFlagsResponder {
15317 type ControlHandle = NodeControlHandle;
15318
15319 fn control_handle(&self) -> &NodeControlHandle {
15320 &self.control_handle
15321 }
15322
15323 fn drop_without_shutdown(mut self) {
15324 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15326 std::mem::forget(self);
15328 }
15329}
15330
15331impl NodeDeprecatedSetFlagsResponder {
15332 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15336 let _result = self.send_raw(s);
15337 if _result.is_err() {
15338 self.control_handle.shutdown();
15339 }
15340 self.drop_without_shutdown();
15341 _result
15342 }
15343
15344 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15346 let _result = self.send_raw(s);
15347 self.drop_without_shutdown();
15348 _result
15349 }
15350
15351 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15352 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
15353 (s,),
15354 self.tx_id,
15355 0x5295b76c71fde733,
15356 fidl::encoding::DynamicFlags::empty(),
15357 )
15358 }
15359}
15360
15361#[must_use = "FIDL methods require a response to be sent"]
15362#[derive(Debug)]
15363pub struct NodeGetFlagsResponder {
15364 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15365 tx_id: u32,
15366}
15367
15368impl std::ops::Drop for NodeGetFlagsResponder {
15372 fn drop(&mut self) {
15373 self.control_handle.shutdown();
15374 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15376 }
15377}
15378
15379impl fidl::endpoints::Responder for NodeGetFlagsResponder {
15380 type ControlHandle = NodeControlHandle;
15381
15382 fn control_handle(&self) -> &NodeControlHandle {
15383 &self.control_handle
15384 }
15385
15386 fn drop_without_shutdown(mut self) {
15387 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15389 std::mem::forget(self);
15391 }
15392}
15393
15394impl NodeGetFlagsResponder {
15395 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15399 let _result = self.send_raw(result);
15400 if _result.is_err() {
15401 self.control_handle.shutdown();
15402 }
15403 self.drop_without_shutdown();
15404 _result
15405 }
15406
15407 pub fn send_no_shutdown_on_err(
15409 self,
15410 mut result: Result<Flags, i32>,
15411 ) -> Result<(), fidl::Error> {
15412 let _result = self.send_raw(result);
15413 self.drop_without_shutdown();
15414 _result
15415 }
15416
15417 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15418 self.control_handle
15419 .inner
15420 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
15421 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
15422 self.tx_id,
15423 0x176eb318f64ec23,
15424 fidl::encoding::DynamicFlags::FLEXIBLE,
15425 )
15426 }
15427}
15428
15429#[must_use = "FIDL methods require a response to be sent"]
15430#[derive(Debug)]
15431pub struct NodeSetFlagsResponder {
15432 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15433 tx_id: u32,
15434}
15435
15436impl std::ops::Drop for NodeSetFlagsResponder {
15440 fn drop(&mut self) {
15441 self.control_handle.shutdown();
15442 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15444 }
15445}
15446
15447impl fidl::endpoints::Responder for NodeSetFlagsResponder {
15448 type ControlHandle = NodeControlHandle;
15449
15450 fn control_handle(&self) -> &NodeControlHandle {
15451 &self.control_handle
15452 }
15453
15454 fn drop_without_shutdown(mut self) {
15455 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15457 std::mem::forget(self);
15459 }
15460}
15461
15462impl NodeSetFlagsResponder {
15463 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15467 let _result = self.send_raw(result);
15468 if _result.is_err() {
15469 self.control_handle.shutdown();
15470 }
15471 self.drop_without_shutdown();
15472 _result
15473 }
15474
15475 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15477 let _result = self.send_raw(result);
15478 self.drop_without_shutdown();
15479 _result
15480 }
15481
15482 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15483 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
15484 fidl::encoding::EmptyStruct,
15485 i32,
15486 >>(
15487 fidl::encoding::FlexibleResult::new(result),
15488 self.tx_id,
15489 0x55a8028685791ea8,
15490 fidl::encoding::DynamicFlags::FLEXIBLE,
15491 )
15492 }
15493}
15494
15495#[must_use = "FIDL methods require a response to be sent"]
15496#[derive(Debug)]
15497pub struct NodeQueryFilesystemResponder {
15498 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15499 tx_id: u32,
15500}
15501
15502impl std::ops::Drop for NodeQueryFilesystemResponder {
15506 fn drop(&mut self) {
15507 self.control_handle.shutdown();
15508 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15510 }
15511}
15512
15513impl fidl::endpoints::Responder for NodeQueryFilesystemResponder {
15514 type ControlHandle = NodeControlHandle;
15515
15516 fn control_handle(&self) -> &NodeControlHandle {
15517 &self.control_handle
15518 }
15519
15520 fn drop_without_shutdown(mut self) {
15521 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15523 std::mem::forget(self);
15525 }
15526}
15527
15528impl NodeQueryFilesystemResponder {
15529 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15533 let _result = self.send_raw(s, info);
15534 if _result.is_err() {
15535 self.control_handle.shutdown();
15536 }
15537 self.drop_without_shutdown();
15538 _result
15539 }
15540
15541 pub fn send_no_shutdown_on_err(
15543 self,
15544 mut s: i32,
15545 mut info: Option<&FilesystemInfo>,
15546 ) -> Result<(), fidl::Error> {
15547 let _result = self.send_raw(s, info);
15548 self.drop_without_shutdown();
15549 _result
15550 }
15551
15552 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15553 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
15554 (s, info),
15555 self.tx_id,
15556 0x6f344a1c6b0a0610,
15557 fidl::encoding::DynamicFlags::empty(),
15558 )
15559 }
15560}
15561
15562#[must_use = "FIDL methods require a response to be sent"]
15563#[derive(Debug)]
15564pub struct NodeGetAttributesResponder {
15565 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15566 tx_id: u32,
15567}
15568
15569impl std::ops::Drop for NodeGetAttributesResponder {
15573 fn drop(&mut self) {
15574 self.control_handle.shutdown();
15575 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15577 }
15578}
15579
15580impl fidl::endpoints::Responder for NodeGetAttributesResponder {
15581 type ControlHandle = NodeControlHandle;
15582
15583 fn control_handle(&self) -> &NodeControlHandle {
15584 &self.control_handle
15585 }
15586
15587 fn drop_without_shutdown(mut self) {
15588 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15590 std::mem::forget(self);
15592 }
15593}
15594
15595impl NodeGetAttributesResponder {
15596 pub fn send(
15600 self,
15601 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15602 ) -> Result<(), fidl::Error> {
15603 let _result = self.send_raw(result);
15604 if _result.is_err() {
15605 self.control_handle.shutdown();
15606 }
15607 self.drop_without_shutdown();
15608 _result
15609 }
15610
15611 pub fn send_no_shutdown_on_err(
15613 self,
15614 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15615 ) -> Result<(), fidl::Error> {
15616 let _result = self.send_raw(result);
15617 self.drop_without_shutdown();
15618 _result
15619 }
15620
15621 fn send_raw(
15622 &self,
15623 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15624 ) -> Result<(), fidl::Error> {
15625 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
15626 result,
15627 self.tx_id,
15628 0x3d4396a638ea053b,
15629 fidl::encoding::DynamicFlags::empty(),
15630 )
15631 }
15632}
15633
15634#[must_use = "FIDL methods require a response to be sent"]
15635#[derive(Debug)]
15636pub struct NodeUpdateAttributesResponder {
15637 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15638 tx_id: u32,
15639}
15640
15641impl std::ops::Drop for NodeUpdateAttributesResponder {
15645 fn drop(&mut self) {
15646 self.control_handle.shutdown();
15647 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15649 }
15650}
15651
15652impl fidl::endpoints::Responder for NodeUpdateAttributesResponder {
15653 type ControlHandle = NodeControlHandle;
15654
15655 fn control_handle(&self) -> &NodeControlHandle {
15656 &self.control_handle
15657 }
15658
15659 fn drop_without_shutdown(mut self) {
15660 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15662 std::mem::forget(self);
15664 }
15665}
15666
15667impl NodeUpdateAttributesResponder {
15668 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15672 let _result = self.send_raw(result);
15673 if _result.is_err() {
15674 self.control_handle.shutdown();
15675 }
15676 self.drop_without_shutdown();
15677 _result
15678 }
15679
15680 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15682 let _result = self.send_raw(result);
15683 self.drop_without_shutdown();
15684 _result
15685 }
15686
15687 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15688 self.control_handle
15689 .inner
15690 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15691 result,
15692 self.tx_id,
15693 0x3308c1da5a89bf08,
15694 fidl::encoding::DynamicFlags::empty(),
15695 )
15696 }
15697}
15698
15699#[must_use = "FIDL methods require a response to be sent"]
15700#[derive(Debug)]
15701pub struct NodeSyncResponder {
15702 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15703 tx_id: u32,
15704}
15705
15706impl std::ops::Drop for NodeSyncResponder {
15710 fn drop(&mut self) {
15711 self.control_handle.shutdown();
15712 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15714 }
15715}
15716
15717impl fidl::endpoints::Responder for NodeSyncResponder {
15718 type ControlHandle = NodeControlHandle;
15719
15720 fn control_handle(&self) -> &NodeControlHandle {
15721 &self.control_handle
15722 }
15723
15724 fn drop_without_shutdown(mut self) {
15725 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15727 std::mem::forget(self);
15729 }
15730}
15731
15732impl NodeSyncResponder {
15733 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15737 let _result = self.send_raw(result);
15738 if _result.is_err() {
15739 self.control_handle.shutdown();
15740 }
15741 self.drop_without_shutdown();
15742 _result
15743 }
15744
15745 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15747 let _result = self.send_raw(result);
15748 self.drop_without_shutdown();
15749 _result
15750 }
15751
15752 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15753 self.control_handle
15754 .inner
15755 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15756 result,
15757 self.tx_id,
15758 0x2c5c27ca0ab5dc49,
15759 fidl::encoding::DynamicFlags::empty(),
15760 )
15761 }
15762}
15763
15764#[must_use = "FIDL methods require a response to be sent"]
15765#[derive(Debug)]
15766pub struct NodeGetExtendedAttributeResponder {
15767 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15768 tx_id: u32,
15769}
15770
15771impl std::ops::Drop for NodeGetExtendedAttributeResponder {
15775 fn drop(&mut self) {
15776 self.control_handle.shutdown();
15777 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15779 }
15780}
15781
15782impl fidl::endpoints::Responder for NodeGetExtendedAttributeResponder {
15783 type ControlHandle = NodeControlHandle;
15784
15785 fn control_handle(&self) -> &NodeControlHandle {
15786 &self.control_handle
15787 }
15788
15789 fn drop_without_shutdown(mut self) {
15790 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15792 std::mem::forget(self);
15794 }
15795}
15796
15797impl NodeGetExtendedAttributeResponder {
15798 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
15802 let _result = self.send_raw(result);
15803 if _result.is_err() {
15804 self.control_handle.shutdown();
15805 }
15806 self.drop_without_shutdown();
15807 _result
15808 }
15809
15810 pub fn send_no_shutdown_on_err(
15812 self,
15813 mut result: Result<ExtendedAttributeValue, i32>,
15814 ) -> Result<(), fidl::Error> {
15815 let _result = self.send_raw(result);
15816 self.drop_without_shutdown();
15817 _result
15818 }
15819
15820 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
15821 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
15822 result.as_mut().map_err(|e| *e),
15823 self.tx_id,
15824 0x45ffa3ccfdeb76db,
15825 fidl::encoding::DynamicFlags::empty(),
15826 )
15827 }
15828}
15829
15830#[must_use = "FIDL methods require a response to be sent"]
15831#[derive(Debug)]
15832pub struct NodeSetExtendedAttributeResponder {
15833 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15834 tx_id: u32,
15835}
15836
15837impl std::ops::Drop for NodeSetExtendedAttributeResponder {
15841 fn drop(&mut self) {
15842 self.control_handle.shutdown();
15843 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15845 }
15846}
15847
15848impl fidl::endpoints::Responder for NodeSetExtendedAttributeResponder {
15849 type ControlHandle = NodeControlHandle;
15850
15851 fn control_handle(&self) -> &NodeControlHandle {
15852 &self.control_handle
15853 }
15854
15855 fn drop_without_shutdown(mut self) {
15856 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15858 std::mem::forget(self);
15860 }
15861}
15862
15863impl NodeSetExtendedAttributeResponder {
15864 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15868 let _result = self.send_raw(result);
15869 if _result.is_err() {
15870 self.control_handle.shutdown();
15871 }
15872 self.drop_without_shutdown();
15873 _result
15874 }
15875
15876 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15878 let _result = self.send_raw(result);
15879 self.drop_without_shutdown();
15880 _result
15881 }
15882
15883 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15884 self.control_handle
15885 .inner
15886 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15887 result,
15888 self.tx_id,
15889 0x4a951362f681f23c,
15890 fidl::encoding::DynamicFlags::empty(),
15891 )
15892 }
15893}
15894
15895#[must_use = "FIDL methods require a response to be sent"]
15896#[derive(Debug)]
15897pub struct NodeRemoveExtendedAttributeResponder {
15898 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15899 tx_id: u32,
15900}
15901
15902impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
15906 fn drop(&mut self) {
15907 self.control_handle.shutdown();
15908 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15910 }
15911}
15912
15913impl fidl::endpoints::Responder for NodeRemoveExtendedAttributeResponder {
15914 type ControlHandle = NodeControlHandle;
15915
15916 fn control_handle(&self) -> &NodeControlHandle {
15917 &self.control_handle
15918 }
15919
15920 fn drop_without_shutdown(mut self) {
15921 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15923 std::mem::forget(self);
15925 }
15926}
15927
15928impl NodeRemoveExtendedAttributeResponder {
15929 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15933 let _result = self.send_raw(result);
15934 if _result.is_err() {
15935 self.control_handle.shutdown();
15936 }
15937 self.drop_without_shutdown();
15938 _result
15939 }
15940
15941 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15943 let _result = self.send_raw(result);
15944 self.drop_without_shutdown();
15945 _result
15946 }
15947
15948 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15949 self.control_handle
15950 .inner
15951 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15952 result,
15953 self.tx_id,
15954 0x7a0b9f3a9bf9032d,
15955 fidl::encoding::DynamicFlags::empty(),
15956 )
15957 }
15958}
15959
15960#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
15961pub struct ReadableMarker;
15962
15963impl fidl::endpoints::ProtocolMarker for ReadableMarker {
15964 type Proxy = ReadableProxy;
15965 type RequestStream = ReadableRequestStream;
15966 #[cfg(target_os = "fuchsia")]
15967 type SynchronousProxy = ReadableSynchronousProxy;
15968
15969 const DEBUG_NAME: &'static str = "(anonymous) Readable";
15970}
15971pub type ReadableReadResult = Result<Vec<u8>, i32>;
15972
15973pub trait ReadableProxyInterface: Send + Sync {
15974 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
15975 + Send;
15976 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
15977}
15978#[derive(Debug)]
15979#[cfg(target_os = "fuchsia")]
15980pub struct ReadableSynchronousProxy {
15981 client: fidl::client::sync::Client,
15982}
15983
15984#[cfg(target_os = "fuchsia")]
15985impl fidl::endpoints::SynchronousProxy for ReadableSynchronousProxy {
15986 type Proxy = ReadableProxy;
15987 type Protocol = ReadableMarker;
15988
15989 fn from_channel(inner: fidl::Channel) -> Self {
15990 Self::new(inner)
15991 }
15992
15993 fn into_channel(self) -> fidl::Channel {
15994 self.client.into_channel()
15995 }
15996
15997 fn as_channel(&self) -> &fidl::Channel {
15998 self.client.as_channel()
15999 }
16000}
16001
16002#[cfg(target_os = "fuchsia")]
16003impl ReadableSynchronousProxy {
16004 pub fn new(channel: fidl::Channel) -> Self {
16005 let protocol_name = <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16006 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
16007 }
16008
16009 pub fn into_channel(self) -> fidl::Channel {
16010 self.client.into_channel()
16011 }
16012
16013 pub fn wait_for_event(
16016 &self,
16017 deadline: zx::MonotonicInstant,
16018 ) -> Result<ReadableEvent, fidl::Error> {
16019 ReadableEvent::decode(self.client.wait_for_event(deadline)?)
16020 }
16021
16022 pub fn r#read(
16041 &self,
16042 mut count: u64,
16043 ___deadline: zx::MonotonicInstant,
16044 ) -> Result<ReadableReadResult, fidl::Error> {
16045 let _response = self.client.send_query::<
16046 ReadableReadRequest,
16047 fidl::encoding::ResultType<ReadableReadResponse, i32>,
16048 >(
16049 (count,),
16050 0x57e419a298c8ede,
16051 fidl::encoding::DynamicFlags::empty(),
16052 ___deadline,
16053 )?;
16054 Ok(_response.map(|x| x.data))
16055 }
16056}
16057
16058#[cfg(target_os = "fuchsia")]
16059impl From<ReadableSynchronousProxy> for zx::Handle {
16060 fn from(value: ReadableSynchronousProxy) -> Self {
16061 value.into_channel().into()
16062 }
16063}
16064
16065#[cfg(target_os = "fuchsia")]
16066impl From<fidl::Channel> for ReadableSynchronousProxy {
16067 fn from(value: fidl::Channel) -> Self {
16068 Self::new(value)
16069 }
16070}
16071
16072#[cfg(target_os = "fuchsia")]
16073impl fidl::endpoints::FromClient for ReadableSynchronousProxy {
16074 type Protocol = ReadableMarker;
16075
16076 fn from_client(value: fidl::endpoints::ClientEnd<ReadableMarker>) -> Self {
16077 Self::new(value.into_channel())
16078 }
16079}
16080
16081#[derive(Debug, Clone)]
16082pub struct ReadableProxy {
16083 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
16084}
16085
16086impl fidl::endpoints::Proxy for ReadableProxy {
16087 type Protocol = ReadableMarker;
16088
16089 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
16090 Self::new(inner)
16091 }
16092
16093 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
16094 self.client.into_channel().map_err(|client| Self { client })
16095 }
16096
16097 fn as_channel(&self) -> &::fidl::AsyncChannel {
16098 self.client.as_channel()
16099 }
16100}
16101
16102impl ReadableProxy {
16103 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
16105 let protocol_name = <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16106 Self { client: fidl::client::Client::new(channel, protocol_name) }
16107 }
16108
16109 pub fn take_event_stream(&self) -> ReadableEventStream {
16115 ReadableEventStream { event_receiver: self.client.take_event_receiver() }
16116 }
16117
16118 pub fn r#read(
16137 &self,
16138 mut count: u64,
16139 ) -> fidl::client::QueryResponseFut<
16140 ReadableReadResult,
16141 fidl::encoding::DefaultFuchsiaResourceDialect,
16142 > {
16143 ReadableProxyInterface::r#read(self, count)
16144 }
16145}
16146
16147impl ReadableProxyInterface for ReadableProxy {
16148 type ReadResponseFut = fidl::client::QueryResponseFut<
16149 ReadableReadResult,
16150 fidl::encoding::DefaultFuchsiaResourceDialect,
16151 >;
16152 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
16153 fn _decode(
16154 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
16155 ) -> Result<ReadableReadResult, fidl::Error> {
16156 let _response = fidl::client::decode_transaction_body::<
16157 fidl::encoding::ResultType<ReadableReadResponse, i32>,
16158 fidl::encoding::DefaultFuchsiaResourceDialect,
16159 0x57e419a298c8ede,
16160 >(_buf?)?;
16161 Ok(_response.map(|x| x.data))
16162 }
16163 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
16164 (count,),
16165 0x57e419a298c8ede,
16166 fidl::encoding::DynamicFlags::empty(),
16167 _decode,
16168 )
16169 }
16170}
16171
16172pub struct ReadableEventStream {
16173 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
16174}
16175
16176impl std::marker::Unpin for ReadableEventStream {}
16177
16178impl futures::stream::FusedStream for ReadableEventStream {
16179 fn is_terminated(&self) -> bool {
16180 self.event_receiver.is_terminated()
16181 }
16182}
16183
16184impl futures::Stream for ReadableEventStream {
16185 type Item = Result<ReadableEvent, fidl::Error>;
16186
16187 fn poll_next(
16188 mut self: std::pin::Pin<&mut Self>,
16189 cx: &mut std::task::Context<'_>,
16190 ) -> std::task::Poll<Option<Self::Item>> {
16191 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
16192 &mut self.event_receiver,
16193 cx
16194 )?) {
16195 Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
16196 None => std::task::Poll::Ready(None),
16197 }
16198 }
16199}
16200
16201#[derive(Debug)]
16202pub enum ReadableEvent {}
16203
16204impl ReadableEvent {
16205 fn decode(
16207 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
16208 ) -> Result<ReadableEvent, fidl::Error> {
16209 let (bytes, _handles) = buf.split_mut();
16210 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16211 debug_assert_eq!(tx_header.tx_id, 0);
16212 match tx_header.ordinal {
16213 _ => Err(fidl::Error::UnknownOrdinal {
16214 ordinal: tx_header.ordinal,
16215 protocol_name: <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16216 }),
16217 }
16218 }
16219}
16220
16221pub struct ReadableRequestStream {
16223 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16224 is_terminated: bool,
16225}
16226
16227impl std::marker::Unpin for ReadableRequestStream {}
16228
16229impl futures::stream::FusedStream for ReadableRequestStream {
16230 fn is_terminated(&self) -> bool {
16231 self.is_terminated
16232 }
16233}
16234
16235impl fidl::endpoints::RequestStream for ReadableRequestStream {
16236 type Protocol = ReadableMarker;
16237 type ControlHandle = ReadableControlHandle;
16238
16239 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
16240 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
16241 }
16242
16243 fn control_handle(&self) -> Self::ControlHandle {
16244 ReadableControlHandle { inner: self.inner.clone() }
16245 }
16246
16247 fn into_inner(
16248 self,
16249 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
16250 {
16251 (self.inner, self.is_terminated)
16252 }
16253
16254 fn from_inner(
16255 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16256 is_terminated: bool,
16257 ) -> Self {
16258 Self { inner, is_terminated }
16259 }
16260}
16261
16262impl futures::Stream for ReadableRequestStream {
16263 type Item = Result<ReadableRequest, fidl::Error>;
16264
16265 fn poll_next(
16266 mut self: std::pin::Pin<&mut Self>,
16267 cx: &mut std::task::Context<'_>,
16268 ) -> std::task::Poll<Option<Self::Item>> {
16269 let this = &mut *self;
16270 if this.inner.check_shutdown(cx) {
16271 this.is_terminated = true;
16272 return std::task::Poll::Ready(None);
16273 }
16274 if this.is_terminated {
16275 panic!("polled ReadableRequestStream after completion");
16276 }
16277 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
16278 |bytes, handles| {
16279 match this.inner.channel().read_etc(cx, bytes, handles) {
16280 std::task::Poll::Ready(Ok(())) => {}
16281 std::task::Poll::Pending => return std::task::Poll::Pending,
16282 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
16283 this.is_terminated = true;
16284 return std::task::Poll::Ready(None);
16285 }
16286 std::task::Poll::Ready(Err(e)) => {
16287 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
16288 e.into(),
16289 ))))
16290 }
16291 }
16292
16293 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16295
16296 std::task::Poll::Ready(Some(match header.ordinal {
16297 0x57e419a298c8ede => {
16298 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
16299 let mut req = fidl::new_empty!(
16300 ReadableReadRequest,
16301 fidl::encoding::DefaultFuchsiaResourceDialect
16302 );
16303 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
16304 let control_handle = ReadableControlHandle { inner: this.inner.clone() };
16305 Ok(ReadableRequest::Read {
16306 count: req.count,
16307
16308 responder: ReadableReadResponder {
16309 control_handle: std::mem::ManuallyDrop::new(control_handle),
16310 tx_id: header.tx_id,
16311 },
16312 })
16313 }
16314 _ => Err(fidl::Error::UnknownOrdinal {
16315 ordinal: header.ordinal,
16316 protocol_name:
16317 <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16318 }),
16319 }))
16320 },
16321 )
16322 }
16323}
16324
16325#[derive(Debug)]
16326pub enum ReadableRequest {
16327 Read { count: u64, responder: ReadableReadResponder },
16346}
16347
16348impl ReadableRequest {
16349 #[allow(irrefutable_let_patterns)]
16350 pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
16351 if let ReadableRequest::Read { count, responder } = self {
16352 Some((count, responder))
16353 } else {
16354 None
16355 }
16356 }
16357
16358 pub fn method_name(&self) -> &'static str {
16360 match *self {
16361 ReadableRequest::Read { .. } => "read",
16362 }
16363 }
16364}
16365
16366#[derive(Debug, Clone)]
16367pub struct ReadableControlHandle {
16368 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16369}
16370
16371impl fidl::endpoints::ControlHandle for ReadableControlHandle {
16372 fn shutdown(&self) {
16373 self.inner.shutdown()
16374 }
16375 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
16376 self.inner.shutdown_with_epitaph(status)
16377 }
16378
16379 fn is_closed(&self) -> bool {
16380 self.inner.channel().is_closed()
16381 }
16382 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
16383 self.inner.channel().on_closed()
16384 }
16385
16386 #[cfg(target_os = "fuchsia")]
16387 fn signal_peer(
16388 &self,
16389 clear_mask: zx::Signals,
16390 set_mask: zx::Signals,
16391 ) -> Result<(), zx_status::Status> {
16392 use fidl::Peered;
16393 self.inner.channel().signal_peer(clear_mask, set_mask)
16394 }
16395}
16396
16397impl ReadableControlHandle {}
16398
16399#[must_use = "FIDL methods require a response to be sent"]
16400#[derive(Debug)]
16401pub struct ReadableReadResponder {
16402 control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
16403 tx_id: u32,
16404}
16405
16406impl std::ops::Drop for ReadableReadResponder {
16410 fn drop(&mut self) {
16411 self.control_handle.shutdown();
16412 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16414 }
16415}
16416
16417impl fidl::endpoints::Responder for ReadableReadResponder {
16418 type ControlHandle = ReadableControlHandle;
16419
16420 fn control_handle(&self) -> &ReadableControlHandle {
16421 &self.control_handle
16422 }
16423
16424 fn drop_without_shutdown(mut self) {
16425 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16427 std::mem::forget(self);
16429 }
16430}
16431
16432impl ReadableReadResponder {
16433 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
16437 let _result = self.send_raw(result);
16438 if _result.is_err() {
16439 self.control_handle.shutdown();
16440 }
16441 self.drop_without_shutdown();
16442 _result
16443 }
16444
16445 pub fn send_no_shutdown_on_err(
16447 self,
16448 mut result: Result<&[u8], i32>,
16449 ) -> Result<(), fidl::Error> {
16450 let _result = self.send_raw(result);
16451 self.drop_without_shutdown();
16452 _result
16453 }
16454
16455 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
16456 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
16457 result.map(|data| (data,)),
16458 self.tx_id,
16459 0x57e419a298c8ede,
16460 fidl::encoding::DynamicFlags::empty(),
16461 )
16462 }
16463}
16464
16465#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16466pub struct SymlinkMarker;
16467
16468impl fidl::endpoints::ProtocolMarker for SymlinkMarker {
16469 type Proxy = SymlinkProxy;
16470 type RequestStream = SymlinkRequestStream;
16471 #[cfg(target_os = "fuchsia")]
16472 type SynchronousProxy = SymlinkSynchronousProxy;
16473
16474 const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
16475}
16476impl fidl::endpoints::DiscoverableProtocolMarker for SymlinkMarker {}
16477
16478pub trait SymlinkProxyInterface: Send + Sync {
16479 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
16480 + Send;
16481 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
16482 fn r#clone(
16483 &self,
16484 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
16485 ) -> Result<(), fidl::Error>;
16486 type CloseResponseFut: std::future::Future<
16487 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
16488 > + Send;
16489 fn r#close(&self) -> Self::CloseResponseFut;
16490 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
16491 fn r#query(&self) -> Self::QueryResponseFut;
16492 fn r#deprecated_clone(
16493 &self,
16494 flags: OpenFlags,
16495 object: fidl::endpoints::ServerEnd<NodeMarker>,
16496 ) -> Result<(), fidl::Error>;
16497 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
16498 + Send;
16499 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
16500 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
16501 fn r#deprecated_set_attr(
16502 &self,
16503 flags: NodeAttributeFlags,
16504 attributes: &NodeAttributes,
16505 ) -> Self::DeprecatedSetAttrResponseFut;
16506 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
16507 + Send;
16508 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
16509 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
16510 + Send;
16511 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
16512 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
16513 + Send;
16514 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
16515 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
16516 + Send;
16517 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
16518 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
16519 + Send;
16520 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
16521 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
16522 + Send;
16523 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
16524 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
16525 + Send;
16526 fn r#update_attributes(
16527 &self,
16528 payload: &MutableNodeAttributes,
16529 ) -> Self::UpdateAttributesResponseFut;
16530 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
16531 fn r#sync(&self) -> Self::SyncResponseFut;
16532 fn r#list_extended_attributes(
16533 &self,
16534 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
16535 ) -> Result<(), fidl::Error>;
16536 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
16537 + Send;
16538 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
16539 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
16540 + Send;
16541 fn r#set_extended_attribute(
16542 &self,
16543 name: &[u8],
16544 value: ExtendedAttributeValue,
16545 mode: SetExtendedAttributeMode,
16546 ) -> Self::SetExtendedAttributeResponseFut;
16547 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
16548 + Send;
16549 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
16550 type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
16551 fn r#describe(&self) -> Self::DescribeResponseFut;
16552}
16553#[derive(Debug)]
16554#[cfg(target_os = "fuchsia")]
16555pub struct SymlinkSynchronousProxy {
16556 client: fidl::client::sync::Client,
16557}
16558
16559#[cfg(target_os = "fuchsia")]
16560impl fidl::endpoints::SynchronousProxy for SymlinkSynchronousProxy {
16561 type Proxy = SymlinkProxy;
16562 type Protocol = SymlinkMarker;
16563
16564 fn from_channel(inner: fidl::Channel) -> Self {
16565 Self::new(inner)
16566 }
16567
16568 fn into_channel(self) -> fidl::Channel {
16569 self.client.into_channel()
16570 }
16571
16572 fn as_channel(&self) -> &fidl::Channel {
16573 self.client.as_channel()
16574 }
16575}
16576
16577#[cfg(target_os = "fuchsia")]
16578impl SymlinkSynchronousProxy {
16579 pub fn new(channel: fidl::Channel) -> Self {
16580 let protocol_name = <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16581 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
16582 }
16583
16584 pub fn into_channel(self) -> fidl::Channel {
16585 self.client.into_channel()
16586 }
16587
16588 pub fn wait_for_event(
16591 &self,
16592 deadline: zx::MonotonicInstant,
16593 ) -> Result<SymlinkEvent, fidl::Error> {
16594 SymlinkEvent::decode(self.client.wait_for_event(deadline)?)
16595 }
16596
16597 pub fn r#link_into(
16620 &self,
16621 mut dst_parent_token: fidl::Event,
16622 mut dst: &str,
16623 ___deadline: zx::MonotonicInstant,
16624 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
16625 let _response = self.client.send_query::<
16626 LinkableLinkIntoRequest,
16627 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16628 >(
16629 (dst_parent_token, dst,),
16630 0x54f3949246a03e74,
16631 fidl::encoding::DynamicFlags::empty(),
16632 ___deadline,
16633 )?;
16634 Ok(_response.map(|x| x))
16635 }
16636
16637 pub fn r#clone(
16638 &self,
16639 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
16640 ) -> Result<(), fidl::Error> {
16641 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
16642 (request,),
16643 0x20d8a7aba2168a79,
16644 fidl::encoding::DynamicFlags::empty(),
16645 )
16646 }
16647
16648 pub fn r#close(
16659 &self,
16660 ___deadline: zx::MonotonicInstant,
16661 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
16662 let _response = self.client.send_query::<
16663 fidl::encoding::EmptyPayload,
16664 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16665 >(
16666 (),
16667 0x5ac5d459ad7f657e,
16668 fidl::encoding::DynamicFlags::empty(),
16669 ___deadline,
16670 )?;
16671 Ok(_response.map(|x| x))
16672 }
16673
16674 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
16675 let _response = self.client.send_query::<
16676 fidl::encoding::EmptyPayload,
16677 fidl_fuchsia_unknown::QueryableQueryResponse,
16678 >(
16679 (),
16680 0x2658edee9decfc06,
16681 fidl::encoding::DynamicFlags::empty(),
16682 ___deadline,
16683 )?;
16684 Ok(_response.protocol)
16685 }
16686
16687 pub fn r#deprecated_clone(
16689 &self,
16690 mut flags: OpenFlags,
16691 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
16692 ) -> Result<(), fidl::Error> {
16693 self.client.send::<NodeDeprecatedCloneRequest>(
16694 (flags, object),
16695 0x5a61678f293ce16f,
16696 fidl::encoding::DynamicFlags::FLEXIBLE,
16697 )
16698 }
16699
16700 pub fn r#deprecated_get_attr(
16702 &self,
16703 ___deadline: zx::MonotonicInstant,
16704 ) -> Result<(i32, NodeAttributes), fidl::Error> {
16705 let _response =
16706 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
16707 (),
16708 0x78985e216314dafd,
16709 fidl::encoding::DynamicFlags::empty(),
16710 ___deadline,
16711 )?;
16712 Ok((_response.s, _response.attributes))
16713 }
16714
16715 pub fn r#deprecated_set_attr(
16717 &self,
16718 mut flags: NodeAttributeFlags,
16719 mut attributes: &NodeAttributes,
16720 ___deadline: zx::MonotonicInstant,
16721 ) -> Result<i32, fidl::Error> {
16722 let _response =
16723 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
16724 (flags, attributes),
16725 0x4186c0f40d938f46,
16726 fidl::encoding::DynamicFlags::empty(),
16727 ___deadline,
16728 )?;
16729 Ok(_response.s)
16730 }
16731
16732 pub fn r#deprecated_get_flags(
16734 &self,
16735 ___deadline: zx::MonotonicInstant,
16736 ) -> Result<(i32, OpenFlags), fidl::Error> {
16737 let _response = self
16738 .client
16739 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
16740 (),
16741 0x5b88fffb8eda3aa1,
16742 fidl::encoding::DynamicFlags::empty(),
16743 ___deadline,
16744 )?;
16745 Ok((_response.s, _response.flags))
16746 }
16747
16748 pub fn r#deprecated_set_flags(
16750 &self,
16751 mut flags: OpenFlags,
16752 ___deadline: zx::MonotonicInstant,
16753 ) -> Result<i32, fidl::Error> {
16754 let _response = self
16755 .client
16756 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
16757 (flags,),
16758 0x5295b76c71fde733,
16759 fidl::encoding::DynamicFlags::empty(),
16760 ___deadline,
16761 )?;
16762 Ok(_response.s)
16763 }
16764
16765 pub fn r#get_flags(
16774 &self,
16775 ___deadline: zx::MonotonicInstant,
16776 ) -> Result<NodeGetFlagsResult, fidl::Error> {
16777 let _response = self.client.send_query::<
16778 fidl::encoding::EmptyPayload,
16779 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
16780 >(
16781 (),
16782 0x176eb318f64ec23,
16783 fidl::encoding::DynamicFlags::FLEXIBLE,
16784 ___deadline,
16785 )?
16786 .into_result::<SymlinkMarker>("get_flags")?;
16787 Ok(_response.map(|x| x.flags))
16788 }
16789
16790 pub fn r#set_flags(
16800 &self,
16801 mut flags: Flags,
16802 ___deadline: zx::MonotonicInstant,
16803 ) -> Result<NodeSetFlagsResult, fidl::Error> {
16804 let _response = self.client.send_query::<
16805 NodeSetFlagsRequest,
16806 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
16807 >(
16808 (flags,),
16809 0x55a8028685791ea8,
16810 fidl::encoding::DynamicFlags::FLEXIBLE,
16811 ___deadline,
16812 )?
16813 .into_result::<SymlinkMarker>("set_flags")?;
16814 Ok(_response.map(|x| x))
16815 }
16816
16817 pub fn r#query_filesystem(
16819 &self,
16820 ___deadline: zx::MonotonicInstant,
16821 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
16822 let _response =
16823 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
16824 (),
16825 0x6f344a1c6b0a0610,
16826 fidl::encoding::DynamicFlags::empty(),
16827 ___deadline,
16828 )?;
16829 Ok((_response.s, _response.info))
16830 }
16831
16832 pub fn r#get_attributes(
16846 &self,
16847 mut query: NodeAttributesQuery,
16848 ___deadline: zx::MonotonicInstant,
16849 ) -> Result<NodeGetAttributesResult, fidl::Error> {
16850 let _response = self.client.send_query::<
16851 NodeGetAttributesRequest,
16852 fidl::encoding::ResultType<NodeAttributes2, i32>,
16853 >(
16854 (query,),
16855 0x3d4396a638ea053b,
16856 fidl::encoding::DynamicFlags::empty(),
16857 ___deadline,
16858 )?;
16859 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
16860 }
16861
16862 pub fn r#update_attributes(
16871 &self,
16872 mut payload: &MutableNodeAttributes,
16873 ___deadline: zx::MonotonicInstant,
16874 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
16875 let _response = self.client.send_query::<
16876 MutableNodeAttributes,
16877 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16878 >(
16879 payload,
16880 0x3308c1da5a89bf08,
16881 fidl::encoding::DynamicFlags::empty(),
16882 ___deadline,
16883 )?;
16884 Ok(_response.map(|x| x))
16885 }
16886
16887 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
16897 let _response = self.client.send_query::<
16898 fidl::encoding::EmptyPayload,
16899 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16900 >(
16901 (),
16902 0x2c5c27ca0ab5dc49,
16903 fidl::encoding::DynamicFlags::empty(),
16904 ___deadline,
16905 )?;
16906 Ok(_response.map(|x| x))
16907 }
16908
16909 pub fn r#list_extended_attributes(
16918 &self,
16919 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
16920 ) -> Result<(), fidl::Error> {
16921 self.client.send::<NodeListExtendedAttributesRequest>(
16922 (iterator,),
16923 0x4b61033de007fcd0,
16924 fidl::encoding::DynamicFlags::empty(),
16925 )
16926 }
16927
16928 pub fn r#get_extended_attribute(
16935 &self,
16936 mut name: &[u8],
16937 ___deadline: zx::MonotonicInstant,
16938 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
16939 let _response = self.client.send_query::<
16940 NodeGetExtendedAttributeRequest,
16941 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
16942 >(
16943 (name,),
16944 0x45ffa3ccfdeb76db,
16945 fidl::encoding::DynamicFlags::empty(),
16946 ___deadline,
16947 )?;
16948 Ok(_response.map(|x| x))
16949 }
16950
16951 pub fn r#set_extended_attribute(
16959 &self,
16960 mut name: &[u8],
16961 mut value: ExtendedAttributeValue,
16962 mut mode: SetExtendedAttributeMode,
16963 ___deadline: zx::MonotonicInstant,
16964 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
16965 let _response = self.client.send_query::<
16966 NodeSetExtendedAttributeRequest,
16967 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16968 >(
16969 (name, &mut value, mode,),
16970 0x4a951362f681f23c,
16971 fidl::encoding::DynamicFlags::empty(),
16972 ___deadline,
16973 )?;
16974 Ok(_response.map(|x| x))
16975 }
16976
16977 pub fn r#remove_extended_attribute(
16983 &self,
16984 mut name: &[u8],
16985 ___deadline: zx::MonotonicInstant,
16986 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
16987 let _response = self.client.send_query::<
16988 NodeRemoveExtendedAttributeRequest,
16989 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16990 >(
16991 (name,),
16992 0x7a0b9f3a9bf9032d,
16993 fidl::encoding::DynamicFlags::empty(),
16994 ___deadline,
16995 )?;
16996 Ok(_response.map(|x| x))
16997 }
16998
16999 pub fn r#describe(
17000 &self,
17001 ___deadline: zx::MonotonicInstant,
17002 ) -> Result<SymlinkInfo, fidl::Error> {
17003 let _response = self
17004 .client
17005 .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::FlexibleType<SymlinkInfo>>(
17006 (),
17007 0x742c2ea5e89831f3,
17008 fidl::encoding::DynamicFlags::FLEXIBLE,
17009 ___deadline,
17010 )?
17011 .into_result::<SymlinkMarker>("describe")?;
17012 Ok(_response)
17013 }
17014}
17015
17016#[cfg(target_os = "fuchsia")]
17017impl From<SymlinkSynchronousProxy> for zx::Handle {
17018 fn from(value: SymlinkSynchronousProxy) -> Self {
17019 value.into_channel().into()
17020 }
17021}
17022
17023#[cfg(target_os = "fuchsia")]
17024impl From<fidl::Channel> for SymlinkSynchronousProxy {
17025 fn from(value: fidl::Channel) -> Self {
17026 Self::new(value)
17027 }
17028}
17029
17030#[cfg(target_os = "fuchsia")]
17031impl fidl::endpoints::FromClient for SymlinkSynchronousProxy {
17032 type Protocol = SymlinkMarker;
17033
17034 fn from_client(value: fidl::endpoints::ClientEnd<SymlinkMarker>) -> Self {
17035 Self::new(value.into_channel())
17036 }
17037}
17038
17039#[derive(Debug, Clone)]
17040pub struct SymlinkProxy {
17041 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
17042}
17043
17044impl fidl::endpoints::Proxy for SymlinkProxy {
17045 type Protocol = SymlinkMarker;
17046
17047 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
17048 Self::new(inner)
17049 }
17050
17051 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
17052 self.client.into_channel().map_err(|client| Self { client })
17053 }
17054
17055 fn as_channel(&self) -> &::fidl::AsyncChannel {
17056 self.client.as_channel()
17057 }
17058}
17059
17060impl SymlinkProxy {
17061 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
17063 let protocol_name = <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
17064 Self { client: fidl::client::Client::new(channel, protocol_name) }
17065 }
17066
17067 pub fn take_event_stream(&self) -> SymlinkEventStream {
17073 SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
17074 }
17075
17076 pub fn r#link_into(
17099 &self,
17100 mut dst_parent_token: fidl::Event,
17101 mut dst: &str,
17102 ) -> fidl::client::QueryResponseFut<
17103 LinkableLinkIntoResult,
17104 fidl::encoding::DefaultFuchsiaResourceDialect,
17105 > {
17106 SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
17107 }
17108
17109 pub fn r#clone(
17110 &self,
17111 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17112 ) -> Result<(), fidl::Error> {
17113 SymlinkProxyInterface::r#clone(self, request)
17114 }
17115
17116 pub fn r#close(
17127 &self,
17128 ) -> fidl::client::QueryResponseFut<
17129 fidl_fuchsia_unknown::CloseableCloseResult,
17130 fidl::encoding::DefaultFuchsiaResourceDialect,
17131 > {
17132 SymlinkProxyInterface::r#close(self)
17133 }
17134
17135 pub fn r#query(
17136 &self,
17137 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
17138 {
17139 SymlinkProxyInterface::r#query(self)
17140 }
17141
17142 pub fn r#deprecated_clone(
17144 &self,
17145 mut flags: OpenFlags,
17146 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
17147 ) -> Result<(), fidl::Error> {
17148 SymlinkProxyInterface::r#deprecated_clone(self, flags, object)
17149 }
17150
17151 pub fn r#deprecated_get_attr(
17153 &self,
17154 ) -> fidl::client::QueryResponseFut<
17155 (i32, NodeAttributes),
17156 fidl::encoding::DefaultFuchsiaResourceDialect,
17157 > {
17158 SymlinkProxyInterface::r#deprecated_get_attr(self)
17159 }
17160
17161 pub fn r#deprecated_set_attr(
17163 &self,
17164 mut flags: NodeAttributeFlags,
17165 mut attributes: &NodeAttributes,
17166 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
17167 SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
17168 }
17169
17170 pub fn r#deprecated_get_flags(
17172 &self,
17173 ) -> fidl::client::QueryResponseFut<
17174 (i32, OpenFlags),
17175 fidl::encoding::DefaultFuchsiaResourceDialect,
17176 > {
17177 SymlinkProxyInterface::r#deprecated_get_flags(self)
17178 }
17179
17180 pub fn r#deprecated_set_flags(
17182 &self,
17183 mut flags: OpenFlags,
17184 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
17185 SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
17186 }
17187
17188 pub fn r#get_flags(
17197 &self,
17198 ) -> fidl::client::QueryResponseFut<
17199 NodeGetFlagsResult,
17200 fidl::encoding::DefaultFuchsiaResourceDialect,
17201 > {
17202 SymlinkProxyInterface::r#get_flags(self)
17203 }
17204
17205 pub fn r#set_flags(
17215 &self,
17216 mut flags: Flags,
17217 ) -> fidl::client::QueryResponseFut<
17218 NodeSetFlagsResult,
17219 fidl::encoding::DefaultFuchsiaResourceDialect,
17220 > {
17221 SymlinkProxyInterface::r#set_flags(self, flags)
17222 }
17223
17224 pub fn r#query_filesystem(
17226 &self,
17227 ) -> fidl::client::QueryResponseFut<
17228 (i32, Option<Box<FilesystemInfo>>),
17229 fidl::encoding::DefaultFuchsiaResourceDialect,
17230 > {
17231 SymlinkProxyInterface::r#query_filesystem(self)
17232 }
17233
17234 pub fn r#get_attributes(
17248 &self,
17249 mut query: NodeAttributesQuery,
17250 ) -> fidl::client::QueryResponseFut<
17251 NodeGetAttributesResult,
17252 fidl::encoding::DefaultFuchsiaResourceDialect,
17253 > {
17254 SymlinkProxyInterface::r#get_attributes(self, query)
17255 }
17256
17257 pub fn r#update_attributes(
17266 &self,
17267 mut payload: &MutableNodeAttributes,
17268 ) -> fidl::client::QueryResponseFut<
17269 NodeUpdateAttributesResult,
17270 fidl::encoding::DefaultFuchsiaResourceDialect,
17271 > {
17272 SymlinkProxyInterface::r#update_attributes(self, payload)
17273 }
17274
17275 pub fn r#sync(
17285 &self,
17286 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
17287 {
17288 SymlinkProxyInterface::r#sync(self)
17289 }
17290
17291 pub fn r#list_extended_attributes(
17300 &self,
17301 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17302 ) -> Result<(), fidl::Error> {
17303 SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
17304 }
17305
17306 pub fn r#get_extended_attribute(
17313 &self,
17314 mut name: &[u8],
17315 ) -> fidl::client::QueryResponseFut<
17316 NodeGetExtendedAttributeResult,
17317 fidl::encoding::DefaultFuchsiaResourceDialect,
17318 > {
17319 SymlinkProxyInterface::r#get_extended_attribute(self, name)
17320 }
17321
17322 pub fn r#set_extended_attribute(
17330 &self,
17331 mut name: &[u8],
17332 mut value: ExtendedAttributeValue,
17333 mut mode: SetExtendedAttributeMode,
17334 ) -> fidl::client::QueryResponseFut<
17335 NodeSetExtendedAttributeResult,
17336 fidl::encoding::DefaultFuchsiaResourceDialect,
17337 > {
17338 SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
17339 }
17340
17341 pub fn r#remove_extended_attribute(
17347 &self,
17348 mut name: &[u8],
17349 ) -> fidl::client::QueryResponseFut<
17350 NodeRemoveExtendedAttributeResult,
17351 fidl::encoding::DefaultFuchsiaResourceDialect,
17352 > {
17353 SymlinkProxyInterface::r#remove_extended_attribute(self, name)
17354 }
17355
17356 pub fn r#describe(
17357 &self,
17358 ) -> fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
17359 {
17360 SymlinkProxyInterface::r#describe(self)
17361 }
17362}
17363
17364impl SymlinkProxyInterface for SymlinkProxy {
17365 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
17366 LinkableLinkIntoResult,
17367 fidl::encoding::DefaultFuchsiaResourceDialect,
17368 >;
17369 fn r#link_into(
17370 &self,
17371 mut dst_parent_token: fidl::Event,
17372 mut dst: &str,
17373 ) -> Self::LinkIntoResponseFut {
17374 fn _decode(
17375 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17376 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
17377 let _response = fidl::client::decode_transaction_body::<
17378 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17379 fidl::encoding::DefaultFuchsiaResourceDialect,
17380 0x54f3949246a03e74,
17381 >(_buf?)?;
17382 Ok(_response.map(|x| x))
17383 }
17384 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
17385 (dst_parent_token, dst),
17386 0x54f3949246a03e74,
17387 fidl::encoding::DynamicFlags::empty(),
17388 _decode,
17389 )
17390 }
17391
17392 fn r#clone(
17393 &self,
17394 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17395 ) -> Result<(), fidl::Error> {
17396 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
17397 (request,),
17398 0x20d8a7aba2168a79,
17399 fidl::encoding::DynamicFlags::empty(),
17400 )
17401 }
17402
17403 type CloseResponseFut = fidl::client::QueryResponseFut<
17404 fidl_fuchsia_unknown::CloseableCloseResult,
17405 fidl::encoding::DefaultFuchsiaResourceDialect,
17406 >;
17407 fn r#close(&self) -> Self::CloseResponseFut {
17408 fn _decode(
17409 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17410 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
17411 let _response = fidl::client::decode_transaction_body::<
17412 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17413 fidl::encoding::DefaultFuchsiaResourceDialect,
17414 0x5ac5d459ad7f657e,
17415 >(_buf?)?;
17416 Ok(_response.map(|x| x))
17417 }
17418 self.client.send_query_and_decode::<
17419 fidl::encoding::EmptyPayload,
17420 fidl_fuchsia_unknown::CloseableCloseResult,
17421 >(
17422 (),
17423 0x5ac5d459ad7f657e,
17424 fidl::encoding::DynamicFlags::empty(),
17425 _decode,
17426 )
17427 }
17428
17429 type QueryResponseFut =
17430 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
17431 fn r#query(&self) -> Self::QueryResponseFut {
17432 fn _decode(
17433 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17434 ) -> Result<Vec<u8>, fidl::Error> {
17435 let _response = fidl::client::decode_transaction_body::<
17436 fidl_fuchsia_unknown::QueryableQueryResponse,
17437 fidl::encoding::DefaultFuchsiaResourceDialect,
17438 0x2658edee9decfc06,
17439 >(_buf?)?;
17440 Ok(_response.protocol)
17441 }
17442 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
17443 (),
17444 0x2658edee9decfc06,
17445 fidl::encoding::DynamicFlags::empty(),
17446 _decode,
17447 )
17448 }
17449
17450 fn r#deprecated_clone(
17451 &self,
17452 mut flags: OpenFlags,
17453 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
17454 ) -> Result<(), fidl::Error> {
17455 self.client.send::<NodeDeprecatedCloneRequest>(
17456 (flags, object),
17457 0x5a61678f293ce16f,
17458 fidl::encoding::DynamicFlags::FLEXIBLE,
17459 )
17460 }
17461
17462 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
17463 (i32, NodeAttributes),
17464 fidl::encoding::DefaultFuchsiaResourceDialect,
17465 >;
17466 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
17467 fn _decode(
17468 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17469 ) -> Result<(i32, NodeAttributes), fidl::Error> {
17470 let _response = fidl::client::decode_transaction_body::<
17471 NodeDeprecatedGetAttrResponse,
17472 fidl::encoding::DefaultFuchsiaResourceDialect,
17473 0x78985e216314dafd,
17474 >(_buf?)?;
17475 Ok((_response.s, _response.attributes))
17476 }
17477 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
17478 (),
17479 0x78985e216314dafd,
17480 fidl::encoding::DynamicFlags::empty(),
17481 _decode,
17482 )
17483 }
17484
17485 type DeprecatedSetAttrResponseFut =
17486 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
17487 fn r#deprecated_set_attr(
17488 &self,
17489 mut flags: NodeAttributeFlags,
17490 mut attributes: &NodeAttributes,
17491 ) -> Self::DeprecatedSetAttrResponseFut {
17492 fn _decode(
17493 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17494 ) -> Result<i32, fidl::Error> {
17495 let _response = fidl::client::decode_transaction_body::<
17496 NodeDeprecatedSetAttrResponse,
17497 fidl::encoding::DefaultFuchsiaResourceDialect,
17498 0x4186c0f40d938f46,
17499 >(_buf?)?;
17500 Ok(_response.s)
17501 }
17502 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
17503 (flags, attributes),
17504 0x4186c0f40d938f46,
17505 fidl::encoding::DynamicFlags::empty(),
17506 _decode,
17507 )
17508 }
17509
17510 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
17511 (i32, OpenFlags),
17512 fidl::encoding::DefaultFuchsiaResourceDialect,
17513 >;
17514 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
17515 fn _decode(
17516 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17517 ) -> Result<(i32, OpenFlags), fidl::Error> {
17518 let _response = fidl::client::decode_transaction_body::<
17519 NodeDeprecatedGetFlagsResponse,
17520 fidl::encoding::DefaultFuchsiaResourceDialect,
17521 0x5b88fffb8eda3aa1,
17522 >(_buf?)?;
17523 Ok((_response.s, _response.flags))
17524 }
17525 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
17526 (),
17527 0x5b88fffb8eda3aa1,
17528 fidl::encoding::DynamicFlags::empty(),
17529 _decode,
17530 )
17531 }
17532
17533 type DeprecatedSetFlagsResponseFut =
17534 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
17535 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
17536 fn _decode(
17537 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17538 ) -> Result<i32, fidl::Error> {
17539 let _response = fidl::client::decode_transaction_body::<
17540 NodeDeprecatedSetFlagsResponse,
17541 fidl::encoding::DefaultFuchsiaResourceDialect,
17542 0x5295b76c71fde733,
17543 >(_buf?)?;
17544 Ok(_response.s)
17545 }
17546 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
17547 (flags,),
17548 0x5295b76c71fde733,
17549 fidl::encoding::DynamicFlags::empty(),
17550 _decode,
17551 )
17552 }
17553
17554 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
17555 NodeGetFlagsResult,
17556 fidl::encoding::DefaultFuchsiaResourceDialect,
17557 >;
17558 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
17559 fn _decode(
17560 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17561 ) -> Result<NodeGetFlagsResult, fidl::Error> {
17562 let _response = fidl::client::decode_transaction_body::<
17563 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
17564 fidl::encoding::DefaultFuchsiaResourceDialect,
17565 0x176eb318f64ec23,
17566 >(_buf?)?
17567 .into_result::<SymlinkMarker>("get_flags")?;
17568 Ok(_response.map(|x| x.flags))
17569 }
17570 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
17571 (),
17572 0x176eb318f64ec23,
17573 fidl::encoding::DynamicFlags::FLEXIBLE,
17574 _decode,
17575 )
17576 }
17577
17578 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
17579 NodeSetFlagsResult,
17580 fidl::encoding::DefaultFuchsiaResourceDialect,
17581 >;
17582 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
17583 fn _decode(
17584 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17585 ) -> Result<NodeSetFlagsResult, fidl::Error> {
17586 let _response = fidl::client::decode_transaction_body::<
17587 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
17588 fidl::encoding::DefaultFuchsiaResourceDialect,
17589 0x55a8028685791ea8,
17590 >(_buf?)?
17591 .into_result::<SymlinkMarker>("set_flags")?;
17592 Ok(_response.map(|x| x))
17593 }
17594 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
17595 (flags,),
17596 0x55a8028685791ea8,
17597 fidl::encoding::DynamicFlags::FLEXIBLE,
17598 _decode,
17599 )
17600 }
17601
17602 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
17603 (i32, Option<Box<FilesystemInfo>>),
17604 fidl::encoding::DefaultFuchsiaResourceDialect,
17605 >;
17606 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
17607 fn _decode(
17608 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17609 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
17610 let _response = fidl::client::decode_transaction_body::<
17611 NodeQueryFilesystemResponse,
17612 fidl::encoding::DefaultFuchsiaResourceDialect,
17613 0x6f344a1c6b0a0610,
17614 >(_buf?)?;
17615 Ok((_response.s, _response.info))
17616 }
17617 self.client.send_query_and_decode::<
17618 fidl::encoding::EmptyPayload,
17619 (i32, Option<Box<FilesystemInfo>>),
17620 >(
17621 (),
17622 0x6f344a1c6b0a0610,
17623 fidl::encoding::DynamicFlags::empty(),
17624 _decode,
17625 )
17626 }
17627
17628 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
17629 NodeGetAttributesResult,
17630 fidl::encoding::DefaultFuchsiaResourceDialect,
17631 >;
17632 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
17633 fn _decode(
17634 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17635 ) -> Result<NodeGetAttributesResult, fidl::Error> {
17636 let _response = fidl::client::decode_transaction_body::<
17637 fidl::encoding::ResultType<NodeAttributes2, i32>,
17638 fidl::encoding::DefaultFuchsiaResourceDialect,
17639 0x3d4396a638ea053b,
17640 >(_buf?)?;
17641 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
17642 }
17643 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
17644 (query,),
17645 0x3d4396a638ea053b,
17646 fidl::encoding::DynamicFlags::empty(),
17647 _decode,
17648 )
17649 }
17650
17651 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
17652 NodeUpdateAttributesResult,
17653 fidl::encoding::DefaultFuchsiaResourceDialect,
17654 >;
17655 fn r#update_attributes(
17656 &self,
17657 mut payload: &MutableNodeAttributes,
17658 ) -> Self::UpdateAttributesResponseFut {
17659 fn _decode(
17660 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17661 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
17662 let _response = fidl::client::decode_transaction_body::<
17663 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17664 fidl::encoding::DefaultFuchsiaResourceDialect,
17665 0x3308c1da5a89bf08,
17666 >(_buf?)?;
17667 Ok(_response.map(|x| x))
17668 }
17669 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
17670 payload,
17671 0x3308c1da5a89bf08,
17672 fidl::encoding::DynamicFlags::empty(),
17673 _decode,
17674 )
17675 }
17676
17677 type SyncResponseFut = fidl::client::QueryResponseFut<
17678 NodeSyncResult,
17679 fidl::encoding::DefaultFuchsiaResourceDialect,
17680 >;
17681 fn r#sync(&self) -> Self::SyncResponseFut {
17682 fn _decode(
17683 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17684 ) -> Result<NodeSyncResult, fidl::Error> {
17685 let _response = fidl::client::decode_transaction_body::<
17686 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17687 fidl::encoding::DefaultFuchsiaResourceDialect,
17688 0x2c5c27ca0ab5dc49,
17689 >(_buf?)?;
17690 Ok(_response.map(|x| x))
17691 }
17692 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
17693 (),
17694 0x2c5c27ca0ab5dc49,
17695 fidl::encoding::DynamicFlags::empty(),
17696 _decode,
17697 )
17698 }
17699
17700 fn r#list_extended_attributes(
17701 &self,
17702 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17703 ) -> Result<(), fidl::Error> {
17704 self.client.send::<NodeListExtendedAttributesRequest>(
17705 (iterator,),
17706 0x4b61033de007fcd0,
17707 fidl::encoding::DynamicFlags::empty(),
17708 )
17709 }
17710
17711 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17712 NodeGetExtendedAttributeResult,
17713 fidl::encoding::DefaultFuchsiaResourceDialect,
17714 >;
17715 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
17716 fn _decode(
17717 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17718 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
17719 let _response = fidl::client::decode_transaction_body::<
17720 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
17721 fidl::encoding::DefaultFuchsiaResourceDialect,
17722 0x45ffa3ccfdeb76db,
17723 >(_buf?)?;
17724 Ok(_response.map(|x| x))
17725 }
17726 self.client.send_query_and_decode::<
17727 NodeGetExtendedAttributeRequest,
17728 NodeGetExtendedAttributeResult,
17729 >(
17730 (name,),
17731 0x45ffa3ccfdeb76db,
17732 fidl::encoding::DynamicFlags::empty(),
17733 _decode,
17734 )
17735 }
17736
17737 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17738 NodeSetExtendedAttributeResult,
17739 fidl::encoding::DefaultFuchsiaResourceDialect,
17740 >;
17741 fn r#set_extended_attribute(
17742 &self,
17743 mut name: &[u8],
17744 mut value: ExtendedAttributeValue,
17745 mut mode: SetExtendedAttributeMode,
17746 ) -> Self::SetExtendedAttributeResponseFut {
17747 fn _decode(
17748 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17749 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
17750 let _response = fidl::client::decode_transaction_body::<
17751 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17752 fidl::encoding::DefaultFuchsiaResourceDialect,
17753 0x4a951362f681f23c,
17754 >(_buf?)?;
17755 Ok(_response.map(|x| x))
17756 }
17757 self.client.send_query_and_decode::<
17758 NodeSetExtendedAttributeRequest,
17759 NodeSetExtendedAttributeResult,
17760 >(
17761 (name, &mut value, mode,),
17762 0x4a951362f681f23c,
17763 fidl::encoding::DynamicFlags::empty(),
17764 _decode,
17765 )
17766 }
17767
17768 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17769 NodeRemoveExtendedAttributeResult,
17770 fidl::encoding::DefaultFuchsiaResourceDialect,
17771 >;
17772 fn r#remove_extended_attribute(
17773 &self,
17774 mut name: &[u8],
17775 ) -> Self::RemoveExtendedAttributeResponseFut {
17776 fn _decode(
17777 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17778 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
17779 let _response = fidl::client::decode_transaction_body::<
17780 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17781 fidl::encoding::DefaultFuchsiaResourceDialect,
17782 0x7a0b9f3a9bf9032d,
17783 >(_buf?)?;
17784 Ok(_response.map(|x| x))
17785 }
17786 self.client.send_query_and_decode::<
17787 NodeRemoveExtendedAttributeRequest,
17788 NodeRemoveExtendedAttributeResult,
17789 >(
17790 (name,),
17791 0x7a0b9f3a9bf9032d,
17792 fidl::encoding::DynamicFlags::empty(),
17793 _decode,
17794 )
17795 }
17796
17797 type DescribeResponseFut =
17798 fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
17799 fn r#describe(&self) -> Self::DescribeResponseFut {
17800 fn _decode(
17801 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17802 ) -> Result<SymlinkInfo, fidl::Error> {
17803 let _response = fidl::client::decode_transaction_body::<
17804 fidl::encoding::FlexibleType<SymlinkInfo>,
17805 fidl::encoding::DefaultFuchsiaResourceDialect,
17806 0x742c2ea5e89831f3,
17807 >(_buf?)?
17808 .into_result::<SymlinkMarker>("describe")?;
17809 Ok(_response)
17810 }
17811 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
17812 (),
17813 0x742c2ea5e89831f3,
17814 fidl::encoding::DynamicFlags::FLEXIBLE,
17815 _decode,
17816 )
17817 }
17818}
17819
17820pub struct SymlinkEventStream {
17821 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
17822}
17823
17824impl std::marker::Unpin for SymlinkEventStream {}
17825
17826impl futures::stream::FusedStream for SymlinkEventStream {
17827 fn is_terminated(&self) -> bool {
17828 self.event_receiver.is_terminated()
17829 }
17830}
17831
17832impl futures::Stream for SymlinkEventStream {
17833 type Item = Result<SymlinkEvent, fidl::Error>;
17834
17835 fn poll_next(
17836 mut self: std::pin::Pin<&mut Self>,
17837 cx: &mut std::task::Context<'_>,
17838 ) -> std::task::Poll<Option<Self::Item>> {
17839 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
17840 &mut self.event_receiver,
17841 cx
17842 )?) {
17843 Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
17844 None => std::task::Poll::Ready(None),
17845 }
17846 }
17847}
17848
17849#[derive(Debug)]
17850pub enum SymlinkEvent {
17851 OnOpen_ {
17852 s: i32,
17853 info: Option<Box<NodeInfoDeprecated>>,
17854 },
17855 OnRepresentation {
17856 payload: Representation,
17857 },
17858 #[non_exhaustive]
17859 _UnknownEvent {
17860 ordinal: u64,
17862 },
17863}
17864
17865impl SymlinkEvent {
17866 #[allow(irrefutable_let_patterns)]
17867 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
17868 if let SymlinkEvent::OnOpen_ { s, info } = self {
17869 Some((s, info))
17870 } else {
17871 None
17872 }
17873 }
17874 #[allow(irrefutable_let_patterns)]
17875 pub fn into_on_representation(self) -> Option<Representation> {
17876 if let SymlinkEvent::OnRepresentation { payload } = self {
17877 Some((payload))
17878 } else {
17879 None
17880 }
17881 }
17882
17883 fn decode(
17885 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
17886 ) -> Result<SymlinkEvent, fidl::Error> {
17887 let (bytes, _handles) = buf.split_mut();
17888 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17889 debug_assert_eq!(tx_header.tx_id, 0);
17890 match tx_header.ordinal {
17891 0x7fc7bbb1dbfd1972 => {
17892 let mut out = fidl::new_empty!(
17893 NodeOnOpenRequest,
17894 fidl::encoding::DefaultFuchsiaResourceDialect
17895 );
17896 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
17897 Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
17898 }
17899 0x5cb40567d80a510c => {
17900 let mut out =
17901 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
17902 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
17903 Ok((SymlinkEvent::OnRepresentation { payload: out }))
17904 }
17905 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
17906 Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
17907 }
17908 _ => Err(fidl::Error::UnknownOrdinal {
17909 ordinal: tx_header.ordinal,
17910 protocol_name: <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
17911 }),
17912 }
17913 }
17914}
17915
17916pub struct SymlinkRequestStream {
17918 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
17919 is_terminated: bool,
17920}
17921
17922impl std::marker::Unpin for SymlinkRequestStream {}
17923
17924impl futures::stream::FusedStream for SymlinkRequestStream {
17925 fn is_terminated(&self) -> bool {
17926 self.is_terminated
17927 }
17928}
17929
17930impl fidl::endpoints::RequestStream for SymlinkRequestStream {
17931 type Protocol = SymlinkMarker;
17932 type ControlHandle = SymlinkControlHandle;
17933
17934 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
17935 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
17936 }
17937
17938 fn control_handle(&self) -> Self::ControlHandle {
17939 SymlinkControlHandle { inner: self.inner.clone() }
17940 }
17941
17942 fn into_inner(
17943 self,
17944 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
17945 {
17946 (self.inner, self.is_terminated)
17947 }
17948
17949 fn from_inner(
17950 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
17951 is_terminated: bool,
17952 ) -> Self {
17953 Self { inner, is_terminated }
17954 }
17955}
17956
17957impl futures::Stream for SymlinkRequestStream {
17958 type Item = Result<SymlinkRequest, fidl::Error>;
17959
17960 fn poll_next(
17961 mut self: std::pin::Pin<&mut Self>,
17962 cx: &mut std::task::Context<'_>,
17963 ) -> std::task::Poll<Option<Self::Item>> {
17964 let this = &mut *self;
17965 if this.inner.check_shutdown(cx) {
17966 this.is_terminated = true;
17967 return std::task::Poll::Ready(None);
17968 }
17969 if this.is_terminated {
17970 panic!("polled SymlinkRequestStream after completion");
17971 }
17972 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
17973 |bytes, handles| {
17974 match this.inner.channel().read_etc(cx, bytes, handles) {
17975 std::task::Poll::Ready(Ok(())) => {}
17976 std::task::Poll::Pending => return std::task::Poll::Pending,
17977 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
17978 this.is_terminated = true;
17979 return std::task::Poll::Ready(None);
17980 }
17981 std::task::Poll::Ready(Err(e)) => {
17982 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
17983 e.into(),
17984 ))))
17985 }
17986 }
17987
17988 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17990
17991 std::task::Poll::Ready(Some(match header.ordinal {
17992 0x54f3949246a03e74 => {
17993 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17994 let mut req = fidl::new_empty!(
17995 LinkableLinkIntoRequest,
17996 fidl::encoding::DefaultFuchsiaResourceDialect
17997 );
17998 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
17999 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18000 Ok(SymlinkRequest::LinkInto {
18001 dst_parent_token: req.dst_parent_token,
18002 dst: req.dst,
18003
18004 responder: SymlinkLinkIntoResponder {
18005 control_handle: std::mem::ManuallyDrop::new(control_handle),
18006 tx_id: header.tx_id,
18007 },
18008 })
18009 }
18010 0x20d8a7aba2168a79 => {
18011 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18012 let mut req = fidl::new_empty!(
18013 fidl_fuchsia_unknown::CloneableCloneRequest,
18014 fidl::encoding::DefaultFuchsiaResourceDialect
18015 );
18016 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
18017 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18018 Ok(SymlinkRequest::Clone { request: req.request, control_handle })
18019 }
18020 0x5ac5d459ad7f657e => {
18021 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18022 let mut req = fidl::new_empty!(
18023 fidl::encoding::EmptyPayload,
18024 fidl::encoding::DefaultFuchsiaResourceDialect
18025 );
18026 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18027 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18028 Ok(SymlinkRequest::Close {
18029 responder: SymlinkCloseResponder {
18030 control_handle: std::mem::ManuallyDrop::new(control_handle),
18031 tx_id: header.tx_id,
18032 },
18033 })
18034 }
18035 0x2658edee9decfc06 => {
18036 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18037 let mut req = fidl::new_empty!(
18038 fidl::encoding::EmptyPayload,
18039 fidl::encoding::DefaultFuchsiaResourceDialect
18040 );
18041 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18042 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18043 Ok(SymlinkRequest::Query {
18044 responder: SymlinkQueryResponder {
18045 control_handle: std::mem::ManuallyDrop::new(control_handle),
18046 tx_id: header.tx_id,
18047 },
18048 })
18049 }
18050 0x5a61678f293ce16f => {
18051 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18052 let mut req = fidl::new_empty!(
18053 NodeDeprecatedCloneRequest,
18054 fidl::encoding::DefaultFuchsiaResourceDialect
18055 );
18056 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
18057 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18058 Ok(SymlinkRequest::DeprecatedClone {
18059 flags: req.flags,
18060 object: req.object,
18061
18062 control_handle,
18063 })
18064 }
18065 0x78985e216314dafd => {
18066 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18067 let mut req = fidl::new_empty!(
18068 fidl::encoding::EmptyPayload,
18069 fidl::encoding::DefaultFuchsiaResourceDialect
18070 );
18071 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18072 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18073 Ok(SymlinkRequest::DeprecatedGetAttr {
18074 responder: SymlinkDeprecatedGetAttrResponder {
18075 control_handle: std::mem::ManuallyDrop::new(control_handle),
18076 tx_id: header.tx_id,
18077 },
18078 })
18079 }
18080 0x4186c0f40d938f46 => {
18081 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18082 let mut req = fidl::new_empty!(
18083 NodeDeprecatedSetAttrRequest,
18084 fidl::encoding::DefaultFuchsiaResourceDialect
18085 );
18086 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
18087 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18088 Ok(SymlinkRequest::DeprecatedSetAttr {
18089 flags: req.flags,
18090 attributes: req.attributes,
18091
18092 responder: SymlinkDeprecatedSetAttrResponder {
18093 control_handle: std::mem::ManuallyDrop::new(control_handle),
18094 tx_id: header.tx_id,
18095 },
18096 })
18097 }
18098 0x5b88fffb8eda3aa1 => {
18099 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18100 let mut req = fidl::new_empty!(
18101 fidl::encoding::EmptyPayload,
18102 fidl::encoding::DefaultFuchsiaResourceDialect
18103 );
18104 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18105 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18106 Ok(SymlinkRequest::DeprecatedGetFlags {
18107 responder: SymlinkDeprecatedGetFlagsResponder {
18108 control_handle: std::mem::ManuallyDrop::new(control_handle),
18109 tx_id: header.tx_id,
18110 },
18111 })
18112 }
18113 0x5295b76c71fde733 => {
18114 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18115 let mut req = fidl::new_empty!(
18116 NodeDeprecatedSetFlagsRequest,
18117 fidl::encoding::DefaultFuchsiaResourceDialect
18118 );
18119 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
18120 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18121 Ok(SymlinkRequest::DeprecatedSetFlags {
18122 flags: req.flags,
18123
18124 responder: SymlinkDeprecatedSetFlagsResponder {
18125 control_handle: std::mem::ManuallyDrop::new(control_handle),
18126 tx_id: header.tx_id,
18127 },
18128 })
18129 }
18130 0x176eb318f64ec23 => {
18131 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18132 let mut req = fidl::new_empty!(
18133 fidl::encoding::EmptyPayload,
18134 fidl::encoding::DefaultFuchsiaResourceDialect
18135 );
18136 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18137 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18138 Ok(SymlinkRequest::GetFlags {
18139 responder: SymlinkGetFlagsResponder {
18140 control_handle: std::mem::ManuallyDrop::new(control_handle),
18141 tx_id: header.tx_id,
18142 },
18143 })
18144 }
18145 0x55a8028685791ea8 => {
18146 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18147 let mut req = fidl::new_empty!(
18148 NodeSetFlagsRequest,
18149 fidl::encoding::DefaultFuchsiaResourceDialect
18150 );
18151 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
18152 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18153 Ok(SymlinkRequest::SetFlags {
18154 flags: req.flags,
18155
18156 responder: SymlinkSetFlagsResponder {
18157 control_handle: std::mem::ManuallyDrop::new(control_handle),
18158 tx_id: header.tx_id,
18159 },
18160 })
18161 }
18162 0x6f344a1c6b0a0610 => {
18163 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18164 let mut req = fidl::new_empty!(
18165 fidl::encoding::EmptyPayload,
18166 fidl::encoding::DefaultFuchsiaResourceDialect
18167 );
18168 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18169 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18170 Ok(SymlinkRequest::QueryFilesystem {
18171 responder: SymlinkQueryFilesystemResponder {
18172 control_handle: std::mem::ManuallyDrop::new(control_handle),
18173 tx_id: header.tx_id,
18174 },
18175 })
18176 }
18177 0x3d4396a638ea053b => {
18178 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18179 let mut req = fidl::new_empty!(
18180 NodeGetAttributesRequest,
18181 fidl::encoding::DefaultFuchsiaResourceDialect
18182 );
18183 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
18184 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18185 Ok(SymlinkRequest::GetAttributes {
18186 query: req.query,
18187
18188 responder: SymlinkGetAttributesResponder {
18189 control_handle: std::mem::ManuallyDrop::new(control_handle),
18190 tx_id: header.tx_id,
18191 },
18192 })
18193 }
18194 0x3308c1da5a89bf08 => {
18195 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18196 let mut req = fidl::new_empty!(
18197 MutableNodeAttributes,
18198 fidl::encoding::DefaultFuchsiaResourceDialect
18199 );
18200 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
18201 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18202 Ok(SymlinkRequest::UpdateAttributes {
18203 payload: req,
18204 responder: SymlinkUpdateAttributesResponder {
18205 control_handle: std::mem::ManuallyDrop::new(control_handle),
18206 tx_id: header.tx_id,
18207 },
18208 })
18209 }
18210 0x2c5c27ca0ab5dc49 => {
18211 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18212 let mut req = fidl::new_empty!(
18213 fidl::encoding::EmptyPayload,
18214 fidl::encoding::DefaultFuchsiaResourceDialect
18215 );
18216 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18217 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18218 Ok(SymlinkRequest::Sync {
18219 responder: SymlinkSyncResponder {
18220 control_handle: std::mem::ManuallyDrop::new(control_handle),
18221 tx_id: header.tx_id,
18222 },
18223 })
18224 }
18225 0x4b61033de007fcd0 => {
18226 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18227 let mut req = fidl::new_empty!(
18228 NodeListExtendedAttributesRequest,
18229 fidl::encoding::DefaultFuchsiaResourceDialect
18230 );
18231 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
18232 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18233 Ok(SymlinkRequest::ListExtendedAttributes {
18234 iterator: req.iterator,
18235
18236 control_handle,
18237 })
18238 }
18239 0x45ffa3ccfdeb76db => {
18240 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18241 let mut req = fidl::new_empty!(
18242 NodeGetExtendedAttributeRequest,
18243 fidl::encoding::DefaultFuchsiaResourceDialect
18244 );
18245 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18246 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18247 Ok(SymlinkRequest::GetExtendedAttribute {
18248 name: req.name,
18249
18250 responder: SymlinkGetExtendedAttributeResponder {
18251 control_handle: std::mem::ManuallyDrop::new(control_handle),
18252 tx_id: header.tx_id,
18253 },
18254 })
18255 }
18256 0x4a951362f681f23c => {
18257 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18258 let mut req = fidl::new_empty!(
18259 NodeSetExtendedAttributeRequest,
18260 fidl::encoding::DefaultFuchsiaResourceDialect
18261 );
18262 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18263 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18264 Ok(SymlinkRequest::SetExtendedAttribute {
18265 name: req.name,
18266 value: req.value,
18267 mode: req.mode,
18268
18269 responder: SymlinkSetExtendedAttributeResponder {
18270 control_handle: std::mem::ManuallyDrop::new(control_handle),
18271 tx_id: header.tx_id,
18272 },
18273 })
18274 }
18275 0x7a0b9f3a9bf9032d => {
18276 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18277 let mut req = fidl::new_empty!(
18278 NodeRemoveExtendedAttributeRequest,
18279 fidl::encoding::DefaultFuchsiaResourceDialect
18280 );
18281 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18282 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18283 Ok(SymlinkRequest::RemoveExtendedAttribute {
18284 name: req.name,
18285
18286 responder: SymlinkRemoveExtendedAttributeResponder {
18287 control_handle: std::mem::ManuallyDrop::new(control_handle),
18288 tx_id: header.tx_id,
18289 },
18290 })
18291 }
18292 0x742c2ea5e89831f3 => {
18293 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18294 let mut req = fidl::new_empty!(
18295 fidl::encoding::EmptyPayload,
18296 fidl::encoding::DefaultFuchsiaResourceDialect
18297 );
18298 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18299 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18300 Ok(SymlinkRequest::Describe {
18301 responder: SymlinkDescribeResponder {
18302 control_handle: std::mem::ManuallyDrop::new(control_handle),
18303 tx_id: header.tx_id,
18304 },
18305 })
18306 }
18307 _ if header.tx_id == 0
18308 && header
18309 .dynamic_flags()
18310 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
18311 {
18312 Ok(SymlinkRequest::_UnknownMethod {
18313 ordinal: header.ordinal,
18314 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
18315 method_type: fidl::MethodType::OneWay,
18316 })
18317 }
18318 _ if header
18319 .dynamic_flags()
18320 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
18321 {
18322 this.inner.send_framework_err(
18323 fidl::encoding::FrameworkErr::UnknownMethod,
18324 header.tx_id,
18325 header.ordinal,
18326 header.dynamic_flags(),
18327 (bytes, handles),
18328 )?;
18329 Ok(SymlinkRequest::_UnknownMethod {
18330 ordinal: header.ordinal,
18331 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
18332 method_type: fidl::MethodType::TwoWay,
18333 })
18334 }
18335 _ => Err(fidl::Error::UnknownOrdinal {
18336 ordinal: header.ordinal,
18337 protocol_name:
18338 <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
18339 }),
18340 }))
18341 },
18342 )
18343 }
18344}
18345
18346#[derive(Debug)]
18348pub enum SymlinkRequest {
18349 LinkInto {
18372 dst_parent_token: fidl::Event,
18373 dst: String,
18374 responder: SymlinkLinkIntoResponder,
18375 },
18376 Clone {
18377 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
18378 control_handle: SymlinkControlHandle,
18379 },
18380 Close {
18391 responder: SymlinkCloseResponder,
18392 },
18393 Query {
18394 responder: SymlinkQueryResponder,
18395 },
18396 DeprecatedClone {
18398 flags: OpenFlags,
18399 object: fidl::endpoints::ServerEnd<NodeMarker>,
18400 control_handle: SymlinkControlHandle,
18401 },
18402 DeprecatedGetAttr {
18404 responder: SymlinkDeprecatedGetAttrResponder,
18405 },
18406 DeprecatedSetAttr {
18408 flags: NodeAttributeFlags,
18409 attributes: NodeAttributes,
18410 responder: SymlinkDeprecatedSetAttrResponder,
18411 },
18412 DeprecatedGetFlags {
18414 responder: SymlinkDeprecatedGetFlagsResponder,
18415 },
18416 DeprecatedSetFlags {
18418 flags: OpenFlags,
18419 responder: SymlinkDeprecatedSetFlagsResponder,
18420 },
18421 GetFlags {
18430 responder: SymlinkGetFlagsResponder,
18431 },
18432 SetFlags {
18442 flags: Flags,
18443 responder: SymlinkSetFlagsResponder,
18444 },
18445 QueryFilesystem {
18447 responder: SymlinkQueryFilesystemResponder,
18448 },
18449 GetAttributes {
18463 query: NodeAttributesQuery,
18464 responder: SymlinkGetAttributesResponder,
18465 },
18466 UpdateAttributes {
18475 payload: MutableNodeAttributes,
18476 responder: SymlinkUpdateAttributesResponder,
18477 },
18478 Sync {
18488 responder: SymlinkSyncResponder,
18489 },
18490 ListExtendedAttributes {
18499 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
18500 control_handle: SymlinkControlHandle,
18501 },
18502 GetExtendedAttribute {
18509 name: Vec<u8>,
18510 responder: SymlinkGetExtendedAttributeResponder,
18511 },
18512 SetExtendedAttribute {
18520 name: Vec<u8>,
18521 value: ExtendedAttributeValue,
18522 mode: SetExtendedAttributeMode,
18523 responder: SymlinkSetExtendedAttributeResponder,
18524 },
18525 RemoveExtendedAttribute {
18531 name: Vec<u8>,
18532 responder: SymlinkRemoveExtendedAttributeResponder,
18533 },
18534 Describe {
18535 responder: SymlinkDescribeResponder,
18536 },
18537 #[non_exhaustive]
18539 _UnknownMethod {
18540 ordinal: u64,
18542 control_handle: SymlinkControlHandle,
18543 method_type: fidl::MethodType,
18544 },
18545}
18546
18547impl SymlinkRequest {
18548 #[allow(irrefutable_let_patterns)]
18549 pub fn into_link_into(self) -> Option<(fidl::Event, String, SymlinkLinkIntoResponder)> {
18550 if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
18551 Some((dst_parent_token, dst, responder))
18552 } else {
18553 None
18554 }
18555 }
18556
18557 #[allow(irrefutable_let_patterns)]
18558 pub fn into_clone(
18559 self,
18560 ) -> Option<(
18561 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
18562 SymlinkControlHandle,
18563 )> {
18564 if let SymlinkRequest::Clone { request, control_handle } = self {
18565 Some((request, control_handle))
18566 } else {
18567 None
18568 }
18569 }
18570
18571 #[allow(irrefutable_let_patterns)]
18572 pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
18573 if let SymlinkRequest::Close { responder } = self {
18574 Some((responder))
18575 } else {
18576 None
18577 }
18578 }
18579
18580 #[allow(irrefutable_let_patterns)]
18581 pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
18582 if let SymlinkRequest::Query { responder } = self {
18583 Some((responder))
18584 } else {
18585 None
18586 }
18587 }
18588
18589 #[allow(irrefutable_let_patterns)]
18590 pub fn into_deprecated_clone(
18591 self,
18592 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, SymlinkControlHandle)> {
18593 if let SymlinkRequest::DeprecatedClone { flags, object, control_handle } = self {
18594 Some((flags, object, control_handle))
18595 } else {
18596 None
18597 }
18598 }
18599
18600 #[allow(irrefutable_let_patterns)]
18601 pub fn into_deprecated_get_attr(self) -> Option<(SymlinkDeprecatedGetAttrResponder)> {
18602 if let SymlinkRequest::DeprecatedGetAttr { responder } = self {
18603 Some((responder))
18604 } else {
18605 None
18606 }
18607 }
18608
18609 #[allow(irrefutable_let_patterns)]
18610 pub fn into_deprecated_set_attr(
18611 self,
18612 ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
18613 if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
18614 Some((flags, attributes, responder))
18615 } else {
18616 None
18617 }
18618 }
18619
18620 #[allow(irrefutable_let_patterns)]
18621 pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
18622 if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
18623 Some((responder))
18624 } else {
18625 None
18626 }
18627 }
18628
18629 #[allow(irrefutable_let_patterns)]
18630 pub fn into_deprecated_set_flags(
18631 self,
18632 ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
18633 if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
18634 Some((flags, responder))
18635 } else {
18636 None
18637 }
18638 }
18639
18640 #[allow(irrefutable_let_patterns)]
18641 pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
18642 if let SymlinkRequest::GetFlags { responder } = self {
18643 Some((responder))
18644 } else {
18645 None
18646 }
18647 }
18648
18649 #[allow(irrefutable_let_patterns)]
18650 pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
18651 if let SymlinkRequest::SetFlags { flags, responder } = self {
18652 Some((flags, responder))
18653 } else {
18654 None
18655 }
18656 }
18657
18658 #[allow(irrefutable_let_patterns)]
18659 pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
18660 if let SymlinkRequest::QueryFilesystem { responder } = self {
18661 Some((responder))
18662 } else {
18663 None
18664 }
18665 }
18666
18667 #[allow(irrefutable_let_patterns)]
18668 pub fn into_get_attributes(
18669 self,
18670 ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
18671 if let SymlinkRequest::GetAttributes { query, responder } = self {
18672 Some((query, responder))
18673 } else {
18674 None
18675 }
18676 }
18677
18678 #[allow(irrefutable_let_patterns)]
18679 pub fn into_update_attributes(
18680 self,
18681 ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
18682 if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
18683 Some((payload, responder))
18684 } else {
18685 None
18686 }
18687 }
18688
18689 #[allow(irrefutable_let_patterns)]
18690 pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
18691 if let SymlinkRequest::Sync { responder } = self {
18692 Some((responder))
18693 } else {
18694 None
18695 }
18696 }
18697
18698 #[allow(irrefutable_let_patterns)]
18699 pub fn into_list_extended_attributes(
18700 self,
18701 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, SymlinkControlHandle)>
18702 {
18703 if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
18704 Some((iterator, control_handle))
18705 } else {
18706 None
18707 }
18708 }
18709
18710 #[allow(irrefutable_let_patterns)]
18711 pub fn into_get_extended_attribute(
18712 self,
18713 ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
18714 if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
18715 Some((name, responder))
18716 } else {
18717 None
18718 }
18719 }
18720
18721 #[allow(irrefutable_let_patterns)]
18722 pub fn into_set_extended_attribute(
18723 self,
18724 ) -> Option<(
18725 Vec<u8>,
18726 ExtendedAttributeValue,
18727 SetExtendedAttributeMode,
18728 SymlinkSetExtendedAttributeResponder,
18729 )> {
18730 if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
18731 Some((name, value, mode, responder))
18732 } else {
18733 None
18734 }
18735 }
18736
18737 #[allow(irrefutable_let_patterns)]
18738 pub fn into_remove_extended_attribute(
18739 self,
18740 ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
18741 if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
18742 Some((name, responder))
18743 } else {
18744 None
18745 }
18746 }
18747
18748 #[allow(irrefutable_let_patterns)]
18749 pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
18750 if let SymlinkRequest::Describe { responder } = self {
18751 Some((responder))
18752 } else {
18753 None
18754 }
18755 }
18756
18757 pub fn method_name(&self) -> &'static str {
18759 match *self {
18760 SymlinkRequest::LinkInto { .. } => "link_into",
18761 SymlinkRequest::Clone { .. } => "clone",
18762 SymlinkRequest::Close { .. } => "close",
18763 SymlinkRequest::Query { .. } => "query",
18764 SymlinkRequest::DeprecatedClone { .. } => "deprecated_clone",
18765 SymlinkRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
18766 SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
18767 SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
18768 SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
18769 SymlinkRequest::GetFlags { .. } => "get_flags",
18770 SymlinkRequest::SetFlags { .. } => "set_flags",
18771 SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
18772 SymlinkRequest::GetAttributes { .. } => "get_attributes",
18773 SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
18774 SymlinkRequest::Sync { .. } => "sync",
18775 SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
18776 SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
18777 SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
18778 SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
18779 SymlinkRequest::Describe { .. } => "describe",
18780 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
18781 "unknown one-way method"
18782 }
18783 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
18784 "unknown two-way method"
18785 }
18786 }
18787 }
18788}
18789
18790#[derive(Debug, Clone)]
18791pub struct SymlinkControlHandle {
18792 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
18793}
18794
18795impl fidl::endpoints::ControlHandle for SymlinkControlHandle {
18796 fn shutdown(&self) {
18797 self.inner.shutdown()
18798 }
18799 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
18800 self.inner.shutdown_with_epitaph(status)
18801 }
18802
18803 fn is_closed(&self) -> bool {
18804 self.inner.channel().is_closed()
18805 }
18806 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
18807 self.inner.channel().on_closed()
18808 }
18809
18810 #[cfg(target_os = "fuchsia")]
18811 fn signal_peer(
18812 &self,
18813 clear_mask: zx::Signals,
18814 set_mask: zx::Signals,
18815 ) -> Result<(), zx_status::Status> {
18816 use fidl::Peered;
18817 self.inner.channel().signal_peer(clear_mask, set_mask)
18818 }
18819}
18820
18821impl SymlinkControlHandle {
18822 pub fn send_on_open_(
18823 &self,
18824 mut s: i32,
18825 mut info: Option<NodeInfoDeprecated>,
18826 ) -> Result<(), fidl::Error> {
18827 self.inner.send::<NodeOnOpenRequest>(
18828 (s, info.as_mut()),
18829 0,
18830 0x7fc7bbb1dbfd1972,
18831 fidl::encoding::DynamicFlags::empty(),
18832 )
18833 }
18834
18835 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
18836 self.inner.send::<Representation>(
18837 &mut payload,
18838 0,
18839 0x5cb40567d80a510c,
18840 fidl::encoding::DynamicFlags::empty(),
18841 )
18842 }
18843}
18844
18845#[must_use = "FIDL methods require a response to be sent"]
18846#[derive(Debug)]
18847pub struct SymlinkLinkIntoResponder {
18848 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18849 tx_id: u32,
18850}
18851
18852impl std::ops::Drop for SymlinkLinkIntoResponder {
18856 fn drop(&mut self) {
18857 self.control_handle.shutdown();
18858 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18860 }
18861}
18862
18863impl fidl::endpoints::Responder for SymlinkLinkIntoResponder {
18864 type ControlHandle = SymlinkControlHandle;
18865
18866 fn control_handle(&self) -> &SymlinkControlHandle {
18867 &self.control_handle
18868 }
18869
18870 fn drop_without_shutdown(mut self) {
18871 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18873 std::mem::forget(self);
18875 }
18876}
18877
18878impl SymlinkLinkIntoResponder {
18879 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18883 let _result = self.send_raw(result);
18884 if _result.is_err() {
18885 self.control_handle.shutdown();
18886 }
18887 self.drop_without_shutdown();
18888 _result
18889 }
18890
18891 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18893 let _result = self.send_raw(result);
18894 self.drop_without_shutdown();
18895 _result
18896 }
18897
18898 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18899 self.control_handle
18900 .inner
18901 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
18902 result,
18903 self.tx_id,
18904 0x54f3949246a03e74,
18905 fidl::encoding::DynamicFlags::empty(),
18906 )
18907 }
18908}
18909
18910#[must_use = "FIDL methods require a response to be sent"]
18911#[derive(Debug)]
18912pub struct SymlinkCloseResponder {
18913 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18914 tx_id: u32,
18915}
18916
18917impl std::ops::Drop for SymlinkCloseResponder {
18921 fn drop(&mut self) {
18922 self.control_handle.shutdown();
18923 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18925 }
18926}
18927
18928impl fidl::endpoints::Responder for SymlinkCloseResponder {
18929 type ControlHandle = SymlinkControlHandle;
18930
18931 fn control_handle(&self) -> &SymlinkControlHandle {
18932 &self.control_handle
18933 }
18934
18935 fn drop_without_shutdown(mut self) {
18936 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18938 std::mem::forget(self);
18940 }
18941}
18942
18943impl SymlinkCloseResponder {
18944 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18948 let _result = self.send_raw(result);
18949 if _result.is_err() {
18950 self.control_handle.shutdown();
18951 }
18952 self.drop_without_shutdown();
18953 _result
18954 }
18955
18956 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18958 let _result = self.send_raw(result);
18959 self.drop_without_shutdown();
18960 _result
18961 }
18962
18963 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18964 self.control_handle
18965 .inner
18966 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
18967 result,
18968 self.tx_id,
18969 0x5ac5d459ad7f657e,
18970 fidl::encoding::DynamicFlags::empty(),
18971 )
18972 }
18973}
18974
18975#[must_use = "FIDL methods require a response to be sent"]
18976#[derive(Debug)]
18977pub struct SymlinkQueryResponder {
18978 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18979 tx_id: u32,
18980}
18981
18982impl std::ops::Drop for SymlinkQueryResponder {
18986 fn drop(&mut self) {
18987 self.control_handle.shutdown();
18988 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18990 }
18991}
18992
18993impl fidl::endpoints::Responder for SymlinkQueryResponder {
18994 type ControlHandle = SymlinkControlHandle;
18995
18996 fn control_handle(&self) -> &SymlinkControlHandle {
18997 &self.control_handle
18998 }
18999
19000 fn drop_without_shutdown(mut self) {
19001 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19003 std::mem::forget(self);
19005 }
19006}
19007
19008impl SymlinkQueryResponder {
19009 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
19013 let _result = self.send_raw(protocol);
19014 if _result.is_err() {
19015 self.control_handle.shutdown();
19016 }
19017 self.drop_without_shutdown();
19018 _result
19019 }
19020
19021 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
19023 let _result = self.send_raw(protocol);
19024 self.drop_without_shutdown();
19025 _result
19026 }
19027
19028 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
19029 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
19030 (protocol,),
19031 self.tx_id,
19032 0x2658edee9decfc06,
19033 fidl::encoding::DynamicFlags::empty(),
19034 )
19035 }
19036}
19037
19038#[must_use = "FIDL methods require a response to be sent"]
19039#[derive(Debug)]
19040pub struct SymlinkDeprecatedGetAttrResponder {
19041 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19042 tx_id: u32,
19043}
19044
19045impl std::ops::Drop for SymlinkDeprecatedGetAttrResponder {
19049 fn drop(&mut self) {
19050 self.control_handle.shutdown();
19051 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19053 }
19054}
19055
19056impl fidl::endpoints::Responder for SymlinkDeprecatedGetAttrResponder {
19057 type ControlHandle = SymlinkControlHandle;
19058
19059 fn control_handle(&self) -> &SymlinkControlHandle {
19060 &self.control_handle
19061 }
19062
19063 fn drop_without_shutdown(mut self) {
19064 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19066 std::mem::forget(self);
19068 }
19069}
19070
19071impl SymlinkDeprecatedGetAttrResponder {
19072 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
19076 let _result = self.send_raw(s, attributes);
19077 if _result.is_err() {
19078 self.control_handle.shutdown();
19079 }
19080 self.drop_without_shutdown();
19081 _result
19082 }
19083
19084 pub fn send_no_shutdown_on_err(
19086 self,
19087 mut s: i32,
19088 mut attributes: &NodeAttributes,
19089 ) -> Result<(), fidl::Error> {
19090 let _result = self.send_raw(s, attributes);
19091 self.drop_without_shutdown();
19092 _result
19093 }
19094
19095 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
19096 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
19097 (s, attributes),
19098 self.tx_id,
19099 0x78985e216314dafd,
19100 fidl::encoding::DynamicFlags::empty(),
19101 )
19102 }
19103}
19104
19105#[must_use = "FIDL methods require a response to be sent"]
19106#[derive(Debug)]
19107pub struct SymlinkDeprecatedSetAttrResponder {
19108 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19109 tx_id: u32,
19110}
19111
19112impl std::ops::Drop for SymlinkDeprecatedSetAttrResponder {
19116 fn drop(&mut self) {
19117 self.control_handle.shutdown();
19118 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19120 }
19121}
19122
19123impl fidl::endpoints::Responder for SymlinkDeprecatedSetAttrResponder {
19124 type ControlHandle = SymlinkControlHandle;
19125
19126 fn control_handle(&self) -> &SymlinkControlHandle {
19127 &self.control_handle
19128 }
19129
19130 fn drop_without_shutdown(mut self) {
19131 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19133 std::mem::forget(self);
19135 }
19136}
19137
19138impl SymlinkDeprecatedSetAttrResponder {
19139 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
19143 let _result = self.send_raw(s);
19144 if _result.is_err() {
19145 self.control_handle.shutdown();
19146 }
19147 self.drop_without_shutdown();
19148 _result
19149 }
19150
19151 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
19153 let _result = self.send_raw(s);
19154 self.drop_without_shutdown();
19155 _result
19156 }
19157
19158 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
19159 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
19160 (s,),
19161 self.tx_id,
19162 0x4186c0f40d938f46,
19163 fidl::encoding::DynamicFlags::empty(),
19164 )
19165 }
19166}
19167
19168#[must_use = "FIDL methods require a response to be sent"]
19169#[derive(Debug)]
19170pub struct SymlinkDeprecatedGetFlagsResponder {
19171 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19172 tx_id: u32,
19173}
19174
19175impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
19179 fn drop(&mut self) {
19180 self.control_handle.shutdown();
19181 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19183 }
19184}
19185
19186impl fidl::endpoints::Responder for SymlinkDeprecatedGetFlagsResponder {
19187 type ControlHandle = SymlinkControlHandle;
19188
19189 fn control_handle(&self) -> &SymlinkControlHandle {
19190 &self.control_handle
19191 }
19192
19193 fn drop_without_shutdown(mut self) {
19194 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19196 std::mem::forget(self);
19198 }
19199}
19200
19201impl SymlinkDeprecatedGetFlagsResponder {
19202 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
19206 let _result = self.send_raw(s, flags);
19207 if _result.is_err() {
19208 self.control_handle.shutdown();
19209 }
19210 self.drop_without_shutdown();
19211 _result
19212 }
19213
19214 pub fn send_no_shutdown_on_err(
19216 self,
19217 mut s: i32,
19218 mut flags: OpenFlags,
19219 ) -> Result<(), fidl::Error> {
19220 let _result = self.send_raw(s, flags);
19221 self.drop_without_shutdown();
19222 _result
19223 }
19224
19225 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
19226 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
19227 (s, flags),
19228 self.tx_id,
19229 0x5b88fffb8eda3aa1,
19230 fidl::encoding::DynamicFlags::empty(),
19231 )
19232 }
19233}
19234
19235#[must_use = "FIDL methods require a response to be sent"]
19236#[derive(Debug)]
19237pub struct SymlinkDeprecatedSetFlagsResponder {
19238 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19239 tx_id: u32,
19240}
19241
19242impl std::ops::Drop for SymlinkDeprecatedSetFlagsResponder {
19246 fn drop(&mut self) {
19247 self.control_handle.shutdown();
19248 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19250 }
19251}
19252
19253impl fidl::endpoints::Responder for SymlinkDeprecatedSetFlagsResponder {
19254 type ControlHandle = SymlinkControlHandle;
19255
19256 fn control_handle(&self) -> &SymlinkControlHandle {
19257 &self.control_handle
19258 }
19259
19260 fn drop_without_shutdown(mut self) {
19261 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19263 std::mem::forget(self);
19265 }
19266}
19267
19268impl SymlinkDeprecatedSetFlagsResponder {
19269 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
19273 let _result = self.send_raw(s);
19274 if _result.is_err() {
19275 self.control_handle.shutdown();
19276 }
19277 self.drop_without_shutdown();
19278 _result
19279 }
19280
19281 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
19283 let _result = self.send_raw(s);
19284 self.drop_without_shutdown();
19285 _result
19286 }
19287
19288 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
19289 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
19290 (s,),
19291 self.tx_id,
19292 0x5295b76c71fde733,
19293 fidl::encoding::DynamicFlags::empty(),
19294 )
19295 }
19296}
19297
19298#[must_use = "FIDL methods require a response to be sent"]
19299#[derive(Debug)]
19300pub struct SymlinkGetFlagsResponder {
19301 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19302 tx_id: u32,
19303}
19304
19305impl std::ops::Drop for SymlinkGetFlagsResponder {
19309 fn drop(&mut self) {
19310 self.control_handle.shutdown();
19311 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19313 }
19314}
19315
19316impl fidl::endpoints::Responder for SymlinkGetFlagsResponder {
19317 type ControlHandle = SymlinkControlHandle;
19318
19319 fn control_handle(&self) -> &SymlinkControlHandle {
19320 &self.control_handle
19321 }
19322
19323 fn drop_without_shutdown(mut self) {
19324 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19326 std::mem::forget(self);
19328 }
19329}
19330
19331impl SymlinkGetFlagsResponder {
19332 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
19336 let _result = self.send_raw(result);
19337 if _result.is_err() {
19338 self.control_handle.shutdown();
19339 }
19340 self.drop_without_shutdown();
19341 _result
19342 }
19343
19344 pub fn send_no_shutdown_on_err(
19346 self,
19347 mut result: Result<Flags, i32>,
19348 ) -> Result<(), fidl::Error> {
19349 let _result = self.send_raw(result);
19350 self.drop_without_shutdown();
19351 _result
19352 }
19353
19354 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
19355 self.control_handle
19356 .inner
19357 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
19358 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
19359 self.tx_id,
19360 0x176eb318f64ec23,
19361 fidl::encoding::DynamicFlags::FLEXIBLE,
19362 )
19363 }
19364}
19365
19366#[must_use = "FIDL methods require a response to be sent"]
19367#[derive(Debug)]
19368pub struct SymlinkSetFlagsResponder {
19369 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19370 tx_id: u32,
19371}
19372
19373impl std::ops::Drop for SymlinkSetFlagsResponder {
19377 fn drop(&mut self) {
19378 self.control_handle.shutdown();
19379 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19381 }
19382}
19383
19384impl fidl::endpoints::Responder for SymlinkSetFlagsResponder {
19385 type ControlHandle = SymlinkControlHandle;
19386
19387 fn control_handle(&self) -> &SymlinkControlHandle {
19388 &self.control_handle
19389 }
19390
19391 fn drop_without_shutdown(mut self) {
19392 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19394 std::mem::forget(self);
19396 }
19397}
19398
19399impl SymlinkSetFlagsResponder {
19400 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19404 let _result = self.send_raw(result);
19405 if _result.is_err() {
19406 self.control_handle.shutdown();
19407 }
19408 self.drop_without_shutdown();
19409 _result
19410 }
19411
19412 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19414 let _result = self.send_raw(result);
19415 self.drop_without_shutdown();
19416 _result
19417 }
19418
19419 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19420 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
19421 fidl::encoding::EmptyStruct,
19422 i32,
19423 >>(
19424 fidl::encoding::FlexibleResult::new(result),
19425 self.tx_id,
19426 0x55a8028685791ea8,
19427 fidl::encoding::DynamicFlags::FLEXIBLE,
19428 )
19429 }
19430}
19431
19432#[must_use = "FIDL methods require a response to be sent"]
19433#[derive(Debug)]
19434pub struct SymlinkQueryFilesystemResponder {
19435 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19436 tx_id: u32,
19437}
19438
19439impl std::ops::Drop for SymlinkQueryFilesystemResponder {
19443 fn drop(&mut self) {
19444 self.control_handle.shutdown();
19445 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19447 }
19448}
19449
19450impl fidl::endpoints::Responder for SymlinkQueryFilesystemResponder {
19451 type ControlHandle = SymlinkControlHandle;
19452
19453 fn control_handle(&self) -> &SymlinkControlHandle {
19454 &self.control_handle
19455 }
19456
19457 fn drop_without_shutdown(mut self) {
19458 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19460 std::mem::forget(self);
19462 }
19463}
19464
19465impl SymlinkQueryFilesystemResponder {
19466 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
19470 let _result = self.send_raw(s, info);
19471 if _result.is_err() {
19472 self.control_handle.shutdown();
19473 }
19474 self.drop_without_shutdown();
19475 _result
19476 }
19477
19478 pub fn send_no_shutdown_on_err(
19480 self,
19481 mut s: i32,
19482 mut info: Option<&FilesystemInfo>,
19483 ) -> Result<(), fidl::Error> {
19484 let _result = self.send_raw(s, info);
19485 self.drop_without_shutdown();
19486 _result
19487 }
19488
19489 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
19490 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
19491 (s, info),
19492 self.tx_id,
19493 0x6f344a1c6b0a0610,
19494 fidl::encoding::DynamicFlags::empty(),
19495 )
19496 }
19497}
19498
19499#[must_use = "FIDL methods require a response to be sent"]
19500#[derive(Debug)]
19501pub struct SymlinkGetAttributesResponder {
19502 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19503 tx_id: u32,
19504}
19505
19506impl std::ops::Drop for SymlinkGetAttributesResponder {
19510 fn drop(&mut self) {
19511 self.control_handle.shutdown();
19512 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19514 }
19515}
19516
19517impl fidl::endpoints::Responder for SymlinkGetAttributesResponder {
19518 type ControlHandle = SymlinkControlHandle;
19519
19520 fn control_handle(&self) -> &SymlinkControlHandle {
19521 &self.control_handle
19522 }
19523
19524 fn drop_without_shutdown(mut self) {
19525 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19527 std::mem::forget(self);
19529 }
19530}
19531
19532impl SymlinkGetAttributesResponder {
19533 pub fn send(
19537 self,
19538 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19539 ) -> Result<(), fidl::Error> {
19540 let _result = self.send_raw(result);
19541 if _result.is_err() {
19542 self.control_handle.shutdown();
19543 }
19544 self.drop_without_shutdown();
19545 _result
19546 }
19547
19548 pub fn send_no_shutdown_on_err(
19550 self,
19551 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19552 ) -> Result<(), fidl::Error> {
19553 let _result = self.send_raw(result);
19554 self.drop_without_shutdown();
19555 _result
19556 }
19557
19558 fn send_raw(
19559 &self,
19560 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19561 ) -> Result<(), fidl::Error> {
19562 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
19563 result,
19564 self.tx_id,
19565 0x3d4396a638ea053b,
19566 fidl::encoding::DynamicFlags::empty(),
19567 )
19568 }
19569}
19570
19571#[must_use = "FIDL methods require a response to be sent"]
19572#[derive(Debug)]
19573pub struct SymlinkUpdateAttributesResponder {
19574 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19575 tx_id: u32,
19576}
19577
19578impl std::ops::Drop for SymlinkUpdateAttributesResponder {
19582 fn drop(&mut self) {
19583 self.control_handle.shutdown();
19584 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19586 }
19587}
19588
19589impl fidl::endpoints::Responder for SymlinkUpdateAttributesResponder {
19590 type ControlHandle = SymlinkControlHandle;
19591
19592 fn control_handle(&self) -> &SymlinkControlHandle {
19593 &self.control_handle
19594 }
19595
19596 fn drop_without_shutdown(mut self) {
19597 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19599 std::mem::forget(self);
19601 }
19602}
19603
19604impl SymlinkUpdateAttributesResponder {
19605 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19609 let _result = self.send_raw(result);
19610 if _result.is_err() {
19611 self.control_handle.shutdown();
19612 }
19613 self.drop_without_shutdown();
19614 _result
19615 }
19616
19617 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19619 let _result = self.send_raw(result);
19620 self.drop_without_shutdown();
19621 _result
19622 }
19623
19624 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19625 self.control_handle
19626 .inner
19627 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19628 result,
19629 self.tx_id,
19630 0x3308c1da5a89bf08,
19631 fidl::encoding::DynamicFlags::empty(),
19632 )
19633 }
19634}
19635
19636#[must_use = "FIDL methods require a response to be sent"]
19637#[derive(Debug)]
19638pub struct SymlinkSyncResponder {
19639 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19640 tx_id: u32,
19641}
19642
19643impl std::ops::Drop for SymlinkSyncResponder {
19647 fn drop(&mut self) {
19648 self.control_handle.shutdown();
19649 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19651 }
19652}
19653
19654impl fidl::endpoints::Responder for SymlinkSyncResponder {
19655 type ControlHandle = SymlinkControlHandle;
19656
19657 fn control_handle(&self) -> &SymlinkControlHandle {
19658 &self.control_handle
19659 }
19660
19661 fn drop_without_shutdown(mut self) {
19662 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19664 std::mem::forget(self);
19666 }
19667}
19668
19669impl SymlinkSyncResponder {
19670 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19674 let _result = self.send_raw(result);
19675 if _result.is_err() {
19676 self.control_handle.shutdown();
19677 }
19678 self.drop_without_shutdown();
19679 _result
19680 }
19681
19682 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19684 let _result = self.send_raw(result);
19685 self.drop_without_shutdown();
19686 _result
19687 }
19688
19689 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19690 self.control_handle
19691 .inner
19692 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19693 result,
19694 self.tx_id,
19695 0x2c5c27ca0ab5dc49,
19696 fidl::encoding::DynamicFlags::empty(),
19697 )
19698 }
19699}
19700
19701#[must_use = "FIDL methods require a response to be sent"]
19702#[derive(Debug)]
19703pub struct SymlinkGetExtendedAttributeResponder {
19704 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19705 tx_id: u32,
19706}
19707
19708impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
19712 fn drop(&mut self) {
19713 self.control_handle.shutdown();
19714 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19716 }
19717}
19718
19719impl fidl::endpoints::Responder for SymlinkGetExtendedAttributeResponder {
19720 type ControlHandle = SymlinkControlHandle;
19721
19722 fn control_handle(&self) -> &SymlinkControlHandle {
19723 &self.control_handle
19724 }
19725
19726 fn drop_without_shutdown(mut self) {
19727 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19729 std::mem::forget(self);
19731 }
19732}
19733
19734impl SymlinkGetExtendedAttributeResponder {
19735 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
19739 let _result = self.send_raw(result);
19740 if _result.is_err() {
19741 self.control_handle.shutdown();
19742 }
19743 self.drop_without_shutdown();
19744 _result
19745 }
19746
19747 pub fn send_no_shutdown_on_err(
19749 self,
19750 mut result: Result<ExtendedAttributeValue, i32>,
19751 ) -> Result<(), fidl::Error> {
19752 let _result = self.send_raw(result);
19753 self.drop_without_shutdown();
19754 _result
19755 }
19756
19757 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
19758 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
19759 result.as_mut().map_err(|e| *e),
19760 self.tx_id,
19761 0x45ffa3ccfdeb76db,
19762 fidl::encoding::DynamicFlags::empty(),
19763 )
19764 }
19765}
19766
19767#[must_use = "FIDL methods require a response to be sent"]
19768#[derive(Debug)]
19769pub struct SymlinkSetExtendedAttributeResponder {
19770 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19771 tx_id: u32,
19772}
19773
19774impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
19778 fn drop(&mut self) {
19779 self.control_handle.shutdown();
19780 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19782 }
19783}
19784
19785impl fidl::endpoints::Responder for SymlinkSetExtendedAttributeResponder {
19786 type ControlHandle = SymlinkControlHandle;
19787
19788 fn control_handle(&self) -> &SymlinkControlHandle {
19789 &self.control_handle
19790 }
19791
19792 fn drop_without_shutdown(mut self) {
19793 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19795 std::mem::forget(self);
19797 }
19798}
19799
19800impl SymlinkSetExtendedAttributeResponder {
19801 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19805 let _result = self.send_raw(result);
19806 if _result.is_err() {
19807 self.control_handle.shutdown();
19808 }
19809 self.drop_without_shutdown();
19810 _result
19811 }
19812
19813 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19815 let _result = self.send_raw(result);
19816 self.drop_without_shutdown();
19817 _result
19818 }
19819
19820 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19821 self.control_handle
19822 .inner
19823 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19824 result,
19825 self.tx_id,
19826 0x4a951362f681f23c,
19827 fidl::encoding::DynamicFlags::empty(),
19828 )
19829 }
19830}
19831
19832#[must_use = "FIDL methods require a response to be sent"]
19833#[derive(Debug)]
19834pub struct SymlinkRemoveExtendedAttributeResponder {
19835 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19836 tx_id: u32,
19837}
19838
19839impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
19843 fn drop(&mut self) {
19844 self.control_handle.shutdown();
19845 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19847 }
19848}
19849
19850impl fidl::endpoints::Responder for SymlinkRemoveExtendedAttributeResponder {
19851 type ControlHandle = SymlinkControlHandle;
19852
19853 fn control_handle(&self) -> &SymlinkControlHandle {
19854 &self.control_handle
19855 }
19856
19857 fn drop_without_shutdown(mut self) {
19858 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19860 std::mem::forget(self);
19862 }
19863}
19864
19865impl SymlinkRemoveExtendedAttributeResponder {
19866 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19870 let _result = self.send_raw(result);
19871 if _result.is_err() {
19872 self.control_handle.shutdown();
19873 }
19874 self.drop_without_shutdown();
19875 _result
19876 }
19877
19878 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19880 let _result = self.send_raw(result);
19881 self.drop_without_shutdown();
19882 _result
19883 }
19884
19885 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19886 self.control_handle
19887 .inner
19888 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19889 result,
19890 self.tx_id,
19891 0x7a0b9f3a9bf9032d,
19892 fidl::encoding::DynamicFlags::empty(),
19893 )
19894 }
19895}
19896
19897#[must_use = "FIDL methods require a response to be sent"]
19898#[derive(Debug)]
19899pub struct SymlinkDescribeResponder {
19900 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19901 tx_id: u32,
19902}
19903
19904impl std::ops::Drop for SymlinkDescribeResponder {
19908 fn drop(&mut self) {
19909 self.control_handle.shutdown();
19910 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19912 }
19913}
19914
19915impl fidl::endpoints::Responder for SymlinkDescribeResponder {
19916 type ControlHandle = SymlinkControlHandle;
19917
19918 fn control_handle(&self) -> &SymlinkControlHandle {
19919 &self.control_handle
19920 }
19921
19922 fn drop_without_shutdown(mut self) {
19923 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19925 std::mem::forget(self);
19927 }
19928}
19929
19930impl SymlinkDescribeResponder {
19931 pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19935 let _result = self.send_raw(payload);
19936 if _result.is_err() {
19937 self.control_handle.shutdown();
19938 }
19939 self.drop_without_shutdown();
19940 _result
19941 }
19942
19943 pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19945 let _result = self.send_raw(payload);
19946 self.drop_without_shutdown();
19947 _result
19948 }
19949
19950 fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19951 self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
19952 fidl::encoding::Flexible::new(payload),
19953 self.tx_id,
19954 0x742c2ea5e89831f3,
19955 fidl::encoding::DynamicFlags::FLEXIBLE,
19956 )
19957 }
19958}
19959
19960#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19961pub struct WritableMarker;
19962
19963impl fidl::endpoints::ProtocolMarker for WritableMarker {
19964 type Proxy = WritableProxy;
19965 type RequestStream = WritableRequestStream;
19966 #[cfg(target_os = "fuchsia")]
19967 type SynchronousProxy = WritableSynchronousProxy;
19968
19969 const DEBUG_NAME: &'static str = "(anonymous) Writable";
19970}
19971pub type WritableWriteResult = Result<u64, i32>;
19972
19973pub trait WritableProxyInterface: Send + Sync {
19974 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
19975 + Send;
19976 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
19977}
19978#[derive(Debug)]
19979#[cfg(target_os = "fuchsia")]
19980pub struct WritableSynchronousProxy {
19981 client: fidl::client::sync::Client,
19982}
19983
19984#[cfg(target_os = "fuchsia")]
19985impl fidl::endpoints::SynchronousProxy for WritableSynchronousProxy {
19986 type Proxy = WritableProxy;
19987 type Protocol = WritableMarker;
19988
19989 fn from_channel(inner: fidl::Channel) -> Self {
19990 Self::new(inner)
19991 }
19992
19993 fn into_channel(self) -> fidl::Channel {
19994 self.client.into_channel()
19995 }
19996
19997 fn as_channel(&self) -> &fidl::Channel {
19998 self.client.as_channel()
19999 }
20000}
20001
20002#[cfg(target_os = "fuchsia")]
20003impl WritableSynchronousProxy {
20004 pub fn new(channel: fidl::Channel) -> Self {
20005 let protocol_name = <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
20006 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
20007 }
20008
20009 pub fn into_channel(self) -> fidl::Channel {
20010 self.client.into_channel()
20011 }
20012
20013 pub fn wait_for_event(
20016 &self,
20017 deadline: zx::MonotonicInstant,
20018 ) -> Result<WritableEvent, fidl::Error> {
20019 WritableEvent::decode(self.client.wait_for_event(deadline)?)
20020 }
20021
20022 pub fn r#write(
20046 &self,
20047 mut data: &[u8],
20048 ___deadline: zx::MonotonicInstant,
20049 ) -> Result<WritableWriteResult, fidl::Error> {
20050 let _response = self.client.send_query::<
20051 WritableWriteRequest,
20052 fidl::encoding::ResultType<WritableWriteResponse, i32>,
20053 >(
20054 (data,),
20055 0x6a31437832469f82,
20056 fidl::encoding::DynamicFlags::empty(),
20057 ___deadline,
20058 )?;
20059 Ok(_response.map(|x| x.actual_count))
20060 }
20061}
20062
20063#[cfg(target_os = "fuchsia")]
20064impl From<WritableSynchronousProxy> for zx::Handle {
20065 fn from(value: WritableSynchronousProxy) -> Self {
20066 value.into_channel().into()
20067 }
20068}
20069
20070#[cfg(target_os = "fuchsia")]
20071impl From<fidl::Channel> for WritableSynchronousProxy {
20072 fn from(value: fidl::Channel) -> Self {
20073 Self::new(value)
20074 }
20075}
20076
20077#[cfg(target_os = "fuchsia")]
20078impl fidl::endpoints::FromClient for WritableSynchronousProxy {
20079 type Protocol = WritableMarker;
20080
20081 fn from_client(value: fidl::endpoints::ClientEnd<WritableMarker>) -> Self {
20082 Self::new(value.into_channel())
20083 }
20084}
20085
20086#[derive(Debug, Clone)]
20087pub struct WritableProxy {
20088 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
20089}
20090
20091impl fidl::endpoints::Proxy for WritableProxy {
20092 type Protocol = WritableMarker;
20093
20094 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
20095 Self::new(inner)
20096 }
20097
20098 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
20099 self.client.into_channel().map_err(|client| Self { client })
20100 }
20101
20102 fn as_channel(&self) -> &::fidl::AsyncChannel {
20103 self.client.as_channel()
20104 }
20105}
20106
20107impl WritableProxy {
20108 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
20110 let protocol_name = <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
20111 Self { client: fidl::client::Client::new(channel, protocol_name) }
20112 }
20113
20114 pub fn take_event_stream(&self) -> WritableEventStream {
20120 WritableEventStream { event_receiver: self.client.take_event_receiver() }
20121 }
20122
20123 pub fn r#write(
20147 &self,
20148 mut data: &[u8],
20149 ) -> fidl::client::QueryResponseFut<
20150 WritableWriteResult,
20151 fidl::encoding::DefaultFuchsiaResourceDialect,
20152 > {
20153 WritableProxyInterface::r#write(self, data)
20154 }
20155}
20156
20157impl WritableProxyInterface for WritableProxy {
20158 type WriteResponseFut = fidl::client::QueryResponseFut<
20159 WritableWriteResult,
20160 fidl::encoding::DefaultFuchsiaResourceDialect,
20161 >;
20162 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
20163 fn _decode(
20164 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
20165 ) -> Result<WritableWriteResult, fidl::Error> {
20166 let _response = fidl::client::decode_transaction_body::<
20167 fidl::encoding::ResultType<WritableWriteResponse, i32>,
20168 fidl::encoding::DefaultFuchsiaResourceDialect,
20169 0x6a31437832469f82,
20170 >(_buf?)?;
20171 Ok(_response.map(|x| x.actual_count))
20172 }
20173 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
20174 (data,),
20175 0x6a31437832469f82,
20176 fidl::encoding::DynamicFlags::empty(),
20177 _decode,
20178 )
20179 }
20180}
20181
20182pub struct WritableEventStream {
20183 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
20184}
20185
20186impl std::marker::Unpin for WritableEventStream {}
20187
20188impl futures::stream::FusedStream for WritableEventStream {
20189 fn is_terminated(&self) -> bool {
20190 self.event_receiver.is_terminated()
20191 }
20192}
20193
20194impl futures::Stream for WritableEventStream {
20195 type Item = Result<WritableEvent, fidl::Error>;
20196
20197 fn poll_next(
20198 mut self: std::pin::Pin<&mut Self>,
20199 cx: &mut std::task::Context<'_>,
20200 ) -> std::task::Poll<Option<Self::Item>> {
20201 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
20202 &mut self.event_receiver,
20203 cx
20204 )?) {
20205 Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
20206 None => std::task::Poll::Ready(None),
20207 }
20208 }
20209}
20210
20211#[derive(Debug)]
20212pub enum WritableEvent {}
20213
20214impl WritableEvent {
20215 fn decode(
20217 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
20218 ) -> Result<WritableEvent, fidl::Error> {
20219 let (bytes, _handles) = buf.split_mut();
20220 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
20221 debug_assert_eq!(tx_header.tx_id, 0);
20222 match tx_header.ordinal {
20223 _ => Err(fidl::Error::UnknownOrdinal {
20224 ordinal: tx_header.ordinal,
20225 protocol_name: <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
20226 }),
20227 }
20228 }
20229}
20230
20231pub struct WritableRequestStream {
20233 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20234 is_terminated: bool,
20235}
20236
20237impl std::marker::Unpin for WritableRequestStream {}
20238
20239impl futures::stream::FusedStream for WritableRequestStream {
20240 fn is_terminated(&self) -> bool {
20241 self.is_terminated
20242 }
20243}
20244
20245impl fidl::endpoints::RequestStream for WritableRequestStream {
20246 type Protocol = WritableMarker;
20247 type ControlHandle = WritableControlHandle;
20248
20249 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
20250 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
20251 }
20252
20253 fn control_handle(&self) -> Self::ControlHandle {
20254 WritableControlHandle { inner: self.inner.clone() }
20255 }
20256
20257 fn into_inner(
20258 self,
20259 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
20260 {
20261 (self.inner, self.is_terminated)
20262 }
20263
20264 fn from_inner(
20265 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20266 is_terminated: bool,
20267 ) -> Self {
20268 Self { inner, is_terminated }
20269 }
20270}
20271
20272impl futures::Stream for WritableRequestStream {
20273 type Item = Result<WritableRequest, fidl::Error>;
20274
20275 fn poll_next(
20276 mut self: std::pin::Pin<&mut Self>,
20277 cx: &mut std::task::Context<'_>,
20278 ) -> std::task::Poll<Option<Self::Item>> {
20279 let this = &mut *self;
20280 if this.inner.check_shutdown(cx) {
20281 this.is_terminated = true;
20282 return std::task::Poll::Ready(None);
20283 }
20284 if this.is_terminated {
20285 panic!("polled WritableRequestStream after completion");
20286 }
20287 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
20288 |bytes, handles| {
20289 match this.inner.channel().read_etc(cx, bytes, handles) {
20290 std::task::Poll::Ready(Ok(())) => {}
20291 std::task::Poll::Pending => return std::task::Poll::Pending,
20292 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
20293 this.is_terminated = true;
20294 return std::task::Poll::Ready(None);
20295 }
20296 std::task::Poll::Ready(Err(e)) => {
20297 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
20298 e.into(),
20299 ))))
20300 }
20301 }
20302
20303 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
20305
20306 std::task::Poll::Ready(Some(match header.ordinal {
20307 0x6a31437832469f82 => {
20308 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
20309 let mut req = fidl::new_empty!(
20310 WritableWriteRequest,
20311 fidl::encoding::DefaultFuchsiaResourceDialect
20312 );
20313 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
20314 let control_handle = WritableControlHandle { inner: this.inner.clone() };
20315 Ok(WritableRequest::Write {
20316 data: req.data,
20317
20318 responder: WritableWriteResponder {
20319 control_handle: std::mem::ManuallyDrop::new(control_handle),
20320 tx_id: header.tx_id,
20321 },
20322 })
20323 }
20324 _ => Err(fidl::Error::UnknownOrdinal {
20325 ordinal: header.ordinal,
20326 protocol_name:
20327 <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
20328 }),
20329 }))
20330 },
20331 )
20332 }
20333}
20334
20335#[derive(Debug)]
20336pub enum WritableRequest {
20337 Write { data: Vec<u8>, responder: WritableWriteResponder },
20361}
20362
20363impl WritableRequest {
20364 #[allow(irrefutable_let_patterns)]
20365 pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
20366 if let WritableRequest::Write { data, responder } = self {
20367 Some((data, responder))
20368 } else {
20369 None
20370 }
20371 }
20372
20373 pub fn method_name(&self) -> &'static str {
20375 match *self {
20376 WritableRequest::Write { .. } => "write",
20377 }
20378 }
20379}
20380
20381#[derive(Debug, Clone)]
20382pub struct WritableControlHandle {
20383 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20384}
20385
20386impl fidl::endpoints::ControlHandle for WritableControlHandle {
20387 fn shutdown(&self) {
20388 self.inner.shutdown()
20389 }
20390 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
20391 self.inner.shutdown_with_epitaph(status)
20392 }
20393
20394 fn is_closed(&self) -> bool {
20395 self.inner.channel().is_closed()
20396 }
20397 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
20398 self.inner.channel().on_closed()
20399 }
20400
20401 #[cfg(target_os = "fuchsia")]
20402 fn signal_peer(
20403 &self,
20404 clear_mask: zx::Signals,
20405 set_mask: zx::Signals,
20406 ) -> Result<(), zx_status::Status> {
20407 use fidl::Peered;
20408 self.inner.channel().signal_peer(clear_mask, set_mask)
20409 }
20410}
20411
20412impl WritableControlHandle {}
20413
20414#[must_use = "FIDL methods require a response to be sent"]
20415#[derive(Debug)]
20416pub struct WritableWriteResponder {
20417 control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
20418 tx_id: u32,
20419}
20420
20421impl std::ops::Drop for WritableWriteResponder {
20425 fn drop(&mut self) {
20426 self.control_handle.shutdown();
20427 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20429 }
20430}
20431
20432impl fidl::endpoints::Responder for WritableWriteResponder {
20433 type ControlHandle = WritableControlHandle;
20434
20435 fn control_handle(&self) -> &WritableControlHandle {
20436 &self.control_handle
20437 }
20438
20439 fn drop_without_shutdown(mut self) {
20440 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20442 std::mem::forget(self);
20444 }
20445}
20446
20447impl WritableWriteResponder {
20448 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20452 let _result = self.send_raw(result);
20453 if _result.is_err() {
20454 self.control_handle.shutdown();
20455 }
20456 self.drop_without_shutdown();
20457 _result
20458 }
20459
20460 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20462 let _result = self.send_raw(result);
20463 self.drop_without_shutdown();
20464 _result
20465 }
20466
20467 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20468 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
20469 result.map(|actual_count| (actual_count,)),
20470 self.tx_id,
20471 0x6a31437832469f82,
20472 fidl::encoding::DynamicFlags::empty(),
20473 )
20474 }
20475}
20476
20477mod internal {
20478 use super::*;
20479
20480 impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
20481 type Borrowed<'a> = &'a mut Self;
20482 fn take_or_borrow<'a>(
20483 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20484 ) -> Self::Borrowed<'a> {
20485 value
20486 }
20487 }
20488
20489 unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
20490 type Owned = Self;
20491
20492 #[inline(always)]
20493 fn inline_align(_context: fidl::encoding::Context) -> usize {
20494 8
20495 }
20496
20497 #[inline(always)]
20498 fn inline_size(_context: fidl::encoding::Context) -> usize {
20499 40
20500 }
20501 }
20502
20503 unsafe impl
20504 fidl::encoding::Encode<
20505 DirectoryCreateSymlinkRequest,
20506 fidl::encoding::DefaultFuchsiaResourceDialect,
20507 > for &mut DirectoryCreateSymlinkRequest
20508 {
20509 #[inline]
20510 unsafe fn encode(
20511 self,
20512 encoder: &mut fidl::encoding::Encoder<
20513 '_,
20514 fidl::encoding::DefaultFuchsiaResourceDialect,
20515 >,
20516 offset: usize,
20517 _depth: fidl::encoding::Depth,
20518 ) -> fidl::Result<()> {
20519 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
20520 fidl::encoding::Encode::<
20522 DirectoryCreateSymlinkRequest,
20523 fidl::encoding::DefaultFuchsiaResourceDialect,
20524 >::encode(
20525 (
20526 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
20527 &self.name,
20528 ),
20529 <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
20530 &self.target,
20531 ),
20532 <fidl::encoding::Optional<
20533 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20534 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20535 &mut self.connection
20536 ),
20537 ),
20538 encoder,
20539 offset,
20540 _depth,
20541 )
20542 }
20543 }
20544 unsafe impl<
20545 T0: fidl::encoding::Encode<
20546 fidl::encoding::BoundedString<255>,
20547 fidl::encoding::DefaultFuchsiaResourceDialect,
20548 >,
20549 T1: fidl::encoding::Encode<
20550 fidl::encoding::Vector<u8, 4095>,
20551 fidl::encoding::DefaultFuchsiaResourceDialect,
20552 >,
20553 T2: fidl::encoding::Encode<
20554 fidl::encoding::Optional<
20555 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20556 >,
20557 fidl::encoding::DefaultFuchsiaResourceDialect,
20558 >,
20559 >
20560 fidl::encoding::Encode<
20561 DirectoryCreateSymlinkRequest,
20562 fidl::encoding::DefaultFuchsiaResourceDialect,
20563 > for (T0, T1, T2)
20564 {
20565 #[inline]
20566 unsafe fn encode(
20567 self,
20568 encoder: &mut fidl::encoding::Encoder<
20569 '_,
20570 fidl::encoding::DefaultFuchsiaResourceDialect,
20571 >,
20572 offset: usize,
20573 depth: fidl::encoding::Depth,
20574 ) -> fidl::Result<()> {
20575 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
20576 unsafe {
20579 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
20580 (ptr as *mut u64).write_unaligned(0);
20581 }
20582 self.0.encode(encoder, offset + 0, depth)?;
20584 self.1.encode(encoder, offset + 16, depth)?;
20585 self.2.encode(encoder, offset + 32, depth)?;
20586 Ok(())
20587 }
20588 }
20589
20590 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20591 for DirectoryCreateSymlinkRequest
20592 {
20593 #[inline(always)]
20594 fn new_empty() -> Self {
20595 Self {
20596 name: fidl::new_empty!(
20597 fidl::encoding::BoundedString<255>,
20598 fidl::encoding::DefaultFuchsiaResourceDialect
20599 ),
20600 target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect),
20601 connection: fidl::new_empty!(
20602 fidl::encoding::Optional<
20603 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20604 >,
20605 fidl::encoding::DefaultFuchsiaResourceDialect
20606 ),
20607 }
20608 }
20609
20610 #[inline]
20611 unsafe fn decode(
20612 &mut self,
20613 decoder: &mut fidl::encoding::Decoder<
20614 '_,
20615 fidl::encoding::DefaultFuchsiaResourceDialect,
20616 >,
20617 offset: usize,
20618 _depth: fidl::encoding::Depth,
20619 ) -> fidl::Result<()> {
20620 decoder.debug_check_bounds::<Self>(offset);
20621 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
20623 let padval = unsafe { (ptr as *const u64).read_unaligned() };
20624 let mask = 0xffffffff00000000u64;
20625 let maskedval = padval & mask;
20626 if maskedval != 0 {
20627 return Err(fidl::Error::NonZeroPadding {
20628 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
20629 });
20630 }
20631 fidl::decode!(
20632 fidl::encoding::BoundedString<255>,
20633 fidl::encoding::DefaultFuchsiaResourceDialect,
20634 &mut self.name,
20635 decoder,
20636 offset + 0,
20637 _depth
20638 )?;
20639 fidl::decode!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
20640 fidl::decode!(
20641 fidl::encoding::Optional<
20642 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20643 >,
20644 fidl::encoding::DefaultFuchsiaResourceDialect,
20645 &mut self.connection,
20646 decoder,
20647 offset + 32,
20648 _depth
20649 )?;
20650 Ok(())
20651 }
20652 }
20653
20654 impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
20655 type Borrowed<'a> = &'a mut Self;
20656 fn take_or_borrow<'a>(
20657 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20658 ) -> Self::Borrowed<'a> {
20659 value
20660 }
20661 }
20662
20663 unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
20664 type Owned = Self;
20665
20666 #[inline(always)]
20667 fn inline_align(_context: fidl::encoding::Context) -> usize {
20668 8
20669 }
20670
20671 #[inline(always)]
20672 fn inline_size(_context: fidl::encoding::Context) -> usize {
20673 32
20674 }
20675 }
20676
20677 unsafe impl
20678 fidl::encoding::Encode<
20679 DirectoryDeprecatedOpenRequest,
20680 fidl::encoding::DefaultFuchsiaResourceDialect,
20681 > for &mut DirectoryDeprecatedOpenRequest
20682 {
20683 #[inline]
20684 unsafe fn encode(
20685 self,
20686 encoder: &mut fidl::encoding::Encoder<
20687 '_,
20688 fidl::encoding::DefaultFuchsiaResourceDialect,
20689 >,
20690 offset: usize,
20691 _depth: fidl::encoding::Depth,
20692 ) -> fidl::Result<()> {
20693 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
20694 fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
20696 (
20697 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
20698 <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
20699 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
20700 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
20701 ),
20702 encoder, offset, _depth
20703 )
20704 }
20705 }
20706 unsafe impl<
20707 T0: fidl::encoding::Encode<OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect>,
20708 T1: fidl::encoding::Encode<ModeType, fidl::encoding::DefaultFuchsiaResourceDialect>,
20709 T2: fidl::encoding::Encode<
20710 fidl::encoding::BoundedString<4095>,
20711 fidl::encoding::DefaultFuchsiaResourceDialect,
20712 >,
20713 T3: fidl::encoding::Encode<
20714 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20715 fidl::encoding::DefaultFuchsiaResourceDialect,
20716 >,
20717 >
20718 fidl::encoding::Encode<
20719 DirectoryDeprecatedOpenRequest,
20720 fidl::encoding::DefaultFuchsiaResourceDialect,
20721 > for (T0, T1, T2, T3)
20722 {
20723 #[inline]
20724 unsafe fn encode(
20725 self,
20726 encoder: &mut fidl::encoding::Encoder<
20727 '_,
20728 fidl::encoding::DefaultFuchsiaResourceDialect,
20729 >,
20730 offset: usize,
20731 depth: fidl::encoding::Depth,
20732 ) -> fidl::Result<()> {
20733 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
20734 unsafe {
20737 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
20738 (ptr as *mut u64).write_unaligned(0);
20739 }
20740 self.0.encode(encoder, offset + 0, depth)?;
20742 self.1.encode(encoder, offset + 4, depth)?;
20743 self.2.encode(encoder, offset + 8, depth)?;
20744 self.3.encode(encoder, offset + 24, depth)?;
20745 Ok(())
20746 }
20747 }
20748
20749 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20750 for DirectoryDeprecatedOpenRequest
20751 {
20752 #[inline(always)]
20753 fn new_empty() -> Self {
20754 Self {
20755 flags: fidl::new_empty!(OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect),
20756 mode: fidl::new_empty!(ModeType, fidl::encoding::DefaultFuchsiaResourceDialect),
20757 path: fidl::new_empty!(
20758 fidl::encoding::BoundedString<4095>,
20759 fidl::encoding::DefaultFuchsiaResourceDialect
20760 ),
20761 object: fidl::new_empty!(
20762 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20763 fidl::encoding::DefaultFuchsiaResourceDialect
20764 ),
20765 }
20766 }
20767
20768 #[inline]
20769 unsafe fn decode(
20770 &mut self,
20771 decoder: &mut fidl::encoding::Decoder<
20772 '_,
20773 fidl::encoding::DefaultFuchsiaResourceDialect,
20774 >,
20775 offset: usize,
20776 _depth: fidl::encoding::Depth,
20777 ) -> fidl::Result<()> {
20778 decoder.debug_check_bounds::<Self>(offset);
20779 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
20781 let padval = unsafe { (ptr as *const u64).read_unaligned() };
20782 let mask = 0xffffffff00000000u64;
20783 let maskedval = padval & mask;
20784 if maskedval != 0 {
20785 return Err(fidl::Error::NonZeroPadding {
20786 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
20787 });
20788 }
20789 fidl::decode!(
20790 OpenFlags,
20791 fidl::encoding::DefaultFuchsiaResourceDialect,
20792 &mut self.flags,
20793 decoder,
20794 offset + 0,
20795 _depth
20796 )?;
20797 fidl::decode!(
20798 ModeType,
20799 fidl::encoding::DefaultFuchsiaResourceDialect,
20800 &mut self.mode,
20801 decoder,
20802 offset + 4,
20803 _depth
20804 )?;
20805 fidl::decode!(
20806 fidl::encoding::BoundedString<4095>,
20807 fidl::encoding::DefaultFuchsiaResourceDialect,
20808 &mut self.path,
20809 decoder,
20810 offset + 8,
20811 _depth
20812 )?;
20813 fidl::decode!(
20814 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20815 fidl::encoding::DefaultFuchsiaResourceDialect,
20816 &mut self.object,
20817 decoder,
20818 offset + 24,
20819 _depth
20820 )?;
20821 Ok(())
20822 }
20823 }
20824
20825 impl fidl::encoding::ResourceTypeMarker for DirectoryGetTokenResponse {
20826 type Borrowed<'a> = &'a mut Self;
20827 fn take_or_borrow<'a>(
20828 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20829 ) -> Self::Borrowed<'a> {
20830 value
20831 }
20832 }
20833
20834 unsafe impl fidl::encoding::TypeMarker for DirectoryGetTokenResponse {
20835 type Owned = Self;
20836
20837 #[inline(always)]
20838 fn inline_align(_context: fidl::encoding::Context) -> usize {
20839 4
20840 }
20841
20842 #[inline(always)]
20843 fn inline_size(_context: fidl::encoding::Context) -> usize {
20844 8
20845 }
20846 }
20847
20848 unsafe impl
20849 fidl::encoding::Encode<
20850 DirectoryGetTokenResponse,
20851 fidl::encoding::DefaultFuchsiaResourceDialect,
20852 > for &mut DirectoryGetTokenResponse
20853 {
20854 #[inline]
20855 unsafe fn encode(
20856 self,
20857 encoder: &mut fidl::encoding::Encoder<
20858 '_,
20859 fidl::encoding::DefaultFuchsiaResourceDialect,
20860 >,
20861 offset: usize,
20862 _depth: fidl::encoding::Depth,
20863 ) -> fidl::Result<()> {
20864 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
20865 fidl::encoding::Encode::<
20867 DirectoryGetTokenResponse,
20868 fidl::encoding::DefaultFuchsiaResourceDialect,
20869 >::encode(
20870 (
20871 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
20872 <fidl::encoding::Optional<
20873 fidl::encoding::HandleType<
20874 fidl::Handle,
20875 { fidl::ObjectType::NONE.into_raw() },
20876 2147483648,
20877 >,
20878 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20879 &mut self.token
20880 ),
20881 ),
20882 encoder,
20883 offset,
20884 _depth,
20885 )
20886 }
20887 }
20888 unsafe impl<
20889 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
20890 T1: fidl::encoding::Encode<
20891 fidl::encoding::Optional<
20892 fidl::encoding::HandleType<
20893 fidl::Handle,
20894 { fidl::ObjectType::NONE.into_raw() },
20895 2147483648,
20896 >,
20897 >,
20898 fidl::encoding::DefaultFuchsiaResourceDialect,
20899 >,
20900 >
20901 fidl::encoding::Encode<
20902 DirectoryGetTokenResponse,
20903 fidl::encoding::DefaultFuchsiaResourceDialect,
20904 > for (T0, T1)
20905 {
20906 #[inline]
20907 unsafe fn encode(
20908 self,
20909 encoder: &mut fidl::encoding::Encoder<
20910 '_,
20911 fidl::encoding::DefaultFuchsiaResourceDialect,
20912 >,
20913 offset: usize,
20914 depth: fidl::encoding::Depth,
20915 ) -> fidl::Result<()> {
20916 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
20917 self.0.encode(encoder, offset + 0, depth)?;
20921 self.1.encode(encoder, offset + 4, depth)?;
20922 Ok(())
20923 }
20924 }
20925
20926 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20927 for DirectoryGetTokenResponse
20928 {
20929 #[inline(always)]
20930 fn new_empty() -> Self {
20931 Self {
20932 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
20933 token: fidl::new_empty!(
20934 fidl::encoding::Optional<
20935 fidl::encoding::HandleType<
20936 fidl::Handle,
20937 { fidl::ObjectType::NONE.into_raw() },
20938 2147483648,
20939 >,
20940 >,
20941 fidl::encoding::DefaultFuchsiaResourceDialect
20942 ),
20943 }
20944 }
20945
20946 #[inline]
20947 unsafe fn decode(
20948 &mut self,
20949 decoder: &mut fidl::encoding::Decoder<
20950 '_,
20951 fidl::encoding::DefaultFuchsiaResourceDialect,
20952 >,
20953 offset: usize,
20954 _depth: fidl::encoding::Depth,
20955 ) -> fidl::Result<()> {
20956 decoder.debug_check_bounds::<Self>(offset);
20957 fidl::decode!(
20959 i32,
20960 fidl::encoding::DefaultFuchsiaResourceDialect,
20961 &mut self.s,
20962 decoder,
20963 offset + 0,
20964 _depth
20965 )?;
20966 fidl::decode!(
20967 fidl::encoding::Optional<
20968 fidl::encoding::HandleType<
20969 fidl::Handle,
20970 { fidl::ObjectType::NONE.into_raw() },
20971 2147483648,
20972 >,
20973 >,
20974 fidl::encoding::DefaultFuchsiaResourceDialect,
20975 &mut self.token,
20976 decoder,
20977 offset + 4,
20978 _depth
20979 )?;
20980 Ok(())
20981 }
20982 }
20983
20984 impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
20985 type Borrowed<'a> = &'a mut Self;
20986 fn take_or_borrow<'a>(
20987 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20988 ) -> Self::Borrowed<'a> {
20989 value
20990 }
20991 }
20992
20993 unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
20994 type Owned = Self;
20995
20996 #[inline(always)]
20997 fn inline_align(_context: fidl::encoding::Context) -> usize {
20998 8
20999 }
21000
21001 #[inline(always)]
21002 fn inline_size(_context: fidl::encoding::Context) -> usize {
21003 40
21004 }
21005 }
21006
21007 unsafe impl
21008 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21009 for &mut DirectoryLinkRequest
21010 {
21011 #[inline]
21012 unsafe fn encode(
21013 self,
21014 encoder: &mut fidl::encoding::Encoder<
21015 '_,
21016 fidl::encoding::DefaultFuchsiaResourceDialect,
21017 >,
21018 offset: usize,
21019 _depth: fidl::encoding::Depth,
21020 ) -> fidl::Result<()> {
21021 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
21022 fidl::encoding::Encode::<
21024 DirectoryLinkRequest,
21025 fidl::encoding::DefaultFuchsiaResourceDialect,
21026 >::encode(
21027 (
21028 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21029 &self.src,
21030 ),
21031 <fidl::encoding::HandleType<
21032 fidl::Handle,
21033 { fidl::ObjectType::NONE.into_raw() },
21034 2147483648,
21035 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21036 &mut self.dst_parent_token,
21037 ),
21038 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21039 &self.dst,
21040 ),
21041 ),
21042 encoder,
21043 offset,
21044 _depth,
21045 )
21046 }
21047 }
21048 unsafe impl<
21049 T0: fidl::encoding::Encode<
21050 fidl::encoding::BoundedString<255>,
21051 fidl::encoding::DefaultFuchsiaResourceDialect,
21052 >,
21053 T1: fidl::encoding::Encode<
21054 fidl::encoding::HandleType<
21055 fidl::Handle,
21056 { fidl::ObjectType::NONE.into_raw() },
21057 2147483648,
21058 >,
21059 fidl::encoding::DefaultFuchsiaResourceDialect,
21060 >,
21061 T2: fidl::encoding::Encode<
21062 fidl::encoding::BoundedString<255>,
21063 fidl::encoding::DefaultFuchsiaResourceDialect,
21064 >,
21065 >
21066 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21067 for (T0, T1, T2)
21068 {
21069 #[inline]
21070 unsafe fn encode(
21071 self,
21072 encoder: &mut fidl::encoding::Encoder<
21073 '_,
21074 fidl::encoding::DefaultFuchsiaResourceDialect,
21075 >,
21076 offset: usize,
21077 depth: fidl::encoding::Depth,
21078 ) -> fidl::Result<()> {
21079 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
21080 unsafe {
21083 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21084 (ptr as *mut u64).write_unaligned(0);
21085 }
21086 self.0.encode(encoder, offset + 0, depth)?;
21088 self.1.encode(encoder, offset + 16, depth)?;
21089 self.2.encode(encoder, offset + 24, depth)?;
21090 Ok(())
21091 }
21092 }
21093
21094 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21095 for DirectoryLinkRequest
21096 {
21097 #[inline(always)]
21098 fn new_empty() -> Self {
21099 Self {
21100 src: fidl::new_empty!(
21101 fidl::encoding::BoundedString<255>,
21102 fidl::encoding::DefaultFuchsiaResourceDialect
21103 ),
21104 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21105 dst: fidl::new_empty!(
21106 fidl::encoding::BoundedString<255>,
21107 fidl::encoding::DefaultFuchsiaResourceDialect
21108 ),
21109 }
21110 }
21111
21112 #[inline]
21113 unsafe fn decode(
21114 &mut self,
21115 decoder: &mut fidl::encoding::Decoder<
21116 '_,
21117 fidl::encoding::DefaultFuchsiaResourceDialect,
21118 >,
21119 offset: usize,
21120 _depth: fidl::encoding::Depth,
21121 ) -> fidl::Result<()> {
21122 decoder.debug_check_bounds::<Self>(offset);
21123 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21125 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21126 let mask = 0xffffffff00000000u64;
21127 let maskedval = padval & mask;
21128 if maskedval != 0 {
21129 return Err(fidl::Error::NonZeroPadding {
21130 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21131 });
21132 }
21133 fidl::decode!(
21134 fidl::encoding::BoundedString<255>,
21135 fidl::encoding::DefaultFuchsiaResourceDialect,
21136 &mut self.src,
21137 decoder,
21138 offset + 0,
21139 _depth
21140 )?;
21141 fidl::decode!(fidl::encoding::HandleType<fidl::Handle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
21142 fidl::decode!(
21143 fidl::encoding::BoundedString<255>,
21144 fidl::encoding::DefaultFuchsiaResourceDialect,
21145 &mut self.dst,
21146 decoder,
21147 offset + 24,
21148 _depth
21149 )?;
21150 Ok(())
21151 }
21152 }
21153
21154 impl fidl::encoding::ResourceTypeMarker for DirectoryOpenRequest {
21155 type Borrowed<'a> = &'a mut Self;
21156 fn take_or_borrow<'a>(
21157 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21158 ) -> Self::Borrowed<'a> {
21159 value
21160 }
21161 }
21162
21163 unsafe impl fidl::encoding::TypeMarker for DirectoryOpenRequest {
21164 type Owned = Self;
21165
21166 #[inline(always)]
21167 fn inline_align(_context: fidl::encoding::Context) -> usize {
21168 8
21169 }
21170
21171 #[inline(always)]
21172 fn inline_size(_context: fidl::encoding::Context) -> usize {
21173 48
21174 }
21175 }
21176
21177 unsafe impl
21178 fidl::encoding::Encode<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21179 for &mut DirectoryOpenRequest
21180 {
21181 #[inline]
21182 unsafe fn encode(
21183 self,
21184 encoder: &mut fidl::encoding::Encoder<
21185 '_,
21186 fidl::encoding::DefaultFuchsiaResourceDialect,
21187 >,
21188 offset: usize,
21189 _depth: fidl::encoding::Depth,
21190 ) -> fidl::Result<()> {
21191 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
21192 fidl::encoding::Encode::<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21194 (
21195 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
21196 <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
21197 <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
21198 <fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
21199 ),
21200 encoder, offset, _depth
21201 )
21202 }
21203 }
21204 unsafe impl<
21205 T0: fidl::encoding::Encode<
21206 fidl::encoding::BoundedString<4095>,
21207 fidl::encoding::DefaultFuchsiaResourceDialect,
21208 >,
21209 T1: fidl::encoding::Encode<Flags, fidl::encoding::DefaultFuchsiaResourceDialect>,
21210 T2: fidl::encoding::Encode<Options, fidl::encoding::DefaultFuchsiaResourceDialect>,
21211 T3: fidl::encoding::Encode<
21212 fidl::encoding::HandleType<
21213 fidl::Channel,
21214 { fidl::ObjectType::CHANNEL.into_raw() },
21215 2147483648,
21216 >,
21217 fidl::encoding::DefaultFuchsiaResourceDialect,
21218 >,
21219 >
21220 fidl::encoding::Encode<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21221 for (T0, T1, T2, T3)
21222 {
21223 #[inline]
21224 unsafe fn encode(
21225 self,
21226 encoder: &mut fidl::encoding::Encoder<
21227 '_,
21228 fidl::encoding::DefaultFuchsiaResourceDialect,
21229 >,
21230 offset: usize,
21231 depth: fidl::encoding::Depth,
21232 ) -> fidl::Result<()> {
21233 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
21234 unsafe {
21237 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
21238 (ptr as *mut u64).write_unaligned(0);
21239 }
21240 self.0.encode(encoder, offset + 0, depth)?;
21242 self.1.encode(encoder, offset + 16, depth)?;
21243 self.2.encode(encoder, offset + 24, depth)?;
21244 self.3.encode(encoder, offset + 40, depth)?;
21245 Ok(())
21246 }
21247 }
21248
21249 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21250 for DirectoryOpenRequest
21251 {
21252 #[inline(always)]
21253 fn new_empty() -> Self {
21254 Self {
21255 path: fidl::new_empty!(
21256 fidl::encoding::BoundedString<4095>,
21257 fidl::encoding::DefaultFuchsiaResourceDialect
21258 ),
21259 flags: fidl::new_empty!(Flags, fidl::encoding::DefaultFuchsiaResourceDialect),
21260 options: fidl::new_empty!(Options, fidl::encoding::DefaultFuchsiaResourceDialect),
21261 object: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21262 }
21263 }
21264
21265 #[inline]
21266 unsafe fn decode(
21267 &mut self,
21268 decoder: &mut fidl::encoding::Decoder<
21269 '_,
21270 fidl::encoding::DefaultFuchsiaResourceDialect,
21271 >,
21272 offset: usize,
21273 _depth: fidl::encoding::Depth,
21274 ) -> fidl::Result<()> {
21275 decoder.debug_check_bounds::<Self>(offset);
21276 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
21278 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21279 let mask = 0xffffffff00000000u64;
21280 let maskedval = padval & mask;
21281 if maskedval != 0 {
21282 return Err(fidl::Error::NonZeroPadding {
21283 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
21284 });
21285 }
21286 fidl::decode!(
21287 fidl::encoding::BoundedString<4095>,
21288 fidl::encoding::DefaultFuchsiaResourceDialect,
21289 &mut self.path,
21290 decoder,
21291 offset + 0,
21292 _depth
21293 )?;
21294 fidl::decode!(
21295 Flags,
21296 fidl::encoding::DefaultFuchsiaResourceDialect,
21297 &mut self.flags,
21298 decoder,
21299 offset + 16,
21300 _depth
21301 )?;
21302 fidl::decode!(
21303 Options,
21304 fidl::encoding::DefaultFuchsiaResourceDialect,
21305 &mut self.options,
21306 decoder,
21307 offset + 24,
21308 _depth
21309 )?;
21310 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.object, decoder, offset + 40, _depth)?;
21311 Ok(())
21312 }
21313 }
21314
21315 impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
21316 type Borrowed<'a> = &'a mut Self;
21317 fn take_or_borrow<'a>(
21318 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21319 ) -> Self::Borrowed<'a> {
21320 value
21321 }
21322 }
21323
21324 unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
21325 type Owned = Self;
21326
21327 #[inline(always)]
21328 fn inline_align(_context: fidl::encoding::Context) -> usize {
21329 8
21330 }
21331
21332 #[inline(always)]
21333 fn inline_size(_context: fidl::encoding::Context) -> usize {
21334 40
21335 }
21336 }
21337
21338 unsafe impl
21339 fidl::encoding::Encode<
21340 DirectoryRenameRequest,
21341 fidl::encoding::DefaultFuchsiaResourceDialect,
21342 > for &mut DirectoryRenameRequest
21343 {
21344 #[inline]
21345 unsafe fn encode(
21346 self,
21347 encoder: &mut fidl::encoding::Encoder<
21348 '_,
21349 fidl::encoding::DefaultFuchsiaResourceDialect,
21350 >,
21351 offset: usize,
21352 _depth: fidl::encoding::Depth,
21353 ) -> fidl::Result<()> {
21354 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
21355 fidl::encoding::Encode::<
21357 DirectoryRenameRequest,
21358 fidl::encoding::DefaultFuchsiaResourceDialect,
21359 >::encode(
21360 (
21361 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21362 &self.src,
21363 ),
21364 <fidl::encoding::HandleType<
21365 fidl::Event,
21366 { fidl::ObjectType::EVENT.into_raw() },
21367 2147483648,
21368 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21369 &mut self.dst_parent_token,
21370 ),
21371 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21372 &self.dst,
21373 ),
21374 ),
21375 encoder,
21376 offset,
21377 _depth,
21378 )
21379 }
21380 }
21381 unsafe impl<
21382 T0: fidl::encoding::Encode<
21383 fidl::encoding::BoundedString<255>,
21384 fidl::encoding::DefaultFuchsiaResourceDialect,
21385 >,
21386 T1: fidl::encoding::Encode<
21387 fidl::encoding::HandleType<
21388 fidl::Event,
21389 { fidl::ObjectType::EVENT.into_raw() },
21390 2147483648,
21391 >,
21392 fidl::encoding::DefaultFuchsiaResourceDialect,
21393 >,
21394 T2: fidl::encoding::Encode<
21395 fidl::encoding::BoundedString<255>,
21396 fidl::encoding::DefaultFuchsiaResourceDialect,
21397 >,
21398 >
21399 fidl::encoding::Encode<
21400 DirectoryRenameRequest,
21401 fidl::encoding::DefaultFuchsiaResourceDialect,
21402 > for (T0, T1, T2)
21403 {
21404 #[inline]
21405 unsafe fn encode(
21406 self,
21407 encoder: &mut fidl::encoding::Encoder<
21408 '_,
21409 fidl::encoding::DefaultFuchsiaResourceDialect,
21410 >,
21411 offset: usize,
21412 depth: fidl::encoding::Depth,
21413 ) -> fidl::Result<()> {
21414 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
21415 unsafe {
21418 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21419 (ptr as *mut u64).write_unaligned(0);
21420 }
21421 self.0.encode(encoder, offset + 0, depth)?;
21423 self.1.encode(encoder, offset + 16, depth)?;
21424 self.2.encode(encoder, offset + 24, depth)?;
21425 Ok(())
21426 }
21427 }
21428
21429 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21430 for DirectoryRenameRequest
21431 {
21432 #[inline(always)]
21433 fn new_empty() -> Self {
21434 Self {
21435 src: fidl::new_empty!(
21436 fidl::encoding::BoundedString<255>,
21437 fidl::encoding::DefaultFuchsiaResourceDialect
21438 ),
21439 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21440 dst: fidl::new_empty!(
21441 fidl::encoding::BoundedString<255>,
21442 fidl::encoding::DefaultFuchsiaResourceDialect
21443 ),
21444 }
21445 }
21446
21447 #[inline]
21448 unsafe fn decode(
21449 &mut self,
21450 decoder: &mut fidl::encoding::Decoder<
21451 '_,
21452 fidl::encoding::DefaultFuchsiaResourceDialect,
21453 >,
21454 offset: usize,
21455 _depth: fidl::encoding::Depth,
21456 ) -> fidl::Result<()> {
21457 decoder.debug_check_bounds::<Self>(offset);
21458 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21460 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21461 let mask = 0xffffffff00000000u64;
21462 let maskedval = padval & mask;
21463 if maskedval != 0 {
21464 return Err(fidl::Error::NonZeroPadding {
21465 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21466 });
21467 }
21468 fidl::decode!(
21469 fidl::encoding::BoundedString<255>,
21470 fidl::encoding::DefaultFuchsiaResourceDialect,
21471 &mut self.src,
21472 decoder,
21473 offset + 0,
21474 _depth
21475 )?;
21476 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)?;
21477 fidl::decode!(
21478 fidl::encoding::BoundedString<255>,
21479 fidl::encoding::DefaultFuchsiaResourceDialect,
21480 &mut self.dst,
21481 decoder,
21482 offset + 24,
21483 _depth
21484 )?;
21485 Ok(())
21486 }
21487 }
21488
21489 impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
21490 type Borrowed<'a> = &'a mut Self;
21491 fn take_or_borrow<'a>(
21492 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21493 ) -> Self::Borrowed<'a> {
21494 value
21495 }
21496 }
21497
21498 unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
21499 type Owned = Self;
21500
21501 #[inline(always)]
21502 fn inline_align(_context: fidl::encoding::Context) -> usize {
21503 4
21504 }
21505
21506 #[inline(always)]
21507 fn inline_size(_context: fidl::encoding::Context) -> usize {
21508 12
21509 }
21510 }
21511
21512 unsafe impl
21513 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21514 for &mut DirectoryWatchRequest
21515 {
21516 #[inline]
21517 unsafe fn encode(
21518 self,
21519 encoder: &mut fidl::encoding::Encoder<
21520 '_,
21521 fidl::encoding::DefaultFuchsiaResourceDialect,
21522 >,
21523 offset: usize,
21524 _depth: fidl::encoding::Depth,
21525 ) -> fidl::Result<()> {
21526 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
21527 fidl::encoding::Encode::<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21529 (
21530 <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
21531 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
21532 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.watcher),
21533 ),
21534 encoder, offset, _depth
21535 )
21536 }
21537 }
21538 unsafe impl<
21539 T0: fidl::encoding::Encode<WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect>,
21540 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
21541 T2: fidl::encoding::Encode<
21542 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21543 fidl::encoding::DefaultFuchsiaResourceDialect,
21544 >,
21545 >
21546 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21547 for (T0, T1, T2)
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 self.0.encode(encoder, offset + 0, depth)?;
21564 self.1.encode(encoder, offset + 4, depth)?;
21565 self.2.encode(encoder, offset + 8, depth)?;
21566 Ok(())
21567 }
21568 }
21569
21570 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21571 for DirectoryWatchRequest
21572 {
21573 #[inline(always)]
21574 fn new_empty() -> Self {
21575 Self {
21576 mask: fidl::new_empty!(WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect),
21577 options: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
21578 watcher: fidl::new_empty!(
21579 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21580 fidl::encoding::DefaultFuchsiaResourceDialect
21581 ),
21582 }
21583 }
21584
21585 #[inline]
21586 unsafe fn decode(
21587 &mut self,
21588 decoder: &mut fidl::encoding::Decoder<
21589 '_,
21590 fidl::encoding::DefaultFuchsiaResourceDialect,
21591 >,
21592 offset: usize,
21593 _depth: fidl::encoding::Depth,
21594 ) -> fidl::Result<()> {
21595 decoder.debug_check_bounds::<Self>(offset);
21596 fidl::decode!(
21598 WatchMask,
21599 fidl::encoding::DefaultFuchsiaResourceDialect,
21600 &mut self.mask,
21601 decoder,
21602 offset + 0,
21603 _depth
21604 )?;
21605 fidl::decode!(
21606 u32,
21607 fidl::encoding::DefaultFuchsiaResourceDialect,
21608 &mut self.options,
21609 decoder,
21610 offset + 4,
21611 _depth
21612 )?;
21613 fidl::decode!(
21614 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21615 fidl::encoding::DefaultFuchsiaResourceDialect,
21616 &mut self.watcher,
21617 decoder,
21618 offset + 8,
21619 _depth
21620 )?;
21621 Ok(())
21622 }
21623 }
21624
21625 impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
21626 type Borrowed<'a> = &'a mut Self;
21627 fn take_or_borrow<'a>(
21628 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21629 ) -> Self::Borrowed<'a> {
21630 value
21631 }
21632 }
21633
21634 unsafe impl fidl::encoding::TypeMarker for FileAllocateRequest {
21635 type Owned = Self;
21636
21637 #[inline(always)]
21638 fn inline_align(_context: fidl::encoding::Context) -> usize {
21639 8
21640 }
21641
21642 #[inline(always)]
21643 fn inline_size(_context: fidl::encoding::Context) -> usize {
21644 24
21645 }
21646 }
21647
21648 unsafe impl
21649 fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21650 for &mut FileAllocateRequest
21651 {
21652 #[inline]
21653 unsafe fn encode(
21654 self,
21655 encoder: &mut fidl::encoding::Encoder<
21656 '_,
21657 fidl::encoding::DefaultFuchsiaResourceDialect,
21658 >,
21659 offset: usize,
21660 _depth: fidl::encoding::Depth,
21661 ) -> fidl::Result<()> {
21662 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
21663 fidl::encoding::Encode::<
21665 FileAllocateRequest,
21666 fidl::encoding::DefaultFuchsiaResourceDialect,
21667 >::encode(
21668 (
21669 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
21670 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
21671 <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
21672 ),
21673 encoder,
21674 offset,
21675 _depth,
21676 )
21677 }
21678 }
21679 unsafe impl<
21680 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
21681 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
21682 T2: fidl::encoding::Encode<AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect>,
21683 >
21684 fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21685 for (T0, T1, T2)
21686 {
21687 #[inline]
21688 unsafe fn encode(
21689 self,
21690 encoder: &mut fidl::encoding::Encoder<
21691 '_,
21692 fidl::encoding::DefaultFuchsiaResourceDialect,
21693 >,
21694 offset: usize,
21695 depth: fidl::encoding::Depth,
21696 ) -> fidl::Result<()> {
21697 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
21698 unsafe {
21701 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21702 (ptr as *mut u64).write_unaligned(0);
21703 }
21704 self.0.encode(encoder, offset + 0, depth)?;
21706 self.1.encode(encoder, offset + 8, depth)?;
21707 self.2.encode(encoder, offset + 16, depth)?;
21708 Ok(())
21709 }
21710 }
21711
21712 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21713 for FileAllocateRequest
21714 {
21715 #[inline(always)]
21716 fn new_empty() -> Self {
21717 Self {
21718 offset: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
21719 length: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
21720 mode: fidl::new_empty!(AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect),
21721 }
21722 }
21723
21724 #[inline]
21725 unsafe fn decode(
21726 &mut self,
21727 decoder: &mut fidl::encoding::Decoder<
21728 '_,
21729 fidl::encoding::DefaultFuchsiaResourceDialect,
21730 >,
21731 offset: usize,
21732 _depth: fidl::encoding::Depth,
21733 ) -> fidl::Result<()> {
21734 decoder.debug_check_bounds::<Self>(offset);
21735 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21737 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21738 let mask = 0xffffffff00000000u64;
21739 let maskedval = padval & mask;
21740 if maskedval != 0 {
21741 return Err(fidl::Error::NonZeroPadding {
21742 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21743 });
21744 }
21745 fidl::decode!(
21746 u64,
21747 fidl::encoding::DefaultFuchsiaResourceDialect,
21748 &mut self.offset,
21749 decoder,
21750 offset + 0,
21751 _depth
21752 )?;
21753 fidl::decode!(
21754 u64,
21755 fidl::encoding::DefaultFuchsiaResourceDialect,
21756 &mut self.length,
21757 decoder,
21758 offset + 8,
21759 _depth
21760 )?;
21761 fidl::decode!(
21762 AllocateMode,
21763 fidl::encoding::DefaultFuchsiaResourceDialect,
21764 &mut self.mode,
21765 decoder,
21766 offset + 16,
21767 _depth
21768 )?;
21769 Ok(())
21770 }
21771 }
21772
21773 impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
21774 type Borrowed<'a> = &'a mut Self;
21775 fn take_or_borrow<'a>(
21776 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21777 ) -> Self::Borrowed<'a> {
21778 value
21779 }
21780 }
21781
21782 unsafe impl fidl::encoding::TypeMarker for FileEnableVerityRequest {
21783 type Owned = Self;
21784
21785 #[inline(always)]
21786 fn inline_align(_context: fidl::encoding::Context) -> usize {
21787 8
21788 }
21789
21790 #[inline(always)]
21791 fn inline_size(_context: fidl::encoding::Context) -> usize {
21792 16
21793 }
21794 }
21795
21796 unsafe impl
21797 fidl::encoding::Encode<
21798 FileEnableVerityRequest,
21799 fidl::encoding::DefaultFuchsiaResourceDialect,
21800 > for &mut FileEnableVerityRequest
21801 {
21802 #[inline]
21803 unsafe fn encode(
21804 self,
21805 encoder: &mut fidl::encoding::Encoder<
21806 '_,
21807 fidl::encoding::DefaultFuchsiaResourceDialect,
21808 >,
21809 offset: usize,
21810 _depth: fidl::encoding::Depth,
21811 ) -> fidl::Result<()> {
21812 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
21813 fidl::encoding::Encode::<
21815 FileEnableVerityRequest,
21816 fidl::encoding::DefaultFuchsiaResourceDialect,
21817 >::encode(
21818 (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
21819 encoder,
21820 offset,
21821 _depth,
21822 )
21823 }
21824 }
21825 unsafe impl<
21826 T0: fidl::encoding::Encode<
21827 VerificationOptions,
21828 fidl::encoding::DefaultFuchsiaResourceDialect,
21829 >,
21830 >
21831 fidl::encoding::Encode<
21832 FileEnableVerityRequest,
21833 fidl::encoding::DefaultFuchsiaResourceDialect,
21834 > for (T0,)
21835 {
21836 #[inline]
21837 unsafe fn encode(
21838 self,
21839 encoder: &mut fidl::encoding::Encoder<
21840 '_,
21841 fidl::encoding::DefaultFuchsiaResourceDialect,
21842 >,
21843 offset: usize,
21844 depth: fidl::encoding::Depth,
21845 ) -> fidl::Result<()> {
21846 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
21847 self.0.encode(encoder, offset + 0, depth)?;
21851 Ok(())
21852 }
21853 }
21854
21855 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21856 for FileEnableVerityRequest
21857 {
21858 #[inline(always)]
21859 fn new_empty() -> Self {
21860 Self {
21861 options: fidl::new_empty!(
21862 VerificationOptions,
21863 fidl::encoding::DefaultFuchsiaResourceDialect
21864 ),
21865 }
21866 }
21867
21868 #[inline]
21869 unsafe fn decode(
21870 &mut self,
21871 decoder: &mut fidl::encoding::Decoder<
21872 '_,
21873 fidl::encoding::DefaultFuchsiaResourceDialect,
21874 >,
21875 offset: usize,
21876 _depth: fidl::encoding::Depth,
21877 ) -> fidl::Result<()> {
21878 decoder.debug_check_bounds::<Self>(offset);
21879 fidl::decode!(
21881 VerificationOptions,
21882 fidl::encoding::DefaultFuchsiaResourceDialect,
21883 &mut self.options,
21884 decoder,
21885 offset + 0,
21886 _depth
21887 )?;
21888 Ok(())
21889 }
21890 }
21891
21892 impl fidl::encoding::ResourceTypeMarker for FileObject {
21893 type Borrowed<'a> = &'a mut Self;
21894 fn take_or_borrow<'a>(
21895 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21896 ) -> Self::Borrowed<'a> {
21897 value
21898 }
21899 }
21900
21901 unsafe impl fidl::encoding::TypeMarker for FileObject {
21902 type Owned = Self;
21903
21904 #[inline(always)]
21905 fn inline_align(_context: fidl::encoding::Context) -> usize {
21906 4
21907 }
21908
21909 #[inline(always)]
21910 fn inline_size(_context: fidl::encoding::Context) -> usize {
21911 8
21912 }
21913 }
21914
21915 unsafe impl fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
21916 for &mut FileObject
21917 {
21918 #[inline]
21919 unsafe fn encode(
21920 self,
21921 encoder: &mut fidl::encoding::Encoder<
21922 '_,
21923 fidl::encoding::DefaultFuchsiaResourceDialect,
21924 >,
21925 offset: usize,
21926 _depth: fidl::encoding::Depth,
21927 ) -> fidl::Result<()> {
21928 encoder.debug_check_bounds::<FileObject>(offset);
21929 fidl::encoding::Encode::<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21931 (
21932 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.event),
21933 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.stream),
21934 ),
21935 encoder, offset, _depth
21936 )
21937 }
21938 }
21939 unsafe impl<
21940 T0: fidl::encoding::Encode<
21941 fidl::encoding::Optional<
21942 fidl::encoding::HandleType<
21943 fidl::Event,
21944 { fidl::ObjectType::EVENT.into_raw() },
21945 2147483648,
21946 >,
21947 >,
21948 fidl::encoding::DefaultFuchsiaResourceDialect,
21949 >,
21950 T1: fidl::encoding::Encode<
21951 fidl::encoding::Optional<
21952 fidl::encoding::HandleType<
21953 fidl::Stream,
21954 { fidl::ObjectType::STREAM.into_raw() },
21955 2147483648,
21956 >,
21957 >,
21958 fidl::encoding::DefaultFuchsiaResourceDialect,
21959 >,
21960 > fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
21961 for (T0, T1)
21962 {
21963 #[inline]
21964 unsafe fn encode(
21965 self,
21966 encoder: &mut fidl::encoding::Encoder<
21967 '_,
21968 fidl::encoding::DefaultFuchsiaResourceDialect,
21969 >,
21970 offset: usize,
21971 depth: fidl::encoding::Depth,
21972 ) -> fidl::Result<()> {
21973 encoder.debug_check_bounds::<FileObject>(offset);
21974 self.0.encode(encoder, offset + 0, depth)?;
21978 self.1.encode(encoder, offset + 4, depth)?;
21979 Ok(())
21980 }
21981 }
21982
21983 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {
21984 #[inline(always)]
21985 fn new_empty() -> Self {
21986 Self {
21987 event: fidl::new_empty!(
21988 fidl::encoding::Optional<
21989 fidl::encoding::HandleType<
21990 fidl::Event,
21991 { fidl::ObjectType::EVENT.into_raw() },
21992 2147483648,
21993 >,
21994 >,
21995 fidl::encoding::DefaultFuchsiaResourceDialect
21996 ),
21997 stream: fidl::new_empty!(
21998 fidl::encoding::Optional<
21999 fidl::encoding::HandleType<
22000 fidl::Stream,
22001 { fidl::ObjectType::STREAM.into_raw() },
22002 2147483648,
22003 >,
22004 >,
22005 fidl::encoding::DefaultFuchsiaResourceDialect
22006 ),
22007 }
22008 }
22009
22010 #[inline]
22011 unsafe fn decode(
22012 &mut self,
22013 decoder: &mut fidl::encoding::Decoder<
22014 '_,
22015 fidl::encoding::DefaultFuchsiaResourceDialect,
22016 >,
22017 offset: usize,
22018 _depth: fidl::encoding::Depth,
22019 ) -> fidl::Result<()> {
22020 decoder.debug_check_bounds::<Self>(offset);
22021 fidl::decode!(
22023 fidl::encoding::Optional<
22024 fidl::encoding::HandleType<
22025 fidl::Event,
22026 { fidl::ObjectType::EVENT.into_raw() },
22027 2147483648,
22028 >,
22029 >,
22030 fidl::encoding::DefaultFuchsiaResourceDialect,
22031 &mut self.event,
22032 decoder,
22033 offset + 0,
22034 _depth
22035 )?;
22036 fidl::decode!(
22037 fidl::encoding::Optional<
22038 fidl::encoding::HandleType<
22039 fidl::Stream,
22040 { fidl::ObjectType::STREAM.into_raw() },
22041 2147483648,
22042 >,
22043 >,
22044 fidl::encoding::DefaultFuchsiaResourceDialect,
22045 &mut self.stream,
22046 decoder,
22047 offset + 4,
22048 _depth
22049 )?;
22050 Ok(())
22051 }
22052 }
22053
22054 impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
22055 type Borrowed<'a> = &'a mut Self;
22056 fn take_or_borrow<'a>(
22057 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22058 ) -> Self::Borrowed<'a> {
22059 value
22060 }
22061 }
22062
22063 unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
22064 type Owned = Self;
22065
22066 #[inline(always)]
22067 fn inline_align(_context: fidl::encoding::Context) -> usize {
22068 4
22069 }
22070
22071 #[inline(always)]
22072 fn inline_size(_context: fidl::encoding::Context) -> usize {
22073 4
22074 }
22075 }
22076
22077 unsafe impl
22078 fidl::encoding::Encode<
22079 FileGetBackingMemoryResponse,
22080 fidl::encoding::DefaultFuchsiaResourceDialect,
22081 > for &mut FileGetBackingMemoryResponse
22082 {
22083 #[inline]
22084 unsafe fn encode(
22085 self,
22086 encoder: &mut fidl::encoding::Encoder<
22087 '_,
22088 fidl::encoding::DefaultFuchsiaResourceDialect,
22089 >,
22090 offset: usize,
22091 _depth: fidl::encoding::Depth,
22092 ) -> fidl::Result<()> {
22093 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
22094 fidl::encoding::Encode::<
22096 FileGetBackingMemoryResponse,
22097 fidl::encoding::DefaultFuchsiaResourceDialect,
22098 >::encode(
22099 (<fidl::encoding::HandleType<
22100 fidl::Vmo,
22101 { fidl::ObjectType::VMO.into_raw() },
22102 2147483648,
22103 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22104 &mut self.vmo
22105 ),),
22106 encoder,
22107 offset,
22108 _depth,
22109 )
22110 }
22111 }
22112 unsafe impl<
22113 T0: fidl::encoding::Encode<
22114 fidl::encoding::HandleType<
22115 fidl::Vmo,
22116 { fidl::ObjectType::VMO.into_raw() },
22117 2147483648,
22118 >,
22119 fidl::encoding::DefaultFuchsiaResourceDialect,
22120 >,
22121 >
22122 fidl::encoding::Encode<
22123 FileGetBackingMemoryResponse,
22124 fidl::encoding::DefaultFuchsiaResourceDialect,
22125 > for (T0,)
22126 {
22127 #[inline]
22128 unsafe fn encode(
22129 self,
22130 encoder: &mut fidl::encoding::Encoder<
22131 '_,
22132 fidl::encoding::DefaultFuchsiaResourceDialect,
22133 >,
22134 offset: usize,
22135 depth: fidl::encoding::Depth,
22136 ) -> fidl::Result<()> {
22137 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
22138 self.0.encode(encoder, offset + 0, depth)?;
22142 Ok(())
22143 }
22144 }
22145
22146 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22147 for FileGetBackingMemoryResponse
22148 {
22149 #[inline(always)]
22150 fn new_empty() -> Self {
22151 Self {
22152 vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22153 }
22154 }
22155
22156 #[inline]
22157 unsafe fn decode(
22158 &mut self,
22159 decoder: &mut fidl::encoding::Decoder<
22160 '_,
22161 fidl::encoding::DefaultFuchsiaResourceDialect,
22162 >,
22163 offset: usize,
22164 _depth: fidl::encoding::Depth,
22165 ) -> fidl::Result<()> {
22166 decoder.debug_check_bounds::<Self>(offset);
22167 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
22169 Ok(())
22170 }
22171 }
22172
22173 impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
22174 type Borrowed<'a> = &'a mut Self;
22175 fn take_or_borrow<'a>(
22176 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22177 ) -> Self::Borrowed<'a> {
22178 value
22179 }
22180 }
22181
22182 unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
22183 type Owned = Self;
22184
22185 #[inline(always)]
22186 fn inline_align(_context: fidl::encoding::Context) -> usize {
22187 8
22188 }
22189
22190 #[inline(always)]
22191 fn inline_size(_context: fidl::encoding::Context) -> usize {
22192 24
22193 }
22194 }
22195
22196 unsafe impl
22197 fidl::encoding::Encode<
22198 LinkableLinkIntoRequest,
22199 fidl::encoding::DefaultFuchsiaResourceDialect,
22200 > for &mut LinkableLinkIntoRequest
22201 {
22202 #[inline]
22203 unsafe fn encode(
22204 self,
22205 encoder: &mut fidl::encoding::Encoder<
22206 '_,
22207 fidl::encoding::DefaultFuchsiaResourceDialect,
22208 >,
22209 offset: usize,
22210 _depth: fidl::encoding::Depth,
22211 ) -> fidl::Result<()> {
22212 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
22213 fidl::encoding::Encode::<
22215 LinkableLinkIntoRequest,
22216 fidl::encoding::DefaultFuchsiaResourceDialect,
22217 >::encode(
22218 (
22219 <fidl::encoding::HandleType<
22220 fidl::Event,
22221 { fidl::ObjectType::EVENT.into_raw() },
22222 2147483648,
22223 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22224 &mut self.dst_parent_token,
22225 ),
22226 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
22227 &self.dst,
22228 ),
22229 ),
22230 encoder,
22231 offset,
22232 _depth,
22233 )
22234 }
22235 }
22236 unsafe impl<
22237 T0: fidl::encoding::Encode<
22238 fidl::encoding::HandleType<
22239 fidl::Event,
22240 { fidl::ObjectType::EVENT.into_raw() },
22241 2147483648,
22242 >,
22243 fidl::encoding::DefaultFuchsiaResourceDialect,
22244 >,
22245 T1: fidl::encoding::Encode<
22246 fidl::encoding::BoundedString<255>,
22247 fidl::encoding::DefaultFuchsiaResourceDialect,
22248 >,
22249 >
22250 fidl::encoding::Encode<
22251 LinkableLinkIntoRequest,
22252 fidl::encoding::DefaultFuchsiaResourceDialect,
22253 > for (T0, T1)
22254 {
22255 #[inline]
22256 unsafe fn encode(
22257 self,
22258 encoder: &mut fidl::encoding::Encoder<
22259 '_,
22260 fidl::encoding::DefaultFuchsiaResourceDialect,
22261 >,
22262 offset: usize,
22263 depth: fidl::encoding::Depth,
22264 ) -> fidl::Result<()> {
22265 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
22266 unsafe {
22269 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22270 (ptr as *mut u64).write_unaligned(0);
22271 }
22272 self.0.encode(encoder, offset + 0, depth)?;
22274 self.1.encode(encoder, offset + 8, depth)?;
22275 Ok(())
22276 }
22277 }
22278
22279 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22280 for LinkableLinkIntoRequest
22281 {
22282 #[inline(always)]
22283 fn new_empty() -> Self {
22284 Self {
22285 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22286 dst: fidl::new_empty!(
22287 fidl::encoding::BoundedString<255>,
22288 fidl::encoding::DefaultFuchsiaResourceDialect
22289 ),
22290 }
22291 }
22292
22293 #[inline]
22294 unsafe fn decode(
22295 &mut self,
22296 decoder: &mut fidl::encoding::Decoder<
22297 '_,
22298 fidl::encoding::DefaultFuchsiaResourceDialect,
22299 >,
22300 offset: usize,
22301 _depth: fidl::encoding::Depth,
22302 ) -> fidl::Result<()> {
22303 decoder.debug_check_bounds::<Self>(offset);
22304 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
22306 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22307 let mask = 0xffffffff00000000u64;
22308 let maskedval = padval & mask;
22309 if maskedval != 0 {
22310 return Err(fidl::Error::NonZeroPadding {
22311 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22312 });
22313 }
22314 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)?;
22315 fidl::decode!(
22316 fidl::encoding::BoundedString<255>,
22317 fidl::encoding::DefaultFuchsiaResourceDialect,
22318 &mut self.dst,
22319 decoder,
22320 offset + 8,
22321 _depth
22322 )?;
22323 Ok(())
22324 }
22325 }
22326
22327 impl fidl::encoding::ResourceTypeMarker for NodeDeprecatedCloneRequest {
22328 type Borrowed<'a> = &'a mut Self;
22329 fn take_or_borrow<'a>(
22330 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22331 ) -> Self::Borrowed<'a> {
22332 value
22333 }
22334 }
22335
22336 unsafe impl fidl::encoding::TypeMarker for NodeDeprecatedCloneRequest {
22337 type Owned = Self;
22338
22339 #[inline(always)]
22340 fn inline_align(_context: fidl::encoding::Context) -> usize {
22341 4
22342 }
22343
22344 #[inline(always)]
22345 fn inline_size(_context: fidl::encoding::Context) -> usize {
22346 8
22347 }
22348 }
22349
22350 unsafe impl
22351 fidl::encoding::Encode<
22352 NodeDeprecatedCloneRequest,
22353 fidl::encoding::DefaultFuchsiaResourceDialect,
22354 > for &mut NodeDeprecatedCloneRequest
22355 {
22356 #[inline]
22357 unsafe fn encode(
22358 self,
22359 encoder: &mut fidl::encoding::Encoder<
22360 '_,
22361 fidl::encoding::DefaultFuchsiaResourceDialect,
22362 >,
22363 offset: usize,
22364 _depth: fidl::encoding::Depth,
22365 ) -> fidl::Result<()> {
22366 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
22367 fidl::encoding::Encode::<NodeDeprecatedCloneRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22369 (
22370 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
22371 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
22372 ),
22373 encoder, offset, _depth
22374 )
22375 }
22376 }
22377 unsafe impl<
22378 T0: fidl::encoding::Encode<OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect>,
22379 T1: fidl::encoding::Encode<
22380 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22381 fidl::encoding::DefaultFuchsiaResourceDialect,
22382 >,
22383 >
22384 fidl::encoding::Encode<
22385 NodeDeprecatedCloneRequest,
22386 fidl::encoding::DefaultFuchsiaResourceDialect,
22387 > for (T0, T1)
22388 {
22389 #[inline]
22390 unsafe fn encode(
22391 self,
22392 encoder: &mut fidl::encoding::Encoder<
22393 '_,
22394 fidl::encoding::DefaultFuchsiaResourceDialect,
22395 >,
22396 offset: usize,
22397 depth: fidl::encoding::Depth,
22398 ) -> fidl::Result<()> {
22399 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
22400 self.0.encode(encoder, offset + 0, depth)?;
22404 self.1.encode(encoder, offset + 4, depth)?;
22405 Ok(())
22406 }
22407 }
22408
22409 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22410 for NodeDeprecatedCloneRequest
22411 {
22412 #[inline(always)]
22413 fn new_empty() -> Self {
22414 Self {
22415 flags: fidl::new_empty!(OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect),
22416 object: fidl::new_empty!(
22417 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22418 fidl::encoding::DefaultFuchsiaResourceDialect
22419 ),
22420 }
22421 }
22422
22423 #[inline]
22424 unsafe fn decode(
22425 &mut self,
22426 decoder: &mut fidl::encoding::Decoder<
22427 '_,
22428 fidl::encoding::DefaultFuchsiaResourceDialect,
22429 >,
22430 offset: usize,
22431 _depth: fidl::encoding::Depth,
22432 ) -> fidl::Result<()> {
22433 decoder.debug_check_bounds::<Self>(offset);
22434 fidl::decode!(
22436 OpenFlags,
22437 fidl::encoding::DefaultFuchsiaResourceDialect,
22438 &mut self.flags,
22439 decoder,
22440 offset + 0,
22441 _depth
22442 )?;
22443 fidl::decode!(
22444 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22445 fidl::encoding::DefaultFuchsiaResourceDialect,
22446 &mut self.object,
22447 decoder,
22448 offset + 4,
22449 _depth
22450 )?;
22451 Ok(())
22452 }
22453 }
22454
22455 impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
22456 type Borrowed<'a> = &'a mut Self;
22457 fn take_or_borrow<'a>(
22458 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22459 ) -> Self::Borrowed<'a> {
22460 value
22461 }
22462 }
22463
22464 unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
22465 type Owned = Self;
22466
22467 #[inline(always)]
22468 fn inline_align(_context: fidl::encoding::Context) -> usize {
22469 4
22470 }
22471
22472 #[inline(always)]
22473 fn inline_size(_context: fidl::encoding::Context) -> usize {
22474 4
22475 }
22476 }
22477
22478 unsafe impl
22479 fidl::encoding::Encode<
22480 NodeListExtendedAttributesRequest,
22481 fidl::encoding::DefaultFuchsiaResourceDialect,
22482 > for &mut NodeListExtendedAttributesRequest
22483 {
22484 #[inline]
22485 unsafe fn encode(
22486 self,
22487 encoder: &mut fidl::encoding::Encoder<
22488 '_,
22489 fidl::encoding::DefaultFuchsiaResourceDialect,
22490 >,
22491 offset: usize,
22492 _depth: fidl::encoding::Depth,
22493 ) -> fidl::Result<()> {
22494 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
22495 fidl::encoding::Encode::<
22497 NodeListExtendedAttributesRequest,
22498 fidl::encoding::DefaultFuchsiaResourceDialect,
22499 >::encode(
22500 (<fidl::encoding::Endpoint<
22501 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22502 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22503 &mut self.iterator
22504 ),),
22505 encoder,
22506 offset,
22507 _depth,
22508 )
22509 }
22510 }
22511 unsafe impl<
22512 T0: fidl::encoding::Encode<
22513 fidl::encoding::Endpoint<
22514 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22515 >,
22516 fidl::encoding::DefaultFuchsiaResourceDialect,
22517 >,
22518 >
22519 fidl::encoding::Encode<
22520 NodeListExtendedAttributesRequest,
22521 fidl::encoding::DefaultFuchsiaResourceDialect,
22522 > for (T0,)
22523 {
22524 #[inline]
22525 unsafe fn encode(
22526 self,
22527 encoder: &mut fidl::encoding::Encoder<
22528 '_,
22529 fidl::encoding::DefaultFuchsiaResourceDialect,
22530 >,
22531 offset: usize,
22532 depth: fidl::encoding::Depth,
22533 ) -> fidl::Result<()> {
22534 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
22535 self.0.encode(encoder, offset + 0, depth)?;
22539 Ok(())
22540 }
22541 }
22542
22543 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22544 for NodeListExtendedAttributesRequest
22545 {
22546 #[inline(always)]
22547 fn new_empty() -> Self {
22548 Self {
22549 iterator: fidl::new_empty!(
22550 fidl::encoding::Endpoint<
22551 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22552 >,
22553 fidl::encoding::DefaultFuchsiaResourceDialect
22554 ),
22555 }
22556 }
22557
22558 #[inline]
22559 unsafe fn decode(
22560 &mut self,
22561 decoder: &mut fidl::encoding::Decoder<
22562 '_,
22563 fidl::encoding::DefaultFuchsiaResourceDialect,
22564 >,
22565 offset: usize,
22566 _depth: fidl::encoding::Depth,
22567 ) -> fidl::Result<()> {
22568 decoder.debug_check_bounds::<Self>(offset);
22569 fidl::decode!(
22571 fidl::encoding::Endpoint<
22572 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22573 >,
22574 fidl::encoding::DefaultFuchsiaResourceDialect,
22575 &mut self.iterator,
22576 decoder,
22577 offset + 0,
22578 _depth
22579 )?;
22580 Ok(())
22581 }
22582 }
22583
22584 impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
22585 type Borrowed<'a> = &'a mut Self;
22586 fn take_or_borrow<'a>(
22587 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22588 ) -> Self::Borrowed<'a> {
22589 value
22590 }
22591 }
22592
22593 unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
22594 type Owned = Self;
22595
22596 #[inline(always)]
22597 fn inline_align(_context: fidl::encoding::Context) -> usize {
22598 8
22599 }
22600
22601 #[inline(always)]
22602 fn inline_size(_context: fidl::encoding::Context) -> usize {
22603 24
22604 }
22605 }
22606
22607 unsafe impl
22608 fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22609 for &mut NodeOnOpenRequest
22610 {
22611 #[inline]
22612 unsafe fn encode(
22613 self,
22614 encoder: &mut fidl::encoding::Encoder<
22615 '_,
22616 fidl::encoding::DefaultFuchsiaResourceDialect,
22617 >,
22618 offset: usize,
22619 _depth: fidl::encoding::Depth,
22620 ) -> fidl::Result<()> {
22621 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
22622 fidl::encoding::Encode::<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22624 (
22625 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
22626 <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
22627 ),
22628 encoder, offset, _depth
22629 )
22630 }
22631 }
22632 unsafe impl<
22633 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
22634 T1: fidl::encoding::Encode<
22635 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22636 fidl::encoding::DefaultFuchsiaResourceDialect,
22637 >,
22638 >
22639 fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22640 for (T0, T1)
22641 {
22642 #[inline]
22643 unsafe fn encode(
22644 self,
22645 encoder: &mut fidl::encoding::Encoder<
22646 '_,
22647 fidl::encoding::DefaultFuchsiaResourceDialect,
22648 >,
22649 offset: usize,
22650 depth: fidl::encoding::Depth,
22651 ) -> fidl::Result<()> {
22652 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
22653 unsafe {
22656 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22657 (ptr as *mut u64).write_unaligned(0);
22658 }
22659 self.0.encode(encoder, offset + 0, depth)?;
22661 self.1.encode(encoder, offset + 8, depth)?;
22662 Ok(())
22663 }
22664 }
22665
22666 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22667 for NodeOnOpenRequest
22668 {
22669 #[inline(always)]
22670 fn new_empty() -> Self {
22671 Self {
22672 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
22673 info: fidl::new_empty!(
22674 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22675 fidl::encoding::DefaultFuchsiaResourceDialect
22676 ),
22677 }
22678 }
22679
22680 #[inline]
22681 unsafe fn decode(
22682 &mut self,
22683 decoder: &mut fidl::encoding::Decoder<
22684 '_,
22685 fidl::encoding::DefaultFuchsiaResourceDialect,
22686 >,
22687 offset: usize,
22688 _depth: fidl::encoding::Depth,
22689 ) -> fidl::Result<()> {
22690 decoder.debug_check_bounds::<Self>(offset);
22691 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
22693 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22694 let mask = 0xffffffff00000000u64;
22695 let maskedval = padval & mask;
22696 if maskedval != 0 {
22697 return Err(fidl::Error::NonZeroPadding {
22698 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22699 });
22700 }
22701 fidl::decode!(
22702 i32,
22703 fidl::encoding::DefaultFuchsiaResourceDialect,
22704 &mut self.s,
22705 decoder,
22706 offset + 0,
22707 _depth
22708 )?;
22709 fidl::decode!(
22710 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22711 fidl::encoding::DefaultFuchsiaResourceDialect,
22712 &mut self.info,
22713 decoder,
22714 offset + 8,
22715 _depth
22716 )?;
22717 Ok(())
22718 }
22719 }
22720
22721 impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
22722 type Borrowed<'a> = &'a mut Self;
22723 fn take_or_borrow<'a>(
22724 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22725 ) -> Self::Borrowed<'a> {
22726 value
22727 }
22728 }
22729
22730 unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
22731 type Owned = Self;
22732
22733 #[inline(always)]
22734 fn inline_align(_context: fidl::encoding::Context) -> usize {
22735 8
22736 }
22737
22738 #[inline(always)]
22739 fn inline_size(_context: fidl::encoding::Context) -> usize {
22740 40
22741 }
22742 }
22743
22744 unsafe impl
22745 fidl::encoding::Encode<
22746 NodeSetExtendedAttributeRequest,
22747 fidl::encoding::DefaultFuchsiaResourceDialect,
22748 > for &mut NodeSetExtendedAttributeRequest
22749 {
22750 #[inline]
22751 unsafe fn encode(
22752 self,
22753 encoder: &mut fidl::encoding::Encoder<
22754 '_,
22755 fidl::encoding::DefaultFuchsiaResourceDialect,
22756 >,
22757 offset: usize,
22758 _depth: fidl::encoding::Depth,
22759 ) -> fidl::Result<()> {
22760 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
22761 fidl::encoding::Encode::<
22763 NodeSetExtendedAttributeRequest,
22764 fidl::encoding::DefaultFuchsiaResourceDialect,
22765 >::encode(
22766 (
22767 <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
22768 &self.name,
22769 ),
22770 <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22771 &mut self.value,
22772 ),
22773 <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
22774 &self.mode,
22775 ),
22776 ),
22777 encoder,
22778 offset,
22779 _depth,
22780 )
22781 }
22782 }
22783 unsafe impl<
22784 T0: fidl::encoding::Encode<
22785 fidl::encoding::Vector<u8, 255>,
22786 fidl::encoding::DefaultFuchsiaResourceDialect,
22787 >,
22788 T1: fidl::encoding::Encode<
22789 ExtendedAttributeValue,
22790 fidl::encoding::DefaultFuchsiaResourceDialect,
22791 >,
22792 T2: fidl::encoding::Encode<
22793 SetExtendedAttributeMode,
22794 fidl::encoding::DefaultFuchsiaResourceDialect,
22795 >,
22796 >
22797 fidl::encoding::Encode<
22798 NodeSetExtendedAttributeRequest,
22799 fidl::encoding::DefaultFuchsiaResourceDialect,
22800 > for (T0, T1, T2)
22801 {
22802 #[inline]
22803 unsafe fn encode(
22804 self,
22805 encoder: &mut fidl::encoding::Encoder<
22806 '_,
22807 fidl::encoding::DefaultFuchsiaResourceDialect,
22808 >,
22809 offset: usize,
22810 depth: fidl::encoding::Depth,
22811 ) -> fidl::Result<()> {
22812 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
22813 unsafe {
22816 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
22817 (ptr as *mut u64).write_unaligned(0);
22818 }
22819 self.0.encode(encoder, offset + 0, depth)?;
22821 self.1.encode(encoder, offset + 16, depth)?;
22822 self.2.encode(encoder, offset + 32, depth)?;
22823 Ok(())
22824 }
22825 }
22826
22827 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22828 for NodeSetExtendedAttributeRequest
22829 {
22830 #[inline(always)]
22831 fn new_empty() -> Self {
22832 Self {
22833 name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect),
22834 value: fidl::new_empty!(
22835 ExtendedAttributeValue,
22836 fidl::encoding::DefaultFuchsiaResourceDialect
22837 ),
22838 mode: fidl::new_empty!(
22839 SetExtendedAttributeMode,
22840 fidl::encoding::DefaultFuchsiaResourceDialect
22841 ),
22842 }
22843 }
22844
22845 #[inline]
22846 unsafe fn decode(
22847 &mut self,
22848 decoder: &mut fidl::encoding::Decoder<
22849 '_,
22850 fidl::encoding::DefaultFuchsiaResourceDialect,
22851 >,
22852 offset: usize,
22853 _depth: fidl::encoding::Depth,
22854 ) -> fidl::Result<()> {
22855 decoder.debug_check_bounds::<Self>(offset);
22856 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
22858 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22859 let mask = 0xffffffff00000000u64;
22860 let maskedval = padval & mask;
22861 if maskedval != 0 {
22862 return Err(fidl::Error::NonZeroPadding {
22863 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
22864 });
22865 }
22866 fidl::decode!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
22867 fidl::decode!(
22868 ExtendedAttributeValue,
22869 fidl::encoding::DefaultFuchsiaResourceDialect,
22870 &mut self.value,
22871 decoder,
22872 offset + 16,
22873 _depth
22874 )?;
22875 fidl::decode!(
22876 SetExtendedAttributeMode,
22877 fidl::encoding::DefaultFuchsiaResourceDialect,
22878 &mut self.mode,
22879 decoder,
22880 offset + 32,
22881 _depth
22882 )?;
22883 Ok(())
22884 }
22885 }
22886
22887 impl ConnectionInfo {
22888 #[inline(always)]
22889 fn max_ordinal_present(&self) -> u64 {
22890 if let Some(_) = self.rights {
22891 return 1;
22892 }
22893 0
22894 }
22895 }
22896
22897 impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
22898 type Borrowed<'a> = &'a mut Self;
22899 fn take_or_borrow<'a>(
22900 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22901 ) -> Self::Borrowed<'a> {
22902 value
22903 }
22904 }
22905
22906 unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
22907 type Owned = Self;
22908
22909 #[inline(always)]
22910 fn inline_align(_context: fidl::encoding::Context) -> usize {
22911 8
22912 }
22913
22914 #[inline(always)]
22915 fn inline_size(_context: fidl::encoding::Context) -> usize {
22916 16
22917 }
22918 }
22919
22920 unsafe impl
22921 fidl::encoding::Encode<ConnectionInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
22922 for &mut ConnectionInfo
22923 {
22924 unsafe fn encode(
22925 self,
22926 encoder: &mut fidl::encoding::Encoder<
22927 '_,
22928 fidl::encoding::DefaultFuchsiaResourceDialect,
22929 >,
22930 offset: usize,
22931 mut depth: fidl::encoding::Depth,
22932 ) -> fidl::Result<()> {
22933 encoder.debug_check_bounds::<ConnectionInfo>(offset);
22934 let max_ordinal: u64 = self.max_ordinal_present();
22936 encoder.write_num(max_ordinal, offset);
22937 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
22938 if max_ordinal == 0 {
22940 return Ok(());
22941 }
22942 depth.increment()?;
22943 let envelope_size = 8;
22944 let bytes_len = max_ordinal as usize * envelope_size;
22945 #[allow(unused_variables)]
22946 let offset = encoder.out_of_line_offset(bytes_len);
22947 let mut _prev_end_offset: usize = 0;
22948 if 1 > max_ordinal {
22949 return Ok(());
22950 }
22951
22952 let cur_offset: usize = (1 - 1) * envelope_size;
22955
22956 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
22958
22959 fidl::encoding::encode_in_envelope_optional::<
22964 Operations,
22965 fidl::encoding::DefaultFuchsiaResourceDialect,
22966 >(
22967 self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
22968 encoder,
22969 offset + cur_offset,
22970 depth,
22971 )?;
22972
22973 _prev_end_offset = cur_offset + envelope_size;
22974
22975 Ok(())
22976 }
22977 }
22978
22979 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22980 for ConnectionInfo
22981 {
22982 #[inline(always)]
22983 fn new_empty() -> Self {
22984 Self::default()
22985 }
22986
22987 unsafe fn decode(
22988 &mut self,
22989 decoder: &mut fidl::encoding::Decoder<
22990 '_,
22991 fidl::encoding::DefaultFuchsiaResourceDialect,
22992 >,
22993 offset: usize,
22994 mut depth: fidl::encoding::Depth,
22995 ) -> fidl::Result<()> {
22996 decoder.debug_check_bounds::<Self>(offset);
22997 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
22998 None => return Err(fidl::Error::NotNullable),
22999 Some(len) => len,
23000 };
23001 if len == 0 {
23003 return Ok(());
23004 };
23005 depth.increment()?;
23006 let envelope_size = 8;
23007 let bytes_len = len * envelope_size;
23008 let offset = decoder.out_of_line_offset(bytes_len)?;
23009 let mut _next_ordinal_to_read = 0;
23011 let mut next_offset = offset;
23012 let end_offset = offset + bytes_len;
23013 _next_ordinal_to_read += 1;
23014 if next_offset >= end_offset {
23015 return Ok(());
23016 }
23017
23018 while _next_ordinal_to_read < 1 {
23020 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23021 _next_ordinal_to_read += 1;
23022 next_offset += envelope_size;
23023 }
23024
23025 let next_out_of_line = decoder.next_out_of_line();
23026 let handles_before = decoder.remaining_handles();
23027 if let Some((inlined, num_bytes, num_handles)) =
23028 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23029 {
23030 let member_inline_size =
23031 <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
23032 if inlined != (member_inline_size <= 4) {
23033 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23034 }
23035 let inner_offset;
23036 let mut inner_depth = depth.clone();
23037 if inlined {
23038 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23039 inner_offset = next_offset;
23040 } else {
23041 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23042 inner_depth.increment()?;
23043 }
23044 let val_ref = self.rights.get_or_insert_with(|| {
23045 fidl::new_empty!(Operations, fidl::encoding::DefaultFuchsiaResourceDialect)
23046 });
23047 fidl::decode!(
23048 Operations,
23049 fidl::encoding::DefaultFuchsiaResourceDialect,
23050 val_ref,
23051 decoder,
23052 inner_offset,
23053 inner_depth
23054 )?;
23055 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23056 {
23057 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23058 }
23059 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23060 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23061 }
23062 }
23063
23064 next_offset += envelope_size;
23065
23066 while next_offset < end_offset {
23068 _next_ordinal_to_read += 1;
23069 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23070 next_offset += envelope_size;
23071 }
23072
23073 Ok(())
23074 }
23075 }
23076
23077 impl FileInfo {
23078 #[inline(always)]
23079 fn max_ordinal_present(&self) -> u64 {
23080 if let Some(_) = self.attributes {
23081 return 4;
23082 }
23083 if let Some(_) = self.stream {
23084 return 3;
23085 }
23086 if let Some(_) = self.observer {
23087 return 2;
23088 }
23089 if let Some(_) = self.is_append {
23090 return 1;
23091 }
23092 0
23093 }
23094 }
23095
23096 impl fidl::encoding::ResourceTypeMarker for FileInfo {
23097 type Borrowed<'a> = &'a mut Self;
23098 fn take_or_borrow<'a>(
23099 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23100 ) -> Self::Borrowed<'a> {
23101 value
23102 }
23103 }
23104
23105 unsafe impl fidl::encoding::TypeMarker for FileInfo {
23106 type Owned = Self;
23107
23108 #[inline(always)]
23109 fn inline_align(_context: fidl::encoding::Context) -> usize {
23110 8
23111 }
23112
23113 #[inline(always)]
23114 fn inline_size(_context: fidl::encoding::Context) -> usize {
23115 16
23116 }
23117 }
23118
23119 unsafe impl fidl::encoding::Encode<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
23120 for &mut FileInfo
23121 {
23122 unsafe fn encode(
23123 self,
23124 encoder: &mut fidl::encoding::Encoder<
23125 '_,
23126 fidl::encoding::DefaultFuchsiaResourceDialect,
23127 >,
23128 offset: usize,
23129 mut depth: fidl::encoding::Depth,
23130 ) -> fidl::Result<()> {
23131 encoder.debug_check_bounds::<FileInfo>(offset);
23132 let max_ordinal: u64 = self.max_ordinal_present();
23134 encoder.write_num(max_ordinal, offset);
23135 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
23136 if max_ordinal == 0 {
23138 return Ok(());
23139 }
23140 depth.increment()?;
23141 let envelope_size = 8;
23142 let bytes_len = max_ordinal as usize * envelope_size;
23143 #[allow(unused_variables)]
23144 let offset = encoder.out_of_line_offset(bytes_len);
23145 let mut _prev_end_offset: usize = 0;
23146 if 1 > max_ordinal {
23147 return Ok(());
23148 }
23149
23150 let cur_offset: usize = (1 - 1) * envelope_size;
23153
23154 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23156
23157 fidl::encoding::encode_in_envelope_optional::<
23162 bool,
23163 fidl::encoding::DefaultFuchsiaResourceDialect,
23164 >(
23165 self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
23166 encoder,
23167 offset + cur_offset,
23168 depth,
23169 )?;
23170
23171 _prev_end_offset = cur_offset + envelope_size;
23172 if 2 > max_ordinal {
23173 return Ok(());
23174 }
23175
23176 let cur_offset: usize = (2 - 1) * envelope_size;
23179
23180 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23182
23183 fidl::encoding::encode_in_envelope_optional::<
23188 fidl::encoding::HandleType<
23189 fidl::Event,
23190 { fidl::ObjectType::EVENT.into_raw() },
23191 2147483648,
23192 >,
23193 fidl::encoding::DefaultFuchsiaResourceDialect,
23194 >(
23195 self.observer.as_mut().map(
23196 <fidl::encoding::HandleType<
23197 fidl::Event,
23198 { fidl::ObjectType::EVENT.into_raw() },
23199 2147483648,
23200 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
23201 ),
23202 encoder,
23203 offset + cur_offset,
23204 depth,
23205 )?;
23206
23207 _prev_end_offset = cur_offset + envelope_size;
23208 if 3 > max_ordinal {
23209 return Ok(());
23210 }
23211
23212 let cur_offset: usize = (3 - 1) * envelope_size;
23215
23216 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23218
23219 fidl::encoding::encode_in_envelope_optional::<
23224 fidl::encoding::HandleType<
23225 fidl::Stream,
23226 { fidl::ObjectType::STREAM.into_raw() },
23227 2147483648,
23228 >,
23229 fidl::encoding::DefaultFuchsiaResourceDialect,
23230 >(
23231 self.stream.as_mut().map(
23232 <fidl::encoding::HandleType<
23233 fidl::Stream,
23234 { fidl::ObjectType::STREAM.into_raw() },
23235 2147483648,
23236 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
23237 ),
23238 encoder,
23239 offset + cur_offset,
23240 depth,
23241 )?;
23242
23243 _prev_end_offset = cur_offset + envelope_size;
23244 if 4 > max_ordinal {
23245 return Ok(());
23246 }
23247
23248 let cur_offset: usize = (4 - 1) * envelope_size;
23251
23252 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23254
23255 fidl::encoding::encode_in_envelope_optional::<
23260 NodeAttributes2,
23261 fidl::encoding::DefaultFuchsiaResourceDialect,
23262 >(
23263 self.attributes
23264 .as_ref()
23265 .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
23266 encoder,
23267 offset + cur_offset,
23268 depth,
23269 )?;
23270
23271 _prev_end_offset = cur_offset + envelope_size;
23272
23273 Ok(())
23274 }
23275 }
23276
23277 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {
23278 #[inline(always)]
23279 fn new_empty() -> Self {
23280 Self::default()
23281 }
23282
23283 unsafe fn decode(
23284 &mut self,
23285 decoder: &mut fidl::encoding::Decoder<
23286 '_,
23287 fidl::encoding::DefaultFuchsiaResourceDialect,
23288 >,
23289 offset: usize,
23290 mut depth: fidl::encoding::Depth,
23291 ) -> fidl::Result<()> {
23292 decoder.debug_check_bounds::<Self>(offset);
23293 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
23294 None => return Err(fidl::Error::NotNullable),
23295 Some(len) => len,
23296 };
23297 if len == 0 {
23299 return Ok(());
23300 };
23301 depth.increment()?;
23302 let envelope_size = 8;
23303 let bytes_len = len * envelope_size;
23304 let offset = decoder.out_of_line_offset(bytes_len)?;
23305 let mut _next_ordinal_to_read = 0;
23307 let mut next_offset = offset;
23308 let end_offset = offset + bytes_len;
23309 _next_ordinal_to_read += 1;
23310 if next_offset >= end_offset {
23311 return Ok(());
23312 }
23313
23314 while _next_ordinal_to_read < 1 {
23316 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23317 _next_ordinal_to_read += 1;
23318 next_offset += envelope_size;
23319 }
23320
23321 let next_out_of_line = decoder.next_out_of_line();
23322 let handles_before = decoder.remaining_handles();
23323 if let Some((inlined, num_bytes, num_handles)) =
23324 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23325 {
23326 let member_inline_size =
23327 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
23328 if inlined != (member_inline_size <= 4) {
23329 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23330 }
23331 let inner_offset;
23332 let mut inner_depth = depth.clone();
23333 if inlined {
23334 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23335 inner_offset = next_offset;
23336 } else {
23337 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23338 inner_depth.increment()?;
23339 }
23340 let val_ref = self.is_append.get_or_insert_with(|| {
23341 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
23342 });
23343 fidl::decode!(
23344 bool,
23345 fidl::encoding::DefaultFuchsiaResourceDialect,
23346 val_ref,
23347 decoder,
23348 inner_offset,
23349 inner_depth
23350 )?;
23351 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23352 {
23353 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23354 }
23355 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23356 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23357 }
23358 }
23359
23360 next_offset += envelope_size;
23361 _next_ordinal_to_read += 1;
23362 if next_offset >= end_offset {
23363 return Ok(());
23364 }
23365
23366 while _next_ordinal_to_read < 2 {
23368 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23369 _next_ordinal_to_read += 1;
23370 next_offset += envelope_size;
23371 }
23372
23373 let next_out_of_line = decoder.next_out_of_line();
23374 let handles_before = decoder.remaining_handles();
23375 if let Some((inlined, num_bytes, num_handles)) =
23376 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23377 {
23378 let member_inline_size = <fidl::encoding::HandleType<
23379 fidl::Event,
23380 { fidl::ObjectType::EVENT.into_raw() },
23381 2147483648,
23382 > as fidl::encoding::TypeMarker>::inline_size(
23383 decoder.context
23384 );
23385 if inlined != (member_inline_size <= 4) {
23386 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23387 }
23388 let inner_offset;
23389 let mut inner_depth = depth.clone();
23390 if inlined {
23391 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23392 inner_offset = next_offset;
23393 } else {
23394 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23395 inner_depth.increment()?;
23396 }
23397 let val_ref =
23398 self.observer.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
23399 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
23400 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23401 {
23402 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23403 }
23404 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23405 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23406 }
23407 }
23408
23409 next_offset += envelope_size;
23410 _next_ordinal_to_read += 1;
23411 if next_offset >= end_offset {
23412 return Ok(());
23413 }
23414
23415 while _next_ordinal_to_read < 3 {
23417 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23418 _next_ordinal_to_read += 1;
23419 next_offset += envelope_size;
23420 }
23421
23422 let next_out_of_line = decoder.next_out_of_line();
23423 let handles_before = decoder.remaining_handles();
23424 if let Some((inlined, num_bytes, num_handles)) =
23425 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23426 {
23427 let member_inline_size = <fidl::encoding::HandleType<
23428 fidl::Stream,
23429 { fidl::ObjectType::STREAM.into_raw() },
23430 2147483648,
23431 > as fidl::encoding::TypeMarker>::inline_size(
23432 decoder.context
23433 );
23434 if inlined != (member_inline_size <= 4) {
23435 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23436 }
23437 let inner_offset;
23438 let mut inner_depth = depth.clone();
23439 if inlined {
23440 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23441 inner_offset = next_offset;
23442 } else {
23443 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23444 inner_depth.increment()?;
23445 }
23446 let val_ref =
23447 self.stream.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
23448 fidl::decode!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
23449 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23450 {
23451 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23452 }
23453 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23454 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23455 }
23456 }
23457
23458 next_offset += envelope_size;
23459 _next_ordinal_to_read += 1;
23460 if next_offset >= end_offset {
23461 return Ok(());
23462 }
23463
23464 while _next_ordinal_to_read < 4 {
23466 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23467 _next_ordinal_to_read += 1;
23468 next_offset += envelope_size;
23469 }
23470
23471 let next_out_of_line = decoder.next_out_of_line();
23472 let handles_before = decoder.remaining_handles();
23473 if let Some((inlined, num_bytes, num_handles)) =
23474 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23475 {
23476 let member_inline_size =
23477 <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
23478 if inlined != (member_inline_size <= 4) {
23479 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23480 }
23481 let inner_offset;
23482 let mut inner_depth = depth.clone();
23483 if inlined {
23484 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23485 inner_offset = next_offset;
23486 } else {
23487 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23488 inner_depth.increment()?;
23489 }
23490 let val_ref = self.attributes.get_or_insert_with(|| {
23491 fidl::new_empty!(NodeAttributes2, fidl::encoding::DefaultFuchsiaResourceDialect)
23492 });
23493 fidl::decode!(
23494 NodeAttributes2,
23495 fidl::encoding::DefaultFuchsiaResourceDialect,
23496 val_ref,
23497 decoder,
23498 inner_offset,
23499 inner_depth
23500 )?;
23501 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23502 {
23503 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23504 }
23505 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23506 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23507 }
23508 }
23509
23510 next_offset += envelope_size;
23511
23512 while next_offset < end_offset {
23514 _next_ordinal_to_read += 1;
23515 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23516 next_offset += envelope_size;
23517 }
23518
23519 Ok(())
23520 }
23521 }
23522
23523 impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
23524 type Borrowed<'a> = &'a mut Self;
23525 fn take_or_borrow<'a>(
23526 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23527 ) -> Self::Borrowed<'a> {
23528 value
23529 }
23530 }
23531
23532 unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
23533 type Owned = Self;
23534
23535 #[inline(always)]
23536 fn inline_align(_context: fidl::encoding::Context) -> usize {
23537 8
23538 }
23539
23540 #[inline(always)]
23541 fn inline_size(_context: fidl::encoding::Context) -> usize {
23542 16
23543 }
23544 }
23545
23546 unsafe impl
23547 fidl::encoding::Encode<
23548 ExtendedAttributeValue,
23549 fidl::encoding::DefaultFuchsiaResourceDialect,
23550 > for &mut ExtendedAttributeValue
23551 {
23552 #[inline]
23553 unsafe fn encode(
23554 self,
23555 encoder: &mut fidl::encoding::Encoder<
23556 '_,
23557 fidl::encoding::DefaultFuchsiaResourceDialect,
23558 >,
23559 offset: usize,
23560 _depth: fidl::encoding::Depth,
23561 ) -> fidl::Result<()> {
23562 encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
23563 encoder.write_num::<u64>(self.ordinal(), offset);
23564 match self {
23565 ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
23566 fidl::encoding::Vector<u8, 32768>,
23567 fidl::encoding::DefaultFuchsiaResourceDialect,
23568 >(
23569 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
23570 val,
23571 ),
23572 encoder,
23573 offset + 8,
23574 _depth,
23575 ),
23576 ExtendedAttributeValue::Buffer(ref mut val) => {
23577 fidl::encoding::encode_in_envelope::<
23578 fidl::encoding::HandleType<
23579 fidl::Vmo,
23580 { fidl::ObjectType::VMO.into_raw() },
23581 2147483648,
23582 >,
23583 fidl::encoding::DefaultFuchsiaResourceDialect,
23584 >(
23585 <fidl::encoding::HandleType<
23586 fidl::Vmo,
23587 { fidl::ObjectType::VMO.into_raw() },
23588 2147483648,
23589 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
23590 val
23591 ),
23592 encoder,
23593 offset + 8,
23594 _depth,
23595 )
23596 }
23597 ExtendedAttributeValue::__SourceBreaking { .. } => {
23598 Err(fidl::Error::UnknownUnionTag)
23599 }
23600 }
23601 }
23602 }
23603
23604 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23605 for ExtendedAttributeValue
23606 {
23607 #[inline(always)]
23608 fn new_empty() -> Self {
23609 Self::__SourceBreaking { unknown_ordinal: 0 }
23610 }
23611
23612 #[inline]
23613 unsafe fn decode(
23614 &mut self,
23615 decoder: &mut fidl::encoding::Decoder<
23616 '_,
23617 fidl::encoding::DefaultFuchsiaResourceDialect,
23618 >,
23619 offset: usize,
23620 mut depth: fidl::encoding::Depth,
23621 ) -> fidl::Result<()> {
23622 decoder.debug_check_bounds::<Self>(offset);
23623 #[allow(unused_variables)]
23624 let next_out_of_line = decoder.next_out_of_line();
23625 let handles_before = decoder.remaining_handles();
23626 let (ordinal, inlined, num_bytes, num_handles) =
23627 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
23628
23629 let member_inline_size = match ordinal {
23630 1 => {
23631 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
23632 decoder.context,
23633 )
23634 }
23635 2 => <fidl::encoding::HandleType<
23636 fidl::Vmo,
23637 { fidl::ObjectType::VMO.into_raw() },
23638 2147483648,
23639 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23640 0 => return Err(fidl::Error::UnknownUnionTag),
23641 _ => num_bytes as usize,
23642 };
23643
23644 if inlined != (member_inline_size <= 4) {
23645 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23646 }
23647 let _inner_offset;
23648 if inlined {
23649 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
23650 _inner_offset = offset + 8;
23651 } else {
23652 depth.increment()?;
23653 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23654 }
23655 match ordinal {
23656 1 => {
23657 #[allow(irrefutable_let_patterns)]
23658 if let ExtendedAttributeValue::Bytes(_) = self {
23659 } else {
23661 *self = ExtendedAttributeValue::Bytes(
23663 fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect),
23664 );
23665 }
23666 #[allow(irrefutable_let_patterns)]
23667 if let ExtendedAttributeValue::Bytes(ref mut val) = self {
23668 fidl::decode!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
23669 } else {
23670 unreachable!()
23671 }
23672 }
23673 2 => {
23674 #[allow(irrefutable_let_patterns)]
23675 if let ExtendedAttributeValue::Buffer(_) = self {
23676 } else {
23678 *self = ExtendedAttributeValue::Buffer(
23680 fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
23681 );
23682 }
23683 #[allow(irrefutable_let_patterns)]
23684 if let ExtendedAttributeValue::Buffer(ref mut val) = self {
23685 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
23686 } else {
23687 unreachable!()
23688 }
23689 }
23690 #[allow(deprecated)]
23691 ordinal => {
23692 for _ in 0..num_handles {
23693 decoder.drop_next_handle()?;
23694 }
23695 *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
23696 }
23697 }
23698 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
23699 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23700 }
23701 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23702 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23703 }
23704 Ok(())
23705 }
23706 }
23707
23708 impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
23709 type Borrowed<'a> = &'a mut Self;
23710 fn take_or_borrow<'a>(
23711 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23712 ) -> Self::Borrowed<'a> {
23713 value
23714 }
23715 }
23716
23717 unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
23718 type Owned = Self;
23719
23720 #[inline(always)]
23721 fn inline_align(_context: fidl::encoding::Context) -> usize {
23722 8
23723 }
23724
23725 #[inline(always)]
23726 fn inline_size(_context: fidl::encoding::Context) -> usize {
23727 16
23728 }
23729 }
23730
23731 unsafe impl
23732 fidl::encoding::Encode<NodeInfoDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>
23733 for &mut NodeInfoDeprecated
23734 {
23735 #[inline]
23736 unsafe fn encode(
23737 self,
23738 encoder: &mut fidl::encoding::Encoder<
23739 '_,
23740 fidl::encoding::DefaultFuchsiaResourceDialect,
23741 >,
23742 offset: usize,
23743 _depth: fidl::encoding::Depth,
23744 ) -> fidl::Result<()> {
23745 encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
23746 encoder.write_num::<u64>(self.ordinal(), offset);
23747 match self {
23748 NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
23749 Service,
23750 fidl::encoding::DefaultFuchsiaResourceDialect,
23751 >(
23752 <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
23753 encoder,
23754 offset + 8,
23755 _depth,
23756 ),
23757 NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
23758 FileObject,
23759 fidl::encoding::DefaultFuchsiaResourceDialect,
23760 >(
23761 <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
23762 encoder,
23763 offset + 8,
23764 _depth,
23765 ),
23766 NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
23767 DirectoryObject,
23768 fidl::encoding::DefaultFuchsiaResourceDialect,
23769 >(
23770 <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
23771 encoder,
23772 offset + 8,
23773 _depth,
23774 ),
23775 NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
23776 SymlinkObject,
23777 fidl::encoding::DefaultFuchsiaResourceDialect,
23778 >(
23779 <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
23780 encoder,
23781 offset + 8,
23782 _depth,
23783 ),
23784 }
23785 }
23786 }
23787
23788 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23789 for NodeInfoDeprecated
23790 {
23791 #[inline(always)]
23792 fn new_empty() -> Self {
23793 Self::Service(fidl::new_empty!(Service, fidl::encoding::DefaultFuchsiaResourceDialect))
23794 }
23795
23796 #[inline]
23797 unsafe fn decode(
23798 &mut self,
23799 decoder: &mut fidl::encoding::Decoder<
23800 '_,
23801 fidl::encoding::DefaultFuchsiaResourceDialect,
23802 >,
23803 offset: usize,
23804 mut depth: fidl::encoding::Depth,
23805 ) -> fidl::Result<()> {
23806 decoder.debug_check_bounds::<Self>(offset);
23807 #[allow(unused_variables)]
23808 let next_out_of_line = decoder.next_out_of_line();
23809 let handles_before = decoder.remaining_handles();
23810 let (ordinal, inlined, num_bytes, num_handles) =
23811 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
23812
23813 let member_inline_size = match ordinal {
23814 1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23815 2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23816 3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23817 4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23818 _ => return Err(fidl::Error::UnknownUnionTag),
23819 };
23820
23821 if inlined != (member_inline_size <= 4) {
23822 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23823 }
23824 let _inner_offset;
23825 if inlined {
23826 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
23827 _inner_offset = offset + 8;
23828 } else {
23829 depth.increment()?;
23830 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23831 }
23832 match ordinal {
23833 1 => {
23834 #[allow(irrefutable_let_patterns)]
23835 if let NodeInfoDeprecated::Service(_) = self {
23836 } else {
23838 *self = NodeInfoDeprecated::Service(fidl::new_empty!(
23840 Service,
23841 fidl::encoding::DefaultFuchsiaResourceDialect
23842 ));
23843 }
23844 #[allow(irrefutable_let_patterns)]
23845 if let NodeInfoDeprecated::Service(ref mut val) = self {
23846 fidl::decode!(
23847 Service,
23848 fidl::encoding::DefaultFuchsiaResourceDialect,
23849 val,
23850 decoder,
23851 _inner_offset,
23852 depth
23853 )?;
23854 } else {
23855 unreachable!()
23856 }
23857 }
23858 2 => {
23859 #[allow(irrefutable_let_patterns)]
23860 if let NodeInfoDeprecated::File(_) = self {
23861 } else {
23863 *self = NodeInfoDeprecated::File(fidl::new_empty!(
23865 FileObject,
23866 fidl::encoding::DefaultFuchsiaResourceDialect
23867 ));
23868 }
23869 #[allow(irrefutable_let_patterns)]
23870 if let NodeInfoDeprecated::File(ref mut val) = self {
23871 fidl::decode!(
23872 FileObject,
23873 fidl::encoding::DefaultFuchsiaResourceDialect,
23874 val,
23875 decoder,
23876 _inner_offset,
23877 depth
23878 )?;
23879 } else {
23880 unreachable!()
23881 }
23882 }
23883 3 => {
23884 #[allow(irrefutable_let_patterns)]
23885 if let NodeInfoDeprecated::Directory(_) = self {
23886 } else {
23888 *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
23890 DirectoryObject,
23891 fidl::encoding::DefaultFuchsiaResourceDialect
23892 ));
23893 }
23894 #[allow(irrefutable_let_patterns)]
23895 if let NodeInfoDeprecated::Directory(ref mut val) = self {
23896 fidl::decode!(
23897 DirectoryObject,
23898 fidl::encoding::DefaultFuchsiaResourceDialect,
23899 val,
23900 decoder,
23901 _inner_offset,
23902 depth
23903 )?;
23904 } else {
23905 unreachable!()
23906 }
23907 }
23908 4 => {
23909 #[allow(irrefutable_let_patterns)]
23910 if let NodeInfoDeprecated::Symlink(_) = self {
23911 } else {
23913 *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
23915 SymlinkObject,
23916 fidl::encoding::DefaultFuchsiaResourceDialect
23917 ));
23918 }
23919 #[allow(irrefutable_let_patterns)]
23920 if let NodeInfoDeprecated::Symlink(ref mut val) = self {
23921 fidl::decode!(
23922 SymlinkObject,
23923 fidl::encoding::DefaultFuchsiaResourceDialect,
23924 val,
23925 decoder,
23926 _inner_offset,
23927 depth
23928 )?;
23929 } else {
23930 unreachable!()
23931 }
23932 }
23933 ordinal => panic!("unexpected ordinal {:?}", ordinal),
23934 }
23935 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
23936 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23937 }
23938 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23939 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23940 }
23941 Ok(())
23942 }
23943 }
23944
23945 impl fidl::encoding::ResourceTypeMarker for Representation {
23946 type Borrowed<'a> = &'a mut Self;
23947 fn take_or_borrow<'a>(
23948 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23949 ) -> Self::Borrowed<'a> {
23950 value
23951 }
23952 }
23953
23954 unsafe impl fidl::encoding::TypeMarker for Representation {
23955 type Owned = Self;
23956
23957 #[inline(always)]
23958 fn inline_align(_context: fidl::encoding::Context) -> usize {
23959 8
23960 }
23961
23962 #[inline(always)]
23963 fn inline_size(_context: fidl::encoding::Context) -> usize {
23964 16
23965 }
23966 }
23967
23968 unsafe impl
23969 fidl::encoding::Encode<Representation, fidl::encoding::DefaultFuchsiaResourceDialect>
23970 for &mut Representation
23971 {
23972 #[inline]
23973 unsafe fn encode(
23974 self,
23975 encoder: &mut fidl::encoding::Encoder<
23976 '_,
23977 fidl::encoding::DefaultFuchsiaResourceDialect,
23978 >,
23979 offset: usize,
23980 _depth: fidl::encoding::Depth,
23981 ) -> fidl::Result<()> {
23982 encoder.debug_check_bounds::<Representation>(offset);
23983 encoder.write_num::<u64>(self.ordinal(), offset);
23984 match self {
23985 Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
23986 NodeInfo,
23987 fidl::encoding::DefaultFuchsiaResourceDialect,
23988 >(
23989 <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
23990 encoder,
23991 offset + 8,
23992 _depth,
23993 ),
23994 Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
23995 DirectoryInfo,
23996 fidl::encoding::DefaultFuchsiaResourceDialect,
23997 >(
23998 <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
23999 encoder,
24000 offset + 8,
24001 _depth,
24002 ),
24003 Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
24004 FileInfo,
24005 fidl::encoding::DefaultFuchsiaResourceDialect,
24006 >(
24007 <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
24008 encoder,
24009 offset + 8,
24010 _depth,
24011 ),
24012 Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
24013 SymlinkInfo,
24014 fidl::encoding::DefaultFuchsiaResourceDialect,
24015 >(
24016 <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
24017 encoder,
24018 offset + 8,
24019 _depth,
24020 ),
24021 Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
24022 }
24023 }
24024 }
24025
24026 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
24027 for Representation
24028 {
24029 #[inline(always)]
24030 fn new_empty() -> Self {
24031 Self::__SourceBreaking { unknown_ordinal: 0 }
24032 }
24033
24034 #[inline]
24035 unsafe fn decode(
24036 &mut self,
24037 decoder: &mut fidl::encoding::Decoder<
24038 '_,
24039 fidl::encoding::DefaultFuchsiaResourceDialect,
24040 >,
24041 offset: usize,
24042 mut depth: fidl::encoding::Depth,
24043 ) -> fidl::Result<()> {
24044 decoder.debug_check_bounds::<Self>(offset);
24045 #[allow(unused_variables)]
24046 let next_out_of_line = decoder.next_out_of_line();
24047 let handles_before = decoder.remaining_handles();
24048 let (ordinal, inlined, num_bytes, num_handles) =
24049 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
24050
24051 let member_inline_size = match ordinal {
24052 1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24053 2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24054 3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24055 4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24056 0 => return Err(fidl::Error::UnknownUnionTag),
24057 _ => num_bytes as usize,
24058 };
24059
24060 if inlined != (member_inline_size <= 4) {
24061 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24062 }
24063 let _inner_offset;
24064 if inlined {
24065 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
24066 _inner_offset = offset + 8;
24067 } else {
24068 depth.increment()?;
24069 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24070 }
24071 match ordinal {
24072 1 => {
24073 #[allow(irrefutable_let_patterns)]
24074 if let Representation::Node(_) = self {
24075 } else {
24077 *self = Representation::Node(fidl::new_empty!(
24079 NodeInfo,
24080 fidl::encoding::DefaultFuchsiaResourceDialect
24081 ));
24082 }
24083 #[allow(irrefutable_let_patterns)]
24084 if let Representation::Node(ref mut val) = self {
24085 fidl::decode!(
24086 NodeInfo,
24087 fidl::encoding::DefaultFuchsiaResourceDialect,
24088 val,
24089 decoder,
24090 _inner_offset,
24091 depth
24092 )?;
24093 } else {
24094 unreachable!()
24095 }
24096 }
24097 2 => {
24098 #[allow(irrefutable_let_patterns)]
24099 if let Representation::Directory(_) = self {
24100 } else {
24102 *self = Representation::Directory(fidl::new_empty!(
24104 DirectoryInfo,
24105 fidl::encoding::DefaultFuchsiaResourceDialect
24106 ));
24107 }
24108 #[allow(irrefutable_let_patterns)]
24109 if let Representation::Directory(ref mut val) = self {
24110 fidl::decode!(
24111 DirectoryInfo,
24112 fidl::encoding::DefaultFuchsiaResourceDialect,
24113 val,
24114 decoder,
24115 _inner_offset,
24116 depth
24117 )?;
24118 } else {
24119 unreachable!()
24120 }
24121 }
24122 3 => {
24123 #[allow(irrefutable_let_patterns)]
24124 if let Representation::File(_) = self {
24125 } else {
24127 *self = Representation::File(fidl::new_empty!(
24129 FileInfo,
24130 fidl::encoding::DefaultFuchsiaResourceDialect
24131 ));
24132 }
24133 #[allow(irrefutable_let_patterns)]
24134 if let Representation::File(ref mut val) = self {
24135 fidl::decode!(
24136 FileInfo,
24137 fidl::encoding::DefaultFuchsiaResourceDialect,
24138 val,
24139 decoder,
24140 _inner_offset,
24141 depth
24142 )?;
24143 } else {
24144 unreachable!()
24145 }
24146 }
24147 4 => {
24148 #[allow(irrefutable_let_patterns)]
24149 if let Representation::Symlink(_) = self {
24150 } else {
24152 *self = Representation::Symlink(fidl::new_empty!(
24154 SymlinkInfo,
24155 fidl::encoding::DefaultFuchsiaResourceDialect
24156 ));
24157 }
24158 #[allow(irrefutable_let_patterns)]
24159 if let Representation::Symlink(ref mut val) = self {
24160 fidl::decode!(
24161 SymlinkInfo,
24162 fidl::encoding::DefaultFuchsiaResourceDialect,
24163 val,
24164 decoder,
24165 _inner_offset,
24166 depth
24167 )?;
24168 } else {
24169 unreachable!()
24170 }
24171 }
24172 #[allow(deprecated)]
24173 ordinal => {
24174 for _ in 0..num_handles {
24175 decoder.drop_next_handle()?;
24176 }
24177 *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
24178 }
24179 }
24180 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
24181 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24182 }
24183 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24184 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24185 }
24186 Ok(())
24187 }
24188 }
24189}