1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_io__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14pub type Token = fidl::Event;
17
18#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
19pub struct DirectoryCreateSymlinkRequest {
20 pub name: String,
21 pub target: Vec<u8>,
22 pub connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
23}
24
25impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
26 for DirectoryCreateSymlinkRequest
27{
28}
29
30#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31pub struct DirectoryDeprecatedOpenRequest {
32 pub flags: OpenFlags,
33 pub mode: ModeType,
34 pub path: String,
35 pub object: fidl::endpoints::ServerEnd<NodeMarker>,
36}
37
38impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
39 for DirectoryDeprecatedOpenRequest
40{
41}
42
43#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44pub struct DirectoryGetTokenResponse {
45 pub s: i32,
46 pub token: Option<fidl::NullableHandle>,
47}
48
49impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryGetTokenResponse {}
50
51#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
52pub struct DirectoryLinkRequest {
53 pub src: String,
54 pub dst_parent_token: fidl::NullableHandle,
55 pub dst: String,
56}
57
58impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryLinkRequest {}
59
60#[derive(Debug, PartialEq)]
61pub struct DirectoryOpenRequest {
62 pub path: String,
63 pub flags: Flags,
64 pub options: Options,
65 pub object: fidl::Channel,
66}
67
68impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryOpenRequest {}
69
70#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
71pub struct DirectoryRenameRequest {
72 pub src: String,
73 pub dst_parent_token: fidl::Event,
74 pub dst: String,
75}
76
77impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryRenameRequest {}
78
79#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
80pub struct DirectoryWatchRequest {
81 pub mask: WatchMask,
82 pub options: u32,
83 pub watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
84}
85
86impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryWatchRequest {}
87
88#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
89pub struct FileAllocateRequest {
90 pub offset: u64,
91 pub length: u64,
92 pub mode: AllocateMode,
97}
98
99impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileAllocateRequest {}
100
101#[derive(Debug, PartialEq)]
102pub struct FileEnableVerityRequest {
103 pub options: VerificationOptions,
104}
105
106impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileEnableVerityRequest {}
107
108#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
109pub struct FileObject {
110 pub event: Option<fidl::Event>,
117 pub stream: Option<fidl::Stream>,
121}
122
123impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {}
124
125#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
126pub struct FileGetBackingMemoryResponse {
127 pub vmo: fidl::Vmo,
128}
129
130impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
131 for FileGetBackingMemoryResponse
132{
133}
134
135#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
136pub struct LinkableLinkIntoRequest {
137 pub dst_parent_token: fidl::Event,
138 pub dst: String,
139}
140
141impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for LinkableLinkIntoRequest {}
142
143#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
144pub struct NodeDeprecatedCloneRequest {
145 pub flags: OpenFlags,
146 pub object: fidl::endpoints::ServerEnd<NodeMarker>,
147}
148
149impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
150 for NodeDeprecatedCloneRequest
151{
152}
153
154#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
155pub struct NodeListExtendedAttributesRequest {
156 pub iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
157}
158
159impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
160 for NodeListExtendedAttributesRequest
161{
162}
163
164#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
165pub struct NodeOnOpenRequest {
166 pub s: i32,
167 pub info: Option<Box<NodeInfoDeprecated>>,
168}
169
170impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeOnOpenRequest {}
171
172#[derive(Debug, PartialEq)]
173pub struct NodeSetExtendedAttributeRequest {
174 pub name: Vec<u8>,
175 pub value: ExtendedAttributeValue,
176 pub mode: SetExtendedAttributeMode,
178}
179
180impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
181 for NodeSetExtendedAttributeRequest
182{
183}
184
185#[derive(Debug, Default, PartialEq)]
186pub struct ConnectionInfo {
187 pub rights: Option<Operations>,
194 #[doc(hidden)]
195 pub __source_breaking: fidl::marker::SourceBreaking,
196}
197
198impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ConnectionInfo {}
199
200#[derive(Debug, Default, PartialEq)]
202pub struct FileInfo {
203 pub is_append: Option<bool>,
207 pub observer: Option<fidl::Event>,
220 pub stream: Option<fidl::Stream>,
227 pub attributes: Option<NodeAttributes2>,
229 #[doc(hidden)]
230 pub __source_breaking: fidl::marker::SourceBreaking,
231}
232
233impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {}
234
235#[derive(Debug)]
239pub enum ExtendedAttributeValue {
240 Bytes(Vec<u8>),
241 Buffer(fidl::Vmo),
242 #[doc(hidden)]
243 __SourceBreaking {
244 unknown_ordinal: u64,
245 },
246}
247
248#[macro_export]
250macro_rules! ExtendedAttributeValueUnknown {
251 () => {
252 _
253 };
254}
255
256impl PartialEq for ExtendedAttributeValue {
258 fn eq(&self, other: &Self) -> bool {
259 match (self, other) {
260 (Self::Bytes(x), Self::Bytes(y)) => *x == *y,
261 (Self::Buffer(x), Self::Buffer(y)) => *x == *y,
262 _ => false,
263 }
264 }
265}
266
267impl ExtendedAttributeValue {
268 #[inline]
269 pub fn ordinal(&self) -> u64 {
270 match *self {
271 Self::Bytes(_) => 1,
272 Self::Buffer(_) => 2,
273 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
274 }
275 }
276
277 #[inline]
278 pub fn unknown_variant_for_testing() -> Self {
279 Self::__SourceBreaking { unknown_ordinal: 0 }
280 }
281
282 #[inline]
283 pub fn is_unknown(&self) -> bool {
284 match self {
285 Self::__SourceBreaking { .. } => true,
286 _ => false,
287 }
288 }
289}
290
291impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ExtendedAttributeValue {}
292
293#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
294pub enum NodeInfoDeprecated {
295 Service(Service),
297 File(FileObject),
299 Directory(DirectoryObject),
301 Symlink(SymlinkObject),
303}
304
305impl NodeInfoDeprecated {
306 #[inline]
307 pub fn ordinal(&self) -> u64 {
308 match *self {
309 Self::Service(_) => 1,
310 Self::File(_) => 2,
311 Self::Directory(_) => 3,
312 Self::Symlink(_) => 4,
313 }
314 }
315}
316
317impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeInfoDeprecated {}
318
319#[derive(Debug)]
320pub enum Representation {
321 Node(NodeInfo),
323 Directory(DirectoryInfo),
325 File(FileInfo),
327 Symlink(SymlinkInfo),
329 #[doc(hidden)]
330 __SourceBreaking { unknown_ordinal: u64 },
331}
332
333#[macro_export]
335macro_rules! RepresentationUnknown {
336 () => {
337 _
338 };
339}
340
341impl PartialEq for Representation {
343 fn eq(&self, other: &Self) -> bool {
344 match (self, other) {
345 (Self::Node(x), Self::Node(y)) => *x == *y,
346 (Self::Directory(x), Self::Directory(y)) => *x == *y,
347 (Self::File(x), Self::File(y)) => *x == *y,
348 (Self::Symlink(x), Self::Symlink(y)) => *x == *y,
349 _ => false,
350 }
351 }
352}
353
354impl Representation {
355 #[inline]
356 pub fn ordinal(&self) -> u64 {
357 match *self {
358 Self::Node(_) => 1,
359 Self::Directory(_) => 2,
360 Self::File(_) => 3,
361 Self::Symlink(_) => 4,
362 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
363 }
364 }
365
366 #[inline]
367 pub fn unknown_variant_for_testing() -> Self {
368 Self::__SourceBreaking { unknown_ordinal: 0 }
369 }
370
371 #[inline]
372 pub fn is_unknown(&self) -> bool {
373 match self {
374 Self::__SourceBreaking { .. } => true,
375 _ => false,
376 }
377 }
378}
379
380impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Representation {}
381
382#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
383pub struct AdvisoryLockingMarker;
384
385impl fidl::endpoints::ProtocolMarker for AdvisoryLockingMarker {
386 type Proxy = AdvisoryLockingProxy;
387 type RequestStream = AdvisoryLockingRequestStream;
388 #[cfg(target_os = "fuchsia")]
389 type SynchronousProxy = AdvisoryLockingSynchronousProxy;
390
391 const DEBUG_NAME: &'static str = "(anonymous) AdvisoryLocking";
392}
393pub type AdvisoryLockingAdvisoryLockResult = Result<(), i32>;
394
395pub trait AdvisoryLockingProxyInterface: Send + Sync {
396 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
397 + Send;
398 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
399}
400#[derive(Debug)]
401#[cfg(target_os = "fuchsia")]
402pub struct AdvisoryLockingSynchronousProxy {
403 client: fidl::client::sync::Client,
404}
405
406#[cfg(target_os = "fuchsia")]
407impl fidl::endpoints::SynchronousProxy for AdvisoryLockingSynchronousProxy {
408 type Proxy = AdvisoryLockingProxy;
409 type Protocol = AdvisoryLockingMarker;
410
411 fn from_channel(inner: fidl::Channel) -> Self {
412 Self::new(inner)
413 }
414
415 fn into_channel(self) -> fidl::Channel {
416 self.client.into_channel()
417 }
418
419 fn as_channel(&self) -> &fidl::Channel {
420 self.client.as_channel()
421 }
422}
423
424#[cfg(target_os = "fuchsia")]
425impl AdvisoryLockingSynchronousProxy {
426 pub fn new(channel: fidl::Channel) -> Self {
427 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::NullableHandle {
487 fn from(value: AdvisoryLockingSynchronousProxy) -> Self {
488 value.into_channel().into()
489 }
490}
491
492#[cfg(target_os = "fuchsia")]
493impl From<fidl::Channel> for AdvisoryLockingSynchronousProxy {
494 fn from(value: fidl::Channel) -> Self {
495 Self::new(value)
496 }
497}
498
499#[cfg(target_os = "fuchsia")]
500impl fidl::endpoints::FromClient for AdvisoryLockingSynchronousProxy {
501 type Protocol = AdvisoryLockingMarker;
502
503 fn from_client(value: fidl::endpoints::ClientEnd<AdvisoryLockingMarker>) -> Self {
504 Self::new(value.into_channel())
505 }
506}
507
508#[derive(Debug, Clone)]
509pub struct AdvisoryLockingProxy {
510 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
511}
512
513impl fidl::endpoints::Proxy for AdvisoryLockingProxy {
514 type Protocol = AdvisoryLockingMarker;
515
516 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
517 Self::new(inner)
518 }
519
520 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
521 self.client.into_channel().map_err(|client| Self { client })
522 }
523
524 fn as_channel(&self) -> &::fidl::AsyncChannel {
525 self.client.as_channel()
526 }
527}
528
529impl AdvisoryLockingProxy {
530 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
532 let protocol_name = <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
533 Self { client: fidl::client::Client::new(channel, protocol_name) }
534 }
535
536 pub fn take_event_stream(&self) -> AdvisoryLockingEventStream {
542 AdvisoryLockingEventStream { event_receiver: self.client.take_event_receiver() }
543 }
544
545 pub fn r#advisory_lock(
569 &self,
570 mut request: &AdvisoryLockRequest,
571 ) -> fidl::client::QueryResponseFut<
572 AdvisoryLockingAdvisoryLockResult,
573 fidl::encoding::DefaultFuchsiaResourceDialect,
574 > {
575 AdvisoryLockingProxyInterface::r#advisory_lock(self, request)
576 }
577}
578
579impl AdvisoryLockingProxyInterface for AdvisoryLockingProxy {
580 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
581 AdvisoryLockingAdvisoryLockResult,
582 fidl::encoding::DefaultFuchsiaResourceDialect,
583 >;
584 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
585 fn _decode(
586 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
587 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
588 let _response = fidl::client::decode_transaction_body::<
589 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
590 fidl::encoding::DefaultFuchsiaResourceDialect,
591 0x6ee9c0ad53ec87aa,
592 >(_buf?)?;
593 Ok(_response.map(|x| x))
594 }
595 self.client.send_query_and_decode::<
596 AdvisoryLockingAdvisoryLockRequest,
597 AdvisoryLockingAdvisoryLockResult,
598 >(
599 (request,),
600 0x6ee9c0ad53ec87aa,
601 fidl::encoding::DynamicFlags::empty(),
602 _decode,
603 )
604 }
605}
606
607pub struct AdvisoryLockingEventStream {
608 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
609}
610
611impl std::marker::Unpin for AdvisoryLockingEventStream {}
612
613impl futures::stream::FusedStream for AdvisoryLockingEventStream {
614 fn is_terminated(&self) -> bool {
615 self.event_receiver.is_terminated()
616 }
617}
618
619impl futures::Stream for AdvisoryLockingEventStream {
620 type Item = Result<AdvisoryLockingEvent, fidl::Error>;
621
622 fn poll_next(
623 mut self: std::pin::Pin<&mut Self>,
624 cx: &mut std::task::Context<'_>,
625 ) -> std::task::Poll<Option<Self::Item>> {
626 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
627 &mut self.event_receiver,
628 cx
629 )?) {
630 Some(buf) => std::task::Poll::Ready(Some(AdvisoryLockingEvent::decode(buf))),
631 None => std::task::Poll::Ready(None),
632 }
633 }
634}
635
636#[derive(Debug)]
637pub enum AdvisoryLockingEvent {}
638
639impl AdvisoryLockingEvent {
640 fn decode(
642 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
643 ) -> Result<AdvisoryLockingEvent, fidl::Error> {
644 let (bytes, _handles) = buf.split_mut();
645 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
646 debug_assert_eq!(tx_header.tx_id, 0);
647 match tx_header.ordinal {
648 _ => Err(fidl::Error::UnknownOrdinal {
649 ordinal: tx_header.ordinal,
650 protocol_name:
651 <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
652 }),
653 }
654 }
655}
656
657pub struct AdvisoryLockingRequestStream {
659 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
660 is_terminated: bool,
661}
662
663impl std::marker::Unpin for AdvisoryLockingRequestStream {}
664
665impl futures::stream::FusedStream for AdvisoryLockingRequestStream {
666 fn is_terminated(&self) -> bool {
667 self.is_terminated
668 }
669}
670
671impl fidl::endpoints::RequestStream for AdvisoryLockingRequestStream {
672 type Protocol = AdvisoryLockingMarker;
673 type ControlHandle = AdvisoryLockingControlHandle;
674
675 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
676 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
677 }
678
679 fn control_handle(&self) -> Self::ControlHandle {
680 AdvisoryLockingControlHandle { inner: self.inner.clone() }
681 }
682
683 fn into_inner(
684 self,
685 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
686 {
687 (self.inner, self.is_terminated)
688 }
689
690 fn from_inner(
691 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
692 is_terminated: bool,
693 ) -> Self {
694 Self { inner, is_terminated }
695 }
696}
697
698impl futures::Stream for AdvisoryLockingRequestStream {
699 type Item = Result<AdvisoryLockingRequest, fidl::Error>;
700
701 fn poll_next(
702 mut self: std::pin::Pin<&mut Self>,
703 cx: &mut std::task::Context<'_>,
704 ) -> std::task::Poll<Option<Self::Item>> {
705 let this = &mut *self;
706 if this.inner.check_shutdown(cx) {
707 this.is_terminated = true;
708 return std::task::Poll::Ready(None);
709 }
710 if this.is_terminated {
711 panic!("polled AdvisoryLockingRequestStream after completion");
712 }
713 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
714 |bytes, handles| {
715 match this.inner.channel().read_etc(cx, bytes, handles) {
716 std::task::Poll::Ready(Ok(())) => {}
717 std::task::Poll::Pending => return std::task::Poll::Pending,
718 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
719 this.is_terminated = true;
720 return std::task::Poll::Ready(None);
721 }
722 std::task::Poll::Ready(Err(e)) => {
723 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
724 e.into(),
725 ))));
726 }
727 }
728
729 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
731
732 std::task::Poll::Ready(Some(match header.ordinal {
733 0x6ee9c0ad53ec87aa => {
734 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
735 let mut req = fidl::new_empty!(
736 AdvisoryLockingAdvisoryLockRequest,
737 fidl::encoding::DefaultFuchsiaResourceDialect
738 );
739 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
740 let control_handle =
741 AdvisoryLockingControlHandle { inner: this.inner.clone() };
742 Ok(AdvisoryLockingRequest::AdvisoryLock {
743 request: req.request,
744
745 responder: AdvisoryLockingAdvisoryLockResponder {
746 control_handle: std::mem::ManuallyDrop::new(control_handle),
747 tx_id: header.tx_id,
748 },
749 })
750 }
751 _ => Err(fidl::Error::UnknownOrdinal {
752 ordinal: header.ordinal,
753 protocol_name:
754 <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
755 }),
756 }))
757 },
758 )
759 }
760}
761
762#[derive(Debug)]
775pub enum AdvisoryLockingRequest {
776 AdvisoryLock { request: AdvisoryLockRequest, responder: AdvisoryLockingAdvisoryLockResponder },
800}
801
802impl AdvisoryLockingRequest {
803 #[allow(irrefutable_let_patterns)]
804 pub fn into_advisory_lock(
805 self,
806 ) -> Option<(AdvisoryLockRequest, AdvisoryLockingAdvisoryLockResponder)> {
807 if let AdvisoryLockingRequest::AdvisoryLock { request, responder } = self {
808 Some((request, responder))
809 } else {
810 None
811 }
812 }
813
814 pub fn method_name(&self) -> &'static str {
816 match *self {
817 AdvisoryLockingRequest::AdvisoryLock { .. } => "advisory_lock",
818 }
819 }
820}
821
822#[derive(Debug, Clone)]
823pub struct AdvisoryLockingControlHandle {
824 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
825}
826
827impl fidl::endpoints::ControlHandle for AdvisoryLockingControlHandle {
828 fn shutdown(&self) {
829 self.inner.shutdown()
830 }
831
832 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
833 self.inner.shutdown_with_epitaph(status)
834 }
835
836 fn is_closed(&self) -> bool {
837 self.inner.channel().is_closed()
838 }
839 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
840 self.inner.channel().on_closed()
841 }
842
843 #[cfg(target_os = "fuchsia")]
844 fn signal_peer(
845 &self,
846 clear_mask: zx::Signals,
847 set_mask: zx::Signals,
848 ) -> Result<(), zx_status::Status> {
849 use fidl::Peered;
850 self.inner.channel().signal_peer(clear_mask, set_mask)
851 }
852}
853
854impl AdvisoryLockingControlHandle {}
855
856#[must_use = "FIDL methods require a response to be sent"]
857#[derive(Debug)]
858pub struct AdvisoryLockingAdvisoryLockResponder {
859 control_handle: std::mem::ManuallyDrop<AdvisoryLockingControlHandle>,
860 tx_id: u32,
861}
862
863impl std::ops::Drop for AdvisoryLockingAdvisoryLockResponder {
867 fn drop(&mut self) {
868 self.control_handle.shutdown();
869 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
871 }
872}
873
874impl fidl::endpoints::Responder for AdvisoryLockingAdvisoryLockResponder {
875 type ControlHandle = AdvisoryLockingControlHandle;
876
877 fn control_handle(&self) -> &AdvisoryLockingControlHandle {
878 &self.control_handle
879 }
880
881 fn drop_without_shutdown(mut self) {
882 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
884 std::mem::forget(self);
886 }
887}
888
889impl AdvisoryLockingAdvisoryLockResponder {
890 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
894 let _result = self.send_raw(result);
895 if _result.is_err() {
896 self.control_handle.shutdown();
897 }
898 self.drop_without_shutdown();
899 _result
900 }
901
902 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
904 let _result = self.send_raw(result);
905 self.drop_without_shutdown();
906 _result
907 }
908
909 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
910 self.control_handle
911 .inner
912 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
913 result,
914 self.tx_id,
915 0x6ee9c0ad53ec87aa,
916 fidl::encoding::DynamicFlags::empty(),
917 )
918 }
919}
920
921#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
922pub struct DirectoryMarker;
923
924impl fidl::endpoints::ProtocolMarker for DirectoryMarker {
925 type Proxy = DirectoryProxy;
926 type RequestStream = DirectoryRequestStream;
927 #[cfg(target_os = "fuchsia")]
928 type SynchronousProxy = DirectorySynchronousProxy;
929
930 const DEBUG_NAME: &'static str = "fuchsia.io.Directory";
931}
932impl fidl::endpoints::DiscoverableProtocolMarker for DirectoryMarker {}
933pub type DirectoryUnlinkResult = Result<(), i32>;
934pub type DirectoryRenameResult = Result<(), i32>;
935pub type DirectoryCreateSymlinkResult = Result<(), i32>;
936
937pub trait DirectoryProxyInterface: Send + Sync {
938 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
939 + Send;
940 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
941 fn r#clone(
942 &self,
943 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
944 ) -> Result<(), fidl::Error>;
945 type CloseResponseFut: std::future::Future<
946 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
947 > + Send;
948 fn r#close(&self) -> Self::CloseResponseFut;
949 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
950 fn r#query(&self) -> Self::QueryResponseFut;
951 fn r#deprecated_clone(
952 &self,
953 flags: OpenFlags,
954 object: fidl::endpoints::ServerEnd<NodeMarker>,
955 ) -> Result<(), fidl::Error>;
956 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
957 + Send;
958 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
959 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
960 fn r#deprecated_set_attr(
961 &self,
962 flags: NodeAttributeFlags,
963 attributes: &NodeAttributes,
964 ) -> Self::DeprecatedSetAttrResponseFut;
965 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
966 + Send;
967 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
968 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
969 + Send;
970 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
971 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
972 + Send;
973 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
974 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
975 + Send;
976 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
977 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
978 + Send;
979 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
980 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
981 + Send;
982 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
983 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
984 + Send;
985 fn r#update_attributes(
986 &self,
987 payload: &MutableNodeAttributes,
988 ) -> Self::UpdateAttributesResponseFut;
989 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
990 fn r#sync(&self) -> Self::SyncResponseFut;
991 fn r#list_extended_attributes(
992 &self,
993 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
994 ) -> Result<(), fidl::Error>;
995 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
996 + Send;
997 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
998 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
999 + Send;
1000 fn r#set_extended_attribute(
1001 &self,
1002 name: &[u8],
1003 value: ExtendedAttributeValue,
1004 mode: SetExtendedAttributeMode,
1005 ) -> Self::SetExtendedAttributeResponseFut;
1006 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
1007 + Send;
1008 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
1009 fn r#deprecated_open(
1010 &self,
1011 flags: OpenFlags,
1012 mode: ModeType,
1013 path: &str,
1014 object: fidl::endpoints::ServerEnd<NodeMarker>,
1015 ) -> Result<(), fidl::Error>;
1016 fn r#open(
1017 &self,
1018 path: &str,
1019 flags: Flags,
1020 options: &Options,
1021 object: fidl::Channel,
1022 ) -> Result<(), fidl::Error>;
1023 type ReadDirentsResponseFut: std::future::Future<Output = Result<(i32, Vec<u8>), fidl::Error>>
1024 + Send;
1025 fn r#read_dirents(&self, max_bytes: u64) -> Self::ReadDirentsResponseFut;
1026 type RewindResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1027 fn r#rewind(&self) -> Self::RewindResponseFut;
1028 type GetTokenResponseFut: std::future::Future<Output = Result<(i32, Option<fidl::NullableHandle>), fidl::Error>>
1029 + Send;
1030 fn r#get_token(&self) -> Self::GetTokenResponseFut;
1031 type LinkResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1032 fn r#link(
1033 &self,
1034 src: &str,
1035 dst_parent_token: fidl::NullableHandle,
1036 dst: &str,
1037 ) -> Self::LinkResponseFut;
1038 type UnlinkResponseFut: std::future::Future<Output = Result<DirectoryUnlinkResult, fidl::Error>>
1039 + Send;
1040 fn r#unlink(&self, name: &str, options: &UnlinkOptions) -> Self::UnlinkResponseFut;
1041 type RenameResponseFut: std::future::Future<Output = Result<DirectoryRenameResult, fidl::Error>>
1042 + Send;
1043 fn r#rename(
1044 &self,
1045 src: &str,
1046 dst_parent_token: fidl::Event,
1047 dst: &str,
1048 ) -> Self::RenameResponseFut;
1049 type CreateSymlinkResponseFut: std::future::Future<Output = Result<DirectoryCreateSymlinkResult, fidl::Error>>
1050 + Send;
1051 fn r#create_symlink(
1052 &self,
1053 name: &str,
1054 target: &[u8],
1055 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1056 ) -> Self::CreateSymlinkResponseFut;
1057 type WatchResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1058 fn r#watch(
1059 &self,
1060 mask: WatchMask,
1061 options: u32,
1062 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1063 ) -> Self::WatchResponseFut;
1064}
1065#[derive(Debug)]
1066#[cfg(target_os = "fuchsia")]
1067pub struct DirectorySynchronousProxy {
1068 client: fidl::client::sync::Client,
1069}
1070
1071#[cfg(target_os = "fuchsia")]
1072impl fidl::endpoints::SynchronousProxy for DirectorySynchronousProxy {
1073 type Proxy = DirectoryProxy;
1074 type Protocol = DirectoryMarker;
1075
1076 fn from_channel(inner: fidl::Channel) -> Self {
1077 Self::new(inner)
1078 }
1079
1080 fn into_channel(self) -> fidl::Channel {
1081 self.client.into_channel()
1082 }
1083
1084 fn as_channel(&self) -> &fidl::Channel {
1085 self.client.as_channel()
1086 }
1087}
1088
1089#[cfg(target_os = "fuchsia")]
1090impl DirectorySynchronousProxy {
1091 pub fn new(channel: fidl::Channel) -> Self {
1092 let protocol_name = <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1093 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1094 }
1095
1096 pub fn into_channel(self) -> fidl::Channel {
1097 self.client.into_channel()
1098 }
1099
1100 pub fn wait_for_event(
1103 &self,
1104 deadline: zx::MonotonicInstant,
1105 ) -> Result<DirectoryEvent, fidl::Error> {
1106 DirectoryEvent::decode(self.client.wait_for_event(deadline)?)
1107 }
1108
1109 pub fn r#advisory_lock(
1133 &self,
1134 mut request: &AdvisoryLockRequest,
1135 ___deadline: zx::MonotonicInstant,
1136 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1137 let _response = self.client.send_query::<
1138 AdvisoryLockingAdvisoryLockRequest,
1139 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1140 >(
1141 (request,),
1142 0x6ee9c0ad53ec87aa,
1143 fidl::encoding::DynamicFlags::empty(),
1144 ___deadline,
1145 )?;
1146 Ok(_response.map(|x| x))
1147 }
1148
1149 pub fn r#clone(
1150 &self,
1151 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1152 ) -> Result<(), fidl::Error> {
1153 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
1154 (request,),
1155 0x20d8a7aba2168a79,
1156 fidl::encoding::DynamicFlags::empty(),
1157 )
1158 }
1159
1160 pub fn r#close(
1171 &self,
1172 ___deadline: zx::MonotonicInstant,
1173 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1174 let _response = self.client.send_query::<
1175 fidl::encoding::EmptyPayload,
1176 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1177 >(
1178 (),
1179 0x5ac5d459ad7f657e,
1180 fidl::encoding::DynamicFlags::empty(),
1181 ___deadline,
1182 )?;
1183 Ok(_response.map(|x| x))
1184 }
1185
1186 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
1187 let _response = self.client.send_query::<
1188 fidl::encoding::EmptyPayload,
1189 fidl_fuchsia_unknown::QueryableQueryResponse,
1190 >(
1191 (),
1192 0x2658edee9decfc06,
1193 fidl::encoding::DynamicFlags::empty(),
1194 ___deadline,
1195 )?;
1196 Ok(_response.protocol)
1197 }
1198
1199 pub fn r#deprecated_clone(
1201 &self,
1202 mut flags: OpenFlags,
1203 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1204 ) -> Result<(), fidl::Error> {
1205 self.client.send::<NodeDeprecatedCloneRequest>(
1206 (flags, object),
1207 0x5a61678f293ce16f,
1208 fidl::encoding::DynamicFlags::FLEXIBLE,
1209 )
1210 }
1211
1212 pub fn r#deprecated_get_attr(
1214 &self,
1215 ___deadline: zx::MonotonicInstant,
1216 ) -> Result<(i32, NodeAttributes), fidl::Error> {
1217 let _response =
1218 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
1219 (),
1220 0x78985e216314dafd,
1221 fidl::encoding::DynamicFlags::empty(),
1222 ___deadline,
1223 )?;
1224 Ok((_response.s, _response.attributes))
1225 }
1226
1227 pub fn r#deprecated_set_attr(
1229 &self,
1230 mut flags: NodeAttributeFlags,
1231 mut attributes: &NodeAttributes,
1232 ___deadline: zx::MonotonicInstant,
1233 ) -> Result<i32, fidl::Error> {
1234 let _response =
1235 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
1236 (flags, attributes),
1237 0x4186c0f40d938f46,
1238 fidl::encoding::DynamicFlags::empty(),
1239 ___deadline,
1240 )?;
1241 Ok(_response.s)
1242 }
1243
1244 pub fn r#deprecated_get_flags(
1246 &self,
1247 ___deadline: zx::MonotonicInstant,
1248 ) -> Result<(i32, OpenFlags), fidl::Error> {
1249 let _response = self
1250 .client
1251 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
1252 (),
1253 0x5b88fffb8eda3aa1,
1254 fidl::encoding::DynamicFlags::empty(),
1255 ___deadline,
1256 )?;
1257 Ok((_response.s, _response.flags))
1258 }
1259
1260 pub fn r#deprecated_set_flags(
1262 &self,
1263 mut flags: OpenFlags,
1264 ___deadline: zx::MonotonicInstant,
1265 ) -> Result<i32, fidl::Error> {
1266 let _response = self
1267 .client
1268 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
1269 (flags,),
1270 0x5295b76c71fde733,
1271 fidl::encoding::DynamicFlags::empty(),
1272 ___deadline,
1273 )?;
1274 Ok(_response.s)
1275 }
1276
1277 pub fn r#get_flags(
1286 &self,
1287 ___deadline: zx::MonotonicInstant,
1288 ) -> Result<NodeGetFlagsResult, fidl::Error> {
1289 let _response = self.client.send_query::<
1290 fidl::encoding::EmptyPayload,
1291 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1292 >(
1293 (),
1294 0x176eb318f64ec23,
1295 fidl::encoding::DynamicFlags::FLEXIBLE,
1296 ___deadline,
1297 )?
1298 .into_result::<DirectoryMarker>("get_flags")?;
1299 Ok(_response.map(|x| x.flags))
1300 }
1301
1302 pub fn r#set_flags(
1312 &self,
1313 mut flags: Flags,
1314 ___deadline: zx::MonotonicInstant,
1315 ) -> Result<NodeSetFlagsResult, fidl::Error> {
1316 let _response = self.client.send_query::<
1317 NodeSetFlagsRequest,
1318 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1319 >(
1320 (flags,),
1321 0x55a8028685791ea8,
1322 fidl::encoding::DynamicFlags::FLEXIBLE,
1323 ___deadline,
1324 )?
1325 .into_result::<DirectoryMarker>("set_flags")?;
1326 Ok(_response.map(|x| x))
1327 }
1328
1329 pub fn r#query_filesystem(
1331 &self,
1332 ___deadline: zx::MonotonicInstant,
1333 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1334 let _response =
1335 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
1336 (),
1337 0x6f344a1c6b0a0610,
1338 fidl::encoding::DynamicFlags::empty(),
1339 ___deadline,
1340 )?;
1341 Ok((_response.s, _response.info))
1342 }
1343
1344 pub fn r#get_attributes(
1358 &self,
1359 mut query: NodeAttributesQuery,
1360 ___deadline: zx::MonotonicInstant,
1361 ) -> Result<NodeGetAttributesResult, fidl::Error> {
1362 let _response = self.client.send_query::<
1363 NodeGetAttributesRequest,
1364 fidl::encoding::ResultType<NodeAttributes2, i32>,
1365 >(
1366 (query,),
1367 0x3d4396a638ea053b,
1368 fidl::encoding::DynamicFlags::empty(),
1369 ___deadline,
1370 )?;
1371 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1372 }
1373
1374 pub fn r#update_attributes(
1383 &self,
1384 mut payload: &MutableNodeAttributes,
1385 ___deadline: zx::MonotonicInstant,
1386 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1387 let _response = self.client.send_query::<
1388 MutableNodeAttributes,
1389 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1390 >(
1391 payload,
1392 0x3308c1da5a89bf08,
1393 fidl::encoding::DynamicFlags::empty(),
1394 ___deadline,
1395 )?;
1396 Ok(_response.map(|x| x))
1397 }
1398
1399 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
1409 let _response = self.client.send_query::<
1410 fidl::encoding::EmptyPayload,
1411 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1412 >(
1413 (),
1414 0x2c5c27ca0ab5dc49,
1415 fidl::encoding::DynamicFlags::empty(),
1416 ___deadline,
1417 )?;
1418 Ok(_response.map(|x| x))
1419 }
1420
1421 pub fn r#list_extended_attributes(
1430 &self,
1431 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
1432 ) -> Result<(), fidl::Error> {
1433 self.client.send::<NodeListExtendedAttributesRequest>(
1434 (iterator,),
1435 0x4b61033de007fcd0,
1436 fidl::encoding::DynamicFlags::empty(),
1437 )
1438 }
1439
1440 pub fn r#get_extended_attribute(
1447 &self,
1448 mut name: &[u8],
1449 ___deadline: zx::MonotonicInstant,
1450 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1451 let _response = self.client.send_query::<
1452 NodeGetExtendedAttributeRequest,
1453 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1454 >(
1455 (name,),
1456 0x45ffa3ccfdeb76db,
1457 fidl::encoding::DynamicFlags::empty(),
1458 ___deadline,
1459 )?;
1460 Ok(_response.map(|x| x))
1461 }
1462
1463 pub fn r#set_extended_attribute(
1471 &self,
1472 mut name: &[u8],
1473 mut value: ExtendedAttributeValue,
1474 mut mode: SetExtendedAttributeMode,
1475 ___deadline: zx::MonotonicInstant,
1476 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1477 let _response = self.client.send_query::<
1478 NodeSetExtendedAttributeRequest,
1479 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1480 >(
1481 (name, &mut value, mode,),
1482 0x4a951362f681f23c,
1483 fidl::encoding::DynamicFlags::empty(),
1484 ___deadline,
1485 )?;
1486 Ok(_response.map(|x| x))
1487 }
1488
1489 pub fn r#remove_extended_attribute(
1495 &self,
1496 mut name: &[u8],
1497 ___deadline: zx::MonotonicInstant,
1498 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1499 let _response = self.client.send_query::<
1500 NodeRemoveExtendedAttributeRequest,
1501 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1502 >(
1503 (name,),
1504 0x7a0b9f3a9bf9032d,
1505 fidl::encoding::DynamicFlags::empty(),
1506 ___deadline,
1507 )?;
1508 Ok(_response.map(|x| x))
1509 }
1510
1511 pub fn r#deprecated_open(
1513 &self,
1514 mut flags: OpenFlags,
1515 mut mode: ModeType,
1516 mut path: &str,
1517 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1518 ) -> Result<(), fidl::Error> {
1519 self.client.send::<DirectoryDeprecatedOpenRequest>(
1520 (flags, mode, path, object),
1521 0x2c5044561d685ec0,
1522 fidl::encoding::DynamicFlags::FLEXIBLE,
1523 )
1524 }
1525
1526 pub fn r#open(
1533 &self,
1534 mut path: &str,
1535 mut flags: Flags,
1536 mut options: &Options,
1537 mut object: fidl::Channel,
1538 ) -> Result<(), fidl::Error> {
1539 self.client.send::<DirectoryOpenRequest>(
1540 (path, flags, options, object),
1541 0x568ddcb9a9cbb6d9,
1542 fidl::encoding::DynamicFlags::empty(),
1543 )
1544 }
1545
1546 pub fn r#read_dirents(
1572 &self,
1573 mut max_bytes: u64,
1574 ___deadline: zx::MonotonicInstant,
1575 ) -> Result<(i32, Vec<u8>), fidl::Error> {
1576 let _response =
1577 self.client.send_query::<DirectoryReadDirentsRequest, DirectoryReadDirentsResponse>(
1578 (max_bytes,),
1579 0x3582806bf27faa0a,
1580 fidl::encoding::DynamicFlags::empty(),
1581 ___deadline,
1582 )?;
1583 Ok((_response.s, _response.dirents))
1584 }
1585
1586 pub fn r#rewind(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
1590 let _response =
1591 self.client.send_query::<fidl::encoding::EmptyPayload, DirectoryRewindResponse>(
1592 (),
1593 0x16b1202af0f34c71,
1594 fidl::encoding::DynamicFlags::empty(),
1595 ___deadline,
1596 )?;
1597 Ok(_response.s)
1598 }
1599
1600 pub fn r#get_token(
1607 &self,
1608 ___deadline: zx::MonotonicInstant,
1609 ) -> Result<(i32, Option<fidl::NullableHandle>), fidl::Error> {
1610 let _response =
1611 self.client.send_query::<fidl::encoding::EmptyPayload, DirectoryGetTokenResponse>(
1612 (),
1613 0x26ae9d18763c8655,
1614 fidl::encoding::DynamicFlags::empty(),
1615 ___deadline,
1616 )?;
1617 Ok((_response.s, _response.token))
1618 }
1619
1620 pub fn r#link(
1637 &self,
1638 mut src: &str,
1639 mut dst_parent_token: fidl::NullableHandle,
1640 mut dst: &str,
1641 ___deadline: zx::MonotonicInstant,
1642 ) -> Result<i32, fidl::Error> {
1643 let _response = self.client.send_query::<DirectoryLinkRequest, DirectoryLinkResponse>(
1644 (src, dst_parent_token, dst),
1645 0x740604c0c7c930e7,
1646 fidl::encoding::DynamicFlags::empty(),
1647 ___deadline,
1648 )?;
1649 Ok(_response.s)
1650 }
1651
1652 pub fn r#unlink(
1677 &self,
1678 mut name: &str,
1679 mut options: &UnlinkOptions,
1680 ___deadline: zx::MonotonicInstant,
1681 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
1682 let _response = self.client.send_query::<
1683 DirectoryUnlinkRequest,
1684 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1685 >(
1686 (name, options,),
1687 0x750a0326a78d7bed,
1688 fidl::encoding::DynamicFlags::empty(),
1689 ___deadline,
1690 )?;
1691 Ok(_response.map(|x| x))
1692 }
1693
1694 pub fn r#rename(
1720 &self,
1721 mut src: &str,
1722 mut dst_parent_token: fidl::Event,
1723 mut dst: &str,
1724 ___deadline: zx::MonotonicInstant,
1725 ) -> Result<DirectoryRenameResult, fidl::Error> {
1726 let _response = self.client.send_query::<
1727 DirectoryRenameRequest,
1728 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1729 >(
1730 (src, dst_parent_token, dst,),
1731 0x7060e7723b9928de,
1732 fidl::encoding::DynamicFlags::empty(),
1733 ___deadline,
1734 )?;
1735 Ok(_response.map(|x| x))
1736 }
1737
1738 pub fn r#create_symlink(
1753 &self,
1754 mut name: &str,
1755 mut target: &[u8],
1756 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1757 ___deadline: zx::MonotonicInstant,
1758 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
1759 let _response = self.client.send_query::<
1760 DirectoryCreateSymlinkRequest,
1761 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1762 >(
1763 (name, target, connection,),
1764 0x21ce0f19ec043889,
1765 fidl::encoding::DynamicFlags::empty(),
1766 ___deadline,
1767 )?;
1768 Ok(_response.map(|x| x))
1769 }
1770
1771 pub fn r#watch(
1778 &self,
1779 mut mask: WatchMask,
1780 mut options: u32,
1781 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1782 ___deadline: zx::MonotonicInstant,
1783 ) -> Result<i32, fidl::Error> {
1784 let _response = self.client.send_query::<DirectoryWatchRequest, DirectoryWatchResponse>(
1785 (mask, options, watcher),
1786 0x5717193a59d66d91,
1787 fidl::encoding::DynamicFlags::empty(),
1788 ___deadline,
1789 )?;
1790 Ok(_response.s)
1791 }
1792}
1793
1794#[cfg(target_os = "fuchsia")]
1795impl From<DirectorySynchronousProxy> for zx::NullableHandle {
1796 fn from(value: DirectorySynchronousProxy) -> Self {
1797 value.into_channel().into()
1798 }
1799}
1800
1801#[cfg(target_os = "fuchsia")]
1802impl From<fidl::Channel> for DirectorySynchronousProxy {
1803 fn from(value: fidl::Channel) -> Self {
1804 Self::new(value)
1805 }
1806}
1807
1808#[cfg(target_os = "fuchsia")]
1809impl fidl::endpoints::FromClient for DirectorySynchronousProxy {
1810 type Protocol = DirectoryMarker;
1811
1812 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryMarker>) -> Self {
1813 Self::new(value.into_channel())
1814 }
1815}
1816
1817#[derive(Debug, Clone)]
1818pub struct DirectoryProxy {
1819 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1820}
1821
1822impl fidl::endpoints::Proxy for DirectoryProxy {
1823 type Protocol = DirectoryMarker;
1824
1825 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1826 Self::new(inner)
1827 }
1828
1829 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1830 self.client.into_channel().map_err(|client| Self { client })
1831 }
1832
1833 fn as_channel(&self) -> &::fidl::AsyncChannel {
1834 self.client.as_channel()
1835 }
1836}
1837
1838impl DirectoryProxy {
1839 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1841 let protocol_name = <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1842 Self { client: fidl::client::Client::new(channel, protocol_name) }
1843 }
1844
1845 pub fn take_event_stream(&self) -> DirectoryEventStream {
1851 DirectoryEventStream { event_receiver: self.client.take_event_receiver() }
1852 }
1853
1854 pub fn r#advisory_lock(
1878 &self,
1879 mut request: &AdvisoryLockRequest,
1880 ) -> fidl::client::QueryResponseFut<
1881 AdvisoryLockingAdvisoryLockResult,
1882 fidl::encoding::DefaultFuchsiaResourceDialect,
1883 > {
1884 DirectoryProxyInterface::r#advisory_lock(self, request)
1885 }
1886
1887 pub fn r#clone(
1888 &self,
1889 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1890 ) -> Result<(), fidl::Error> {
1891 DirectoryProxyInterface::r#clone(self, request)
1892 }
1893
1894 pub fn r#close(
1905 &self,
1906 ) -> fidl::client::QueryResponseFut<
1907 fidl_fuchsia_unknown::CloseableCloseResult,
1908 fidl::encoding::DefaultFuchsiaResourceDialect,
1909 > {
1910 DirectoryProxyInterface::r#close(self)
1911 }
1912
1913 pub fn r#query(
1914 &self,
1915 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
1916 {
1917 DirectoryProxyInterface::r#query(self)
1918 }
1919
1920 pub fn r#deprecated_clone(
1922 &self,
1923 mut flags: OpenFlags,
1924 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1925 ) -> Result<(), fidl::Error> {
1926 DirectoryProxyInterface::r#deprecated_clone(self, flags, object)
1927 }
1928
1929 pub fn r#deprecated_get_attr(
1931 &self,
1932 ) -> fidl::client::QueryResponseFut<
1933 (i32, NodeAttributes),
1934 fidl::encoding::DefaultFuchsiaResourceDialect,
1935 > {
1936 DirectoryProxyInterface::r#deprecated_get_attr(self)
1937 }
1938
1939 pub fn r#deprecated_set_attr(
1941 &self,
1942 mut flags: NodeAttributeFlags,
1943 mut attributes: &NodeAttributes,
1944 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
1945 DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
1946 }
1947
1948 pub fn r#deprecated_get_flags(
1950 &self,
1951 ) -> fidl::client::QueryResponseFut<
1952 (i32, OpenFlags),
1953 fidl::encoding::DefaultFuchsiaResourceDialect,
1954 > {
1955 DirectoryProxyInterface::r#deprecated_get_flags(self)
1956 }
1957
1958 pub fn r#deprecated_set_flags(
1960 &self,
1961 mut flags: OpenFlags,
1962 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
1963 DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
1964 }
1965
1966 pub fn r#get_flags(
1975 &self,
1976 ) -> fidl::client::QueryResponseFut<
1977 NodeGetFlagsResult,
1978 fidl::encoding::DefaultFuchsiaResourceDialect,
1979 > {
1980 DirectoryProxyInterface::r#get_flags(self)
1981 }
1982
1983 pub fn r#set_flags(
1993 &self,
1994 mut flags: Flags,
1995 ) -> fidl::client::QueryResponseFut<
1996 NodeSetFlagsResult,
1997 fidl::encoding::DefaultFuchsiaResourceDialect,
1998 > {
1999 DirectoryProxyInterface::r#set_flags(self, flags)
2000 }
2001
2002 pub fn r#query_filesystem(
2004 &self,
2005 ) -> fidl::client::QueryResponseFut<
2006 (i32, Option<Box<FilesystemInfo>>),
2007 fidl::encoding::DefaultFuchsiaResourceDialect,
2008 > {
2009 DirectoryProxyInterface::r#query_filesystem(self)
2010 }
2011
2012 pub fn r#get_attributes(
2026 &self,
2027 mut query: NodeAttributesQuery,
2028 ) -> fidl::client::QueryResponseFut<
2029 NodeGetAttributesResult,
2030 fidl::encoding::DefaultFuchsiaResourceDialect,
2031 > {
2032 DirectoryProxyInterface::r#get_attributes(self, query)
2033 }
2034
2035 pub fn r#update_attributes(
2044 &self,
2045 mut payload: &MutableNodeAttributes,
2046 ) -> fidl::client::QueryResponseFut<
2047 NodeUpdateAttributesResult,
2048 fidl::encoding::DefaultFuchsiaResourceDialect,
2049 > {
2050 DirectoryProxyInterface::r#update_attributes(self, payload)
2051 }
2052
2053 pub fn r#sync(
2063 &self,
2064 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
2065 {
2066 DirectoryProxyInterface::r#sync(self)
2067 }
2068
2069 pub fn r#list_extended_attributes(
2078 &self,
2079 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2080 ) -> Result<(), fidl::Error> {
2081 DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
2082 }
2083
2084 pub fn r#get_extended_attribute(
2091 &self,
2092 mut name: &[u8],
2093 ) -> fidl::client::QueryResponseFut<
2094 NodeGetExtendedAttributeResult,
2095 fidl::encoding::DefaultFuchsiaResourceDialect,
2096 > {
2097 DirectoryProxyInterface::r#get_extended_attribute(self, name)
2098 }
2099
2100 pub fn r#set_extended_attribute(
2108 &self,
2109 mut name: &[u8],
2110 mut value: ExtendedAttributeValue,
2111 mut mode: SetExtendedAttributeMode,
2112 ) -> fidl::client::QueryResponseFut<
2113 NodeSetExtendedAttributeResult,
2114 fidl::encoding::DefaultFuchsiaResourceDialect,
2115 > {
2116 DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
2117 }
2118
2119 pub fn r#remove_extended_attribute(
2125 &self,
2126 mut name: &[u8],
2127 ) -> fidl::client::QueryResponseFut<
2128 NodeRemoveExtendedAttributeResult,
2129 fidl::encoding::DefaultFuchsiaResourceDialect,
2130 > {
2131 DirectoryProxyInterface::r#remove_extended_attribute(self, name)
2132 }
2133
2134 pub fn r#deprecated_open(
2136 &self,
2137 mut flags: OpenFlags,
2138 mut mode: ModeType,
2139 mut path: &str,
2140 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2141 ) -> Result<(), fidl::Error> {
2142 DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
2143 }
2144
2145 pub fn r#open(
2152 &self,
2153 mut path: &str,
2154 mut flags: Flags,
2155 mut options: &Options,
2156 mut object: fidl::Channel,
2157 ) -> Result<(), fidl::Error> {
2158 DirectoryProxyInterface::r#open(self, path, flags, options, object)
2159 }
2160
2161 pub fn r#read_dirents(
2187 &self,
2188 mut max_bytes: u64,
2189 ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fidl::encoding::DefaultFuchsiaResourceDialect>
2190 {
2191 DirectoryProxyInterface::r#read_dirents(self, max_bytes)
2192 }
2193
2194 pub fn r#rewind(
2198 &self,
2199 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2200 DirectoryProxyInterface::r#rewind(self)
2201 }
2202
2203 pub fn r#get_token(
2210 &self,
2211 ) -> fidl::client::QueryResponseFut<
2212 (i32, Option<fidl::NullableHandle>),
2213 fidl::encoding::DefaultFuchsiaResourceDialect,
2214 > {
2215 DirectoryProxyInterface::r#get_token(self)
2216 }
2217
2218 pub fn r#link(
2235 &self,
2236 mut src: &str,
2237 mut dst_parent_token: fidl::NullableHandle,
2238 mut dst: &str,
2239 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2240 DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
2241 }
2242
2243 pub fn r#unlink(
2268 &self,
2269 mut name: &str,
2270 mut options: &UnlinkOptions,
2271 ) -> fidl::client::QueryResponseFut<
2272 DirectoryUnlinkResult,
2273 fidl::encoding::DefaultFuchsiaResourceDialect,
2274 > {
2275 DirectoryProxyInterface::r#unlink(self, name, options)
2276 }
2277
2278 pub fn r#rename(
2304 &self,
2305 mut src: &str,
2306 mut dst_parent_token: fidl::Event,
2307 mut dst: &str,
2308 ) -> fidl::client::QueryResponseFut<
2309 DirectoryRenameResult,
2310 fidl::encoding::DefaultFuchsiaResourceDialect,
2311 > {
2312 DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
2313 }
2314
2315 pub fn r#create_symlink(
2330 &self,
2331 mut name: &str,
2332 mut target: &[u8],
2333 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
2334 ) -> fidl::client::QueryResponseFut<
2335 DirectoryCreateSymlinkResult,
2336 fidl::encoding::DefaultFuchsiaResourceDialect,
2337 > {
2338 DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
2339 }
2340
2341 pub fn r#watch(
2348 &self,
2349 mut mask: WatchMask,
2350 mut options: u32,
2351 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
2352 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2353 DirectoryProxyInterface::r#watch(self, mask, options, watcher)
2354 }
2355}
2356
2357impl DirectoryProxyInterface for DirectoryProxy {
2358 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
2359 AdvisoryLockingAdvisoryLockResult,
2360 fidl::encoding::DefaultFuchsiaResourceDialect,
2361 >;
2362 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
2363 fn _decode(
2364 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2365 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
2366 let _response = fidl::client::decode_transaction_body::<
2367 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2368 fidl::encoding::DefaultFuchsiaResourceDialect,
2369 0x6ee9c0ad53ec87aa,
2370 >(_buf?)?;
2371 Ok(_response.map(|x| x))
2372 }
2373 self.client.send_query_and_decode::<
2374 AdvisoryLockingAdvisoryLockRequest,
2375 AdvisoryLockingAdvisoryLockResult,
2376 >(
2377 (request,),
2378 0x6ee9c0ad53ec87aa,
2379 fidl::encoding::DynamicFlags::empty(),
2380 _decode,
2381 )
2382 }
2383
2384 fn r#clone(
2385 &self,
2386 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
2387 ) -> Result<(), fidl::Error> {
2388 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
2389 (request,),
2390 0x20d8a7aba2168a79,
2391 fidl::encoding::DynamicFlags::empty(),
2392 )
2393 }
2394
2395 type CloseResponseFut = fidl::client::QueryResponseFut<
2396 fidl_fuchsia_unknown::CloseableCloseResult,
2397 fidl::encoding::DefaultFuchsiaResourceDialect,
2398 >;
2399 fn r#close(&self) -> Self::CloseResponseFut {
2400 fn _decode(
2401 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2402 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
2403 let _response = fidl::client::decode_transaction_body::<
2404 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2405 fidl::encoding::DefaultFuchsiaResourceDialect,
2406 0x5ac5d459ad7f657e,
2407 >(_buf?)?;
2408 Ok(_response.map(|x| x))
2409 }
2410 self.client.send_query_and_decode::<
2411 fidl::encoding::EmptyPayload,
2412 fidl_fuchsia_unknown::CloseableCloseResult,
2413 >(
2414 (),
2415 0x5ac5d459ad7f657e,
2416 fidl::encoding::DynamicFlags::empty(),
2417 _decode,
2418 )
2419 }
2420
2421 type QueryResponseFut =
2422 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
2423 fn r#query(&self) -> Self::QueryResponseFut {
2424 fn _decode(
2425 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2426 ) -> Result<Vec<u8>, fidl::Error> {
2427 let _response = fidl::client::decode_transaction_body::<
2428 fidl_fuchsia_unknown::QueryableQueryResponse,
2429 fidl::encoding::DefaultFuchsiaResourceDialect,
2430 0x2658edee9decfc06,
2431 >(_buf?)?;
2432 Ok(_response.protocol)
2433 }
2434 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
2435 (),
2436 0x2658edee9decfc06,
2437 fidl::encoding::DynamicFlags::empty(),
2438 _decode,
2439 )
2440 }
2441
2442 fn r#deprecated_clone(
2443 &self,
2444 mut flags: OpenFlags,
2445 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2446 ) -> Result<(), fidl::Error> {
2447 self.client.send::<NodeDeprecatedCloneRequest>(
2448 (flags, object),
2449 0x5a61678f293ce16f,
2450 fidl::encoding::DynamicFlags::FLEXIBLE,
2451 )
2452 }
2453
2454 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
2455 (i32, NodeAttributes),
2456 fidl::encoding::DefaultFuchsiaResourceDialect,
2457 >;
2458 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
2459 fn _decode(
2460 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2461 ) -> Result<(i32, NodeAttributes), fidl::Error> {
2462 let _response = fidl::client::decode_transaction_body::<
2463 NodeDeprecatedGetAttrResponse,
2464 fidl::encoding::DefaultFuchsiaResourceDialect,
2465 0x78985e216314dafd,
2466 >(_buf?)?;
2467 Ok((_response.s, _response.attributes))
2468 }
2469 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
2470 (),
2471 0x78985e216314dafd,
2472 fidl::encoding::DynamicFlags::empty(),
2473 _decode,
2474 )
2475 }
2476
2477 type DeprecatedSetAttrResponseFut =
2478 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2479 fn r#deprecated_set_attr(
2480 &self,
2481 mut flags: NodeAttributeFlags,
2482 mut attributes: &NodeAttributes,
2483 ) -> Self::DeprecatedSetAttrResponseFut {
2484 fn _decode(
2485 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2486 ) -> Result<i32, fidl::Error> {
2487 let _response = fidl::client::decode_transaction_body::<
2488 NodeDeprecatedSetAttrResponse,
2489 fidl::encoding::DefaultFuchsiaResourceDialect,
2490 0x4186c0f40d938f46,
2491 >(_buf?)?;
2492 Ok(_response.s)
2493 }
2494 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
2495 (flags, attributes),
2496 0x4186c0f40d938f46,
2497 fidl::encoding::DynamicFlags::empty(),
2498 _decode,
2499 )
2500 }
2501
2502 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
2503 (i32, OpenFlags),
2504 fidl::encoding::DefaultFuchsiaResourceDialect,
2505 >;
2506 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
2507 fn _decode(
2508 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2509 ) -> Result<(i32, OpenFlags), fidl::Error> {
2510 let _response = fidl::client::decode_transaction_body::<
2511 NodeDeprecatedGetFlagsResponse,
2512 fidl::encoding::DefaultFuchsiaResourceDialect,
2513 0x5b88fffb8eda3aa1,
2514 >(_buf?)?;
2515 Ok((_response.s, _response.flags))
2516 }
2517 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
2518 (),
2519 0x5b88fffb8eda3aa1,
2520 fidl::encoding::DynamicFlags::empty(),
2521 _decode,
2522 )
2523 }
2524
2525 type DeprecatedSetFlagsResponseFut =
2526 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2527 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
2528 fn _decode(
2529 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2530 ) -> Result<i32, fidl::Error> {
2531 let _response = fidl::client::decode_transaction_body::<
2532 NodeDeprecatedSetFlagsResponse,
2533 fidl::encoding::DefaultFuchsiaResourceDialect,
2534 0x5295b76c71fde733,
2535 >(_buf?)?;
2536 Ok(_response.s)
2537 }
2538 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
2539 (flags,),
2540 0x5295b76c71fde733,
2541 fidl::encoding::DynamicFlags::empty(),
2542 _decode,
2543 )
2544 }
2545
2546 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
2547 NodeGetFlagsResult,
2548 fidl::encoding::DefaultFuchsiaResourceDialect,
2549 >;
2550 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
2551 fn _decode(
2552 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2553 ) -> Result<NodeGetFlagsResult, fidl::Error> {
2554 let _response = fidl::client::decode_transaction_body::<
2555 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
2556 fidl::encoding::DefaultFuchsiaResourceDialect,
2557 0x176eb318f64ec23,
2558 >(_buf?)?
2559 .into_result::<DirectoryMarker>("get_flags")?;
2560 Ok(_response.map(|x| x.flags))
2561 }
2562 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
2563 (),
2564 0x176eb318f64ec23,
2565 fidl::encoding::DynamicFlags::FLEXIBLE,
2566 _decode,
2567 )
2568 }
2569
2570 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
2571 NodeSetFlagsResult,
2572 fidl::encoding::DefaultFuchsiaResourceDialect,
2573 >;
2574 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
2575 fn _decode(
2576 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2577 ) -> Result<NodeSetFlagsResult, fidl::Error> {
2578 let _response = fidl::client::decode_transaction_body::<
2579 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2580 fidl::encoding::DefaultFuchsiaResourceDialect,
2581 0x55a8028685791ea8,
2582 >(_buf?)?
2583 .into_result::<DirectoryMarker>("set_flags")?;
2584 Ok(_response.map(|x| x))
2585 }
2586 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
2587 (flags,),
2588 0x55a8028685791ea8,
2589 fidl::encoding::DynamicFlags::FLEXIBLE,
2590 _decode,
2591 )
2592 }
2593
2594 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
2595 (i32, Option<Box<FilesystemInfo>>),
2596 fidl::encoding::DefaultFuchsiaResourceDialect,
2597 >;
2598 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
2599 fn _decode(
2600 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2601 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
2602 let _response = fidl::client::decode_transaction_body::<
2603 NodeQueryFilesystemResponse,
2604 fidl::encoding::DefaultFuchsiaResourceDialect,
2605 0x6f344a1c6b0a0610,
2606 >(_buf?)?;
2607 Ok((_response.s, _response.info))
2608 }
2609 self.client.send_query_and_decode::<
2610 fidl::encoding::EmptyPayload,
2611 (i32, Option<Box<FilesystemInfo>>),
2612 >(
2613 (),
2614 0x6f344a1c6b0a0610,
2615 fidl::encoding::DynamicFlags::empty(),
2616 _decode,
2617 )
2618 }
2619
2620 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
2621 NodeGetAttributesResult,
2622 fidl::encoding::DefaultFuchsiaResourceDialect,
2623 >;
2624 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
2625 fn _decode(
2626 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2627 ) -> Result<NodeGetAttributesResult, fidl::Error> {
2628 let _response = fidl::client::decode_transaction_body::<
2629 fidl::encoding::ResultType<NodeAttributes2, i32>,
2630 fidl::encoding::DefaultFuchsiaResourceDialect,
2631 0x3d4396a638ea053b,
2632 >(_buf?)?;
2633 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
2634 }
2635 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
2636 (query,),
2637 0x3d4396a638ea053b,
2638 fidl::encoding::DynamicFlags::empty(),
2639 _decode,
2640 )
2641 }
2642
2643 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
2644 NodeUpdateAttributesResult,
2645 fidl::encoding::DefaultFuchsiaResourceDialect,
2646 >;
2647 fn r#update_attributes(
2648 &self,
2649 mut payload: &MutableNodeAttributes,
2650 ) -> Self::UpdateAttributesResponseFut {
2651 fn _decode(
2652 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2653 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
2654 let _response = fidl::client::decode_transaction_body::<
2655 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2656 fidl::encoding::DefaultFuchsiaResourceDialect,
2657 0x3308c1da5a89bf08,
2658 >(_buf?)?;
2659 Ok(_response.map(|x| x))
2660 }
2661 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
2662 payload,
2663 0x3308c1da5a89bf08,
2664 fidl::encoding::DynamicFlags::empty(),
2665 _decode,
2666 )
2667 }
2668
2669 type SyncResponseFut = fidl::client::QueryResponseFut<
2670 NodeSyncResult,
2671 fidl::encoding::DefaultFuchsiaResourceDialect,
2672 >;
2673 fn r#sync(&self) -> Self::SyncResponseFut {
2674 fn _decode(
2675 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2676 ) -> Result<NodeSyncResult, fidl::Error> {
2677 let _response = fidl::client::decode_transaction_body::<
2678 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2679 fidl::encoding::DefaultFuchsiaResourceDialect,
2680 0x2c5c27ca0ab5dc49,
2681 >(_buf?)?;
2682 Ok(_response.map(|x| x))
2683 }
2684 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
2685 (),
2686 0x2c5c27ca0ab5dc49,
2687 fidl::encoding::DynamicFlags::empty(),
2688 _decode,
2689 )
2690 }
2691
2692 fn r#list_extended_attributes(
2693 &self,
2694 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2695 ) -> Result<(), fidl::Error> {
2696 self.client.send::<NodeListExtendedAttributesRequest>(
2697 (iterator,),
2698 0x4b61033de007fcd0,
2699 fidl::encoding::DynamicFlags::empty(),
2700 )
2701 }
2702
2703 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2704 NodeGetExtendedAttributeResult,
2705 fidl::encoding::DefaultFuchsiaResourceDialect,
2706 >;
2707 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
2708 fn _decode(
2709 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2710 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
2711 let _response = fidl::client::decode_transaction_body::<
2712 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
2713 fidl::encoding::DefaultFuchsiaResourceDialect,
2714 0x45ffa3ccfdeb76db,
2715 >(_buf?)?;
2716 Ok(_response.map(|x| x))
2717 }
2718 self.client.send_query_and_decode::<
2719 NodeGetExtendedAttributeRequest,
2720 NodeGetExtendedAttributeResult,
2721 >(
2722 (name,),
2723 0x45ffa3ccfdeb76db,
2724 fidl::encoding::DynamicFlags::empty(),
2725 _decode,
2726 )
2727 }
2728
2729 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2730 NodeSetExtendedAttributeResult,
2731 fidl::encoding::DefaultFuchsiaResourceDialect,
2732 >;
2733 fn r#set_extended_attribute(
2734 &self,
2735 mut name: &[u8],
2736 mut value: ExtendedAttributeValue,
2737 mut mode: SetExtendedAttributeMode,
2738 ) -> Self::SetExtendedAttributeResponseFut {
2739 fn _decode(
2740 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2741 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
2742 let _response = fidl::client::decode_transaction_body::<
2743 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2744 fidl::encoding::DefaultFuchsiaResourceDialect,
2745 0x4a951362f681f23c,
2746 >(_buf?)?;
2747 Ok(_response.map(|x| x))
2748 }
2749 self.client.send_query_and_decode::<
2750 NodeSetExtendedAttributeRequest,
2751 NodeSetExtendedAttributeResult,
2752 >(
2753 (name, &mut value, mode,),
2754 0x4a951362f681f23c,
2755 fidl::encoding::DynamicFlags::empty(),
2756 _decode,
2757 )
2758 }
2759
2760 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2761 NodeRemoveExtendedAttributeResult,
2762 fidl::encoding::DefaultFuchsiaResourceDialect,
2763 >;
2764 fn r#remove_extended_attribute(
2765 &self,
2766 mut name: &[u8],
2767 ) -> Self::RemoveExtendedAttributeResponseFut {
2768 fn _decode(
2769 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2770 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
2771 let _response = fidl::client::decode_transaction_body::<
2772 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2773 fidl::encoding::DefaultFuchsiaResourceDialect,
2774 0x7a0b9f3a9bf9032d,
2775 >(_buf?)?;
2776 Ok(_response.map(|x| x))
2777 }
2778 self.client.send_query_and_decode::<
2779 NodeRemoveExtendedAttributeRequest,
2780 NodeRemoveExtendedAttributeResult,
2781 >(
2782 (name,),
2783 0x7a0b9f3a9bf9032d,
2784 fidl::encoding::DynamicFlags::empty(),
2785 _decode,
2786 )
2787 }
2788
2789 fn r#deprecated_open(
2790 &self,
2791 mut flags: OpenFlags,
2792 mut mode: ModeType,
2793 mut path: &str,
2794 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2795 ) -> Result<(), fidl::Error> {
2796 self.client.send::<DirectoryDeprecatedOpenRequest>(
2797 (flags, mode, path, object),
2798 0x2c5044561d685ec0,
2799 fidl::encoding::DynamicFlags::FLEXIBLE,
2800 )
2801 }
2802
2803 fn r#open(
2804 &self,
2805 mut path: &str,
2806 mut flags: Flags,
2807 mut options: &Options,
2808 mut object: fidl::Channel,
2809 ) -> Result<(), fidl::Error> {
2810 self.client.send::<DirectoryOpenRequest>(
2811 (path, flags, options, object),
2812 0x568ddcb9a9cbb6d9,
2813 fidl::encoding::DynamicFlags::empty(),
2814 )
2815 }
2816
2817 type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
2818 (i32, Vec<u8>),
2819 fidl::encoding::DefaultFuchsiaResourceDialect,
2820 >;
2821 fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
2822 fn _decode(
2823 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2824 ) -> Result<(i32, Vec<u8>), fidl::Error> {
2825 let _response = fidl::client::decode_transaction_body::<
2826 DirectoryReadDirentsResponse,
2827 fidl::encoding::DefaultFuchsiaResourceDialect,
2828 0x3582806bf27faa0a,
2829 >(_buf?)?;
2830 Ok((_response.s, _response.dirents))
2831 }
2832 self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
2833 (max_bytes,),
2834 0x3582806bf27faa0a,
2835 fidl::encoding::DynamicFlags::empty(),
2836 _decode,
2837 )
2838 }
2839
2840 type RewindResponseFut =
2841 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2842 fn r#rewind(&self) -> Self::RewindResponseFut {
2843 fn _decode(
2844 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2845 ) -> Result<i32, fidl::Error> {
2846 let _response = fidl::client::decode_transaction_body::<
2847 DirectoryRewindResponse,
2848 fidl::encoding::DefaultFuchsiaResourceDialect,
2849 0x16b1202af0f34c71,
2850 >(_buf?)?;
2851 Ok(_response.s)
2852 }
2853 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
2854 (),
2855 0x16b1202af0f34c71,
2856 fidl::encoding::DynamicFlags::empty(),
2857 _decode,
2858 )
2859 }
2860
2861 type GetTokenResponseFut = fidl::client::QueryResponseFut<
2862 (i32, Option<fidl::NullableHandle>),
2863 fidl::encoding::DefaultFuchsiaResourceDialect,
2864 >;
2865 fn r#get_token(&self) -> Self::GetTokenResponseFut {
2866 fn _decode(
2867 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2868 ) -> Result<(i32, Option<fidl::NullableHandle>), fidl::Error> {
2869 let _response = fidl::client::decode_transaction_body::<
2870 DirectoryGetTokenResponse,
2871 fidl::encoding::DefaultFuchsiaResourceDialect,
2872 0x26ae9d18763c8655,
2873 >(_buf?)?;
2874 Ok((_response.s, _response.token))
2875 }
2876 self.client.send_query_and_decode::<
2877 fidl::encoding::EmptyPayload,
2878 (i32, Option<fidl::NullableHandle>),
2879 >(
2880 (),
2881 0x26ae9d18763c8655,
2882 fidl::encoding::DynamicFlags::empty(),
2883 _decode,
2884 )
2885 }
2886
2887 type LinkResponseFut =
2888 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2889 fn r#link(
2890 &self,
2891 mut src: &str,
2892 mut dst_parent_token: fidl::NullableHandle,
2893 mut dst: &str,
2894 ) -> Self::LinkResponseFut {
2895 fn _decode(
2896 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2897 ) -> Result<i32, fidl::Error> {
2898 let _response = fidl::client::decode_transaction_body::<
2899 DirectoryLinkResponse,
2900 fidl::encoding::DefaultFuchsiaResourceDialect,
2901 0x740604c0c7c930e7,
2902 >(_buf?)?;
2903 Ok(_response.s)
2904 }
2905 self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2906 (src, dst_parent_token, dst),
2907 0x740604c0c7c930e7,
2908 fidl::encoding::DynamicFlags::empty(),
2909 _decode,
2910 )
2911 }
2912
2913 type UnlinkResponseFut = fidl::client::QueryResponseFut<
2914 DirectoryUnlinkResult,
2915 fidl::encoding::DefaultFuchsiaResourceDialect,
2916 >;
2917 fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
2918 fn _decode(
2919 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2920 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
2921 let _response = fidl::client::decode_transaction_body::<
2922 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2923 fidl::encoding::DefaultFuchsiaResourceDialect,
2924 0x750a0326a78d7bed,
2925 >(_buf?)?;
2926 Ok(_response.map(|x| x))
2927 }
2928 self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
2929 (name, options),
2930 0x750a0326a78d7bed,
2931 fidl::encoding::DynamicFlags::empty(),
2932 _decode,
2933 )
2934 }
2935
2936 type RenameResponseFut = fidl::client::QueryResponseFut<
2937 DirectoryRenameResult,
2938 fidl::encoding::DefaultFuchsiaResourceDialect,
2939 >;
2940 fn r#rename(
2941 &self,
2942 mut src: &str,
2943 mut dst_parent_token: fidl::Event,
2944 mut dst: &str,
2945 ) -> Self::RenameResponseFut {
2946 fn _decode(
2947 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2948 ) -> Result<DirectoryRenameResult, fidl::Error> {
2949 let _response = fidl::client::decode_transaction_body::<
2950 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2951 fidl::encoding::DefaultFuchsiaResourceDialect,
2952 0x7060e7723b9928de,
2953 >(_buf?)?;
2954 Ok(_response.map(|x| x))
2955 }
2956 self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
2957 (src, dst_parent_token, dst),
2958 0x7060e7723b9928de,
2959 fidl::encoding::DynamicFlags::empty(),
2960 _decode,
2961 )
2962 }
2963
2964 type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
2965 DirectoryCreateSymlinkResult,
2966 fidl::encoding::DefaultFuchsiaResourceDialect,
2967 >;
2968 fn r#create_symlink(
2969 &self,
2970 mut name: &str,
2971 mut target: &[u8],
2972 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
2973 ) -> Self::CreateSymlinkResponseFut {
2974 fn _decode(
2975 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2976 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
2977 let _response = fidl::client::decode_transaction_body::<
2978 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2979 fidl::encoding::DefaultFuchsiaResourceDialect,
2980 0x21ce0f19ec043889,
2981 >(_buf?)?;
2982 Ok(_response.map(|x| x))
2983 }
2984 self.client
2985 .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
2986 (name, target, connection),
2987 0x21ce0f19ec043889,
2988 fidl::encoding::DynamicFlags::empty(),
2989 _decode,
2990 )
2991 }
2992
2993 type WatchResponseFut =
2994 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2995 fn r#watch(
2996 &self,
2997 mut mask: WatchMask,
2998 mut options: u32,
2999 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
3000 ) -> Self::WatchResponseFut {
3001 fn _decode(
3002 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3003 ) -> Result<i32, fidl::Error> {
3004 let _response = fidl::client::decode_transaction_body::<
3005 DirectoryWatchResponse,
3006 fidl::encoding::DefaultFuchsiaResourceDialect,
3007 0x5717193a59d66d91,
3008 >(_buf?)?;
3009 Ok(_response.s)
3010 }
3011 self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
3012 (mask, options, watcher),
3013 0x5717193a59d66d91,
3014 fidl::encoding::DynamicFlags::empty(),
3015 _decode,
3016 )
3017 }
3018}
3019
3020pub struct DirectoryEventStream {
3021 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3022}
3023
3024impl std::marker::Unpin for DirectoryEventStream {}
3025
3026impl futures::stream::FusedStream for DirectoryEventStream {
3027 fn is_terminated(&self) -> bool {
3028 self.event_receiver.is_terminated()
3029 }
3030}
3031
3032impl futures::Stream for DirectoryEventStream {
3033 type Item = Result<DirectoryEvent, fidl::Error>;
3034
3035 fn poll_next(
3036 mut self: std::pin::Pin<&mut Self>,
3037 cx: &mut std::task::Context<'_>,
3038 ) -> std::task::Poll<Option<Self::Item>> {
3039 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3040 &mut self.event_receiver,
3041 cx
3042 )?) {
3043 Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
3044 None => std::task::Poll::Ready(None),
3045 }
3046 }
3047}
3048
3049#[derive(Debug)]
3050pub enum DirectoryEvent {
3051 OnOpen_ {
3052 s: i32,
3053 info: Option<Box<NodeInfoDeprecated>>,
3054 },
3055 OnRepresentation {
3056 payload: Representation,
3057 },
3058 #[non_exhaustive]
3059 _UnknownEvent {
3060 ordinal: u64,
3062 },
3063}
3064
3065impl DirectoryEvent {
3066 #[allow(irrefutable_let_patterns)]
3067 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
3068 if let DirectoryEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
3069 }
3070 #[allow(irrefutable_let_patterns)]
3071 pub fn into_on_representation(self) -> Option<Representation> {
3072 if let DirectoryEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
3073 }
3074
3075 fn decode(
3077 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3078 ) -> Result<DirectoryEvent, fidl::Error> {
3079 let (bytes, _handles) = buf.split_mut();
3080 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3081 debug_assert_eq!(tx_header.tx_id, 0);
3082 match tx_header.ordinal {
3083 0x7fc7bbb1dbfd1972 => {
3084 let mut out = fidl::new_empty!(
3085 NodeOnOpenRequest,
3086 fidl::encoding::DefaultFuchsiaResourceDialect
3087 );
3088 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3089 Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
3090 }
3091 0x5cb40567d80a510c => {
3092 let mut out =
3093 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
3094 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
3095 Ok((DirectoryEvent::OnRepresentation { payload: out }))
3096 }
3097 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3098 Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3099 }
3100 _ => Err(fidl::Error::UnknownOrdinal {
3101 ordinal: tx_header.ordinal,
3102 protocol_name: <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3103 }),
3104 }
3105 }
3106}
3107
3108pub struct DirectoryRequestStream {
3110 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3111 is_terminated: bool,
3112}
3113
3114impl std::marker::Unpin for DirectoryRequestStream {}
3115
3116impl futures::stream::FusedStream for DirectoryRequestStream {
3117 fn is_terminated(&self) -> bool {
3118 self.is_terminated
3119 }
3120}
3121
3122impl fidl::endpoints::RequestStream for DirectoryRequestStream {
3123 type Protocol = DirectoryMarker;
3124 type ControlHandle = DirectoryControlHandle;
3125
3126 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3127 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3128 }
3129
3130 fn control_handle(&self) -> Self::ControlHandle {
3131 DirectoryControlHandle { inner: self.inner.clone() }
3132 }
3133
3134 fn into_inner(
3135 self,
3136 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3137 {
3138 (self.inner, self.is_terminated)
3139 }
3140
3141 fn from_inner(
3142 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3143 is_terminated: bool,
3144 ) -> Self {
3145 Self { inner, is_terminated }
3146 }
3147}
3148
3149impl futures::Stream for DirectoryRequestStream {
3150 type Item = Result<DirectoryRequest, fidl::Error>;
3151
3152 fn poll_next(
3153 mut self: std::pin::Pin<&mut Self>,
3154 cx: &mut std::task::Context<'_>,
3155 ) -> std::task::Poll<Option<Self::Item>> {
3156 let this = &mut *self;
3157 if this.inner.check_shutdown(cx) {
3158 this.is_terminated = true;
3159 return std::task::Poll::Ready(None);
3160 }
3161 if this.is_terminated {
3162 panic!("polled DirectoryRequestStream after completion");
3163 }
3164 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3165 |bytes, handles| {
3166 match this.inner.channel().read_etc(cx, bytes, handles) {
3167 std::task::Poll::Ready(Ok(())) => {}
3168 std::task::Poll::Pending => return std::task::Poll::Pending,
3169 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3170 this.is_terminated = true;
3171 return std::task::Poll::Ready(None);
3172 }
3173 std::task::Poll::Ready(Err(e)) => {
3174 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3175 e.into(),
3176 ))));
3177 }
3178 }
3179
3180 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3182
3183 std::task::Poll::Ready(Some(match header.ordinal {
3184 0x6ee9c0ad53ec87aa => {
3185 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3186 let mut req = fidl::new_empty!(
3187 AdvisoryLockingAdvisoryLockRequest,
3188 fidl::encoding::DefaultFuchsiaResourceDialect
3189 );
3190 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
3191 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3192 Ok(DirectoryRequest::AdvisoryLock {
3193 request: req.request,
3194
3195 responder: DirectoryAdvisoryLockResponder {
3196 control_handle: std::mem::ManuallyDrop::new(control_handle),
3197 tx_id: header.tx_id,
3198 },
3199 })
3200 }
3201 0x20d8a7aba2168a79 => {
3202 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3203 let mut req = fidl::new_empty!(
3204 fidl_fuchsia_unknown::CloneableCloneRequest,
3205 fidl::encoding::DefaultFuchsiaResourceDialect
3206 );
3207 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3208 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3209 Ok(DirectoryRequest::Clone { request: req.request, control_handle })
3210 }
3211 0x5ac5d459ad7f657e => {
3212 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3213 let mut req = fidl::new_empty!(
3214 fidl::encoding::EmptyPayload,
3215 fidl::encoding::DefaultFuchsiaResourceDialect
3216 );
3217 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3218 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3219 Ok(DirectoryRequest::Close {
3220 responder: DirectoryCloseResponder {
3221 control_handle: std::mem::ManuallyDrop::new(control_handle),
3222 tx_id: header.tx_id,
3223 },
3224 })
3225 }
3226 0x2658edee9decfc06 => {
3227 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3228 let mut req = fidl::new_empty!(
3229 fidl::encoding::EmptyPayload,
3230 fidl::encoding::DefaultFuchsiaResourceDialect
3231 );
3232 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3233 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3234 Ok(DirectoryRequest::Query {
3235 responder: DirectoryQueryResponder {
3236 control_handle: std::mem::ManuallyDrop::new(control_handle),
3237 tx_id: header.tx_id,
3238 },
3239 })
3240 }
3241 0x5a61678f293ce16f => {
3242 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3243 let mut req = fidl::new_empty!(
3244 NodeDeprecatedCloneRequest,
3245 fidl::encoding::DefaultFuchsiaResourceDialect
3246 );
3247 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3248 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3249 Ok(DirectoryRequest::DeprecatedClone {
3250 flags: req.flags,
3251 object: req.object,
3252
3253 control_handle,
3254 })
3255 }
3256 0x78985e216314dafd => {
3257 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3258 let mut req = fidl::new_empty!(
3259 fidl::encoding::EmptyPayload,
3260 fidl::encoding::DefaultFuchsiaResourceDialect
3261 );
3262 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3263 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3264 Ok(DirectoryRequest::DeprecatedGetAttr {
3265 responder: DirectoryDeprecatedGetAttrResponder {
3266 control_handle: std::mem::ManuallyDrop::new(control_handle),
3267 tx_id: header.tx_id,
3268 },
3269 })
3270 }
3271 0x4186c0f40d938f46 => {
3272 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3273 let mut req = fidl::new_empty!(
3274 NodeDeprecatedSetAttrRequest,
3275 fidl::encoding::DefaultFuchsiaResourceDialect
3276 );
3277 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
3278 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3279 Ok(DirectoryRequest::DeprecatedSetAttr {
3280 flags: req.flags,
3281 attributes: req.attributes,
3282
3283 responder: DirectoryDeprecatedSetAttrResponder {
3284 control_handle: std::mem::ManuallyDrop::new(control_handle),
3285 tx_id: header.tx_id,
3286 },
3287 })
3288 }
3289 0x5b88fffb8eda3aa1 => {
3290 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3291 let mut req = fidl::new_empty!(
3292 fidl::encoding::EmptyPayload,
3293 fidl::encoding::DefaultFuchsiaResourceDialect
3294 );
3295 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3296 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3297 Ok(DirectoryRequest::DeprecatedGetFlags {
3298 responder: DirectoryDeprecatedGetFlagsResponder {
3299 control_handle: std::mem::ManuallyDrop::new(control_handle),
3300 tx_id: header.tx_id,
3301 },
3302 })
3303 }
3304 0x5295b76c71fde733 => {
3305 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3306 let mut req = fidl::new_empty!(
3307 NodeDeprecatedSetFlagsRequest,
3308 fidl::encoding::DefaultFuchsiaResourceDialect
3309 );
3310 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3311 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3312 Ok(DirectoryRequest::DeprecatedSetFlags {
3313 flags: req.flags,
3314
3315 responder: DirectoryDeprecatedSetFlagsResponder {
3316 control_handle: std::mem::ManuallyDrop::new(control_handle),
3317 tx_id: header.tx_id,
3318 },
3319 })
3320 }
3321 0x176eb318f64ec23 => {
3322 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3323 let mut req = fidl::new_empty!(
3324 fidl::encoding::EmptyPayload,
3325 fidl::encoding::DefaultFuchsiaResourceDialect
3326 );
3327 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3328 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3329 Ok(DirectoryRequest::GetFlags {
3330 responder: DirectoryGetFlagsResponder {
3331 control_handle: std::mem::ManuallyDrop::new(control_handle),
3332 tx_id: header.tx_id,
3333 },
3334 })
3335 }
3336 0x55a8028685791ea8 => {
3337 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3338 let mut req = fidl::new_empty!(
3339 NodeSetFlagsRequest,
3340 fidl::encoding::DefaultFuchsiaResourceDialect
3341 );
3342 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3343 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3344 Ok(DirectoryRequest::SetFlags {
3345 flags: req.flags,
3346
3347 responder: DirectorySetFlagsResponder {
3348 control_handle: std::mem::ManuallyDrop::new(control_handle),
3349 tx_id: header.tx_id,
3350 },
3351 })
3352 }
3353 0x6f344a1c6b0a0610 => {
3354 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3355 let mut req = fidl::new_empty!(
3356 fidl::encoding::EmptyPayload,
3357 fidl::encoding::DefaultFuchsiaResourceDialect
3358 );
3359 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3360 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3361 Ok(DirectoryRequest::QueryFilesystem {
3362 responder: DirectoryQueryFilesystemResponder {
3363 control_handle: std::mem::ManuallyDrop::new(control_handle),
3364 tx_id: header.tx_id,
3365 },
3366 })
3367 }
3368 0x3d4396a638ea053b => {
3369 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3370 let mut req = fidl::new_empty!(
3371 NodeGetAttributesRequest,
3372 fidl::encoding::DefaultFuchsiaResourceDialect
3373 );
3374 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3375 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3376 Ok(DirectoryRequest::GetAttributes {
3377 query: req.query,
3378
3379 responder: DirectoryGetAttributesResponder {
3380 control_handle: std::mem::ManuallyDrop::new(control_handle),
3381 tx_id: header.tx_id,
3382 },
3383 })
3384 }
3385 0x3308c1da5a89bf08 => {
3386 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3387 let mut req = fidl::new_empty!(
3388 MutableNodeAttributes,
3389 fidl::encoding::DefaultFuchsiaResourceDialect
3390 );
3391 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
3392 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3393 Ok(DirectoryRequest::UpdateAttributes {
3394 payload: req,
3395 responder: DirectoryUpdateAttributesResponder {
3396 control_handle: std::mem::ManuallyDrop::new(control_handle),
3397 tx_id: header.tx_id,
3398 },
3399 })
3400 }
3401 0x2c5c27ca0ab5dc49 => {
3402 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3403 let mut req = fidl::new_empty!(
3404 fidl::encoding::EmptyPayload,
3405 fidl::encoding::DefaultFuchsiaResourceDialect
3406 );
3407 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3408 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3409 Ok(DirectoryRequest::Sync {
3410 responder: DirectorySyncResponder {
3411 control_handle: std::mem::ManuallyDrop::new(control_handle),
3412 tx_id: header.tx_id,
3413 },
3414 })
3415 }
3416 0x4b61033de007fcd0 => {
3417 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3418 let mut req = fidl::new_empty!(
3419 NodeListExtendedAttributesRequest,
3420 fidl::encoding::DefaultFuchsiaResourceDialect
3421 );
3422 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3423 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3424 Ok(DirectoryRequest::ListExtendedAttributes {
3425 iterator: req.iterator,
3426
3427 control_handle,
3428 })
3429 }
3430 0x45ffa3ccfdeb76db => {
3431 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3432 let mut req = fidl::new_empty!(
3433 NodeGetExtendedAttributeRequest,
3434 fidl::encoding::DefaultFuchsiaResourceDialect
3435 );
3436 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3437 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3438 Ok(DirectoryRequest::GetExtendedAttribute {
3439 name: req.name,
3440
3441 responder: DirectoryGetExtendedAttributeResponder {
3442 control_handle: std::mem::ManuallyDrop::new(control_handle),
3443 tx_id: header.tx_id,
3444 },
3445 })
3446 }
3447 0x4a951362f681f23c => {
3448 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3449 let mut req = fidl::new_empty!(
3450 NodeSetExtendedAttributeRequest,
3451 fidl::encoding::DefaultFuchsiaResourceDialect
3452 );
3453 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3454 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3455 Ok(DirectoryRequest::SetExtendedAttribute {
3456 name: req.name,
3457 value: req.value,
3458 mode: req.mode,
3459
3460 responder: DirectorySetExtendedAttributeResponder {
3461 control_handle: std::mem::ManuallyDrop::new(control_handle),
3462 tx_id: header.tx_id,
3463 },
3464 })
3465 }
3466 0x7a0b9f3a9bf9032d => {
3467 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3468 let mut req = fidl::new_empty!(
3469 NodeRemoveExtendedAttributeRequest,
3470 fidl::encoding::DefaultFuchsiaResourceDialect
3471 );
3472 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3473 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3474 Ok(DirectoryRequest::RemoveExtendedAttribute {
3475 name: req.name,
3476
3477 responder: DirectoryRemoveExtendedAttributeResponder {
3478 control_handle: std::mem::ManuallyDrop::new(control_handle),
3479 tx_id: header.tx_id,
3480 },
3481 })
3482 }
3483 0x2c5044561d685ec0 => {
3484 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3485 let mut req = fidl::new_empty!(
3486 DirectoryDeprecatedOpenRequest,
3487 fidl::encoding::DefaultFuchsiaResourceDialect
3488 );
3489 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3490 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3491 Ok(DirectoryRequest::DeprecatedOpen {
3492 flags: req.flags,
3493 mode: req.mode,
3494 path: req.path,
3495 object: req.object,
3496
3497 control_handle,
3498 })
3499 }
3500 0x568ddcb9a9cbb6d9 => {
3501 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3502 let mut req = fidl::new_empty!(
3503 DirectoryOpenRequest,
3504 fidl::encoding::DefaultFuchsiaResourceDialect
3505 );
3506 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3507 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3508 Ok(DirectoryRequest::Open {
3509 path: req.path,
3510 flags: req.flags,
3511 options: req.options,
3512 object: req.object,
3513
3514 control_handle,
3515 })
3516 }
3517 0x3582806bf27faa0a => {
3518 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3519 let mut req = fidl::new_empty!(
3520 DirectoryReadDirentsRequest,
3521 fidl::encoding::DefaultFuchsiaResourceDialect
3522 );
3523 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
3524 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3525 Ok(DirectoryRequest::ReadDirents {
3526 max_bytes: req.max_bytes,
3527
3528 responder: DirectoryReadDirentsResponder {
3529 control_handle: std::mem::ManuallyDrop::new(control_handle),
3530 tx_id: header.tx_id,
3531 },
3532 })
3533 }
3534 0x16b1202af0f34c71 => {
3535 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3536 let mut req = fidl::new_empty!(
3537 fidl::encoding::EmptyPayload,
3538 fidl::encoding::DefaultFuchsiaResourceDialect
3539 );
3540 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3541 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3542 Ok(DirectoryRequest::Rewind {
3543 responder: DirectoryRewindResponder {
3544 control_handle: std::mem::ManuallyDrop::new(control_handle),
3545 tx_id: header.tx_id,
3546 },
3547 })
3548 }
3549 0x26ae9d18763c8655 => {
3550 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3551 let mut req = fidl::new_empty!(
3552 fidl::encoding::EmptyPayload,
3553 fidl::encoding::DefaultFuchsiaResourceDialect
3554 );
3555 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3556 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3557 Ok(DirectoryRequest::GetToken {
3558 responder: DirectoryGetTokenResponder {
3559 control_handle: std::mem::ManuallyDrop::new(control_handle),
3560 tx_id: header.tx_id,
3561 },
3562 })
3563 }
3564 0x740604c0c7c930e7 => {
3565 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3566 let mut req = fidl::new_empty!(
3567 DirectoryLinkRequest,
3568 fidl::encoding::DefaultFuchsiaResourceDialect
3569 );
3570 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
3571 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3572 Ok(DirectoryRequest::Link {
3573 src: req.src,
3574 dst_parent_token: req.dst_parent_token,
3575 dst: req.dst,
3576
3577 responder: DirectoryLinkResponder {
3578 control_handle: std::mem::ManuallyDrop::new(control_handle),
3579 tx_id: header.tx_id,
3580 },
3581 })
3582 }
3583 0x750a0326a78d7bed => {
3584 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3585 let mut req = fidl::new_empty!(
3586 DirectoryUnlinkRequest,
3587 fidl::encoding::DefaultFuchsiaResourceDialect
3588 );
3589 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3590 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3591 Ok(DirectoryRequest::Unlink {
3592 name: req.name,
3593 options: req.options,
3594
3595 responder: DirectoryUnlinkResponder {
3596 control_handle: std::mem::ManuallyDrop::new(control_handle),
3597 tx_id: header.tx_id,
3598 },
3599 })
3600 }
3601 0x7060e7723b9928de => {
3602 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3603 let mut req = fidl::new_empty!(
3604 DirectoryRenameRequest,
3605 fidl::encoding::DefaultFuchsiaResourceDialect
3606 );
3607 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
3608 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3609 Ok(DirectoryRequest::Rename {
3610 src: req.src,
3611 dst_parent_token: req.dst_parent_token,
3612 dst: req.dst,
3613
3614 responder: DirectoryRenameResponder {
3615 control_handle: std::mem::ManuallyDrop::new(control_handle),
3616 tx_id: header.tx_id,
3617 },
3618 })
3619 }
3620 0x21ce0f19ec043889 => {
3621 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3622 let mut req = fidl::new_empty!(
3623 DirectoryCreateSymlinkRequest,
3624 fidl::encoding::DefaultFuchsiaResourceDialect
3625 );
3626 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3627 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3628 Ok(DirectoryRequest::CreateSymlink {
3629 name: req.name,
3630 target: req.target,
3631 connection: req.connection,
3632
3633 responder: DirectoryCreateSymlinkResponder {
3634 control_handle: std::mem::ManuallyDrop::new(control_handle),
3635 tx_id: header.tx_id,
3636 },
3637 })
3638 }
3639 0x5717193a59d66d91 => {
3640 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3641 let mut req = fidl::new_empty!(
3642 DirectoryWatchRequest,
3643 fidl::encoding::DefaultFuchsiaResourceDialect
3644 );
3645 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
3646 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3647 Ok(DirectoryRequest::Watch {
3648 mask: req.mask,
3649 options: req.options,
3650 watcher: req.watcher,
3651
3652 responder: DirectoryWatchResponder {
3653 control_handle: std::mem::ManuallyDrop::new(control_handle),
3654 tx_id: header.tx_id,
3655 },
3656 })
3657 }
3658 _ if header.tx_id == 0
3659 && header
3660 .dynamic_flags()
3661 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3662 {
3663 Ok(DirectoryRequest::_UnknownMethod {
3664 ordinal: header.ordinal,
3665 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3666 method_type: fidl::MethodType::OneWay,
3667 })
3668 }
3669 _ if header
3670 .dynamic_flags()
3671 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3672 {
3673 this.inner.send_framework_err(
3674 fidl::encoding::FrameworkErr::UnknownMethod,
3675 header.tx_id,
3676 header.ordinal,
3677 header.dynamic_flags(),
3678 (bytes, handles),
3679 )?;
3680 Ok(DirectoryRequest::_UnknownMethod {
3681 ordinal: header.ordinal,
3682 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3683 method_type: fidl::MethodType::TwoWay,
3684 })
3685 }
3686 _ => Err(fidl::Error::UnknownOrdinal {
3687 ordinal: header.ordinal,
3688 protocol_name:
3689 <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3690 }),
3691 }))
3692 },
3693 )
3694 }
3695}
3696
3697#[derive(Debug)]
3699pub enum DirectoryRequest {
3700 AdvisoryLock {
3724 request: AdvisoryLockRequest,
3725 responder: DirectoryAdvisoryLockResponder,
3726 },
3727 Clone {
3728 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
3729 control_handle: DirectoryControlHandle,
3730 },
3731 Close {
3742 responder: DirectoryCloseResponder,
3743 },
3744 Query {
3745 responder: DirectoryQueryResponder,
3746 },
3747 DeprecatedClone {
3749 flags: OpenFlags,
3750 object: fidl::endpoints::ServerEnd<NodeMarker>,
3751 control_handle: DirectoryControlHandle,
3752 },
3753 DeprecatedGetAttr {
3755 responder: DirectoryDeprecatedGetAttrResponder,
3756 },
3757 DeprecatedSetAttr {
3759 flags: NodeAttributeFlags,
3760 attributes: NodeAttributes,
3761 responder: DirectoryDeprecatedSetAttrResponder,
3762 },
3763 DeprecatedGetFlags {
3765 responder: DirectoryDeprecatedGetFlagsResponder,
3766 },
3767 DeprecatedSetFlags {
3769 flags: OpenFlags,
3770 responder: DirectoryDeprecatedSetFlagsResponder,
3771 },
3772 GetFlags {
3781 responder: DirectoryGetFlagsResponder,
3782 },
3783 SetFlags {
3793 flags: Flags,
3794 responder: DirectorySetFlagsResponder,
3795 },
3796 QueryFilesystem {
3798 responder: DirectoryQueryFilesystemResponder,
3799 },
3800 GetAttributes {
3814 query: NodeAttributesQuery,
3815 responder: DirectoryGetAttributesResponder,
3816 },
3817 UpdateAttributes {
3826 payload: MutableNodeAttributes,
3827 responder: DirectoryUpdateAttributesResponder,
3828 },
3829 Sync {
3839 responder: DirectorySyncResponder,
3840 },
3841 ListExtendedAttributes {
3850 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
3851 control_handle: DirectoryControlHandle,
3852 },
3853 GetExtendedAttribute {
3860 name: Vec<u8>,
3861 responder: DirectoryGetExtendedAttributeResponder,
3862 },
3863 SetExtendedAttribute {
3871 name: Vec<u8>,
3872 value: ExtendedAttributeValue,
3873 mode: SetExtendedAttributeMode,
3874 responder: DirectorySetExtendedAttributeResponder,
3875 },
3876 RemoveExtendedAttribute {
3882 name: Vec<u8>,
3883 responder: DirectoryRemoveExtendedAttributeResponder,
3884 },
3885 DeprecatedOpen {
3887 flags: OpenFlags,
3888 mode: ModeType,
3889 path: String,
3890 object: fidl::endpoints::ServerEnd<NodeMarker>,
3891 control_handle: DirectoryControlHandle,
3892 },
3893 Open {
3900 path: String,
3901 flags: Flags,
3902 options: Options,
3903 object: fidl::Channel,
3904 control_handle: DirectoryControlHandle,
3905 },
3906 ReadDirents {
3932 max_bytes: u64,
3933 responder: DirectoryReadDirentsResponder,
3934 },
3935 Rewind {
3939 responder: DirectoryRewindResponder,
3940 },
3941 GetToken {
3948 responder: DirectoryGetTokenResponder,
3949 },
3950 Link {
3967 src: String,
3968 dst_parent_token: fidl::NullableHandle,
3969 dst: String,
3970 responder: DirectoryLinkResponder,
3971 },
3972 Unlink {
3997 name: String,
3998 options: UnlinkOptions,
3999 responder: DirectoryUnlinkResponder,
4000 },
4001 Rename {
4027 src: String,
4028 dst_parent_token: fidl::Event,
4029 dst: String,
4030 responder: DirectoryRenameResponder,
4031 },
4032 CreateSymlink {
4047 name: String,
4048 target: Vec<u8>,
4049 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4050 responder: DirectoryCreateSymlinkResponder,
4051 },
4052 Watch {
4059 mask: WatchMask,
4060 options: u32,
4061 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4062 responder: DirectoryWatchResponder,
4063 },
4064 #[non_exhaustive]
4066 _UnknownMethod {
4067 ordinal: u64,
4069 control_handle: DirectoryControlHandle,
4070 method_type: fidl::MethodType,
4071 },
4072}
4073
4074impl DirectoryRequest {
4075 #[allow(irrefutable_let_patterns)]
4076 pub fn into_advisory_lock(
4077 self,
4078 ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
4079 if let DirectoryRequest::AdvisoryLock { request, responder } = self {
4080 Some((request, responder))
4081 } else {
4082 None
4083 }
4084 }
4085
4086 #[allow(irrefutable_let_patterns)]
4087 pub fn into_clone(
4088 self,
4089 ) -> Option<(
4090 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
4091 DirectoryControlHandle,
4092 )> {
4093 if let DirectoryRequest::Clone { request, control_handle } = self {
4094 Some((request, control_handle))
4095 } else {
4096 None
4097 }
4098 }
4099
4100 #[allow(irrefutable_let_patterns)]
4101 pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
4102 if let DirectoryRequest::Close { responder } = self { Some((responder)) } else { None }
4103 }
4104
4105 #[allow(irrefutable_let_patterns)]
4106 pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
4107 if let DirectoryRequest::Query { responder } = self { Some((responder)) } else { None }
4108 }
4109
4110 #[allow(irrefutable_let_patterns)]
4111 pub fn into_deprecated_clone(
4112 self,
4113 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, DirectoryControlHandle)> {
4114 if let DirectoryRequest::DeprecatedClone { flags, object, control_handle } = self {
4115 Some((flags, object, control_handle))
4116 } else {
4117 None
4118 }
4119 }
4120
4121 #[allow(irrefutable_let_patterns)]
4122 pub fn into_deprecated_get_attr(self) -> Option<(DirectoryDeprecatedGetAttrResponder)> {
4123 if let DirectoryRequest::DeprecatedGetAttr { responder } = self {
4124 Some((responder))
4125 } else {
4126 None
4127 }
4128 }
4129
4130 #[allow(irrefutable_let_patterns)]
4131 pub fn into_deprecated_set_attr(
4132 self,
4133 ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
4134 if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
4135 Some((flags, attributes, responder))
4136 } else {
4137 None
4138 }
4139 }
4140
4141 #[allow(irrefutable_let_patterns)]
4142 pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
4143 if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
4144 Some((responder))
4145 } else {
4146 None
4147 }
4148 }
4149
4150 #[allow(irrefutable_let_patterns)]
4151 pub fn into_deprecated_set_flags(
4152 self,
4153 ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
4154 if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
4155 Some((flags, responder))
4156 } else {
4157 None
4158 }
4159 }
4160
4161 #[allow(irrefutable_let_patterns)]
4162 pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
4163 if let DirectoryRequest::GetFlags { responder } = self { Some((responder)) } else { None }
4164 }
4165
4166 #[allow(irrefutable_let_patterns)]
4167 pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
4168 if let DirectoryRequest::SetFlags { flags, responder } = self {
4169 Some((flags, responder))
4170 } else {
4171 None
4172 }
4173 }
4174
4175 #[allow(irrefutable_let_patterns)]
4176 pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
4177 if let DirectoryRequest::QueryFilesystem { responder } = self {
4178 Some((responder))
4179 } else {
4180 None
4181 }
4182 }
4183
4184 #[allow(irrefutable_let_patterns)]
4185 pub fn into_get_attributes(
4186 self,
4187 ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
4188 if let DirectoryRequest::GetAttributes { query, responder } = self {
4189 Some((query, responder))
4190 } else {
4191 None
4192 }
4193 }
4194
4195 #[allow(irrefutable_let_patterns)]
4196 pub fn into_update_attributes(
4197 self,
4198 ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
4199 if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
4200 Some((payload, responder))
4201 } else {
4202 None
4203 }
4204 }
4205
4206 #[allow(irrefutable_let_patterns)]
4207 pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
4208 if let DirectoryRequest::Sync { responder } = self { Some((responder)) } else { None }
4209 }
4210
4211 #[allow(irrefutable_let_patterns)]
4212 pub fn into_list_extended_attributes(
4213 self,
4214 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, DirectoryControlHandle)>
4215 {
4216 if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
4217 Some((iterator, control_handle))
4218 } else {
4219 None
4220 }
4221 }
4222
4223 #[allow(irrefutable_let_patterns)]
4224 pub fn into_get_extended_attribute(
4225 self,
4226 ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
4227 if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
4228 Some((name, responder))
4229 } else {
4230 None
4231 }
4232 }
4233
4234 #[allow(irrefutable_let_patterns)]
4235 pub fn into_set_extended_attribute(
4236 self,
4237 ) -> Option<(
4238 Vec<u8>,
4239 ExtendedAttributeValue,
4240 SetExtendedAttributeMode,
4241 DirectorySetExtendedAttributeResponder,
4242 )> {
4243 if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
4244 Some((name, value, mode, responder))
4245 } else {
4246 None
4247 }
4248 }
4249
4250 #[allow(irrefutable_let_patterns)]
4251 pub fn into_remove_extended_attribute(
4252 self,
4253 ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
4254 if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
4255 Some((name, responder))
4256 } else {
4257 None
4258 }
4259 }
4260
4261 #[allow(irrefutable_let_patterns)]
4262 pub fn into_deprecated_open(
4263 self,
4264 ) -> Option<(
4265 OpenFlags,
4266 ModeType,
4267 String,
4268 fidl::endpoints::ServerEnd<NodeMarker>,
4269 DirectoryControlHandle,
4270 )> {
4271 if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
4272 {
4273 Some((flags, mode, path, object, control_handle))
4274 } else {
4275 None
4276 }
4277 }
4278
4279 #[allow(irrefutable_let_patterns)]
4280 pub fn into_open(
4281 self,
4282 ) -> Option<(String, Flags, Options, fidl::Channel, DirectoryControlHandle)> {
4283 if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
4284 Some((path, flags, options, object, control_handle))
4285 } else {
4286 None
4287 }
4288 }
4289
4290 #[allow(irrefutable_let_patterns)]
4291 pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
4292 if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
4293 Some((max_bytes, responder))
4294 } else {
4295 None
4296 }
4297 }
4298
4299 #[allow(irrefutable_let_patterns)]
4300 pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
4301 if let DirectoryRequest::Rewind { responder } = self { Some((responder)) } else { None }
4302 }
4303
4304 #[allow(irrefutable_let_patterns)]
4305 pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
4306 if let DirectoryRequest::GetToken { responder } = self { Some((responder)) } else { None }
4307 }
4308
4309 #[allow(irrefutable_let_patterns)]
4310 pub fn into_link(
4311 self,
4312 ) -> Option<(String, fidl::NullableHandle, String, DirectoryLinkResponder)> {
4313 if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
4314 Some((src, dst_parent_token, dst, responder))
4315 } else {
4316 None
4317 }
4318 }
4319
4320 #[allow(irrefutable_let_patterns)]
4321 pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
4322 if let DirectoryRequest::Unlink { name, options, responder } = self {
4323 Some((name, options, responder))
4324 } else {
4325 None
4326 }
4327 }
4328
4329 #[allow(irrefutable_let_patterns)]
4330 pub fn into_rename(self) -> Option<(String, fidl::Event, String, DirectoryRenameResponder)> {
4331 if let DirectoryRequest::Rename { src, dst_parent_token, dst, responder } = self {
4332 Some((src, dst_parent_token, dst, responder))
4333 } else {
4334 None
4335 }
4336 }
4337
4338 #[allow(irrefutable_let_patterns)]
4339 pub fn into_create_symlink(
4340 self,
4341 ) -> Option<(
4342 String,
4343 Vec<u8>,
4344 Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4345 DirectoryCreateSymlinkResponder,
4346 )> {
4347 if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
4348 Some((name, target, connection, responder))
4349 } else {
4350 None
4351 }
4352 }
4353
4354 #[allow(irrefutable_let_patterns)]
4355 pub fn into_watch(
4356 self,
4357 ) -> Option<(
4358 WatchMask,
4359 u32,
4360 fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4361 DirectoryWatchResponder,
4362 )> {
4363 if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
4364 Some((mask, options, watcher, responder))
4365 } else {
4366 None
4367 }
4368 }
4369
4370 pub fn method_name(&self) -> &'static str {
4372 match *self {
4373 DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
4374 DirectoryRequest::Clone { .. } => "clone",
4375 DirectoryRequest::Close { .. } => "close",
4376 DirectoryRequest::Query { .. } => "query",
4377 DirectoryRequest::DeprecatedClone { .. } => "deprecated_clone",
4378 DirectoryRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
4379 DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
4380 DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
4381 DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
4382 DirectoryRequest::GetFlags { .. } => "get_flags",
4383 DirectoryRequest::SetFlags { .. } => "set_flags",
4384 DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
4385 DirectoryRequest::GetAttributes { .. } => "get_attributes",
4386 DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
4387 DirectoryRequest::Sync { .. } => "sync",
4388 DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
4389 DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
4390 DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
4391 DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
4392 DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
4393 DirectoryRequest::Open { .. } => "open",
4394 DirectoryRequest::ReadDirents { .. } => "read_dirents",
4395 DirectoryRequest::Rewind { .. } => "rewind",
4396 DirectoryRequest::GetToken { .. } => "get_token",
4397 DirectoryRequest::Link { .. } => "link",
4398 DirectoryRequest::Unlink { .. } => "unlink",
4399 DirectoryRequest::Rename { .. } => "rename",
4400 DirectoryRequest::CreateSymlink { .. } => "create_symlink",
4401 DirectoryRequest::Watch { .. } => "watch",
4402 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4403 "unknown one-way method"
4404 }
4405 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4406 "unknown two-way method"
4407 }
4408 }
4409 }
4410}
4411
4412#[derive(Debug, Clone)]
4413pub struct DirectoryControlHandle {
4414 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4415}
4416
4417impl fidl::endpoints::ControlHandle for DirectoryControlHandle {
4418 fn shutdown(&self) {
4419 self.inner.shutdown()
4420 }
4421
4422 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4423 self.inner.shutdown_with_epitaph(status)
4424 }
4425
4426 fn is_closed(&self) -> bool {
4427 self.inner.channel().is_closed()
4428 }
4429 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4430 self.inner.channel().on_closed()
4431 }
4432
4433 #[cfg(target_os = "fuchsia")]
4434 fn signal_peer(
4435 &self,
4436 clear_mask: zx::Signals,
4437 set_mask: zx::Signals,
4438 ) -> Result<(), zx_status::Status> {
4439 use fidl::Peered;
4440 self.inner.channel().signal_peer(clear_mask, set_mask)
4441 }
4442}
4443
4444impl DirectoryControlHandle {
4445 pub fn send_on_open_(
4446 &self,
4447 mut s: i32,
4448 mut info: Option<NodeInfoDeprecated>,
4449 ) -> Result<(), fidl::Error> {
4450 self.inner.send::<NodeOnOpenRequest>(
4451 (s, info.as_mut()),
4452 0,
4453 0x7fc7bbb1dbfd1972,
4454 fidl::encoding::DynamicFlags::FLEXIBLE,
4455 )
4456 }
4457
4458 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
4459 self.inner.send::<Representation>(
4460 &mut payload,
4461 0,
4462 0x5cb40567d80a510c,
4463 fidl::encoding::DynamicFlags::empty(),
4464 )
4465 }
4466}
4467
4468#[must_use = "FIDL methods require a response to be sent"]
4469#[derive(Debug)]
4470pub struct DirectoryAdvisoryLockResponder {
4471 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4472 tx_id: u32,
4473}
4474
4475impl std::ops::Drop for DirectoryAdvisoryLockResponder {
4479 fn drop(&mut self) {
4480 self.control_handle.shutdown();
4481 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4483 }
4484}
4485
4486impl fidl::endpoints::Responder for DirectoryAdvisoryLockResponder {
4487 type ControlHandle = DirectoryControlHandle;
4488
4489 fn control_handle(&self) -> &DirectoryControlHandle {
4490 &self.control_handle
4491 }
4492
4493 fn drop_without_shutdown(mut self) {
4494 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4496 std::mem::forget(self);
4498 }
4499}
4500
4501impl DirectoryAdvisoryLockResponder {
4502 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4506 let _result = self.send_raw(result);
4507 if _result.is_err() {
4508 self.control_handle.shutdown();
4509 }
4510 self.drop_without_shutdown();
4511 _result
4512 }
4513
4514 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4516 let _result = self.send_raw(result);
4517 self.drop_without_shutdown();
4518 _result
4519 }
4520
4521 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4522 self.control_handle
4523 .inner
4524 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4525 result,
4526 self.tx_id,
4527 0x6ee9c0ad53ec87aa,
4528 fidl::encoding::DynamicFlags::empty(),
4529 )
4530 }
4531}
4532
4533#[must_use = "FIDL methods require a response to be sent"]
4534#[derive(Debug)]
4535pub struct DirectoryCloseResponder {
4536 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4537 tx_id: u32,
4538}
4539
4540impl std::ops::Drop for DirectoryCloseResponder {
4544 fn drop(&mut self) {
4545 self.control_handle.shutdown();
4546 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4548 }
4549}
4550
4551impl fidl::endpoints::Responder for DirectoryCloseResponder {
4552 type ControlHandle = DirectoryControlHandle;
4553
4554 fn control_handle(&self) -> &DirectoryControlHandle {
4555 &self.control_handle
4556 }
4557
4558 fn drop_without_shutdown(mut self) {
4559 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4561 std::mem::forget(self);
4563 }
4564}
4565
4566impl DirectoryCloseResponder {
4567 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4571 let _result = self.send_raw(result);
4572 if _result.is_err() {
4573 self.control_handle.shutdown();
4574 }
4575 self.drop_without_shutdown();
4576 _result
4577 }
4578
4579 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4581 let _result = self.send_raw(result);
4582 self.drop_without_shutdown();
4583 _result
4584 }
4585
4586 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4587 self.control_handle
4588 .inner
4589 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4590 result,
4591 self.tx_id,
4592 0x5ac5d459ad7f657e,
4593 fidl::encoding::DynamicFlags::empty(),
4594 )
4595 }
4596}
4597
4598#[must_use = "FIDL methods require a response to be sent"]
4599#[derive(Debug)]
4600pub struct DirectoryQueryResponder {
4601 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4602 tx_id: u32,
4603}
4604
4605impl std::ops::Drop for DirectoryQueryResponder {
4609 fn drop(&mut self) {
4610 self.control_handle.shutdown();
4611 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4613 }
4614}
4615
4616impl fidl::endpoints::Responder for DirectoryQueryResponder {
4617 type ControlHandle = DirectoryControlHandle;
4618
4619 fn control_handle(&self) -> &DirectoryControlHandle {
4620 &self.control_handle
4621 }
4622
4623 fn drop_without_shutdown(mut self) {
4624 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4626 std::mem::forget(self);
4628 }
4629}
4630
4631impl DirectoryQueryResponder {
4632 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4636 let _result = self.send_raw(protocol);
4637 if _result.is_err() {
4638 self.control_handle.shutdown();
4639 }
4640 self.drop_without_shutdown();
4641 _result
4642 }
4643
4644 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4646 let _result = self.send_raw(protocol);
4647 self.drop_without_shutdown();
4648 _result
4649 }
4650
4651 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4652 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
4653 (protocol,),
4654 self.tx_id,
4655 0x2658edee9decfc06,
4656 fidl::encoding::DynamicFlags::empty(),
4657 )
4658 }
4659}
4660
4661#[must_use = "FIDL methods require a response to be sent"]
4662#[derive(Debug)]
4663pub struct DirectoryDeprecatedGetAttrResponder {
4664 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4665 tx_id: u32,
4666}
4667
4668impl std::ops::Drop for DirectoryDeprecatedGetAttrResponder {
4672 fn drop(&mut self) {
4673 self.control_handle.shutdown();
4674 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4676 }
4677}
4678
4679impl fidl::endpoints::Responder for DirectoryDeprecatedGetAttrResponder {
4680 type ControlHandle = DirectoryControlHandle;
4681
4682 fn control_handle(&self) -> &DirectoryControlHandle {
4683 &self.control_handle
4684 }
4685
4686 fn drop_without_shutdown(mut self) {
4687 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4689 std::mem::forget(self);
4691 }
4692}
4693
4694impl DirectoryDeprecatedGetAttrResponder {
4695 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4699 let _result = self.send_raw(s, attributes);
4700 if _result.is_err() {
4701 self.control_handle.shutdown();
4702 }
4703 self.drop_without_shutdown();
4704 _result
4705 }
4706
4707 pub fn send_no_shutdown_on_err(
4709 self,
4710 mut s: i32,
4711 mut attributes: &NodeAttributes,
4712 ) -> Result<(), fidl::Error> {
4713 let _result = self.send_raw(s, attributes);
4714 self.drop_without_shutdown();
4715 _result
4716 }
4717
4718 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4719 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
4720 (s, attributes),
4721 self.tx_id,
4722 0x78985e216314dafd,
4723 fidl::encoding::DynamicFlags::empty(),
4724 )
4725 }
4726}
4727
4728#[must_use = "FIDL methods require a response to be sent"]
4729#[derive(Debug)]
4730pub struct DirectoryDeprecatedSetAttrResponder {
4731 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4732 tx_id: u32,
4733}
4734
4735impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
4739 fn drop(&mut self) {
4740 self.control_handle.shutdown();
4741 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4743 }
4744}
4745
4746impl fidl::endpoints::Responder for DirectoryDeprecatedSetAttrResponder {
4747 type ControlHandle = DirectoryControlHandle;
4748
4749 fn control_handle(&self) -> &DirectoryControlHandle {
4750 &self.control_handle
4751 }
4752
4753 fn drop_without_shutdown(mut self) {
4754 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4756 std::mem::forget(self);
4758 }
4759}
4760
4761impl DirectoryDeprecatedSetAttrResponder {
4762 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4766 let _result = self.send_raw(s);
4767 if _result.is_err() {
4768 self.control_handle.shutdown();
4769 }
4770 self.drop_without_shutdown();
4771 _result
4772 }
4773
4774 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4776 let _result = self.send_raw(s);
4777 self.drop_without_shutdown();
4778 _result
4779 }
4780
4781 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4782 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
4783 (s,),
4784 self.tx_id,
4785 0x4186c0f40d938f46,
4786 fidl::encoding::DynamicFlags::empty(),
4787 )
4788 }
4789}
4790
4791#[must_use = "FIDL methods require a response to be sent"]
4792#[derive(Debug)]
4793pub struct DirectoryDeprecatedGetFlagsResponder {
4794 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4795 tx_id: u32,
4796}
4797
4798impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
4802 fn drop(&mut self) {
4803 self.control_handle.shutdown();
4804 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4806 }
4807}
4808
4809impl fidl::endpoints::Responder for DirectoryDeprecatedGetFlagsResponder {
4810 type ControlHandle = DirectoryControlHandle;
4811
4812 fn control_handle(&self) -> &DirectoryControlHandle {
4813 &self.control_handle
4814 }
4815
4816 fn drop_without_shutdown(mut self) {
4817 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4819 std::mem::forget(self);
4821 }
4822}
4823
4824impl DirectoryDeprecatedGetFlagsResponder {
4825 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4829 let _result = self.send_raw(s, flags);
4830 if _result.is_err() {
4831 self.control_handle.shutdown();
4832 }
4833 self.drop_without_shutdown();
4834 _result
4835 }
4836
4837 pub fn send_no_shutdown_on_err(
4839 self,
4840 mut s: i32,
4841 mut flags: OpenFlags,
4842 ) -> Result<(), fidl::Error> {
4843 let _result = self.send_raw(s, flags);
4844 self.drop_without_shutdown();
4845 _result
4846 }
4847
4848 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4849 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
4850 (s, flags),
4851 self.tx_id,
4852 0x5b88fffb8eda3aa1,
4853 fidl::encoding::DynamicFlags::empty(),
4854 )
4855 }
4856}
4857
4858#[must_use = "FIDL methods require a response to be sent"]
4859#[derive(Debug)]
4860pub struct DirectoryDeprecatedSetFlagsResponder {
4861 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4862 tx_id: u32,
4863}
4864
4865impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
4869 fn drop(&mut self) {
4870 self.control_handle.shutdown();
4871 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4873 }
4874}
4875
4876impl fidl::endpoints::Responder for DirectoryDeprecatedSetFlagsResponder {
4877 type ControlHandle = DirectoryControlHandle;
4878
4879 fn control_handle(&self) -> &DirectoryControlHandle {
4880 &self.control_handle
4881 }
4882
4883 fn drop_without_shutdown(mut self) {
4884 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4886 std::mem::forget(self);
4888 }
4889}
4890
4891impl DirectoryDeprecatedSetFlagsResponder {
4892 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4896 let _result = self.send_raw(s);
4897 if _result.is_err() {
4898 self.control_handle.shutdown();
4899 }
4900 self.drop_without_shutdown();
4901 _result
4902 }
4903
4904 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4906 let _result = self.send_raw(s);
4907 self.drop_without_shutdown();
4908 _result
4909 }
4910
4911 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4912 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
4913 (s,),
4914 self.tx_id,
4915 0x5295b76c71fde733,
4916 fidl::encoding::DynamicFlags::empty(),
4917 )
4918 }
4919}
4920
4921#[must_use = "FIDL methods require a response to be sent"]
4922#[derive(Debug)]
4923pub struct DirectoryGetFlagsResponder {
4924 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4925 tx_id: u32,
4926}
4927
4928impl std::ops::Drop for DirectoryGetFlagsResponder {
4932 fn drop(&mut self) {
4933 self.control_handle.shutdown();
4934 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4936 }
4937}
4938
4939impl fidl::endpoints::Responder for DirectoryGetFlagsResponder {
4940 type ControlHandle = DirectoryControlHandle;
4941
4942 fn control_handle(&self) -> &DirectoryControlHandle {
4943 &self.control_handle
4944 }
4945
4946 fn drop_without_shutdown(mut self) {
4947 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4949 std::mem::forget(self);
4951 }
4952}
4953
4954impl DirectoryGetFlagsResponder {
4955 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4959 let _result = self.send_raw(result);
4960 if _result.is_err() {
4961 self.control_handle.shutdown();
4962 }
4963 self.drop_without_shutdown();
4964 _result
4965 }
4966
4967 pub fn send_no_shutdown_on_err(
4969 self,
4970 mut result: Result<Flags, i32>,
4971 ) -> Result<(), fidl::Error> {
4972 let _result = self.send_raw(result);
4973 self.drop_without_shutdown();
4974 _result
4975 }
4976
4977 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
4978 self.control_handle
4979 .inner
4980 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
4981 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
4982 self.tx_id,
4983 0x176eb318f64ec23,
4984 fidl::encoding::DynamicFlags::FLEXIBLE,
4985 )
4986 }
4987}
4988
4989#[must_use = "FIDL methods require a response to be sent"]
4990#[derive(Debug)]
4991pub struct DirectorySetFlagsResponder {
4992 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4993 tx_id: u32,
4994}
4995
4996impl std::ops::Drop for DirectorySetFlagsResponder {
5000 fn drop(&mut self) {
5001 self.control_handle.shutdown();
5002 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5004 }
5005}
5006
5007impl fidl::endpoints::Responder for DirectorySetFlagsResponder {
5008 type ControlHandle = DirectoryControlHandle;
5009
5010 fn control_handle(&self) -> &DirectoryControlHandle {
5011 &self.control_handle
5012 }
5013
5014 fn drop_without_shutdown(mut self) {
5015 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5017 std::mem::forget(self);
5019 }
5020}
5021
5022impl DirectorySetFlagsResponder {
5023 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5027 let _result = self.send_raw(result);
5028 if _result.is_err() {
5029 self.control_handle.shutdown();
5030 }
5031 self.drop_without_shutdown();
5032 _result
5033 }
5034
5035 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5037 let _result = self.send_raw(result);
5038 self.drop_without_shutdown();
5039 _result
5040 }
5041
5042 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5043 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5044 fidl::encoding::EmptyStruct,
5045 i32,
5046 >>(
5047 fidl::encoding::FlexibleResult::new(result),
5048 self.tx_id,
5049 0x55a8028685791ea8,
5050 fidl::encoding::DynamicFlags::FLEXIBLE,
5051 )
5052 }
5053}
5054
5055#[must_use = "FIDL methods require a response to be sent"]
5056#[derive(Debug)]
5057pub struct DirectoryQueryFilesystemResponder {
5058 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5059 tx_id: u32,
5060}
5061
5062impl std::ops::Drop for DirectoryQueryFilesystemResponder {
5066 fn drop(&mut self) {
5067 self.control_handle.shutdown();
5068 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5070 }
5071}
5072
5073impl fidl::endpoints::Responder for DirectoryQueryFilesystemResponder {
5074 type ControlHandle = DirectoryControlHandle;
5075
5076 fn control_handle(&self) -> &DirectoryControlHandle {
5077 &self.control_handle
5078 }
5079
5080 fn drop_without_shutdown(mut self) {
5081 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5083 std::mem::forget(self);
5085 }
5086}
5087
5088impl DirectoryQueryFilesystemResponder {
5089 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5093 let _result = self.send_raw(s, info);
5094 if _result.is_err() {
5095 self.control_handle.shutdown();
5096 }
5097 self.drop_without_shutdown();
5098 _result
5099 }
5100
5101 pub fn send_no_shutdown_on_err(
5103 self,
5104 mut s: i32,
5105 mut info: Option<&FilesystemInfo>,
5106 ) -> Result<(), fidl::Error> {
5107 let _result = self.send_raw(s, info);
5108 self.drop_without_shutdown();
5109 _result
5110 }
5111
5112 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5113 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
5114 (s, info),
5115 self.tx_id,
5116 0x6f344a1c6b0a0610,
5117 fidl::encoding::DynamicFlags::empty(),
5118 )
5119 }
5120}
5121
5122#[must_use = "FIDL methods require a response to be sent"]
5123#[derive(Debug)]
5124pub struct DirectoryGetAttributesResponder {
5125 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5126 tx_id: u32,
5127}
5128
5129impl std::ops::Drop for DirectoryGetAttributesResponder {
5133 fn drop(&mut self) {
5134 self.control_handle.shutdown();
5135 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5137 }
5138}
5139
5140impl fidl::endpoints::Responder for DirectoryGetAttributesResponder {
5141 type ControlHandle = DirectoryControlHandle;
5142
5143 fn control_handle(&self) -> &DirectoryControlHandle {
5144 &self.control_handle
5145 }
5146
5147 fn drop_without_shutdown(mut self) {
5148 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5150 std::mem::forget(self);
5152 }
5153}
5154
5155impl DirectoryGetAttributesResponder {
5156 pub fn send(
5160 self,
5161 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5162 ) -> Result<(), fidl::Error> {
5163 let _result = self.send_raw(result);
5164 if _result.is_err() {
5165 self.control_handle.shutdown();
5166 }
5167 self.drop_without_shutdown();
5168 _result
5169 }
5170
5171 pub fn send_no_shutdown_on_err(
5173 self,
5174 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5175 ) -> Result<(), fidl::Error> {
5176 let _result = self.send_raw(result);
5177 self.drop_without_shutdown();
5178 _result
5179 }
5180
5181 fn send_raw(
5182 &self,
5183 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5184 ) -> Result<(), fidl::Error> {
5185 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
5186 result,
5187 self.tx_id,
5188 0x3d4396a638ea053b,
5189 fidl::encoding::DynamicFlags::empty(),
5190 )
5191 }
5192}
5193
5194#[must_use = "FIDL methods require a response to be sent"]
5195#[derive(Debug)]
5196pub struct DirectoryUpdateAttributesResponder {
5197 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5198 tx_id: u32,
5199}
5200
5201impl std::ops::Drop for DirectoryUpdateAttributesResponder {
5205 fn drop(&mut self) {
5206 self.control_handle.shutdown();
5207 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5209 }
5210}
5211
5212impl fidl::endpoints::Responder for DirectoryUpdateAttributesResponder {
5213 type ControlHandle = DirectoryControlHandle;
5214
5215 fn control_handle(&self) -> &DirectoryControlHandle {
5216 &self.control_handle
5217 }
5218
5219 fn drop_without_shutdown(mut self) {
5220 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5222 std::mem::forget(self);
5224 }
5225}
5226
5227impl DirectoryUpdateAttributesResponder {
5228 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5232 let _result = self.send_raw(result);
5233 if _result.is_err() {
5234 self.control_handle.shutdown();
5235 }
5236 self.drop_without_shutdown();
5237 _result
5238 }
5239
5240 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5242 let _result = self.send_raw(result);
5243 self.drop_without_shutdown();
5244 _result
5245 }
5246
5247 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5248 self.control_handle
5249 .inner
5250 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5251 result,
5252 self.tx_id,
5253 0x3308c1da5a89bf08,
5254 fidl::encoding::DynamicFlags::empty(),
5255 )
5256 }
5257}
5258
5259#[must_use = "FIDL methods require a response to be sent"]
5260#[derive(Debug)]
5261pub struct DirectorySyncResponder {
5262 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5263 tx_id: u32,
5264}
5265
5266impl std::ops::Drop for DirectorySyncResponder {
5270 fn drop(&mut self) {
5271 self.control_handle.shutdown();
5272 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5274 }
5275}
5276
5277impl fidl::endpoints::Responder for DirectorySyncResponder {
5278 type ControlHandle = DirectoryControlHandle;
5279
5280 fn control_handle(&self) -> &DirectoryControlHandle {
5281 &self.control_handle
5282 }
5283
5284 fn drop_without_shutdown(mut self) {
5285 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5287 std::mem::forget(self);
5289 }
5290}
5291
5292impl DirectorySyncResponder {
5293 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5297 let _result = self.send_raw(result);
5298 if _result.is_err() {
5299 self.control_handle.shutdown();
5300 }
5301 self.drop_without_shutdown();
5302 _result
5303 }
5304
5305 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5307 let _result = self.send_raw(result);
5308 self.drop_without_shutdown();
5309 _result
5310 }
5311
5312 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5313 self.control_handle
5314 .inner
5315 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5316 result,
5317 self.tx_id,
5318 0x2c5c27ca0ab5dc49,
5319 fidl::encoding::DynamicFlags::empty(),
5320 )
5321 }
5322}
5323
5324#[must_use = "FIDL methods require a response to be sent"]
5325#[derive(Debug)]
5326pub struct DirectoryGetExtendedAttributeResponder {
5327 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5328 tx_id: u32,
5329}
5330
5331impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
5335 fn drop(&mut self) {
5336 self.control_handle.shutdown();
5337 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5339 }
5340}
5341
5342impl fidl::endpoints::Responder for DirectoryGetExtendedAttributeResponder {
5343 type ControlHandle = DirectoryControlHandle;
5344
5345 fn control_handle(&self) -> &DirectoryControlHandle {
5346 &self.control_handle
5347 }
5348
5349 fn drop_without_shutdown(mut self) {
5350 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5352 std::mem::forget(self);
5354 }
5355}
5356
5357impl DirectoryGetExtendedAttributeResponder {
5358 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5362 let _result = self.send_raw(result);
5363 if _result.is_err() {
5364 self.control_handle.shutdown();
5365 }
5366 self.drop_without_shutdown();
5367 _result
5368 }
5369
5370 pub fn send_no_shutdown_on_err(
5372 self,
5373 mut result: Result<ExtendedAttributeValue, i32>,
5374 ) -> Result<(), fidl::Error> {
5375 let _result = self.send_raw(result);
5376 self.drop_without_shutdown();
5377 _result
5378 }
5379
5380 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5381 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
5382 result.as_mut().map_err(|e| *e),
5383 self.tx_id,
5384 0x45ffa3ccfdeb76db,
5385 fidl::encoding::DynamicFlags::empty(),
5386 )
5387 }
5388}
5389
5390#[must_use = "FIDL methods require a response to be sent"]
5391#[derive(Debug)]
5392pub struct DirectorySetExtendedAttributeResponder {
5393 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5394 tx_id: u32,
5395}
5396
5397impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
5401 fn drop(&mut self) {
5402 self.control_handle.shutdown();
5403 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5405 }
5406}
5407
5408impl fidl::endpoints::Responder for DirectorySetExtendedAttributeResponder {
5409 type ControlHandle = DirectoryControlHandle;
5410
5411 fn control_handle(&self) -> &DirectoryControlHandle {
5412 &self.control_handle
5413 }
5414
5415 fn drop_without_shutdown(mut self) {
5416 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5418 std::mem::forget(self);
5420 }
5421}
5422
5423impl DirectorySetExtendedAttributeResponder {
5424 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5428 let _result = self.send_raw(result);
5429 if _result.is_err() {
5430 self.control_handle.shutdown();
5431 }
5432 self.drop_without_shutdown();
5433 _result
5434 }
5435
5436 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5438 let _result = self.send_raw(result);
5439 self.drop_without_shutdown();
5440 _result
5441 }
5442
5443 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5444 self.control_handle
5445 .inner
5446 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5447 result,
5448 self.tx_id,
5449 0x4a951362f681f23c,
5450 fidl::encoding::DynamicFlags::empty(),
5451 )
5452 }
5453}
5454
5455#[must_use = "FIDL methods require a response to be sent"]
5456#[derive(Debug)]
5457pub struct DirectoryRemoveExtendedAttributeResponder {
5458 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5459 tx_id: u32,
5460}
5461
5462impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
5466 fn drop(&mut self) {
5467 self.control_handle.shutdown();
5468 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5470 }
5471}
5472
5473impl fidl::endpoints::Responder for DirectoryRemoveExtendedAttributeResponder {
5474 type ControlHandle = DirectoryControlHandle;
5475
5476 fn control_handle(&self) -> &DirectoryControlHandle {
5477 &self.control_handle
5478 }
5479
5480 fn drop_without_shutdown(mut self) {
5481 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5483 std::mem::forget(self);
5485 }
5486}
5487
5488impl DirectoryRemoveExtendedAttributeResponder {
5489 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5493 let _result = self.send_raw(result);
5494 if _result.is_err() {
5495 self.control_handle.shutdown();
5496 }
5497 self.drop_without_shutdown();
5498 _result
5499 }
5500
5501 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5503 let _result = self.send_raw(result);
5504 self.drop_without_shutdown();
5505 _result
5506 }
5507
5508 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5509 self.control_handle
5510 .inner
5511 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5512 result,
5513 self.tx_id,
5514 0x7a0b9f3a9bf9032d,
5515 fidl::encoding::DynamicFlags::empty(),
5516 )
5517 }
5518}
5519
5520#[must_use = "FIDL methods require a response to be sent"]
5521#[derive(Debug)]
5522pub struct DirectoryReadDirentsResponder {
5523 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5524 tx_id: u32,
5525}
5526
5527impl std::ops::Drop for DirectoryReadDirentsResponder {
5531 fn drop(&mut self) {
5532 self.control_handle.shutdown();
5533 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5535 }
5536}
5537
5538impl fidl::endpoints::Responder for DirectoryReadDirentsResponder {
5539 type ControlHandle = DirectoryControlHandle;
5540
5541 fn control_handle(&self) -> &DirectoryControlHandle {
5542 &self.control_handle
5543 }
5544
5545 fn drop_without_shutdown(mut self) {
5546 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5548 std::mem::forget(self);
5550 }
5551}
5552
5553impl DirectoryReadDirentsResponder {
5554 pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5558 let _result = self.send_raw(s, dirents);
5559 if _result.is_err() {
5560 self.control_handle.shutdown();
5561 }
5562 self.drop_without_shutdown();
5563 _result
5564 }
5565
5566 pub fn send_no_shutdown_on_err(
5568 self,
5569 mut s: i32,
5570 mut dirents: &[u8],
5571 ) -> Result<(), fidl::Error> {
5572 let _result = self.send_raw(s, dirents);
5573 self.drop_without_shutdown();
5574 _result
5575 }
5576
5577 fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5578 self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
5579 (s, dirents),
5580 self.tx_id,
5581 0x3582806bf27faa0a,
5582 fidl::encoding::DynamicFlags::empty(),
5583 )
5584 }
5585}
5586
5587#[must_use = "FIDL methods require a response to be sent"]
5588#[derive(Debug)]
5589pub struct DirectoryRewindResponder {
5590 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5591 tx_id: u32,
5592}
5593
5594impl std::ops::Drop for DirectoryRewindResponder {
5598 fn drop(&mut self) {
5599 self.control_handle.shutdown();
5600 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5602 }
5603}
5604
5605impl fidl::endpoints::Responder for DirectoryRewindResponder {
5606 type ControlHandle = DirectoryControlHandle;
5607
5608 fn control_handle(&self) -> &DirectoryControlHandle {
5609 &self.control_handle
5610 }
5611
5612 fn drop_without_shutdown(mut self) {
5613 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5615 std::mem::forget(self);
5617 }
5618}
5619
5620impl DirectoryRewindResponder {
5621 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5625 let _result = self.send_raw(s);
5626 if _result.is_err() {
5627 self.control_handle.shutdown();
5628 }
5629 self.drop_without_shutdown();
5630 _result
5631 }
5632
5633 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5635 let _result = self.send_raw(s);
5636 self.drop_without_shutdown();
5637 _result
5638 }
5639
5640 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5641 self.control_handle.inner.send::<DirectoryRewindResponse>(
5642 (s,),
5643 self.tx_id,
5644 0x16b1202af0f34c71,
5645 fidl::encoding::DynamicFlags::empty(),
5646 )
5647 }
5648}
5649
5650#[must_use = "FIDL methods require a response to be sent"]
5651#[derive(Debug)]
5652pub struct DirectoryGetTokenResponder {
5653 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5654 tx_id: u32,
5655}
5656
5657impl std::ops::Drop for DirectoryGetTokenResponder {
5661 fn drop(&mut self) {
5662 self.control_handle.shutdown();
5663 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5665 }
5666}
5667
5668impl fidl::endpoints::Responder for DirectoryGetTokenResponder {
5669 type ControlHandle = DirectoryControlHandle;
5670
5671 fn control_handle(&self) -> &DirectoryControlHandle {
5672 &self.control_handle
5673 }
5674
5675 fn drop_without_shutdown(mut self) {
5676 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5678 std::mem::forget(self);
5680 }
5681}
5682
5683impl DirectoryGetTokenResponder {
5684 pub fn send(
5688 self,
5689 mut s: i32,
5690 mut token: Option<fidl::NullableHandle>,
5691 ) -> Result<(), fidl::Error> {
5692 let _result = self.send_raw(s, token);
5693 if _result.is_err() {
5694 self.control_handle.shutdown();
5695 }
5696 self.drop_without_shutdown();
5697 _result
5698 }
5699
5700 pub fn send_no_shutdown_on_err(
5702 self,
5703 mut s: i32,
5704 mut token: Option<fidl::NullableHandle>,
5705 ) -> Result<(), fidl::Error> {
5706 let _result = self.send_raw(s, token);
5707 self.drop_without_shutdown();
5708 _result
5709 }
5710
5711 fn send_raw(
5712 &self,
5713 mut s: i32,
5714 mut token: Option<fidl::NullableHandle>,
5715 ) -> Result<(), fidl::Error> {
5716 self.control_handle.inner.send::<DirectoryGetTokenResponse>(
5717 (s, token),
5718 self.tx_id,
5719 0x26ae9d18763c8655,
5720 fidl::encoding::DynamicFlags::empty(),
5721 )
5722 }
5723}
5724
5725#[must_use = "FIDL methods require a response to be sent"]
5726#[derive(Debug)]
5727pub struct DirectoryLinkResponder {
5728 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5729 tx_id: u32,
5730}
5731
5732impl std::ops::Drop for DirectoryLinkResponder {
5736 fn drop(&mut self) {
5737 self.control_handle.shutdown();
5738 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5740 }
5741}
5742
5743impl fidl::endpoints::Responder for DirectoryLinkResponder {
5744 type ControlHandle = DirectoryControlHandle;
5745
5746 fn control_handle(&self) -> &DirectoryControlHandle {
5747 &self.control_handle
5748 }
5749
5750 fn drop_without_shutdown(mut self) {
5751 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5753 std::mem::forget(self);
5755 }
5756}
5757
5758impl DirectoryLinkResponder {
5759 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5763 let _result = self.send_raw(s);
5764 if _result.is_err() {
5765 self.control_handle.shutdown();
5766 }
5767 self.drop_without_shutdown();
5768 _result
5769 }
5770
5771 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5773 let _result = self.send_raw(s);
5774 self.drop_without_shutdown();
5775 _result
5776 }
5777
5778 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5779 self.control_handle.inner.send::<DirectoryLinkResponse>(
5780 (s,),
5781 self.tx_id,
5782 0x740604c0c7c930e7,
5783 fidl::encoding::DynamicFlags::empty(),
5784 )
5785 }
5786}
5787
5788#[must_use = "FIDL methods require a response to be sent"]
5789#[derive(Debug)]
5790pub struct DirectoryUnlinkResponder {
5791 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5792 tx_id: u32,
5793}
5794
5795impl std::ops::Drop for DirectoryUnlinkResponder {
5799 fn drop(&mut self) {
5800 self.control_handle.shutdown();
5801 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5803 }
5804}
5805
5806impl fidl::endpoints::Responder for DirectoryUnlinkResponder {
5807 type ControlHandle = DirectoryControlHandle;
5808
5809 fn control_handle(&self) -> &DirectoryControlHandle {
5810 &self.control_handle
5811 }
5812
5813 fn drop_without_shutdown(mut self) {
5814 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5816 std::mem::forget(self);
5818 }
5819}
5820
5821impl DirectoryUnlinkResponder {
5822 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5826 let _result = self.send_raw(result);
5827 if _result.is_err() {
5828 self.control_handle.shutdown();
5829 }
5830 self.drop_without_shutdown();
5831 _result
5832 }
5833
5834 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5836 let _result = self.send_raw(result);
5837 self.drop_without_shutdown();
5838 _result
5839 }
5840
5841 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5842 self.control_handle
5843 .inner
5844 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5845 result,
5846 self.tx_id,
5847 0x750a0326a78d7bed,
5848 fidl::encoding::DynamicFlags::empty(),
5849 )
5850 }
5851}
5852
5853#[must_use = "FIDL methods require a response to be sent"]
5854#[derive(Debug)]
5855pub struct DirectoryRenameResponder {
5856 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5857 tx_id: u32,
5858}
5859
5860impl std::ops::Drop for DirectoryRenameResponder {
5864 fn drop(&mut self) {
5865 self.control_handle.shutdown();
5866 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5868 }
5869}
5870
5871impl fidl::endpoints::Responder for DirectoryRenameResponder {
5872 type ControlHandle = DirectoryControlHandle;
5873
5874 fn control_handle(&self) -> &DirectoryControlHandle {
5875 &self.control_handle
5876 }
5877
5878 fn drop_without_shutdown(mut self) {
5879 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5881 std::mem::forget(self);
5883 }
5884}
5885
5886impl DirectoryRenameResponder {
5887 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5891 let _result = self.send_raw(result);
5892 if _result.is_err() {
5893 self.control_handle.shutdown();
5894 }
5895 self.drop_without_shutdown();
5896 _result
5897 }
5898
5899 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5901 let _result = self.send_raw(result);
5902 self.drop_without_shutdown();
5903 _result
5904 }
5905
5906 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5907 self.control_handle
5908 .inner
5909 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5910 result,
5911 self.tx_id,
5912 0x7060e7723b9928de,
5913 fidl::encoding::DynamicFlags::empty(),
5914 )
5915 }
5916}
5917
5918#[must_use = "FIDL methods require a response to be sent"]
5919#[derive(Debug)]
5920pub struct DirectoryCreateSymlinkResponder {
5921 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5922 tx_id: u32,
5923}
5924
5925impl std::ops::Drop for DirectoryCreateSymlinkResponder {
5929 fn drop(&mut self) {
5930 self.control_handle.shutdown();
5931 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5933 }
5934}
5935
5936impl fidl::endpoints::Responder for DirectoryCreateSymlinkResponder {
5937 type ControlHandle = DirectoryControlHandle;
5938
5939 fn control_handle(&self) -> &DirectoryControlHandle {
5940 &self.control_handle
5941 }
5942
5943 fn drop_without_shutdown(mut self) {
5944 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5946 std::mem::forget(self);
5948 }
5949}
5950
5951impl DirectoryCreateSymlinkResponder {
5952 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5956 let _result = self.send_raw(result);
5957 if _result.is_err() {
5958 self.control_handle.shutdown();
5959 }
5960 self.drop_without_shutdown();
5961 _result
5962 }
5963
5964 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5966 let _result = self.send_raw(result);
5967 self.drop_without_shutdown();
5968 _result
5969 }
5970
5971 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5972 self.control_handle
5973 .inner
5974 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5975 result,
5976 self.tx_id,
5977 0x21ce0f19ec043889,
5978 fidl::encoding::DynamicFlags::empty(),
5979 )
5980 }
5981}
5982
5983#[must_use = "FIDL methods require a response to be sent"]
5984#[derive(Debug)]
5985pub struct DirectoryWatchResponder {
5986 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5987 tx_id: u32,
5988}
5989
5990impl std::ops::Drop for DirectoryWatchResponder {
5994 fn drop(&mut self) {
5995 self.control_handle.shutdown();
5996 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5998 }
5999}
6000
6001impl fidl::endpoints::Responder for DirectoryWatchResponder {
6002 type ControlHandle = DirectoryControlHandle;
6003
6004 fn control_handle(&self) -> &DirectoryControlHandle {
6005 &self.control_handle
6006 }
6007
6008 fn drop_without_shutdown(mut self) {
6009 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6011 std::mem::forget(self);
6013 }
6014}
6015
6016impl DirectoryWatchResponder {
6017 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
6021 let _result = self.send_raw(s);
6022 if _result.is_err() {
6023 self.control_handle.shutdown();
6024 }
6025 self.drop_without_shutdown();
6026 _result
6027 }
6028
6029 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
6031 let _result = self.send_raw(s);
6032 self.drop_without_shutdown();
6033 _result
6034 }
6035
6036 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
6037 self.control_handle.inner.send::<DirectoryWatchResponse>(
6038 (s,),
6039 self.tx_id,
6040 0x5717193a59d66d91,
6041 fidl::encoding::DynamicFlags::empty(),
6042 )
6043 }
6044}
6045
6046#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6047pub struct DirectoryWatcherMarker;
6048
6049impl fidl::endpoints::ProtocolMarker for DirectoryWatcherMarker {
6050 type Proxy = DirectoryWatcherProxy;
6051 type RequestStream = DirectoryWatcherRequestStream;
6052 #[cfg(target_os = "fuchsia")]
6053 type SynchronousProxy = DirectoryWatcherSynchronousProxy;
6054
6055 const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
6056}
6057
6058pub trait DirectoryWatcherProxyInterface: Send + Sync {}
6059#[derive(Debug)]
6060#[cfg(target_os = "fuchsia")]
6061pub struct DirectoryWatcherSynchronousProxy {
6062 client: fidl::client::sync::Client,
6063}
6064
6065#[cfg(target_os = "fuchsia")]
6066impl fidl::endpoints::SynchronousProxy for DirectoryWatcherSynchronousProxy {
6067 type Proxy = DirectoryWatcherProxy;
6068 type Protocol = DirectoryWatcherMarker;
6069
6070 fn from_channel(inner: fidl::Channel) -> Self {
6071 Self::new(inner)
6072 }
6073
6074 fn into_channel(self) -> fidl::Channel {
6075 self.client.into_channel()
6076 }
6077
6078 fn as_channel(&self) -> &fidl::Channel {
6079 self.client.as_channel()
6080 }
6081}
6082
6083#[cfg(target_os = "fuchsia")]
6084impl DirectoryWatcherSynchronousProxy {
6085 pub fn new(channel: fidl::Channel) -> Self {
6086 let protocol_name = <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6087 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6088 }
6089
6090 pub fn into_channel(self) -> fidl::Channel {
6091 self.client.into_channel()
6092 }
6093
6094 pub fn wait_for_event(
6097 &self,
6098 deadline: zx::MonotonicInstant,
6099 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6100 DirectoryWatcherEvent::decode(self.client.wait_for_event(deadline)?)
6101 }
6102}
6103
6104#[cfg(target_os = "fuchsia")]
6105impl From<DirectoryWatcherSynchronousProxy> for zx::NullableHandle {
6106 fn from(value: DirectoryWatcherSynchronousProxy) -> Self {
6107 value.into_channel().into()
6108 }
6109}
6110
6111#[cfg(target_os = "fuchsia")]
6112impl From<fidl::Channel> for DirectoryWatcherSynchronousProxy {
6113 fn from(value: fidl::Channel) -> Self {
6114 Self::new(value)
6115 }
6116}
6117
6118#[cfg(target_os = "fuchsia")]
6119impl fidl::endpoints::FromClient for DirectoryWatcherSynchronousProxy {
6120 type Protocol = DirectoryWatcherMarker;
6121
6122 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryWatcherMarker>) -> Self {
6123 Self::new(value.into_channel())
6124 }
6125}
6126
6127#[derive(Debug, Clone)]
6128pub struct DirectoryWatcherProxy {
6129 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6130}
6131
6132impl fidl::endpoints::Proxy for DirectoryWatcherProxy {
6133 type Protocol = DirectoryWatcherMarker;
6134
6135 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6136 Self::new(inner)
6137 }
6138
6139 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6140 self.client.into_channel().map_err(|client| Self { client })
6141 }
6142
6143 fn as_channel(&self) -> &::fidl::AsyncChannel {
6144 self.client.as_channel()
6145 }
6146}
6147
6148impl DirectoryWatcherProxy {
6149 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6151 let protocol_name = <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6152 Self { client: fidl::client::Client::new(channel, protocol_name) }
6153 }
6154
6155 pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
6161 DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
6162 }
6163}
6164
6165impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
6166
6167pub struct DirectoryWatcherEventStream {
6168 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6169}
6170
6171impl std::marker::Unpin for DirectoryWatcherEventStream {}
6172
6173impl futures::stream::FusedStream for DirectoryWatcherEventStream {
6174 fn is_terminated(&self) -> bool {
6175 self.event_receiver.is_terminated()
6176 }
6177}
6178
6179impl futures::Stream for DirectoryWatcherEventStream {
6180 type Item = Result<DirectoryWatcherEvent, fidl::Error>;
6181
6182 fn poll_next(
6183 mut self: std::pin::Pin<&mut Self>,
6184 cx: &mut std::task::Context<'_>,
6185 ) -> std::task::Poll<Option<Self::Item>> {
6186 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6187 &mut self.event_receiver,
6188 cx
6189 )?) {
6190 Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
6191 None => std::task::Poll::Ready(None),
6192 }
6193 }
6194}
6195
6196#[derive(Debug)]
6197pub enum DirectoryWatcherEvent {}
6198
6199impl DirectoryWatcherEvent {
6200 fn decode(
6202 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6203 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6204 let (bytes, _handles) = buf.split_mut();
6205 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6206 debug_assert_eq!(tx_header.tx_id, 0);
6207 match tx_header.ordinal {
6208 _ => Err(fidl::Error::UnknownOrdinal {
6209 ordinal: tx_header.ordinal,
6210 protocol_name:
6211 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6212 }),
6213 }
6214 }
6215}
6216
6217pub struct DirectoryWatcherRequestStream {
6219 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6220 is_terminated: bool,
6221}
6222
6223impl std::marker::Unpin for DirectoryWatcherRequestStream {}
6224
6225impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
6226 fn is_terminated(&self) -> bool {
6227 self.is_terminated
6228 }
6229}
6230
6231impl fidl::endpoints::RequestStream for DirectoryWatcherRequestStream {
6232 type Protocol = DirectoryWatcherMarker;
6233 type ControlHandle = DirectoryWatcherControlHandle;
6234
6235 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6236 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6237 }
6238
6239 fn control_handle(&self) -> Self::ControlHandle {
6240 DirectoryWatcherControlHandle { inner: self.inner.clone() }
6241 }
6242
6243 fn into_inner(
6244 self,
6245 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6246 {
6247 (self.inner, self.is_terminated)
6248 }
6249
6250 fn from_inner(
6251 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6252 is_terminated: bool,
6253 ) -> Self {
6254 Self { inner, is_terminated }
6255 }
6256}
6257
6258impl futures::Stream for DirectoryWatcherRequestStream {
6259 type Item = Result<DirectoryWatcherRequest, fidl::Error>;
6260
6261 fn poll_next(
6262 mut self: std::pin::Pin<&mut Self>,
6263 cx: &mut std::task::Context<'_>,
6264 ) -> std::task::Poll<Option<Self::Item>> {
6265 let this = &mut *self;
6266 if this.inner.check_shutdown(cx) {
6267 this.is_terminated = true;
6268 return std::task::Poll::Ready(None);
6269 }
6270 if this.is_terminated {
6271 panic!("polled DirectoryWatcherRequestStream after completion");
6272 }
6273 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6274 |bytes, handles| {
6275 match this.inner.channel().read_etc(cx, bytes, handles) {
6276 std::task::Poll::Ready(Ok(())) => {}
6277 std::task::Poll::Pending => return std::task::Poll::Pending,
6278 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6279 this.is_terminated = true;
6280 return std::task::Poll::Ready(None);
6281 }
6282 std::task::Poll::Ready(Err(e)) => {
6283 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6284 e.into(),
6285 ))));
6286 }
6287 }
6288
6289 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6291
6292 std::task::Poll::Ready(Some(match header.ordinal {
6293 _ => Err(fidl::Error::UnknownOrdinal {
6294 ordinal: header.ordinal,
6295 protocol_name:
6296 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6297 }),
6298 }))
6299 },
6300 )
6301 }
6302}
6303
6304#[derive(Debug)]
6322pub enum DirectoryWatcherRequest {}
6323
6324impl DirectoryWatcherRequest {
6325 pub fn method_name(&self) -> &'static str {
6327 match *self {}
6328 }
6329}
6330
6331#[derive(Debug, Clone)]
6332pub struct DirectoryWatcherControlHandle {
6333 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6334}
6335
6336impl fidl::endpoints::ControlHandle for DirectoryWatcherControlHandle {
6337 fn shutdown(&self) {
6338 self.inner.shutdown()
6339 }
6340
6341 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6342 self.inner.shutdown_with_epitaph(status)
6343 }
6344
6345 fn is_closed(&self) -> bool {
6346 self.inner.channel().is_closed()
6347 }
6348 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6349 self.inner.channel().on_closed()
6350 }
6351
6352 #[cfg(target_os = "fuchsia")]
6353 fn signal_peer(
6354 &self,
6355 clear_mask: zx::Signals,
6356 set_mask: zx::Signals,
6357 ) -> Result<(), zx_status::Status> {
6358 use fidl::Peered;
6359 self.inner.channel().signal_peer(clear_mask, set_mask)
6360 }
6361}
6362
6363impl DirectoryWatcherControlHandle {}
6364
6365#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6366pub struct ExtendedAttributeIteratorMarker;
6367
6368impl fidl::endpoints::ProtocolMarker for ExtendedAttributeIteratorMarker {
6369 type Proxy = ExtendedAttributeIteratorProxy;
6370 type RequestStream = ExtendedAttributeIteratorRequestStream;
6371 #[cfg(target_os = "fuchsia")]
6372 type SynchronousProxy = ExtendedAttributeIteratorSynchronousProxy;
6373
6374 const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
6375}
6376pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
6377
6378pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
6379 type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
6380 + Send;
6381 fn r#get_next(&self) -> Self::GetNextResponseFut;
6382}
6383#[derive(Debug)]
6384#[cfg(target_os = "fuchsia")]
6385pub struct ExtendedAttributeIteratorSynchronousProxy {
6386 client: fidl::client::sync::Client,
6387}
6388
6389#[cfg(target_os = "fuchsia")]
6390impl fidl::endpoints::SynchronousProxy for ExtendedAttributeIteratorSynchronousProxy {
6391 type Proxy = ExtendedAttributeIteratorProxy;
6392 type Protocol = ExtendedAttributeIteratorMarker;
6393
6394 fn from_channel(inner: fidl::Channel) -> Self {
6395 Self::new(inner)
6396 }
6397
6398 fn into_channel(self) -> fidl::Channel {
6399 self.client.into_channel()
6400 }
6401
6402 fn as_channel(&self) -> &fidl::Channel {
6403 self.client.as_channel()
6404 }
6405}
6406
6407#[cfg(target_os = "fuchsia")]
6408impl ExtendedAttributeIteratorSynchronousProxy {
6409 pub fn new(channel: fidl::Channel) -> Self {
6410 let protocol_name =
6411 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6412 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6413 }
6414
6415 pub fn into_channel(self) -> fidl::Channel {
6416 self.client.into_channel()
6417 }
6418
6419 pub fn wait_for_event(
6422 &self,
6423 deadline: zx::MonotonicInstant,
6424 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6425 ExtendedAttributeIteratorEvent::decode(self.client.wait_for_event(deadline)?)
6426 }
6427
6428 pub fn r#get_next(
6432 &self,
6433 ___deadline: zx::MonotonicInstant,
6434 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6435 let _response = self.client.send_query::<
6436 fidl::encoding::EmptyPayload,
6437 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6438 >(
6439 (),
6440 0x3ba664a1c2e45a7,
6441 fidl::encoding::DynamicFlags::empty(),
6442 ___deadline,
6443 )?;
6444 Ok(_response.map(|x| (x.attributes, x.last)))
6445 }
6446}
6447
6448#[cfg(target_os = "fuchsia")]
6449impl From<ExtendedAttributeIteratorSynchronousProxy> for zx::NullableHandle {
6450 fn from(value: ExtendedAttributeIteratorSynchronousProxy) -> Self {
6451 value.into_channel().into()
6452 }
6453}
6454
6455#[cfg(target_os = "fuchsia")]
6456impl From<fidl::Channel> for ExtendedAttributeIteratorSynchronousProxy {
6457 fn from(value: fidl::Channel) -> Self {
6458 Self::new(value)
6459 }
6460}
6461
6462#[cfg(target_os = "fuchsia")]
6463impl fidl::endpoints::FromClient for ExtendedAttributeIteratorSynchronousProxy {
6464 type Protocol = ExtendedAttributeIteratorMarker;
6465
6466 fn from_client(value: fidl::endpoints::ClientEnd<ExtendedAttributeIteratorMarker>) -> Self {
6467 Self::new(value.into_channel())
6468 }
6469}
6470
6471#[derive(Debug, Clone)]
6472pub struct ExtendedAttributeIteratorProxy {
6473 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6474}
6475
6476impl fidl::endpoints::Proxy for ExtendedAttributeIteratorProxy {
6477 type Protocol = ExtendedAttributeIteratorMarker;
6478
6479 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6480 Self::new(inner)
6481 }
6482
6483 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6484 self.client.into_channel().map_err(|client| Self { client })
6485 }
6486
6487 fn as_channel(&self) -> &::fidl::AsyncChannel {
6488 self.client.as_channel()
6489 }
6490}
6491
6492impl ExtendedAttributeIteratorProxy {
6493 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6495 let protocol_name =
6496 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6497 Self { client: fidl::client::Client::new(channel, protocol_name) }
6498 }
6499
6500 pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
6506 ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6507 }
6508
6509 pub fn r#get_next(
6513 &self,
6514 ) -> fidl::client::QueryResponseFut<
6515 ExtendedAttributeIteratorGetNextResult,
6516 fidl::encoding::DefaultFuchsiaResourceDialect,
6517 > {
6518 ExtendedAttributeIteratorProxyInterface::r#get_next(self)
6519 }
6520}
6521
6522impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
6523 type GetNextResponseFut = fidl::client::QueryResponseFut<
6524 ExtendedAttributeIteratorGetNextResult,
6525 fidl::encoding::DefaultFuchsiaResourceDialect,
6526 >;
6527 fn r#get_next(&self) -> Self::GetNextResponseFut {
6528 fn _decode(
6529 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6530 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6531 let _response = fidl::client::decode_transaction_body::<
6532 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6533 fidl::encoding::DefaultFuchsiaResourceDialect,
6534 0x3ba664a1c2e45a7,
6535 >(_buf?)?;
6536 Ok(_response.map(|x| (x.attributes, x.last)))
6537 }
6538 self.client.send_query_and_decode::<
6539 fidl::encoding::EmptyPayload,
6540 ExtendedAttributeIteratorGetNextResult,
6541 >(
6542 (),
6543 0x3ba664a1c2e45a7,
6544 fidl::encoding::DynamicFlags::empty(),
6545 _decode,
6546 )
6547 }
6548}
6549
6550pub struct ExtendedAttributeIteratorEventStream {
6551 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6552}
6553
6554impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
6555
6556impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
6557 fn is_terminated(&self) -> bool {
6558 self.event_receiver.is_terminated()
6559 }
6560}
6561
6562impl futures::Stream for ExtendedAttributeIteratorEventStream {
6563 type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
6564
6565 fn poll_next(
6566 mut self: std::pin::Pin<&mut Self>,
6567 cx: &mut std::task::Context<'_>,
6568 ) -> std::task::Poll<Option<Self::Item>> {
6569 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6570 &mut self.event_receiver,
6571 cx
6572 )?) {
6573 Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
6574 None => std::task::Poll::Ready(None),
6575 }
6576 }
6577}
6578
6579#[derive(Debug)]
6580pub enum ExtendedAttributeIteratorEvent {}
6581
6582impl ExtendedAttributeIteratorEvent {
6583 fn decode(
6585 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6586 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6587 let (bytes, _handles) = buf.split_mut();
6588 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6589 debug_assert_eq!(tx_header.tx_id, 0);
6590 match tx_header.ordinal {
6591 _ => Err(fidl::Error::UnknownOrdinal {
6592 ordinal: tx_header.ordinal,
6593 protocol_name:
6594 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6595 }),
6596 }
6597 }
6598}
6599
6600pub struct ExtendedAttributeIteratorRequestStream {
6602 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6603 is_terminated: bool,
6604}
6605
6606impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
6607
6608impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
6609 fn is_terminated(&self) -> bool {
6610 self.is_terminated
6611 }
6612}
6613
6614impl fidl::endpoints::RequestStream for ExtendedAttributeIteratorRequestStream {
6615 type Protocol = ExtendedAttributeIteratorMarker;
6616 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6617
6618 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6619 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6620 }
6621
6622 fn control_handle(&self) -> Self::ControlHandle {
6623 ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
6624 }
6625
6626 fn into_inner(
6627 self,
6628 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6629 {
6630 (self.inner, self.is_terminated)
6631 }
6632
6633 fn from_inner(
6634 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6635 is_terminated: bool,
6636 ) -> Self {
6637 Self { inner, is_terminated }
6638 }
6639}
6640
6641impl futures::Stream for ExtendedAttributeIteratorRequestStream {
6642 type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
6643
6644 fn poll_next(
6645 mut self: std::pin::Pin<&mut Self>,
6646 cx: &mut std::task::Context<'_>,
6647 ) -> std::task::Poll<Option<Self::Item>> {
6648 let this = &mut *self;
6649 if this.inner.check_shutdown(cx) {
6650 this.is_terminated = true;
6651 return std::task::Poll::Ready(None);
6652 }
6653 if this.is_terminated {
6654 panic!("polled ExtendedAttributeIteratorRequestStream after completion");
6655 }
6656 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6657 |bytes, handles| {
6658 match this.inner.channel().read_etc(cx, bytes, handles) {
6659 std::task::Poll::Ready(Ok(())) => {}
6660 std::task::Poll::Pending => return std::task::Poll::Pending,
6661 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6662 this.is_terminated = true;
6663 return std::task::Poll::Ready(None);
6664 }
6665 std::task::Poll::Ready(Err(e)) => {
6666 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6667 e.into(),
6668 ))));
6669 }
6670 }
6671
6672 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6674
6675 std::task::Poll::Ready(Some(match header.ordinal {
6676 0x3ba664a1c2e45a7 => {
6677 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6678 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
6679 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6680 let control_handle = ExtendedAttributeIteratorControlHandle {
6681 inner: this.inner.clone(),
6682 };
6683 Ok(ExtendedAttributeIteratorRequest::GetNext {
6684 responder: ExtendedAttributeIteratorGetNextResponder {
6685 control_handle: std::mem::ManuallyDrop::new(control_handle),
6686 tx_id: header.tx_id,
6687 },
6688 })
6689 }
6690 _ => Err(fidl::Error::UnknownOrdinal {
6691 ordinal: header.ordinal,
6692 protocol_name: <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6693 }),
6694 }))
6695 },
6696 )
6697 }
6698}
6699
6700#[derive(Debug)]
6701pub enum ExtendedAttributeIteratorRequest {
6702 GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
6706}
6707
6708impl ExtendedAttributeIteratorRequest {
6709 #[allow(irrefutable_let_patterns)]
6710 pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
6711 if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
6712 Some((responder))
6713 } else {
6714 None
6715 }
6716 }
6717
6718 pub fn method_name(&self) -> &'static str {
6720 match *self {
6721 ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
6722 }
6723 }
6724}
6725
6726#[derive(Debug, Clone)]
6727pub struct ExtendedAttributeIteratorControlHandle {
6728 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6729}
6730
6731impl fidl::endpoints::ControlHandle for ExtendedAttributeIteratorControlHandle {
6732 fn shutdown(&self) {
6733 self.inner.shutdown()
6734 }
6735
6736 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6737 self.inner.shutdown_with_epitaph(status)
6738 }
6739
6740 fn is_closed(&self) -> bool {
6741 self.inner.channel().is_closed()
6742 }
6743 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6744 self.inner.channel().on_closed()
6745 }
6746
6747 #[cfg(target_os = "fuchsia")]
6748 fn signal_peer(
6749 &self,
6750 clear_mask: zx::Signals,
6751 set_mask: zx::Signals,
6752 ) -> Result<(), zx_status::Status> {
6753 use fidl::Peered;
6754 self.inner.channel().signal_peer(clear_mask, set_mask)
6755 }
6756}
6757
6758impl ExtendedAttributeIteratorControlHandle {}
6759
6760#[must_use = "FIDL methods require a response to be sent"]
6761#[derive(Debug)]
6762pub struct ExtendedAttributeIteratorGetNextResponder {
6763 control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
6764 tx_id: u32,
6765}
6766
6767impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
6771 fn drop(&mut self) {
6772 self.control_handle.shutdown();
6773 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6775 }
6776}
6777
6778impl fidl::endpoints::Responder for ExtendedAttributeIteratorGetNextResponder {
6779 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6780
6781 fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
6782 &self.control_handle
6783 }
6784
6785 fn drop_without_shutdown(mut self) {
6786 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6788 std::mem::forget(self);
6790 }
6791}
6792
6793impl ExtendedAttributeIteratorGetNextResponder {
6794 pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
6798 let _result = self.send_raw(result);
6799 if _result.is_err() {
6800 self.control_handle.shutdown();
6801 }
6802 self.drop_without_shutdown();
6803 _result
6804 }
6805
6806 pub fn send_no_shutdown_on_err(
6808 self,
6809 mut result: Result<(&[Vec<u8>], bool), i32>,
6810 ) -> Result<(), fidl::Error> {
6811 let _result = self.send_raw(result);
6812 self.drop_without_shutdown();
6813 _result
6814 }
6815
6816 fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
6817 self.control_handle.inner.send::<fidl::encoding::ResultType<
6818 ExtendedAttributeIteratorGetNextResponse,
6819 i32,
6820 >>(
6821 result,
6822 self.tx_id,
6823 0x3ba664a1c2e45a7,
6824 fidl::encoding::DynamicFlags::empty(),
6825 )
6826 }
6827}
6828
6829#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6830pub struct FileMarker;
6831
6832impl fidl::endpoints::ProtocolMarker for FileMarker {
6833 type Proxy = FileProxy;
6834 type RequestStream = FileRequestStream;
6835 #[cfg(target_os = "fuchsia")]
6836 type SynchronousProxy = FileSynchronousProxy;
6837
6838 const DEBUG_NAME: &'static str = "fuchsia.io.File";
6839}
6840impl fidl::endpoints::DiscoverableProtocolMarker for FileMarker {}
6841pub type FileSeekResult = Result<u64, i32>;
6842pub type FileReadAtResult = Result<Vec<u8>, i32>;
6843pub type FileWriteAtResult = Result<u64, i32>;
6844pub type FileResizeResult = Result<(), i32>;
6845pub type FileGetBackingMemoryResult = Result<fidl::Vmo, i32>;
6846pub type FileAllocateResult = Result<(), i32>;
6847pub type FileEnableVerityResult = Result<(), i32>;
6848
6849pub trait FileProxyInterface: Send + Sync {
6850 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
6851 + Send;
6852 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
6853 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
6854 + Send;
6855 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
6856 fn r#clone(
6857 &self,
6858 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
6859 ) -> Result<(), fidl::Error>;
6860 type CloseResponseFut: std::future::Future<
6861 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
6862 > + Send;
6863 fn r#close(&self) -> Self::CloseResponseFut;
6864 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
6865 fn r#query(&self) -> Self::QueryResponseFut;
6866 fn r#deprecated_clone(
6867 &self,
6868 flags: OpenFlags,
6869 object: fidl::endpoints::ServerEnd<NodeMarker>,
6870 ) -> Result<(), fidl::Error>;
6871 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
6872 + Send;
6873 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
6874 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
6875 fn r#deprecated_set_attr(
6876 &self,
6877 flags: NodeAttributeFlags,
6878 attributes: &NodeAttributes,
6879 ) -> Self::DeprecatedSetAttrResponseFut;
6880 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
6881 + Send;
6882 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
6883 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
6884 + Send;
6885 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
6886 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
6887 + Send;
6888 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
6889 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
6890 + Send;
6891 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
6892 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
6893 + Send;
6894 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
6895 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
6896 + Send;
6897 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
6898 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
6899 + Send;
6900 fn r#update_attributes(
6901 &self,
6902 payload: &MutableNodeAttributes,
6903 ) -> Self::UpdateAttributesResponseFut;
6904 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
6905 fn r#sync(&self) -> Self::SyncResponseFut;
6906 fn r#list_extended_attributes(
6907 &self,
6908 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
6909 ) -> Result<(), fidl::Error>;
6910 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
6911 + Send;
6912 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
6913 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
6914 + Send;
6915 fn r#set_extended_attribute(
6916 &self,
6917 name: &[u8],
6918 value: ExtendedAttributeValue,
6919 mode: SetExtendedAttributeMode,
6920 ) -> Self::SetExtendedAttributeResponseFut;
6921 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
6922 + Send;
6923 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
6924 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
6925 + Send;
6926 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
6927 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
6928 + Send;
6929 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
6930 type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
6931 fn r#describe(&self) -> Self::DescribeResponseFut;
6932 type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
6933 fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
6934 type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
6935 + Send;
6936 fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
6937 type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
6938 + Send;
6939 fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
6940 type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
6941 + Send;
6942 fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
6943 type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
6944 + Send;
6945 fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
6946 type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
6947 + Send;
6948 fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
6949 -> Self::AllocateResponseFut;
6950 type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
6951 + Send;
6952 fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
6953}
6954#[derive(Debug)]
6955#[cfg(target_os = "fuchsia")]
6956pub struct FileSynchronousProxy {
6957 client: fidl::client::sync::Client,
6958}
6959
6960#[cfg(target_os = "fuchsia")]
6961impl fidl::endpoints::SynchronousProxy for FileSynchronousProxy {
6962 type Proxy = FileProxy;
6963 type Protocol = FileMarker;
6964
6965 fn from_channel(inner: fidl::Channel) -> Self {
6966 Self::new(inner)
6967 }
6968
6969 fn into_channel(self) -> fidl::Channel {
6970 self.client.into_channel()
6971 }
6972
6973 fn as_channel(&self) -> &fidl::Channel {
6974 self.client.as_channel()
6975 }
6976}
6977
6978#[cfg(target_os = "fuchsia")]
6979impl FileSynchronousProxy {
6980 pub fn new(channel: fidl::Channel) -> Self {
6981 let protocol_name = <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6982 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6983 }
6984
6985 pub fn into_channel(self) -> fidl::Channel {
6986 self.client.into_channel()
6987 }
6988
6989 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<FileEvent, fidl::Error> {
6992 FileEvent::decode(self.client.wait_for_event(deadline)?)
6993 }
6994
6995 pub fn r#advisory_lock(
7019 &self,
7020 mut request: &AdvisoryLockRequest,
7021 ___deadline: zx::MonotonicInstant,
7022 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
7023 let _response = self.client.send_query::<
7024 AdvisoryLockingAdvisoryLockRequest,
7025 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7026 >(
7027 (request,),
7028 0x6ee9c0ad53ec87aa,
7029 fidl::encoding::DynamicFlags::empty(),
7030 ___deadline,
7031 )?;
7032 Ok(_response.map(|x| x))
7033 }
7034
7035 pub fn r#link_into(
7058 &self,
7059 mut dst_parent_token: fidl::Event,
7060 mut dst: &str,
7061 ___deadline: zx::MonotonicInstant,
7062 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
7063 let _response = self.client.send_query::<
7064 LinkableLinkIntoRequest,
7065 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7066 >(
7067 (dst_parent_token, dst,),
7068 0x54f3949246a03e74,
7069 fidl::encoding::DynamicFlags::empty(),
7070 ___deadline,
7071 )?;
7072 Ok(_response.map(|x| x))
7073 }
7074
7075 pub fn r#clone(
7076 &self,
7077 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7078 ) -> Result<(), fidl::Error> {
7079 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
7080 (request,),
7081 0x20d8a7aba2168a79,
7082 fidl::encoding::DynamicFlags::empty(),
7083 )
7084 }
7085
7086 pub fn r#close(
7097 &self,
7098 ___deadline: zx::MonotonicInstant,
7099 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
7100 let _response = self.client.send_query::<
7101 fidl::encoding::EmptyPayload,
7102 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7103 >(
7104 (),
7105 0x5ac5d459ad7f657e,
7106 fidl::encoding::DynamicFlags::empty(),
7107 ___deadline,
7108 )?;
7109 Ok(_response.map(|x| x))
7110 }
7111
7112 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
7113 let _response = self.client.send_query::<
7114 fidl::encoding::EmptyPayload,
7115 fidl_fuchsia_unknown::QueryableQueryResponse,
7116 >(
7117 (),
7118 0x2658edee9decfc06,
7119 fidl::encoding::DynamicFlags::empty(),
7120 ___deadline,
7121 )?;
7122 Ok(_response.protocol)
7123 }
7124
7125 pub fn r#deprecated_clone(
7127 &self,
7128 mut flags: OpenFlags,
7129 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
7130 ) -> Result<(), fidl::Error> {
7131 self.client.send::<NodeDeprecatedCloneRequest>(
7132 (flags, object),
7133 0x5a61678f293ce16f,
7134 fidl::encoding::DynamicFlags::FLEXIBLE,
7135 )
7136 }
7137
7138 pub fn r#deprecated_get_attr(
7140 &self,
7141 ___deadline: zx::MonotonicInstant,
7142 ) -> Result<(i32, NodeAttributes), fidl::Error> {
7143 let _response =
7144 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
7145 (),
7146 0x78985e216314dafd,
7147 fidl::encoding::DynamicFlags::empty(),
7148 ___deadline,
7149 )?;
7150 Ok((_response.s, _response.attributes))
7151 }
7152
7153 pub fn r#deprecated_set_attr(
7155 &self,
7156 mut flags: NodeAttributeFlags,
7157 mut attributes: &NodeAttributes,
7158 ___deadline: zx::MonotonicInstant,
7159 ) -> Result<i32, fidl::Error> {
7160 let _response =
7161 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
7162 (flags, attributes),
7163 0x4186c0f40d938f46,
7164 fidl::encoding::DynamicFlags::empty(),
7165 ___deadline,
7166 )?;
7167 Ok(_response.s)
7168 }
7169
7170 pub fn r#deprecated_get_flags(
7172 &self,
7173 ___deadline: zx::MonotonicInstant,
7174 ) -> Result<(i32, OpenFlags), fidl::Error> {
7175 let _response = self
7176 .client
7177 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
7178 (),
7179 0x5b88fffb8eda3aa1,
7180 fidl::encoding::DynamicFlags::empty(),
7181 ___deadline,
7182 )?;
7183 Ok((_response.s, _response.flags))
7184 }
7185
7186 pub fn r#deprecated_set_flags(
7188 &self,
7189 mut flags: OpenFlags,
7190 ___deadline: zx::MonotonicInstant,
7191 ) -> Result<i32, fidl::Error> {
7192 let _response = self
7193 .client
7194 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
7195 (flags,),
7196 0x5295b76c71fde733,
7197 fidl::encoding::DynamicFlags::empty(),
7198 ___deadline,
7199 )?;
7200 Ok(_response.s)
7201 }
7202
7203 pub fn r#get_flags(
7212 &self,
7213 ___deadline: zx::MonotonicInstant,
7214 ) -> Result<NodeGetFlagsResult, fidl::Error> {
7215 let _response = self.client.send_query::<
7216 fidl::encoding::EmptyPayload,
7217 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
7218 >(
7219 (),
7220 0x176eb318f64ec23,
7221 fidl::encoding::DynamicFlags::FLEXIBLE,
7222 ___deadline,
7223 )?
7224 .into_result::<FileMarker>("get_flags")?;
7225 Ok(_response.map(|x| x.flags))
7226 }
7227
7228 pub fn r#set_flags(
7238 &self,
7239 mut flags: Flags,
7240 ___deadline: zx::MonotonicInstant,
7241 ) -> Result<NodeSetFlagsResult, fidl::Error> {
7242 let _response = self.client.send_query::<
7243 NodeSetFlagsRequest,
7244 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7245 >(
7246 (flags,),
7247 0x55a8028685791ea8,
7248 fidl::encoding::DynamicFlags::FLEXIBLE,
7249 ___deadline,
7250 )?
7251 .into_result::<FileMarker>("set_flags")?;
7252 Ok(_response.map(|x| x))
7253 }
7254
7255 pub fn r#query_filesystem(
7257 &self,
7258 ___deadline: zx::MonotonicInstant,
7259 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
7260 let _response =
7261 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
7262 (),
7263 0x6f344a1c6b0a0610,
7264 fidl::encoding::DynamicFlags::empty(),
7265 ___deadline,
7266 )?;
7267 Ok((_response.s, _response.info))
7268 }
7269
7270 pub fn r#get_attributes(
7284 &self,
7285 mut query: NodeAttributesQuery,
7286 ___deadline: zx::MonotonicInstant,
7287 ) -> Result<NodeGetAttributesResult, fidl::Error> {
7288 let _response = self.client.send_query::<
7289 NodeGetAttributesRequest,
7290 fidl::encoding::ResultType<NodeAttributes2, i32>,
7291 >(
7292 (query,),
7293 0x3d4396a638ea053b,
7294 fidl::encoding::DynamicFlags::empty(),
7295 ___deadline,
7296 )?;
7297 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
7298 }
7299
7300 pub fn r#update_attributes(
7309 &self,
7310 mut payload: &MutableNodeAttributes,
7311 ___deadline: zx::MonotonicInstant,
7312 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
7313 let _response = self.client.send_query::<
7314 MutableNodeAttributes,
7315 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7316 >(
7317 payload,
7318 0x3308c1da5a89bf08,
7319 fidl::encoding::DynamicFlags::empty(),
7320 ___deadline,
7321 )?;
7322 Ok(_response.map(|x| x))
7323 }
7324
7325 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
7335 let _response = self.client.send_query::<
7336 fidl::encoding::EmptyPayload,
7337 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7338 >(
7339 (),
7340 0x2c5c27ca0ab5dc49,
7341 fidl::encoding::DynamicFlags::empty(),
7342 ___deadline,
7343 )?;
7344 Ok(_response.map(|x| x))
7345 }
7346
7347 pub fn r#list_extended_attributes(
7356 &self,
7357 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
7358 ) -> Result<(), fidl::Error> {
7359 self.client.send::<NodeListExtendedAttributesRequest>(
7360 (iterator,),
7361 0x4b61033de007fcd0,
7362 fidl::encoding::DynamicFlags::empty(),
7363 )
7364 }
7365
7366 pub fn r#get_extended_attribute(
7373 &self,
7374 mut name: &[u8],
7375 ___deadline: zx::MonotonicInstant,
7376 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
7377 let _response = self.client.send_query::<
7378 NodeGetExtendedAttributeRequest,
7379 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
7380 >(
7381 (name,),
7382 0x45ffa3ccfdeb76db,
7383 fidl::encoding::DynamicFlags::empty(),
7384 ___deadline,
7385 )?;
7386 Ok(_response.map(|x| x))
7387 }
7388
7389 pub fn r#set_extended_attribute(
7397 &self,
7398 mut name: &[u8],
7399 mut value: ExtendedAttributeValue,
7400 mut mode: SetExtendedAttributeMode,
7401 ___deadline: zx::MonotonicInstant,
7402 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
7403 let _response = self.client.send_query::<
7404 NodeSetExtendedAttributeRequest,
7405 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7406 >(
7407 (name, &mut value, mode,),
7408 0x4a951362f681f23c,
7409 fidl::encoding::DynamicFlags::empty(),
7410 ___deadline,
7411 )?;
7412 Ok(_response.map(|x| x))
7413 }
7414
7415 pub fn r#remove_extended_attribute(
7421 &self,
7422 mut name: &[u8],
7423 ___deadline: zx::MonotonicInstant,
7424 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
7425 let _response = self.client.send_query::<
7426 NodeRemoveExtendedAttributeRequest,
7427 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7428 >(
7429 (name,),
7430 0x7a0b9f3a9bf9032d,
7431 fidl::encoding::DynamicFlags::empty(),
7432 ___deadline,
7433 )?;
7434 Ok(_response.map(|x| x))
7435 }
7436
7437 pub fn r#read(
7456 &self,
7457 mut count: u64,
7458 ___deadline: zx::MonotonicInstant,
7459 ) -> Result<ReadableReadResult, fidl::Error> {
7460 let _response = self.client.send_query::<
7461 ReadableReadRequest,
7462 fidl::encoding::ResultType<ReadableReadResponse, i32>,
7463 >(
7464 (count,),
7465 0x57e419a298c8ede,
7466 fidl::encoding::DynamicFlags::empty(),
7467 ___deadline,
7468 )?;
7469 Ok(_response.map(|x| x.data))
7470 }
7471
7472 pub fn r#write(
7496 &self,
7497 mut data: &[u8],
7498 ___deadline: zx::MonotonicInstant,
7499 ) -> Result<WritableWriteResult, fidl::Error> {
7500 let _response = self.client.send_query::<
7501 WritableWriteRequest,
7502 fidl::encoding::ResultType<WritableWriteResponse, i32>,
7503 >(
7504 (data,),
7505 0x6a31437832469f82,
7506 fidl::encoding::DynamicFlags::empty(),
7507 ___deadline,
7508 )?;
7509 Ok(_response.map(|x| x.actual_count))
7510 }
7511
7512 pub fn r#describe(&self, ___deadline: zx::MonotonicInstant) -> Result<FileInfo, fidl::Error> {
7513 let _response = self.client.send_query::<fidl::encoding::EmptyPayload, FileInfo>(
7514 (),
7515 0x68b5ac00c62906bc,
7516 fidl::encoding::DynamicFlags::empty(),
7517 ___deadline,
7518 )?;
7519 Ok(_response)
7520 }
7521
7522 pub fn r#seek(
7532 &self,
7533 mut origin: SeekOrigin,
7534 mut offset: i64,
7535 ___deadline: zx::MonotonicInstant,
7536 ) -> Result<FileSeekResult, fidl::Error> {
7537 let _response = self
7538 .client
7539 .send_query::<FileSeekRequest, fidl::encoding::ResultType<FileSeekResponse, i32>>(
7540 (origin, offset),
7541 0x78079168162c5207,
7542 fidl::encoding::DynamicFlags::empty(),
7543 ___deadline,
7544 )?;
7545 Ok(_response.map(|x| x.offset_from_start))
7546 }
7547
7548 pub fn r#read_at(
7566 &self,
7567 mut count: u64,
7568 mut offset: u64,
7569 ___deadline: zx::MonotonicInstant,
7570 ) -> Result<FileReadAtResult, fidl::Error> {
7571 let _response = self
7572 .client
7573 .send_query::<FileReadAtRequest, fidl::encoding::ResultType<FileReadAtResponse, i32>>(
7574 (count, offset),
7575 0x1607a293a60d723e,
7576 fidl::encoding::DynamicFlags::empty(),
7577 ___deadline,
7578 )?;
7579 Ok(_response.map(|x| x.data))
7580 }
7581
7582 pub fn r#write_at(
7604 &self,
7605 mut data: &[u8],
7606 mut offset: u64,
7607 ___deadline: zx::MonotonicInstant,
7608 ) -> Result<FileWriteAtResult, fidl::Error> {
7609 let _response = self
7610 .client
7611 .send_query::<FileWriteAtRequest, fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
7612 (data, offset),
7613 0x793eefc0045e792b,
7614 fidl::encoding::DynamicFlags::empty(),
7615 ___deadline,
7616 )?;
7617 Ok(_response.map(|x| x.actual_count))
7618 }
7619
7620 pub fn r#resize(
7629 &self,
7630 mut length: u64,
7631 ___deadline: zx::MonotonicInstant,
7632 ) -> Result<FileResizeResult, fidl::Error> {
7633 let _response = self.client.send_query::<
7634 FileResizeRequest,
7635 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7636 >(
7637 (length,),
7638 0x2b80825f0535743a,
7639 fidl::encoding::DynamicFlags::empty(),
7640 ___deadline,
7641 )?;
7642 Ok(_response.map(|x| x))
7643 }
7644
7645 pub fn r#get_backing_memory(
7666 &self,
7667 mut flags: VmoFlags,
7668 ___deadline: zx::MonotonicInstant,
7669 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7670 let _response = self.client.send_query::<
7671 FileGetBackingMemoryRequest,
7672 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7673 >(
7674 (flags,),
7675 0xa6a9e654cbf62b,
7676 fidl::encoding::DynamicFlags::empty(),
7677 ___deadline,
7678 )?;
7679 Ok(_response.map(|x| x.vmo))
7680 }
7681
7682 pub fn r#allocate(
7684 &self,
7685 mut offset: u64,
7686 mut length: u64,
7687 mut mode: AllocateMode,
7688 ___deadline: zx::MonotonicInstant,
7689 ) -> Result<FileAllocateResult, fidl::Error> {
7690 let _response = self.client.send_query::<
7691 FileAllocateRequest,
7692 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7693 >(
7694 (offset, length, mode,),
7695 0x77fa0c330b57fd2e,
7696 fidl::encoding::DynamicFlags::FLEXIBLE,
7697 ___deadline,
7698 )?
7699 .into_result::<FileMarker>("allocate")?;
7700 Ok(_response.map(|x| x))
7701 }
7702
7703 pub fn r#enable_verity(
7715 &self,
7716 mut options: &VerificationOptions,
7717 ___deadline: zx::MonotonicInstant,
7718 ) -> Result<FileEnableVerityResult, fidl::Error> {
7719 let _response = self.client.send_query::<
7720 FileEnableVerityRequest,
7721 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7722 >(
7723 (options,),
7724 0x2c421ec3faaeb8bb,
7725 fidl::encoding::DynamicFlags::FLEXIBLE,
7726 ___deadline,
7727 )?
7728 .into_result::<FileMarker>("enable_verity")?;
7729 Ok(_response.map(|x| x))
7730 }
7731}
7732
7733#[cfg(target_os = "fuchsia")]
7734impl From<FileSynchronousProxy> for zx::NullableHandle {
7735 fn from(value: FileSynchronousProxy) -> Self {
7736 value.into_channel().into()
7737 }
7738}
7739
7740#[cfg(target_os = "fuchsia")]
7741impl From<fidl::Channel> for FileSynchronousProxy {
7742 fn from(value: fidl::Channel) -> Self {
7743 Self::new(value)
7744 }
7745}
7746
7747#[cfg(target_os = "fuchsia")]
7748impl fidl::endpoints::FromClient for FileSynchronousProxy {
7749 type Protocol = FileMarker;
7750
7751 fn from_client(value: fidl::endpoints::ClientEnd<FileMarker>) -> Self {
7752 Self::new(value.into_channel())
7753 }
7754}
7755
7756#[derive(Debug, Clone)]
7757pub struct FileProxy {
7758 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7759}
7760
7761impl fidl::endpoints::Proxy for FileProxy {
7762 type Protocol = FileMarker;
7763
7764 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7765 Self::new(inner)
7766 }
7767
7768 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7769 self.client.into_channel().map_err(|client| Self { client })
7770 }
7771
7772 fn as_channel(&self) -> &::fidl::AsyncChannel {
7773 self.client.as_channel()
7774 }
7775}
7776
7777impl FileProxy {
7778 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7780 let protocol_name = <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7781 Self { client: fidl::client::Client::new(channel, protocol_name) }
7782 }
7783
7784 pub fn take_event_stream(&self) -> FileEventStream {
7790 FileEventStream { event_receiver: self.client.take_event_receiver() }
7791 }
7792
7793 pub fn r#advisory_lock(
7817 &self,
7818 mut request: &AdvisoryLockRequest,
7819 ) -> fidl::client::QueryResponseFut<
7820 AdvisoryLockingAdvisoryLockResult,
7821 fidl::encoding::DefaultFuchsiaResourceDialect,
7822 > {
7823 FileProxyInterface::r#advisory_lock(self, request)
7824 }
7825
7826 pub fn r#link_into(
7849 &self,
7850 mut dst_parent_token: fidl::Event,
7851 mut dst: &str,
7852 ) -> fidl::client::QueryResponseFut<
7853 LinkableLinkIntoResult,
7854 fidl::encoding::DefaultFuchsiaResourceDialect,
7855 > {
7856 FileProxyInterface::r#link_into(self, dst_parent_token, dst)
7857 }
7858
7859 pub fn r#clone(
7860 &self,
7861 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7862 ) -> Result<(), fidl::Error> {
7863 FileProxyInterface::r#clone(self, request)
7864 }
7865
7866 pub fn r#close(
7877 &self,
7878 ) -> fidl::client::QueryResponseFut<
7879 fidl_fuchsia_unknown::CloseableCloseResult,
7880 fidl::encoding::DefaultFuchsiaResourceDialect,
7881 > {
7882 FileProxyInterface::r#close(self)
7883 }
7884
7885 pub fn r#query(
7886 &self,
7887 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
7888 {
7889 FileProxyInterface::r#query(self)
7890 }
7891
7892 pub fn r#deprecated_clone(
7894 &self,
7895 mut flags: OpenFlags,
7896 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
7897 ) -> Result<(), fidl::Error> {
7898 FileProxyInterface::r#deprecated_clone(self, flags, object)
7899 }
7900
7901 pub fn r#deprecated_get_attr(
7903 &self,
7904 ) -> fidl::client::QueryResponseFut<
7905 (i32, NodeAttributes),
7906 fidl::encoding::DefaultFuchsiaResourceDialect,
7907 > {
7908 FileProxyInterface::r#deprecated_get_attr(self)
7909 }
7910
7911 pub fn r#deprecated_set_attr(
7913 &self,
7914 mut flags: NodeAttributeFlags,
7915 mut attributes: &NodeAttributes,
7916 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7917 FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
7918 }
7919
7920 pub fn r#deprecated_get_flags(
7922 &self,
7923 ) -> fidl::client::QueryResponseFut<
7924 (i32, OpenFlags),
7925 fidl::encoding::DefaultFuchsiaResourceDialect,
7926 > {
7927 FileProxyInterface::r#deprecated_get_flags(self)
7928 }
7929
7930 pub fn r#deprecated_set_flags(
7932 &self,
7933 mut flags: OpenFlags,
7934 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7935 FileProxyInterface::r#deprecated_set_flags(self, flags)
7936 }
7937
7938 pub fn r#get_flags(
7947 &self,
7948 ) -> fidl::client::QueryResponseFut<
7949 NodeGetFlagsResult,
7950 fidl::encoding::DefaultFuchsiaResourceDialect,
7951 > {
7952 FileProxyInterface::r#get_flags(self)
7953 }
7954
7955 pub fn r#set_flags(
7965 &self,
7966 mut flags: Flags,
7967 ) -> fidl::client::QueryResponseFut<
7968 NodeSetFlagsResult,
7969 fidl::encoding::DefaultFuchsiaResourceDialect,
7970 > {
7971 FileProxyInterface::r#set_flags(self, flags)
7972 }
7973
7974 pub fn r#query_filesystem(
7976 &self,
7977 ) -> fidl::client::QueryResponseFut<
7978 (i32, Option<Box<FilesystemInfo>>),
7979 fidl::encoding::DefaultFuchsiaResourceDialect,
7980 > {
7981 FileProxyInterface::r#query_filesystem(self)
7982 }
7983
7984 pub fn r#get_attributes(
7998 &self,
7999 mut query: NodeAttributesQuery,
8000 ) -> fidl::client::QueryResponseFut<
8001 NodeGetAttributesResult,
8002 fidl::encoding::DefaultFuchsiaResourceDialect,
8003 > {
8004 FileProxyInterface::r#get_attributes(self, query)
8005 }
8006
8007 pub fn r#update_attributes(
8016 &self,
8017 mut payload: &MutableNodeAttributes,
8018 ) -> fidl::client::QueryResponseFut<
8019 NodeUpdateAttributesResult,
8020 fidl::encoding::DefaultFuchsiaResourceDialect,
8021 > {
8022 FileProxyInterface::r#update_attributes(self, payload)
8023 }
8024
8025 pub fn r#sync(
8035 &self,
8036 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8037 {
8038 FileProxyInterface::r#sync(self)
8039 }
8040
8041 pub fn r#list_extended_attributes(
8050 &self,
8051 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8052 ) -> Result<(), fidl::Error> {
8053 FileProxyInterface::r#list_extended_attributes(self, iterator)
8054 }
8055
8056 pub fn r#get_extended_attribute(
8063 &self,
8064 mut name: &[u8],
8065 ) -> fidl::client::QueryResponseFut<
8066 NodeGetExtendedAttributeResult,
8067 fidl::encoding::DefaultFuchsiaResourceDialect,
8068 > {
8069 FileProxyInterface::r#get_extended_attribute(self, name)
8070 }
8071
8072 pub fn r#set_extended_attribute(
8080 &self,
8081 mut name: &[u8],
8082 mut value: ExtendedAttributeValue,
8083 mut mode: SetExtendedAttributeMode,
8084 ) -> fidl::client::QueryResponseFut<
8085 NodeSetExtendedAttributeResult,
8086 fidl::encoding::DefaultFuchsiaResourceDialect,
8087 > {
8088 FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
8089 }
8090
8091 pub fn r#remove_extended_attribute(
8097 &self,
8098 mut name: &[u8],
8099 ) -> fidl::client::QueryResponseFut<
8100 NodeRemoveExtendedAttributeResult,
8101 fidl::encoding::DefaultFuchsiaResourceDialect,
8102 > {
8103 FileProxyInterface::r#remove_extended_attribute(self, name)
8104 }
8105
8106 pub fn r#read(
8125 &self,
8126 mut count: u64,
8127 ) -> fidl::client::QueryResponseFut<
8128 ReadableReadResult,
8129 fidl::encoding::DefaultFuchsiaResourceDialect,
8130 > {
8131 FileProxyInterface::r#read(self, count)
8132 }
8133
8134 pub fn r#write(
8158 &self,
8159 mut data: &[u8],
8160 ) -> fidl::client::QueryResponseFut<
8161 WritableWriteResult,
8162 fidl::encoding::DefaultFuchsiaResourceDialect,
8163 > {
8164 FileProxyInterface::r#write(self, data)
8165 }
8166
8167 pub fn r#describe(
8168 &self,
8169 ) -> fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
8170 {
8171 FileProxyInterface::r#describe(self)
8172 }
8173
8174 pub fn r#seek(
8184 &self,
8185 mut origin: SeekOrigin,
8186 mut offset: i64,
8187 ) -> fidl::client::QueryResponseFut<FileSeekResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8188 {
8189 FileProxyInterface::r#seek(self, origin, offset)
8190 }
8191
8192 pub fn r#read_at(
8210 &self,
8211 mut count: u64,
8212 mut offset: u64,
8213 ) -> fidl::client::QueryResponseFut<
8214 FileReadAtResult,
8215 fidl::encoding::DefaultFuchsiaResourceDialect,
8216 > {
8217 FileProxyInterface::r#read_at(self, count, offset)
8218 }
8219
8220 pub fn r#write_at(
8242 &self,
8243 mut data: &[u8],
8244 mut offset: u64,
8245 ) -> fidl::client::QueryResponseFut<
8246 FileWriteAtResult,
8247 fidl::encoding::DefaultFuchsiaResourceDialect,
8248 > {
8249 FileProxyInterface::r#write_at(self, data, offset)
8250 }
8251
8252 pub fn r#resize(
8261 &self,
8262 mut length: u64,
8263 ) -> fidl::client::QueryResponseFut<
8264 FileResizeResult,
8265 fidl::encoding::DefaultFuchsiaResourceDialect,
8266 > {
8267 FileProxyInterface::r#resize(self, length)
8268 }
8269
8270 pub fn r#get_backing_memory(
8291 &self,
8292 mut flags: VmoFlags,
8293 ) -> fidl::client::QueryResponseFut<
8294 FileGetBackingMemoryResult,
8295 fidl::encoding::DefaultFuchsiaResourceDialect,
8296 > {
8297 FileProxyInterface::r#get_backing_memory(self, flags)
8298 }
8299
8300 pub fn r#allocate(
8302 &self,
8303 mut offset: u64,
8304 mut length: u64,
8305 mut mode: AllocateMode,
8306 ) -> fidl::client::QueryResponseFut<
8307 FileAllocateResult,
8308 fidl::encoding::DefaultFuchsiaResourceDialect,
8309 > {
8310 FileProxyInterface::r#allocate(self, offset, length, mode)
8311 }
8312
8313 pub fn r#enable_verity(
8325 &self,
8326 mut options: &VerificationOptions,
8327 ) -> fidl::client::QueryResponseFut<
8328 FileEnableVerityResult,
8329 fidl::encoding::DefaultFuchsiaResourceDialect,
8330 > {
8331 FileProxyInterface::r#enable_verity(self, options)
8332 }
8333}
8334
8335impl FileProxyInterface for FileProxy {
8336 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
8337 AdvisoryLockingAdvisoryLockResult,
8338 fidl::encoding::DefaultFuchsiaResourceDialect,
8339 >;
8340 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
8341 fn _decode(
8342 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8343 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
8344 let _response = fidl::client::decode_transaction_body::<
8345 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8346 fidl::encoding::DefaultFuchsiaResourceDialect,
8347 0x6ee9c0ad53ec87aa,
8348 >(_buf?)?;
8349 Ok(_response.map(|x| x))
8350 }
8351 self.client.send_query_and_decode::<
8352 AdvisoryLockingAdvisoryLockRequest,
8353 AdvisoryLockingAdvisoryLockResult,
8354 >(
8355 (request,),
8356 0x6ee9c0ad53ec87aa,
8357 fidl::encoding::DynamicFlags::empty(),
8358 _decode,
8359 )
8360 }
8361
8362 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
8363 LinkableLinkIntoResult,
8364 fidl::encoding::DefaultFuchsiaResourceDialect,
8365 >;
8366 fn r#link_into(
8367 &self,
8368 mut dst_parent_token: fidl::Event,
8369 mut dst: &str,
8370 ) -> Self::LinkIntoResponseFut {
8371 fn _decode(
8372 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8373 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
8374 let _response = fidl::client::decode_transaction_body::<
8375 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8376 fidl::encoding::DefaultFuchsiaResourceDialect,
8377 0x54f3949246a03e74,
8378 >(_buf?)?;
8379 Ok(_response.map(|x| x))
8380 }
8381 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
8382 (dst_parent_token, dst),
8383 0x54f3949246a03e74,
8384 fidl::encoding::DynamicFlags::empty(),
8385 _decode,
8386 )
8387 }
8388
8389 fn r#clone(
8390 &self,
8391 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
8392 ) -> Result<(), fidl::Error> {
8393 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
8394 (request,),
8395 0x20d8a7aba2168a79,
8396 fidl::encoding::DynamicFlags::empty(),
8397 )
8398 }
8399
8400 type CloseResponseFut = fidl::client::QueryResponseFut<
8401 fidl_fuchsia_unknown::CloseableCloseResult,
8402 fidl::encoding::DefaultFuchsiaResourceDialect,
8403 >;
8404 fn r#close(&self) -> Self::CloseResponseFut {
8405 fn _decode(
8406 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8407 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
8408 let _response = fidl::client::decode_transaction_body::<
8409 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8410 fidl::encoding::DefaultFuchsiaResourceDialect,
8411 0x5ac5d459ad7f657e,
8412 >(_buf?)?;
8413 Ok(_response.map(|x| x))
8414 }
8415 self.client.send_query_and_decode::<
8416 fidl::encoding::EmptyPayload,
8417 fidl_fuchsia_unknown::CloseableCloseResult,
8418 >(
8419 (),
8420 0x5ac5d459ad7f657e,
8421 fidl::encoding::DynamicFlags::empty(),
8422 _decode,
8423 )
8424 }
8425
8426 type QueryResponseFut =
8427 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
8428 fn r#query(&self) -> Self::QueryResponseFut {
8429 fn _decode(
8430 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8431 ) -> Result<Vec<u8>, fidl::Error> {
8432 let _response = fidl::client::decode_transaction_body::<
8433 fidl_fuchsia_unknown::QueryableQueryResponse,
8434 fidl::encoding::DefaultFuchsiaResourceDialect,
8435 0x2658edee9decfc06,
8436 >(_buf?)?;
8437 Ok(_response.protocol)
8438 }
8439 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
8440 (),
8441 0x2658edee9decfc06,
8442 fidl::encoding::DynamicFlags::empty(),
8443 _decode,
8444 )
8445 }
8446
8447 fn r#deprecated_clone(
8448 &self,
8449 mut flags: OpenFlags,
8450 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
8451 ) -> Result<(), fidl::Error> {
8452 self.client.send::<NodeDeprecatedCloneRequest>(
8453 (flags, object),
8454 0x5a61678f293ce16f,
8455 fidl::encoding::DynamicFlags::FLEXIBLE,
8456 )
8457 }
8458
8459 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
8460 (i32, NodeAttributes),
8461 fidl::encoding::DefaultFuchsiaResourceDialect,
8462 >;
8463 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
8464 fn _decode(
8465 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8466 ) -> Result<(i32, NodeAttributes), fidl::Error> {
8467 let _response = fidl::client::decode_transaction_body::<
8468 NodeDeprecatedGetAttrResponse,
8469 fidl::encoding::DefaultFuchsiaResourceDialect,
8470 0x78985e216314dafd,
8471 >(_buf?)?;
8472 Ok((_response.s, _response.attributes))
8473 }
8474 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
8475 (),
8476 0x78985e216314dafd,
8477 fidl::encoding::DynamicFlags::empty(),
8478 _decode,
8479 )
8480 }
8481
8482 type DeprecatedSetAttrResponseFut =
8483 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8484 fn r#deprecated_set_attr(
8485 &self,
8486 mut flags: NodeAttributeFlags,
8487 mut attributes: &NodeAttributes,
8488 ) -> Self::DeprecatedSetAttrResponseFut {
8489 fn _decode(
8490 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8491 ) -> Result<i32, fidl::Error> {
8492 let _response = fidl::client::decode_transaction_body::<
8493 NodeDeprecatedSetAttrResponse,
8494 fidl::encoding::DefaultFuchsiaResourceDialect,
8495 0x4186c0f40d938f46,
8496 >(_buf?)?;
8497 Ok(_response.s)
8498 }
8499 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
8500 (flags, attributes),
8501 0x4186c0f40d938f46,
8502 fidl::encoding::DynamicFlags::empty(),
8503 _decode,
8504 )
8505 }
8506
8507 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
8508 (i32, OpenFlags),
8509 fidl::encoding::DefaultFuchsiaResourceDialect,
8510 >;
8511 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
8512 fn _decode(
8513 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8514 ) -> Result<(i32, OpenFlags), fidl::Error> {
8515 let _response = fidl::client::decode_transaction_body::<
8516 NodeDeprecatedGetFlagsResponse,
8517 fidl::encoding::DefaultFuchsiaResourceDialect,
8518 0x5b88fffb8eda3aa1,
8519 >(_buf?)?;
8520 Ok((_response.s, _response.flags))
8521 }
8522 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
8523 (),
8524 0x5b88fffb8eda3aa1,
8525 fidl::encoding::DynamicFlags::empty(),
8526 _decode,
8527 )
8528 }
8529
8530 type DeprecatedSetFlagsResponseFut =
8531 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8532 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
8533 fn _decode(
8534 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8535 ) -> Result<i32, fidl::Error> {
8536 let _response = fidl::client::decode_transaction_body::<
8537 NodeDeprecatedSetFlagsResponse,
8538 fidl::encoding::DefaultFuchsiaResourceDialect,
8539 0x5295b76c71fde733,
8540 >(_buf?)?;
8541 Ok(_response.s)
8542 }
8543 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
8544 (flags,),
8545 0x5295b76c71fde733,
8546 fidl::encoding::DynamicFlags::empty(),
8547 _decode,
8548 )
8549 }
8550
8551 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
8552 NodeGetFlagsResult,
8553 fidl::encoding::DefaultFuchsiaResourceDialect,
8554 >;
8555 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
8556 fn _decode(
8557 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8558 ) -> Result<NodeGetFlagsResult, fidl::Error> {
8559 let _response = fidl::client::decode_transaction_body::<
8560 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
8561 fidl::encoding::DefaultFuchsiaResourceDialect,
8562 0x176eb318f64ec23,
8563 >(_buf?)?
8564 .into_result::<FileMarker>("get_flags")?;
8565 Ok(_response.map(|x| x.flags))
8566 }
8567 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
8568 (),
8569 0x176eb318f64ec23,
8570 fidl::encoding::DynamicFlags::FLEXIBLE,
8571 _decode,
8572 )
8573 }
8574
8575 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
8576 NodeSetFlagsResult,
8577 fidl::encoding::DefaultFuchsiaResourceDialect,
8578 >;
8579 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
8580 fn _decode(
8581 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8582 ) -> Result<NodeSetFlagsResult, fidl::Error> {
8583 let _response = fidl::client::decode_transaction_body::<
8584 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
8585 fidl::encoding::DefaultFuchsiaResourceDialect,
8586 0x55a8028685791ea8,
8587 >(_buf?)?
8588 .into_result::<FileMarker>("set_flags")?;
8589 Ok(_response.map(|x| x))
8590 }
8591 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
8592 (flags,),
8593 0x55a8028685791ea8,
8594 fidl::encoding::DynamicFlags::FLEXIBLE,
8595 _decode,
8596 )
8597 }
8598
8599 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
8600 (i32, Option<Box<FilesystemInfo>>),
8601 fidl::encoding::DefaultFuchsiaResourceDialect,
8602 >;
8603 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
8604 fn _decode(
8605 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8606 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
8607 let _response = fidl::client::decode_transaction_body::<
8608 NodeQueryFilesystemResponse,
8609 fidl::encoding::DefaultFuchsiaResourceDialect,
8610 0x6f344a1c6b0a0610,
8611 >(_buf?)?;
8612 Ok((_response.s, _response.info))
8613 }
8614 self.client.send_query_and_decode::<
8615 fidl::encoding::EmptyPayload,
8616 (i32, Option<Box<FilesystemInfo>>),
8617 >(
8618 (),
8619 0x6f344a1c6b0a0610,
8620 fidl::encoding::DynamicFlags::empty(),
8621 _decode,
8622 )
8623 }
8624
8625 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
8626 NodeGetAttributesResult,
8627 fidl::encoding::DefaultFuchsiaResourceDialect,
8628 >;
8629 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
8630 fn _decode(
8631 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8632 ) -> Result<NodeGetAttributesResult, fidl::Error> {
8633 let _response = fidl::client::decode_transaction_body::<
8634 fidl::encoding::ResultType<NodeAttributes2, i32>,
8635 fidl::encoding::DefaultFuchsiaResourceDialect,
8636 0x3d4396a638ea053b,
8637 >(_buf?)?;
8638 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
8639 }
8640 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
8641 (query,),
8642 0x3d4396a638ea053b,
8643 fidl::encoding::DynamicFlags::empty(),
8644 _decode,
8645 )
8646 }
8647
8648 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
8649 NodeUpdateAttributesResult,
8650 fidl::encoding::DefaultFuchsiaResourceDialect,
8651 >;
8652 fn r#update_attributes(
8653 &self,
8654 mut payload: &MutableNodeAttributes,
8655 ) -> Self::UpdateAttributesResponseFut {
8656 fn _decode(
8657 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8658 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
8659 let _response = fidl::client::decode_transaction_body::<
8660 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8661 fidl::encoding::DefaultFuchsiaResourceDialect,
8662 0x3308c1da5a89bf08,
8663 >(_buf?)?;
8664 Ok(_response.map(|x| x))
8665 }
8666 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
8667 payload,
8668 0x3308c1da5a89bf08,
8669 fidl::encoding::DynamicFlags::empty(),
8670 _decode,
8671 )
8672 }
8673
8674 type SyncResponseFut = fidl::client::QueryResponseFut<
8675 NodeSyncResult,
8676 fidl::encoding::DefaultFuchsiaResourceDialect,
8677 >;
8678 fn r#sync(&self) -> Self::SyncResponseFut {
8679 fn _decode(
8680 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8681 ) -> Result<NodeSyncResult, fidl::Error> {
8682 let _response = fidl::client::decode_transaction_body::<
8683 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8684 fidl::encoding::DefaultFuchsiaResourceDialect,
8685 0x2c5c27ca0ab5dc49,
8686 >(_buf?)?;
8687 Ok(_response.map(|x| x))
8688 }
8689 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
8690 (),
8691 0x2c5c27ca0ab5dc49,
8692 fidl::encoding::DynamicFlags::empty(),
8693 _decode,
8694 )
8695 }
8696
8697 fn r#list_extended_attributes(
8698 &self,
8699 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8700 ) -> Result<(), fidl::Error> {
8701 self.client.send::<NodeListExtendedAttributesRequest>(
8702 (iterator,),
8703 0x4b61033de007fcd0,
8704 fidl::encoding::DynamicFlags::empty(),
8705 )
8706 }
8707
8708 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8709 NodeGetExtendedAttributeResult,
8710 fidl::encoding::DefaultFuchsiaResourceDialect,
8711 >;
8712 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
8713 fn _decode(
8714 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8715 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
8716 let _response = fidl::client::decode_transaction_body::<
8717 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
8718 fidl::encoding::DefaultFuchsiaResourceDialect,
8719 0x45ffa3ccfdeb76db,
8720 >(_buf?)?;
8721 Ok(_response.map(|x| x))
8722 }
8723 self.client.send_query_and_decode::<
8724 NodeGetExtendedAttributeRequest,
8725 NodeGetExtendedAttributeResult,
8726 >(
8727 (name,),
8728 0x45ffa3ccfdeb76db,
8729 fidl::encoding::DynamicFlags::empty(),
8730 _decode,
8731 )
8732 }
8733
8734 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8735 NodeSetExtendedAttributeResult,
8736 fidl::encoding::DefaultFuchsiaResourceDialect,
8737 >;
8738 fn r#set_extended_attribute(
8739 &self,
8740 mut name: &[u8],
8741 mut value: ExtendedAttributeValue,
8742 mut mode: SetExtendedAttributeMode,
8743 ) -> Self::SetExtendedAttributeResponseFut {
8744 fn _decode(
8745 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8746 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
8747 let _response = fidl::client::decode_transaction_body::<
8748 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8749 fidl::encoding::DefaultFuchsiaResourceDialect,
8750 0x4a951362f681f23c,
8751 >(_buf?)?;
8752 Ok(_response.map(|x| x))
8753 }
8754 self.client.send_query_and_decode::<
8755 NodeSetExtendedAttributeRequest,
8756 NodeSetExtendedAttributeResult,
8757 >(
8758 (name, &mut value, mode,),
8759 0x4a951362f681f23c,
8760 fidl::encoding::DynamicFlags::empty(),
8761 _decode,
8762 )
8763 }
8764
8765 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8766 NodeRemoveExtendedAttributeResult,
8767 fidl::encoding::DefaultFuchsiaResourceDialect,
8768 >;
8769 fn r#remove_extended_attribute(
8770 &self,
8771 mut name: &[u8],
8772 ) -> Self::RemoveExtendedAttributeResponseFut {
8773 fn _decode(
8774 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8775 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
8776 let _response = fidl::client::decode_transaction_body::<
8777 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8778 fidl::encoding::DefaultFuchsiaResourceDialect,
8779 0x7a0b9f3a9bf9032d,
8780 >(_buf?)?;
8781 Ok(_response.map(|x| x))
8782 }
8783 self.client.send_query_and_decode::<
8784 NodeRemoveExtendedAttributeRequest,
8785 NodeRemoveExtendedAttributeResult,
8786 >(
8787 (name,),
8788 0x7a0b9f3a9bf9032d,
8789 fidl::encoding::DynamicFlags::empty(),
8790 _decode,
8791 )
8792 }
8793
8794 type ReadResponseFut = fidl::client::QueryResponseFut<
8795 ReadableReadResult,
8796 fidl::encoding::DefaultFuchsiaResourceDialect,
8797 >;
8798 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
8799 fn _decode(
8800 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8801 ) -> Result<ReadableReadResult, fidl::Error> {
8802 let _response = fidl::client::decode_transaction_body::<
8803 fidl::encoding::ResultType<ReadableReadResponse, i32>,
8804 fidl::encoding::DefaultFuchsiaResourceDialect,
8805 0x57e419a298c8ede,
8806 >(_buf?)?;
8807 Ok(_response.map(|x| x.data))
8808 }
8809 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
8810 (count,),
8811 0x57e419a298c8ede,
8812 fidl::encoding::DynamicFlags::empty(),
8813 _decode,
8814 )
8815 }
8816
8817 type WriteResponseFut = fidl::client::QueryResponseFut<
8818 WritableWriteResult,
8819 fidl::encoding::DefaultFuchsiaResourceDialect,
8820 >;
8821 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
8822 fn _decode(
8823 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8824 ) -> Result<WritableWriteResult, fidl::Error> {
8825 let _response = fidl::client::decode_transaction_body::<
8826 fidl::encoding::ResultType<WritableWriteResponse, i32>,
8827 fidl::encoding::DefaultFuchsiaResourceDialect,
8828 0x6a31437832469f82,
8829 >(_buf?)?;
8830 Ok(_response.map(|x| x.actual_count))
8831 }
8832 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
8833 (data,),
8834 0x6a31437832469f82,
8835 fidl::encoding::DynamicFlags::empty(),
8836 _decode,
8837 )
8838 }
8839
8840 type DescribeResponseFut =
8841 fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
8842 fn r#describe(&self) -> Self::DescribeResponseFut {
8843 fn _decode(
8844 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8845 ) -> Result<FileInfo, fidl::Error> {
8846 let _response = fidl::client::decode_transaction_body::<
8847 FileInfo,
8848 fidl::encoding::DefaultFuchsiaResourceDialect,
8849 0x68b5ac00c62906bc,
8850 >(_buf?)?;
8851 Ok(_response)
8852 }
8853 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
8854 (),
8855 0x68b5ac00c62906bc,
8856 fidl::encoding::DynamicFlags::empty(),
8857 _decode,
8858 )
8859 }
8860
8861 type SeekResponseFut = fidl::client::QueryResponseFut<
8862 FileSeekResult,
8863 fidl::encoding::DefaultFuchsiaResourceDialect,
8864 >;
8865 fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
8866 fn _decode(
8867 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8868 ) -> Result<FileSeekResult, fidl::Error> {
8869 let _response = fidl::client::decode_transaction_body::<
8870 fidl::encoding::ResultType<FileSeekResponse, i32>,
8871 fidl::encoding::DefaultFuchsiaResourceDialect,
8872 0x78079168162c5207,
8873 >(_buf?)?;
8874 Ok(_response.map(|x| x.offset_from_start))
8875 }
8876 self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
8877 (origin, offset),
8878 0x78079168162c5207,
8879 fidl::encoding::DynamicFlags::empty(),
8880 _decode,
8881 )
8882 }
8883
8884 type ReadAtResponseFut = fidl::client::QueryResponseFut<
8885 FileReadAtResult,
8886 fidl::encoding::DefaultFuchsiaResourceDialect,
8887 >;
8888 fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
8889 fn _decode(
8890 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8891 ) -> Result<FileReadAtResult, fidl::Error> {
8892 let _response = fidl::client::decode_transaction_body::<
8893 fidl::encoding::ResultType<FileReadAtResponse, i32>,
8894 fidl::encoding::DefaultFuchsiaResourceDialect,
8895 0x1607a293a60d723e,
8896 >(_buf?)?;
8897 Ok(_response.map(|x| x.data))
8898 }
8899 self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
8900 (count, offset),
8901 0x1607a293a60d723e,
8902 fidl::encoding::DynamicFlags::empty(),
8903 _decode,
8904 )
8905 }
8906
8907 type WriteAtResponseFut = fidl::client::QueryResponseFut<
8908 FileWriteAtResult,
8909 fidl::encoding::DefaultFuchsiaResourceDialect,
8910 >;
8911 fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
8912 fn _decode(
8913 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8914 ) -> Result<FileWriteAtResult, fidl::Error> {
8915 let _response = fidl::client::decode_transaction_body::<
8916 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
8917 fidl::encoding::DefaultFuchsiaResourceDialect,
8918 0x793eefc0045e792b,
8919 >(_buf?)?;
8920 Ok(_response.map(|x| x.actual_count))
8921 }
8922 self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
8923 (data, offset),
8924 0x793eefc0045e792b,
8925 fidl::encoding::DynamicFlags::empty(),
8926 _decode,
8927 )
8928 }
8929
8930 type ResizeResponseFut = fidl::client::QueryResponseFut<
8931 FileResizeResult,
8932 fidl::encoding::DefaultFuchsiaResourceDialect,
8933 >;
8934 fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
8935 fn _decode(
8936 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8937 ) -> Result<FileResizeResult, fidl::Error> {
8938 let _response = fidl::client::decode_transaction_body::<
8939 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8940 fidl::encoding::DefaultFuchsiaResourceDialect,
8941 0x2b80825f0535743a,
8942 >(_buf?)?;
8943 Ok(_response.map(|x| x))
8944 }
8945 self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
8946 (length,),
8947 0x2b80825f0535743a,
8948 fidl::encoding::DynamicFlags::empty(),
8949 _decode,
8950 )
8951 }
8952
8953 type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
8954 FileGetBackingMemoryResult,
8955 fidl::encoding::DefaultFuchsiaResourceDialect,
8956 >;
8957 fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
8958 fn _decode(
8959 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8960 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
8961 let _response = fidl::client::decode_transaction_body::<
8962 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
8963 fidl::encoding::DefaultFuchsiaResourceDialect,
8964 0xa6a9e654cbf62b,
8965 >(_buf?)?;
8966 Ok(_response.map(|x| x.vmo))
8967 }
8968 self.client
8969 .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
8970 (flags,),
8971 0xa6a9e654cbf62b,
8972 fidl::encoding::DynamicFlags::empty(),
8973 _decode,
8974 )
8975 }
8976
8977 type AllocateResponseFut = fidl::client::QueryResponseFut<
8978 FileAllocateResult,
8979 fidl::encoding::DefaultFuchsiaResourceDialect,
8980 >;
8981 fn r#allocate(
8982 &self,
8983 mut offset: u64,
8984 mut length: u64,
8985 mut mode: AllocateMode,
8986 ) -> Self::AllocateResponseFut {
8987 fn _decode(
8988 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8989 ) -> Result<FileAllocateResult, fidl::Error> {
8990 let _response = fidl::client::decode_transaction_body::<
8991 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
8992 fidl::encoding::DefaultFuchsiaResourceDialect,
8993 0x77fa0c330b57fd2e,
8994 >(_buf?)?
8995 .into_result::<FileMarker>("allocate")?;
8996 Ok(_response.map(|x| x))
8997 }
8998 self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
8999 (offset, length, mode),
9000 0x77fa0c330b57fd2e,
9001 fidl::encoding::DynamicFlags::FLEXIBLE,
9002 _decode,
9003 )
9004 }
9005
9006 type EnableVerityResponseFut = fidl::client::QueryResponseFut<
9007 FileEnableVerityResult,
9008 fidl::encoding::DefaultFuchsiaResourceDialect,
9009 >;
9010 fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
9011 fn _decode(
9012 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9013 ) -> Result<FileEnableVerityResult, fidl::Error> {
9014 let _response = fidl::client::decode_transaction_body::<
9015 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
9016 fidl::encoding::DefaultFuchsiaResourceDialect,
9017 0x2c421ec3faaeb8bb,
9018 >(_buf?)?
9019 .into_result::<FileMarker>("enable_verity")?;
9020 Ok(_response.map(|x| x))
9021 }
9022 self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
9023 (options,),
9024 0x2c421ec3faaeb8bb,
9025 fidl::encoding::DynamicFlags::FLEXIBLE,
9026 _decode,
9027 )
9028 }
9029}
9030
9031pub struct FileEventStream {
9032 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9033}
9034
9035impl std::marker::Unpin for FileEventStream {}
9036
9037impl futures::stream::FusedStream for FileEventStream {
9038 fn is_terminated(&self) -> bool {
9039 self.event_receiver.is_terminated()
9040 }
9041}
9042
9043impl futures::Stream for FileEventStream {
9044 type Item = Result<FileEvent, fidl::Error>;
9045
9046 fn poll_next(
9047 mut self: std::pin::Pin<&mut Self>,
9048 cx: &mut std::task::Context<'_>,
9049 ) -> std::task::Poll<Option<Self::Item>> {
9050 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9051 &mut self.event_receiver,
9052 cx
9053 )?) {
9054 Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
9055 None => std::task::Poll::Ready(None),
9056 }
9057 }
9058}
9059
9060#[derive(Debug)]
9061pub enum FileEvent {
9062 OnOpen_ {
9063 s: i32,
9064 info: Option<Box<NodeInfoDeprecated>>,
9065 },
9066 OnRepresentation {
9067 payload: Representation,
9068 },
9069 #[non_exhaustive]
9070 _UnknownEvent {
9071 ordinal: u64,
9073 },
9074}
9075
9076impl FileEvent {
9077 #[allow(irrefutable_let_patterns)]
9078 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
9079 if let FileEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
9080 }
9081 #[allow(irrefutable_let_patterns)]
9082 pub fn into_on_representation(self) -> Option<Representation> {
9083 if let FileEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
9084 }
9085
9086 fn decode(
9088 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9089 ) -> Result<FileEvent, fidl::Error> {
9090 let (bytes, _handles) = buf.split_mut();
9091 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9092 debug_assert_eq!(tx_header.tx_id, 0);
9093 match tx_header.ordinal {
9094 0x7fc7bbb1dbfd1972 => {
9095 let mut out = fidl::new_empty!(
9096 NodeOnOpenRequest,
9097 fidl::encoding::DefaultFuchsiaResourceDialect
9098 );
9099 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
9100 Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
9101 }
9102 0x5cb40567d80a510c => {
9103 let mut out =
9104 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
9105 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
9106 Ok((FileEvent::OnRepresentation { payload: out }))
9107 }
9108 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
9109 Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
9110 }
9111 _ => Err(fidl::Error::UnknownOrdinal {
9112 ordinal: tx_header.ordinal,
9113 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9114 }),
9115 }
9116 }
9117}
9118
9119pub struct FileRequestStream {
9121 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9122 is_terminated: bool,
9123}
9124
9125impl std::marker::Unpin for FileRequestStream {}
9126
9127impl futures::stream::FusedStream for FileRequestStream {
9128 fn is_terminated(&self) -> bool {
9129 self.is_terminated
9130 }
9131}
9132
9133impl fidl::endpoints::RequestStream for FileRequestStream {
9134 type Protocol = FileMarker;
9135 type ControlHandle = FileControlHandle;
9136
9137 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9138 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9139 }
9140
9141 fn control_handle(&self) -> Self::ControlHandle {
9142 FileControlHandle { inner: self.inner.clone() }
9143 }
9144
9145 fn into_inner(
9146 self,
9147 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9148 {
9149 (self.inner, self.is_terminated)
9150 }
9151
9152 fn from_inner(
9153 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9154 is_terminated: bool,
9155 ) -> Self {
9156 Self { inner, is_terminated }
9157 }
9158}
9159
9160impl futures::Stream for FileRequestStream {
9161 type Item = Result<FileRequest, fidl::Error>;
9162
9163 fn poll_next(
9164 mut self: std::pin::Pin<&mut Self>,
9165 cx: &mut std::task::Context<'_>,
9166 ) -> std::task::Poll<Option<Self::Item>> {
9167 let this = &mut *self;
9168 if this.inner.check_shutdown(cx) {
9169 this.is_terminated = true;
9170 return std::task::Poll::Ready(None);
9171 }
9172 if this.is_terminated {
9173 panic!("polled FileRequestStream after completion");
9174 }
9175 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9176 |bytes, handles| {
9177 match this.inner.channel().read_etc(cx, bytes, handles) {
9178 std::task::Poll::Ready(Ok(())) => {}
9179 std::task::Poll::Pending => return std::task::Poll::Pending,
9180 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9181 this.is_terminated = true;
9182 return std::task::Poll::Ready(None);
9183 }
9184 std::task::Poll::Ready(Err(e)) => {
9185 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9186 e.into(),
9187 ))));
9188 }
9189 }
9190
9191 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9193
9194 std::task::Poll::Ready(Some(match header.ordinal {
9195 0x6ee9c0ad53ec87aa => {
9196 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9197 let mut req = fidl::new_empty!(
9198 AdvisoryLockingAdvisoryLockRequest,
9199 fidl::encoding::DefaultFuchsiaResourceDialect
9200 );
9201 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
9202 let control_handle = FileControlHandle { inner: this.inner.clone() };
9203 Ok(FileRequest::AdvisoryLock {
9204 request: req.request,
9205
9206 responder: FileAdvisoryLockResponder {
9207 control_handle: std::mem::ManuallyDrop::new(control_handle),
9208 tx_id: header.tx_id,
9209 },
9210 })
9211 }
9212 0x54f3949246a03e74 => {
9213 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9214 let mut req = fidl::new_empty!(
9215 LinkableLinkIntoRequest,
9216 fidl::encoding::DefaultFuchsiaResourceDialect
9217 );
9218 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
9219 let control_handle = FileControlHandle { inner: this.inner.clone() };
9220 Ok(FileRequest::LinkInto {
9221 dst_parent_token: req.dst_parent_token,
9222 dst: req.dst,
9223
9224 responder: FileLinkIntoResponder {
9225 control_handle: std::mem::ManuallyDrop::new(control_handle),
9226 tx_id: header.tx_id,
9227 },
9228 })
9229 }
9230 0x20d8a7aba2168a79 => {
9231 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9232 let mut req = fidl::new_empty!(
9233 fidl_fuchsia_unknown::CloneableCloneRequest,
9234 fidl::encoding::DefaultFuchsiaResourceDialect
9235 );
9236 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
9237 let control_handle = FileControlHandle { inner: this.inner.clone() };
9238 Ok(FileRequest::Clone { request: req.request, control_handle })
9239 }
9240 0x5ac5d459ad7f657e => {
9241 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9242 let mut req = fidl::new_empty!(
9243 fidl::encoding::EmptyPayload,
9244 fidl::encoding::DefaultFuchsiaResourceDialect
9245 );
9246 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9247 let control_handle = FileControlHandle { inner: this.inner.clone() };
9248 Ok(FileRequest::Close {
9249 responder: FileCloseResponder {
9250 control_handle: std::mem::ManuallyDrop::new(control_handle),
9251 tx_id: header.tx_id,
9252 },
9253 })
9254 }
9255 0x2658edee9decfc06 => {
9256 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9257 let mut req = fidl::new_empty!(
9258 fidl::encoding::EmptyPayload,
9259 fidl::encoding::DefaultFuchsiaResourceDialect
9260 );
9261 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9262 let control_handle = FileControlHandle { inner: this.inner.clone() };
9263 Ok(FileRequest::Query {
9264 responder: FileQueryResponder {
9265 control_handle: std::mem::ManuallyDrop::new(control_handle),
9266 tx_id: header.tx_id,
9267 },
9268 })
9269 }
9270 0x5a61678f293ce16f => {
9271 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9272 let mut req = fidl::new_empty!(
9273 NodeDeprecatedCloneRequest,
9274 fidl::encoding::DefaultFuchsiaResourceDialect
9275 );
9276 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
9277 let control_handle = FileControlHandle { inner: this.inner.clone() };
9278 Ok(FileRequest::DeprecatedClone {
9279 flags: req.flags,
9280 object: req.object,
9281
9282 control_handle,
9283 })
9284 }
9285 0x78985e216314dafd => {
9286 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9287 let mut req = fidl::new_empty!(
9288 fidl::encoding::EmptyPayload,
9289 fidl::encoding::DefaultFuchsiaResourceDialect
9290 );
9291 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9292 let control_handle = FileControlHandle { inner: this.inner.clone() };
9293 Ok(FileRequest::DeprecatedGetAttr {
9294 responder: FileDeprecatedGetAttrResponder {
9295 control_handle: std::mem::ManuallyDrop::new(control_handle),
9296 tx_id: header.tx_id,
9297 },
9298 })
9299 }
9300 0x4186c0f40d938f46 => {
9301 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9302 let mut req = fidl::new_empty!(
9303 NodeDeprecatedSetAttrRequest,
9304 fidl::encoding::DefaultFuchsiaResourceDialect
9305 );
9306 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
9307 let control_handle = FileControlHandle { inner: this.inner.clone() };
9308 Ok(FileRequest::DeprecatedSetAttr {
9309 flags: req.flags,
9310 attributes: req.attributes,
9311
9312 responder: FileDeprecatedSetAttrResponder {
9313 control_handle: std::mem::ManuallyDrop::new(control_handle),
9314 tx_id: header.tx_id,
9315 },
9316 })
9317 }
9318 0x5b88fffb8eda3aa1 => {
9319 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9320 let mut req = fidl::new_empty!(
9321 fidl::encoding::EmptyPayload,
9322 fidl::encoding::DefaultFuchsiaResourceDialect
9323 );
9324 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9325 let control_handle = FileControlHandle { inner: this.inner.clone() };
9326 Ok(FileRequest::DeprecatedGetFlags {
9327 responder: FileDeprecatedGetFlagsResponder {
9328 control_handle: std::mem::ManuallyDrop::new(control_handle),
9329 tx_id: header.tx_id,
9330 },
9331 })
9332 }
9333 0x5295b76c71fde733 => {
9334 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9335 let mut req = fidl::new_empty!(
9336 NodeDeprecatedSetFlagsRequest,
9337 fidl::encoding::DefaultFuchsiaResourceDialect
9338 );
9339 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9340 let control_handle = FileControlHandle { inner: this.inner.clone() };
9341 Ok(FileRequest::DeprecatedSetFlags {
9342 flags: req.flags,
9343
9344 responder: FileDeprecatedSetFlagsResponder {
9345 control_handle: std::mem::ManuallyDrop::new(control_handle),
9346 tx_id: header.tx_id,
9347 },
9348 })
9349 }
9350 0x176eb318f64ec23 => {
9351 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9352 let mut req = fidl::new_empty!(
9353 fidl::encoding::EmptyPayload,
9354 fidl::encoding::DefaultFuchsiaResourceDialect
9355 );
9356 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9357 let control_handle = FileControlHandle { inner: this.inner.clone() };
9358 Ok(FileRequest::GetFlags {
9359 responder: FileGetFlagsResponder {
9360 control_handle: std::mem::ManuallyDrop::new(control_handle),
9361 tx_id: header.tx_id,
9362 },
9363 })
9364 }
9365 0x55a8028685791ea8 => {
9366 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9367 let mut req = fidl::new_empty!(
9368 NodeSetFlagsRequest,
9369 fidl::encoding::DefaultFuchsiaResourceDialect
9370 );
9371 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9372 let control_handle = FileControlHandle { inner: this.inner.clone() };
9373 Ok(FileRequest::SetFlags {
9374 flags: req.flags,
9375
9376 responder: FileSetFlagsResponder {
9377 control_handle: std::mem::ManuallyDrop::new(control_handle),
9378 tx_id: header.tx_id,
9379 },
9380 })
9381 }
9382 0x6f344a1c6b0a0610 => {
9383 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9384 let mut req = fidl::new_empty!(
9385 fidl::encoding::EmptyPayload,
9386 fidl::encoding::DefaultFuchsiaResourceDialect
9387 );
9388 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9389 let control_handle = FileControlHandle { inner: this.inner.clone() };
9390 Ok(FileRequest::QueryFilesystem {
9391 responder: FileQueryFilesystemResponder {
9392 control_handle: std::mem::ManuallyDrop::new(control_handle),
9393 tx_id: header.tx_id,
9394 },
9395 })
9396 }
9397 0x3d4396a638ea053b => {
9398 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9399 let mut req = fidl::new_empty!(
9400 NodeGetAttributesRequest,
9401 fidl::encoding::DefaultFuchsiaResourceDialect
9402 );
9403 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9404 let control_handle = FileControlHandle { inner: this.inner.clone() };
9405 Ok(FileRequest::GetAttributes {
9406 query: req.query,
9407
9408 responder: FileGetAttributesResponder {
9409 control_handle: std::mem::ManuallyDrop::new(control_handle),
9410 tx_id: header.tx_id,
9411 },
9412 })
9413 }
9414 0x3308c1da5a89bf08 => {
9415 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9416 let mut req = fidl::new_empty!(
9417 MutableNodeAttributes,
9418 fidl::encoding::DefaultFuchsiaResourceDialect
9419 );
9420 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
9421 let control_handle = FileControlHandle { inner: this.inner.clone() };
9422 Ok(FileRequest::UpdateAttributes {
9423 payload: req,
9424 responder: FileUpdateAttributesResponder {
9425 control_handle: std::mem::ManuallyDrop::new(control_handle),
9426 tx_id: header.tx_id,
9427 },
9428 })
9429 }
9430 0x2c5c27ca0ab5dc49 => {
9431 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9432 let mut req = fidl::new_empty!(
9433 fidl::encoding::EmptyPayload,
9434 fidl::encoding::DefaultFuchsiaResourceDialect
9435 );
9436 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9437 let control_handle = FileControlHandle { inner: this.inner.clone() };
9438 Ok(FileRequest::Sync {
9439 responder: FileSyncResponder {
9440 control_handle: std::mem::ManuallyDrop::new(control_handle),
9441 tx_id: header.tx_id,
9442 },
9443 })
9444 }
9445 0x4b61033de007fcd0 => {
9446 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9447 let mut req = fidl::new_empty!(
9448 NodeListExtendedAttributesRequest,
9449 fidl::encoding::DefaultFuchsiaResourceDialect
9450 );
9451 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9452 let control_handle = FileControlHandle { inner: this.inner.clone() };
9453 Ok(FileRequest::ListExtendedAttributes {
9454 iterator: req.iterator,
9455
9456 control_handle,
9457 })
9458 }
9459 0x45ffa3ccfdeb76db => {
9460 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9461 let mut req = fidl::new_empty!(
9462 NodeGetExtendedAttributeRequest,
9463 fidl::encoding::DefaultFuchsiaResourceDialect
9464 );
9465 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9466 let control_handle = FileControlHandle { inner: this.inner.clone() };
9467 Ok(FileRequest::GetExtendedAttribute {
9468 name: req.name,
9469
9470 responder: FileGetExtendedAttributeResponder {
9471 control_handle: std::mem::ManuallyDrop::new(control_handle),
9472 tx_id: header.tx_id,
9473 },
9474 })
9475 }
9476 0x4a951362f681f23c => {
9477 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9478 let mut req = fidl::new_empty!(
9479 NodeSetExtendedAttributeRequest,
9480 fidl::encoding::DefaultFuchsiaResourceDialect
9481 );
9482 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9483 let control_handle = FileControlHandle { inner: this.inner.clone() };
9484 Ok(FileRequest::SetExtendedAttribute {
9485 name: req.name,
9486 value: req.value,
9487 mode: req.mode,
9488
9489 responder: FileSetExtendedAttributeResponder {
9490 control_handle: std::mem::ManuallyDrop::new(control_handle),
9491 tx_id: header.tx_id,
9492 },
9493 })
9494 }
9495 0x7a0b9f3a9bf9032d => {
9496 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9497 let mut req = fidl::new_empty!(
9498 NodeRemoveExtendedAttributeRequest,
9499 fidl::encoding::DefaultFuchsiaResourceDialect
9500 );
9501 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9502 let control_handle = FileControlHandle { inner: this.inner.clone() };
9503 Ok(FileRequest::RemoveExtendedAttribute {
9504 name: req.name,
9505
9506 responder: FileRemoveExtendedAttributeResponder {
9507 control_handle: std::mem::ManuallyDrop::new(control_handle),
9508 tx_id: header.tx_id,
9509 },
9510 })
9511 }
9512 0x57e419a298c8ede => {
9513 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9514 let mut req = fidl::new_empty!(
9515 ReadableReadRequest,
9516 fidl::encoding::DefaultFuchsiaResourceDialect
9517 );
9518 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
9519 let control_handle = FileControlHandle { inner: this.inner.clone() };
9520 Ok(FileRequest::Read {
9521 count: req.count,
9522
9523 responder: FileReadResponder {
9524 control_handle: std::mem::ManuallyDrop::new(control_handle),
9525 tx_id: header.tx_id,
9526 },
9527 })
9528 }
9529 0x6a31437832469f82 => {
9530 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9531 let mut req = fidl::new_empty!(
9532 WritableWriteRequest,
9533 fidl::encoding::DefaultFuchsiaResourceDialect
9534 );
9535 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
9536 let control_handle = FileControlHandle { inner: this.inner.clone() };
9537 Ok(FileRequest::Write {
9538 data: req.data,
9539
9540 responder: FileWriteResponder {
9541 control_handle: std::mem::ManuallyDrop::new(control_handle),
9542 tx_id: header.tx_id,
9543 },
9544 })
9545 }
9546 0x68b5ac00c62906bc => {
9547 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9548 let mut req = fidl::new_empty!(
9549 fidl::encoding::EmptyPayload,
9550 fidl::encoding::DefaultFuchsiaResourceDialect
9551 );
9552 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9553 let control_handle = FileControlHandle { inner: this.inner.clone() };
9554 Ok(FileRequest::Describe {
9555 responder: FileDescribeResponder {
9556 control_handle: std::mem::ManuallyDrop::new(control_handle),
9557 tx_id: header.tx_id,
9558 },
9559 })
9560 }
9561 0x78079168162c5207 => {
9562 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9563 let mut req = fidl::new_empty!(
9564 FileSeekRequest,
9565 fidl::encoding::DefaultFuchsiaResourceDialect
9566 );
9567 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
9568 let control_handle = FileControlHandle { inner: this.inner.clone() };
9569 Ok(FileRequest::Seek {
9570 origin: req.origin,
9571 offset: req.offset,
9572
9573 responder: FileSeekResponder {
9574 control_handle: std::mem::ManuallyDrop::new(control_handle),
9575 tx_id: header.tx_id,
9576 },
9577 })
9578 }
9579 0x1607a293a60d723e => {
9580 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9581 let mut req = fidl::new_empty!(
9582 FileReadAtRequest,
9583 fidl::encoding::DefaultFuchsiaResourceDialect
9584 );
9585 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
9586 let control_handle = FileControlHandle { inner: this.inner.clone() };
9587 Ok(FileRequest::ReadAt {
9588 count: req.count,
9589 offset: req.offset,
9590
9591 responder: FileReadAtResponder {
9592 control_handle: std::mem::ManuallyDrop::new(control_handle),
9593 tx_id: header.tx_id,
9594 },
9595 })
9596 }
9597 0x793eefc0045e792b => {
9598 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9599 let mut req = fidl::new_empty!(
9600 FileWriteAtRequest,
9601 fidl::encoding::DefaultFuchsiaResourceDialect
9602 );
9603 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
9604 let control_handle = FileControlHandle { inner: this.inner.clone() };
9605 Ok(FileRequest::WriteAt {
9606 data: req.data,
9607 offset: req.offset,
9608
9609 responder: FileWriteAtResponder {
9610 control_handle: std::mem::ManuallyDrop::new(control_handle),
9611 tx_id: header.tx_id,
9612 },
9613 })
9614 }
9615 0x2b80825f0535743a => {
9616 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9617 let mut req = fidl::new_empty!(
9618 FileResizeRequest,
9619 fidl::encoding::DefaultFuchsiaResourceDialect
9620 );
9621 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
9622 let control_handle = FileControlHandle { inner: this.inner.clone() };
9623 Ok(FileRequest::Resize {
9624 length: req.length,
9625
9626 responder: FileResizeResponder {
9627 control_handle: std::mem::ManuallyDrop::new(control_handle),
9628 tx_id: header.tx_id,
9629 },
9630 })
9631 }
9632 0xa6a9e654cbf62b => {
9633 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9634 let mut req = fidl::new_empty!(
9635 FileGetBackingMemoryRequest,
9636 fidl::encoding::DefaultFuchsiaResourceDialect
9637 );
9638 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
9639 let control_handle = FileControlHandle { inner: this.inner.clone() };
9640 Ok(FileRequest::GetBackingMemory {
9641 flags: req.flags,
9642
9643 responder: FileGetBackingMemoryResponder {
9644 control_handle: std::mem::ManuallyDrop::new(control_handle),
9645 tx_id: header.tx_id,
9646 },
9647 })
9648 }
9649 0x77fa0c330b57fd2e => {
9650 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9651 let mut req = fidl::new_empty!(
9652 FileAllocateRequest,
9653 fidl::encoding::DefaultFuchsiaResourceDialect
9654 );
9655 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
9656 let control_handle = FileControlHandle { inner: this.inner.clone() };
9657 Ok(FileRequest::Allocate {
9658 offset: req.offset,
9659 length: req.length,
9660 mode: req.mode,
9661
9662 responder: FileAllocateResponder {
9663 control_handle: std::mem::ManuallyDrop::new(control_handle),
9664 tx_id: header.tx_id,
9665 },
9666 })
9667 }
9668 0x2c421ec3faaeb8bb => {
9669 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9670 let mut req = fidl::new_empty!(
9671 FileEnableVerityRequest,
9672 fidl::encoding::DefaultFuchsiaResourceDialect
9673 );
9674 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
9675 let control_handle = FileControlHandle { inner: this.inner.clone() };
9676 Ok(FileRequest::EnableVerity {
9677 options: req.options,
9678
9679 responder: FileEnableVerityResponder {
9680 control_handle: std::mem::ManuallyDrop::new(control_handle),
9681 tx_id: header.tx_id,
9682 },
9683 })
9684 }
9685 _ if header.tx_id == 0
9686 && header
9687 .dynamic_flags()
9688 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9689 {
9690 Ok(FileRequest::_UnknownMethod {
9691 ordinal: header.ordinal,
9692 control_handle: FileControlHandle { inner: this.inner.clone() },
9693 method_type: fidl::MethodType::OneWay,
9694 })
9695 }
9696 _ if header
9697 .dynamic_flags()
9698 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9699 {
9700 this.inner.send_framework_err(
9701 fidl::encoding::FrameworkErr::UnknownMethod,
9702 header.tx_id,
9703 header.ordinal,
9704 header.dynamic_flags(),
9705 (bytes, handles),
9706 )?;
9707 Ok(FileRequest::_UnknownMethod {
9708 ordinal: header.ordinal,
9709 control_handle: FileControlHandle { inner: this.inner.clone() },
9710 method_type: fidl::MethodType::TwoWay,
9711 })
9712 }
9713 _ => Err(fidl::Error::UnknownOrdinal {
9714 ordinal: header.ordinal,
9715 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9716 }),
9717 }))
9718 },
9719 )
9720 }
9721}
9722
9723#[derive(Debug)]
9728pub enum FileRequest {
9729 AdvisoryLock {
9753 request: AdvisoryLockRequest,
9754 responder: FileAdvisoryLockResponder,
9755 },
9756 LinkInto {
9779 dst_parent_token: fidl::Event,
9780 dst: String,
9781 responder: FileLinkIntoResponder,
9782 },
9783 Clone {
9784 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
9785 control_handle: FileControlHandle,
9786 },
9787 Close {
9798 responder: FileCloseResponder,
9799 },
9800 Query {
9801 responder: FileQueryResponder,
9802 },
9803 DeprecatedClone {
9805 flags: OpenFlags,
9806 object: fidl::endpoints::ServerEnd<NodeMarker>,
9807 control_handle: FileControlHandle,
9808 },
9809 DeprecatedGetAttr {
9811 responder: FileDeprecatedGetAttrResponder,
9812 },
9813 DeprecatedSetAttr {
9815 flags: NodeAttributeFlags,
9816 attributes: NodeAttributes,
9817 responder: FileDeprecatedSetAttrResponder,
9818 },
9819 DeprecatedGetFlags {
9821 responder: FileDeprecatedGetFlagsResponder,
9822 },
9823 DeprecatedSetFlags {
9825 flags: OpenFlags,
9826 responder: FileDeprecatedSetFlagsResponder,
9827 },
9828 GetFlags {
9837 responder: FileGetFlagsResponder,
9838 },
9839 SetFlags {
9849 flags: Flags,
9850 responder: FileSetFlagsResponder,
9851 },
9852 QueryFilesystem {
9854 responder: FileQueryFilesystemResponder,
9855 },
9856 GetAttributes {
9870 query: NodeAttributesQuery,
9871 responder: FileGetAttributesResponder,
9872 },
9873 UpdateAttributes {
9882 payload: MutableNodeAttributes,
9883 responder: FileUpdateAttributesResponder,
9884 },
9885 Sync {
9895 responder: FileSyncResponder,
9896 },
9897 ListExtendedAttributes {
9906 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
9907 control_handle: FileControlHandle,
9908 },
9909 GetExtendedAttribute {
9916 name: Vec<u8>,
9917 responder: FileGetExtendedAttributeResponder,
9918 },
9919 SetExtendedAttribute {
9927 name: Vec<u8>,
9928 value: ExtendedAttributeValue,
9929 mode: SetExtendedAttributeMode,
9930 responder: FileSetExtendedAttributeResponder,
9931 },
9932 RemoveExtendedAttribute {
9938 name: Vec<u8>,
9939 responder: FileRemoveExtendedAttributeResponder,
9940 },
9941 Read {
9960 count: u64,
9961 responder: FileReadResponder,
9962 },
9963 Write {
9987 data: Vec<u8>,
9988 responder: FileWriteResponder,
9989 },
9990 Describe {
9991 responder: FileDescribeResponder,
9992 },
9993 Seek {
10003 origin: SeekOrigin,
10004 offset: i64,
10005 responder: FileSeekResponder,
10006 },
10007 ReadAt {
10025 count: u64,
10026 offset: u64,
10027 responder: FileReadAtResponder,
10028 },
10029 WriteAt {
10051 data: Vec<u8>,
10052 offset: u64,
10053 responder: FileWriteAtResponder,
10054 },
10055 Resize {
10064 length: u64,
10065 responder: FileResizeResponder,
10066 },
10067 GetBackingMemory {
10088 flags: VmoFlags,
10089 responder: FileGetBackingMemoryResponder,
10090 },
10091 Allocate {
10093 offset: u64,
10094 length: u64,
10095 mode: AllocateMode,
10096 responder: FileAllocateResponder,
10097 },
10098 EnableVerity {
10110 options: VerificationOptions,
10111 responder: FileEnableVerityResponder,
10112 },
10113 #[non_exhaustive]
10115 _UnknownMethod {
10116 ordinal: u64,
10118 control_handle: FileControlHandle,
10119 method_type: fidl::MethodType,
10120 },
10121}
10122
10123impl FileRequest {
10124 #[allow(irrefutable_let_patterns)]
10125 pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
10126 if let FileRequest::AdvisoryLock { request, responder } = self {
10127 Some((request, responder))
10128 } else {
10129 None
10130 }
10131 }
10132
10133 #[allow(irrefutable_let_patterns)]
10134 pub fn into_link_into(self) -> Option<(fidl::Event, String, FileLinkIntoResponder)> {
10135 if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
10136 Some((dst_parent_token, dst, responder))
10137 } else {
10138 None
10139 }
10140 }
10141
10142 #[allow(irrefutable_let_patterns)]
10143 pub fn into_clone(
10144 self,
10145 ) -> Option<(
10146 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
10147 FileControlHandle,
10148 )> {
10149 if let FileRequest::Clone { request, control_handle } = self {
10150 Some((request, control_handle))
10151 } else {
10152 None
10153 }
10154 }
10155
10156 #[allow(irrefutable_let_patterns)]
10157 pub fn into_close(self) -> Option<(FileCloseResponder)> {
10158 if let FileRequest::Close { responder } = self { Some((responder)) } else { None }
10159 }
10160
10161 #[allow(irrefutable_let_patterns)]
10162 pub fn into_query(self) -> Option<(FileQueryResponder)> {
10163 if let FileRequest::Query { responder } = self { Some((responder)) } else { None }
10164 }
10165
10166 #[allow(irrefutable_let_patterns)]
10167 pub fn into_deprecated_clone(
10168 self,
10169 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, FileControlHandle)> {
10170 if let FileRequest::DeprecatedClone { flags, object, control_handle } = self {
10171 Some((flags, object, control_handle))
10172 } else {
10173 None
10174 }
10175 }
10176
10177 #[allow(irrefutable_let_patterns)]
10178 pub fn into_deprecated_get_attr(self) -> Option<(FileDeprecatedGetAttrResponder)> {
10179 if let FileRequest::DeprecatedGetAttr { responder } = self {
10180 Some((responder))
10181 } else {
10182 None
10183 }
10184 }
10185
10186 #[allow(irrefutable_let_patterns)]
10187 pub fn into_deprecated_set_attr(
10188 self,
10189 ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
10190 if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
10191 Some((flags, attributes, responder))
10192 } else {
10193 None
10194 }
10195 }
10196
10197 #[allow(irrefutable_let_patterns)]
10198 pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
10199 if let FileRequest::DeprecatedGetFlags { responder } = self {
10200 Some((responder))
10201 } else {
10202 None
10203 }
10204 }
10205
10206 #[allow(irrefutable_let_patterns)]
10207 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
10208 if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
10209 Some((flags, responder))
10210 } else {
10211 None
10212 }
10213 }
10214
10215 #[allow(irrefutable_let_patterns)]
10216 pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
10217 if let FileRequest::GetFlags { responder } = self { Some((responder)) } else { None }
10218 }
10219
10220 #[allow(irrefutable_let_patterns)]
10221 pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
10222 if let FileRequest::SetFlags { flags, responder } = self {
10223 Some((flags, responder))
10224 } else {
10225 None
10226 }
10227 }
10228
10229 #[allow(irrefutable_let_patterns)]
10230 pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
10231 if let FileRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
10232 }
10233
10234 #[allow(irrefutable_let_patterns)]
10235 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
10236 if let FileRequest::GetAttributes { query, responder } = self {
10237 Some((query, responder))
10238 } else {
10239 None
10240 }
10241 }
10242
10243 #[allow(irrefutable_let_patterns)]
10244 pub fn into_update_attributes(
10245 self,
10246 ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
10247 if let FileRequest::UpdateAttributes { payload, responder } = self {
10248 Some((payload, responder))
10249 } else {
10250 None
10251 }
10252 }
10253
10254 #[allow(irrefutable_let_patterns)]
10255 pub fn into_sync(self) -> Option<(FileSyncResponder)> {
10256 if let FileRequest::Sync { responder } = self { Some((responder)) } else { None }
10257 }
10258
10259 #[allow(irrefutable_let_patterns)]
10260 pub fn into_list_extended_attributes(
10261 self,
10262 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
10263 {
10264 if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
10265 Some((iterator, control_handle))
10266 } else {
10267 None
10268 }
10269 }
10270
10271 #[allow(irrefutable_let_patterns)]
10272 pub fn into_get_extended_attribute(
10273 self,
10274 ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
10275 if let FileRequest::GetExtendedAttribute { name, responder } = self {
10276 Some((name, responder))
10277 } else {
10278 None
10279 }
10280 }
10281
10282 #[allow(irrefutable_let_patterns)]
10283 pub fn into_set_extended_attribute(
10284 self,
10285 ) -> Option<(
10286 Vec<u8>,
10287 ExtendedAttributeValue,
10288 SetExtendedAttributeMode,
10289 FileSetExtendedAttributeResponder,
10290 )> {
10291 if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
10292 Some((name, value, mode, responder))
10293 } else {
10294 None
10295 }
10296 }
10297
10298 #[allow(irrefutable_let_patterns)]
10299 pub fn into_remove_extended_attribute(
10300 self,
10301 ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
10302 if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
10303 Some((name, responder))
10304 } else {
10305 None
10306 }
10307 }
10308
10309 #[allow(irrefutable_let_patterns)]
10310 pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
10311 if let FileRequest::Read { count, responder } = self {
10312 Some((count, responder))
10313 } else {
10314 None
10315 }
10316 }
10317
10318 #[allow(irrefutable_let_patterns)]
10319 pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
10320 if let FileRequest::Write { data, responder } = self {
10321 Some((data, responder))
10322 } else {
10323 None
10324 }
10325 }
10326
10327 #[allow(irrefutable_let_patterns)]
10328 pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
10329 if let FileRequest::Describe { responder } = self { Some((responder)) } else { None }
10330 }
10331
10332 #[allow(irrefutable_let_patterns)]
10333 pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
10334 if let FileRequest::Seek { origin, offset, responder } = self {
10335 Some((origin, offset, responder))
10336 } else {
10337 None
10338 }
10339 }
10340
10341 #[allow(irrefutable_let_patterns)]
10342 pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
10343 if let FileRequest::ReadAt { count, offset, responder } = self {
10344 Some((count, offset, responder))
10345 } else {
10346 None
10347 }
10348 }
10349
10350 #[allow(irrefutable_let_patterns)]
10351 pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
10352 if let FileRequest::WriteAt { data, offset, responder } = self {
10353 Some((data, offset, responder))
10354 } else {
10355 None
10356 }
10357 }
10358
10359 #[allow(irrefutable_let_patterns)]
10360 pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
10361 if let FileRequest::Resize { length, responder } = self {
10362 Some((length, responder))
10363 } else {
10364 None
10365 }
10366 }
10367
10368 #[allow(irrefutable_let_patterns)]
10369 pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
10370 if let FileRequest::GetBackingMemory { flags, responder } = self {
10371 Some((flags, responder))
10372 } else {
10373 None
10374 }
10375 }
10376
10377 #[allow(irrefutable_let_patterns)]
10378 pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
10379 if let FileRequest::Allocate { offset, length, mode, responder } = self {
10380 Some((offset, length, mode, responder))
10381 } else {
10382 None
10383 }
10384 }
10385
10386 #[allow(irrefutable_let_patterns)]
10387 pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
10388 if let FileRequest::EnableVerity { options, responder } = self {
10389 Some((options, responder))
10390 } else {
10391 None
10392 }
10393 }
10394
10395 pub fn method_name(&self) -> &'static str {
10397 match *self {
10398 FileRequest::AdvisoryLock { .. } => "advisory_lock",
10399 FileRequest::LinkInto { .. } => "link_into",
10400 FileRequest::Clone { .. } => "clone",
10401 FileRequest::Close { .. } => "close",
10402 FileRequest::Query { .. } => "query",
10403 FileRequest::DeprecatedClone { .. } => "deprecated_clone",
10404 FileRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
10405 FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
10406 FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
10407 FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
10408 FileRequest::GetFlags { .. } => "get_flags",
10409 FileRequest::SetFlags { .. } => "set_flags",
10410 FileRequest::QueryFilesystem { .. } => "query_filesystem",
10411 FileRequest::GetAttributes { .. } => "get_attributes",
10412 FileRequest::UpdateAttributes { .. } => "update_attributes",
10413 FileRequest::Sync { .. } => "sync",
10414 FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
10415 FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
10416 FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
10417 FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
10418 FileRequest::Read { .. } => "read",
10419 FileRequest::Write { .. } => "write",
10420 FileRequest::Describe { .. } => "describe",
10421 FileRequest::Seek { .. } => "seek",
10422 FileRequest::ReadAt { .. } => "read_at",
10423 FileRequest::WriteAt { .. } => "write_at",
10424 FileRequest::Resize { .. } => "resize",
10425 FileRequest::GetBackingMemory { .. } => "get_backing_memory",
10426 FileRequest::Allocate { .. } => "allocate",
10427 FileRequest::EnableVerity { .. } => "enable_verity",
10428 FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
10429 "unknown one-way method"
10430 }
10431 FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
10432 "unknown two-way method"
10433 }
10434 }
10435 }
10436}
10437
10438#[derive(Debug, Clone)]
10439pub struct FileControlHandle {
10440 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10441}
10442
10443impl fidl::endpoints::ControlHandle for FileControlHandle {
10444 fn shutdown(&self) {
10445 self.inner.shutdown()
10446 }
10447
10448 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
10449 self.inner.shutdown_with_epitaph(status)
10450 }
10451
10452 fn is_closed(&self) -> bool {
10453 self.inner.channel().is_closed()
10454 }
10455 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10456 self.inner.channel().on_closed()
10457 }
10458
10459 #[cfg(target_os = "fuchsia")]
10460 fn signal_peer(
10461 &self,
10462 clear_mask: zx::Signals,
10463 set_mask: zx::Signals,
10464 ) -> Result<(), zx_status::Status> {
10465 use fidl::Peered;
10466 self.inner.channel().signal_peer(clear_mask, set_mask)
10467 }
10468}
10469
10470impl FileControlHandle {
10471 pub fn send_on_open_(
10472 &self,
10473 mut s: i32,
10474 mut info: Option<NodeInfoDeprecated>,
10475 ) -> Result<(), fidl::Error> {
10476 self.inner.send::<NodeOnOpenRequest>(
10477 (s, info.as_mut()),
10478 0,
10479 0x7fc7bbb1dbfd1972,
10480 fidl::encoding::DynamicFlags::FLEXIBLE,
10481 )
10482 }
10483
10484 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
10485 self.inner.send::<Representation>(
10486 &mut payload,
10487 0,
10488 0x5cb40567d80a510c,
10489 fidl::encoding::DynamicFlags::empty(),
10490 )
10491 }
10492}
10493
10494#[must_use = "FIDL methods require a response to be sent"]
10495#[derive(Debug)]
10496pub struct FileAdvisoryLockResponder {
10497 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10498 tx_id: u32,
10499}
10500
10501impl std::ops::Drop for FileAdvisoryLockResponder {
10505 fn drop(&mut self) {
10506 self.control_handle.shutdown();
10507 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10509 }
10510}
10511
10512impl fidl::endpoints::Responder for FileAdvisoryLockResponder {
10513 type ControlHandle = FileControlHandle;
10514
10515 fn control_handle(&self) -> &FileControlHandle {
10516 &self.control_handle
10517 }
10518
10519 fn drop_without_shutdown(mut self) {
10520 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10522 std::mem::forget(self);
10524 }
10525}
10526
10527impl FileAdvisoryLockResponder {
10528 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10532 let _result = self.send_raw(result);
10533 if _result.is_err() {
10534 self.control_handle.shutdown();
10535 }
10536 self.drop_without_shutdown();
10537 _result
10538 }
10539
10540 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10542 let _result = self.send_raw(result);
10543 self.drop_without_shutdown();
10544 _result
10545 }
10546
10547 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10548 self.control_handle
10549 .inner
10550 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10551 result,
10552 self.tx_id,
10553 0x6ee9c0ad53ec87aa,
10554 fidl::encoding::DynamicFlags::empty(),
10555 )
10556 }
10557}
10558
10559#[must_use = "FIDL methods require a response to be sent"]
10560#[derive(Debug)]
10561pub struct FileLinkIntoResponder {
10562 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10563 tx_id: u32,
10564}
10565
10566impl std::ops::Drop for FileLinkIntoResponder {
10570 fn drop(&mut self) {
10571 self.control_handle.shutdown();
10572 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10574 }
10575}
10576
10577impl fidl::endpoints::Responder for FileLinkIntoResponder {
10578 type ControlHandle = FileControlHandle;
10579
10580 fn control_handle(&self) -> &FileControlHandle {
10581 &self.control_handle
10582 }
10583
10584 fn drop_without_shutdown(mut self) {
10585 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10587 std::mem::forget(self);
10589 }
10590}
10591
10592impl FileLinkIntoResponder {
10593 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10597 let _result = self.send_raw(result);
10598 if _result.is_err() {
10599 self.control_handle.shutdown();
10600 }
10601 self.drop_without_shutdown();
10602 _result
10603 }
10604
10605 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10607 let _result = self.send_raw(result);
10608 self.drop_without_shutdown();
10609 _result
10610 }
10611
10612 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10613 self.control_handle
10614 .inner
10615 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10616 result,
10617 self.tx_id,
10618 0x54f3949246a03e74,
10619 fidl::encoding::DynamicFlags::empty(),
10620 )
10621 }
10622}
10623
10624#[must_use = "FIDL methods require a response to be sent"]
10625#[derive(Debug)]
10626pub struct FileCloseResponder {
10627 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10628 tx_id: u32,
10629}
10630
10631impl std::ops::Drop for FileCloseResponder {
10635 fn drop(&mut self) {
10636 self.control_handle.shutdown();
10637 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10639 }
10640}
10641
10642impl fidl::endpoints::Responder for FileCloseResponder {
10643 type ControlHandle = FileControlHandle;
10644
10645 fn control_handle(&self) -> &FileControlHandle {
10646 &self.control_handle
10647 }
10648
10649 fn drop_without_shutdown(mut self) {
10650 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10652 std::mem::forget(self);
10654 }
10655}
10656
10657impl FileCloseResponder {
10658 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10662 let _result = self.send_raw(result);
10663 if _result.is_err() {
10664 self.control_handle.shutdown();
10665 }
10666 self.drop_without_shutdown();
10667 _result
10668 }
10669
10670 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10672 let _result = self.send_raw(result);
10673 self.drop_without_shutdown();
10674 _result
10675 }
10676
10677 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10678 self.control_handle
10679 .inner
10680 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10681 result,
10682 self.tx_id,
10683 0x5ac5d459ad7f657e,
10684 fidl::encoding::DynamicFlags::empty(),
10685 )
10686 }
10687}
10688
10689#[must_use = "FIDL methods require a response to be sent"]
10690#[derive(Debug)]
10691pub struct FileQueryResponder {
10692 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10693 tx_id: u32,
10694}
10695
10696impl std::ops::Drop for FileQueryResponder {
10700 fn drop(&mut self) {
10701 self.control_handle.shutdown();
10702 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10704 }
10705}
10706
10707impl fidl::endpoints::Responder for FileQueryResponder {
10708 type ControlHandle = FileControlHandle;
10709
10710 fn control_handle(&self) -> &FileControlHandle {
10711 &self.control_handle
10712 }
10713
10714 fn drop_without_shutdown(mut self) {
10715 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10717 std::mem::forget(self);
10719 }
10720}
10721
10722impl FileQueryResponder {
10723 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10727 let _result = self.send_raw(protocol);
10728 if _result.is_err() {
10729 self.control_handle.shutdown();
10730 }
10731 self.drop_without_shutdown();
10732 _result
10733 }
10734
10735 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10737 let _result = self.send_raw(protocol);
10738 self.drop_without_shutdown();
10739 _result
10740 }
10741
10742 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10743 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
10744 (protocol,),
10745 self.tx_id,
10746 0x2658edee9decfc06,
10747 fidl::encoding::DynamicFlags::empty(),
10748 )
10749 }
10750}
10751
10752#[must_use = "FIDL methods require a response to be sent"]
10753#[derive(Debug)]
10754pub struct FileDeprecatedGetAttrResponder {
10755 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10756 tx_id: u32,
10757}
10758
10759impl std::ops::Drop for FileDeprecatedGetAttrResponder {
10763 fn drop(&mut self) {
10764 self.control_handle.shutdown();
10765 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10767 }
10768}
10769
10770impl fidl::endpoints::Responder for FileDeprecatedGetAttrResponder {
10771 type ControlHandle = FileControlHandle;
10772
10773 fn control_handle(&self) -> &FileControlHandle {
10774 &self.control_handle
10775 }
10776
10777 fn drop_without_shutdown(mut self) {
10778 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10780 std::mem::forget(self);
10782 }
10783}
10784
10785impl FileDeprecatedGetAttrResponder {
10786 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
10790 let _result = self.send_raw(s, attributes);
10791 if _result.is_err() {
10792 self.control_handle.shutdown();
10793 }
10794 self.drop_without_shutdown();
10795 _result
10796 }
10797
10798 pub fn send_no_shutdown_on_err(
10800 self,
10801 mut s: i32,
10802 mut attributes: &NodeAttributes,
10803 ) -> Result<(), fidl::Error> {
10804 let _result = self.send_raw(s, attributes);
10805 self.drop_without_shutdown();
10806 _result
10807 }
10808
10809 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
10810 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
10811 (s, attributes),
10812 self.tx_id,
10813 0x78985e216314dafd,
10814 fidl::encoding::DynamicFlags::empty(),
10815 )
10816 }
10817}
10818
10819#[must_use = "FIDL methods require a response to be sent"]
10820#[derive(Debug)]
10821pub struct FileDeprecatedSetAttrResponder {
10822 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10823 tx_id: u32,
10824}
10825
10826impl std::ops::Drop for FileDeprecatedSetAttrResponder {
10830 fn drop(&mut self) {
10831 self.control_handle.shutdown();
10832 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10834 }
10835}
10836
10837impl fidl::endpoints::Responder for FileDeprecatedSetAttrResponder {
10838 type ControlHandle = FileControlHandle;
10839
10840 fn control_handle(&self) -> &FileControlHandle {
10841 &self.control_handle
10842 }
10843
10844 fn drop_without_shutdown(mut self) {
10845 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10847 std::mem::forget(self);
10849 }
10850}
10851
10852impl FileDeprecatedSetAttrResponder {
10853 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
10857 let _result = self.send_raw(s);
10858 if _result.is_err() {
10859 self.control_handle.shutdown();
10860 }
10861 self.drop_without_shutdown();
10862 _result
10863 }
10864
10865 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
10867 let _result = self.send_raw(s);
10868 self.drop_without_shutdown();
10869 _result
10870 }
10871
10872 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
10873 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
10874 (s,),
10875 self.tx_id,
10876 0x4186c0f40d938f46,
10877 fidl::encoding::DynamicFlags::empty(),
10878 )
10879 }
10880}
10881
10882#[must_use = "FIDL methods require a response to be sent"]
10883#[derive(Debug)]
10884pub struct FileDeprecatedGetFlagsResponder {
10885 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10886 tx_id: u32,
10887}
10888
10889impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
10893 fn drop(&mut self) {
10894 self.control_handle.shutdown();
10895 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10897 }
10898}
10899
10900impl fidl::endpoints::Responder for FileDeprecatedGetFlagsResponder {
10901 type ControlHandle = FileControlHandle;
10902
10903 fn control_handle(&self) -> &FileControlHandle {
10904 &self.control_handle
10905 }
10906
10907 fn drop_without_shutdown(mut self) {
10908 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10910 std::mem::forget(self);
10912 }
10913}
10914
10915impl FileDeprecatedGetFlagsResponder {
10916 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
10920 let _result = self.send_raw(s, flags);
10921 if _result.is_err() {
10922 self.control_handle.shutdown();
10923 }
10924 self.drop_without_shutdown();
10925 _result
10926 }
10927
10928 pub fn send_no_shutdown_on_err(
10930 self,
10931 mut s: i32,
10932 mut flags: OpenFlags,
10933 ) -> Result<(), fidl::Error> {
10934 let _result = self.send_raw(s, flags);
10935 self.drop_without_shutdown();
10936 _result
10937 }
10938
10939 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
10940 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
10941 (s, flags),
10942 self.tx_id,
10943 0x5b88fffb8eda3aa1,
10944 fidl::encoding::DynamicFlags::empty(),
10945 )
10946 }
10947}
10948
10949#[must_use = "FIDL methods require a response to be sent"]
10950#[derive(Debug)]
10951pub struct FileDeprecatedSetFlagsResponder {
10952 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10953 tx_id: u32,
10954}
10955
10956impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
10960 fn drop(&mut self) {
10961 self.control_handle.shutdown();
10962 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10964 }
10965}
10966
10967impl fidl::endpoints::Responder for FileDeprecatedSetFlagsResponder {
10968 type ControlHandle = FileControlHandle;
10969
10970 fn control_handle(&self) -> &FileControlHandle {
10971 &self.control_handle
10972 }
10973
10974 fn drop_without_shutdown(mut self) {
10975 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10977 std::mem::forget(self);
10979 }
10980}
10981
10982impl FileDeprecatedSetFlagsResponder {
10983 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
10987 let _result = self.send_raw(s);
10988 if _result.is_err() {
10989 self.control_handle.shutdown();
10990 }
10991 self.drop_without_shutdown();
10992 _result
10993 }
10994
10995 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
10997 let _result = self.send_raw(s);
10998 self.drop_without_shutdown();
10999 _result
11000 }
11001
11002 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
11003 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
11004 (s,),
11005 self.tx_id,
11006 0x5295b76c71fde733,
11007 fidl::encoding::DynamicFlags::empty(),
11008 )
11009 }
11010}
11011
11012#[must_use = "FIDL methods require a response to be sent"]
11013#[derive(Debug)]
11014pub struct FileGetFlagsResponder {
11015 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11016 tx_id: u32,
11017}
11018
11019impl std::ops::Drop for FileGetFlagsResponder {
11023 fn drop(&mut self) {
11024 self.control_handle.shutdown();
11025 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11027 }
11028}
11029
11030impl fidl::endpoints::Responder for FileGetFlagsResponder {
11031 type ControlHandle = FileControlHandle;
11032
11033 fn control_handle(&self) -> &FileControlHandle {
11034 &self.control_handle
11035 }
11036
11037 fn drop_without_shutdown(mut self) {
11038 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11040 std::mem::forget(self);
11042 }
11043}
11044
11045impl FileGetFlagsResponder {
11046 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11050 let _result = self.send_raw(result);
11051 if _result.is_err() {
11052 self.control_handle.shutdown();
11053 }
11054 self.drop_without_shutdown();
11055 _result
11056 }
11057
11058 pub fn send_no_shutdown_on_err(
11060 self,
11061 mut result: Result<Flags, i32>,
11062 ) -> Result<(), fidl::Error> {
11063 let _result = self.send_raw(result);
11064 self.drop_without_shutdown();
11065 _result
11066 }
11067
11068 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11069 self.control_handle
11070 .inner
11071 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
11072 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
11073 self.tx_id,
11074 0x176eb318f64ec23,
11075 fidl::encoding::DynamicFlags::FLEXIBLE,
11076 )
11077 }
11078}
11079
11080#[must_use = "FIDL methods require a response to be sent"]
11081#[derive(Debug)]
11082pub struct FileSetFlagsResponder {
11083 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11084 tx_id: u32,
11085}
11086
11087impl std::ops::Drop for FileSetFlagsResponder {
11091 fn drop(&mut self) {
11092 self.control_handle.shutdown();
11093 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11095 }
11096}
11097
11098impl fidl::endpoints::Responder for FileSetFlagsResponder {
11099 type ControlHandle = FileControlHandle;
11100
11101 fn control_handle(&self) -> &FileControlHandle {
11102 &self.control_handle
11103 }
11104
11105 fn drop_without_shutdown(mut self) {
11106 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11108 std::mem::forget(self);
11110 }
11111}
11112
11113impl FileSetFlagsResponder {
11114 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11118 let _result = self.send_raw(result);
11119 if _result.is_err() {
11120 self.control_handle.shutdown();
11121 }
11122 self.drop_without_shutdown();
11123 _result
11124 }
11125
11126 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11128 let _result = self.send_raw(result);
11129 self.drop_without_shutdown();
11130 _result
11131 }
11132
11133 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11134 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
11135 fidl::encoding::EmptyStruct,
11136 i32,
11137 >>(
11138 fidl::encoding::FlexibleResult::new(result),
11139 self.tx_id,
11140 0x55a8028685791ea8,
11141 fidl::encoding::DynamicFlags::FLEXIBLE,
11142 )
11143 }
11144}
11145
11146#[must_use = "FIDL methods require a response to be sent"]
11147#[derive(Debug)]
11148pub struct FileQueryFilesystemResponder {
11149 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11150 tx_id: u32,
11151}
11152
11153impl std::ops::Drop for FileQueryFilesystemResponder {
11157 fn drop(&mut self) {
11158 self.control_handle.shutdown();
11159 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11161 }
11162}
11163
11164impl fidl::endpoints::Responder for FileQueryFilesystemResponder {
11165 type ControlHandle = FileControlHandle;
11166
11167 fn control_handle(&self) -> &FileControlHandle {
11168 &self.control_handle
11169 }
11170
11171 fn drop_without_shutdown(mut self) {
11172 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11174 std::mem::forget(self);
11176 }
11177}
11178
11179impl FileQueryFilesystemResponder {
11180 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11184 let _result = self.send_raw(s, info);
11185 if _result.is_err() {
11186 self.control_handle.shutdown();
11187 }
11188 self.drop_without_shutdown();
11189 _result
11190 }
11191
11192 pub fn send_no_shutdown_on_err(
11194 self,
11195 mut s: i32,
11196 mut info: Option<&FilesystemInfo>,
11197 ) -> Result<(), fidl::Error> {
11198 let _result = self.send_raw(s, info);
11199 self.drop_without_shutdown();
11200 _result
11201 }
11202
11203 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11204 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
11205 (s, info),
11206 self.tx_id,
11207 0x6f344a1c6b0a0610,
11208 fidl::encoding::DynamicFlags::empty(),
11209 )
11210 }
11211}
11212
11213#[must_use = "FIDL methods require a response to be sent"]
11214#[derive(Debug)]
11215pub struct FileGetAttributesResponder {
11216 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11217 tx_id: u32,
11218}
11219
11220impl std::ops::Drop for FileGetAttributesResponder {
11224 fn drop(&mut self) {
11225 self.control_handle.shutdown();
11226 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11228 }
11229}
11230
11231impl fidl::endpoints::Responder for FileGetAttributesResponder {
11232 type ControlHandle = FileControlHandle;
11233
11234 fn control_handle(&self) -> &FileControlHandle {
11235 &self.control_handle
11236 }
11237
11238 fn drop_without_shutdown(mut self) {
11239 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11241 std::mem::forget(self);
11243 }
11244}
11245
11246impl FileGetAttributesResponder {
11247 pub fn send(
11251 self,
11252 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11253 ) -> Result<(), fidl::Error> {
11254 let _result = self.send_raw(result);
11255 if _result.is_err() {
11256 self.control_handle.shutdown();
11257 }
11258 self.drop_without_shutdown();
11259 _result
11260 }
11261
11262 pub fn send_no_shutdown_on_err(
11264 self,
11265 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11266 ) -> Result<(), fidl::Error> {
11267 let _result = self.send_raw(result);
11268 self.drop_without_shutdown();
11269 _result
11270 }
11271
11272 fn send_raw(
11273 &self,
11274 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11275 ) -> Result<(), fidl::Error> {
11276 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
11277 result,
11278 self.tx_id,
11279 0x3d4396a638ea053b,
11280 fidl::encoding::DynamicFlags::empty(),
11281 )
11282 }
11283}
11284
11285#[must_use = "FIDL methods require a response to be sent"]
11286#[derive(Debug)]
11287pub struct FileUpdateAttributesResponder {
11288 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11289 tx_id: u32,
11290}
11291
11292impl std::ops::Drop for FileUpdateAttributesResponder {
11296 fn drop(&mut self) {
11297 self.control_handle.shutdown();
11298 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11300 }
11301}
11302
11303impl fidl::endpoints::Responder for FileUpdateAttributesResponder {
11304 type ControlHandle = FileControlHandle;
11305
11306 fn control_handle(&self) -> &FileControlHandle {
11307 &self.control_handle
11308 }
11309
11310 fn drop_without_shutdown(mut self) {
11311 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11313 std::mem::forget(self);
11315 }
11316}
11317
11318impl FileUpdateAttributesResponder {
11319 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11323 let _result = self.send_raw(result);
11324 if _result.is_err() {
11325 self.control_handle.shutdown();
11326 }
11327 self.drop_without_shutdown();
11328 _result
11329 }
11330
11331 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11333 let _result = self.send_raw(result);
11334 self.drop_without_shutdown();
11335 _result
11336 }
11337
11338 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11339 self.control_handle
11340 .inner
11341 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11342 result,
11343 self.tx_id,
11344 0x3308c1da5a89bf08,
11345 fidl::encoding::DynamicFlags::empty(),
11346 )
11347 }
11348}
11349
11350#[must_use = "FIDL methods require a response to be sent"]
11351#[derive(Debug)]
11352pub struct FileSyncResponder {
11353 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11354 tx_id: u32,
11355}
11356
11357impl std::ops::Drop for FileSyncResponder {
11361 fn drop(&mut self) {
11362 self.control_handle.shutdown();
11363 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11365 }
11366}
11367
11368impl fidl::endpoints::Responder for FileSyncResponder {
11369 type ControlHandle = FileControlHandle;
11370
11371 fn control_handle(&self) -> &FileControlHandle {
11372 &self.control_handle
11373 }
11374
11375 fn drop_without_shutdown(mut self) {
11376 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11378 std::mem::forget(self);
11380 }
11381}
11382
11383impl FileSyncResponder {
11384 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11388 let _result = self.send_raw(result);
11389 if _result.is_err() {
11390 self.control_handle.shutdown();
11391 }
11392 self.drop_without_shutdown();
11393 _result
11394 }
11395
11396 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11398 let _result = self.send_raw(result);
11399 self.drop_without_shutdown();
11400 _result
11401 }
11402
11403 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11404 self.control_handle
11405 .inner
11406 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11407 result,
11408 self.tx_id,
11409 0x2c5c27ca0ab5dc49,
11410 fidl::encoding::DynamicFlags::empty(),
11411 )
11412 }
11413}
11414
11415#[must_use = "FIDL methods require a response to be sent"]
11416#[derive(Debug)]
11417pub struct FileGetExtendedAttributeResponder {
11418 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11419 tx_id: u32,
11420}
11421
11422impl std::ops::Drop for FileGetExtendedAttributeResponder {
11426 fn drop(&mut self) {
11427 self.control_handle.shutdown();
11428 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11430 }
11431}
11432
11433impl fidl::endpoints::Responder for FileGetExtendedAttributeResponder {
11434 type ControlHandle = FileControlHandle;
11435
11436 fn control_handle(&self) -> &FileControlHandle {
11437 &self.control_handle
11438 }
11439
11440 fn drop_without_shutdown(mut self) {
11441 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11443 std::mem::forget(self);
11445 }
11446}
11447
11448impl FileGetExtendedAttributeResponder {
11449 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11453 let _result = self.send_raw(result);
11454 if _result.is_err() {
11455 self.control_handle.shutdown();
11456 }
11457 self.drop_without_shutdown();
11458 _result
11459 }
11460
11461 pub fn send_no_shutdown_on_err(
11463 self,
11464 mut result: Result<ExtendedAttributeValue, i32>,
11465 ) -> Result<(), fidl::Error> {
11466 let _result = self.send_raw(result);
11467 self.drop_without_shutdown();
11468 _result
11469 }
11470
11471 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11472 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
11473 result.as_mut().map_err(|e| *e),
11474 self.tx_id,
11475 0x45ffa3ccfdeb76db,
11476 fidl::encoding::DynamicFlags::empty(),
11477 )
11478 }
11479}
11480
11481#[must_use = "FIDL methods require a response to be sent"]
11482#[derive(Debug)]
11483pub struct FileSetExtendedAttributeResponder {
11484 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11485 tx_id: u32,
11486}
11487
11488impl std::ops::Drop for FileSetExtendedAttributeResponder {
11492 fn drop(&mut self) {
11493 self.control_handle.shutdown();
11494 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11496 }
11497}
11498
11499impl fidl::endpoints::Responder for FileSetExtendedAttributeResponder {
11500 type ControlHandle = FileControlHandle;
11501
11502 fn control_handle(&self) -> &FileControlHandle {
11503 &self.control_handle
11504 }
11505
11506 fn drop_without_shutdown(mut self) {
11507 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11509 std::mem::forget(self);
11511 }
11512}
11513
11514impl FileSetExtendedAttributeResponder {
11515 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11519 let _result = self.send_raw(result);
11520 if _result.is_err() {
11521 self.control_handle.shutdown();
11522 }
11523 self.drop_without_shutdown();
11524 _result
11525 }
11526
11527 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11529 let _result = self.send_raw(result);
11530 self.drop_without_shutdown();
11531 _result
11532 }
11533
11534 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11535 self.control_handle
11536 .inner
11537 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11538 result,
11539 self.tx_id,
11540 0x4a951362f681f23c,
11541 fidl::encoding::DynamicFlags::empty(),
11542 )
11543 }
11544}
11545
11546#[must_use = "FIDL methods require a response to be sent"]
11547#[derive(Debug)]
11548pub struct FileRemoveExtendedAttributeResponder {
11549 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11550 tx_id: u32,
11551}
11552
11553impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
11557 fn drop(&mut self) {
11558 self.control_handle.shutdown();
11559 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11561 }
11562}
11563
11564impl fidl::endpoints::Responder for FileRemoveExtendedAttributeResponder {
11565 type ControlHandle = FileControlHandle;
11566
11567 fn control_handle(&self) -> &FileControlHandle {
11568 &self.control_handle
11569 }
11570
11571 fn drop_without_shutdown(mut self) {
11572 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11574 std::mem::forget(self);
11576 }
11577}
11578
11579impl FileRemoveExtendedAttributeResponder {
11580 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11584 let _result = self.send_raw(result);
11585 if _result.is_err() {
11586 self.control_handle.shutdown();
11587 }
11588 self.drop_without_shutdown();
11589 _result
11590 }
11591
11592 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11594 let _result = self.send_raw(result);
11595 self.drop_without_shutdown();
11596 _result
11597 }
11598
11599 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11600 self.control_handle
11601 .inner
11602 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11603 result,
11604 self.tx_id,
11605 0x7a0b9f3a9bf9032d,
11606 fidl::encoding::DynamicFlags::empty(),
11607 )
11608 }
11609}
11610
11611#[must_use = "FIDL methods require a response to be sent"]
11612#[derive(Debug)]
11613pub struct FileReadResponder {
11614 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11615 tx_id: u32,
11616}
11617
11618impl std::ops::Drop for FileReadResponder {
11622 fn drop(&mut self) {
11623 self.control_handle.shutdown();
11624 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11626 }
11627}
11628
11629impl fidl::endpoints::Responder for FileReadResponder {
11630 type ControlHandle = FileControlHandle;
11631
11632 fn control_handle(&self) -> &FileControlHandle {
11633 &self.control_handle
11634 }
11635
11636 fn drop_without_shutdown(mut self) {
11637 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11639 std::mem::forget(self);
11641 }
11642}
11643
11644impl FileReadResponder {
11645 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11649 let _result = self.send_raw(result);
11650 if _result.is_err() {
11651 self.control_handle.shutdown();
11652 }
11653 self.drop_without_shutdown();
11654 _result
11655 }
11656
11657 pub fn send_no_shutdown_on_err(
11659 self,
11660 mut result: Result<&[u8], i32>,
11661 ) -> Result<(), fidl::Error> {
11662 let _result = self.send_raw(result);
11663 self.drop_without_shutdown();
11664 _result
11665 }
11666
11667 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11668 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
11669 result.map(|data| (data,)),
11670 self.tx_id,
11671 0x57e419a298c8ede,
11672 fidl::encoding::DynamicFlags::empty(),
11673 )
11674 }
11675}
11676
11677#[must_use = "FIDL methods require a response to be sent"]
11678#[derive(Debug)]
11679pub struct FileWriteResponder {
11680 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11681 tx_id: u32,
11682}
11683
11684impl std::ops::Drop for FileWriteResponder {
11688 fn drop(&mut self) {
11689 self.control_handle.shutdown();
11690 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11692 }
11693}
11694
11695impl fidl::endpoints::Responder for FileWriteResponder {
11696 type ControlHandle = FileControlHandle;
11697
11698 fn control_handle(&self) -> &FileControlHandle {
11699 &self.control_handle
11700 }
11701
11702 fn drop_without_shutdown(mut self) {
11703 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11705 std::mem::forget(self);
11707 }
11708}
11709
11710impl FileWriteResponder {
11711 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11715 let _result = self.send_raw(result);
11716 if _result.is_err() {
11717 self.control_handle.shutdown();
11718 }
11719 self.drop_without_shutdown();
11720 _result
11721 }
11722
11723 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11725 let _result = self.send_raw(result);
11726 self.drop_without_shutdown();
11727 _result
11728 }
11729
11730 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11731 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
11732 result.map(|actual_count| (actual_count,)),
11733 self.tx_id,
11734 0x6a31437832469f82,
11735 fidl::encoding::DynamicFlags::empty(),
11736 )
11737 }
11738}
11739
11740#[must_use = "FIDL methods require a response to be sent"]
11741#[derive(Debug)]
11742pub struct FileDescribeResponder {
11743 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11744 tx_id: u32,
11745}
11746
11747impl std::ops::Drop for FileDescribeResponder {
11751 fn drop(&mut self) {
11752 self.control_handle.shutdown();
11753 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11755 }
11756}
11757
11758impl fidl::endpoints::Responder for FileDescribeResponder {
11759 type ControlHandle = FileControlHandle;
11760
11761 fn control_handle(&self) -> &FileControlHandle {
11762 &self.control_handle
11763 }
11764
11765 fn drop_without_shutdown(mut self) {
11766 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11768 std::mem::forget(self);
11770 }
11771}
11772
11773impl FileDescribeResponder {
11774 pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11778 let _result = self.send_raw(payload);
11779 if _result.is_err() {
11780 self.control_handle.shutdown();
11781 }
11782 self.drop_without_shutdown();
11783 _result
11784 }
11785
11786 pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11788 let _result = self.send_raw(payload);
11789 self.drop_without_shutdown();
11790 _result
11791 }
11792
11793 fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11794 self.control_handle.inner.send::<FileInfo>(
11795 &mut payload,
11796 self.tx_id,
11797 0x68b5ac00c62906bc,
11798 fidl::encoding::DynamicFlags::empty(),
11799 )
11800 }
11801}
11802
11803#[must_use = "FIDL methods require a response to be sent"]
11804#[derive(Debug)]
11805pub struct FileSeekResponder {
11806 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11807 tx_id: u32,
11808}
11809
11810impl std::ops::Drop for FileSeekResponder {
11814 fn drop(&mut self) {
11815 self.control_handle.shutdown();
11816 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11818 }
11819}
11820
11821impl fidl::endpoints::Responder for FileSeekResponder {
11822 type ControlHandle = FileControlHandle;
11823
11824 fn control_handle(&self) -> &FileControlHandle {
11825 &self.control_handle
11826 }
11827
11828 fn drop_without_shutdown(mut self) {
11829 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11831 std::mem::forget(self);
11833 }
11834}
11835
11836impl FileSeekResponder {
11837 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11841 let _result = self.send_raw(result);
11842 if _result.is_err() {
11843 self.control_handle.shutdown();
11844 }
11845 self.drop_without_shutdown();
11846 _result
11847 }
11848
11849 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11851 let _result = self.send_raw(result);
11852 self.drop_without_shutdown();
11853 _result
11854 }
11855
11856 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11857 self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
11858 result.map(|offset_from_start| (offset_from_start,)),
11859 self.tx_id,
11860 0x78079168162c5207,
11861 fidl::encoding::DynamicFlags::empty(),
11862 )
11863 }
11864}
11865
11866#[must_use = "FIDL methods require a response to be sent"]
11867#[derive(Debug)]
11868pub struct FileReadAtResponder {
11869 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11870 tx_id: u32,
11871}
11872
11873impl std::ops::Drop for FileReadAtResponder {
11877 fn drop(&mut self) {
11878 self.control_handle.shutdown();
11879 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11881 }
11882}
11883
11884impl fidl::endpoints::Responder for FileReadAtResponder {
11885 type ControlHandle = FileControlHandle;
11886
11887 fn control_handle(&self) -> &FileControlHandle {
11888 &self.control_handle
11889 }
11890
11891 fn drop_without_shutdown(mut self) {
11892 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11894 std::mem::forget(self);
11896 }
11897}
11898
11899impl FileReadAtResponder {
11900 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11904 let _result = self.send_raw(result);
11905 if _result.is_err() {
11906 self.control_handle.shutdown();
11907 }
11908 self.drop_without_shutdown();
11909 _result
11910 }
11911
11912 pub fn send_no_shutdown_on_err(
11914 self,
11915 mut result: Result<&[u8], i32>,
11916 ) -> Result<(), fidl::Error> {
11917 let _result = self.send_raw(result);
11918 self.drop_without_shutdown();
11919 _result
11920 }
11921
11922 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11923 self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
11924 result.map(|data| (data,)),
11925 self.tx_id,
11926 0x1607a293a60d723e,
11927 fidl::encoding::DynamicFlags::empty(),
11928 )
11929 }
11930}
11931
11932#[must_use = "FIDL methods require a response to be sent"]
11933#[derive(Debug)]
11934pub struct FileWriteAtResponder {
11935 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11936 tx_id: u32,
11937}
11938
11939impl std::ops::Drop for FileWriteAtResponder {
11943 fn drop(&mut self) {
11944 self.control_handle.shutdown();
11945 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11947 }
11948}
11949
11950impl fidl::endpoints::Responder for FileWriteAtResponder {
11951 type ControlHandle = FileControlHandle;
11952
11953 fn control_handle(&self) -> &FileControlHandle {
11954 &self.control_handle
11955 }
11956
11957 fn drop_without_shutdown(mut self) {
11958 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11960 std::mem::forget(self);
11962 }
11963}
11964
11965impl FileWriteAtResponder {
11966 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11970 let _result = self.send_raw(result);
11971 if _result.is_err() {
11972 self.control_handle.shutdown();
11973 }
11974 self.drop_without_shutdown();
11975 _result
11976 }
11977
11978 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11980 let _result = self.send_raw(result);
11981 self.drop_without_shutdown();
11982 _result
11983 }
11984
11985 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11986 self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
11987 result.map(|actual_count| (actual_count,)),
11988 self.tx_id,
11989 0x793eefc0045e792b,
11990 fidl::encoding::DynamicFlags::empty(),
11991 )
11992 }
11993}
11994
11995#[must_use = "FIDL methods require a response to be sent"]
11996#[derive(Debug)]
11997pub struct FileResizeResponder {
11998 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11999 tx_id: u32,
12000}
12001
12002impl std::ops::Drop for FileResizeResponder {
12006 fn drop(&mut self) {
12007 self.control_handle.shutdown();
12008 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12010 }
12011}
12012
12013impl fidl::endpoints::Responder for FileResizeResponder {
12014 type ControlHandle = FileControlHandle;
12015
12016 fn control_handle(&self) -> &FileControlHandle {
12017 &self.control_handle
12018 }
12019
12020 fn drop_without_shutdown(mut self) {
12021 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12023 std::mem::forget(self);
12025 }
12026}
12027
12028impl FileResizeResponder {
12029 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12033 let _result = self.send_raw(result);
12034 if _result.is_err() {
12035 self.control_handle.shutdown();
12036 }
12037 self.drop_without_shutdown();
12038 _result
12039 }
12040
12041 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12043 let _result = self.send_raw(result);
12044 self.drop_without_shutdown();
12045 _result
12046 }
12047
12048 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12049 self.control_handle
12050 .inner
12051 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12052 result,
12053 self.tx_id,
12054 0x2b80825f0535743a,
12055 fidl::encoding::DynamicFlags::empty(),
12056 )
12057 }
12058}
12059
12060#[must_use = "FIDL methods require a response to be sent"]
12061#[derive(Debug)]
12062pub struct FileGetBackingMemoryResponder {
12063 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12064 tx_id: u32,
12065}
12066
12067impl std::ops::Drop for FileGetBackingMemoryResponder {
12071 fn drop(&mut self) {
12072 self.control_handle.shutdown();
12073 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12075 }
12076}
12077
12078impl fidl::endpoints::Responder for FileGetBackingMemoryResponder {
12079 type ControlHandle = FileControlHandle;
12080
12081 fn control_handle(&self) -> &FileControlHandle {
12082 &self.control_handle
12083 }
12084
12085 fn drop_without_shutdown(mut self) {
12086 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12088 std::mem::forget(self);
12090 }
12091}
12092
12093impl FileGetBackingMemoryResponder {
12094 pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12098 let _result = self.send_raw(result);
12099 if _result.is_err() {
12100 self.control_handle.shutdown();
12101 }
12102 self.drop_without_shutdown();
12103 _result
12104 }
12105
12106 pub fn send_no_shutdown_on_err(
12108 self,
12109 mut result: Result<fidl::Vmo, i32>,
12110 ) -> Result<(), fidl::Error> {
12111 let _result = self.send_raw(result);
12112 self.drop_without_shutdown();
12113 _result
12114 }
12115
12116 fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12117 self.control_handle
12118 .inner
12119 .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
12120 result.map(|vmo| (vmo,)),
12121 self.tx_id,
12122 0xa6a9e654cbf62b,
12123 fidl::encoding::DynamicFlags::empty(),
12124 )
12125 }
12126}
12127
12128#[must_use = "FIDL methods require a response to be sent"]
12129#[derive(Debug)]
12130pub struct FileAllocateResponder {
12131 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12132 tx_id: u32,
12133}
12134
12135impl std::ops::Drop for FileAllocateResponder {
12139 fn drop(&mut self) {
12140 self.control_handle.shutdown();
12141 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12143 }
12144}
12145
12146impl fidl::endpoints::Responder for FileAllocateResponder {
12147 type ControlHandle = FileControlHandle;
12148
12149 fn control_handle(&self) -> &FileControlHandle {
12150 &self.control_handle
12151 }
12152
12153 fn drop_without_shutdown(mut self) {
12154 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12156 std::mem::forget(self);
12158 }
12159}
12160
12161impl FileAllocateResponder {
12162 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12166 let _result = self.send_raw(result);
12167 if _result.is_err() {
12168 self.control_handle.shutdown();
12169 }
12170 self.drop_without_shutdown();
12171 _result
12172 }
12173
12174 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12176 let _result = self.send_raw(result);
12177 self.drop_without_shutdown();
12178 _result
12179 }
12180
12181 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12182 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12183 fidl::encoding::EmptyStruct,
12184 i32,
12185 >>(
12186 fidl::encoding::FlexibleResult::new(result),
12187 self.tx_id,
12188 0x77fa0c330b57fd2e,
12189 fidl::encoding::DynamicFlags::FLEXIBLE,
12190 )
12191 }
12192}
12193
12194#[must_use = "FIDL methods require a response to be sent"]
12195#[derive(Debug)]
12196pub struct FileEnableVerityResponder {
12197 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12198 tx_id: u32,
12199}
12200
12201impl std::ops::Drop for FileEnableVerityResponder {
12205 fn drop(&mut self) {
12206 self.control_handle.shutdown();
12207 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12209 }
12210}
12211
12212impl fidl::endpoints::Responder for FileEnableVerityResponder {
12213 type ControlHandle = FileControlHandle;
12214
12215 fn control_handle(&self) -> &FileControlHandle {
12216 &self.control_handle
12217 }
12218
12219 fn drop_without_shutdown(mut self) {
12220 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12222 std::mem::forget(self);
12224 }
12225}
12226
12227impl FileEnableVerityResponder {
12228 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12232 let _result = self.send_raw(result);
12233 if _result.is_err() {
12234 self.control_handle.shutdown();
12235 }
12236 self.drop_without_shutdown();
12237 _result
12238 }
12239
12240 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12242 let _result = self.send_raw(result);
12243 self.drop_without_shutdown();
12244 _result
12245 }
12246
12247 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12248 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12249 fidl::encoding::EmptyStruct,
12250 i32,
12251 >>(
12252 fidl::encoding::FlexibleResult::new(result),
12253 self.tx_id,
12254 0x2c421ec3faaeb8bb,
12255 fidl::encoding::DynamicFlags::FLEXIBLE,
12256 )
12257 }
12258}
12259
12260#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
12261pub struct LinkableMarker;
12262
12263impl fidl::endpoints::ProtocolMarker for LinkableMarker {
12264 type Proxy = LinkableProxy;
12265 type RequestStream = LinkableRequestStream;
12266 #[cfg(target_os = "fuchsia")]
12267 type SynchronousProxy = LinkableSynchronousProxy;
12268
12269 const DEBUG_NAME: &'static str = "(anonymous) Linkable";
12270}
12271pub type LinkableLinkIntoResult = Result<(), i32>;
12272
12273pub trait LinkableProxyInterface: Send + Sync {
12274 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
12275 + Send;
12276 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
12277}
12278#[derive(Debug)]
12279#[cfg(target_os = "fuchsia")]
12280pub struct LinkableSynchronousProxy {
12281 client: fidl::client::sync::Client,
12282}
12283
12284#[cfg(target_os = "fuchsia")]
12285impl fidl::endpoints::SynchronousProxy for LinkableSynchronousProxy {
12286 type Proxy = LinkableProxy;
12287 type Protocol = LinkableMarker;
12288
12289 fn from_channel(inner: fidl::Channel) -> Self {
12290 Self::new(inner)
12291 }
12292
12293 fn into_channel(self) -> fidl::Channel {
12294 self.client.into_channel()
12295 }
12296
12297 fn as_channel(&self) -> &fidl::Channel {
12298 self.client.as_channel()
12299 }
12300}
12301
12302#[cfg(target_os = "fuchsia")]
12303impl LinkableSynchronousProxy {
12304 pub fn new(channel: fidl::Channel) -> Self {
12305 let protocol_name = <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12306 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
12307 }
12308
12309 pub fn into_channel(self) -> fidl::Channel {
12310 self.client.into_channel()
12311 }
12312
12313 pub fn wait_for_event(
12316 &self,
12317 deadline: zx::MonotonicInstant,
12318 ) -> Result<LinkableEvent, fidl::Error> {
12319 LinkableEvent::decode(self.client.wait_for_event(deadline)?)
12320 }
12321
12322 pub fn r#link_into(
12345 &self,
12346 mut dst_parent_token: fidl::Event,
12347 mut dst: &str,
12348 ___deadline: zx::MonotonicInstant,
12349 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12350 let _response = self.client.send_query::<
12351 LinkableLinkIntoRequest,
12352 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12353 >(
12354 (dst_parent_token, dst,),
12355 0x54f3949246a03e74,
12356 fidl::encoding::DynamicFlags::empty(),
12357 ___deadline,
12358 )?;
12359 Ok(_response.map(|x| x))
12360 }
12361}
12362
12363#[cfg(target_os = "fuchsia")]
12364impl From<LinkableSynchronousProxy> for zx::NullableHandle {
12365 fn from(value: LinkableSynchronousProxy) -> Self {
12366 value.into_channel().into()
12367 }
12368}
12369
12370#[cfg(target_os = "fuchsia")]
12371impl From<fidl::Channel> for LinkableSynchronousProxy {
12372 fn from(value: fidl::Channel) -> Self {
12373 Self::new(value)
12374 }
12375}
12376
12377#[cfg(target_os = "fuchsia")]
12378impl fidl::endpoints::FromClient for LinkableSynchronousProxy {
12379 type Protocol = LinkableMarker;
12380
12381 fn from_client(value: fidl::endpoints::ClientEnd<LinkableMarker>) -> Self {
12382 Self::new(value.into_channel())
12383 }
12384}
12385
12386#[derive(Debug, Clone)]
12387pub struct LinkableProxy {
12388 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
12389}
12390
12391impl fidl::endpoints::Proxy for LinkableProxy {
12392 type Protocol = LinkableMarker;
12393
12394 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
12395 Self::new(inner)
12396 }
12397
12398 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
12399 self.client.into_channel().map_err(|client| Self { client })
12400 }
12401
12402 fn as_channel(&self) -> &::fidl::AsyncChannel {
12403 self.client.as_channel()
12404 }
12405}
12406
12407impl LinkableProxy {
12408 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
12410 let protocol_name = <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12411 Self { client: fidl::client::Client::new(channel, protocol_name) }
12412 }
12413
12414 pub fn take_event_stream(&self) -> LinkableEventStream {
12420 LinkableEventStream { event_receiver: self.client.take_event_receiver() }
12421 }
12422
12423 pub fn r#link_into(
12446 &self,
12447 mut dst_parent_token: fidl::Event,
12448 mut dst: &str,
12449 ) -> fidl::client::QueryResponseFut<
12450 LinkableLinkIntoResult,
12451 fidl::encoding::DefaultFuchsiaResourceDialect,
12452 > {
12453 LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
12454 }
12455}
12456
12457impl LinkableProxyInterface for LinkableProxy {
12458 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
12459 LinkableLinkIntoResult,
12460 fidl::encoding::DefaultFuchsiaResourceDialect,
12461 >;
12462 fn r#link_into(
12463 &self,
12464 mut dst_parent_token: fidl::Event,
12465 mut dst: &str,
12466 ) -> Self::LinkIntoResponseFut {
12467 fn _decode(
12468 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
12469 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12470 let _response = fidl::client::decode_transaction_body::<
12471 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12472 fidl::encoding::DefaultFuchsiaResourceDialect,
12473 0x54f3949246a03e74,
12474 >(_buf?)?;
12475 Ok(_response.map(|x| x))
12476 }
12477 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
12478 (dst_parent_token, dst),
12479 0x54f3949246a03e74,
12480 fidl::encoding::DynamicFlags::empty(),
12481 _decode,
12482 )
12483 }
12484}
12485
12486pub struct LinkableEventStream {
12487 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
12488}
12489
12490impl std::marker::Unpin for LinkableEventStream {}
12491
12492impl futures::stream::FusedStream for LinkableEventStream {
12493 fn is_terminated(&self) -> bool {
12494 self.event_receiver.is_terminated()
12495 }
12496}
12497
12498impl futures::Stream for LinkableEventStream {
12499 type Item = Result<LinkableEvent, fidl::Error>;
12500
12501 fn poll_next(
12502 mut self: std::pin::Pin<&mut Self>,
12503 cx: &mut std::task::Context<'_>,
12504 ) -> std::task::Poll<Option<Self::Item>> {
12505 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
12506 &mut self.event_receiver,
12507 cx
12508 )?) {
12509 Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
12510 None => std::task::Poll::Ready(None),
12511 }
12512 }
12513}
12514
12515#[derive(Debug)]
12516pub enum LinkableEvent {}
12517
12518impl LinkableEvent {
12519 fn decode(
12521 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
12522 ) -> Result<LinkableEvent, fidl::Error> {
12523 let (bytes, _handles) = buf.split_mut();
12524 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12525 debug_assert_eq!(tx_header.tx_id, 0);
12526 match tx_header.ordinal {
12527 _ => Err(fidl::Error::UnknownOrdinal {
12528 ordinal: tx_header.ordinal,
12529 protocol_name: <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12530 }),
12531 }
12532 }
12533}
12534
12535pub struct LinkableRequestStream {
12537 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12538 is_terminated: bool,
12539}
12540
12541impl std::marker::Unpin for LinkableRequestStream {}
12542
12543impl futures::stream::FusedStream for LinkableRequestStream {
12544 fn is_terminated(&self) -> bool {
12545 self.is_terminated
12546 }
12547}
12548
12549impl fidl::endpoints::RequestStream for LinkableRequestStream {
12550 type Protocol = LinkableMarker;
12551 type ControlHandle = LinkableControlHandle;
12552
12553 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
12554 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
12555 }
12556
12557 fn control_handle(&self) -> Self::ControlHandle {
12558 LinkableControlHandle { inner: self.inner.clone() }
12559 }
12560
12561 fn into_inner(
12562 self,
12563 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
12564 {
12565 (self.inner, self.is_terminated)
12566 }
12567
12568 fn from_inner(
12569 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12570 is_terminated: bool,
12571 ) -> Self {
12572 Self { inner, is_terminated }
12573 }
12574}
12575
12576impl futures::Stream for LinkableRequestStream {
12577 type Item = Result<LinkableRequest, fidl::Error>;
12578
12579 fn poll_next(
12580 mut self: std::pin::Pin<&mut Self>,
12581 cx: &mut std::task::Context<'_>,
12582 ) -> std::task::Poll<Option<Self::Item>> {
12583 let this = &mut *self;
12584 if this.inner.check_shutdown(cx) {
12585 this.is_terminated = true;
12586 return std::task::Poll::Ready(None);
12587 }
12588 if this.is_terminated {
12589 panic!("polled LinkableRequestStream after completion");
12590 }
12591 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
12592 |bytes, handles| {
12593 match this.inner.channel().read_etc(cx, bytes, handles) {
12594 std::task::Poll::Ready(Ok(())) => {}
12595 std::task::Poll::Pending => return std::task::Poll::Pending,
12596 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
12597 this.is_terminated = true;
12598 return std::task::Poll::Ready(None);
12599 }
12600 std::task::Poll::Ready(Err(e)) => {
12601 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
12602 e.into(),
12603 ))));
12604 }
12605 }
12606
12607 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12609
12610 std::task::Poll::Ready(Some(match header.ordinal {
12611 0x54f3949246a03e74 => {
12612 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12613 let mut req = fidl::new_empty!(
12614 LinkableLinkIntoRequest,
12615 fidl::encoding::DefaultFuchsiaResourceDialect
12616 );
12617 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
12618 let control_handle = LinkableControlHandle { inner: this.inner.clone() };
12619 Ok(LinkableRequest::LinkInto {
12620 dst_parent_token: req.dst_parent_token,
12621 dst: req.dst,
12622
12623 responder: LinkableLinkIntoResponder {
12624 control_handle: std::mem::ManuallyDrop::new(control_handle),
12625 tx_id: header.tx_id,
12626 },
12627 })
12628 }
12629 _ => Err(fidl::Error::UnknownOrdinal {
12630 ordinal: header.ordinal,
12631 protocol_name:
12632 <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12633 }),
12634 }))
12635 },
12636 )
12637 }
12638}
12639
12640#[derive(Debug)]
12641pub enum LinkableRequest {
12642 LinkInto { dst_parent_token: fidl::Event, dst: String, responder: LinkableLinkIntoResponder },
12665}
12666
12667impl LinkableRequest {
12668 #[allow(irrefutable_let_patterns)]
12669 pub fn into_link_into(self) -> Option<(fidl::Event, String, LinkableLinkIntoResponder)> {
12670 if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
12671 Some((dst_parent_token, dst, responder))
12672 } else {
12673 None
12674 }
12675 }
12676
12677 pub fn method_name(&self) -> &'static str {
12679 match *self {
12680 LinkableRequest::LinkInto { .. } => "link_into",
12681 }
12682 }
12683}
12684
12685#[derive(Debug, Clone)]
12686pub struct LinkableControlHandle {
12687 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12688}
12689
12690impl fidl::endpoints::ControlHandle for LinkableControlHandle {
12691 fn shutdown(&self) {
12692 self.inner.shutdown()
12693 }
12694
12695 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
12696 self.inner.shutdown_with_epitaph(status)
12697 }
12698
12699 fn is_closed(&self) -> bool {
12700 self.inner.channel().is_closed()
12701 }
12702 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
12703 self.inner.channel().on_closed()
12704 }
12705
12706 #[cfg(target_os = "fuchsia")]
12707 fn signal_peer(
12708 &self,
12709 clear_mask: zx::Signals,
12710 set_mask: zx::Signals,
12711 ) -> Result<(), zx_status::Status> {
12712 use fidl::Peered;
12713 self.inner.channel().signal_peer(clear_mask, set_mask)
12714 }
12715}
12716
12717impl LinkableControlHandle {}
12718
12719#[must_use = "FIDL methods require a response to be sent"]
12720#[derive(Debug)]
12721pub struct LinkableLinkIntoResponder {
12722 control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
12723 tx_id: u32,
12724}
12725
12726impl std::ops::Drop for LinkableLinkIntoResponder {
12730 fn drop(&mut self) {
12731 self.control_handle.shutdown();
12732 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12734 }
12735}
12736
12737impl fidl::endpoints::Responder for LinkableLinkIntoResponder {
12738 type ControlHandle = LinkableControlHandle;
12739
12740 fn control_handle(&self) -> &LinkableControlHandle {
12741 &self.control_handle
12742 }
12743
12744 fn drop_without_shutdown(mut self) {
12745 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12747 std::mem::forget(self);
12749 }
12750}
12751
12752impl LinkableLinkIntoResponder {
12753 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12757 let _result = self.send_raw(result);
12758 if _result.is_err() {
12759 self.control_handle.shutdown();
12760 }
12761 self.drop_without_shutdown();
12762 _result
12763 }
12764
12765 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12767 let _result = self.send_raw(result);
12768 self.drop_without_shutdown();
12769 _result
12770 }
12771
12772 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12773 self.control_handle
12774 .inner
12775 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12776 result,
12777 self.tx_id,
12778 0x54f3949246a03e74,
12779 fidl::encoding::DynamicFlags::empty(),
12780 )
12781 }
12782}
12783
12784#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
12785pub struct NodeMarker;
12786
12787impl fidl::endpoints::ProtocolMarker for NodeMarker {
12788 type Proxy = NodeProxy;
12789 type RequestStream = NodeRequestStream;
12790 #[cfg(target_os = "fuchsia")]
12791 type SynchronousProxy = NodeSynchronousProxy;
12792
12793 const DEBUG_NAME: &'static str = "fuchsia.io.Node";
12794}
12795impl fidl::endpoints::DiscoverableProtocolMarker for NodeMarker {}
12796pub type NodeGetFlagsResult = Result<Flags, i32>;
12797pub type NodeSetFlagsResult = Result<(), i32>;
12798pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
12799pub type NodeUpdateAttributesResult = Result<(), i32>;
12800pub type NodeSyncResult = Result<(), i32>;
12801pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
12802pub type NodeSetExtendedAttributeResult = Result<(), i32>;
12803pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
12804
12805pub trait NodeProxyInterface: Send + Sync {
12806 fn r#clone(
12807 &self,
12808 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
12809 ) -> Result<(), fidl::Error>;
12810 type CloseResponseFut: std::future::Future<
12811 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
12812 > + Send;
12813 fn r#close(&self) -> Self::CloseResponseFut;
12814 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
12815 fn r#query(&self) -> Self::QueryResponseFut;
12816 fn r#deprecated_clone(
12817 &self,
12818 flags: OpenFlags,
12819 object: fidl::endpoints::ServerEnd<NodeMarker>,
12820 ) -> Result<(), fidl::Error>;
12821 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
12822 + Send;
12823 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
12824 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
12825 fn r#deprecated_set_attr(
12826 &self,
12827 flags: NodeAttributeFlags,
12828 attributes: &NodeAttributes,
12829 ) -> Self::DeprecatedSetAttrResponseFut;
12830 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
12831 + Send;
12832 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
12833 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
12834 + Send;
12835 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
12836 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
12837 + Send;
12838 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
12839 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
12840 + Send;
12841 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
12842 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
12843 + Send;
12844 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
12845 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
12846 + Send;
12847 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
12848 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
12849 + Send;
12850 fn r#update_attributes(
12851 &self,
12852 payload: &MutableNodeAttributes,
12853 ) -> Self::UpdateAttributesResponseFut;
12854 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
12855 fn r#sync(&self) -> Self::SyncResponseFut;
12856 fn r#list_extended_attributes(
12857 &self,
12858 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
12859 ) -> Result<(), fidl::Error>;
12860 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
12861 + Send;
12862 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
12863 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
12864 + Send;
12865 fn r#set_extended_attribute(
12866 &self,
12867 name: &[u8],
12868 value: ExtendedAttributeValue,
12869 mode: SetExtendedAttributeMode,
12870 ) -> Self::SetExtendedAttributeResponseFut;
12871 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
12872 + Send;
12873 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
12874}
12875#[derive(Debug)]
12876#[cfg(target_os = "fuchsia")]
12877pub struct NodeSynchronousProxy {
12878 client: fidl::client::sync::Client,
12879}
12880
12881#[cfg(target_os = "fuchsia")]
12882impl fidl::endpoints::SynchronousProxy for NodeSynchronousProxy {
12883 type Proxy = NodeProxy;
12884 type Protocol = NodeMarker;
12885
12886 fn from_channel(inner: fidl::Channel) -> Self {
12887 Self::new(inner)
12888 }
12889
12890 fn into_channel(self) -> fidl::Channel {
12891 self.client.into_channel()
12892 }
12893
12894 fn as_channel(&self) -> &fidl::Channel {
12895 self.client.as_channel()
12896 }
12897}
12898
12899#[cfg(target_os = "fuchsia")]
12900impl NodeSynchronousProxy {
12901 pub fn new(channel: fidl::Channel) -> Self {
12902 let protocol_name = <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12903 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
12904 }
12905
12906 pub fn into_channel(self) -> fidl::Channel {
12907 self.client.into_channel()
12908 }
12909
12910 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<NodeEvent, fidl::Error> {
12913 NodeEvent::decode(self.client.wait_for_event(deadline)?)
12914 }
12915
12916 pub fn r#clone(
12917 &self,
12918 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
12919 ) -> Result<(), fidl::Error> {
12920 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
12921 (request,),
12922 0x20d8a7aba2168a79,
12923 fidl::encoding::DynamicFlags::empty(),
12924 )
12925 }
12926
12927 pub fn r#close(
12938 &self,
12939 ___deadline: zx::MonotonicInstant,
12940 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
12941 let _response = self.client.send_query::<
12942 fidl::encoding::EmptyPayload,
12943 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12944 >(
12945 (),
12946 0x5ac5d459ad7f657e,
12947 fidl::encoding::DynamicFlags::empty(),
12948 ___deadline,
12949 )?;
12950 Ok(_response.map(|x| x))
12951 }
12952
12953 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
12954 let _response = self.client.send_query::<
12955 fidl::encoding::EmptyPayload,
12956 fidl_fuchsia_unknown::QueryableQueryResponse,
12957 >(
12958 (),
12959 0x2658edee9decfc06,
12960 fidl::encoding::DynamicFlags::empty(),
12961 ___deadline,
12962 )?;
12963 Ok(_response.protocol)
12964 }
12965
12966 pub fn r#deprecated_clone(
12968 &self,
12969 mut flags: OpenFlags,
12970 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
12971 ) -> Result<(), fidl::Error> {
12972 self.client.send::<NodeDeprecatedCloneRequest>(
12973 (flags, object),
12974 0x5a61678f293ce16f,
12975 fidl::encoding::DynamicFlags::FLEXIBLE,
12976 )
12977 }
12978
12979 pub fn r#deprecated_get_attr(
12981 &self,
12982 ___deadline: zx::MonotonicInstant,
12983 ) -> Result<(i32, NodeAttributes), fidl::Error> {
12984 let _response =
12985 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
12986 (),
12987 0x78985e216314dafd,
12988 fidl::encoding::DynamicFlags::empty(),
12989 ___deadline,
12990 )?;
12991 Ok((_response.s, _response.attributes))
12992 }
12993
12994 pub fn r#deprecated_set_attr(
12996 &self,
12997 mut flags: NodeAttributeFlags,
12998 mut attributes: &NodeAttributes,
12999 ___deadline: zx::MonotonicInstant,
13000 ) -> Result<i32, fidl::Error> {
13001 let _response =
13002 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
13003 (flags, attributes),
13004 0x4186c0f40d938f46,
13005 fidl::encoding::DynamicFlags::empty(),
13006 ___deadline,
13007 )?;
13008 Ok(_response.s)
13009 }
13010
13011 pub fn r#deprecated_get_flags(
13013 &self,
13014 ___deadline: zx::MonotonicInstant,
13015 ) -> Result<(i32, OpenFlags), fidl::Error> {
13016 let _response = self
13017 .client
13018 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
13019 (),
13020 0x5b88fffb8eda3aa1,
13021 fidl::encoding::DynamicFlags::empty(),
13022 ___deadline,
13023 )?;
13024 Ok((_response.s, _response.flags))
13025 }
13026
13027 pub fn r#deprecated_set_flags(
13029 &self,
13030 mut flags: OpenFlags,
13031 ___deadline: zx::MonotonicInstant,
13032 ) -> Result<i32, fidl::Error> {
13033 let _response = self
13034 .client
13035 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
13036 (flags,),
13037 0x5295b76c71fde733,
13038 fidl::encoding::DynamicFlags::empty(),
13039 ___deadline,
13040 )?;
13041 Ok(_response.s)
13042 }
13043
13044 pub fn r#get_flags(
13053 &self,
13054 ___deadline: zx::MonotonicInstant,
13055 ) -> Result<NodeGetFlagsResult, fidl::Error> {
13056 let _response = self.client.send_query::<
13057 fidl::encoding::EmptyPayload,
13058 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
13059 >(
13060 (),
13061 0x176eb318f64ec23,
13062 fidl::encoding::DynamicFlags::FLEXIBLE,
13063 ___deadline,
13064 )?
13065 .into_result::<NodeMarker>("get_flags")?;
13066 Ok(_response.map(|x| x.flags))
13067 }
13068
13069 pub fn r#set_flags(
13079 &self,
13080 mut flags: Flags,
13081 ___deadline: zx::MonotonicInstant,
13082 ) -> Result<NodeSetFlagsResult, fidl::Error> {
13083 let _response = self.client.send_query::<
13084 NodeSetFlagsRequest,
13085 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
13086 >(
13087 (flags,),
13088 0x55a8028685791ea8,
13089 fidl::encoding::DynamicFlags::FLEXIBLE,
13090 ___deadline,
13091 )?
13092 .into_result::<NodeMarker>("set_flags")?;
13093 Ok(_response.map(|x| x))
13094 }
13095
13096 pub fn r#query_filesystem(
13098 &self,
13099 ___deadline: zx::MonotonicInstant,
13100 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
13101 let _response =
13102 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
13103 (),
13104 0x6f344a1c6b0a0610,
13105 fidl::encoding::DynamicFlags::empty(),
13106 ___deadline,
13107 )?;
13108 Ok((_response.s, _response.info))
13109 }
13110
13111 pub fn r#get_attributes(
13125 &self,
13126 mut query: NodeAttributesQuery,
13127 ___deadline: zx::MonotonicInstant,
13128 ) -> Result<NodeGetAttributesResult, fidl::Error> {
13129 let _response = self.client.send_query::<
13130 NodeGetAttributesRequest,
13131 fidl::encoding::ResultType<NodeAttributes2, i32>,
13132 >(
13133 (query,),
13134 0x3d4396a638ea053b,
13135 fidl::encoding::DynamicFlags::empty(),
13136 ___deadline,
13137 )?;
13138 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
13139 }
13140
13141 pub fn r#update_attributes(
13150 &self,
13151 mut payload: &MutableNodeAttributes,
13152 ___deadline: zx::MonotonicInstant,
13153 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
13154 let _response = self.client.send_query::<
13155 MutableNodeAttributes,
13156 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13157 >(
13158 payload,
13159 0x3308c1da5a89bf08,
13160 fidl::encoding::DynamicFlags::empty(),
13161 ___deadline,
13162 )?;
13163 Ok(_response.map(|x| x))
13164 }
13165
13166 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
13176 let _response = self.client.send_query::<
13177 fidl::encoding::EmptyPayload,
13178 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13179 >(
13180 (),
13181 0x2c5c27ca0ab5dc49,
13182 fidl::encoding::DynamicFlags::empty(),
13183 ___deadline,
13184 )?;
13185 Ok(_response.map(|x| x))
13186 }
13187
13188 pub fn r#list_extended_attributes(
13197 &self,
13198 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13199 ) -> Result<(), fidl::Error> {
13200 self.client.send::<NodeListExtendedAttributesRequest>(
13201 (iterator,),
13202 0x4b61033de007fcd0,
13203 fidl::encoding::DynamicFlags::empty(),
13204 )
13205 }
13206
13207 pub fn r#get_extended_attribute(
13214 &self,
13215 mut name: &[u8],
13216 ___deadline: zx::MonotonicInstant,
13217 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
13218 let _response = self.client.send_query::<
13219 NodeGetExtendedAttributeRequest,
13220 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
13221 >(
13222 (name,),
13223 0x45ffa3ccfdeb76db,
13224 fidl::encoding::DynamicFlags::empty(),
13225 ___deadline,
13226 )?;
13227 Ok(_response.map(|x| x))
13228 }
13229
13230 pub fn r#set_extended_attribute(
13238 &self,
13239 mut name: &[u8],
13240 mut value: ExtendedAttributeValue,
13241 mut mode: SetExtendedAttributeMode,
13242 ___deadline: zx::MonotonicInstant,
13243 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
13244 let _response = self.client.send_query::<
13245 NodeSetExtendedAttributeRequest,
13246 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13247 >(
13248 (name, &mut value, mode,),
13249 0x4a951362f681f23c,
13250 fidl::encoding::DynamicFlags::empty(),
13251 ___deadline,
13252 )?;
13253 Ok(_response.map(|x| x))
13254 }
13255
13256 pub fn r#remove_extended_attribute(
13262 &self,
13263 mut name: &[u8],
13264 ___deadline: zx::MonotonicInstant,
13265 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
13266 let _response = self.client.send_query::<
13267 NodeRemoveExtendedAttributeRequest,
13268 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13269 >(
13270 (name,),
13271 0x7a0b9f3a9bf9032d,
13272 fidl::encoding::DynamicFlags::empty(),
13273 ___deadline,
13274 )?;
13275 Ok(_response.map(|x| x))
13276 }
13277}
13278
13279#[cfg(target_os = "fuchsia")]
13280impl From<NodeSynchronousProxy> for zx::NullableHandle {
13281 fn from(value: NodeSynchronousProxy) -> Self {
13282 value.into_channel().into()
13283 }
13284}
13285
13286#[cfg(target_os = "fuchsia")]
13287impl From<fidl::Channel> for NodeSynchronousProxy {
13288 fn from(value: fidl::Channel) -> Self {
13289 Self::new(value)
13290 }
13291}
13292
13293#[cfg(target_os = "fuchsia")]
13294impl fidl::endpoints::FromClient for NodeSynchronousProxy {
13295 type Protocol = NodeMarker;
13296
13297 fn from_client(value: fidl::endpoints::ClientEnd<NodeMarker>) -> Self {
13298 Self::new(value.into_channel())
13299 }
13300}
13301
13302#[derive(Debug, Clone)]
13303pub struct NodeProxy {
13304 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
13305}
13306
13307impl fidl::endpoints::Proxy for NodeProxy {
13308 type Protocol = NodeMarker;
13309
13310 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
13311 Self::new(inner)
13312 }
13313
13314 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
13315 self.client.into_channel().map_err(|client| Self { client })
13316 }
13317
13318 fn as_channel(&self) -> &::fidl::AsyncChannel {
13319 self.client.as_channel()
13320 }
13321}
13322
13323impl NodeProxy {
13324 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
13326 let protocol_name = <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
13327 Self { client: fidl::client::Client::new(channel, protocol_name) }
13328 }
13329
13330 pub fn take_event_stream(&self) -> NodeEventStream {
13336 NodeEventStream { event_receiver: self.client.take_event_receiver() }
13337 }
13338
13339 pub fn r#clone(
13340 &self,
13341 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13342 ) -> Result<(), fidl::Error> {
13343 NodeProxyInterface::r#clone(self, request)
13344 }
13345
13346 pub fn r#close(
13357 &self,
13358 ) -> fidl::client::QueryResponseFut<
13359 fidl_fuchsia_unknown::CloseableCloseResult,
13360 fidl::encoding::DefaultFuchsiaResourceDialect,
13361 > {
13362 NodeProxyInterface::r#close(self)
13363 }
13364
13365 pub fn r#query(
13366 &self,
13367 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
13368 {
13369 NodeProxyInterface::r#query(self)
13370 }
13371
13372 pub fn r#deprecated_clone(
13374 &self,
13375 mut flags: OpenFlags,
13376 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13377 ) -> Result<(), fidl::Error> {
13378 NodeProxyInterface::r#deprecated_clone(self, flags, object)
13379 }
13380
13381 pub fn r#deprecated_get_attr(
13383 &self,
13384 ) -> fidl::client::QueryResponseFut<
13385 (i32, NodeAttributes),
13386 fidl::encoding::DefaultFuchsiaResourceDialect,
13387 > {
13388 NodeProxyInterface::r#deprecated_get_attr(self)
13389 }
13390
13391 pub fn r#deprecated_set_attr(
13393 &self,
13394 mut flags: NodeAttributeFlags,
13395 mut attributes: &NodeAttributes,
13396 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13397 NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
13398 }
13399
13400 pub fn r#deprecated_get_flags(
13402 &self,
13403 ) -> fidl::client::QueryResponseFut<
13404 (i32, OpenFlags),
13405 fidl::encoding::DefaultFuchsiaResourceDialect,
13406 > {
13407 NodeProxyInterface::r#deprecated_get_flags(self)
13408 }
13409
13410 pub fn r#deprecated_set_flags(
13412 &self,
13413 mut flags: OpenFlags,
13414 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13415 NodeProxyInterface::r#deprecated_set_flags(self, flags)
13416 }
13417
13418 pub fn r#get_flags(
13427 &self,
13428 ) -> fidl::client::QueryResponseFut<
13429 NodeGetFlagsResult,
13430 fidl::encoding::DefaultFuchsiaResourceDialect,
13431 > {
13432 NodeProxyInterface::r#get_flags(self)
13433 }
13434
13435 pub fn r#set_flags(
13445 &self,
13446 mut flags: Flags,
13447 ) -> fidl::client::QueryResponseFut<
13448 NodeSetFlagsResult,
13449 fidl::encoding::DefaultFuchsiaResourceDialect,
13450 > {
13451 NodeProxyInterface::r#set_flags(self, flags)
13452 }
13453
13454 pub fn r#query_filesystem(
13456 &self,
13457 ) -> fidl::client::QueryResponseFut<
13458 (i32, Option<Box<FilesystemInfo>>),
13459 fidl::encoding::DefaultFuchsiaResourceDialect,
13460 > {
13461 NodeProxyInterface::r#query_filesystem(self)
13462 }
13463
13464 pub fn r#get_attributes(
13478 &self,
13479 mut query: NodeAttributesQuery,
13480 ) -> fidl::client::QueryResponseFut<
13481 NodeGetAttributesResult,
13482 fidl::encoding::DefaultFuchsiaResourceDialect,
13483 > {
13484 NodeProxyInterface::r#get_attributes(self, query)
13485 }
13486
13487 pub fn r#update_attributes(
13496 &self,
13497 mut payload: &MutableNodeAttributes,
13498 ) -> fidl::client::QueryResponseFut<
13499 NodeUpdateAttributesResult,
13500 fidl::encoding::DefaultFuchsiaResourceDialect,
13501 > {
13502 NodeProxyInterface::r#update_attributes(self, payload)
13503 }
13504
13505 pub fn r#sync(
13515 &self,
13516 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
13517 {
13518 NodeProxyInterface::r#sync(self)
13519 }
13520
13521 pub fn r#list_extended_attributes(
13530 &self,
13531 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13532 ) -> Result<(), fidl::Error> {
13533 NodeProxyInterface::r#list_extended_attributes(self, iterator)
13534 }
13535
13536 pub fn r#get_extended_attribute(
13543 &self,
13544 mut name: &[u8],
13545 ) -> fidl::client::QueryResponseFut<
13546 NodeGetExtendedAttributeResult,
13547 fidl::encoding::DefaultFuchsiaResourceDialect,
13548 > {
13549 NodeProxyInterface::r#get_extended_attribute(self, name)
13550 }
13551
13552 pub fn r#set_extended_attribute(
13560 &self,
13561 mut name: &[u8],
13562 mut value: ExtendedAttributeValue,
13563 mut mode: SetExtendedAttributeMode,
13564 ) -> fidl::client::QueryResponseFut<
13565 NodeSetExtendedAttributeResult,
13566 fidl::encoding::DefaultFuchsiaResourceDialect,
13567 > {
13568 NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
13569 }
13570
13571 pub fn r#remove_extended_attribute(
13577 &self,
13578 mut name: &[u8],
13579 ) -> fidl::client::QueryResponseFut<
13580 NodeRemoveExtendedAttributeResult,
13581 fidl::encoding::DefaultFuchsiaResourceDialect,
13582 > {
13583 NodeProxyInterface::r#remove_extended_attribute(self, name)
13584 }
13585}
13586
13587impl NodeProxyInterface for NodeProxy {
13588 fn r#clone(
13589 &self,
13590 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13591 ) -> Result<(), fidl::Error> {
13592 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
13593 (request,),
13594 0x20d8a7aba2168a79,
13595 fidl::encoding::DynamicFlags::empty(),
13596 )
13597 }
13598
13599 type CloseResponseFut = fidl::client::QueryResponseFut<
13600 fidl_fuchsia_unknown::CloseableCloseResult,
13601 fidl::encoding::DefaultFuchsiaResourceDialect,
13602 >;
13603 fn r#close(&self) -> Self::CloseResponseFut {
13604 fn _decode(
13605 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13606 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
13607 let _response = fidl::client::decode_transaction_body::<
13608 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13609 fidl::encoding::DefaultFuchsiaResourceDialect,
13610 0x5ac5d459ad7f657e,
13611 >(_buf?)?;
13612 Ok(_response.map(|x| x))
13613 }
13614 self.client.send_query_and_decode::<
13615 fidl::encoding::EmptyPayload,
13616 fidl_fuchsia_unknown::CloseableCloseResult,
13617 >(
13618 (),
13619 0x5ac5d459ad7f657e,
13620 fidl::encoding::DynamicFlags::empty(),
13621 _decode,
13622 )
13623 }
13624
13625 type QueryResponseFut =
13626 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
13627 fn r#query(&self) -> Self::QueryResponseFut {
13628 fn _decode(
13629 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13630 ) -> Result<Vec<u8>, fidl::Error> {
13631 let _response = fidl::client::decode_transaction_body::<
13632 fidl_fuchsia_unknown::QueryableQueryResponse,
13633 fidl::encoding::DefaultFuchsiaResourceDialect,
13634 0x2658edee9decfc06,
13635 >(_buf?)?;
13636 Ok(_response.protocol)
13637 }
13638 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
13639 (),
13640 0x2658edee9decfc06,
13641 fidl::encoding::DynamicFlags::empty(),
13642 _decode,
13643 )
13644 }
13645
13646 fn r#deprecated_clone(
13647 &self,
13648 mut flags: OpenFlags,
13649 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13650 ) -> Result<(), fidl::Error> {
13651 self.client.send::<NodeDeprecatedCloneRequest>(
13652 (flags, object),
13653 0x5a61678f293ce16f,
13654 fidl::encoding::DynamicFlags::FLEXIBLE,
13655 )
13656 }
13657
13658 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
13659 (i32, NodeAttributes),
13660 fidl::encoding::DefaultFuchsiaResourceDialect,
13661 >;
13662 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
13663 fn _decode(
13664 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13665 ) -> Result<(i32, NodeAttributes), fidl::Error> {
13666 let _response = fidl::client::decode_transaction_body::<
13667 NodeDeprecatedGetAttrResponse,
13668 fidl::encoding::DefaultFuchsiaResourceDialect,
13669 0x78985e216314dafd,
13670 >(_buf?)?;
13671 Ok((_response.s, _response.attributes))
13672 }
13673 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
13674 (),
13675 0x78985e216314dafd,
13676 fidl::encoding::DynamicFlags::empty(),
13677 _decode,
13678 )
13679 }
13680
13681 type DeprecatedSetAttrResponseFut =
13682 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
13683 fn r#deprecated_set_attr(
13684 &self,
13685 mut flags: NodeAttributeFlags,
13686 mut attributes: &NodeAttributes,
13687 ) -> Self::DeprecatedSetAttrResponseFut {
13688 fn _decode(
13689 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13690 ) -> Result<i32, fidl::Error> {
13691 let _response = fidl::client::decode_transaction_body::<
13692 NodeDeprecatedSetAttrResponse,
13693 fidl::encoding::DefaultFuchsiaResourceDialect,
13694 0x4186c0f40d938f46,
13695 >(_buf?)?;
13696 Ok(_response.s)
13697 }
13698 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
13699 (flags, attributes),
13700 0x4186c0f40d938f46,
13701 fidl::encoding::DynamicFlags::empty(),
13702 _decode,
13703 )
13704 }
13705
13706 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
13707 (i32, OpenFlags),
13708 fidl::encoding::DefaultFuchsiaResourceDialect,
13709 >;
13710 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
13711 fn _decode(
13712 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13713 ) -> Result<(i32, OpenFlags), fidl::Error> {
13714 let _response = fidl::client::decode_transaction_body::<
13715 NodeDeprecatedGetFlagsResponse,
13716 fidl::encoding::DefaultFuchsiaResourceDialect,
13717 0x5b88fffb8eda3aa1,
13718 >(_buf?)?;
13719 Ok((_response.s, _response.flags))
13720 }
13721 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
13722 (),
13723 0x5b88fffb8eda3aa1,
13724 fidl::encoding::DynamicFlags::empty(),
13725 _decode,
13726 )
13727 }
13728
13729 type DeprecatedSetFlagsResponseFut =
13730 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
13731 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
13732 fn _decode(
13733 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13734 ) -> Result<i32, fidl::Error> {
13735 let _response = fidl::client::decode_transaction_body::<
13736 NodeDeprecatedSetFlagsResponse,
13737 fidl::encoding::DefaultFuchsiaResourceDialect,
13738 0x5295b76c71fde733,
13739 >(_buf?)?;
13740 Ok(_response.s)
13741 }
13742 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
13743 (flags,),
13744 0x5295b76c71fde733,
13745 fidl::encoding::DynamicFlags::empty(),
13746 _decode,
13747 )
13748 }
13749
13750 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
13751 NodeGetFlagsResult,
13752 fidl::encoding::DefaultFuchsiaResourceDialect,
13753 >;
13754 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
13755 fn _decode(
13756 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13757 ) -> Result<NodeGetFlagsResult, fidl::Error> {
13758 let _response = fidl::client::decode_transaction_body::<
13759 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
13760 fidl::encoding::DefaultFuchsiaResourceDialect,
13761 0x176eb318f64ec23,
13762 >(_buf?)?
13763 .into_result::<NodeMarker>("get_flags")?;
13764 Ok(_response.map(|x| x.flags))
13765 }
13766 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
13767 (),
13768 0x176eb318f64ec23,
13769 fidl::encoding::DynamicFlags::FLEXIBLE,
13770 _decode,
13771 )
13772 }
13773
13774 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
13775 NodeSetFlagsResult,
13776 fidl::encoding::DefaultFuchsiaResourceDialect,
13777 >;
13778 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
13779 fn _decode(
13780 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13781 ) -> Result<NodeSetFlagsResult, fidl::Error> {
13782 let _response = fidl::client::decode_transaction_body::<
13783 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
13784 fidl::encoding::DefaultFuchsiaResourceDialect,
13785 0x55a8028685791ea8,
13786 >(_buf?)?
13787 .into_result::<NodeMarker>("set_flags")?;
13788 Ok(_response.map(|x| x))
13789 }
13790 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
13791 (flags,),
13792 0x55a8028685791ea8,
13793 fidl::encoding::DynamicFlags::FLEXIBLE,
13794 _decode,
13795 )
13796 }
13797
13798 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
13799 (i32, Option<Box<FilesystemInfo>>),
13800 fidl::encoding::DefaultFuchsiaResourceDialect,
13801 >;
13802 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
13803 fn _decode(
13804 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13805 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
13806 let _response = fidl::client::decode_transaction_body::<
13807 NodeQueryFilesystemResponse,
13808 fidl::encoding::DefaultFuchsiaResourceDialect,
13809 0x6f344a1c6b0a0610,
13810 >(_buf?)?;
13811 Ok((_response.s, _response.info))
13812 }
13813 self.client.send_query_and_decode::<
13814 fidl::encoding::EmptyPayload,
13815 (i32, Option<Box<FilesystemInfo>>),
13816 >(
13817 (),
13818 0x6f344a1c6b0a0610,
13819 fidl::encoding::DynamicFlags::empty(),
13820 _decode,
13821 )
13822 }
13823
13824 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
13825 NodeGetAttributesResult,
13826 fidl::encoding::DefaultFuchsiaResourceDialect,
13827 >;
13828 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
13829 fn _decode(
13830 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13831 ) -> Result<NodeGetAttributesResult, fidl::Error> {
13832 let _response = fidl::client::decode_transaction_body::<
13833 fidl::encoding::ResultType<NodeAttributes2, i32>,
13834 fidl::encoding::DefaultFuchsiaResourceDialect,
13835 0x3d4396a638ea053b,
13836 >(_buf?)?;
13837 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
13838 }
13839 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
13840 (query,),
13841 0x3d4396a638ea053b,
13842 fidl::encoding::DynamicFlags::empty(),
13843 _decode,
13844 )
13845 }
13846
13847 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
13848 NodeUpdateAttributesResult,
13849 fidl::encoding::DefaultFuchsiaResourceDialect,
13850 >;
13851 fn r#update_attributes(
13852 &self,
13853 mut payload: &MutableNodeAttributes,
13854 ) -> Self::UpdateAttributesResponseFut {
13855 fn _decode(
13856 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13857 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
13858 let _response = fidl::client::decode_transaction_body::<
13859 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13860 fidl::encoding::DefaultFuchsiaResourceDialect,
13861 0x3308c1da5a89bf08,
13862 >(_buf?)?;
13863 Ok(_response.map(|x| x))
13864 }
13865 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
13866 payload,
13867 0x3308c1da5a89bf08,
13868 fidl::encoding::DynamicFlags::empty(),
13869 _decode,
13870 )
13871 }
13872
13873 type SyncResponseFut = fidl::client::QueryResponseFut<
13874 NodeSyncResult,
13875 fidl::encoding::DefaultFuchsiaResourceDialect,
13876 >;
13877 fn r#sync(&self) -> Self::SyncResponseFut {
13878 fn _decode(
13879 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13880 ) -> Result<NodeSyncResult, fidl::Error> {
13881 let _response = fidl::client::decode_transaction_body::<
13882 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13883 fidl::encoding::DefaultFuchsiaResourceDialect,
13884 0x2c5c27ca0ab5dc49,
13885 >(_buf?)?;
13886 Ok(_response.map(|x| x))
13887 }
13888 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
13889 (),
13890 0x2c5c27ca0ab5dc49,
13891 fidl::encoding::DynamicFlags::empty(),
13892 _decode,
13893 )
13894 }
13895
13896 fn r#list_extended_attributes(
13897 &self,
13898 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13899 ) -> Result<(), fidl::Error> {
13900 self.client.send::<NodeListExtendedAttributesRequest>(
13901 (iterator,),
13902 0x4b61033de007fcd0,
13903 fidl::encoding::DynamicFlags::empty(),
13904 )
13905 }
13906
13907 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
13908 NodeGetExtendedAttributeResult,
13909 fidl::encoding::DefaultFuchsiaResourceDialect,
13910 >;
13911 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
13912 fn _decode(
13913 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13914 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
13915 let _response = fidl::client::decode_transaction_body::<
13916 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
13917 fidl::encoding::DefaultFuchsiaResourceDialect,
13918 0x45ffa3ccfdeb76db,
13919 >(_buf?)?;
13920 Ok(_response.map(|x| x))
13921 }
13922 self.client.send_query_and_decode::<
13923 NodeGetExtendedAttributeRequest,
13924 NodeGetExtendedAttributeResult,
13925 >(
13926 (name,),
13927 0x45ffa3ccfdeb76db,
13928 fidl::encoding::DynamicFlags::empty(),
13929 _decode,
13930 )
13931 }
13932
13933 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
13934 NodeSetExtendedAttributeResult,
13935 fidl::encoding::DefaultFuchsiaResourceDialect,
13936 >;
13937 fn r#set_extended_attribute(
13938 &self,
13939 mut name: &[u8],
13940 mut value: ExtendedAttributeValue,
13941 mut mode: SetExtendedAttributeMode,
13942 ) -> Self::SetExtendedAttributeResponseFut {
13943 fn _decode(
13944 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13945 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
13946 let _response = fidl::client::decode_transaction_body::<
13947 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13948 fidl::encoding::DefaultFuchsiaResourceDialect,
13949 0x4a951362f681f23c,
13950 >(_buf?)?;
13951 Ok(_response.map(|x| x))
13952 }
13953 self.client.send_query_and_decode::<
13954 NodeSetExtendedAttributeRequest,
13955 NodeSetExtendedAttributeResult,
13956 >(
13957 (name, &mut value, mode,),
13958 0x4a951362f681f23c,
13959 fidl::encoding::DynamicFlags::empty(),
13960 _decode,
13961 )
13962 }
13963
13964 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
13965 NodeRemoveExtendedAttributeResult,
13966 fidl::encoding::DefaultFuchsiaResourceDialect,
13967 >;
13968 fn r#remove_extended_attribute(
13969 &self,
13970 mut name: &[u8],
13971 ) -> Self::RemoveExtendedAttributeResponseFut {
13972 fn _decode(
13973 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13974 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
13975 let _response = fidl::client::decode_transaction_body::<
13976 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13977 fidl::encoding::DefaultFuchsiaResourceDialect,
13978 0x7a0b9f3a9bf9032d,
13979 >(_buf?)?;
13980 Ok(_response.map(|x| x))
13981 }
13982 self.client.send_query_and_decode::<
13983 NodeRemoveExtendedAttributeRequest,
13984 NodeRemoveExtendedAttributeResult,
13985 >(
13986 (name,),
13987 0x7a0b9f3a9bf9032d,
13988 fidl::encoding::DynamicFlags::empty(),
13989 _decode,
13990 )
13991 }
13992}
13993
13994pub struct NodeEventStream {
13995 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
13996}
13997
13998impl std::marker::Unpin for NodeEventStream {}
13999
14000impl futures::stream::FusedStream for NodeEventStream {
14001 fn is_terminated(&self) -> bool {
14002 self.event_receiver.is_terminated()
14003 }
14004}
14005
14006impl futures::Stream for NodeEventStream {
14007 type Item = Result<NodeEvent, fidl::Error>;
14008
14009 fn poll_next(
14010 mut self: std::pin::Pin<&mut Self>,
14011 cx: &mut std::task::Context<'_>,
14012 ) -> std::task::Poll<Option<Self::Item>> {
14013 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
14014 &mut self.event_receiver,
14015 cx
14016 )?) {
14017 Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
14018 None => std::task::Poll::Ready(None),
14019 }
14020 }
14021}
14022
14023#[derive(Debug)]
14024pub enum NodeEvent {
14025 OnOpen_ {
14026 s: i32,
14027 info: Option<Box<NodeInfoDeprecated>>,
14028 },
14029 OnRepresentation {
14030 payload: Representation,
14031 },
14032 #[non_exhaustive]
14033 _UnknownEvent {
14034 ordinal: u64,
14036 },
14037}
14038
14039impl NodeEvent {
14040 #[allow(irrefutable_let_patterns)]
14041 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
14042 if let NodeEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
14043 }
14044 #[allow(irrefutable_let_patterns)]
14045 pub fn into_on_representation(self) -> Option<Representation> {
14046 if let NodeEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
14047 }
14048
14049 fn decode(
14051 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
14052 ) -> Result<NodeEvent, fidl::Error> {
14053 let (bytes, _handles) = buf.split_mut();
14054 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14055 debug_assert_eq!(tx_header.tx_id, 0);
14056 match tx_header.ordinal {
14057 0x7fc7bbb1dbfd1972 => {
14058 let mut out = fidl::new_empty!(
14059 NodeOnOpenRequest,
14060 fidl::encoding::DefaultFuchsiaResourceDialect
14061 );
14062 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
14063 Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
14064 }
14065 0x5cb40567d80a510c => {
14066 let mut out =
14067 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
14068 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
14069 Ok((NodeEvent::OnRepresentation { payload: out }))
14070 }
14071 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
14072 Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
14073 }
14074 _ => Err(fidl::Error::UnknownOrdinal {
14075 ordinal: tx_header.ordinal,
14076 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14077 }),
14078 }
14079 }
14080}
14081
14082pub struct NodeRequestStream {
14084 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14085 is_terminated: bool,
14086}
14087
14088impl std::marker::Unpin for NodeRequestStream {}
14089
14090impl futures::stream::FusedStream for NodeRequestStream {
14091 fn is_terminated(&self) -> bool {
14092 self.is_terminated
14093 }
14094}
14095
14096impl fidl::endpoints::RequestStream for NodeRequestStream {
14097 type Protocol = NodeMarker;
14098 type ControlHandle = NodeControlHandle;
14099
14100 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
14101 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14102 }
14103
14104 fn control_handle(&self) -> Self::ControlHandle {
14105 NodeControlHandle { inner: self.inner.clone() }
14106 }
14107
14108 fn into_inner(
14109 self,
14110 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
14111 {
14112 (self.inner, self.is_terminated)
14113 }
14114
14115 fn from_inner(
14116 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14117 is_terminated: bool,
14118 ) -> Self {
14119 Self { inner, is_terminated }
14120 }
14121}
14122
14123impl futures::Stream for NodeRequestStream {
14124 type Item = Result<NodeRequest, fidl::Error>;
14125
14126 fn poll_next(
14127 mut self: std::pin::Pin<&mut Self>,
14128 cx: &mut std::task::Context<'_>,
14129 ) -> std::task::Poll<Option<Self::Item>> {
14130 let this = &mut *self;
14131 if this.inner.check_shutdown(cx) {
14132 this.is_terminated = true;
14133 return std::task::Poll::Ready(None);
14134 }
14135 if this.is_terminated {
14136 panic!("polled NodeRequestStream after completion");
14137 }
14138 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
14139 |bytes, handles| {
14140 match this.inner.channel().read_etc(cx, bytes, handles) {
14141 std::task::Poll::Ready(Ok(())) => {}
14142 std::task::Poll::Pending => return std::task::Poll::Pending,
14143 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
14144 this.is_terminated = true;
14145 return std::task::Poll::Ready(None);
14146 }
14147 std::task::Poll::Ready(Err(e)) => {
14148 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14149 e.into(),
14150 ))));
14151 }
14152 }
14153
14154 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14156
14157 std::task::Poll::Ready(Some(match header.ordinal {
14158 0x20d8a7aba2168a79 => {
14159 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14160 let mut req = fidl::new_empty!(
14161 fidl_fuchsia_unknown::CloneableCloneRequest,
14162 fidl::encoding::DefaultFuchsiaResourceDialect
14163 );
14164 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14165 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14166 Ok(NodeRequest::Clone { request: req.request, control_handle })
14167 }
14168 0x5ac5d459ad7f657e => {
14169 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14170 let mut req = fidl::new_empty!(
14171 fidl::encoding::EmptyPayload,
14172 fidl::encoding::DefaultFuchsiaResourceDialect
14173 );
14174 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14175 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14176 Ok(NodeRequest::Close {
14177 responder: NodeCloseResponder {
14178 control_handle: std::mem::ManuallyDrop::new(control_handle),
14179 tx_id: header.tx_id,
14180 },
14181 })
14182 }
14183 0x2658edee9decfc06 => {
14184 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14185 let mut req = fidl::new_empty!(
14186 fidl::encoding::EmptyPayload,
14187 fidl::encoding::DefaultFuchsiaResourceDialect
14188 );
14189 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14190 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14191 Ok(NodeRequest::Query {
14192 responder: NodeQueryResponder {
14193 control_handle: std::mem::ManuallyDrop::new(control_handle),
14194 tx_id: header.tx_id,
14195 },
14196 })
14197 }
14198 0x5a61678f293ce16f => {
14199 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14200 let mut req = fidl::new_empty!(
14201 NodeDeprecatedCloneRequest,
14202 fidl::encoding::DefaultFuchsiaResourceDialect
14203 );
14204 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14205 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14206 Ok(NodeRequest::DeprecatedClone {
14207 flags: req.flags,
14208 object: req.object,
14209
14210 control_handle,
14211 })
14212 }
14213 0x78985e216314dafd => {
14214 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14215 let mut req = fidl::new_empty!(
14216 fidl::encoding::EmptyPayload,
14217 fidl::encoding::DefaultFuchsiaResourceDialect
14218 );
14219 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14220 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14221 Ok(NodeRequest::DeprecatedGetAttr {
14222 responder: NodeDeprecatedGetAttrResponder {
14223 control_handle: std::mem::ManuallyDrop::new(control_handle),
14224 tx_id: header.tx_id,
14225 },
14226 })
14227 }
14228 0x4186c0f40d938f46 => {
14229 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14230 let mut req = fidl::new_empty!(
14231 NodeDeprecatedSetAttrRequest,
14232 fidl::encoding::DefaultFuchsiaResourceDialect
14233 );
14234 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
14235 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14236 Ok(NodeRequest::DeprecatedSetAttr {
14237 flags: req.flags,
14238 attributes: req.attributes,
14239
14240 responder: NodeDeprecatedSetAttrResponder {
14241 control_handle: std::mem::ManuallyDrop::new(control_handle),
14242 tx_id: header.tx_id,
14243 },
14244 })
14245 }
14246 0x5b88fffb8eda3aa1 => {
14247 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14248 let mut req = fidl::new_empty!(
14249 fidl::encoding::EmptyPayload,
14250 fidl::encoding::DefaultFuchsiaResourceDialect
14251 );
14252 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14253 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14254 Ok(NodeRequest::DeprecatedGetFlags {
14255 responder: NodeDeprecatedGetFlagsResponder {
14256 control_handle: std::mem::ManuallyDrop::new(control_handle),
14257 tx_id: header.tx_id,
14258 },
14259 })
14260 }
14261 0x5295b76c71fde733 => {
14262 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14263 let mut req = fidl::new_empty!(
14264 NodeDeprecatedSetFlagsRequest,
14265 fidl::encoding::DefaultFuchsiaResourceDialect
14266 );
14267 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14268 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14269 Ok(NodeRequest::DeprecatedSetFlags {
14270 flags: req.flags,
14271
14272 responder: NodeDeprecatedSetFlagsResponder {
14273 control_handle: std::mem::ManuallyDrop::new(control_handle),
14274 tx_id: header.tx_id,
14275 },
14276 })
14277 }
14278 0x176eb318f64ec23 => {
14279 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14280 let mut req = fidl::new_empty!(
14281 fidl::encoding::EmptyPayload,
14282 fidl::encoding::DefaultFuchsiaResourceDialect
14283 );
14284 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14285 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14286 Ok(NodeRequest::GetFlags {
14287 responder: NodeGetFlagsResponder {
14288 control_handle: std::mem::ManuallyDrop::new(control_handle),
14289 tx_id: header.tx_id,
14290 },
14291 })
14292 }
14293 0x55a8028685791ea8 => {
14294 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14295 let mut req = fidl::new_empty!(
14296 NodeSetFlagsRequest,
14297 fidl::encoding::DefaultFuchsiaResourceDialect
14298 );
14299 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14300 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14301 Ok(NodeRequest::SetFlags {
14302 flags: req.flags,
14303
14304 responder: NodeSetFlagsResponder {
14305 control_handle: std::mem::ManuallyDrop::new(control_handle),
14306 tx_id: header.tx_id,
14307 },
14308 })
14309 }
14310 0x6f344a1c6b0a0610 => {
14311 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14312 let mut req = fidl::new_empty!(
14313 fidl::encoding::EmptyPayload,
14314 fidl::encoding::DefaultFuchsiaResourceDialect
14315 );
14316 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14317 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14318 Ok(NodeRequest::QueryFilesystem {
14319 responder: NodeQueryFilesystemResponder {
14320 control_handle: std::mem::ManuallyDrop::new(control_handle),
14321 tx_id: header.tx_id,
14322 },
14323 })
14324 }
14325 0x3d4396a638ea053b => {
14326 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14327 let mut req = fidl::new_empty!(
14328 NodeGetAttributesRequest,
14329 fidl::encoding::DefaultFuchsiaResourceDialect
14330 );
14331 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14332 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14333 Ok(NodeRequest::GetAttributes {
14334 query: req.query,
14335
14336 responder: NodeGetAttributesResponder {
14337 control_handle: std::mem::ManuallyDrop::new(control_handle),
14338 tx_id: header.tx_id,
14339 },
14340 })
14341 }
14342 0x3308c1da5a89bf08 => {
14343 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14344 let mut req = fidl::new_empty!(
14345 MutableNodeAttributes,
14346 fidl::encoding::DefaultFuchsiaResourceDialect
14347 );
14348 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
14349 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14350 Ok(NodeRequest::UpdateAttributes {
14351 payload: req,
14352 responder: NodeUpdateAttributesResponder {
14353 control_handle: std::mem::ManuallyDrop::new(control_handle),
14354 tx_id: header.tx_id,
14355 },
14356 })
14357 }
14358 0x2c5c27ca0ab5dc49 => {
14359 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14360 let mut req = fidl::new_empty!(
14361 fidl::encoding::EmptyPayload,
14362 fidl::encoding::DefaultFuchsiaResourceDialect
14363 );
14364 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14365 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14366 Ok(NodeRequest::Sync {
14367 responder: NodeSyncResponder {
14368 control_handle: std::mem::ManuallyDrop::new(control_handle),
14369 tx_id: header.tx_id,
14370 },
14371 })
14372 }
14373 0x4b61033de007fcd0 => {
14374 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14375 let mut req = fidl::new_empty!(
14376 NodeListExtendedAttributesRequest,
14377 fidl::encoding::DefaultFuchsiaResourceDialect
14378 );
14379 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14380 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14381 Ok(NodeRequest::ListExtendedAttributes {
14382 iterator: req.iterator,
14383
14384 control_handle,
14385 })
14386 }
14387 0x45ffa3ccfdeb76db => {
14388 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14389 let mut req = fidl::new_empty!(
14390 NodeGetExtendedAttributeRequest,
14391 fidl::encoding::DefaultFuchsiaResourceDialect
14392 );
14393 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14394 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14395 Ok(NodeRequest::GetExtendedAttribute {
14396 name: req.name,
14397
14398 responder: NodeGetExtendedAttributeResponder {
14399 control_handle: std::mem::ManuallyDrop::new(control_handle),
14400 tx_id: header.tx_id,
14401 },
14402 })
14403 }
14404 0x4a951362f681f23c => {
14405 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14406 let mut req = fidl::new_empty!(
14407 NodeSetExtendedAttributeRequest,
14408 fidl::encoding::DefaultFuchsiaResourceDialect
14409 );
14410 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14411 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14412 Ok(NodeRequest::SetExtendedAttribute {
14413 name: req.name,
14414 value: req.value,
14415 mode: req.mode,
14416
14417 responder: NodeSetExtendedAttributeResponder {
14418 control_handle: std::mem::ManuallyDrop::new(control_handle),
14419 tx_id: header.tx_id,
14420 },
14421 })
14422 }
14423 0x7a0b9f3a9bf9032d => {
14424 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14425 let mut req = fidl::new_empty!(
14426 NodeRemoveExtendedAttributeRequest,
14427 fidl::encoding::DefaultFuchsiaResourceDialect
14428 );
14429 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14430 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14431 Ok(NodeRequest::RemoveExtendedAttribute {
14432 name: req.name,
14433
14434 responder: NodeRemoveExtendedAttributeResponder {
14435 control_handle: std::mem::ManuallyDrop::new(control_handle),
14436 tx_id: header.tx_id,
14437 },
14438 })
14439 }
14440 _ if header.tx_id == 0
14441 && header
14442 .dynamic_flags()
14443 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14444 {
14445 Ok(NodeRequest::_UnknownMethod {
14446 ordinal: header.ordinal,
14447 control_handle: NodeControlHandle { inner: this.inner.clone() },
14448 method_type: fidl::MethodType::OneWay,
14449 })
14450 }
14451 _ if header
14452 .dynamic_flags()
14453 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14454 {
14455 this.inner.send_framework_err(
14456 fidl::encoding::FrameworkErr::UnknownMethod,
14457 header.tx_id,
14458 header.ordinal,
14459 header.dynamic_flags(),
14460 (bytes, handles),
14461 )?;
14462 Ok(NodeRequest::_UnknownMethod {
14463 ordinal: header.ordinal,
14464 control_handle: NodeControlHandle { inner: this.inner.clone() },
14465 method_type: fidl::MethodType::TwoWay,
14466 })
14467 }
14468 _ => Err(fidl::Error::UnknownOrdinal {
14469 ordinal: header.ordinal,
14470 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14471 }),
14472 }))
14473 },
14474 )
14475 }
14476}
14477
14478#[derive(Debug)]
14480pub enum NodeRequest {
14481 Clone {
14482 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
14483 control_handle: NodeControlHandle,
14484 },
14485 Close {
14496 responder: NodeCloseResponder,
14497 },
14498 Query {
14499 responder: NodeQueryResponder,
14500 },
14501 DeprecatedClone {
14503 flags: OpenFlags,
14504 object: fidl::endpoints::ServerEnd<NodeMarker>,
14505 control_handle: NodeControlHandle,
14506 },
14507 DeprecatedGetAttr {
14509 responder: NodeDeprecatedGetAttrResponder,
14510 },
14511 DeprecatedSetAttr {
14513 flags: NodeAttributeFlags,
14514 attributes: NodeAttributes,
14515 responder: NodeDeprecatedSetAttrResponder,
14516 },
14517 DeprecatedGetFlags {
14519 responder: NodeDeprecatedGetFlagsResponder,
14520 },
14521 DeprecatedSetFlags {
14523 flags: OpenFlags,
14524 responder: NodeDeprecatedSetFlagsResponder,
14525 },
14526 GetFlags {
14535 responder: NodeGetFlagsResponder,
14536 },
14537 SetFlags {
14547 flags: Flags,
14548 responder: NodeSetFlagsResponder,
14549 },
14550 QueryFilesystem {
14552 responder: NodeQueryFilesystemResponder,
14553 },
14554 GetAttributes {
14568 query: NodeAttributesQuery,
14569 responder: NodeGetAttributesResponder,
14570 },
14571 UpdateAttributes {
14580 payload: MutableNodeAttributes,
14581 responder: NodeUpdateAttributesResponder,
14582 },
14583 Sync {
14593 responder: NodeSyncResponder,
14594 },
14595 ListExtendedAttributes {
14604 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
14605 control_handle: NodeControlHandle,
14606 },
14607 GetExtendedAttribute {
14614 name: Vec<u8>,
14615 responder: NodeGetExtendedAttributeResponder,
14616 },
14617 SetExtendedAttribute {
14625 name: Vec<u8>,
14626 value: ExtendedAttributeValue,
14627 mode: SetExtendedAttributeMode,
14628 responder: NodeSetExtendedAttributeResponder,
14629 },
14630 RemoveExtendedAttribute {
14636 name: Vec<u8>,
14637 responder: NodeRemoveExtendedAttributeResponder,
14638 },
14639 #[non_exhaustive]
14641 _UnknownMethod {
14642 ordinal: u64,
14644 control_handle: NodeControlHandle,
14645 method_type: fidl::MethodType,
14646 },
14647}
14648
14649impl NodeRequest {
14650 #[allow(irrefutable_let_patterns)]
14651 pub fn into_clone(
14652 self,
14653 ) -> Option<(
14654 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
14655 NodeControlHandle,
14656 )> {
14657 if let NodeRequest::Clone { request, control_handle } = self {
14658 Some((request, control_handle))
14659 } else {
14660 None
14661 }
14662 }
14663
14664 #[allow(irrefutable_let_patterns)]
14665 pub fn into_close(self) -> Option<(NodeCloseResponder)> {
14666 if let NodeRequest::Close { responder } = self { Some((responder)) } else { None }
14667 }
14668
14669 #[allow(irrefutable_let_patterns)]
14670 pub fn into_query(self) -> Option<(NodeQueryResponder)> {
14671 if let NodeRequest::Query { responder } = self { Some((responder)) } else { None }
14672 }
14673
14674 #[allow(irrefutable_let_patterns)]
14675 pub fn into_deprecated_clone(
14676 self,
14677 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, NodeControlHandle)> {
14678 if let NodeRequest::DeprecatedClone { flags, object, control_handle } = self {
14679 Some((flags, object, control_handle))
14680 } else {
14681 None
14682 }
14683 }
14684
14685 #[allow(irrefutable_let_patterns)]
14686 pub fn into_deprecated_get_attr(self) -> Option<(NodeDeprecatedGetAttrResponder)> {
14687 if let NodeRequest::DeprecatedGetAttr { responder } = self {
14688 Some((responder))
14689 } else {
14690 None
14691 }
14692 }
14693
14694 #[allow(irrefutable_let_patterns)]
14695 pub fn into_deprecated_set_attr(
14696 self,
14697 ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
14698 if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
14699 Some((flags, attributes, responder))
14700 } else {
14701 None
14702 }
14703 }
14704
14705 #[allow(irrefutable_let_patterns)]
14706 pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
14707 if let NodeRequest::DeprecatedGetFlags { responder } = self {
14708 Some((responder))
14709 } else {
14710 None
14711 }
14712 }
14713
14714 #[allow(irrefutable_let_patterns)]
14715 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
14716 if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
14717 Some((flags, responder))
14718 } else {
14719 None
14720 }
14721 }
14722
14723 #[allow(irrefutable_let_patterns)]
14724 pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
14725 if let NodeRequest::GetFlags { responder } = self { Some((responder)) } else { None }
14726 }
14727
14728 #[allow(irrefutable_let_patterns)]
14729 pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
14730 if let NodeRequest::SetFlags { flags, responder } = self {
14731 Some((flags, responder))
14732 } else {
14733 None
14734 }
14735 }
14736
14737 #[allow(irrefutable_let_patterns)]
14738 pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
14739 if let NodeRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
14740 }
14741
14742 #[allow(irrefutable_let_patterns)]
14743 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
14744 if let NodeRequest::GetAttributes { query, responder } = self {
14745 Some((query, responder))
14746 } else {
14747 None
14748 }
14749 }
14750
14751 #[allow(irrefutable_let_patterns)]
14752 pub fn into_update_attributes(
14753 self,
14754 ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
14755 if let NodeRequest::UpdateAttributes { payload, responder } = self {
14756 Some((payload, responder))
14757 } else {
14758 None
14759 }
14760 }
14761
14762 #[allow(irrefutable_let_patterns)]
14763 pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
14764 if let NodeRequest::Sync { responder } = self { Some((responder)) } else { None }
14765 }
14766
14767 #[allow(irrefutable_let_patterns)]
14768 pub fn into_list_extended_attributes(
14769 self,
14770 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
14771 {
14772 if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
14773 Some((iterator, control_handle))
14774 } else {
14775 None
14776 }
14777 }
14778
14779 #[allow(irrefutable_let_patterns)]
14780 pub fn into_get_extended_attribute(
14781 self,
14782 ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
14783 if let NodeRequest::GetExtendedAttribute { name, responder } = self {
14784 Some((name, responder))
14785 } else {
14786 None
14787 }
14788 }
14789
14790 #[allow(irrefutable_let_patterns)]
14791 pub fn into_set_extended_attribute(
14792 self,
14793 ) -> Option<(
14794 Vec<u8>,
14795 ExtendedAttributeValue,
14796 SetExtendedAttributeMode,
14797 NodeSetExtendedAttributeResponder,
14798 )> {
14799 if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
14800 Some((name, value, mode, responder))
14801 } else {
14802 None
14803 }
14804 }
14805
14806 #[allow(irrefutable_let_patterns)]
14807 pub fn into_remove_extended_attribute(
14808 self,
14809 ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
14810 if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
14811 Some((name, responder))
14812 } else {
14813 None
14814 }
14815 }
14816
14817 pub fn method_name(&self) -> &'static str {
14819 match *self {
14820 NodeRequest::Clone { .. } => "clone",
14821 NodeRequest::Close { .. } => "close",
14822 NodeRequest::Query { .. } => "query",
14823 NodeRequest::DeprecatedClone { .. } => "deprecated_clone",
14824 NodeRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
14825 NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
14826 NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
14827 NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
14828 NodeRequest::GetFlags { .. } => "get_flags",
14829 NodeRequest::SetFlags { .. } => "set_flags",
14830 NodeRequest::QueryFilesystem { .. } => "query_filesystem",
14831 NodeRequest::GetAttributes { .. } => "get_attributes",
14832 NodeRequest::UpdateAttributes { .. } => "update_attributes",
14833 NodeRequest::Sync { .. } => "sync",
14834 NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
14835 NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
14836 NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
14837 NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
14838 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
14839 "unknown one-way method"
14840 }
14841 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
14842 "unknown two-way method"
14843 }
14844 }
14845 }
14846}
14847
14848#[derive(Debug, Clone)]
14849pub struct NodeControlHandle {
14850 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14851}
14852
14853impl fidl::endpoints::ControlHandle for NodeControlHandle {
14854 fn shutdown(&self) {
14855 self.inner.shutdown()
14856 }
14857
14858 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
14859 self.inner.shutdown_with_epitaph(status)
14860 }
14861
14862 fn is_closed(&self) -> bool {
14863 self.inner.channel().is_closed()
14864 }
14865 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
14866 self.inner.channel().on_closed()
14867 }
14868
14869 #[cfg(target_os = "fuchsia")]
14870 fn signal_peer(
14871 &self,
14872 clear_mask: zx::Signals,
14873 set_mask: zx::Signals,
14874 ) -> Result<(), zx_status::Status> {
14875 use fidl::Peered;
14876 self.inner.channel().signal_peer(clear_mask, set_mask)
14877 }
14878}
14879
14880impl NodeControlHandle {
14881 pub fn send_on_open_(
14882 &self,
14883 mut s: i32,
14884 mut info: Option<NodeInfoDeprecated>,
14885 ) -> Result<(), fidl::Error> {
14886 self.inner.send::<NodeOnOpenRequest>(
14887 (s, info.as_mut()),
14888 0,
14889 0x7fc7bbb1dbfd1972,
14890 fidl::encoding::DynamicFlags::FLEXIBLE,
14891 )
14892 }
14893
14894 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
14895 self.inner.send::<Representation>(
14896 &mut payload,
14897 0,
14898 0x5cb40567d80a510c,
14899 fidl::encoding::DynamicFlags::empty(),
14900 )
14901 }
14902}
14903
14904#[must_use = "FIDL methods require a response to be sent"]
14905#[derive(Debug)]
14906pub struct NodeCloseResponder {
14907 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
14908 tx_id: u32,
14909}
14910
14911impl std::ops::Drop for NodeCloseResponder {
14915 fn drop(&mut self) {
14916 self.control_handle.shutdown();
14917 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
14919 }
14920}
14921
14922impl fidl::endpoints::Responder for NodeCloseResponder {
14923 type ControlHandle = NodeControlHandle;
14924
14925 fn control_handle(&self) -> &NodeControlHandle {
14926 &self.control_handle
14927 }
14928
14929 fn drop_without_shutdown(mut self) {
14930 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
14932 std::mem::forget(self);
14934 }
14935}
14936
14937impl NodeCloseResponder {
14938 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
14942 let _result = self.send_raw(result);
14943 if _result.is_err() {
14944 self.control_handle.shutdown();
14945 }
14946 self.drop_without_shutdown();
14947 _result
14948 }
14949
14950 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
14952 let _result = self.send_raw(result);
14953 self.drop_without_shutdown();
14954 _result
14955 }
14956
14957 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
14958 self.control_handle
14959 .inner
14960 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
14961 result,
14962 self.tx_id,
14963 0x5ac5d459ad7f657e,
14964 fidl::encoding::DynamicFlags::empty(),
14965 )
14966 }
14967}
14968
14969#[must_use = "FIDL methods require a response to be sent"]
14970#[derive(Debug)]
14971pub struct NodeQueryResponder {
14972 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
14973 tx_id: u32,
14974}
14975
14976impl std::ops::Drop for NodeQueryResponder {
14980 fn drop(&mut self) {
14981 self.control_handle.shutdown();
14982 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
14984 }
14985}
14986
14987impl fidl::endpoints::Responder for NodeQueryResponder {
14988 type ControlHandle = NodeControlHandle;
14989
14990 fn control_handle(&self) -> &NodeControlHandle {
14991 &self.control_handle
14992 }
14993
14994 fn drop_without_shutdown(mut self) {
14995 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
14997 std::mem::forget(self);
14999 }
15000}
15001
15002impl NodeQueryResponder {
15003 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15007 let _result = self.send_raw(protocol);
15008 if _result.is_err() {
15009 self.control_handle.shutdown();
15010 }
15011 self.drop_without_shutdown();
15012 _result
15013 }
15014
15015 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15017 let _result = self.send_raw(protocol);
15018 self.drop_without_shutdown();
15019 _result
15020 }
15021
15022 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15023 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
15024 (protocol,),
15025 self.tx_id,
15026 0x2658edee9decfc06,
15027 fidl::encoding::DynamicFlags::empty(),
15028 )
15029 }
15030}
15031
15032#[must_use = "FIDL methods require a response to be sent"]
15033#[derive(Debug)]
15034pub struct NodeDeprecatedGetAttrResponder {
15035 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15036 tx_id: u32,
15037}
15038
15039impl std::ops::Drop for NodeDeprecatedGetAttrResponder {
15043 fn drop(&mut self) {
15044 self.control_handle.shutdown();
15045 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15047 }
15048}
15049
15050impl fidl::endpoints::Responder for NodeDeprecatedGetAttrResponder {
15051 type ControlHandle = NodeControlHandle;
15052
15053 fn control_handle(&self) -> &NodeControlHandle {
15054 &self.control_handle
15055 }
15056
15057 fn drop_without_shutdown(mut self) {
15058 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15060 std::mem::forget(self);
15062 }
15063}
15064
15065impl NodeDeprecatedGetAttrResponder {
15066 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15070 let _result = self.send_raw(s, attributes);
15071 if _result.is_err() {
15072 self.control_handle.shutdown();
15073 }
15074 self.drop_without_shutdown();
15075 _result
15076 }
15077
15078 pub fn send_no_shutdown_on_err(
15080 self,
15081 mut s: i32,
15082 mut attributes: &NodeAttributes,
15083 ) -> Result<(), fidl::Error> {
15084 let _result = self.send_raw(s, attributes);
15085 self.drop_without_shutdown();
15086 _result
15087 }
15088
15089 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15090 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
15091 (s, attributes),
15092 self.tx_id,
15093 0x78985e216314dafd,
15094 fidl::encoding::DynamicFlags::empty(),
15095 )
15096 }
15097}
15098
15099#[must_use = "FIDL methods require a response to be sent"]
15100#[derive(Debug)]
15101pub struct NodeDeprecatedSetAttrResponder {
15102 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15103 tx_id: u32,
15104}
15105
15106impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
15110 fn drop(&mut self) {
15111 self.control_handle.shutdown();
15112 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15114 }
15115}
15116
15117impl fidl::endpoints::Responder for NodeDeprecatedSetAttrResponder {
15118 type ControlHandle = NodeControlHandle;
15119
15120 fn control_handle(&self) -> &NodeControlHandle {
15121 &self.control_handle
15122 }
15123
15124 fn drop_without_shutdown(mut self) {
15125 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15127 std::mem::forget(self);
15129 }
15130}
15131
15132impl NodeDeprecatedSetAttrResponder {
15133 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15137 let _result = self.send_raw(s);
15138 if _result.is_err() {
15139 self.control_handle.shutdown();
15140 }
15141 self.drop_without_shutdown();
15142 _result
15143 }
15144
15145 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15147 let _result = self.send_raw(s);
15148 self.drop_without_shutdown();
15149 _result
15150 }
15151
15152 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15153 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
15154 (s,),
15155 self.tx_id,
15156 0x4186c0f40d938f46,
15157 fidl::encoding::DynamicFlags::empty(),
15158 )
15159 }
15160}
15161
15162#[must_use = "FIDL methods require a response to be sent"]
15163#[derive(Debug)]
15164pub struct NodeDeprecatedGetFlagsResponder {
15165 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15166 tx_id: u32,
15167}
15168
15169impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
15173 fn drop(&mut self) {
15174 self.control_handle.shutdown();
15175 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15177 }
15178}
15179
15180impl fidl::endpoints::Responder for NodeDeprecatedGetFlagsResponder {
15181 type ControlHandle = NodeControlHandle;
15182
15183 fn control_handle(&self) -> &NodeControlHandle {
15184 &self.control_handle
15185 }
15186
15187 fn drop_without_shutdown(mut self) {
15188 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15190 std::mem::forget(self);
15192 }
15193}
15194
15195impl NodeDeprecatedGetFlagsResponder {
15196 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15200 let _result = self.send_raw(s, flags);
15201 if _result.is_err() {
15202 self.control_handle.shutdown();
15203 }
15204 self.drop_without_shutdown();
15205 _result
15206 }
15207
15208 pub fn send_no_shutdown_on_err(
15210 self,
15211 mut s: i32,
15212 mut flags: OpenFlags,
15213 ) -> Result<(), fidl::Error> {
15214 let _result = self.send_raw(s, flags);
15215 self.drop_without_shutdown();
15216 _result
15217 }
15218
15219 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15220 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
15221 (s, flags),
15222 self.tx_id,
15223 0x5b88fffb8eda3aa1,
15224 fidl::encoding::DynamicFlags::empty(),
15225 )
15226 }
15227}
15228
15229#[must_use = "FIDL methods require a response to be sent"]
15230#[derive(Debug)]
15231pub struct NodeDeprecatedSetFlagsResponder {
15232 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15233 tx_id: u32,
15234}
15235
15236impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
15240 fn drop(&mut self) {
15241 self.control_handle.shutdown();
15242 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15244 }
15245}
15246
15247impl fidl::endpoints::Responder for NodeDeprecatedSetFlagsResponder {
15248 type ControlHandle = NodeControlHandle;
15249
15250 fn control_handle(&self) -> &NodeControlHandle {
15251 &self.control_handle
15252 }
15253
15254 fn drop_without_shutdown(mut self) {
15255 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15257 std::mem::forget(self);
15259 }
15260}
15261
15262impl NodeDeprecatedSetFlagsResponder {
15263 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15267 let _result = self.send_raw(s);
15268 if _result.is_err() {
15269 self.control_handle.shutdown();
15270 }
15271 self.drop_without_shutdown();
15272 _result
15273 }
15274
15275 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15277 let _result = self.send_raw(s);
15278 self.drop_without_shutdown();
15279 _result
15280 }
15281
15282 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15283 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
15284 (s,),
15285 self.tx_id,
15286 0x5295b76c71fde733,
15287 fidl::encoding::DynamicFlags::empty(),
15288 )
15289 }
15290}
15291
15292#[must_use = "FIDL methods require a response to be sent"]
15293#[derive(Debug)]
15294pub struct NodeGetFlagsResponder {
15295 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15296 tx_id: u32,
15297}
15298
15299impl std::ops::Drop for NodeGetFlagsResponder {
15303 fn drop(&mut self) {
15304 self.control_handle.shutdown();
15305 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15307 }
15308}
15309
15310impl fidl::endpoints::Responder for NodeGetFlagsResponder {
15311 type ControlHandle = NodeControlHandle;
15312
15313 fn control_handle(&self) -> &NodeControlHandle {
15314 &self.control_handle
15315 }
15316
15317 fn drop_without_shutdown(mut self) {
15318 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15320 std::mem::forget(self);
15322 }
15323}
15324
15325impl NodeGetFlagsResponder {
15326 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15330 let _result = self.send_raw(result);
15331 if _result.is_err() {
15332 self.control_handle.shutdown();
15333 }
15334 self.drop_without_shutdown();
15335 _result
15336 }
15337
15338 pub fn send_no_shutdown_on_err(
15340 self,
15341 mut result: Result<Flags, i32>,
15342 ) -> Result<(), fidl::Error> {
15343 let _result = self.send_raw(result);
15344 self.drop_without_shutdown();
15345 _result
15346 }
15347
15348 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15349 self.control_handle
15350 .inner
15351 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
15352 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
15353 self.tx_id,
15354 0x176eb318f64ec23,
15355 fidl::encoding::DynamicFlags::FLEXIBLE,
15356 )
15357 }
15358}
15359
15360#[must_use = "FIDL methods require a response to be sent"]
15361#[derive(Debug)]
15362pub struct NodeSetFlagsResponder {
15363 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15364 tx_id: u32,
15365}
15366
15367impl std::ops::Drop for NodeSetFlagsResponder {
15371 fn drop(&mut self) {
15372 self.control_handle.shutdown();
15373 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15375 }
15376}
15377
15378impl fidl::endpoints::Responder for NodeSetFlagsResponder {
15379 type ControlHandle = NodeControlHandle;
15380
15381 fn control_handle(&self) -> &NodeControlHandle {
15382 &self.control_handle
15383 }
15384
15385 fn drop_without_shutdown(mut self) {
15386 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15388 std::mem::forget(self);
15390 }
15391}
15392
15393impl NodeSetFlagsResponder {
15394 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15398 let _result = self.send_raw(result);
15399 if _result.is_err() {
15400 self.control_handle.shutdown();
15401 }
15402 self.drop_without_shutdown();
15403 _result
15404 }
15405
15406 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15408 let _result = self.send_raw(result);
15409 self.drop_without_shutdown();
15410 _result
15411 }
15412
15413 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15414 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
15415 fidl::encoding::EmptyStruct,
15416 i32,
15417 >>(
15418 fidl::encoding::FlexibleResult::new(result),
15419 self.tx_id,
15420 0x55a8028685791ea8,
15421 fidl::encoding::DynamicFlags::FLEXIBLE,
15422 )
15423 }
15424}
15425
15426#[must_use = "FIDL methods require a response to be sent"]
15427#[derive(Debug)]
15428pub struct NodeQueryFilesystemResponder {
15429 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15430 tx_id: u32,
15431}
15432
15433impl std::ops::Drop for NodeQueryFilesystemResponder {
15437 fn drop(&mut self) {
15438 self.control_handle.shutdown();
15439 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15441 }
15442}
15443
15444impl fidl::endpoints::Responder for NodeQueryFilesystemResponder {
15445 type ControlHandle = NodeControlHandle;
15446
15447 fn control_handle(&self) -> &NodeControlHandle {
15448 &self.control_handle
15449 }
15450
15451 fn drop_without_shutdown(mut self) {
15452 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15454 std::mem::forget(self);
15456 }
15457}
15458
15459impl NodeQueryFilesystemResponder {
15460 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15464 let _result = self.send_raw(s, info);
15465 if _result.is_err() {
15466 self.control_handle.shutdown();
15467 }
15468 self.drop_without_shutdown();
15469 _result
15470 }
15471
15472 pub fn send_no_shutdown_on_err(
15474 self,
15475 mut s: i32,
15476 mut info: Option<&FilesystemInfo>,
15477 ) -> Result<(), fidl::Error> {
15478 let _result = self.send_raw(s, info);
15479 self.drop_without_shutdown();
15480 _result
15481 }
15482
15483 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15484 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
15485 (s, info),
15486 self.tx_id,
15487 0x6f344a1c6b0a0610,
15488 fidl::encoding::DynamicFlags::empty(),
15489 )
15490 }
15491}
15492
15493#[must_use = "FIDL methods require a response to be sent"]
15494#[derive(Debug)]
15495pub struct NodeGetAttributesResponder {
15496 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15497 tx_id: u32,
15498}
15499
15500impl std::ops::Drop for NodeGetAttributesResponder {
15504 fn drop(&mut self) {
15505 self.control_handle.shutdown();
15506 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15508 }
15509}
15510
15511impl fidl::endpoints::Responder for NodeGetAttributesResponder {
15512 type ControlHandle = NodeControlHandle;
15513
15514 fn control_handle(&self) -> &NodeControlHandle {
15515 &self.control_handle
15516 }
15517
15518 fn drop_without_shutdown(mut self) {
15519 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15521 std::mem::forget(self);
15523 }
15524}
15525
15526impl NodeGetAttributesResponder {
15527 pub fn send(
15531 self,
15532 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15533 ) -> Result<(), fidl::Error> {
15534 let _result = self.send_raw(result);
15535 if _result.is_err() {
15536 self.control_handle.shutdown();
15537 }
15538 self.drop_without_shutdown();
15539 _result
15540 }
15541
15542 pub fn send_no_shutdown_on_err(
15544 self,
15545 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15546 ) -> Result<(), fidl::Error> {
15547 let _result = self.send_raw(result);
15548 self.drop_without_shutdown();
15549 _result
15550 }
15551
15552 fn send_raw(
15553 &self,
15554 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15555 ) -> Result<(), fidl::Error> {
15556 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
15557 result,
15558 self.tx_id,
15559 0x3d4396a638ea053b,
15560 fidl::encoding::DynamicFlags::empty(),
15561 )
15562 }
15563}
15564
15565#[must_use = "FIDL methods require a response to be sent"]
15566#[derive(Debug)]
15567pub struct NodeUpdateAttributesResponder {
15568 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15569 tx_id: u32,
15570}
15571
15572impl std::ops::Drop for NodeUpdateAttributesResponder {
15576 fn drop(&mut self) {
15577 self.control_handle.shutdown();
15578 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15580 }
15581}
15582
15583impl fidl::endpoints::Responder for NodeUpdateAttributesResponder {
15584 type ControlHandle = NodeControlHandle;
15585
15586 fn control_handle(&self) -> &NodeControlHandle {
15587 &self.control_handle
15588 }
15589
15590 fn drop_without_shutdown(mut self) {
15591 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15593 std::mem::forget(self);
15595 }
15596}
15597
15598impl NodeUpdateAttributesResponder {
15599 pub fn send(self, mut result: Result<(), i32>) -> 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(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15613 let _result = self.send_raw(result);
15614 self.drop_without_shutdown();
15615 _result
15616 }
15617
15618 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15619 self.control_handle
15620 .inner
15621 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15622 result,
15623 self.tx_id,
15624 0x3308c1da5a89bf08,
15625 fidl::encoding::DynamicFlags::empty(),
15626 )
15627 }
15628}
15629
15630#[must_use = "FIDL methods require a response to be sent"]
15631#[derive(Debug)]
15632pub struct NodeSyncResponder {
15633 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15634 tx_id: u32,
15635}
15636
15637impl std::ops::Drop for NodeSyncResponder {
15641 fn drop(&mut self) {
15642 self.control_handle.shutdown();
15643 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15645 }
15646}
15647
15648impl fidl::endpoints::Responder for NodeSyncResponder {
15649 type ControlHandle = NodeControlHandle;
15650
15651 fn control_handle(&self) -> &NodeControlHandle {
15652 &self.control_handle
15653 }
15654
15655 fn drop_without_shutdown(mut self) {
15656 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15658 std::mem::forget(self);
15660 }
15661}
15662
15663impl NodeSyncResponder {
15664 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15668 let _result = self.send_raw(result);
15669 if _result.is_err() {
15670 self.control_handle.shutdown();
15671 }
15672 self.drop_without_shutdown();
15673 _result
15674 }
15675
15676 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15678 let _result = self.send_raw(result);
15679 self.drop_without_shutdown();
15680 _result
15681 }
15682
15683 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15684 self.control_handle
15685 .inner
15686 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15687 result,
15688 self.tx_id,
15689 0x2c5c27ca0ab5dc49,
15690 fidl::encoding::DynamicFlags::empty(),
15691 )
15692 }
15693}
15694
15695#[must_use = "FIDL methods require a response to be sent"]
15696#[derive(Debug)]
15697pub struct NodeGetExtendedAttributeResponder {
15698 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15699 tx_id: u32,
15700}
15701
15702impl std::ops::Drop for NodeGetExtendedAttributeResponder {
15706 fn drop(&mut self) {
15707 self.control_handle.shutdown();
15708 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15710 }
15711}
15712
15713impl fidl::endpoints::Responder for NodeGetExtendedAttributeResponder {
15714 type ControlHandle = NodeControlHandle;
15715
15716 fn control_handle(&self) -> &NodeControlHandle {
15717 &self.control_handle
15718 }
15719
15720 fn drop_without_shutdown(mut self) {
15721 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15723 std::mem::forget(self);
15725 }
15726}
15727
15728impl NodeGetExtendedAttributeResponder {
15729 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
15733 let _result = self.send_raw(result);
15734 if _result.is_err() {
15735 self.control_handle.shutdown();
15736 }
15737 self.drop_without_shutdown();
15738 _result
15739 }
15740
15741 pub fn send_no_shutdown_on_err(
15743 self,
15744 mut result: Result<ExtendedAttributeValue, i32>,
15745 ) -> Result<(), fidl::Error> {
15746 let _result = self.send_raw(result);
15747 self.drop_without_shutdown();
15748 _result
15749 }
15750
15751 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
15752 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
15753 result.as_mut().map_err(|e| *e),
15754 self.tx_id,
15755 0x45ffa3ccfdeb76db,
15756 fidl::encoding::DynamicFlags::empty(),
15757 )
15758 }
15759}
15760
15761#[must_use = "FIDL methods require a response to be sent"]
15762#[derive(Debug)]
15763pub struct NodeSetExtendedAttributeResponder {
15764 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15765 tx_id: u32,
15766}
15767
15768impl std::ops::Drop for NodeSetExtendedAttributeResponder {
15772 fn drop(&mut self) {
15773 self.control_handle.shutdown();
15774 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15776 }
15777}
15778
15779impl fidl::endpoints::Responder for NodeSetExtendedAttributeResponder {
15780 type ControlHandle = NodeControlHandle;
15781
15782 fn control_handle(&self) -> &NodeControlHandle {
15783 &self.control_handle
15784 }
15785
15786 fn drop_without_shutdown(mut self) {
15787 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15789 std::mem::forget(self);
15791 }
15792}
15793
15794impl NodeSetExtendedAttributeResponder {
15795 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15799 let _result = self.send_raw(result);
15800 if _result.is_err() {
15801 self.control_handle.shutdown();
15802 }
15803 self.drop_without_shutdown();
15804 _result
15805 }
15806
15807 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15809 let _result = self.send_raw(result);
15810 self.drop_without_shutdown();
15811 _result
15812 }
15813
15814 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15815 self.control_handle
15816 .inner
15817 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15818 result,
15819 self.tx_id,
15820 0x4a951362f681f23c,
15821 fidl::encoding::DynamicFlags::empty(),
15822 )
15823 }
15824}
15825
15826#[must_use = "FIDL methods require a response to be sent"]
15827#[derive(Debug)]
15828pub struct NodeRemoveExtendedAttributeResponder {
15829 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15830 tx_id: u32,
15831}
15832
15833impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
15837 fn drop(&mut self) {
15838 self.control_handle.shutdown();
15839 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15841 }
15842}
15843
15844impl fidl::endpoints::Responder for NodeRemoveExtendedAttributeResponder {
15845 type ControlHandle = NodeControlHandle;
15846
15847 fn control_handle(&self) -> &NodeControlHandle {
15848 &self.control_handle
15849 }
15850
15851 fn drop_without_shutdown(mut self) {
15852 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15854 std::mem::forget(self);
15856 }
15857}
15858
15859impl NodeRemoveExtendedAttributeResponder {
15860 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15864 let _result = self.send_raw(result);
15865 if _result.is_err() {
15866 self.control_handle.shutdown();
15867 }
15868 self.drop_without_shutdown();
15869 _result
15870 }
15871
15872 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15874 let _result = self.send_raw(result);
15875 self.drop_without_shutdown();
15876 _result
15877 }
15878
15879 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15880 self.control_handle
15881 .inner
15882 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15883 result,
15884 self.tx_id,
15885 0x7a0b9f3a9bf9032d,
15886 fidl::encoding::DynamicFlags::empty(),
15887 )
15888 }
15889}
15890
15891#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
15892pub struct ReadableMarker;
15893
15894impl fidl::endpoints::ProtocolMarker for ReadableMarker {
15895 type Proxy = ReadableProxy;
15896 type RequestStream = ReadableRequestStream;
15897 #[cfg(target_os = "fuchsia")]
15898 type SynchronousProxy = ReadableSynchronousProxy;
15899
15900 const DEBUG_NAME: &'static str = "(anonymous) Readable";
15901}
15902pub type ReadableReadResult = Result<Vec<u8>, i32>;
15903
15904pub trait ReadableProxyInterface: Send + Sync {
15905 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
15906 + Send;
15907 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
15908}
15909#[derive(Debug)]
15910#[cfg(target_os = "fuchsia")]
15911pub struct ReadableSynchronousProxy {
15912 client: fidl::client::sync::Client,
15913}
15914
15915#[cfg(target_os = "fuchsia")]
15916impl fidl::endpoints::SynchronousProxy for ReadableSynchronousProxy {
15917 type Proxy = ReadableProxy;
15918 type Protocol = ReadableMarker;
15919
15920 fn from_channel(inner: fidl::Channel) -> Self {
15921 Self::new(inner)
15922 }
15923
15924 fn into_channel(self) -> fidl::Channel {
15925 self.client.into_channel()
15926 }
15927
15928 fn as_channel(&self) -> &fidl::Channel {
15929 self.client.as_channel()
15930 }
15931}
15932
15933#[cfg(target_os = "fuchsia")]
15934impl ReadableSynchronousProxy {
15935 pub fn new(channel: fidl::Channel) -> Self {
15936 let protocol_name = <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
15937 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
15938 }
15939
15940 pub fn into_channel(self) -> fidl::Channel {
15941 self.client.into_channel()
15942 }
15943
15944 pub fn wait_for_event(
15947 &self,
15948 deadline: zx::MonotonicInstant,
15949 ) -> Result<ReadableEvent, fidl::Error> {
15950 ReadableEvent::decode(self.client.wait_for_event(deadline)?)
15951 }
15952
15953 pub fn r#read(
15972 &self,
15973 mut count: u64,
15974 ___deadline: zx::MonotonicInstant,
15975 ) -> Result<ReadableReadResult, fidl::Error> {
15976 let _response = self.client.send_query::<
15977 ReadableReadRequest,
15978 fidl::encoding::ResultType<ReadableReadResponse, i32>,
15979 >(
15980 (count,),
15981 0x57e419a298c8ede,
15982 fidl::encoding::DynamicFlags::empty(),
15983 ___deadline,
15984 )?;
15985 Ok(_response.map(|x| x.data))
15986 }
15987}
15988
15989#[cfg(target_os = "fuchsia")]
15990impl From<ReadableSynchronousProxy> for zx::NullableHandle {
15991 fn from(value: ReadableSynchronousProxy) -> Self {
15992 value.into_channel().into()
15993 }
15994}
15995
15996#[cfg(target_os = "fuchsia")]
15997impl From<fidl::Channel> for ReadableSynchronousProxy {
15998 fn from(value: fidl::Channel) -> Self {
15999 Self::new(value)
16000 }
16001}
16002
16003#[cfg(target_os = "fuchsia")]
16004impl fidl::endpoints::FromClient for ReadableSynchronousProxy {
16005 type Protocol = ReadableMarker;
16006
16007 fn from_client(value: fidl::endpoints::ClientEnd<ReadableMarker>) -> Self {
16008 Self::new(value.into_channel())
16009 }
16010}
16011
16012#[derive(Debug, Clone)]
16013pub struct ReadableProxy {
16014 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
16015}
16016
16017impl fidl::endpoints::Proxy for ReadableProxy {
16018 type Protocol = ReadableMarker;
16019
16020 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
16021 Self::new(inner)
16022 }
16023
16024 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
16025 self.client.into_channel().map_err(|client| Self { client })
16026 }
16027
16028 fn as_channel(&self) -> &::fidl::AsyncChannel {
16029 self.client.as_channel()
16030 }
16031}
16032
16033impl ReadableProxy {
16034 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
16036 let protocol_name = <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16037 Self { client: fidl::client::Client::new(channel, protocol_name) }
16038 }
16039
16040 pub fn take_event_stream(&self) -> ReadableEventStream {
16046 ReadableEventStream { event_receiver: self.client.take_event_receiver() }
16047 }
16048
16049 pub fn r#read(
16068 &self,
16069 mut count: u64,
16070 ) -> fidl::client::QueryResponseFut<
16071 ReadableReadResult,
16072 fidl::encoding::DefaultFuchsiaResourceDialect,
16073 > {
16074 ReadableProxyInterface::r#read(self, count)
16075 }
16076}
16077
16078impl ReadableProxyInterface for ReadableProxy {
16079 type ReadResponseFut = fidl::client::QueryResponseFut<
16080 ReadableReadResult,
16081 fidl::encoding::DefaultFuchsiaResourceDialect,
16082 >;
16083 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
16084 fn _decode(
16085 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
16086 ) -> Result<ReadableReadResult, fidl::Error> {
16087 let _response = fidl::client::decode_transaction_body::<
16088 fidl::encoding::ResultType<ReadableReadResponse, i32>,
16089 fidl::encoding::DefaultFuchsiaResourceDialect,
16090 0x57e419a298c8ede,
16091 >(_buf?)?;
16092 Ok(_response.map(|x| x.data))
16093 }
16094 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
16095 (count,),
16096 0x57e419a298c8ede,
16097 fidl::encoding::DynamicFlags::empty(),
16098 _decode,
16099 )
16100 }
16101}
16102
16103pub struct ReadableEventStream {
16104 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
16105}
16106
16107impl std::marker::Unpin for ReadableEventStream {}
16108
16109impl futures::stream::FusedStream for ReadableEventStream {
16110 fn is_terminated(&self) -> bool {
16111 self.event_receiver.is_terminated()
16112 }
16113}
16114
16115impl futures::Stream for ReadableEventStream {
16116 type Item = Result<ReadableEvent, fidl::Error>;
16117
16118 fn poll_next(
16119 mut self: std::pin::Pin<&mut Self>,
16120 cx: &mut std::task::Context<'_>,
16121 ) -> std::task::Poll<Option<Self::Item>> {
16122 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
16123 &mut self.event_receiver,
16124 cx
16125 )?) {
16126 Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
16127 None => std::task::Poll::Ready(None),
16128 }
16129 }
16130}
16131
16132#[derive(Debug)]
16133pub enum ReadableEvent {}
16134
16135impl ReadableEvent {
16136 fn decode(
16138 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
16139 ) -> Result<ReadableEvent, fidl::Error> {
16140 let (bytes, _handles) = buf.split_mut();
16141 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16142 debug_assert_eq!(tx_header.tx_id, 0);
16143 match tx_header.ordinal {
16144 _ => Err(fidl::Error::UnknownOrdinal {
16145 ordinal: tx_header.ordinal,
16146 protocol_name: <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16147 }),
16148 }
16149 }
16150}
16151
16152pub struct ReadableRequestStream {
16154 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16155 is_terminated: bool,
16156}
16157
16158impl std::marker::Unpin for ReadableRequestStream {}
16159
16160impl futures::stream::FusedStream for ReadableRequestStream {
16161 fn is_terminated(&self) -> bool {
16162 self.is_terminated
16163 }
16164}
16165
16166impl fidl::endpoints::RequestStream for ReadableRequestStream {
16167 type Protocol = ReadableMarker;
16168 type ControlHandle = ReadableControlHandle;
16169
16170 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
16171 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
16172 }
16173
16174 fn control_handle(&self) -> Self::ControlHandle {
16175 ReadableControlHandle { inner: self.inner.clone() }
16176 }
16177
16178 fn into_inner(
16179 self,
16180 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
16181 {
16182 (self.inner, self.is_terminated)
16183 }
16184
16185 fn from_inner(
16186 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16187 is_terminated: bool,
16188 ) -> Self {
16189 Self { inner, is_terminated }
16190 }
16191}
16192
16193impl futures::Stream for ReadableRequestStream {
16194 type Item = Result<ReadableRequest, fidl::Error>;
16195
16196 fn poll_next(
16197 mut self: std::pin::Pin<&mut Self>,
16198 cx: &mut std::task::Context<'_>,
16199 ) -> std::task::Poll<Option<Self::Item>> {
16200 let this = &mut *self;
16201 if this.inner.check_shutdown(cx) {
16202 this.is_terminated = true;
16203 return std::task::Poll::Ready(None);
16204 }
16205 if this.is_terminated {
16206 panic!("polled ReadableRequestStream after completion");
16207 }
16208 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
16209 |bytes, handles| {
16210 match this.inner.channel().read_etc(cx, bytes, handles) {
16211 std::task::Poll::Ready(Ok(())) => {}
16212 std::task::Poll::Pending => return std::task::Poll::Pending,
16213 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
16214 this.is_terminated = true;
16215 return std::task::Poll::Ready(None);
16216 }
16217 std::task::Poll::Ready(Err(e)) => {
16218 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
16219 e.into(),
16220 ))));
16221 }
16222 }
16223
16224 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16226
16227 std::task::Poll::Ready(Some(match header.ordinal {
16228 0x57e419a298c8ede => {
16229 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
16230 let mut req = fidl::new_empty!(
16231 ReadableReadRequest,
16232 fidl::encoding::DefaultFuchsiaResourceDialect
16233 );
16234 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
16235 let control_handle = ReadableControlHandle { inner: this.inner.clone() };
16236 Ok(ReadableRequest::Read {
16237 count: req.count,
16238
16239 responder: ReadableReadResponder {
16240 control_handle: std::mem::ManuallyDrop::new(control_handle),
16241 tx_id: header.tx_id,
16242 },
16243 })
16244 }
16245 _ => Err(fidl::Error::UnknownOrdinal {
16246 ordinal: header.ordinal,
16247 protocol_name:
16248 <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16249 }),
16250 }))
16251 },
16252 )
16253 }
16254}
16255
16256#[derive(Debug)]
16257pub enum ReadableRequest {
16258 Read { count: u64, responder: ReadableReadResponder },
16277}
16278
16279impl ReadableRequest {
16280 #[allow(irrefutable_let_patterns)]
16281 pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
16282 if let ReadableRequest::Read { count, responder } = self {
16283 Some((count, responder))
16284 } else {
16285 None
16286 }
16287 }
16288
16289 pub fn method_name(&self) -> &'static str {
16291 match *self {
16292 ReadableRequest::Read { .. } => "read",
16293 }
16294 }
16295}
16296
16297#[derive(Debug, Clone)]
16298pub struct ReadableControlHandle {
16299 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16300}
16301
16302impl fidl::endpoints::ControlHandle for ReadableControlHandle {
16303 fn shutdown(&self) {
16304 self.inner.shutdown()
16305 }
16306
16307 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
16308 self.inner.shutdown_with_epitaph(status)
16309 }
16310
16311 fn is_closed(&self) -> bool {
16312 self.inner.channel().is_closed()
16313 }
16314 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
16315 self.inner.channel().on_closed()
16316 }
16317
16318 #[cfg(target_os = "fuchsia")]
16319 fn signal_peer(
16320 &self,
16321 clear_mask: zx::Signals,
16322 set_mask: zx::Signals,
16323 ) -> Result<(), zx_status::Status> {
16324 use fidl::Peered;
16325 self.inner.channel().signal_peer(clear_mask, set_mask)
16326 }
16327}
16328
16329impl ReadableControlHandle {}
16330
16331#[must_use = "FIDL methods require a response to be sent"]
16332#[derive(Debug)]
16333pub struct ReadableReadResponder {
16334 control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
16335 tx_id: u32,
16336}
16337
16338impl std::ops::Drop for ReadableReadResponder {
16342 fn drop(&mut self) {
16343 self.control_handle.shutdown();
16344 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16346 }
16347}
16348
16349impl fidl::endpoints::Responder for ReadableReadResponder {
16350 type ControlHandle = ReadableControlHandle;
16351
16352 fn control_handle(&self) -> &ReadableControlHandle {
16353 &self.control_handle
16354 }
16355
16356 fn drop_without_shutdown(mut self) {
16357 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16359 std::mem::forget(self);
16361 }
16362}
16363
16364impl ReadableReadResponder {
16365 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
16369 let _result = self.send_raw(result);
16370 if _result.is_err() {
16371 self.control_handle.shutdown();
16372 }
16373 self.drop_without_shutdown();
16374 _result
16375 }
16376
16377 pub fn send_no_shutdown_on_err(
16379 self,
16380 mut result: Result<&[u8], i32>,
16381 ) -> Result<(), fidl::Error> {
16382 let _result = self.send_raw(result);
16383 self.drop_without_shutdown();
16384 _result
16385 }
16386
16387 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
16388 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
16389 result.map(|data| (data,)),
16390 self.tx_id,
16391 0x57e419a298c8ede,
16392 fidl::encoding::DynamicFlags::empty(),
16393 )
16394 }
16395}
16396
16397#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16398pub struct SymlinkMarker;
16399
16400impl fidl::endpoints::ProtocolMarker for SymlinkMarker {
16401 type Proxy = SymlinkProxy;
16402 type RequestStream = SymlinkRequestStream;
16403 #[cfg(target_os = "fuchsia")]
16404 type SynchronousProxy = SymlinkSynchronousProxy;
16405
16406 const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
16407}
16408impl fidl::endpoints::DiscoverableProtocolMarker for SymlinkMarker {}
16409
16410pub trait SymlinkProxyInterface: Send + Sync {
16411 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
16412 + Send;
16413 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
16414 fn r#clone(
16415 &self,
16416 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
16417 ) -> Result<(), fidl::Error>;
16418 type CloseResponseFut: std::future::Future<
16419 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
16420 > + Send;
16421 fn r#close(&self) -> Self::CloseResponseFut;
16422 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
16423 fn r#query(&self) -> Self::QueryResponseFut;
16424 fn r#deprecated_clone(
16425 &self,
16426 flags: OpenFlags,
16427 object: fidl::endpoints::ServerEnd<NodeMarker>,
16428 ) -> Result<(), fidl::Error>;
16429 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
16430 + Send;
16431 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
16432 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
16433 fn r#deprecated_set_attr(
16434 &self,
16435 flags: NodeAttributeFlags,
16436 attributes: &NodeAttributes,
16437 ) -> Self::DeprecatedSetAttrResponseFut;
16438 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
16439 + Send;
16440 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
16441 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
16442 + Send;
16443 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
16444 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
16445 + Send;
16446 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
16447 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
16448 + Send;
16449 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
16450 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
16451 + Send;
16452 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
16453 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
16454 + Send;
16455 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
16456 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
16457 + Send;
16458 fn r#update_attributes(
16459 &self,
16460 payload: &MutableNodeAttributes,
16461 ) -> Self::UpdateAttributesResponseFut;
16462 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
16463 fn r#sync(&self) -> Self::SyncResponseFut;
16464 fn r#list_extended_attributes(
16465 &self,
16466 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
16467 ) -> Result<(), fidl::Error>;
16468 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
16469 + Send;
16470 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
16471 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
16472 + Send;
16473 fn r#set_extended_attribute(
16474 &self,
16475 name: &[u8],
16476 value: ExtendedAttributeValue,
16477 mode: SetExtendedAttributeMode,
16478 ) -> Self::SetExtendedAttributeResponseFut;
16479 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
16480 + Send;
16481 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
16482 type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
16483 fn r#describe(&self) -> Self::DescribeResponseFut;
16484}
16485#[derive(Debug)]
16486#[cfg(target_os = "fuchsia")]
16487pub struct SymlinkSynchronousProxy {
16488 client: fidl::client::sync::Client,
16489}
16490
16491#[cfg(target_os = "fuchsia")]
16492impl fidl::endpoints::SynchronousProxy for SymlinkSynchronousProxy {
16493 type Proxy = SymlinkProxy;
16494 type Protocol = SymlinkMarker;
16495
16496 fn from_channel(inner: fidl::Channel) -> Self {
16497 Self::new(inner)
16498 }
16499
16500 fn into_channel(self) -> fidl::Channel {
16501 self.client.into_channel()
16502 }
16503
16504 fn as_channel(&self) -> &fidl::Channel {
16505 self.client.as_channel()
16506 }
16507}
16508
16509#[cfg(target_os = "fuchsia")]
16510impl SymlinkSynchronousProxy {
16511 pub fn new(channel: fidl::Channel) -> Self {
16512 let protocol_name = <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16513 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
16514 }
16515
16516 pub fn into_channel(self) -> fidl::Channel {
16517 self.client.into_channel()
16518 }
16519
16520 pub fn wait_for_event(
16523 &self,
16524 deadline: zx::MonotonicInstant,
16525 ) -> Result<SymlinkEvent, fidl::Error> {
16526 SymlinkEvent::decode(self.client.wait_for_event(deadline)?)
16527 }
16528
16529 pub fn r#link_into(
16552 &self,
16553 mut dst_parent_token: fidl::Event,
16554 mut dst: &str,
16555 ___deadline: zx::MonotonicInstant,
16556 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
16557 let _response = self.client.send_query::<
16558 LinkableLinkIntoRequest,
16559 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16560 >(
16561 (dst_parent_token, dst,),
16562 0x54f3949246a03e74,
16563 fidl::encoding::DynamicFlags::empty(),
16564 ___deadline,
16565 )?;
16566 Ok(_response.map(|x| x))
16567 }
16568
16569 pub fn r#clone(
16570 &self,
16571 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
16572 ) -> Result<(), fidl::Error> {
16573 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
16574 (request,),
16575 0x20d8a7aba2168a79,
16576 fidl::encoding::DynamicFlags::empty(),
16577 )
16578 }
16579
16580 pub fn r#close(
16591 &self,
16592 ___deadline: zx::MonotonicInstant,
16593 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
16594 let _response = self.client.send_query::<
16595 fidl::encoding::EmptyPayload,
16596 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16597 >(
16598 (),
16599 0x5ac5d459ad7f657e,
16600 fidl::encoding::DynamicFlags::empty(),
16601 ___deadline,
16602 )?;
16603 Ok(_response.map(|x| x))
16604 }
16605
16606 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
16607 let _response = self.client.send_query::<
16608 fidl::encoding::EmptyPayload,
16609 fidl_fuchsia_unknown::QueryableQueryResponse,
16610 >(
16611 (),
16612 0x2658edee9decfc06,
16613 fidl::encoding::DynamicFlags::empty(),
16614 ___deadline,
16615 )?;
16616 Ok(_response.protocol)
16617 }
16618
16619 pub fn r#deprecated_clone(
16621 &self,
16622 mut flags: OpenFlags,
16623 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
16624 ) -> Result<(), fidl::Error> {
16625 self.client.send::<NodeDeprecatedCloneRequest>(
16626 (flags, object),
16627 0x5a61678f293ce16f,
16628 fidl::encoding::DynamicFlags::FLEXIBLE,
16629 )
16630 }
16631
16632 pub fn r#deprecated_get_attr(
16634 &self,
16635 ___deadline: zx::MonotonicInstant,
16636 ) -> Result<(i32, NodeAttributes), fidl::Error> {
16637 let _response =
16638 self.client.send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse>(
16639 (),
16640 0x78985e216314dafd,
16641 fidl::encoding::DynamicFlags::empty(),
16642 ___deadline,
16643 )?;
16644 Ok((_response.s, _response.attributes))
16645 }
16646
16647 pub fn r#deprecated_set_attr(
16649 &self,
16650 mut flags: NodeAttributeFlags,
16651 mut attributes: &NodeAttributes,
16652 ___deadline: zx::MonotonicInstant,
16653 ) -> Result<i32, fidl::Error> {
16654 let _response =
16655 self.client.send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse>(
16656 (flags, attributes),
16657 0x4186c0f40d938f46,
16658 fidl::encoding::DynamicFlags::empty(),
16659 ___deadline,
16660 )?;
16661 Ok(_response.s)
16662 }
16663
16664 pub fn r#deprecated_get_flags(
16666 &self,
16667 ___deadline: zx::MonotonicInstant,
16668 ) -> Result<(i32, OpenFlags), fidl::Error> {
16669 let _response = self
16670 .client
16671 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse>(
16672 (),
16673 0x5b88fffb8eda3aa1,
16674 fidl::encoding::DynamicFlags::empty(),
16675 ___deadline,
16676 )?;
16677 Ok((_response.s, _response.flags))
16678 }
16679
16680 pub fn r#deprecated_set_flags(
16682 &self,
16683 mut flags: OpenFlags,
16684 ___deadline: zx::MonotonicInstant,
16685 ) -> Result<i32, fidl::Error> {
16686 let _response = self
16687 .client
16688 .send_query::<NodeDeprecatedSetFlagsRequest, NodeDeprecatedSetFlagsResponse>(
16689 (flags,),
16690 0x5295b76c71fde733,
16691 fidl::encoding::DynamicFlags::empty(),
16692 ___deadline,
16693 )?;
16694 Ok(_response.s)
16695 }
16696
16697 pub fn r#get_flags(
16706 &self,
16707 ___deadline: zx::MonotonicInstant,
16708 ) -> Result<NodeGetFlagsResult, fidl::Error> {
16709 let _response = self.client.send_query::<
16710 fidl::encoding::EmptyPayload,
16711 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
16712 >(
16713 (),
16714 0x176eb318f64ec23,
16715 fidl::encoding::DynamicFlags::FLEXIBLE,
16716 ___deadline,
16717 )?
16718 .into_result::<SymlinkMarker>("get_flags")?;
16719 Ok(_response.map(|x| x.flags))
16720 }
16721
16722 pub fn r#set_flags(
16732 &self,
16733 mut flags: Flags,
16734 ___deadline: zx::MonotonicInstant,
16735 ) -> Result<NodeSetFlagsResult, fidl::Error> {
16736 let _response = self.client.send_query::<
16737 NodeSetFlagsRequest,
16738 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
16739 >(
16740 (flags,),
16741 0x55a8028685791ea8,
16742 fidl::encoding::DynamicFlags::FLEXIBLE,
16743 ___deadline,
16744 )?
16745 .into_result::<SymlinkMarker>("set_flags")?;
16746 Ok(_response.map(|x| x))
16747 }
16748
16749 pub fn r#query_filesystem(
16751 &self,
16752 ___deadline: zx::MonotonicInstant,
16753 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
16754 let _response =
16755 self.client.send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse>(
16756 (),
16757 0x6f344a1c6b0a0610,
16758 fidl::encoding::DynamicFlags::empty(),
16759 ___deadline,
16760 )?;
16761 Ok((_response.s, _response.info))
16762 }
16763
16764 pub fn r#get_attributes(
16778 &self,
16779 mut query: NodeAttributesQuery,
16780 ___deadline: zx::MonotonicInstant,
16781 ) -> Result<NodeGetAttributesResult, fidl::Error> {
16782 let _response = self.client.send_query::<
16783 NodeGetAttributesRequest,
16784 fidl::encoding::ResultType<NodeAttributes2, i32>,
16785 >(
16786 (query,),
16787 0x3d4396a638ea053b,
16788 fidl::encoding::DynamicFlags::empty(),
16789 ___deadline,
16790 )?;
16791 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
16792 }
16793
16794 pub fn r#update_attributes(
16803 &self,
16804 mut payload: &MutableNodeAttributes,
16805 ___deadline: zx::MonotonicInstant,
16806 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
16807 let _response = self.client.send_query::<
16808 MutableNodeAttributes,
16809 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16810 >(
16811 payload,
16812 0x3308c1da5a89bf08,
16813 fidl::encoding::DynamicFlags::empty(),
16814 ___deadline,
16815 )?;
16816 Ok(_response.map(|x| x))
16817 }
16818
16819 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
16829 let _response = self.client.send_query::<
16830 fidl::encoding::EmptyPayload,
16831 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16832 >(
16833 (),
16834 0x2c5c27ca0ab5dc49,
16835 fidl::encoding::DynamicFlags::empty(),
16836 ___deadline,
16837 )?;
16838 Ok(_response.map(|x| x))
16839 }
16840
16841 pub fn r#list_extended_attributes(
16850 &self,
16851 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
16852 ) -> Result<(), fidl::Error> {
16853 self.client.send::<NodeListExtendedAttributesRequest>(
16854 (iterator,),
16855 0x4b61033de007fcd0,
16856 fidl::encoding::DynamicFlags::empty(),
16857 )
16858 }
16859
16860 pub fn r#get_extended_attribute(
16867 &self,
16868 mut name: &[u8],
16869 ___deadline: zx::MonotonicInstant,
16870 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
16871 let _response = self.client.send_query::<
16872 NodeGetExtendedAttributeRequest,
16873 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
16874 >(
16875 (name,),
16876 0x45ffa3ccfdeb76db,
16877 fidl::encoding::DynamicFlags::empty(),
16878 ___deadline,
16879 )?;
16880 Ok(_response.map(|x| x))
16881 }
16882
16883 pub fn r#set_extended_attribute(
16891 &self,
16892 mut name: &[u8],
16893 mut value: ExtendedAttributeValue,
16894 mut mode: SetExtendedAttributeMode,
16895 ___deadline: zx::MonotonicInstant,
16896 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
16897 let _response = self.client.send_query::<
16898 NodeSetExtendedAttributeRequest,
16899 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16900 >(
16901 (name, &mut value, mode,),
16902 0x4a951362f681f23c,
16903 fidl::encoding::DynamicFlags::empty(),
16904 ___deadline,
16905 )?;
16906 Ok(_response.map(|x| x))
16907 }
16908
16909 pub fn r#remove_extended_attribute(
16915 &self,
16916 mut name: &[u8],
16917 ___deadline: zx::MonotonicInstant,
16918 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
16919 let _response = self.client.send_query::<
16920 NodeRemoveExtendedAttributeRequest,
16921 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
16922 >(
16923 (name,),
16924 0x7a0b9f3a9bf9032d,
16925 fidl::encoding::DynamicFlags::empty(),
16926 ___deadline,
16927 )?;
16928 Ok(_response.map(|x| x))
16929 }
16930
16931 pub fn r#describe(
16932 &self,
16933 ___deadline: zx::MonotonicInstant,
16934 ) -> Result<SymlinkInfo, fidl::Error> {
16935 let _response = self
16936 .client
16937 .send_query::<fidl::encoding::EmptyPayload, fidl::encoding::FlexibleType<SymlinkInfo>>(
16938 (),
16939 0x742c2ea5e89831f3,
16940 fidl::encoding::DynamicFlags::FLEXIBLE,
16941 ___deadline,
16942 )?
16943 .into_result::<SymlinkMarker>("describe")?;
16944 Ok(_response)
16945 }
16946}
16947
16948#[cfg(target_os = "fuchsia")]
16949impl From<SymlinkSynchronousProxy> for zx::NullableHandle {
16950 fn from(value: SymlinkSynchronousProxy) -> Self {
16951 value.into_channel().into()
16952 }
16953}
16954
16955#[cfg(target_os = "fuchsia")]
16956impl From<fidl::Channel> for SymlinkSynchronousProxy {
16957 fn from(value: fidl::Channel) -> Self {
16958 Self::new(value)
16959 }
16960}
16961
16962#[cfg(target_os = "fuchsia")]
16963impl fidl::endpoints::FromClient for SymlinkSynchronousProxy {
16964 type Protocol = SymlinkMarker;
16965
16966 fn from_client(value: fidl::endpoints::ClientEnd<SymlinkMarker>) -> Self {
16967 Self::new(value.into_channel())
16968 }
16969}
16970
16971#[derive(Debug, Clone)]
16972pub struct SymlinkProxy {
16973 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
16974}
16975
16976impl fidl::endpoints::Proxy for SymlinkProxy {
16977 type Protocol = SymlinkMarker;
16978
16979 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
16980 Self::new(inner)
16981 }
16982
16983 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
16984 self.client.into_channel().map_err(|client| Self { client })
16985 }
16986
16987 fn as_channel(&self) -> &::fidl::AsyncChannel {
16988 self.client.as_channel()
16989 }
16990}
16991
16992impl SymlinkProxy {
16993 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
16995 let protocol_name = <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16996 Self { client: fidl::client::Client::new(channel, protocol_name) }
16997 }
16998
16999 pub fn take_event_stream(&self) -> SymlinkEventStream {
17005 SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
17006 }
17007
17008 pub fn r#link_into(
17031 &self,
17032 mut dst_parent_token: fidl::Event,
17033 mut dst: &str,
17034 ) -> fidl::client::QueryResponseFut<
17035 LinkableLinkIntoResult,
17036 fidl::encoding::DefaultFuchsiaResourceDialect,
17037 > {
17038 SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
17039 }
17040
17041 pub fn r#clone(
17042 &self,
17043 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17044 ) -> Result<(), fidl::Error> {
17045 SymlinkProxyInterface::r#clone(self, request)
17046 }
17047
17048 pub fn r#close(
17059 &self,
17060 ) -> fidl::client::QueryResponseFut<
17061 fidl_fuchsia_unknown::CloseableCloseResult,
17062 fidl::encoding::DefaultFuchsiaResourceDialect,
17063 > {
17064 SymlinkProxyInterface::r#close(self)
17065 }
17066
17067 pub fn r#query(
17068 &self,
17069 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
17070 {
17071 SymlinkProxyInterface::r#query(self)
17072 }
17073
17074 pub fn r#deprecated_clone(
17076 &self,
17077 mut flags: OpenFlags,
17078 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
17079 ) -> Result<(), fidl::Error> {
17080 SymlinkProxyInterface::r#deprecated_clone(self, flags, object)
17081 }
17082
17083 pub fn r#deprecated_get_attr(
17085 &self,
17086 ) -> fidl::client::QueryResponseFut<
17087 (i32, NodeAttributes),
17088 fidl::encoding::DefaultFuchsiaResourceDialect,
17089 > {
17090 SymlinkProxyInterface::r#deprecated_get_attr(self)
17091 }
17092
17093 pub fn r#deprecated_set_attr(
17095 &self,
17096 mut flags: NodeAttributeFlags,
17097 mut attributes: &NodeAttributes,
17098 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
17099 SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
17100 }
17101
17102 pub fn r#deprecated_get_flags(
17104 &self,
17105 ) -> fidl::client::QueryResponseFut<
17106 (i32, OpenFlags),
17107 fidl::encoding::DefaultFuchsiaResourceDialect,
17108 > {
17109 SymlinkProxyInterface::r#deprecated_get_flags(self)
17110 }
17111
17112 pub fn r#deprecated_set_flags(
17114 &self,
17115 mut flags: OpenFlags,
17116 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
17117 SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
17118 }
17119
17120 pub fn r#get_flags(
17129 &self,
17130 ) -> fidl::client::QueryResponseFut<
17131 NodeGetFlagsResult,
17132 fidl::encoding::DefaultFuchsiaResourceDialect,
17133 > {
17134 SymlinkProxyInterface::r#get_flags(self)
17135 }
17136
17137 pub fn r#set_flags(
17147 &self,
17148 mut flags: Flags,
17149 ) -> fidl::client::QueryResponseFut<
17150 NodeSetFlagsResult,
17151 fidl::encoding::DefaultFuchsiaResourceDialect,
17152 > {
17153 SymlinkProxyInterface::r#set_flags(self, flags)
17154 }
17155
17156 pub fn r#query_filesystem(
17158 &self,
17159 ) -> fidl::client::QueryResponseFut<
17160 (i32, Option<Box<FilesystemInfo>>),
17161 fidl::encoding::DefaultFuchsiaResourceDialect,
17162 > {
17163 SymlinkProxyInterface::r#query_filesystem(self)
17164 }
17165
17166 pub fn r#get_attributes(
17180 &self,
17181 mut query: NodeAttributesQuery,
17182 ) -> fidl::client::QueryResponseFut<
17183 NodeGetAttributesResult,
17184 fidl::encoding::DefaultFuchsiaResourceDialect,
17185 > {
17186 SymlinkProxyInterface::r#get_attributes(self, query)
17187 }
17188
17189 pub fn r#update_attributes(
17198 &self,
17199 mut payload: &MutableNodeAttributes,
17200 ) -> fidl::client::QueryResponseFut<
17201 NodeUpdateAttributesResult,
17202 fidl::encoding::DefaultFuchsiaResourceDialect,
17203 > {
17204 SymlinkProxyInterface::r#update_attributes(self, payload)
17205 }
17206
17207 pub fn r#sync(
17217 &self,
17218 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
17219 {
17220 SymlinkProxyInterface::r#sync(self)
17221 }
17222
17223 pub fn r#list_extended_attributes(
17232 &self,
17233 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17234 ) -> Result<(), fidl::Error> {
17235 SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
17236 }
17237
17238 pub fn r#get_extended_attribute(
17245 &self,
17246 mut name: &[u8],
17247 ) -> fidl::client::QueryResponseFut<
17248 NodeGetExtendedAttributeResult,
17249 fidl::encoding::DefaultFuchsiaResourceDialect,
17250 > {
17251 SymlinkProxyInterface::r#get_extended_attribute(self, name)
17252 }
17253
17254 pub fn r#set_extended_attribute(
17262 &self,
17263 mut name: &[u8],
17264 mut value: ExtendedAttributeValue,
17265 mut mode: SetExtendedAttributeMode,
17266 ) -> fidl::client::QueryResponseFut<
17267 NodeSetExtendedAttributeResult,
17268 fidl::encoding::DefaultFuchsiaResourceDialect,
17269 > {
17270 SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
17271 }
17272
17273 pub fn r#remove_extended_attribute(
17279 &self,
17280 mut name: &[u8],
17281 ) -> fidl::client::QueryResponseFut<
17282 NodeRemoveExtendedAttributeResult,
17283 fidl::encoding::DefaultFuchsiaResourceDialect,
17284 > {
17285 SymlinkProxyInterface::r#remove_extended_attribute(self, name)
17286 }
17287
17288 pub fn r#describe(
17289 &self,
17290 ) -> fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
17291 {
17292 SymlinkProxyInterface::r#describe(self)
17293 }
17294}
17295
17296impl SymlinkProxyInterface for SymlinkProxy {
17297 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
17298 LinkableLinkIntoResult,
17299 fidl::encoding::DefaultFuchsiaResourceDialect,
17300 >;
17301 fn r#link_into(
17302 &self,
17303 mut dst_parent_token: fidl::Event,
17304 mut dst: &str,
17305 ) -> Self::LinkIntoResponseFut {
17306 fn _decode(
17307 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17308 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
17309 let _response = fidl::client::decode_transaction_body::<
17310 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17311 fidl::encoding::DefaultFuchsiaResourceDialect,
17312 0x54f3949246a03e74,
17313 >(_buf?)?;
17314 Ok(_response.map(|x| x))
17315 }
17316 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
17317 (dst_parent_token, dst),
17318 0x54f3949246a03e74,
17319 fidl::encoding::DynamicFlags::empty(),
17320 _decode,
17321 )
17322 }
17323
17324 fn r#clone(
17325 &self,
17326 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17327 ) -> Result<(), fidl::Error> {
17328 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
17329 (request,),
17330 0x20d8a7aba2168a79,
17331 fidl::encoding::DynamicFlags::empty(),
17332 )
17333 }
17334
17335 type CloseResponseFut = fidl::client::QueryResponseFut<
17336 fidl_fuchsia_unknown::CloseableCloseResult,
17337 fidl::encoding::DefaultFuchsiaResourceDialect,
17338 >;
17339 fn r#close(&self) -> Self::CloseResponseFut {
17340 fn _decode(
17341 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17342 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
17343 let _response = fidl::client::decode_transaction_body::<
17344 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17345 fidl::encoding::DefaultFuchsiaResourceDialect,
17346 0x5ac5d459ad7f657e,
17347 >(_buf?)?;
17348 Ok(_response.map(|x| x))
17349 }
17350 self.client.send_query_and_decode::<
17351 fidl::encoding::EmptyPayload,
17352 fidl_fuchsia_unknown::CloseableCloseResult,
17353 >(
17354 (),
17355 0x5ac5d459ad7f657e,
17356 fidl::encoding::DynamicFlags::empty(),
17357 _decode,
17358 )
17359 }
17360
17361 type QueryResponseFut =
17362 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
17363 fn r#query(&self) -> Self::QueryResponseFut {
17364 fn _decode(
17365 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17366 ) -> Result<Vec<u8>, fidl::Error> {
17367 let _response = fidl::client::decode_transaction_body::<
17368 fidl_fuchsia_unknown::QueryableQueryResponse,
17369 fidl::encoding::DefaultFuchsiaResourceDialect,
17370 0x2658edee9decfc06,
17371 >(_buf?)?;
17372 Ok(_response.protocol)
17373 }
17374 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
17375 (),
17376 0x2658edee9decfc06,
17377 fidl::encoding::DynamicFlags::empty(),
17378 _decode,
17379 )
17380 }
17381
17382 fn r#deprecated_clone(
17383 &self,
17384 mut flags: OpenFlags,
17385 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
17386 ) -> Result<(), fidl::Error> {
17387 self.client.send::<NodeDeprecatedCloneRequest>(
17388 (flags, object),
17389 0x5a61678f293ce16f,
17390 fidl::encoding::DynamicFlags::FLEXIBLE,
17391 )
17392 }
17393
17394 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
17395 (i32, NodeAttributes),
17396 fidl::encoding::DefaultFuchsiaResourceDialect,
17397 >;
17398 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
17399 fn _decode(
17400 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17401 ) -> Result<(i32, NodeAttributes), fidl::Error> {
17402 let _response = fidl::client::decode_transaction_body::<
17403 NodeDeprecatedGetAttrResponse,
17404 fidl::encoding::DefaultFuchsiaResourceDialect,
17405 0x78985e216314dafd,
17406 >(_buf?)?;
17407 Ok((_response.s, _response.attributes))
17408 }
17409 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
17410 (),
17411 0x78985e216314dafd,
17412 fidl::encoding::DynamicFlags::empty(),
17413 _decode,
17414 )
17415 }
17416
17417 type DeprecatedSetAttrResponseFut =
17418 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
17419 fn r#deprecated_set_attr(
17420 &self,
17421 mut flags: NodeAttributeFlags,
17422 mut attributes: &NodeAttributes,
17423 ) -> Self::DeprecatedSetAttrResponseFut {
17424 fn _decode(
17425 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17426 ) -> Result<i32, fidl::Error> {
17427 let _response = fidl::client::decode_transaction_body::<
17428 NodeDeprecatedSetAttrResponse,
17429 fidl::encoding::DefaultFuchsiaResourceDialect,
17430 0x4186c0f40d938f46,
17431 >(_buf?)?;
17432 Ok(_response.s)
17433 }
17434 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
17435 (flags, attributes),
17436 0x4186c0f40d938f46,
17437 fidl::encoding::DynamicFlags::empty(),
17438 _decode,
17439 )
17440 }
17441
17442 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
17443 (i32, OpenFlags),
17444 fidl::encoding::DefaultFuchsiaResourceDialect,
17445 >;
17446 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
17447 fn _decode(
17448 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17449 ) -> Result<(i32, OpenFlags), fidl::Error> {
17450 let _response = fidl::client::decode_transaction_body::<
17451 NodeDeprecatedGetFlagsResponse,
17452 fidl::encoding::DefaultFuchsiaResourceDialect,
17453 0x5b88fffb8eda3aa1,
17454 >(_buf?)?;
17455 Ok((_response.s, _response.flags))
17456 }
17457 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
17458 (),
17459 0x5b88fffb8eda3aa1,
17460 fidl::encoding::DynamicFlags::empty(),
17461 _decode,
17462 )
17463 }
17464
17465 type DeprecatedSetFlagsResponseFut =
17466 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
17467 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
17468 fn _decode(
17469 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17470 ) -> Result<i32, fidl::Error> {
17471 let _response = fidl::client::decode_transaction_body::<
17472 NodeDeprecatedSetFlagsResponse,
17473 fidl::encoding::DefaultFuchsiaResourceDialect,
17474 0x5295b76c71fde733,
17475 >(_buf?)?;
17476 Ok(_response.s)
17477 }
17478 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
17479 (flags,),
17480 0x5295b76c71fde733,
17481 fidl::encoding::DynamicFlags::empty(),
17482 _decode,
17483 )
17484 }
17485
17486 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
17487 NodeGetFlagsResult,
17488 fidl::encoding::DefaultFuchsiaResourceDialect,
17489 >;
17490 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
17491 fn _decode(
17492 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17493 ) -> Result<NodeGetFlagsResult, fidl::Error> {
17494 let _response = fidl::client::decode_transaction_body::<
17495 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
17496 fidl::encoding::DefaultFuchsiaResourceDialect,
17497 0x176eb318f64ec23,
17498 >(_buf?)?
17499 .into_result::<SymlinkMarker>("get_flags")?;
17500 Ok(_response.map(|x| x.flags))
17501 }
17502 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
17503 (),
17504 0x176eb318f64ec23,
17505 fidl::encoding::DynamicFlags::FLEXIBLE,
17506 _decode,
17507 )
17508 }
17509
17510 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
17511 NodeSetFlagsResult,
17512 fidl::encoding::DefaultFuchsiaResourceDialect,
17513 >;
17514 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
17515 fn _decode(
17516 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17517 ) -> Result<NodeSetFlagsResult, fidl::Error> {
17518 let _response = fidl::client::decode_transaction_body::<
17519 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
17520 fidl::encoding::DefaultFuchsiaResourceDialect,
17521 0x55a8028685791ea8,
17522 >(_buf?)?
17523 .into_result::<SymlinkMarker>("set_flags")?;
17524 Ok(_response.map(|x| x))
17525 }
17526 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
17527 (flags,),
17528 0x55a8028685791ea8,
17529 fidl::encoding::DynamicFlags::FLEXIBLE,
17530 _decode,
17531 )
17532 }
17533
17534 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
17535 (i32, Option<Box<FilesystemInfo>>),
17536 fidl::encoding::DefaultFuchsiaResourceDialect,
17537 >;
17538 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
17539 fn _decode(
17540 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17541 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
17542 let _response = fidl::client::decode_transaction_body::<
17543 NodeQueryFilesystemResponse,
17544 fidl::encoding::DefaultFuchsiaResourceDialect,
17545 0x6f344a1c6b0a0610,
17546 >(_buf?)?;
17547 Ok((_response.s, _response.info))
17548 }
17549 self.client.send_query_and_decode::<
17550 fidl::encoding::EmptyPayload,
17551 (i32, Option<Box<FilesystemInfo>>),
17552 >(
17553 (),
17554 0x6f344a1c6b0a0610,
17555 fidl::encoding::DynamicFlags::empty(),
17556 _decode,
17557 )
17558 }
17559
17560 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
17561 NodeGetAttributesResult,
17562 fidl::encoding::DefaultFuchsiaResourceDialect,
17563 >;
17564 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
17565 fn _decode(
17566 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17567 ) -> Result<NodeGetAttributesResult, fidl::Error> {
17568 let _response = fidl::client::decode_transaction_body::<
17569 fidl::encoding::ResultType<NodeAttributes2, i32>,
17570 fidl::encoding::DefaultFuchsiaResourceDialect,
17571 0x3d4396a638ea053b,
17572 >(_buf?)?;
17573 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
17574 }
17575 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
17576 (query,),
17577 0x3d4396a638ea053b,
17578 fidl::encoding::DynamicFlags::empty(),
17579 _decode,
17580 )
17581 }
17582
17583 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
17584 NodeUpdateAttributesResult,
17585 fidl::encoding::DefaultFuchsiaResourceDialect,
17586 >;
17587 fn r#update_attributes(
17588 &self,
17589 mut payload: &MutableNodeAttributes,
17590 ) -> Self::UpdateAttributesResponseFut {
17591 fn _decode(
17592 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17593 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
17594 let _response = fidl::client::decode_transaction_body::<
17595 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17596 fidl::encoding::DefaultFuchsiaResourceDialect,
17597 0x3308c1da5a89bf08,
17598 >(_buf?)?;
17599 Ok(_response.map(|x| x))
17600 }
17601 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
17602 payload,
17603 0x3308c1da5a89bf08,
17604 fidl::encoding::DynamicFlags::empty(),
17605 _decode,
17606 )
17607 }
17608
17609 type SyncResponseFut = fidl::client::QueryResponseFut<
17610 NodeSyncResult,
17611 fidl::encoding::DefaultFuchsiaResourceDialect,
17612 >;
17613 fn r#sync(&self) -> Self::SyncResponseFut {
17614 fn _decode(
17615 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17616 ) -> Result<NodeSyncResult, fidl::Error> {
17617 let _response = fidl::client::decode_transaction_body::<
17618 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17619 fidl::encoding::DefaultFuchsiaResourceDialect,
17620 0x2c5c27ca0ab5dc49,
17621 >(_buf?)?;
17622 Ok(_response.map(|x| x))
17623 }
17624 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
17625 (),
17626 0x2c5c27ca0ab5dc49,
17627 fidl::encoding::DynamicFlags::empty(),
17628 _decode,
17629 )
17630 }
17631
17632 fn r#list_extended_attributes(
17633 &self,
17634 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17635 ) -> Result<(), fidl::Error> {
17636 self.client.send::<NodeListExtendedAttributesRequest>(
17637 (iterator,),
17638 0x4b61033de007fcd0,
17639 fidl::encoding::DynamicFlags::empty(),
17640 )
17641 }
17642
17643 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17644 NodeGetExtendedAttributeResult,
17645 fidl::encoding::DefaultFuchsiaResourceDialect,
17646 >;
17647 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
17648 fn _decode(
17649 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17650 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
17651 let _response = fidl::client::decode_transaction_body::<
17652 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
17653 fidl::encoding::DefaultFuchsiaResourceDialect,
17654 0x45ffa3ccfdeb76db,
17655 >(_buf?)?;
17656 Ok(_response.map(|x| x))
17657 }
17658 self.client.send_query_and_decode::<
17659 NodeGetExtendedAttributeRequest,
17660 NodeGetExtendedAttributeResult,
17661 >(
17662 (name,),
17663 0x45ffa3ccfdeb76db,
17664 fidl::encoding::DynamicFlags::empty(),
17665 _decode,
17666 )
17667 }
17668
17669 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17670 NodeSetExtendedAttributeResult,
17671 fidl::encoding::DefaultFuchsiaResourceDialect,
17672 >;
17673 fn r#set_extended_attribute(
17674 &self,
17675 mut name: &[u8],
17676 mut value: ExtendedAttributeValue,
17677 mut mode: SetExtendedAttributeMode,
17678 ) -> Self::SetExtendedAttributeResponseFut {
17679 fn _decode(
17680 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17681 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
17682 let _response = fidl::client::decode_transaction_body::<
17683 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17684 fidl::encoding::DefaultFuchsiaResourceDialect,
17685 0x4a951362f681f23c,
17686 >(_buf?)?;
17687 Ok(_response.map(|x| x))
17688 }
17689 self.client.send_query_and_decode::<
17690 NodeSetExtendedAttributeRequest,
17691 NodeSetExtendedAttributeResult,
17692 >(
17693 (name, &mut value, mode,),
17694 0x4a951362f681f23c,
17695 fidl::encoding::DynamicFlags::empty(),
17696 _decode,
17697 )
17698 }
17699
17700 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
17701 NodeRemoveExtendedAttributeResult,
17702 fidl::encoding::DefaultFuchsiaResourceDialect,
17703 >;
17704 fn r#remove_extended_attribute(
17705 &self,
17706 mut name: &[u8],
17707 ) -> Self::RemoveExtendedAttributeResponseFut {
17708 fn _decode(
17709 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17710 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
17711 let _response = fidl::client::decode_transaction_body::<
17712 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17713 fidl::encoding::DefaultFuchsiaResourceDialect,
17714 0x7a0b9f3a9bf9032d,
17715 >(_buf?)?;
17716 Ok(_response.map(|x| x))
17717 }
17718 self.client.send_query_and_decode::<
17719 NodeRemoveExtendedAttributeRequest,
17720 NodeRemoveExtendedAttributeResult,
17721 >(
17722 (name,),
17723 0x7a0b9f3a9bf9032d,
17724 fidl::encoding::DynamicFlags::empty(),
17725 _decode,
17726 )
17727 }
17728
17729 type DescribeResponseFut =
17730 fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
17731 fn r#describe(&self) -> Self::DescribeResponseFut {
17732 fn _decode(
17733 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
17734 ) -> Result<SymlinkInfo, fidl::Error> {
17735 let _response = fidl::client::decode_transaction_body::<
17736 fidl::encoding::FlexibleType<SymlinkInfo>,
17737 fidl::encoding::DefaultFuchsiaResourceDialect,
17738 0x742c2ea5e89831f3,
17739 >(_buf?)?
17740 .into_result::<SymlinkMarker>("describe")?;
17741 Ok(_response)
17742 }
17743 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
17744 (),
17745 0x742c2ea5e89831f3,
17746 fidl::encoding::DynamicFlags::FLEXIBLE,
17747 _decode,
17748 )
17749 }
17750}
17751
17752pub struct SymlinkEventStream {
17753 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
17754}
17755
17756impl std::marker::Unpin for SymlinkEventStream {}
17757
17758impl futures::stream::FusedStream for SymlinkEventStream {
17759 fn is_terminated(&self) -> bool {
17760 self.event_receiver.is_terminated()
17761 }
17762}
17763
17764impl futures::Stream for SymlinkEventStream {
17765 type Item = Result<SymlinkEvent, fidl::Error>;
17766
17767 fn poll_next(
17768 mut self: std::pin::Pin<&mut Self>,
17769 cx: &mut std::task::Context<'_>,
17770 ) -> std::task::Poll<Option<Self::Item>> {
17771 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
17772 &mut self.event_receiver,
17773 cx
17774 )?) {
17775 Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
17776 None => std::task::Poll::Ready(None),
17777 }
17778 }
17779}
17780
17781#[derive(Debug)]
17782pub enum SymlinkEvent {
17783 OnOpen_ {
17784 s: i32,
17785 info: Option<Box<NodeInfoDeprecated>>,
17786 },
17787 OnRepresentation {
17788 payload: Representation,
17789 },
17790 #[non_exhaustive]
17791 _UnknownEvent {
17792 ordinal: u64,
17794 },
17795}
17796
17797impl SymlinkEvent {
17798 #[allow(irrefutable_let_patterns)]
17799 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
17800 if let SymlinkEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
17801 }
17802 #[allow(irrefutable_let_patterns)]
17803 pub fn into_on_representation(self) -> Option<Representation> {
17804 if let SymlinkEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
17805 }
17806
17807 fn decode(
17809 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
17810 ) -> Result<SymlinkEvent, fidl::Error> {
17811 let (bytes, _handles) = buf.split_mut();
17812 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17813 debug_assert_eq!(tx_header.tx_id, 0);
17814 match tx_header.ordinal {
17815 0x7fc7bbb1dbfd1972 => {
17816 let mut out = fidl::new_empty!(
17817 NodeOnOpenRequest,
17818 fidl::encoding::DefaultFuchsiaResourceDialect
17819 );
17820 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
17821 Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
17822 }
17823 0x5cb40567d80a510c => {
17824 let mut out =
17825 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
17826 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
17827 Ok((SymlinkEvent::OnRepresentation { payload: out }))
17828 }
17829 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
17830 Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
17831 }
17832 _ => Err(fidl::Error::UnknownOrdinal {
17833 ordinal: tx_header.ordinal,
17834 protocol_name: <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
17835 }),
17836 }
17837 }
17838}
17839
17840pub struct SymlinkRequestStream {
17842 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
17843 is_terminated: bool,
17844}
17845
17846impl std::marker::Unpin for SymlinkRequestStream {}
17847
17848impl futures::stream::FusedStream for SymlinkRequestStream {
17849 fn is_terminated(&self) -> bool {
17850 self.is_terminated
17851 }
17852}
17853
17854impl fidl::endpoints::RequestStream for SymlinkRequestStream {
17855 type Protocol = SymlinkMarker;
17856 type ControlHandle = SymlinkControlHandle;
17857
17858 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
17859 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
17860 }
17861
17862 fn control_handle(&self) -> Self::ControlHandle {
17863 SymlinkControlHandle { inner: self.inner.clone() }
17864 }
17865
17866 fn into_inner(
17867 self,
17868 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
17869 {
17870 (self.inner, self.is_terminated)
17871 }
17872
17873 fn from_inner(
17874 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
17875 is_terminated: bool,
17876 ) -> Self {
17877 Self { inner, is_terminated }
17878 }
17879}
17880
17881impl futures::Stream for SymlinkRequestStream {
17882 type Item = Result<SymlinkRequest, fidl::Error>;
17883
17884 fn poll_next(
17885 mut self: std::pin::Pin<&mut Self>,
17886 cx: &mut std::task::Context<'_>,
17887 ) -> std::task::Poll<Option<Self::Item>> {
17888 let this = &mut *self;
17889 if this.inner.check_shutdown(cx) {
17890 this.is_terminated = true;
17891 return std::task::Poll::Ready(None);
17892 }
17893 if this.is_terminated {
17894 panic!("polled SymlinkRequestStream after completion");
17895 }
17896 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
17897 |bytes, handles| {
17898 match this.inner.channel().read_etc(cx, bytes, handles) {
17899 std::task::Poll::Ready(Ok(())) => {}
17900 std::task::Poll::Pending => return std::task::Poll::Pending,
17901 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
17902 this.is_terminated = true;
17903 return std::task::Poll::Ready(None);
17904 }
17905 std::task::Poll::Ready(Err(e)) => {
17906 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
17907 e.into(),
17908 ))));
17909 }
17910 }
17911
17912 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
17914
17915 std::task::Poll::Ready(Some(match header.ordinal {
17916 0x54f3949246a03e74 => {
17917 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17918 let mut req = fidl::new_empty!(
17919 LinkableLinkIntoRequest,
17920 fidl::encoding::DefaultFuchsiaResourceDialect
17921 );
17922 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
17923 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17924 Ok(SymlinkRequest::LinkInto {
17925 dst_parent_token: req.dst_parent_token,
17926 dst: req.dst,
17927
17928 responder: SymlinkLinkIntoResponder {
17929 control_handle: std::mem::ManuallyDrop::new(control_handle),
17930 tx_id: header.tx_id,
17931 },
17932 })
17933 }
17934 0x20d8a7aba2168a79 => {
17935 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
17936 let mut req = fidl::new_empty!(
17937 fidl_fuchsia_unknown::CloneableCloneRequest,
17938 fidl::encoding::DefaultFuchsiaResourceDialect
17939 );
17940 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
17941 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17942 Ok(SymlinkRequest::Clone { request: req.request, control_handle })
17943 }
17944 0x5ac5d459ad7f657e => {
17945 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17946 let mut req = fidl::new_empty!(
17947 fidl::encoding::EmptyPayload,
17948 fidl::encoding::DefaultFuchsiaResourceDialect
17949 );
17950 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
17951 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17952 Ok(SymlinkRequest::Close {
17953 responder: SymlinkCloseResponder {
17954 control_handle: std::mem::ManuallyDrop::new(control_handle),
17955 tx_id: header.tx_id,
17956 },
17957 })
17958 }
17959 0x2658edee9decfc06 => {
17960 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17961 let mut req = fidl::new_empty!(
17962 fidl::encoding::EmptyPayload,
17963 fidl::encoding::DefaultFuchsiaResourceDialect
17964 );
17965 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
17966 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17967 Ok(SymlinkRequest::Query {
17968 responder: SymlinkQueryResponder {
17969 control_handle: std::mem::ManuallyDrop::new(control_handle),
17970 tx_id: header.tx_id,
17971 },
17972 })
17973 }
17974 0x5a61678f293ce16f => {
17975 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
17976 let mut req = fidl::new_empty!(
17977 NodeDeprecatedCloneRequest,
17978 fidl::encoding::DefaultFuchsiaResourceDialect
17979 );
17980 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
17981 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17982 Ok(SymlinkRequest::DeprecatedClone {
17983 flags: req.flags,
17984 object: req.object,
17985
17986 control_handle,
17987 })
17988 }
17989 0x78985e216314dafd => {
17990 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
17991 let mut req = fidl::new_empty!(
17992 fidl::encoding::EmptyPayload,
17993 fidl::encoding::DefaultFuchsiaResourceDialect
17994 );
17995 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
17996 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
17997 Ok(SymlinkRequest::DeprecatedGetAttr {
17998 responder: SymlinkDeprecatedGetAttrResponder {
17999 control_handle: std::mem::ManuallyDrop::new(control_handle),
18000 tx_id: header.tx_id,
18001 },
18002 })
18003 }
18004 0x4186c0f40d938f46 => {
18005 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18006 let mut req = fidl::new_empty!(
18007 NodeDeprecatedSetAttrRequest,
18008 fidl::encoding::DefaultFuchsiaResourceDialect
18009 );
18010 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
18011 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18012 Ok(SymlinkRequest::DeprecatedSetAttr {
18013 flags: req.flags,
18014 attributes: req.attributes,
18015
18016 responder: SymlinkDeprecatedSetAttrResponder {
18017 control_handle: std::mem::ManuallyDrop::new(control_handle),
18018 tx_id: header.tx_id,
18019 },
18020 })
18021 }
18022 0x5b88fffb8eda3aa1 => {
18023 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18024 let mut req = fidl::new_empty!(
18025 fidl::encoding::EmptyPayload,
18026 fidl::encoding::DefaultFuchsiaResourceDialect
18027 );
18028 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18029 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18030 Ok(SymlinkRequest::DeprecatedGetFlags {
18031 responder: SymlinkDeprecatedGetFlagsResponder {
18032 control_handle: std::mem::ManuallyDrop::new(control_handle),
18033 tx_id: header.tx_id,
18034 },
18035 })
18036 }
18037 0x5295b76c71fde733 => {
18038 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18039 let mut req = fidl::new_empty!(
18040 NodeDeprecatedSetFlagsRequest,
18041 fidl::encoding::DefaultFuchsiaResourceDialect
18042 );
18043 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
18044 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18045 Ok(SymlinkRequest::DeprecatedSetFlags {
18046 flags: req.flags,
18047
18048 responder: SymlinkDeprecatedSetFlagsResponder {
18049 control_handle: std::mem::ManuallyDrop::new(control_handle),
18050 tx_id: header.tx_id,
18051 },
18052 })
18053 }
18054 0x176eb318f64ec23 => {
18055 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18056 let mut req = fidl::new_empty!(
18057 fidl::encoding::EmptyPayload,
18058 fidl::encoding::DefaultFuchsiaResourceDialect
18059 );
18060 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18061 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18062 Ok(SymlinkRequest::GetFlags {
18063 responder: SymlinkGetFlagsResponder {
18064 control_handle: std::mem::ManuallyDrop::new(control_handle),
18065 tx_id: header.tx_id,
18066 },
18067 })
18068 }
18069 0x55a8028685791ea8 => {
18070 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18071 let mut req = fidl::new_empty!(
18072 NodeSetFlagsRequest,
18073 fidl::encoding::DefaultFuchsiaResourceDialect
18074 );
18075 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
18076 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18077 Ok(SymlinkRequest::SetFlags {
18078 flags: req.flags,
18079
18080 responder: SymlinkSetFlagsResponder {
18081 control_handle: std::mem::ManuallyDrop::new(control_handle),
18082 tx_id: header.tx_id,
18083 },
18084 })
18085 }
18086 0x6f344a1c6b0a0610 => {
18087 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18088 let mut req = fidl::new_empty!(
18089 fidl::encoding::EmptyPayload,
18090 fidl::encoding::DefaultFuchsiaResourceDialect
18091 );
18092 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18093 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18094 Ok(SymlinkRequest::QueryFilesystem {
18095 responder: SymlinkQueryFilesystemResponder {
18096 control_handle: std::mem::ManuallyDrop::new(control_handle),
18097 tx_id: header.tx_id,
18098 },
18099 })
18100 }
18101 0x3d4396a638ea053b => {
18102 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18103 let mut req = fidl::new_empty!(
18104 NodeGetAttributesRequest,
18105 fidl::encoding::DefaultFuchsiaResourceDialect
18106 );
18107 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
18108 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18109 Ok(SymlinkRequest::GetAttributes {
18110 query: req.query,
18111
18112 responder: SymlinkGetAttributesResponder {
18113 control_handle: std::mem::ManuallyDrop::new(control_handle),
18114 tx_id: header.tx_id,
18115 },
18116 })
18117 }
18118 0x3308c1da5a89bf08 => {
18119 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18120 let mut req = fidl::new_empty!(
18121 MutableNodeAttributes,
18122 fidl::encoding::DefaultFuchsiaResourceDialect
18123 );
18124 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
18125 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18126 Ok(SymlinkRequest::UpdateAttributes {
18127 payload: req,
18128 responder: SymlinkUpdateAttributesResponder {
18129 control_handle: std::mem::ManuallyDrop::new(control_handle),
18130 tx_id: header.tx_id,
18131 },
18132 })
18133 }
18134 0x2c5c27ca0ab5dc49 => {
18135 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18136 let mut req = fidl::new_empty!(
18137 fidl::encoding::EmptyPayload,
18138 fidl::encoding::DefaultFuchsiaResourceDialect
18139 );
18140 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18141 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18142 Ok(SymlinkRequest::Sync {
18143 responder: SymlinkSyncResponder {
18144 control_handle: std::mem::ManuallyDrop::new(control_handle),
18145 tx_id: header.tx_id,
18146 },
18147 })
18148 }
18149 0x4b61033de007fcd0 => {
18150 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18151 let mut req = fidl::new_empty!(
18152 NodeListExtendedAttributesRequest,
18153 fidl::encoding::DefaultFuchsiaResourceDialect
18154 );
18155 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
18156 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18157 Ok(SymlinkRequest::ListExtendedAttributes {
18158 iterator: req.iterator,
18159
18160 control_handle,
18161 })
18162 }
18163 0x45ffa3ccfdeb76db => {
18164 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18165 let mut req = fidl::new_empty!(
18166 NodeGetExtendedAttributeRequest,
18167 fidl::encoding::DefaultFuchsiaResourceDialect
18168 );
18169 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18170 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18171 Ok(SymlinkRequest::GetExtendedAttribute {
18172 name: req.name,
18173
18174 responder: SymlinkGetExtendedAttributeResponder {
18175 control_handle: std::mem::ManuallyDrop::new(control_handle),
18176 tx_id: header.tx_id,
18177 },
18178 })
18179 }
18180 0x4a951362f681f23c => {
18181 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18182 let mut req = fidl::new_empty!(
18183 NodeSetExtendedAttributeRequest,
18184 fidl::encoding::DefaultFuchsiaResourceDialect
18185 );
18186 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18187 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18188 Ok(SymlinkRequest::SetExtendedAttribute {
18189 name: req.name,
18190 value: req.value,
18191 mode: req.mode,
18192
18193 responder: SymlinkSetExtendedAttributeResponder {
18194 control_handle: std::mem::ManuallyDrop::new(control_handle),
18195 tx_id: header.tx_id,
18196 },
18197 })
18198 }
18199 0x7a0b9f3a9bf9032d => {
18200 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18201 let mut req = fidl::new_empty!(
18202 NodeRemoveExtendedAttributeRequest,
18203 fidl::encoding::DefaultFuchsiaResourceDialect
18204 );
18205 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18206 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18207 Ok(SymlinkRequest::RemoveExtendedAttribute {
18208 name: req.name,
18209
18210 responder: SymlinkRemoveExtendedAttributeResponder {
18211 control_handle: std::mem::ManuallyDrop::new(control_handle),
18212 tx_id: header.tx_id,
18213 },
18214 })
18215 }
18216 0x742c2ea5e89831f3 => {
18217 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18218 let mut req = fidl::new_empty!(
18219 fidl::encoding::EmptyPayload,
18220 fidl::encoding::DefaultFuchsiaResourceDialect
18221 );
18222 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18223 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18224 Ok(SymlinkRequest::Describe {
18225 responder: SymlinkDescribeResponder {
18226 control_handle: std::mem::ManuallyDrop::new(control_handle),
18227 tx_id: header.tx_id,
18228 },
18229 })
18230 }
18231 _ if header.tx_id == 0
18232 && header
18233 .dynamic_flags()
18234 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
18235 {
18236 Ok(SymlinkRequest::_UnknownMethod {
18237 ordinal: header.ordinal,
18238 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
18239 method_type: fidl::MethodType::OneWay,
18240 })
18241 }
18242 _ if header
18243 .dynamic_flags()
18244 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
18245 {
18246 this.inner.send_framework_err(
18247 fidl::encoding::FrameworkErr::UnknownMethod,
18248 header.tx_id,
18249 header.ordinal,
18250 header.dynamic_flags(),
18251 (bytes, handles),
18252 )?;
18253 Ok(SymlinkRequest::_UnknownMethod {
18254 ordinal: header.ordinal,
18255 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
18256 method_type: fidl::MethodType::TwoWay,
18257 })
18258 }
18259 _ => Err(fidl::Error::UnknownOrdinal {
18260 ordinal: header.ordinal,
18261 protocol_name:
18262 <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
18263 }),
18264 }))
18265 },
18266 )
18267 }
18268}
18269
18270#[derive(Debug)]
18272pub enum SymlinkRequest {
18273 LinkInto {
18296 dst_parent_token: fidl::Event,
18297 dst: String,
18298 responder: SymlinkLinkIntoResponder,
18299 },
18300 Clone {
18301 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
18302 control_handle: SymlinkControlHandle,
18303 },
18304 Close {
18315 responder: SymlinkCloseResponder,
18316 },
18317 Query {
18318 responder: SymlinkQueryResponder,
18319 },
18320 DeprecatedClone {
18322 flags: OpenFlags,
18323 object: fidl::endpoints::ServerEnd<NodeMarker>,
18324 control_handle: SymlinkControlHandle,
18325 },
18326 DeprecatedGetAttr {
18328 responder: SymlinkDeprecatedGetAttrResponder,
18329 },
18330 DeprecatedSetAttr {
18332 flags: NodeAttributeFlags,
18333 attributes: NodeAttributes,
18334 responder: SymlinkDeprecatedSetAttrResponder,
18335 },
18336 DeprecatedGetFlags {
18338 responder: SymlinkDeprecatedGetFlagsResponder,
18339 },
18340 DeprecatedSetFlags {
18342 flags: OpenFlags,
18343 responder: SymlinkDeprecatedSetFlagsResponder,
18344 },
18345 GetFlags {
18354 responder: SymlinkGetFlagsResponder,
18355 },
18356 SetFlags {
18366 flags: Flags,
18367 responder: SymlinkSetFlagsResponder,
18368 },
18369 QueryFilesystem {
18371 responder: SymlinkQueryFilesystemResponder,
18372 },
18373 GetAttributes {
18387 query: NodeAttributesQuery,
18388 responder: SymlinkGetAttributesResponder,
18389 },
18390 UpdateAttributes {
18399 payload: MutableNodeAttributes,
18400 responder: SymlinkUpdateAttributesResponder,
18401 },
18402 Sync {
18412 responder: SymlinkSyncResponder,
18413 },
18414 ListExtendedAttributes {
18423 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
18424 control_handle: SymlinkControlHandle,
18425 },
18426 GetExtendedAttribute {
18433 name: Vec<u8>,
18434 responder: SymlinkGetExtendedAttributeResponder,
18435 },
18436 SetExtendedAttribute {
18444 name: Vec<u8>,
18445 value: ExtendedAttributeValue,
18446 mode: SetExtendedAttributeMode,
18447 responder: SymlinkSetExtendedAttributeResponder,
18448 },
18449 RemoveExtendedAttribute {
18455 name: Vec<u8>,
18456 responder: SymlinkRemoveExtendedAttributeResponder,
18457 },
18458 Describe {
18459 responder: SymlinkDescribeResponder,
18460 },
18461 #[non_exhaustive]
18463 _UnknownMethod {
18464 ordinal: u64,
18466 control_handle: SymlinkControlHandle,
18467 method_type: fidl::MethodType,
18468 },
18469}
18470
18471impl SymlinkRequest {
18472 #[allow(irrefutable_let_patterns)]
18473 pub fn into_link_into(self) -> Option<(fidl::Event, String, SymlinkLinkIntoResponder)> {
18474 if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
18475 Some((dst_parent_token, dst, responder))
18476 } else {
18477 None
18478 }
18479 }
18480
18481 #[allow(irrefutable_let_patterns)]
18482 pub fn into_clone(
18483 self,
18484 ) -> Option<(
18485 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
18486 SymlinkControlHandle,
18487 )> {
18488 if let SymlinkRequest::Clone { request, control_handle } = self {
18489 Some((request, control_handle))
18490 } else {
18491 None
18492 }
18493 }
18494
18495 #[allow(irrefutable_let_patterns)]
18496 pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
18497 if let SymlinkRequest::Close { responder } = self { Some((responder)) } else { None }
18498 }
18499
18500 #[allow(irrefutable_let_patterns)]
18501 pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
18502 if let SymlinkRequest::Query { responder } = self { Some((responder)) } else { None }
18503 }
18504
18505 #[allow(irrefutable_let_patterns)]
18506 pub fn into_deprecated_clone(
18507 self,
18508 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, SymlinkControlHandle)> {
18509 if let SymlinkRequest::DeprecatedClone { flags, object, control_handle } = self {
18510 Some((flags, object, control_handle))
18511 } else {
18512 None
18513 }
18514 }
18515
18516 #[allow(irrefutable_let_patterns)]
18517 pub fn into_deprecated_get_attr(self) -> Option<(SymlinkDeprecatedGetAttrResponder)> {
18518 if let SymlinkRequest::DeprecatedGetAttr { responder } = self {
18519 Some((responder))
18520 } else {
18521 None
18522 }
18523 }
18524
18525 #[allow(irrefutable_let_patterns)]
18526 pub fn into_deprecated_set_attr(
18527 self,
18528 ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
18529 if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
18530 Some((flags, attributes, responder))
18531 } else {
18532 None
18533 }
18534 }
18535
18536 #[allow(irrefutable_let_patterns)]
18537 pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
18538 if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
18539 Some((responder))
18540 } else {
18541 None
18542 }
18543 }
18544
18545 #[allow(irrefutable_let_patterns)]
18546 pub fn into_deprecated_set_flags(
18547 self,
18548 ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
18549 if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
18550 Some((flags, responder))
18551 } else {
18552 None
18553 }
18554 }
18555
18556 #[allow(irrefutable_let_patterns)]
18557 pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
18558 if let SymlinkRequest::GetFlags { responder } = self { Some((responder)) } else { None }
18559 }
18560
18561 #[allow(irrefutable_let_patterns)]
18562 pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
18563 if let SymlinkRequest::SetFlags { flags, responder } = self {
18564 Some((flags, responder))
18565 } else {
18566 None
18567 }
18568 }
18569
18570 #[allow(irrefutable_let_patterns)]
18571 pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
18572 if let SymlinkRequest::QueryFilesystem { responder } = self {
18573 Some((responder))
18574 } else {
18575 None
18576 }
18577 }
18578
18579 #[allow(irrefutable_let_patterns)]
18580 pub fn into_get_attributes(
18581 self,
18582 ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
18583 if let SymlinkRequest::GetAttributes { query, responder } = self {
18584 Some((query, responder))
18585 } else {
18586 None
18587 }
18588 }
18589
18590 #[allow(irrefutable_let_patterns)]
18591 pub fn into_update_attributes(
18592 self,
18593 ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
18594 if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
18595 Some((payload, responder))
18596 } else {
18597 None
18598 }
18599 }
18600
18601 #[allow(irrefutable_let_patterns)]
18602 pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
18603 if let SymlinkRequest::Sync { responder } = self { Some((responder)) } else { None }
18604 }
18605
18606 #[allow(irrefutable_let_patterns)]
18607 pub fn into_list_extended_attributes(
18608 self,
18609 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, SymlinkControlHandle)>
18610 {
18611 if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
18612 Some((iterator, control_handle))
18613 } else {
18614 None
18615 }
18616 }
18617
18618 #[allow(irrefutable_let_patterns)]
18619 pub fn into_get_extended_attribute(
18620 self,
18621 ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
18622 if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
18623 Some((name, responder))
18624 } else {
18625 None
18626 }
18627 }
18628
18629 #[allow(irrefutable_let_patterns)]
18630 pub fn into_set_extended_attribute(
18631 self,
18632 ) -> Option<(
18633 Vec<u8>,
18634 ExtendedAttributeValue,
18635 SetExtendedAttributeMode,
18636 SymlinkSetExtendedAttributeResponder,
18637 )> {
18638 if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
18639 Some((name, value, mode, responder))
18640 } else {
18641 None
18642 }
18643 }
18644
18645 #[allow(irrefutable_let_patterns)]
18646 pub fn into_remove_extended_attribute(
18647 self,
18648 ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
18649 if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
18650 Some((name, responder))
18651 } else {
18652 None
18653 }
18654 }
18655
18656 #[allow(irrefutable_let_patterns)]
18657 pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
18658 if let SymlinkRequest::Describe { responder } = self { Some((responder)) } else { None }
18659 }
18660
18661 pub fn method_name(&self) -> &'static str {
18663 match *self {
18664 SymlinkRequest::LinkInto { .. } => "link_into",
18665 SymlinkRequest::Clone { .. } => "clone",
18666 SymlinkRequest::Close { .. } => "close",
18667 SymlinkRequest::Query { .. } => "query",
18668 SymlinkRequest::DeprecatedClone { .. } => "deprecated_clone",
18669 SymlinkRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
18670 SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
18671 SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
18672 SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
18673 SymlinkRequest::GetFlags { .. } => "get_flags",
18674 SymlinkRequest::SetFlags { .. } => "set_flags",
18675 SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
18676 SymlinkRequest::GetAttributes { .. } => "get_attributes",
18677 SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
18678 SymlinkRequest::Sync { .. } => "sync",
18679 SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
18680 SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
18681 SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
18682 SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
18683 SymlinkRequest::Describe { .. } => "describe",
18684 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
18685 "unknown one-way method"
18686 }
18687 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
18688 "unknown two-way method"
18689 }
18690 }
18691 }
18692}
18693
18694#[derive(Debug, Clone)]
18695pub struct SymlinkControlHandle {
18696 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
18697}
18698
18699impl fidl::endpoints::ControlHandle for SymlinkControlHandle {
18700 fn shutdown(&self) {
18701 self.inner.shutdown()
18702 }
18703
18704 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
18705 self.inner.shutdown_with_epitaph(status)
18706 }
18707
18708 fn is_closed(&self) -> bool {
18709 self.inner.channel().is_closed()
18710 }
18711 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
18712 self.inner.channel().on_closed()
18713 }
18714
18715 #[cfg(target_os = "fuchsia")]
18716 fn signal_peer(
18717 &self,
18718 clear_mask: zx::Signals,
18719 set_mask: zx::Signals,
18720 ) -> Result<(), zx_status::Status> {
18721 use fidl::Peered;
18722 self.inner.channel().signal_peer(clear_mask, set_mask)
18723 }
18724}
18725
18726impl SymlinkControlHandle {
18727 pub fn send_on_open_(
18728 &self,
18729 mut s: i32,
18730 mut info: Option<NodeInfoDeprecated>,
18731 ) -> Result<(), fidl::Error> {
18732 self.inner.send::<NodeOnOpenRequest>(
18733 (s, info.as_mut()),
18734 0,
18735 0x7fc7bbb1dbfd1972,
18736 fidl::encoding::DynamicFlags::FLEXIBLE,
18737 )
18738 }
18739
18740 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
18741 self.inner.send::<Representation>(
18742 &mut payload,
18743 0,
18744 0x5cb40567d80a510c,
18745 fidl::encoding::DynamicFlags::empty(),
18746 )
18747 }
18748}
18749
18750#[must_use = "FIDL methods require a response to be sent"]
18751#[derive(Debug)]
18752pub struct SymlinkLinkIntoResponder {
18753 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18754 tx_id: u32,
18755}
18756
18757impl std::ops::Drop for SymlinkLinkIntoResponder {
18761 fn drop(&mut self) {
18762 self.control_handle.shutdown();
18763 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18765 }
18766}
18767
18768impl fidl::endpoints::Responder for SymlinkLinkIntoResponder {
18769 type ControlHandle = SymlinkControlHandle;
18770
18771 fn control_handle(&self) -> &SymlinkControlHandle {
18772 &self.control_handle
18773 }
18774
18775 fn drop_without_shutdown(mut self) {
18776 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18778 std::mem::forget(self);
18780 }
18781}
18782
18783impl SymlinkLinkIntoResponder {
18784 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18788 let _result = self.send_raw(result);
18789 if _result.is_err() {
18790 self.control_handle.shutdown();
18791 }
18792 self.drop_without_shutdown();
18793 _result
18794 }
18795
18796 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18798 let _result = self.send_raw(result);
18799 self.drop_without_shutdown();
18800 _result
18801 }
18802
18803 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18804 self.control_handle
18805 .inner
18806 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
18807 result,
18808 self.tx_id,
18809 0x54f3949246a03e74,
18810 fidl::encoding::DynamicFlags::empty(),
18811 )
18812 }
18813}
18814
18815#[must_use = "FIDL methods require a response to be sent"]
18816#[derive(Debug)]
18817pub struct SymlinkCloseResponder {
18818 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18819 tx_id: u32,
18820}
18821
18822impl std::ops::Drop for SymlinkCloseResponder {
18826 fn drop(&mut self) {
18827 self.control_handle.shutdown();
18828 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18830 }
18831}
18832
18833impl fidl::endpoints::Responder for SymlinkCloseResponder {
18834 type ControlHandle = SymlinkControlHandle;
18835
18836 fn control_handle(&self) -> &SymlinkControlHandle {
18837 &self.control_handle
18838 }
18839
18840 fn drop_without_shutdown(mut self) {
18841 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18843 std::mem::forget(self);
18845 }
18846}
18847
18848impl SymlinkCloseResponder {
18849 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18853 let _result = self.send_raw(result);
18854 if _result.is_err() {
18855 self.control_handle.shutdown();
18856 }
18857 self.drop_without_shutdown();
18858 _result
18859 }
18860
18861 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18863 let _result = self.send_raw(result);
18864 self.drop_without_shutdown();
18865 _result
18866 }
18867
18868 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
18869 self.control_handle
18870 .inner
18871 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
18872 result,
18873 self.tx_id,
18874 0x5ac5d459ad7f657e,
18875 fidl::encoding::DynamicFlags::empty(),
18876 )
18877 }
18878}
18879
18880#[must_use = "FIDL methods require a response to be sent"]
18881#[derive(Debug)]
18882pub struct SymlinkQueryResponder {
18883 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18884 tx_id: u32,
18885}
18886
18887impl std::ops::Drop for SymlinkQueryResponder {
18891 fn drop(&mut self) {
18892 self.control_handle.shutdown();
18893 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18895 }
18896}
18897
18898impl fidl::endpoints::Responder for SymlinkQueryResponder {
18899 type ControlHandle = SymlinkControlHandle;
18900
18901 fn control_handle(&self) -> &SymlinkControlHandle {
18902 &self.control_handle
18903 }
18904
18905 fn drop_without_shutdown(mut self) {
18906 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18908 std::mem::forget(self);
18910 }
18911}
18912
18913impl SymlinkQueryResponder {
18914 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
18918 let _result = self.send_raw(protocol);
18919 if _result.is_err() {
18920 self.control_handle.shutdown();
18921 }
18922 self.drop_without_shutdown();
18923 _result
18924 }
18925
18926 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
18928 let _result = self.send_raw(protocol);
18929 self.drop_without_shutdown();
18930 _result
18931 }
18932
18933 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
18934 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
18935 (protocol,),
18936 self.tx_id,
18937 0x2658edee9decfc06,
18938 fidl::encoding::DynamicFlags::empty(),
18939 )
18940 }
18941}
18942
18943#[must_use = "FIDL methods require a response to be sent"]
18944#[derive(Debug)]
18945pub struct SymlinkDeprecatedGetAttrResponder {
18946 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
18947 tx_id: u32,
18948}
18949
18950impl std::ops::Drop for SymlinkDeprecatedGetAttrResponder {
18954 fn drop(&mut self) {
18955 self.control_handle.shutdown();
18956 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18958 }
18959}
18960
18961impl fidl::endpoints::Responder for SymlinkDeprecatedGetAttrResponder {
18962 type ControlHandle = SymlinkControlHandle;
18963
18964 fn control_handle(&self) -> &SymlinkControlHandle {
18965 &self.control_handle
18966 }
18967
18968 fn drop_without_shutdown(mut self) {
18969 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
18971 std::mem::forget(self);
18973 }
18974}
18975
18976impl SymlinkDeprecatedGetAttrResponder {
18977 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
18981 let _result = self.send_raw(s, attributes);
18982 if _result.is_err() {
18983 self.control_handle.shutdown();
18984 }
18985 self.drop_without_shutdown();
18986 _result
18987 }
18988
18989 pub fn send_no_shutdown_on_err(
18991 self,
18992 mut s: i32,
18993 mut attributes: &NodeAttributes,
18994 ) -> Result<(), fidl::Error> {
18995 let _result = self.send_raw(s, attributes);
18996 self.drop_without_shutdown();
18997 _result
18998 }
18999
19000 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
19001 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
19002 (s, attributes),
19003 self.tx_id,
19004 0x78985e216314dafd,
19005 fidl::encoding::DynamicFlags::empty(),
19006 )
19007 }
19008}
19009
19010#[must_use = "FIDL methods require a response to be sent"]
19011#[derive(Debug)]
19012pub struct SymlinkDeprecatedSetAttrResponder {
19013 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19014 tx_id: u32,
19015}
19016
19017impl std::ops::Drop for SymlinkDeprecatedSetAttrResponder {
19021 fn drop(&mut self) {
19022 self.control_handle.shutdown();
19023 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19025 }
19026}
19027
19028impl fidl::endpoints::Responder for SymlinkDeprecatedSetAttrResponder {
19029 type ControlHandle = SymlinkControlHandle;
19030
19031 fn control_handle(&self) -> &SymlinkControlHandle {
19032 &self.control_handle
19033 }
19034
19035 fn drop_without_shutdown(mut self) {
19036 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19038 std::mem::forget(self);
19040 }
19041}
19042
19043impl SymlinkDeprecatedSetAttrResponder {
19044 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
19048 let _result = self.send_raw(s);
19049 if _result.is_err() {
19050 self.control_handle.shutdown();
19051 }
19052 self.drop_without_shutdown();
19053 _result
19054 }
19055
19056 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
19058 let _result = self.send_raw(s);
19059 self.drop_without_shutdown();
19060 _result
19061 }
19062
19063 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
19064 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
19065 (s,),
19066 self.tx_id,
19067 0x4186c0f40d938f46,
19068 fidl::encoding::DynamicFlags::empty(),
19069 )
19070 }
19071}
19072
19073#[must_use = "FIDL methods require a response to be sent"]
19074#[derive(Debug)]
19075pub struct SymlinkDeprecatedGetFlagsResponder {
19076 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19077 tx_id: u32,
19078}
19079
19080impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
19084 fn drop(&mut self) {
19085 self.control_handle.shutdown();
19086 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19088 }
19089}
19090
19091impl fidl::endpoints::Responder for SymlinkDeprecatedGetFlagsResponder {
19092 type ControlHandle = SymlinkControlHandle;
19093
19094 fn control_handle(&self) -> &SymlinkControlHandle {
19095 &self.control_handle
19096 }
19097
19098 fn drop_without_shutdown(mut self) {
19099 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19101 std::mem::forget(self);
19103 }
19104}
19105
19106impl SymlinkDeprecatedGetFlagsResponder {
19107 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
19111 let _result = self.send_raw(s, flags);
19112 if _result.is_err() {
19113 self.control_handle.shutdown();
19114 }
19115 self.drop_without_shutdown();
19116 _result
19117 }
19118
19119 pub fn send_no_shutdown_on_err(
19121 self,
19122 mut s: i32,
19123 mut flags: OpenFlags,
19124 ) -> Result<(), fidl::Error> {
19125 let _result = self.send_raw(s, flags);
19126 self.drop_without_shutdown();
19127 _result
19128 }
19129
19130 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
19131 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
19132 (s, flags),
19133 self.tx_id,
19134 0x5b88fffb8eda3aa1,
19135 fidl::encoding::DynamicFlags::empty(),
19136 )
19137 }
19138}
19139
19140#[must_use = "FIDL methods require a response to be sent"]
19141#[derive(Debug)]
19142pub struct SymlinkDeprecatedSetFlagsResponder {
19143 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19144 tx_id: u32,
19145}
19146
19147impl std::ops::Drop for SymlinkDeprecatedSetFlagsResponder {
19151 fn drop(&mut self) {
19152 self.control_handle.shutdown();
19153 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19155 }
19156}
19157
19158impl fidl::endpoints::Responder for SymlinkDeprecatedSetFlagsResponder {
19159 type ControlHandle = SymlinkControlHandle;
19160
19161 fn control_handle(&self) -> &SymlinkControlHandle {
19162 &self.control_handle
19163 }
19164
19165 fn drop_without_shutdown(mut self) {
19166 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19168 std::mem::forget(self);
19170 }
19171}
19172
19173impl SymlinkDeprecatedSetFlagsResponder {
19174 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
19178 let _result = self.send_raw(s);
19179 if _result.is_err() {
19180 self.control_handle.shutdown();
19181 }
19182 self.drop_without_shutdown();
19183 _result
19184 }
19185
19186 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
19188 let _result = self.send_raw(s);
19189 self.drop_without_shutdown();
19190 _result
19191 }
19192
19193 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
19194 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
19195 (s,),
19196 self.tx_id,
19197 0x5295b76c71fde733,
19198 fidl::encoding::DynamicFlags::empty(),
19199 )
19200 }
19201}
19202
19203#[must_use = "FIDL methods require a response to be sent"]
19204#[derive(Debug)]
19205pub struct SymlinkGetFlagsResponder {
19206 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19207 tx_id: u32,
19208}
19209
19210impl std::ops::Drop for SymlinkGetFlagsResponder {
19214 fn drop(&mut self) {
19215 self.control_handle.shutdown();
19216 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19218 }
19219}
19220
19221impl fidl::endpoints::Responder for SymlinkGetFlagsResponder {
19222 type ControlHandle = SymlinkControlHandle;
19223
19224 fn control_handle(&self) -> &SymlinkControlHandle {
19225 &self.control_handle
19226 }
19227
19228 fn drop_without_shutdown(mut self) {
19229 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19231 std::mem::forget(self);
19233 }
19234}
19235
19236impl SymlinkGetFlagsResponder {
19237 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
19241 let _result = self.send_raw(result);
19242 if _result.is_err() {
19243 self.control_handle.shutdown();
19244 }
19245 self.drop_without_shutdown();
19246 _result
19247 }
19248
19249 pub fn send_no_shutdown_on_err(
19251 self,
19252 mut result: Result<Flags, i32>,
19253 ) -> Result<(), fidl::Error> {
19254 let _result = self.send_raw(result);
19255 self.drop_without_shutdown();
19256 _result
19257 }
19258
19259 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
19260 self.control_handle
19261 .inner
19262 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
19263 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
19264 self.tx_id,
19265 0x176eb318f64ec23,
19266 fidl::encoding::DynamicFlags::FLEXIBLE,
19267 )
19268 }
19269}
19270
19271#[must_use = "FIDL methods require a response to be sent"]
19272#[derive(Debug)]
19273pub struct SymlinkSetFlagsResponder {
19274 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19275 tx_id: u32,
19276}
19277
19278impl std::ops::Drop for SymlinkSetFlagsResponder {
19282 fn drop(&mut self) {
19283 self.control_handle.shutdown();
19284 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19286 }
19287}
19288
19289impl fidl::endpoints::Responder for SymlinkSetFlagsResponder {
19290 type ControlHandle = SymlinkControlHandle;
19291
19292 fn control_handle(&self) -> &SymlinkControlHandle {
19293 &self.control_handle
19294 }
19295
19296 fn drop_without_shutdown(mut self) {
19297 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19299 std::mem::forget(self);
19301 }
19302}
19303
19304impl SymlinkSetFlagsResponder {
19305 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19309 let _result = self.send_raw(result);
19310 if _result.is_err() {
19311 self.control_handle.shutdown();
19312 }
19313 self.drop_without_shutdown();
19314 _result
19315 }
19316
19317 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19319 let _result = self.send_raw(result);
19320 self.drop_without_shutdown();
19321 _result
19322 }
19323
19324 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19325 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
19326 fidl::encoding::EmptyStruct,
19327 i32,
19328 >>(
19329 fidl::encoding::FlexibleResult::new(result),
19330 self.tx_id,
19331 0x55a8028685791ea8,
19332 fidl::encoding::DynamicFlags::FLEXIBLE,
19333 )
19334 }
19335}
19336
19337#[must_use = "FIDL methods require a response to be sent"]
19338#[derive(Debug)]
19339pub struct SymlinkQueryFilesystemResponder {
19340 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19341 tx_id: u32,
19342}
19343
19344impl std::ops::Drop for SymlinkQueryFilesystemResponder {
19348 fn drop(&mut self) {
19349 self.control_handle.shutdown();
19350 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19352 }
19353}
19354
19355impl fidl::endpoints::Responder for SymlinkQueryFilesystemResponder {
19356 type ControlHandle = SymlinkControlHandle;
19357
19358 fn control_handle(&self) -> &SymlinkControlHandle {
19359 &self.control_handle
19360 }
19361
19362 fn drop_without_shutdown(mut self) {
19363 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19365 std::mem::forget(self);
19367 }
19368}
19369
19370impl SymlinkQueryFilesystemResponder {
19371 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
19375 let _result = self.send_raw(s, info);
19376 if _result.is_err() {
19377 self.control_handle.shutdown();
19378 }
19379 self.drop_without_shutdown();
19380 _result
19381 }
19382
19383 pub fn send_no_shutdown_on_err(
19385 self,
19386 mut s: i32,
19387 mut info: Option<&FilesystemInfo>,
19388 ) -> Result<(), fidl::Error> {
19389 let _result = self.send_raw(s, info);
19390 self.drop_without_shutdown();
19391 _result
19392 }
19393
19394 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
19395 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
19396 (s, info),
19397 self.tx_id,
19398 0x6f344a1c6b0a0610,
19399 fidl::encoding::DynamicFlags::empty(),
19400 )
19401 }
19402}
19403
19404#[must_use = "FIDL methods require a response to be sent"]
19405#[derive(Debug)]
19406pub struct SymlinkGetAttributesResponder {
19407 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19408 tx_id: u32,
19409}
19410
19411impl std::ops::Drop for SymlinkGetAttributesResponder {
19415 fn drop(&mut self) {
19416 self.control_handle.shutdown();
19417 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19419 }
19420}
19421
19422impl fidl::endpoints::Responder for SymlinkGetAttributesResponder {
19423 type ControlHandle = SymlinkControlHandle;
19424
19425 fn control_handle(&self) -> &SymlinkControlHandle {
19426 &self.control_handle
19427 }
19428
19429 fn drop_without_shutdown(mut self) {
19430 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19432 std::mem::forget(self);
19434 }
19435}
19436
19437impl SymlinkGetAttributesResponder {
19438 pub fn send(
19442 self,
19443 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19444 ) -> Result<(), fidl::Error> {
19445 let _result = self.send_raw(result);
19446 if _result.is_err() {
19447 self.control_handle.shutdown();
19448 }
19449 self.drop_without_shutdown();
19450 _result
19451 }
19452
19453 pub fn send_no_shutdown_on_err(
19455 self,
19456 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19457 ) -> Result<(), fidl::Error> {
19458 let _result = self.send_raw(result);
19459 self.drop_without_shutdown();
19460 _result
19461 }
19462
19463 fn send_raw(
19464 &self,
19465 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
19466 ) -> Result<(), fidl::Error> {
19467 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
19468 result,
19469 self.tx_id,
19470 0x3d4396a638ea053b,
19471 fidl::encoding::DynamicFlags::empty(),
19472 )
19473 }
19474}
19475
19476#[must_use = "FIDL methods require a response to be sent"]
19477#[derive(Debug)]
19478pub struct SymlinkUpdateAttributesResponder {
19479 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19480 tx_id: u32,
19481}
19482
19483impl std::ops::Drop for SymlinkUpdateAttributesResponder {
19487 fn drop(&mut self) {
19488 self.control_handle.shutdown();
19489 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19491 }
19492}
19493
19494impl fidl::endpoints::Responder for SymlinkUpdateAttributesResponder {
19495 type ControlHandle = SymlinkControlHandle;
19496
19497 fn control_handle(&self) -> &SymlinkControlHandle {
19498 &self.control_handle
19499 }
19500
19501 fn drop_without_shutdown(mut self) {
19502 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19504 std::mem::forget(self);
19506 }
19507}
19508
19509impl SymlinkUpdateAttributesResponder {
19510 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19514 let _result = self.send_raw(result);
19515 if _result.is_err() {
19516 self.control_handle.shutdown();
19517 }
19518 self.drop_without_shutdown();
19519 _result
19520 }
19521
19522 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19524 let _result = self.send_raw(result);
19525 self.drop_without_shutdown();
19526 _result
19527 }
19528
19529 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19530 self.control_handle
19531 .inner
19532 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19533 result,
19534 self.tx_id,
19535 0x3308c1da5a89bf08,
19536 fidl::encoding::DynamicFlags::empty(),
19537 )
19538 }
19539}
19540
19541#[must_use = "FIDL methods require a response to be sent"]
19542#[derive(Debug)]
19543pub struct SymlinkSyncResponder {
19544 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19545 tx_id: u32,
19546}
19547
19548impl std::ops::Drop for SymlinkSyncResponder {
19552 fn drop(&mut self) {
19553 self.control_handle.shutdown();
19554 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19556 }
19557}
19558
19559impl fidl::endpoints::Responder for SymlinkSyncResponder {
19560 type ControlHandle = SymlinkControlHandle;
19561
19562 fn control_handle(&self) -> &SymlinkControlHandle {
19563 &self.control_handle
19564 }
19565
19566 fn drop_without_shutdown(mut self) {
19567 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19569 std::mem::forget(self);
19571 }
19572}
19573
19574impl SymlinkSyncResponder {
19575 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19579 let _result = self.send_raw(result);
19580 if _result.is_err() {
19581 self.control_handle.shutdown();
19582 }
19583 self.drop_without_shutdown();
19584 _result
19585 }
19586
19587 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19589 let _result = self.send_raw(result);
19590 self.drop_without_shutdown();
19591 _result
19592 }
19593
19594 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19595 self.control_handle
19596 .inner
19597 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19598 result,
19599 self.tx_id,
19600 0x2c5c27ca0ab5dc49,
19601 fidl::encoding::DynamicFlags::empty(),
19602 )
19603 }
19604}
19605
19606#[must_use = "FIDL methods require a response to be sent"]
19607#[derive(Debug)]
19608pub struct SymlinkGetExtendedAttributeResponder {
19609 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19610 tx_id: u32,
19611}
19612
19613impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
19617 fn drop(&mut self) {
19618 self.control_handle.shutdown();
19619 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19621 }
19622}
19623
19624impl fidl::endpoints::Responder for SymlinkGetExtendedAttributeResponder {
19625 type ControlHandle = SymlinkControlHandle;
19626
19627 fn control_handle(&self) -> &SymlinkControlHandle {
19628 &self.control_handle
19629 }
19630
19631 fn drop_without_shutdown(mut self) {
19632 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19634 std::mem::forget(self);
19636 }
19637}
19638
19639impl SymlinkGetExtendedAttributeResponder {
19640 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
19644 let _result = self.send_raw(result);
19645 if _result.is_err() {
19646 self.control_handle.shutdown();
19647 }
19648 self.drop_without_shutdown();
19649 _result
19650 }
19651
19652 pub fn send_no_shutdown_on_err(
19654 self,
19655 mut result: Result<ExtendedAttributeValue, i32>,
19656 ) -> Result<(), fidl::Error> {
19657 let _result = self.send_raw(result);
19658 self.drop_without_shutdown();
19659 _result
19660 }
19661
19662 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
19663 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
19664 result.as_mut().map_err(|e| *e),
19665 self.tx_id,
19666 0x45ffa3ccfdeb76db,
19667 fidl::encoding::DynamicFlags::empty(),
19668 )
19669 }
19670}
19671
19672#[must_use = "FIDL methods require a response to be sent"]
19673#[derive(Debug)]
19674pub struct SymlinkSetExtendedAttributeResponder {
19675 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19676 tx_id: u32,
19677}
19678
19679impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
19683 fn drop(&mut self) {
19684 self.control_handle.shutdown();
19685 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19687 }
19688}
19689
19690impl fidl::endpoints::Responder for SymlinkSetExtendedAttributeResponder {
19691 type ControlHandle = SymlinkControlHandle;
19692
19693 fn control_handle(&self) -> &SymlinkControlHandle {
19694 &self.control_handle
19695 }
19696
19697 fn drop_without_shutdown(mut self) {
19698 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19700 std::mem::forget(self);
19702 }
19703}
19704
19705impl SymlinkSetExtendedAttributeResponder {
19706 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19710 let _result = self.send_raw(result);
19711 if _result.is_err() {
19712 self.control_handle.shutdown();
19713 }
19714 self.drop_without_shutdown();
19715 _result
19716 }
19717
19718 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19720 let _result = self.send_raw(result);
19721 self.drop_without_shutdown();
19722 _result
19723 }
19724
19725 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19726 self.control_handle
19727 .inner
19728 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19729 result,
19730 self.tx_id,
19731 0x4a951362f681f23c,
19732 fidl::encoding::DynamicFlags::empty(),
19733 )
19734 }
19735}
19736
19737#[must_use = "FIDL methods require a response to be sent"]
19738#[derive(Debug)]
19739pub struct SymlinkRemoveExtendedAttributeResponder {
19740 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19741 tx_id: u32,
19742}
19743
19744impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
19748 fn drop(&mut self) {
19749 self.control_handle.shutdown();
19750 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19752 }
19753}
19754
19755impl fidl::endpoints::Responder for SymlinkRemoveExtendedAttributeResponder {
19756 type ControlHandle = SymlinkControlHandle;
19757
19758 fn control_handle(&self) -> &SymlinkControlHandle {
19759 &self.control_handle
19760 }
19761
19762 fn drop_without_shutdown(mut self) {
19763 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19765 std::mem::forget(self);
19767 }
19768}
19769
19770impl SymlinkRemoveExtendedAttributeResponder {
19771 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19775 let _result = self.send_raw(result);
19776 if _result.is_err() {
19777 self.control_handle.shutdown();
19778 }
19779 self.drop_without_shutdown();
19780 _result
19781 }
19782
19783 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19785 let _result = self.send_raw(result);
19786 self.drop_without_shutdown();
19787 _result
19788 }
19789
19790 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19791 self.control_handle
19792 .inner
19793 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19794 result,
19795 self.tx_id,
19796 0x7a0b9f3a9bf9032d,
19797 fidl::encoding::DynamicFlags::empty(),
19798 )
19799 }
19800}
19801
19802#[must_use = "FIDL methods require a response to be sent"]
19803#[derive(Debug)]
19804pub struct SymlinkDescribeResponder {
19805 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19806 tx_id: u32,
19807}
19808
19809impl std::ops::Drop for SymlinkDescribeResponder {
19813 fn drop(&mut self) {
19814 self.control_handle.shutdown();
19815 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19817 }
19818}
19819
19820impl fidl::endpoints::Responder for SymlinkDescribeResponder {
19821 type ControlHandle = SymlinkControlHandle;
19822
19823 fn control_handle(&self) -> &SymlinkControlHandle {
19824 &self.control_handle
19825 }
19826
19827 fn drop_without_shutdown(mut self) {
19828 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19830 std::mem::forget(self);
19832 }
19833}
19834
19835impl SymlinkDescribeResponder {
19836 pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19840 let _result = self.send_raw(payload);
19841 if _result.is_err() {
19842 self.control_handle.shutdown();
19843 }
19844 self.drop_without_shutdown();
19845 _result
19846 }
19847
19848 pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19850 let _result = self.send_raw(payload);
19851 self.drop_without_shutdown();
19852 _result
19853 }
19854
19855 fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
19856 self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
19857 fidl::encoding::Flexible::new(payload),
19858 self.tx_id,
19859 0x742c2ea5e89831f3,
19860 fidl::encoding::DynamicFlags::FLEXIBLE,
19861 )
19862 }
19863}
19864
19865#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
19866pub struct WritableMarker;
19867
19868impl fidl::endpoints::ProtocolMarker for WritableMarker {
19869 type Proxy = WritableProxy;
19870 type RequestStream = WritableRequestStream;
19871 #[cfg(target_os = "fuchsia")]
19872 type SynchronousProxy = WritableSynchronousProxy;
19873
19874 const DEBUG_NAME: &'static str = "(anonymous) Writable";
19875}
19876pub type WritableWriteResult = Result<u64, i32>;
19877
19878pub trait WritableProxyInterface: Send + Sync {
19879 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
19880 + Send;
19881 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
19882}
19883#[derive(Debug)]
19884#[cfg(target_os = "fuchsia")]
19885pub struct WritableSynchronousProxy {
19886 client: fidl::client::sync::Client,
19887}
19888
19889#[cfg(target_os = "fuchsia")]
19890impl fidl::endpoints::SynchronousProxy for WritableSynchronousProxy {
19891 type Proxy = WritableProxy;
19892 type Protocol = WritableMarker;
19893
19894 fn from_channel(inner: fidl::Channel) -> Self {
19895 Self::new(inner)
19896 }
19897
19898 fn into_channel(self) -> fidl::Channel {
19899 self.client.into_channel()
19900 }
19901
19902 fn as_channel(&self) -> &fidl::Channel {
19903 self.client.as_channel()
19904 }
19905}
19906
19907#[cfg(target_os = "fuchsia")]
19908impl WritableSynchronousProxy {
19909 pub fn new(channel: fidl::Channel) -> Self {
19910 let protocol_name = <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
19911 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
19912 }
19913
19914 pub fn into_channel(self) -> fidl::Channel {
19915 self.client.into_channel()
19916 }
19917
19918 pub fn wait_for_event(
19921 &self,
19922 deadline: zx::MonotonicInstant,
19923 ) -> Result<WritableEvent, fidl::Error> {
19924 WritableEvent::decode(self.client.wait_for_event(deadline)?)
19925 }
19926
19927 pub fn r#write(
19951 &self,
19952 mut data: &[u8],
19953 ___deadline: zx::MonotonicInstant,
19954 ) -> Result<WritableWriteResult, fidl::Error> {
19955 let _response = self.client.send_query::<
19956 WritableWriteRequest,
19957 fidl::encoding::ResultType<WritableWriteResponse, i32>,
19958 >(
19959 (data,),
19960 0x6a31437832469f82,
19961 fidl::encoding::DynamicFlags::empty(),
19962 ___deadline,
19963 )?;
19964 Ok(_response.map(|x| x.actual_count))
19965 }
19966}
19967
19968#[cfg(target_os = "fuchsia")]
19969impl From<WritableSynchronousProxy> for zx::NullableHandle {
19970 fn from(value: WritableSynchronousProxy) -> Self {
19971 value.into_channel().into()
19972 }
19973}
19974
19975#[cfg(target_os = "fuchsia")]
19976impl From<fidl::Channel> for WritableSynchronousProxy {
19977 fn from(value: fidl::Channel) -> Self {
19978 Self::new(value)
19979 }
19980}
19981
19982#[cfg(target_os = "fuchsia")]
19983impl fidl::endpoints::FromClient for WritableSynchronousProxy {
19984 type Protocol = WritableMarker;
19985
19986 fn from_client(value: fidl::endpoints::ClientEnd<WritableMarker>) -> Self {
19987 Self::new(value.into_channel())
19988 }
19989}
19990
19991#[derive(Debug, Clone)]
19992pub struct WritableProxy {
19993 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
19994}
19995
19996impl fidl::endpoints::Proxy for WritableProxy {
19997 type Protocol = WritableMarker;
19998
19999 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
20000 Self::new(inner)
20001 }
20002
20003 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
20004 self.client.into_channel().map_err(|client| Self { client })
20005 }
20006
20007 fn as_channel(&self) -> &::fidl::AsyncChannel {
20008 self.client.as_channel()
20009 }
20010}
20011
20012impl WritableProxy {
20013 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
20015 let protocol_name = <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
20016 Self { client: fidl::client::Client::new(channel, protocol_name) }
20017 }
20018
20019 pub fn take_event_stream(&self) -> WritableEventStream {
20025 WritableEventStream { event_receiver: self.client.take_event_receiver() }
20026 }
20027
20028 pub fn r#write(
20052 &self,
20053 mut data: &[u8],
20054 ) -> fidl::client::QueryResponseFut<
20055 WritableWriteResult,
20056 fidl::encoding::DefaultFuchsiaResourceDialect,
20057 > {
20058 WritableProxyInterface::r#write(self, data)
20059 }
20060}
20061
20062impl WritableProxyInterface for WritableProxy {
20063 type WriteResponseFut = fidl::client::QueryResponseFut<
20064 WritableWriteResult,
20065 fidl::encoding::DefaultFuchsiaResourceDialect,
20066 >;
20067 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
20068 fn _decode(
20069 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
20070 ) -> Result<WritableWriteResult, fidl::Error> {
20071 let _response = fidl::client::decode_transaction_body::<
20072 fidl::encoding::ResultType<WritableWriteResponse, i32>,
20073 fidl::encoding::DefaultFuchsiaResourceDialect,
20074 0x6a31437832469f82,
20075 >(_buf?)?;
20076 Ok(_response.map(|x| x.actual_count))
20077 }
20078 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
20079 (data,),
20080 0x6a31437832469f82,
20081 fidl::encoding::DynamicFlags::empty(),
20082 _decode,
20083 )
20084 }
20085}
20086
20087pub struct WritableEventStream {
20088 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
20089}
20090
20091impl std::marker::Unpin for WritableEventStream {}
20092
20093impl futures::stream::FusedStream for WritableEventStream {
20094 fn is_terminated(&self) -> bool {
20095 self.event_receiver.is_terminated()
20096 }
20097}
20098
20099impl futures::Stream for WritableEventStream {
20100 type Item = Result<WritableEvent, fidl::Error>;
20101
20102 fn poll_next(
20103 mut self: std::pin::Pin<&mut Self>,
20104 cx: &mut std::task::Context<'_>,
20105 ) -> std::task::Poll<Option<Self::Item>> {
20106 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
20107 &mut self.event_receiver,
20108 cx
20109 )?) {
20110 Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
20111 None => std::task::Poll::Ready(None),
20112 }
20113 }
20114}
20115
20116#[derive(Debug)]
20117pub enum WritableEvent {}
20118
20119impl WritableEvent {
20120 fn decode(
20122 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
20123 ) -> Result<WritableEvent, fidl::Error> {
20124 let (bytes, _handles) = buf.split_mut();
20125 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
20126 debug_assert_eq!(tx_header.tx_id, 0);
20127 match tx_header.ordinal {
20128 _ => Err(fidl::Error::UnknownOrdinal {
20129 ordinal: tx_header.ordinal,
20130 protocol_name: <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
20131 }),
20132 }
20133 }
20134}
20135
20136pub struct WritableRequestStream {
20138 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20139 is_terminated: bool,
20140}
20141
20142impl std::marker::Unpin for WritableRequestStream {}
20143
20144impl futures::stream::FusedStream for WritableRequestStream {
20145 fn is_terminated(&self) -> bool {
20146 self.is_terminated
20147 }
20148}
20149
20150impl fidl::endpoints::RequestStream for WritableRequestStream {
20151 type Protocol = WritableMarker;
20152 type ControlHandle = WritableControlHandle;
20153
20154 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
20155 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
20156 }
20157
20158 fn control_handle(&self) -> Self::ControlHandle {
20159 WritableControlHandle { inner: self.inner.clone() }
20160 }
20161
20162 fn into_inner(
20163 self,
20164 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
20165 {
20166 (self.inner, self.is_terminated)
20167 }
20168
20169 fn from_inner(
20170 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20171 is_terminated: bool,
20172 ) -> Self {
20173 Self { inner, is_terminated }
20174 }
20175}
20176
20177impl futures::Stream for WritableRequestStream {
20178 type Item = Result<WritableRequest, fidl::Error>;
20179
20180 fn poll_next(
20181 mut self: std::pin::Pin<&mut Self>,
20182 cx: &mut std::task::Context<'_>,
20183 ) -> std::task::Poll<Option<Self::Item>> {
20184 let this = &mut *self;
20185 if this.inner.check_shutdown(cx) {
20186 this.is_terminated = true;
20187 return std::task::Poll::Ready(None);
20188 }
20189 if this.is_terminated {
20190 panic!("polled WritableRequestStream after completion");
20191 }
20192 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
20193 |bytes, handles| {
20194 match this.inner.channel().read_etc(cx, bytes, handles) {
20195 std::task::Poll::Ready(Ok(())) => {}
20196 std::task::Poll::Pending => return std::task::Poll::Pending,
20197 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
20198 this.is_terminated = true;
20199 return std::task::Poll::Ready(None);
20200 }
20201 std::task::Poll::Ready(Err(e)) => {
20202 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
20203 e.into(),
20204 ))));
20205 }
20206 }
20207
20208 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
20210
20211 std::task::Poll::Ready(Some(match header.ordinal {
20212 0x6a31437832469f82 => {
20213 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
20214 let mut req = fidl::new_empty!(
20215 WritableWriteRequest,
20216 fidl::encoding::DefaultFuchsiaResourceDialect
20217 );
20218 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
20219 let control_handle = WritableControlHandle { inner: this.inner.clone() };
20220 Ok(WritableRequest::Write {
20221 data: req.data,
20222
20223 responder: WritableWriteResponder {
20224 control_handle: std::mem::ManuallyDrop::new(control_handle),
20225 tx_id: header.tx_id,
20226 },
20227 })
20228 }
20229 _ => Err(fidl::Error::UnknownOrdinal {
20230 ordinal: header.ordinal,
20231 protocol_name:
20232 <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
20233 }),
20234 }))
20235 },
20236 )
20237 }
20238}
20239
20240#[derive(Debug)]
20241pub enum WritableRequest {
20242 Write { data: Vec<u8>, responder: WritableWriteResponder },
20266}
20267
20268impl WritableRequest {
20269 #[allow(irrefutable_let_patterns)]
20270 pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
20271 if let WritableRequest::Write { data, responder } = self {
20272 Some((data, responder))
20273 } else {
20274 None
20275 }
20276 }
20277
20278 pub fn method_name(&self) -> &'static str {
20280 match *self {
20281 WritableRequest::Write { .. } => "write",
20282 }
20283 }
20284}
20285
20286#[derive(Debug, Clone)]
20287pub struct WritableControlHandle {
20288 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20289}
20290
20291impl fidl::endpoints::ControlHandle for WritableControlHandle {
20292 fn shutdown(&self) {
20293 self.inner.shutdown()
20294 }
20295
20296 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
20297 self.inner.shutdown_with_epitaph(status)
20298 }
20299
20300 fn is_closed(&self) -> bool {
20301 self.inner.channel().is_closed()
20302 }
20303 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
20304 self.inner.channel().on_closed()
20305 }
20306
20307 #[cfg(target_os = "fuchsia")]
20308 fn signal_peer(
20309 &self,
20310 clear_mask: zx::Signals,
20311 set_mask: zx::Signals,
20312 ) -> Result<(), zx_status::Status> {
20313 use fidl::Peered;
20314 self.inner.channel().signal_peer(clear_mask, set_mask)
20315 }
20316}
20317
20318impl WritableControlHandle {}
20319
20320#[must_use = "FIDL methods require a response to be sent"]
20321#[derive(Debug)]
20322pub struct WritableWriteResponder {
20323 control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
20324 tx_id: u32,
20325}
20326
20327impl std::ops::Drop for WritableWriteResponder {
20331 fn drop(&mut self) {
20332 self.control_handle.shutdown();
20333 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20335 }
20336}
20337
20338impl fidl::endpoints::Responder for WritableWriteResponder {
20339 type ControlHandle = WritableControlHandle;
20340
20341 fn control_handle(&self) -> &WritableControlHandle {
20342 &self.control_handle
20343 }
20344
20345 fn drop_without_shutdown(mut self) {
20346 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20348 std::mem::forget(self);
20350 }
20351}
20352
20353impl WritableWriteResponder {
20354 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20358 let _result = self.send_raw(result);
20359 if _result.is_err() {
20360 self.control_handle.shutdown();
20361 }
20362 self.drop_without_shutdown();
20363 _result
20364 }
20365
20366 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20368 let _result = self.send_raw(result);
20369 self.drop_without_shutdown();
20370 _result
20371 }
20372
20373 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
20374 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
20375 result.map(|actual_count| (actual_count,)),
20376 self.tx_id,
20377 0x6a31437832469f82,
20378 fidl::encoding::DynamicFlags::empty(),
20379 )
20380 }
20381}
20382
20383mod internal {
20384 use super::*;
20385
20386 impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
20387 type Borrowed<'a> = &'a mut Self;
20388 fn take_or_borrow<'a>(
20389 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20390 ) -> Self::Borrowed<'a> {
20391 value
20392 }
20393 }
20394
20395 unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
20396 type Owned = Self;
20397
20398 #[inline(always)]
20399 fn inline_align(_context: fidl::encoding::Context) -> usize {
20400 8
20401 }
20402
20403 #[inline(always)]
20404 fn inline_size(_context: fidl::encoding::Context) -> usize {
20405 40
20406 }
20407 }
20408
20409 unsafe impl
20410 fidl::encoding::Encode<
20411 DirectoryCreateSymlinkRequest,
20412 fidl::encoding::DefaultFuchsiaResourceDialect,
20413 > for &mut DirectoryCreateSymlinkRequest
20414 {
20415 #[inline]
20416 unsafe fn encode(
20417 self,
20418 encoder: &mut fidl::encoding::Encoder<
20419 '_,
20420 fidl::encoding::DefaultFuchsiaResourceDialect,
20421 >,
20422 offset: usize,
20423 _depth: fidl::encoding::Depth,
20424 ) -> fidl::Result<()> {
20425 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
20426 fidl::encoding::Encode::<
20428 DirectoryCreateSymlinkRequest,
20429 fidl::encoding::DefaultFuchsiaResourceDialect,
20430 >::encode(
20431 (
20432 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
20433 &self.name,
20434 ),
20435 <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
20436 &self.target,
20437 ),
20438 <fidl::encoding::Optional<
20439 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20440 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20441 &mut self.connection
20442 ),
20443 ),
20444 encoder,
20445 offset,
20446 _depth,
20447 )
20448 }
20449 }
20450 unsafe impl<
20451 T0: fidl::encoding::Encode<
20452 fidl::encoding::BoundedString<255>,
20453 fidl::encoding::DefaultFuchsiaResourceDialect,
20454 >,
20455 T1: fidl::encoding::Encode<
20456 fidl::encoding::Vector<u8, 4095>,
20457 fidl::encoding::DefaultFuchsiaResourceDialect,
20458 >,
20459 T2: fidl::encoding::Encode<
20460 fidl::encoding::Optional<
20461 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20462 >,
20463 fidl::encoding::DefaultFuchsiaResourceDialect,
20464 >,
20465 >
20466 fidl::encoding::Encode<
20467 DirectoryCreateSymlinkRequest,
20468 fidl::encoding::DefaultFuchsiaResourceDialect,
20469 > for (T0, T1, T2)
20470 {
20471 #[inline]
20472 unsafe fn encode(
20473 self,
20474 encoder: &mut fidl::encoding::Encoder<
20475 '_,
20476 fidl::encoding::DefaultFuchsiaResourceDialect,
20477 >,
20478 offset: usize,
20479 depth: fidl::encoding::Depth,
20480 ) -> fidl::Result<()> {
20481 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
20482 unsafe {
20485 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
20486 (ptr as *mut u64).write_unaligned(0);
20487 }
20488 self.0.encode(encoder, offset + 0, depth)?;
20490 self.1.encode(encoder, offset + 16, depth)?;
20491 self.2.encode(encoder, offset + 32, depth)?;
20492 Ok(())
20493 }
20494 }
20495
20496 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20497 for DirectoryCreateSymlinkRequest
20498 {
20499 #[inline(always)]
20500 fn new_empty() -> Self {
20501 Self {
20502 name: fidl::new_empty!(
20503 fidl::encoding::BoundedString<255>,
20504 fidl::encoding::DefaultFuchsiaResourceDialect
20505 ),
20506 target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect),
20507 connection: fidl::new_empty!(
20508 fidl::encoding::Optional<
20509 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20510 >,
20511 fidl::encoding::DefaultFuchsiaResourceDialect
20512 ),
20513 }
20514 }
20515
20516 #[inline]
20517 unsafe fn decode(
20518 &mut self,
20519 decoder: &mut fidl::encoding::Decoder<
20520 '_,
20521 fidl::encoding::DefaultFuchsiaResourceDialect,
20522 >,
20523 offset: usize,
20524 _depth: fidl::encoding::Depth,
20525 ) -> fidl::Result<()> {
20526 decoder.debug_check_bounds::<Self>(offset);
20527 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
20529 let padval = unsafe { (ptr as *const u64).read_unaligned() };
20530 let mask = 0xffffffff00000000u64;
20531 let maskedval = padval & mask;
20532 if maskedval != 0 {
20533 return Err(fidl::Error::NonZeroPadding {
20534 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
20535 });
20536 }
20537 fidl::decode!(
20538 fidl::encoding::BoundedString<255>,
20539 fidl::encoding::DefaultFuchsiaResourceDialect,
20540 &mut self.name,
20541 decoder,
20542 offset + 0,
20543 _depth
20544 )?;
20545 fidl::decode!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
20546 fidl::decode!(
20547 fidl::encoding::Optional<
20548 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
20549 >,
20550 fidl::encoding::DefaultFuchsiaResourceDialect,
20551 &mut self.connection,
20552 decoder,
20553 offset + 32,
20554 _depth
20555 )?;
20556 Ok(())
20557 }
20558 }
20559
20560 impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
20561 type Borrowed<'a> = &'a mut Self;
20562 fn take_or_borrow<'a>(
20563 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20564 ) -> Self::Borrowed<'a> {
20565 value
20566 }
20567 }
20568
20569 unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
20570 type Owned = Self;
20571
20572 #[inline(always)]
20573 fn inline_align(_context: fidl::encoding::Context) -> usize {
20574 8
20575 }
20576
20577 #[inline(always)]
20578 fn inline_size(_context: fidl::encoding::Context) -> usize {
20579 32
20580 }
20581 }
20582
20583 unsafe impl
20584 fidl::encoding::Encode<
20585 DirectoryDeprecatedOpenRequest,
20586 fidl::encoding::DefaultFuchsiaResourceDialect,
20587 > for &mut DirectoryDeprecatedOpenRequest
20588 {
20589 #[inline]
20590 unsafe fn encode(
20591 self,
20592 encoder: &mut fidl::encoding::Encoder<
20593 '_,
20594 fidl::encoding::DefaultFuchsiaResourceDialect,
20595 >,
20596 offset: usize,
20597 _depth: fidl::encoding::Depth,
20598 ) -> fidl::Result<()> {
20599 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
20600 fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
20602 (
20603 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
20604 <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
20605 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
20606 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
20607 ),
20608 encoder, offset, _depth
20609 )
20610 }
20611 }
20612 unsafe impl<
20613 T0: fidl::encoding::Encode<OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect>,
20614 T1: fidl::encoding::Encode<ModeType, fidl::encoding::DefaultFuchsiaResourceDialect>,
20615 T2: fidl::encoding::Encode<
20616 fidl::encoding::BoundedString<4095>,
20617 fidl::encoding::DefaultFuchsiaResourceDialect,
20618 >,
20619 T3: fidl::encoding::Encode<
20620 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20621 fidl::encoding::DefaultFuchsiaResourceDialect,
20622 >,
20623 >
20624 fidl::encoding::Encode<
20625 DirectoryDeprecatedOpenRequest,
20626 fidl::encoding::DefaultFuchsiaResourceDialect,
20627 > for (T0, T1, T2, T3)
20628 {
20629 #[inline]
20630 unsafe fn encode(
20631 self,
20632 encoder: &mut fidl::encoding::Encoder<
20633 '_,
20634 fidl::encoding::DefaultFuchsiaResourceDialect,
20635 >,
20636 offset: usize,
20637 depth: fidl::encoding::Depth,
20638 ) -> fidl::Result<()> {
20639 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
20640 unsafe {
20643 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
20644 (ptr as *mut u64).write_unaligned(0);
20645 }
20646 self.0.encode(encoder, offset + 0, depth)?;
20648 self.1.encode(encoder, offset + 4, depth)?;
20649 self.2.encode(encoder, offset + 8, depth)?;
20650 self.3.encode(encoder, offset + 24, depth)?;
20651 Ok(())
20652 }
20653 }
20654
20655 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20656 for DirectoryDeprecatedOpenRequest
20657 {
20658 #[inline(always)]
20659 fn new_empty() -> Self {
20660 Self {
20661 flags: fidl::new_empty!(OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect),
20662 mode: fidl::new_empty!(ModeType, fidl::encoding::DefaultFuchsiaResourceDialect),
20663 path: fidl::new_empty!(
20664 fidl::encoding::BoundedString<4095>,
20665 fidl::encoding::DefaultFuchsiaResourceDialect
20666 ),
20667 object: fidl::new_empty!(
20668 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20669 fidl::encoding::DefaultFuchsiaResourceDialect
20670 ),
20671 }
20672 }
20673
20674 #[inline]
20675 unsafe fn decode(
20676 &mut self,
20677 decoder: &mut fidl::encoding::Decoder<
20678 '_,
20679 fidl::encoding::DefaultFuchsiaResourceDialect,
20680 >,
20681 offset: usize,
20682 _depth: fidl::encoding::Depth,
20683 ) -> fidl::Result<()> {
20684 decoder.debug_check_bounds::<Self>(offset);
20685 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
20687 let padval = unsafe { (ptr as *const u64).read_unaligned() };
20688 let mask = 0xffffffff00000000u64;
20689 let maskedval = padval & mask;
20690 if maskedval != 0 {
20691 return Err(fidl::Error::NonZeroPadding {
20692 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
20693 });
20694 }
20695 fidl::decode!(
20696 OpenFlags,
20697 fidl::encoding::DefaultFuchsiaResourceDialect,
20698 &mut self.flags,
20699 decoder,
20700 offset + 0,
20701 _depth
20702 )?;
20703 fidl::decode!(
20704 ModeType,
20705 fidl::encoding::DefaultFuchsiaResourceDialect,
20706 &mut self.mode,
20707 decoder,
20708 offset + 4,
20709 _depth
20710 )?;
20711 fidl::decode!(
20712 fidl::encoding::BoundedString<4095>,
20713 fidl::encoding::DefaultFuchsiaResourceDialect,
20714 &mut self.path,
20715 decoder,
20716 offset + 8,
20717 _depth
20718 )?;
20719 fidl::decode!(
20720 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
20721 fidl::encoding::DefaultFuchsiaResourceDialect,
20722 &mut self.object,
20723 decoder,
20724 offset + 24,
20725 _depth
20726 )?;
20727 Ok(())
20728 }
20729 }
20730
20731 impl fidl::encoding::ResourceTypeMarker for DirectoryGetTokenResponse {
20732 type Borrowed<'a> = &'a mut Self;
20733 fn take_or_borrow<'a>(
20734 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20735 ) -> Self::Borrowed<'a> {
20736 value
20737 }
20738 }
20739
20740 unsafe impl fidl::encoding::TypeMarker for DirectoryGetTokenResponse {
20741 type Owned = Self;
20742
20743 #[inline(always)]
20744 fn inline_align(_context: fidl::encoding::Context) -> usize {
20745 4
20746 }
20747
20748 #[inline(always)]
20749 fn inline_size(_context: fidl::encoding::Context) -> usize {
20750 8
20751 }
20752 }
20753
20754 unsafe impl
20755 fidl::encoding::Encode<
20756 DirectoryGetTokenResponse,
20757 fidl::encoding::DefaultFuchsiaResourceDialect,
20758 > for &mut DirectoryGetTokenResponse
20759 {
20760 #[inline]
20761 unsafe fn encode(
20762 self,
20763 encoder: &mut fidl::encoding::Encoder<
20764 '_,
20765 fidl::encoding::DefaultFuchsiaResourceDialect,
20766 >,
20767 offset: usize,
20768 _depth: fidl::encoding::Depth,
20769 ) -> fidl::Result<()> {
20770 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
20771 fidl::encoding::Encode::<
20773 DirectoryGetTokenResponse,
20774 fidl::encoding::DefaultFuchsiaResourceDialect,
20775 >::encode(
20776 (
20777 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
20778 <fidl::encoding::Optional<
20779 fidl::encoding::HandleType<
20780 fidl::NullableHandle,
20781 { fidl::ObjectType::NONE.into_raw() },
20782 2147483648,
20783 >,
20784 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20785 &mut self.token
20786 ),
20787 ),
20788 encoder,
20789 offset,
20790 _depth,
20791 )
20792 }
20793 }
20794 unsafe impl<
20795 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
20796 T1: fidl::encoding::Encode<
20797 fidl::encoding::Optional<
20798 fidl::encoding::HandleType<
20799 fidl::NullableHandle,
20800 { fidl::ObjectType::NONE.into_raw() },
20801 2147483648,
20802 >,
20803 >,
20804 fidl::encoding::DefaultFuchsiaResourceDialect,
20805 >,
20806 >
20807 fidl::encoding::Encode<
20808 DirectoryGetTokenResponse,
20809 fidl::encoding::DefaultFuchsiaResourceDialect,
20810 > for (T0, T1)
20811 {
20812 #[inline]
20813 unsafe fn encode(
20814 self,
20815 encoder: &mut fidl::encoding::Encoder<
20816 '_,
20817 fidl::encoding::DefaultFuchsiaResourceDialect,
20818 >,
20819 offset: usize,
20820 depth: fidl::encoding::Depth,
20821 ) -> fidl::Result<()> {
20822 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
20823 self.0.encode(encoder, offset + 0, depth)?;
20827 self.1.encode(encoder, offset + 4, depth)?;
20828 Ok(())
20829 }
20830 }
20831
20832 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
20833 for DirectoryGetTokenResponse
20834 {
20835 #[inline(always)]
20836 fn new_empty() -> Self {
20837 Self {
20838 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
20839 token: fidl::new_empty!(
20840 fidl::encoding::Optional<
20841 fidl::encoding::HandleType<
20842 fidl::NullableHandle,
20843 { fidl::ObjectType::NONE.into_raw() },
20844 2147483648,
20845 >,
20846 >,
20847 fidl::encoding::DefaultFuchsiaResourceDialect
20848 ),
20849 }
20850 }
20851
20852 #[inline]
20853 unsafe fn decode(
20854 &mut self,
20855 decoder: &mut fidl::encoding::Decoder<
20856 '_,
20857 fidl::encoding::DefaultFuchsiaResourceDialect,
20858 >,
20859 offset: usize,
20860 _depth: fidl::encoding::Depth,
20861 ) -> fidl::Result<()> {
20862 decoder.debug_check_bounds::<Self>(offset);
20863 fidl::decode!(
20865 i32,
20866 fidl::encoding::DefaultFuchsiaResourceDialect,
20867 &mut self.s,
20868 decoder,
20869 offset + 0,
20870 _depth
20871 )?;
20872 fidl::decode!(
20873 fidl::encoding::Optional<
20874 fidl::encoding::HandleType<
20875 fidl::NullableHandle,
20876 { fidl::ObjectType::NONE.into_raw() },
20877 2147483648,
20878 >,
20879 >,
20880 fidl::encoding::DefaultFuchsiaResourceDialect,
20881 &mut self.token,
20882 decoder,
20883 offset + 4,
20884 _depth
20885 )?;
20886 Ok(())
20887 }
20888 }
20889
20890 impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
20891 type Borrowed<'a> = &'a mut Self;
20892 fn take_or_borrow<'a>(
20893 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
20894 ) -> Self::Borrowed<'a> {
20895 value
20896 }
20897 }
20898
20899 unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
20900 type Owned = Self;
20901
20902 #[inline(always)]
20903 fn inline_align(_context: fidl::encoding::Context) -> usize {
20904 8
20905 }
20906
20907 #[inline(always)]
20908 fn inline_size(_context: fidl::encoding::Context) -> usize {
20909 40
20910 }
20911 }
20912
20913 unsafe impl
20914 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
20915 for &mut DirectoryLinkRequest
20916 {
20917 #[inline]
20918 unsafe fn encode(
20919 self,
20920 encoder: &mut fidl::encoding::Encoder<
20921 '_,
20922 fidl::encoding::DefaultFuchsiaResourceDialect,
20923 >,
20924 offset: usize,
20925 _depth: fidl::encoding::Depth,
20926 ) -> fidl::Result<()> {
20927 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
20928 fidl::encoding::Encode::<
20930 DirectoryLinkRequest,
20931 fidl::encoding::DefaultFuchsiaResourceDialect,
20932 >::encode(
20933 (
20934 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
20935 &self.src,
20936 ),
20937 <fidl::encoding::HandleType<
20938 fidl::NullableHandle,
20939 { fidl::ObjectType::NONE.into_raw() },
20940 2147483648,
20941 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
20942 &mut self.dst_parent_token,
20943 ),
20944 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
20945 &self.dst,
20946 ),
20947 ),
20948 encoder,
20949 offset,
20950 _depth,
20951 )
20952 }
20953 }
20954 unsafe impl<
20955 T0: fidl::encoding::Encode<
20956 fidl::encoding::BoundedString<255>,
20957 fidl::encoding::DefaultFuchsiaResourceDialect,
20958 >,
20959 T1: fidl::encoding::Encode<
20960 fidl::encoding::HandleType<
20961 fidl::NullableHandle,
20962 { fidl::ObjectType::NONE.into_raw() },
20963 2147483648,
20964 >,
20965 fidl::encoding::DefaultFuchsiaResourceDialect,
20966 >,
20967 T2: fidl::encoding::Encode<
20968 fidl::encoding::BoundedString<255>,
20969 fidl::encoding::DefaultFuchsiaResourceDialect,
20970 >,
20971 >
20972 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
20973 for (T0, T1, T2)
20974 {
20975 #[inline]
20976 unsafe fn encode(
20977 self,
20978 encoder: &mut fidl::encoding::Encoder<
20979 '_,
20980 fidl::encoding::DefaultFuchsiaResourceDialect,
20981 >,
20982 offset: usize,
20983 depth: fidl::encoding::Depth,
20984 ) -> fidl::Result<()> {
20985 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
20986 unsafe {
20989 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
20990 (ptr as *mut u64).write_unaligned(0);
20991 }
20992 self.0.encode(encoder, offset + 0, depth)?;
20994 self.1.encode(encoder, offset + 16, depth)?;
20995 self.2.encode(encoder, offset + 24, depth)?;
20996 Ok(())
20997 }
20998 }
20999
21000 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21001 for DirectoryLinkRequest
21002 {
21003 #[inline(always)]
21004 fn new_empty() -> Self {
21005 Self {
21006 src: fidl::new_empty!(
21007 fidl::encoding::BoundedString<255>,
21008 fidl::encoding::DefaultFuchsiaResourceDialect
21009 ),
21010 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21011 dst: fidl::new_empty!(
21012 fidl::encoding::BoundedString<255>,
21013 fidl::encoding::DefaultFuchsiaResourceDialect
21014 ),
21015 }
21016 }
21017
21018 #[inline]
21019 unsafe fn decode(
21020 &mut self,
21021 decoder: &mut fidl::encoding::Decoder<
21022 '_,
21023 fidl::encoding::DefaultFuchsiaResourceDialect,
21024 >,
21025 offset: usize,
21026 _depth: fidl::encoding::Depth,
21027 ) -> fidl::Result<()> {
21028 decoder.debug_check_bounds::<Self>(offset);
21029 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21031 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21032 let mask = 0xffffffff00000000u64;
21033 let maskedval = padval & mask;
21034 if maskedval != 0 {
21035 return Err(fidl::Error::NonZeroPadding {
21036 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21037 });
21038 }
21039 fidl::decode!(
21040 fidl::encoding::BoundedString<255>,
21041 fidl::encoding::DefaultFuchsiaResourceDialect,
21042 &mut self.src,
21043 decoder,
21044 offset + 0,
21045 _depth
21046 )?;
21047 fidl::decode!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.dst_parent_token, decoder, offset + 16, _depth)?;
21048 fidl::decode!(
21049 fidl::encoding::BoundedString<255>,
21050 fidl::encoding::DefaultFuchsiaResourceDialect,
21051 &mut self.dst,
21052 decoder,
21053 offset + 24,
21054 _depth
21055 )?;
21056 Ok(())
21057 }
21058 }
21059
21060 impl fidl::encoding::ResourceTypeMarker for DirectoryOpenRequest {
21061 type Borrowed<'a> = &'a mut Self;
21062 fn take_or_borrow<'a>(
21063 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21064 ) -> Self::Borrowed<'a> {
21065 value
21066 }
21067 }
21068
21069 unsafe impl fidl::encoding::TypeMarker for DirectoryOpenRequest {
21070 type Owned = Self;
21071
21072 #[inline(always)]
21073 fn inline_align(_context: fidl::encoding::Context) -> usize {
21074 8
21075 }
21076
21077 #[inline(always)]
21078 fn inline_size(_context: fidl::encoding::Context) -> usize {
21079 48
21080 }
21081 }
21082
21083 unsafe impl
21084 fidl::encoding::Encode<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21085 for &mut DirectoryOpenRequest
21086 {
21087 #[inline]
21088 unsafe fn encode(
21089 self,
21090 encoder: &mut fidl::encoding::Encoder<
21091 '_,
21092 fidl::encoding::DefaultFuchsiaResourceDialect,
21093 >,
21094 offset: usize,
21095 _depth: fidl::encoding::Depth,
21096 ) -> fidl::Result<()> {
21097 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
21098 fidl::encoding::Encode::<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21100 (
21101 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
21102 <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
21103 <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
21104 <fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
21105 ),
21106 encoder, offset, _depth
21107 )
21108 }
21109 }
21110 unsafe impl<
21111 T0: fidl::encoding::Encode<
21112 fidl::encoding::BoundedString<4095>,
21113 fidl::encoding::DefaultFuchsiaResourceDialect,
21114 >,
21115 T1: fidl::encoding::Encode<Flags, fidl::encoding::DefaultFuchsiaResourceDialect>,
21116 T2: fidl::encoding::Encode<Options, fidl::encoding::DefaultFuchsiaResourceDialect>,
21117 T3: fidl::encoding::Encode<
21118 fidl::encoding::HandleType<
21119 fidl::Channel,
21120 { fidl::ObjectType::CHANNEL.into_raw() },
21121 2147483648,
21122 >,
21123 fidl::encoding::DefaultFuchsiaResourceDialect,
21124 >,
21125 >
21126 fidl::encoding::Encode<DirectoryOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21127 for (T0, T1, T2, T3)
21128 {
21129 #[inline]
21130 unsafe fn encode(
21131 self,
21132 encoder: &mut fidl::encoding::Encoder<
21133 '_,
21134 fidl::encoding::DefaultFuchsiaResourceDialect,
21135 >,
21136 offset: usize,
21137 depth: fidl::encoding::Depth,
21138 ) -> fidl::Result<()> {
21139 encoder.debug_check_bounds::<DirectoryOpenRequest>(offset);
21140 unsafe {
21143 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
21144 (ptr as *mut u64).write_unaligned(0);
21145 }
21146 self.0.encode(encoder, offset + 0, depth)?;
21148 self.1.encode(encoder, offset + 16, depth)?;
21149 self.2.encode(encoder, offset + 24, depth)?;
21150 self.3.encode(encoder, offset + 40, depth)?;
21151 Ok(())
21152 }
21153 }
21154
21155 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21156 for DirectoryOpenRequest
21157 {
21158 #[inline(always)]
21159 fn new_empty() -> Self {
21160 Self {
21161 path: fidl::new_empty!(
21162 fidl::encoding::BoundedString<4095>,
21163 fidl::encoding::DefaultFuchsiaResourceDialect
21164 ),
21165 flags: fidl::new_empty!(Flags, fidl::encoding::DefaultFuchsiaResourceDialect),
21166 options: fidl::new_empty!(Options, fidl::encoding::DefaultFuchsiaResourceDialect),
21167 object: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21168 }
21169 }
21170
21171 #[inline]
21172 unsafe fn decode(
21173 &mut self,
21174 decoder: &mut fidl::encoding::Decoder<
21175 '_,
21176 fidl::encoding::DefaultFuchsiaResourceDialect,
21177 >,
21178 offset: usize,
21179 _depth: fidl::encoding::Depth,
21180 ) -> fidl::Result<()> {
21181 decoder.debug_check_bounds::<Self>(offset);
21182 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
21184 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21185 let mask = 0xffffffff00000000u64;
21186 let maskedval = padval & mask;
21187 if maskedval != 0 {
21188 return Err(fidl::Error::NonZeroPadding {
21189 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
21190 });
21191 }
21192 fidl::decode!(
21193 fidl::encoding::BoundedString<4095>,
21194 fidl::encoding::DefaultFuchsiaResourceDialect,
21195 &mut self.path,
21196 decoder,
21197 offset + 0,
21198 _depth
21199 )?;
21200 fidl::decode!(
21201 Flags,
21202 fidl::encoding::DefaultFuchsiaResourceDialect,
21203 &mut self.flags,
21204 decoder,
21205 offset + 16,
21206 _depth
21207 )?;
21208 fidl::decode!(
21209 Options,
21210 fidl::encoding::DefaultFuchsiaResourceDialect,
21211 &mut self.options,
21212 decoder,
21213 offset + 24,
21214 _depth
21215 )?;
21216 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.object, decoder, offset + 40, _depth)?;
21217 Ok(())
21218 }
21219 }
21220
21221 impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
21222 type Borrowed<'a> = &'a mut Self;
21223 fn take_or_borrow<'a>(
21224 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21225 ) -> Self::Borrowed<'a> {
21226 value
21227 }
21228 }
21229
21230 unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
21231 type Owned = Self;
21232
21233 #[inline(always)]
21234 fn inline_align(_context: fidl::encoding::Context) -> usize {
21235 8
21236 }
21237
21238 #[inline(always)]
21239 fn inline_size(_context: fidl::encoding::Context) -> usize {
21240 40
21241 }
21242 }
21243
21244 unsafe impl
21245 fidl::encoding::Encode<
21246 DirectoryRenameRequest,
21247 fidl::encoding::DefaultFuchsiaResourceDialect,
21248 > for &mut DirectoryRenameRequest
21249 {
21250 #[inline]
21251 unsafe fn encode(
21252 self,
21253 encoder: &mut fidl::encoding::Encoder<
21254 '_,
21255 fidl::encoding::DefaultFuchsiaResourceDialect,
21256 >,
21257 offset: usize,
21258 _depth: fidl::encoding::Depth,
21259 ) -> fidl::Result<()> {
21260 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
21261 fidl::encoding::Encode::<
21263 DirectoryRenameRequest,
21264 fidl::encoding::DefaultFuchsiaResourceDialect,
21265 >::encode(
21266 (
21267 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21268 &self.src,
21269 ),
21270 <fidl::encoding::HandleType<
21271 fidl::Event,
21272 { fidl::ObjectType::EVENT.into_raw() },
21273 2147483648,
21274 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21275 &mut self.dst_parent_token,
21276 ),
21277 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21278 &self.dst,
21279 ),
21280 ),
21281 encoder,
21282 offset,
21283 _depth,
21284 )
21285 }
21286 }
21287 unsafe impl<
21288 T0: fidl::encoding::Encode<
21289 fidl::encoding::BoundedString<255>,
21290 fidl::encoding::DefaultFuchsiaResourceDialect,
21291 >,
21292 T1: fidl::encoding::Encode<
21293 fidl::encoding::HandleType<
21294 fidl::Event,
21295 { fidl::ObjectType::EVENT.into_raw() },
21296 2147483648,
21297 >,
21298 fidl::encoding::DefaultFuchsiaResourceDialect,
21299 >,
21300 T2: fidl::encoding::Encode<
21301 fidl::encoding::BoundedString<255>,
21302 fidl::encoding::DefaultFuchsiaResourceDialect,
21303 >,
21304 >
21305 fidl::encoding::Encode<
21306 DirectoryRenameRequest,
21307 fidl::encoding::DefaultFuchsiaResourceDialect,
21308 > for (T0, T1, T2)
21309 {
21310 #[inline]
21311 unsafe fn encode(
21312 self,
21313 encoder: &mut fidl::encoding::Encoder<
21314 '_,
21315 fidl::encoding::DefaultFuchsiaResourceDialect,
21316 >,
21317 offset: usize,
21318 depth: fidl::encoding::Depth,
21319 ) -> fidl::Result<()> {
21320 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
21321 unsafe {
21324 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21325 (ptr as *mut u64).write_unaligned(0);
21326 }
21327 self.0.encode(encoder, offset + 0, depth)?;
21329 self.1.encode(encoder, offset + 16, depth)?;
21330 self.2.encode(encoder, offset + 24, depth)?;
21331 Ok(())
21332 }
21333 }
21334
21335 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21336 for DirectoryRenameRequest
21337 {
21338 #[inline(always)]
21339 fn new_empty() -> Self {
21340 Self {
21341 src: fidl::new_empty!(
21342 fidl::encoding::BoundedString<255>,
21343 fidl::encoding::DefaultFuchsiaResourceDialect
21344 ),
21345 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21346 dst: fidl::new_empty!(
21347 fidl::encoding::BoundedString<255>,
21348 fidl::encoding::DefaultFuchsiaResourceDialect
21349 ),
21350 }
21351 }
21352
21353 #[inline]
21354 unsafe fn decode(
21355 &mut self,
21356 decoder: &mut fidl::encoding::Decoder<
21357 '_,
21358 fidl::encoding::DefaultFuchsiaResourceDialect,
21359 >,
21360 offset: usize,
21361 _depth: fidl::encoding::Depth,
21362 ) -> fidl::Result<()> {
21363 decoder.debug_check_bounds::<Self>(offset);
21364 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21366 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21367 let mask = 0xffffffff00000000u64;
21368 let maskedval = padval & mask;
21369 if maskedval != 0 {
21370 return Err(fidl::Error::NonZeroPadding {
21371 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21372 });
21373 }
21374 fidl::decode!(
21375 fidl::encoding::BoundedString<255>,
21376 fidl::encoding::DefaultFuchsiaResourceDialect,
21377 &mut self.src,
21378 decoder,
21379 offset + 0,
21380 _depth
21381 )?;
21382 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)?;
21383 fidl::decode!(
21384 fidl::encoding::BoundedString<255>,
21385 fidl::encoding::DefaultFuchsiaResourceDialect,
21386 &mut self.dst,
21387 decoder,
21388 offset + 24,
21389 _depth
21390 )?;
21391 Ok(())
21392 }
21393 }
21394
21395 impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
21396 type Borrowed<'a> = &'a mut Self;
21397 fn take_or_borrow<'a>(
21398 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21399 ) -> Self::Borrowed<'a> {
21400 value
21401 }
21402 }
21403
21404 unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
21405 type Owned = Self;
21406
21407 #[inline(always)]
21408 fn inline_align(_context: fidl::encoding::Context) -> usize {
21409 4
21410 }
21411
21412 #[inline(always)]
21413 fn inline_size(_context: fidl::encoding::Context) -> usize {
21414 12
21415 }
21416 }
21417
21418 unsafe impl
21419 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21420 for &mut DirectoryWatchRequest
21421 {
21422 #[inline]
21423 unsafe fn encode(
21424 self,
21425 encoder: &mut fidl::encoding::Encoder<
21426 '_,
21427 fidl::encoding::DefaultFuchsiaResourceDialect,
21428 >,
21429 offset: usize,
21430 _depth: fidl::encoding::Depth,
21431 ) -> fidl::Result<()> {
21432 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
21433 fidl::encoding::Encode::<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21435 (
21436 <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
21437 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
21438 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.watcher),
21439 ),
21440 encoder, offset, _depth
21441 )
21442 }
21443 }
21444 unsafe impl<
21445 T0: fidl::encoding::Encode<WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect>,
21446 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
21447 T2: fidl::encoding::Encode<
21448 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21449 fidl::encoding::DefaultFuchsiaResourceDialect,
21450 >,
21451 >
21452 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21453 for (T0, T1, T2)
21454 {
21455 #[inline]
21456 unsafe fn encode(
21457 self,
21458 encoder: &mut fidl::encoding::Encoder<
21459 '_,
21460 fidl::encoding::DefaultFuchsiaResourceDialect,
21461 >,
21462 offset: usize,
21463 depth: fidl::encoding::Depth,
21464 ) -> fidl::Result<()> {
21465 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
21466 self.0.encode(encoder, offset + 0, depth)?;
21470 self.1.encode(encoder, offset + 4, depth)?;
21471 self.2.encode(encoder, offset + 8, depth)?;
21472 Ok(())
21473 }
21474 }
21475
21476 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21477 for DirectoryWatchRequest
21478 {
21479 #[inline(always)]
21480 fn new_empty() -> Self {
21481 Self {
21482 mask: fidl::new_empty!(WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect),
21483 options: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
21484 watcher: fidl::new_empty!(
21485 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21486 fidl::encoding::DefaultFuchsiaResourceDialect
21487 ),
21488 }
21489 }
21490
21491 #[inline]
21492 unsafe fn decode(
21493 &mut self,
21494 decoder: &mut fidl::encoding::Decoder<
21495 '_,
21496 fidl::encoding::DefaultFuchsiaResourceDialect,
21497 >,
21498 offset: usize,
21499 _depth: fidl::encoding::Depth,
21500 ) -> fidl::Result<()> {
21501 decoder.debug_check_bounds::<Self>(offset);
21502 fidl::decode!(
21504 WatchMask,
21505 fidl::encoding::DefaultFuchsiaResourceDialect,
21506 &mut self.mask,
21507 decoder,
21508 offset + 0,
21509 _depth
21510 )?;
21511 fidl::decode!(
21512 u32,
21513 fidl::encoding::DefaultFuchsiaResourceDialect,
21514 &mut self.options,
21515 decoder,
21516 offset + 4,
21517 _depth
21518 )?;
21519 fidl::decode!(
21520 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
21521 fidl::encoding::DefaultFuchsiaResourceDialect,
21522 &mut self.watcher,
21523 decoder,
21524 offset + 8,
21525 _depth
21526 )?;
21527 Ok(())
21528 }
21529 }
21530
21531 impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
21532 type Borrowed<'a> = &'a mut Self;
21533 fn take_or_borrow<'a>(
21534 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21535 ) -> Self::Borrowed<'a> {
21536 value
21537 }
21538 }
21539
21540 unsafe impl fidl::encoding::TypeMarker for FileAllocateRequest {
21541 type Owned = Self;
21542
21543 #[inline(always)]
21544 fn inline_align(_context: fidl::encoding::Context) -> usize {
21545 8
21546 }
21547
21548 #[inline(always)]
21549 fn inline_size(_context: fidl::encoding::Context) -> usize {
21550 24
21551 }
21552 }
21553
21554 unsafe impl
21555 fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21556 for &mut FileAllocateRequest
21557 {
21558 #[inline]
21559 unsafe fn encode(
21560 self,
21561 encoder: &mut fidl::encoding::Encoder<
21562 '_,
21563 fidl::encoding::DefaultFuchsiaResourceDialect,
21564 >,
21565 offset: usize,
21566 _depth: fidl::encoding::Depth,
21567 ) -> fidl::Result<()> {
21568 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
21569 fidl::encoding::Encode::<
21571 FileAllocateRequest,
21572 fidl::encoding::DefaultFuchsiaResourceDialect,
21573 >::encode(
21574 (
21575 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
21576 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
21577 <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
21578 ),
21579 encoder,
21580 offset,
21581 _depth,
21582 )
21583 }
21584 }
21585 unsafe impl<
21586 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
21587 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
21588 T2: fidl::encoding::Encode<AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect>,
21589 > fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21590 for (T0, T1, T2)
21591 {
21592 #[inline]
21593 unsafe fn encode(
21594 self,
21595 encoder: &mut fidl::encoding::Encoder<
21596 '_,
21597 fidl::encoding::DefaultFuchsiaResourceDialect,
21598 >,
21599 offset: usize,
21600 depth: fidl::encoding::Depth,
21601 ) -> fidl::Result<()> {
21602 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
21603 unsafe {
21606 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21607 (ptr as *mut u64).write_unaligned(0);
21608 }
21609 self.0.encode(encoder, offset + 0, depth)?;
21611 self.1.encode(encoder, offset + 8, depth)?;
21612 self.2.encode(encoder, offset + 16, depth)?;
21613 Ok(())
21614 }
21615 }
21616
21617 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21618 for FileAllocateRequest
21619 {
21620 #[inline(always)]
21621 fn new_empty() -> Self {
21622 Self {
21623 offset: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
21624 length: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
21625 mode: fidl::new_empty!(AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect),
21626 }
21627 }
21628
21629 #[inline]
21630 unsafe fn decode(
21631 &mut self,
21632 decoder: &mut fidl::encoding::Decoder<
21633 '_,
21634 fidl::encoding::DefaultFuchsiaResourceDialect,
21635 >,
21636 offset: usize,
21637 _depth: fidl::encoding::Depth,
21638 ) -> fidl::Result<()> {
21639 decoder.debug_check_bounds::<Self>(offset);
21640 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21642 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21643 let mask = 0xffffffff00000000u64;
21644 let maskedval = padval & mask;
21645 if maskedval != 0 {
21646 return Err(fidl::Error::NonZeroPadding {
21647 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21648 });
21649 }
21650 fidl::decode!(
21651 u64,
21652 fidl::encoding::DefaultFuchsiaResourceDialect,
21653 &mut self.offset,
21654 decoder,
21655 offset + 0,
21656 _depth
21657 )?;
21658 fidl::decode!(
21659 u64,
21660 fidl::encoding::DefaultFuchsiaResourceDialect,
21661 &mut self.length,
21662 decoder,
21663 offset + 8,
21664 _depth
21665 )?;
21666 fidl::decode!(
21667 AllocateMode,
21668 fidl::encoding::DefaultFuchsiaResourceDialect,
21669 &mut self.mode,
21670 decoder,
21671 offset + 16,
21672 _depth
21673 )?;
21674 Ok(())
21675 }
21676 }
21677
21678 impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
21679 type Borrowed<'a> = &'a mut Self;
21680 fn take_or_borrow<'a>(
21681 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21682 ) -> Self::Borrowed<'a> {
21683 value
21684 }
21685 }
21686
21687 unsafe impl fidl::encoding::TypeMarker for FileEnableVerityRequest {
21688 type Owned = Self;
21689
21690 #[inline(always)]
21691 fn inline_align(_context: fidl::encoding::Context) -> usize {
21692 8
21693 }
21694
21695 #[inline(always)]
21696 fn inline_size(_context: fidl::encoding::Context) -> usize {
21697 16
21698 }
21699 }
21700
21701 unsafe impl
21702 fidl::encoding::Encode<
21703 FileEnableVerityRequest,
21704 fidl::encoding::DefaultFuchsiaResourceDialect,
21705 > for &mut FileEnableVerityRequest
21706 {
21707 #[inline]
21708 unsafe fn encode(
21709 self,
21710 encoder: &mut fidl::encoding::Encoder<
21711 '_,
21712 fidl::encoding::DefaultFuchsiaResourceDialect,
21713 >,
21714 offset: usize,
21715 _depth: fidl::encoding::Depth,
21716 ) -> fidl::Result<()> {
21717 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
21718 fidl::encoding::Encode::<
21720 FileEnableVerityRequest,
21721 fidl::encoding::DefaultFuchsiaResourceDialect,
21722 >::encode(
21723 (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
21724 encoder,
21725 offset,
21726 _depth,
21727 )
21728 }
21729 }
21730 unsafe impl<
21731 T0: fidl::encoding::Encode<VerificationOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
21732 >
21733 fidl::encoding::Encode<
21734 FileEnableVerityRequest,
21735 fidl::encoding::DefaultFuchsiaResourceDialect,
21736 > for (T0,)
21737 {
21738 #[inline]
21739 unsafe fn encode(
21740 self,
21741 encoder: &mut fidl::encoding::Encoder<
21742 '_,
21743 fidl::encoding::DefaultFuchsiaResourceDialect,
21744 >,
21745 offset: usize,
21746 depth: fidl::encoding::Depth,
21747 ) -> fidl::Result<()> {
21748 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
21749 self.0.encode(encoder, offset + 0, depth)?;
21753 Ok(())
21754 }
21755 }
21756
21757 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21758 for FileEnableVerityRequest
21759 {
21760 #[inline(always)]
21761 fn new_empty() -> Self {
21762 Self {
21763 options: fidl::new_empty!(
21764 VerificationOptions,
21765 fidl::encoding::DefaultFuchsiaResourceDialect
21766 ),
21767 }
21768 }
21769
21770 #[inline]
21771 unsafe fn decode(
21772 &mut self,
21773 decoder: &mut fidl::encoding::Decoder<
21774 '_,
21775 fidl::encoding::DefaultFuchsiaResourceDialect,
21776 >,
21777 offset: usize,
21778 _depth: fidl::encoding::Depth,
21779 ) -> fidl::Result<()> {
21780 decoder.debug_check_bounds::<Self>(offset);
21781 fidl::decode!(
21783 VerificationOptions,
21784 fidl::encoding::DefaultFuchsiaResourceDialect,
21785 &mut self.options,
21786 decoder,
21787 offset + 0,
21788 _depth
21789 )?;
21790 Ok(())
21791 }
21792 }
21793
21794 impl fidl::encoding::ResourceTypeMarker for FileObject {
21795 type Borrowed<'a> = &'a mut Self;
21796 fn take_or_borrow<'a>(
21797 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21798 ) -> Self::Borrowed<'a> {
21799 value
21800 }
21801 }
21802
21803 unsafe impl fidl::encoding::TypeMarker for FileObject {
21804 type Owned = Self;
21805
21806 #[inline(always)]
21807 fn inline_align(_context: fidl::encoding::Context) -> usize {
21808 4
21809 }
21810
21811 #[inline(always)]
21812 fn inline_size(_context: fidl::encoding::Context) -> usize {
21813 8
21814 }
21815 }
21816
21817 unsafe impl fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
21818 for &mut FileObject
21819 {
21820 #[inline]
21821 unsafe fn encode(
21822 self,
21823 encoder: &mut fidl::encoding::Encoder<
21824 '_,
21825 fidl::encoding::DefaultFuchsiaResourceDialect,
21826 >,
21827 offset: usize,
21828 _depth: fidl::encoding::Depth,
21829 ) -> fidl::Result<()> {
21830 encoder.debug_check_bounds::<FileObject>(offset);
21831 fidl::encoding::Encode::<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21833 (
21834 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.event),
21835 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.stream),
21836 ),
21837 encoder, offset, _depth
21838 )
21839 }
21840 }
21841 unsafe impl<
21842 T0: fidl::encoding::Encode<
21843 fidl::encoding::Optional<
21844 fidl::encoding::HandleType<
21845 fidl::Event,
21846 { fidl::ObjectType::EVENT.into_raw() },
21847 2147483648,
21848 >,
21849 >,
21850 fidl::encoding::DefaultFuchsiaResourceDialect,
21851 >,
21852 T1: fidl::encoding::Encode<
21853 fidl::encoding::Optional<
21854 fidl::encoding::HandleType<
21855 fidl::Stream,
21856 { fidl::ObjectType::STREAM.into_raw() },
21857 2147483648,
21858 >,
21859 >,
21860 fidl::encoding::DefaultFuchsiaResourceDialect,
21861 >,
21862 > fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
21863 for (T0, T1)
21864 {
21865 #[inline]
21866 unsafe fn encode(
21867 self,
21868 encoder: &mut fidl::encoding::Encoder<
21869 '_,
21870 fidl::encoding::DefaultFuchsiaResourceDialect,
21871 >,
21872 offset: usize,
21873 depth: fidl::encoding::Depth,
21874 ) -> fidl::Result<()> {
21875 encoder.debug_check_bounds::<FileObject>(offset);
21876 self.0.encode(encoder, offset + 0, depth)?;
21880 self.1.encode(encoder, offset + 4, depth)?;
21881 Ok(())
21882 }
21883 }
21884
21885 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {
21886 #[inline(always)]
21887 fn new_empty() -> Self {
21888 Self {
21889 event: fidl::new_empty!(
21890 fidl::encoding::Optional<
21891 fidl::encoding::HandleType<
21892 fidl::Event,
21893 { fidl::ObjectType::EVENT.into_raw() },
21894 2147483648,
21895 >,
21896 >,
21897 fidl::encoding::DefaultFuchsiaResourceDialect
21898 ),
21899 stream: fidl::new_empty!(
21900 fidl::encoding::Optional<
21901 fidl::encoding::HandleType<
21902 fidl::Stream,
21903 { fidl::ObjectType::STREAM.into_raw() },
21904 2147483648,
21905 >,
21906 >,
21907 fidl::encoding::DefaultFuchsiaResourceDialect
21908 ),
21909 }
21910 }
21911
21912 #[inline]
21913 unsafe fn decode(
21914 &mut self,
21915 decoder: &mut fidl::encoding::Decoder<
21916 '_,
21917 fidl::encoding::DefaultFuchsiaResourceDialect,
21918 >,
21919 offset: usize,
21920 _depth: fidl::encoding::Depth,
21921 ) -> fidl::Result<()> {
21922 decoder.debug_check_bounds::<Self>(offset);
21923 fidl::decode!(
21925 fidl::encoding::Optional<
21926 fidl::encoding::HandleType<
21927 fidl::Event,
21928 { fidl::ObjectType::EVENT.into_raw() },
21929 2147483648,
21930 >,
21931 >,
21932 fidl::encoding::DefaultFuchsiaResourceDialect,
21933 &mut self.event,
21934 decoder,
21935 offset + 0,
21936 _depth
21937 )?;
21938 fidl::decode!(
21939 fidl::encoding::Optional<
21940 fidl::encoding::HandleType<
21941 fidl::Stream,
21942 { fidl::ObjectType::STREAM.into_raw() },
21943 2147483648,
21944 >,
21945 >,
21946 fidl::encoding::DefaultFuchsiaResourceDialect,
21947 &mut self.stream,
21948 decoder,
21949 offset + 4,
21950 _depth
21951 )?;
21952 Ok(())
21953 }
21954 }
21955
21956 impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
21957 type Borrowed<'a> = &'a mut Self;
21958 fn take_or_borrow<'a>(
21959 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21960 ) -> Self::Borrowed<'a> {
21961 value
21962 }
21963 }
21964
21965 unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
21966 type Owned = Self;
21967
21968 #[inline(always)]
21969 fn inline_align(_context: fidl::encoding::Context) -> usize {
21970 4
21971 }
21972
21973 #[inline(always)]
21974 fn inline_size(_context: fidl::encoding::Context) -> usize {
21975 4
21976 }
21977 }
21978
21979 unsafe impl
21980 fidl::encoding::Encode<
21981 FileGetBackingMemoryResponse,
21982 fidl::encoding::DefaultFuchsiaResourceDialect,
21983 > for &mut FileGetBackingMemoryResponse
21984 {
21985 #[inline]
21986 unsafe fn encode(
21987 self,
21988 encoder: &mut fidl::encoding::Encoder<
21989 '_,
21990 fidl::encoding::DefaultFuchsiaResourceDialect,
21991 >,
21992 offset: usize,
21993 _depth: fidl::encoding::Depth,
21994 ) -> fidl::Result<()> {
21995 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
21996 fidl::encoding::Encode::<
21998 FileGetBackingMemoryResponse,
21999 fidl::encoding::DefaultFuchsiaResourceDialect,
22000 >::encode(
22001 (<fidl::encoding::HandleType<
22002 fidl::Vmo,
22003 { fidl::ObjectType::VMO.into_raw() },
22004 2147483648,
22005 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22006 &mut self.vmo
22007 ),),
22008 encoder,
22009 offset,
22010 _depth,
22011 )
22012 }
22013 }
22014 unsafe impl<
22015 T0: fidl::encoding::Encode<
22016 fidl::encoding::HandleType<
22017 fidl::Vmo,
22018 { fidl::ObjectType::VMO.into_raw() },
22019 2147483648,
22020 >,
22021 fidl::encoding::DefaultFuchsiaResourceDialect,
22022 >,
22023 >
22024 fidl::encoding::Encode<
22025 FileGetBackingMemoryResponse,
22026 fidl::encoding::DefaultFuchsiaResourceDialect,
22027 > for (T0,)
22028 {
22029 #[inline]
22030 unsafe fn encode(
22031 self,
22032 encoder: &mut fidl::encoding::Encoder<
22033 '_,
22034 fidl::encoding::DefaultFuchsiaResourceDialect,
22035 >,
22036 offset: usize,
22037 depth: fidl::encoding::Depth,
22038 ) -> fidl::Result<()> {
22039 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
22040 self.0.encode(encoder, offset + 0, depth)?;
22044 Ok(())
22045 }
22046 }
22047
22048 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22049 for FileGetBackingMemoryResponse
22050 {
22051 #[inline(always)]
22052 fn new_empty() -> Self {
22053 Self {
22054 vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22055 }
22056 }
22057
22058 #[inline]
22059 unsafe fn decode(
22060 &mut self,
22061 decoder: &mut fidl::encoding::Decoder<
22062 '_,
22063 fidl::encoding::DefaultFuchsiaResourceDialect,
22064 >,
22065 offset: usize,
22066 _depth: fidl::encoding::Depth,
22067 ) -> fidl::Result<()> {
22068 decoder.debug_check_bounds::<Self>(offset);
22069 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
22071 Ok(())
22072 }
22073 }
22074
22075 impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
22076 type Borrowed<'a> = &'a mut Self;
22077 fn take_or_borrow<'a>(
22078 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22079 ) -> Self::Borrowed<'a> {
22080 value
22081 }
22082 }
22083
22084 unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
22085 type Owned = Self;
22086
22087 #[inline(always)]
22088 fn inline_align(_context: fidl::encoding::Context) -> usize {
22089 8
22090 }
22091
22092 #[inline(always)]
22093 fn inline_size(_context: fidl::encoding::Context) -> usize {
22094 24
22095 }
22096 }
22097
22098 unsafe impl
22099 fidl::encoding::Encode<
22100 LinkableLinkIntoRequest,
22101 fidl::encoding::DefaultFuchsiaResourceDialect,
22102 > for &mut LinkableLinkIntoRequest
22103 {
22104 #[inline]
22105 unsafe fn encode(
22106 self,
22107 encoder: &mut fidl::encoding::Encoder<
22108 '_,
22109 fidl::encoding::DefaultFuchsiaResourceDialect,
22110 >,
22111 offset: usize,
22112 _depth: fidl::encoding::Depth,
22113 ) -> fidl::Result<()> {
22114 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
22115 fidl::encoding::Encode::<
22117 LinkableLinkIntoRequest,
22118 fidl::encoding::DefaultFuchsiaResourceDialect,
22119 >::encode(
22120 (
22121 <fidl::encoding::HandleType<
22122 fidl::Event,
22123 { fidl::ObjectType::EVENT.into_raw() },
22124 2147483648,
22125 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22126 &mut self.dst_parent_token,
22127 ),
22128 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
22129 &self.dst,
22130 ),
22131 ),
22132 encoder,
22133 offset,
22134 _depth,
22135 )
22136 }
22137 }
22138 unsafe impl<
22139 T0: fidl::encoding::Encode<
22140 fidl::encoding::HandleType<
22141 fidl::Event,
22142 { fidl::ObjectType::EVENT.into_raw() },
22143 2147483648,
22144 >,
22145 fidl::encoding::DefaultFuchsiaResourceDialect,
22146 >,
22147 T1: fidl::encoding::Encode<
22148 fidl::encoding::BoundedString<255>,
22149 fidl::encoding::DefaultFuchsiaResourceDialect,
22150 >,
22151 >
22152 fidl::encoding::Encode<
22153 LinkableLinkIntoRequest,
22154 fidl::encoding::DefaultFuchsiaResourceDialect,
22155 > for (T0, T1)
22156 {
22157 #[inline]
22158 unsafe fn encode(
22159 self,
22160 encoder: &mut fidl::encoding::Encoder<
22161 '_,
22162 fidl::encoding::DefaultFuchsiaResourceDialect,
22163 >,
22164 offset: usize,
22165 depth: fidl::encoding::Depth,
22166 ) -> fidl::Result<()> {
22167 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
22168 unsafe {
22171 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22172 (ptr as *mut u64).write_unaligned(0);
22173 }
22174 self.0.encode(encoder, offset + 0, depth)?;
22176 self.1.encode(encoder, offset + 8, depth)?;
22177 Ok(())
22178 }
22179 }
22180
22181 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22182 for LinkableLinkIntoRequest
22183 {
22184 #[inline(always)]
22185 fn new_empty() -> Self {
22186 Self {
22187 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22188 dst: fidl::new_empty!(
22189 fidl::encoding::BoundedString<255>,
22190 fidl::encoding::DefaultFuchsiaResourceDialect
22191 ),
22192 }
22193 }
22194
22195 #[inline]
22196 unsafe fn decode(
22197 &mut self,
22198 decoder: &mut fidl::encoding::Decoder<
22199 '_,
22200 fidl::encoding::DefaultFuchsiaResourceDialect,
22201 >,
22202 offset: usize,
22203 _depth: fidl::encoding::Depth,
22204 ) -> fidl::Result<()> {
22205 decoder.debug_check_bounds::<Self>(offset);
22206 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
22208 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22209 let mask = 0xffffffff00000000u64;
22210 let maskedval = padval & mask;
22211 if maskedval != 0 {
22212 return Err(fidl::Error::NonZeroPadding {
22213 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22214 });
22215 }
22216 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)?;
22217 fidl::decode!(
22218 fidl::encoding::BoundedString<255>,
22219 fidl::encoding::DefaultFuchsiaResourceDialect,
22220 &mut self.dst,
22221 decoder,
22222 offset + 8,
22223 _depth
22224 )?;
22225 Ok(())
22226 }
22227 }
22228
22229 impl fidl::encoding::ResourceTypeMarker for NodeDeprecatedCloneRequest {
22230 type Borrowed<'a> = &'a mut Self;
22231 fn take_or_borrow<'a>(
22232 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22233 ) -> Self::Borrowed<'a> {
22234 value
22235 }
22236 }
22237
22238 unsafe impl fidl::encoding::TypeMarker for NodeDeprecatedCloneRequest {
22239 type Owned = Self;
22240
22241 #[inline(always)]
22242 fn inline_align(_context: fidl::encoding::Context) -> usize {
22243 4
22244 }
22245
22246 #[inline(always)]
22247 fn inline_size(_context: fidl::encoding::Context) -> usize {
22248 8
22249 }
22250 }
22251
22252 unsafe impl
22253 fidl::encoding::Encode<
22254 NodeDeprecatedCloneRequest,
22255 fidl::encoding::DefaultFuchsiaResourceDialect,
22256 > for &mut NodeDeprecatedCloneRequest
22257 {
22258 #[inline]
22259 unsafe fn encode(
22260 self,
22261 encoder: &mut fidl::encoding::Encoder<
22262 '_,
22263 fidl::encoding::DefaultFuchsiaResourceDialect,
22264 >,
22265 offset: usize,
22266 _depth: fidl::encoding::Depth,
22267 ) -> fidl::Result<()> {
22268 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
22269 fidl::encoding::Encode::<NodeDeprecatedCloneRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22271 (
22272 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
22273 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
22274 ),
22275 encoder, offset, _depth
22276 )
22277 }
22278 }
22279 unsafe impl<
22280 T0: fidl::encoding::Encode<OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect>,
22281 T1: fidl::encoding::Encode<
22282 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22283 fidl::encoding::DefaultFuchsiaResourceDialect,
22284 >,
22285 >
22286 fidl::encoding::Encode<
22287 NodeDeprecatedCloneRequest,
22288 fidl::encoding::DefaultFuchsiaResourceDialect,
22289 > for (T0, T1)
22290 {
22291 #[inline]
22292 unsafe fn encode(
22293 self,
22294 encoder: &mut fidl::encoding::Encoder<
22295 '_,
22296 fidl::encoding::DefaultFuchsiaResourceDialect,
22297 >,
22298 offset: usize,
22299 depth: fidl::encoding::Depth,
22300 ) -> fidl::Result<()> {
22301 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
22302 self.0.encode(encoder, offset + 0, depth)?;
22306 self.1.encode(encoder, offset + 4, depth)?;
22307 Ok(())
22308 }
22309 }
22310
22311 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22312 for NodeDeprecatedCloneRequest
22313 {
22314 #[inline(always)]
22315 fn new_empty() -> Self {
22316 Self {
22317 flags: fidl::new_empty!(OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect),
22318 object: fidl::new_empty!(
22319 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22320 fidl::encoding::DefaultFuchsiaResourceDialect
22321 ),
22322 }
22323 }
22324
22325 #[inline]
22326 unsafe fn decode(
22327 &mut self,
22328 decoder: &mut fidl::encoding::Decoder<
22329 '_,
22330 fidl::encoding::DefaultFuchsiaResourceDialect,
22331 >,
22332 offset: usize,
22333 _depth: fidl::encoding::Depth,
22334 ) -> fidl::Result<()> {
22335 decoder.debug_check_bounds::<Self>(offset);
22336 fidl::decode!(
22338 OpenFlags,
22339 fidl::encoding::DefaultFuchsiaResourceDialect,
22340 &mut self.flags,
22341 decoder,
22342 offset + 0,
22343 _depth
22344 )?;
22345 fidl::decode!(
22346 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22347 fidl::encoding::DefaultFuchsiaResourceDialect,
22348 &mut self.object,
22349 decoder,
22350 offset + 4,
22351 _depth
22352 )?;
22353 Ok(())
22354 }
22355 }
22356
22357 impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
22358 type Borrowed<'a> = &'a mut Self;
22359 fn take_or_borrow<'a>(
22360 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22361 ) -> Self::Borrowed<'a> {
22362 value
22363 }
22364 }
22365
22366 unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
22367 type Owned = Self;
22368
22369 #[inline(always)]
22370 fn inline_align(_context: fidl::encoding::Context) -> usize {
22371 4
22372 }
22373
22374 #[inline(always)]
22375 fn inline_size(_context: fidl::encoding::Context) -> usize {
22376 4
22377 }
22378 }
22379
22380 unsafe impl
22381 fidl::encoding::Encode<
22382 NodeListExtendedAttributesRequest,
22383 fidl::encoding::DefaultFuchsiaResourceDialect,
22384 > for &mut NodeListExtendedAttributesRequest
22385 {
22386 #[inline]
22387 unsafe fn encode(
22388 self,
22389 encoder: &mut fidl::encoding::Encoder<
22390 '_,
22391 fidl::encoding::DefaultFuchsiaResourceDialect,
22392 >,
22393 offset: usize,
22394 _depth: fidl::encoding::Depth,
22395 ) -> fidl::Result<()> {
22396 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
22397 fidl::encoding::Encode::<
22399 NodeListExtendedAttributesRequest,
22400 fidl::encoding::DefaultFuchsiaResourceDialect,
22401 >::encode(
22402 (<fidl::encoding::Endpoint<
22403 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22404 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22405 &mut self.iterator
22406 ),),
22407 encoder,
22408 offset,
22409 _depth,
22410 )
22411 }
22412 }
22413 unsafe impl<
22414 T0: fidl::encoding::Encode<
22415 fidl::encoding::Endpoint<
22416 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22417 >,
22418 fidl::encoding::DefaultFuchsiaResourceDialect,
22419 >,
22420 >
22421 fidl::encoding::Encode<
22422 NodeListExtendedAttributesRequest,
22423 fidl::encoding::DefaultFuchsiaResourceDialect,
22424 > for (T0,)
22425 {
22426 #[inline]
22427 unsafe fn encode(
22428 self,
22429 encoder: &mut fidl::encoding::Encoder<
22430 '_,
22431 fidl::encoding::DefaultFuchsiaResourceDialect,
22432 >,
22433 offset: usize,
22434 depth: fidl::encoding::Depth,
22435 ) -> fidl::Result<()> {
22436 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
22437 self.0.encode(encoder, offset + 0, depth)?;
22441 Ok(())
22442 }
22443 }
22444
22445 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22446 for NodeListExtendedAttributesRequest
22447 {
22448 #[inline(always)]
22449 fn new_empty() -> Self {
22450 Self {
22451 iterator: fidl::new_empty!(
22452 fidl::encoding::Endpoint<
22453 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22454 >,
22455 fidl::encoding::DefaultFuchsiaResourceDialect
22456 ),
22457 }
22458 }
22459
22460 #[inline]
22461 unsafe fn decode(
22462 &mut self,
22463 decoder: &mut fidl::encoding::Decoder<
22464 '_,
22465 fidl::encoding::DefaultFuchsiaResourceDialect,
22466 >,
22467 offset: usize,
22468 _depth: fidl::encoding::Depth,
22469 ) -> fidl::Result<()> {
22470 decoder.debug_check_bounds::<Self>(offset);
22471 fidl::decode!(
22473 fidl::encoding::Endpoint<
22474 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
22475 >,
22476 fidl::encoding::DefaultFuchsiaResourceDialect,
22477 &mut self.iterator,
22478 decoder,
22479 offset + 0,
22480 _depth
22481 )?;
22482 Ok(())
22483 }
22484 }
22485
22486 impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
22487 type Borrowed<'a> = &'a mut Self;
22488 fn take_or_borrow<'a>(
22489 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22490 ) -> Self::Borrowed<'a> {
22491 value
22492 }
22493 }
22494
22495 unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
22496 type Owned = Self;
22497
22498 #[inline(always)]
22499 fn inline_align(_context: fidl::encoding::Context) -> usize {
22500 8
22501 }
22502
22503 #[inline(always)]
22504 fn inline_size(_context: fidl::encoding::Context) -> usize {
22505 24
22506 }
22507 }
22508
22509 unsafe impl
22510 fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22511 for &mut NodeOnOpenRequest
22512 {
22513 #[inline]
22514 unsafe fn encode(
22515 self,
22516 encoder: &mut fidl::encoding::Encoder<
22517 '_,
22518 fidl::encoding::DefaultFuchsiaResourceDialect,
22519 >,
22520 offset: usize,
22521 _depth: fidl::encoding::Depth,
22522 ) -> fidl::Result<()> {
22523 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
22524 fidl::encoding::Encode::<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22526 (
22527 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
22528 <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
22529 ),
22530 encoder, offset, _depth
22531 )
22532 }
22533 }
22534 unsafe impl<
22535 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
22536 T1: fidl::encoding::Encode<
22537 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22538 fidl::encoding::DefaultFuchsiaResourceDialect,
22539 >,
22540 > fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22541 for (T0, T1)
22542 {
22543 #[inline]
22544 unsafe fn encode(
22545 self,
22546 encoder: &mut fidl::encoding::Encoder<
22547 '_,
22548 fidl::encoding::DefaultFuchsiaResourceDialect,
22549 >,
22550 offset: usize,
22551 depth: fidl::encoding::Depth,
22552 ) -> fidl::Result<()> {
22553 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
22554 unsafe {
22557 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22558 (ptr as *mut u64).write_unaligned(0);
22559 }
22560 self.0.encode(encoder, offset + 0, depth)?;
22562 self.1.encode(encoder, offset + 8, depth)?;
22563 Ok(())
22564 }
22565 }
22566
22567 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22568 for NodeOnOpenRequest
22569 {
22570 #[inline(always)]
22571 fn new_empty() -> Self {
22572 Self {
22573 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
22574 info: fidl::new_empty!(
22575 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22576 fidl::encoding::DefaultFuchsiaResourceDialect
22577 ),
22578 }
22579 }
22580
22581 #[inline]
22582 unsafe fn decode(
22583 &mut self,
22584 decoder: &mut fidl::encoding::Decoder<
22585 '_,
22586 fidl::encoding::DefaultFuchsiaResourceDialect,
22587 >,
22588 offset: usize,
22589 _depth: fidl::encoding::Depth,
22590 ) -> fidl::Result<()> {
22591 decoder.debug_check_bounds::<Self>(offset);
22592 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
22594 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22595 let mask = 0xffffffff00000000u64;
22596 let maskedval = padval & mask;
22597 if maskedval != 0 {
22598 return Err(fidl::Error::NonZeroPadding {
22599 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22600 });
22601 }
22602 fidl::decode!(
22603 i32,
22604 fidl::encoding::DefaultFuchsiaResourceDialect,
22605 &mut self.s,
22606 decoder,
22607 offset + 0,
22608 _depth
22609 )?;
22610 fidl::decode!(
22611 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
22612 fidl::encoding::DefaultFuchsiaResourceDialect,
22613 &mut self.info,
22614 decoder,
22615 offset + 8,
22616 _depth
22617 )?;
22618 Ok(())
22619 }
22620 }
22621
22622 impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
22623 type Borrowed<'a> = &'a mut Self;
22624 fn take_or_borrow<'a>(
22625 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22626 ) -> Self::Borrowed<'a> {
22627 value
22628 }
22629 }
22630
22631 unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
22632 type Owned = Self;
22633
22634 #[inline(always)]
22635 fn inline_align(_context: fidl::encoding::Context) -> usize {
22636 8
22637 }
22638
22639 #[inline(always)]
22640 fn inline_size(_context: fidl::encoding::Context) -> usize {
22641 40
22642 }
22643 }
22644
22645 unsafe impl
22646 fidl::encoding::Encode<
22647 NodeSetExtendedAttributeRequest,
22648 fidl::encoding::DefaultFuchsiaResourceDialect,
22649 > for &mut NodeSetExtendedAttributeRequest
22650 {
22651 #[inline]
22652 unsafe fn encode(
22653 self,
22654 encoder: &mut fidl::encoding::Encoder<
22655 '_,
22656 fidl::encoding::DefaultFuchsiaResourceDialect,
22657 >,
22658 offset: usize,
22659 _depth: fidl::encoding::Depth,
22660 ) -> fidl::Result<()> {
22661 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
22662 fidl::encoding::Encode::<
22664 NodeSetExtendedAttributeRequest,
22665 fidl::encoding::DefaultFuchsiaResourceDialect,
22666 >::encode(
22667 (
22668 <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
22669 &self.name,
22670 ),
22671 <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22672 &mut self.value,
22673 ),
22674 <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
22675 &self.mode,
22676 ),
22677 ),
22678 encoder,
22679 offset,
22680 _depth,
22681 )
22682 }
22683 }
22684 unsafe impl<
22685 T0: fidl::encoding::Encode<
22686 fidl::encoding::Vector<u8, 255>,
22687 fidl::encoding::DefaultFuchsiaResourceDialect,
22688 >,
22689 T1: fidl::encoding::Encode<
22690 ExtendedAttributeValue,
22691 fidl::encoding::DefaultFuchsiaResourceDialect,
22692 >,
22693 T2: fidl::encoding::Encode<
22694 SetExtendedAttributeMode,
22695 fidl::encoding::DefaultFuchsiaResourceDialect,
22696 >,
22697 >
22698 fidl::encoding::Encode<
22699 NodeSetExtendedAttributeRequest,
22700 fidl::encoding::DefaultFuchsiaResourceDialect,
22701 > for (T0, T1, T2)
22702 {
22703 #[inline]
22704 unsafe fn encode(
22705 self,
22706 encoder: &mut fidl::encoding::Encoder<
22707 '_,
22708 fidl::encoding::DefaultFuchsiaResourceDialect,
22709 >,
22710 offset: usize,
22711 depth: fidl::encoding::Depth,
22712 ) -> fidl::Result<()> {
22713 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
22714 unsafe {
22717 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
22718 (ptr as *mut u64).write_unaligned(0);
22719 }
22720 self.0.encode(encoder, offset + 0, depth)?;
22722 self.1.encode(encoder, offset + 16, depth)?;
22723 self.2.encode(encoder, offset + 32, depth)?;
22724 Ok(())
22725 }
22726 }
22727
22728 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22729 for NodeSetExtendedAttributeRequest
22730 {
22731 #[inline(always)]
22732 fn new_empty() -> Self {
22733 Self {
22734 name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect),
22735 value: fidl::new_empty!(
22736 ExtendedAttributeValue,
22737 fidl::encoding::DefaultFuchsiaResourceDialect
22738 ),
22739 mode: fidl::new_empty!(
22740 SetExtendedAttributeMode,
22741 fidl::encoding::DefaultFuchsiaResourceDialect
22742 ),
22743 }
22744 }
22745
22746 #[inline]
22747 unsafe fn decode(
22748 &mut self,
22749 decoder: &mut fidl::encoding::Decoder<
22750 '_,
22751 fidl::encoding::DefaultFuchsiaResourceDialect,
22752 >,
22753 offset: usize,
22754 _depth: fidl::encoding::Depth,
22755 ) -> fidl::Result<()> {
22756 decoder.debug_check_bounds::<Self>(offset);
22757 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
22759 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22760 let mask = 0xffffffff00000000u64;
22761 let maskedval = padval & mask;
22762 if maskedval != 0 {
22763 return Err(fidl::Error::NonZeroPadding {
22764 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
22765 });
22766 }
22767 fidl::decode!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
22768 fidl::decode!(
22769 ExtendedAttributeValue,
22770 fidl::encoding::DefaultFuchsiaResourceDialect,
22771 &mut self.value,
22772 decoder,
22773 offset + 16,
22774 _depth
22775 )?;
22776 fidl::decode!(
22777 SetExtendedAttributeMode,
22778 fidl::encoding::DefaultFuchsiaResourceDialect,
22779 &mut self.mode,
22780 decoder,
22781 offset + 32,
22782 _depth
22783 )?;
22784 Ok(())
22785 }
22786 }
22787
22788 impl ConnectionInfo {
22789 #[inline(always)]
22790 fn max_ordinal_present(&self) -> u64 {
22791 if let Some(_) = self.rights {
22792 return 1;
22793 }
22794 0
22795 }
22796 }
22797
22798 impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
22799 type Borrowed<'a> = &'a mut Self;
22800 fn take_or_borrow<'a>(
22801 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22802 ) -> Self::Borrowed<'a> {
22803 value
22804 }
22805 }
22806
22807 unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
22808 type Owned = Self;
22809
22810 #[inline(always)]
22811 fn inline_align(_context: fidl::encoding::Context) -> usize {
22812 8
22813 }
22814
22815 #[inline(always)]
22816 fn inline_size(_context: fidl::encoding::Context) -> usize {
22817 16
22818 }
22819 }
22820
22821 unsafe impl
22822 fidl::encoding::Encode<ConnectionInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
22823 for &mut ConnectionInfo
22824 {
22825 unsafe fn encode(
22826 self,
22827 encoder: &mut fidl::encoding::Encoder<
22828 '_,
22829 fidl::encoding::DefaultFuchsiaResourceDialect,
22830 >,
22831 offset: usize,
22832 mut depth: fidl::encoding::Depth,
22833 ) -> fidl::Result<()> {
22834 encoder.debug_check_bounds::<ConnectionInfo>(offset);
22835 let max_ordinal: u64 = self.max_ordinal_present();
22837 encoder.write_num(max_ordinal, offset);
22838 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
22839 if max_ordinal == 0 {
22841 return Ok(());
22842 }
22843 depth.increment()?;
22844 let envelope_size = 8;
22845 let bytes_len = max_ordinal as usize * envelope_size;
22846 #[allow(unused_variables)]
22847 let offset = encoder.out_of_line_offset(bytes_len);
22848 let mut _prev_end_offset: usize = 0;
22849 if 1 > max_ordinal {
22850 return Ok(());
22851 }
22852
22853 let cur_offset: usize = (1 - 1) * envelope_size;
22856
22857 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
22859
22860 fidl::encoding::encode_in_envelope_optional::<
22865 Operations,
22866 fidl::encoding::DefaultFuchsiaResourceDialect,
22867 >(
22868 self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
22869 encoder,
22870 offset + cur_offset,
22871 depth,
22872 )?;
22873
22874 _prev_end_offset = cur_offset + envelope_size;
22875
22876 Ok(())
22877 }
22878 }
22879
22880 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22881 for ConnectionInfo
22882 {
22883 #[inline(always)]
22884 fn new_empty() -> Self {
22885 Self::default()
22886 }
22887
22888 unsafe fn decode(
22889 &mut self,
22890 decoder: &mut fidl::encoding::Decoder<
22891 '_,
22892 fidl::encoding::DefaultFuchsiaResourceDialect,
22893 >,
22894 offset: usize,
22895 mut depth: fidl::encoding::Depth,
22896 ) -> fidl::Result<()> {
22897 decoder.debug_check_bounds::<Self>(offset);
22898 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
22899 None => return Err(fidl::Error::NotNullable),
22900 Some(len) => len,
22901 };
22902 if len == 0 {
22904 return Ok(());
22905 };
22906 depth.increment()?;
22907 let envelope_size = 8;
22908 let bytes_len = len * envelope_size;
22909 let offset = decoder.out_of_line_offset(bytes_len)?;
22910 let mut _next_ordinal_to_read = 0;
22912 let mut next_offset = offset;
22913 let end_offset = offset + bytes_len;
22914 _next_ordinal_to_read += 1;
22915 if next_offset >= end_offset {
22916 return Ok(());
22917 }
22918
22919 while _next_ordinal_to_read < 1 {
22921 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
22922 _next_ordinal_to_read += 1;
22923 next_offset += envelope_size;
22924 }
22925
22926 let next_out_of_line = decoder.next_out_of_line();
22927 let handles_before = decoder.remaining_handles();
22928 if let Some((inlined, num_bytes, num_handles)) =
22929 fidl::encoding::decode_envelope_header(decoder, next_offset)?
22930 {
22931 let member_inline_size =
22932 <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
22933 if inlined != (member_inline_size <= 4) {
22934 return Err(fidl::Error::InvalidInlineBitInEnvelope);
22935 }
22936 let inner_offset;
22937 let mut inner_depth = depth.clone();
22938 if inlined {
22939 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
22940 inner_offset = next_offset;
22941 } else {
22942 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
22943 inner_depth.increment()?;
22944 }
22945 let val_ref = self.rights.get_or_insert_with(|| {
22946 fidl::new_empty!(Operations, fidl::encoding::DefaultFuchsiaResourceDialect)
22947 });
22948 fidl::decode!(
22949 Operations,
22950 fidl::encoding::DefaultFuchsiaResourceDialect,
22951 val_ref,
22952 decoder,
22953 inner_offset,
22954 inner_depth
22955 )?;
22956 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
22957 {
22958 return Err(fidl::Error::InvalidNumBytesInEnvelope);
22959 }
22960 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
22961 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
22962 }
22963 }
22964
22965 next_offset += envelope_size;
22966
22967 while next_offset < end_offset {
22969 _next_ordinal_to_read += 1;
22970 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
22971 next_offset += envelope_size;
22972 }
22973
22974 Ok(())
22975 }
22976 }
22977
22978 impl FileInfo {
22979 #[inline(always)]
22980 fn max_ordinal_present(&self) -> u64 {
22981 if let Some(_) = self.attributes {
22982 return 4;
22983 }
22984 if let Some(_) = self.stream {
22985 return 3;
22986 }
22987 if let Some(_) = self.observer {
22988 return 2;
22989 }
22990 if let Some(_) = self.is_append {
22991 return 1;
22992 }
22993 0
22994 }
22995 }
22996
22997 impl fidl::encoding::ResourceTypeMarker for FileInfo {
22998 type Borrowed<'a> = &'a mut Self;
22999 fn take_or_borrow<'a>(
23000 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23001 ) -> Self::Borrowed<'a> {
23002 value
23003 }
23004 }
23005
23006 unsafe impl fidl::encoding::TypeMarker for FileInfo {
23007 type Owned = Self;
23008
23009 #[inline(always)]
23010 fn inline_align(_context: fidl::encoding::Context) -> usize {
23011 8
23012 }
23013
23014 #[inline(always)]
23015 fn inline_size(_context: fidl::encoding::Context) -> usize {
23016 16
23017 }
23018 }
23019
23020 unsafe impl fidl::encoding::Encode<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
23021 for &mut FileInfo
23022 {
23023 unsafe fn encode(
23024 self,
23025 encoder: &mut fidl::encoding::Encoder<
23026 '_,
23027 fidl::encoding::DefaultFuchsiaResourceDialect,
23028 >,
23029 offset: usize,
23030 mut depth: fidl::encoding::Depth,
23031 ) -> fidl::Result<()> {
23032 encoder.debug_check_bounds::<FileInfo>(offset);
23033 let max_ordinal: u64 = self.max_ordinal_present();
23035 encoder.write_num(max_ordinal, offset);
23036 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
23037 if max_ordinal == 0 {
23039 return Ok(());
23040 }
23041 depth.increment()?;
23042 let envelope_size = 8;
23043 let bytes_len = max_ordinal as usize * envelope_size;
23044 #[allow(unused_variables)]
23045 let offset = encoder.out_of_line_offset(bytes_len);
23046 let mut _prev_end_offset: usize = 0;
23047 if 1 > max_ordinal {
23048 return Ok(());
23049 }
23050
23051 let cur_offset: usize = (1 - 1) * envelope_size;
23054
23055 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23057
23058 fidl::encoding::encode_in_envelope_optional::<
23063 bool,
23064 fidl::encoding::DefaultFuchsiaResourceDialect,
23065 >(
23066 self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
23067 encoder,
23068 offset + cur_offset,
23069 depth,
23070 )?;
23071
23072 _prev_end_offset = cur_offset + envelope_size;
23073 if 2 > max_ordinal {
23074 return Ok(());
23075 }
23076
23077 let cur_offset: usize = (2 - 1) * envelope_size;
23080
23081 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23083
23084 fidl::encoding::encode_in_envelope_optional::<
23089 fidl::encoding::HandleType<
23090 fidl::Event,
23091 { fidl::ObjectType::EVENT.into_raw() },
23092 2147483648,
23093 >,
23094 fidl::encoding::DefaultFuchsiaResourceDialect,
23095 >(
23096 self.observer.as_mut().map(
23097 <fidl::encoding::HandleType<
23098 fidl::Event,
23099 { fidl::ObjectType::EVENT.into_raw() },
23100 2147483648,
23101 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
23102 ),
23103 encoder,
23104 offset + cur_offset,
23105 depth,
23106 )?;
23107
23108 _prev_end_offset = cur_offset + envelope_size;
23109 if 3 > max_ordinal {
23110 return Ok(());
23111 }
23112
23113 let cur_offset: usize = (3 - 1) * envelope_size;
23116
23117 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23119
23120 fidl::encoding::encode_in_envelope_optional::<
23125 fidl::encoding::HandleType<
23126 fidl::Stream,
23127 { fidl::ObjectType::STREAM.into_raw() },
23128 2147483648,
23129 >,
23130 fidl::encoding::DefaultFuchsiaResourceDialect,
23131 >(
23132 self.stream.as_mut().map(
23133 <fidl::encoding::HandleType<
23134 fidl::Stream,
23135 { fidl::ObjectType::STREAM.into_raw() },
23136 2147483648,
23137 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
23138 ),
23139 encoder,
23140 offset + cur_offset,
23141 depth,
23142 )?;
23143
23144 _prev_end_offset = cur_offset + envelope_size;
23145 if 4 > max_ordinal {
23146 return Ok(());
23147 }
23148
23149 let cur_offset: usize = (4 - 1) * envelope_size;
23152
23153 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23155
23156 fidl::encoding::encode_in_envelope_optional::<
23161 NodeAttributes2,
23162 fidl::encoding::DefaultFuchsiaResourceDialect,
23163 >(
23164 self.attributes
23165 .as_ref()
23166 .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
23167 encoder,
23168 offset + cur_offset,
23169 depth,
23170 )?;
23171
23172 _prev_end_offset = cur_offset + envelope_size;
23173
23174 Ok(())
23175 }
23176 }
23177
23178 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {
23179 #[inline(always)]
23180 fn new_empty() -> Self {
23181 Self::default()
23182 }
23183
23184 unsafe fn decode(
23185 &mut self,
23186 decoder: &mut fidl::encoding::Decoder<
23187 '_,
23188 fidl::encoding::DefaultFuchsiaResourceDialect,
23189 >,
23190 offset: usize,
23191 mut depth: fidl::encoding::Depth,
23192 ) -> fidl::Result<()> {
23193 decoder.debug_check_bounds::<Self>(offset);
23194 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
23195 None => return Err(fidl::Error::NotNullable),
23196 Some(len) => len,
23197 };
23198 if len == 0 {
23200 return Ok(());
23201 };
23202 depth.increment()?;
23203 let envelope_size = 8;
23204 let bytes_len = len * envelope_size;
23205 let offset = decoder.out_of_line_offset(bytes_len)?;
23206 let mut _next_ordinal_to_read = 0;
23208 let mut next_offset = offset;
23209 let end_offset = offset + bytes_len;
23210 _next_ordinal_to_read += 1;
23211 if next_offset >= end_offset {
23212 return Ok(());
23213 }
23214
23215 while _next_ordinal_to_read < 1 {
23217 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23218 _next_ordinal_to_read += 1;
23219 next_offset += envelope_size;
23220 }
23221
23222 let next_out_of_line = decoder.next_out_of_line();
23223 let handles_before = decoder.remaining_handles();
23224 if let Some((inlined, num_bytes, num_handles)) =
23225 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23226 {
23227 let member_inline_size =
23228 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
23229 if inlined != (member_inline_size <= 4) {
23230 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23231 }
23232 let inner_offset;
23233 let mut inner_depth = depth.clone();
23234 if inlined {
23235 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23236 inner_offset = next_offset;
23237 } else {
23238 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23239 inner_depth.increment()?;
23240 }
23241 let val_ref = self.is_append.get_or_insert_with(|| {
23242 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
23243 });
23244 fidl::decode!(
23245 bool,
23246 fidl::encoding::DefaultFuchsiaResourceDialect,
23247 val_ref,
23248 decoder,
23249 inner_offset,
23250 inner_depth
23251 )?;
23252 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23253 {
23254 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23255 }
23256 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23257 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23258 }
23259 }
23260
23261 next_offset += envelope_size;
23262 _next_ordinal_to_read += 1;
23263 if next_offset >= end_offset {
23264 return Ok(());
23265 }
23266
23267 while _next_ordinal_to_read < 2 {
23269 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23270 _next_ordinal_to_read += 1;
23271 next_offset += envelope_size;
23272 }
23273
23274 let next_out_of_line = decoder.next_out_of_line();
23275 let handles_before = decoder.remaining_handles();
23276 if let Some((inlined, num_bytes, num_handles)) =
23277 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23278 {
23279 let member_inline_size = <fidl::encoding::HandleType<
23280 fidl::Event,
23281 { fidl::ObjectType::EVENT.into_raw() },
23282 2147483648,
23283 > as fidl::encoding::TypeMarker>::inline_size(
23284 decoder.context
23285 );
23286 if inlined != (member_inline_size <= 4) {
23287 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23288 }
23289 let inner_offset;
23290 let mut inner_depth = depth.clone();
23291 if inlined {
23292 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23293 inner_offset = next_offset;
23294 } else {
23295 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23296 inner_depth.increment()?;
23297 }
23298 let val_ref =
23299 self.observer.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
23300 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
23301 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23302 {
23303 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23304 }
23305 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23306 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23307 }
23308 }
23309
23310 next_offset += envelope_size;
23311 _next_ordinal_to_read += 1;
23312 if next_offset >= end_offset {
23313 return Ok(());
23314 }
23315
23316 while _next_ordinal_to_read < 3 {
23318 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23319 _next_ordinal_to_read += 1;
23320 next_offset += envelope_size;
23321 }
23322
23323 let next_out_of_line = decoder.next_out_of_line();
23324 let handles_before = decoder.remaining_handles();
23325 if let Some((inlined, num_bytes, num_handles)) =
23326 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23327 {
23328 let member_inline_size = <fidl::encoding::HandleType<
23329 fidl::Stream,
23330 { fidl::ObjectType::STREAM.into_raw() },
23331 2147483648,
23332 > as fidl::encoding::TypeMarker>::inline_size(
23333 decoder.context
23334 );
23335 if inlined != (member_inline_size <= 4) {
23336 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23337 }
23338 let inner_offset;
23339 let mut inner_depth = depth.clone();
23340 if inlined {
23341 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23342 inner_offset = next_offset;
23343 } else {
23344 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23345 inner_depth.increment()?;
23346 }
23347 let val_ref =
23348 self.stream.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
23349 fidl::decode!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
23350 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23351 {
23352 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23353 }
23354 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23355 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23356 }
23357 }
23358
23359 next_offset += envelope_size;
23360 _next_ordinal_to_read += 1;
23361 if next_offset >= end_offset {
23362 return Ok(());
23363 }
23364
23365 while _next_ordinal_to_read < 4 {
23367 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23368 _next_ordinal_to_read += 1;
23369 next_offset += envelope_size;
23370 }
23371
23372 let next_out_of_line = decoder.next_out_of_line();
23373 let handles_before = decoder.remaining_handles();
23374 if let Some((inlined, num_bytes, num_handles)) =
23375 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23376 {
23377 let member_inline_size =
23378 <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
23379 if inlined != (member_inline_size <= 4) {
23380 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23381 }
23382 let inner_offset;
23383 let mut inner_depth = depth.clone();
23384 if inlined {
23385 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23386 inner_offset = next_offset;
23387 } else {
23388 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23389 inner_depth.increment()?;
23390 }
23391 let val_ref = self.attributes.get_or_insert_with(|| {
23392 fidl::new_empty!(NodeAttributes2, fidl::encoding::DefaultFuchsiaResourceDialect)
23393 });
23394 fidl::decode!(
23395 NodeAttributes2,
23396 fidl::encoding::DefaultFuchsiaResourceDialect,
23397 val_ref,
23398 decoder,
23399 inner_offset,
23400 inner_depth
23401 )?;
23402 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23403 {
23404 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23405 }
23406 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23407 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23408 }
23409 }
23410
23411 next_offset += envelope_size;
23412
23413 while next_offset < end_offset {
23415 _next_ordinal_to_read += 1;
23416 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23417 next_offset += envelope_size;
23418 }
23419
23420 Ok(())
23421 }
23422 }
23423
23424 impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
23425 type Borrowed<'a> = &'a mut Self;
23426 fn take_or_borrow<'a>(
23427 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23428 ) -> Self::Borrowed<'a> {
23429 value
23430 }
23431 }
23432
23433 unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
23434 type Owned = Self;
23435
23436 #[inline(always)]
23437 fn inline_align(_context: fidl::encoding::Context) -> usize {
23438 8
23439 }
23440
23441 #[inline(always)]
23442 fn inline_size(_context: fidl::encoding::Context) -> usize {
23443 16
23444 }
23445 }
23446
23447 unsafe impl
23448 fidl::encoding::Encode<
23449 ExtendedAttributeValue,
23450 fidl::encoding::DefaultFuchsiaResourceDialect,
23451 > for &mut ExtendedAttributeValue
23452 {
23453 #[inline]
23454 unsafe fn encode(
23455 self,
23456 encoder: &mut fidl::encoding::Encoder<
23457 '_,
23458 fidl::encoding::DefaultFuchsiaResourceDialect,
23459 >,
23460 offset: usize,
23461 _depth: fidl::encoding::Depth,
23462 ) -> fidl::Result<()> {
23463 encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
23464 encoder.write_num::<u64>(self.ordinal(), offset);
23465 match self {
23466 ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
23467 fidl::encoding::Vector<u8, 32768>,
23468 fidl::encoding::DefaultFuchsiaResourceDialect,
23469 >(
23470 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
23471 val,
23472 ),
23473 encoder,
23474 offset + 8,
23475 _depth,
23476 ),
23477 ExtendedAttributeValue::Buffer(ref mut val) => {
23478 fidl::encoding::encode_in_envelope::<
23479 fidl::encoding::HandleType<
23480 fidl::Vmo,
23481 { fidl::ObjectType::VMO.into_raw() },
23482 2147483648,
23483 >,
23484 fidl::encoding::DefaultFuchsiaResourceDialect,
23485 >(
23486 <fidl::encoding::HandleType<
23487 fidl::Vmo,
23488 { fidl::ObjectType::VMO.into_raw() },
23489 2147483648,
23490 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
23491 val
23492 ),
23493 encoder,
23494 offset + 8,
23495 _depth,
23496 )
23497 }
23498 ExtendedAttributeValue::__SourceBreaking { .. } => {
23499 Err(fidl::Error::UnknownUnionTag)
23500 }
23501 }
23502 }
23503 }
23504
23505 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23506 for ExtendedAttributeValue
23507 {
23508 #[inline(always)]
23509 fn new_empty() -> Self {
23510 Self::__SourceBreaking { unknown_ordinal: 0 }
23511 }
23512
23513 #[inline]
23514 unsafe fn decode(
23515 &mut self,
23516 decoder: &mut fidl::encoding::Decoder<
23517 '_,
23518 fidl::encoding::DefaultFuchsiaResourceDialect,
23519 >,
23520 offset: usize,
23521 mut depth: fidl::encoding::Depth,
23522 ) -> fidl::Result<()> {
23523 decoder.debug_check_bounds::<Self>(offset);
23524 #[allow(unused_variables)]
23525 let next_out_of_line = decoder.next_out_of_line();
23526 let handles_before = decoder.remaining_handles();
23527 let (ordinal, inlined, num_bytes, num_handles) =
23528 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
23529
23530 let member_inline_size = match ordinal {
23531 1 => {
23532 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
23533 decoder.context,
23534 )
23535 }
23536 2 => <fidl::encoding::HandleType<
23537 fidl::Vmo,
23538 { fidl::ObjectType::VMO.into_raw() },
23539 2147483648,
23540 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23541 0 => return Err(fidl::Error::UnknownUnionTag),
23542 _ => num_bytes as usize,
23543 };
23544
23545 if inlined != (member_inline_size <= 4) {
23546 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23547 }
23548 let _inner_offset;
23549 if inlined {
23550 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
23551 _inner_offset = offset + 8;
23552 } else {
23553 depth.increment()?;
23554 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23555 }
23556 match ordinal {
23557 1 => {
23558 #[allow(irrefutable_let_patterns)]
23559 if let ExtendedAttributeValue::Bytes(_) = self {
23560 } else {
23562 *self = ExtendedAttributeValue::Bytes(
23564 fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect),
23565 );
23566 }
23567 #[allow(irrefutable_let_patterns)]
23568 if let ExtendedAttributeValue::Bytes(ref mut val) = self {
23569 fidl::decode!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
23570 } else {
23571 unreachable!()
23572 }
23573 }
23574 2 => {
23575 #[allow(irrefutable_let_patterns)]
23576 if let ExtendedAttributeValue::Buffer(_) = self {
23577 } else {
23579 *self = ExtendedAttributeValue::Buffer(
23581 fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
23582 );
23583 }
23584 #[allow(irrefutable_let_patterns)]
23585 if let ExtendedAttributeValue::Buffer(ref mut val) = self {
23586 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
23587 } else {
23588 unreachable!()
23589 }
23590 }
23591 #[allow(deprecated)]
23592 ordinal => {
23593 for _ in 0..num_handles {
23594 decoder.drop_next_handle()?;
23595 }
23596 *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
23597 }
23598 }
23599 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
23600 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23601 }
23602 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23603 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23604 }
23605 Ok(())
23606 }
23607 }
23608
23609 impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
23610 type Borrowed<'a> = &'a mut Self;
23611 fn take_or_borrow<'a>(
23612 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23613 ) -> Self::Borrowed<'a> {
23614 value
23615 }
23616 }
23617
23618 unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
23619 type Owned = Self;
23620
23621 #[inline(always)]
23622 fn inline_align(_context: fidl::encoding::Context) -> usize {
23623 8
23624 }
23625
23626 #[inline(always)]
23627 fn inline_size(_context: fidl::encoding::Context) -> usize {
23628 16
23629 }
23630 }
23631
23632 unsafe impl
23633 fidl::encoding::Encode<NodeInfoDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>
23634 for &mut NodeInfoDeprecated
23635 {
23636 #[inline]
23637 unsafe fn encode(
23638 self,
23639 encoder: &mut fidl::encoding::Encoder<
23640 '_,
23641 fidl::encoding::DefaultFuchsiaResourceDialect,
23642 >,
23643 offset: usize,
23644 _depth: fidl::encoding::Depth,
23645 ) -> fidl::Result<()> {
23646 encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
23647 encoder.write_num::<u64>(self.ordinal(), offset);
23648 match self {
23649 NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
23650 Service,
23651 fidl::encoding::DefaultFuchsiaResourceDialect,
23652 >(
23653 <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
23654 encoder,
23655 offset + 8,
23656 _depth,
23657 ),
23658 NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
23659 FileObject,
23660 fidl::encoding::DefaultFuchsiaResourceDialect,
23661 >(
23662 <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
23663 encoder,
23664 offset + 8,
23665 _depth,
23666 ),
23667 NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
23668 DirectoryObject,
23669 fidl::encoding::DefaultFuchsiaResourceDialect,
23670 >(
23671 <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
23672 encoder,
23673 offset + 8,
23674 _depth,
23675 ),
23676 NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
23677 SymlinkObject,
23678 fidl::encoding::DefaultFuchsiaResourceDialect,
23679 >(
23680 <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
23681 encoder,
23682 offset + 8,
23683 _depth,
23684 ),
23685 }
23686 }
23687 }
23688
23689 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23690 for NodeInfoDeprecated
23691 {
23692 #[inline(always)]
23693 fn new_empty() -> Self {
23694 Self::Service(fidl::new_empty!(Service, fidl::encoding::DefaultFuchsiaResourceDialect))
23695 }
23696
23697 #[inline]
23698 unsafe fn decode(
23699 &mut self,
23700 decoder: &mut fidl::encoding::Decoder<
23701 '_,
23702 fidl::encoding::DefaultFuchsiaResourceDialect,
23703 >,
23704 offset: usize,
23705 mut depth: fidl::encoding::Depth,
23706 ) -> fidl::Result<()> {
23707 decoder.debug_check_bounds::<Self>(offset);
23708 #[allow(unused_variables)]
23709 let next_out_of_line = decoder.next_out_of_line();
23710 let handles_before = decoder.remaining_handles();
23711 let (ordinal, inlined, num_bytes, num_handles) =
23712 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
23713
23714 let member_inline_size = match ordinal {
23715 1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23716 2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23717 3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23718 4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23719 _ => return Err(fidl::Error::UnknownUnionTag),
23720 };
23721
23722 if inlined != (member_inline_size <= 4) {
23723 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23724 }
23725 let _inner_offset;
23726 if inlined {
23727 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
23728 _inner_offset = offset + 8;
23729 } else {
23730 depth.increment()?;
23731 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23732 }
23733 match ordinal {
23734 1 => {
23735 #[allow(irrefutable_let_patterns)]
23736 if let NodeInfoDeprecated::Service(_) = self {
23737 } else {
23739 *self = NodeInfoDeprecated::Service(fidl::new_empty!(
23741 Service,
23742 fidl::encoding::DefaultFuchsiaResourceDialect
23743 ));
23744 }
23745 #[allow(irrefutable_let_patterns)]
23746 if let NodeInfoDeprecated::Service(ref mut val) = self {
23747 fidl::decode!(
23748 Service,
23749 fidl::encoding::DefaultFuchsiaResourceDialect,
23750 val,
23751 decoder,
23752 _inner_offset,
23753 depth
23754 )?;
23755 } else {
23756 unreachable!()
23757 }
23758 }
23759 2 => {
23760 #[allow(irrefutable_let_patterns)]
23761 if let NodeInfoDeprecated::File(_) = self {
23762 } else {
23764 *self = NodeInfoDeprecated::File(fidl::new_empty!(
23766 FileObject,
23767 fidl::encoding::DefaultFuchsiaResourceDialect
23768 ));
23769 }
23770 #[allow(irrefutable_let_patterns)]
23771 if let NodeInfoDeprecated::File(ref mut val) = self {
23772 fidl::decode!(
23773 FileObject,
23774 fidl::encoding::DefaultFuchsiaResourceDialect,
23775 val,
23776 decoder,
23777 _inner_offset,
23778 depth
23779 )?;
23780 } else {
23781 unreachable!()
23782 }
23783 }
23784 3 => {
23785 #[allow(irrefutable_let_patterns)]
23786 if let NodeInfoDeprecated::Directory(_) = self {
23787 } else {
23789 *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
23791 DirectoryObject,
23792 fidl::encoding::DefaultFuchsiaResourceDialect
23793 ));
23794 }
23795 #[allow(irrefutable_let_patterns)]
23796 if let NodeInfoDeprecated::Directory(ref mut val) = self {
23797 fidl::decode!(
23798 DirectoryObject,
23799 fidl::encoding::DefaultFuchsiaResourceDialect,
23800 val,
23801 decoder,
23802 _inner_offset,
23803 depth
23804 )?;
23805 } else {
23806 unreachable!()
23807 }
23808 }
23809 4 => {
23810 #[allow(irrefutable_let_patterns)]
23811 if let NodeInfoDeprecated::Symlink(_) = self {
23812 } else {
23814 *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
23816 SymlinkObject,
23817 fidl::encoding::DefaultFuchsiaResourceDialect
23818 ));
23819 }
23820 #[allow(irrefutable_let_patterns)]
23821 if let NodeInfoDeprecated::Symlink(ref mut val) = self {
23822 fidl::decode!(
23823 SymlinkObject,
23824 fidl::encoding::DefaultFuchsiaResourceDialect,
23825 val,
23826 decoder,
23827 _inner_offset,
23828 depth
23829 )?;
23830 } else {
23831 unreachable!()
23832 }
23833 }
23834 ordinal => panic!("unexpected ordinal {:?}", ordinal),
23835 }
23836 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
23837 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23838 }
23839 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23840 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23841 }
23842 Ok(())
23843 }
23844 }
23845
23846 impl fidl::encoding::ResourceTypeMarker for Representation {
23847 type Borrowed<'a> = &'a mut Self;
23848 fn take_or_borrow<'a>(
23849 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23850 ) -> Self::Borrowed<'a> {
23851 value
23852 }
23853 }
23854
23855 unsafe impl fidl::encoding::TypeMarker for Representation {
23856 type Owned = Self;
23857
23858 #[inline(always)]
23859 fn inline_align(_context: fidl::encoding::Context) -> usize {
23860 8
23861 }
23862
23863 #[inline(always)]
23864 fn inline_size(_context: fidl::encoding::Context) -> usize {
23865 16
23866 }
23867 }
23868
23869 unsafe impl
23870 fidl::encoding::Encode<Representation, fidl::encoding::DefaultFuchsiaResourceDialect>
23871 for &mut Representation
23872 {
23873 #[inline]
23874 unsafe fn encode(
23875 self,
23876 encoder: &mut fidl::encoding::Encoder<
23877 '_,
23878 fidl::encoding::DefaultFuchsiaResourceDialect,
23879 >,
23880 offset: usize,
23881 _depth: fidl::encoding::Depth,
23882 ) -> fidl::Result<()> {
23883 encoder.debug_check_bounds::<Representation>(offset);
23884 encoder.write_num::<u64>(self.ordinal(), offset);
23885 match self {
23886 Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
23887 NodeInfo,
23888 fidl::encoding::DefaultFuchsiaResourceDialect,
23889 >(
23890 <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
23891 encoder,
23892 offset + 8,
23893 _depth,
23894 ),
23895 Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
23896 DirectoryInfo,
23897 fidl::encoding::DefaultFuchsiaResourceDialect,
23898 >(
23899 <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
23900 encoder,
23901 offset + 8,
23902 _depth,
23903 ),
23904 Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
23905 FileInfo,
23906 fidl::encoding::DefaultFuchsiaResourceDialect,
23907 >(
23908 <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
23909 encoder,
23910 offset + 8,
23911 _depth,
23912 ),
23913 Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
23914 SymlinkInfo,
23915 fidl::encoding::DefaultFuchsiaResourceDialect,
23916 >(
23917 <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
23918 encoder,
23919 offset + 8,
23920 _depth,
23921 ),
23922 Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
23923 }
23924 }
23925 }
23926
23927 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23928 for Representation
23929 {
23930 #[inline(always)]
23931 fn new_empty() -> Self {
23932 Self::__SourceBreaking { unknown_ordinal: 0 }
23933 }
23934
23935 #[inline]
23936 unsafe fn decode(
23937 &mut self,
23938 decoder: &mut fidl::encoding::Decoder<
23939 '_,
23940 fidl::encoding::DefaultFuchsiaResourceDialect,
23941 >,
23942 offset: usize,
23943 mut depth: fidl::encoding::Depth,
23944 ) -> fidl::Result<()> {
23945 decoder.debug_check_bounds::<Self>(offset);
23946 #[allow(unused_variables)]
23947 let next_out_of_line = decoder.next_out_of_line();
23948 let handles_before = decoder.remaining_handles();
23949 let (ordinal, inlined, num_bytes, num_handles) =
23950 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
23951
23952 let member_inline_size = match ordinal {
23953 1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23954 2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23955 3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23956 4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
23957 0 => return Err(fidl::Error::UnknownUnionTag),
23958 _ => num_bytes as usize,
23959 };
23960
23961 if inlined != (member_inline_size <= 4) {
23962 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23963 }
23964 let _inner_offset;
23965 if inlined {
23966 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
23967 _inner_offset = offset + 8;
23968 } else {
23969 depth.increment()?;
23970 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23971 }
23972 match ordinal {
23973 1 => {
23974 #[allow(irrefutable_let_patterns)]
23975 if let Representation::Node(_) = self {
23976 } else {
23978 *self = Representation::Node(fidl::new_empty!(
23980 NodeInfo,
23981 fidl::encoding::DefaultFuchsiaResourceDialect
23982 ));
23983 }
23984 #[allow(irrefutable_let_patterns)]
23985 if let Representation::Node(ref mut val) = self {
23986 fidl::decode!(
23987 NodeInfo,
23988 fidl::encoding::DefaultFuchsiaResourceDialect,
23989 val,
23990 decoder,
23991 _inner_offset,
23992 depth
23993 )?;
23994 } else {
23995 unreachable!()
23996 }
23997 }
23998 2 => {
23999 #[allow(irrefutable_let_patterns)]
24000 if let Representation::Directory(_) = self {
24001 } else {
24003 *self = Representation::Directory(fidl::new_empty!(
24005 DirectoryInfo,
24006 fidl::encoding::DefaultFuchsiaResourceDialect
24007 ));
24008 }
24009 #[allow(irrefutable_let_patterns)]
24010 if let Representation::Directory(ref mut val) = self {
24011 fidl::decode!(
24012 DirectoryInfo,
24013 fidl::encoding::DefaultFuchsiaResourceDialect,
24014 val,
24015 decoder,
24016 _inner_offset,
24017 depth
24018 )?;
24019 } else {
24020 unreachable!()
24021 }
24022 }
24023 3 => {
24024 #[allow(irrefutable_let_patterns)]
24025 if let Representation::File(_) = self {
24026 } else {
24028 *self = Representation::File(fidl::new_empty!(
24030 FileInfo,
24031 fidl::encoding::DefaultFuchsiaResourceDialect
24032 ));
24033 }
24034 #[allow(irrefutable_let_patterns)]
24035 if let Representation::File(ref mut val) = self {
24036 fidl::decode!(
24037 FileInfo,
24038 fidl::encoding::DefaultFuchsiaResourceDialect,
24039 val,
24040 decoder,
24041 _inner_offset,
24042 depth
24043 )?;
24044 } else {
24045 unreachable!()
24046 }
24047 }
24048 4 => {
24049 #[allow(irrefutable_let_patterns)]
24050 if let Representation::Symlink(_) = self {
24051 } else {
24053 *self = Representation::Symlink(fidl::new_empty!(
24055 SymlinkInfo,
24056 fidl::encoding::DefaultFuchsiaResourceDialect
24057 ));
24058 }
24059 #[allow(irrefutable_let_patterns)]
24060 if let Representation::Symlink(ref mut val) = self {
24061 fidl::decode!(
24062 SymlinkInfo,
24063 fidl::encoding::DefaultFuchsiaResourceDialect,
24064 val,
24065 decoder,
24066 _inner_offset,
24067 depth
24068 )?;
24069 } else {
24070 unreachable!()
24071 }
24072 }
24073 #[allow(deprecated)]
24074 ordinal => {
24075 for _ in 0..num_handles {
24076 decoder.drop_next_handle()?;
24077 }
24078 *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
24079 }
24080 }
24081 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
24082 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24083 }
24084 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24085 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24086 }
24087 Ok(())
24088 }
24089 }
24090}