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, Eq, Hash, Ord, PartialEq, PartialOrd)]
61pub struct DirectoryRenameRequest {
62 pub src: String,
63 pub dst_parent_token: fidl::Event,
64 pub dst: String,
65}
66
67impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryRenameRequest {}
68
69#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
70pub struct DirectoryWatchRequest {
71 pub mask: WatchMask,
72 pub options: u32,
73 pub watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
74}
75
76impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryWatchRequest {}
77
78#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
79pub struct FileAllocateRequest {
80 pub offset: u64,
81 pub length: u64,
82 pub mode: AllocateMode,
87}
88
89impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileAllocateRequest {}
90
91#[derive(Debug, PartialEq)]
92pub struct FileEnableVerityRequest {
93 pub options: VerificationOptions,
94}
95
96impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileEnableVerityRequest {}
97
98#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
99pub struct FileObject {
100 pub event: Option<fidl::Event>,
107 pub stream: Option<fidl::Stream>,
111}
112
113impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {}
114
115#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
116pub struct FileGetBackingMemoryResponse {
117 pub vmo: fidl::Vmo,
118}
119
120impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
121 for FileGetBackingMemoryResponse
122{
123}
124
125#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
126pub struct LinkableLinkIntoRequest {
127 pub dst_parent_token: fidl::Event,
128 pub dst: String,
129}
130
131impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for LinkableLinkIntoRequest {}
132
133#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
134pub struct NodeDeprecatedCloneRequest {
135 pub flags: OpenFlags,
136 pub object: fidl::endpoints::ServerEnd<NodeMarker>,
137}
138
139impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
140 for NodeDeprecatedCloneRequest
141{
142}
143
144#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
145pub struct NodeListExtendedAttributesRequest {
146 pub iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
147}
148
149impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
150 for NodeListExtendedAttributesRequest
151{
152}
153
154#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
155pub struct NodeOnOpenRequest {
156 pub s: i32,
157 pub info: Option<Box<NodeInfoDeprecated>>,
158}
159
160impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeOnOpenRequest {}
161
162#[derive(Debug, PartialEq)]
163pub struct NodeSetExtendedAttributeRequest {
164 pub name: Vec<u8>,
165 pub value: ExtendedAttributeValue,
166 pub mode: SetExtendedAttributeMode,
168}
169
170impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
171 for NodeSetExtendedAttributeRequest
172{
173}
174
175#[derive(Debug, PartialEq)]
176pub struct OpenableOpenRequest {
177 pub path: String,
178 pub flags: Flags,
179 pub options: Options,
180 pub object: fidl::Channel,
181}
182
183impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for OpenableOpenRequest {}
184
185#[derive(Debug, Default, PartialEq)]
186pub struct ConnectionInfo {
187 pub rights: Option<Operations>,
194 #[doc(hidden)]
195 pub __source_breaking: fidl::marker::SourceBreaking,
196}
197
198impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ConnectionInfo {}
199
200#[derive(Debug, Default, PartialEq)]
202pub struct FileInfo {
203 pub is_append: Option<bool>,
207 pub observer: Option<fidl::Event>,
220 pub stream: Option<fidl::Stream>,
227 pub attributes: Option<NodeAttributes2>,
229 #[doc(hidden)]
230 pub __source_breaking: fidl::marker::SourceBreaking,
231}
232
233impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {}
234
235#[derive(Debug)]
239pub enum ExtendedAttributeValue {
240 Bytes(Vec<u8>),
241 Buffer(fidl::Vmo),
242 #[doc(hidden)]
243 __SourceBreaking {
244 unknown_ordinal: u64,
245 },
246}
247
248#[macro_export]
250macro_rules! ExtendedAttributeValueUnknown {
251 () => {
252 _
253 };
254}
255
256impl PartialEq for ExtendedAttributeValue {
258 fn eq(&self, other: &Self) -> bool {
259 match (self, other) {
260 (Self::Bytes(x), Self::Bytes(y)) => *x == *y,
261 (Self::Buffer(x), Self::Buffer(y)) => *x == *y,
262 _ => false,
263 }
264 }
265}
266
267impl ExtendedAttributeValue {
268 #[inline]
269 pub fn ordinal(&self) -> u64 {
270 match *self {
271 Self::Bytes(_) => 1,
272 Self::Buffer(_) => 2,
273 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
274 }
275 }
276
277 #[inline]
278 pub fn unknown_variant_for_testing() -> Self {
279 Self::__SourceBreaking { unknown_ordinal: 0 }
280 }
281
282 #[inline]
283 pub fn is_unknown(&self) -> bool {
284 match self {
285 Self::__SourceBreaking { .. } => true,
286 _ => false,
287 }
288 }
289}
290
291impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ExtendedAttributeValue {}
292
293#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
294pub enum NodeInfoDeprecated {
295 Service(Service),
297 File(FileObject),
299 Directory(DirectoryObject),
301 Symlink(SymlinkObject),
303}
304
305impl NodeInfoDeprecated {
306 #[inline]
307 pub fn ordinal(&self) -> u64 {
308 match *self {
309 Self::Service(_) => 1,
310 Self::File(_) => 2,
311 Self::Directory(_) => 3,
312 Self::Symlink(_) => 4,
313 }
314 }
315}
316
317impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for NodeInfoDeprecated {}
318
319#[derive(Debug)]
320pub enum Representation {
321 Node(NodeInfo),
323 Directory(DirectoryInfo),
325 File(FileInfo),
327 Symlink(SymlinkInfo),
329 #[doc(hidden)]
330 __SourceBreaking { unknown_ordinal: u64 },
331}
332
333#[macro_export]
335macro_rules! RepresentationUnknown {
336 () => {
337 _
338 };
339}
340
341impl PartialEq for Representation {
343 fn eq(&self, other: &Self) -> bool {
344 match (self, other) {
345 (Self::Node(x), Self::Node(y)) => *x == *y,
346 (Self::Directory(x), Self::Directory(y)) => *x == *y,
347 (Self::File(x), Self::File(y)) => *x == *y,
348 (Self::Symlink(x), Self::Symlink(y)) => *x == *y,
349 _ => false,
350 }
351 }
352}
353
354impl Representation {
355 #[inline]
356 pub fn ordinal(&self) -> u64 {
357 match *self {
358 Self::Node(_) => 1,
359 Self::Directory(_) => 2,
360 Self::File(_) => 3,
361 Self::Symlink(_) => 4,
362 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
363 }
364 }
365
366 #[inline]
367 pub fn unknown_variant_for_testing() -> Self {
368 Self::__SourceBreaking { unknown_ordinal: 0 }
369 }
370
371 #[inline]
372 pub fn is_unknown(&self) -> bool {
373 match self {
374 Self::__SourceBreaking { .. } => true,
375 _ => false,
376 }
377 }
378}
379
380impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Representation {}
381
382#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
383pub struct AdvisoryLockingMarker;
384
385impl fidl::endpoints::ProtocolMarker for AdvisoryLockingMarker {
386 type Proxy = AdvisoryLockingProxy;
387 type RequestStream = AdvisoryLockingRequestStream;
388 #[cfg(target_os = "fuchsia")]
389 type SynchronousProxy = AdvisoryLockingSynchronousProxy;
390
391 const DEBUG_NAME: &'static str = "(anonymous) AdvisoryLocking";
392}
393pub type AdvisoryLockingAdvisoryLockResult = Result<(), i32>;
394
395pub trait AdvisoryLockingProxyInterface: Send + Sync {
396 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
397 + Send;
398 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
399}
400#[derive(Debug)]
401#[cfg(target_os = "fuchsia")]
402pub struct AdvisoryLockingSynchronousProxy {
403 client: fidl::client::sync::Client,
404}
405
406#[cfg(target_os = "fuchsia")]
407impl fidl::endpoints::SynchronousProxy for AdvisoryLockingSynchronousProxy {
408 type Proxy = AdvisoryLockingProxy;
409 type Protocol = AdvisoryLockingMarker;
410
411 fn from_channel(inner: fidl::Channel) -> Self {
412 Self::new(inner)
413 }
414
415 fn into_channel(self) -> fidl::Channel {
416 self.client.into_channel()
417 }
418
419 fn as_channel(&self) -> &fidl::Channel {
420 self.client.as_channel()
421 }
422}
423
424#[cfg(target_os = "fuchsia")]
425impl AdvisoryLockingSynchronousProxy {
426 pub fn new(channel: fidl::Channel) -> Self {
427 Self { client: fidl::client::sync::Client::new(channel) }
428 }
429
430 pub fn into_channel(self) -> fidl::Channel {
431 self.client.into_channel()
432 }
433
434 pub fn wait_for_event(
437 &self,
438 deadline: zx::MonotonicInstant,
439 ) -> Result<AdvisoryLockingEvent, fidl::Error> {
440 AdvisoryLockingEvent::decode(self.client.wait_for_event::<AdvisoryLockingMarker>(deadline)?)
441 }
442
443 pub fn r#advisory_lock(
467 &self,
468 mut request: &AdvisoryLockRequest,
469 ___deadline: zx::MonotonicInstant,
470 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
471 let _response = self.client.send_query::<
472 AdvisoryLockingAdvisoryLockRequest,
473 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
474 AdvisoryLockingMarker,
475 >(
476 (request,),
477 0x6ee9c0ad53ec87aa,
478 fidl::encoding::DynamicFlags::empty(),
479 ___deadline,
480 )?;
481 Ok(_response.map(|x| x))
482 }
483}
484
485#[cfg(target_os = "fuchsia")]
486impl From<AdvisoryLockingSynchronousProxy> for zx::NullableHandle {
487 fn from(value: AdvisoryLockingSynchronousProxy) -> Self {
488 value.into_channel().into()
489 }
490}
491
492#[cfg(target_os = "fuchsia")]
493impl From<fidl::Channel> for AdvisoryLockingSynchronousProxy {
494 fn from(value: fidl::Channel) -> Self {
495 Self::new(value)
496 }
497}
498
499#[cfg(target_os = "fuchsia")]
500impl fidl::endpoints::FromClient for AdvisoryLockingSynchronousProxy {
501 type Protocol = AdvisoryLockingMarker;
502
503 fn from_client(value: fidl::endpoints::ClientEnd<AdvisoryLockingMarker>) -> Self {
504 Self::new(value.into_channel())
505 }
506}
507
508#[derive(Debug, Clone)]
509pub struct AdvisoryLockingProxy {
510 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
511}
512
513impl fidl::endpoints::Proxy for AdvisoryLockingProxy {
514 type Protocol = AdvisoryLockingMarker;
515
516 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
517 Self::new(inner)
518 }
519
520 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
521 self.client.into_channel().map_err(|client| Self { client })
522 }
523
524 fn as_channel(&self) -> &::fidl::AsyncChannel {
525 self.client.as_channel()
526 }
527}
528
529impl AdvisoryLockingProxy {
530 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
532 let protocol_name = <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
533 Self { client: fidl::client::Client::new(channel, protocol_name) }
534 }
535
536 pub fn take_event_stream(&self) -> AdvisoryLockingEventStream {
542 AdvisoryLockingEventStream { event_receiver: self.client.take_event_receiver() }
543 }
544
545 pub fn r#advisory_lock(
569 &self,
570 mut request: &AdvisoryLockRequest,
571 ) -> fidl::client::QueryResponseFut<
572 AdvisoryLockingAdvisoryLockResult,
573 fidl::encoding::DefaultFuchsiaResourceDialect,
574 > {
575 AdvisoryLockingProxyInterface::r#advisory_lock(self, request)
576 }
577}
578
579impl AdvisoryLockingProxyInterface for AdvisoryLockingProxy {
580 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
581 AdvisoryLockingAdvisoryLockResult,
582 fidl::encoding::DefaultFuchsiaResourceDialect,
583 >;
584 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
585 fn _decode(
586 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
587 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
588 let _response = fidl::client::decode_transaction_body::<
589 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
590 fidl::encoding::DefaultFuchsiaResourceDialect,
591 0x6ee9c0ad53ec87aa,
592 >(_buf?)?;
593 Ok(_response.map(|x| x))
594 }
595 self.client.send_query_and_decode::<
596 AdvisoryLockingAdvisoryLockRequest,
597 AdvisoryLockingAdvisoryLockResult,
598 >(
599 (request,),
600 0x6ee9c0ad53ec87aa,
601 fidl::encoding::DynamicFlags::empty(),
602 _decode,
603 )
604 }
605}
606
607pub struct AdvisoryLockingEventStream {
608 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
609}
610
611impl std::marker::Unpin for AdvisoryLockingEventStream {}
612
613impl futures::stream::FusedStream for AdvisoryLockingEventStream {
614 fn is_terminated(&self) -> bool {
615 self.event_receiver.is_terminated()
616 }
617}
618
619impl futures::Stream for AdvisoryLockingEventStream {
620 type Item = Result<AdvisoryLockingEvent, fidl::Error>;
621
622 fn poll_next(
623 mut self: std::pin::Pin<&mut Self>,
624 cx: &mut std::task::Context<'_>,
625 ) -> std::task::Poll<Option<Self::Item>> {
626 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
627 &mut self.event_receiver,
628 cx
629 )?) {
630 Some(buf) => std::task::Poll::Ready(Some(AdvisoryLockingEvent::decode(buf))),
631 None => std::task::Poll::Ready(None),
632 }
633 }
634}
635
636#[derive(Debug)]
637pub enum AdvisoryLockingEvent {}
638
639impl AdvisoryLockingEvent {
640 fn decode(
642 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
643 ) -> Result<AdvisoryLockingEvent, fidl::Error> {
644 let (bytes, _handles) = buf.split_mut();
645 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
646 debug_assert_eq!(tx_header.tx_id, 0);
647 match tx_header.ordinal {
648 _ => Err(fidl::Error::UnknownOrdinal {
649 ordinal: tx_header.ordinal,
650 protocol_name:
651 <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
652 }),
653 }
654 }
655}
656
657pub struct AdvisoryLockingRequestStream {
659 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
660 is_terminated: bool,
661}
662
663impl std::marker::Unpin for AdvisoryLockingRequestStream {}
664
665impl futures::stream::FusedStream for AdvisoryLockingRequestStream {
666 fn is_terminated(&self) -> bool {
667 self.is_terminated
668 }
669}
670
671impl fidl::endpoints::RequestStream for AdvisoryLockingRequestStream {
672 type Protocol = AdvisoryLockingMarker;
673 type ControlHandle = AdvisoryLockingControlHandle;
674
675 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
676 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
677 }
678
679 fn control_handle(&self) -> Self::ControlHandle {
680 AdvisoryLockingControlHandle { inner: self.inner.clone() }
681 }
682
683 fn into_inner(
684 self,
685 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
686 {
687 (self.inner, self.is_terminated)
688 }
689
690 fn from_inner(
691 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
692 is_terminated: bool,
693 ) -> Self {
694 Self { inner, is_terminated }
695 }
696}
697
698impl futures::Stream for AdvisoryLockingRequestStream {
699 type Item = Result<AdvisoryLockingRequest, fidl::Error>;
700
701 fn poll_next(
702 mut self: std::pin::Pin<&mut Self>,
703 cx: &mut std::task::Context<'_>,
704 ) -> std::task::Poll<Option<Self::Item>> {
705 let this = &mut *self;
706 if this.inner.check_shutdown(cx) {
707 this.is_terminated = true;
708 return std::task::Poll::Ready(None);
709 }
710 if this.is_terminated {
711 panic!("polled AdvisoryLockingRequestStream after completion");
712 }
713 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
714 |bytes, handles| {
715 match this.inner.channel().read_etc(cx, bytes, handles) {
716 std::task::Poll::Ready(Ok(())) => {}
717 std::task::Poll::Pending => return std::task::Poll::Pending,
718 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
719 this.is_terminated = true;
720 return std::task::Poll::Ready(None);
721 }
722 std::task::Poll::Ready(Err(e)) => {
723 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
724 e.into(),
725 ))));
726 }
727 }
728
729 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
731
732 std::task::Poll::Ready(Some(match header.ordinal {
733 0x6ee9c0ad53ec87aa => {
734 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
735 let mut req = fidl::new_empty!(
736 AdvisoryLockingAdvisoryLockRequest,
737 fidl::encoding::DefaultFuchsiaResourceDialect
738 );
739 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
740 let control_handle =
741 AdvisoryLockingControlHandle { inner: this.inner.clone() };
742 Ok(AdvisoryLockingRequest::AdvisoryLock {
743 request: req.request,
744
745 responder: AdvisoryLockingAdvisoryLockResponder {
746 control_handle: std::mem::ManuallyDrop::new(control_handle),
747 tx_id: header.tx_id,
748 },
749 })
750 }
751 _ => Err(fidl::Error::UnknownOrdinal {
752 ordinal: header.ordinal,
753 protocol_name:
754 <AdvisoryLockingMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
755 }),
756 }))
757 },
758 )
759 }
760}
761
762#[derive(Debug)]
775pub enum AdvisoryLockingRequest {
776 AdvisoryLock { request: AdvisoryLockRequest, responder: AdvisoryLockingAdvisoryLockResponder },
800}
801
802impl AdvisoryLockingRequest {
803 #[allow(irrefutable_let_patterns)]
804 pub fn into_advisory_lock(
805 self,
806 ) -> Option<(AdvisoryLockRequest, AdvisoryLockingAdvisoryLockResponder)> {
807 if let AdvisoryLockingRequest::AdvisoryLock { request, responder } = self {
808 Some((request, responder))
809 } else {
810 None
811 }
812 }
813
814 pub fn method_name(&self) -> &'static str {
816 match *self {
817 AdvisoryLockingRequest::AdvisoryLock { .. } => "advisory_lock",
818 }
819 }
820}
821
822#[derive(Debug, Clone)]
823pub struct AdvisoryLockingControlHandle {
824 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
825}
826
827impl AdvisoryLockingControlHandle {
828 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
829 self.inner.shutdown_with_epitaph(status.into())
830 }
831}
832
833impl fidl::endpoints::ControlHandle for AdvisoryLockingControlHandle {
834 fn shutdown(&self) {
835 self.inner.shutdown()
836 }
837
838 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
839 self.inner.shutdown_with_epitaph(status)
840 }
841
842 fn is_closed(&self) -> bool {
843 self.inner.channel().is_closed()
844 }
845 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
846 self.inner.channel().on_closed()
847 }
848
849 #[cfg(target_os = "fuchsia")]
850 fn signal_peer(
851 &self,
852 clear_mask: zx::Signals,
853 set_mask: zx::Signals,
854 ) -> Result<(), zx_status::Status> {
855 use fidl::Peered;
856 self.inner.channel().signal_peer(clear_mask, set_mask)
857 }
858}
859
860impl AdvisoryLockingControlHandle {}
861
862#[must_use = "FIDL methods require a response to be sent"]
863#[derive(Debug)]
864pub struct AdvisoryLockingAdvisoryLockResponder {
865 control_handle: std::mem::ManuallyDrop<AdvisoryLockingControlHandle>,
866 tx_id: u32,
867}
868
869impl std::ops::Drop for AdvisoryLockingAdvisoryLockResponder {
873 fn drop(&mut self) {
874 self.control_handle.shutdown();
875 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
877 }
878}
879
880impl fidl::endpoints::Responder for AdvisoryLockingAdvisoryLockResponder {
881 type ControlHandle = AdvisoryLockingControlHandle;
882
883 fn control_handle(&self) -> &AdvisoryLockingControlHandle {
884 &self.control_handle
885 }
886
887 fn drop_without_shutdown(mut self) {
888 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
890 std::mem::forget(self);
892 }
893}
894
895impl AdvisoryLockingAdvisoryLockResponder {
896 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
900 let _result = self.send_raw(result);
901 if _result.is_err() {
902 self.control_handle.shutdown();
903 }
904 self.drop_without_shutdown();
905 _result
906 }
907
908 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
910 let _result = self.send_raw(result);
911 self.drop_without_shutdown();
912 _result
913 }
914
915 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
916 self.control_handle
917 .inner
918 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
919 result,
920 self.tx_id,
921 0x6ee9c0ad53ec87aa,
922 fidl::encoding::DynamicFlags::empty(),
923 )
924 }
925}
926
927#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
928pub struct DirectoryMarker;
929
930impl fidl::endpoints::ProtocolMarker for DirectoryMarker {
931 type Proxy = DirectoryProxy;
932 type RequestStream = DirectoryRequestStream;
933 #[cfg(target_os = "fuchsia")]
934 type SynchronousProxy = DirectorySynchronousProxy;
935
936 const DEBUG_NAME: &'static str = "fuchsia.io.Directory";
937}
938impl fidl::endpoints::DiscoverableProtocolMarker for DirectoryMarker {}
939pub type DirectoryUnlinkResult = Result<(), i32>;
940pub type DirectoryRenameResult = Result<(), i32>;
941pub type DirectoryCreateSymlinkResult = Result<(), i32>;
942
943pub trait DirectoryProxyInterface: Send + Sync {
944 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
945 + Send;
946 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
947 fn r#clone(
948 &self,
949 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
950 ) -> Result<(), fidl::Error>;
951 type CloseResponseFut: std::future::Future<
952 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
953 > + Send;
954 fn r#close(&self) -> Self::CloseResponseFut;
955 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
956 fn r#query(&self) -> Self::QueryResponseFut;
957 fn r#deprecated_clone(
958 &self,
959 flags: OpenFlags,
960 object: fidl::endpoints::ServerEnd<NodeMarker>,
961 ) -> Result<(), fidl::Error>;
962 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
963 + Send;
964 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
965 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
966 fn r#deprecated_set_attr(
967 &self,
968 flags: NodeAttributeFlags,
969 attributes: &NodeAttributes,
970 ) -> Self::DeprecatedSetAttrResponseFut;
971 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
972 + Send;
973 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
974 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
975 + Send;
976 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
977 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
978 + Send;
979 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
980 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
981 + Send;
982 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
983 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
984 + Send;
985 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
986 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
987 + Send;
988 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
989 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
990 + Send;
991 fn r#update_attributes(
992 &self,
993 payload: &MutableNodeAttributes,
994 ) -> Self::UpdateAttributesResponseFut;
995 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
996 fn r#sync(&self) -> Self::SyncResponseFut;
997 fn r#list_extended_attributes(
998 &self,
999 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
1000 ) -> Result<(), fidl::Error>;
1001 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
1002 + Send;
1003 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
1004 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
1005 + Send;
1006 fn r#set_extended_attribute(
1007 &self,
1008 name: &[u8],
1009 value: ExtendedAttributeValue,
1010 mode: SetExtendedAttributeMode,
1011 ) -> Self::SetExtendedAttributeResponseFut;
1012 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
1013 + Send;
1014 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
1015 fn r#open(
1016 &self,
1017 path: &str,
1018 flags: Flags,
1019 options: &Options,
1020 object: fidl::Channel,
1021 ) -> Result<(), fidl::Error>;
1022 fn r#deprecated_open(
1023 &self,
1024 flags: OpenFlags,
1025 mode: ModeType,
1026 path: &str,
1027 object: fidl::endpoints::ServerEnd<NodeMarker>,
1028 ) -> Result<(), fidl::Error>;
1029 type ReadDirentsResponseFut: std::future::Future<Output = Result<(i32, Vec<u8>), fidl::Error>>
1030 + Send;
1031 fn r#read_dirents(&self, max_bytes: u64) -> Self::ReadDirentsResponseFut;
1032 type RewindResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1033 fn r#rewind(&self) -> Self::RewindResponseFut;
1034 type GetTokenResponseFut: std::future::Future<Output = Result<(i32, Option<fidl::NullableHandle>), fidl::Error>>
1035 + Send;
1036 fn r#get_token(&self) -> Self::GetTokenResponseFut;
1037 type LinkResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1038 fn r#link(
1039 &self,
1040 src: &str,
1041 dst_parent_token: fidl::NullableHandle,
1042 dst: &str,
1043 ) -> Self::LinkResponseFut;
1044 type UnlinkResponseFut: std::future::Future<Output = Result<DirectoryUnlinkResult, fidl::Error>>
1045 + Send;
1046 fn r#unlink(&self, name: &str, options: &UnlinkOptions) -> Self::UnlinkResponseFut;
1047 type RenameResponseFut: std::future::Future<Output = Result<DirectoryRenameResult, fidl::Error>>
1048 + Send;
1049 fn r#rename(
1050 &self,
1051 src: &str,
1052 dst_parent_token: fidl::Event,
1053 dst: &str,
1054 ) -> Self::RenameResponseFut;
1055 type CreateSymlinkResponseFut: std::future::Future<Output = Result<DirectoryCreateSymlinkResult, fidl::Error>>
1056 + Send;
1057 fn r#create_symlink(
1058 &self,
1059 name: &str,
1060 target: &[u8],
1061 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1062 ) -> Self::CreateSymlinkResponseFut;
1063 type WatchResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
1064 fn r#watch(
1065 &self,
1066 mask: WatchMask,
1067 options: u32,
1068 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1069 ) -> Self::WatchResponseFut;
1070}
1071#[derive(Debug)]
1072#[cfg(target_os = "fuchsia")]
1073pub struct DirectorySynchronousProxy {
1074 client: fidl::client::sync::Client,
1075}
1076
1077#[cfg(target_os = "fuchsia")]
1078impl fidl::endpoints::SynchronousProxy for DirectorySynchronousProxy {
1079 type Proxy = DirectoryProxy;
1080 type Protocol = DirectoryMarker;
1081
1082 fn from_channel(inner: fidl::Channel) -> Self {
1083 Self::new(inner)
1084 }
1085
1086 fn into_channel(self) -> fidl::Channel {
1087 self.client.into_channel()
1088 }
1089
1090 fn as_channel(&self) -> &fidl::Channel {
1091 self.client.as_channel()
1092 }
1093}
1094
1095#[cfg(target_os = "fuchsia")]
1096impl DirectorySynchronousProxy {
1097 pub fn new(channel: fidl::Channel) -> Self {
1098 Self { client: fidl::client::sync::Client::new(channel) }
1099 }
1100
1101 pub fn into_channel(self) -> fidl::Channel {
1102 self.client.into_channel()
1103 }
1104
1105 pub fn wait_for_event(
1108 &self,
1109 deadline: zx::MonotonicInstant,
1110 ) -> Result<DirectoryEvent, fidl::Error> {
1111 DirectoryEvent::decode(self.client.wait_for_event::<DirectoryMarker>(deadline)?)
1112 }
1113
1114 pub fn r#advisory_lock(
1138 &self,
1139 mut request: &AdvisoryLockRequest,
1140 ___deadline: zx::MonotonicInstant,
1141 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
1142 let _response = self.client.send_query::<
1143 AdvisoryLockingAdvisoryLockRequest,
1144 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1145 DirectoryMarker,
1146 >(
1147 (request,),
1148 0x6ee9c0ad53ec87aa,
1149 fidl::encoding::DynamicFlags::empty(),
1150 ___deadline,
1151 )?;
1152 Ok(_response.map(|x| x))
1153 }
1154
1155 pub fn r#clone(
1156 &self,
1157 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1158 ) -> Result<(), fidl::Error> {
1159 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
1160 (request,),
1161 0x20d8a7aba2168a79,
1162 fidl::encoding::DynamicFlags::empty(),
1163 )
1164 }
1165
1166 pub fn r#close(
1177 &self,
1178 ___deadline: zx::MonotonicInstant,
1179 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
1180 let _response = self.client.send_query::<
1181 fidl::encoding::EmptyPayload,
1182 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1183 DirectoryMarker,
1184 >(
1185 (),
1186 0x5ac5d459ad7f657e,
1187 fidl::encoding::DynamicFlags::empty(),
1188 ___deadline,
1189 )?;
1190 Ok(_response.map(|x| x))
1191 }
1192
1193 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
1194 let _response = self.client.send_query::<
1195 fidl::encoding::EmptyPayload,
1196 fidl_fuchsia_unknown::QueryableQueryResponse,
1197 DirectoryMarker,
1198 >(
1199 (),
1200 0x2658edee9decfc06,
1201 fidl::encoding::DynamicFlags::empty(),
1202 ___deadline,
1203 )?;
1204 Ok(_response.protocol)
1205 }
1206
1207 pub fn r#deprecated_clone(
1209 &self,
1210 mut flags: OpenFlags,
1211 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1212 ) -> Result<(), fidl::Error> {
1213 self.client.send::<NodeDeprecatedCloneRequest>(
1214 (flags, object),
1215 0x5a61678f293ce16f,
1216 fidl::encoding::DynamicFlags::FLEXIBLE,
1217 )
1218 }
1219
1220 pub fn r#deprecated_get_attr(
1224 &self,
1225 ___deadline: zx::MonotonicInstant,
1226 ) -> Result<(i32, NodeAttributes), fidl::Error> {
1227 let _response = self.client.send_query::<
1228 fidl::encoding::EmptyPayload,
1229 NodeDeprecatedGetAttrResponse,
1230 DirectoryMarker,
1231 >(
1232 (),
1233 0x78985e216314dafd,
1234 fidl::encoding::DynamicFlags::empty(),
1235 ___deadline,
1236 )?;
1237 Ok((_response.s, _response.attributes))
1238 }
1239
1240 pub fn r#deprecated_set_attr(
1242 &self,
1243 mut flags: NodeAttributeFlags,
1244 mut attributes: &NodeAttributes,
1245 ___deadline: zx::MonotonicInstant,
1246 ) -> Result<i32, fidl::Error> {
1247 let _response = self.client.send_query::<
1248 NodeDeprecatedSetAttrRequest,
1249 NodeDeprecatedSetAttrResponse,
1250 DirectoryMarker,
1251 >(
1252 (flags, attributes,),
1253 0x4186c0f40d938f46,
1254 fidl::encoding::DynamicFlags::empty(),
1255 ___deadline,
1256 )?;
1257 Ok(_response.s)
1258 }
1259
1260 pub fn r#deprecated_get_flags(
1262 &self,
1263 ___deadline: zx::MonotonicInstant,
1264 ) -> Result<(i32, OpenFlags), fidl::Error> {
1265 let _response = self.client.send_query::<
1266 fidl::encoding::EmptyPayload,
1267 NodeDeprecatedGetFlagsResponse,
1268 DirectoryMarker,
1269 >(
1270 (),
1271 0x5b88fffb8eda3aa1,
1272 fidl::encoding::DynamicFlags::empty(),
1273 ___deadline,
1274 )?;
1275 Ok((_response.s, _response.flags))
1276 }
1277
1278 pub fn r#deprecated_set_flags(
1280 &self,
1281 mut flags: OpenFlags,
1282 ___deadline: zx::MonotonicInstant,
1283 ) -> Result<i32, fidl::Error> {
1284 let _response = self.client.send_query::<
1285 NodeDeprecatedSetFlagsRequest,
1286 NodeDeprecatedSetFlagsResponse,
1287 DirectoryMarker,
1288 >(
1289 (flags,),
1290 0x5295b76c71fde733,
1291 fidl::encoding::DynamicFlags::empty(),
1292 ___deadline,
1293 )?;
1294 Ok(_response.s)
1295 }
1296
1297 pub fn r#get_flags(
1306 &self,
1307 ___deadline: zx::MonotonicInstant,
1308 ) -> Result<NodeGetFlagsResult, fidl::Error> {
1309 let _response = self.client.send_query::<
1310 fidl::encoding::EmptyPayload,
1311 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
1312 DirectoryMarker,
1313 >(
1314 (),
1315 0x176eb318f64ec23,
1316 fidl::encoding::DynamicFlags::FLEXIBLE,
1317 ___deadline,
1318 )?
1319 .into_result::<DirectoryMarker>("get_flags")?;
1320 Ok(_response.map(|x| x.flags))
1321 }
1322
1323 pub fn r#set_flags(
1333 &self,
1334 mut flags: Flags,
1335 ___deadline: zx::MonotonicInstant,
1336 ) -> Result<NodeSetFlagsResult, fidl::Error> {
1337 let _response = self.client.send_query::<
1338 NodeSetFlagsRequest,
1339 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1340 DirectoryMarker,
1341 >(
1342 (flags,),
1343 0x55a8028685791ea8,
1344 fidl::encoding::DynamicFlags::FLEXIBLE,
1345 ___deadline,
1346 )?
1347 .into_result::<DirectoryMarker>("set_flags")?;
1348 Ok(_response.map(|x| x))
1349 }
1350
1351 pub fn r#query_filesystem(
1355 &self,
1356 ___deadline: zx::MonotonicInstant,
1357 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
1358 let _response = self.client.send_query::<
1359 fidl::encoding::EmptyPayload,
1360 NodeQueryFilesystemResponse,
1361 DirectoryMarker,
1362 >(
1363 (),
1364 0x6f344a1c6b0a0610,
1365 fidl::encoding::DynamicFlags::empty(),
1366 ___deadline,
1367 )?;
1368 Ok((_response.s, _response.info))
1369 }
1370
1371 pub fn r#get_attributes(
1385 &self,
1386 mut query: NodeAttributesQuery,
1387 ___deadline: zx::MonotonicInstant,
1388 ) -> Result<NodeGetAttributesResult, fidl::Error> {
1389 let _response = self.client.send_query::<
1390 NodeGetAttributesRequest,
1391 fidl::encoding::ResultType<NodeAttributes2, i32>,
1392 DirectoryMarker,
1393 >(
1394 (query,),
1395 0x3d4396a638ea053b,
1396 fidl::encoding::DynamicFlags::empty(),
1397 ___deadline,
1398 )?;
1399 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
1400 }
1401
1402 pub fn r#update_attributes(
1411 &self,
1412 mut payload: &MutableNodeAttributes,
1413 ___deadline: zx::MonotonicInstant,
1414 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
1415 let _response = self.client.send_query::<
1416 MutableNodeAttributes,
1417 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1418 DirectoryMarker,
1419 >(
1420 payload,
1421 0x3308c1da5a89bf08,
1422 fidl::encoding::DynamicFlags::empty(),
1423 ___deadline,
1424 )?;
1425 Ok(_response.map(|x| x))
1426 }
1427
1428 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
1438 let _response = self.client.send_query::<
1439 fidl::encoding::EmptyPayload,
1440 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1441 DirectoryMarker,
1442 >(
1443 (),
1444 0x2c5c27ca0ab5dc49,
1445 fidl::encoding::DynamicFlags::empty(),
1446 ___deadline,
1447 )?;
1448 Ok(_response.map(|x| x))
1449 }
1450
1451 pub fn r#list_extended_attributes(
1460 &self,
1461 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
1462 ) -> Result<(), fidl::Error> {
1463 self.client.send::<NodeListExtendedAttributesRequest>(
1464 (iterator,),
1465 0x4b61033de007fcd0,
1466 fidl::encoding::DynamicFlags::empty(),
1467 )
1468 }
1469
1470 pub fn r#get_extended_attribute(
1477 &self,
1478 mut name: &[u8],
1479 ___deadline: zx::MonotonicInstant,
1480 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
1481 let _response = self.client.send_query::<
1482 NodeGetExtendedAttributeRequest,
1483 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
1484 DirectoryMarker,
1485 >(
1486 (name,),
1487 0x45ffa3ccfdeb76db,
1488 fidl::encoding::DynamicFlags::empty(),
1489 ___deadline,
1490 )?;
1491 Ok(_response.map(|x| x))
1492 }
1493
1494 pub fn r#set_extended_attribute(
1502 &self,
1503 mut name: &[u8],
1504 mut value: ExtendedAttributeValue,
1505 mut mode: SetExtendedAttributeMode,
1506 ___deadline: zx::MonotonicInstant,
1507 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
1508 let _response = self.client.send_query::<
1509 NodeSetExtendedAttributeRequest,
1510 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1511 DirectoryMarker,
1512 >(
1513 (name, &mut value, mode,),
1514 0x4a951362f681f23c,
1515 fidl::encoding::DynamicFlags::empty(),
1516 ___deadline,
1517 )?;
1518 Ok(_response.map(|x| x))
1519 }
1520
1521 pub fn r#remove_extended_attribute(
1527 &self,
1528 mut name: &[u8],
1529 ___deadline: zx::MonotonicInstant,
1530 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
1531 let _response = self.client.send_query::<
1532 NodeRemoveExtendedAttributeRequest,
1533 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1534 DirectoryMarker,
1535 >(
1536 (name,),
1537 0x7a0b9f3a9bf9032d,
1538 fidl::encoding::DynamicFlags::empty(),
1539 ___deadline,
1540 )?;
1541 Ok(_response.map(|x| x))
1542 }
1543
1544 pub fn r#open(
1551 &self,
1552 mut path: &str,
1553 mut flags: Flags,
1554 mut options: &Options,
1555 mut object: fidl::Channel,
1556 ) -> Result<(), fidl::Error> {
1557 self.client.send::<OpenableOpenRequest>(
1558 (path, flags, options, object),
1559 0x568ddcb9a9cbb6d9,
1560 fidl::encoding::DynamicFlags::FLEXIBLE,
1561 )
1562 }
1563
1564 pub fn r#deprecated_open(
1566 &self,
1567 mut flags: OpenFlags,
1568 mut mode: ModeType,
1569 mut path: &str,
1570 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1571 ) -> Result<(), fidl::Error> {
1572 self.client.send::<DirectoryDeprecatedOpenRequest>(
1573 (flags, mode, path, object),
1574 0x2c5044561d685ec0,
1575 fidl::encoding::DynamicFlags::FLEXIBLE,
1576 )
1577 }
1578
1579 pub fn r#read_dirents(
1606 &self,
1607 mut max_bytes: u64,
1608 ___deadline: zx::MonotonicInstant,
1609 ) -> Result<(i32, Vec<u8>), fidl::Error> {
1610 let _response = self.client.send_query::<
1611 DirectoryReadDirentsRequest,
1612 DirectoryReadDirentsResponse,
1613 DirectoryMarker,
1614 >(
1615 (max_bytes,),
1616 0x3582806bf27faa0a,
1617 fidl::encoding::DynamicFlags::empty(),
1618 ___deadline,
1619 )?;
1620 Ok((_response.s, _response.dirents))
1621 }
1622
1623 pub fn r#rewind(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
1629 let _response = self
1630 .client
1631 .send_query::<fidl::encoding::EmptyPayload, DirectoryRewindResponse, DirectoryMarker>(
1632 (),
1633 0x16b1202af0f34c71,
1634 fidl::encoding::DynamicFlags::empty(),
1635 ___deadline,
1636 )?;
1637 Ok(_response.s)
1638 }
1639
1640 pub fn r#get_token(
1647 &self,
1648 ___deadline: zx::MonotonicInstant,
1649 ) -> Result<(i32, Option<fidl::NullableHandle>), fidl::Error> {
1650 let _response = self
1651 .client
1652 .send_query::<fidl::encoding::EmptyPayload, DirectoryGetTokenResponse, DirectoryMarker>(
1653 (),
1654 0x26ae9d18763c8655,
1655 fidl::encoding::DynamicFlags::empty(),
1656 ___deadline,
1657 )?;
1658 Ok((_response.s, _response.token))
1659 }
1660
1661 pub fn r#link(
1678 &self,
1679 mut src: &str,
1680 mut dst_parent_token: fidl::NullableHandle,
1681 mut dst: &str,
1682 ___deadline: zx::MonotonicInstant,
1683 ) -> Result<i32, fidl::Error> {
1684 let _response = self
1685 .client
1686 .send_query::<DirectoryLinkRequest, DirectoryLinkResponse, DirectoryMarker>(
1687 (src, dst_parent_token, dst),
1688 0x740604c0c7c930e7,
1689 fidl::encoding::DynamicFlags::empty(),
1690 ___deadline,
1691 )?;
1692 Ok(_response.s)
1693 }
1694
1695 pub fn r#unlink(
1720 &self,
1721 mut name: &str,
1722 mut options: &UnlinkOptions,
1723 ___deadline: zx::MonotonicInstant,
1724 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
1725 let _response = self.client.send_query::<
1726 DirectoryUnlinkRequest,
1727 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1728 DirectoryMarker,
1729 >(
1730 (name, options,),
1731 0x750a0326a78d7bed,
1732 fidl::encoding::DynamicFlags::empty(),
1733 ___deadline,
1734 )?;
1735 Ok(_response.map(|x| x))
1736 }
1737
1738 pub fn r#rename(
1764 &self,
1765 mut src: &str,
1766 mut dst_parent_token: fidl::Event,
1767 mut dst: &str,
1768 ___deadline: zx::MonotonicInstant,
1769 ) -> Result<DirectoryRenameResult, fidl::Error> {
1770 let _response = self.client.send_query::<
1771 DirectoryRenameRequest,
1772 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1773 DirectoryMarker,
1774 >(
1775 (src, dst_parent_token, dst,),
1776 0x7060e7723b9928de,
1777 fidl::encoding::DynamicFlags::empty(),
1778 ___deadline,
1779 )?;
1780 Ok(_response.map(|x| x))
1781 }
1782
1783 pub fn r#create_symlink(
1798 &self,
1799 mut name: &str,
1800 mut target: &[u8],
1801 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
1802 ___deadline: zx::MonotonicInstant,
1803 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
1804 let _response = self.client.send_query::<
1805 DirectoryCreateSymlinkRequest,
1806 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1807 DirectoryMarker,
1808 >(
1809 (name, target, connection,),
1810 0x21ce0f19ec043889,
1811 fidl::encoding::DynamicFlags::empty(),
1812 ___deadline,
1813 )?;
1814 Ok(_response.map(|x| x))
1815 }
1816
1817 pub fn r#watch(
1826 &self,
1827 mut mask: WatchMask,
1828 mut options: u32,
1829 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
1830 ___deadline: zx::MonotonicInstant,
1831 ) -> Result<i32, fidl::Error> {
1832 let _response = self
1833 .client
1834 .send_query::<DirectoryWatchRequest, DirectoryWatchResponse, DirectoryMarker>(
1835 (mask, options, watcher),
1836 0x5717193a59d66d91,
1837 fidl::encoding::DynamicFlags::empty(),
1838 ___deadline,
1839 )?;
1840 Ok(_response.s)
1841 }
1842}
1843
1844#[cfg(target_os = "fuchsia")]
1845impl From<DirectorySynchronousProxy> for zx::NullableHandle {
1846 fn from(value: DirectorySynchronousProxy) -> Self {
1847 value.into_channel().into()
1848 }
1849}
1850
1851#[cfg(target_os = "fuchsia")]
1852impl From<fidl::Channel> for DirectorySynchronousProxy {
1853 fn from(value: fidl::Channel) -> Self {
1854 Self::new(value)
1855 }
1856}
1857
1858#[cfg(target_os = "fuchsia")]
1859impl fidl::endpoints::FromClient for DirectorySynchronousProxy {
1860 type Protocol = DirectoryMarker;
1861
1862 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryMarker>) -> Self {
1863 Self::new(value.into_channel())
1864 }
1865}
1866
1867#[derive(Debug, Clone)]
1868pub struct DirectoryProxy {
1869 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1870}
1871
1872impl fidl::endpoints::Proxy for DirectoryProxy {
1873 type Protocol = DirectoryMarker;
1874
1875 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1876 Self::new(inner)
1877 }
1878
1879 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1880 self.client.into_channel().map_err(|client| Self { client })
1881 }
1882
1883 fn as_channel(&self) -> &::fidl::AsyncChannel {
1884 self.client.as_channel()
1885 }
1886}
1887
1888impl DirectoryProxy {
1889 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1891 let protocol_name = <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1892 Self { client: fidl::client::Client::new(channel, protocol_name) }
1893 }
1894
1895 pub fn take_event_stream(&self) -> DirectoryEventStream {
1901 DirectoryEventStream { event_receiver: self.client.take_event_receiver() }
1902 }
1903
1904 pub fn r#advisory_lock(
1928 &self,
1929 mut request: &AdvisoryLockRequest,
1930 ) -> fidl::client::QueryResponseFut<
1931 AdvisoryLockingAdvisoryLockResult,
1932 fidl::encoding::DefaultFuchsiaResourceDialect,
1933 > {
1934 DirectoryProxyInterface::r#advisory_lock(self, request)
1935 }
1936
1937 pub fn r#clone(
1938 &self,
1939 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
1940 ) -> Result<(), fidl::Error> {
1941 DirectoryProxyInterface::r#clone(self, request)
1942 }
1943
1944 pub fn r#close(
1955 &self,
1956 ) -> fidl::client::QueryResponseFut<
1957 fidl_fuchsia_unknown::CloseableCloseResult,
1958 fidl::encoding::DefaultFuchsiaResourceDialect,
1959 > {
1960 DirectoryProxyInterface::r#close(self)
1961 }
1962
1963 pub fn r#query(
1964 &self,
1965 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
1966 {
1967 DirectoryProxyInterface::r#query(self)
1968 }
1969
1970 pub fn r#deprecated_clone(
1972 &self,
1973 mut flags: OpenFlags,
1974 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
1975 ) -> Result<(), fidl::Error> {
1976 DirectoryProxyInterface::r#deprecated_clone(self, flags, object)
1977 }
1978
1979 pub fn r#deprecated_get_attr(
1983 &self,
1984 ) -> fidl::client::QueryResponseFut<
1985 (i32, NodeAttributes),
1986 fidl::encoding::DefaultFuchsiaResourceDialect,
1987 > {
1988 DirectoryProxyInterface::r#deprecated_get_attr(self)
1989 }
1990
1991 pub fn r#deprecated_set_attr(
1993 &self,
1994 mut flags: NodeAttributeFlags,
1995 mut attributes: &NodeAttributes,
1996 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
1997 DirectoryProxyInterface::r#deprecated_set_attr(self, flags, attributes)
1998 }
1999
2000 pub fn r#deprecated_get_flags(
2002 &self,
2003 ) -> fidl::client::QueryResponseFut<
2004 (i32, OpenFlags),
2005 fidl::encoding::DefaultFuchsiaResourceDialect,
2006 > {
2007 DirectoryProxyInterface::r#deprecated_get_flags(self)
2008 }
2009
2010 pub fn r#deprecated_set_flags(
2012 &self,
2013 mut flags: OpenFlags,
2014 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2015 DirectoryProxyInterface::r#deprecated_set_flags(self, flags)
2016 }
2017
2018 pub fn r#get_flags(
2027 &self,
2028 ) -> fidl::client::QueryResponseFut<
2029 NodeGetFlagsResult,
2030 fidl::encoding::DefaultFuchsiaResourceDialect,
2031 > {
2032 DirectoryProxyInterface::r#get_flags(self)
2033 }
2034
2035 pub fn r#set_flags(
2045 &self,
2046 mut flags: Flags,
2047 ) -> fidl::client::QueryResponseFut<
2048 NodeSetFlagsResult,
2049 fidl::encoding::DefaultFuchsiaResourceDialect,
2050 > {
2051 DirectoryProxyInterface::r#set_flags(self, flags)
2052 }
2053
2054 pub fn r#query_filesystem(
2058 &self,
2059 ) -> fidl::client::QueryResponseFut<
2060 (i32, Option<Box<FilesystemInfo>>),
2061 fidl::encoding::DefaultFuchsiaResourceDialect,
2062 > {
2063 DirectoryProxyInterface::r#query_filesystem(self)
2064 }
2065
2066 pub fn r#get_attributes(
2080 &self,
2081 mut query: NodeAttributesQuery,
2082 ) -> fidl::client::QueryResponseFut<
2083 NodeGetAttributesResult,
2084 fidl::encoding::DefaultFuchsiaResourceDialect,
2085 > {
2086 DirectoryProxyInterface::r#get_attributes(self, query)
2087 }
2088
2089 pub fn r#update_attributes(
2098 &self,
2099 mut payload: &MutableNodeAttributes,
2100 ) -> fidl::client::QueryResponseFut<
2101 NodeUpdateAttributesResult,
2102 fidl::encoding::DefaultFuchsiaResourceDialect,
2103 > {
2104 DirectoryProxyInterface::r#update_attributes(self, payload)
2105 }
2106
2107 pub fn r#sync(
2117 &self,
2118 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
2119 {
2120 DirectoryProxyInterface::r#sync(self)
2121 }
2122
2123 pub fn r#list_extended_attributes(
2132 &self,
2133 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2134 ) -> Result<(), fidl::Error> {
2135 DirectoryProxyInterface::r#list_extended_attributes(self, iterator)
2136 }
2137
2138 pub fn r#get_extended_attribute(
2145 &self,
2146 mut name: &[u8],
2147 ) -> fidl::client::QueryResponseFut<
2148 NodeGetExtendedAttributeResult,
2149 fidl::encoding::DefaultFuchsiaResourceDialect,
2150 > {
2151 DirectoryProxyInterface::r#get_extended_attribute(self, name)
2152 }
2153
2154 pub fn r#set_extended_attribute(
2162 &self,
2163 mut name: &[u8],
2164 mut value: ExtendedAttributeValue,
2165 mut mode: SetExtendedAttributeMode,
2166 ) -> fidl::client::QueryResponseFut<
2167 NodeSetExtendedAttributeResult,
2168 fidl::encoding::DefaultFuchsiaResourceDialect,
2169 > {
2170 DirectoryProxyInterface::r#set_extended_attribute(self, name, value, mode)
2171 }
2172
2173 pub fn r#remove_extended_attribute(
2179 &self,
2180 mut name: &[u8],
2181 ) -> fidl::client::QueryResponseFut<
2182 NodeRemoveExtendedAttributeResult,
2183 fidl::encoding::DefaultFuchsiaResourceDialect,
2184 > {
2185 DirectoryProxyInterface::r#remove_extended_attribute(self, name)
2186 }
2187
2188 pub fn r#open(
2195 &self,
2196 mut path: &str,
2197 mut flags: Flags,
2198 mut options: &Options,
2199 mut object: fidl::Channel,
2200 ) -> Result<(), fidl::Error> {
2201 DirectoryProxyInterface::r#open(self, path, flags, options, object)
2202 }
2203
2204 pub fn r#deprecated_open(
2206 &self,
2207 mut flags: OpenFlags,
2208 mut mode: ModeType,
2209 mut path: &str,
2210 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2211 ) -> Result<(), fidl::Error> {
2212 DirectoryProxyInterface::r#deprecated_open(self, flags, mode, path, object)
2213 }
2214
2215 pub fn r#read_dirents(
2242 &self,
2243 mut max_bytes: u64,
2244 ) -> fidl::client::QueryResponseFut<(i32, Vec<u8>), fidl::encoding::DefaultFuchsiaResourceDialect>
2245 {
2246 DirectoryProxyInterface::r#read_dirents(self, max_bytes)
2247 }
2248
2249 pub fn r#rewind(
2255 &self,
2256 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2257 DirectoryProxyInterface::r#rewind(self)
2258 }
2259
2260 pub fn r#get_token(
2267 &self,
2268 ) -> fidl::client::QueryResponseFut<
2269 (i32, Option<fidl::NullableHandle>),
2270 fidl::encoding::DefaultFuchsiaResourceDialect,
2271 > {
2272 DirectoryProxyInterface::r#get_token(self)
2273 }
2274
2275 pub fn r#link(
2292 &self,
2293 mut src: &str,
2294 mut dst_parent_token: fidl::NullableHandle,
2295 mut dst: &str,
2296 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2297 DirectoryProxyInterface::r#link(self, src, dst_parent_token, dst)
2298 }
2299
2300 pub fn r#unlink(
2325 &self,
2326 mut name: &str,
2327 mut options: &UnlinkOptions,
2328 ) -> fidl::client::QueryResponseFut<
2329 DirectoryUnlinkResult,
2330 fidl::encoding::DefaultFuchsiaResourceDialect,
2331 > {
2332 DirectoryProxyInterface::r#unlink(self, name, options)
2333 }
2334
2335 pub fn r#rename(
2361 &self,
2362 mut src: &str,
2363 mut dst_parent_token: fidl::Event,
2364 mut dst: &str,
2365 ) -> fidl::client::QueryResponseFut<
2366 DirectoryRenameResult,
2367 fidl::encoding::DefaultFuchsiaResourceDialect,
2368 > {
2369 DirectoryProxyInterface::r#rename(self, src, dst_parent_token, dst)
2370 }
2371
2372 pub fn r#create_symlink(
2387 &self,
2388 mut name: &str,
2389 mut target: &[u8],
2390 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
2391 ) -> fidl::client::QueryResponseFut<
2392 DirectoryCreateSymlinkResult,
2393 fidl::encoding::DefaultFuchsiaResourceDialect,
2394 > {
2395 DirectoryProxyInterface::r#create_symlink(self, name, target, connection)
2396 }
2397
2398 pub fn r#watch(
2407 &self,
2408 mut mask: WatchMask,
2409 mut options: u32,
2410 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
2411 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2412 DirectoryProxyInterface::r#watch(self, mask, options, watcher)
2413 }
2414}
2415
2416impl DirectoryProxyInterface for DirectoryProxy {
2417 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
2418 AdvisoryLockingAdvisoryLockResult,
2419 fidl::encoding::DefaultFuchsiaResourceDialect,
2420 >;
2421 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
2422 fn _decode(
2423 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2424 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
2425 let _response = fidl::client::decode_transaction_body::<
2426 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2427 fidl::encoding::DefaultFuchsiaResourceDialect,
2428 0x6ee9c0ad53ec87aa,
2429 >(_buf?)?;
2430 Ok(_response.map(|x| x))
2431 }
2432 self.client.send_query_and_decode::<
2433 AdvisoryLockingAdvisoryLockRequest,
2434 AdvisoryLockingAdvisoryLockResult,
2435 >(
2436 (request,),
2437 0x6ee9c0ad53ec87aa,
2438 fidl::encoding::DynamicFlags::empty(),
2439 _decode,
2440 )
2441 }
2442
2443 fn r#clone(
2444 &self,
2445 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
2446 ) -> Result<(), fidl::Error> {
2447 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
2448 (request,),
2449 0x20d8a7aba2168a79,
2450 fidl::encoding::DynamicFlags::empty(),
2451 )
2452 }
2453
2454 type CloseResponseFut = fidl::client::QueryResponseFut<
2455 fidl_fuchsia_unknown::CloseableCloseResult,
2456 fidl::encoding::DefaultFuchsiaResourceDialect,
2457 >;
2458 fn r#close(&self) -> Self::CloseResponseFut {
2459 fn _decode(
2460 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2461 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
2462 let _response = fidl::client::decode_transaction_body::<
2463 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2464 fidl::encoding::DefaultFuchsiaResourceDialect,
2465 0x5ac5d459ad7f657e,
2466 >(_buf?)?;
2467 Ok(_response.map(|x| x))
2468 }
2469 self.client.send_query_and_decode::<
2470 fidl::encoding::EmptyPayload,
2471 fidl_fuchsia_unknown::CloseableCloseResult,
2472 >(
2473 (),
2474 0x5ac5d459ad7f657e,
2475 fidl::encoding::DynamicFlags::empty(),
2476 _decode,
2477 )
2478 }
2479
2480 type QueryResponseFut =
2481 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
2482 fn r#query(&self) -> Self::QueryResponseFut {
2483 fn _decode(
2484 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2485 ) -> Result<Vec<u8>, fidl::Error> {
2486 let _response = fidl::client::decode_transaction_body::<
2487 fidl_fuchsia_unknown::QueryableQueryResponse,
2488 fidl::encoding::DefaultFuchsiaResourceDialect,
2489 0x2658edee9decfc06,
2490 >(_buf?)?;
2491 Ok(_response.protocol)
2492 }
2493 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
2494 (),
2495 0x2658edee9decfc06,
2496 fidl::encoding::DynamicFlags::empty(),
2497 _decode,
2498 )
2499 }
2500
2501 fn r#deprecated_clone(
2502 &self,
2503 mut flags: OpenFlags,
2504 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2505 ) -> Result<(), fidl::Error> {
2506 self.client.send::<NodeDeprecatedCloneRequest>(
2507 (flags, object),
2508 0x5a61678f293ce16f,
2509 fidl::encoding::DynamicFlags::FLEXIBLE,
2510 )
2511 }
2512
2513 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
2514 (i32, NodeAttributes),
2515 fidl::encoding::DefaultFuchsiaResourceDialect,
2516 >;
2517 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
2518 fn _decode(
2519 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2520 ) -> Result<(i32, NodeAttributes), fidl::Error> {
2521 let _response = fidl::client::decode_transaction_body::<
2522 NodeDeprecatedGetAttrResponse,
2523 fidl::encoding::DefaultFuchsiaResourceDialect,
2524 0x78985e216314dafd,
2525 >(_buf?)?;
2526 Ok((_response.s, _response.attributes))
2527 }
2528 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
2529 (),
2530 0x78985e216314dafd,
2531 fidl::encoding::DynamicFlags::empty(),
2532 _decode,
2533 )
2534 }
2535
2536 type DeprecatedSetAttrResponseFut =
2537 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2538 fn r#deprecated_set_attr(
2539 &self,
2540 mut flags: NodeAttributeFlags,
2541 mut attributes: &NodeAttributes,
2542 ) -> Self::DeprecatedSetAttrResponseFut {
2543 fn _decode(
2544 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2545 ) -> Result<i32, fidl::Error> {
2546 let _response = fidl::client::decode_transaction_body::<
2547 NodeDeprecatedSetAttrResponse,
2548 fidl::encoding::DefaultFuchsiaResourceDialect,
2549 0x4186c0f40d938f46,
2550 >(_buf?)?;
2551 Ok(_response.s)
2552 }
2553 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
2554 (flags, attributes),
2555 0x4186c0f40d938f46,
2556 fidl::encoding::DynamicFlags::empty(),
2557 _decode,
2558 )
2559 }
2560
2561 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
2562 (i32, OpenFlags),
2563 fidl::encoding::DefaultFuchsiaResourceDialect,
2564 >;
2565 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
2566 fn _decode(
2567 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2568 ) -> Result<(i32, OpenFlags), fidl::Error> {
2569 let _response = fidl::client::decode_transaction_body::<
2570 NodeDeprecatedGetFlagsResponse,
2571 fidl::encoding::DefaultFuchsiaResourceDialect,
2572 0x5b88fffb8eda3aa1,
2573 >(_buf?)?;
2574 Ok((_response.s, _response.flags))
2575 }
2576 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
2577 (),
2578 0x5b88fffb8eda3aa1,
2579 fidl::encoding::DynamicFlags::empty(),
2580 _decode,
2581 )
2582 }
2583
2584 type DeprecatedSetFlagsResponseFut =
2585 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2586 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
2587 fn _decode(
2588 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2589 ) -> Result<i32, fidl::Error> {
2590 let _response = fidl::client::decode_transaction_body::<
2591 NodeDeprecatedSetFlagsResponse,
2592 fidl::encoding::DefaultFuchsiaResourceDialect,
2593 0x5295b76c71fde733,
2594 >(_buf?)?;
2595 Ok(_response.s)
2596 }
2597 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
2598 (flags,),
2599 0x5295b76c71fde733,
2600 fidl::encoding::DynamicFlags::empty(),
2601 _decode,
2602 )
2603 }
2604
2605 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
2606 NodeGetFlagsResult,
2607 fidl::encoding::DefaultFuchsiaResourceDialect,
2608 >;
2609 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
2610 fn _decode(
2611 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2612 ) -> Result<NodeGetFlagsResult, fidl::Error> {
2613 let _response = fidl::client::decode_transaction_body::<
2614 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
2615 fidl::encoding::DefaultFuchsiaResourceDialect,
2616 0x176eb318f64ec23,
2617 >(_buf?)?
2618 .into_result::<DirectoryMarker>("get_flags")?;
2619 Ok(_response.map(|x| x.flags))
2620 }
2621 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
2622 (),
2623 0x176eb318f64ec23,
2624 fidl::encoding::DynamicFlags::FLEXIBLE,
2625 _decode,
2626 )
2627 }
2628
2629 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
2630 NodeSetFlagsResult,
2631 fidl::encoding::DefaultFuchsiaResourceDialect,
2632 >;
2633 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
2634 fn _decode(
2635 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2636 ) -> Result<NodeSetFlagsResult, fidl::Error> {
2637 let _response = fidl::client::decode_transaction_body::<
2638 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
2639 fidl::encoding::DefaultFuchsiaResourceDialect,
2640 0x55a8028685791ea8,
2641 >(_buf?)?
2642 .into_result::<DirectoryMarker>("set_flags")?;
2643 Ok(_response.map(|x| x))
2644 }
2645 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
2646 (flags,),
2647 0x55a8028685791ea8,
2648 fidl::encoding::DynamicFlags::FLEXIBLE,
2649 _decode,
2650 )
2651 }
2652
2653 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
2654 (i32, Option<Box<FilesystemInfo>>),
2655 fidl::encoding::DefaultFuchsiaResourceDialect,
2656 >;
2657 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
2658 fn _decode(
2659 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2660 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
2661 let _response = fidl::client::decode_transaction_body::<
2662 NodeQueryFilesystemResponse,
2663 fidl::encoding::DefaultFuchsiaResourceDialect,
2664 0x6f344a1c6b0a0610,
2665 >(_buf?)?;
2666 Ok((_response.s, _response.info))
2667 }
2668 self.client.send_query_and_decode::<
2669 fidl::encoding::EmptyPayload,
2670 (i32, Option<Box<FilesystemInfo>>),
2671 >(
2672 (),
2673 0x6f344a1c6b0a0610,
2674 fidl::encoding::DynamicFlags::empty(),
2675 _decode,
2676 )
2677 }
2678
2679 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
2680 NodeGetAttributesResult,
2681 fidl::encoding::DefaultFuchsiaResourceDialect,
2682 >;
2683 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
2684 fn _decode(
2685 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2686 ) -> Result<NodeGetAttributesResult, fidl::Error> {
2687 let _response = fidl::client::decode_transaction_body::<
2688 fidl::encoding::ResultType<NodeAttributes2, i32>,
2689 fidl::encoding::DefaultFuchsiaResourceDialect,
2690 0x3d4396a638ea053b,
2691 >(_buf?)?;
2692 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
2693 }
2694 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
2695 (query,),
2696 0x3d4396a638ea053b,
2697 fidl::encoding::DynamicFlags::empty(),
2698 _decode,
2699 )
2700 }
2701
2702 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
2703 NodeUpdateAttributesResult,
2704 fidl::encoding::DefaultFuchsiaResourceDialect,
2705 >;
2706 fn r#update_attributes(
2707 &self,
2708 mut payload: &MutableNodeAttributes,
2709 ) -> Self::UpdateAttributesResponseFut {
2710 fn _decode(
2711 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2712 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
2713 let _response = fidl::client::decode_transaction_body::<
2714 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2715 fidl::encoding::DefaultFuchsiaResourceDialect,
2716 0x3308c1da5a89bf08,
2717 >(_buf?)?;
2718 Ok(_response.map(|x| x))
2719 }
2720 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
2721 payload,
2722 0x3308c1da5a89bf08,
2723 fidl::encoding::DynamicFlags::empty(),
2724 _decode,
2725 )
2726 }
2727
2728 type SyncResponseFut = fidl::client::QueryResponseFut<
2729 NodeSyncResult,
2730 fidl::encoding::DefaultFuchsiaResourceDialect,
2731 >;
2732 fn r#sync(&self) -> Self::SyncResponseFut {
2733 fn _decode(
2734 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2735 ) -> Result<NodeSyncResult, fidl::Error> {
2736 let _response = fidl::client::decode_transaction_body::<
2737 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2738 fidl::encoding::DefaultFuchsiaResourceDialect,
2739 0x2c5c27ca0ab5dc49,
2740 >(_buf?)?;
2741 Ok(_response.map(|x| x))
2742 }
2743 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
2744 (),
2745 0x2c5c27ca0ab5dc49,
2746 fidl::encoding::DynamicFlags::empty(),
2747 _decode,
2748 )
2749 }
2750
2751 fn r#list_extended_attributes(
2752 &self,
2753 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
2754 ) -> Result<(), fidl::Error> {
2755 self.client.send::<NodeListExtendedAttributesRequest>(
2756 (iterator,),
2757 0x4b61033de007fcd0,
2758 fidl::encoding::DynamicFlags::empty(),
2759 )
2760 }
2761
2762 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2763 NodeGetExtendedAttributeResult,
2764 fidl::encoding::DefaultFuchsiaResourceDialect,
2765 >;
2766 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
2767 fn _decode(
2768 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2769 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
2770 let _response = fidl::client::decode_transaction_body::<
2771 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
2772 fidl::encoding::DefaultFuchsiaResourceDialect,
2773 0x45ffa3ccfdeb76db,
2774 >(_buf?)?;
2775 Ok(_response.map(|x| x))
2776 }
2777 self.client.send_query_and_decode::<
2778 NodeGetExtendedAttributeRequest,
2779 NodeGetExtendedAttributeResult,
2780 >(
2781 (name,),
2782 0x45ffa3ccfdeb76db,
2783 fidl::encoding::DynamicFlags::empty(),
2784 _decode,
2785 )
2786 }
2787
2788 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2789 NodeSetExtendedAttributeResult,
2790 fidl::encoding::DefaultFuchsiaResourceDialect,
2791 >;
2792 fn r#set_extended_attribute(
2793 &self,
2794 mut name: &[u8],
2795 mut value: ExtendedAttributeValue,
2796 mut mode: SetExtendedAttributeMode,
2797 ) -> Self::SetExtendedAttributeResponseFut {
2798 fn _decode(
2799 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2800 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
2801 let _response = fidl::client::decode_transaction_body::<
2802 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2803 fidl::encoding::DefaultFuchsiaResourceDialect,
2804 0x4a951362f681f23c,
2805 >(_buf?)?;
2806 Ok(_response.map(|x| x))
2807 }
2808 self.client.send_query_and_decode::<
2809 NodeSetExtendedAttributeRequest,
2810 NodeSetExtendedAttributeResult,
2811 >(
2812 (name, &mut value, mode,),
2813 0x4a951362f681f23c,
2814 fidl::encoding::DynamicFlags::empty(),
2815 _decode,
2816 )
2817 }
2818
2819 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
2820 NodeRemoveExtendedAttributeResult,
2821 fidl::encoding::DefaultFuchsiaResourceDialect,
2822 >;
2823 fn r#remove_extended_attribute(
2824 &self,
2825 mut name: &[u8],
2826 ) -> Self::RemoveExtendedAttributeResponseFut {
2827 fn _decode(
2828 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2829 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
2830 let _response = fidl::client::decode_transaction_body::<
2831 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2832 fidl::encoding::DefaultFuchsiaResourceDialect,
2833 0x7a0b9f3a9bf9032d,
2834 >(_buf?)?;
2835 Ok(_response.map(|x| x))
2836 }
2837 self.client.send_query_and_decode::<
2838 NodeRemoveExtendedAttributeRequest,
2839 NodeRemoveExtendedAttributeResult,
2840 >(
2841 (name,),
2842 0x7a0b9f3a9bf9032d,
2843 fidl::encoding::DynamicFlags::empty(),
2844 _decode,
2845 )
2846 }
2847
2848 fn r#open(
2849 &self,
2850 mut path: &str,
2851 mut flags: Flags,
2852 mut options: &Options,
2853 mut object: fidl::Channel,
2854 ) -> Result<(), fidl::Error> {
2855 self.client.send::<OpenableOpenRequest>(
2856 (path, flags, options, object),
2857 0x568ddcb9a9cbb6d9,
2858 fidl::encoding::DynamicFlags::FLEXIBLE,
2859 )
2860 }
2861
2862 fn r#deprecated_open(
2863 &self,
2864 mut flags: OpenFlags,
2865 mut mode: ModeType,
2866 mut path: &str,
2867 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
2868 ) -> Result<(), fidl::Error> {
2869 self.client.send::<DirectoryDeprecatedOpenRequest>(
2870 (flags, mode, path, object),
2871 0x2c5044561d685ec0,
2872 fidl::encoding::DynamicFlags::FLEXIBLE,
2873 )
2874 }
2875
2876 type ReadDirentsResponseFut = fidl::client::QueryResponseFut<
2877 (i32, Vec<u8>),
2878 fidl::encoding::DefaultFuchsiaResourceDialect,
2879 >;
2880 fn r#read_dirents(&self, mut max_bytes: u64) -> Self::ReadDirentsResponseFut {
2881 fn _decode(
2882 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2883 ) -> Result<(i32, Vec<u8>), fidl::Error> {
2884 let _response = fidl::client::decode_transaction_body::<
2885 DirectoryReadDirentsResponse,
2886 fidl::encoding::DefaultFuchsiaResourceDialect,
2887 0x3582806bf27faa0a,
2888 >(_buf?)?;
2889 Ok((_response.s, _response.dirents))
2890 }
2891 self.client.send_query_and_decode::<DirectoryReadDirentsRequest, (i32, Vec<u8>)>(
2892 (max_bytes,),
2893 0x3582806bf27faa0a,
2894 fidl::encoding::DynamicFlags::empty(),
2895 _decode,
2896 )
2897 }
2898
2899 type RewindResponseFut =
2900 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2901 fn r#rewind(&self) -> Self::RewindResponseFut {
2902 fn _decode(
2903 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2904 ) -> Result<i32, fidl::Error> {
2905 let _response = fidl::client::decode_transaction_body::<
2906 DirectoryRewindResponse,
2907 fidl::encoding::DefaultFuchsiaResourceDialect,
2908 0x16b1202af0f34c71,
2909 >(_buf?)?;
2910 Ok(_response.s)
2911 }
2912 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
2913 (),
2914 0x16b1202af0f34c71,
2915 fidl::encoding::DynamicFlags::empty(),
2916 _decode,
2917 )
2918 }
2919
2920 type GetTokenResponseFut = fidl::client::QueryResponseFut<
2921 (i32, Option<fidl::NullableHandle>),
2922 fidl::encoding::DefaultFuchsiaResourceDialect,
2923 >;
2924 fn r#get_token(&self) -> Self::GetTokenResponseFut {
2925 fn _decode(
2926 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2927 ) -> Result<(i32, Option<fidl::NullableHandle>), fidl::Error> {
2928 let _response = fidl::client::decode_transaction_body::<
2929 DirectoryGetTokenResponse,
2930 fidl::encoding::DefaultFuchsiaResourceDialect,
2931 0x26ae9d18763c8655,
2932 >(_buf?)?;
2933 Ok((_response.s, _response.token))
2934 }
2935 self.client.send_query_and_decode::<
2936 fidl::encoding::EmptyPayload,
2937 (i32, Option<fidl::NullableHandle>),
2938 >(
2939 (),
2940 0x26ae9d18763c8655,
2941 fidl::encoding::DynamicFlags::empty(),
2942 _decode,
2943 )
2944 }
2945
2946 type LinkResponseFut =
2947 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2948 fn r#link(
2949 &self,
2950 mut src: &str,
2951 mut dst_parent_token: fidl::NullableHandle,
2952 mut dst: &str,
2953 ) -> Self::LinkResponseFut {
2954 fn _decode(
2955 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2956 ) -> Result<i32, fidl::Error> {
2957 let _response = fidl::client::decode_transaction_body::<
2958 DirectoryLinkResponse,
2959 fidl::encoding::DefaultFuchsiaResourceDialect,
2960 0x740604c0c7c930e7,
2961 >(_buf?)?;
2962 Ok(_response.s)
2963 }
2964 self.client.send_query_and_decode::<DirectoryLinkRequest, i32>(
2965 (src, dst_parent_token, dst),
2966 0x740604c0c7c930e7,
2967 fidl::encoding::DynamicFlags::empty(),
2968 _decode,
2969 )
2970 }
2971
2972 type UnlinkResponseFut = fidl::client::QueryResponseFut<
2973 DirectoryUnlinkResult,
2974 fidl::encoding::DefaultFuchsiaResourceDialect,
2975 >;
2976 fn r#unlink(&self, mut name: &str, mut options: &UnlinkOptions) -> Self::UnlinkResponseFut {
2977 fn _decode(
2978 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2979 ) -> Result<DirectoryUnlinkResult, fidl::Error> {
2980 let _response = fidl::client::decode_transaction_body::<
2981 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2982 fidl::encoding::DefaultFuchsiaResourceDialect,
2983 0x750a0326a78d7bed,
2984 >(_buf?)?;
2985 Ok(_response.map(|x| x))
2986 }
2987 self.client.send_query_and_decode::<DirectoryUnlinkRequest, DirectoryUnlinkResult>(
2988 (name, options),
2989 0x750a0326a78d7bed,
2990 fidl::encoding::DynamicFlags::empty(),
2991 _decode,
2992 )
2993 }
2994
2995 type RenameResponseFut = fidl::client::QueryResponseFut<
2996 DirectoryRenameResult,
2997 fidl::encoding::DefaultFuchsiaResourceDialect,
2998 >;
2999 fn r#rename(
3000 &self,
3001 mut src: &str,
3002 mut dst_parent_token: fidl::Event,
3003 mut dst: &str,
3004 ) -> Self::RenameResponseFut {
3005 fn _decode(
3006 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3007 ) -> Result<DirectoryRenameResult, fidl::Error> {
3008 let _response = fidl::client::decode_transaction_body::<
3009 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3010 fidl::encoding::DefaultFuchsiaResourceDialect,
3011 0x7060e7723b9928de,
3012 >(_buf?)?;
3013 Ok(_response.map(|x| x))
3014 }
3015 self.client.send_query_and_decode::<DirectoryRenameRequest, DirectoryRenameResult>(
3016 (src, dst_parent_token, dst),
3017 0x7060e7723b9928de,
3018 fidl::encoding::DynamicFlags::empty(),
3019 _decode,
3020 )
3021 }
3022
3023 type CreateSymlinkResponseFut = fidl::client::QueryResponseFut<
3024 DirectoryCreateSymlinkResult,
3025 fidl::encoding::DefaultFuchsiaResourceDialect,
3026 >;
3027 fn r#create_symlink(
3028 &self,
3029 mut name: &str,
3030 mut target: &[u8],
3031 mut connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
3032 ) -> Self::CreateSymlinkResponseFut {
3033 fn _decode(
3034 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3035 ) -> Result<DirectoryCreateSymlinkResult, fidl::Error> {
3036 let _response = fidl::client::decode_transaction_body::<
3037 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
3038 fidl::encoding::DefaultFuchsiaResourceDialect,
3039 0x21ce0f19ec043889,
3040 >(_buf?)?;
3041 Ok(_response.map(|x| x))
3042 }
3043 self.client
3044 .send_query_and_decode::<DirectoryCreateSymlinkRequest, DirectoryCreateSymlinkResult>(
3045 (name, target, connection),
3046 0x21ce0f19ec043889,
3047 fidl::encoding::DynamicFlags::empty(),
3048 _decode,
3049 )
3050 }
3051
3052 type WatchResponseFut =
3053 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3054 fn r#watch(
3055 &self,
3056 mut mask: WatchMask,
3057 mut options: u32,
3058 mut watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
3059 ) -> Self::WatchResponseFut {
3060 fn _decode(
3061 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3062 ) -> Result<i32, fidl::Error> {
3063 let _response = fidl::client::decode_transaction_body::<
3064 DirectoryWatchResponse,
3065 fidl::encoding::DefaultFuchsiaResourceDialect,
3066 0x5717193a59d66d91,
3067 >(_buf?)?;
3068 Ok(_response.s)
3069 }
3070 self.client.send_query_and_decode::<DirectoryWatchRequest, i32>(
3071 (mask, options, watcher),
3072 0x5717193a59d66d91,
3073 fidl::encoding::DynamicFlags::empty(),
3074 _decode,
3075 )
3076 }
3077}
3078
3079pub struct DirectoryEventStream {
3080 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3081}
3082
3083impl std::marker::Unpin for DirectoryEventStream {}
3084
3085impl futures::stream::FusedStream for DirectoryEventStream {
3086 fn is_terminated(&self) -> bool {
3087 self.event_receiver.is_terminated()
3088 }
3089}
3090
3091impl futures::Stream for DirectoryEventStream {
3092 type Item = Result<DirectoryEvent, fidl::Error>;
3093
3094 fn poll_next(
3095 mut self: std::pin::Pin<&mut Self>,
3096 cx: &mut std::task::Context<'_>,
3097 ) -> std::task::Poll<Option<Self::Item>> {
3098 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3099 &mut self.event_receiver,
3100 cx
3101 )?) {
3102 Some(buf) => std::task::Poll::Ready(Some(DirectoryEvent::decode(buf))),
3103 None => std::task::Poll::Ready(None),
3104 }
3105 }
3106}
3107
3108#[derive(Debug)]
3109pub enum DirectoryEvent {
3110 OnOpen_ {
3111 s: i32,
3112 info: Option<Box<NodeInfoDeprecated>>,
3113 },
3114 OnRepresentation {
3115 payload: Representation,
3116 },
3117 #[non_exhaustive]
3118 _UnknownEvent {
3119 ordinal: u64,
3121 },
3122}
3123
3124impl DirectoryEvent {
3125 #[allow(irrefutable_let_patterns)]
3126 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
3127 if let DirectoryEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
3128 }
3129 #[allow(irrefutable_let_patterns)]
3130 pub fn into_on_representation(self) -> Option<Representation> {
3131 if let DirectoryEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
3132 }
3133
3134 fn decode(
3136 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3137 ) -> Result<DirectoryEvent, fidl::Error> {
3138 let (bytes, _handles) = buf.split_mut();
3139 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3140 debug_assert_eq!(tx_header.tx_id, 0);
3141 match tx_header.ordinal {
3142 0x7fc7bbb1dbfd1972 => {
3143 let mut out = fidl::new_empty!(
3144 NodeOnOpenRequest,
3145 fidl::encoding::DefaultFuchsiaResourceDialect
3146 );
3147 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
3148 Ok((DirectoryEvent::OnOpen_ { s: out.s, info: out.info }))
3149 }
3150 0x5cb40567d80a510c => {
3151 let mut out =
3152 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
3153 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
3154 Ok((DirectoryEvent::OnRepresentation { payload: out }))
3155 }
3156 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3157 Ok(DirectoryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3158 }
3159 _ => Err(fidl::Error::UnknownOrdinal {
3160 ordinal: tx_header.ordinal,
3161 protocol_name: <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3162 }),
3163 }
3164 }
3165}
3166
3167pub struct DirectoryRequestStream {
3169 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3170 is_terminated: bool,
3171}
3172
3173impl std::marker::Unpin for DirectoryRequestStream {}
3174
3175impl futures::stream::FusedStream for DirectoryRequestStream {
3176 fn is_terminated(&self) -> bool {
3177 self.is_terminated
3178 }
3179}
3180
3181impl fidl::endpoints::RequestStream for DirectoryRequestStream {
3182 type Protocol = DirectoryMarker;
3183 type ControlHandle = DirectoryControlHandle;
3184
3185 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3186 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3187 }
3188
3189 fn control_handle(&self) -> Self::ControlHandle {
3190 DirectoryControlHandle { inner: self.inner.clone() }
3191 }
3192
3193 fn into_inner(
3194 self,
3195 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3196 {
3197 (self.inner, self.is_terminated)
3198 }
3199
3200 fn from_inner(
3201 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3202 is_terminated: bool,
3203 ) -> Self {
3204 Self { inner, is_terminated }
3205 }
3206}
3207
3208impl futures::Stream for DirectoryRequestStream {
3209 type Item = Result<DirectoryRequest, fidl::Error>;
3210
3211 fn poll_next(
3212 mut self: std::pin::Pin<&mut Self>,
3213 cx: &mut std::task::Context<'_>,
3214 ) -> std::task::Poll<Option<Self::Item>> {
3215 let this = &mut *self;
3216 if this.inner.check_shutdown(cx) {
3217 this.is_terminated = true;
3218 return std::task::Poll::Ready(None);
3219 }
3220 if this.is_terminated {
3221 panic!("polled DirectoryRequestStream after completion");
3222 }
3223 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3224 |bytes, handles| {
3225 match this.inner.channel().read_etc(cx, bytes, handles) {
3226 std::task::Poll::Ready(Ok(())) => {}
3227 std::task::Poll::Pending => return std::task::Poll::Pending,
3228 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3229 this.is_terminated = true;
3230 return std::task::Poll::Ready(None);
3231 }
3232 std::task::Poll::Ready(Err(e)) => {
3233 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3234 e.into(),
3235 ))));
3236 }
3237 }
3238
3239 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3241
3242 std::task::Poll::Ready(Some(match header.ordinal {
3243 0x6ee9c0ad53ec87aa => {
3244 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3245 let mut req = fidl::new_empty!(
3246 AdvisoryLockingAdvisoryLockRequest,
3247 fidl::encoding::DefaultFuchsiaResourceDialect
3248 );
3249 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
3250 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3251 Ok(DirectoryRequest::AdvisoryLock {
3252 request: req.request,
3253
3254 responder: DirectoryAdvisoryLockResponder {
3255 control_handle: std::mem::ManuallyDrop::new(control_handle),
3256 tx_id: header.tx_id,
3257 },
3258 })
3259 }
3260 0x20d8a7aba2168a79 => {
3261 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3262 let mut req = fidl::new_empty!(
3263 fidl_fuchsia_unknown::CloneableCloneRequest,
3264 fidl::encoding::DefaultFuchsiaResourceDialect
3265 );
3266 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3267 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3268 Ok(DirectoryRequest::Clone { request: req.request, control_handle })
3269 }
3270 0x5ac5d459ad7f657e => {
3271 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3272 let mut req = fidl::new_empty!(
3273 fidl::encoding::EmptyPayload,
3274 fidl::encoding::DefaultFuchsiaResourceDialect
3275 );
3276 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3277 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3278 Ok(DirectoryRequest::Close {
3279 responder: DirectoryCloseResponder {
3280 control_handle: std::mem::ManuallyDrop::new(control_handle),
3281 tx_id: header.tx_id,
3282 },
3283 })
3284 }
3285 0x2658edee9decfc06 => {
3286 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3287 let mut req = fidl::new_empty!(
3288 fidl::encoding::EmptyPayload,
3289 fidl::encoding::DefaultFuchsiaResourceDialect
3290 );
3291 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3292 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3293 Ok(DirectoryRequest::Query {
3294 responder: DirectoryQueryResponder {
3295 control_handle: std::mem::ManuallyDrop::new(control_handle),
3296 tx_id: header.tx_id,
3297 },
3298 })
3299 }
3300 0x5a61678f293ce16f => {
3301 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3302 let mut req = fidl::new_empty!(
3303 NodeDeprecatedCloneRequest,
3304 fidl::encoding::DefaultFuchsiaResourceDialect
3305 );
3306 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
3307 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3308 Ok(DirectoryRequest::DeprecatedClone {
3309 flags: req.flags,
3310 object: req.object,
3311
3312 control_handle,
3313 })
3314 }
3315 0x78985e216314dafd => {
3316 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3317 let mut req = fidl::new_empty!(
3318 fidl::encoding::EmptyPayload,
3319 fidl::encoding::DefaultFuchsiaResourceDialect
3320 );
3321 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3322 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3323 Ok(DirectoryRequest::DeprecatedGetAttr {
3324 responder: DirectoryDeprecatedGetAttrResponder {
3325 control_handle: std::mem::ManuallyDrop::new(control_handle),
3326 tx_id: header.tx_id,
3327 },
3328 })
3329 }
3330 0x4186c0f40d938f46 => {
3331 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3332 let mut req = fidl::new_empty!(
3333 NodeDeprecatedSetAttrRequest,
3334 fidl::encoding::DefaultFuchsiaResourceDialect
3335 );
3336 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
3337 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3338 Ok(DirectoryRequest::DeprecatedSetAttr {
3339 flags: req.flags,
3340 attributes: req.attributes,
3341
3342 responder: DirectoryDeprecatedSetAttrResponder {
3343 control_handle: std::mem::ManuallyDrop::new(control_handle),
3344 tx_id: header.tx_id,
3345 },
3346 })
3347 }
3348 0x5b88fffb8eda3aa1 => {
3349 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3350 let mut req = fidl::new_empty!(
3351 fidl::encoding::EmptyPayload,
3352 fidl::encoding::DefaultFuchsiaResourceDialect
3353 );
3354 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3355 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3356 Ok(DirectoryRequest::DeprecatedGetFlags {
3357 responder: DirectoryDeprecatedGetFlagsResponder {
3358 control_handle: std::mem::ManuallyDrop::new(control_handle),
3359 tx_id: header.tx_id,
3360 },
3361 })
3362 }
3363 0x5295b76c71fde733 => {
3364 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3365 let mut req = fidl::new_empty!(
3366 NodeDeprecatedSetFlagsRequest,
3367 fidl::encoding::DefaultFuchsiaResourceDialect
3368 );
3369 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3370 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3371 Ok(DirectoryRequest::DeprecatedSetFlags {
3372 flags: req.flags,
3373
3374 responder: DirectoryDeprecatedSetFlagsResponder {
3375 control_handle: std::mem::ManuallyDrop::new(control_handle),
3376 tx_id: header.tx_id,
3377 },
3378 })
3379 }
3380 0x176eb318f64ec23 => {
3381 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3382 let mut req = fidl::new_empty!(
3383 fidl::encoding::EmptyPayload,
3384 fidl::encoding::DefaultFuchsiaResourceDialect
3385 );
3386 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3387 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3388 Ok(DirectoryRequest::GetFlags {
3389 responder: DirectoryGetFlagsResponder {
3390 control_handle: std::mem::ManuallyDrop::new(control_handle),
3391 tx_id: header.tx_id,
3392 },
3393 })
3394 }
3395 0x55a8028685791ea8 => {
3396 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3397 let mut req = fidl::new_empty!(
3398 NodeSetFlagsRequest,
3399 fidl::encoding::DefaultFuchsiaResourceDialect
3400 );
3401 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
3402 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3403 Ok(DirectoryRequest::SetFlags {
3404 flags: req.flags,
3405
3406 responder: DirectorySetFlagsResponder {
3407 control_handle: std::mem::ManuallyDrop::new(control_handle),
3408 tx_id: header.tx_id,
3409 },
3410 })
3411 }
3412 0x6f344a1c6b0a0610 => {
3413 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3414 let mut req = fidl::new_empty!(
3415 fidl::encoding::EmptyPayload,
3416 fidl::encoding::DefaultFuchsiaResourceDialect
3417 );
3418 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3419 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3420 Ok(DirectoryRequest::QueryFilesystem {
3421 responder: DirectoryQueryFilesystemResponder {
3422 control_handle: std::mem::ManuallyDrop::new(control_handle),
3423 tx_id: header.tx_id,
3424 },
3425 })
3426 }
3427 0x3d4396a638ea053b => {
3428 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3429 let mut req = fidl::new_empty!(
3430 NodeGetAttributesRequest,
3431 fidl::encoding::DefaultFuchsiaResourceDialect
3432 );
3433 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3434 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3435 Ok(DirectoryRequest::GetAttributes {
3436 query: req.query,
3437
3438 responder: DirectoryGetAttributesResponder {
3439 control_handle: std::mem::ManuallyDrop::new(control_handle),
3440 tx_id: header.tx_id,
3441 },
3442 })
3443 }
3444 0x3308c1da5a89bf08 => {
3445 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3446 let mut req = fidl::new_empty!(
3447 MutableNodeAttributes,
3448 fidl::encoding::DefaultFuchsiaResourceDialect
3449 );
3450 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
3451 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3452 Ok(DirectoryRequest::UpdateAttributes {
3453 payload: req,
3454 responder: DirectoryUpdateAttributesResponder {
3455 control_handle: std::mem::ManuallyDrop::new(control_handle),
3456 tx_id: header.tx_id,
3457 },
3458 })
3459 }
3460 0x2c5c27ca0ab5dc49 => {
3461 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3462 let mut req = fidl::new_empty!(
3463 fidl::encoding::EmptyPayload,
3464 fidl::encoding::DefaultFuchsiaResourceDialect
3465 );
3466 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3467 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3468 Ok(DirectoryRequest::Sync {
3469 responder: DirectorySyncResponder {
3470 control_handle: std::mem::ManuallyDrop::new(control_handle),
3471 tx_id: header.tx_id,
3472 },
3473 })
3474 }
3475 0x4b61033de007fcd0 => {
3476 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3477 let mut req = fidl::new_empty!(
3478 NodeListExtendedAttributesRequest,
3479 fidl::encoding::DefaultFuchsiaResourceDialect
3480 );
3481 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
3482 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3483 Ok(DirectoryRequest::ListExtendedAttributes {
3484 iterator: req.iterator,
3485
3486 control_handle,
3487 })
3488 }
3489 0x45ffa3ccfdeb76db => {
3490 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3491 let mut req = fidl::new_empty!(
3492 NodeGetExtendedAttributeRequest,
3493 fidl::encoding::DefaultFuchsiaResourceDialect
3494 );
3495 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3496 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3497 Ok(DirectoryRequest::GetExtendedAttribute {
3498 name: req.name,
3499
3500 responder: DirectoryGetExtendedAttributeResponder {
3501 control_handle: std::mem::ManuallyDrop::new(control_handle),
3502 tx_id: header.tx_id,
3503 },
3504 })
3505 }
3506 0x4a951362f681f23c => {
3507 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3508 let mut req = fidl::new_empty!(
3509 NodeSetExtendedAttributeRequest,
3510 fidl::encoding::DefaultFuchsiaResourceDialect
3511 );
3512 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3513 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3514 Ok(DirectoryRequest::SetExtendedAttribute {
3515 name: req.name,
3516 value: req.value,
3517 mode: req.mode,
3518
3519 responder: DirectorySetExtendedAttributeResponder {
3520 control_handle: std::mem::ManuallyDrop::new(control_handle),
3521 tx_id: header.tx_id,
3522 },
3523 })
3524 }
3525 0x7a0b9f3a9bf9032d => {
3526 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3527 let mut req = fidl::new_empty!(
3528 NodeRemoveExtendedAttributeRequest,
3529 fidl::encoding::DefaultFuchsiaResourceDialect
3530 );
3531 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
3532 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3533 Ok(DirectoryRequest::RemoveExtendedAttribute {
3534 name: req.name,
3535
3536 responder: DirectoryRemoveExtendedAttributeResponder {
3537 control_handle: std::mem::ManuallyDrop::new(control_handle),
3538 tx_id: header.tx_id,
3539 },
3540 })
3541 }
3542 0x568ddcb9a9cbb6d9 => {
3543 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3544 let mut req = fidl::new_empty!(
3545 OpenableOpenRequest,
3546 fidl::encoding::DefaultFuchsiaResourceDialect
3547 );
3548 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenableOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3549 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3550 Ok(DirectoryRequest::Open {
3551 path: req.path,
3552 flags: req.flags,
3553 options: req.options,
3554 object: req.object,
3555
3556 control_handle,
3557 })
3558 }
3559 0x2c5044561d685ec0 => {
3560 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3561 let mut req = fidl::new_empty!(
3562 DirectoryDeprecatedOpenRequest,
3563 fidl::encoding::DefaultFuchsiaResourceDialect
3564 );
3565 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryDeprecatedOpenRequest>(&header, _body_bytes, handles, &mut req)?;
3566 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3567 Ok(DirectoryRequest::DeprecatedOpen {
3568 flags: req.flags,
3569 mode: req.mode,
3570 path: req.path,
3571 object: req.object,
3572
3573 control_handle,
3574 })
3575 }
3576 0x3582806bf27faa0a => {
3577 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3578 let mut req = fidl::new_empty!(
3579 DirectoryReadDirentsRequest,
3580 fidl::encoding::DefaultFuchsiaResourceDialect
3581 );
3582 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryReadDirentsRequest>(&header, _body_bytes, handles, &mut req)?;
3583 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3584 Ok(DirectoryRequest::ReadDirents {
3585 max_bytes: req.max_bytes,
3586
3587 responder: DirectoryReadDirentsResponder {
3588 control_handle: std::mem::ManuallyDrop::new(control_handle),
3589 tx_id: header.tx_id,
3590 },
3591 })
3592 }
3593 0x16b1202af0f34c71 => {
3594 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3595 let mut req = fidl::new_empty!(
3596 fidl::encoding::EmptyPayload,
3597 fidl::encoding::DefaultFuchsiaResourceDialect
3598 );
3599 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3600 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3601 Ok(DirectoryRequest::Rewind {
3602 responder: DirectoryRewindResponder {
3603 control_handle: std::mem::ManuallyDrop::new(control_handle),
3604 tx_id: header.tx_id,
3605 },
3606 })
3607 }
3608 0x26ae9d18763c8655 => {
3609 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3610 let mut req = fidl::new_empty!(
3611 fidl::encoding::EmptyPayload,
3612 fidl::encoding::DefaultFuchsiaResourceDialect
3613 );
3614 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3615 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3616 Ok(DirectoryRequest::GetToken {
3617 responder: DirectoryGetTokenResponder {
3618 control_handle: std::mem::ManuallyDrop::new(control_handle),
3619 tx_id: header.tx_id,
3620 },
3621 })
3622 }
3623 0x740604c0c7c930e7 => {
3624 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3625 let mut req = fidl::new_empty!(
3626 DirectoryLinkRequest,
3627 fidl::encoding::DefaultFuchsiaResourceDialect
3628 );
3629 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryLinkRequest>(&header, _body_bytes, handles, &mut req)?;
3630 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3631 Ok(DirectoryRequest::Link {
3632 src: req.src,
3633 dst_parent_token: req.dst_parent_token,
3634 dst: req.dst,
3635
3636 responder: DirectoryLinkResponder {
3637 control_handle: std::mem::ManuallyDrop::new(control_handle),
3638 tx_id: header.tx_id,
3639 },
3640 })
3641 }
3642 0x750a0326a78d7bed => {
3643 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3644 let mut req = fidl::new_empty!(
3645 DirectoryUnlinkRequest,
3646 fidl::encoding::DefaultFuchsiaResourceDialect
3647 );
3648 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryUnlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3649 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3650 Ok(DirectoryRequest::Unlink {
3651 name: req.name,
3652 options: req.options,
3653
3654 responder: DirectoryUnlinkResponder {
3655 control_handle: std::mem::ManuallyDrop::new(control_handle),
3656 tx_id: header.tx_id,
3657 },
3658 })
3659 }
3660 0x7060e7723b9928de => {
3661 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3662 let mut req = fidl::new_empty!(
3663 DirectoryRenameRequest,
3664 fidl::encoding::DefaultFuchsiaResourceDialect
3665 );
3666 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryRenameRequest>(&header, _body_bytes, handles, &mut req)?;
3667 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3668 Ok(DirectoryRequest::Rename {
3669 src: req.src,
3670 dst_parent_token: req.dst_parent_token,
3671 dst: req.dst,
3672
3673 responder: DirectoryRenameResponder {
3674 control_handle: std::mem::ManuallyDrop::new(control_handle),
3675 tx_id: header.tx_id,
3676 },
3677 })
3678 }
3679 0x21ce0f19ec043889 => {
3680 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3681 let mut req = fidl::new_empty!(
3682 DirectoryCreateSymlinkRequest,
3683 fidl::encoding::DefaultFuchsiaResourceDialect
3684 );
3685 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryCreateSymlinkRequest>(&header, _body_bytes, handles, &mut req)?;
3686 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3687 Ok(DirectoryRequest::CreateSymlink {
3688 name: req.name,
3689 target: req.target,
3690 connection: req.connection,
3691
3692 responder: DirectoryCreateSymlinkResponder {
3693 control_handle: std::mem::ManuallyDrop::new(control_handle),
3694 tx_id: header.tx_id,
3695 },
3696 })
3697 }
3698 0x5717193a59d66d91 => {
3699 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3700 let mut req = fidl::new_empty!(
3701 DirectoryWatchRequest,
3702 fidl::encoding::DefaultFuchsiaResourceDialect
3703 );
3704 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DirectoryWatchRequest>(&header, _body_bytes, handles, &mut req)?;
3705 let control_handle = DirectoryControlHandle { inner: this.inner.clone() };
3706 Ok(DirectoryRequest::Watch {
3707 mask: req.mask,
3708 options: req.options,
3709 watcher: req.watcher,
3710
3711 responder: DirectoryWatchResponder {
3712 control_handle: std::mem::ManuallyDrop::new(control_handle),
3713 tx_id: header.tx_id,
3714 },
3715 })
3716 }
3717 _ if header.tx_id == 0
3718 && header
3719 .dynamic_flags()
3720 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3721 {
3722 Ok(DirectoryRequest::_UnknownMethod {
3723 ordinal: header.ordinal,
3724 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3725 method_type: fidl::MethodType::OneWay,
3726 })
3727 }
3728 _ if header
3729 .dynamic_flags()
3730 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3731 {
3732 this.inner.send_framework_err(
3733 fidl::encoding::FrameworkErr::UnknownMethod,
3734 header.tx_id,
3735 header.ordinal,
3736 header.dynamic_flags(),
3737 (bytes, handles),
3738 )?;
3739 Ok(DirectoryRequest::_UnknownMethod {
3740 ordinal: header.ordinal,
3741 control_handle: DirectoryControlHandle { inner: this.inner.clone() },
3742 method_type: fidl::MethodType::TwoWay,
3743 })
3744 }
3745 _ => Err(fidl::Error::UnknownOrdinal {
3746 ordinal: header.ordinal,
3747 protocol_name:
3748 <DirectoryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3749 }),
3750 }))
3751 },
3752 )
3753 }
3754}
3755
3756#[derive(Debug)]
3758pub enum DirectoryRequest {
3759 AdvisoryLock {
3783 request: AdvisoryLockRequest,
3784 responder: DirectoryAdvisoryLockResponder,
3785 },
3786 Clone {
3787 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
3788 control_handle: DirectoryControlHandle,
3789 },
3790 Close {
3801 responder: DirectoryCloseResponder,
3802 },
3803 Query {
3804 responder: DirectoryQueryResponder,
3805 },
3806 DeprecatedClone {
3808 flags: OpenFlags,
3809 object: fidl::endpoints::ServerEnd<NodeMarker>,
3810 control_handle: DirectoryControlHandle,
3811 },
3812 DeprecatedGetAttr {
3816 responder: DirectoryDeprecatedGetAttrResponder,
3817 },
3818 DeprecatedSetAttr {
3820 flags: NodeAttributeFlags,
3821 attributes: NodeAttributes,
3822 responder: DirectoryDeprecatedSetAttrResponder,
3823 },
3824 DeprecatedGetFlags {
3826 responder: DirectoryDeprecatedGetFlagsResponder,
3827 },
3828 DeprecatedSetFlags {
3830 flags: OpenFlags,
3831 responder: DirectoryDeprecatedSetFlagsResponder,
3832 },
3833 GetFlags {
3842 responder: DirectoryGetFlagsResponder,
3843 },
3844 SetFlags {
3854 flags: Flags,
3855 responder: DirectorySetFlagsResponder,
3856 },
3857 QueryFilesystem {
3861 responder: DirectoryQueryFilesystemResponder,
3862 },
3863 GetAttributes {
3877 query: NodeAttributesQuery,
3878 responder: DirectoryGetAttributesResponder,
3879 },
3880 UpdateAttributes {
3889 payload: MutableNodeAttributes,
3890 responder: DirectoryUpdateAttributesResponder,
3891 },
3892 Sync {
3902 responder: DirectorySyncResponder,
3903 },
3904 ListExtendedAttributes {
3913 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
3914 control_handle: DirectoryControlHandle,
3915 },
3916 GetExtendedAttribute {
3923 name: Vec<u8>,
3924 responder: DirectoryGetExtendedAttributeResponder,
3925 },
3926 SetExtendedAttribute {
3934 name: Vec<u8>,
3935 value: ExtendedAttributeValue,
3936 mode: SetExtendedAttributeMode,
3937 responder: DirectorySetExtendedAttributeResponder,
3938 },
3939 RemoveExtendedAttribute {
3945 name: Vec<u8>,
3946 responder: DirectoryRemoveExtendedAttributeResponder,
3947 },
3948 Open {
3955 path: String,
3956 flags: Flags,
3957 options: Options,
3958 object: fidl::Channel,
3959 control_handle: DirectoryControlHandle,
3960 },
3961 DeprecatedOpen {
3963 flags: OpenFlags,
3964 mode: ModeType,
3965 path: String,
3966 object: fidl::endpoints::ServerEnd<NodeMarker>,
3967 control_handle: DirectoryControlHandle,
3968 },
3969 ReadDirents {
3996 max_bytes: u64,
3997 responder: DirectoryReadDirentsResponder,
3998 },
3999 Rewind {
4005 responder: DirectoryRewindResponder,
4006 },
4007 GetToken {
4014 responder: DirectoryGetTokenResponder,
4015 },
4016 Link {
4033 src: String,
4034 dst_parent_token: fidl::NullableHandle,
4035 dst: String,
4036 responder: DirectoryLinkResponder,
4037 },
4038 Unlink {
4063 name: String,
4064 options: UnlinkOptions,
4065 responder: DirectoryUnlinkResponder,
4066 },
4067 Rename {
4093 src: String,
4094 dst_parent_token: fidl::Event,
4095 dst: String,
4096 responder: DirectoryRenameResponder,
4097 },
4098 CreateSymlink {
4113 name: String,
4114 target: Vec<u8>,
4115 connection: Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4116 responder: DirectoryCreateSymlinkResponder,
4117 },
4118 Watch {
4127 mask: WatchMask,
4128 options: u32,
4129 watcher: fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4130 responder: DirectoryWatchResponder,
4131 },
4132 #[non_exhaustive]
4134 _UnknownMethod {
4135 ordinal: u64,
4137 control_handle: DirectoryControlHandle,
4138 method_type: fidl::MethodType,
4139 },
4140}
4141
4142impl DirectoryRequest {
4143 #[allow(irrefutable_let_patterns)]
4144 pub fn into_advisory_lock(
4145 self,
4146 ) -> Option<(AdvisoryLockRequest, DirectoryAdvisoryLockResponder)> {
4147 if let DirectoryRequest::AdvisoryLock { request, responder } = self {
4148 Some((request, responder))
4149 } else {
4150 None
4151 }
4152 }
4153
4154 #[allow(irrefutable_let_patterns)]
4155 pub fn into_clone(
4156 self,
4157 ) -> Option<(
4158 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
4159 DirectoryControlHandle,
4160 )> {
4161 if let DirectoryRequest::Clone { request, control_handle } = self {
4162 Some((request, control_handle))
4163 } else {
4164 None
4165 }
4166 }
4167
4168 #[allow(irrefutable_let_patterns)]
4169 pub fn into_close(self) -> Option<(DirectoryCloseResponder)> {
4170 if let DirectoryRequest::Close { responder } = self { Some((responder)) } else { None }
4171 }
4172
4173 #[allow(irrefutable_let_patterns)]
4174 pub fn into_query(self) -> Option<(DirectoryQueryResponder)> {
4175 if let DirectoryRequest::Query { responder } = self { Some((responder)) } else { None }
4176 }
4177
4178 #[allow(irrefutable_let_patterns)]
4179 pub fn into_deprecated_clone(
4180 self,
4181 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, DirectoryControlHandle)> {
4182 if let DirectoryRequest::DeprecatedClone { flags, object, control_handle } = self {
4183 Some((flags, object, control_handle))
4184 } else {
4185 None
4186 }
4187 }
4188
4189 #[allow(irrefutable_let_patterns)]
4190 pub fn into_deprecated_get_attr(self) -> Option<(DirectoryDeprecatedGetAttrResponder)> {
4191 if let DirectoryRequest::DeprecatedGetAttr { responder } = self {
4192 Some((responder))
4193 } else {
4194 None
4195 }
4196 }
4197
4198 #[allow(irrefutable_let_patterns)]
4199 pub fn into_deprecated_set_attr(
4200 self,
4201 ) -> Option<(NodeAttributeFlags, NodeAttributes, DirectoryDeprecatedSetAttrResponder)> {
4202 if let DirectoryRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
4203 Some((flags, attributes, responder))
4204 } else {
4205 None
4206 }
4207 }
4208
4209 #[allow(irrefutable_let_patterns)]
4210 pub fn into_deprecated_get_flags(self) -> Option<(DirectoryDeprecatedGetFlagsResponder)> {
4211 if let DirectoryRequest::DeprecatedGetFlags { responder } = self {
4212 Some((responder))
4213 } else {
4214 None
4215 }
4216 }
4217
4218 #[allow(irrefutable_let_patterns)]
4219 pub fn into_deprecated_set_flags(
4220 self,
4221 ) -> Option<(OpenFlags, DirectoryDeprecatedSetFlagsResponder)> {
4222 if let DirectoryRequest::DeprecatedSetFlags { flags, responder } = self {
4223 Some((flags, responder))
4224 } else {
4225 None
4226 }
4227 }
4228
4229 #[allow(irrefutable_let_patterns)]
4230 pub fn into_get_flags(self) -> Option<(DirectoryGetFlagsResponder)> {
4231 if let DirectoryRequest::GetFlags { responder } = self { Some((responder)) } else { None }
4232 }
4233
4234 #[allow(irrefutable_let_patterns)]
4235 pub fn into_set_flags(self) -> Option<(Flags, DirectorySetFlagsResponder)> {
4236 if let DirectoryRequest::SetFlags { flags, responder } = self {
4237 Some((flags, responder))
4238 } else {
4239 None
4240 }
4241 }
4242
4243 #[allow(irrefutable_let_patterns)]
4244 pub fn into_query_filesystem(self) -> Option<(DirectoryQueryFilesystemResponder)> {
4245 if let DirectoryRequest::QueryFilesystem { responder } = self {
4246 Some((responder))
4247 } else {
4248 None
4249 }
4250 }
4251
4252 #[allow(irrefutable_let_patterns)]
4253 pub fn into_get_attributes(
4254 self,
4255 ) -> Option<(NodeAttributesQuery, DirectoryGetAttributesResponder)> {
4256 if let DirectoryRequest::GetAttributes { query, responder } = self {
4257 Some((query, responder))
4258 } else {
4259 None
4260 }
4261 }
4262
4263 #[allow(irrefutable_let_patterns)]
4264 pub fn into_update_attributes(
4265 self,
4266 ) -> Option<(MutableNodeAttributes, DirectoryUpdateAttributesResponder)> {
4267 if let DirectoryRequest::UpdateAttributes { payload, responder } = self {
4268 Some((payload, responder))
4269 } else {
4270 None
4271 }
4272 }
4273
4274 #[allow(irrefutable_let_patterns)]
4275 pub fn into_sync(self) -> Option<(DirectorySyncResponder)> {
4276 if let DirectoryRequest::Sync { responder } = self { Some((responder)) } else { None }
4277 }
4278
4279 #[allow(irrefutable_let_patterns)]
4280 pub fn into_list_extended_attributes(
4281 self,
4282 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, DirectoryControlHandle)>
4283 {
4284 if let DirectoryRequest::ListExtendedAttributes { iterator, control_handle } = self {
4285 Some((iterator, control_handle))
4286 } else {
4287 None
4288 }
4289 }
4290
4291 #[allow(irrefutable_let_patterns)]
4292 pub fn into_get_extended_attribute(
4293 self,
4294 ) -> Option<(Vec<u8>, DirectoryGetExtendedAttributeResponder)> {
4295 if let DirectoryRequest::GetExtendedAttribute { name, responder } = self {
4296 Some((name, responder))
4297 } else {
4298 None
4299 }
4300 }
4301
4302 #[allow(irrefutable_let_patterns)]
4303 pub fn into_set_extended_attribute(
4304 self,
4305 ) -> Option<(
4306 Vec<u8>,
4307 ExtendedAttributeValue,
4308 SetExtendedAttributeMode,
4309 DirectorySetExtendedAttributeResponder,
4310 )> {
4311 if let DirectoryRequest::SetExtendedAttribute { name, value, mode, responder } = self {
4312 Some((name, value, mode, responder))
4313 } else {
4314 None
4315 }
4316 }
4317
4318 #[allow(irrefutable_let_patterns)]
4319 pub fn into_remove_extended_attribute(
4320 self,
4321 ) -> Option<(Vec<u8>, DirectoryRemoveExtendedAttributeResponder)> {
4322 if let DirectoryRequest::RemoveExtendedAttribute { name, responder } = self {
4323 Some((name, responder))
4324 } else {
4325 None
4326 }
4327 }
4328
4329 #[allow(irrefutable_let_patterns)]
4330 pub fn into_open(
4331 self,
4332 ) -> Option<(String, Flags, Options, fidl::Channel, DirectoryControlHandle)> {
4333 if let DirectoryRequest::Open { path, flags, options, object, control_handle } = self {
4334 Some((path, flags, options, object, control_handle))
4335 } else {
4336 None
4337 }
4338 }
4339
4340 #[allow(irrefutable_let_patterns)]
4341 pub fn into_deprecated_open(
4342 self,
4343 ) -> Option<(
4344 OpenFlags,
4345 ModeType,
4346 String,
4347 fidl::endpoints::ServerEnd<NodeMarker>,
4348 DirectoryControlHandle,
4349 )> {
4350 if let DirectoryRequest::DeprecatedOpen { flags, mode, path, object, control_handle } = self
4351 {
4352 Some((flags, mode, path, object, control_handle))
4353 } else {
4354 None
4355 }
4356 }
4357
4358 #[allow(irrefutable_let_patterns)]
4359 pub fn into_read_dirents(self) -> Option<(u64, DirectoryReadDirentsResponder)> {
4360 if let DirectoryRequest::ReadDirents { max_bytes, responder } = self {
4361 Some((max_bytes, responder))
4362 } else {
4363 None
4364 }
4365 }
4366
4367 #[allow(irrefutable_let_patterns)]
4368 pub fn into_rewind(self) -> Option<(DirectoryRewindResponder)> {
4369 if let DirectoryRequest::Rewind { responder } = self { Some((responder)) } else { None }
4370 }
4371
4372 #[allow(irrefutable_let_patterns)]
4373 pub fn into_get_token(self) -> Option<(DirectoryGetTokenResponder)> {
4374 if let DirectoryRequest::GetToken { responder } = self { Some((responder)) } else { None }
4375 }
4376
4377 #[allow(irrefutable_let_patterns)]
4378 pub fn into_link(
4379 self,
4380 ) -> Option<(String, fidl::NullableHandle, String, DirectoryLinkResponder)> {
4381 if let DirectoryRequest::Link { src, dst_parent_token, dst, responder } = self {
4382 Some((src, dst_parent_token, dst, responder))
4383 } else {
4384 None
4385 }
4386 }
4387
4388 #[allow(irrefutable_let_patterns)]
4389 pub fn into_unlink(self) -> Option<(String, UnlinkOptions, DirectoryUnlinkResponder)> {
4390 if let DirectoryRequest::Unlink { name, options, responder } = self {
4391 Some((name, options, responder))
4392 } else {
4393 None
4394 }
4395 }
4396
4397 #[allow(irrefutable_let_patterns)]
4398 pub fn into_rename(self) -> Option<(String, fidl::Event, String, DirectoryRenameResponder)> {
4399 if let DirectoryRequest::Rename { src, dst_parent_token, dst, responder } = self {
4400 Some((src, dst_parent_token, dst, responder))
4401 } else {
4402 None
4403 }
4404 }
4405
4406 #[allow(irrefutable_let_patterns)]
4407 pub fn into_create_symlink(
4408 self,
4409 ) -> Option<(
4410 String,
4411 Vec<u8>,
4412 Option<fidl::endpoints::ServerEnd<SymlinkMarker>>,
4413 DirectoryCreateSymlinkResponder,
4414 )> {
4415 if let DirectoryRequest::CreateSymlink { name, target, connection, responder } = self {
4416 Some((name, target, connection, responder))
4417 } else {
4418 None
4419 }
4420 }
4421
4422 #[allow(irrefutable_let_patterns)]
4423 pub fn into_watch(
4424 self,
4425 ) -> Option<(
4426 WatchMask,
4427 u32,
4428 fidl::endpoints::ServerEnd<DirectoryWatcherMarker>,
4429 DirectoryWatchResponder,
4430 )> {
4431 if let DirectoryRequest::Watch { mask, options, watcher, responder } = self {
4432 Some((mask, options, watcher, responder))
4433 } else {
4434 None
4435 }
4436 }
4437
4438 pub fn method_name(&self) -> &'static str {
4440 match *self {
4441 DirectoryRequest::AdvisoryLock { .. } => "advisory_lock",
4442 DirectoryRequest::Clone { .. } => "clone",
4443 DirectoryRequest::Close { .. } => "close",
4444 DirectoryRequest::Query { .. } => "query",
4445 DirectoryRequest::DeprecatedClone { .. } => "deprecated_clone",
4446 DirectoryRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
4447 DirectoryRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
4448 DirectoryRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
4449 DirectoryRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
4450 DirectoryRequest::GetFlags { .. } => "get_flags",
4451 DirectoryRequest::SetFlags { .. } => "set_flags",
4452 DirectoryRequest::QueryFilesystem { .. } => "query_filesystem",
4453 DirectoryRequest::GetAttributes { .. } => "get_attributes",
4454 DirectoryRequest::UpdateAttributes { .. } => "update_attributes",
4455 DirectoryRequest::Sync { .. } => "sync",
4456 DirectoryRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
4457 DirectoryRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
4458 DirectoryRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
4459 DirectoryRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
4460 DirectoryRequest::Open { .. } => "open",
4461 DirectoryRequest::DeprecatedOpen { .. } => "deprecated_open",
4462 DirectoryRequest::ReadDirents { .. } => "read_dirents",
4463 DirectoryRequest::Rewind { .. } => "rewind",
4464 DirectoryRequest::GetToken { .. } => "get_token",
4465 DirectoryRequest::Link { .. } => "link",
4466 DirectoryRequest::Unlink { .. } => "unlink",
4467 DirectoryRequest::Rename { .. } => "rename",
4468 DirectoryRequest::CreateSymlink { .. } => "create_symlink",
4469 DirectoryRequest::Watch { .. } => "watch",
4470 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4471 "unknown one-way method"
4472 }
4473 DirectoryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4474 "unknown two-way method"
4475 }
4476 }
4477 }
4478}
4479
4480#[derive(Debug, Clone)]
4481pub struct DirectoryControlHandle {
4482 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4483}
4484
4485impl DirectoryControlHandle {
4486 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
4487 self.inner.shutdown_with_epitaph(status.into())
4488 }
4489}
4490
4491impl fidl::endpoints::ControlHandle for DirectoryControlHandle {
4492 fn shutdown(&self) {
4493 self.inner.shutdown()
4494 }
4495
4496 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
4497 self.inner.shutdown_with_epitaph(status)
4498 }
4499
4500 fn is_closed(&self) -> bool {
4501 self.inner.channel().is_closed()
4502 }
4503 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4504 self.inner.channel().on_closed()
4505 }
4506
4507 #[cfg(target_os = "fuchsia")]
4508 fn signal_peer(
4509 &self,
4510 clear_mask: zx::Signals,
4511 set_mask: zx::Signals,
4512 ) -> Result<(), zx_status::Status> {
4513 use fidl::Peered;
4514 self.inner.channel().signal_peer(clear_mask, set_mask)
4515 }
4516}
4517
4518impl DirectoryControlHandle {
4519 pub fn send_on_open_(
4520 &self,
4521 mut s: i32,
4522 mut info: Option<NodeInfoDeprecated>,
4523 ) -> Result<(), fidl::Error> {
4524 self.inner.send::<NodeOnOpenRequest>(
4525 (s, info.as_mut()),
4526 0,
4527 0x7fc7bbb1dbfd1972,
4528 fidl::encoding::DynamicFlags::FLEXIBLE,
4529 )
4530 }
4531
4532 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
4533 self.inner.send::<Representation>(
4534 &mut payload,
4535 0,
4536 0x5cb40567d80a510c,
4537 fidl::encoding::DynamicFlags::empty(),
4538 )
4539 }
4540}
4541
4542#[must_use = "FIDL methods require a response to be sent"]
4543#[derive(Debug)]
4544pub struct DirectoryAdvisoryLockResponder {
4545 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4546 tx_id: u32,
4547}
4548
4549impl std::ops::Drop for DirectoryAdvisoryLockResponder {
4553 fn drop(&mut self) {
4554 self.control_handle.shutdown();
4555 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4557 }
4558}
4559
4560impl fidl::endpoints::Responder for DirectoryAdvisoryLockResponder {
4561 type ControlHandle = DirectoryControlHandle;
4562
4563 fn control_handle(&self) -> &DirectoryControlHandle {
4564 &self.control_handle
4565 }
4566
4567 fn drop_without_shutdown(mut self) {
4568 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4570 std::mem::forget(self);
4572 }
4573}
4574
4575impl DirectoryAdvisoryLockResponder {
4576 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4580 let _result = self.send_raw(result);
4581 if _result.is_err() {
4582 self.control_handle.shutdown();
4583 }
4584 self.drop_without_shutdown();
4585 _result
4586 }
4587
4588 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4590 let _result = self.send_raw(result);
4591 self.drop_without_shutdown();
4592 _result
4593 }
4594
4595 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4596 self.control_handle
4597 .inner
4598 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4599 result,
4600 self.tx_id,
4601 0x6ee9c0ad53ec87aa,
4602 fidl::encoding::DynamicFlags::empty(),
4603 )
4604 }
4605}
4606
4607#[must_use = "FIDL methods require a response to be sent"]
4608#[derive(Debug)]
4609pub struct DirectoryCloseResponder {
4610 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4611 tx_id: u32,
4612}
4613
4614impl std::ops::Drop for DirectoryCloseResponder {
4618 fn drop(&mut self) {
4619 self.control_handle.shutdown();
4620 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4622 }
4623}
4624
4625impl fidl::endpoints::Responder for DirectoryCloseResponder {
4626 type ControlHandle = DirectoryControlHandle;
4627
4628 fn control_handle(&self) -> &DirectoryControlHandle {
4629 &self.control_handle
4630 }
4631
4632 fn drop_without_shutdown(mut self) {
4633 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4635 std::mem::forget(self);
4637 }
4638}
4639
4640impl DirectoryCloseResponder {
4641 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4645 let _result = self.send_raw(result);
4646 if _result.is_err() {
4647 self.control_handle.shutdown();
4648 }
4649 self.drop_without_shutdown();
4650 _result
4651 }
4652
4653 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4655 let _result = self.send_raw(result);
4656 self.drop_without_shutdown();
4657 _result
4658 }
4659
4660 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
4661 self.control_handle
4662 .inner
4663 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
4664 result,
4665 self.tx_id,
4666 0x5ac5d459ad7f657e,
4667 fidl::encoding::DynamicFlags::empty(),
4668 )
4669 }
4670}
4671
4672#[must_use = "FIDL methods require a response to be sent"]
4673#[derive(Debug)]
4674pub struct DirectoryQueryResponder {
4675 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4676 tx_id: u32,
4677}
4678
4679impl std::ops::Drop for DirectoryQueryResponder {
4683 fn drop(&mut self) {
4684 self.control_handle.shutdown();
4685 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4687 }
4688}
4689
4690impl fidl::endpoints::Responder for DirectoryQueryResponder {
4691 type ControlHandle = DirectoryControlHandle;
4692
4693 fn control_handle(&self) -> &DirectoryControlHandle {
4694 &self.control_handle
4695 }
4696
4697 fn drop_without_shutdown(mut self) {
4698 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4700 std::mem::forget(self);
4702 }
4703}
4704
4705impl DirectoryQueryResponder {
4706 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4710 let _result = self.send_raw(protocol);
4711 if _result.is_err() {
4712 self.control_handle.shutdown();
4713 }
4714 self.drop_without_shutdown();
4715 _result
4716 }
4717
4718 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4720 let _result = self.send_raw(protocol);
4721 self.drop_without_shutdown();
4722 _result
4723 }
4724
4725 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
4726 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
4727 (protocol,),
4728 self.tx_id,
4729 0x2658edee9decfc06,
4730 fidl::encoding::DynamicFlags::empty(),
4731 )
4732 }
4733}
4734
4735#[must_use = "FIDL methods require a response to be sent"]
4736#[derive(Debug)]
4737pub struct DirectoryDeprecatedGetAttrResponder {
4738 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4739 tx_id: u32,
4740}
4741
4742impl std::ops::Drop for DirectoryDeprecatedGetAttrResponder {
4746 fn drop(&mut self) {
4747 self.control_handle.shutdown();
4748 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4750 }
4751}
4752
4753impl fidl::endpoints::Responder for DirectoryDeprecatedGetAttrResponder {
4754 type ControlHandle = DirectoryControlHandle;
4755
4756 fn control_handle(&self) -> &DirectoryControlHandle {
4757 &self.control_handle
4758 }
4759
4760 fn drop_without_shutdown(mut self) {
4761 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4763 std::mem::forget(self);
4765 }
4766}
4767
4768impl DirectoryDeprecatedGetAttrResponder {
4769 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4773 let _result = self.send_raw(s, attributes);
4774 if _result.is_err() {
4775 self.control_handle.shutdown();
4776 }
4777 self.drop_without_shutdown();
4778 _result
4779 }
4780
4781 pub fn send_no_shutdown_on_err(
4783 self,
4784 mut s: i32,
4785 mut attributes: &NodeAttributes,
4786 ) -> Result<(), fidl::Error> {
4787 let _result = self.send_raw(s, attributes);
4788 self.drop_without_shutdown();
4789 _result
4790 }
4791
4792 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
4793 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
4794 (s, attributes),
4795 self.tx_id,
4796 0x78985e216314dafd,
4797 fidl::encoding::DynamicFlags::empty(),
4798 )
4799 }
4800}
4801
4802#[must_use = "FIDL methods require a response to be sent"]
4803#[derive(Debug)]
4804pub struct DirectoryDeprecatedSetAttrResponder {
4805 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4806 tx_id: u32,
4807}
4808
4809impl std::ops::Drop for DirectoryDeprecatedSetAttrResponder {
4813 fn drop(&mut self) {
4814 self.control_handle.shutdown();
4815 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4817 }
4818}
4819
4820impl fidl::endpoints::Responder for DirectoryDeprecatedSetAttrResponder {
4821 type ControlHandle = DirectoryControlHandle;
4822
4823 fn control_handle(&self) -> &DirectoryControlHandle {
4824 &self.control_handle
4825 }
4826
4827 fn drop_without_shutdown(mut self) {
4828 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4830 std::mem::forget(self);
4832 }
4833}
4834
4835impl DirectoryDeprecatedSetAttrResponder {
4836 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4840 let _result = self.send_raw(s);
4841 if _result.is_err() {
4842 self.control_handle.shutdown();
4843 }
4844 self.drop_without_shutdown();
4845 _result
4846 }
4847
4848 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4850 let _result = self.send_raw(s);
4851 self.drop_without_shutdown();
4852 _result
4853 }
4854
4855 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4856 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
4857 (s,),
4858 self.tx_id,
4859 0x4186c0f40d938f46,
4860 fidl::encoding::DynamicFlags::empty(),
4861 )
4862 }
4863}
4864
4865#[must_use = "FIDL methods require a response to be sent"]
4866#[derive(Debug)]
4867pub struct DirectoryDeprecatedGetFlagsResponder {
4868 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4869 tx_id: u32,
4870}
4871
4872impl std::ops::Drop for DirectoryDeprecatedGetFlagsResponder {
4876 fn drop(&mut self) {
4877 self.control_handle.shutdown();
4878 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4880 }
4881}
4882
4883impl fidl::endpoints::Responder for DirectoryDeprecatedGetFlagsResponder {
4884 type ControlHandle = DirectoryControlHandle;
4885
4886 fn control_handle(&self) -> &DirectoryControlHandle {
4887 &self.control_handle
4888 }
4889
4890 fn drop_without_shutdown(mut self) {
4891 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4893 std::mem::forget(self);
4895 }
4896}
4897
4898impl DirectoryDeprecatedGetFlagsResponder {
4899 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4903 let _result = self.send_raw(s, flags);
4904 if _result.is_err() {
4905 self.control_handle.shutdown();
4906 }
4907 self.drop_without_shutdown();
4908 _result
4909 }
4910
4911 pub fn send_no_shutdown_on_err(
4913 self,
4914 mut s: i32,
4915 mut flags: OpenFlags,
4916 ) -> Result<(), fidl::Error> {
4917 let _result = self.send_raw(s, flags);
4918 self.drop_without_shutdown();
4919 _result
4920 }
4921
4922 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
4923 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
4924 (s, flags),
4925 self.tx_id,
4926 0x5b88fffb8eda3aa1,
4927 fidl::encoding::DynamicFlags::empty(),
4928 )
4929 }
4930}
4931
4932#[must_use = "FIDL methods require a response to be sent"]
4933#[derive(Debug)]
4934pub struct DirectoryDeprecatedSetFlagsResponder {
4935 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4936 tx_id: u32,
4937}
4938
4939impl std::ops::Drop for DirectoryDeprecatedSetFlagsResponder {
4943 fn drop(&mut self) {
4944 self.control_handle.shutdown();
4945 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4947 }
4948}
4949
4950impl fidl::endpoints::Responder for DirectoryDeprecatedSetFlagsResponder {
4951 type ControlHandle = DirectoryControlHandle;
4952
4953 fn control_handle(&self) -> &DirectoryControlHandle {
4954 &self.control_handle
4955 }
4956
4957 fn drop_without_shutdown(mut self) {
4958 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4960 std::mem::forget(self);
4962 }
4963}
4964
4965impl DirectoryDeprecatedSetFlagsResponder {
4966 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
4970 let _result = self.send_raw(s);
4971 if _result.is_err() {
4972 self.control_handle.shutdown();
4973 }
4974 self.drop_without_shutdown();
4975 _result
4976 }
4977
4978 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
4980 let _result = self.send_raw(s);
4981 self.drop_without_shutdown();
4982 _result
4983 }
4984
4985 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
4986 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
4987 (s,),
4988 self.tx_id,
4989 0x5295b76c71fde733,
4990 fidl::encoding::DynamicFlags::empty(),
4991 )
4992 }
4993}
4994
4995#[must_use = "FIDL methods require a response to be sent"]
4996#[derive(Debug)]
4997pub struct DirectoryGetFlagsResponder {
4998 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
4999 tx_id: u32,
5000}
5001
5002impl std::ops::Drop for DirectoryGetFlagsResponder {
5006 fn drop(&mut self) {
5007 self.control_handle.shutdown();
5008 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5010 }
5011}
5012
5013impl fidl::endpoints::Responder for DirectoryGetFlagsResponder {
5014 type ControlHandle = DirectoryControlHandle;
5015
5016 fn control_handle(&self) -> &DirectoryControlHandle {
5017 &self.control_handle
5018 }
5019
5020 fn drop_without_shutdown(mut self) {
5021 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5023 std::mem::forget(self);
5025 }
5026}
5027
5028impl DirectoryGetFlagsResponder {
5029 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
5033 let _result = self.send_raw(result);
5034 if _result.is_err() {
5035 self.control_handle.shutdown();
5036 }
5037 self.drop_without_shutdown();
5038 _result
5039 }
5040
5041 pub fn send_no_shutdown_on_err(
5043 self,
5044 mut result: Result<Flags, i32>,
5045 ) -> Result<(), fidl::Error> {
5046 let _result = self.send_raw(result);
5047 self.drop_without_shutdown();
5048 _result
5049 }
5050
5051 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
5052 self.control_handle
5053 .inner
5054 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
5055 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
5056 self.tx_id,
5057 0x176eb318f64ec23,
5058 fidl::encoding::DynamicFlags::FLEXIBLE,
5059 )
5060 }
5061}
5062
5063#[must_use = "FIDL methods require a response to be sent"]
5064#[derive(Debug)]
5065pub struct DirectorySetFlagsResponder {
5066 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5067 tx_id: u32,
5068}
5069
5070impl std::ops::Drop for DirectorySetFlagsResponder {
5074 fn drop(&mut self) {
5075 self.control_handle.shutdown();
5076 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5078 }
5079}
5080
5081impl fidl::endpoints::Responder for DirectorySetFlagsResponder {
5082 type ControlHandle = DirectoryControlHandle;
5083
5084 fn control_handle(&self) -> &DirectoryControlHandle {
5085 &self.control_handle
5086 }
5087
5088 fn drop_without_shutdown(mut self) {
5089 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5091 std::mem::forget(self);
5093 }
5094}
5095
5096impl DirectorySetFlagsResponder {
5097 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5101 let _result = self.send_raw(result);
5102 if _result.is_err() {
5103 self.control_handle.shutdown();
5104 }
5105 self.drop_without_shutdown();
5106 _result
5107 }
5108
5109 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5111 let _result = self.send_raw(result);
5112 self.drop_without_shutdown();
5113 _result
5114 }
5115
5116 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5117 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5118 fidl::encoding::EmptyStruct,
5119 i32,
5120 >>(
5121 fidl::encoding::FlexibleResult::new(result),
5122 self.tx_id,
5123 0x55a8028685791ea8,
5124 fidl::encoding::DynamicFlags::FLEXIBLE,
5125 )
5126 }
5127}
5128
5129#[must_use = "FIDL methods require a response to be sent"]
5130#[derive(Debug)]
5131pub struct DirectoryQueryFilesystemResponder {
5132 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5133 tx_id: u32,
5134}
5135
5136impl std::ops::Drop for DirectoryQueryFilesystemResponder {
5140 fn drop(&mut self) {
5141 self.control_handle.shutdown();
5142 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5144 }
5145}
5146
5147impl fidl::endpoints::Responder for DirectoryQueryFilesystemResponder {
5148 type ControlHandle = DirectoryControlHandle;
5149
5150 fn control_handle(&self) -> &DirectoryControlHandle {
5151 &self.control_handle
5152 }
5153
5154 fn drop_without_shutdown(mut self) {
5155 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5157 std::mem::forget(self);
5159 }
5160}
5161
5162impl DirectoryQueryFilesystemResponder {
5163 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5167 let _result = self.send_raw(s, info);
5168 if _result.is_err() {
5169 self.control_handle.shutdown();
5170 }
5171 self.drop_without_shutdown();
5172 _result
5173 }
5174
5175 pub fn send_no_shutdown_on_err(
5177 self,
5178 mut s: i32,
5179 mut info: Option<&FilesystemInfo>,
5180 ) -> Result<(), fidl::Error> {
5181 let _result = self.send_raw(s, info);
5182 self.drop_without_shutdown();
5183 _result
5184 }
5185
5186 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
5187 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
5188 (s, info),
5189 self.tx_id,
5190 0x6f344a1c6b0a0610,
5191 fidl::encoding::DynamicFlags::empty(),
5192 )
5193 }
5194}
5195
5196#[must_use = "FIDL methods require a response to be sent"]
5197#[derive(Debug)]
5198pub struct DirectoryGetAttributesResponder {
5199 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5200 tx_id: u32,
5201}
5202
5203impl std::ops::Drop for DirectoryGetAttributesResponder {
5207 fn drop(&mut self) {
5208 self.control_handle.shutdown();
5209 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5211 }
5212}
5213
5214impl fidl::endpoints::Responder for DirectoryGetAttributesResponder {
5215 type ControlHandle = DirectoryControlHandle;
5216
5217 fn control_handle(&self) -> &DirectoryControlHandle {
5218 &self.control_handle
5219 }
5220
5221 fn drop_without_shutdown(mut self) {
5222 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5224 std::mem::forget(self);
5226 }
5227}
5228
5229impl DirectoryGetAttributesResponder {
5230 pub fn send(
5234 self,
5235 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5236 ) -> Result<(), fidl::Error> {
5237 let _result = self.send_raw(result);
5238 if _result.is_err() {
5239 self.control_handle.shutdown();
5240 }
5241 self.drop_without_shutdown();
5242 _result
5243 }
5244
5245 pub fn send_no_shutdown_on_err(
5247 self,
5248 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5249 ) -> Result<(), fidl::Error> {
5250 let _result = self.send_raw(result);
5251 self.drop_without_shutdown();
5252 _result
5253 }
5254
5255 fn send_raw(
5256 &self,
5257 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
5258 ) -> Result<(), fidl::Error> {
5259 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
5260 result,
5261 self.tx_id,
5262 0x3d4396a638ea053b,
5263 fidl::encoding::DynamicFlags::empty(),
5264 )
5265 }
5266}
5267
5268#[must_use = "FIDL methods require a response to be sent"]
5269#[derive(Debug)]
5270pub struct DirectoryUpdateAttributesResponder {
5271 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5272 tx_id: u32,
5273}
5274
5275impl std::ops::Drop for DirectoryUpdateAttributesResponder {
5279 fn drop(&mut self) {
5280 self.control_handle.shutdown();
5281 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5283 }
5284}
5285
5286impl fidl::endpoints::Responder for DirectoryUpdateAttributesResponder {
5287 type ControlHandle = DirectoryControlHandle;
5288
5289 fn control_handle(&self) -> &DirectoryControlHandle {
5290 &self.control_handle
5291 }
5292
5293 fn drop_without_shutdown(mut self) {
5294 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5296 std::mem::forget(self);
5298 }
5299}
5300
5301impl DirectoryUpdateAttributesResponder {
5302 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5306 let _result = self.send_raw(result);
5307 if _result.is_err() {
5308 self.control_handle.shutdown();
5309 }
5310 self.drop_without_shutdown();
5311 _result
5312 }
5313
5314 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5316 let _result = self.send_raw(result);
5317 self.drop_without_shutdown();
5318 _result
5319 }
5320
5321 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5322 self.control_handle
5323 .inner
5324 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5325 result,
5326 self.tx_id,
5327 0x3308c1da5a89bf08,
5328 fidl::encoding::DynamicFlags::empty(),
5329 )
5330 }
5331}
5332
5333#[must_use = "FIDL methods require a response to be sent"]
5334#[derive(Debug)]
5335pub struct DirectorySyncResponder {
5336 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5337 tx_id: u32,
5338}
5339
5340impl std::ops::Drop for DirectorySyncResponder {
5344 fn drop(&mut self) {
5345 self.control_handle.shutdown();
5346 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5348 }
5349}
5350
5351impl fidl::endpoints::Responder for DirectorySyncResponder {
5352 type ControlHandle = DirectoryControlHandle;
5353
5354 fn control_handle(&self) -> &DirectoryControlHandle {
5355 &self.control_handle
5356 }
5357
5358 fn drop_without_shutdown(mut self) {
5359 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5361 std::mem::forget(self);
5363 }
5364}
5365
5366impl DirectorySyncResponder {
5367 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5371 let _result = self.send_raw(result);
5372 if _result.is_err() {
5373 self.control_handle.shutdown();
5374 }
5375 self.drop_without_shutdown();
5376 _result
5377 }
5378
5379 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5381 let _result = self.send_raw(result);
5382 self.drop_without_shutdown();
5383 _result
5384 }
5385
5386 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5387 self.control_handle
5388 .inner
5389 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5390 result,
5391 self.tx_id,
5392 0x2c5c27ca0ab5dc49,
5393 fidl::encoding::DynamicFlags::empty(),
5394 )
5395 }
5396}
5397
5398#[must_use = "FIDL methods require a response to be sent"]
5399#[derive(Debug)]
5400pub struct DirectoryGetExtendedAttributeResponder {
5401 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5402 tx_id: u32,
5403}
5404
5405impl std::ops::Drop for DirectoryGetExtendedAttributeResponder {
5409 fn drop(&mut self) {
5410 self.control_handle.shutdown();
5411 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5413 }
5414}
5415
5416impl fidl::endpoints::Responder for DirectoryGetExtendedAttributeResponder {
5417 type ControlHandle = DirectoryControlHandle;
5418
5419 fn control_handle(&self) -> &DirectoryControlHandle {
5420 &self.control_handle
5421 }
5422
5423 fn drop_without_shutdown(mut self) {
5424 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5426 std::mem::forget(self);
5428 }
5429}
5430
5431impl DirectoryGetExtendedAttributeResponder {
5432 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5436 let _result = self.send_raw(result);
5437 if _result.is_err() {
5438 self.control_handle.shutdown();
5439 }
5440 self.drop_without_shutdown();
5441 _result
5442 }
5443
5444 pub fn send_no_shutdown_on_err(
5446 self,
5447 mut result: Result<ExtendedAttributeValue, i32>,
5448 ) -> Result<(), fidl::Error> {
5449 let _result = self.send_raw(result);
5450 self.drop_without_shutdown();
5451 _result
5452 }
5453
5454 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
5455 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
5456 result.as_mut().map_err(|e| *e),
5457 self.tx_id,
5458 0x45ffa3ccfdeb76db,
5459 fidl::encoding::DynamicFlags::empty(),
5460 )
5461 }
5462}
5463
5464#[must_use = "FIDL methods require a response to be sent"]
5465#[derive(Debug)]
5466pub struct DirectorySetExtendedAttributeResponder {
5467 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5468 tx_id: u32,
5469}
5470
5471impl std::ops::Drop for DirectorySetExtendedAttributeResponder {
5475 fn drop(&mut self) {
5476 self.control_handle.shutdown();
5477 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5479 }
5480}
5481
5482impl fidl::endpoints::Responder for DirectorySetExtendedAttributeResponder {
5483 type ControlHandle = DirectoryControlHandle;
5484
5485 fn control_handle(&self) -> &DirectoryControlHandle {
5486 &self.control_handle
5487 }
5488
5489 fn drop_without_shutdown(mut self) {
5490 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5492 std::mem::forget(self);
5494 }
5495}
5496
5497impl DirectorySetExtendedAttributeResponder {
5498 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5502 let _result = self.send_raw(result);
5503 if _result.is_err() {
5504 self.control_handle.shutdown();
5505 }
5506 self.drop_without_shutdown();
5507 _result
5508 }
5509
5510 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5512 let _result = self.send_raw(result);
5513 self.drop_without_shutdown();
5514 _result
5515 }
5516
5517 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5518 self.control_handle
5519 .inner
5520 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5521 result,
5522 self.tx_id,
5523 0x4a951362f681f23c,
5524 fidl::encoding::DynamicFlags::empty(),
5525 )
5526 }
5527}
5528
5529#[must_use = "FIDL methods require a response to be sent"]
5530#[derive(Debug)]
5531pub struct DirectoryRemoveExtendedAttributeResponder {
5532 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5533 tx_id: u32,
5534}
5535
5536impl std::ops::Drop for DirectoryRemoveExtendedAttributeResponder {
5540 fn drop(&mut self) {
5541 self.control_handle.shutdown();
5542 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5544 }
5545}
5546
5547impl fidl::endpoints::Responder for DirectoryRemoveExtendedAttributeResponder {
5548 type ControlHandle = DirectoryControlHandle;
5549
5550 fn control_handle(&self) -> &DirectoryControlHandle {
5551 &self.control_handle
5552 }
5553
5554 fn drop_without_shutdown(mut self) {
5555 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5557 std::mem::forget(self);
5559 }
5560}
5561
5562impl DirectoryRemoveExtendedAttributeResponder {
5563 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5567 let _result = self.send_raw(result);
5568 if _result.is_err() {
5569 self.control_handle.shutdown();
5570 }
5571 self.drop_without_shutdown();
5572 _result
5573 }
5574
5575 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5577 let _result = self.send_raw(result);
5578 self.drop_without_shutdown();
5579 _result
5580 }
5581
5582 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5583 self.control_handle
5584 .inner
5585 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5586 result,
5587 self.tx_id,
5588 0x7a0b9f3a9bf9032d,
5589 fidl::encoding::DynamicFlags::empty(),
5590 )
5591 }
5592}
5593
5594#[must_use = "FIDL methods require a response to be sent"]
5595#[derive(Debug)]
5596pub struct DirectoryReadDirentsResponder {
5597 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5598 tx_id: u32,
5599}
5600
5601impl std::ops::Drop for DirectoryReadDirentsResponder {
5605 fn drop(&mut self) {
5606 self.control_handle.shutdown();
5607 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5609 }
5610}
5611
5612impl fidl::endpoints::Responder for DirectoryReadDirentsResponder {
5613 type ControlHandle = DirectoryControlHandle;
5614
5615 fn control_handle(&self) -> &DirectoryControlHandle {
5616 &self.control_handle
5617 }
5618
5619 fn drop_without_shutdown(mut self) {
5620 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5622 std::mem::forget(self);
5624 }
5625}
5626
5627impl DirectoryReadDirentsResponder {
5628 pub fn send(self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5632 let _result = self.send_raw(s, dirents);
5633 if _result.is_err() {
5634 self.control_handle.shutdown();
5635 }
5636 self.drop_without_shutdown();
5637 _result
5638 }
5639
5640 pub fn send_no_shutdown_on_err(
5642 self,
5643 mut s: i32,
5644 mut dirents: &[u8],
5645 ) -> Result<(), fidl::Error> {
5646 let _result = self.send_raw(s, dirents);
5647 self.drop_without_shutdown();
5648 _result
5649 }
5650
5651 fn send_raw(&self, mut s: i32, mut dirents: &[u8]) -> Result<(), fidl::Error> {
5652 self.control_handle.inner.send::<DirectoryReadDirentsResponse>(
5653 (s, dirents),
5654 self.tx_id,
5655 0x3582806bf27faa0a,
5656 fidl::encoding::DynamicFlags::empty(),
5657 )
5658 }
5659}
5660
5661#[must_use = "FIDL methods require a response to be sent"]
5662#[derive(Debug)]
5663pub struct DirectoryRewindResponder {
5664 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5665 tx_id: u32,
5666}
5667
5668impl std::ops::Drop for DirectoryRewindResponder {
5672 fn drop(&mut self) {
5673 self.control_handle.shutdown();
5674 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5676 }
5677}
5678
5679impl fidl::endpoints::Responder for DirectoryRewindResponder {
5680 type ControlHandle = DirectoryControlHandle;
5681
5682 fn control_handle(&self) -> &DirectoryControlHandle {
5683 &self.control_handle
5684 }
5685
5686 fn drop_without_shutdown(mut self) {
5687 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5689 std::mem::forget(self);
5691 }
5692}
5693
5694impl DirectoryRewindResponder {
5695 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5699 let _result = self.send_raw(s);
5700 if _result.is_err() {
5701 self.control_handle.shutdown();
5702 }
5703 self.drop_without_shutdown();
5704 _result
5705 }
5706
5707 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5709 let _result = self.send_raw(s);
5710 self.drop_without_shutdown();
5711 _result
5712 }
5713
5714 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5715 self.control_handle.inner.send::<DirectoryRewindResponse>(
5716 (s,),
5717 self.tx_id,
5718 0x16b1202af0f34c71,
5719 fidl::encoding::DynamicFlags::empty(),
5720 )
5721 }
5722}
5723
5724#[must_use = "FIDL methods require a response to be sent"]
5725#[derive(Debug)]
5726pub struct DirectoryGetTokenResponder {
5727 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5728 tx_id: u32,
5729}
5730
5731impl std::ops::Drop for DirectoryGetTokenResponder {
5735 fn drop(&mut self) {
5736 self.control_handle.shutdown();
5737 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5739 }
5740}
5741
5742impl fidl::endpoints::Responder for DirectoryGetTokenResponder {
5743 type ControlHandle = DirectoryControlHandle;
5744
5745 fn control_handle(&self) -> &DirectoryControlHandle {
5746 &self.control_handle
5747 }
5748
5749 fn drop_without_shutdown(mut self) {
5750 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5752 std::mem::forget(self);
5754 }
5755}
5756
5757impl DirectoryGetTokenResponder {
5758 pub fn send(
5762 self,
5763 mut s: i32,
5764 mut token: Option<fidl::NullableHandle>,
5765 ) -> Result<(), fidl::Error> {
5766 let _result = self.send_raw(s, token);
5767 if _result.is_err() {
5768 self.control_handle.shutdown();
5769 }
5770 self.drop_without_shutdown();
5771 _result
5772 }
5773
5774 pub fn send_no_shutdown_on_err(
5776 self,
5777 mut s: i32,
5778 mut token: Option<fidl::NullableHandle>,
5779 ) -> Result<(), fidl::Error> {
5780 let _result = self.send_raw(s, token);
5781 self.drop_without_shutdown();
5782 _result
5783 }
5784
5785 fn send_raw(
5786 &self,
5787 mut s: i32,
5788 mut token: Option<fidl::NullableHandle>,
5789 ) -> Result<(), fidl::Error> {
5790 self.control_handle.inner.send::<DirectoryGetTokenResponse>(
5791 (s, token),
5792 self.tx_id,
5793 0x26ae9d18763c8655,
5794 fidl::encoding::DynamicFlags::empty(),
5795 )
5796 }
5797}
5798
5799#[must_use = "FIDL methods require a response to be sent"]
5800#[derive(Debug)]
5801pub struct DirectoryLinkResponder {
5802 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5803 tx_id: u32,
5804}
5805
5806impl std::ops::Drop for DirectoryLinkResponder {
5810 fn drop(&mut self) {
5811 self.control_handle.shutdown();
5812 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5814 }
5815}
5816
5817impl fidl::endpoints::Responder for DirectoryLinkResponder {
5818 type ControlHandle = DirectoryControlHandle;
5819
5820 fn control_handle(&self) -> &DirectoryControlHandle {
5821 &self.control_handle
5822 }
5823
5824 fn drop_without_shutdown(mut self) {
5825 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5827 std::mem::forget(self);
5829 }
5830}
5831
5832impl DirectoryLinkResponder {
5833 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
5837 let _result = self.send_raw(s);
5838 if _result.is_err() {
5839 self.control_handle.shutdown();
5840 }
5841 self.drop_without_shutdown();
5842 _result
5843 }
5844
5845 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
5847 let _result = self.send_raw(s);
5848 self.drop_without_shutdown();
5849 _result
5850 }
5851
5852 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
5853 self.control_handle.inner.send::<DirectoryLinkResponse>(
5854 (s,),
5855 self.tx_id,
5856 0x740604c0c7c930e7,
5857 fidl::encoding::DynamicFlags::empty(),
5858 )
5859 }
5860}
5861
5862#[must_use = "FIDL methods require a response to be sent"]
5863#[derive(Debug)]
5864pub struct DirectoryUnlinkResponder {
5865 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5866 tx_id: u32,
5867}
5868
5869impl std::ops::Drop for DirectoryUnlinkResponder {
5873 fn drop(&mut self) {
5874 self.control_handle.shutdown();
5875 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5877 }
5878}
5879
5880impl fidl::endpoints::Responder for DirectoryUnlinkResponder {
5881 type ControlHandle = DirectoryControlHandle;
5882
5883 fn control_handle(&self) -> &DirectoryControlHandle {
5884 &self.control_handle
5885 }
5886
5887 fn drop_without_shutdown(mut self) {
5888 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5890 std::mem::forget(self);
5892 }
5893}
5894
5895impl DirectoryUnlinkResponder {
5896 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5900 let _result = self.send_raw(result);
5901 if _result.is_err() {
5902 self.control_handle.shutdown();
5903 }
5904 self.drop_without_shutdown();
5905 _result
5906 }
5907
5908 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5910 let _result = self.send_raw(result);
5911 self.drop_without_shutdown();
5912 _result
5913 }
5914
5915 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5916 self.control_handle
5917 .inner
5918 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5919 result,
5920 self.tx_id,
5921 0x750a0326a78d7bed,
5922 fidl::encoding::DynamicFlags::empty(),
5923 )
5924 }
5925}
5926
5927#[must_use = "FIDL methods require a response to be sent"]
5928#[derive(Debug)]
5929pub struct DirectoryRenameResponder {
5930 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5931 tx_id: u32,
5932}
5933
5934impl std::ops::Drop for DirectoryRenameResponder {
5938 fn drop(&mut self) {
5939 self.control_handle.shutdown();
5940 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5942 }
5943}
5944
5945impl fidl::endpoints::Responder for DirectoryRenameResponder {
5946 type ControlHandle = DirectoryControlHandle;
5947
5948 fn control_handle(&self) -> &DirectoryControlHandle {
5949 &self.control_handle
5950 }
5951
5952 fn drop_without_shutdown(mut self) {
5953 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5955 std::mem::forget(self);
5957 }
5958}
5959
5960impl DirectoryRenameResponder {
5961 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5965 let _result = self.send_raw(result);
5966 if _result.is_err() {
5967 self.control_handle.shutdown();
5968 }
5969 self.drop_without_shutdown();
5970 _result
5971 }
5972
5973 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5975 let _result = self.send_raw(result);
5976 self.drop_without_shutdown();
5977 _result
5978 }
5979
5980 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5981 self.control_handle
5982 .inner
5983 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5984 result,
5985 self.tx_id,
5986 0x7060e7723b9928de,
5987 fidl::encoding::DynamicFlags::empty(),
5988 )
5989 }
5990}
5991
5992#[must_use = "FIDL methods require a response to be sent"]
5993#[derive(Debug)]
5994pub struct DirectoryCreateSymlinkResponder {
5995 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
5996 tx_id: u32,
5997}
5998
5999impl std::ops::Drop for DirectoryCreateSymlinkResponder {
6003 fn drop(&mut self) {
6004 self.control_handle.shutdown();
6005 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6007 }
6008}
6009
6010impl fidl::endpoints::Responder for DirectoryCreateSymlinkResponder {
6011 type ControlHandle = DirectoryControlHandle;
6012
6013 fn control_handle(&self) -> &DirectoryControlHandle {
6014 &self.control_handle
6015 }
6016
6017 fn drop_without_shutdown(mut self) {
6018 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6020 std::mem::forget(self);
6022 }
6023}
6024
6025impl DirectoryCreateSymlinkResponder {
6026 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6030 let _result = self.send_raw(result);
6031 if _result.is_err() {
6032 self.control_handle.shutdown();
6033 }
6034 self.drop_without_shutdown();
6035 _result
6036 }
6037
6038 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6040 let _result = self.send_raw(result);
6041 self.drop_without_shutdown();
6042 _result
6043 }
6044
6045 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6046 self.control_handle
6047 .inner
6048 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6049 result,
6050 self.tx_id,
6051 0x21ce0f19ec043889,
6052 fidl::encoding::DynamicFlags::empty(),
6053 )
6054 }
6055}
6056
6057#[must_use = "FIDL methods require a response to be sent"]
6058#[derive(Debug)]
6059pub struct DirectoryWatchResponder {
6060 control_handle: std::mem::ManuallyDrop<DirectoryControlHandle>,
6061 tx_id: u32,
6062}
6063
6064impl std::ops::Drop for DirectoryWatchResponder {
6068 fn drop(&mut self) {
6069 self.control_handle.shutdown();
6070 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6072 }
6073}
6074
6075impl fidl::endpoints::Responder for DirectoryWatchResponder {
6076 type ControlHandle = DirectoryControlHandle;
6077
6078 fn control_handle(&self) -> &DirectoryControlHandle {
6079 &self.control_handle
6080 }
6081
6082 fn drop_without_shutdown(mut self) {
6083 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6085 std::mem::forget(self);
6087 }
6088}
6089
6090impl DirectoryWatchResponder {
6091 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
6095 let _result = self.send_raw(s);
6096 if _result.is_err() {
6097 self.control_handle.shutdown();
6098 }
6099 self.drop_without_shutdown();
6100 _result
6101 }
6102
6103 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
6105 let _result = self.send_raw(s);
6106 self.drop_without_shutdown();
6107 _result
6108 }
6109
6110 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
6111 self.control_handle.inner.send::<DirectoryWatchResponse>(
6112 (s,),
6113 self.tx_id,
6114 0x5717193a59d66d91,
6115 fidl::encoding::DynamicFlags::empty(),
6116 )
6117 }
6118}
6119
6120#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6121pub struct DirectoryWatcherMarker;
6122
6123impl fidl::endpoints::ProtocolMarker for DirectoryWatcherMarker {
6124 type Proxy = DirectoryWatcherProxy;
6125 type RequestStream = DirectoryWatcherRequestStream;
6126 #[cfg(target_os = "fuchsia")]
6127 type SynchronousProxy = DirectoryWatcherSynchronousProxy;
6128
6129 const DEBUG_NAME: &'static str = "(anonymous) DirectoryWatcher";
6130}
6131
6132pub trait DirectoryWatcherProxyInterface: Send + Sync {}
6133#[derive(Debug)]
6134#[cfg(target_os = "fuchsia")]
6135pub struct DirectoryWatcherSynchronousProxy {
6136 client: fidl::client::sync::Client,
6137}
6138
6139#[cfg(target_os = "fuchsia")]
6140impl fidl::endpoints::SynchronousProxy for DirectoryWatcherSynchronousProxy {
6141 type Proxy = DirectoryWatcherProxy;
6142 type Protocol = DirectoryWatcherMarker;
6143
6144 fn from_channel(inner: fidl::Channel) -> Self {
6145 Self::new(inner)
6146 }
6147
6148 fn into_channel(self) -> fidl::Channel {
6149 self.client.into_channel()
6150 }
6151
6152 fn as_channel(&self) -> &fidl::Channel {
6153 self.client.as_channel()
6154 }
6155}
6156
6157#[cfg(target_os = "fuchsia")]
6158impl DirectoryWatcherSynchronousProxy {
6159 pub fn new(channel: fidl::Channel) -> Self {
6160 Self { client: fidl::client::sync::Client::new(channel) }
6161 }
6162
6163 pub fn into_channel(self) -> fidl::Channel {
6164 self.client.into_channel()
6165 }
6166
6167 pub fn wait_for_event(
6170 &self,
6171 deadline: zx::MonotonicInstant,
6172 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6173 DirectoryWatcherEvent::decode(
6174 self.client.wait_for_event::<DirectoryWatcherMarker>(deadline)?,
6175 )
6176 }
6177}
6178
6179#[cfg(target_os = "fuchsia")]
6180impl From<DirectoryWatcherSynchronousProxy> for zx::NullableHandle {
6181 fn from(value: DirectoryWatcherSynchronousProxy) -> Self {
6182 value.into_channel().into()
6183 }
6184}
6185
6186#[cfg(target_os = "fuchsia")]
6187impl From<fidl::Channel> for DirectoryWatcherSynchronousProxy {
6188 fn from(value: fidl::Channel) -> Self {
6189 Self::new(value)
6190 }
6191}
6192
6193#[cfg(target_os = "fuchsia")]
6194impl fidl::endpoints::FromClient for DirectoryWatcherSynchronousProxy {
6195 type Protocol = DirectoryWatcherMarker;
6196
6197 fn from_client(value: fidl::endpoints::ClientEnd<DirectoryWatcherMarker>) -> Self {
6198 Self::new(value.into_channel())
6199 }
6200}
6201
6202#[derive(Debug, Clone)]
6203pub struct DirectoryWatcherProxy {
6204 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6205}
6206
6207impl fidl::endpoints::Proxy for DirectoryWatcherProxy {
6208 type Protocol = DirectoryWatcherMarker;
6209
6210 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6211 Self::new(inner)
6212 }
6213
6214 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6215 self.client.into_channel().map_err(|client| Self { client })
6216 }
6217
6218 fn as_channel(&self) -> &::fidl::AsyncChannel {
6219 self.client.as_channel()
6220 }
6221}
6222
6223impl DirectoryWatcherProxy {
6224 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6226 let protocol_name = <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6227 Self { client: fidl::client::Client::new(channel, protocol_name) }
6228 }
6229
6230 pub fn take_event_stream(&self) -> DirectoryWatcherEventStream {
6236 DirectoryWatcherEventStream { event_receiver: self.client.take_event_receiver() }
6237 }
6238}
6239
6240impl DirectoryWatcherProxyInterface for DirectoryWatcherProxy {}
6241
6242pub struct DirectoryWatcherEventStream {
6243 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6244}
6245
6246impl std::marker::Unpin for DirectoryWatcherEventStream {}
6247
6248impl futures::stream::FusedStream for DirectoryWatcherEventStream {
6249 fn is_terminated(&self) -> bool {
6250 self.event_receiver.is_terminated()
6251 }
6252}
6253
6254impl futures::Stream for DirectoryWatcherEventStream {
6255 type Item = Result<DirectoryWatcherEvent, fidl::Error>;
6256
6257 fn poll_next(
6258 mut self: std::pin::Pin<&mut Self>,
6259 cx: &mut std::task::Context<'_>,
6260 ) -> std::task::Poll<Option<Self::Item>> {
6261 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6262 &mut self.event_receiver,
6263 cx
6264 )?) {
6265 Some(buf) => std::task::Poll::Ready(Some(DirectoryWatcherEvent::decode(buf))),
6266 None => std::task::Poll::Ready(None),
6267 }
6268 }
6269}
6270
6271#[derive(Debug)]
6272pub enum DirectoryWatcherEvent {}
6273
6274impl DirectoryWatcherEvent {
6275 fn decode(
6277 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6278 ) -> Result<DirectoryWatcherEvent, fidl::Error> {
6279 let (bytes, _handles) = buf.split_mut();
6280 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6281 debug_assert_eq!(tx_header.tx_id, 0);
6282 match tx_header.ordinal {
6283 _ => Err(fidl::Error::UnknownOrdinal {
6284 ordinal: tx_header.ordinal,
6285 protocol_name:
6286 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6287 }),
6288 }
6289 }
6290}
6291
6292pub struct DirectoryWatcherRequestStream {
6294 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6295 is_terminated: bool,
6296}
6297
6298impl std::marker::Unpin for DirectoryWatcherRequestStream {}
6299
6300impl futures::stream::FusedStream for DirectoryWatcherRequestStream {
6301 fn is_terminated(&self) -> bool {
6302 self.is_terminated
6303 }
6304}
6305
6306impl fidl::endpoints::RequestStream for DirectoryWatcherRequestStream {
6307 type Protocol = DirectoryWatcherMarker;
6308 type ControlHandle = DirectoryWatcherControlHandle;
6309
6310 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6311 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6312 }
6313
6314 fn control_handle(&self) -> Self::ControlHandle {
6315 DirectoryWatcherControlHandle { inner: self.inner.clone() }
6316 }
6317
6318 fn into_inner(
6319 self,
6320 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6321 {
6322 (self.inner, self.is_terminated)
6323 }
6324
6325 fn from_inner(
6326 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6327 is_terminated: bool,
6328 ) -> Self {
6329 Self { inner, is_terminated }
6330 }
6331}
6332
6333impl futures::Stream for DirectoryWatcherRequestStream {
6334 type Item = Result<DirectoryWatcherRequest, fidl::Error>;
6335
6336 fn poll_next(
6337 mut self: std::pin::Pin<&mut Self>,
6338 cx: &mut std::task::Context<'_>,
6339 ) -> std::task::Poll<Option<Self::Item>> {
6340 let this = &mut *self;
6341 if this.inner.check_shutdown(cx) {
6342 this.is_terminated = true;
6343 return std::task::Poll::Ready(None);
6344 }
6345 if this.is_terminated {
6346 panic!("polled DirectoryWatcherRequestStream after completion");
6347 }
6348 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6349 |bytes, handles| {
6350 match this.inner.channel().read_etc(cx, bytes, handles) {
6351 std::task::Poll::Ready(Ok(())) => {}
6352 std::task::Poll::Pending => return std::task::Poll::Pending,
6353 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6354 this.is_terminated = true;
6355 return std::task::Poll::Ready(None);
6356 }
6357 std::task::Poll::Ready(Err(e)) => {
6358 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6359 e.into(),
6360 ))));
6361 }
6362 }
6363
6364 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6366
6367 std::task::Poll::Ready(Some(match header.ordinal {
6368 _ => Err(fidl::Error::UnknownOrdinal {
6369 ordinal: header.ordinal,
6370 protocol_name:
6371 <DirectoryWatcherMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6372 }),
6373 }))
6374 },
6375 )
6376 }
6377}
6378
6379#[derive(Debug)]
6397pub enum DirectoryWatcherRequest {}
6398
6399impl DirectoryWatcherRequest {
6400 pub fn method_name(&self) -> &'static str {
6402 match *self {}
6403 }
6404}
6405
6406#[derive(Debug, Clone)]
6407pub struct DirectoryWatcherControlHandle {
6408 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6409}
6410
6411impl DirectoryWatcherControlHandle {
6412 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
6413 self.inner.shutdown_with_epitaph(status.into())
6414 }
6415}
6416
6417impl fidl::endpoints::ControlHandle for DirectoryWatcherControlHandle {
6418 fn shutdown(&self) {
6419 self.inner.shutdown()
6420 }
6421
6422 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
6423 self.inner.shutdown_with_epitaph(status)
6424 }
6425
6426 fn is_closed(&self) -> bool {
6427 self.inner.channel().is_closed()
6428 }
6429 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6430 self.inner.channel().on_closed()
6431 }
6432
6433 #[cfg(target_os = "fuchsia")]
6434 fn signal_peer(
6435 &self,
6436 clear_mask: zx::Signals,
6437 set_mask: zx::Signals,
6438 ) -> Result<(), zx_status::Status> {
6439 use fidl::Peered;
6440 self.inner.channel().signal_peer(clear_mask, set_mask)
6441 }
6442}
6443
6444impl DirectoryWatcherControlHandle {}
6445
6446#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6447pub struct ExtendedAttributeIteratorMarker;
6448
6449impl fidl::endpoints::ProtocolMarker for ExtendedAttributeIteratorMarker {
6450 type Proxy = ExtendedAttributeIteratorProxy;
6451 type RequestStream = ExtendedAttributeIteratorRequestStream;
6452 #[cfg(target_os = "fuchsia")]
6453 type SynchronousProxy = ExtendedAttributeIteratorSynchronousProxy;
6454
6455 const DEBUG_NAME: &'static str = "(anonymous) ExtendedAttributeIterator";
6456}
6457pub type ExtendedAttributeIteratorGetNextResult = Result<(Vec<Vec<u8>>, bool), i32>;
6458
6459pub trait ExtendedAttributeIteratorProxyInterface: Send + Sync {
6460 type GetNextResponseFut: std::future::Future<Output = Result<ExtendedAttributeIteratorGetNextResult, fidl::Error>>
6461 + Send;
6462 fn r#get_next(&self) -> Self::GetNextResponseFut;
6463}
6464#[derive(Debug)]
6465#[cfg(target_os = "fuchsia")]
6466pub struct ExtendedAttributeIteratorSynchronousProxy {
6467 client: fidl::client::sync::Client,
6468}
6469
6470#[cfg(target_os = "fuchsia")]
6471impl fidl::endpoints::SynchronousProxy for ExtendedAttributeIteratorSynchronousProxy {
6472 type Proxy = ExtendedAttributeIteratorProxy;
6473 type Protocol = ExtendedAttributeIteratorMarker;
6474
6475 fn from_channel(inner: fidl::Channel) -> Self {
6476 Self::new(inner)
6477 }
6478
6479 fn into_channel(self) -> fidl::Channel {
6480 self.client.into_channel()
6481 }
6482
6483 fn as_channel(&self) -> &fidl::Channel {
6484 self.client.as_channel()
6485 }
6486}
6487
6488#[cfg(target_os = "fuchsia")]
6489impl ExtendedAttributeIteratorSynchronousProxy {
6490 pub fn new(channel: fidl::Channel) -> Self {
6491 Self { client: fidl::client::sync::Client::new(channel) }
6492 }
6493
6494 pub fn into_channel(self) -> fidl::Channel {
6495 self.client.into_channel()
6496 }
6497
6498 pub fn wait_for_event(
6501 &self,
6502 deadline: zx::MonotonicInstant,
6503 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6504 ExtendedAttributeIteratorEvent::decode(
6505 self.client.wait_for_event::<ExtendedAttributeIteratorMarker>(deadline)?,
6506 )
6507 }
6508
6509 pub fn r#get_next(
6513 &self,
6514 ___deadline: zx::MonotonicInstant,
6515 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6516 let _response = self.client.send_query::<
6517 fidl::encoding::EmptyPayload,
6518 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6519 ExtendedAttributeIteratorMarker,
6520 >(
6521 (),
6522 0x3ba664a1c2e45a7,
6523 fidl::encoding::DynamicFlags::empty(),
6524 ___deadline,
6525 )?;
6526 Ok(_response.map(|x| (x.attributes, x.last)))
6527 }
6528}
6529
6530#[cfg(target_os = "fuchsia")]
6531impl From<ExtendedAttributeIteratorSynchronousProxy> for zx::NullableHandle {
6532 fn from(value: ExtendedAttributeIteratorSynchronousProxy) -> Self {
6533 value.into_channel().into()
6534 }
6535}
6536
6537#[cfg(target_os = "fuchsia")]
6538impl From<fidl::Channel> for ExtendedAttributeIteratorSynchronousProxy {
6539 fn from(value: fidl::Channel) -> Self {
6540 Self::new(value)
6541 }
6542}
6543
6544#[cfg(target_os = "fuchsia")]
6545impl fidl::endpoints::FromClient for ExtendedAttributeIteratorSynchronousProxy {
6546 type Protocol = ExtendedAttributeIteratorMarker;
6547
6548 fn from_client(value: fidl::endpoints::ClientEnd<ExtendedAttributeIteratorMarker>) -> Self {
6549 Self::new(value.into_channel())
6550 }
6551}
6552
6553#[derive(Debug, Clone)]
6554pub struct ExtendedAttributeIteratorProxy {
6555 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6556}
6557
6558impl fidl::endpoints::Proxy for ExtendedAttributeIteratorProxy {
6559 type Protocol = ExtendedAttributeIteratorMarker;
6560
6561 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6562 Self::new(inner)
6563 }
6564
6565 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6566 self.client.into_channel().map_err(|client| Self { client })
6567 }
6568
6569 fn as_channel(&self) -> &::fidl::AsyncChannel {
6570 self.client.as_channel()
6571 }
6572}
6573
6574impl ExtendedAttributeIteratorProxy {
6575 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6577 let protocol_name =
6578 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6579 Self { client: fidl::client::Client::new(channel, protocol_name) }
6580 }
6581
6582 pub fn take_event_stream(&self) -> ExtendedAttributeIteratorEventStream {
6588 ExtendedAttributeIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6589 }
6590
6591 pub fn r#get_next(
6595 &self,
6596 ) -> fidl::client::QueryResponseFut<
6597 ExtendedAttributeIteratorGetNextResult,
6598 fidl::encoding::DefaultFuchsiaResourceDialect,
6599 > {
6600 ExtendedAttributeIteratorProxyInterface::r#get_next(self)
6601 }
6602}
6603
6604impl ExtendedAttributeIteratorProxyInterface for ExtendedAttributeIteratorProxy {
6605 type GetNextResponseFut = fidl::client::QueryResponseFut<
6606 ExtendedAttributeIteratorGetNextResult,
6607 fidl::encoding::DefaultFuchsiaResourceDialect,
6608 >;
6609 fn r#get_next(&self) -> Self::GetNextResponseFut {
6610 fn _decode(
6611 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6612 ) -> Result<ExtendedAttributeIteratorGetNextResult, fidl::Error> {
6613 let _response = fidl::client::decode_transaction_body::<
6614 fidl::encoding::ResultType<ExtendedAttributeIteratorGetNextResponse, i32>,
6615 fidl::encoding::DefaultFuchsiaResourceDialect,
6616 0x3ba664a1c2e45a7,
6617 >(_buf?)?;
6618 Ok(_response.map(|x| (x.attributes, x.last)))
6619 }
6620 self.client.send_query_and_decode::<
6621 fidl::encoding::EmptyPayload,
6622 ExtendedAttributeIteratorGetNextResult,
6623 >(
6624 (),
6625 0x3ba664a1c2e45a7,
6626 fidl::encoding::DynamicFlags::empty(),
6627 _decode,
6628 )
6629 }
6630}
6631
6632pub struct ExtendedAttributeIteratorEventStream {
6633 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6634}
6635
6636impl std::marker::Unpin for ExtendedAttributeIteratorEventStream {}
6637
6638impl futures::stream::FusedStream for ExtendedAttributeIteratorEventStream {
6639 fn is_terminated(&self) -> bool {
6640 self.event_receiver.is_terminated()
6641 }
6642}
6643
6644impl futures::Stream for ExtendedAttributeIteratorEventStream {
6645 type Item = Result<ExtendedAttributeIteratorEvent, fidl::Error>;
6646
6647 fn poll_next(
6648 mut self: std::pin::Pin<&mut Self>,
6649 cx: &mut std::task::Context<'_>,
6650 ) -> std::task::Poll<Option<Self::Item>> {
6651 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6652 &mut self.event_receiver,
6653 cx
6654 )?) {
6655 Some(buf) => std::task::Poll::Ready(Some(ExtendedAttributeIteratorEvent::decode(buf))),
6656 None => std::task::Poll::Ready(None),
6657 }
6658 }
6659}
6660
6661#[derive(Debug)]
6662pub enum ExtendedAttributeIteratorEvent {}
6663
6664impl ExtendedAttributeIteratorEvent {
6665 fn decode(
6667 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6668 ) -> Result<ExtendedAttributeIteratorEvent, fidl::Error> {
6669 let (bytes, _handles) = buf.split_mut();
6670 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6671 debug_assert_eq!(tx_header.tx_id, 0);
6672 match tx_header.ordinal {
6673 _ => Err(fidl::Error::UnknownOrdinal {
6674 ordinal: tx_header.ordinal,
6675 protocol_name:
6676 <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6677 }),
6678 }
6679 }
6680}
6681
6682pub struct ExtendedAttributeIteratorRequestStream {
6684 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6685 is_terminated: bool,
6686}
6687
6688impl std::marker::Unpin for ExtendedAttributeIteratorRequestStream {}
6689
6690impl futures::stream::FusedStream for ExtendedAttributeIteratorRequestStream {
6691 fn is_terminated(&self) -> bool {
6692 self.is_terminated
6693 }
6694}
6695
6696impl fidl::endpoints::RequestStream for ExtendedAttributeIteratorRequestStream {
6697 type Protocol = ExtendedAttributeIteratorMarker;
6698 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6699
6700 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6701 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6702 }
6703
6704 fn control_handle(&self) -> Self::ControlHandle {
6705 ExtendedAttributeIteratorControlHandle { inner: self.inner.clone() }
6706 }
6707
6708 fn into_inner(
6709 self,
6710 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6711 {
6712 (self.inner, self.is_terminated)
6713 }
6714
6715 fn from_inner(
6716 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6717 is_terminated: bool,
6718 ) -> Self {
6719 Self { inner, is_terminated }
6720 }
6721}
6722
6723impl futures::Stream for ExtendedAttributeIteratorRequestStream {
6724 type Item = Result<ExtendedAttributeIteratorRequest, fidl::Error>;
6725
6726 fn poll_next(
6727 mut self: std::pin::Pin<&mut Self>,
6728 cx: &mut std::task::Context<'_>,
6729 ) -> std::task::Poll<Option<Self::Item>> {
6730 let this = &mut *self;
6731 if this.inner.check_shutdown(cx) {
6732 this.is_terminated = true;
6733 return std::task::Poll::Ready(None);
6734 }
6735 if this.is_terminated {
6736 panic!("polled ExtendedAttributeIteratorRequestStream after completion");
6737 }
6738 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6739 |bytes, handles| {
6740 match this.inner.channel().read_etc(cx, bytes, handles) {
6741 std::task::Poll::Ready(Ok(())) => {}
6742 std::task::Poll::Pending => return std::task::Poll::Pending,
6743 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6744 this.is_terminated = true;
6745 return std::task::Poll::Ready(None);
6746 }
6747 std::task::Poll::Ready(Err(e)) => {
6748 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6749 e.into(),
6750 ))));
6751 }
6752 }
6753
6754 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6756
6757 std::task::Poll::Ready(Some(match header.ordinal {
6758 0x3ba664a1c2e45a7 => {
6759 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6760 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
6761 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6762 let control_handle = ExtendedAttributeIteratorControlHandle {
6763 inner: this.inner.clone(),
6764 };
6765 Ok(ExtendedAttributeIteratorRequest::GetNext {
6766 responder: ExtendedAttributeIteratorGetNextResponder {
6767 control_handle: std::mem::ManuallyDrop::new(control_handle),
6768 tx_id: header.tx_id,
6769 },
6770 })
6771 }
6772 _ => Err(fidl::Error::UnknownOrdinal {
6773 ordinal: header.ordinal,
6774 protocol_name: <ExtendedAttributeIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6775 }),
6776 }))
6777 },
6778 )
6779 }
6780}
6781
6782#[derive(Debug)]
6783pub enum ExtendedAttributeIteratorRequest {
6784 GetNext { responder: ExtendedAttributeIteratorGetNextResponder },
6788}
6789
6790impl ExtendedAttributeIteratorRequest {
6791 #[allow(irrefutable_let_patterns)]
6792 pub fn into_get_next(self) -> Option<(ExtendedAttributeIteratorGetNextResponder)> {
6793 if let ExtendedAttributeIteratorRequest::GetNext { responder } = self {
6794 Some((responder))
6795 } else {
6796 None
6797 }
6798 }
6799
6800 pub fn method_name(&self) -> &'static str {
6802 match *self {
6803 ExtendedAttributeIteratorRequest::GetNext { .. } => "get_next",
6804 }
6805 }
6806}
6807
6808#[derive(Debug, Clone)]
6809pub struct ExtendedAttributeIteratorControlHandle {
6810 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6811}
6812
6813impl ExtendedAttributeIteratorControlHandle {
6814 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
6815 self.inner.shutdown_with_epitaph(status.into())
6816 }
6817}
6818
6819impl fidl::endpoints::ControlHandle for ExtendedAttributeIteratorControlHandle {
6820 fn shutdown(&self) {
6821 self.inner.shutdown()
6822 }
6823
6824 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
6825 self.inner.shutdown_with_epitaph(status)
6826 }
6827
6828 fn is_closed(&self) -> bool {
6829 self.inner.channel().is_closed()
6830 }
6831 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6832 self.inner.channel().on_closed()
6833 }
6834
6835 #[cfg(target_os = "fuchsia")]
6836 fn signal_peer(
6837 &self,
6838 clear_mask: zx::Signals,
6839 set_mask: zx::Signals,
6840 ) -> Result<(), zx_status::Status> {
6841 use fidl::Peered;
6842 self.inner.channel().signal_peer(clear_mask, set_mask)
6843 }
6844}
6845
6846impl ExtendedAttributeIteratorControlHandle {}
6847
6848#[must_use = "FIDL methods require a response to be sent"]
6849#[derive(Debug)]
6850pub struct ExtendedAttributeIteratorGetNextResponder {
6851 control_handle: std::mem::ManuallyDrop<ExtendedAttributeIteratorControlHandle>,
6852 tx_id: u32,
6853}
6854
6855impl std::ops::Drop for ExtendedAttributeIteratorGetNextResponder {
6859 fn drop(&mut self) {
6860 self.control_handle.shutdown();
6861 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6863 }
6864}
6865
6866impl fidl::endpoints::Responder for ExtendedAttributeIteratorGetNextResponder {
6867 type ControlHandle = ExtendedAttributeIteratorControlHandle;
6868
6869 fn control_handle(&self) -> &ExtendedAttributeIteratorControlHandle {
6870 &self.control_handle
6871 }
6872
6873 fn drop_without_shutdown(mut self) {
6874 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6876 std::mem::forget(self);
6878 }
6879}
6880
6881impl ExtendedAttributeIteratorGetNextResponder {
6882 pub fn send(self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
6886 let _result = self.send_raw(result);
6887 if _result.is_err() {
6888 self.control_handle.shutdown();
6889 }
6890 self.drop_without_shutdown();
6891 _result
6892 }
6893
6894 pub fn send_no_shutdown_on_err(
6896 self,
6897 mut result: Result<(&[Vec<u8>], bool), i32>,
6898 ) -> Result<(), fidl::Error> {
6899 let _result = self.send_raw(result);
6900 self.drop_without_shutdown();
6901 _result
6902 }
6903
6904 fn send_raw(&self, mut result: Result<(&[Vec<u8>], bool), i32>) -> Result<(), fidl::Error> {
6905 self.control_handle.inner.send::<fidl::encoding::ResultType<
6906 ExtendedAttributeIteratorGetNextResponse,
6907 i32,
6908 >>(
6909 result,
6910 self.tx_id,
6911 0x3ba664a1c2e45a7,
6912 fidl::encoding::DynamicFlags::empty(),
6913 )
6914 }
6915}
6916
6917#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6918pub struct FileMarker;
6919
6920impl fidl::endpoints::ProtocolMarker for FileMarker {
6921 type Proxy = FileProxy;
6922 type RequestStream = FileRequestStream;
6923 #[cfg(target_os = "fuchsia")]
6924 type SynchronousProxy = FileSynchronousProxy;
6925
6926 const DEBUG_NAME: &'static str = "fuchsia.io.File";
6927}
6928impl fidl::endpoints::DiscoverableProtocolMarker for FileMarker {}
6929pub type FileSeekResult = Result<u64, i32>;
6930pub type FileReadAtResult = Result<Vec<u8>, i32>;
6931pub type FileWriteAtResult = Result<u64, i32>;
6932pub type FileResizeResult = Result<(), i32>;
6933pub type FileGetBackingMemoryResult = Result<fidl::Vmo, i32>;
6934pub type FileAllocateResult = Result<(), i32>;
6935pub type FileEnableVerityResult = Result<(), i32>;
6936
6937pub trait FileProxyInterface: Send + Sync {
6938 type AdvisoryLockResponseFut: std::future::Future<Output = Result<AdvisoryLockingAdvisoryLockResult, fidl::Error>>
6939 + Send;
6940 fn r#advisory_lock(&self, request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut;
6941 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
6942 + Send;
6943 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
6944 fn r#clone(
6945 &self,
6946 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
6947 ) -> Result<(), fidl::Error>;
6948 type CloseResponseFut: std::future::Future<
6949 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
6950 > + Send;
6951 fn r#close(&self) -> Self::CloseResponseFut;
6952 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
6953 fn r#query(&self) -> Self::QueryResponseFut;
6954 fn r#deprecated_clone(
6955 &self,
6956 flags: OpenFlags,
6957 object: fidl::endpoints::ServerEnd<NodeMarker>,
6958 ) -> Result<(), fidl::Error>;
6959 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
6960 + Send;
6961 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
6962 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
6963 fn r#deprecated_set_attr(
6964 &self,
6965 flags: NodeAttributeFlags,
6966 attributes: &NodeAttributes,
6967 ) -> Self::DeprecatedSetAttrResponseFut;
6968 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
6969 + Send;
6970 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
6971 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
6972 + Send;
6973 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
6974 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
6975 + Send;
6976 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
6977 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
6978 + Send;
6979 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
6980 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
6981 + Send;
6982 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
6983 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
6984 + Send;
6985 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
6986 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
6987 + Send;
6988 fn r#update_attributes(
6989 &self,
6990 payload: &MutableNodeAttributes,
6991 ) -> Self::UpdateAttributesResponseFut;
6992 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
6993 fn r#sync(&self) -> Self::SyncResponseFut;
6994 fn r#list_extended_attributes(
6995 &self,
6996 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
6997 ) -> Result<(), fidl::Error>;
6998 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
6999 + Send;
7000 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
7001 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
7002 + Send;
7003 fn r#set_extended_attribute(
7004 &self,
7005 name: &[u8],
7006 value: ExtendedAttributeValue,
7007 mode: SetExtendedAttributeMode,
7008 ) -> Self::SetExtendedAttributeResponseFut;
7009 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
7010 + Send;
7011 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
7012 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
7013 + Send;
7014 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
7015 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
7016 + Send;
7017 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
7018 type DescribeResponseFut: std::future::Future<Output = Result<FileInfo, fidl::Error>> + Send;
7019 fn r#describe(&self) -> Self::DescribeResponseFut;
7020 type SeekResponseFut: std::future::Future<Output = Result<FileSeekResult, fidl::Error>> + Send;
7021 fn r#seek(&self, origin: SeekOrigin, offset: i64) -> Self::SeekResponseFut;
7022 type ReadAtResponseFut: std::future::Future<Output = Result<FileReadAtResult, fidl::Error>>
7023 + Send;
7024 fn r#read_at(&self, count: u64, offset: u64) -> Self::ReadAtResponseFut;
7025 type WriteAtResponseFut: std::future::Future<Output = Result<FileWriteAtResult, fidl::Error>>
7026 + Send;
7027 fn r#write_at(&self, data: &[u8], offset: u64) -> Self::WriteAtResponseFut;
7028 type ResizeResponseFut: std::future::Future<Output = Result<FileResizeResult, fidl::Error>>
7029 + Send;
7030 fn r#resize(&self, length: u64) -> Self::ResizeResponseFut;
7031 type GetBackingMemoryResponseFut: std::future::Future<Output = Result<FileGetBackingMemoryResult, fidl::Error>>
7032 + Send;
7033 fn r#get_backing_memory(&self, flags: VmoFlags) -> Self::GetBackingMemoryResponseFut;
7034 type AllocateResponseFut: std::future::Future<Output = Result<FileAllocateResult, fidl::Error>>
7035 + Send;
7036 fn r#allocate(&self, offset: u64, length: u64, mode: AllocateMode)
7037 -> Self::AllocateResponseFut;
7038 type EnableVerityResponseFut: std::future::Future<Output = Result<FileEnableVerityResult, fidl::Error>>
7039 + Send;
7040 fn r#enable_verity(&self, options: &VerificationOptions) -> Self::EnableVerityResponseFut;
7041}
7042#[derive(Debug)]
7043#[cfg(target_os = "fuchsia")]
7044pub struct FileSynchronousProxy {
7045 client: fidl::client::sync::Client,
7046}
7047
7048#[cfg(target_os = "fuchsia")]
7049impl fidl::endpoints::SynchronousProxy for FileSynchronousProxy {
7050 type Proxy = FileProxy;
7051 type Protocol = FileMarker;
7052
7053 fn from_channel(inner: fidl::Channel) -> Self {
7054 Self::new(inner)
7055 }
7056
7057 fn into_channel(self) -> fidl::Channel {
7058 self.client.into_channel()
7059 }
7060
7061 fn as_channel(&self) -> &fidl::Channel {
7062 self.client.as_channel()
7063 }
7064}
7065
7066#[cfg(target_os = "fuchsia")]
7067impl FileSynchronousProxy {
7068 pub fn new(channel: fidl::Channel) -> Self {
7069 Self { client: fidl::client::sync::Client::new(channel) }
7070 }
7071
7072 pub fn into_channel(self) -> fidl::Channel {
7073 self.client.into_channel()
7074 }
7075
7076 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<FileEvent, fidl::Error> {
7079 FileEvent::decode(self.client.wait_for_event::<FileMarker>(deadline)?)
7080 }
7081
7082 pub fn r#advisory_lock(
7106 &self,
7107 mut request: &AdvisoryLockRequest,
7108 ___deadline: zx::MonotonicInstant,
7109 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
7110 let _response = self.client.send_query::<
7111 AdvisoryLockingAdvisoryLockRequest,
7112 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7113 FileMarker,
7114 >(
7115 (request,),
7116 0x6ee9c0ad53ec87aa,
7117 fidl::encoding::DynamicFlags::empty(),
7118 ___deadline,
7119 )?;
7120 Ok(_response.map(|x| x))
7121 }
7122
7123 pub fn r#link_into(
7146 &self,
7147 mut dst_parent_token: fidl::Event,
7148 mut dst: &str,
7149 ___deadline: zx::MonotonicInstant,
7150 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
7151 let _response = self.client.send_query::<
7152 LinkableLinkIntoRequest,
7153 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7154 FileMarker,
7155 >(
7156 (dst_parent_token, dst,),
7157 0x54f3949246a03e74,
7158 fidl::encoding::DynamicFlags::empty(),
7159 ___deadline,
7160 )?;
7161 Ok(_response.map(|x| x))
7162 }
7163
7164 pub fn r#clone(
7165 &self,
7166 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7167 ) -> Result<(), fidl::Error> {
7168 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
7169 (request,),
7170 0x20d8a7aba2168a79,
7171 fidl::encoding::DynamicFlags::empty(),
7172 )
7173 }
7174
7175 pub fn r#close(
7186 &self,
7187 ___deadline: zx::MonotonicInstant,
7188 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
7189 let _response = self.client.send_query::<
7190 fidl::encoding::EmptyPayload,
7191 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7192 FileMarker,
7193 >(
7194 (),
7195 0x5ac5d459ad7f657e,
7196 fidl::encoding::DynamicFlags::empty(),
7197 ___deadline,
7198 )?;
7199 Ok(_response.map(|x| x))
7200 }
7201
7202 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
7203 let _response = self.client.send_query::<
7204 fidl::encoding::EmptyPayload,
7205 fidl_fuchsia_unknown::QueryableQueryResponse,
7206 FileMarker,
7207 >(
7208 (),
7209 0x2658edee9decfc06,
7210 fidl::encoding::DynamicFlags::empty(),
7211 ___deadline,
7212 )?;
7213 Ok(_response.protocol)
7214 }
7215
7216 pub fn r#deprecated_clone(
7218 &self,
7219 mut flags: OpenFlags,
7220 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
7221 ) -> Result<(), fidl::Error> {
7222 self.client.send::<NodeDeprecatedCloneRequest>(
7223 (flags, object),
7224 0x5a61678f293ce16f,
7225 fidl::encoding::DynamicFlags::FLEXIBLE,
7226 )
7227 }
7228
7229 pub fn r#deprecated_get_attr(
7233 &self,
7234 ___deadline: zx::MonotonicInstant,
7235 ) -> Result<(i32, NodeAttributes), fidl::Error> {
7236 let _response = self
7237 .client
7238 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse, FileMarker>(
7239 (),
7240 0x78985e216314dafd,
7241 fidl::encoding::DynamicFlags::empty(),
7242 ___deadline,
7243 )?;
7244 Ok((_response.s, _response.attributes))
7245 }
7246
7247 pub fn r#deprecated_set_attr(
7249 &self,
7250 mut flags: NodeAttributeFlags,
7251 mut attributes: &NodeAttributes,
7252 ___deadline: zx::MonotonicInstant,
7253 ) -> Result<i32, fidl::Error> {
7254 let _response = self
7255 .client
7256 .send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse, FileMarker>(
7257 (flags, attributes),
7258 0x4186c0f40d938f46,
7259 fidl::encoding::DynamicFlags::empty(),
7260 ___deadline,
7261 )?;
7262 Ok(_response.s)
7263 }
7264
7265 pub fn r#deprecated_get_flags(
7267 &self,
7268 ___deadline: zx::MonotonicInstant,
7269 ) -> Result<(i32, OpenFlags), fidl::Error> {
7270 let _response = self
7271 .client
7272 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse, FileMarker>(
7273 (),
7274 0x5b88fffb8eda3aa1,
7275 fidl::encoding::DynamicFlags::empty(),
7276 ___deadline,
7277 )?;
7278 Ok((_response.s, _response.flags))
7279 }
7280
7281 pub fn r#deprecated_set_flags(
7283 &self,
7284 mut flags: OpenFlags,
7285 ___deadline: zx::MonotonicInstant,
7286 ) -> Result<i32, fidl::Error> {
7287 let _response = self.client.send_query::<
7288 NodeDeprecatedSetFlagsRequest,
7289 NodeDeprecatedSetFlagsResponse,
7290 FileMarker,
7291 >(
7292 (flags,),
7293 0x5295b76c71fde733,
7294 fidl::encoding::DynamicFlags::empty(),
7295 ___deadline,
7296 )?;
7297 Ok(_response.s)
7298 }
7299
7300 pub fn r#get_flags(
7309 &self,
7310 ___deadline: zx::MonotonicInstant,
7311 ) -> Result<NodeGetFlagsResult, fidl::Error> {
7312 let _response = self.client.send_query::<
7313 fidl::encoding::EmptyPayload,
7314 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
7315 FileMarker,
7316 >(
7317 (),
7318 0x176eb318f64ec23,
7319 fidl::encoding::DynamicFlags::FLEXIBLE,
7320 ___deadline,
7321 )?
7322 .into_result::<FileMarker>("get_flags")?;
7323 Ok(_response.map(|x| x.flags))
7324 }
7325
7326 pub fn r#set_flags(
7336 &self,
7337 mut flags: Flags,
7338 ___deadline: zx::MonotonicInstant,
7339 ) -> Result<NodeSetFlagsResult, fidl::Error> {
7340 let _response = self.client.send_query::<
7341 NodeSetFlagsRequest,
7342 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7343 FileMarker,
7344 >(
7345 (flags,),
7346 0x55a8028685791ea8,
7347 fidl::encoding::DynamicFlags::FLEXIBLE,
7348 ___deadline,
7349 )?
7350 .into_result::<FileMarker>("set_flags")?;
7351 Ok(_response.map(|x| x))
7352 }
7353
7354 pub fn r#query_filesystem(
7358 &self,
7359 ___deadline: zx::MonotonicInstant,
7360 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
7361 let _response = self
7362 .client
7363 .send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse, FileMarker>(
7364 (),
7365 0x6f344a1c6b0a0610,
7366 fidl::encoding::DynamicFlags::empty(),
7367 ___deadline,
7368 )?;
7369 Ok((_response.s, _response.info))
7370 }
7371
7372 pub fn r#get_attributes(
7386 &self,
7387 mut query: NodeAttributesQuery,
7388 ___deadline: zx::MonotonicInstant,
7389 ) -> Result<NodeGetAttributesResult, fidl::Error> {
7390 let _response = self.client.send_query::<
7391 NodeGetAttributesRequest,
7392 fidl::encoding::ResultType<NodeAttributes2, i32>,
7393 FileMarker,
7394 >(
7395 (query,),
7396 0x3d4396a638ea053b,
7397 fidl::encoding::DynamicFlags::empty(),
7398 ___deadline,
7399 )?;
7400 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
7401 }
7402
7403 pub fn r#update_attributes(
7412 &self,
7413 mut payload: &MutableNodeAttributes,
7414 ___deadline: zx::MonotonicInstant,
7415 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
7416 let _response = self.client.send_query::<
7417 MutableNodeAttributes,
7418 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7419 FileMarker,
7420 >(
7421 payload,
7422 0x3308c1da5a89bf08,
7423 fidl::encoding::DynamicFlags::empty(),
7424 ___deadline,
7425 )?;
7426 Ok(_response.map(|x| x))
7427 }
7428
7429 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
7439 let _response = self.client.send_query::<
7440 fidl::encoding::EmptyPayload,
7441 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7442 FileMarker,
7443 >(
7444 (),
7445 0x2c5c27ca0ab5dc49,
7446 fidl::encoding::DynamicFlags::empty(),
7447 ___deadline,
7448 )?;
7449 Ok(_response.map(|x| x))
7450 }
7451
7452 pub fn r#list_extended_attributes(
7461 &self,
7462 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
7463 ) -> Result<(), fidl::Error> {
7464 self.client.send::<NodeListExtendedAttributesRequest>(
7465 (iterator,),
7466 0x4b61033de007fcd0,
7467 fidl::encoding::DynamicFlags::empty(),
7468 )
7469 }
7470
7471 pub fn r#get_extended_attribute(
7478 &self,
7479 mut name: &[u8],
7480 ___deadline: zx::MonotonicInstant,
7481 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
7482 let _response = self.client.send_query::<
7483 NodeGetExtendedAttributeRequest,
7484 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
7485 FileMarker,
7486 >(
7487 (name,),
7488 0x45ffa3ccfdeb76db,
7489 fidl::encoding::DynamicFlags::empty(),
7490 ___deadline,
7491 )?;
7492 Ok(_response.map(|x| x))
7493 }
7494
7495 pub fn r#set_extended_attribute(
7503 &self,
7504 mut name: &[u8],
7505 mut value: ExtendedAttributeValue,
7506 mut mode: SetExtendedAttributeMode,
7507 ___deadline: zx::MonotonicInstant,
7508 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
7509 let _response = self.client.send_query::<
7510 NodeSetExtendedAttributeRequest,
7511 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7512 FileMarker,
7513 >(
7514 (name, &mut value, mode,),
7515 0x4a951362f681f23c,
7516 fidl::encoding::DynamicFlags::empty(),
7517 ___deadline,
7518 )?;
7519 Ok(_response.map(|x| x))
7520 }
7521
7522 pub fn r#remove_extended_attribute(
7528 &self,
7529 mut name: &[u8],
7530 ___deadline: zx::MonotonicInstant,
7531 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
7532 let _response = self.client.send_query::<
7533 NodeRemoveExtendedAttributeRequest,
7534 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7535 FileMarker,
7536 >(
7537 (name,),
7538 0x7a0b9f3a9bf9032d,
7539 fidl::encoding::DynamicFlags::empty(),
7540 ___deadline,
7541 )?;
7542 Ok(_response.map(|x| x))
7543 }
7544
7545 pub fn r#read(
7564 &self,
7565 mut count: u64,
7566 ___deadline: zx::MonotonicInstant,
7567 ) -> Result<ReadableReadResult, fidl::Error> {
7568 let _response = self.client.send_query::<
7569 ReadableReadRequest,
7570 fidl::encoding::ResultType<ReadableReadResponse, i32>,
7571 FileMarker,
7572 >(
7573 (count,),
7574 0x57e419a298c8ede,
7575 fidl::encoding::DynamicFlags::empty(),
7576 ___deadline,
7577 )?;
7578 Ok(_response.map(|x| x.data))
7579 }
7580
7581 pub fn r#write(
7605 &self,
7606 mut data: &[u8],
7607 ___deadline: zx::MonotonicInstant,
7608 ) -> Result<WritableWriteResult, fidl::Error> {
7609 let _response = self.client.send_query::<
7610 WritableWriteRequest,
7611 fidl::encoding::ResultType<WritableWriteResponse, i32>,
7612 FileMarker,
7613 >(
7614 (data,),
7615 0x6a31437832469f82,
7616 fidl::encoding::DynamicFlags::empty(),
7617 ___deadline,
7618 )?;
7619 Ok(_response.map(|x| x.actual_count))
7620 }
7621
7622 pub fn r#describe(&self, ___deadline: zx::MonotonicInstant) -> Result<FileInfo, fidl::Error> {
7623 let _response =
7624 self.client.send_query::<fidl::encoding::EmptyPayload, FileInfo, FileMarker>(
7625 (),
7626 0x68b5ac00c62906bc,
7627 fidl::encoding::DynamicFlags::empty(),
7628 ___deadline,
7629 )?;
7630 Ok(_response)
7631 }
7632
7633 pub fn r#seek(
7643 &self,
7644 mut origin: SeekOrigin,
7645 mut offset: i64,
7646 ___deadline: zx::MonotonicInstant,
7647 ) -> Result<FileSeekResult, fidl::Error> {
7648 let _response = self.client.send_query::<
7649 FileSeekRequest,
7650 fidl::encoding::ResultType<FileSeekResponse, i32>,
7651 FileMarker,
7652 >(
7653 (origin, offset,),
7654 0x78079168162c5207,
7655 fidl::encoding::DynamicFlags::empty(),
7656 ___deadline,
7657 )?;
7658 Ok(_response.map(|x| x.offset_from_start))
7659 }
7660
7661 pub fn r#read_at(
7679 &self,
7680 mut count: u64,
7681 mut offset: u64,
7682 ___deadline: zx::MonotonicInstant,
7683 ) -> Result<FileReadAtResult, fidl::Error> {
7684 let _response = self.client.send_query::<
7685 FileReadAtRequest,
7686 fidl::encoding::ResultType<FileReadAtResponse, i32>,
7687 FileMarker,
7688 >(
7689 (count, offset,),
7690 0x1607a293a60d723e,
7691 fidl::encoding::DynamicFlags::empty(),
7692 ___deadline,
7693 )?;
7694 Ok(_response.map(|x| x.data))
7695 }
7696
7697 pub fn r#write_at(
7719 &self,
7720 mut data: &[u8],
7721 mut offset: u64,
7722 ___deadline: zx::MonotonicInstant,
7723 ) -> Result<FileWriteAtResult, fidl::Error> {
7724 let _response = self.client.send_query::<
7725 FileWriteAtRequest,
7726 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
7727 FileMarker,
7728 >(
7729 (data, offset,),
7730 0x793eefc0045e792b,
7731 fidl::encoding::DynamicFlags::empty(),
7732 ___deadline,
7733 )?;
7734 Ok(_response.map(|x| x.actual_count))
7735 }
7736
7737 pub fn r#resize(
7746 &self,
7747 mut length: u64,
7748 ___deadline: zx::MonotonicInstant,
7749 ) -> Result<FileResizeResult, fidl::Error> {
7750 let _response = self.client.send_query::<
7751 FileResizeRequest,
7752 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7753 FileMarker,
7754 >(
7755 (length,),
7756 0x2b80825f0535743a,
7757 fidl::encoding::DynamicFlags::empty(),
7758 ___deadline,
7759 )?;
7760 Ok(_response.map(|x| x))
7761 }
7762
7763 pub fn r#get_backing_memory(
7784 &self,
7785 mut flags: VmoFlags,
7786 ___deadline: zx::MonotonicInstant,
7787 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
7788 let _response = self.client.send_query::<
7789 FileGetBackingMemoryRequest,
7790 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
7791 FileMarker,
7792 >(
7793 (flags,),
7794 0xa6a9e654cbf62b,
7795 fidl::encoding::DynamicFlags::empty(),
7796 ___deadline,
7797 )?;
7798 Ok(_response.map(|x| x.vmo))
7799 }
7800
7801 pub fn r#allocate(
7803 &self,
7804 mut offset: u64,
7805 mut length: u64,
7806 mut mode: AllocateMode,
7807 ___deadline: zx::MonotonicInstant,
7808 ) -> Result<FileAllocateResult, fidl::Error> {
7809 let _response = self.client.send_query::<
7810 FileAllocateRequest,
7811 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7812 FileMarker,
7813 >(
7814 (offset, length, mode,),
7815 0x77fa0c330b57fd2e,
7816 fidl::encoding::DynamicFlags::FLEXIBLE,
7817 ___deadline,
7818 )?
7819 .into_result::<FileMarker>("allocate")?;
7820 Ok(_response.map(|x| x))
7821 }
7822
7823 pub fn r#enable_verity(
7835 &self,
7836 mut options: &VerificationOptions,
7837 ___deadline: zx::MonotonicInstant,
7838 ) -> Result<FileEnableVerityResult, fidl::Error> {
7839 let _response = self.client.send_query::<
7840 FileEnableVerityRequest,
7841 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
7842 FileMarker,
7843 >(
7844 (options,),
7845 0x2c421ec3faaeb8bb,
7846 fidl::encoding::DynamicFlags::FLEXIBLE,
7847 ___deadline,
7848 )?
7849 .into_result::<FileMarker>("enable_verity")?;
7850 Ok(_response.map(|x| x))
7851 }
7852}
7853
7854#[cfg(target_os = "fuchsia")]
7855impl From<FileSynchronousProxy> for zx::NullableHandle {
7856 fn from(value: FileSynchronousProxy) -> Self {
7857 value.into_channel().into()
7858 }
7859}
7860
7861#[cfg(target_os = "fuchsia")]
7862impl From<fidl::Channel> for FileSynchronousProxy {
7863 fn from(value: fidl::Channel) -> Self {
7864 Self::new(value)
7865 }
7866}
7867
7868#[cfg(target_os = "fuchsia")]
7869impl fidl::endpoints::FromClient for FileSynchronousProxy {
7870 type Protocol = FileMarker;
7871
7872 fn from_client(value: fidl::endpoints::ClientEnd<FileMarker>) -> Self {
7873 Self::new(value.into_channel())
7874 }
7875}
7876
7877#[derive(Debug, Clone)]
7878pub struct FileProxy {
7879 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7880}
7881
7882impl fidl::endpoints::Proxy for FileProxy {
7883 type Protocol = FileMarker;
7884
7885 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7886 Self::new(inner)
7887 }
7888
7889 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7890 self.client.into_channel().map_err(|client| Self { client })
7891 }
7892
7893 fn as_channel(&self) -> &::fidl::AsyncChannel {
7894 self.client.as_channel()
7895 }
7896}
7897
7898impl FileProxy {
7899 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7901 let protocol_name = <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7902 Self { client: fidl::client::Client::new(channel, protocol_name) }
7903 }
7904
7905 pub fn take_event_stream(&self) -> FileEventStream {
7911 FileEventStream { event_receiver: self.client.take_event_receiver() }
7912 }
7913
7914 pub fn r#advisory_lock(
7938 &self,
7939 mut request: &AdvisoryLockRequest,
7940 ) -> fidl::client::QueryResponseFut<
7941 AdvisoryLockingAdvisoryLockResult,
7942 fidl::encoding::DefaultFuchsiaResourceDialect,
7943 > {
7944 FileProxyInterface::r#advisory_lock(self, request)
7945 }
7946
7947 pub fn r#link_into(
7970 &self,
7971 mut dst_parent_token: fidl::Event,
7972 mut dst: &str,
7973 ) -> fidl::client::QueryResponseFut<
7974 LinkableLinkIntoResult,
7975 fidl::encoding::DefaultFuchsiaResourceDialect,
7976 > {
7977 FileProxyInterface::r#link_into(self, dst_parent_token, dst)
7978 }
7979
7980 pub fn r#clone(
7981 &self,
7982 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
7983 ) -> Result<(), fidl::Error> {
7984 FileProxyInterface::r#clone(self, request)
7985 }
7986
7987 pub fn r#close(
7998 &self,
7999 ) -> fidl::client::QueryResponseFut<
8000 fidl_fuchsia_unknown::CloseableCloseResult,
8001 fidl::encoding::DefaultFuchsiaResourceDialect,
8002 > {
8003 FileProxyInterface::r#close(self)
8004 }
8005
8006 pub fn r#query(
8007 &self,
8008 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
8009 {
8010 FileProxyInterface::r#query(self)
8011 }
8012
8013 pub fn r#deprecated_clone(
8015 &self,
8016 mut flags: OpenFlags,
8017 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
8018 ) -> Result<(), fidl::Error> {
8019 FileProxyInterface::r#deprecated_clone(self, flags, object)
8020 }
8021
8022 pub fn r#deprecated_get_attr(
8026 &self,
8027 ) -> fidl::client::QueryResponseFut<
8028 (i32, NodeAttributes),
8029 fidl::encoding::DefaultFuchsiaResourceDialect,
8030 > {
8031 FileProxyInterface::r#deprecated_get_attr(self)
8032 }
8033
8034 pub fn r#deprecated_set_attr(
8036 &self,
8037 mut flags: NodeAttributeFlags,
8038 mut attributes: &NodeAttributes,
8039 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
8040 FileProxyInterface::r#deprecated_set_attr(self, flags, attributes)
8041 }
8042
8043 pub fn r#deprecated_get_flags(
8045 &self,
8046 ) -> fidl::client::QueryResponseFut<
8047 (i32, OpenFlags),
8048 fidl::encoding::DefaultFuchsiaResourceDialect,
8049 > {
8050 FileProxyInterface::r#deprecated_get_flags(self)
8051 }
8052
8053 pub fn r#deprecated_set_flags(
8055 &self,
8056 mut flags: OpenFlags,
8057 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
8058 FileProxyInterface::r#deprecated_set_flags(self, flags)
8059 }
8060
8061 pub fn r#get_flags(
8070 &self,
8071 ) -> fidl::client::QueryResponseFut<
8072 NodeGetFlagsResult,
8073 fidl::encoding::DefaultFuchsiaResourceDialect,
8074 > {
8075 FileProxyInterface::r#get_flags(self)
8076 }
8077
8078 pub fn r#set_flags(
8088 &self,
8089 mut flags: Flags,
8090 ) -> fidl::client::QueryResponseFut<
8091 NodeSetFlagsResult,
8092 fidl::encoding::DefaultFuchsiaResourceDialect,
8093 > {
8094 FileProxyInterface::r#set_flags(self, flags)
8095 }
8096
8097 pub fn r#query_filesystem(
8101 &self,
8102 ) -> fidl::client::QueryResponseFut<
8103 (i32, Option<Box<FilesystemInfo>>),
8104 fidl::encoding::DefaultFuchsiaResourceDialect,
8105 > {
8106 FileProxyInterface::r#query_filesystem(self)
8107 }
8108
8109 pub fn r#get_attributes(
8123 &self,
8124 mut query: NodeAttributesQuery,
8125 ) -> fidl::client::QueryResponseFut<
8126 NodeGetAttributesResult,
8127 fidl::encoding::DefaultFuchsiaResourceDialect,
8128 > {
8129 FileProxyInterface::r#get_attributes(self, query)
8130 }
8131
8132 pub fn r#update_attributes(
8141 &self,
8142 mut payload: &MutableNodeAttributes,
8143 ) -> fidl::client::QueryResponseFut<
8144 NodeUpdateAttributesResult,
8145 fidl::encoding::DefaultFuchsiaResourceDialect,
8146 > {
8147 FileProxyInterface::r#update_attributes(self, payload)
8148 }
8149
8150 pub fn r#sync(
8160 &self,
8161 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8162 {
8163 FileProxyInterface::r#sync(self)
8164 }
8165
8166 pub fn r#list_extended_attributes(
8175 &self,
8176 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8177 ) -> Result<(), fidl::Error> {
8178 FileProxyInterface::r#list_extended_attributes(self, iterator)
8179 }
8180
8181 pub fn r#get_extended_attribute(
8188 &self,
8189 mut name: &[u8],
8190 ) -> fidl::client::QueryResponseFut<
8191 NodeGetExtendedAttributeResult,
8192 fidl::encoding::DefaultFuchsiaResourceDialect,
8193 > {
8194 FileProxyInterface::r#get_extended_attribute(self, name)
8195 }
8196
8197 pub fn r#set_extended_attribute(
8205 &self,
8206 mut name: &[u8],
8207 mut value: ExtendedAttributeValue,
8208 mut mode: SetExtendedAttributeMode,
8209 ) -> fidl::client::QueryResponseFut<
8210 NodeSetExtendedAttributeResult,
8211 fidl::encoding::DefaultFuchsiaResourceDialect,
8212 > {
8213 FileProxyInterface::r#set_extended_attribute(self, name, value, mode)
8214 }
8215
8216 pub fn r#remove_extended_attribute(
8222 &self,
8223 mut name: &[u8],
8224 ) -> fidl::client::QueryResponseFut<
8225 NodeRemoveExtendedAttributeResult,
8226 fidl::encoding::DefaultFuchsiaResourceDialect,
8227 > {
8228 FileProxyInterface::r#remove_extended_attribute(self, name)
8229 }
8230
8231 pub fn r#read(
8250 &self,
8251 mut count: u64,
8252 ) -> fidl::client::QueryResponseFut<
8253 ReadableReadResult,
8254 fidl::encoding::DefaultFuchsiaResourceDialect,
8255 > {
8256 FileProxyInterface::r#read(self, count)
8257 }
8258
8259 pub fn r#write(
8283 &self,
8284 mut data: &[u8],
8285 ) -> fidl::client::QueryResponseFut<
8286 WritableWriteResult,
8287 fidl::encoding::DefaultFuchsiaResourceDialect,
8288 > {
8289 FileProxyInterface::r#write(self, data)
8290 }
8291
8292 pub fn r#describe(
8293 &self,
8294 ) -> fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
8295 {
8296 FileProxyInterface::r#describe(self)
8297 }
8298
8299 pub fn r#seek(
8309 &self,
8310 mut origin: SeekOrigin,
8311 mut offset: i64,
8312 ) -> fidl::client::QueryResponseFut<FileSeekResult, fidl::encoding::DefaultFuchsiaResourceDialect>
8313 {
8314 FileProxyInterface::r#seek(self, origin, offset)
8315 }
8316
8317 pub fn r#read_at(
8335 &self,
8336 mut count: u64,
8337 mut offset: u64,
8338 ) -> fidl::client::QueryResponseFut<
8339 FileReadAtResult,
8340 fidl::encoding::DefaultFuchsiaResourceDialect,
8341 > {
8342 FileProxyInterface::r#read_at(self, count, offset)
8343 }
8344
8345 pub fn r#write_at(
8367 &self,
8368 mut data: &[u8],
8369 mut offset: u64,
8370 ) -> fidl::client::QueryResponseFut<
8371 FileWriteAtResult,
8372 fidl::encoding::DefaultFuchsiaResourceDialect,
8373 > {
8374 FileProxyInterface::r#write_at(self, data, offset)
8375 }
8376
8377 pub fn r#resize(
8386 &self,
8387 mut length: u64,
8388 ) -> fidl::client::QueryResponseFut<
8389 FileResizeResult,
8390 fidl::encoding::DefaultFuchsiaResourceDialect,
8391 > {
8392 FileProxyInterface::r#resize(self, length)
8393 }
8394
8395 pub fn r#get_backing_memory(
8416 &self,
8417 mut flags: VmoFlags,
8418 ) -> fidl::client::QueryResponseFut<
8419 FileGetBackingMemoryResult,
8420 fidl::encoding::DefaultFuchsiaResourceDialect,
8421 > {
8422 FileProxyInterface::r#get_backing_memory(self, flags)
8423 }
8424
8425 pub fn r#allocate(
8427 &self,
8428 mut offset: u64,
8429 mut length: u64,
8430 mut mode: AllocateMode,
8431 ) -> fidl::client::QueryResponseFut<
8432 FileAllocateResult,
8433 fidl::encoding::DefaultFuchsiaResourceDialect,
8434 > {
8435 FileProxyInterface::r#allocate(self, offset, length, mode)
8436 }
8437
8438 pub fn r#enable_verity(
8450 &self,
8451 mut options: &VerificationOptions,
8452 ) -> fidl::client::QueryResponseFut<
8453 FileEnableVerityResult,
8454 fidl::encoding::DefaultFuchsiaResourceDialect,
8455 > {
8456 FileProxyInterface::r#enable_verity(self, options)
8457 }
8458}
8459
8460impl FileProxyInterface for FileProxy {
8461 type AdvisoryLockResponseFut = fidl::client::QueryResponseFut<
8462 AdvisoryLockingAdvisoryLockResult,
8463 fidl::encoding::DefaultFuchsiaResourceDialect,
8464 >;
8465 fn r#advisory_lock(&self, mut request: &AdvisoryLockRequest) -> Self::AdvisoryLockResponseFut {
8466 fn _decode(
8467 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8468 ) -> Result<AdvisoryLockingAdvisoryLockResult, fidl::Error> {
8469 let _response = fidl::client::decode_transaction_body::<
8470 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8471 fidl::encoding::DefaultFuchsiaResourceDialect,
8472 0x6ee9c0ad53ec87aa,
8473 >(_buf?)?;
8474 Ok(_response.map(|x| x))
8475 }
8476 self.client.send_query_and_decode::<
8477 AdvisoryLockingAdvisoryLockRequest,
8478 AdvisoryLockingAdvisoryLockResult,
8479 >(
8480 (request,),
8481 0x6ee9c0ad53ec87aa,
8482 fidl::encoding::DynamicFlags::empty(),
8483 _decode,
8484 )
8485 }
8486
8487 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
8488 LinkableLinkIntoResult,
8489 fidl::encoding::DefaultFuchsiaResourceDialect,
8490 >;
8491 fn r#link_into(
8492 &self,
8493 mut dst_parent_token: fidl::Event,
8494 mut dst: &str,
8495 ) -> Self::LinkIntoResponseFut {
8496 fn _decode(
8497 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8498 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
8499 let _response = fidl::client::decode_transaction_body::<
8500 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8501 fidl::encoding::DefaultFuchsiaResourceDialect,
8502 0x54f3949246a03e74,
8503 >(_buf?)?;
8504 Ok(_response.map(|x| x))
8505 }
8506 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
8507 (dst_parent_token, dst),
8508 0x54f3949246a03e74,
8509 fidl::encoding::DynamicFlags::empty(),
8510 _decode,
8511 )
8512 }
8513
8514 fn r#clone(
8515 &self,
8516 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
8517 ) -> Result<(), fidl::Error> {
8518 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
8519 (request,),
8520 0x20d8a7aba2168a79,
8521 fidl::encoding::DynamicFlags::empty(),
8522 )
8523 }
8524
8525 type CloseResponseFut = fidl::client::QueryResponseFut<
8526 fidl_fuchsia_unknown::CloseableCloseResult,
8527 fidl::encoding::DefaultFuchsiaResourceDialect,
8528 >;
8529 fn r#close(&self) -> Self::CloseResponseFut {
8530 fn _decode(
8531 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8532 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
8533 let _response = fidl::client::decode_transaction_body::<
8534 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8535 fidl::encoding::DefaultFuchsiaResourceDialect,
8536 0x5ac5d459ad7f657e,
8537 >(_buf?)?;
8538 Ok(_response.map(|x| x))
8539 }
8540 self.client.send_query_and_decode::<
8541 fidl::encoding::EmptyPayload,
8542 fidl_fuchsia_unknown::CloseableCloseResult,
8543 >(
8544 (),
8545 0x5ac5d459ad7f657e,
8546 fidl::encoding::DynamicFlags::empty(),
8547 _decode,
8548 )
8549 }
8550
8551 type QueryResponseFut =
8552 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
8553 fn r#query(&self) -> Self::QueryResponseFut {
8554 fn _decode(
8555 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8556 ) -> Result<Vec<u8>, fidl::Error> {
8557 let _response = fidl::client::decode_transaction_body::<
8558 fidl_fuchsia_unknown::QueryableQueryResponse,
8559 fidl::encoding::DefaultFuchsiaResourceDialect,
8560 0x2658edee9decfc06,
8561 >(_buf?)?;
8562 Ok(_response.protocol)
8563 }
8564 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
8565 (),
8566 0x2658edee9decfc06,
8567 fidl::encoding::DynamicFlags::empty(),
8568 _decode,
8569 )
8570 }
8571
8572 fn r#deprecated_clone(
8573 &self,
8574 mut flags: OpenFlags,
8575 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
8576 ) -> Result<(), fidl::Error> {
8577 self.client.send::<NodeDeprecatedCloneRequest>(
8578 (flags, object),
8579 0x5a61678f293ce16f,
8580 fidl::encoding::DynamicFlags::FLEXIBLE,
8581 )
8582 }
8583
8584 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
8585 (i32, NodeAttributes),
8586 fidl::encoding::DefaultFuchsiaResourceDialect,
8587 >;
8588 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
8589 fn _decode(
8590 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8591 ) -> Result<(i32, NodeAttributes), fidl::Error> {
8592 let _response = fidl::client::decode_transaction_body::<
8593 NodeDeprecatedGetAttrResponse,
8594 fidl::encoding::DefaultFuchsiaResourceDialect,
8595 0x78985e216314dafd,
8596 >(_buf?)?;
8597 Ok((_response.s, _response.attributes))
8598 }
8599 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
8600 (),
8601 0x78985e216314dafd,
8602 fidl::encoding::DynamicFlags::empty(),
8603 _decode,
8604 )
8605 }
8606
8607 type DeprecatedSetAttrResponseFut =
8608 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8609 fn r#deprecated_set_attr(
8610 &self,
8611 mut flags: NodeAttributeFlags,
8612 mut attributes: &NodeAttributes,
8613 ) -> Self::DeprecatedSetAttrResponseFut {
8614 fn _decode(
8615 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8616 ) -> Result<i32, fidl::Error> {
8617 let _response = fidl::client::decode_transaction_body::<
8618 NodeDeprecatedSetAttrResponse,
8619 fidl::encoding::DefaultFuchsiaResourceDialect,
8620 0x4186c0f40d938f46,
8621 >(_buf?)?;
8622 Ok(_response.s)
8623 }
8624 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
8625 (flags, attributes),
8626 0x4186c0f40d938f46,
8627 fidl::encoding::DynamicFlags::empty(),
8628 _decode,
8629 )
8630 }
8631
8632 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
8633 (i32, OpenFlags),
8634 fidl::encoding::DefaultFuchsiaResourceDialect,
8635 >;
8636 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
8637 fn _decode(
8638 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8639 ) -> Result<(i32, OpenFlags), fidl::Error> {
8640 let _response = fidl::client::decode_transaction_body::<
8641 NodeDeprecatedGetFlagsResponse,
8642 fidl::encoding::DefaultFuchsiaResourceDialect,
8643 0x5b88fffb8eda3aa1,
8644 >(_buf?)?;
8645 Ok((_response.s, _response.flags))
8646 }
8647 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
8648 (),
8649 0x5b88fffb8eda3aa1,
8650 fidl::encoding::DynamicFlags::empty(),
8651 _decode,
8652 )
8653 }
8654
8655 type DeprecatedSetFlagsResponseFut =
8656 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
8657 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
8658 fn _decode(
8659 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8660 ) -> Result<i32, fidl::Error> {
8661 let _response = fidl::client::decode_transaction_body::<
8662 NodeDeprecatedSetFlagsResponse,
8663 fidl::encoding::DefaultFuchsiaResourceDialect,
8664 0x5295b76c71fde733,
8665 >(_buf?)?;
8666 Ok(_response.s)
8667 }
8668 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
8669 (flags,),
8670 0x5295b76c71fde733,
8671 fidl::encoding::DynamicFlags::empty(),
8672 _decode,
8673 )
8674 }
8675
8676 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
8677 NodeGetFlagsResult,
8678 fidl::encoding::DefaultFuchsiaResourceDialect,
8679 >;
8680 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
8681 fn _decode(
8682 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8683 ) -> Result<NodeGetFlagsResult, fidl::Error> {
8684 let _response = fidl::client::decode_transaction_body::<
8685 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
8686 fidl::encoding::DefaultFuchsiaResourceDialect,
8687 0x176eb318f64ec23,
8688 >(_buf?)?
8689 .into_result::<FileMarker>("get_flags")?;
8690 Ok(_response.map(|x| x.flags))
8691 }
8692 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
8693 (),
8694 0x176eb318f64ec23,
8695 fidl::encoding::DynamicFlags::FLEXIBLE,
8696 _decode,
8697 )
8698 }
8699
8700 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
8701 NodeSetFlagsResult,
8702 fidl::encoding::DefaultFuchsiaResourceDialect,
8703 >;
8704 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
8705 fn _decode(
8706 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8707 ) -> Result<NodeSetFlagsResult, fidl::Error> {
8708 let _response = fidl::client::decode_transaction_body::<
8709 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
8710 fidl::encoding::DefaultFuchsiaResourceDialect,
8711 0x55a8028685791ea8,
8712 >(_buf?)?
8713 .into_result::<FileMarker>("set_flags")?;
8714 Ok(_response.map(|x| x))
8715 }
8716 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
8717 (flags,),
8718 0x55a8028685791ea8,
8719 fidl::encoding::DynamicFlags::FLEXIBLE,
8720 _decode,
8721 )
8722 }
8723
8724 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
8725 (i32, Option<Box<FilesystemInfo>>),
8726 fidl::encoding::DefaultFuchsiaResourceDialect,
8727 >;
8728 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
8729 fn _decode(
8730 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8731 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
8732 let _response = fidl::client::decode_transaction_body::<
8733 NodeQueryFilesystemResponse,
8734 fidl::encoding::DefaultFuchsiaResourceDialect,
8735 0x6f344a1c6b0a0610,
8736 >(_buf?)?;
8737 Ok((_response.s, _response.info))
8738 }
8739 self.client.send_query_and_decode::<
8740 fidl::encoding::EmptyPayload,
8741 (i32, Option<Box<FilesystemInfo>>),
8742 >(
8743 (),
8744 0x6f344a1c6b0a0610,
8745 fidl::encoding::DynamicFlags::empty(),
8746 _decode,
8747 )
8748 }
8749
8750 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
8751 NodeGetAttributesResult,
8752 fidl::encoding::DefaultFuchsiaResourceDialect,
8753 >;
8754 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
8755 fn _decode(
8756 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8757 ) -> Result<NodeGetAttributesResult, fidl::Error> {
8758 let _response = fidl::client::decode_transaction_body::<
8759 fidl::encoding::ResultType<NodeAttributes2, i32>,
8760 fidl::encoding::DefaultFuchsiaResourceDialect,
8761 0x3d4396a638ea053b,
8762 >(_buf?)?;
8763 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
8764 }
8765 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
8766 (query,),
8767 0x3d4396a638ea053b,
8768 fidl::encoding::DynamicFlags::empty(),
8769 _decode,
8770 )
8771 }
8772
8773 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
8774 NodeUpdateAttributesResult,
8775 fidl::encoding::DefaultFuchsiaResourceDialect,
8776 >;
8777 fn r#update_attributes(
8778 &self,
8779 mut payload: &MutableNodeAttributes,
8780 ) -> Self::UpdateAttributesResponseFut {
8781 fn _decode(
8782 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8783 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
8784 let _response = fidl::client::decode_transaction_body::<
8785 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8786 fidl::encoding::DefaultFuchsiaResourceDialect,
8787 0x3308c1da5a89bf08,
8788 >(_buf?)?;
8789 Ok(_response.map(|x| x))
8790 }
8791 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
8792 payload,
8793 0x3308c1da5a89bf08,
8794 fidl::encoding::DynamicFlags::empty(),
8795 _decode,
8796 )
8797 }
8798
8799 type SyncResponseFut = fidl::client::QueryResponseFut<
8800 NodeSyncResult,
8801 fidl::encoding::DefaultFuchsiaResourceDialect,
8802 >;
8803 fn r#sync(&self) -> Self::SyncResponseFut {
8804 fn _decode(
8805 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8806 ) -> Result<NodeSyncResult, fidl::Error> {
8807 let _response = fidl::client::decode_transaction_body::<
8808 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8809 fidl::encoding::DefaultFuchsiaResourceDialect,
8810 0x2c5c27ca0ab5dc49,
8811 >(_buf?)?;
8812 Ok(_response.map(|x| x))
8813 }
8814 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
8815 (),
8816 0x2c5c27ca0ab5dc49,
8817 fidl::encoding::DynamicFlags::empty(),
8818 _decode,
8819 )
8820 }
8821
8822 fn r#list_extended_attributes(
8823 &self,
8824 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
8825 ) -> Result<(), fidl::Error> {
8826 self.client.send::<NodeListExtendedAttributesRequest>(
8827 (iterator,),
8828 0x4b61033de007fcd0,
8829 fidl::encoding::DynamicFlags::empty(),
8830 )
8831 }
8832
8833 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8834 NodeGetExtendedAttributeResult,
8835 fidl::encoding::DefaultFuchsiaResourceDialect,
8836 >;
8837 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
8838 fn _decode(
8839 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8840 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
8841 let _response = fidl::client::decode_transaction_body::<
8842 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
8843 fidl::encoding::DefaultFuchsiaResourceDialect,
8844 0x45ffa3ccfdeb76db,
8845 >(_buf?)?;
8846 Ok(_response.map(|x| x))
8847 }
8848 self.client.send_query_and_decode::<
8849 NodeGetExtendedAttributeRequest,
8850 NodeGetExtendedAttributeResult,
8851 >(
8852 (name,),
8853 0x45ffa3ccfdeb76db,
8854 fidl::encoding::DynamicFlags::empty(),
8855 _decode,
8856 )
8857 }
8858
8859 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8860 NodeSetExtendedAttributeResult,
8861 fidl::encoding::DefaultFuchsiaResourceDialect,
8862 >;
8863 fn r#set_extended_attribute(
8864 &self,
8865 mut name: &[u8],
8866 mut value: ExtendedAttributeValue,
8867 mut mode: SetExtendedAttributeMode,
8868 ) -> Self::SetExtendedAttributeResponseFut {
8869 fn _decode(
8870 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8871 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
8872 let _response = fidl::client::decode_transaction_body::<
8873 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8874 fidl::encoding::DefaultFuchsiaResourceDialect,
8875 0x4a951362f681f23c,
8876 >(_buf?)?;
8877 Ok(_response.map(|x| x))
8878 }
8879 self.client.send_query_and_decode::<
8880 NodeSetExtendedAttributeRequest,
8881 NodeSetExtendedAttributeResult,
8882 >(
8883 (name, &mut value, mode,),
8884 0x4a951362f681f23c,
8885 fidl::encoding::DynamicFlags::empty(),
8886 _decode,
8887 )
8888 }
8889
8890 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
8891 NodeRemoveExtendedAttributeResult,
8892 fidl::encoding::DefaultFuchsiaResourceDialect,
8893 >;
8894 fn r#remove_extended_attribute(
8895 &self,
8896 mut name: &[u8],
8897 ) -> Self::RemoveExtendedAttributeResponseFut {
8898 fn _decode(
8899 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8900 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
8901 let _response = fidl::client::decode_transaction_body::<
8902 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
8903 fidl::encoding::DefaultFuchsiaResourceDialect,
8904 0x7a0b9f3a9bf9032d,
8905 >(_buf?)?;
8906 Ok(_response.map(|x| x))
8907 }
8908 self.client.send_query_and_decode::<
8909 NodeRemoveExtendedAttributeRequest,
8910 NodeRemoveExtendedAttributeResult,
8911 >(
8912 (name,),
8913 0x7a0b9f3a9bf9032d,
8914 fidl::encoding::DynamicFlags::empty(),
8915 _decode,
8916 )
8917 }
8918
8919 type ReadResponseFut = fidl::client::QueryResponseFut<
8920 ReadableReadResult,
8921 fidl::encoding::DefaultFuchsiaResourceDialect,
8922 >;
8923 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
8924 fn _decode(
8925 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8926 ) -> Result<ReadableReadResult, fidl::Error> {
8927 let _response = fidl::client::decode_transaction_body::<
8928 fidl::encoding::ResultType<ReadableReadResponse, i32>,
8929 fidl::encoding::DefaultFuchsiaResourceDialect,
8930 0x57e419a298c8ede,
8931 >(_buf?)?;
8932 Ok(_response.map(|x| x.data))
8933 }
8934 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
8935 (count,),
8936 0x57e419a298c8ede,
8937 fidl::encoding::DynamicFlags::empty(),
8938 _decode,
8939 )
8940 }
8941
8942 type WriteResponseFut = fidl::client::QueryResponseFut<
8943 WritableWriteResult,
8944 fidl::encoding::DefaultFuchsiaResourceDialect,
8945 >;
8946 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
8947 fn _decode(
8948 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8949 ) -> Result<WritableWriteResult, fidl::Error> {
8950 let _response = fidl::client::decode_transaction_body::<
8951 fidl::encoding::ResultType<WritableWriteResponse, i32>,
8952 fidl::encoding::DefaultFuchsiaResourceDialect,
8953 0x6a31437832469f82,
8954 >(_buf?)?;
8955 Ok(_response.map(|x| x.actual_count))
8956 }
8957 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
8958 (data,),
8959 0x6a31437832469f82,
8960 fidl::encoding::DynamicFlags::empty(),
8961 _decode,
8962 )
8963 }
8964
8965 type DescribeResponseFut =
8966 fidl::client::QueryResponseFut<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
8967 fn r#describe(&self) -> Self::DescribeResponseFut {
8968 fn _decode(
8969 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8970 ) -> Result<FileInfo, fidl::Error> {
8971 let _response = fidl::client::decode_transaction_body::<
8972 FileInfo,
8973 fidl::encoding::DefaultFuchsiaResourceDialect,
8974 0x68b5ac00c62906bc,
8975 >(_buf?)?;
8976 Ok(_response)
8977 }
8978 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, FileInfo>(
8979 (),
8980 0x68b5ac00c62906bc,
8981 fidl::encoding::DynamicFlags::empty(),
8982 _decode,
8983 )
8984 }
8985
8986 type SeekResponseFut = fidl::client::QueryResponseFut<
8987 FileSeekResult,
8988 fidl::encoding::DefaultFuchsiaResourceDialect,
8989 >;
8990 fn r#seek(&self, mut origin: SeekOrigin, mut offset: i64) -> Self::SeekResponseFut {
8991 fn _decode(
8992 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8993 ) -> Result<FileSeekResult, fidl::Error> {
8994 let _response = fidl::client::decode_transaction_body::<
8995 fidl::encoding::ResultType<FileSeekResponse, i32>,
8996 fidl::encoding::DefaultFuchsiaResourceDialect,
8997 0x78079168162c5207,
8998 >(_buf?)?;
8999 Ok(_response.map(|x| x.offset_from_start))
9000 }
9001 self.client.send_query_and_decode::<FileSeekRequest, FileSeekResult>(
9002 (origin, offset),
9003 0x78079168162c5207,
9004 fidl::encoding::DynamicFlags::empty(),
9005 _decode,
9006 )
9007 }
9008
9009 type ReadAtResponseFut = fidl::client::QueryResponseFut<
9010 FileReadAtResult,
9011 fidl::encoding::DefaultFuchsiaResourceDialect,
9012 >;
9013 fn r#read_at(&self, mut count: u64, mut offset: u64) -> Self::ReadAtResponseFut {
9014 fn _decode(
9015 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9016 ) -> Result<FileReadAtResult, fidl::Error> {
9017 let _response = fidl::client::decode_transaction_body::<
9018 fidl::encoding::ResultType<FileReadAtResponse, i32>,
9019 fidl::encoding::DefaultFuchsiaResourceDialect,
9020 0x1607a293a60d723e,
9021 >(_buf?)?;
9022 Ok(_response.map(|x| x.data))
9023 }
9024 self.client.send_query_and_decode::<FileReadAtRequest, FileReadAtResult>(
9025 (count, offset),
9026 0x1607a293a60d723e,
9027 fidl::encoding::DynamicFlags::empty(),
9028 _decode,
9029 )
9030 }
9031
9032 type WriteAtResponseFut = fidl::client::QueryResponseFut<
9033 FileWriteAtResult,
9034 fidl::encoding::DefaultFuchsiaResourceDialect,
9035 >;
9036 fn r#write_at(&self, mut data: &[u8], mut offset: u64) -> Self::WriteAtResponseFut {
9037 fn _decode(
9038 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9039 ) -> Result<FileWriteAtResult, fidl::Error> {
9040 let _response = fidl::client::decode_transaction_body::<
9041 fidl::encoding::ResultType<FileWriteAtResponse, i32>,
9042 fidl::encoding::DefaultFuchsiaResourceDialect,
9043 0x793eefc0045e792b,
9044 >(_buf?)?;
9045 Ok(_response.map(|x| x.actual_count))
9046 }
9047 self.client.send_query_and_decode::<FileWriteAtRequest, FileWriteAtResult>(
9048 (data, offset),
9049 0x793eefc0045e792b,
9050 fidl::encoding::DynamicFlags::empty(),
9051 _decode,
9052 )
9053 }
9054
9055 type ResizeResponseFut = fidl::client::QueryResponseFut<
9056 FileResizeResult,
9057 fidl::encoding::DefaultFuchsiaResourceDialect,
9058 >;
9059 fn r#resize(&self, mut length: u64) -> Self::ResizeResponseFut {
9060 fn _decode(
9061 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9062 ) -> Result<FileResizeResult, fidl::Error> {
9063 let _response = fidl::client::decode_transaction_body::<
9064 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
9065 fidl::encoding::DefaultFuchsiaResourceDialect,
9066 0x2b80825f0535743a,
9067 >(_buf?)?;
9068 Ok(_response.map(|x| x))
9069 }
9070 self.client.send_query_and_decode::<FileResizeRequest, FileResizeResult>(
9071 (length,),
9072 0x2b80825f0535743a,
9073 fidl::encoding::DynamicFlags::empty(),
9074 _decode,
9075 )
9076 }
9077
9078 type GetBackingMemoryResponseFut = fidl::client::QueryResponseFut<
9079 FileGetBackingMemoryResult,
9080 fidl::encoding::DefaultFuchsiaResourceDialect,
9081 >;
9082 fn r#get_backing_memory(&self, mut flags: VmoFlags) -> Self::GetBackingMemoryResponseFut {
9083 fn _decode(
9084 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9085 ) -> Result<FileGetBackingMemoryResult, fidl::Error> {
9086 let _response = fidl::client::decode_transaction_body::<
9087 fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>,
9088 fidl::encoding::DefaultFuchsiaResourceDialect,
9089 0xa6a9e654cbf62b,
9090 >(_buf?)?;
9091 Ok(_response.map(|x| x.vmo))
9092 }
9093 self.client
9094 .send_query_and_decode::<FileGetBackingMemoryRequest, FileGetBackingMemoryResult>(
9095 (flags,),
9096 0xa6a9e654cbf62b,
9097 fidl::encoding::DynamicFlags::empty(),
9098 _decode,
9099 )
9100 }
9101
9102 type AllocateResponseFut = fidl::client::QueryResponseFut<
9103 FileAllocateResult,
9104 fidl::encoding::DefaultFuchsiaResourceDialect,
9105 >;
9106 fn r#allocate(
9107 &self,
9108 mut offset: u64,
9109 mut length: u64,
9110 mut mode: AllocateMode,
9111 ) -> Self::AllocateResponseFut {
9112 fn _decode(
9113 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9114 ) -> Result<FileAllocateResult, fidl::Error> {
9115 let _response = fidl::client::decode_transaction_body::<
9116 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
9117 fidl::encoding::DefaultFuchsiaResourceDialect,
9118 0x77fa0c330b57fd2e,
9119 >(_buf?)?
9120 .into_result::<FileMarker>("allocate")?;
9121 Ok(_response.map(|x| x))
9122 }
9123 self.client.send_query_and_decode::<FileAllocateRequest, FileAllocateResult>(
9124 (offset, length, mode),
9125 0x77fa0c330b57fd2e,
9126 fidl::encoding::DynamicFlags::FLEXIBLE,
9127 _decode,
9128 )
9129 }
9130
9131 type EnableVerityResponseFut = fidl::client::QueryResponseFut<
9132 FileEnableVerityResult,
9133 fidl::encoding::DefaultFuchsiaResourceDialect,
9134 >;
9135 fn r#enable_verity(&self, mut options: &VerificationOptions) -> Self::EnableVerityResponseFut {
9136 fn _decode(
9137 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
9138 ) -> Result<FileEnableVerityResult, fidl::Error> {
9139 let _response = fidl::client::decode_transaction_body::<
9140 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
9141 fidl::encoding::DefaultFuchsiaResourceDialect,
9142 0x2c421ec3faaeb8bb,
9143 >(_buf?)?
9144 .into_result::<FileMarker>("enable_verity")?;
9145 Ok(_response.map(|x| x))
9146 }
9147 self.client.send_query_and_decode::<FileEnableVerityRequest, FileEnableVerityResult>(
9148 (options,),
9149 0x2c421ec3faaeb8bb,
9150 fidl::encoding::DynamicFlags::FLEXIBLE,
9151 _decode,
9152 )
9153 }
9154}
9155
9156pub struct FileEventStream {
9157 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
9158}
9159
9160impl std::marker::Unpin for FileEventStream {}
9161
9162impl futures::stream::FusedStream for FileEventStream {
9163 fn is_terminated(&self) -> bool {
9164 self.event_receiver.is_terminated()
9165 }
9166}
9167
9168impl futures::Stream for FileEventStream {
9169 type Item = Result<FileEvent, fidl::Error>;
9170
9171 fn poll_next(
9172 mut self: std::pin::Pin<&mut Self>,
9173 cx: &mut std::task::Context<'_>,
9174 ) -> std::task::Poll<Option<Self::Item>> {
9175 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
9176 &mut self.event_receiver,
9177 cx
9178 )?) {
9179 Some(buf) => std::task::Poll::Ready(Some(FileEvent::decode(buf))),
9180 None => std::task::Poll::Ready(None),
9181 }
9182 }
9183}
9184
9185#[derive(Debug)]
9186pub enum FileEvent {
9187 OnOpen_ {
9188 s: i32,
9189 info: Option<Box<NodeInfoDeprecated>>,
9190 },
9191 OnRepresentation {
9192 payload: Representation,
9193 },
9194 #[non_exhaustive]
9195 _UnknownEvent {
9196 ordinal: u64,
9198 },
9199}
9200
9201impl FileEvent {
9202 #[allow(irrefutable_let_patterns)]
9203 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
9204 if let FileEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
9205 }
9206 #[allow(irrefutable_let_patterns)]
9207 pub fn into_on_representation(self) -> Option<Representation> {
9208 if let FileEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
9209 }
9210
9211 fn decode(
9213 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
9214 ) -> Result<FileEvent, fidl::Error> {
9215 let (bytes, _handles) = buf.split_mut();
9216 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9217 debug_assert_eq!(tx_header.tx_id, 0);
9218 match tx_header.ordinal {
9219 0x7fc7bbb1dbfd1972 => {
9220 let mut out = fidl::new_empty!(
9221 NodeOnOpenRequest,
9222 fidl::encoding::DefaultFuchsiaResourceDialect
9223 );
9224 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
9225 Ok((FileEvent::OnOpen_ { s: out.s, info: out.info }))
9226 }
9227 0x5cb40567d80a510c => {
9228 let mut out =
9229 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
9230 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
9231 Ok((FileEvent::OnRepresentation { payload: out }))
9232 }
9233 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
9234 Ok(FileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
9235 }
9236 _ => Err(fidl::Error::UnknownOrdinal {
9237 ordinal: tx_header.ordinal,
9238 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9239 }),
9240 }
9241 }
9242}
9243
9244pub struct FileRequestStream {
9246 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9247 is_terminated: bool,
9248}
9249
9250impl std::marker::Unpin for FileRequestStream {}
9251
9252impl futures::stream::FusedStream for FileRequestStream {
9253 fn is_terminated(&self) -> bool {
9254 self.is_terminated
9255 }
9256}
9257
9258impl fidl::endpoints::RequestStream for FileRequestStream {
9259 type Protocol = FileMarker;
9260 type ControlHandle = FileControlHandle;
9261
9262 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
9263 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
9264 }
9265
9266 fn control_handle(&self) -> Self::ControlHandle {
9267 FileControlHandle { inner: self.inner.clone() }
9268 }
9269
9270 fn into_inner(
9271 self,
9272 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
9273 {
9274 (self.inner, self.is_terminated)
9275 }
9276
9277 fn from_inner(
9278 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
9279 is_terminated: bool,
9280 ) -> Self {
9281 Self { inner, is_terminated }
9282 }
9283}
9284
9285impl futures::Stream for FileRequestStream {
9286 type Item = Result<FileRequest, fidl::Error>;
9287
9288 fn poll_next(
9289 mut self: std::pin::Pin<&mut Self>,
9290 cx: &mut std::task::Context<'_>,
9291 ) -> std::task::Poll<Option<Self::Item>> {
9292 let this = &mut *self;
9293 if this.inner.check_shutdown(cx) {
9294 this.is_terminated = true;
9295 return std::task::Poll::Ready(None);
9296 }
9297 if this.is_terminated {
9298 panic!("polled FileRequestStream after completion");
9299 }
9300 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
9301 |bytes, handles| {
9302 match this.inner.channel().read_etc(cx, bytes, handles) {
9303 std::task::Poll::Ready(Ok(())) => {}
9304 std::task::Poll::Pending => return std::task::Poll::Pending,
9305 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
9306 this.is_terminated = true;
9307 return std::task::Poll::Ready(None);
9308 }
9309 std::task::Poll::Ready(Err(e)) => {
9310 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
9311 e.into(),
9312 ))));
9313 }
9314 }
9315
9316 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
9318
9319 std::task::Poll::Ready(Some(match header.ordinal {
9320 0x6ee9c0ad53ec87aa => {
9321 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9322 let mut req = fidl::new_empty!(
9323 AdvisoryLockingAdvisoryLockRequest,
9324 fidl::encoding::DefaultFuchsiaResourceDialect
9325 );
9326 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<AdvisoryLockingAdvisoryLockRequest>(&header, _body_bytes, handles, &mut req)?;
9327 let control_handle = FileControlHandle { inner: this.inner.clone() };
9328 Ok(FileRequest::AdvisoryLock {
9329 request: req.request,
9330
9331 responder: FileAdvisoryLockResponder {
9332 control_handle: std::mem::ManuallyDrop::new(control_handle),
9333 tx_id: header.tx_id,
9334 },
9335 })
9336 }
9337 0x54f3949246a03e74 => {
9338 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9339 let mut req = fidl::new_empty!(
9340 LinkableLinkIntoRequest,
9341 fidl::encoding::DefaultFuchsiaResourceDialect
9342 );
9343 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
9344 let control_handle = FileControlHandle { inner: this.inner.clone() };
9345 Ok(FileRequest::LinkInto {
9346 dst_parent_token: req.dst_parent_token,
9347 dst: req.dst,
9348
9349 responder: FileLinkIntoResponder {
9350 control_handle: std::mem::ManuallyDrop::new(control_handle),
9351 tx_id: header.tx_id,
9352 },
9353 })
9354 }
9355 0x20d8a7aba2168a79 => {
9356 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9357 let mut req = fidl::new_empty!(
9358 fidl_fuchsia_unknown::CloneableCloneRequest,
9359 fidl::encoding::DefaultFuchsiaResourceDialect
9360 );
9361 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
9362 let control_handle = FileControlHandle { inner: this.inner.clone() };
9363 Ok(FileRequest::Clone { request: req.request, control_handle })
9364 }
9365 0x5ac5d459ad7f657e => {
9366 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9367 let mut req = fidl::new_empty!(
9368 fidl::encoding::EmptyPayload,
9369 fidl::encoding::DefaultFuchsiaResourceDialect
9370 );
9371 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9372 let control_handle = FileControlHandle { inner: this.inner.clone() };
9373 Ok(FileRequest::Close {
9374 responder: FileCloseResponder {
9375 control_handle: std::mem::ManuallyDrop::new(control_handle),
9376 tx_id: header.tx_id,
9377 },
9378 })
9379 }
9380 0x2658edee9decfc06 => {
9381 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9382 let mut req = fidl::new_empty!(
9383 fidl::encoding::EmptyPayload,
9384 fidl::encoding::DefaultFuchsiaResourceDialect
9385 );
9386 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9387 let control_handle = FileControlHandle { inner: this.inner.clone() };
9388 Ok(FileRequest::Query {
9389 responder: FileQueryResponder {
9390 control_handle: std::mem::ManuallyDrop::new(control_handle),
9391 tx_id: header.tx_id,
9392 },
9393 })
9394 }
9395 0x5a61678f293ce16f => {
9396 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9397 let mut req = fidl::new_empty!(
9398 NodeDeprecatedCloneRequest,
9399 fidl::encoding::DefaultFuchsiaResourceDialect
9400 );
9401 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
9402 let control_handle = FileControlHandle { inner: this.inner.clone() };
9403 Ok(FileRequest::DeprecatedClone {
9404 flags: req.flags,
9405 object: req.object,
9406
9407 control_handle,
9408 })
9409 }
9410 0x78985e216314dafd => {
9411 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9412 let mut req = fidl::new_empty!(
9413 fidl::encoding::EmptyPayload,
9414 fidl::encoding::DefaultFuchsiaResourceDialect
9415 );
9416 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9417 let control_handle = FileControlHandle { inner: this.inner.clone() };
9418 Ok(FileRequest::DeprecatedGetAttr {
9419 responder: FileDeprecatedGetAttrResponder {
9420 control_handle: std::mem::ManuallyDrop::new(control_handle),
9421 tx_id: header.tx_id,
9422 },
9423 })
9424 }
9425 0x4186c0f40d938f46 => {
9426 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9427 let mut req = fidl::new_empty!(
9428 NodeDeprecatedSetAttrRequest,
9429 fidl::encoding::DefaultFuchsiaResourceDialect
9430 );
9431 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
9432 let control_handle = FileControlHandle { inner: this.inner.clone() };
9433 Ok(FileRequest::DeprecatedSetAttr {
9434 flags: req.flags,
9435 attributes: req.attributes,
9436
9437 responder: FileDeprecatedSetAttrResponder {
9438 control_handle: std::mem::ManuallyDrop::new(control_handle),
9439 tx_id: header.tx_id,
9440 },
9441 })
9442 }
9443 0x5b88fffb8eda3aa1 => {
9444 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9445 let mut req = fidl::new_empty!(
9446 fidl::encoding::EmptyPayload,
9447 fidl::encoding::DefaultFuchsiaResourceDialect
9448 );
9449 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9450 let control_handle = FileControlHandle { inner: this.inner.clone() };
9451 Ok(FileRequest::DeprecatedGetFlags {
9452 responder: FileDeprecatedGetFlagsResponder {
9453 control_handle: std::mem::ManuallyDrop::new(control_handle),
9454 tx_id: header.tx_id,
9455 },
9456 })
9457 }
9458 0x5295b76c71fde733 => {
9459 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9460 let mut req = fidl::new_empty!(
9461 NodeDeprecatedSetFlagsRequest,
9462 fidl::encoding::DefaultFuchsiaResourceDialect
9463 );
9464 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9465 let control_handle = FileControlHandle { inner: this.inner.clone() };
9466 Ok(FileRequest::DeprecatedSetFlags {
9467 flags: req.flags,
9468
9469 responder: FileDeprecatedSetFlagsResponder {
9470 control_handle: std::mem::ManuallyDrop::new(control_handle),
9471 tx_id: header.tx_id,
9472 },
9473 })
9474 }
9475 0x176eb318f64ec23 => {
9476 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9477 let mut req = fidl::new_empty!(
9478 fidl::encoding::EmptyPayload,
9479 fidl::encoding::DefaultFuchsiaResourceDialect
9480 );
9481 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9482 let control_handle = FileControlHandle { inner: this.inner.clone() };
9483 Ok(FileRequest::GetFlags {
9484 responder: FileGetFlagsResponder {
9485 control_handle: std::mem::ManuallyDrop::new(control_handle),
9486 tx_id: header.tx_id,
9487 },
9488 })
9489 }
9490 0x55a8028685791ea8 => {
9491 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9492 let mut req = fidl::new_empty!(
9493 NodeSetFlagsRequest,
9494 fidl::encoding::DefaultFuchsiaResourceDialect
9495 );
9496 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
9497 let control_handle = FileControlHandle { inner: this.inner.clone() };
9498 Ok(FileRequest::SetFlags {
9499 flags: req.flags,
9500
9501 responder: FileSetFlagsResponder {
9502 control_handle: std::mem::ManuallyDrop::new(control_handle),
9503 tx_id: header.tx_id,
9504 },
9505 })
9506 }
9507 0x6f344a1c6b0a0610 => {
9508 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9509 let mut req = fidl::new_empty!(
9510 fidl::encoding::EmptyPayload,
9511 fidl::encoding::DefaultFuchsiaResourceDialect
9512 );
9513 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9514 let control_handle = FileControlHandle { inner: this.inner.clone() };
9515 Ok(FileRequest::QueryFilesystem {
9516 responder: FileQueryFilesystemResponder {
9517 control_handle: std::mem::ManuallyDrop::new(control_handle),
9518 tx_id: header.tx_id,
9519 },
9520 })
9521 }
9522 0x3d4396a638ea053b => {
9523 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9524 let mut req = fidl::new_empty!(
9525 NodeGetAttributesRequest,
9526 fidl::encoding::DefaultFuchsiaResourceDialect
9527 );
9528 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9529 let control_handle = FileControlHandle { inner: this.inner.clone() };
9530 Ok(FileRequest::GetAttributes {
9531 query: req.query,
9532
9533 responder: FileGetAttributesResponder {
9534 control_handle: std::mem::ManuallyDrop::new(control_handle),
9535 tx_id: header.tx_id,
9536 },
9537 })
9538 }
9539 0x3308c1da5a89bf08 => {
9540 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9541 let mut req = fidl::new_empty!(
9542 MutableNodeAttributes,
9543 fidl::encoding::DefaultFuchsiaResourceDialect
9544 );
9545 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
9546 let control_handle = FileControlHandle { inner: this.inner.clone() };
9547 Ok(FileRequest::UpdateAttributes {
9548 payload: req,
9549 responder: FileUpdateAttributesResponder {
9550 control_handle: std::mem::ManuallyDrop::new(control_handle),
9551 tx_id: header.tx_id,
9552 },
9553 })
9554 }
9555 0x2c5c27ca0ab5dc49 => {
9556 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9557 let mut req = fidl::new_empty!(
9558 fidl::encoding::EmptyPayload,
9559 fidl::encoding::DefaultFuchsiaResourceDialect
9560 );
9561 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9562 let control_handle = FileControlHandle { inner: this.inner.clone() };
9563 Ok(FileRequest::Sync {
9564 responder: FileSyncResponder {
9565 control_handle: std::mem::ManuallyDrop::new(control_handle),
9566 tx_id: header.tx_id,
9567 },
9568 })
9569 }
9570 0x4b61033de007fcd0 => {
9571 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
9572 let mut req = fidl::new_empty!(
9573 NodeListExtendedAttributesRequest,
9574 fidl::encoding::DefaultFuchsiaResourceDialect
9575 );
9576 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
9577 let control_handle = FileControlHandle { inner: this.inner.clone() };
9578 Ok(FileRequest::ListExtendedAttributes {
9579 iterator: req.iterator,
9580
9581 control_handle,
9582 })
9583 }
9584 0x45ffa3ccfdeb76db => {
9585 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9586 let mut req = fidl::new_empty!(
9587 NodeGetExtendedAttributeRequest,
9588 fidl::encoding::DefaultFuchsiaResourceDialect
9589 );
9590 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9591 let control_handle = FileControlHandle { inner: this.inner.clone() };
9592 Ok(FileRequest::GetExtendedAttribute {
9593 name: req.name,
9594
9595 responder: FileGetExtendedAttributeResponder {
9596 control_handle: std::mem::ManuallyDrop::new(control_handle),
9597 tx_id: header.tx_id,
9598 },
9599 })
9600 }
9601 0x4a951362f681f23c => {
9602 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9603 let mut req = fidl::new_empty!(
9604 NodeSetExtendedAttributeRequest,
9605 fidl::encoding::DefaultFuchsiaResourceDialect
9606 );
9607 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9608 let control_handle = FileControlHandle { inner: this.inner.clone() };
9609 Ok(FileRequest::SetExtendedAttribute {
9610 name: req.name,
9611 value: req.value,
9612 mode: req.mode,
9613
9614 responder: FileSetExtendedAttributeResponder {
9615 control_handle: std::mem::ManuallyDrop::new(control_handle),
9616 tx_id: header.tx_id,
9617 },
9618 })
9619 }
9620 0x7a0b9f3a9bf9032d => {
9621 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9622 let mut req = fidl::new_empty!(
9623 NodeRemoveExtendedAttributeRequest,
9624 fidl::encoding::DefaultFuchsiaResourceDialect
9625 );
9626 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
9627 let control_handle = FileControlHandle { inner: this.inner.clone() };
9628 Ok(FileRequest::RemoveExtendedAttribute {
9629 name: req.name,
9630
9631 responder: FileRemoveExtendedAttributeResponder {
9632 control_handle: std::mem::ManuallyDrop::new(control_handle),
9633 tx_id: header.tx_id,
9634 },
9635 })
9636 }
9637 0x57e419a298c8ede => {
9638 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9639 let mut req = fidl::new_empty!(
9640 ReadableReadRequest,
9641 fidl::encoding::DefaultFuchsiaResourceDialect
9642 );
9643 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
9644 let control_handle = FileControlHandle { inner: this.inner.clone() };
9645 Ok(FileRequest::Read {
9646 count: req.count,
9647
9648 responder: FileReadResponder {
9649 control_handle: std::mem::ManuallyDrop::new(control_handle),
9650 tx_id: header.tx_id,
9651 },
9652 })
9653 }
9654 0x6a31437832469f82 => {
9655 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9656 let mut req = fidl::new_empty!(
9657 WritableWriteRequest,
9658 fidl::encoding::DefaultFuchsiaResourceDialect
9659 );
9660 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
9661 let control_handle = FileControlHandle { inner: this.inner.clone() };
9662 Ok(FileRequest::Write {
9663 data: req.data,
9664
9665 responder: FileWriteResponder {
9666 control_handle: std::mem::ManuallyDrop::new(control_handle),
9667 tx_id: header.tx_id,
9668 },
9669 })
9670 }
9671 0x68b5ac00c62906bc => {
9672 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9673 let mut req = fidl::new_empty!(
9674 fidl::encoding::EmptyPayload,
9675 fidl::encoding::DefaultFuchsiaResourceDialect
9676 );
9677 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
9678 let control_handle = FileControlHandle { inner: this.inner.clone() };
9679 Ok(FileRequest::Describe {
9680 responder: FileDescribeResponder {
9681 control_handle: std::mem::ManuallyDrop::new(control_handle),
9682 tx_id: header.tx_id,
9683 },
9684 })
9685 }
9686 0x78079168162c5207 => {
9687 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9688 let mut req = fidl::new_empty!(
9689 FileSeekRequest,
9690 fidl::encoding::DefaultFuchsiaResourceDialect
9691 );
9692 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileSeekRequest>(&header, _body_bytes, handles, &mut req)?;
9693 let control_handle = FileControlHandle { inner: this.inner.clone() };
9694 Ok(FileRequest::Seek {
9695 origin: req.origin,
9696 offset: req.offset,
9697
9698 responder: FileSeekResponder {
9699 control_handle: std::mem::ManuallyDrop::new(control_handle),
9700 tx_id: header.tx_id,
9701 },
9702 })
9703 }
9704 0x1607a293a60d723e => {
9705 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9706 let mut req = fidl::new_empty!(
9707 FileReadAtRequest,
9708 fidl::encoding::DefaultFuchsiaResourceDialect
9709 );
9710 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileReadAtRequest>(&header, _body_bytes, handles, &mut req)?;
9711 let control_handle = FileControlHandle { inner: this.inner.clone() };
9712 Ok(FileRequest::ReadAt {
9713 count: req.count,
9714 offset: req.offset,
9715
9716 responder: FileReadAtResponder {
9717 control_handle: std::mem::ManuallyDrop::new(control_handle),
9718 tx_id: header.tx_id,
9719 },
9720 })
9721 }
9722 0x793eefc0045e792b => {
9723 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9724 let mut req = fidl::new_empty!(
9725 FileWriteAtRequest,
9726 fidl::encoding::DefaultFuchsiaResourceDialect
9727 );
9728 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileWriteAtRequest>(&header, _body_bytes, handles, &mut req)?;
9729 let control_handle = FileControlHandle { inner: this.inner.clone() };
9730 Ok(FileRequest::WriteAt {
9731 data: req.data,
9732 offset: req.offset,
9733
9734 responder: FileWriteAtResponder {
9735 control_handle: std::mem::ManuallyDrop::new(control_handle),
9736 tx_id: header.tx_id,
9737 },
9738 })
9739 }
9740 0x2b80825f0535743a => {
9741 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9742 let mut req = fidl::new_empty!(
9743 FileResizeRequest,
9744 fidl::encoding::DefaultFuchsiaResourceDialect
9745 );
9746 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileResizeRequest>(&header, _body_bytes, handles, &mut req)?;
9747 let control_handle = FileControlHandle { inner: this.inner.clone() };
9748 Ok(FileRequest::Resize {
9749 length: req.length,
9750
9751 responder: FileResizeResponder {
9752 control_handle: std::mem::ManuallyDrop::new(control_handle),
9753 tx_id: header.tx_id,
9754 },
9755 })
9756 }
9757 0xa6a9e654cbf62b => {
9758 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9759 let mut req = fidl::new_empty!(
9760 FileGetBackingMemoryRequest,
9761 fidl::encoding::DefaultFuchsiaResourceDialect
9762 );
9763 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileGetBackingMemoryRequest>(&header, _body_bytes, handles, &mut req)?;
9764 let control_handle = FileControlHandle { inner: this.inner.clone() };
9765 Ok(FileRequest::GetBackingMemory {
9766 flags: req.flags,
9767
9768 responder: FileGetBackingMemoryResponder {
9769 control_handle: std::mem::ManuallyDrop::new(control_handle),
9770 tx_id: header.tx_id,
9771 },
9772 })
9773 }
9774 0x77fa0c330b57fd2e => {
9775 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9776 let mut req = fidl::new_empty!(
9777 FileAllocateRequest,
9778 fidl::encoding::DefaultFuchsiaResourceDialect
9779 );
9780 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileAllocateRequest>(&header, _body_bytes, handles, &mut req)?;
9781 let control_handle = FileControlHandle { inner: this.inner.clone() };
9782 Ok(FileRequest::Allocate {
9783 offset: req.offset,
9784 length: req.length,
9785 mode: req.mode,
9786
9787 responder: FileAllocateResponder {
9788 control_handle: std::mem::ManuallyDrop::new(control_handle),
9789 tx_id: header.tx_id,
9790 },
9791 })
9792 }
9793 0x2c421ec3faaeb8bb => {
9794 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
9795 let mut req = fidl::new_empty!(
9796 FileEnableVerityRequest,
9797 fidl::encoding::DefaultFuchsiaResourceDialect
9798 );
9799 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FileEnableVerityRequest>(&header, _body_bytes, handles, &mut req)?;
9800 let control_handle = FileControlHandle { inner: this.inner.clone() };
9801 Ok(FileRequest::EnableVerity {
9802 options: req.options,
9803
9804 responder: FileEnableVerityResponder {
9805 control_handle: std::mem::ManuallyDrop::new(control_handle),
9806 tx_id: header.tx_id,
9807 },
9808 })
9809 }
9810 _ if header.tx_id == 0
9811 && header
9812 .dynamic_flags()
9813 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9814 {
9815 Ok(FileRequest::_UnknownMethod {
9816 ordinal: header.ordinal,
9817 control_handle: FileControlHandle { inner: this.inner.clone() },
9818 method_type: fidl::MethodType::OneWay,
9819 })
9820 }
9821 _ if header
9822 .dynamic_flags()
9823 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
9824 {
9825 this.inner.send_framework_err(
9826 fidl::encoding::FrameworkErr::UnknownMethod,
9827 header.tx_id,
9828 header.ordinal,
9829 header.dynamic_flags(),
9830 (bytes, handles),
9831 )?;
9832 Ok(FileRequest::_UnknownMethod {
9833 ordinal: header.ordinal,
9834 control_handle: FileControlHandle { inner: this.inner.clone() },
9835 method_type: fidl::MethodType::TwoWay,
9836 })
9837 }
9838 _ => Err(fidl::Error::UnknownOrdinal {
9839 ordinal: header.ordinal,
9840 protocol_name: <FileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
9841 }),
9842 }))
9843 },
9844 )
9845 }
9846}
9847
9848#[derive(Debug)]
9853pub enum FileRequest {
9854 AdvisoryLock {
9878 request: AdvisoryLockRequest,
9879 responder: FileAdvisoryLockResponder,
9880 },
9881 LinkInto {
9904 dst_parent_token: fidl::Event,
9905 dst: String,
9906 responder: FileLinkIntoResponder,
9907 },
9908 Clone {
9909 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
9910 control_handle: FileControlHandle,
9911 },
9912 Close {
9923 responder: FileCloseResponder,
9924 },
9925 Query {
9926 responder: FileQueryResponder,
9927 },
9928 DeprecatedClone {
9930 flags: OpenFlags,
9931 object: fidl::endpoints::ServerEnd<NodeMarker>,
9932 control_handle: FileControlHandle,
9933 },
9934 DeprecatedGetAttr {
9938 responder: FileDeprecatedGetAttrResponder,
9939 },
9940 DeprecatedSetAttr {
9942 flags: NodeAttributeFlags,
9943 attributes: NodeAttributes,
9944 responder: FileDeprecatedSetAttrResponder,
9945 },
9946 DeprecatedGetFlags {
9948 responder: FileDeprecatedGetFlagsResponder,
9949 },
9950 DeprecatedSetFlags {
9952 flags: OpenFlags,
9953 responder: FileDeprecatedSetFlagsResponder,
9954 },
9955 GetFlags {
9964 responder: FileGetFlagsResponder,
9965 },
9966 SetFlags {
9976 flags: Flags,
9977 responder: FileSetFlagsResponder,
9978 },
9979 QueryFilesystem {
9983 responder: FileQueryFilesystemResponder,
9984 },
9985 GetAttributes {
9999 query: NodeAttributesQuery,
10000 responder: FileGetAttributesResponder,
10001 },
10002 UpdateAttributes {
10011 payload: MutableNodeAttributes,
10012 responder: FileUpdateAttributesResponder,
10013 },
10014 Sync {
10024 responder: FileSyncResponder,
10025 },
10026 ListExtendedAttributes {
10035 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
10036 control_handle: FileControlHandle,
10037 },
10038 GetExtendedAttribute {
10045 name: Vec<u8>,
10046 responder: FileGetExtendedAttributeResponder,
10047 },
10048 SetExtendedAttribute {
10056 name: Vec<u8>,
10057 value: ExtendedAttributeValue,
10058 mode: SetExtendedAttributeMode,
10059 responder: FileSetExtendedAttributeResponder,
10060 },
10061 RemoveExtendedAttribute {
10067 name: Vec<u8>,
10068 responder: FileRemoveExtendedAttributeResponder,
10069 },
10070 Read {
10089 count: u64,
10090 responder: FileReadResponder,
10091 },
10092 Write {
10116 data: Vec<u8>,
10117 responder: FileWriteResponder,
10118 },
10119 Describe {
10120 responder: FileDescribeResponder,
10121 },
10122 Seek {
10132 origin: SeekOrigin,
10133 offset: i64,
10134 responder: FileSeekResponder,
10135 },
10136 ReadAt {
10154 count: u64,
10155 offset: u64,
10156 responder: FileReadAtResponder,
10157 },
10158 WriteAt {
10180 data: Vec<u8>,
10181 offset: u64,
10182 responder: FileWriteAtResponder,
10183 },
10184 Resize {
10193 length: u64,
10194 responder: FileResizeResponder,
10195 },
10196 GetBackingMemory {
10217 flags: VmoFlags,
10218 responder: FileGetBackingMemoryResponder,
10219 },
10220 Allocate {
10222 offset: u64,
10223 length: u64,
10224 mode: AllocateMode,
10225 responder: FileAllocateResponder,
10226 },
10227 EnableVerity {
10239 options: VerificationOptions,
10240 responder: FileEnableVerityResponder,
10241 },
10242 #[non_exhaustive]
10244 _UnknownMethod {
10245 ordinal: u64,
10247 control_handle: FileControlHandle,
10248 method_type: fidl::MethodType,
10249 },
10250}
10251
10252impl FileRequest {
10253 #[allow(irrefutable_let_patterns)]
10254 pub fn into_advisory_lock(self) -> Option<(AdvisoryLockRequest, FileAdvisoryLockResponder)> {
10255 if let FileRequest::AdvisoryLock { request, responder } = self {
10256 Some((request, responder))
10257 } else {
10258 None
10259 }
10260 }
10261
10262 #[allow(irrefutable_let_patterns)]
10263 pub fn into_link_into(self) -> Option<(fidl::Event, String, FileLinkIntoResponder)> {
10264 if let FileRequest::LinkInto { dst_parent_token, dst, responder } = self {
10265 Some((dst_parent_token, dst, responder))
10266 } else {
10267 None
10268 }
10269 }
10270
10271 #[allow(irrefutable_let_patterns)]
10272 pub fn into_clone(
10273 self,
10274 ) -> Option<(
10275 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
10276 FileControlHandle,
10277 )> {
10278 if let FileRequest::Clone { request, control_handle } = self {
10279 Some((request, control_handle))
10280 } else {
10281 None
10282 }
10283 }
10284
10285 #[allow(irrefutable_let_patterns)]
10286 pub fn into_close(self) -> Option<(FileCloseResponder)> {
10287 if let FileRequest::Close { responder } = self { Some((responder)) } else { None }
10288 }
10289
10290 #[allow(irrefutable_let_patterns)]
10291 pub fn into_query(self) -> Option<(FileQueryResponder)> {
10292 if let FileRequest::Query { responder } = self { Some((responder)) } else { None }
10293 }
10294
10295 #[allow(irrefutable_let_patterns)]
10296 pub fn into_deprecated_clone(
10297 self,
10298 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, FileControlHandle)> {
10299 if let FileRequest::DeprecatedClone { flags, object, control_handle } = self {
10300 Some((flags, object, control_handle))
10301 } else {
10302 None
10303 }
10304 }
10305
10306 #[allow(irrefutable_let_patterns)]
10307 pub fn into_deprecated_get_attr(self) -> Option<(FileDeprecatedGetAttrResponder)> {
10308 if let FileRequest::DeprecatedGetAttr { responder } = self {
10309 Some((responder))
10310 } else {
10311 None
10312 }
10313 }
10314
10315 #[allow(irrefutable_let_patterns)]
10316 pub fn into_deprecated_set_attr(
10317 self,
10318 ) -> Option<(NodeAttributeFlags, NodeAttributes, FileDeprecatedSetAttrResponder)> {
10319 if let FileRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
10320 Some((flags, attributes, responder))
10321 } else {
10322 None
10323 }
10324 }
10325
10326 #[allow(irrefutable_let_patterns)]
10327 pub fn into_deprecated_get_flags(self) -> Option<(FileDeprecatedGetFlagsResponder)> {
10328 if let FileRequest::DeprecatedGetFlags { responder } = self {
10329 Some((responder))
10330 } else {
10331 None
10332 }
10333 }
10334
10335 #[allow(irrefutable_let_patterns)]
10336 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, FileDeprecatedSetFlagsResponder)> {
10337 if let FileRequest::DeprecatedSetFlags { flags, responder } = self {
10338 Some((flags, responder))
10339 } else {
10340 None
10341 }
10342 }
10343
10344 #[allow(irrefutable_let_patterns)]
10345 pub fn into_get_flags(self) -> Option<(FileGetFlagsResponder)> {
10346 if let FileRequest::GetFlags { responder } = self { Some((responder)) } else { None }
10347 }
10348
10349 #[allow(irrefutable_let_patterns)]
10350 pub fn into_set_flags(self) -> Option<(Flags, FileSetFlagsResponder)> {
10351 if let FileRequest::SetFlags { flags, responder } = self {
10352 Some((flags, responder))
10353 } else {
10354 None
10355 }
10356 }
10357
10358 #[allow(irrefutable_let_patterns)]
10359 pub fn into_query_filesystem(self) -> Option<(FileQueryFilesystemResponder)> {
10360 if let FileRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
10361 }
10362
10363 #[allow(irrefutable_let_patterns)]
10364 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, FileGetAttributesResponder)> {
10365 if let FileRequest::GetAttributes { query, responder } = self {
10366 Some((query, responder))
10367 } else {
10368 None
10369 }
10370 }
10371
10372 #[allow(irrefutable_let_patterns)]
10373 pub fn into_update_attributes(
10374 self,
10375 ) -> Option<(MutableNodeAttributes, FileUpdateAttributesResponder)> {
10376 if let FileRequest::UpdateAttributes { payload, responder } = self {
10377 Some((payload, responder))
10378 } else {
10379 None
10380 }
10381 }
10382
10383 #[allow(irrefutable_let_patterns)]
10384 pub fn into_sync(self) -> Option<(FileSyncResponder)> {
10385 if let FileRequest::Sync { responder } = self { Some((responder)) } else { None }
10386 }
10387
10388 #[allow(irrefutable_let_patterns)]
10389 pub fn into_list_extended_attributes(
10390 self,
10391 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, FileControlHandle)>
10392 {
10393 if let FileRequest::ListExtendedAttributes { iterator, control_handle } = self {
10394 Some((iterator, control_handle))
10395 } else {
10396 None
10397 }
10398 }
10399
10400 #[allow(irrefutable_let_patterns)]
10401 pub fn into_get_extended_attribute(
10402 self,
10403 ) -> Option<(Vec<u8>, FileGetExtendedAttributeResponder)> {
10404 if let FileRequest::GetExtendedAttribute { name, responder } = self {
10405 Some((name, responder))
10406 } else {
10407 None
10408 }
10409 }
10410
10411 #[allow(irrefutable_let_patterns)]
10412 pub fn into_set_extended_attribute(
10413 self,
10414 ) -> Option<(
10415 Vec<u8>,
10416 ExtendedAttributeValue,
10417 SetExtendedAttributeMode,
10418 FileSetExtendedAttributeResponder,
10419 )> {
10420 if let FileRequest::SetExtendedAttribute { name, value, mode, responder } = self {
10421 Some((name, value, mode, responder))
10422 } else {
10423 None
10424 }
10425 }
10426
10427 #[allow(irrefutable_let_patterns)]
10428 pub fn into_remove_extended_attribute(
10429 self,
10430 ) -> Option<(Vec<u8>, FileRemoveExtendedAttributeResponder)> {
10431 if let FileRequest::RemoveExtendedAttribute { name, responder } = self {
10432 Some((name, responder))
10433 } else {
10434 None
10435 }
10436 }
10437
10438 #[allow(irrefutable_let_patterns)]
10439 pub fn into_read(self) -> Option<(u64, FileReadResponder)> {
10440 if let FileRequest::Read { count, responder } = self {
10441 Some((count, responder))
10442 } else {
10443 None
10444 }
10445 }
10446
10447 #[allow(irrefutable_let_patterns)]
10448 pub fn into_write(self) -> Option<(Vec<u8>, FileWriteResponder)> {
10449 if let FileRequest::Write { data, responder } = self {
10450 Some((data, responder))
10451 } else {
10452 None
10453 }
10454 }
10455
10456 #[allow(irrefutable_let_patterns)]
10457 pub fn into_describe(self) -> Option<(FileDescribeResponder)> {
10458 if let FileRequest::Describe { responder } = self { Some((responder)) } else { None }
10459 }
10460
10461 #[allow(irrefutable_let_patterns)]
10462 pub fn into_seek(self) -> Option<(SeekOrigin, i64, FileSeekResponder)> {
10463 if let FileRequest::Seek { origin, offset, responder } = self {
10464 Some((origin, offset, responder))
10465 } else {
10466 None
10467 }
10468 }
10469
10470 #[allow(irrefutable_let_patterns)]
10471 pub fn into_read_at(self) -> Option<(u64, u64, FileReadAtResponder)> {
10472 if let FileRequest::ReadAt { count, offset, responder } = self {
10473 Some((count, offset, responder))
10474 } else {
10475 None
10476 }
10477 }
10478
10479 #[allow(irrefutable_let_patterns)]
10480 pub fn into_write_at(self) -> Option<(Vec<u8>, u64, FileWriteAtResponder)> {
10481 if let FileRequest::WriteAt { data, offset, responder } = self {
10482 Some((data, offset, responder))
10483 } else {
10484 None
10485 }
10486 }
10487
10488 #[allow(irrefutable_let_patterns)]
10489 pub fn into_resize(self) -> Option<(u64, FileResizeResponder)> {
10490 if let FileRequest::Resize { length, responder } = self {
10491 Some((length, responder))
10492 } else {
10493 None
10494 }
10495 }
10496
10497 #[allow(irrefutable_let_patterns)]
10498 pub fn into_get_backing_memory(self) -> Option<(VmoFlags, FileGetBackingMemoryResponder)> {
10499 if let FileRequest::GetBackingMemory { flags, responder } = self {
10500 Some((flags, responder))
10501 } else {
10502 None
10503 }
10504 }
10505
10506 #[allow(irrefutable_let_patterns)]
10507 pub fn into_allocate(self) -> Option<(u64, u64, AllocateMode, FileAllocateResponder)> {
10508 if let FileRequest::Allocate { offset, length, mode, responder } = self {
10509 Some((offset, length, mode, responder))
10510 } else {
10511 None
10512 }
10513 }
10514
10515 #[allow(irrefutable_let_patterns)]
10516 pub fn into_enable_verity(self) -> Option<(VerificationOptions, FileEnableVerityResponder)> {
10517 if let FileRequest::EnableVerity { options, responder } = self {
10518 Some((options, responder))
10519 } else {
10520 None
10521 }
10522 }
10523
10524 pub fn method_name(&self) -> &'static str {
10526 match *self {
10527 FileRequest::AdvisoryLock { .. } => "advisory_lock",
10528 FileRequest::LinkInto { .. } => "link_into",
10529 FileRequest::Clone { .. } => "clone",
10530 FileRequest::Close { .. } => "close",
10531 FileRequest::Query { .. } => "query",
10532 FileRequest::DeprecatedClone { .. } => "deprecated_clone",
10533 FileRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
10534 FileRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
10535 FileRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
10536 FileRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
10537 FileRequest::GetFlags { .. } => "get_flags",
10538 FileRequest::SetFlags { .. } => "set_flags",
10539 FileRequest::QueryFilesystem { .. } => "query_filesystem",
10540 FileRequest::GetAttributes { .. } => "get_attributes",
10541 FileRequest::UpdateAttributes { .. } => "update_attributes",
10542 FileRequest::Sync { .. } => "sync",
10543 FileRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
10544 FileRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
10545 FileRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
10546 FileRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
10547 FileRequest::Read { .. } => "read",
10548 FileRequest::Write { .. } => "write",
10549 FileRequest::Describe { .. } => "describe",
10550 FileRequest::Seek { .. } => "seek",
10551 FileRequest::ReadAt { .. } => "read_at",
10552 FileRequest::WriteAt { .. } => "write_at",
10553 FileRequest::Resize { .. } => "resize",
10554 FileRequest::GetBackingMemory { .. } => "get_backing_memory",
10555 FileRequest::Allocate { .. } => "allocate",
10556 FileRequest::EnableVerity { .. } => "enable_verity",
10557 FileRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
10558 "unknown one-way method"
10559 }
10560 FileRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
10561 "unknown two-way method"
10562 }
10563 }
10564 }
10565}
10566
10567#[derive(Debug, Clone)]
10568pub struct FileControlHandle {
10569 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
10570}
10571
10572impl FileControlHandle {
10573 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
10574 self.inner.shutdown_with_epitaph(status.into())
10575 }
10576}
10577
10578impl fidl::endpoints::ControlHandle for FileControlHandle {
10579 fn shutdown(&self) {
10580 self.inner.shutdown()
10581 }
10582
10583 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
10584 self.inner.shutdown_with_epitaph(status)
10585 }
10586
10587 fn is_closed(&self) -> bool {
10588 self.inner.channel().is_closed()
10589 }
10590 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
10591 self.inner.channel().on_closed()
10592 }
10593
10594 #[cfg(target_os = "fuchsia")]
10595 fn signal_peer(
10596 &self,
10597 clear_mask: zx::Signals,
10598 set_mask: zx::Signals,
10599 ) -> Result<(), zx_status::Status> {
10600 use fidl::Peered;
10601 self.inner.channel().signal_peer(clear_mask, set_mask)
10602 }
10603}
10604
10605impl FileControlHandle {
10606 pub fn send_on_open_(
10607 &self,
10608 mut s: i32,
10609 mut info: Option<NodeInfoDeprecated>,
10610 ) -> Result<(), fidl::Error> {
10611 self.inner.send::<NodeOnOpenRequest>(
10612 (s, info.as_mut()),
10613 0,
10614 0x7fc7bbb1dbfd1972,
10615 fidl::encoding::DynamicFlags::FLEXIBLE,
10616 )
10617 }
10618
10619 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
10620 self.inner.send::<Representation>(
10621 &mut payload,
10622 0,
10623 0x5cb40567d80a510c,
10624 fidl::encoding::DynamicFlags::empty(),
10625 )
10626 }
10627}
10628
10629#[must_use = "FIDL methods require a response to be sent"]
10630#[derive(Debug)]
10631pub struct FileAdvisoryLockResponder {
10632 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10633 tx_id: u32,
10634}
10635
10636impl std::ops::Drop for FileAdvisoryLockResponder {
10640 fn drop(&mut self) {
10641 self.control_handle.shutdown();
10642 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10644 }
10645}
10646
10647impl fidl::endpoints::Responder for FileAdvisoryLockResponder {
10648 type ControlHandle = FileControlHandle;
10649
10650 fn control_handle(&self) -> &FileControlHandle {
10651 &self.control_handle
10652 }
10653
10654 fn drop_without_shutdown(mut self) {
10655 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10657 std::mem::forget(self);
10659 }
10660}
10661
10662impl FileAdvisoryLockResponder {
10663 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10667 let _result = self.send_raw(result);
10668 if _result.is_err() {
10669 self.control_handle.shutdown();
10670 }
10671 self.drop_without_shutdown();
10672 _result
10673 }
10674
10675 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10677 let _result = self.send_raw(result);
10678 self.drop_without_shutdown();
10679 _result
10680 }
10681
10682 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10683 self.control_handle
10684 .inner
10685 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10686 result,
10687 self.tx_id,
10688 0x6ee9c0ad53ec87aa,
10689 fidl::encoding::DynamicFlags::empty(),
10690 )
10691 }
10692}
10693
10694#[must_use = "FIDL methods require a response to be sent"]
10695#[derive(Debug)]
10696pub struct FileLinkIntoResponder {
10697 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10698 tx_id: u32,
10699}
10700
10701impl std::ops::Drop for FileLinkIntoResponder {
10705 fn drop(&mut self) {
10706 self.control_handle.shutdown();
10707 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10709 }
10710}
10711
10712impl fidl::endpoints::Responder for FileLinkIntoResponder {
10713 type ControlHandle = FileControlHandle;
10714
10715 fn control_handle(&self) -> &FileControlHandle {
10716 &self.control_handle
10717 }
10718
10719 fn drop_without_shutdown(mut self) {
10720 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10722 std::mem::forget(self);
10724 }
10725}
10726
10727impl FileLinkIntoResponder {
10728 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10732 let _result = self.send_raw(result);
10733 if _result.is_err() {
10734 self.control_handle.shutdown();
10735 }
10736 self.drop_without_shutdown();
10737 _result
10738 }
10739
10740 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10742 let _result = self.send_raw(result);
10743 self.drop_without_shutdown();
10744 _result
10745 }
10746
10747 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10748 self.control_handle
10749 .inner
10750 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10751 result,
10752 self.tx_id,
10753 0x54f3949246a03e74,
10754 fidl::encoding::DynamicFlags::empty(),
10755 )
10756 }
10757}
10758
10759#[must_use = "FIDL methods require a response to be sent"]
10760#[derive(Debug)]
10761pub struct FileCloseResponder {
10762 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10763 tx_id: u32,
10764}
10765
10766impl std::ops::Drop for FileCloseResponder {
10770 fn drop(&mut self) {
10771 self.control_handle.shutdown();
10772 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10774 }
10775}
10776
10777impl fidl::endpoints::Responder for FileCloseResponder {
10778 type ControlHandle = FileControlHandle;
10779
10780 fn control_handle(&self) -> &FileControlHandle {
10781 &self.control_handle
10782 }
10783
10784 fn drop_without_shutdown(mut self) {
10785 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10787 std::mem::forget(self);
10789 }
10790}
10791
10792impl FileCloseResponder {
10793 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10797 let _result = self.send_raw(result);
10798 if _result.is_err() {
10799 self.control_handle.shutdown();
10800 }
10801 self.drop_without_shutdown();
10802 _result
10803 }
10804
10805 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10807 let _result = self.send_raw(result);
10808 self.drop_without_shutdown();
10809 _result
10810 }
10811
10812 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
10813 self.control_handle
10814 .inner
10815 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
10816 result,
10817 self.tx_id,
10818 0x5ac5d459ad7f657e,
10819 fidl::encoding::DynamicFlags::empty(),
10820 )
10821 }
10822}
10823
10824#[must_use = "FIDL methods require a response to be sent"]
10825#[derive(Debug)]
10826pub struct FileQueryResponder {
10827 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10828 tx_id: u32,
10829}
10830
10831impl std::ops::Drop for FileQueryResponder {
10835 fn drop(&mut self) {
10836 self.control_handle.shutdown();
10837 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10839 }
10840}
10841
10842impl fidl::endpoints::Responder for FileQueryResponder {
10843 type ControlHandle = FileControlHandle;
10844
10845 fn control_handle(&self) -> &FileControlHandle {
10846 &self.control_handle
10847 }
10848
10849 fn drop_without_shutdown(mut self) {
10850 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10852 std::mem::forget(self);
10854 }
10855}
10856
10857impl FileQueryResponder {
10858 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10862 let _result = self.send_raw(protocol);
10863 if _result.is_err() {
10864 self.control_handle.shutdown();
10865 }
10866 self.drop_without_shutdown();
10867 _result
10868 }
10869
10870 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10872 let _result = self.send_raw(protocol);
10873 self.drop_without_shutdown();
10874 _result
10875 }
10876
10877 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
10878 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
10879 (protocol,),
10880 self.tx_id,
10881 0x2658edee9decfc06,
10882 fidl::encoding::DynamicFlags::empty(),
10883 )
10884 }
10885}
10886
10887#[must_use = "FIDL methods require a response to be sent"]
10888#[derive(Debug)]
10889pub struct FileDeprecatedGetAttrResponder {
10890 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10891 tx_id: u32,
10892}
10893
10894impl std::ops::Drop for FileDeprecatedGetAttrResponder {
10898 fn drop(&mut self) {
10899 self.control_handle.shutdown();
10900 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10902 }
10903}
10904
10905impl fidl::endpoints::Responder for FileDeprecatedGetAttrResponder {
10906 type ControlHandle = FileControlHandle;
10907
10908 fn control_handle(&self) -> &FileControlHandle {
10909 &self.control_handle
10910 }
10911
10912 fn drop_without_shutdown(mut self) {
10913 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10915 std::mem::forget(self);
10917 }
10918}
10919
10920impl FileDeprecatedGetAttrResponder {
10921 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
10925 let _result = self.send_raw(s, attributes);
10926 if _result.is_err() {
10927 self.control_handle.shutdown();
10928 }
10929 self.drop_without_shutdown();
10930 _result
10931 }
10932
10933 pub fn send_no_shutdown_on_err(
10935 self,
10936 mut s: i32,
10937 mut attributes: &NodeAttributes,
10938 ) -> Result<(), fidl::Error> {
10939 let _result = self.send_raw(s, attributes);
10940 self.drop_without_shutdown();
10941 _result
10942 }
10943
10944 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
10945 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
10946 (s, attributes),
10947 self.tx_id,
10948 0x78985e216314dafd,
10949 fidl::encoding::DynamicFlags::empty(),
10950 )
10951 }
10952}
10953
10954#[must_use = "FIDL methods require a response to be sent"]
10955#[derive(Debug)]
10956pub struct FileDeprecatedSetAttrResponder {
10957 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
10958 tx_id: u32,
10959}
10960
10961impl std::ops::Drop for FileDeprecatedSetAttrResponder {
10965 fn drop(&mut self) {
10966 self.control_handle.shutdown();
10967 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10969 }
10970}
10971
10972impl fidl::endpoints::Responder for FileDeprecatedSetAttrResponder {
10973 type ControlHandle = FileControlHandle;
10974
10975 fn control_handle(&self) -> &FileControlHandle {
10976 &self.control_handle
10977 }
10978
10979 fn drop_without_shutdown(mut self) {
10980 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
10982 std::mem::forget(self);
10984 }
10985}
10986
10987impl FileDeprecatedSetAttrResponder {
10988 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
10992 let _result = self.send_raw(s);
10993 if _result.is_err() {
10994 self.control_handle.shutdown();
10995 }
10996 self.drop_without_shutdown();
10997 _result
10998 }
10999
11000 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
11002 let _result = self.send_raw(s);
11003 self.drop_without_shutdown();
11004 _result
11005 }
11006
11007 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
11008 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
11009 (s,),
11010 self.tx_id,
11011 0x4186c0f40d938f46,
11012 fidl::encoding::DynamicFlags::empty(),
11013 )
11014 }
11015}
11016
11017#[must_use = "FIDL methods require a response to be sent"]
11018#[derive(Debug)]
11019pub struct FileDeprecatedGetFlagsResponder {
11020 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11021 tx_id: u32,
11022}
11023
11024impl std::ops::Drop for FileDeprecatedGetFlagsResponder {
11028 fn drop(&mut self) {
11029 self.control_handle.shutdown();
11030 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11032 }
11033}
11034
11035impl fidl::endpoints::Responder for FileDeprecatedGetFlagsResponder {
11036 type ControlHandle = FileControlHandle;
11037
11038 fn control_handle(&self) -> &FileControlHandle {
11039 &self.control_handle
11040 }
11041
11042 fn drop_without_shutdown(mut self) {
11043 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11045 std::mem::forget(self);
11047 }
11048}
11049
11050impl FileDeprecatedGetFlagsResponder {
11051 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
11055 let _result = self.send_raw(s, flags);
11056 if _result.is_err() {
11057 self.control_handle.shutdown();
11058 }
11059 self.drop_without_shutdown();
11060 _result
11061 }
11062
11063 pub fn send_no_shutdown_on_err(
11065 self,
11066 mut s: i32,
11067 mut flags: OpenFlags,
11068 ) -> Result<(), fidl::Error> {
11069 let _result = self.send_raw(s, flags);
11070 self.drop_without_shutdown();
11071 _result
11072 }
11073
11074 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
11075 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
11076 (s, flags),
11077 self.tx_id,
11078 0x5b88fffb8eda3aa1,
11079 fidl::encoding::DynamicFlags::empty(),
11080 )
11081 }
11082}
11083
11084#[must_use = "FIDL methods require a response to be sent"]
11085#[derive(Debug)]
11086pub struct FileDeprecatedSetFlagsResponder {
11087 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11088 tx_id: u32,
11089}
11090
11091impl std::ops::Drop for FileDeprecatedSetFlagsResponder {
11095 fn drop(&mut self) {
11096 self.control_handle.shutdown();
11097 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11099 }
11100}
11101
11102impl fidl::endpoints::Responder for FileDeprecatedSetFlagsResponder {
11103 type ControlHandle = FileControlHandle;
11104
11105 fn control_handle(&self) -> &FileControlHandle {
11106 &self.control_handle
11107 }
11108
11109 fn drop_without_shutdown(mut self) {
11110 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11112 std::mem::forget(self);
11114 }
11115}
11116
11117impl FileDeprecatedSetFlagsResponder {
11118 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
11122 let _result = self.send_raw(s);
11123 if _result.is_err() {
11124 self.control_handle.shutdown();
11125 }
11126 self.drop_without_shutdown();
11127 _result
11128 }
11129
11130 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
11132 let _result = self.send_raw(s);
11133 self.drop_without_shutdown();
11134 _result
11135 }
11136
11137 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
11138 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
11139 (s,),
11140 self.tx_id,
11141 0x5295b76c71fde733,
11142 fidl::encoding::DynamicFlags::empty(),
11143 )
11144 }
11145}
11146
11147#[must_use = "FIDL methods require a response to be sent"]
11148#[derive(Debug)]
11149pub struct FileGetFlagsResponder {
11150 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11151 tx_id: u32,
11152}
11153
11154impl std::ops::Drop for FileGetFlagsResponder {
11158 fn drop(&mut self) {
11159 self.control_handle.shutdown();
11160 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11162 }
11163}
11164
11165impl fidl::endpoints::Responder for FileGetFlagsResponder {
11166 type ControlHandle = FileControlHandle;
11167
11168 fn control_handle(&self) -> &FileControlHandle {
11169 &self.control_handle
11170 }
11171
11172 fn drop_without_shutdown(mut self) {
11173 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11175 std::mem::forget(self);
11177 }
11178}
11179
11180impl FileGetFlagsResponder {
11181 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11185 let _result = self.send_raw(result);
11186 if _result.is_err() {
11187 self.control_handle.shutdown();
11188 }
11189 self.drop_without_shutdown();
11190 _result
11191 }
11192
11193 pub fn send_no_shutdown_on_err(
11195 self,
11196 mut result: Result<Flags, i32>,
11197 ) -> Result<(), fidl::Error> {
11198 let _result = self.send_raw(result);
11199 self.drop_without_shutdown();
11200 _result
11201 }
11202
11203 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
11204 self.control_handle
11205 .inner
11206 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
11207 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
11208 self.tx_id,
11209 0x176eb318f64ec23,
11210 fidl::encoding::DynamicFlags::FLEXIBLE,
11211 )
11212 }
11213}
11214
11215#[must_use = "FIDL methods require a response to be sent"]
11216#[derive(Debug)]
11217pub struct FileSetFlagsResponder {
11218 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11219 tx_id: u32,
11220}
11221
11222impl std::ops::Drop for FileSetFlagsResponder {
11226 fn drop(&mut self) {
11227 self.control_handle.shutdown();
11228 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11230 }
11231}
11232
11233impl fidl::endpoints::Responder for FileSetFlagsResponder {
11234 type ControlHandle = FileControlHandle;
11235
11236 fn control_handle(&self) -> &FileControlHandle {
11237 &self.control_handle
11238 }
11239
11240 fn drop_without_shutdown(mut self) {
11241 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11243 std::mem::forget(self);
11245 }
11246}
11247
11248impl FileSetFlagsResponder {
11249 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11253 let _result = self.send_raw(result);
11254 if _result.is_err() {
11255 self.control_handle.shutdown();
11256 }
11257 self.drop_without_shutdown();
11258 _result
11259 }
11260
11261 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11263 let _result = self.send_raw(result);
11264 self.drop_without_shutdown();
11265 _result
11266 }
11267
11268 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11269 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
11270 fidl::encoding::EmptyStruct,
11271 i32,
11272 >>(
11273 fidl::encoding::FlexibleResult::new(result),
11274 self.tx_id,
11275 0x55a8028685791ea8,
11276 fidl::encoding::DynamicFlags::FLEXIBLE,
11277 )
11278 }
11279}
11280
11281#[must_use = "FIDL methods require a response to be sent"]
11282#[derive(Debug)]
11283pub struct FileQueryFilesystemResponder {
11284 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11285 tx_id: u32,
11286}
11287
11288impl std::ops::Drop for FileQueryFilesystemResponder {
11292 fn drop(&mut self) {
11293 self.control_handle.shutdown();
11294 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11296 }
11297}
11298
11299impl fidl::endpoints::Responder for FileQueryFilesystemResponder {
11300 type ControlHandle = FileControlHandle;
11301
11302 fn control_handle(&self) -> &FileControlHandle {
11303 &self.control_handle
11304 }
11305
11306 fn drop_without_shutdown(mut self) {
11307 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11309 std::mem::forget(self);
11311 }
11312}
11313
11314impl FileQueryFilesystemResponder {
11315 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11319 let _result = self.send_raw(s, info);
11320 if _result.is_err() {
11321 self.control_handle.shutdown();
11322 }
11323 self.drop_without_shutdown();
11324 _result
11325 }
11326
11327 pub fn send_no_shutdown_on_err(
11329 self,
11330 mut s: i32,
11331 mut info: Option<&FilesystemInfo>,
11332 ) -> Result<(), fidl::Error> {
11333 let _result = self.send_raw(s, info);
11334 self.drop_without_shutdown();
11335 _result
11336 }
11337
11338 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
11339 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
11340 (s, info),
11341 self.tx_id,
11342 0x6f344a1c6b0a0610,
11343 fidl::encoding::DynamicFlags::empty(),
11344 )
11345 }
11346}
11347
11348#[must_use = "FIDL methods require a response to be sent"]
11349#[derive(Debug)]
11350pub struct FileGetAttributesResponder {
11351 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11352 tx_id: u32,
11353}
11354
11355impl std::ops::Drop for FileGetAttributesResponder {
11359 fn drop(&mut self) {
11360 self.control_handle.shutdown();
11361 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11363 }
11364}
11365
11366impl fidl::endpoints::Responder for FileGetAttributesResponder {
11367 type ControlHandle = FileControlHandle;
11368
11369 fn control_handle(&self) -> &FileControlHandle {
11370 &self.control_handle
11371 }
11372
11373 fn drop_without_shutdown(mut self) {
11374 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11376 std::mem::forget(self);
11378 }
11379}
11380
11381impl FileGetAttributesResponder {
11382 pub fn send(
11386 self,
11387 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11388 ) -> Result<(), fidl::Error> {
11389 let _result = self.send_raw(result);
11390 if _result.is_err() {
11391 self.control_handle.shutdown();
11392 }
11393 self.drop_without_shutdown();
11394 _result
11395 }
11396
11397 pub fn send_no_shutdown_on_err(
11399 self,
11400 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11401 ) -> Result<(), fidl::Error> {
11402 let _result = self.send_raw(result);
11403 self.drop_without_shutdown();
11404 _result
11405 }
11406
11407 fn send_raw(
11408 &self,
11409 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
11410 ) -> Result<(), fidl::Error> {
11411 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
11412 result,
11413 self.tx_id,
11414 0x3d4396a638ea053b,
11415 fidl::encoding::DynamicFlags::empty(),
11416 )
11417 }
11418}
11419
11420#[must_use = "FIDL methods require a response to be sent"]
11421#[derive(Debug)]
11422pub struct FileUpdateAttributesResponder {
11423 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11424 tx_id: u32,
11425}
11426
11427impl std::ops::Drop for FileUpdateAttributesResponder {
11431 fn drop(&mut self) {
11432 self.control_handle.shutdown();
11433 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11435 }
11436}
11437
11438impl fidl::endpoints::Responder for FileUpdateAttributesResponder {
11439 type ControlHandle = FileControlHandle;
11440
11441 fn control_handle(&self) -> &FileControlHandle {
11442 &self.control_handle
11443 }
11444
11445 fn drop_without_shutdown(mut self) {
11446 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11448 std::mem::forget(self);
11450 }
11451}
11452
11453impl FileUpdateAttributesResponder {
11454 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11458 let _result = self.send_raw(result);
11459 if _result.is_err() {
11460 self.control_handle.shutdown();
11461 }
11462 self.drop_without_shutdown();
11463 _result
11464 }
11465
11466 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11468 let _result = self.send_raw(result);
11469 self.drop_without_shutdown();
11470 _result
11471 }
11472
11473 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11474 self.control_handle
11475 .inner
11476 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11477 result,
11478 self.tx_id,
11479 0x3308c1da5a89bf08,
11480 fidl::encoding::DynamicFlags::empty(),
11481 )
11482 }
11483}
11484
11485#[must_use = "FIDL methods require a response to be sent"]
11486#[derive(Debug)]
11487pub struct FileSyncResponder {
11488 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11489 tx_id: u32,
11490}
11491
11492impl std::ops::Drop for FileSyncResponder {
11496 fn drop(&mut self) {
11497 self.control_handle.shutdown();
11498 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11500 }
11501}
11502
11503impl fidl::endpoints::Responder for FileSyncResponder {
11504 type ControlHandle = FileControlHandle;
11505
11506 fn control_handle(&self) -> &FileControlHandle {
11507 &self.control_handle
11508 }
11509
11510 fn drop_without_shutdown(mut self) {
11511 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11513 std::mem::forget(self);
11515 }
11516}
11517
11518impl FileSyncResponder {
11519 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11523 let _result = self.send_raw(result);
11524 if _result.is_err() {
11525 self.control_handle.shutdown();
11526 }
11527 self.drop_without_shutdown();
11528 _result
11529 }
11530
11531 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11533 let _result = self.send_raw(result);
11534 self.drop_without_shutdown();
11535 _result
11536 }
11537
11538 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11539 self.control_handle
11540 .inner
11541 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11542 result,
11543 self.tx_id,
11544 0x2c5c27ca0ab5dc49,
11545 fidl::encoding::DynamicFlags::empty(),
11546 )
11547 }
11548}
11549
11550#[must_use = "FIDL methods require a response to be sent"]
11551#[derive(Debug)]
11552pub struct FileGetExtendedAttributeResponder {
11553 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11554 tx_id: u32,
11555}
11556
11557impl std::ops::Drop for FileGetExtendedAttributeResponder {
11561 fn drop(&mut self) {
11562 self.control_handle.shutdown();
11563 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11565 }
11566}
11567
11568impl fidl::endpoints::Responder for FileGetExtendedAttributeResponder {
11569 type ControlHandle = FileControlHandle;
11570
11571 fn control_handle(&self) -> &FileControlHandle {
11572 &self.control_handle
11573 }
11574
11575 fn drop_without_shutdown(mut self) {
11576 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11578 std::mem::forget(self);
11580 }
11581}
11582
11583impl FileGetExtendedAttributeResponder {
11584 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11588 let _result = self.send_raw(result);
11589 if _result.is_err() {
11590 self.control_handle.shutdown();
11591 }
11592 self.drop_without_shutdown();
11593 _result
11594 }
11595
11596 pub fn send_no_shutdown_on_err(
11598 self,
11599 mut result: Result<ExtendedAttributeValue, i32>,
11600 ) -> Result<(), fidl::Error> {
11601 let _result = self.send_raw(result);
11602 self.drop_without_shutdown();
11603 _result
11604 }
11605
11606 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
11607 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
11608 result.as_mut().map_err(|e| *e),
11609 self.tx_id,
11610 0x45ffa3ccfdeb76db,
11611 fidl::encoding::DynamicFlags::empty(),
11612 )
11613 }
11614}
11615
11616#[must_use = "FIDL methods require a response to be sent"]
11617#[derive(Debug)]
11618pub struct FileSetExtendedAttributeResponder {
11619 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11620 tx_id: u32,
11621}
11622
11623impl std::ops::Drop for FileSetExtendedAttributeResponder {
11627 fn drop(&mut self) {
11628 self.control_handle.shutdown();
11629 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11631 }
11632}
11633
11634impl fidl::endpoints::Responder for FileSetExtendedAttributeResponder {
11635 type ControlHandle = FileControlHandle;
11636
11637 fn control_handle(&self) -> &FileControlHandle {
11638 &self.control_handle
11639 }
11640
11641 fn drop_without_shutdown(mut self) {
11642 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11644 std::mem::forget(self);
11646 }
11647}
11648
11649impl FileSetExtendedAttributeResponder {
11650 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11654 let _result = self.send_raw(result);
11655 if _result.is_err() {
11656 self.control_handle.shutdown();
11657 }
11658 self.drop_without_shutdown();
11659 _result
11660 }
11661
11662 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11664 let _result = self.send_raw(result);
11665 self.drop_without_shutdown();
11666 _result
11667 }
11668
11669 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11670 self.control_handle
11671 .inner
11672 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11673 result,
11674 self.tx_id,
11675 0x4a951362f681f23c,
11676 fidl::encoding::DynamicFlags::empty(),
11677 )
11678 }
11679}
11680
11681#[must_use = "FIDL methods require a response to be sent"]
11682#[derive(Debug)]
11683pub struct FileRemoveExtendedAttributeResponder {
11684 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11685 tx_id: u32,
11686}
11687
11688impl std::ops::Drop for FileRemoveExtendedAttributeResponder {
11692 fn drop(&mut self) {
11693 self.control_handle.shutdown();
11694 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11696 }
11697}
11698
11699impl fidl::endpoints::Responder for FileRemoveExtendedAttributeResponder {
11700 type ControlHandle = FileControlHandle;
11701
11702 fn control_handle(&self) -> &FileControlHandle {
11703 &self.control_handle
11704 }
11705
11706 fn drop_without_shutdown(mut self) {
11707 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11709 std::mem::forget(self);
11711 }
11712}
11713
11714impl FileRemoveExtendedAttributeResponder {
11715 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11719 let _result = self.send_raw(result);
11720 if _result.is_err() {
11721 self.control_handle.shutdown();
11722 }
11723 self.drop_without_shutdown();
11724 _result
11725 }
11726
11727 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11729 let _result = self.send_raw(result);
11730 self.drop_without_shutdown();
11731 _result
11732 }
11733
11734 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
11735 self.control_handle
11736 .inner
11737 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
11738 result,
11739 self.tx_id,
11740 0x7a0b9f3a9bf9032d,
11741 fidl::encoding::DynamicFlags::empty(),
11742 )
11743 }
11744}
11745
11746#[must_use = "FIDL methods require a response to be sent"]
11747#[derive(Debug)]
11748pub struct FileReadResponder {
11749 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11750 tx_id: u32,
11751}
11752
11753impl std::ops::Drop for FileReadResponder {
11757 fn drop(&mut self) {
11758 self.control_handle.shutdown();
11759 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11761 }
11762}
11763
11764impl fidl::endpoints::Responder for FileReadResponder {
11765 type ControlHandle = FileControlHandle;
11766
11767 fn control_handle(&self) -> &FileControlHandle {
11768 &self.control_handle
11769 }
11770
11771 fn drop_without_shutdown(mut self) {
11772 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11774 std::mem::forget(self);
11776 }
11777}
11778
11779impl FileReadResponder {
11780 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11784 let _result = self.send_raw(result);
11785 if _result.is_err() {
11786 self.control_handle.shutdown();
11787 }
11788 self.drop_without_shutdown();
11789 _result
11790 }
11791
11792 pub fn send_no_shutdown_on_err(
11794 self,
11795 mut result: Result<&[u8], i32>,
11796 ) -> Result<(), fidl::Error> {
11797 let _result = self.send_raw(result);
11798 self.drop_without_shutdown();
11799 _result
11800 }
11801
11802 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
11803 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
11804 result.map(|data| (data,)),
11805 self.tx_id,
11806 0x57e419a298c8ede,
11807 fidl::encoding::DynamicFlags::empty(),
11808 )
11809 }
11810}
11811
11812#[must_use = "FIDL methods require a response to be sent"]
11813#[derive(Debug)]
11814pub struct FileWriteResponder {
11815 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11816 tx_id: u32,
11817}
11818
11819impl std::ops::Drop for FileWriteResponder {
11823 fn drop(&mut self) {
11824 self.control_handle.shutdown();
11825 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11827 }
11828}
11829
11830impl fidl::endpoints::Responder for FileWriteResponder {
11831 type ControlHandle = FileControlHandle;
11832
11833 fn control_handle(&self) -> &FileControlHandle {
11834 &self.control_handle
11835 }
11836
11837 fn drop_without_shutdown(mut self) {
11838 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11840 std::mem::forget(self);
11842 }
11843}
11844
11845impl FileWriteResponder {
11846 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11850 let _result = self.send_raw(result);
11851 if _result.is_err() {
11852 self.control_handle.shutdown();
11853 }
11854 self.drop_without_shutdown();
11855 _result
11856 }
11857
11858 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11860 let _result = self.send_raw(result);
11861 self.drop_without_shutdown();
11862 _result
11863 }
11864
11865 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11866 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
11867 result.map(|actual_count| (actual_count,)),
11868 self.tx_id,
11869 0x6a31437832469f82,
11870 fidl::encoding::DynamicFlags::empty(),
11871 )
11872 }
11873}
11874
11875#[must_use = "FIDL methods require a response to be sent"]
11876#[derive(Debug)]
11877pub struct FileDescribeResponder {
11878 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11879 tx_id: u32,
11880}
11881
11882impl std::ops::Drop for FileDescribeResponder {
11886 fn drop(&mut self) {
11887 self.control_handle.shutdown();
11888 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11890 }
11891}
11892
11893impl fidl::endpoints::Responder for FileDescribeResponder {
11894 type ControlHandle = FileControlHandle;
11895
11896 fn control_handle(&self) -> &FileControlHandle {
11897 &self.control_handle
11898 }
11899
11900 fn drop_without_shutdown(mut self) {
11901 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11903 std::mem::forget(self);
11905 }
11906}
11907
11908impl FileDescribeResponder {
11909 pub fn send(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11913 let _result = self.send_raw(payload);
11914 if _result.is_err() {
11915 self.control_handle.shutdown();
11916 }
11917 self.drop_without_shutdown();
11918 _result
11919 }
11920
11921 pub fn send_no_shutdown_on_err(self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11923 let _result = self.send_raw(payload);
11924 self.drop_without_shutdown();
11925 _result
11926 }
11927
11928 fn send_raw(&self, mut payload: FileInfo) -> Result<(), fidl::Error> {
11929 self.control_handle.inner.send::<FileInfo>(
11930 &mut payload,
11931 self.tx_id,
11932 0x68b5ac00c62906bc,
11933 fidl::encoding::DynamicFlags::empty(),
11934 )
11935 }
11936}
11937
11938#[must_use = "FIDL methods require a response to be sent"]
11939#[derive(Debug)]
11940pub struct FileSeekResponder {
11941 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
11942 tx_id: u32,
11943}
11944
11945impl std::ops::Drop for FileSeekResponder {
11949 fn drop(&mut self) {
11950 self.control_handle.shutdown();
11951 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11953 }
11954}
11955
11956impl fidl::endpoints::Responder for FileSeekResponder {
11957 type ControlHandle = FileControlHandle;
11958
11959 fn control_handle(&self) -> &FileControlHandle {
11960 &self.control_handle
11961 }
11962
11963 fn drop_without_shutdown(mut self) {
11964 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
11966 std::mem::forget(self);
11968 }
11969}
11970
11971impl FileSeekResponder {
11972 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11976 let _result = self.send_raw(result);
11977 if _result.is_err() {
11978 self.control_handle.shutdown();
11979 }
11980 self.drop_without_shutdown();
11981 _result
11982 }
11983
11984 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11986 let _result = self.send_raw(result);
11987 self.drop_without_shutdown();
11988 _result
11989 }
11990
11991 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
11992 self.control_handle.inner.send::<fidl::encoding::ResultType<FileSeekResponse, i32>>(
11993 result.map(|offset_from_start| (offset_from_start,)),
11994 self.tx_id,
11995 0x78079168162c5207,
11996 fidl::encoding::DynamicFlags::empty(),
11997 )
11998 }
11999}
12000
12001#[must_use = "FIDL methods require a response to be sent"]
12002#[derive(Debug)]
12003pub struct FileReadAtResponder {
12004 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12005 tx_id: u32,
12006}
12007
12008impl std::ops::Drop for FileReadAtResponder {
12012 fn drop(&mut self) {
12013 self.control_handle.shutdown();
12014 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12016 }
12017}
12018
12019impl fidl::endpoints::Responder for FileReadAtResponder {
12020 type ControlHandle = FileControlHandle;
12021
12022 fn control_handle(&self) -> &FileControlHandle {
12023 &self.control_handle
12024 }
12025
12026 fn drop_without_shutdown(mut self) {
12027 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12029 std::mem::forget(self);
12031 }
12032}
12033
12034impl FileReadAtResponder {
12035 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
12039 let _result = self.send_raw(result);
12040 if _result.is_err() {
12041 self.control_handle.shutdown();
12042 }
12043 self.drop_without_shutdown();
12044 _result
12045 }
12046
12047 pub fn send_no_shutdown_on_err(
12049 self,
12050 mut result: Result<&[u8], i32>,
12051 ) -> Result<(), fidl::Error> {
12052 let _result = self.send_raw(result);
12053 self.drop_without_shutdown();
12054 _result
12055 }
12056
12057 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
12058 self.control_handle.inner.send::<fidl::encoding::ResultType<FileReadAtResponse, i32>>(
12059 result.map(|data| (data,)),
12060 self.tx_id,
12061 0x1607a293a60d723e,
12062 fidl::encoding::DynamicFlags::empty(),
12063 )
12064 }
12065}
12066
12067#[must_use = "FIDL methods require a response to be sent"]
12068#[derive(Debug)]
12069pub struct FileWriteAtResponder {
12070 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12071 tx_id: u32,
12072}
12073
12074impl std::ops::Drop for FileWriteAtResponder {
12078 fn drop(&mut self) {
12079 self.control_handle.shutdown();
12080 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12082 }
12083}
12084
12085impl fidl::endpoints::Responder for FileWriteAtResponder {
12086 type ControlHandle = FileControlHandle;
12087
12088 fn control_handle(&self) -> &FileControlHandle {
12089 &self.control_handle
12090 }
12091
12092 fn drop_without_shutdown(mut self) {
12093 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12095 std::mem::forget(self);
12097 }
12098}
12099
12100impl FileWriteAtResponder {
12101 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12105 let _result = self.send_raw(result);
12106 if _result.is_err() {
12107 self.control_handle.shutdown();
12108 }
12109 self.drop_without_shutdown();
12110 _result
12111 }
12112
12113 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12115 let _result = self.send_raw(result);
12116 self.drop_without_shutdown();
12117 _result
12118 }
12119
12120 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
12121 self.control_handle.inner.send::<fidl::encoding::ResultType<FileWriteAtResponse, i32>>(
12122 result.map(|actual_count| (actual_count,)),
12123 self.tx_id,
12124 0x793eefc0045e792b,
12125 fidl::encoding::DynamicFlags::empty(),
12126 )
12127 }
12128}
12129
12130#[must_use = "FIDL methods require a response to be sent"]
12131#[derive(Debug)]
12132pub struct FileResizeResponder {
12133 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12134 tx_id: u32,
12135}
12136
12137impl std::ops::Drop for FileResizeResponder {
12141 fn drop(&mut self) {
12142 self.control_handle.shutdown();
12143 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12145 }
12146}
12147
12148impl fidl::endpoints::Responder for FileResizeResponder {
12149 type ControlHandle = FileControlHandle;
12150
12151 fn control_handle(&self) -> &FileControlHandle {
12152 &self.control_handle
12153 }
12154
12155 fn drop_without_shutdown(mut self) {
12156 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12158 std::mem::forget(self);
12160 }
12161}
12162
12163impl FileResizeResponder {
12164 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12168 let _result = self.send_raw(result);
12169 if _result.is_err() {
12170 self.control_handle.shutdown();
12171 }
12172 self.drop_without_shutdown();
12173 _result
12174 }
12175
12176 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12178 let _result = self.send_raw(result);
12179 self.drop_without_shutdown();
12180 _result
12181 }
12182
12183 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12184 self.control_handle
12185 .inner
12186 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12187 result,
12188 self.tx_id,
12189 0x2b80825f0535743a,
12190 fidl::encoding::DynamicFlags::empty(),
12191 )
12192 }
12193}
12194
12195#[must_use = "FIDL methods require a response to be sent"]
12196#[derive(Debug)]
12197pub struct FileGetBackingMemoryResponder {
12198 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12199 tx_id: u32,
12200}
12201
12202impl std::ops::Drop for FileGetBackingMemoryResponder {
12206 fn drop(&mut self) {
12207 self.control_handle.shutdown();
12208 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12210 }
12211}
12212
12213impl fidl::endpoints::Responder for FileGetBackingMemoryResponder {
12214 type ControlHandle = FileControlHandle;
12215
12216 fn control_handle(&self) -> &FileControlHandle {
12217 &self.control_handle
12218 }
12219
12220 fn drop_without_shutdown(mut self) {
12221 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12223 std::mem::forget(self);
12225 }
12226}
12227
12228impl FileGetBackingMemoryResponder {
12229 pub fn send(self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12233 let _result = self.send_raw(result);
12234 if _result.is_err() {
12235 self.control_handle.shutdown();
12236 }
12237 self.drop_without_shutdown();
12238 _result
12239 }
12240
12241 pub fn send_no_shutdown_on_err(
12243 self,
12244 mut result: Result<fidl::Vmo, i32>,
12245 ) -> Result<(), fidl::Error> {
12246 let _result = self.send_raw(result);
12247 self.drop_without_shutdown();
12248 _result
12249 }
12250
12251 fn send_raw(&self, mut result: Result<fidl::Vmo, i32>) -> Result<(), fidl::Error> {
12252 self.control_handle
12253 .inner
12254 .send::<fidl::encoding::ResultType<FileGetBackingMemoryResponse, i32>>(
12255 result.map(|vmo| (vmo,)),
12256 self.tx_id,
12257 0xa6a9e654cbf62b,
12258 fidl::encoding::DynamicFlags::empty(),
12259 )
12260 }
12261}
12262
12263#[must_use = "FIDL methods require a response to be sent"]
12264#[derive(Debug)]
12265pub struct FileAllocateResponder {
12266 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12267 tx_id: u32,
12268}
12269
12270impl std::ops::Drop for FileAllocateResponder {
12274 fn drop(&mut self) {
12275 self.control_handle.shutdown();
12276 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12278 }
12279}
12280
12281impl fidl::endpoints::Responder for FileAllocateResponder {
12282 type ControlHandle = FileControlHandle;
12283
12284 fn control_handle(&self) -> &FileControlHandle {
12285 &self.control_handle
12286 }
12287
12288 fn drop_without_shutdown(mut self) {
12289 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12291 std::mem::forget(self);
12293 }
12294}
12295
12296impl FileAllocateResponder {
12297 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12301 let _result = self.send_raw(result);
12302 if _result.is_err() {
12303 self.control_handle.shutdown();
12304 }
12305 self.drop_without_shutdown();
12306 _result
12307 }
12308
12309 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12311 let _result = self.send_raw(result);
12312 self.drop_without_shutdown();
12313 _result
12314 }
12315
12316 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12317 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12318 fidl::encoding::EmptyStruct,
12319 i32,
12320 >>(
12321 fidl::encoding::FlexibleResult::new(result),
12322 self.tx_id,
12323 0x77fa0c330b57fd2e,
12324 fidl::encoding::DynamicFlags::FLEXIBLE,
12325 )
12326 }
12327}
12328
12329#[must_use = "FIDL methods require a response to be sent"]
12330#[derive(Debug)]
12331pub struct FileEnableVerityResponder {
12332 control_handle: std::mem::ManuallyDrop<FileControlHandle>,
12333 tx_id: u32,
12334}
12335
12336impl std::ops::Drop for FileEnableVerityResponder {
12340 fn drop(&mut self) {
12341 self.control_handle.shutdown();
12342 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12344 }
12345}
12346
12347impl fidl::endpoints::Responder for FileEnableVerityResponder {
12348 type ControlHandle = FileControlHandle;
12349
12350 fn control_handle(&self) -> &FileControlHandle {
12351 &self.control_handle
12352 }
12353
12354 fn drop_without_shutdown(mut self) {
12355 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12357 std::mem::forget(self);
12359 }
12360}
12361
12362impl FileEnableVerityResponder {
12363 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12367 let _result = self.send_raw(result);
12368 if _result.is_err() {
12369 self.control_handle.shutdown();
12370 }
12371 self.drop_without_shutdown();
12372 _result
12373 }
12374
12375 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12377 let _result = self.send_raw(result);
12378 self.drop_without_shutdown();
12379 _result
12380 }
12381
12382 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12383 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
12384 fidl::encoding::EmptyStruct,
12385 i32,
12386 >>(
12387 fidl::encoding::FlexibleResult::new(result),
12388 self.tx_id,
12389 0x2c421ec3faaeb8bb,
12390 fidl::encoding::DynamicFlags::FLEXIBLE,
12391 )
12392 }
12393}
12394
12395#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
12396pub struct LinkableMarker;
12397
12398impl fidl::endpoints::ProtocolMarker for LinkableMarker {
12399 type Proxy = LinkableProxy;
12400 type RequestStream = LinkableRequestStream;
12401 #[cfg(target_os = "fuchsia")]
12402 type SynchronousProxy = LinkableSynchronousProxy;
12403
12404 const DEBUG_NAME: &'static str = "(anonymous) Linkable";
12405}
12406pub type LinkableLinkIntoResult = Result<(), i32>;
12407
12408pub trait LinkableProxyInterface: Send + Sync {
12409 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
12410 + Send;
12411 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
12412}
12413#[derive(Debug)]
12414#[cfg(target_os = "fuchsia")]
12415pub struct LinkableSynchronousProxy {
12416 client: fidl::client::sync::Client,
12417}
12418
12419#[cfg(target_os = "fuchsia")]
12420impl fidl::endpoints::SynchronousProxy for LinkableSynchronousProxy {
12421 type Proxy = LinkableProxy;
12422 type Protocol = LinkableMarker;
12423
12424 fn from_channel(inner: fidl::Channel) -> Self {
12425 Self::new(inner)
12426 }
12427
12428 fn into_channel(self) -> fidl::Channel {
12429 self.client.into_channel()
12430 }
12431
12432 fn as_channel(&self) -> &fidl::Channel {
12433 self.client.as_channel()
12434 }
12435}
12436
12437#[cfg(target_os = "fuchsia")]
12438impl LinkableSynchronousProxy {
12439 pub fn new(channel: fidl::Channel) -> Self {
12440 Self { client: fidl::client::sync::Client::new(channel) }
12441 }
12442
12443 pub fn into_channel(self) -> fidl::Channel {
12444 self.client.into_channel()
12445 }
12446
12447 pub fn wait_for_event(
12450 &self,
12451 deadline: zx::MonotonicInstant,
12452 ) -> Result<LinkableEvent, fidl::Error> {
12453 LinkableEvent::decode(self.client.wait_for_event::<LinkableMarker>(deadline)?)
12454 }
12455
12456 pub fn r#link_into(
12479 &self,
12480 mut dst_parent_token: fidl::Event,
12481 mut dst: &str,
12482 ___deadline: zx::MonotonicInstant,
12483 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12484 let _response = self.client.send_query::<
12485 LinkableLinkIntoRequest,
12486 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12487 LinkableMarker,
12488 >(
12489 (dst_parent_token, dst,),
12490 0x54f3949246a03e74,
12491 fidl::encoding::DynamicFlags::empty(),
12492 ___deadline,
12493 )?;
12494 Ok(_response.map(|x| x))
12495 }
12496}
12497
12498#[cfg(target_os = "fuchsia")]
12499impl From<LinkableSynchronousProxy> for zx::NullableHandle {
12500 fn from(value: LinkableSynchronousProxy) -> Self {
12501 value.into_channel().into()
12502 }
12503}
12504
12505#[cfg(target_os = "fuchsia")]
12506impl From<fidl::Channel> for LinkableSynchronousProxy {
12507 fn from(value: fidl::Channel) -> Self {
12508 Self::new(value)
12509 }
12510}
12511
12512#[cfg(target_os = "fuchsia")]
12513impl fidl::endpoints::FromClient for LinkableSynchronousProxy {
12514 type Protocol = LinkableMarker;
12515
12516 fn from_client(value: fidl::endpoints::ClientEnd<LinkableMarker>) -> Self {
12517 Self::new(value.into_channel())
12518 }
12519}
12520
12521#[derive(Debug, Clone)]
12522pub struct LinkableProxy {
12523 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
12524}
12525
12526impl fidl::endpoints::Proxy for LinkableProxy {
12527 type Protocol = LinkableMarker;
12528
12529 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
12530 Self::new(inner)
12531 }
12532
12533 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
12534 self.client.into_channel().map_err(|client| Self { client })
12535 }
12536
12537 fn as_channel(&self) -> &::fidl::AsyncChannel {
12538 self.client.as_channel()
12539 }
12540}
12541
12542impl LinkableProxy {
12543 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
12545 let protocol_name = <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
12546 Self { client: fidl::client::Client::new(channel, protocol_name) }
12547 }
12548
12549 pub fn take_event_stream(&self) -> LinkableEventStream {
12555 LinkableEventStream { event_receiver: self.client.take_event_receiver() }
12556 }
12557
12558 pub fn r#link_into(
12581 &self,
12582 mut dst_parent_token: fidl::Event,
12583 mut dst: &str,
12584 ) -> fidl::client::QueryResponseFut<
12585 LinkableLinkIntoResult,
12586 fidl::encoding::DefaultFuchsiaResourceDialect,
12587 > {
12588 LinkableProxyInterface::r#link_into(self, dst_parent_token, dst)
12589 }
12590}
12591
12592impl LinkableProxyInterface for LinkableProxy {
12593 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
12594 LinkableLinkIntoResult,
12595 fidl::encoding::DefaultFuchsiaResourceDialect,
12596 >;
12597 fn r#link_into(
12598 &self,
12599 mut dst_parent_token: fidl::Event,
12600 mut dst: &str,
12601 ) -> Self::LinkIntoResponseFut {
12602 fn _decode(
12603 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
12604 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
12605 let _response = fidl::client::decode_transaction_body::<
12606 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
12607 fidl::encoding::DefaultFuchsiaResourceDialect,
12608 0x54f3949246a03e74,
12609 >(_buf?)?;
12610 Ok(_response.map(|x| x))
12611 }
12612 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
12613 (dst_parent_token, dst),
12614 0x54f3949246a03e74,
12615 fidl::encoding::DynamicFlags::empty(),
12616 _decode,
12617 )
12618 }
12619}
12620
12621pub struct LinkableEventStream {
12622 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
12623}
12624
12625impl std::marker::Unpin for LinkableEventStream {}
12626
12627impl futures::stream::FusedStream for LinkableEventStream {
12628 fn is_terminated(&self) -> bool {
12629 self.event_receiver.is_terminated()
12630 }
12631}
12632
12633impl futures::Stream for LinkableEventStream {
12634 type Item = Result<LinkableEvent, fidl::Error>;
12635
12636 fn poll_next(
12637 mut self: std::pin::Pin<&mut Self>,
12638 cx: &mut std::task::Context<'_>,
12639 ) -> std::task::Poll<Option<Self::Item>> {
12640 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
12641 &mut self.event_receiver,
12642 cx
12643 )?) {
12644 Some(buf) => std::task::Poll::Ready(Some(LinkableEvent::decode(buf))),
12645 None => std::task::Poll::Ready(None),
12646 }
12647 }
12648}
12649
12650#[derive(Debug)]
12651pub enum LinkableEvent {}
12652
12653impl LinkableEvent {
12654 fn decode(
12656 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
12657 ) -> Result<LinkableEvent, fidl::Error> {
12658 let (bytes, _handles) = buf.split_mut();
12659 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12660 debug_assert_eq!(tx_header.tx_id, 0);
12661 match tx_header.ordinal {
12662 _ => Err(fidl::Error::UnknownOrdinal {
12663 ordinal: tx_header.ordinal,
12664 protocol_name: <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12665 }),
12666 }
12667 }
12668}
12669
12670pub struct LinkableRequestStream {
12672 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12673 is_terminated: bool,
12674}
12675
12676impl std::marker::Unpin for LinkableRequestStream {}
12677
12678impl futures::stream::FusedStream for LinkableRequestStream {
12679 fn is_terminated(&self) -> bool {
12680 self.is_terminated
12681 }
12682}
12683
12684impl fidl::endpoints::RequestStream for LinkableRequestStream {
12685 type Protocol = LinkableMarker;
12686 type ControlHandle = LinkableControlHandle;
12687
12688 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
12689 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
12690 }
12691
12692 fn control_handle(&self) -> Self::ControlHandle {
12693 LinkableControlHandle { inner: self.inner.clone() }
12694 }
12695
12696 fn into_inner(
12697 self,
12698 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
12699 {
12700 (self.inner, self.is_terminated)
12701 }
12702
12703 fn from_inner(
12704 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12705 is_terminated: bool,
12706 ) -> Self {
12707 Self { inner, is_terminated }
12708 }
12709}
12710
12711impl futures::Stream for LinkableRequestStream {
12712 type Item = Result<LinkableRequest, fidl::Error>;
12713
12714 fn poll_next(
12715 mut self: std::pin::Pin<&mut Self>,
12716 cx: &mut std::task::Context<'_>,
12717 ) -> std::task::Poll<Option<Self::Item>> {
12718 let this = &mut *self;
12719 if this.inner.check_shutdown(cx) {
12720 this.is_terminated = true;
12721 return std::task::Poll::Ready(None);
12722 }
12723 if this.is_terminated {
12724 panic!("polled LinkableRequestStream after completion");
12725 }
12726 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
12727 |bytes, handles| {
12728 match this.inner.channel().read_etc(cx, bytes, handles) {
12729 std::task::Poll::Ready(Ok(())) => {}
12730 std::task::Poll::Pending => return std::task::Poll::Pending,
12731 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
12732 this.is_terminated = true;
12733 return std::task::Poll::Ready(None);
12734 }
12735 std::task::Poll::Ready(Err(e)) => {
12736 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
12737 e.into(),
12738 ))));
12739 }
12740 }
12741
12742 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
12744
12745 std::task::Poll::Ready(Some(match header.ordinal {
12746 0x54f3949246a03e74 => {
12747 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
12748 let mut req = fidl::new_empty!(
12749 LinkableLinkIntoRequest,
12750 fidl::encoding::DefaultFuchsiaResourceDialect
12751 );
12752 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
12753 let control_handle = LinkableControlHandle { inner: this.inner.clone() };
12754 Ok(LinkableRequest::LinkInto {
12755 dst_parent_token: req.dst_parent_token,
12756 dst: req.dst,
12757
12758 responder: LinkableLinkIntoResponder {
12759 control_handle: std::mem::ManuallyDrop::new(control_handle),
12760 tx_id: header.tx_id,
12761 },
12762 })
12763 }
12764 _ => Err(fidl::Error::UnknownOrdinal {
12765 ordinal: header.ordinal,
12766 protocol_name:
12767 <LinkableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
12768 }),
12769 }))
12770 },
12771 )
12772 }
12773}
12774
12775#[derive(Debug)]
12776pub enum LinkableRequest {
12777 LinkInto { dst_parent_token: fidl::Event, dst: String, responder: LinkableLinkIntoResponder },
12800}
12801
12802impl LinkableRequest {
12803 #[allow(irrefutable_let_patterns)]
12804 pub fn into_link_into(self) -> Option<(fidl::Event, String, LinkableLinkIntoResponder)> {
12805 if let LinkableRequest::LinkInto { dst_parent_token, dst, responder } = self {
12806 Some((dst_parent_token, dst, responder))
12807 } else {
12808 None
12809 }
12810 }
12811
12812 pub fn method_name(&self) -> &'static str {
12814 match *self {
12815 LinkableRequest::LinkInto { .. } => "link_into",
12816 }
12817 }
12818}
12819
12820#[derive(Debug, Clone)]
12821pub struct LinkableControlHandle {
12822 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
12823}
12824
12825impl LinkableControlHandle {
12826 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
12827 self.inner.shutdown_with_epitaph(status.into())
12828 }
12829}
12830
12831impl fidl::endpoints::ControlHandle for LinkableControlHandle {
12832 fn shutdown(&self) {
12833 self.inner.shutdown()
12834 }
12835
12836 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
12837 self.inner.shutdown_with_epitaph(status)
12838 }
12839
12840 fn is_closed(&self) -> bool {
12841 self.inner.channel().is_closed()
12842 }
12843 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
12844 self.inner.channel().on_closed()
12845 }
12846
12847 #[cfg(target_os = "fuchsia")]
12848 fn signal_peer(
12849 &self,
12850 clear_mask: zx::Signals,
12851 set_mask: zx::Signals,
12852 ) -> Result<(), zx_status::Status> {
12853 use fidl::Peered;
12854 self.inner.channel().signal_peer(clear_mask, set_mask)
12855 }
12856}
12857
12858impl LinkableControlHandle {}
12859
12860#[must_use = "FIDL methods require a response to be sent"]
12861#[derive(Debug)]
12862pub struct LinkableLinkIntoResponder {
12863 control_handle: std::mem::ManuallyDrop<LinkableControlHandle>,
12864 tx_id: u32,
12865}
12866
12867impl std::ops::Drop for LinkableLinkIntoResponder {
12871 fn drop(&mut self) {
12872 self.control_handle.shutdown();
12873 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12875 }
12876}
12877
12878impl fidl::endpoints::Responder for LinkableLinkIntoResponder {
12879 type ControlHandle = LinkableControlHandle;
12880
12881 fn control_handle(&self) -> &LinkableControlHandle {
12882 &self.control_handle
12883 }
12884
12885 fn drop_without_shutdown(mut self) {
12886 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
12888 std::mem::forget(self);
12890 }
12891}
12892
12893impl LinkableLinkIntoResponder {
12894 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12898 let _result = self.send_raw(result);
12899 if _result.is_err() {
12900 self.control_handle.shutdown();
12901 }
12902 self.drop_without_shutdown();
12903 _result
12904 }
12905
12906 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12908 let _result = self.send_raw(result);
12909 self.drop_without_shutdown();
12910 _result
12911 }
12912
12913 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
12914 self.control_handle
12915 .inner
12916 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
12917 result,
12918 self.tx_id,
12919 0x54f3949246a03e74,
12920 fidl::encoding::DynamicFlags::empty(),
12921 )
12922 }
12923}
12924
12925#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
12926pub struct NodeMarker;
12927
12928impl fidl::endpoints::ProtocolMarker for NodeMarker {
12929 type Proxy = NodeProxy;
12930 type RequestStream = NodeRequestStream;
12931 #[cfg(target_os = "fuchsia")]
12932 type SynchronousProxy = NodeSynchronousProxy;
12933
12934 const DEBUG_NAME: &'static str = "fuchsia.io.Node";
12935}
12936impl fidl::endpoints::DiscoverableProtocolMarker for NodeMarker {}
12937pub type NodeGetFlagsResult = Result<Flags, i32>;
12938pub type NodeSetFlagsResult = Result<(), i32>;
12939pub type NodeGetAttributesResult = Result<(MutableNodeAttributes, ImmutableNodeAttributes), i32>;
12940pub type NodeUpdateAttributesResult = Result<(), i32>;
12941pub type NodeSyncResult = Result<(), i32>;
12942pub type NodeGetExtendedAttributeResult = Result<ExtendedAttributeValue, i32>;
12943pub type NodeSetExtendedAttributeResult = Result<(), i32>;
12944pub type NodeRemoveExtendedAttributeResult = Result<(), i32>;
12945
12946pub trait NodeProxyInterface: Send + Sync {
12947 fn r#clone(
12948 &self,
12949 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
12950 ) -> Result<(), fidl::Error>;
12951 type CloseResponseFut: std::future::Future<
12952 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
12953 > + Send;
12954 fn r#close(&self) -> Self::CloseResponseFut;
12955 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
12956 fn r#query(&self) -> Self::QueryResponseFut;
12957 fn r#deprecated_clone(
12958 &self,
12959 flags: OpenFlags,
12960 object: fidl::endpoints::ServerEnd<NodeMarker>,
12961 ) -> Result<(), fidl::Error>;
12962 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
12963 + Send;
12964 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
12965 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
12966 fn r#deprecated_set_attr(
12967 &self,
12968 flags: NodeAttributeFlags,
12969 attributes: &NodeAttributes,
12970 ) -> Self::DeprecatedSetAttrResponseFut;
12971 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
12972 + Send;
12973 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
12974 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
12975 + Send;
12976 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
12977 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
12978 + Send;
12979 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
12980 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
12981 + Send;
12982 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
12983 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
12984 + Send;
12985 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
12986 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
12987 + Send;
12988 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
12989 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
12990 + Send;
12991 fn r#update_attributes(
12992 &self,
12993 payload: &MutableNodeAttributes,
12994 ) -> Self::UpdateAttributesResponseFut;
12995 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
12996 fn r#sync(&self) -> Self::SyncResponseFut;
12997 fn r#list_extended_attributes(
12998 &self,
12999 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13000 ) -> Result<(), fidl::Error>;
13001 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
13002 + Send;
13003 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
13004 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
13005 + Send;
13006 fn r#set_extended_attribute(
13007 &self,
13008 name: &[u8],
13009 value: ExtendedAttributeValue,
13010 mode: SetExtendedAttributeMode,
13011 ) -> Self::SetExtendedAttributeResponseFut;
13012 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
13013 + Send;
13014 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
13015}
13016#[derive(Debug)]
13017#[cfg(target_os = "fuchsia")]
13018pub struct NodeSynchronousProxy {
13019 client: fidl::client::sync::Client,
13020}
13021
13022#[cfg(target_os = "fuchsia")]
13023impl fidl::endpoints::SynchronousProxy for NodeSynchronousProxy {
13024 type Proxy = NodeProxy;
13025 type Protocol = NodeMarker;
13026
13027 fn from_channel(inner: fidl::Channel) -> Self {
13028 Self::new(inner)
13029 }
13030
13031 fn into_channel(self) -> fidl::Channel {
13032 self.client.into_channel()
13033 }
13034
13035 fn as_channel(&self) -> &fidl::Channel {
13036 self.client.as_channel()
13037 }
13038}
13039
13040#[cfg(target_os = "fuchsia")]
13041impl NodeSynchronousProxy {
13042 pub fn new(channel: fidl::Channel) -> Self {
13043 Self { client: fidl::client::sync::Client::new(channel) }
13044 }
13045
13046 pub fn into_channel(self) -> fidl::Channel {
13047 self.client.into_channel()
13048 }
13049
13050 pub fn wait_for_event(&self, deadline: zx::MonotonicInstant) -> Result<NodeEvent, fidl::Error> {
13053 NodeEvent::decode(self.client.wait_for_event::<NodeMarker>(deadline)?)
13054 }
13055
13056 pub fn r#clone(
13057 &self,
13058 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13059 ) -> Result<(), fidl::Error> {
13060 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
13061 (request,),
13062 0x20d8a7aba2168a79,
13063 fidl::encoding::DynamicFlags::empty(),
13064 )
13065 }
13066
13067 pub fn r#close(
13078 &self,
13079 ___deadline: zx::MonotonicInstant,
13080 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
13081 let _response = self.client.send_query::<
13082 fidl::encoding::EmptyPayload,
13083 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13084 NodeMarker,
13085 >(
13086 (),
13087 0x5ac5d459ad7f657e,
13088 fidl::encoding::DynamicFlags::empty(),
13089 ___deadline,
13090 )?;
13091 Ok(_response.map(|x| x))
13092 }
13093
13094 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
13095 let _response = self.client.send_query::<
13096 fidl::encoding::EmptyPayload,
13097 fidl_fuchsia_unknown::QueryableQueryResponse,
13098 NodeMarker,
13099 >(
13100 (),
13101 0x2658edee9decfc06,
13102 fidl::encoding::DynamicFlags::empty(),
13103 ___deadline,
13104 )?;
13105 Ok(_response.protocol)
13106 }
13107
13108 pub fn r#deprecated_clone(
13110 &self,
13111 mut flags: OpenFlags,
13112 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13113 ) -> Result<(), fidl::Error> {
13114 self.client.send::<NodeDeprecatedCloneRequest>(
13115 (flags, object),
13116 0x5a61678f293ce16f,
13117 fidl::encoding::DynamicFlags::FLEXIBLE,
13118 )
13119 }
13120
13121 pub fn r#deprecated_get_attr(
13125 &self,
13126 ___deadline: zx::MonotonicInstant,
13127 ) -> Result<(i32, NodeAttributes), fidl::Error> {
13128 let _response = self
13129 .client
13130 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetAttrResponse, NodeMarker>(
13131 (),
13132 0x78985e216314dafd,
13133 fidl::encoding::DynamicFlags::empty(),
13134 ___deadline,
13135 )?;
13136 Ok((_response.s, _response.attributes))
13137 }
13138
13139 pub fn r#deprecated_set_attr(
13141 &self,
13142 mut flags: NodeAttributeFlags,
13143 mut attributes: &NodeAttributes,
13144 ___deadline: zx::MonotonicInstant,
13145 ) -> Result<i32, fidl::Error> {
13146 let _response = self
13147 .client
13148 .send_query::<NodeDeprecatedSetAttrRequest, NodeDeprecatedSetAttrResponse, NodeMarker>(
13149 (flags, attributes),
13150 0x4186c0f40d938f46,
13151 fidl::encoding::DynamicFlags::empty(),
13152 ___deadline,
13153 )?;
13154 Ok(_response.s)
13155 }
13156
13157 pub fn r#deprecated_get_flags(
13159 &self,
13160 ___deadline: zx::MonotonicInstant,
13161 ) -> Result<(i32, OpenFlags), fidl::Error> {
13162 let _response = self
13163 .client
13164 .send_query::<fidl::encoding::EmptyPayload, NodeDeprecatedGetFlagsResponse, NodeMarker>(
13165 (),
13166 0x5b88fffb8eda3aa1,
13167 fidl::encoding::DynamicFlags::empty(),
13168 ___deadline,
13169 )?;
13170 Ok((_response.s, _response.flags))
13171 }
13172
13173 pub fn r#deprecated_set_flags(
13175 &self,
13176 mut flags: OpenFlags,
13177 ___deadline: zx::MonotonicInstant,
13178 ) -> Result<i32, fidl::Error> {
13179 let _response = self.client.send_query::<
13180 NodeDeprecatedSetFlagsRequest,
13181 NodeDeprecatedSetFlagsResponse,
13182 NodeMarker,
13183 >(
13184 (flags,),
13185 0x5295b76c71fde733,
13186 fidl::encoding::DynamicFlags::empty(),
13187 ___deadline,
13188 )?;
13189 Ok(_response.s)
13190 }
13191
13192 pub fn r#get_flags(
13201 &self,
13202 ___deadline: zx::MonotonicInstant,
13203 ) -> Result<NodeGetFlagsResult, fidl::Error> {
13204 let _response = self.client.send_query::<
13205 fidl::encoding::EmptyPayload,
13206 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
13207 NodeMarker,
13208 >(
13209 (),
13210 0x176eb318f64ec23,
13211 fidl::encoding::DynamicFlags::FLEXIBLE,
13212 ___deadline,
13213 )?
13214 .into_result::<NodeMarker>("get_flags")?;
13215 Ok(_response.map(|x| x.flags))
13216 }
13217
13218 pub fn r#set_flags(
13228 &self,
13229 mut flags: Flags,
13230 ___deadline: zx::MonotonicInstant,
13231 ) -> Result<NodeSetFlagsResult, fidl::Error> {
13232 let _response = self.client.send_query::<
13233 NodeSetFlagsRequest,
13234 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
13235 NodeMarker,
13236 >(
13237 (flags,),
13238 0x55a8028685791ea8,
13239 fidl::encoding::DynamicFlags::FLEXIBLE,
13240 ___deadline,
13241 )?
13242 .into_result::<NodeMarker>("set_flags")?;
13243 Ok(_response.map(|x| x))
13244 }
13245
13246 pub fn r#query_filesystem(
13250 &self,
13251 ___deadline: zx::MonotonicInstant,
13252 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
13253 let _response = self
13254 .client
13255 .send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse, NodeMarker>(
13256 (),
13257 0x6f344a1c6b0a0610,
13258 fidl::encoding::DynamicFlags::empty(),
13259 ___deadline,
13260 )?;
13261 Ok((_response.s, _response.info))
13262 }
13263
13264 pub fn r#get_attributes(
13278 &self,
13279 mut query: NodeAttributesQuery,
13280 ___deadline: zx::MonotonicInstant,
13281 ) -> Result<NodeGetAttributesResult, fidl::Error> {
13282 let _response = self.client.send_query::<
13283 NodeGetAttributesRequest,
13284 fidl::encoding::ResultType<NodeAttributes2, i32>,
13285 NodeMarker,
13286 >(
13287 (query,),
13288 0x3d4396a638ea053b,
13289 fidl::encoding::DynamicFlags::empty(),
13290 ___deadline,
13291 )?;
13292 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
13293 }
13294
13295 pub fn r#update_attributes(
13304 &self,
13305 mut payload: &MutableNodeAttributes,
13306 ___deadline: zx::MonotonicInstant,
13307 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
13308 let _response = self.client.send_query::<
13309 MutableNodeAttributes,
13310 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13311 NodeMarker,
13312 >(
13313 payload,
13314 0x3308c1da5a89bf08,
13315 fidl::encoding::DynamicFlags::empty(),
13316 ___deadline,
13317 )?;
13318 Ok(_response.map(|x| x))
13319 }
13320
13321 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
13331 let _response = self.client.send_query::<
13332 fidl::encoding::EmptyPayload,
13333 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13334 NodeMarker,
13335 >(
13336 (),
13337 0x2c5c27ca0ab5dc49,
13338 fidl::encoding::DynamicFlags::empty(),
13339 ___deadline,
13340 )?;
13341 Ok(_response.map(|x| x))
13342 }
13343
13344 pub fn r#list_extended_attributes(
13353 &self,
13354 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13355 ) -> Result<(), fidl::Error> {
13356 self.client.send::<NodeListExtendedAttributesRequest>(
13357 (iterator,),
13358 0x4b61033de007fcd0,
13359 fidl::encoding::DynamicFlags::empty(),
13360 )
13361 }
13362
13363 pub fn r#get_extended_attribute(
13370 &self,
13371 mut name: &[u8],
13372 ___deadline: zx::MonotonicInstant,
13373 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
13374 let _response = self.client.send_query::<
13375 NodeGetExtendedAttributeRequest,
13376 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
13377 NodeMarker,
13378 >(
13379 (name,),
13380 0x45ffa3ccfdeb76db,
13381 fidl::encoding::DynamicFlags::empty(),
13382 ___deadline,
13383 )?;
13384 Ok(_response.map(|x| x))
13385 }
13386
13387 pub fn r#set_extended_attribute(
13395 &self,
13396 mut name: &[u8],
13397 mut value: ExtendedAttributeValue,
13398 mut mode: SetExtendedAttributeMode,
13399 ___deadline: zx::MonotonicInstant,
13400 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
13401 let _response = self.client.send_query::<
13402 NodeSetExtendedAttributeRequest,
13403 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13404 NodeMarker,
13405 >(
13406 (name, &mut value, mode,),
13407 0x4a951362f681f23c,
13408 fidl::encoding::DynamicFlags::empty(),
13409 ___deadline,
13410 )?;
13411 Ok(_response.map(|x| x))
13412 }
13413
13414 pub fn r#remove_extended_attribute(
13420 &self,
13421 mut name: &[u8],
13422 ___deadline: zx::MonotonicInstant,
13423 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
13424 let _response = self.client.send_query::<
13425 NodeRemoveExtendedAttributeRequest,
13426 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13427 NodeMarker,
13428 >(
13429 (name,),
13430 0x7a0b9f3a9bf9032d,
13431 fidl::encoding::DynamicFlags::empty(),
13432 ___deadline,
13433 )?;
13434 Ok(_response.map(|x| x))
13435 }
13436}
13437
13438#[cfg(target_os = "fuchsia")]
13439impl From<NodeSynchronousProxy> for zx::NullableHandle {
13440 fn from(value: NodeSynchronousProxy) -> Self {
13441 value.into_channel().into()
13442 }
13443}
13444
13445#[cfg(target_os = "fuchsia")]
13446impl From<fidl::Channel> for NodeSynchronousProxy {
13447 fn from(value: fidl::Channel) -> Self {
13448 Self::new(value)
13449 }
13450}
13451
13452#[cfg(target_os = "fuchsia")]
13453impl fidl::endpoints::FromClient for NodeSynchronousProxy {
13454 type Protocol = NodeMarker;
13455
13456 fn from_client(value: fidl::endpoints::ClientEnd<NodeMarker>) -> Self {
13457 Self::new(value.into_channel())
13458 }
13459}
13460
13461#[derive(Debug, Clone)]
13462pub struct NodeProxy {
13463 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
13464}
13465
13466impl fidl::endpoints::Proxy for NodeProxy {
13467 type Protocol = NodeMarker;
13468
13469 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
13470 Self::new(inner)
13471 }
13472
13473 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
13474 self.client.into_channel().map_err(|client| Self { client })
13475 }
13476
13477 fn as_channel(&self) -> &::fidl::AsyncChannel {
13478 self.client.as_channel()
13479 }
13480}
13481
13482impl NodeProxy {
13483 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
13485 let protocol_name = <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
13486 Self { client: fidl::client::Client::new(channel, protocol_name) }
13487 }
13488
13489 pub fn take_event_stream(&self) -> NodeEventStream {
13495 NodeEventStream { event_receiver: self.client.take_event_receiver() }
13496 }
13497
13498 pub fn r#clone(
13499 &self,
13500 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13501 ) -> Result<(), fidl::Error> {
13502 NodeProxyInterface::r#clone(self, request)
13503 }
13504
13505 pub fn r#close(
13516 &self,
13517 ) -> fidl::client::QueryResponseFut<
13518 fidl_fuchsia_unknown::CloseableCloseResult,
13519 fidl::encoding::DefaultFuchsiaResourceDialect,
13520 > {
13521 NodeProxyInterface::r#close(self)
13522 }
13523
13524 pub fn r#query(
13525 &self,
13526 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
13527 {
13528 NodeProxyInterface::r#query(self)
13529 }
13530
13531 pub fn r#deprecated_clone(
13533 &self,
13534 mut flags: OpenFlags,
13535 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13536 ) -> Result<(), fidl::Error> {
13537 NodeProxyInterface::r#deprecated_clone(self, flags, object)
13538 }
13539
13540 pub fn r#deprecated_get_attr(
13544 &self,
13545 ) -> fidl::client::QueryResponseFut<
13546 (i32, NodeAttributes),
13547 fidl::encoding::DefaultFuchsiaResourceDialect,
13548 > {
13549 NodeProxyInterface::r#deprecated_get_attr(self)
13550 }
13551
13552 pub fn r#deprecated_set_attr(
13554 &self,
13555 mut flags: NodeAttributeFlags,
13556 mut attributes: &NodeAttributes,
13557 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13558 NodeProxyInterface::r#deprecated_set_attr(self, flags, attributes)
13559 }
13560
13561 pub fn r#deprecated_get_flags(
13563 &self,
13564 ) -> fidl::client::QueryResponseFut<
13565 (i32, OpenFlags),
13566 fidl::encoding::DefaultFuchsiaResourceDialect,
13567 > {
13568 NodeProxyInterface::r#deprecated_get_flags(self)
13569 }
13570
13571 pub fn r#deprecated_set_flags(
13573 &self,
13574 mut flags: OpenFlags,
13575 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
13576 NodeProxyInterface::r#deprecated_set_flags(self, flags)
13577 }
13578
13579 pub fn r#get_flags(
13588 &self,
13589 ) -> fidl::client::QueryResponseFut<
13590 NodeGetFlagsResult,
13591 fidl::encoding::DefaultFuchsiaResourceDialect,
13592 > {
13593 NodeProxyInterface::r#get_flags(self)
13594 }
13595
13596 pub fn r#set_flags(
13606 &self,
13607 mut flags: Flags,
13608 ) -> fidl::client::QueryResponseFut<
13609 NodeSetFlagsResult,
13610 fidl::encoding::DefaultFuchsiaResourceDialect,
13611 > {
13612 NodeProxyInterface::r#set_flags(self, flags)
13613 }
13614
13615 pub fn r#query_filesystem(
13619 &self,
13620 ) -> fidl::client::QueryResponseFut<
13621 (i32, Option<Box<FilesystemInfo>>),
13622 fidl::encoding::DefaultFuchsiaResourceDialect,
13623 > {
13624 NodeProxyInterface::r#query_filesystem(self)
13625 }
13626
13627 pub fn r#get_attributes(
13641 &self,
13642 mut query: NodeAttributesQuery,
13643 ) -> fidl::client::QueryResponseFut<
13644 NodeGetAttributesResult,
13645 fidl::encoding::DefaultFuchsiaResourceDialect,
13646 > {
13647 NodeProxyInterface::r#get_attributes(self, query)
13648 }
13649
13650 pub fn r#update_attributes(
13659 &self,
13660 mut payload: &MutableNodeAttributes,
13661 ) -> fidl::client::QueryResponseFut<
13662 NodeUpdateAttributesResult,
13663 fidl::encoding::DefaultFuchsiaResourceDialect,
13664 > {
13665 NodeProxyInterface::r#update_attributes(self, payload)
13666 }
13667
13668 pub fn r#sync(
13678 &self,
13679 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
13680 {
13681 NodeProxyInterface::r#sync(self)
13682 }
13683
13684 pub fn r#list_extended_attributes(
13693 &self,
13694 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
13695 ) -> Result<(), fidl::Error> {
13696 NodeProxyInterface::r#list_extended_attributes(self, iterator)
13697 }
13698
13699 pub fn r#get_extended_attribute(
13706 &self,
13707 mut name: &[u8],
13708 ) -> fidl::client::QueryResponseFut<
13709 NodeGetExtendedAttributeResult,
13710 fidl::encoding::DefaultFuchsiaResourceDialect,
13711 > {
13712 NodeProxyInterface::r#get_extended_attribute(self, name)
13713 }
13714
13715 pub fn r#set_extended_attribute(
13723 &self,
13724 mut name: &[u8],
13725 mut value: ExtendedAttributeValue,
13726 mut mode: SetExtendedAttributeMode,
13727 ) -> fidl::client::QueryResponseFut<
13728 NodeSetExtendedAttributeResult,
13729 fidl::encoding::DefaultFuchsiaResourceDialect,
13730 > {
13731 NodeProxyInterface::r#set_extended_attribute(self, name, value, mode)
13732 }
13733
13734 pub fn r#remove_extended_attribute(
13740 &self,
13741 mut name: &[u8],
13742 ) -> fidl::client::QueryResponseFut<
13743 NodeRemoveExtendedAttributeResult,
13744 fidl::encoding::DefaultFuchsiaResourceDialect,
13745 > {
13746 NodeProxyInterface::r#remove_extended_attribute(self, name)
13747 }
13748}
13749
13750impl NodeProxyInterface for NodeProxy {
13751 fn r#clone(
13752 &self,
13753 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
13754 ) -> Result<(), fidl::Error> {
13755 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
13756 (request,),
13757 0x20d8a7aba2168a79,
13758 fidl::encoding::DynamicFlags::empty(),
13759 )
13760 }
13761
13762 type CloseResponseFut = fidl::client::QueryResponseFut<
13763 fidl_fuchsia_unknown::CloseableCloseResult,
13764 fidl::encoding::DefaultFuchsiaResourceDialect,
13765 >;
13766 fn r#close(&self) -> Self::CloseResponseFut {
13767 fn _decode(
13768 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13769 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
13770 let _response = fidl::client::decode_transaction_body::<
13771 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
13772 fidl::encoding::DefaultFuchsiaResourceDialect,
13773 0x5ac5d459ad7f657e,
13774 >(_buf?)?;
13775 Ok(_response.map(|x| x))
13776 }
13777 self.client.send_query_and_decode::<
13778 fidl::encoding::EmptyPayload,
13779 fidl_fuchsia_unknown::CloseableCloseResult,
13780 >(
13781 (),
13782 0x5ac5d459ad7f657e,
13783 fidl::encoding::DynamicFlags::empty(),
13784 _decode,
13785 )
13786 }
13787
13788 type QueryResponseFut =
13789 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
13790 fn r#query(&self) -> Self::QueryResponseFut {
13791 fn _decode(
13792 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13793 ) -> Result<Vec<u8>, fidl::Error> {
13794 let _response = fidl::client::decode_transaction_body::<
13795 fidl_fuchsia_unknown::QueryableQueryResponse,
13796 fidl::encoding::DefaultFuchsiaResourceDialect,
13797 0x2658edee9decfc06,
13798 >(_buf?)?;
13799 Ok(_response.protocol)
13800 }
13801 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
13802 (),
13803 0x2658edee9decfc06,
13804 fidl::encoding::DynamicFlags::empty(),
13805 _decode,
13806 )
13807 }
13808
13809 fn r#deprecated_clone(
13810 &self,
13811 mut flags: OpenFlags,
13812 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
13813 ) -> Result<(), fidl::Error> {
13814 self.client.send::<NodeDeprecatedCloneRequest>(
13815 (flags, object),
13816 0x5a61678f293ce16f,
13817 fidl::encoding::DynamicFlags::FLEXIBLE,
13818 )
13819 }
13820
13821 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
13822 (i32, NodeAttributes),
13823 fidl::encoding::DefaultFuchsiaResourceDialect,
13824 >;
13825 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
13826 fn _decode(
13827 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13828 ) -> Result<(i32, NodeAttributes), fidl::Error> {
13829 let _response = fidl::client::decode_transaction_body::<
13830 NodeDeprecatedGetAttrResponse,
13831 fidl::encoding::DefaultFuchsiaResourceDialect,
13832 0x78985e216314dafd,
13833 >(_buf?)?;
13834 Ok((_response.s, _response.attributes))
13835 }
13836 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
13837 (),
13838 0x78985e216314dafd,
13839 fidl::encoding::DynamicFlags::empty(),
13840 _decode,
13841 )
13842 }
13843
13844 type DeprecatedSetAttrResponseFut =
13845 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
13846 fn r#deprecated_set_attr(
13847 &self,
13848 mut flags: NodeAttributeFlags,
13849 mut attributes: &NodeAttributes,
13850 ) -> Self::DeprecatedSetAttrResponseFut {
13851 fn _decode(
13852 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13853 ) -> Result<i32, fidl::Error> {
13854 let _response = fidl::client::decode_transaction_body::<
13855 NodeDeprecatedSetAttrResponse,
13856 fidl::encoding::DefaultFuchsiaResourceDialect,
13857 0x4186c0f40d938f46,
13858 >(_buf?)?;
13859 Ok(_response.s)
13860 }
13861 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
13862 (flags, attributes),
13863 0x4186c0f40d938f46,
13864 fidl::encoding::DynamicFlags::empty(),
13865 _decode,
13866 )
13867 }
13868
13869 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
13870 (i32, OpenFlags),
13871 fidl::encoding::DefaultFuchsiaResourceDialect,
13872 >;
13873 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
13874 fn _decode(
13875 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13876 ) -> Result<(i32, OpenFlags), fidl::Error> {
13877 let _response = fidl::client::decode_transaction_body::<
13878 NodeDeprecatedGetFlagsResponse,
13879 fidl::encoding::DefaultFuchsiaResourceDialect,
13880 0x5b88fffb8eda3aa1,
13881 >(_buf?)?;
13882 Ok((_response.s, _response.flags))
13883 }
13884 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
13885 (),
13886 0x5b88fffb8eda3aa1,
13887 fidl::encoding::DynamicFlags::empty(),
13888 _decode,
13889 )
13890 }
13891
13892 type DeprecatedSetFlagsResponseFut =
13893 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
13894 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
13895 fn _decode(
13896 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13897 ) -> Result<i32, fidl::Error> {
13898 let _response = fidl::client::decode_transaction_body::<
13899 NodeDeprecatedSetFlagsResponse,
13900 fidl::encoding::DefaultFuchsiaResourceDialect,
13901 0x5295b76c71fde733,
13902 >(_buf?)?;
13903 Ok(_response.s)
13904 }
13905 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
13906 (flags,),
13907 0x5295b76c71fde733,
13908 fidl::encoding::DynamicFlags::empty(),
13909 _decode,
13910 )
13911 }
13912
13913 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
13914 NodeGetFlagsResult,
13915 fidl::encoding::DefaultFuchsiaResourceDialect,
13916 >;
13917 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
13918 fn _decode(
13919 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13920 ) -> Result<NodeGetFlagsResult, fidl::Error> {
13921 let _response = fidl::client::decode_transaction_body::<
13922 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
13923 fidl::encoding::DefaultFuchsiaResourceDialect,
13924 0x176eb318f64ec23,
13925 >(_buf?)?
13926 .into_result::<NodeMarker>("get_flags")?;
13927 Ok(_response.map(|x| x.flags))
13928 }
13929 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
13930 (),
13931 0x176eb318f64ec23,
13932 fidl::encoding::DynamicFlags::FLEXIBLE,
13933 _decode,
13934 )
13935 }
13936
13937 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
13938 NodeSetFlagsResult,
13939 fidl::encoding::DefaultFuchsiaResourceDialect,
13940 >;
13941 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
13942 fn _decode(
13943 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13944 ) -> Result<NodeSetFlagsResult, fidl::Error> {
13945 let _response = fidl::client::decode_transaction_body::<
13946 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
13947 fidl::encoding::DefaultFuchsiaResourceDialect,
13948 0x55a8028685791ea8,
13949 >(_buf?)?
13950 .into_result::<NodeMarker>("set_flags")?;
13951 Ok(_response.map(|x| x))
13952 }
13953 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
13954 (flags,),
13955 0x55a8028685791ea8,
13956 fidl::encoding::DynamicFlags::FLEXIBLE,
13957 _decode,
13958 )
13959 }
13960
13961 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
13962 (i32, Option<Box<FilesystemInfo>>),
13963 fidl::encoding::DefaultFuchsiaResourceDialect,
13964 >;
13965 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
13966 fn _decode(
13967 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13968 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
13969 let _response = fidl::client::decode_transaction_body::<
13970 NodeQueryFilesystemResponse,
13971 fidl::encoding::DefaultFuchsiaResourceDialect,
13972 0x6f344a1c6b0a0610,
13973 >(_buf?)?;
13974 Ok((_response.s, _response.info))
13975 }
13976 self.client.send_query_and_decode::<
13977 fidl::encoding::EmptyPayload,
13978 (i32, Option<Box<FilesystemInfo>>),
13979 >(
13980 (),
13981 0x6f344a1c6b0a0610,
13982 fidl::encoding::DynamicFlags::empty(),
13983 _decode,
13984 )
13985 }
13986
13987 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
13988 NodeGetAttributesResult,
13989 fidl::encoding::DefaultFuchsiaResourceDialect,
13990 >;
13991 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
13992 fn _decode(
13993 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
13994 ) -> Result<NodeGetAttributesResult, fidl::Error> {
13995 let _response = fidl::client::decode_transaction_body::<
13996 fidl::encoding::ResultType<NodeAttributes2, i32>,
13997 fidl::encoding::DefaultFuchsiaResourceDialect,
13998 0x3d4396a638ea053b,
13999 >(_buf?)?;
14000 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
14001 }
14002 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
14003 (query,),
14004 0x3d4396a638ea053b,
14005 fidl::encoding::DynamicFlags::empty(),
14006 _decode,
14007 )
14008 }
14009
14010 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
14011 NodeUpdateAttributesResult,
14012 fidl::encoding::DefaultFuchsiaResourceDialect,
14013 >;
14014 fn r#update_attributes(
14015 &self,
14016 mut payload: &MutableNodeAttributes,
14017 ) -> Self::UpdateAttributesResponseFut {
14018 fn _decode(
14019 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14020 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
14021 let _response = fidl::client::decode_transaction_body::<
14022 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14023 fidl::encoding::DefaultFuchsiaResourceDialect,
14024 0x3308c1da5a89bf08,
14025 >(_buf?)?;
14026 Ok(_response.map(|x| x))
14027 }
14028 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
14029 payload,
14030 0x3308c1da5a89bf08,
14031 fidl::encoding::DynamicFlags::empty(),
14032 _decode,
14033 )
14034 }
14035
14036 type SyncResponseFut = fidl::client::QueryResponseFut<
14037 NodeSyncResult,
14038 fidl::encoding::DefaultFuchsiaResourceDialect,
14039 >;
14040 fn r#sync(&self) -> Self::SyncResponseFut {
14041 fn _decode(
14042 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14043 ) -> Result<NodeSyncResult, fidl::Error> {
14044 let _response = fidl::client::decode_transaction_body::<
14045 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14046 fidl::encoding::DefaultFuchsiaResourceDialect,
14047 0x2c5c27ca0ab5dc49,
14048 >(_buf?)?;
14049 Ok(_response.map(|x| x))
14050 }
14051 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
14052 (),
14053 0x2c5c27ca0ab5dc49,
14054 fidl::encoding::DynamicFlags::empty(),
14055 _decode,
14056 )
14057 }
14058
14059 fn r#list_extended_attributes(
14060 &self,
14061 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
14062 ) -> Result<(), fidl::Error> {
14063 self.client.send::<NodeListExtendedAttributesRequest>(
14064 (iterator,),
14065 0x4b61033de007fcd0,
14066 fidl::encoding::DynamicFlags::empty(),
14067 )
14068 }
14069
14070 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14071 NodeGetExtendedAttributeResult,
14072 fidl::encoding::DefaultFuchsiaResourceDialect,
14073 >;
14074 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
14075 fn _decode(
14076 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14077 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
14078 let _response = fidl::client::decode_transaction_body::<
14079 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
14080 fidl::encoding::DefaultFuchsiaResourceDialect,
14081 0x45ffa3ccfdeb76db,
14082 >(_buf?)?;
14083 Ok(_response.map(|x| x))
14084 }
14085 self.client.send_query_and_decode::<
14086 NodeGetExtendedAttributeRequest,
14087 NodeGetExtendedAttributeResult,
14088 >(
14089 (name,),
14090 0x45ffa3ccfdeb76db,
14091 fidl::encoding::DynamicFlags::empty(),
14092 _decode,
14093 )
14094 }
14095
14096 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14097 NodeSetExtendedAttributeResult,
14098 fidl::encoding::DefaultFuchsiaResourceDialect,
14099 >;
14100 fn r#set_extended_attribute(
14101 &self,
14102 mut name: &[u8],
14103 mut value: ExtendedAttributeValue,
14104 mut mode: SetExtendedAttributeMode,
14105 ) -> Self::SetExtendedAttributeResponseFut {
14106 fn _decode(
14107 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14108 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
14109 let _response = fidl::client::decode_transaction_body::<
14110 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14111 fidl::encoding::DefaultFuchsiaResourceDialect,
14112 0x4a951362f681f23c,
14113 >(_buf?)?;
14114 Ok(_response.map(|x| x))
14115 }
14116 self.client.send_query_and_decode::<
14117 NodeSetExtendedAttributeRequest,
14118 NodeSetExtendedAttributeResult,
14119 >(
14120 (name, &mut value, mode,),
14121 0x4a951362f681f23c,
14122 fidl::encoding::DynamicFlags::empty(),
14123 _decode,
14124 )
14125 }
14126
14127 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
14128 NodeRemoveExtendedAttributeResult,
14129 fidl::encoding::DefaultFuchsiaResourceDialect,
14130 >;
14131 fn r#remove_extended_attribute(
14132 &self,
14133 mut name: &[u8],
14134 ) -> Self::RemoveExtendedAttributeResponseFut {
14135 fn _decode(
14136 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
14137 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
14138 let _response = fidl::client::decode_transaction_body::<
14139 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
14140 fidl::encoding::DefaultFuchsiaResourceDialect,
14141 0x7a0b9f3a9bf9032d,
14142 >(_buf?)?;
14143 Ok(_response.map(|x| x))
14144 }
14145 self.client.send_query_and_decode::<
14146 NodeRemoveExtendedAttributeRequest,
14147 NodeRemoveExtendedAttributeResult,
14148 >(
14149 (name,),
14150 0x7a0b9f3a9bf9032d,
14151 fidl::encoding::DynamicFlags::empty(),
14152 _decode,
14153 )
14154 }
14155}
14156
14157pub struct NodeEventStream {
14158 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
14159}
14160
14161impl std::marker::Unpin for NodeEventStream {}
14162
14163impl futures::stream::FusedStream for NodeEventStream {
14164 fn is_terminated(&self) -> bool {
14165 self.event_receiver.is_terminated()
14166 }
14167}
14168
14169impl futures::Stream for NodeEventStream {
14170 type Item = Result<NodeEvent, fidl::Error>;
14171
14172 fn poll_next(
14173 mut self: std::pin::Pin<&mut Self>,
14174 cx: &mut std::task::Context<'_>,
14175 ) -> std::task::Poll<Option<Self::Item>> {
14176 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
14177 &mut self.event_receiver,
14178 cx
14179 )?) {
14180 Some(buf) => std::task::Poll::Ready(Some(NodeEvent::decode(buf))),
14181 None => std::task::Poll::Ready(None),
14182 }
14183 }
14184}
14185
14186#[derive(Debug)]
14187pub enum NodeEvent {
14188 OnOpen_ {
14189 s: i32,
14190 info: Option<Box<NodeInfoDeprecated>>,
14191 },
14192 OnRepresentation {
14193 payload: Representation,
14194 },
14195 #[non_exhaustive]
14196 _UnknownEvent {
14197 ordinal: u64,
14199 },
14200}
14201
14202impl NodeEvent {
14203 #[allow(irrefutable_let_patterns)]
14204 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
14205 if let NodeEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
14206 }
14207 #[allow(irrefutable_let_patterns)]
14208 pub fn into_on_representation(self) -> Option<Representation> {
14209 if let NodeEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
14210 }
14211
14212 fn decode(
14214 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
14215 ) -> Result<NodeEvent, fidl::Error> {
14216 let (bytes, _handles) = buf.split_mut();
14217 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14218 debug_assert_eq!(tx_header.tx_id, 0);
14219 match tx_header.ordinal {
14220 0x7fc7bbb1dbfd1972 => {
14221 let mut out = fidl::new_empty!(
14222 NodeOnOpenRequest,
14223 fidl::encoding::DefaultFuchsiaResourceDialect
14224 );
14225 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
14226 Ok((NodeEvent::OnOpen_ { s: out.s, info: out.info }))
14227 }
14228 0x5cb40567d80a510c => {
14229 let mut out =
14230 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
14231 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
14232 Ok((NodeEvent::OnRepresentation { payload: out }))
14233 }
14234 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
14235 Ok(NodeEvent::_UnknownEvent { ordinal: tx_header.ordinal })
14236 }
14237 _ => Err(fidl::Error::UnknownOrdinal {
14238 ordinal: tx_header.ordinal,
14239 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14240 }),
14241 }
14242 }
14243}
14244
14245pub struct NodeRequestStream {
14247 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14248 is_terminated: bool,
14249}
14250
14251impl std::marker::Unpin for NodeRequestStream {}
14252
14253impl futures::stream::FusedStream for NodeRequestStream {
14254 fn is_terminated(&self) -> bool {
14255 self.is_terminated
14256 }
14257}
14258
14259impl fidl::endpoints::RequestStream for NodeRequestStream {
14260 type Protocol = NodeMarker;
14261 type ControlHandle = NodeControlHandle;
14262
14263 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
14264 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
14265 }
14266
14267 fn control_handle(&self) -> Self::ControlHandle {
14268 NodeControlHandle { inner: self.inner.clone() }
14269 }
14270
14271 fn into_inner(
14272 self,
14273 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
14274 {
14275 (self.inner, self.is_terminated)
14276 }
14277
14278 fn from_inner(
14279 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
14280 is_terminated: bool,
14281 ) -> Self {
14282 Self { inner, is_terminated }
14283 }
14284}
14285
14286impl futures::Stream for NodeRequestStream {
14287 type Item = Result<NodeRequest, fidl::Error>;
14288
14289 fn poll_next(
14290 mut self: std::pin::Pin<&mut Self>,
14291 cx: &mut std::task::Context<'_>,
14292 ) -> std::task::Poll<Option<Self::Item>> {
14293 let this = &mut *self;
14294 if this.inner.check_shutdown(cx) {
14295 this.is_terminated = true;
14296 return std::task::Poll::Ready(None);
14297 }
14298 if this.is_terminated {
14299 panic!("polled NodeRequestStream after completion");
14300 }
14301 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
14302 |bytes, handles| {
14303 match this.inner.channel().read_etc(cx, bytes, handles) {
14304 std::task::Poll::Ready(Ok(())) => {}
14305 std::task::Poll::Pending => return std::task::Poll::Pending,
14306 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
14307 this.is_terminated = true;
14308 return std::task::Poll::Ready(None);
14309 }
14310 std::task::Poll::Ready(Err(e)) => {
14311 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
14312 e.into(),
14313 ))));
14314 }
14315 }
14316
14317 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
14319
14320 std::task::Poll::Ready(Some(match header.ordinal {
14321 0x20d8a7aba2168a79 => {
14322 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14323 let mut req = fidl::new_empty!(
14324 fidl_fuchsia_unknown::CloneableCloneRequest,
14325 fidl::encoding::DefaultFuchsiaResourceDialect
14326 );
14327 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14328 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14329 Ok(NodeRequest::Clone { request: req.request, control_handle })
14330 }
14331 0x5ac5d459ad7f657e => {
14332 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14333 let mut req = fidl::new_empty!(
14334 fidl::encoding::EmptyPayload,
14335 fidl::encoding::DefaultFuchsiaResourceDialect
14336 );
14337 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14338 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14339 Ok(NodeRequest::Close {
14340 responder: NodeCloseResponder {
14341 control_handle: std::mem::ManuallyDrop::new(control_handle),
14342 tx_id: header.tx_id,
14343 },
14344 })
14345 }
14346 0x2658edee9decfc06 => {
14347 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14348 let mut req = fidl::new_empty!(
14349 fidl::encoding::EmptyPayload,
14350 fidl::encoding::DefaultFuchsiaResourceDialect
14351 );
14352 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14353 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14354 Ok(NodeRequest::Query {
14355 responder: NodeQueryResponder {
14356 control_handle: std::mem::ManuallyDrop::new(control_handle),
14357 tx_id: header.tx_id,
14358 },
14359 })
14360 }
14361 0x5a61678f293ce16f => {
14362 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14363 let mut req = fidl::new_empty!(
14364 NodeDeprecatedCloneRequest,
14365 fidl::encoding::DefaultFuchsiaResourceDialect
14366 );
14367 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
14368 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14369 Ok(NodeRequest::DeprecatedClone {
14370 flags: req.flags,
14371 object: req.object,
14372
14373 control_handle,
14374 })
14375 }
14376 0x78985e216314dafd => {
14377 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14378 let mut req = fidl::new_empty!(
14379 fidl::encoding::EmptyPayload,
14380 fidl::encoding::DefaultFuchsiaResourceDialect
14381 );
14382 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14383 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14384 Ok(NodeRequest::DeprecatedGetAttr {
14385 responder: NodeDeprecatedGetAttrResponder {
14386 control_handle: std::mem::ManuallyDrop::new(control_handle),
14387 tx_id: header.tx_id,
14388 },
14389 })
14390 }
14391 0x4186c0f40d938f46 => {
14392 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14393 let mut req = fidl::new_empty!(
14394 NodeDeprecatedSetAttrRequest,
14395 fidl::encoding::DefaultFuchsiaResourceDialect
14396 );
14397 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
14398 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14399 Ok(NodeRequest::DeprecatedSetAttr {
14400 flags: req.flags,
14401 attributes: req.attributes,
14402
14403 responder: NodeDeprecatedSetAttrResponder {
14404 control_handle: std::mem::ManuallyDrop::new(control_handle),
14405 tx_id: header.tx_id,
14406 },
14407 })
14408 }
14409 0x5b88fffb8eda3aa1 => {
14410 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14411 let mut req = fidl::new_empty!(
14412 fidl::encoding::EmptyPayload,
14413 fidl::encoding::DefaultFuchsiaResourceDialect
14414 );
14415 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14416 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14417 Ok(NodeRequest::DeprecatedGetFlags {
14418 responder: NodeDeprecatedGetFlagsResponder {
14419 control_handle: std::mem::ManuallyDrop::new(control_handle),
14420 tx_id: header.tx_id,
14421 },
14422 })
14423 }
14424 0x5295b76c71fde733 => {
14425 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14426 let mut req = fidl::new_empty!(
14427 NodeDeprecatedSetFlagsRequest,
14428 fidl::encoding::DefaultFuchsiaResourceDialect
14429 );
14430 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14431 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14432 Ok(NodeRequest::DeprecatedSetFlags {
14433 flags: req.flags,
14434
14435 responder: NodeDeprecatedSetFlagsResponder {
14436 control_handle: std::mem::ManuallyDrop::new(control_handle),
14437 tx_id: header.tx_id,
14438 },
14439 })
14440 }
14441 0x176eb318f64ec23 => {
14442 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14443 let mut req = fidl::new_empty!(
14444 fidl::encoding::EmptyPayload,
14445 fidl::encoding::DefaultFuchsiaResourceDialect
14446 );
14447 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14448 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14449 Ok(NodeRequest::GetFlags {
14450 responder: NodeGetFlagsResponder {
14451 control_handle: std::mem::ManuallyDrop::new(control_handle),
14452 tx_id: header.tx_id,
14453 },
14454 })
14455 }
14456 0x55a8028685791ea8 => {
14457 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14458 let mut req = fidl::new_empty!(
14459 NodeSetFlagsRequest,
14460 fidl::encoding::DefaultFuchsiaResourceDialect
14461 );
14462 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
14463 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14464 Ok(NodeRequest::SetFlags {
14465 flags: req.flags,
14466
14467 responder: NodeSetFlagsResponder {
14468 control_handle: std::mem::ManuallyDrop::new(control_handle),
14469 tx_id: header.tx_id,
14470 },
14471 })
14472 }
14473 0x6f344a1c6b0a0610 => {
14474 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14475 let mut req = fidl::new_empty!(
14476 fidl::encoding::EmptyPayload,
14477 fidl::encoding::DefaultFuchsiaResourceDialect
14478 );
14479 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14480 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14481 Ok(NodeRequest::QueryFilesystem {
14482 responder: NodeQueryFilesystemResponder {
14483 control_handle: std::mem::ManuallyDrop::new(control_handle),
14484 tx_id: header.tx_id,
14485 },
14486 })
14487 }
14488 0x3d4396a638ea053b => {
14489 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14490 let mut req = fidl::new_empty!(
14491 NodeGetAttributesRequest,
14492 fidl::encoding::DefaultFuchsiaResourceDialect
14493 );
14494 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14495 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14496 Ok(NodeRequest::GetAttributes {
14497 query: req.query,
14498
14499 responder: NodeGetAttributesResponder {
14500 control_handle: std::mem::ManuallyDrop::new(control_handle),
14501 tx_id: header.tx_id,
14502 },
14503 })
14504 }
14505 0x3308c1da5a89bf08 => {
14506 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14507 let mut req = fidl::new_empty!(
14508 MutableNodeAttributes,
14509 fidl::encoding::DefaultFuchsiaResourceDialect
14510 );
14511 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
14512 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14513 Ok(NodeRequest::UpdateAttributes {
14514 payload: req,
14515 responder: NodeUpdateAttributesResponder {
14516 control_handle: std::mem::ManuallyDrop::new(control_handle),
14517 tx_id: header.tx_id,
14518 },
14519 })
14520 }
14521 0x2c5c27ca0ab5dc49 => {
14522 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14523 let mut req = fidl::new_empty!(
14524 fidl::encoding::EmptyPayload,
14525 fidl::encoding::DefaultFuchsiaResourceDialect
14526 );
14527 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
14528 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14529 Ok(NodeRequest::Sync {
14530 responder: NodeSyncResponder {
14531 control_handle: std::mem::ManuallyDrop::new(control_handle),
14532 tx_id: header.tx_id,
14533 },
14534 })
14535 }
14536 0x4b61033de007fcd0 => {
14537 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
14538 let mut req = fidl::new_empty!(
14539 NodeListExtendedAttributesRequest,
14540 fidl::encoding::DefaultFuchsiaResourceDialect
14541 );
14542 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
14543 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14544 Ok(NodeRequest::ListExtendedAttributes {
14545 iterator: req.iterator,
14546
14547 control_handle,
14548 })
14549 }
14550 0x45ffa3ccfdeb76db => {
14551 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14552 let mut req = fidl::new_empty!(
14553 NodeGetExtendedAttributeRequest,
14554 fidl::encoding::DefaultFuchsiaResourceDialect
14555 );
14556 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14557 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14558 Ok(NodeRequest::GetExtendedAttribute {
14559 name: req.name,
14560
14561 responder: NodeGetExtendedAttributeResponder {
14562 control_handle: std::mem::ManuallyDrop::new(control_handle),
14563 tx_id: header.tx_id,
14564 },
14565 })
14566 }
14567 0x4a951362f681f23c => {
14568 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14569 let mut req = fidl::new_empty!(
14570 NodeSetExtendedAttributeRequest,
14571 fidl::encoding::DefaultFuchsiaResourceDialect
14572 );
14573 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14574 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14575 Ok(NodeRequest::SetExtendedAttribute {
14576 name: req.name,
14577 value: req.value,
14578 mode: req.mode,
14579
14580 responder: NodeSetExtendedAttributeResponder {
14581 control_handle: std::mem::ManuallyDrop::new(control_handle),
14582 tx_id: header.tx_id,
14583 },
14584 })
14585 }
14586 0x7a0b9f3a9bf9032d => {
14587 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
14588 let mut req = fidl::new_empty!(
14589 NodeRemoveExtendedAttributeRequest,
14590 fidl::encoding::DefaultFuchsiaResourceDialect
14591 );
14592 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
14593 let control_handle = NodeControlHandle { inner: this.inner.clone() };
14594 Ok(NodeRequest::RemoveExtendedAttribute {
14595 name: req.name,
14596
14597 responder: NodeRemoveExtendedAttributeResponder {
14598 control_handle: std::mem::ManuallyDrop::new(control_handle),
14599 tx_id: header.tx_id,
14600 },
14601 })
14602 }
14603 _ if header.tx_id == 0
14604 && header
14605 .dynamic_flags()
14606 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14607 {
14608 Ok(NodeRequest::_UnknownMethod {
14609 ordinal: header.ordinal,
14610 control_handle: NodeControlHandle { inner: this.inner.clone() },
14611 method_type: fidl::MethodType::OneWay,
14612 })
14613 }
14614 _ if header
14615 .dynamic_flags()
14616 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
14617 {
14618 this.inner.send_framework_err(
14619 fidl::encoding::FrameworkErr::UnknownMethod,
14620 header.tx_id,
14621 header.ordinal,
14622 header.dynamic_flags(),
14623 (bytes, handles),
14624 )?;
14625 Ok(NodeRequest::_UnknownMethod {
14626 ordinal: header.ordinal,
14627 control_handle: NodeControlHandle { inner: this.inner.clone() },
14628 method_type: fidl::MethodType::TwoWay,
14629 })
14630 }
14631 _ => Err(fidl::Error::UnknownOrdinal {
14632 ordinal: header.ordinal,
14633 protocol_name: <NodeMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
14634 }),
14635 }))
14636 },
14637 )
14638 }
14639}
14640
14641#[derive(Debug)]
14643pub enum NodeRequest {
14644 Clone {
14645 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
14646 control_handle: NodeControlHandle,
14647 },
14648 Close {
14659 responder: NodeCloseResponder,
14660 },
14661 Query {
14662 responder: NodeQueryResponder,
14663 },
14664 DeprecatedClone {
14666 flags: OpenFlags,
14667 object: fidl::endpoints::ServerEnd<NodeMarker>,
14668 control_handle: NodeControlHandle,
14669 },
14670 DeprecatedGetAttr {
14674 responder: NodeDeprecatedGetAttrResponder,
14675 },
14676 DeprecatedSetAttr {
14678 flags: NodeAttributeFlags,
14679 attributes: NodeAttributes,
14680 responder: NodeDeprecatedSetAttrResponder,
14681 },
14682 DeprecatedGetFlags {
14684 responder: NodeDeprecatedGetFlagsResponder,
14685 },
14686 DeprecatedSetFlags {
14688 flags: OpenFlags,
14689 responder: NodeDeprecatedSetFlagsResponder,
14690 },
14691 GetFlags {
14700 responder: NodeGetFlagsResponder,
14701 },
14702 SetFlags {
14712 flags: Flags,
14713 responder: NodeSetFlagsResponder,
14714 },
14715 QueryFilesystem {
14719 responder: NodeQueryFilesystemResponder,
14720 },
14721 GetAttributes {
14735 query: NodeAttributesQuery,
14736 responder: NodeGetAttributesResponder,
14737 },
14738 UpdateAttributes {
14747 payload: MutableNodeAttributes,
14748 responder: NodeUpdateAttributesResponder,
14749 },
14750 Sync {
14760 responder: NodeSyncResponder,
14761 },
14762 ListExtendedAttributes {
14771 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
14772 control_handle: NodeControlHandle,
14773 },
14774 GetExtendedAttribute {
14781 name: Vec<u8>,
14782 responder: NodeGetExtendedAttributeResponder,
14783 },
14784 SetExtendedAttribute {
14792 name: Vec<u8>,
14793 value: ExtendedAttributeValue,
14794 mode: SetExtendedAttributeMode,
14795 responder: NodeSetExtendedAttributeResponder,
14796 },
14797 RemoveExtendedAttribute {
14803 name: Vec<u8>,
14804 responder: NodeRemoveExtendedAttributeResponder,
14805 },
14806 #[non_exhaustive]
14808 _UnknownMethod {
14809 ordinal: u64,
14811 control_handle: NodeControlHandle,
14812 method_type: fidl::MethodType,
14813 },
14814}
14815
14816impl NodeRequest {
14817 #[allow(irrefutable_let_patterns)]
14818 pub fn into_clone(
14819 self,
14820 ) -> Option<(
14821 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
14822 NodeControlHandle,
14823 )> {
14824 if let NodeRequest::Clone { request, control_handle } = self {
14825 Some((request, control_handle))
14826 } else {
14827 None
14828 }
14829 }
14830
14831 #[allow(irrefutable_let_patterns)]
14832 pub fn into_close(self) -> Option<(NodeCloseResponder)> {
14833 if let NodeRequest::Close { responder } = self { Some((responder)) } else { None }
14834 }
14835
14836 #[allow(irrefutable_let_patterns)]
14837 pub fn into_query(self) -> Option<(NodeQueryResponder)> {
14838 if let NodeRequest::Query { responder } = self { Some((responder)) } else { None }
14839 }
14840
14841 #[allow(irrefutable_let_patterns)]
14842 pub fn into_deprecated_clone(
14843 self,
14844 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, NodeControlHandle)> {
14845 if let NodeRequest::DeprecatedClone { flags, object, control_handle } = self {
14846 Some((flags, object, control_handle))
14847 } else {
14848 None
14849 }
14850 }
14851
14852 #[allow(irrefutable_let_patterns)]
14853 pub fn into_deprecated_get_attr(self) -> Option<(NodeDeprecatedGetAttrResponder)> {
14854 if let NodeRequest::DeprecatedGetAttr { responder } = self {
14855 Some((responder))
14856 } else {
14857 None
14858 }
14859 }
14860
14861 #[allow(irrefutable_let_patterns)]
14862 pub fn into_deprecated_set_attr(
14863 self,
14864 ) -> Option<(NodeAttributeFlags, NodeAttributes, NodeDeprecatedSetAttrResponder)> {
14865 if let NodeRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
14866 Some((flags, attributes, responder))
14867 } else {
14868 None
14869 }
14870 }
14871
14872 #[allow(irrefutable_let_patterns)]
14873 pub fn into_deprecated_get_flags(self) -> Option<(NodeDeprecatedGetFlagsResponder)> {
14874 if let NodeRequest::DeprecatedGetFlags { responder } = self {
14875 Some((responder))
14876 } else {
14877 None
14878 }
14879 }
14880
14881 #[allow(irrefutable_let_patterns)]
14882 pub fn into_deprecated_set_flags(self) -> Option<(OpenFlags, NodeDeprecatedSetFlagsResponder)> {
14883 if let NodeRequest::DeprecatedSetFlags { flags, responder } = self {
14884 Some((flags, responder))
14885 } else {
14886 None
14887 }
14888 }
14889
14890 #[allow(irrefutable_let_patterns)]
14891 pub fn into_get_flags(self) -> Option<(NodeGetFlagsResponder)> {
14892 if let NodeRequest::GetFlags { responder } = self { Some((responder)) } else { None }
14893 }
14894
14895 #[allow(irrefutable_let_patterns)]
14896 pub fn into_set_flags(self) -> Option<(Flags, NodeSetFlagsResponder)> {
14897 if let NodeRequest::SetFlags { flags, responder } = self {
14898 Some((flags, responder))
14899 } else {
14900 None
14901 }
14902 }
14903
14904 #[allow(irrefutable_let_patterns)]
14905 pub fn into_query_filesystem(self) -> Option<(NodeQueryFilesystemResponder)> {
14906 if let NodeRequest::QueryFilesystem { responder } = self { Some((responder)) } else { None }
14907 }
14908
14909 #[allow(irrefutable_let_patterns)]
14910 pub fn into_get_attributes(self) -> Option<(NodeAttributesQuery, NodeGetAttributesResponder)> {
14911 if let NodeRequest::GetAttributes { query, responder } = self {
14912 Some((query, responder))
14913 } else {
14914 None
14915 }
14916 }
14917
14918 #[allow(irrefutable_let_patterns)]
14919 pub fn into_update_attributes(
14920 self,
14921 ) -> Option<(MutableNodeAttributes, NodeUpdateAttributesResponder)> {
14922 if let NodeRequest::UpdateAttributes { payload, responder } = self {
14923 Some((payload, responder))
14924 } else {
14925 None
14926 }
14927 }
14928
14929 #[allow(irrefutable_let_patterns)]
14930 pub fn into_sync(self) -> Option<(NodeSyncResponder)> {
14931 if let NodeRequest::Sync { responder } = self { Some((responder)) } else { None }
14932 }
14933
14934 #[allow(irrefutable_let_patterns)]
14935 pub fn into_list_extended_attributes(
14936 self,
14937 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, NodeControlHandle)>
14938 {
14939 if let NodeRequest::ListExtendedAttributes { iterator, control_handle } = self {
14940 Some((iterator, control_handle))
14941 } else {
14942 None
14943 }
14944 }
14945
14946 #[allow(irrefutable_let_patterns)]
14947 pub fn into_get_extended_attribute(
14948 self,
14949 ) -> Option<(Vec<u8>, NodeGetExtendedAttributeResponder)> {
14950 if let NodeRequest::GetExtendedAttribute { name, responder } = self {
14951 Some((name, responder))
14952 } else {
14953 None
14954 }
14955 }
14956
14957 #[allow(irrefutable_let_patterns)]
14958 pub fn into_set_extended_attribute(
14959 self,
14960 ) -> Option<(
14961 Vec<u8>,
14962 ExtendedAttributeValue,
14963 SetExtendedAttributeMode,
14964 NodeSetExtendedAttributeResponder,
14965 )> {
14966 if let NodeRequest::SetExtendedAttribute { name, value, mode, responder } = self {
14967 Some((name, value, mode, responder))
14968 } else {
14969 None
14970 }
14971 }
14972
14973 #[allow(irrefutable_let_patterns)]
14974 pub fn into_remove_extended_attribute(
14975 self,
14976 ) -> Option<(Vec<u8>, NodeRemoveExtendedAttributeResponder)> {
14977 if let NodeRequest::RemoveExtendedAttribute { name, responder } = self {
14978 Some((name, responder))
14979 } else {
14980 None
14981 }
14982 }
14983
14984 pub fn method_name(&self) -> &'static str {
14986 match *self {
14987 NodeRequest::Clone { .. } => "clone",
14988 NodeRequest::Close { .. } => "close",
14989 NodeRequest::Query { .. } => "query",
14990 NodeRequest::DeprecatedClone { .. } => "deprecated_clone",
14991 NodeRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
14992 NodeRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
14993 NodeRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
14994 NodeRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
14995 NodeRequest::GetFlags { .. } => "get_flags",
14996 NodeRequest::SetFlags { .. } => "set_flags",
14997 NodeRequest::QueryFilesystem { .. } => "query_filesystem",
14998 NodeRequest::GetAttributes { .. } => "get_attributes",
14999 NodeRequest::UpdateAttributes { .. } => "update_attributes",
15000 NodeRequest::Sync { .. } => "sync",
15001 NodeRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
15002 NodeRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
15003 NodeRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
15004 NodeRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
15005 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
15006 "unknown one-way method"
15007 }
15008 NodeRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
15009 "unknown two-way method"
15010 }
15011 }
15012 }
15013}
15014
15015#[derive(Debug, Clone)]
15016pub struct NodeControlHandle {
15017 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
15018}
15019
15020impl NodeControlHandle {
15021 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
15022 self.inner.shutdown_with_epitaph(status.into())
15023 }
15024}
15025
15026impl fidl::endpoints::ControlHandle for NodeControlHandle {
15027 fn shutdown(&self) {
15028 self.inner.shutdown()
15029 }
15030
15031 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
15032 self.inner.shutdown_with_epitaph(status)
15033 }
15034
15035 fn is_closed(&self) -> bool {
15036 self.inner.channel().is_closed()
15037 }
15038 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
15039 self.inner.channel().on_closed()
15040 }
15041
15042 #[cfg(target_os = "fuchsia")]
15043 fn signal_peer(
15044 &self,
15045 clear_mask: zx::Signals,
15046 set_mask: zx::Signals,
15047 ) -> Result<(), zx_status::Status> {
15048 use fidl::Peered;
15049 self.inner.channel().signal_peer(clear_mask, set_mask)
15050 }
15051}
15052
15053impl NodeControlHandle {
15054 pub fn send_on_open_(
15055 &self,
15056 mut s: i32,
15057 mut info: Option<NodeInfoDeprecated>,
15058 ) -> Result<(), fidl::Error> {
15059 self.inner.send::<NodeOnOpenRequest>(
15060 (s, info.as_mut()),
15061 0,
15062 0x7fc7bbb1dbfd1972,
15063 fidl::encoding::DynamicFlags::FLEXIBLE,
15064 )
15065 }
15066
15067 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
15068 self.inner.send::<Representation>(
15069 &mut payload,
15070 0,
15071 0x5cb40567d80a510c,
15072 fidl::encoding::DynamicFlags::empty(),
15073 )
15074 }
15075}
15076
15077#[must_use = "FIDL methods require a response to be sent"]
15078#[derive(Debug)]
15079pub struct NodeCloseResponder {
15080 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15081 tx_id: u32,
15082}
15083
15084impl std::ops::Drop for NodeCloseResponder {
15088 fn drop(&mut self) {
15089 self.control_handle.shutdown();
15090 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15092 }
15093}
15094
15095impl fidl::endpoints::Responder for NodeCloseResponder {
15096 type ControlHandle = NodeControlHandle;
15097
15098 fn control_handle(&self) -> &NodeControlHandle {
15099 &self.control_handle
15100 }
15101
15102 fn drop_without_shutdown(mut self) {
15103 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15105 std::mem::forget(self);
15107 }
15108}
15109
15110impl NodeCloseResponder {
15111 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15115 let _result = self.send_raw(result);
15116 if _result.is_err() {
15117 self.control_handle.shutdown();
15118 }
15119 self.drop_without_shutdown();
15120 _result
15121 }
15122
15123 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15125 let _result = self.send_raw(result);
15126 self.drop_without_shutdown();
15127 _result
15128 }
15129
15130 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15131 self.control_handle
15132 .inner
15133 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15134 result,
15135 self.tx_id,
15136 0x5ac5d459ad7f657e,
15137 fidl::encoding::DynamicFlags::empty(),
15138 )
15139 }
15140}
15141
15142#[must_use = "FIDL methods require a response to be sent"]
15143#[derive(Debug)]
15144pub struct NodeQueryResponder {
15145 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15146 tx_id: u32,
15147}
15148
15149impl std::ops::Drop for NodeQueryResponder {
15153 fn drop(&mut self) {
15154 self.control_handle.shutdown();
15155 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15157 }
15158}
15159
15160impl fidl::endpoints::Responder for NodeQueryResponder {
15161 type ControlHandle = NodeControlHandle;
15162
15163 fn control_handle(&self) -> &NodeControlHandle {
15164 &self.control_handle
15165 }
15166
15167 fn drop_without_shutdown(mut self) {
15168 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15170 std::mem::forget(self);
15172 }
15173}
15174
15175impl NodeQueryResponder {
15176 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15180 let _result = self.send_raw(protocol);
15181 if _result.is_err() {
15182 self.control_handle.shutdown();
15183 }
15184 self.drop_without_shutdown();
15185 _result
15186 }
15187
15188 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15190 let _result = self.send_raw(protocol);
15191 self.drop_without_shutdown();
15192 _result
15193 }
15194
15195 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
15196 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
15197 (protocol,),
15198 self.tx_id,
15199 0x2658edee9decfc06,
15200 fidl::encoding::DynamicFlags::empty(),
15201 )
15202 }
15203}
15204
15205#[must_use = "FIDL methods require a response to be sent"]
15206#[derive(Debug)]
15207pub struct NodeDeprecatedGetAttrResponder {
15208 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15209 tx_id: u32,
15210}
15211
15212impl std::ops::Drop for NodeDeprecatedGetAttrResponder {
15216 fn drop(&mut self) {
15217 self.control_handle.shutdown();
15218 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15220 }
15221}
15222
15223impl fidl::endpoints::Responder for NodeDeprecatedGetAttrResponder {
15224 type ControlHandle = NodeControlHandle;
15225
15226 fn control_handle(&self) -> &NodeControlHandle {
15227 &self.control_handle
15228 }
15229
15230 fn drop_without_shutdown(mut self) {
15231 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15233 std::mem::forget(self);
15235 }
15236}
15237
15238impl NodeDeprecatedGetAttrResponder {
15239 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15243 let _result = self.send_raw(s, attributes);
15244 if _result.is_err() {
15245 self.control_handle.shutdown();
15246 }
15247 self.drop_without_shutdown();
15248 _result
15249 }
15250
15251 pub fn send_no_shutdown_on_err(
15253 self,
15254 mut s: i32,
15255 mut attributes: &NodeAttributes,
15256 ) -> Result<(), fidl::Error> {
15257 let _result = self.send_raw(s, attributes);
15258 self.drop_without_shutdown();
15259 _result
15260 }
15261
15262 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
15263 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
15264 (s, attributes),
15265 self.tx_id,
15266 0x78985e216314dafd,
15267 fidl::encoding::DynamicFlags::empty(),
15268 )
15269 }
15270}
15271
15272#[must_use = "FIDL methods require a response to be sent"]
15273#[derive(Debug)]
15274pub struct NodeDeprecatedSetAttrResponder {
15275 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15276 tx_id: u32,
15277}
15278
15279impl std::ops::Drop for NodeDeprecatedSetAttrResponder {
15283 fn drop(&mut self) {
15284 self.control_handle.shutdown();
15285 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15287 }
15288}
15289
15290impl fidl::endpoints::Responder for NodeDeprecatedSetAttrResponder {
15291 type ControlHandle = NodeControlHandle;
15292
15293 fn control_handle(&self) -> &NodeControlHandle {
15294 &self.control_handle
15295 }
15296
15297 fn drop_without_shutdown(mut self) {
15298 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15300 std::mem::forget(self);
15302 }
15303}
15304
15305impl NodeDeprecatedSetAttrResponder {
15306 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15310 let _result = self.send_raw(s);
15311 if _result.is_err() {
15312 self.control_handle.shutdown();
15313 }
15314 self.drop_without_shutdown();
15315 _result
15316 }
15317
15318 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15320 let _result = self.send_raw(s);
15321 self.drop_without_shutdown();
15322 _result
15323 }
15324
15325 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15326 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
15327 (s,),
15328 self.tx_id,
15329 0x4186c0f40d938f46,
15330 fidl::encoding::DynamicFlags::empty(),
15331 )
15332 }
15333}
15334
15335#[must_use = "FIDL methods require a response to be sent"]
15336#[derive(Debug)]
15337pub struct NodeDeprecatedGetFlagsResponder {
15338 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15339 tx_id: u32,
15340}
15341
15342impl std::ops::Drop for NodeDeprecatedGetFlagsResponder {
15346 fn drop(&mut self) {
15347 self.control_handle.shutdown();
15348 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15350 }
15351}
15352
15353impl fidl::endpoints::Responder for NodeDeprecatedGetFlagsResponder {
15354 type ControlHandle = NodeControlHandle;
15355
15356 fn control_handle(&self) -> &NodeControlHandle {
15357 &self.control_handle
15358 }
15359
15360 fn drop_without_shutdown(mut self) {
15361 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15363 std::mem::forget(self);
15365 }
15366}
15367
15368impl NodeDeprecatedGetFlagsResponder {
15369 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15373 let _result = self.send_raw(s, flags);
15374 if _result.is_err() {
15375 self.control_handle.shutdown();
15376 }
15377 self.drop_without_shutdown();
15378 _result
15379 }
15380
15381 pub fn send_no_shutdown_on_err(
15383 self,
15384 mut s: i32,
15385 mut flags: OpenFlags,
15386 ) -> Result<(), fidl::Error> {
15387 let _result = self.send_raw(s, flags);
15388 self.drop_without_shutdown();
15389 _result
15390 }
15391
15392 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
15393 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
15394 (s, flags),
15395 self.tx_id,
15396 0x5b88fffb8eda3aa1,
15397 fidl::encoding::DynamicFlags::empty(),
15398 )
15399 }
15400}
15401
15402#[must_use = "FIDL methods require a response to be sent"]
15403#[derive(Debug)]
15404pub struct NodeDeprecatedSetFlagsResponder {
15405 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15406 tx_id: u32,
15407}
15408
15409impl std::ops::Drop for NodeDeprecatedSetFlagsResponder {
15413 fn drop(&mut self) {
15414 self.control_handle.shutdown();
15415 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15417 }
15418}
15419
15420impl fidl::endpoints::Responder for NodeDeprecatedSetFlagsResponder {
15421 type ControlHandle = NodeControlHandle;
15422
15423 fn control_handle(&self) -> &NodeControlHandle {
15424 &self.control_handle
15425 }
15426
15427 fn drop_without_shutdown(mut self) {
15428 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15430 std::mem::forget(self);
15432 }
15433}
15434
15435impl NodeDeprecatedSetFlagsResponder {
15436 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
15440 let _result = self.send_raw(s);
15441 if _result.is_err() {
15442 self.control_handle.shutdown();
15443 }
15444 self.drop_without_shutdown();
15445 _result
15446 }
15447
15448 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
15450 let _result = self.send_raw(s);
15451 self.drop_without_shutdown();
15452 _result
15453 }
15454
15455 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
15456 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
15457 (s,),
15458 self.tx_id,
15459 0x5295b76c71fde733,
15460 fidl::encoding::DynamicFlags::empty(),
15461 )
15462 }
15463}
15464
15465#[must_use = "FIDL methods require a response to be sent"]
15466#[derive(Debug)]
15467pub struct NodeGetFlagsResponder {
15468 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15469 tx_id: u32,
15470}
15471
15472impl std::ops::Drop for NodeGetFlagsResponder {
15476 fn drop(&mut self) {
15477 self.control_handle.shutdown();
15478 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15480 }
15481}
15482
15483impl fidl::endpoints::Responder for NodeGetFlagsResponder {
15484 type ControlHandle = NodeControlHandle;
15485
15486 fn control_handle(&self) -> &NodeControlHandle {
15487 &self.control_handle
15488 }
15489
15490 fn drop_without_shutdown(mut self) {
15491 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15493 std::mem::forget(self);
15495 }
15496}
15497
15498impl NodeGetFlagsResponder {
15499 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15503 let _result = self.send_raw(result);
15504 if _result.is_err() {
15505 self.control_handle.shutdown();
15506 }
15507 self.drop_without_shutdown();
15508 _result
15509 }
15510
15511 pub fn send_no_shutdown_on_err(
15513 self,
15514 mut result: Result<Flags, i32>,
15515 ) -> Result<(), fidl::Error> {
15516 let _result = self.send_raw(result);
15517 self.drop_without_shutdown();
15518 _result
15519 }
15520
15521 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
15522 self.control_handle
15523 .inner
15524 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
15525 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
15526 self.tx_id,
15527 0x176eb318f64ec23,
15528 fidl::encoding::DynamicFlags::FLEXIBLE,
15529 )
15530 }
15531}
15532
15533#[must_use = "FIDL methods require a response to be sent"]
15534#[derive(Debug)]
15535pub struct NodeSetFlagsResponder {
15536 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15537 tx_id: u32,
15538}
15539
15540impl std::ops::Drop for NodeSetFlagsResponder {
15544 fn drop(&mut self) {
15545 self.control_handle.shutdown();
15546 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15548 }
15549}
15550
15551impl fidl::endpoints::Responder for NodeSetFlagsResponder {
15552 type ControlHandle = NodeControlHandle;
15553
15554 fn control_handle(&self) -> &NodeControlHandle {
15555 &self.control_handle
15556 }
15557
15558 fn drop_without_shutdown(mut self) {
15559 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15561 std::mem::forget(self);
15563 }
15564}
15565
15566impl NodeSetFlagsResponder {
15567 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15571 let _result = self.send_raw(result);
15572 if _result.is_err() {
15573 self.control_handle.shutdown();
15574 }
15575 self.drop_without_shutdown();
15576 _result
15577 }
15578
15579 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15581 let _result = self.send_raw(result);
15582 self.drop_without_shutdown();
15583 _result
15584 }
15585
15586 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15587 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
15588 fidl::encoding::EmptyStruct,
15589 i32,
15590 >>(
15591 fidl::encoding::FlexibleResult::new(result),
15592 self.tx_id,
15593 0x55a8028685791ea8,
15594 fidl::encoding::DynamicFlags::FLEXIBLE,
15595 )
15596 }
15597}
15598
15599#[must_use = "FIDL methods require a response to be sent"]
15600#[derive(Debug)]
15601pub struct NodeQueryFilesystemResponder {
15602 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15603 tx_id: u32,
15604}
15605
15606impl std::ops::Drop for NodeQueryFilesystemResponder {
15610 fn drop(&mut self) {
15611 self.control_handle.shutdown();
15612 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15614 }
15615}
15616
15617impl fidl::endpoints::Responder for NodeQueryFilesystemResponder {
15618 type ControlHandle = NodeControlHandle;
15619
15620 fn control_handle(&self) -> &NodeControlHandle {
15621 &self.control_handle
15622 }
15623
15624 fn drop_without_shutdown(mut self) {
15625 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15627 std::mem::forget(self);
15629 }
15630}
15631
15632impl NodeQueryFilesystemResponder {
15633 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15637 let _result = self.send_raw(s, info);
15638 if _result.is_err() {
15639 self.control_handle.shutdown();
15640 }
15641 self.drop_without_shutdown();
15642 _result
15643 }
15644
15645 pub fn send_no_shutdown_on_err(
15647 self,
15648 mut s: i32,
15649 mut info: Option<&FilesystemInfo>,
15650 ) -> Result<(), fidl::Error> {
15651 let _result = self.send_raw(s, info);
15652 self.drop_without_shutdown();
15653 _result
15654 }
15655
15656 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
15657 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
15658 (s, info),
15659 self.tx_id,
15660 0x6f344a1c6b0a0610,
15661 fidl::encoding::DynamicFlags::empty(),
15662 )
15663 }
15664}
15665
15666#[must_use = "FIDL methods require a response to be sent"]
15667#[derive(Debug)]
15668pub struct NodeGetAttributesResponder {
15669 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15670 tx_id: u32,
15671}
15672
15673impl std::ops::Drop for NodeGetAttributesResponder {
15677 fn drop(&mut self) {
15678 self.control_handle.shutdown();
15679 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15681 }
15682}
15683
15684impl fidl::endpoints::Responder for NodeGetAttributesResponder {
15685 type ControlHandle = NodeControlHandle;
15686
15687 fn control_handle(&self) -> &NodeControlHandle {
15688 &self.control_handle
15689 }
15690
15691 fn drop_without_shutdown(mut self) {
15692 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15694 std::mem::forget(self);
15696 }
15697}
15698
15699impl NodeGetAttributesResponder {
15700 pub fn send(
15704 self,
15705 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15706 ) -> Result<(), fidl::Error> {
15707 let _result = self.send_raw(result);
15708 if _result.is_err() {
15709 self.control_handle.shutdown();
15710 }
15711 self.drop_without_shutdown();
15712 _result
15713 }
15714
15715 pub fn send_no_shutdown_on_err(
15717 self,
15718 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15719 ) -> Result<(), fidl::Error> {
15720 let _result = self.send_raw(result);
15721 self.drop_without_shutdown();
15722 _result
15723 }
15724
15725 fn send_raw(
15726 &self,
15727 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
15728 ) -> Result<(), fidl::Error> {
15729 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
15730 result,
15731 self.tx_id,
15732 0x3d4396a638ea053b,
15733 fidl::encoding::DynamicFlags::empty(),
15734 )
15735 }
15736}
15737
15738#[must_use = "FIDL methods require a response to be sent"]
15739#[derive(Debug)]
15740pub struct NodeUpdateAttributesResponder {
15741 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15742 tx_id: u32,
15743}
15744
15745impl std::ops::Drop for NodeUpdateAttributesResponder {
15749 fn drop(&mut self) {
15750 self.control_handle.shutdown();
15751 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15753 }
15754}
15755
15756impl fidl::endpoints::Responder for NodeUpdateAttributesResponder {
15757 type ControlHandle = NodeControlHandle;
15758
15759 fn control_handle(&self) -> &NodeControlHandle {
15760 &self.control_handle
15761 }
15762
15763 fn drop_without_shutdown(mut self) {
15764 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15766 std::mem::forget(self);
15768 }
15769}
15770
15771impl NodeUpdateAttributesResponder {
15772 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15776 let _result = self.send_raw(result);
15777 if _result.is_err() {
15778 self.control_handle.shutdown();
15779 }
15780 self.drop_without_shutdown();
15781 _result
15782 }
15783
15784 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15786 let _result = self.send_raw(result);
15787 self.drop_without_shutdown();
15788 _result
15789 }
15790
15791 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15792 self.control_handle
15793 .inner
15794 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15795 result,
15796 self.tx_id,
15797 0x3308c1da5a89bf08,
15798 fidl::encoding::DynamicFlags::empty(),
15799 )
15800 }
15801}
15802
15803#[must_use = "FIDL methods require a response to be sent"]
15804#[derive(Debug)]
15805pub struct NodeSyncResponder {
15806 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15807 tx_id: u32,
15808}
15809
15810impl std::ops::Drop for NodeSyncResponder {
15814 fn drop(&mut self) {
15815 self.control_handle.shutdown();
15816 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15818 }
15819}
15820
15821impl fidl::endpoints::Responder for NodeSyncResponder {
15822 type ControlHandle = NodeControlHandle;
15823
15824 fn control_handle(&self) -> &NodeControlHandle {
15825 &self.control_handle
15826 }
15827
15828 fn drop_without_shutdown(mut self) {
15829 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15831 std::mem::forget(self);
15833 }
15834}
15835
15836impl NodeSyncResponder {
15837 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15841 let _result = self.send_raw(result);
15842 if _result.is_err() {
15843 self.control_handle.shutdown();
15844 }
15845 self.drop_without_shutdown();
15846 _result
15847 }
15848
15849 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15851 let _result = self.send_raw(result);
15852 self.drop_without_shutdown();
15853 _result
15854 }
15855
15856 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15857 self.control_handle
15858 .inner
15859 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15860 result,
15861 self.tx_id,
15862 0x2c5c27ca0ab5dc49,
15863 fidl::encoding::DynamicFlags::empty(),
15864 )
15865 }
15866}
15867
15868#[must_use = "FIDL methods require a response to be sent"]
15869#[derive(Debug)]
15870pub struct NodeGetExtendedAttributeResponder {
15871 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15872 tx_id: u32,
15873}
15874
15875impl std::ops::Drop for NodeGetExtendedAttributeResponder {
15879 fn drop(&mut self) {
15880 self.control_handle.shutdown();
15881 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15883 }
15884}
15885
15886impl fidl::endpoints::Responder for NodeGetExtendedAttributeResponder {
15887 type ControlHandle = NodeControlHandle;
15888
15889 fn control_handle(&self) -> &NodeControlHandle {
15890 &self.control_handle
15891 }
15892
15893 fn drop_without_shutdown(mut self) {
15894 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15896 std::mem::forget(self);
15898 }
15899}
15900
15901impl NodeGetExtendedAttributeResponder {
15902 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
15906 let _result = self.send_raw(result);
15907 if _result.is_err() {
15908 self.control_handle.shutdown();
15909 }
15910 self.drop_without_shutdown();
15911 _result
15912 }
15913
15914 pub fn send_no_shutdown_on_err(
15916 self,
15917 mut result: Result<ExtendedAttributeValue, i32>,
15918 ) -> Result<(), fidl::Error> {
15919 let _result = self.send_raw(result);
15920 self.drop_without_shutdown();
15921 _result
15922 }
15923
15924 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
15925 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
15926 result.as_mut().map_err(|e| *e),
15927 self.tx_id,
15928 0x45ffa3ccfdeb76db,
15929 fidl::encoding::DynamicFlags::empty(),
15930 )
15931 }
15932}
15933
15934#[must_use = "FIDL methods require a response to be sent"]
15935#[derive(Debug)]
15936pub struct NodeSetExtendedAttributeResponder {
15937 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
15938 tx_id: u32,
15939}
15940
15941impl std::ops::Drop for NodeSetExtendedAttributeResponder {
15945 fn drop(&mut self) {
15946 self.control_handle.shutdown();
15947 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15949 }
15950}
15951
15952impl fidl::endpoints::Responder for NodeSetExtendedAttributeResponder {
15953 type ControlHandle = NodeControlHandle;
15954
15955 fn control_handle(&self) -> &NodeControlHandle {
15956 &self.control_handle
15957 }
15958
15959 fn drop_without_shutdown(mut self) {
15960 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
15962 std::mem::forget(self);
15964 }
15965}
15966
15967impl NodeSetExtendedAttributeResponder {
15968 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15972 let _result = self.send_raw(result);
15973 if _result.is_err() {
15974 self.control_handle.shutdown();
15975 }
15976 self.drop_without_shutdown();
15977 _result
15978 }
15979
15980 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15982 let _result = self.send_raw(result);
15983 self.drop_without_shutdown();
15984 _result
15985 }
15986
15987 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
15988 self.control_handle
15989 .inner
15990 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
15991 result,
15992 self.tx_id,
15993 0x4a951362f681f23c,
15994 fidl::encoding::DynamicFlags::empty(),
15995 )
15996 }
15997}
15998
15999#[must_use = "FIDL methods require a response to be sent"]
16000#[derive(Debug)]
16001pub struct NodeRemoveExtendedAttributeResponder {
16002 control_handle: std::mem::ManuallyDrop<NodeControlHandle>,
16003 tx_id: u32,
16004}
16005
16006impl std::ops::Drop for NodeRemoveExtendedAttributeResponder {
16010 fn drop(&mut self) {
16011 self.control_handle.shutdown();
16012 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16014 }
16015}
16016
16017impl fidl::endpoints::Responder for NodeRemoveExtendedAttributeResponder {
16018 type ControlHandle = NodeControlHandle;
16019
16020 fn control_handle(&self) -> &NodeControlHandle {
16021 &self.control_handle
16022 }
16023
16024 fn drop_without_shutdown(mut self) {
16025 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16027 std::mem::forget(self);
16029 }
16030}
16031
16032impl NodeRemoveExtendedAttributeResponder {
16033 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16037 let _result = self.send_raw(result);
16038 if _result.is_err() {
16039 self.control_handle.shutdown();
16040 }
16041 self.drop_without_shutdown();
16042 _result
16043 }
16044
16045 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16047 let _result = self.send_raw(result);
16048 self.drop_without_shutdown();
16049 _result
16050 }
16051
16052 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
16053 self.control_handle
16054 .inner
16055 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
16056 result,
16057 self.tx_id,
16058 0x7a0b9f3a9bf9032d,
16059 fidl::encoding::DynamicFlags::empty(),
16060 )
16061 }
16062}
16063
16064#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16065pub struct OpenableMarker;
16066
16067impl fidl::endpoints::ProtocolMarker for OpenableMarker {
16068 type Proxy = OpenableProxy;
16069 type RequestStream = OpenableRequestStream;
16070 #[cfg(target_os = "fuchsia")]
16071 type SynchronousProxy = OpenableSynchronousProxy;
16072
16073 const DEBUG_NAME: &'static str = "(anonymous) Openable";
16074}
16075
16076pub trait OpenableProxyInterface: Send + Sync {
16077 fn r#open(
16078 &self,
16079 path: &str,
16080 flags: Flags,
16081 options: &Options,
16082 object: fidl::Channel,
16083 ) -> Result<(), fidl::Error>;
16084}
16085#[derive(Debug)]
16086#[cfg(target_os = "fuchsia")]
16087pub struct OpenableSynchronousProxy {
16088 client: fidl::client::sync::Client,
16089}
16090
16091#[cfg(target_os = "fuchsia")]
16092impl fidl::endpoints::SynchronousProxy for OpenableSynchronousProxy {
16093 type Proxy = OpenableProxy;
16094 type Protocol = OpenableMarker;
16095
16096 fn from_channel(inner: fidl::Channel) -> Self {
16097 Self::new(inner)
16098 }
16099
16100 fn into_channel(self) -> fidl::Channel {
16101 self.client.into_channel()
16102 }
16103
16104 fn as_channel(&self) -> &fidl::Channel {
16105 self.client.as_channel()
16106 }
16107}
16108
16109#[cfg(target_os = "fuchsia")]
16110impl OpenableSynchronousProxy {
16111 pub fn new(channel: fidl::Channel) -> Self {
16112 Self { client: fidl::client::sync::Client::new(channel) }
16113 }
16114
16115 pub fn into_channel(self) -> fidl::Channel {
16116 self.client.into_channel()
16117 }
16118
16119 pub fn wait_for_event(
16122 &self,
16123 deadline: zx::MonotonicInstant,
16124 ) -> Result<OpenableEvent, fidl::Error> {
16125 OpenableEvent::decode(self.client.wait_for_event::<OpenableMarker>(deadline)?)
16126 }
16127
16128 pub fn r#open(
16135 &self,
16136 mut path: &str,
16137 mut flags: Flags,
16138 mut options: &Options,
16139 mut object: fidl::Channel,
16140 ) -> Result<(), fidl::Error> {
16141 self.client.send::<OpenableOpenRequest>(
16142 (path, flags, options, object),
16143 0x568ddcb9a9cbb6d9,
16144 fidl::encoding::DynamicFlags::FLEXIBLE,
16145 )
16146 }
16147}
16148
16149#[cfg(target_os = "fuchsia")]
16150impl From<OpenableSynchronousProxy> for zx::NullableHandle {
16151 fn from(value: OpenableSynchronousProxy) -> Self {
16152 value.into_channel().into()
16153 }
16154}
16155
16156#[cfg(target_os = "fuchsia")]
16157impl From<fidl::Channel> for OpenableSynchronousProxy {
16158 fn from(value: fidl::Channel) -> Self {
16159 Self::new(value)
16160 }
16161}
16162
16163#[cfg(target_os = "fuchsia")]
16164impl fidl::endpoints::FromClient for OpenableSynchronousProxy {
16165 type Protocol = OpenableMarker;
16166
16167 fn from_client(value: fidl::endpoints::ClientEnd<OpenableMarker>) -> Self {
16168 Self::new(value.into_channel())
16169 }
16170}
16171
16172#[derive(Debug, Clone)]
16173pub struct OpenableProxy {
16174 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
16175}
16176
16177impl fidl::endpoints::Proxy for OpenableProxy {
16178 type Protocol = OpenableMarker;
16179
16180 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
16181 Self::new(inner)
16182 }
16183
16184 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
16185 self.client.into_channel().map_err(|client| Self { client })
16186 }
16187
16188 fn as_channel(&self) -> &::fidl::AsyncChannel {
16189 self.client.as_channel()
16190 }
16191}
16192
16193impl OpenableProxy {
16194 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
16196 let protocol_name = <OpenableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16197 Self { client: fidl::client::Client::new(channel, protocol_name) }
16198 }
16199
16200 pub fn take_event_stream(&self) -> OpenableEventStream {
16206 OpenableEventStream { event_receiver: self.client.take_event_receiver() }
16207 }
16208
16209 pub fn r#open(
16216 &self,
16217 mut path: &str,
16218 mut flags: Flags,
16219 mut options: &Options,
16220 mut object: fidl::Channel,
16221 ) -> Result<(), fidl::Error> {
16222 OpenableProxyInterface::r#open(self, path, flags, options, object)
16223 }
16224}
16225
16226impl OpenableProxyInterface for OpenableProxy {
16227 fn r#open(
16228 &self,
16229 mut path: &str,
16230 mut flags: Flags,
16231 mut options: &Options,
16232 mut object: fidl::Channel,
16233 ) -> Result<(), fidl::Error> {
16234 self.client.send::<OpenableOpenRequest>(
16235 (path, flags, options, object),
16236 0x568ddcb9a9cbb6d9,
16237 fidl::encoding::DynamicFlags::FLEXIBLE,
16238 )
16239 }
16240}
16241
16242pub struct OpenableEventStream {
16243 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
16244}
16245
16246impl std::marker::Unpin for OpenableEventStream {}
16247
16248impl futures::stream::FusedStream for OpenableEventStream {
16249 fn is_terminated(&self) -> bool {
16250 self.event_receiver.is_terminated()
16251 }
16252}
16253
16254impl futures::Stream for OpenableEventStream {
16255 type Item = Result<OpenableEvent, fidl::Error>;
16256
16257 fn poll_next(
16258 mut self: std::pin::Pin<&mut Self>,
16259 cx: &mut std::task::Context<'_>,
16260 ) -> std::task::Poll<Option<Self::Item>> {
16261 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
16262 &mut self.event_receiver,
16263 cx
16264 )?) {
16265 Some(buf) => std::task::Poll::Ready(Some(OpenableEvent::decode(buf))),
16266 None => std::task::Poll::Ready(None),
16267 }
16268 }
16269}
16270
16271#[derive(Debug)]
16272pub enum OpenableEvent {
16273 #[non_exhaustive]
16274 _UnknownEvent {
16275 ordinal: u64,
16277 },
16278}
16279
16280impl OpenableEvent {
16281 fn decode(
16283 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
16284 ) -> Result<OpenableEvent, fidl::Error> {
16285 let (bytes, _handles) = buf.split_mut();
16286 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16287 debug_assert_eq!(tx_header.tx_id, 0);
16288 match tx_header.ordinal {
16289 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
16290 Ok(OpenableEvent::_UnknownEvent { ordinal: tx_header.ordinal })
16291 }
16292 _ => Err(fidl::Error::UnknownOrdinal {
16293 ordinal: tx_header.ordinal,
16294 protocol_name: <OpenableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16295 }),
16296 }
16297 }
16298}
16299
16300pub struct OpenableRequestStream {
16302 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16303 is_terminated: bool,
16304}
16305
16306impl std::marker::Unpin for OpenableRequestStream {}
16307
16308impl futures::stream::FusedStream for OpenableRequestStream {
16309 fn is_terminated(&self) -> bool {
16310 self.is_terminated
16311 }
16312}
16313
16314impl fidl::endpoints::RequestStream for OpenableRequestStream {
16315 type Protocol = OpenableMarker;
16316 type ControlHandle = OpenableControlHandle;
16317
16318 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
16319 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
16320 }
16321
16322 fn control_handle(&self) -> Self::ControlHandle {
16323 OpenableControlHandle { inner: self.inner.clone() }
16324 }
16325
16326 fn into_inner(
16327 self,
16328 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
16329 {
16330 (self.inner, self.is_terminated)
16331 }
16332
16333 fn from_inner(
16334 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16335 is_terminated: bool,
16336 ) -> Self {
16337 Self { inner, is_terminated }
16338 }
16339}
16340
16341impl futures::Stream for OpenableRequestStream {
16342 type Item = Result<OpenableRequest, fidl::Error>;
16343
16344 fn poll_next(
16345 mut self: std::pin::Pin<&mut Self>,
16346 cx: &mut std::task::Context<'_>,
16347 ) -> std::task::Poll<Option<Self::Item>> {
16348 let this = &mut *self;
16349 if this.inner.check_shutdown(cx) {
16350 this.is_terminated = true;
16351 return std::task::Poll::Ready(None);
16352 }
16353 if this.is_terminated {
16354 panic!("polled OpenableRequestStream after completion");
16355 }
16356 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
16357 |bytes, handles| {
16358 match this.inner.channel().read_etc(cx, bytes, handles) {
16359 std::task::Poll::Ready(Ok(())) => {}
16360 std::task::Poll::Pending => return std::task::Poll::Pending,
16361 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
16362 this.is_terminated = true;
16363 return std::task::Poll::Ready(None);
16364 }
16365 std::task::Poll::Ready(Err(e)) => {
16366 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
16367 e.into(),
16368 ))));
16369 }
16370 }
16371
16372 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16374
16375 std::task::Poll::Ready(Some(match header.ordinal {
16376 0x568ddcb9a9cbb6d9 => {
16377 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
16378 let mut req = fidl::new_empty!(
16379 OpenableOpenRequest,
16380 fidl::encoding::DefaultFuchsiaResourceDialect
16381 );
16382 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenableOpenRequest>(&header, _body_bytes, handles, &mut req)?;
16383 let control_handle = OpenableControlHandle { inner: this.inner.clone() };
16384 Ok(OpenableRequest::Open {
16385 path: req.path,
16386 flags: req.flags,
16387 options: req.options,
16388 object: req.object,
16389
16390 control_handle,
16391 })
16392 }
16393 _ if header.tx_id == 0
16394 && header
16395 .dynamic_flags()
16396 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
16397 {
16398 Ok(OpenableRequest::_UnknownMethod {
16399 ordinal: header.ordinal,
16400 control_handle: OpenableControlHandle { inner: this.inner.clone() },
16401 method_type: fidl::MethodType::OneWay,
16402 })
16403 }
16404 _ if header
16405 .dynamic_flags()
16406 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
16407 {
16408 this.inner.send_framework_err(
16409 fidl::encoding::FrameworkErr::UnknownMethod,
16410 header.tx_id,
16411 header.ordinal,
16412 header.dynamic_flags(),
16413 (bytes, handles),
16414 )?;
16415 Ok(OpenableRequest::_UnknownMethod {
16416 ordinal: header.ordinal,
16417 control_handle: OpenableControlHandle { inner: this.inner.clone() },
16418 method_type: fidl::MethodType::TwoWay,
16419 })
16420 }
16421 _ => Err(fidl::Error::UnknownOrdinal {
16422 ordinal: header.ordinal,
16423 protocol_name:
16424 <OpenableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16425 }),
16426 }))
16427 },
16428 )
16429 }
16430}
16431
16432#[derive(Debug)]
16434pub enum OpenableRequest {
16435 Open {
16442 path: String,
16443 flags: Flags,
16444 options: Options,
16445 object: fidl::Channel,
16446 control_handle: OpenableControlHandle,
16447 },
16448 #[non_exhaustive]
16450 _UnknownMethod {
16451 ordinal: u64,
16453 control_handle: OpenableControlHandle,
16454 method_type: fidl::MethodType,
16455 },
16456}
16457
16458impl OpenableRequest {
16459 #[allow(irrefutable_let_patterns)]
16460 pub fn into_open(
16461 self,
16462 ) -> Option<(String, Flags, Options, fidl::Channel, OpenableControlHandle)> {
16463 if let OpenableRequest::Open { path, flags, options, object, control_handle } = self {
16464 Some((path, flags, options, object, control_handle))
16465 } else {
16466 None
16467 }
16468 }
16469
16470 pub fn method_name(&self) -> &'static str {
16472 match *self {
16473 OpenableRequest::Open { .. } => "open",
16474 OpenableRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
16475 "unknown one-way method"
16476 }
16477 OpenableRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
16478 "unknown two-way method"
16479 }
16480 }
16481 }
16482}
16483
16484#[derive(Debug, Clone)]
16485pub struct OpenableControlHandle {
16486 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16487}
16488
16489impl OpenableControlHandle {
16490 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
16491 self.inner.shutdown_with_epitaph(status.into())
16492 }
16493}
16494
16495impl fidl::endpoints::ControlHandle for OpenableControlHandle {
16496 fn shutdown(&self) {
16497 self.inner.shutdown()
16498 }
16499
16500 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
16501 self.inner.shutdown_with_epitaph(status)
16502 }
16503
16504 fn is_closed(&self) -> bool {
16505 self.inner.channel().is_closed()
16506 }
16507 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
16508 self.inner.channel().on_closed()
16509 }
16510
16511 #[cfg(target_os = "fuchsia")]
16512 fn signal_peer(
16513 &self,
16514 clear_mask: zx::Signals,
16515 set_mask: zx::Signals,
16516 ) -> Result<(), zx_status::Status> {
16517 use fidl::Peered;
16518 self.inner.channel().signal_peer(clear_mask, set_mask)
16519 }
16520}
16521
16522impl OpenableControlHandle {}
16523
16524#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
16525pub struct ReadableMarker;
16526
16527impl fidl::endpoints::ProtocolMarker for ReadableMarker {
16528 type Proxy = ReadableProxy;
16529 type RequestStream = ReadableRequestStream;
16530 #[cfg(target_os = "fuchsia")]
16531 type SynchronousProxy = ReadableSynchronousProxy;
16532
16533 const DEBUG_NAME: &'static str = "(anonymous) Readable";
16534}
16535pub type ReadableReadResult = Result<Vec<u8>, i32>;
16536
16537pub trait ReadableProxyInterface: Send + Sync {
16538 type ReadResponseFut: std::future::Future<Output = Result<ReadableReadResult, fidl::Error>>
16539 + Send;
16540 fn r#read(&self, count: u64) -> Self::ReadResponseFut;
16541}
16542#[derive(Debug)]
16543#[cfg(target_os = "fuchsia")]
16544pub struct ReadableSynchronousProxy {
16545 client: fidl::client::sync::Client,
16546}
16547
16548#[cfg(target_os = "fuchsia")]
16549impl fidl::endpoints::SynchronousProxy for ReadableSynchronousProxy {
16550 type Proxy = ReadableProxy;
16551 type Protocol = ReadableMarker;
16552
16553 fn from_channel(inner: fidl::Channel) -> Self {
16554 Self::new(inner)
16555 }
16556
16557 fn into_channel(self) -> fidl::Channel {
16558 self.client.into_channel()
16559 }
16560
16561 fn as_channel(&self) -> &fidl::Channel {
16562 self.client.as_channel()
16563 }
16564}
16565
16566#[cfg(target_os = "fuchsia")]
16567impl ReadableSynchronousProxy {
16568 pub fn new(channel: fidl::Channel) -> Self {
16569 Self { client: fidl::client::sync::Client::new(channel) }
16570 }
16571
16572 pub fn into_channel(self) -> fidl::Channel {
16573 self.client.into_channel()
16574 }
16575
16576 pub fn wait_for_event(
16579 &self,
16580 deadline: zx::MonotonicInstant,
16581 ) -> Result<ReadableEvent, fidl::Error> {
16582 ReadableEvent::decode(self.client.wait_for_event::<ReadableMarker>(deadline)?)
16583 }
16584
16585 pub fn r#read(
16604 &self,
16605 mut count: u64,
16606 ___deadline: zx::MonotonicInstant,
16607 ) -> Result<ReadableReadResult, fidl::Error> {
16608 let _response = self.client.send_query::<
16609 ReadableReadRequest,
16610 fidl::encoding::ResultType<ReadableReadResponse, i32>,
16611 ReadableMarker,
16612 >(
16613 (count,),
16614 0x57e419a298c8ede,
16615 fidl::encoding::DynamicFlags::empty(),
16616 ___deadline,
16617 )?;
16618 Ok(_response.map(|x| x.data))
16619 }
16620}
16621
16622#[cfg(target_os = "fuchsia")]
16623impl From<ReadableSynchronousProxy> for zx::NullableHandle {
16624 fn from(value: ReadableSynchronousProxy) -> Self {
16625 value.into_channel().into()
16626 }
16627}
16628
16629#[cfg(target_os = "fuchsia")]
16630impl From<fidl::Channel> for ReadableSynchronousProxy {
16631 fn from(value: fidl::Channel) -> Self {
16632 Self::new(value)
16633 }
16634}
16635
16636#[cfg(target_os = "fuchsia")]
16637impl fidl::endpoints::FromClient for ReadableSynchronousProxy {
16638 type Protocol = ReadableMarker;
16639
16640 fn from_client(value: fidl::endpoints::ClientEnd<ReadableMarker>) -> Self {
16641 Self::new(value.into_channel())
16642 }
16643}
16644
16645#[derive(Debug, Clone)]
16646pub struct ReadableProxy {
16647 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
16648}
16649
16650impl fidl::endpoints::Proxy for ReadableProxy {
16651 type Protocol = ReadableMarker;
16652
16653 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
16654 Self::new(inner)
16655 }
16656
16657 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
16658 self.client.into_channel().map_err(|client| Self { client })
16659 }
16660
16661 fn as_channel(&self) -> &::fidl::AsyncChannel {
16662 self.client.as_channel()
16663 }
16664}
16665
16666impl ReadableProxy {
16667 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
16669 let protocol_name = <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
16670 Self { client: fidl::client::Client::new(channel, protocol_name) }
16671 }
16672
16673 pub fn take_event_stream(&self) -> ReadableEventStream {
16679 ReadableEventStream { event_receiver: self.client.take_event_receiver() }
16680 }
16681
16682 pub fn r#read(
16701 &self,
16702 mut count: u64,
16703 ) -> fidl::client::QueryResponseFut<
16704 ReadableReadResult,
16705 fidl::encoding::DefaultFuchsiaResourceDialect,
16706 > {
16707 ReadableProxyInterface::r#read(self, count)
16708 }
16709}
16710
16711impl ReadableProxyInterface for ReadableProxy {
16712 type ReadResponseFut = fidl::client::QueryResponseFut<
16713 ReadableReadResult,
16714 fidl::encoding::DefaultFuchsiaResourceDialect,
16715 >;
16716 fn r#read(&self, mut count: u64) -> Self::ReadResponseFut {
16717 fn _decode(
16718 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
16719 ) -> Result<ReadableReadResult, fidl::Error> {
16720 let _response = fidl::client::decode_transaction_body::<
16721 fidl::encoding::ResultType<ReadableReadResponse, i32>,
16722 fidl::encoding::DefaultFuchsiaResourceDialect,
16723 0x57e419a298c8ede,
16724 >(_buf?)?;
16725 Ok(_response.map(|x| x.data))
16726 }
16727 self.client.send_query_and_decode::<ReadableReadRequest, ReadableReadResult>(
16728 (count,),
16729 0x57e419a298c8ede,
16730 fidl::encoding::DynamicFlags::empty(),
16731 _decode,
16732 )
16733 }
16734}
16735
16736pub struct ReadableEventStream {
16737 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
16738}
16739
16740impl std::marker::Unpin for ReadableEventStream {}
16741
16742impl futures::stream::FusedStream for ReadableEventStream {
16743 fn is_terminated(&self) -> bool {
16744 self.event_receiver.is_terminated()
16745 }
16746}
16747
16748impl futures::Stream for ReadableEventStream {
16749 type Item = Result<ReadableEvent, fidl::Error>;
16750
16751 fn poll_next(
16752 mut self: std::pin::Pin<&mut Self>,
16753 cx: &mut std::task::Context<'_>,
16754 ) -> std::task::Poll<Option<Self::Item>> {
16755 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
16756 &mut self.event_receiver,
16757 cx
16758 )?) {
16759 Some(buf) => std::task::Poll::Ready(Some(ReadableEvent::decode(buf))),
16760 None => std::task::Poll::Ready(None),
16761 }
16762 }
16763}
16764
16765#[derive(Debug)]
16766pub enum ReadableEvent {}
16767
16768impl ReadableEvent {
16769 fn decode(
16771 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
16772 ) -> Result<ReadableEvent, fidl::Error> {
16773 let (bytes, _handles) = buf.split_mut();
16774 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16775 debug_assert_eq!(tx_header.tx_id, 0);
16776 match tx_header.ordinal {
16777 _ => Err(fidl::Error::UnknownOrdinal {
16778 ordinal: tx_header.ordinal,
16779 protocol_name: <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16780 }),
16781 }
16782 }
16783}
16784
16785pub struct ReadableRequestStream {
16787 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16788 is_terminated: bool,
16789}
16790
16791impl std::marker::Unpin for ReadableRequestStream {}
16792
16793impl futures::stream::FusedStream for ReadableRequestStream {
16794 fn is_terminated(&self) -> bool {
16795 self.is_terminated
16796 }
16797}
16798
16799impl fidl::endpoints::RequestStream for ReadableRequestStream {
16800 type Protocol = ReadableMarker;
16801 type ControlHandle = ReadableControlHandle;
16802
16803 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
16804 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
16805 }
16806
16807 fn control_handle(&self) -> Self::ControlHandle {
16808 ReadableControlHandle { inner: self.inner.clone() }
16809 }
16810
16811 fn into_inner(
16812 self,
16813 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
16814 {
16815 (self.inner, self.is_terminated)
16816 }
16817
16818 fn from_inner(
16819 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16820 is_terminated: bool,
16821 ) -> Self {
16822 Self { inner, is_terminated }
16823 }
16824}
16825
16826impl futures::Stream for ReadableRequestStream {
16827 type Item = Result<ReadableRequest, fidl::Error>;
16828
16829 fn poll_next(
16830 mut self: std::pin::Pin<&mut Self>,
16831 cx: &mut std::task::Context<'_>,
16832 ) -> std::task::Poll<Option<Self::Item>> {
16833 let this = &mut *self;
16834 if this.inner.check_shutdown(cx) {
16835 this.is_terminated = true;
16836 return std::task::Poll::Ready(None);
16837 }
16838 if this.is_terminated {
16839 panic!("polled ReadableRequestStream after completion");
16840 }
16841 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
16842 |bytes, handles| {
16843 match this.inner.channel().read_etc(cx, bytes, handles) {
16844 std::task::Poll::Ready(Ok(())) => {}
16845 std::task::Poll::Pending => return std::task::Poll::Pending,
16846 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
16847 this.is_terminated = true;
16848 return std::task::Poll::Ready(None);
16849 }
16850 std::task::Poll::Ready(Err(e)) => {
16851 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
16852 e.into(),
16853 ))));
16854 }
16855 }
16856
16857 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
16859
16860 std::task::Poll::Ready(Some(match header.ordinal {
16861 0x57e419a298c8ede => {
16862 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
16863 let mut req = fidl::new_empty!(
16864 ReadableReadRequest,
16865 fidl::encoding::DefaultFuchsiaResourceDialect
16866 );
16867 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ReadableReadRequest>(&header, _body_bytes, handles, &mut req)?;
16868 let control_handle = ReadableControlHandle { inner: this.inner.clone() };
16869 Ok(ReadableRequest::Read {
16870 count: req.count,
16871
16872 responder: ReadableReadResponder {
16873 control_handle: std::mem::ManuallyDrop::new(control_handle),
16874 tx_id: header.tx_id,
16875 },
16876 })
16877 }
16878 _ => Err(fidl::Error::UnknownOrdinal {
16879 ordinal: header.ordinal,
16880 protocol_name:
16881 <ReadableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
16882 }),
16883 }))
16884 },
16885 )
16886 }
16887}
16888
16889#[derive(Debug)]
16890pub enum ReadableRequest {
16891 Read { count: u64, responder: ReadableReadResponder },
16910}
16911
16912impl ReadableRequest {
16913 #[allow(irrefutable_let_patterns)]
16914 pub fn into_read(self) -> Option<(u64, ReadableReadResponder)> {
16915 if let ReadableRequest::Read { count, responder } = self {
16916 Some((count, responder))
16917 } else {
16918 None
16919 }
16920 }
16921
16922 pub fn method_name(&self) -> &'static str {
16924 match *self {
16925 ReadableRequest::Read { .. } => "read",
16926 }
16927 }
16928}
16929
16930#[derive(Debug, Clone)]
16931pub struct ReadableControlHandle {
16932 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
16933}
16934
16935impl ReadableControlHandle {
16936 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
16937 self.inner.shutdown_with_epitaph(status.into())
16938 }
16939}
16940
16941impl fidl::endpoints::ControlHandle for ReadableControlHandle {
16942 fn shutdown(&self) {
16943 self.inner.shutdown()
16944 }
16945
16946 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
16947 self.inner.shutdown_with_epitaph(status)
16948 }
16949
16950 fn is_closed(&self) -> bool {
16951 self.inner.channel().is_closed()
16952 }
16953 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
16954 self.inner.channel().on_closed()
16955 }
16956
16957 #[cfg(target_os = "fuchsia")]
16958 fn signal_peer(
16959 &self,
16960 clear_mask: zx::Signals,
16961 set_mask: zx::Signals,
16962 ) -> Result<(), zx_status::Status> {
16963 use fidl::Peered;
16964 self.inner.channel().signal_peer(clear_mask, set_mask)
16965 }
16966}
16967
16968impl ReadableControlHandle {}
16969
16970#[must_use = "FIDL methods require a response to be sent"]
16971#[derive(Debug)]
16972pub struct ReadableReadResponder {
16973 control_handle: std::mem::ManuallyDrop<ReadableControlHandle>,
16974 tx_id: u32,
16975}
16976
16977impl std::ops::Drop for ReadableReadResponder {
16981 fn drop(&mut self) {
16982 self.control_handle.shutdown();
16983 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16985 }
16986}
16987
16988impl fidl::endpoints::Responder for ReadableReadResponder {
16989 type ControlHandle = ReadableControlHandle;
16990
16991 fn control_handle(&self) -> &ReadableControlHandle {
16992 &self.control_handle
16993 }
16994
16995 fn drop_without_shutdown(mut self) {
16996 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
16998 std::mem::forget(self);
17000 }
17001}
17002
17003impl ReadableReadResponder {
17004 pub fn send(self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
17008 let _result = self.send_raw(result);
17009 if _result.is_err() {
17010 self.control_handle.shutdown();
17011 }
17012 self.drop_without_shutdown();
17013 _result
17014 }
17015
17016 pub fn send_no_shutdown_on_err(
17018 self,
17019 mut result: Result<&[u8], i32>,
17020 ) -> Result<(), fidl::Error> {
17021 let _result = self.send_raw(result);
17022 self.drop_without_shutdown();
17023 _result
17024 }
17025
17026 fn send_raw(&self, mut result: Result<&[u8], i32>) -> Result<(), fidl::Error> {
17027 self.control_handle.inner.send::<fidl::encoding::ResultType<ReadableReadResponse, i32>>(
17028 result.map(|data| (data,)),
17029 self.tx_id,
17030 0x57e419a298c8ede,
17031 fidl::encoding::DynamicFlags::empty(),
17032 )
17033 }
17034}
17035
17036#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
17037pub struct SymlinkMarker;
17038
17039impl fidl::endpoints::ProtocolMarker for SymlinkMarker {
17040 type Proxy = SymlinkProxy;
17041 type RequestStream = SymlinkRequestStream;
17042 #[cfg(target_os = "fuchsia")]
17043 type SynchronousProxy = SymlinkSynchronousProxy;
17044
17045 const DEBUG_NAME: &'static str = "fuchsia.io.Symlink";
17046}
17047impl fidl::endpoints::DiscoverableProtocolMarker for SymlinkMarker {}
17048
17049pub trait SymlinkProxyInterface: Send + Sync {
17050 type LinkIntoResponseFut: std::future::Future<Output = Result<LinkableLinkIntoResult, fidl::Error>>
17051 + Send;
17052 fn r#link_into(&self, dst_parent_token: fidl::Event, dst: &str) -> Self::LinkIntoResponseFut;
17053 fn r#clone(
17054 &self,
17055 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17056 ) -> Result<(), fidl::Error>;
17057 type CloseResponseFut: std::future::Future<
17058 Output = Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error>,
17059 > + Send;
17060 fn r#close(&self) -> Self::CloseResponseFut;
17061 type QueryResponseFut: std::future::Future<Output = Result<Vec<u8>, fidl::Error>> + Send;
17062 fn r#query(&self) -> Self::QueryResponseFut;
17063 fn r#deprecated_clone(
17064 &self,
17065 flags: OpenFlags,
17066 object: fidl::endpoints::ServerEnd<NodeMarker>,
17067 ) -> Result<(), fidl::Error>;
17068 type DeprecatedGetAttrResponseFut: std::future::Future<Output = Result<(i32, NodeAttributes), fidl::Error>>
17069 + Send;
17070 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut;
17071 type DeprecatedSetAttrResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
17072 fn r#deprecated_set_attr(
17073 &self,
17074 flags: NodeAttributeFlags,
17075 attributes: &NodeAttributes,
17076 ) -> Self::DeprecatedSetAttrResponseFut;
17077 type DeprecatedGetFlagsResponseFut: std::future::Future<Output = Result<(i32, OpenFlags), fidl::Error>>
17078 + Send;
17079 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut;
17080 type DeprecatedSetFlagsResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
17081 + Send;
17082 fn r#deprecated_set_flags(&self, flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut;
17083 type GetFlagsResponseFut: std::future::Future<Output = Result<NodeGetFlagsResult, fidl::Error>>
17084 + Send;
17085 fn r#get_flags(&self) -> Self::GetFlagsResponseFut;
17086 type SetFlagsResponseFut: std::future::Future<Output = Result<NodeSetFlagsResult, fidl::Error>>
17087 + Send;
17088 fn r#set_flags(&self, flags: Flags) -> Self::SetFlagsResponseFut;
17089 type QueryFilesystemResponseFut: std::future::Future<Output = Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error>>
17090 + Send;
17091 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut;
17092 type GetAttributesResponseFut: std::future::Future<Output = Result<NodeGetAttributesResult, fidl::Error>>
17093 + Send;
17094 fn r#get_attributes(&self, query: NodeAttributesQuery) -> Self::GetAttributesResponseFut;
17095 type UpdateAttributesResponseFut: std::future::Future<Output = Result<NodeUpdateAttributesResult, fidl::Error>>
17096 + Send;
17097 fn r#update_attributes(
17098 &self,
17099 payload: &MutableNodeAttributes,
17100 ) -> Self::UpdateAttributesResponseFut;
17101 type SyncResponseFut: std::future::Future<Output = Result<NodeSyncResult, fidl::Error>> + Send;
17102 fn r#sync(&self) -> Self::SyncResponseFut;
17103 fn r#list_extended_attributes(
17104 &self,
17105 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17106 ) -> Result<(), fidl::Error>;
17107 type GetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeGetExtendedAttributeResult, fidl::Error>>
17108 + Send;
17109 fn r#get_extended_attribute(&self, name: &[u8]) -> Self::GetExtendedAttributeResponseFut;
17110 type SetExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeSetExtendedAttributeResult, fidl::Error>>
17111 + Send;
17112 fn r#set_extended_attribute(
17113 &self,
17114 name: &[u8],
17115 value: ExtendedAttributeValue,
17116 mode: SetExtendedAttributeMode,
17117 ) -> Self::SetExtendedAttributeResponseFut;
17118 type RemoveExtendedAttributeResponseFut: std::future::Future<Output = Result<NodeRemoveExtendedAttributeResult, fidl::Error>>
17119 + Send;
17120 fn r#remove_extended_attribute(&self, name: &[u8]) -> Self::RemoveExtendedAttributeResponseFut;
17121 fn r#open(
17122 &self,
17123 path: &str,
17124 flags: Flags,
17125 options: &Options,
17126 object: fidl::Channel,
17127 ) -> Result<(), fidl::Error>;
17128 type DescribeResponseFut: std::future::Future<Output = Result<SymlinkInfo, fidl::Error>> + Send;
17129 fn r#describe(&self) -> Self::DescribeResponseFut;
17130}
17131#[derive(Debug)]
17132#[cfg(target_os = "fuchsia")]
17133pub struct SymlinkSynchronousProxy {
17134 client: fidl::client::sync::Client,
17135}
17136
17137#[cfg(target_os = "fuchsia")]
17138impl fidl::endpoints::SynchronousProxy for SymlinkSynchronousProxy {
17139 type Proxy = SymlinkProxy;
17140 type Protocol = SymlinkMarker;
17141
17142 fn from_channel(inner: fidl::Channel) -> Self {
17143 Self::new(inner)
17144 }
17145
17146 fn into_channel(self) -> fidl::Channel {
17147 self.client.into_channel()
17148 }
17149
17150 fn as_channel(&self) -> &fidl::Channel {
17151 self.client.as_channel()
17152 }
17153}
17154
17155#[cfg(target_os = "fuchsia")]
17156impl SymlinkSynchronousProxy {
17157 pub fn new(channel: fidl::Channel) -> Self {
17158 Self { client: fidl::client::sync::Client::new(channel) }
17159 }
17160
17161 pub fn into_channel(self) -> fidl::Channel {
17162 self.client.into_channel()
17163 }
17164
17165 pub fn wait_for_event(
17168 &self,
17169 deadline: zx::MonotonicInstant,
17170 ) -> Result<SymlinkEvent, fidl::Error> {
17171 SymlinkEvent::decode(self.client.wait_for_event::<SymlinkMarker>(deadline)?)
17172 }
17173
17174 pub fn r#link_into(
17197 &self,
17198 mut dst_parent_token: fidl::Event,
17199 mut dst: &str,
17200 ___deadline: zx::MonotonicInstant,
17201 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
17202 let _response = self.client.send_query::<
17203 LinkableLinkIntoRequest,
17204 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17205 SymlinkMarker,
17206 >(
17207 (dst_parent_token, dst,),
17208 0x54f3949246a03e74,
17209 fidl::encoding::DynamicFlags::empty(),
17210 ___deadline,
17211 )?;
17212 Ok(_response.map(|x| x))
17213 }
17214
17215 pub fn r#clone(
17216 &self,
17217 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17218 ) -> Result<(), fidl::Error> {
17219 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
17220 (request,),
17221 0x20d8a7aba2168a79,
17222 fidl::encoding::DynamicFlags::empty(),
17223 )
17224 }
17225
17226 pub fn r#close(
17237 &self,
17238 ___deadline: zx::MonotonicInstant,
17239 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
17240 let _response = self.client.send_query::<
17241 fidl::encoding::EmptyPayload,
17242 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17243 SymlinkMarker,
17244 >(
17245 (),
17246 0x5ac5d459ad7f657e,
17247 fidl::encoding::DynamicFlags::empty(),
17248 ___deadline,
17249 )?;
17250 Ok(_response.map(|x| x))
17251 }
17252
17253 pub fn r#query(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<u8>, fidl::Error> {
17254 let _response = self.client.send_query::<
17255 fidl::encoding::EmptyPayload,
17256 fidl_fuchsia_unknown::QueryableQueryResponse,
17257 SymlinkMarker,
17258 >(
17259 (),
17260 0x2658edee9decfc06,
17261 fidl::encoding::DynamicFlags::empty(),
17262 ___deadline,
17263 )?;
17264 Ok(_response.protocol)
17265 }
17266
17267 pub fn r#deprecated_clone(
17269 &self,
17270 mut flags: OpenFlags,
17271 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
17272 ) -> Result<(), fidl::Error> {
17273 self.client.send::<NodeDeprecatedCloneRequest>(
17274 (flags, object),
17275 0x5a61678f293ce16f,
17276 fidl::encoding::DynamicFlags::FLEXIBLE,
17277 )
17278 }
17279
17280 pub fn r#deprecated_get_attr(
17284 &self,
17285 ___deadline: zx::MonotonicInstant,
17286 ) -> Result<(i32, NodeAttributes), fidl::Error> {
17287 let _response = self.client.send_query::<
17288 fidl::encoding::EmptyPayload,
17289 NodeDeprecatedGetAttrResponse,
17290 SymlinkMarker,
17291 >(
17292 (),
17293 0x78985e216314dafd,
17294 fidl::encoding::DynamicFlags::empty(),
17295 ___deadline,
17296 )?;
17297 Ok((_response.s, _response.attributes))
17298 }
17299
17300 pub fn r#deprecated_set_attr(
17302 &self,
17303 mut flags: NodeAttributeFlags,
17304 mut attributes: &NodeAttributes,
17305 ___deadline: zx::MonotonicInstant,
17306 ) -> Result<i32, fidl::Error> {
17307 let _response = self.client.send_query::<
17308 NodeDeprecatedSetAttrRequest,
17309 NodeDeprecatedSetAttrResponse,
17310 SymlinkMarker,
17311 >(
17312 (flags, attributes,),
17313 0x4186c0f40d938f46,
17314 fidl::encoding::DynamicFlags::empty(),
17315 ___deadline,
17316 )?;
17317 Ok(_response.s)
17318 }
17319
17320 pub fn r#deprecated_get_flags(
17322 &self,
17323 ___deadline: zx::MonotonicInstant,
17324 ) -> Result<(i32, OpenFlags), fidl::Error> {
17325 let _response = self.client.send_query::<
17326 fidl::encoding::EmptyPayload,
17327 NodeDeprecatedGetFlagsResponse,
17328 SymlinkMarker,
17329 >(
17330 (),
17331 0x5b88fffb8eda3aa1,
17332 fidl::encoding::DynamicFlags::empty(),
17333 ___deadline,
17334 )?;
17335 Ok((_response.s, _response.flags))
17336 }
17337
17338 pub fn r#deprecated_set_flags(
17340 &self,
17341 mut flags: OpenFlags,
17342 ___deadline: zx::MonotonicInstant,
17343 ) -> Result<i32, fidl::Error> {
17344 let _response = self.client.send_query::<
17345 NodeDeprecatedSetFlagsRequest,
17346 NodeDeprecatedSetFlagsResponse,
17347 SymlinkMarker,
17348 >(
17349 (flags,),
17350 0x5295b76c71fde733,
17351 fidl::encoding::DynamicFlags::empty(),
17352 ___deadline,
17353 )?;
17354 Ok(_response.s)
17355 }
17356
17357 pub fn r#get_flags(
17366 &self,
17367 ___deadline: zx::MonotonicInstant,
17368 ) -> Result<NodeGetFlagsResult, fidl::Error> {
17369 let _response = self.client.send_query::<
17370 fidl::encoding::EmptyPayload,
17371 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
17372 SymlinkMarker,
17373 >(
17374 (),
17375 0x176eb318f64ec23,
17376 fidl::encoding::DynamicFlags::FLEXIBLE,
17377 ___deadline,
17378 )?
17379 .into_result::<SymlinkMarker>("get_flags")?;
17380 Ok(_response.map(|x| x.flags))
17381 }
17382
17383 pub fn r#set_flags(
17393 &self,
17394 mut flags: Flags,
17395 ___deadline: zx::MonotonicInstant,
17396 ) -> Result<NodeSetFlagsResult, fidl::Error> {
17397 let _response = self.client.send_query::<
17398 NodeSetFlagsRequest,
17399 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
17400 SymlinkMarker,
17401 >(
17402 (flags,),
17403 0x55a8028685791ea8,
17404 fidl::encoding::DynamicFlags::FLEXIBLE,
17405 ___deadline,
17406 )?
17407 .into_result::<SymlinkMarker>("set_flags")?;
17408 Ok(_response.map(|x| x))
17409 }
17410
17411 pub fn r#query_filesystem(
17415 &self,
17416 ___deadline: zx::MonotonicInstant,
17417 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
17418 let _response = self
17419 .client
17420 .send_query::<fidl::encoding::EmptyPayload, NodeQueryFilesystemResponse, SymlinkMarker>(
17421 (),
17422 0x6f344a1c6b0a0610,
17423 fidl::encoding::DynamicFlags::empty(),
17424 ___deadline,
17425 )?;
17426 Ok((_response.s, _response.info))
17427 }
17428
17429 pub fn r#get_attributes(
17443 &self,
17444 mut query: NodeAttributesQuery,
17445 ___deadline: zx::MonotonicInstant,
17446 ) -> Result<NodeGetAttributesResult, fidl::Error> {
17447 let _response = self.client.send_query::<
17448 NodeGetAttributesRequest,
17449 fidl::encoding::ResultType<NodeAttributes2, i32>,
17450 SymlinkMarker,
17451 >(
17452 (query,),
17453 0x3d4396a638ea053b,
17454 fidl::encoding::DynamicFlags::empty(),
17455 ___deadline,
17456 )?;
17457 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
17458 }
17459
17460 pub fn r#update_attributes(
17469 &self,
17470 mut payload: &MutableNodeAttributes,
17471 ___deadline: zx::MonotonicInstant,
17472 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
17473 let _response = self.client.send_query::<
17474 MutableNodeAttributes,
17475 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17476 SymlinkMarker,
17477 >(
17478 payload,
17479 0x3308c1da5a89bf08,
17480 fidl::encoding::DynamicFlags::empty(),
17481 ___deadline,
17482 )?;
17483 Ok(_response.map(|x| x))
17484 }
17485
17486 pub fn r#sync(&self, ___deadline: zx::MonotonicInstant) -> Result<NodeSyncResult, fidl::Error> {
17496 let _response = self.client.send_query::<
17497 fidl::encoding::EmptyPayload,
17498 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17499 SymlinkMarker,
17500 >(
17501 (),
17502 0x2c5c27ca0ab5dc49,
17503 fidl::encoding::DynamicFlags::empty(),
17504 ___deadline,
17505 )?;
17506 Ok(_response.map(|x| x))
17507 }
17508
17509 pub fn r#list_extended_attributes(
17518 &self,
17519 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17520 ) -> Result<(), fidl::Error> {
17521 self.client.send::<NodeListExtendedAttributesRequest>(
17522 (iterator,),
17523 0x4b61033de007fcd0,
17524 fidl::encoding::DynamicFlags::empty(),
17525 )
17526 }
17527
17528 pub fn r#get_extended_attribute(
17535 &self,
17536 mut name: &[u8],
17537 ___deadline: zx::MonotonicInstant,
17538 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
17539 let _response = self.client.send_query::<
17540 NodeGetExtendedAttributeRequest,
17541 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
17542 SymlinkMarker,
17543 >(
17544 (name,),
17545 0x45ffa3ccfdeb76db,
17546 fidl::encoding::DynamicFlags::empty(),
17547 ___deadline,
17548 )?;
17549 Ok(_response.map(|x| x))
17550 }
17551
17552 pub fn r#set_extended_attribute(
17560 &self,
17561 mut name: &[u8],
17562 mut value: ExtendedAttributeValue,
17563 mut mode: SetExtendedAttributeMode,
17564 ___deadline: zx::MonotonicInstant,
17565 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
17566 let _response = self.client.send_query::<
17567 NodeSetExtendedAttributeRequest,
17568 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17569 SymlinkMarker,
17570 >(
17571 (name, &mut value, mode,),
17572 0x4a951362f681f23c,
17573 fidl::encoding::DynamicFlags::empty(),
17574 ___deadline,
17575 )?;
17576 Ok(_response.map(|x| x))
17577 }
17578
17579 pub fn r#remove_extended_attribute(
17585 &self,
17586 mut name: &[u8],
17587 ___deadline: zx::MonotonicInstant,
17588 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
17589 let _response = self.client.send_query::<
17590 NodeRemoveExtendedAttributeRequest,
17591 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
17592 SymlinkMarker,
17593 >(
17594 (name,),
17595 0x7a0b9f3a9bf9032d,
17596 fidl::encoding::DynamicFlags::empty(),
17597 ___deadline,
17598 )?;
17599 Ok(_response.map(|x| x))
17600 }
17601
17602 pub fn r#open(
17609 &self,
17610 mut path: &str,
17611 mut flags: Flags,
17612 mut options: &Options,
17613 mut object: fidl::Channel,
17614 ) -> Result<(), fidl::Error> {
17615 self.client.send::<OpenableOpenRequest>(
17616 (path, flags, options, object),
17617 0x568ddcb9a9cbb6d9,
17618 fidl::encoding::DynamicFlags::FLEXIBLE,
17619 )
17620 }
17621
17622 pub fn r#describe(
17623 &self,
17624 ___deadline: zx::MonotonicInstant,
17625 ) -> Result<SymlinkInfo, fidl::Error> {
17626 let _response = self.client.send_query::<
17627 fidl::encoding::EmptyPayload,
17628 fidl::encoding::FlexibleType<SymlinkInfo>,
17629 SymlinkMarker,
17630 >(
17631 (),
17632 0x742c2ea5e89831f3,
17633 fidl::encoding::DynamicFlags::FLEXIBLE,
17634 ___deadline,
17635 )?
17636 .into_result::<SymlinkMarker>("describe")?;
17637 Ok(_response)
17638 }
17639}
17640
17641#[cfg(target_os = "fuchsia")]
17642impl From<SymlinkSynchronousProxy> for zx::NullableHandle {
17643 fn from(value: SymlinkSynchronousProxy) -> Self {
17644 value.into_channel().into()
17645 }
17646}
17647
17648#[cfg(target_os = "fuchsia")]
17649impl From<fidl::Channel> for SymlinkSynchronousProxy {
17650 fn from(value: fidl::Channel) -> Self {
17651 Self::new(value)
17652 }
17653}
17654
17655#[cfg(target_os = "fuchsia")]
17656impl fidl::endpoints::FromClient for SymlinkSynchronousProxy {
17657 type Protocol = SymlinkMarker;
17658
17659 fn from_client(value: fidl::endpoints::ClientEnd<SymlinkMarker>) -> Self {
17660 Self::new(value.into_channel())
17661 }
17662}
17663
17664#[derive(Debug, Clone)]
17665pub struct SymlinkProxy {
17666 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
17667}
17668
17669impl fidl::endpoints::Proxy for SymlinkProxy {
17670 type Protocol = SymlinkMarker;
17671
17672 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
17673 Self::new(inner)
17674 }
17675
17676 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
17677 self.client.into_channel().map_err(|client| Self { client })
17678 }
17679
17680 fn as_channel(&self) -> &::fidl::AsyncChannel {
17681 self.client.as_channel()
17682 }
17683}
17684
17685impl SymlinkProxy {
17686 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
17688 let protocol_name = <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
17689 Self { client: fidl::client::Client::new(channel, protocol_name) }
17690 }
17691
17692 pub fn take_event_stream(&self) -> SymlinkEventStream {
17698 SymlinkEventStream { event_receiver: self.client.take_event_receiver() }
17699 }
17700
17701 pub fn r#link_into(
17724 &self,
17725 mut dst_parent_token: fidl::Event,
17726 mut dst: &str,
17727 ) -> fidl::client::QueryResponseFut<
17728 LinkableLinkIntoResult,
17729 fidl::encoding::DefaultFuchsiaResourceDialect,
17730 > {
17731 SymlinkProxyInterface::r#link_into(self, dst_parent_token, dst)
17732 }
17733
17734 pub fn r#clone(
17735 &self,
17736 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
17737 ) -> Result<(), fidl::Error> {
17738 SymlinkProxyInterface::r#clone(self, request)
17739 }
17740
17741 pub fn r#close(
17752 &self,
17753 ) -> fidl::client::QueryResponseFut<
17754 fidl_fuchsia_unknown::CloseableCloseResult,
17755 fidl::encoding::DefaultFuchsiaResourceDialect,
17756 > {
17757 SymlinkProxyInterface::r#close(self)
17758 }
17759
17760 pub fn r#query(
17761 &self,
17762 ) -> fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>
17763 {
17764 SymlinkProxyInterface::r#query(self)
17765 }
17766
17767 pub fn r#deprecated_clone(
17769 &self,
17770 mut flags: OpenFlags,
17771 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
17772 ) -> Result<(), fidl::Error> {
17773 SymlinkProxyInterface::r#deprecated_clone(self, flags, object)
17774 }
17775
17776 pub fn r#deprecated_get_attr(
17780 &self,
17781 ) -> fidl::client::QueryResponseFut<
17782 (i32, NodeAttributes),
17783 fidl::encoding::DefaultFuchsiaResourceDialect,
17784 > {
17785 SymlinkProxyInterface::r#deprecated_get_attr(self)
17786 }
17787
17788 pub fn r#deprecated_set_attr(
17790 &self,
17791 mut flags: NodeAttributeFlags,
17792 mut attributes: &NodeAttributes,
17793 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
17794 SymlinkProxyInterface::r#deprecated_set_attr(self, flags, attributes)
17795 }
17796
17797 pub fn r#deprecated_get_flags(
17799 &self,
17800 ) -> fidl::client::QueryResponseFut<
17801 (i32, OpenFlags),
17802 fidl::encoding::DefaultFuchsiaResourceDialect,
17803 > {
17804 SymlinkProxyInterface::r#deprecated_get_flags(self)
17805 }
17806
17807 pub fn r#deprecated_set_flags(
17809 &self,
17810 mut flags: OpenFlags,
17811 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
17812 SymlinkProxyInterface::r#deprecated_set_flags(self, flags)
17813 }
17814
17815 pub fn r#get_flags(
17824 &self,
17825 ) -> fidl::client::QueryResponseFut<
17826 NodeGetFlagsResult,
17827 fidl::encoding::DefaultFuchsiaResourceDialect,
17828 > {
17829 SymlinkProxyInterface::r#get_flags(self)
17830 }
17831
17832 pub fn r#set_flags(
17842 &self,
17843 mut flags: Flags,
17844 ) -> fidl::client::QueryResponseFut<
17845 NodeSetFlagsResult,
17846 fidl::encoding::DefaultFuchsiaResourceDialect,
17847 > {
17848 SymlinkProxyInterface::r#set_flags(self, flags)
17849 }
17850
17851 pub fn r#query_filesystem(
17855 &self,
17856 ) -> fidl::client::QueryResponseFut<
17857 (i32, Option<Box<FilesystemInfo>>),
17858 fidl::encoding::DefaultFuchsiaResourceDialect,
17859 > {
17860 SymlinkProxyInterface::r#query_filesystem(self)
17861 }
17862
17863 pub fn r#get_attributes(
17877 &self,
17878 mut query: NodeAttributesQuery,
17879 ) -> fidl::client::QueryResponseFut<
17880 NodeGetAttributesResult,
17881 fidl::encoding::DefaultFuchsiaResourceDialect,
17882 > {
17883 SymlinkProxyInterface::r#get_attributes(self, query)
17884 }
17885
17886 pub fn r#update_attributes(
17895 &self,
17896 mut payload: &MutableNodeAttributes,
17897 ) -> fidl::client::QueryResponseFut<
17898 NodeUpdateAttributesResult,
17899 fidl::encoding::DefaultFuchsiaResourceDialect,
17900 > {
17901 SymlinkProxyInterface::r#update_attributes(self, payload)
17902 }
17903
17904 pub fn r#sync(
17914 &self,
17915 ) -> fidl::client::QueryResponseFut<NodeSyncResult, fidl::encoding::DefaultFuchsiaResourceDialect>
17916 {
17917 SymlinkProxyInterface::r#sync(self)
17918 }
17919
17920 pub fn r#list_extended_attributes(
17929 &self,
17930 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
17931 ) -> Result<(), fidl::Error> {
17932 SymlinkProxyInterface::r#list_extended_attributes(self, iterator)
17933 }
17934
17935 pub fn r#get_extended_attribute(
17942 &self,
17943 mut name: &[u8],
17944 ) -> fidl::client::QueryResponseFut<
17945 NodeGetExtendedAttributeResult,
17946 fidl::encoding::DefaultFuchsiaResourceDialect,
17947 > {
17948 SymlinkProxyInterface::r#get_extended_attribute(self, name)
17949 }
17950
17951 pub fn r#set_extended_attribute(
17959 &self,
17960 mut name: &[u8],
17961 mut value: ExtendedAttributeValue,
17962 mut mode: SetExtendedAttributeMode,
17963 ) -> fidl::client::QueryResponseFut<
17964 NodeSetExtendedAttributeResult,
17965 fidl::encoding::DefaultFuchsiaResourceDialect,
17966 > {
17967 SymlinkProxyInterface::r#set_extended_attribute(self, name, value, mode)
17968 }
17969
17970 pub fn r#remove_extended_attribute(
17976 &self,
17977 mut name: &[u8],
17978 ) -> fidl::client::QueryResponseFut<
17979 NodeRemoveExtendedAttributeResult,
17980 fidl::encoding::DefaultFuchsiaResourceDialect,
17981 > {
17982 SymlinkProxyInterface::r#remove_extended_attribute(self, name)
17983 }
17984
17985 pub fn r#open(
17992 &self,
17993 mut path: &str,
17994 mut flags: Flags,
17995 mut options: &Options,
17996 mut object: fidl::Channel,
17997 ) -> Result<(), fidl::Error> {
17998 SymlinkProxyInterface::r#open(self, path, flags, options, object)
17999 }
18000
18001 pub fn r#describe(
18002 &self,
18003 ) -> fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
18004 {
18005 SymlinkProxyInterface::r#describe(self)
18006 }
18007}
18008
18009impl SymlinkProxyInterface for SymlinkProxy {
18010 type LinkIntoResponseFut = fidl::client::QueryResponseFut<
18011 LinkableLinkIntoResult,
18012 fidl::encoding::DefaultFuchsiaResourceDialect,
18013 >;
18014 fn r#link_into(
18015 &self,
18016 mut dst_parent_token: fidl::Event,
18017 mut dst: &str,
18018 ) -> Self::LinkIntoResponseFut {
18019 fn _decode(
18020 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18021 ) -> Result<LinkableLinkIntoResult, fidl::Error> {
18022 let _response = fidl::client::decode_transaction_body::<
18023 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18024 fidl::encoding::DefaultFuchsiaResourceDialect,
18025 0x54f3949246a03e74,
18026 >(_buf?)?;
18027 Ok(_response.map(|x| x))
18028 }
18029 self.client.send_query_and_decode::<LinkableLinkIntoRequest, LinkableLinkIntoResult>(
18030 (dst_parent_token, dst),
18031 0x54f3949246a03e74,
18032 fidl::encoding::DynamicFlags::empty(),
18033 _decode,
18034 )
18035 }
18036
18037 fn r#clone(
18038 &self,
18039 mut request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
18040 ) -> Result<(), fidl::Error> {
18041 self.client.send::<fidl_fuchsia_unknown::CloneableCloneRequest>(
18042 (request,),
18043 0x20d8a7aba2168a79,
18044 fidl::encoding::DynamicFlags::empty(),
18045 )
18046 }
18047
18048 type CloseResponseFut = fidl::client::QueryResponseFut<
18049 fidl_fuchsia_unknown::CloseableCloseResult,
18050 fidl::encoding::DefaultFuchsiaResourceDialect,
18051 >;
18052 fn r#close(&self) -> Self::CloseResponseFut {
18053 fn _decode(
18054 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18055 ) -> Result<fidl_fuchsia_unknown::CloseableCloseResult, fidl::Error> {
18056 let _response = fidl::client::decode_transaction_body::<
18057 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18058 fidl::encoding::DefaultFuchsiaResourceDialect,
18059 0x5ac5d459ad7f657e,
18060 >(_buf?)?;
18061 Ok(_response.map(|x| x))
18062 }
18063 self.client.send_query_and_decode::<
18064 fidl::encoding::EmptyPayload,
18065 fidl_fuchsia_unknown::CloseableCloseResult,
18066 >(
18067 (),
18068 0x5ac5d459ad7f657e,
18069 fidl::encoding::DynamicFlags::empty(),
18070 _decode,
18071 )
18072 }
18073
18074 type QueryResponseFut =
18075 fidl::client::QueryResponseFut<Vec<u8>, fidl::encoding::DefaultFuchsiaResourceDialect>;
18076 fn r#query(&self) -> Self::QueryResponseFut {
18077 fn _decode(
18078 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18079 ) -> Result<Vec<u8>, fidl::Error> {
18080 let _response = fidl::client::decode_transaction_body::<
18081 fidl_fuchsia_unknown::QueryableQueryResponse,
18082 fidl::encoding::DefaultFuchsiaResourceDialect,
18083 0x2658edee9decfc06,
18084 >(_buf?)?;
18085 Ok(_response.protocol)
18086 }
18087 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<u8>>(
18088 (),
18089 0x2658edee9decfc06,
18090 fidl::encoding::DynamicFlags::empty(),
18091 _decode,
18092 )
18093 }
18094
18095 fn r#deprecated_clone(
18096 &self,
18097 mut flags: OpenFlags,
18098 mut object: fidl::endpoints::ServerEnd<NodeMarker>,
18099 ) -> Result<(), fidl::Error> {
18100 self.client.send::<NodeDeprecatedCloneRequest>(
18101 (flags, object),
18102 0x5a61678f293ce16f,
18103 fidl::encoding::DynamicFlags::FLEXIBLE,
18104 )
18105 }
18106
18107 type DeprecatedGetAttrResponseFut = fidl::client::QueryResponseFut<
18108 (i32, NodeAttributes),
18109 fidl::encoding::DefaultFuchsiaResourceDialect,
18110 >;
18111 fn r#deprecated_get_attr(&self) -> Self::DeprecatedGetAttrResponseFut {
18112 fn _decode(
18113 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18114 ) -> Result<(i32, NodeAttributes), fidl::Error> {
18115 let _response = fidl::client::decode_transaction_body::<
18116 NodeDeprecatedGetAttrResponse,
18117 fidl::encoding::DefaultFuchsiaResourceDialect,
18118 0x78985e216314dafd,
18119 >(_buf?)?;
18120 Ok((_response.s, _response.attributes))
18121 }
18122 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, NodeAttributes)>(
18123 (),
18124 0x78985e216314dafd,
18125 fidl::encoding::DynamicFlags::empty(),
18126 _decode,
18127 )
18128 }
18129
18130 type DeprecatedSetAttrResponseFut =
18131 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
18132 fn r#deprecated_set_attr(
18133 &self,
18134 mut flags: NodeAttributeFlags,
18135 mut attributes: &NodeAttributes,
18136 ) -> Self::DeprecatedSetAttrResponseFut {
18137 fn _decode(
18138 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18139 ) -> Result<i32, fidl::Error> {
18140 let _response = fidl::client::decode_transaction_body::<
18141 NodeDeprecatedSetAttrResponse,
18142 fidl::encoding::DefaultFuchsiaResourceDialect,
18143 0x4186c0f40d938f46,
18144 >(_buf?)?;
18145 Ok(_response.s)
18146 }
18147 self.client.send_query_and_decode::<NodeDeprecatedSetAttrRequest, i32>(
18148 (flags, attributes),
18149 0x4186c0f40d938f46,
18150 fidl::encoding::DynamicFlags::empty(),
18151 _decode,
18152 )
18153 }
18154
18155 type DeprecatedGetFlagsResponseFut = fidl::client::QueryResponseFut<
18156 (i32, OpenFlags),
18157 fidl::encoding::DefaultFuchsiaResourceDialect,
18158 >;
18159 fn r#deprecated_get_flags(&self) -> Self::DeprecatedGetFlagsResponseFut {
18160 fn _decode(
18161 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18162 ) -> Result<(i32, OpenFlags), fidl::Error> {
18163 let _response = fidl::client::decode_transaction_body::<
18164 NodeDeprecatedGetFlagsResponse,
18165 fidl::encoding::DefaultFuchsiaResourceDialect,
18166 0x5b88fffb8eda3aa1,
18167 >(_buf?)?;
18168 Ok((_response.s, _response.flags))
18169 }
18170 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, (i32, OpenFlags)>(
18171 (),
18172 0x5b88fffb8eda3aa1,
18173 fidl::encoding::DynamicFlags::empty(),
18174 _decode,
18175 )
18176 }
18177
18178 type DeprecatedSetFlagsResponseFut =
18179 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
18180 fn r#deprecated_set_flags(&self, mut flags: OpenFlags) -> Self::DeprecatedSetFlagsResponseFut {
18181 fn _decode(
18182 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18183 ) -> Result<i32, fidl::Error> {
18184 let _response = fidl::client::decode_transaction_body::<
18185 NodeDeprecatedSetFlagsResponse,
18186 fidl::encoding::DefaultFuchsiaResourceDialect,
18187 0x5295b76c71fde733,
18188 >(_buf?)?;
18189 Ok(_response.s)
18190 }
18191 self.client.send_query_and_decode::<NodeDeprecatedSetFlagsRequest, i32>(
18192 (flags,),
18193 0x5295b76c71fde733,
18194 fidl::encoding::DynamicFlags::empty(),
18195 _decode,
18196 )
18197 }
18198
18199 type GetFlagsResponseFut = fidl::client::QueryResponseFut<
18200 NodeGetFlagsResult,
18201 fidl::encoding::DefaultFuchsiaResourceDialect,
18202 >;
18203 fn r#get_flags(&self) -> Self::GetFlagsResponseFut {
18204 fn _decode(
18205 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18206 ) -> Result<NodeGetFlagsResult, fidl::Error> {
18207 let _response = fidl::client::decode_transaction_body::<
18208 fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>,
18209 fidl::encoding::DefaultFuchsiaResourceDialect,
18210 0x176eb318f64ec23,
18211 >(_buf?)?
18212 .into_result::<SymlinkMarker>("get_flags")?;
18213 Ok(_response.map(|x| x.flags))
18214 }
18215 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeGetFlagsResult>(
18216 (),
18217 0x176eb318f64ec23,
18218 fidl::encoding::DynamicFlags::FLEXIBLE,
18219 _decode,
18220 )
18221 }
18222
18223 type SetFlagsResponseFut = fidl::client::QueryResponseFut<
18224 NodeSetFlagsResult,
18225 fidl::encoding::DefaultFuchsiaResourceDialect,
18226 >;
18227 fn r#set_flags(&self, mut flags: Flags) -> Self::SetFlagsResponseFut {
18228 fn _decode(
18229 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18230 ) -> Result<NodeSetFlagsResult, fidl::Error> {
18231 let _response = fidl::client::decode_transaction_body::<
18232 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
18233 fidl::encoding::DefaultFuchsiaResourceDialect,
18234 0x55a8028685791ea8,
18235 >(_buf?)?
18236 .into_result::<SymlinkMarker>("set_flags")?;
18237 Ok(_response.map(|x| x))
18238 }
18239 self.client.send_query_and_decode::<NodeSetFlagsRequest, NodeSetFlagsResult>(
18240 (flags,),
18241 0x55a8028685791ea8,
18242 fidl::encoding::DynamicFlags::FLEXIBLE,
18243 _decode,
18244 )
18245 }
18246
18247 type QueryFilesystemResponseFut = fidl::client::QueryResponseFut<
18248 (i32, Option<Box<FilesystemInfo>>),
18249 fidl::encoding::DefaultFuchsiaResourceDialect,
18250 >;
18251 fn r#query_filesystem(&self) -> Self::QueryFilesystemResponseFut {
18252 fn _decode(
18253 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18254 ) -> Result<(i32, Option<Box<FilesystemInfo>>), fidl::Error> {
18255 let _response = fidl::client::decode_transaction_body::<
18256 NodeQueryFilesystemResponse,
18257 fidl::encoding::DefaultFuchsiaResourceDialect,
18258 0x6f344a1c6b0a0610,
18259 >(_buf?)?;
18260 Ok((_response.s, _response.info))
18261 }
18262 self.client.send_query_and_decode::<
18263 fidl::encoding::EmptyPayload,
18264 (i32, Option<Box<FilesystemInfo>>),
18265 >(
18266 (),
18267 0x6f344a1c6b0a0610,
18268 fidl::encoding::DynamicFlags::empty(),
18269 _decode,
18270 )
18271 }
18272
18273 type GetAttributesResponseFut = fidl::client::QueryResponseFut<
18274 NodeGetAttributesResult,
18275 fidl::encoding::DefaultFuchsiaResourceDialect,
18276 >;
18277 fn r#get_attributes(&self, mut query: NodeAttributesQuery) -> Self::GetAttributesResponseFut {
18278 fn _decode(
18279 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18280 ) -> Result<NodeGetAttributesResult, fidl::Error> {
18281 let _response = fidl::client::decode_transaction_body::<
18282 fidl::encoding::ResultType<NodeAttributes2, i32>,
18283 fidl::encoding::DefaultFuchsiaResourceDialect,
18284 0x3d4396a638ea053b,
18285 >(_buf?)?;
18286 Ok(_response.map(|x| (x.mutable_attributes, x.immutable_attributes)))
18287 }
18288 self.client.send_query_and_decode::<NodeGetAttributesRequest, NodeGetAttributesResult>(
18289 (query,),
18290 0x3d4396a638ea053b,
18291 fidl::encoding::DynamicFlags::empty(),
18292 _decode,
18293 )
18294 }
18295
18296 type UpdateAttributesResponseFut = fidl::client::QueryResponseFut<
18297 NodeUpdateAttributesResult,
18298 fidl::encoding::DefaultFuchsiaResourceDialect,
18299 >;
18300 fn r#update_attributes(
18301 &self,
18302 mut payload: &MutableNodeAttributes,
18303 ) -> Self::UpdateAttributesResponseFut {
18304 fn _decode(
18305 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18306 ) -> Result<NodeUpdateAttributesResult, fidl::Error> {
18307 let _response = fidl::client::decode_transaction_body::<
18308 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18309 fidl::encoding::DefaultFuchsiaResourceDialect,
18310 0x3308c1da5a89bf08,
18311 >(_buf?)?;
18312 Ok(_response.map(|x| x))
18313 }
18314 self.client.send_query_and_decode::<MutableNodeAttributes, NodeUpdateAttributesResult>(
18315 payload,
18316 0x3308c1da5a89bf08,
18317 fidl::encoding::DynamicFlags::empty(),
18318 _decode,
18319 )
18320 }
18321
18322 type SyncResponseFut = fidl::client::QueryResponseFut<
18323 NodeSyncResult,
18324 fidl::encoding::DefaultFuchsiaResourceDialect,
18325 >;
18326 fn r#sync(&self) -> Self::SyncResponseFut {
18327 fn _decode(
18328 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18329 ) -> Result<NodeSyncResult, fidl::Error> {
18330 let _response = fidl::client::decode_transaction_body::<
18331 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18332 fidl::encoding::DefaultFuchsiaResourceDialect,
18333 0x2c5c27ca0ab5dc49,
18334 >(_buf?)?;
18335 Ok(_response.map(|x| x))
18336 }
18337 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, NodeSyncResult>(
18338 (),
18339 0x2c5c27ca0ab5dc49,
18340 fidl::encoding::DynamicFlags::empty(),
18341 _decode,
18342 )
18343 }
18344
18345 fn r#list_extended_attributes(
18346 &self,
18347 mut iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
18348 ) -> Result<(), fidl::Error> {
18349 self.client.send::<NodeListExtendedAttributesRequest>(
18350 (iterator,),
18351 0x4b61033de007fcd0,
18352 fidl::encoding::DynamicFlags::empty(),
18353 )
18354 }
18355
18356 type GetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
18357 NodeGetExtendedAttributeResult,
18358 fidl::encoding::DefaultFuchsiaResourceDialect,
18359 >;
18360 fn r#get_extended_attribute(&self, mut name: &[u8]) -> Self::GetExtendedAttributeResponseFut {
18361 fn _decode(
18362 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18363 ) -> Result<NodeGetExtendedAttributeResult, fidl::Error> {
18364 let _response = fidl::client::decode_transaction_body::<
18365 fidl::encoding::ResultType<ExtendedAttributeValue, i32>,
18366 fidl::encoding::DefaultFuchsiaResourceDialect,
18367 0x45ffa3ccfdeb76db,
18368 >(_buf?)?;
18369 Ok(_response.map(|x| x))
18370 }
18371 self.client.send_query_and_decode::<
18372 NodeGetExtendedAttributeRequest,
18373 NodeGetExtendedAttributeResult,
18374 >(
18375 (name,),
18376 0x45ffa3ccfdeb76db,
18377 fidl::encoding::DynamicFlags::empty(),
18378 _decode,
18379 )
18380 }
18381
18382 type SetExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
18383 NodeSetExtendedAttributeResult,
18384 fidl::encoding::DefaultFuchsiaResourceDialect,
18385 >;
18386 fn r#set_extended_attribute(
18387 &self,
18388 mut name: &[u8],
18389 mut value: ExtendedAttributeValue,
18390 mut mode: SetExtendedAttributeMode,
18391 ) -> Self::SetExtendedAttributeResponseFut {
18392 fn _decode(
18393 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18394 ) -> Result<NodeSetExtendedAttributeResult, fidl::Error> {
18395 let _response = fidl::client::decode_transaction_body::<
18396 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18397 fidl::encoding::DefaultFuchsiaResourceDialect,
18398 0x4a951362f681f23c,
18399 >(_buf?)?;
18400 Ok(_response.map(|x| x))
18401 }
18402 self.client.send_query_and_decode::<
18403 NodeSetExtendedAttributeRequest,
18404 NodeSetExtendedAttributeResult,
18405 >(
18406 (name, &mut value, mode,),
18407 0x4a951362f681f23c,
18408 fidl::encoding::DynamicFlags::empty(),
18409 _decode,
18410 )
18411 }
18412
18413 type RemoveExtendedAttributeResponseFut = fidl::client::QueryResponseFut<
18414 NodeRemoveExtendedAttributeResult,
18415 fidl::encoding::DefaultFuchsiaResourceDialect,
18416 >;
18417 fn r#remove_extended_attribute(
18418 &self,
18419 mut name: &[u8],
18420 ) -> Self::RemoveExtendedAttributeResponseFut {
18421 fn _decode(
18422 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18423 ) -> Result<NodeRemoveExtendedAttributeResult, fidl::Error> {
18424 let _response = fidl::client::decode_transaction_body::<
18425 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
18426 fidl::encoding::DefaultFuchsiaResourceDialect,
18427 0x7a0b9f3a9bf9032d,
18428 >(_buf?)?;
18429 Ok(_response.map(|x| x))
18430 }
18431 self.client.send_query_and_decode::<
18432 NodeRemoveExtendedAttributeRequest,
18433 NodeRemoveExtendedAttributeResult,
18434 >(
18435 (name,),
18436 0x7a0b9f3a9bf9032d,
18437 fidl::encoding::DynamicFlags::empty(),
18438 _decode,
18439 )
18440 }
18441
18442 fn r#open(
18443 &self,
18444 mut path: &str,
18445 mut flags: Flags,
18446 mut options: &Options,
18447 mut object: fidl::Channel,
18448 ) -> Result<(), fidl::Error> {
18449 self.client.send::<OpenableOpenRequest>(
18450 (path, flags, options, object),
18451 0x568ddcb9a9cbb6d9,
18452 fidl::encoding::DynamicFlags::FLEXIBLE,
18453 )
18454 }
18455
18456 type DescribeResponseFut =
18457 fidl::client::QueryResponseFut<SymlinkInfo, fidl::encoding::DefaultFuchsiaResourceDialect>;
18458 fn r#describe(&self) -> Self::DescribeResponseFut {
18459 fn _decode(
18460 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
18461 ) -> Result<SymlinkInfo, fidl::Error> {
18462 let _response = fidl::client::decode_transaction_body::<
18463 fidl::encoding::FlexibleType<SymlinkInfo>,
18464 fidl::encoding::DefaultFuchsiaResourceDialect,
18465 0x742c2ea5e89831f3,
18466 >(_buf?)?
18467 .into_result::<SymlinkMarker>("describe")?;
18468 Ok(_response)
18469 }
18470 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SymlinkInfo>(
18471 (),
18472 0x742c2ea5e89831f3,
18473 fidl::encoding::DynamicFlags::FLEXIBLE,
18474 _decode,
18475 )
18476 }
18477}
18478
18479pub struct SymlinkEventStream {
18480 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
18481}
18482
18483impl std::marker::Unpin for SymlinkEventStream {}
18484
18485impl futures::stream::FusedStream for SymlinkEventStream {
18486 fn is_terminated(&self) -> bool {
18487 self.event_receiver.is_terminated()
18488 }
18489}
18490
18491impl futures::Stream for SymlinkEventStream {
18492 type Item = Result<SymlinkEvent, fidl::Error>;
18493
18494 fn poll_next(
18495 mut self: std::pin::Pin<&mut Self>,
18496 cx: &mut std::task::Context<'_>,
18497 ) -> std::task::Poll<Option<Self::Item>> {
18498 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
18499 &mut self.event_receiver,
18500 cx
18501 )?) {
18502 Some(buf) => std::task::Poll::Ready(Some(SymlinkEvent::decode(buf))),
18503 None => std::task::Poll::Ready(None),
18504 }
18505 }
18506}
18507
18508#[derive(Debug)]
18509pub enum SymlinkEvent {
18510 OnOpen_ {
18511 s: i32,
18512 info: Option<Box<NodeInfoDeprecated>>,
18513 },
18514 OnRepresentation {
18515 payload: Representation,
18516 },
18517 #[non_exhaustive]
18518 _UnknownEvent {
18519 ordinal: u64,
18521 },
18522}
18523
18524impl SymlinkEvent {
18525 #[allow(irrefutable_let_patterns)]
18526 pub fn into_on_open_(self) -> Option<(i32, Option<Box<NodeInfoDeprecated>>)> {
18527 if let SymlinkEvent::OnOpen_ { s, info } = self { Some((s, info)) } else { None }
18528 }
18529 #[allow(irrefutable_let_patterns)]
18530 pub fn into_on_representation(self) -> Option<Representation> {
18531 if let SymlinkEvent::OnRepresentation { payload } = self { Some((payload)) } else { None }
18532 }
18533
18534 fn decode(
18536 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
18537 ) -> Result<SymlinkEvent, fidl::Error> {
18538 let (bytes, _handles) = buf.split_mut();
18539 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
18540 debug_assert_eq!(tx_header.tx_id, 0);
18541 match tx_header.ordinal {
18542 0x7fc7bbb1dbfd1972 => {
18543 let mut out = fidl::new_empty!(
18544 NodeOnOpenRequest,
18545 fidl::encoding::DefaultFuchsiaResourceDialect
18546 );
18547 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeOnOpenRequest>(&tx_header, _body_bytes, _handles, &mut out)?;
18548 Ok((SymlinkEvent::OnOpen_ { s: out.s, info: out.info }))
18549 }
18550 0x5cb40567d80a510c => {
18551 let mut out =
18552 fidl::new_empty!(Representation, fidl::encoding::DefaultFuchsiaResourceDialect);
18553 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<Representation>(&tx_header, _body_bytes, _handles, &mut out)?;
18554 Ok((SymlinkEvent::OnRepresentation { payload: out }))
18555 }
18556 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
18557 Ok(SymlinkEvent::_UnknownEvent { ordinal: tx_header.ordinal })
18558 }
18559 _ => Err(fidl::Error::UnknownOrdinal {
18560 ordinal: tx_header.ordinal,
18561 protocol_name: <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
18562 }),
18563 }
18564 }
18565}
18566
18567pub struct SymlinkRequestStream {
18569 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
18570 is_terminated: bool,
18571}
18572
18573impl std::marker::Unpin for SymlinkRequestStream {}
18574
18575impl futures::stream::FusedStream for SymlinkRequestStream {
18576 fn is_terminated(&self) -> bool {
18577 self.is_terminated
18578 }
18579}
18580
18581impl fidl::endpoints::RequestStream for SymlinkRequestStream {
18582 type Protocol = SymlinkMarker;
18583 type ControlHandle = SymlinkControlHandle;
18584
18585 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
18586 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
18587 }
18588
18589 fn control_handle(&self) -> Self::ControlHandle {
18590 SymlinkControlHandle { inner: self.inner.clone() }
18591 }
18592
18593 fn into_inner(
18594 self,
18595 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
18596 {
18597 (self.inner, self.is_terminated)
18598 }
18599
18600 fn from_inner(
18601 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
18602 is_terminated: bool,
18603 ) -> Self {
18604 Self { inner, is_terminated }
18605 }
18606}
18607
18608impl futures::Stream for SymlinkRequestStream {
18609 type Item = Result<SymlinkRequest, fidl::Error>;
18610
18611 fn poll_next(
18612 mut self: std::pin::Pin<&mut Self>,
18613 cx: &mut std::task::Context<'_>,
18614 ) -> std::task::Poll<Option<Self::Item>> {
18615 let this = &mut *self;
18616 if this.inner.check_shutdown(cx) {
18617 this.is_terminated = true;
18618 return std::task::Poll::Ready(None);
18619 }
18620 if this.is_terminated {
18621 panic!("polled SymlinkRequestStream after completion");
18622 }
18623 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
18624 |bytes, handles| {
18625 match this.inner.channel().read_etc(cx, bytes, handles) {
18626 std::task::Poll::Ready(Ok(())) => {}
18627 std::task::Poll::Pending => return std::task::Poll::Pending,
18628 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
18629 this.is_terminated = true;
18630 return std::task::Poll::Ready(None);
18631 }
18632 std::task::Poll::Ready(Err(e)) => {
18633 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
18634 e.into(),
18635 ))));
18636 }
18637 }
18638
18639 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
18641
18642 std::task::Poll::Ready(Some(match header.ordinal {
18643 0x54f3949246a03e74 => {
18644 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18645 let mut req = fidl::new_empty!(
18646 LinkableLinkIntoRequest,
18647 fidl::encoding::DefaultFuchsiaResourceDialect
18648 );
18649 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<LinkableLinkIntoRequest>(&header, _body_bytes, handles, &mut req)?;
18650 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18651 Ok(SymlinkRequest::LinkInto {
18652 dst_parent_token: req.dst_parent_token,
18653 dst: req.dst,
18654
18655 responder: SymlinkLinkIntoResponder {
18656 control_handle: std::mem::ManuallyDrop::new(control_handle),
18657 tx_id: header.tx_id,
18658 },
18659 })
18660 }
18661 0x20d8a7aba2168a79 => {
18662 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18663 let mut req = fidl::new_empty!(
18664 fidl_fuchsia_unknown::CloneableCloneRequest,
18665 fidl::encoding::DefaultFuchsiaResourceDialect
18666 );
18667 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl_fuchsia_unknown::CloneableCloneRequest>(&header, _body_bytes, handles, &mut req)?;
18668 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18669 Ok(SymlinkRequest::Clone { request: req.request, control_handle })
18670 }
18671 0x5ac5d459ad7f657e => {
18672 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18673 let mut req = fidl::new_empty!(
18674 fidl::encoding::EmptyPayload,
18675 fidl::encoding::DefaultFuchsiaResourceDialect
18676 );
18677 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18678 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18679 Ok(SymlinkRequest::Close {
18680 responder: SymlinkCloseResponder {
18681 control_handle: std::mem::ManuallyDrop::new(control_handle),
18682 tx_id: header.tx_id,
18683 },
18684 })
18685 }
18686 0x2658edee9decfc06 => {
18687 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18688 let mut req = fidl::new_empty!(
18689 fidl::encoding::EmptyPayload,
18690 fidl::encoding::DefaultFuchsiaResourceDialect
18691 );
18692 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18693 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18694 Ok(SymlinkRequest::Query {
18695 responder: SymlinkQueryResponder {
18696 control_handle: std::mem::ManuallyDrop::new(control_handle),
18697 tx_id: header.tx_id,
18698 },
18699 })
18700 }
18701 0x5a61678f293ce16f => {
18702 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18703 let mut req = fidl::new_empty!(
18704 NodeDeprecatedCloneRequest,
18705 fidl::encoding::DefaultFuchsiaResourceDialect
18706 );
18707 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedCloneRequest>(&header, _body_bytes, handles, &mut req)?;
18708 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18709 Ok(SymlinkRequest::DeprecatedClone {
18710 flags: req.flags,
18711 object: req.object,
18712
18713 control_handle,
18714 })
18715 }
18716 0x78985e216314dafd => {
18717 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18718 let mut req = fidl::new_empty!(
18719 fidl::encoding::EmptyPayload,
18720 fidl::encoding::DefaultFuchsiaResourceDialect
18721 );
18722 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18723 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18724 Ok(SymlinkRequest::DeprecatedGetAttr {
18725 responder: SymlinkDeprecatedGetAttrResponder {
18726 control_handle: std::mem::ManuallyDrop::new(control_handle),
18727 tx_id: header.tx_id,
18728 },
18729 })
18730 }
18731 0x4186c0f40d938f46 => {
18732 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18733 let mut req = fidl::new_empty!(
18734 NodeDeprecatedSetAttrRequest,
18735 fidl::encoding::DefaultFuchsiaResourceDialect
18736 );
18737 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetAttrRequest>(&header, _body_bytes, handles, &mut req)?;
18738 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18739 Ok(SymlinkRequest::DeprecatedSetAttr {
18740 flags: req.flags,
18741 attributes: req.attributes,
18742
18743 responder: SymlinkDeprecatedSetAttrResponder {
18744 control_handle: std::mem::ManuallyDrop::new(control_handle),
18745 tx_id: header.tx_id,
18746 },
18747 })
18748 }
18749 0x5b88fffb8eda3aa1 => {
18750 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18751 let mut req = fidl::new_empty!(
18752 fidl::encoding::EmptyPayload,
18753 fidl::encoding::DefaultFuchsiaResourceDialect
18754 );
18755 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18756 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18757 Ok(SymlinkRequest::DeprecatedGetFlags {
18758 responder: SymlinkDeprecatedGetFlagsResponder {
18759 control_handle: std::mem::ManuallyDrop::new(control_handle),
18760 tx_id: header.tx_id,
18761 },
18762 })
18763 }
18764 0x5295b76c71fde733 => {
18765 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18766 let mut req = fidl::new_empty!(
18767 NodeDeprecatedSetFlagsRequest,
18768 fidl::encoding::DefaultFuchsiaResourceDialect
18769 );
18770 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeDeprecatedSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
18771 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18772 Ok(SymlinkRequest::DeprecatedSetFlags {
18773 flags: req.flags,
18774
18775 responder: SymlinkDeprecatedSetFlagsResponder {
18776 control_handle: std::mem::ManuallyDrop::new(control_handle),
18777 tx_id: header.tx_id,
18778 },
18779 })
18780 }
18781 0x176eb318f64ec23 => {
18782 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18783 let mut req = fidl::new_empty!(
18784 fidl::encoding::EmptyPayload,
18785 fidl::encoding::DefaultFuchsiaResourceDialect
18786 );
18787 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18788 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18789 Ok(SymlinkRequest::GetFlags {
18790 responder: SymlinkGetFlagsResponder {
18791 control_handle: std::mem::ManuallyDrop::new(control_handle),
18792 tx_id: header.tx_id,
18793 },
18794 })
18795 }
18796 0x55a8028685791ea8 => {
18797 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18798 let mut req = fidl::new_empty!(
18799 NodeSetFlagsRequest,
18800 fidl::encoding::DefaultFuchsiaResourceDialect
18801 );
18802 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetFlagsRequest>(&header, _body_bytes, handles, &mut req)?;
18803 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18804 Ok(SymlinkRequest::SetFlags {
18805 flags: req.flags,
18806
18807 responder: SymlinkSetFlagsResponder {
18808 control_handle: std::mem::ManuallyDrop::new(control_handle),
18809 tx_id: header.tx_id,
18810 },
18811 })
18812 }
18813 0x6f344a1c6b0a0610 => {
18814 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18815 let mut req = fidl::new_empty!(
18816 fidl::encoding::EmptyPayload,
18817 fidl::encoding::DefaultFuchsiaResourceDialect
18818 );
18819 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18820 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18821 Ok(SymlinkRequest::QueryFilesystem {
18822 responder: SymlinkQueryFilesystemResponder {
18823 control_handle: std::mem::ManuallyDrop::new(control_handle),
18824 tx_id: header.tx_id,
18825 },
18826 })
18827 }
18828 0x3d4396a638ea053b => {
18829 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18830 let mut req = fidl::new_empty!(
18831 NodeGetAttributesRequest,
18832 fidl::encoding::DefaultFuchsiaResourceDialect
18833 );
18834 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
18835 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18836 Ok(SymlinkRequest::GetAttributes {
18837 query: req.query,
18838
18839 responder: SymlinkGetAttributesResponder {
18840 control_handle: std::mem::ManuallyDrop::new(control_handle),
18841 tx_id: header.tx_id,
18842 },
18843 })
18844 }
18845 0x3308c1da5a89bf08 => {
18846 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18847 let mut req = fidl::new_empty!(
18848 MutableNodeAttributes,
18849 fidl::encoding::DefaultFuchsiaResourceDialect
18850 );
18851 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MutableNodeAttributes>(&header, _body_bytes, handles, &mut req)?;
18852 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18853 Ok(SymlinkRequest::UpdateAttributes {
18854 payload: req,
18855 responder: SymlinkUpdateAttributesResponder {
18856 control_handle: std::mem::ManuallyDrop::new(control_handle),
18857 tx_id: header.tx_id,
18858 },
18859 })
18860 }
18861 0x2c5c27ca0ab5dc49 => {
18862 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18863 let mut req = fidl::new_empty!(
18864 fidl::encoding::EmptyPayload,
18865 fidl::encoding::DefaultFuchsiaResourceDialect
18866 );
18867 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18868 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18869 Ok(SymlinkRequest::Sync {
18870 responder: SymlinkSyncResponder {
18871 control_handle: std::mem::ManuallyDrop::new(control_handle),
18872 tx_id: header.tx_id,
18873 },
18874 })
18875 }
18876 0x4b61033de007fcd0 => {
18877 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18878 let mut req = fidl::new_empty!(
18879 NodeListExtendedAttributesRequest,
18880 fidl::encoding::DefaultFuchsiaResourceDialect
18881 );
18882 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeListExtendedAttributesRequest>(&header, _body_bytes, handles, &mut req)?;
18883 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18884 Ok(SymlinkRequest::ListExtendedAttributes {
18885 iterator: req.iterator,
18886
18887 control_handle,
18888 })
18889 }
18890 0x45ffa3ccfdeb76db => {
18891 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18892 let mut req = fidl::new_empty!(
18893 NodeGetExtendedAttributeRequest,
18894 fidl::encoding::DefaultFuchsiaResourceDialect
18895 );
18896 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeGetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18897 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18898 Ok(SymlinkRequest::GetExtendedAttribute {
18899 name: req.name,
18900
18901 responder: SymlinkGetExtendedAttributeResponder {
18902 control_handle: std::mem::ManuallyDrop::new(control_handle),
18903 tx_id: header.tx_id,
18904 },
18905 })
18906 }
18907 0x4a951362f681f23c => {
18908 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18909 let mut req = fidl::new_empty!(
18910 NodeSetExtendedAttributeRequest,
18911 fidl::encoding::DefaultFuchsiaResourceDialect
18912 );
18913 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeSetExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18914 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18915 Ok(SymlinkRequest::SetExtendedAttribute {
18916 name: req.name,
18917 value: req.value,
18918 mode: req.mode,
18919
18920 responder: SymlinkSetExtendedAttributeResponder {
18921 control_handle: std::mem::ManuallyDrop::new(control_handle),
18922 tx_id: header.tx_id,
18923 },
18924 })
18925 }
18926 0x7a0b9f3a9bf9032d => {
18927 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18928 let mut req = fidl::new_empty!(
18929 NodeRemoveExtendedAttributeRequest,
18930 fidl::encoding::DefaultFuchsiaResourceDialect
18931 );
18932 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<NodeRemoveExtendedAttributeRequest>(&header, _body_bytes, handles, &mut req)?;
18933 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18934 Ok(SymlinkRequest::RemoveExtendedAttribute {
18935 name: req.name,
18936
18937 responder: SymlinkRemoveExtendedAttributeResponder {
18938 control_handle: std::mem::ManuallyDrop::new(control_handle),
18939 tx_id: header.tx_id,
18940 },
18941 })
18942 }
18943 0x568ddcb9a9cbb6d9 => {
18944 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
18945 let mut req = fidl::new_empty!(
18946 OpenableOpenRequest,
18947 fidl::encoding::DefaultFuchsiaResourceDialect
18948 );
18949 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<OpenableOpenRequest>(&header, _body_bytes, handles, &mut req)?;
18950 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18951 Ok(SymlinkRequest::Open {
18952 path: req.path,
18953 flags: req.flags,
18954 options: req.options,
18955 object: req.object,
18956
18957 control_handle,
18958 })
18959 }
18960 0x742c2ea5e89831f3 => {
18961 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
18962 let mut req = fidl::new_empty!(
18963 fidl::encoding::EmptyPayload,
18964 fidl::encoding::DefaultFuchsiaResourceDialect
18965 );
18966 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
18967 let control_handle = SymlinkControlHandle { inner: this.inner.clone() };
18968 Ok(SymlinkRequest::Describe {
18969 responder: SymlinkDescribeResponder {
18970 control_handle: std::mem::ManuallyDrop::new(control_handle),
18971 tx_id: header.tx_id,
18972 },
18973 })
18974 }
18975 _ if header.tx_id == 0
18976 && header
18977 .dynamic_flags()
18978 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
18979 {
18980 Ok(SymlinkRequest::_UnknownMethod {
18981 ordinal: header.ordinal,
18982 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
18983 method_type: fidl::MethodType::OneWay,
18984 })
18985 }
18986 _ if header
18987 .dynamic_flags()
18988 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
18989 {
18990 this.inner.send_framework_err(
18991 fidl::encoding::FrameworkErr::UnknownMethod,
18992 header.tx_id,
18993 header.ordinal,
18994 header.dynamic_flags(),
18995 (bytes, handles),
18996 )?;
18997 Ok(SymlinkRequest::_UnknownMethod {
18998 ordinal: header.ordinal,
18999 control_handle: SymlinkControlHandle { inner: this.inner.clone() },
19000 method_type: fidl::MethodType::TwoWay,
19001 })
19002 }
19003 _ => Err(fidl::Error::UnknownOrdinal {
19004 ordinal: header.ordinal,
19005 protocol_name:
19006 <SymlinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
19007 }),
19008 }))
19009 },
19010 )
19011 }
19012}
19013
19014#[derive(Debug)]
19016pub enum SymlinkRequest {
19017 LinkInto {
19040 dst_parent_token: fidl::Event,
19041 dst: String,
19042 responder: SymlinkLinkIntoResponder,
19043 },
19044 Clone {
19045 request: fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
19046 control_handle: SymlinkControlHandle,
19047 },
19048 Close {
19059 responder: SymlinkCloseResponder,
19060 },
19061 Query {
19062 responder: SymlinkQueryResponder,
19063 },
19064 DeprecatedClone {
19066 flags: OpenFlags,
19067 object: fidl::endpoints::ServerEnd<NodeMarker>,
19068 control_handle: SymlinkControlHandle,
19069 },
19070 DeprecatedGetAttr {
19074 responder: SymlinkDeprecatedGetAttrResponder,
19075 },
19076 DeprecatedSetAttr {
19078 flags: NodeAttributeFlags,
19079 attributes: NodeAttributes,
19080 responder: SymlinkDeprecatedSetAttrResponder,
19081 },
19082 DeprecatedGetFlags {
19084 responder: SymlinkDeprecatedGetFlagsResponder,
19085 },
19086 DeprecatedSetFlags {
19088 flags: OpenFlags,
19089 responder: SymlinkDeprecatedSetFlagsResponder,
19090 },
19091 GetFlags {
19100 responder: SymlinkGetFlagsResponder,
19101 },
19102 SetFlags {
19112 flags: Flags,
19113 responder: SymlinkSetFlagsResponder,
19114 },
19115 QueryFilesystem {
19119 responder: SymlinkQueryFilesystemResponder,
19120 },
19121 GetAttributes {
19135 query: NodeAttributesQuery,
19136 responder: SymlinkGetAttributesResponder,
19137 },
19138 UpdateAttributes {
19147 payload: MutableNodeAttributes,
19148 responder: SymlinkUpdateAttributesResponder,
19149 },
19150 Sync {
19160 responder: SymlinkSyncResponder,
19161 },
19162 ListExtendedAttributes {
19171 iterator: fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
19172 control_handle: SymlinkControlHandle,
19173 },
19174 GetExtendedAttribute {
19181 name: Vec<u8>,
19182 responder: SymlinkGetExtendedAttributeResponder,
19183 },
19184 SetExtendedAttribute {
19192 name: Vec<u8>,
19193 value: ExtendedAttributeValue,
19194 mode: SetExtendedAttributeMode,
19195 responder: SymlinkSetExtendedAttributeResponder,
19196 },
19197 RemoveExtendedAttribute {
19203 name: Vec<u8>,
19204 responder: SymlinkRemoveExtendedAttributeResponder,
19205 },
19206 Open {
19213 path: String,
19214 flags: Flags,
19215 options: Options,
19216 object: fidl::Channel,
19217 control_handle: SymlinkControlHandle,
19218 },
19219 Describe {
19220 responder: SymlinkDescribeResponder,
19221 },
19222 #[non_exhaustive]
19224 _UnknownMethod {
19225 ordinal: u64,
19227 control_handle: SymlinkControlHandle,
19228 method_type: fidl::MethodType,
19229 },
19230}
19231
19232impl SymlinkRequest {
19233 #[allow(irrefutable_let_patterns)]
19234 pub fn into_link_into(self) -> Option<(fidl::Event, String, SymlinkLinkIntoResponder)> {
19235 if let SymlinkRequest::LinkInto { dst_parent_token, dst, responder } = self {
19236 Some((dst_parent_token, dst, responder))
19237 } else {
19238 None
19239 }
19240 }
19241
19242 #[allow(irrefutable_let_patterns)]
19243 pub fn into_clone(
19244 self,
19245 ) -> Option<(
19246 fidl::endpoints::ServerEnd<fidl_fuchsia_unknown::CloneableMarker>,
19247 SymlinkControlHandle,
19248 )> {
19249 if let SymlinkRequest::Clone { request, control_handle } = self {
19250 Some((request, control_handle))
19251 } else {
19252 None
19253 }
19254 }
19255
19256 #[allow(irrefutable_let_patterns)]
19257 pub fn into_close(self) -> Option<(SymlinkCloseResponder)> {
19258 if let SymlinkRequest::Close { responder } = self { Some((responder)) } else { None }
19259 }
19260
19261 #[allow(irrefutable_let_patterns)]
19262 pub fn into_query(self) -> Option<(SymlinkQueryResponder)> {
19263 if let SymlinkRequest::Query { responder } = self { Some((responder)) } else { None }
19264 }
19265
19266 #[allow(irrefutable_let_patterns)]
19267 pub fn into_deprecated_clone(
19268 self,
19269 ) -> Option<(OpenFlags, fidl::endpoints::ServerEnd<NodeMarker>, SymlinkControlHandle)> {
19270 if let SymlinkRequest::DeprecatedClone { flags, object, control_handle } = self {
19271 Some((flags, object, control_handle))
19272 } else {
19273 None
19274 }
19275 }
19276
19277 #[allow(irrefutable_let_patterns)]
19278 pub fn into_deprecated_get_attr(self) -> Option<(SymlinkDeprecatedGetAttrResponder)> {
19279 if let SymlinkRequest::DeprecatedGetAttr { responder } = self {
19280 Some((responder))
19281 } else {
19282 None
19283 }
19284 }
19285
19286 #[allow(irrefutable_let_patterns)]
19287 pub fn into_deprecated_set_attr(
19288 self,
19289 ) -> Option<(NodeAttributeFlags, NodeAttributes, SymlinkDeprecatedSetAttrResponder)> {
19290 if let SymlinkRequest::DeprecatedSetAttr { flags, attributes, responder } = self {
19291 Some((flags, attributes, responder))
19292 } else {
19293 None
19294 }
19295 }
19296
19297 #[allow(irrefutable_let_patterns)]
19298 pub fn into_deprecated_get_flags(self) -> Option<(SymlinkDeprecatedGetFlagsResponder)> {
19299 if let SymlinkRequest::DeprecatedGetFlags { responder } = self {
19300 Some((responder))
19301 } else {
19302 None
19303 }
19304 }
19305
19306 #[allow(irrefutable_let_patterns)]
19307 pub fn into_deprecated_set_flags(
19308 self,
19309 ) -> Option<(OpenFlags, SymlinkDeprecatedSetFlagsResponder)> {
19310 if let SymlinkRequest::DeprecatedSetFlags { flags, responder } = self {
19311 Some((flags, responder))
19312 } else {
19313 None
19314 }
19315 }
19316
19317 #[allow(irrefutable_let_patterns)]
19318 pub fn into_get_flags(self) -> Option<(SymlinkGetFlagsResponder)> {
19319 if let SymlinkRequest::GetFlags { responder } = self { Some((responder)) } else { None }
19320 }
19321
19322 #[allow(irrefutable_let_patterns)]
19323 pub fn into_set_flags(self) -> Option<(Flags, SymlinkSetFlagsResponder)> {
19324 if let SymlinkRequest::SetFlags { flags, responder } = self {
19325 Some((flags, responder))
19326 } else {
19327 None
19328 }
19329 }
19330
19331 #[allow(irrefutable_let_patterns)]
19332 pub fn into_query_filesystem(self) -> Option<(SymlinkQueryFilesystemResponder)> {
19333 if let SymlinkRequest::QueryFilesystem { responder } = self {
19334 Some((responder))
19335 } else {
19336 None
19337 }
19338 }
19339
19340 #[allow(irrefutable_let_patterns)]
19341 pub fn into_get_attributes(
19342 self,
19343 ) -> Option<(NodeAttributesQuery, SymlinkGetAttributesResponder)> {
19344 if let SymlinkRequest::GetAttributes { query, responder } = self {
19345 Some((query, responder))
19346 } else {
19347 None
19348 }
19349 }
19350
19351 #[allow(irrefutable_let_patterns)]
19352 pub fn into_update_attributes(
19353 self,
19354 ) -> Option<(MutableNodeAttributes, SymlinkUpdateAttributesResponder)> {
19355 if let SymlinkRequest::UpdateAttributes { payload, responder } = self {
19356 Some((payload, responder))
19357 } else {
19358 None
19359 }
19360 }
19361
19362 #[allow(irrefutable_let_patterns)]
19363 pub fn into_sync(self) -> Option<(SymlinkSyncResponder)> {
19364 if let SymlinkRequest::Sync { responder } = self { Some((responder)) } else { None }
19365 }
19366
19367 #[allow(irrefutable_let_patterns)]
19368 pub fn into_list_extended_attributes(
19369 self,
19370 ) -> Option<(fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>, SymlinkControlHandle)>
19371 {
19372 if let SymlinkRequest::ListExtendedAttributes { iterator, control_handle } = self {
19373 Some((iterator, control_handle))
19374 } else {
19375 None
19376 }
19377 }
19378
19379 #[allow(irrefutable_let_patterns)]
19380 pub fn into_get_extended_attribute(
19381 self,
19382 ) -> Option<(Vec<u8>, SymlinkGetExtendedAttributeResponder)> {
19383 if let SymlinkRequest::GetExtendedAttribute { name, responder } = self {
19384 Some((name, responder))
19385 } else {
19386 None
19387 }
19388 }
19389
19390 #[allow(irrefutable_let_patterns)]
19391 pub fn into_set_extended_attribute(
19392 self,
19393 ) -> Option<(
19394 Vec<u8>,
19395 ExtendedAttributeValue,
19396 SetExtendedAttributeMode,
19397 SymlinkSetExtendedAttributeResponder,
19398 )> {
19399 if let SymlinkRequest::SetExtendedAttribute { name, value, mode, responder } = self {
19400 Some((name, value, mode, responder))
19401 } else {
19402 None
19403 }
19404 }
19405
19406 #[allow(irrefutable_let_patterns)]
19407 pub fn into_remove_extended_attribute(
19408 self,
19409 ) -> Option<(Vec<u8>, SymlinkRemoveExtendedAttributeResponder)> {
19410 if let SymlinkRequest::RemoveExtendedAttribute { name, responder } = self {
19411 Some((name, responder))
19412 } else {
19413 None
19414 }
19415 }
19416
19417 #[allow(irrefutable_let_patterns)]
19418 pub fn into_open(
19419 self,
19420 ) -> Option<(String, Flags, Options, fidl::Channel, SymlinkControlHandle)> {
19421 if let SymlinkRequest::Open { path, flags, options, object, control_handle } = self {
19422 Some((path, flags, options, object, control_handle))
19423 } else {
19424 None
19425 }
19426 }
19427
19428 #[allow(irrefutable_let_patterns)]
19429 pub fn into_describe(self) -> Option<(SymlinkDescribeResponder)> {
19430 if let SymlinkRequest::Describe { responder } = self { Some((responder)) } else { None }
19431 }
19432
19433 pub fn method_name(&self) -> &'static str {
19435 match *self {
19436 SymlinkRequest::LinkInto { .. } => "link_into",
19437 SymlinkRequest::Clone { .. } => "clone",
19438 SymlinkRequest::Close { .. } => "close",
19439 SymlinkRequest::Query { .. } => "query",
19440 SymlinkRequest::DeprecatedClone { .. } => "deprecated_clone",
19441 SymlinkRequest::DeprecatedGetAttr { .. } => "deprecated_get_attr",
19442 SymlinkRequest::DeprecatedSetAttr { .. } => "deprecated_set_attr",
19443 SymlinkRequest::DeprecatedGetFlags { .. } => "deprecated_get_flags",
19444 SymlinkRequest::DeprecatedSetFlags { .. } => "deprecated_set_flags",
19445 SymlinkRequest::GetFlags { .. } => "get_flags",
19446 SymlinkRequest::SetFlags { .. } => "set_flags",
19447 SymlinkRequest::QueryFilesystem { .. } => "query_filesystem",
19448 SymlinkRequest::GetAttributes { .. } => "get_attributes",
19449 SymlinkRequest::UpdateAttributes { .. } => "update_attributes",
19450 SymlinkRequest::Sync { .. } => "sync",
19451 SymlinkRequest::ListExtendedAttributes { .. } => "list_extended_attributes",
19452 SymlinkRequest::GetExtendedAttribute { .. } => "get_extended_attribute",
19453 SymlinkRequest::SetExtendedAttribute { .. } => "set_extended_attribute",
19454 SymlinkRequest::RemoveExtendedAttribute { .. } => "remove_extended_attribute",
19455 SymlinkRequest::Open { .. } => "open",
19456 SymlinkRequest::Describe { .. } => "describe",
19457 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
19458 "unknown one-way method"
19459 }
19460 SymlinkRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
19461 "unknown two-way method"
19462 }
19463 }
19464 }
19465}
19466
19467#[derive(Debug, Clone)]
19468pub struct SymlinkControlHandle {
19469 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
19470}
19471
19472impl SymlinkControlHandle {
19473 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
19474 self.inner.shutdown_with_epitaph(status.into())
19475 }
19476}
19477
19478impl fidl::endpoints::ControlHandle for SymlinkControlHandle {
19479 fn shutdown(&self) {
19480 self.inner.shutdown()
19481 }
19482
19483 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
19484 self.inner.shutdown_with_epitaph(status)
19485 }
19486
19487 fn is_closed(&self) -> bool {
19488 self.inner.channel().is_closed()
19489 }
19490 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
19491 self.inner.channel().on_closed()
19492 }
19493
19494 #[cfg(target_os = "fuchsia")]
19495 fn signal_peer(
19496 &self,
19497 clear_mask: zx::Signals,
19498 set_mask: zx::Signals,
19499 ) -> Result<(), zx_status::Status> {
19500 use fidl::Peered;
19501 self.inner.channel().signal_peer(clear_mask, set_mask)
19502 }
19503}
19504
19505impl SymlinkControlHandle {
19506 pub fn send_on_open_(
19507 &self,
19508 mut s: i32,
19509 mut info: Option<NodeInfoDeprecated>,
19510 ) -> Result<(), fidl::Error> {
19511 self.inner.send::<NodeOnOpenRequest>(
19512 (s, info.as_mut()),
19513 0,
19514 0x7fc7bbb1dbfd1972,
19515 fidl::encoding::DynamicFlags::FLEXIBLE,
19516 )
19517 }
19518
19519 pub fn send_on_representation(&self, mut payload: Representation) -> Result<(), fidl::Error> {
19520 self.inner.send::<Representation>(
19521 &mut payload,
19522 0,
19523 0x5cb40567d80a510c,
19524 fidl::encoding::DynamicFlags::empty(),
19525 )
19526 }
19527}
19528
19529#[must_use = "FIDL methods require a response to be sent"]
19530#[derive(Debug)]
19531pub struct SymlinkLinkIntoResponder {
19532 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19533 tx_id: u32,
19534}
19535
19536impl std::ops::Drop for SymlinkLinkIntoResponder {
19540 fn drop(&mut self) {
19541 self.control_handle.shutdown();
19542 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19544 }
19545}
19546
19547impl fidl::endpoints::Responder for SymlinkLinkIntoResponder {
19548 type ControlHandle = SymlinkControlHandle;
19549
19550 fn control_handle(&self) -> &SymlinkControlHandle {
19551 &self.control_handle
19552 }
19553
19554 fn drop_without_shutdown(mut self) {
19555 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19557 std::mem::forget(self);
19559 }
19560}
19561
19562impl SymlinkLinkIntoResponder {
19563 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19567 let _result = self.send_raw(result);
19568 if _result.is_err() {
19569 self.control_handle.shutdown();
19570 }
19571 self.drop_without_shutdown();
19572 _result
19573 }
19574
19575 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19577 let _result = self.send_raw(result);
19578 self.drop_without_shutdown();
19579 _result
19580 }
19581
19582 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19583 self.control_handle
19584 .inner
19585 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19586 result,
19587 self.tx_id,
19588 0x54f3949246a03e74,
19589 fidl::encoding::DynamicFlags::empty(),
19590 )
19591 }
19592}
19593
19594#[must_use = "FIDL methods require a response to be sent"]
19595#[derive(Debug)]
19596pub struct SymlinkCloseResponder {
19597 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19598 tx_id: u32,
19599}
19600
19601impl std::ops::Drop for SymlinkCloseResponder {
19605 fn drop(&mut self) {
19606 self.control_handle.shutdown();
19607 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19609 }
19610}
19611
19612impl fidl::endpoints::Responder for SymlinkCloseResponder {
19613 type ControlHandle = SymlinkControlHandle;
19614
19615 fn control_handle(&self) -> &SymlinkControlHandle {
19616 &self.control_handle
19617 }
19618
19619 fn drop_without_shutdown(mut self) {
19620 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19622 std::mem::forget(self);
19624 }
19625}
19626
19627impl SymlinkCloseResponder {
19628 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19632 let _result = self.send_raw(result);
19633 if _result.is_err() {
19634 self.control_handle.shutdown();
19635 }
19636 self.drop_without_shutdown();
19637 _result
19638 }
19639
19640 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19642 let _result = self.send_raw(result);
19643 self.drop_without_shutdown();
19644 _result
19645 }
19646
19647 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
19648 self.control_handle
19649 .inner
19650 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
19651 result,
19652 self.tx_id,
19653 0x5ac5d459ad7f657e,
19654 fidl::encoding::DynamicFlags::empty(),
19655 )
19656 }
19657}
19658
19659#[must_use = "FIDL methods require a response to be sent"]
19660#[derive(Debug)]
19661pub struct SymlinkQueryResponder {
19662 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19663 tx_id: u32,
19664}
19665
19666impl std::ops::Drop for SymlinkQueryResponder {
19670 fn drop(&mut self) {
19671 self.control_handle.shutdown();
19672 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19674 }
19675}
19676
19677impl fidl::endpoints::Responder for SymlinkQueryResponder {
19678 type ControlHandle = SymlinkControlHandle;
19679
19680 fn control_handle(&self) -> &SymlinkControlHandle {
19681 &self.control_handle
19682 }
19683
19684 fn drop_without_shutdown(mut self) {
19685 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19687 std::mem::forget(self);
19689 }
19690}
19691
19692impl SymlinkQueryResponder {
19693 pub fn send(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
19697 let _result = self.send_raw(protocol);
19698 if _result.is_err() {
19699 self.control_handle.shutdown();
19700 }
19701 self.drop_without_shutdown();
19702 _result
19703 }
19704
19705 pub fn send_no_shutdown_on_err(self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
19707 let _result = self.send_raw(protocol);
19708 self.drop_without_shutdown();
19709 _result
19710 }
19711
19712 fn send_raw(&self, mut protocol: &[u8]) -> Result<(), fidl::Error> {
19713 self.control_handle.inner.send::<fidl_fuchsia_unknown::QueryableQueryResponse>(
19714 (protocol,),
19715 self.tx_id,
19716 0x2658edee9decfc06,
19717 fidl::encoding::DynamicFlags::empty(),
19718 )
19719 }
19720}
19721
19722#[must_use = "FIDL methods require a response to be sent"]
19723#[derive(Debug)]
19724pub struct SymlinkDeprecatedGetAttrResponder {
19725 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19726 tx_id: u32,
19727}
19728
19729impl std::ops::Drop for SymlinkDeprecatedGetAttrResponder {
19733 fn drop(&mut self) {
19734 self.control_handle.shutdown();
19735 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19737 }
19738}
19739
19740impl fidl::endpoints::Responder for SymlinkDeprecatedGetAttrResponder {
19741 type ControlHandle = SymlinkControlHandle;
19742
19743 fn control_handle(&self) -> &SymlinkControlHandle {
19744 &self.control_handle
19745 }
19746
19747 fn drop_without_shutdown(mut self) {
19748 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19750 std::mem::forget(self);
19752 }
19753}
19754
19755impl SymlinkDeprecatedGetAttrResponder {
19756 pub fn send(self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
19760 let _result = self.send_raw(s, attributes);
19761 if _result.is_err() {
19762 self.control_handle.shutdown();
19763 }
19764 self.drop_without_shutdown();
19765 _result
19766 }
19767
19768 pub fn send_no_shutdown_on_err(
19770 self,
19771 mut s: i32,
19772 mut attributes: &NodeAttributes,
19773 ) -> Result<(), fidl::Error> {
19774 let _result = self.send_raw(s, attributes);
19775 self.drop_without_shutdown();
19776 _result
19777 }
19778
19779 fn send_raw(&self, mut s: i32, mut attributes: &NodeAttributes) -> Result<(), fidl::Error> {
19780 self.control_handle.inner.send::<NodeDeprecatedGetAttrResponse>(
19781 (s, attributes),
19782 self.tx_id,
19783 0x78985e216314dafd,
19784 fidl::encoding::DynamicFlags::empty(),
19785 )
19786 }
19787}
19788
19789#[must_use = "FIDL methods require a response to be sent"]
19790#[derive(Debug)]
19791pub struct SymlinkDeprecatedSetAttrResponder {
19792 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19793 tx_id: u32,
19794}
19795
19796impl std::ops::Drop for SymlinkDeprecatedSetAttrResponder {
19800 fn drop(&mut self) {
19801 self.control_handle.shutdown();
19802 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19804 }
19805}
19806
19807impl fidl::endpoints::Responder for SymlinkDeprecatedSetAttrResponder {
19808 type ControlHandle = SymlinkControlHandle;
19809
19810 fn control_handle(&self) -> &SymlinkControlHandle {
19811 &self.control_handle
19812 }
19813
19814 fn drop_without_shutdown(mut self) {
19815 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19817 std::mem::forget(self);
19819 }
19820}
19821
19822impl SymlinkDeprecatedSetAttrResponder {
19823 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
19827 let _result = self.send_raw(s);
19828 if _result.is_err() {
19829 self.control_handle.shutdown();
19830 }
19831 self.drop_without_shutdown();
19832 _result
19833 }
19834
19835 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
19837 let _result = self.send_raw(s);
19838 self.drop_without_shutdown();
19839 _result
19840 }
19841
19842 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
19843 self.control_handle.inner.send::<NodeDeprecatedSetAttrResponse>(
19844 (s,),
19845 self.tx_id,
19846 0x4186c0f40d938f46,
19847 fidl::encoding::DynamicFlags::empty(),
19848 )
19849 }
19850}
19851
19852#[must_use = "FIDL methods require a response to be sent"]
19853#[derive(Debug)]
19854pub struct SymlinkDeprecatedGetFlagsResponder {
19855 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19856 tx_id: u32,
19857}
19858
19859impl std::ops::Drop for SymlinkDeprecatedGetFlagsResponder {
19863 fn drop(&mut self) {
19864 self.control_handle.shutdown();
19865 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19867 }
19868}
19869
19870impl fidl::endpoints::Responder for SymlinkDeprecatedGetFlagsResponder {
19871 type ControlHandle = SymlinkControlHandle;
19872
19873 fn control_handle(&self) -> &SymlinkControlHandle {
19874 &self.control_handle
19875 }
19876
19877 fn drop_without_shutdown(mut self) {
19878 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19880 std::mem::forget(self);
19882 }
19883}
19884
19885impl SymlinkDeprecatedGetFlagsResponder {
19886 pub fn send(self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
19890 let _result = self.send_raw(s, flags);
19891 if _result.is_err() {
19892 self.control_handle.shutdown();
19893 }
19894 self.drop_without_shutdown();
19895 _result
19896 }
19897
19898 pub fn send_no_shutdown_on_err(
19900 self,
19901 mut s: i32,
19902 mut flags: OpenFlags,
19903 ) -> Result<(), fidl::Error> {
19904 let _result = self.send_raw(s, flags);
19905 self.drop_without_shutdown();
19906 _result
19907 }
19908
19909 fn send_raw(&self, mut s: i32, mut flags: OpenFlags) -> Result<(), fidl::Error> {
19910 self.control_handle.inner.send::<NodeDeprecatedGetFlagsResponse>(
19911 (s, flags),
19912 self.tx_id,
19913 0x5b88fffb8eda3aa1,
19914 fidl::encoding::DynamicFlags::empty(),
19915 )
19916 }
19917}
19918
19919#[must_use = "FIDL methods require a response to be sent"]
19920#[derive(Debug)]
19921pub struct SymlinkDeprecatedSetFlagsResponder {
19922 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19923 tx_id: u32,
19924}
19925
19926impl std::ops::Drop for SymlinkDeprecatedSetFlagsResponder {
19930 fn drop(&mut self) {
19931 self.control_handle.shutdown();
19932 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19934 }
19935}
19936
19937impl fidl::endpoints::Responder for SymlinkDeprecatedSetFlagsResponder {
19938 type ControlHandle = SymlinkControlHandle;
19939
19940 fn control_handle(&self) -> &SymlinkControlHandle {
19941 &self.control_handle
19942 }
19943
19944 fn drop_without_shutdown(mut self) {
19945 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19947 std::mem::forget(self);
19949 }
19950}
19951
19952impl SymlinkDeprecatedSetFlagsResponder {
19953 pub fn send(self, mut s: i32) -> Result<(), fidl::Error> {
19957 let _result = self.send_raw(s);
19958 if _result.is_err() {
19959 self.control_handle.shutdown();
19960 }
19961 self.drop_without_shutdown();
19962 _result
19963 }
19964
19965 pub fn send_no_shutdown_on_err(self, mut s: i32) -> Result<(), fidl::Error> {
19967 let _result = self.send_raw(s);
19968 self.drop_without_shutdown();
19969 _result
19970 }
19971
19972 fn send_raw(&self, mut s: i32) -> Result<(), fidl::Error> {
19973 self.control_handle.inner.send::<NodeDeprecatedSetFlagsResponse>(
19974 (s,),
19975 self.tx_id,
19976 0x5295b76c71fde733,
19977 fidl::encoding::DynamicFlags::empty(),
19978 )
19979 }
19980}
19981
19982#[must_use = "FIDL methods require a response to be sent"]
19983#[derive(Debug)]
19984pub struct SymlinkGetFlagsResponder {
19985 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
19986 tx_id: u32,
19987}
19988
19989impl std::ops::Drop for SymlinkGetFlagsResponder {
19993 fn drop(&mut self) {
19994 self.control_handle.shutdown();
19995 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
19997 }
19998}
19999
20000impl fidl::endpoints::Responder for SymlinkGetFlagsResponder {
20001 type ControlHandle = SymlinkControlHandle;
20002
20003 fn control_handle(&self) -> &SymlinkControlHandle {
20004 &self.control_handle
20005 }
20006
20007 fn drop_without_shutdown(mut self) {
20008 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20010 std::mem::forget(self);
20012 }
20013}
20014
20015impl SymlinkGetFlagsResponder {
20016 pub fn send(self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
20020 let _result = self.send_raw(result);
20021 if _result.is_err() {
20022 self.control_handle.shutdown();
20023 }
20024 self.drop_without_shutdown();
20025 _result
20026 }
20027
20028 pub fn send_no_shutdown_on_err(
20030 self,
20031 mut result: Result<Flags, i32>,
20032 ) -> Result<(), fidl::Error> {
20033 let _result = self.send_raw(result);
20034 self.drop_without_shutdown();
20035 _result
20036 }
20037
20038 fn send_raw(&self, mut result: Result<Flags, i32>) -> Result<(), fidl::Error> {
20039 self.control_handle
20040 .inner
20041 .send::<fidl::encoding::FlexibleResultType<NodeGetFlagsResponse, i32>>(
20042 fidl::encoding::FlexibleResult::new(result.map(|flags| (flags,))),
20043 self.tx_id,
20044 0x176eb318f64ec23,
20045 fidl::encoding::DynamicFlags::FLEXIBLE,
20046 )
20047 }
20048}
20049
20050#[must_use = "FIDL methods require a response to be sent"]
20051#[derive(Debug)]
20052pub struct SymlinkSetFlagsResponder {
20053 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20054 tx_id: u32,
20055}
20056
20057impl std::ops::Drop for SymlinkSetFlagsResponder {
20061 fn drop(&mut self) {
20062 self.control_handle.shutdown();
20063 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20065 }
20066}
20067
20068impl fidl::endpoints::Responder for SymlinkSetFlagsResponder {
20069 type ControlHandle = SymlinkControlHandle;
20070
20071 fn control_handle(&self) -> &SymlinkControlHandle {
20072 &self.control_handle
20073 }
20074
20075 fn drop_without_shutdown(mut self) {
20076 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20078 std::mem::forget(self);
20080 }
20081}
20082
20083impl SymlinkSetFlagsResponder {
20084 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20088 let _result = self.send_raw(result);
20089 if _result.is_err() {
20090 self.control_handle.shutdown();
20091 }
20092 self.drop_without_shutdown();
20093 _result
20094 }
20095
20096 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20098 let _result = self.send_raw(result);
20099 self.drop_without_shutdown();
20100 _result
20101 }
20102
20103 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20104 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
20105 fidl::encoding::EmptyStruct,
20106 i32,
20107 >>(
20108 fidl::encoding::FlexibleResult::new(result),
20109 self.tx_id,
20110 0x55a8028685791ea8,
20111 fidl::encoding::DynamicFlags::FLEXIBLE,
20112 )
20113 }
20114}
20115
20116#[must_use = "FIDL methods require a response to be sent"]
20117#[derive(Debug)]
20118pub struct SymlinkQueryFilesystemResponder {
20119 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20120 tx_id: u32,
20121}
20122
20123impl std::ops::Drop for SymlinkQueryFilesystemResponder {
20127 fn drop(&mut self) {
20128 self.control_handle.shutdown();
20129 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20131 }
20132}
20133
20134impl fidl::endpoints::Responder for SymlinkQueryFilesystemResponder {
20135 type ControlHandle = SymlinkControlHandle;
20136
20137 fn control_handle(&self) -> &SymlinkControlHandle {
20138 &self.control_handle
20139 }
20140
20141 fn drop_without_shutdown(mut self) {
20142 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20144 std::mem::forget(self);
20146 }
20147}
20148
20149impl SymlinkQueryFilesystemResponder {
20150 pub fn send(self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
20154 let _result = self.send_raw(s, info);
20155 if _result.is_err() {
20156 self.control_handle.shutdown();
20157 }
20158 self.drop_without_shutdown();
20159 _result
20160 }
20161
20162 pub fn send_no_shutdown_on_err(
20164 self,
20165 mut s: i32,
20166 mut info: Option<&FilesystemInfo>,
20167 ) -> Result<(), fidl::Error> {
20168 let _result = self.send_raw(s, info);
20169 self.drop_without_shutdown();
20170 _result
20171 }
20172
20173 fn send_raw(&self, mut s: i32, mut info: Option<&FilesystemInfo>) -> Result<(), fidl::Error> {
20174 self.control_handle.inner.send::<NodeQueryFilesystemResponse>(
20175 (s, info),
20176 self.tx_id,
20177 0x6f344a1c6b0a0610,
20178 fidl::encoding::DynamicFlags::empty(),
20179 )
20180 }
20181}
20182
20183#[must_use = "FIDL methods require a response to be sent"]
20184#[derive(Debug)]
20185pub struct SymlinkGetAttributesResponder {
20186 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20187 tx_id: u32,
20188}
20189
20190impl std::ops::Drop for SymlinkGetAttributesResponder {
20194 fn drop(&mut self) {
20195 self.control_handle.shutdown();
20196 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20198 }
20199}
20200
20201impl fidl::endpoints::Responder for SymlinkGetAttributesResponder {
20202 type ControlHandle = SymlinkControlHandle;
20203
20204 fn control_handle(&self) -> &SymlinkControlHandle {
20205 &self.control_handle
20206 }
20207
20208 fn drop_without_shutdown(mut self) {
20209 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20211 std::mem::forget(self);
20213 }
20214}
20215
20216impl SymlinkGetAttributesResponder {
20217 pub fn send(
20221 self,
20222 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
20223 ) -> Result<(), fidl::Error> {
20224 let _result = self.send_raw(result);
20225 if _result.is_err() {
20226 self.control_handle.shutdown();
20227 }
20228 self.drop_without_shutdown();
20229 _result
20230 }
20231
20232 pub fn send_no_shutdown_on_err(
20234 self,
20235 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
20236 ) -> Result<(), fidl::Error> {
20237 let _result = self.send_raw(result);
20238 self.drop_without_shutdown();
20239 _result
20240 }
20241
20242 fn send_raw(
20243 &self,
20244 mut result: Result<(&MutableNodeAttributes, &ImmutableNodeAttributes), i32>,
20245 ) -> Result<(), fidl::Error> {
20246 self.control_handle.inner.send::<fidl::encoding::ResultType<NodeAttributes2, i32>>(
20247 result,
20248 self.tx_id,
20249 0x3d4396a638ea053b,
20250 fidl::encoding::DynamicFlags::empty(),
20251 )
20252 }
20253}
20254
20255#[must_use = "FIDL methods require a response to be sent"]
20256#[derive(Debug)]
20257pub struct SymlinkUpdateAttributesResponder {
20258 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20259 tx_id: u32,
20260}
20261
20262impl std::ops::Drop for SymlinkUpdateAttributesResponder {
20266 fn drop(&mut self) {
20267 self.control_handle.shutdown();
20268 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20270 }
20271}
20272
20273impl fidl::endpoints::Responder for SymlinkUpdateAttributesResponder {
20274 type ControlHandle = SymlinkControlHandle;
20275
20276 fn control_handle(&self) -> &SymlinkControlHandle {
20277 &self.control_handle
20278 }
20279
20280 fn drop_without_shutdown(mut self) {
20281 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20283 std::mem::forget(self);
20285 }
20286}
20287
20288impl SymlinkUpdateAttributesResponder {
20289 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20293 let _result = self.send_raw(result);
20294 if _result.is_err() {
20295 self.control_handle.shutdown();
20296 }
20297 self.drop_without_shutdown();
20298 _result
20299 }
20300
20301 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20303 let _result = self.send_raw(result);
20304 self.drop_without_shutdown();
20305 _result
20306 }
20307
20308 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20309 self.control_handle
20310 .inner
20311 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
20312 result,
20313 self.tx_id,
20314 0x3308c1da5a89bf08,
20315 fidl::encoding::DynamicFlags::empty(),
20316 )
20317 }
20318}
20319
20320#[must_use = "FIDL methods require a response to be sent"]
20321#[derive(Debug)]
20322pub struct SymlinkSyncResponder {
20323 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20324 tx_id: u32,
20325}
20326
20327impl std::ops::Drop for SymlinkSyncResponder {
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 SymlinkSyncResponder {
20339 type ControlHandle = SymlinkControlHandle;
20340
20341 fn control_handle(&self) -> &SymlinkControlHandle {
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 SymlinkSyncResponder {
20354 pub fn send(self, mut result: Result<(), 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<(), 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<(), i32>) -> Result<(), fidl::Error> {
20374 self.control_handle
20375 .inner
20376 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
20377 result,
20378 self.tx_id,
20379 0x2c5c27ca0ab5dc49,
20380 fidl::encoding::DynamicFlags::empty(),
20381 )
20382 }
20383}
20384
20385#[must_use = "FIDL methods require a response to be sent"]
20386#[derive(Debug)]
20387pub struct SymlinkGetExtendedAttributeResponder {
20388 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20389 tx_id: u32,
20390}
20391
20392impl std::ops::Drop for SymlinkGetExtendedAttributeResponder {
20396 fn drop(&mut self) {
20397 self.control_handle.shutdown();
20398 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20400 }
20401}
20402
20403impl fidl::endpoints::Responder for SymlinkGetExtendedAttributeResponder {
20404 type ControlHandle = SymlinkControlHandle;
20405
20406 fn control_handle(&self) -> &SymlinkControlHandle {
20407 &self.control_handle
20408 }
20409
20410 fn drop_without_shutdown(mut self) {
20411 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20413 std::mem::forget(self);
20415 }
20416}
20417
20418impl SymlinkGetExtendedAttributeResponder {
20419 pub fn send(self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
20423 let _result = self.send_raw(result);
20424 if _result.is_err() {
20425 self.control_handle.shutdown();
20426 }
20427 self.drop_without_shutdown();
20428 _result
20429 }
20430
20431 pub fn send_no_shutdown_on_err(
20433 self,
20434 mut result: Result<ExtendedAttributeValue, i32>,
20435 ) -> Result<(), fidl::Error> {
20436 let _result = self.send_raw(result);
20437 self.drop_without_shutdown();
20438 _result
20439 }
20440
20441 fn send_raw(&self, mut result: Result<ExtendedAttributeValue, i32>) -> Result<(), fidl::Error> {
20442 self.control_handle.inner.send::<fidl::encoding::ResultType<ExtendedAttributeValue, i32>>(
20443 result.as_mut().map_err(|e| *e),
20444 self.tx_id,
20445 0x45ffa3ccfdeb76db,
20446 fidl::encoding::DynamicFlags::empty(),
20447 )
20448 }
20449}
20450
20451#[must_use = "FIDL methods require a response to be sent"]
20452#[derive(Debug)]
20453pub struct SymlinkSetExtendedAttributeResponder {
20454 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20455 tx_id: u32,
20456}
20457
20458impl std::ops::Drop for SymlinkSetExtendedAttributeResponder {
20462 fn drop(&mut self) {
20463 self.control_handle.shutdown();
20464 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20466 }
20467}
20468
20469impl fidl::endpoints::Responder for SymlinkSetExtendedAttributeResponder {
20470 type ControlHandle = SymlinkControlHandle;
20471
20472 fn control_handle(&self) -> &SymlinkControlHandle {
20473 &self.control_handle
20474 }
20475
20476 fn drop_without_shutdown(mut self) {
20477 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20479 std::mem::forget(self);
20481 }
20482}
20483
20484impl SymlinkSetExtendedAttributeResponder {
20485 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20489 let _result = self.send_raw(result);
20490 if _result.is_err() {
20491 self.control_handle.shutdown();
20492 }
20493 self.drop_without_shutdown();
20494 _result
20495 }
20496
20497 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20499 let _result = self.send_raw(result);
20500 self.drop_without_shutdown();
20501 _result
20502 }
20503
20504 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20505 self.control_handle
20506 .inner
20507 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
20508 result,
20509 self.tx_id,
20510 0x4a951362f681f23c,
20511 fidl::encoding::DynamicFlags::empty(),
20512 )
20513 }
20514}
20515
20516#[must_use = "FIDL methods require a response to be sent"]
20517#[derive(Debug)]
20518pub struct SymlinkRemoveExtendedAttributeResponder {
20519 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20520 tx_id: u32,
20521}
20522
20523impl std::ops::Drop for SymlinkRemoveExtendedAttributeResponder {
20527 fn drop(&mut self) {
20528 self.control_handle.shutdown();
20529 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20531 }
20532}
20533
20534impl fidl::endpoints::Responder for SymlinkRemoveExtendedAttributeResponder {
20535 type ControlHandle = SymlinkControlHandle;
20536
20537 fn control_handle(&self) -> &SymlinkControlHandle {
20538 &self.control_handle
20539 }
20540
20541 fn drop_without_shutdown(mut self) {
20542 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20544 std::mem::forget(self);
20546 }
20547}
20548
20549impl SymlinkRemoveExtendedAttributeResponder {
20550 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20554 let _result = self.send_raw(result);
20555 if _result.is_err() {
20556 self.control_handle.shutdown();
20557 }
20558 self.drop_without_shutdown();
20559 _result
20560 }
20561
20562 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20564 let _result = self.send_raw(result);
20565 self.drop_without_shutdown();
20566 _result
20567 }
20568
20569 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
20570 self.control_handle
20571 .inner
20572 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
20573 result,
20574 self.tx_id,
20575 0x7a0b9f3a9bf9032d,
20576 fidl::encoding::DynamicFlags::empty(),
20577 )
20578 }
20579}
20580
20581#[must_use = "FIDL methods require a response to be sent"]
20582#[derive(Debug)]
20583pub struct SymlinkDescribeResponder {
20584 control_handle: std::mem::ManuallyDrop<SymlinkControlHandle>,
20585 tx_id: u32,
20586}
20587
20588impl std::ops::Drop for SymlinkDescribeResponder {
20592 fn drop(&mut self) {
20593 self.control_handle.shutdown();
20594 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20596 }
20597}
20598
20599impl fidl::endpoints::Responder for SymlinkDescribeResponder {
20600 type ControlHandle = SymlinkControlHandle;
20601
20602 fn control_handle(&self) -> &SymlinkControlHandle {
20603 &self.control_handle
20604 }
20605
20606 fn drop_without_shutdown(mut self) {
20607 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
20609 std::mem::forget(self);
20611 }
20612}
20613
20614impl SymlinkDescribeResponder {
20615 pub fn send(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
20619 let _result = self.send_raw(payload);
20620 if _result.is_err() {
20621 self.control_handle.shutdown();
20622 }
20623 self.drop_without_shutdown();
20624 _result
20625 }
20626
20627 pub fn send_no_shutdown_on_err(self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
20629 let _result = self.send_raw(payload);
20630 self.drop_without_shutdown();
20631 _result
20632 }
20633
20634 fn send_raw(&self, mut payload: &SymlinkInfo) -> Result<(), fidl::Error> {
20635 self.control_handle.inner.send::<fidl::encoding::FlexibleType<SymlinkInfo>>(
20636 fidl::encoding::Flexible::new(payload),
20637 self.tx_id,
20638 0x742c2ea5e89831f3,
20639 fidl::encoding::DynamicFlags::FLEXIBLE,
20640 )
20641 }
20642}
20643
20644#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
20645pub struct WritableMarker;
20646
20647impl fidl::endpoints::ProtocolMarker for WritableMarker {
20648 type Proxy = WritableProxy;
20649 type RequestStream = WritableRequestStream;
20650 #[cfg(target_os = "fuchsia")]
20651 type SynchronousProxy = WritableSynchronousProxy;
20652
20653 const DEBUG_NAME: &'static str = "(anonymous) Writable";
20654}
20655pub type WritableWriteResult = Result<u64, i32>;
20656
20657pub trait WritableProxyInterface: Send + Sync {
20658 type WriteResponseFut: std::future::Future<Output = Result<WritableWriteResult, fidl::Error>>
20659 + Send;
20660 fn r#write(&self, data: &[u8]) -> Self::WriteResponseFut;
20661}
20662#[derive(Debug)]
20663#[cfg(target_os = "fuchsia")]
20664pub struct WritableSynchronousProxy {
20665 client: fidl::client::sync::Client,
20666}
20667
20668#[cfg(target_os = "fuchsia")]
20669impl fidl::endpoints::SynchronousProxy for WritableSynchronousProxy {
20670 type Proxy = WritableProxy;
20671 type Protocol = WritableMarker;
20672
20673 fn from_channel(inner: fidl::Channel) -> Self {
20674 Self::new(inner)
20675 }
20676
20677 fn into_channel(self) -> fidl::Channel {
20678 self.client.into_channel()
20679 }
20680
20681 fn as_channel(&self) -> &fidl::Channel {
20682 self.client.as_channel()
20683 }
20684}
20685
20686#[cfg(target_os = "fuchsia")]
20687impl WritableSynchronousProxy {
20688 pub fn new(channel: fidl::Channel) -> Self {
20689 Self { client: fidl::client::sync::Client::new(channel) }
20690 }
20691
20692 pub fn into_channel(self) -> fidl::Channel {
20693 self.client.into_channel()
20694 }
20695
20696 pub fn wait_for_event(
20699 &self,
20700 deadline: zx::MonotonicInstant,
20701 ) -> Result<WritableEvent, fidl::Error> {
20702 WritableEvent::decode(self.client.wait_for_event::<WritableMarker>(deadline)?)
20703 }
20704
20705 pub fn r#write(
20729 &self,
20730 mut data: &[u8],
20731 ___deadline: zx::MonotonicInstant,
20732 ) -> Result<WritableWriteResult, fidl::Error> {
20733 let _response = self.client.send_query::<
20734 WritableWriteRequest,
20735 fidl::encoding::ResultType<WritableWriteResponse, i32>,
20736 WritableMarker,
20737 >(
20738 (data,),
20739 0x6a31437832469f82,
20740 fidl::encoding::DynamicFlags::empty(),
20741 ___deadline,
20742 )?;
20743 Ok(_response.map(|x| x.actual_count))
20744 }
20745}
20746
20747#[cfg(target_os = "fuchsia")]
20748impl From<WritableSynchronousProxy> for zx::NullableHandle {
20749 fn from(value: WritableSynchronousProxy) -> Self {
20750 value.into_channel().into()
20751 }
20752}
20753
20754#[cfg(target_os = "fuchsia")]
20755impl From<fidl::Channel> for WritableSynchronousProxy {
20756 fn from(value: fidl::Channel) -> Self {
20757 Self::new(value)
20758 }
20759}
20760
20761#[cfg(target_os = "fuchsia")]
20762impl fidl::endpoints::FromClient for WritableSynchronousProxy {
20763 type Protocol = WritableMarker;
20764
20765 fn from_client(value: fidl::endpoints::ClientEnd<WritableMarker>) -> Self {
20766 Self::new(value.into_channel())
20767 }
20768}
20769
20770#[derive(Debug, Clone)]
20771pub struct WritableProxy {
20772 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
20773}
20774
20775impl fidl::endpoints::Proxy for WritableProxy {
20776 type Protocol = WritableMarker;
20777
20778 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
20779 Self::new(inner)
20780 }
20781
20782 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
20783 self.client.into_channel().map_err(|client| Self { client })
20784 }
20785
20786 fn as_channel(&self) -> &::fidl::AsyncChannel {
20787 self.client.as_channel()
20788 }
20789}
20790
20791impl WritableProxy {
20792 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
20794 let protocol_name = <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
20795 Self { client: fidl::client::Client::new(channel, protocol_name) }
20796 }
20797
20798 pub fn take_event_stream(&self) -> WritableEventStream {
20804 WritableEventStream { event_receiver: self.client.take_event_receiver() }
20805 }
20806
20807 pub fn r#write(
20831 &self,
20832 mut data: &[u8],
20833 ) -> fidl::client::QueryResponseFut<
20834 WritableWriteResult,
20835 fidl::encoding::DefaultFuchsiaResourceDialect,
20836 > {
20837 WritableProxyInterface::r#write(self, data)
20838 }
20839}
20840
20841impl WritableProxyInterface for WritableProxy {
20842 type WriteResponseFut = fidl::client::QueryResponseFut<
20843 WritableWriteResult,
20844 fidl::encoding::DefaultFuchsiaResourceDialect,
20845 >;
20846 fn r#write(&self, mut data: &[u8]) -> Self::WriteResponseFut {
20847 fn _decode(
20848 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
20849 ) -> Result<WritableWriteResult, fidl::Error> {
20850 let _response = fidl::client::decode_transaction_body::<
20851 fidl::encoding::ResultType<WritableWriteResponse, i32>,
20852 fidl::encoding::DefaultFuchsiaResourceDialect,
20853 0x6a31437832469f82,
20854 >(_buf?)?;
20855 Ok(_response.map(|x| x.actual_count))
20856 }
20857 self.client.send_query_and_decode::<WritableWriteRequest, WritableWriteResult>(
20858 (data,),
20859 0x6a31437832469f82,
20860 fidl::encoding::DynamicFlags::empty(),
20861 _decode,
20862 )
20863 }
20864}
20865
20866pub struct WritableEventStream {
20867 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
20868}
20869
20870impl std::marker::Unpin for WritableEventStream {}
20871
20872impl futures::stream::FusedStream for WritableEventStream {
20873 fn is_terminated(&self) -> bool {
20874 self.event_receiver.is_terminated()
20875 }
20876}
20877
20878impl futures::Stream for WritableEventStream {
20879 type Item = Result<WritableEvent, fidl::Error>;
20880
20881 fn poll_next(
20882 mut self: std::pin::Pin<&mut Self>,
20883 cx: &mut std::task::Context<'_>,
20884 ) -> std::task::Poll<Option<Self::Item>> {
20885 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
20886 &mut self.event_receiver,
20887 cx
20888 )?) {
20889 Some(buf) => std::task::Poll::Ready(Some(WritableEvent::decode(buf))),
20890 None => std::task::Poll::Ready(None),
20891 }
20892 }
20893}
20894
20895#[derive(Debug)]
20896pub enum WritableEvent {}
20897
20898impl WritableEvent {
20899 fn decode(
20901 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
20902 ) -> Result<WritableEvent, fidl::Error> {
20903 let (bytes, _handles) = buf.split_mut();
20904 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
20905 debug_assert_eq!(tx_header.tx_id, 0);
20906 match tx_header.ordinal {
20907 _ => Err(fidl::Error::UnknownOrdinal {
20908 ordinal: tx_header.ordinal,
20909 protocol_name: <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
20910 }),
20911 }
20912 }
20913}
20914
20915pub struct WritableRequestStream {
20917 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20918 is_terminated: bool,
20919}
20920
20921impl std::marker::Unpin for WritableRequestStream {}
20922
20923impl futures::stream::FusedStream for WritableRequestStream {
20924 fn is_terminated(&self) -> bool {
20925 self.is_terminated
20926 }
20927}
20928
20929impl fidl::endpoints::RequestStream for WritableRequestStream {
20930 type Protocol = WritableMarker;
20931 type ControlHandle = WritableControlHandle;
20932
20933 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
20934 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
20935 }
20936
20937 fn control_handle(&self) -> Self::ControlHandle {
20938 WritableControlHandle { inner: self.inner.clone() }
20939 }
20940
20941 fn into_inner(
20942 self,
20943 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
20944 {
20945 (self.inner, self.is_terminated)
20946 }
20947
20948 fn from_inner(
20949 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
20950 is_terminated: bool,
20951 ) -> Self {
20952 Self { inner, is_terminated }
20953 }
20954}
20955
20956impl futures::Stream for WritableRequestStream {
20957 type Item = Result<WritableRequest, fidl::Error>;
20958
20959 fn poll_next(
20960 mut self: std::pin::Pin<&mut Self>,
20961 cx: &mut std::task::Context<'_>,
20962 ) -> std::task::Poll<Option<Self::Item>> {
20963 let this = &mut *self;
20964 if this.inner.check_shutdown(cx) {
20965 this.is_terminated = true;
20966 return std::task::Poll::Ready(None);
20967 }
20968 if this.is_terminated {
20969 panic!("polled WritableRequestStream after completion");
20970 }
20971 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
20972 |bytes, handles| {
20973 match this.inner.channel().read_etc(cx, bytes, handles) {
20974 std::task::Poll::Ready(Ok(())) => {}
20975 std::task::Poll::Pending => return std::task::Poll::Pending,
20976 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
20977 this.is_terminated = true;
20978 return std::task::Poll::Ready(None);
20979 }
20980 std::task::Poll::Ready(Err(e)) => {
20981 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
20982 e.into(),
20983 ))));
20984 }
20985 }
20986
20987 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
20989
20990 std::task::Poll::Ready(Some(match header.ordinal {
20991 0x6a31437832469f82 => {
20992 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
20993 let mut req = fidl::new_empty!(
20994 WritableWriteRequest,
20995 fidl::encoding::DefaultFuchsiaResourceDialect
20996 );
20997 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<WritableWriteRequest>(&header, _body_bytes, handles, &mut req)?;
20998 let control_handle = WritableControlHandle { inner: this.inner.clone() };
20999 Ok(WritableRequest::Write {
21000 data: req.data,
21001
21002 responder: WritableWriteResponder {
21003 control_handle: std::mem::ManuallyDrop::new(control_handle),
21004 tx_id: header.tx_id,
21005 },
21006 })
21007 }
21008 _ => Err(fidl::Error::UnknownOrdinal {
21009 ordinal: header.ordinal,
21010 protocol_name:
21011 <WritableMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
21012 }),
21013 }))
21014 },
21015 )
21016 }
21017}
21018
21019#[derive(Debug)]
21020pub enum WritableRequest {
21021 Write { data: Vec<u8>, responder: WritableWriteResponder },
21045}
21046
21047impl WritableRequest {
21048 #[allow(irrefutable_let_patterns)]
21049 pub fn into_write(self) -> Option<(Vec<u8>, WritableWriteResponder)> {
21050 if let WritableRequest::Write { data, responder } = self {
21051 Some((data, responder))
21052 } else {
21053 None
21054 }
21055 }
21056
21057 pub fn method_name(&self) -> &'static str {
21059 match *self {
21060 WritableRequest::Write { .. } => "write",
21061 }
21062 }
21063}
21064
21065#[derive(Debug, Clone)]
21066pub struct WritableControlHandle {
21067 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
21068}
21069
21070impl WritableControlHandle {
21071 pub fn shutdown_with_epitaph(&self, status: impl Into<fidl::Epitaph>) {
21072 self.inner.shutdown_with_epitaph(status.into())
21073 }
21074}
21075
21076impl fidl::endpoints::ControlHandle for WritableControlHandle {
21077 fn shutdown(&self) {
21078 self.inner.shutdown()
21079 }
21080
21081 fn shutdown_with_epitaph(&self, status: fidl::Epitaph) {
21082 self.inner.shutdown_with_epitaph(status)
21083 }
21084
21085 fn is_closed(&self) -> bool {
21086 self.inner.channel().is_closed()
21087 }
21088 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
21089 self.inner.channel().on_closed()
21090 }
21091
21092 #[cfg(target_os = "fuchsia")]
21093 fn signal_peer(
21094 &self,
21095 clear_mask: zx::Signals,
21096 set_mask: zx::Signals,
21097 ) -> Result<(), zx_status::Status> {
21098 use fidl::Peered;
21099 self.inner.channel().signal_peer(clear_mask, set_mask)
21100 }
21101}
21102
21103impl WritableControlHandle {}
21104
21105#[must_use = "FIDL methods require a response to be sent"]
21106#[derive(Debug)]
21107pub struct WritableWriteResponder {
21108 control_handle: std::mem::ManuallyDrop<WritableControlHandle>,
21109 tx_id: u32,
21110}
21111
21112impl std::ops::Drop for WritableWriteResponder {
21116 fn drop(&mut self) {
21117 self.control_handle.shutdown();
21118 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
21120 }
21121}
21122
21123impl fidl::endpoints::Responder for WritableWriteResponder {
21124 type ControlHandle = WritableControlHandle;
21125
21126 fn control_handle(&self) -> &WritableControlHandle {
21127 &self.control_handle
21128 }
21129
21130 fn drop_without_shutdown(mut self) {
21131 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
21133 std::mem::forget(self);
21135 }
21136}
21137
21138impl WritableWriteResponder {
21139 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
21143 let _result = self.send_raw(result);
21144 if _result.is_err() {
21145 self.control_handle.shutdown();
21146 }
21147 self.drop_without_shutdown();
21148 _result
21149 }
21150
21151 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
21153 let _result = self.send_raw(result);
21154 self.drop_without_shutdown();
21155 _result
21156 }
21157
21158 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
21159 self.control_handle.inner.send::<fidl::encoding::ResultType<WritableWriteResponse, i32>>(
21160 result.map(|actual_count| (actual_count,)),
21161 self.tx_id,
21162 0x6a31437832469f82,
21163 fidl::encoding::DynamicFlags::empty(),
21164 )
21165 }
21166}
21167
21168mod internal {
21169 use super::*;
21170
21171 impl fidl::encoding::ResourceTypeMarker for DirectoryCreateSymlinkRequest {
21172 type Borrowed<'a> = &'a mut Self;
21173 fn take_or_borrow<'a>(
21174 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21175 ) -> Self::Borrowed<'a> {
21176 value
21177 }
21178 }
21179
21180 unsafe impl fidl::encoding::TypeMarker for DirectoryCreateSymlinkRequest {
21181 type Owned = Self;
21182
21183 #[inline(always)]
21184 fn inline_align(_context: fidl::encoding::Context) -> usize {
21185 8
21186 }
21187
21188 #[inline(always)]
21189 fn inline_size(_context: fidl::encoding::Context) -> usize {
21190 40
21191 }
21192 }
21193
21194 unsafe impl
21195 fidl::encoding::Encode<
21196 DirectoryCreateSymlinkRequest,
21197 fidl::encoding::DefaultFuchsiaResourceDialect,
21198 > for &mut DirectoryCreateSymlinkRequest
21199 {
21200 #[inline]
21201 unsafe fn encode(
21202 self,
21203 encoder: &mut fidl::encoding::Encoder<
21204 '_,
21205 fidl::encoding::DefaultFuchsiaResourceDialect,
21206 >,
21207 offset: usize,
21208 _depth: fidl::encoding::Depth,
21209 ) -> fidl::Result<()> {
21210 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
21211 fidl::encoding::Encode::<
21213 DirectoryCreateSymlinkRequest,
21214 fidl::encoding::DefaultFuchsiaResourceDialect,
21215 >::encode(
21216 (
21217 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21218 &self.name,
21219 ),
21220 <fidl::encoding::Vector<u8, 4095> as fidl::encoding::ValueTypeMarker>::borrow(
21221 &self.target,
21222 ),
21223 <fidl::encoding::Optional<
21224 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
21225 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21226 &mut self.connection
21227 ),
21228 ),
21229 encoder,
21230 offset,
21231 _depth,
21232 )
21233 }
21234 }
21235 unsafe impl<
21236 T0: fidl::encoding::Encode<
21237 fidl::encoding::BoundedString<255>,
21238 fidl::encoding::DefaultFuchsiaResourceDialect,
21239 >,
21240 T1: fidl::encoding::Encode<
21241 fidl::encoding::Vector<u8, 4095>,
21242 fidl::encoding::DefaultFuchsiaResourceDialect,
21243 >,
21244 T2: fidl::encoding::Encode<
21245 fidl::encoding::Optional<
21246 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
21247 >,
21248 fidl::encoding::DefaultFuchsiaResourceDialect,
21249 >,
21250 >
21251 fidl::encoding::Encode<
21252 DirectoryCreateSymlinkRequest,
21253 fidl::encoding::DefaultFuchsiaResourceDialect,
21254 > for (T0, T1, T2)
21255 {
21256 #[inline]
21257 unsafe fn encode(
21258 self,
21259 encoder: &mut fidl::encoding::Encoder<
21260 '_,
21261 fidl::encoding::DefaultFuchsiaResourceDialect,
21262 >,
21263 offset: usize,
21264 depth: fidl::encoding::Depth,
21265 ) -> fidl::Result<()> {
21266 encoder.debug_check_bounds::<DirectoryCreateSymlinkRequest>(offset);
21267 unsafe {
21270 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
21271 (ptr as *mut u64).write_unaligned(0);
21272 }
21273 self.0.encode(encoder, offset + 0, depth)?;
21275 self.1.encode(encoder, offset + 16, depth)?;
21276 self.2.encode(encoder, offset + 32, depth)?;
21277 Ok(())
21278 }
21279 }
21280
21281 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21282 for DirectoryCreateSymlinkRequest
21283 {
21284 #[inline(always)]
21285 fn new_empty() -> Self {
21286 Self {
21287 name: fidl::new_empty!(
21288 fidl::encoding::BoundedString<255>,
21289 fidl::encoding::DefaultFuchsiaResourceDialect
21290 ),
21291 target: fidl::new_empty!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect),
21292 connection: fidl::new_empty!(
21293 fidl::encoding::Optional<
21294 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
21295 >,
21296 fidl::encoding::DefaultFuchsiaResourceDialect
21297 ),
21298 }
21299 }
21300
21301 #[inline]
21302 unsafe fn decode(
21303 &mut self,
21304 decoder: &mut fidl::encoding::Decoder<
21305 '_,
21306 fidl::encoding::DefaultFuchsiaResourceDialect,
21307 >,
21308 offset: usize,
21309 _depth: fidl::encoding::Depth,
21310 ) -> fidl::Result<()> {
21311 decoder.debug_check_bounds::<Self>(offset);
21312 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
21314 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21315 let mask = 0xffffffff00000000u64;
21316 let maskedval = padval & mask;
21317 if maskedval != 0 {
21318 return Err(fidl::Error::NonZeroPadding {
21319 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
21320 });
21321 }
21322 fidl::decode!(
21323 fidl::encoding::BoundedString<255>,
21324 fidl::encoding::DefaultFuchsiaResourceDialect,
21325 &mut self.name,
21326 decoder,
21327 offset + 0,
21328 _depth
21329 )?;
21330 fidl::decode!(fidl::encoding::Vector<u8, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.target, decoder, offset + 16, _depth)?;
21331 fidl::decode!(
21332 fidl::encoding::Optional<
21333 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SymlinkMarker>>,
21334 >,
21335 fidl::encoding::DefaultFuchsiaResourceDialect,
21336 &mut self.connection,
21337 decoder,
21338 offset + 32,
21339 _depth
21340 )?;
21341 Ok(())
21342 }
21343 }
21344
21345 impl fidl::encoding::ResourceTypeMarker for DirectoryDeprecatedOpenRequest {
21346 type Borrowed<'a> = &'a mut Self;
21347 fn take_or_borrow<'a>(
21348 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21349 ) -> Self::Borrowed<'a> {
21350 value
21351 }
21352 }
21353
21354 unsafe impl fidl::encoding::TypeMarker for DirectoryDeprecatedOpenRequest {
21355 type Owned = Self;
21356
21357 #[inline(always)]
21358 fn inline_align(_context: fidl::encoding::Context) -> usize {
21359 8
21360 }
21361
21362 #[inline(always)]
21363 fn inline_size(_context: fidl::encoding::Context) -> usize {
21364 32
21365 }
21366 }
21367
21368 unsafe impl
21369 fidl::encoding::Encode<
21370 DirectoryDeprecatedOpenRequest,
21371 fidl::encoding::DefaultFuchsiaResourceDialect,
21372 > for &mut DirectoryDeprecatedOpenRequest
21373 {
21374 #[inline]
21375 unsafe fn encode(
21376 self,
21377 encoder: &mut fidl::encoding::Encoder<
21378 '_,
21379 fidl::encoding::DefaultFuchsiaResourceDialect,
21380 >,
21381 offset: usize,
21382 _depth: fidl::encoding::Depth,
21383 ) -> fidl::Result<()> {
21384 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
21385 fidl::encoding::Encode::<DirectoryDeprecatedOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
21387 (
21388 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
21389 <ModeType as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
21390 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
21391 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
21392 ),
21393 encoder, offset, _depth
21394 )
21395 }
21396 }
21397 unsafe impl<
21398 T0: fidl::encoding::Encode<OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect>,
21399 T1: fidl::encoding::Encode<ModeType, fidl::encoding::DefaultFuchsiaResourceDialect>,
21400 T2: fidl::encoding::Encode<
21401 fidl::encoding::BoundedString<4095>,
21402 fidl::encoding::DefaultFuchsiaResourceDialect,
21403 >,
21404 T3: fidl::encoding::Encode<
21405 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
21406 fidl::encoding::DefaultFuchsiaResourceDialect,
21407 >,
21408 >
21409 fidl::encoding::Encode<
21410 DirectoryDeprecatedOpenRequest,
21411 fidl::encoding::DefaultFuchsiaResourceDialect,
21412 > for (T0, T1, T2, T3)
21413 {
21414 #[inline]
21415 unsafe fn encode(
21416 self,
21417 encoder: &mut fidl::encoding::Encoder<
21418 '_,
21419 fidl::encoding::DefaultFuchsiaResourceDialect,
21420 >,
21421 offset: usize,
21422 depth: fidl::encoding::Depth,
21423 ) -> fidl::Result<()> {
21424 encoder.debug_check_bounds::<DirectoryDeprecatedOpenRequest>(offset);
21425 unsafe {
21428 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
21429 (ptr as *mut u64).write_unaligned(0);
21430 }
21431 self.0.encode(encoder, offset + 0, depth)?;
21433 self.1.encode(encoder, offset + 4, depth)?;
21434 self.2.encode(encoder, offset + 8, depth)?;
21435 self.3.encode(encoder, offset + 24, depth)?;
21436 Ok(())
21437 }
21438 }
21439
21440 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21441 for DirectoryDeprecatedOpenRequest
21442 {
21443 #[inline(always)]
21444 fn new_empty() -> Self {
21445 Self {
21446 flags: fidl::new_empty!(OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect),
21447 mode: fidl::new_empty!(ModeType, fidl::encoding::DefaultFuchsiaResourceDialect),
21448 path: fidl::new_empty!(
21449 fidl::encoding::BoundedString<4095>,
21450 fidl::encoding::DefaultFuchsiaResourceDialect
21451 ),
21452 object: fidl::new_empty!(
21453 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
21454 fidl::encoding::DefaultFuchsiaResourceDialect
21455 ),
21456 }
21457 }
21458
21459 #[inline]
21460 unsafe fn decode(
21461 &mut self,
21462 decoder: &mut fidl::encoding::Decoder<
21463 '_,
21464 fidl::encoding::DefaultFuchsiaResourceDialect,
21465 >,
21466 offset: usize,
21467 _depth: fidl::encoding::Depth,
21468 ) -> fidl::Result<()> {
21469 decoder.debug_check_bounds::<Self>(offset);
21470 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
21472 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21473 let mask = 0xffffffff00000000u64;
21474 let maskedval = padval & mask;
21475 if maskedval != 0 {
21476 return Err(fidl::Error::NonZeroPadding {
21477 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
21478 });
21479 }
21480 fidl::decode!(
21481 OpenFlags,
21482 fidl::encoding::DefaultFuchsiaResourceDialect,
21483 &mut self.flags,
21484 decoder,
21485 offset + 0,
21486 _depth
21487 )?;
21488 fidl::decode!(
21489 ModeType,
21490 fidl::encoding::DefaultFuchsiaResourceDialect,
21491 &mut self.mode,
21492 decoder,
21493 offset + 4,
21494 _depth
21495 )?;
21496 fidl::decode!(
21497 fidl::encoding::BoundedString<4095>,
21498 fidl::encoding::DefaultFuchsiaResourceDialect,
21499 &mut self.path,
21500 decoder,
21501 offset + 8,
21502 _depth
21503 )?;
21504 fidl::decode!(
21505 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
21506 fidl::encoding::DefaultFuchsiaResourceDialect,
21507 &mut self.object,
21508 decoder,
21509 offset + 24,
21510 _depth
21511 )?;
21512 Ok(())
21513 }
21514 }
21515
21516 impl fidl::encoding::ResourceTypeMarker for DirectoryGetTokenResponse {
21517 type Borrowed<'a> = &'a mut Self;
21518 fn take_or_borrow<'a>(
21519 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21520 ) -> Self::Borrowed<'a> {
21521 value
21522 }
21523 }
21524
21525 unsafe impl fidl::encoding::TypeMarker for DirectoryGetTokenResponse {
21526 type Owned = Self;
21527
21528 #[inline(always)]
21529 fn inline_align(_context: fidl::encoding::Context) -> usize {
21530 4
21531 }
21532
21533 #[inline(always)]
21534 fn inline_size(_context: fidl::encoding::Context) -> usize {
21535 8
21536 }
21537 }
21538
21539 unsafe impl
21540 fidl::encoding::Encode<
21541 DirectoryGetTokenResponse,
21542 fidl::encoding::DefaultFuchsiaResourceDialect,
21543 > for &mut DirectoryGetTokenResponse
21544 {
21545 #[inline]
21546 unsafe fn encode(
21547 self,
21548 encoder: &mut fidl::encoding::Encoder<
21549 '_,
21550 fidl::encoding::DefaultFuchsiaResourceDialect,
21551 >,
21552 offset: usize,
21553 _depth: fidl::encoding::Depth,
21554 ) -> fidl::Result<()> {
21555 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
21556 fidl::encoding::Encode::<
21558 DirectoryGetTokenResponse,
21559 fidl::encoding::DefaultFuchsiaResourceDialect,
21560 >::encode(
21561 (
21562 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
21563 <fidl::encoding::Optional<
21564 fidl::encoding::HandleType<
21565 fidl::NullableHandle,
21566 { fidl::ObjectType::NONE.into_raw() },
21567 2147483648,
21568 >,
21569 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21570 &mut self.token
21571 ),
21572 ),
21573 encoder,
21574 offset,
21575 _depth,
21576 )
21577 }
21578 }
21579 unsafe impl<
21580 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
21581 T1: fidl::encoding::Encode<
21582 fidl::encoding::Optional<
21583 fidl::encoding::HandleType<
21584 fidl::NullableHandle,
21585 { fidl::ObjectType::NONE.into_raw() },
21586 2147483648,
21587 >,
21588 >,
21589 fidl::encoding::DefaultFuchsiaResourceDialect,
21590 >,
21591 >
21592 fidl::encoding::Encode<
21593 DirectoryGetTokenResponse,
21594 fidl::encoding::DefaultFuchsiaResourceDialect,
21595 > for (T0, T1)
21596 {
21597 #[inline]
21598 unsafe fn encode(
21599 self,
21600 encoder: &mut fidl::encoding::Encoder<
21601 '_,
21602 fidl::encoding::DefaultFuchsiaResourceDialect,
21603 >,
21604 offset: usize,
21605 depth: fidl::encoding::Depth,
21606 ) -> fidl::Result<()> {
21607 encoder.debug_check_bounds::<DirectoryGetTokenResponse>(offset);
21608 self.0.encode(encoder, offset + 0, depth)?;
21612 self.1.encode(encoder, offset + 4, depth)?;
21613 Ok(())
21614 }
21615 }
21616
21617 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21618 for DirectoryGetTokenResponse
21619 {
21620 #[inline(always)]
21621 fn new_empty() -> Self {
21622 Self {
21623 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
21624 token: fidl::new_empty!(
21625 fidl::encoding::Optional<
21626 fidl::encoding::HandleType<
21627 fidl::NullableHandle,
21628 { fidl::ObjectType::NONE.into_raw() },
21629 2147483648,
21630 >,
21631 >,
21632 fidl::encoding::DefaultFuchsiaResourceDialect
21633 ),
21634 }
21635 }
21636
21637 #[inline]
21638 unsafe fn decode(
21639 &mut self,
21640 decoder: &mut fidl::encoding::Decoder<
21641 '_,
21642 fidl::encoding::DefaultFuchsiaResourceDialect,
21643 >,
21644 offset: usize,
21645 _depth: fidl::encoding::Depth,
21646 ) -> fidl::Result<()> {
21647 decoder.debug_check_bounds::<Self>(offset);
21648 fidl::decode!(
21650 i32,
21651 fidl::encoding::DefaultFuchsiaResourceDialect,
21652 &mut self.s,
21653 decoder,
21654 offset + 0,
21655 _depth
21656 )?;
21657 fidl::decode!(
21658 fidl::encoding::Optional<
21659 fidl::encoding::HandleType<
21660 fidl::NullableHandle,
21661 { fidl::ObjectType::NONE.into_raw() },
21662 2147483648,
21663 >,
21664 >,
21665 fidl::encoding::DefaultFuchsiaResourceDialect,
21666 &mut self.token,
21667 decoder,
21668 offset + 4,
21669 _depth
21670 )?;
21671 Ok(())
21672 }
21673 }
21674
21675 impl fidl::encoding::ResourceTypeMarker for DirectoryLinkRequest {
21676 type Borrowed<'a> = &'a mut Self;
21677 fn take_or_borrow<'a>(
21678 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21679 ) -> Self::Borrowed<'a> {
21680 value
21681 }
21682 }
21683
21684 unsafe impl fidl::encoding::TypeMarker for DirectoryLinkRequest {
21685 type Owned = Self;
21686
21687 #[inline(always)]
21688 fn inline_align(_context: fidl::encoding::Context) -> usize {
21689 8
21690 }
21691
21692 #[inline(always)]
21693 fn inline_size(_context: fidl::encoding::Context) -> usize {
21694 40
21695 }
21696 }
21697
21698 unsafe impl
21699 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21700 for &mut DirectoryLinkRequest
21701 {
21702 #[inline]
21703 unsafe fn encode(
21704 self,
21705 encoder: &mut fidl::encoding::Encoder<
21706 '_,
21707 fidl::encoding::DefaultFuchsiaResourceDialect,
21708 >,
21709 offset: usize,
21710 _depth: fidl::encoding::Depth,
21711 ) -> fidl::Result<()> {
21712 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
21713 fidl::encoding::Encode::<
21715 DirectoryLinkRequest,
21716 fidl::encoding::DefaultFuchsiaResourceDialect,
21717 >::encode(
21718 (
21719 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21720 &self.src,
21721 ),
21722 <fidl::encoding::HandleType<
21723 fidl::NullableHandle,
21724 { fidl::ObjectType::NONE.into_raw() },
21725 2147483648,
21726 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21727 &mut self.dst_parent_token,
21728 ),
21729 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21730 &self.dst,
21731 ),
21732 ),
21733 encoder,
21734 offset,
21735 _depth,
21736 )
21737 }
21738 }
21739 unsafe impl<
21740 T0: fidl::encoding::Encode<
21741 fidl::encoding::BoundedString<255>,
21742 fidl::encoding::DefaultFuchsiaResourceDialect,
21743 >,
21744 T1: fidl::encoding::Encode<
21745 fidl::encoding::HandleType<
21746 fidl::NullableHandle,
21747 { fidl::ObjectType::NONE.into_raw() },
21748 2147483648,
21749 >,
21750 fidl::encoding::DefaultFuchsiaResourceDialect,
21751 >,
21752 T2: fidl::encoding::Encode<
21753 fidl::encoding::BoundedString<255>,
21754 fidl::encoding::DefaultFuchsiaResourceDialect,
21755 >,
21756 >
21757 fidl::encoding::Encode<DirectoryLinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
21758 for (T0, T1, T2)
21759 {
21760 #[inline]
21761 unsafe fn encode(
21762 self,
21763 encoder: &mut fidl::encoding::Encoder<
21764 '_,
21765 fidl::encoding::DefaultFuchsiaResourceDialect,
21766 >,
21767 offset: usize,
21768 depth: fidl::encoding::Depth,
21769 ) -> fidl::Result<()> {
21770 encoder.debug_check_bounds::<DirectoryLinkRequest>(offset);
21771 unsafe {
21774 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21775 (ptr as *mut u64).write_unaligned(0);
21776 }
21777 self.0.encode(encoder, offset + 0, depth)?;
21779 self.1.encode(encoder, offset + 16, depth)?;
21780 self.2.encode(encoder, offset + 24, depth)?;
21781 Ok(())
21782 }
21783 }
21784
21785 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21786 for DirectoryLinkRequest
21787 {
21788 #[inline(always)]
21789 fn new_empty() -> Self {
21790 Self {
21791 src: fidl::new_empty!(
21792 fidl::encoding::BoundedString<255>,
21793 fidl::encoding::DefaultFuchsiaResourceDialect
21794 ),
21795 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::NullableHandle, { fidl::ObjectType::NONE.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21796 dst: fidl::new_empty!(
21797 fidl::encoding::BoundedString<255>,
21798 fidl::encoding::DefaultFuchsiaResourceDialect
21799 ),
21800 }
21801 }
21802
21803 #[inline]
21804 unsafe fn decode(
21805 &mut self,
21806 decoder: &mut fidl::encoding::Decoder<
21807 '_,
21808 fidl::encoding::DefaultFuchsiaResourceDialect,
21809 >,
21810 offset: usize,
21811 _depth: fidl::encoding::Depth,
21812 ) -> fidl::Result<()> {
21813 decoder.debug_check_bounds::<Self>(offset);
21814 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21816 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21817 let mask = 0xffffffff00000000u64;
21818 let maskedval = padval & mask;
21819 if maskedval != 0 {
21820 return Err(fidl::Error::NonZeroPadding {
21821 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21822 });
21823 }
21824 fidl::decode!(
21825 fidl::encoding::BoundedString<255>,
21826 fidl::encoding::DefaultFuchsiaResourceDialect,
21827 &mut self.src,
21828 decoder,
21829 offset + 0,
21830 _depth
21831 )?;
21832 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)?;
21833 fidl::decode!(
21834 fidl::encoding::BoundedString<255>,
21835 fidl::encoding::DefaultFuchsiaResourceDialect,
21836 &mut self.dst,
21837 decoder,
21838 offset + 24,
21839 _depth
21840 )?;
21841 Ok(())
21842 }
21843 }
21844
21845 impl fidl::encoding::ResourceTypeMarker for DirectoryRenameRequest {
21846 type Borrowed<'a> = &'a mut Self;
21847 fn take_or_borrow<'a>(
21848 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
21849 ) -> Self::Borrowed<'a> {
21850 value
21851 }
21852 }
21853
21854 unsafe impl fidl::encoding::TypeMarker for DirectoryRenameRequest {
21855 type Owned = Self;
21856
21857 #[inline(always)]
21858 fn inline_align(_context: fidl::encoding::Context) -> usize {
21859 8
21860 }
21861
21862 #[inline(always)]
21863 fn inline_size(_context: fidl::encoding::Context) -> usize {
21864 40
21865 }
21866 }
21867
21868 unsafe impl
21869 fidl::encoding::Encode<
21870 DirectoryRenameRequest,
21871 fidl::encoding::DefaultFuchsiaResourceDialect,
21872 > for &mut DirectoryRenameRequest
21873 {
21874 #[inline]
21875 unsafe fn encode(
21876 self,
21877 encoder: &mut fidl::encoding::Encoder<
21878 '_,
21879 fidl::encoding::DefaultFuchsiaResourceDialect,
21880 >,
21881 offset: usize,
21882 _depth: fidl::encoding::Depth,
21883 ) -> fidl::Result<()> {
21884 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
21885 fidl::encoding::Encode::<
21887 DirectoryRenameRequest,
21888 fidl::encoding::DefaultFuchsiaResourceDialect,
21889 >::encode(
21890 (
21891 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21892 &self.src,
21893 ),
21894 <fidl::encoding::HandleType<
21895 fidl::Event,
21896 { fidl::ObjectType::EVENT.into_raw() },
21897 2147483648,
21898 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
21899 &mut self.dst_parent_token,
21900 ),
21901 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
21902 &self.dst,
21903 ),
21904 ),
21905 encoder,
21906 offset,
21907 _depth,
21908 )
21909 }
21910 }
21911 unsafe impl<
21912 T0: fidl::encoding::Encode<
21913 fidl::encoding::BoundedString<255>,
21914 fidl::encoding::DefaultFuchsiaResourceDialect,
21915 >,
21916 T1: fidl::encoding::Encode<
21917 fidl::encoding::HandleType<
21918 fidl::Event,
21919 { fidl::ObjectType::EVENT.into_raw() },
21920 2147483648,
21921 >,
21922 fidl::encoding::DefaultFuchsiaResourceDialect,
21923 >,
21924 T2: fidl::encoding::Encode<
21925 fidl::encoding::BoundedString<255>,
21926 fidl::encoding::DefaultFuchsiaResourceDialect,
21927 >,
21928 >
21929 fidl::encoding::Encode<
21930 DirectoryRenameRequest,
21931 fidl::encoding::DefaultFuchsiaResourceDialect,
21932 > for (T0, T1, T2)
21933 {
21934 #[inline]
21935 unsafe fn encode(
21936 self,
21937 encoder: &mut fidl::encoding::Encoder<
21938 '_,
21939 fidl::encoding::DefaultFuchsiaResourceDialect,
21940 >,
21941 offset: usize,
21942 depth: fidl::encoding::Depth,
21943 ) -> fidl::Result<()> {
21944 encoder.debug_check_bounds::<DirectoryRenameRequest>(offset);
21945 unsafe {
21948 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
21949 (ptr as *mut u64).write_unaligned(0);
21950 }
21951 self.0.encode(encoder, offset + 0, depth)?;
21953 self.1.encode(encoder, offset + 16, depth)?;
21954 self.2.encode(encoder, offset + 24, depth)?;
21955 Ok(())
21956 }
21957 }
21958
21959 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
21960 for DirectoryRenameRequest
21961 {
21962 #[inline(always)]
21963 fn new_empty() -> Self {
21964 Self {
21965 src: fidl::new_empty!(
21966 fidl::encoding::BoundedString<255>,
21967 fidl::encoding::DefaultFuchsiaResourceDialect
21968 ),
21969 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
21970 dst: fidl::new_empty!(
21971 fidl::encoding::BoundedString<255>,
21972 fidl::encoding::DefaultFuchsiaResourceDialect
21973 ),
21974 }
21975 }
21976
21977 #[inline]
21978 unsafe fn decode(
21979 &mut self,
21980 decoder: &mut fidl::encoding::Decoder<
21981 '_,
21982 fidl::encoding::DefaultFuchsiaResourceDialect,
21983 >,
21984 offset: usize,
21985 _depth: fidl::encoding::Depth,
21986 ) -> fidl::Result<()> {
21987 decoder.debug_check_bounds::<Self>(offset);
21988 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
21990 let padval = unsafe { (ptr as *const u64).read_unaligned() };
21991 let mask = 0xffffffff00000000u64;
21992 let maskedval = padval & mask;
21993 if maskedval != 0 {
21994 return Err(fidl::Error::NonZeroPadding {
21995 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
21996 });
21997 }
21998 fidl::decode!(
21999 fidl::encoding::BoundedString<255>,
22000 fidl::encoding::DefaultFuchsiaResourceDialect,
22001 &mut self.src,
22002 decoder,
22003 offset + 0,
22004 _depth
22005 )?;
22006 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)?;
22007 fidl::decode!(
22008 fidl::encoding::BoundedString<255>,
22009 fidl::encoding::DefaultFuchsiaResourceDialect,
22010 &mut self.dst,
22011 decoder,
22012 offset + 24,
22013 _depth
22014 )?;
22015 Ok(())
22016 }
22017 }
22018
22019 impl fidl::encoding::ResourceTypeMarker for DirectoryWatchRequest {
22020 type Borrowed<'a> = &'a mut Self;
22021 fn take_or_borrow<'a>(
22022 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22023 ) -> Self::Borrowed<'a> {
22024 value
22025 }
22026 }
22027
22028 unsafe impl fidl::encoding::TypeMarker for DirectoryWatchRequest {
22029 type Owned = Self;
22030
22031 #[inline(always)]
22032 fn inline_align(_context: fidl::encoding::Context) -> usize {
22033 4
22034 }
22035
22036 #[inline(always)]
22037 fn inline_size(_context: fidl::encoding::Context) -> usize {
22038 12
22039 }
22040 }
22041
22042 unsafe impl
22043 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22044 for &mut DirectoryWatchRequest
22045 {
22046 #[inline]
22047 unsafe fn encode(
22048 self,
22049 encoder: &mut fidl::encoding::Encoder<
22050 '_,
22051 fidl::encoding::DefaultFuchsiaResourceDialect,
22052 >,
22053 offset: usize,
22054 _depth: fidl::encoding::Depth,
22055 ) -> fidl::Result<()> {
22056 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
22057 fidl::encoding::Encode::<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22059 (
22060 <WatchMask as fidl::encoding::ValueTypeMarker>::borrow(&self.mask),
22061 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
22062 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.watcher),
22063 ),
22064 encoder, offset, _depth
22065 )
22066 }
22067 }
22068 unsafe impl<
22069 T0: fidl::encoding::Encode<WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect>,
22070 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
22071 T2: fidl::encoding::Encode<
22072 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
22073 fidl::encoding::DefaultFuchsiaResourceDialect,
22074 >,
22075 >
22076 fidl::encoding::Encode<DirectoryWatchRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22077 for (T0, T1, T2)
22078 {
22079 #[inline]
22080 unsafe fn encode(
22081 self,
22082 encoder: &mut fidl::encoding::Encoder<
22083 '_,
22084 fidl::encoding::DefaultFuchsiaResourceDialect,
22085 >,
22086 offset: usize,
22087 depth: fidl::encoding::Depth,
22088 ) -> fidl::Result<()> {
22089 encoder.debug_check_bounds::<DirectoryWatchRequest>(offset);
22090 self.0.encode(encoder, offset + 0, depth)?;
22094 self.1.encode(encoder, offset + 4, depth)?;
22095 self.2.encode(encoder, offset + 8, depth)?;
22096 Ok(())
22097 }
22098 }
22099
22100 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22101 for DirectoryWatchRequest
22102 {
22103 #[inline(always)]
22104 fn new_empty() -> Self {
22105 Self {
22106 mask: fidl::new_empty!(WatchMask, fidl::encoding::DefaultFuchsiaResourceDialect),
22107 options: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
22108 watcher: fidl::new_empty!(
22109 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
22110 fidl::encoding::DefaultFuchsiaResourceDialect
22111 ),
22112 }
22113 }
22114
22115 #[inline]
22116 unsafe fn decode(
22117 &mut self,
22118 decoder: &mut fidl::encoding::Decoder<
22119 '_,
22120 fidl::encoding::DefaultFuchsiaResourceDialect,
22121 >,
22122 offset: usize,
22123 _depth: fidl::encoding::Depth,
22124 ) -> fidl::Result<()> {
22125 decoder.debug_check_bounds::<Self>(offset);
22126 fidl::decode!(
22128 WatchMask,
22129 fidl::encoding::DefaultFuchsiaResourceDialect,
22130 &mut self.mask,
22131 decoder,
22132 offset + 0,
22133 _depth
22134 )?;
22135 fidl::decode!(
22136 u32,
22137 fidl::encoding::DefaultFuchsiaResourceDialect,
22138 &mut self.options,
22139 decoder,
22140 offset + 4,
22141 _depth
22142 )?;
22143 fidl::decode!(
22144 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DirectoryWatcherMarker>>,
22145 fidl::encoding::DefaultFuchsiaResourceDialect,
22146 &mut self.watcher,
22147 decoder,
22148 offset + 8,
22149 _depth
22150 )?;
22151 Ok(())
22152 }
22153 }
22154
22155 impl fidl::encoding::ResourceTypeMarker for FileAllocateRequest {
22156 type Borrowed<'a> = &'a mut Self;
22157 fn take_or_borrow<'a>(
22158 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22159 ) -> Self::Borrowed<'a> {
22160 value
22161 }
22162 }
22163
22164 unsafe impl fidl::encoding::TypeMarker for FileAllocateRequest {
22165 type Owned = Self;
22166
22167 #[inline(always)]
22168 fn inline_align(_context: fidl::encoding::Context) -> usize {
22169 8
22170 }
22171
22172 #[inline(always)]
22173 fn inline_size(_context: fidl::encoding::Context) -> usize {
22174 24
22175 }
22176 }
22177
22178 unsafe impl
22179 fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22180 for &mut FileAllocateRequest
22181 {
22182 #[inline]
22183 unsafe fn encode(
22184 self,
22185 encoder: &mut fidl::encoding::Encoder<
22186 '_,
22187 fidl::encoding::DefaultFuchsiaResourceDialect,
22188 >,
22189 offset: usize,
22190 _depth: fidl::encoding::Depth,
22191 ) -> fidl::Result<()> {
22192 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
22193 fidl::encoding::Encode::<
22195 FileAllocateRequest,
22196 fidl::encoding::DefaultFuchsiaResourceDialect,
22197 >::encode(
22198 (
22199 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
22200 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
22201 <AllocateMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
22202 ),
22203 encoder,
22204 offset,
22205 _depth,
22206 )
22207 }
22208 }
22209 unsafe impl<
22210 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
22211 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
22212 T2: fidl::encoding::Encode<AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect>,
22213 > fidl::encoding::Encode<FileAllocateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
22214 for (T0, T1, T2)
22215 {
22216 #[inline]
22217 unsafe fn encode(
22218 self,
22219 encoder: &mut fidl::encoding::Encoder<
22220 '_,
22221 fidl::encoding::DefaultFuchsiaResourceDialect,
22222 >,
22223 offset: usize,
22224 depth: fidl::encoding::Depth,
22225 ) -> fidl::Result<()> {
22226 encoder.debug_check_bounds::<FileAllocateRequest>(offset);
22227 unsafe {
22230 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
22231 (ptr as *mut u64).write_unaligned(0);
22232 }
22233 self.0.encode(encoder, offset + 0, depth)?;
22235 self.1.encode(encoder, offset + 8, depth)?;
22236 self.2.encode(encoder, offset + 16, depth)?;
22237 Ok(())
22238 }
22239 }
22240
22241 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22242 for FileAllocateRequest
22243 {
22244 #[inline(always)]
22245 fn new_empty() -> Self {
22246 Self {
22247 offset: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
22248 length: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
22249 mode: fidl::new_empty!(AllocateMode, fidl::encoding::DefaultFuchsiaResourceDialect),
22250 }
22251 }
22252
22253 #[inline]
22254 unsafe fn decode(
22255 &mut self,
22256 decoder: &mut fidl::encoding::Decoder<
22257 '_,
22258 fidl::encoding::DefaultFuchsiaResourceDialect,
22259 >,
22260 offset: usize,
22261 _depth: fidl::encoding::Depth,
22262 ) -> fidl::Result<()> {
22263 decoder.debug_check_bounds::<Self>(offset);
22264 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
22266 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22267 let mask = 0xffffffff00000000u64;
22268 let maskedval = padval & mask;
22269 if maskedval != 0 {
22270 return Err(fidl::Error::NonZeroPadding {
22271 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
22272 });
22273 }
22274 fidl::decode!(
22275 u64,
22276 fidl::encoding::DefaultFuchsiaResourceDialect,
22277 &mut self.offset,
22278 decoder,
22279 offset + 0,
22280 _depth
22281 )?;
22282 fidl::decode!(
22283 u64,
22284 fidl::encoding::DefaultFuchsiaResourceDialect,
22285 &mut self.length,
22286 decoder,
22287 offset + 8,
22288 _depth
22289 )?;
22290 fidl::decode!(
22291 AllocateMode,
22292 fidl::encoding::DefaultFuchsiaResourceDialect,
22293 &mut self.mode,
22294 decoder,
22295 offset + 16,
22296 _depth
22297 )?;
22298 Ok(())
22299 }
22300 }
22301
22302 impl fidl::encoding::ResourceTypeMarker for FileEnableVerityRequest {
22303 type Borrowed<'a> = &'a mut Self;
22304 fn take_or_borrow<'a>(
22305 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22306 ) -> Self::Borrowed<'a> {
22307 value
22308 }
22309 }
22310
22311 unsafe impl fidl::encoding::TypeMarker for FileEnableVerityRequest {
22312 type Owned = Self;
22313
22314 #[inline(always)]
22315 fn inline_align(_context: fidl::encoding::Context) -> usize {
22316 8
22317 }
22318
22319 #[inline(always)]
22320 fn inline_size(_context: fidl::encoding::Context) -> usize {
22321 16
22322 }
22323 }
22324
22325 unsafe impl
22326 fidl::encoding::Encode<
22327 FileEnableVerityRequest,
22328 fidl::encoding::DefaultFuchsiaResourceDialect,
22329 > for &mut FileEnableVerityRequest
22330 {
22331 #[inline]
22332 unsafe fn encode(
22333 self,
22334 encoder: &mut fidl::encoding::Encoder<
22335 '_,
22336 fidl::encoding::DefaultFuchsiaResourceDialect,
22337 >,
22338 offset: usize,
22339 _depth: fidl::encoding::Depth,
22340 ) -> fidl::Result<()> {
22341 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
22342 fidl::encoding::Encode::<
22344 FileEnableVerityRequest,
22345 fidl::encoding::DefaultFuchsiaResourceDialect,
22346 >::encode(
22347 (<VerificationOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
22348 encoder,
22349 offset,
22350 _depth,
22351 )
22352 }
22353 }
22354 unsafe impl<
22355 T0: fidl::encoding::Encode<VerificationOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
22356 >
22357 fidl::encoding::Encode<
22358 FileEnableVerityRequest,
22359 fidl::encoding::DefaultFuchsiaResourceDialect,
22360 > for (T0,)
22361 {
22362 #[inline]
22363 unsafe fn encode(
22364 self,
22365 encoder: &mut fidl::encoding::Encoder<
22366 '_,
22367 fidl::encoding::DefaultFuchsiaResourceDialect,
22368 >,
22369 offset: usize,
22370 depth: fidl::encoding::Depth,
22371 ) -> fidl::Result<()> {
22372 encoder.debug_check_bounds::<FileEnableVerityRequest>(offset);
22373 self.0.encode(encoder, offset + 0, depth)?;
22377 Ok(())
22378 }
22379 }
22380
22381 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22382 for FileEnableVerityRequest
22383 {
22384 #[inline(always)]
22385 fn new_empty() -> Self {
22386 Self {
22387 options: fidl::new_empty!(
22388 VerificationOptions,
22389 fidl::encoding::DefaultFuchsiaResourceDialect
22390 ),
22391 }
22392 }
22393
22394 #[inline]
22395 unsafe fn decode(
22396 &mut self,
22397 decoder: &mut fidl::encoding::Decoder<
22398 '_,
22399 fidl::encoding::DefaultFuchsiaResourceDialect,
22400 >,
22401 offset: usize,
22402 _depth: fidl::encoding::Depth,
22403 ) -> fidl::Result<()> {
22404 decoder.debug_check_bounds::<Self>(offset);
22405 fidl::decode!(
22407 VerificationOptions,
22408 fidl::encoding::DefaultFuchsiaResourceDialect,
22409 &mut self.options,
22410 decoder,
22411 offset + 0,
22412 _depth
22413 )?;
22414 Ok(())
22415 }
22416 }
22417
22418 impl fidl::encoding::ResourceTypeMarker for FileObject {
22419 type Borrowed<'a> = &'a mut Self;
22420 fn take_or_borrow<'a>(
22421 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22422 ) -> Self::Borrowed<'a> {
22423 value
22424 }
22425 }
22426
22427 unsafe impl fidl::encoding::TypeMarker for FileObject {
22428 type Owned = Self;
22429
22430 #[inline(always)]
22431 fn inline_align(_context: fidl::encoding::Context) -> usize {
22432 4
22433 }
22434
22435 #[inline(always)]
22436 fn inline_size(_context: fidl::encoding::Context) -> usize {
22437 8
22438 }
22439 }
22440
22441 unsafe impl fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
22442 for &mut FileObject
22443 {
22444 #[inline]
22445 unsafe fn encode(
22446 self,
22447 encoder: &mut fidl::encoding::Encoder<
22448 '_,
22449 fidl::encoding::DefaultFuchsiaResourceDialect,
22450 >,
22451 offset: usize,
22452 _depth: fidl::encoding::Depth,
22453 ) -> fidl::Result<()> {
22454 encoder.debug_check_bounds::<FileObject>(offset);
22455 fidl::encoding::Encode::<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22457 (
22458 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.event),
22459 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.stream),
22460 ),
22461 encoder, offset, _depth
22462 )
22463 }
22464 }
22465 unsafe impl<
22466 T0: fidl::encoding::Encode<
22467 fidl::encoding::Optional<
22468 fidl::encoding::HandleType<
22469 fidl::Event,
22470 { fidl::ObjectType::EVENT.into_raw() },
22471 2147483648,
22472 >,
22473 >,
22474 fidl::encoding::DefaultFuchsiaResourceDialect,
22475 >,
22476 T1: fidl::encoding::Encode<
22477 fidl::encoding::Optional<
22478 fidl::encoding::HandleType<
22479 fidl::Stream,
22480 { fidl::ObjectType::STREAM.into_raw() },
22481 2147483648,
22482 >,
22483 >,
22484 fidl::encoding::DefaultFuchsiaResourceDialect,
22485 >,
22486 > fidl::encoding::Encode<FileObject, fidl::encoding::DefaultFuchsiaResourceDialect>
22487 for (T0, T1)
22488 {
22489 #[inline]
22490 unsafe fn encode(
22491 self,
22492 encoder: &mut fidl::encoding::Encoder<
22493 '_,
22494 fidl::encoding::DefaultFuchsiaResourceDialect,
22495 >,
22496 offset: usize,
22497 depth: fidl::encoding::Depth,
22498 ) -> fidl::Result<()> {
22499 encoder.debug_check_bounds::<FileObject>(offset);
22500 self.0.encode(encoder, offset + 0, depth)?;
22504 self.1.encode(encoder, offset + 4, depth)?;
22505 Ok(())
22506 }
22507 }
22508
22509 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileObject {
22510 #[inline(always)]
22511 fn new_empty() -> Self {
22512 Self {
22513 event: fidl::new_empty!(
22514 fidl::encoding::Optional<
22515 fidl::encoding::HandleType<
22516 fidl::Event,
22517 { fidl::ObjectType::EVENT.into_raw() },
22518 2147483648,
22519 >,
22520 >,
22521 fidl::encoding::DefaultFuchsiaResourceDialect
22522 ),
22523 stream: fidl::new_empty!(
22524 fidl::encoding::Optional<
22525 fidl::encoding::HandleType<
22526 fidl::Stream,
22527 { fidl::ObjectType::STREAM.into_raw() },
22528 2147483648,
22529 >,
22530 >,
22531 fidl::encoding::DefaultFuchsiaResourceDialect
22532 ),
22533 }
22534 }
22535
22536 #[inline]
22537 unsafe fn decode(
22538 &mut self,
22539 decoder: &mut fidl::encoding::Decoder<
22540 '_,
22541 fidl::encoding::DefaultFuchsiaResourceDialect,
22542 >,
22543 offset: usize,
22544 _depth: fidl::encoding::Depth,
22545 ) -> fidl::Result<()> {
22546 decoder.debug_check_bounds::<Self>(offset);
22547 fidl::decode!(
22549 fidl::encoding::Optional<
22550 fidl::encoding::HandleType<
22551 fidl::Event,
22552 { fidl::ObjectType::EVENT.into_raw() },
22553 2147483648,
22554 >,
22555 >,
22556 fidl::encoding::DefaultFuchsiaResourceDialect,
22557 &mut self.event,
22558 decoder,
22559 offset + 0,
22560 _depth
22561 )?;
22562 fidl::decode!(
22563 fidl::encoding::Optional<
22564 fidl::encoding::HandleType<
22565 fidl::Stream,
22566 { fidl::ObjectType::STREAM.into_raw() },
22567 2147483648,
22568 >,
22569 >,
22570 fidl::encoding::DefaultFuchsiaResourceDialect,
22571 &mut self.stream,
22572 decoder,
22573 offset + 4,
22574 _depth
22575 )?;
22576 Ok(())
22577 }
22578 }
22579
22580 impl fidl::encoding::ResourceTypeMarker for FileGetBackingMemoryResponse {
22581 type Borrowed<'a> = &'a mut Self;
22582 fn take_or_borrow<'a>(
22583 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22584 ) -> Self::Borrowed<'a> {
22585 value
22586 }
22587 }
22588
22589 unsafe impl fidl::encoding::TypeMarker for FileGetBackingMemoryResponse {
22590 type Owned = Self;
22591
22592 #[inline(always)]
22593 fn inline_align(_context: fidl::encoding::Context) -> usize {
22594 4
22595 }
22596
22597 #[inline(always)]
22598 fn inline_size(_context: fidl::encoding::Context) -> usize {
22599 4
22600 }
22601 }
22602
22603 unsafe impl
22604 fidl::encoding::Encode<
22605 FileGetBackingMemoryResponse,
22606 fidl::encoding::DefaultFuchsiaResourceDialect,
22607 > for &mut FileGetBackingMemoryResponse
22608 {
22609 #[inline]
22610 unsafe fn encode(
22611 self,
22612 encoder: &mut fidl::encoding::Encoder<
22613 '_,
22614 fidl::encoding::DefaultFuchsiaResourceDialect,
22615 >,
22616 offset: usize,
22617 _depth: fidl::encoding::Depth,
22618 ) -> fidl::Result<()> {
22619 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
22620 fidl::encoding::Encode::<
22622 FileGetBackingMemoryResponse,
22623 fidl::encoding::DefaultFuchsiaResourceDialect,
22624 >::encode(
22625 (<fidl::encoding::HandleType<
22626 fidl::Vmo,
22627 { fidl::ObjectType::VMO.into_raw() },
22628 2147483648,
22629 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22630 &mut self.vmo
22631 ),),
22632 encoder,
22633 offset,
22634 _depth,
22635 )
22636 }
22637 }
22638 unsafe impl<
22639 T0: fidl::encoding::Encode<
22640 fidl::encoding::HandleType<
22641 fidl::Vmo,
22642 { fidl::ObjectType::VMO.into_raw() },
22643 2147483648,
22644 >,
22645 fidl::encoding::DefaultFuchsiaResourceDialect,
22646 >,
22647 >
22648 fidl::encoding::Encode<
22649 FileGetBackingMemoryResponse,
22650 fidl::encoding::DefaultFuchsiaResourceDialect,
22651 > for (T0,)
22652 {
22653 #[inline]
22654 unsafe fn encode(
22655 self,
22656 encoder: &mut fidl::encoding::Encoder<
22657 '_,
22658 fidl::encoding::DefaultFuchsiaResourceDialect,
22659 >,
22660 offset: usize,
22661 depth: fidl::encoding::Depth,
22662 ) -> fidl::Result<()> {
22663 encoder.debug_check_bounds::<FileGetBackingMemoryResponse>(offset);
22664 self.0.encode(encoder, offset + 0, depth)?;
22668 Ok(())
22669 }
22670 }
22671
22672 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22673 for FileGetBackingMemoryResponse
22674 {
22675 #[inline(always)]
22676 fn new_empty() -> Self {
22677 Self {
22678 vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22679 }
22680 }
22681
22682 #[inline]
22683 unsafe fn decode(
22684 &mut self,
22685 decoder: &mut fidl::encoding::Decoder<
22686 '_,
22687 fidl::encoding::DefaultFuchsiaResourceDialect,
22688 >,
22689 offset: usize,
22690 _depth: fidl::encoding::Depth,
22691 ) -> fidl::Result<()> {
22692 decoder.debug_check_bounds::<Self>(offset);
22693 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
22695 Ok(())
22696 }
22697 }
22698
22699 impl fidl::encoding::ResourceTypeMarker for LinkableLinkIntoRequest {
22700 type Borrowed<'a> = &'a mut Self;
22701 fn take_or_borrow<'a>(
22702 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22703 ) -> Self::Borrowed<'a> {
22704 value
22705 }
22706 }
22707
22708 unsafe impl fidl::encoding::TypeMarker for LinkableLinkIntoRequest {
22709 type Owned = Self;
22710
22711 #[inline(always)]
22712 fn inline_align(_context: fidl::encoding::Context) -> usize {
22713 8
22714 }
22715
22716 #[inline(always)]
22717 fn inline_size(_context: fidl::encoding::Context) -> usize {
22718 24
22719 }
22720 }
22721
22722 unsafe impl
22723 fidl::encoding::Encode<
22724 LinkableLinkIntoRequest,
22725 fidl::encoding::DefaultFuchsiaResourceDialect,
22726 > for &mut LinkableLinkIntoRequest
22727 {
22728 #[inline]
22729 unsafe fn encode(
22730 self,
22731 encoder: &mut fidl::encoding::Encoder<
22732 '_,
22733 fidl::encoding::DefaultFuchsiaResourceDialect,
22734 >,
22735 offset: usize,
22736 _depth: fidl::encoding::Depth,
22737 ) -> fidl::Result<()> {
22738 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
22739 fidl::encoding::Encode::<
22741 LinkableLinkIntoRequest,
22742 fidl::encoding::DefaultFuchsiaResourceDialect,
22743 >::encode(
22744 (
22745 <fidl::encoding::HandleType<
22746 fidl::Event,
22747 { fidl::ObjectType::EVENT.into_raw() },
22748 2147483648,
22749 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
22750 &mut self.dst_parent_token,
22751 ),
22752 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
22753 &self.dst,
22754 ),
22755 ),
22756 encoder,
22757 offset,
22758 _depth,
22759 )
22760 }
22761 }
22762 unsafe impl<
22763 T0: fidl::encoding::Encode<
22764 fidl::encoding::HandleType<
22765 fidl::Event,
22766 { fidl::ObjectType::EVENT.into_raw() },
22767 2147483648,
22768 >,
22769 fidl::encoding::DefaultFuchsiaResourceDialect,
22770 >,
22771 T1: fidl::encoding::Encode<
22772 fidl::encoding::BoundedString<255>,
22773 fidl::encoding::DefaultFuchsiaResourceDialect,
22774 >,
22775 >
22776 fidl::encoding::Encode<
22777 LinkableLinkIntoRequest,
22778 fidl::encoding::DefaultFuchsiaResourceDialect,
22779 > for (T0, T1)
22780 {
22781 #[inline]
22782 unsafe fn encode(
22783 self,
22784 encoder: &mut fidl::encoding::Encoder<
22785 '_,
22786 fidl::encoding::DefaultFuchsiaResourceDialect,
22787 >,
22788 offset: usize,
22789 depth: fidl::encoding::Depth,
22790 ) -> fidl::Result<()> {
22791 encoder.debug_check_bounds::<LinkableLinkIntoRequest>(offset);
22792 unsafe {
22795 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
22796 (ptr as *mut u64).write_unaligned(0);
22797 }
22798 self.0.encode(encoder, offset + 0, depth)?;
22800 self.1.encode(encoder, offset + 8, depth)?;
22801 Ok(())
22802 }
22803 }
22804
22805 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22806 for LinkableLinkIntoRequest
22807 {
22808 #[inline(always)]
22809 fn new_empty() -> Self {
22810 Self {
22811 dst_parent_token: fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
22812 dst: fidl::new_empty!(
22813 fidl::encoding::BoundedString<255>,
22814 fidl::encoding::DefaultFuchsiaResourceDialect
22815 ),
22816 }
22817 }
22818
22819 #[inline]
22820 unsafe fn decode(
22821 &mut self,
22822 decoder: &mut fidl::encoding::Decoder<
22823 '_,
22824 fidl::encoding::DefaultFuchsiaResourceDialect,
22825 >,
22826 offset: usize,
22827 _depth: fidl::encoding::Depth,
22828 ) -> fidl::Result<()> {
22829 decoder.debug_check_bounds::<Self>(offset);
22830 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
22832 let padval = unsafe { (ptr as *const u64).read_unaligned() };
22833 let mask = 0xffffffff00000000u64;
22834 let maskedval = padval & mask;
22835 if maskedval != 0 {
22836 return Err(fidl::Error::NonZeroPadding {
22837 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
22838 });
22839 }
22840 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)?;
22841 fidl::decode!(
22842 fidl::encoding::BoundedString<255>,
22843 fidl::encoding::DefaultFuchsiaResourceDialect,
22844 &mut self.dst,
22845 decoder,
22846 offset + 8,
22847 _depth
22848 )?;
22849 Ok(())
22850 }
22851 }
22852
22853 impl fidl::encoding::ResourceTypeMarker for NodeDeprecatedCloneRequest {
22854 type Borrowed<'a> = &'a mut Self;
22855 fn take_or_borrow<'a>(
22856 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22857 ) -> Self::Borrowed<'a> {
22858 value
22859 }
22860 }
22861
22862 unsafe impl fidl::encoding::TypeMarker for NodeDeprecatedCloneRequest {
22863 type Owned = Self;
22864
22865 #[inline(always)]
22866 fn inline_align(_context: fidl::encoding::Context) -> usize {
22867 4
22868 }
22869
22870 #[inline(always)]
22871 fn inline_size(_context: fidl::encoding::Context) -> usize {
22872 8
22873 }
22874 }
22875
22876 unsafe impl
22877 fidl::encoding::Encode<
22878 NodeDeprecatedCloneRequest,
22879 fidl::encoding::DefaultFuchsiaResourceDialect,
22880 > for &mut NodeDeprecatedCloneRequest
22881 {
22882 #[inline]
22883 unsafe fn encode(
22884 self,
22885 encoder: &mut fidl::encoding::Encoder<
22886 '_,
22887 fidl::encoding::DefaultFuchsiaResourceDialect,
22888 >,
22889 offset: usize,
22890 _depth: fidl::encoding::Depth,
22891 ) -> fidl::Result<()> {
22892 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
22893 fidl::encoding::Encode::<NodeDeprecatedCloneRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
22895 (
22896 <OpenFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
22897 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
22898 ),
22899 encoder, offset, _depth
22900 )
22901 }
22902 }
22903 unsafe impl<
22904 T0: fidl::encoding::Encode<OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect>,
22905 T1: fidl::encoding::Encode<
22906 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22907 fidl::encoding::DefaultFuchsiaResourceDialect,
22908 >,
22909 >
22910 fidl::encoding::Encode<
22911 NodeDeprecatedCloneRequest,
22912 fidl::encoding::DefaultFuchsiaResourceDialect,
22913 > for (T0, T1)
22914 {
22915 #[inline]
22916 unsafe fn encode(
22917 self,
22918 encoder: &mut fidl::encoding::Encoder<
22919 '_,
22920 fidl::encoding::DefaultFuchsiaResourceDialect,
22921 >,
22922 offset: usize,
22923 depth: fidl::encoding::Depth,
22924 ) -> fidl::Result<()> {
22925 encoder.debug_check_bounds::<NodeDeprecatedCloneRequest>(offset);
22926 self.0.encode(encoder, offset + 0, depth)?;
22930 self.1.encode(encoder, offset + 4, depth)?;
22931 Ok(())
22932 }
22933 }
22934
22935 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
22936 for NodeDeprecatedCloneRequest
22937 {
22938 #[inline(always)]
22939 fn new_empty() -> Self {
22940 Self {
22941 flags: fidl::new_empty!(OpenFlags, fidl::encoding::DefaultFuchsiaResourceDialect),
22942 object: fidl::new_empty!(
22943 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22944 fidl::encoding::DefaultFuchsiaResourceDialect
22945 ),
22946 }
22947 }
22948
22949 #[inline]
22950 unsafe fn decode(
22951 &mut self,
22952 decoder: &mut fidl::encoding::Decoder<
22953 '_,
22954 fidl::encoding::DefaultFuchsiaResourceDialect,
22955 >,
22956 offset: usize,
22957 _depth: fidl::encoding::Depth,
22958 ) -> fidl::Result<()> {
22959 decoder.debug_check_bounds::<Self>(offset);
22960 fidl::decode!(
22962 OpenFlags,
22963 fidl::encoding::DefaultFuchsiaResourceDialect,
22964 &mut self.flags,
22965 decoder,
22966 offset + 0,
22967 _depth
22968 )?;
22969 fidl::decode!(
22970 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<NodeMarker>>,
22971 fidl::encoding::DefaultFuchsiaResourceDialect,
22972 &mut self.object,
22973 decoder,
22974 offset + 4,
22975 _depth
22976 )?;
22977 Ok(())
22978 }
22979 }
22980
22981 impl fidl::encoding::ResourceTypeMarker for NodeListExtendedAttributesRequest {
22982 type Borrowed<'a> = &'a mut Self;
22983 fn take_or_borrow<'a>(
22984 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
22985 ) -> Self::Borrowed<'a> {
22986 value
22987 }
22988 }
22989
22990 unsafe impl fidl::encoding::TypeMarker for NodeListExtendedAttributesRequest {
22991 type Owned = Self;
22992
22993 #[inline(always)]
22994 fn inline_align(_context: fidl::encoding::Context) -> usize {
22995 4
22996 }
22997
22998 #[inline(always)]
22999 fn inline_size(_context: fidl::encoding::Context) -> usize {
23000 4
23001 }
23002 }
23003
23004 unsafe impl
23005 fidl::encoding::Encode<
23006 NodeListExtendedAttributesRequest,
23007 fidl::encoding::DefaultFuchsiaResourceDialect,
23008 > for &mut NodeListExtendedAttributesRequest
23009 {
23010 #[inline]
23011 unsafe fn encode(
23012 self,
23013 encoder: &mut fidl::encoding::Encoder<
23014 '_,
23015 fidl::encoding::DefaultFuchsiaResourceDialect,
23016 >,
23017 offset: usize,
23018 _depth: fidl::encoding::Depth,
23019 ) -> fidl::Result<()> {
23020 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
23021 fidl::encoding::Encode::<
23023 NodeListExtendedAttributesRequest,
23024 fidl::encoding::DefaultFuchsiaResourceDialect,
23025 >::encode(
23026 (<fidl::encoding::Endpoint<
23027 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
23028 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
23029 &mut self.iterator
23030 ),),
23031 encoder,
23032 offset,
23033 _depth,
23034 )
23035 }
23036 }
23037 unsafe impl<
23038 T0: fidl::encoding::Encode<
23039 fidl::encoding::Endpoint<
23040 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
23041 >,
23042 fidl::encoding::DefaultFuchsiaResourceDialect,
23043 >,
23044 >
23045 fidl::encoding::Encode<
23046 NodeListExtendedAttributesRequest,
23047 fidl::encoding::DefaultFuchsiaResourceDialect,
23048 > for (T0,)
23049 {
23050 #[inline]
23051 unsafe fn encode(
23052 self,
23053 encoder: &mut fidl::encoding::Encoder<
23054 '_,
23055 fidl::encoding::DefaultFuchsiaResourceDialect,
23056 >,
23057 offset: usize,
23058 depth: fidl::encoding::Depth,
23059 ) -> fidl::Result<()> {
23060 encoder.debug_check_bounds::<NodeListExtendedAttributesRequest>(offset);
23061 self.0.encode(encoder, offset + 0, depth)?;
23065 Ok(())
23066 }
23067 }
23068
23069 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23070 for NodeListExtendedAttributesRequest
23071 {
23072 #[inline(always)]
23073 fn new_empty() -> Self {
23074 Self {
23075 iterator: fidl::new_empty!(
23076 fidl::encoding::Endpoint<
23077 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
23078 >,
23079 fidl::encoding::DefaultFuchsiaResourceDialect
23080 ),
23081 }
23082 }
23083
23084 #[inline]
23085 unsafe fn decode(
23086 &mut self,
23087 decoder: &mut fidl::encoding::Decoder<
23088 '_,
23089 fidl::encoding::DefaultFuchsiaResourceDialect,
23090 >,
23091 offset: usize,
23092 _depth: fidl::encoding::Depth,
23093 ) -> fidl::Result<()> {
23094 decoder.debug_check_bounds::<Self>(offset);
23095 fidl::decode!(
23097 fidl::encoding::Endpoint<
23098 fidl::endpoints::ServerEnd<ExtendedAttributeIteratorMarker>,
23099 >,
23100 fidl::encoding::DefaultFuchsiaResourceDialect,
23101 &mut self.iterator,
23102 decoder,
23103 offset + 0,
23104 _depth
23105 )?;
23106 Ok(())
23107 }
23108 }
23109
23110 impl fidl::encoding::ResourceTypeMarker for NodeOnOpenRequest {
23111 type Borrowed<'a> = &'a mut Self;
23112 fn take_or_borrow<'a>(
23113 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23114 ) -> Self::Borrowed<'a> {
23115 value
23116 }
23117 }
23118
23119 unsafe impl fidl::encoding::TypeMarker for NodeOnOpenRequest {
23120 type Owned = Self;
23121
23122 #[inline(always)]
23123 fn inline_align(_context: fidl::encoding::Context) -> usize {
23124 8
23125 }
23126
23127 #[inline(always)]
23128 fn inline_size(_context: fidl::encoding::Context) -> usize {
23129 24
23130 }
23131 }
23132
23133 unsafe impl
23134 fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
23135 for &mut NodeOnOpenRequest
23136 {
23137 #[inline]
23138 unsafe fn encode(
23139 self,
23140 encoder: &mut fidl::encoding::Encoder<
23141 '_,
23142 fidl::encoding::DefaultFuchsiaResourceDialect,
23143 >,
23144 offset: usize,
23145 _depth: fidl::encoding::Depth,
23146 ) -> fidl::Result<()> {
23147 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
23148 fidl::encoding::Encode::<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
23150 (
23151 <i32 as fidl::encoding::ValueTypeMarker>::borrow(&self.s),
23152 <fidl::encoding::OptionalUnion<NodeInfoDeprecated> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.info),
23153 ),
23154 encoder, offset, _depth
23155 )
23156 }
23157 }
23158 unsafe impl<
23159 T0: fidl::encoding::Encode<i32, fidl::encoding::DefaultFuchsiaResourceDialect>,
23160 T1: fidl::encoding::Encode<
23161 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
23162 fidl::encoding::DefaultFuchsiaResourceDialect,
23163 >,
23164 > fidl::encoding::Encode<NodeOnOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
23165 for (T0, T1)
23166 {
23167 #[inline]
23168 unsafe fn encode(
23169 self,
23170 encoder: &mut fidl::encoding::Encoder<
23171 '_,
23172 fidl::encoding::DefaultFuchsiaResourceDialect,
23173 >,
23174 offset: usize,
23175 depth: fidl::encoding::Depth,
23176 ) -> fidl::Result<()> {
23177 encoder.debug_check_bounds::<NodeOnOpenRequest>(offset);
23178 unsafe {
23181 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
23182 (ptr as *mut u64).write_unaligned(0);
23183 }
23184 self.0.encode(encoder, offset + 0, depth)?;
23186 self.1.encode(encoder, offset + 8, depth)?;
23187 Ok(())
23188 }
23189 }
23190
23191 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23192 for NodeOnOpenRequest
23193 {
23194 #[inline(always)]
23195 fn new_empty() -> Self {
23196 Self {
23197 s: fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect),
23198 info: fidl::new_empty!(
23199 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
23200 fidl::encoding::DefaultFuchsiaResourceDialect
23201 ),
23202 }
23203 }
23204
23205 #[inline]
23206 unsafe fn decode(
23207 &mut self,
23208 decoder: &mut fidl::encoding::Decoder<
23209 '_,
23210 fidl::encoding::DefaultFuchsiaResourceDialect,
23211 >,
23212 offset: usize,
23213 _depth: fidl::encoding::Depth,
23214 ) -> fidl::Result<()> {
23215 decoder.debug_check_bounds::<Self>(offset);
23216 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
23218 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23219 let mask = 0xffffffff00000000u64;
23220 let maskedval = padval & mask;
23221 if maskedval != 0 {
23222 return Err(fidl::Error::NonZeroPadding {
23223 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
23224 });
23225 }
23226 fidl::decode!(
23227 i32,
23228 fidl::encoding::DefaultFuchsiaResourceDialect,
23229 &mut self.s,
23230 decoder,
23231 offset + 0,
23232 _depth
23233 )?;
23234 fidl::decode!(
23235 fidl::encoding::OptionalUnion<NodeInfoDeprecated>,
23236 fidl::encoding::DefaultFuchsiaResourceDialect,
23237 &mut self.info,
23238 decoder,
23239 offset + 8,
23240 _depth
23241 )?;
23242 Ok(())
23243 }
23244 }
23245
23246 impl fidl::encoding::ResourceTypeMarker for NodeSetExtendedAttributeRequest {
23247 type Borrowed<'a> = &'a mut Self;
23248 fn take_or_borrow<'a>(
23249 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23250 ) -> Self::Borrowed<'a> {
23251 value
23252 }
23253 }
23254
23255 unsafe impl fidl::encoding::TypeMarker for NodeSetExtendedAttributeRequest {
23256 type Owned = Self;
23257
23258 #[inline(always)]
23259 fn inline_align(_context: fidl::encoding::Context) -> usize {
23260 8
23261 }
23262
23263 #[inline(always)]
23264 fn inline_size(_context: fidl::encoding::Context) -> usize {
23265 40
23266 }
23267 }
23268
23269 unsafe impl
23270 fidl::encoding::Encode<
23271 NodeSetExtendedAttributeRequest,
23272 fidl::encoding::DefaultFuchsiaResourceDialect,
23273 > for &mut NodeSetExtendedAttributeRequest
23274 {
23275 #[inline]
23276 unsafe fn encode(
23277 self,
23278 encoder: &mut fidl::encoding::Encoder<
23279 '_,
23280 fidl::encoding::DefaultFuchsiaResourceDialect,
23281 >,
23282 offset: usize,
23283 _depth: fidl::encoding::Depth,
23284 ) -> fidl::Result<()> {
23285 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
23286 fidl::encoding::Encode::<
23288 NodeSetExtendedAttributeRequest,
23289 fidl::encoding::DefaultFuchsiaResourceDialect,
23290 >::encode(
23291 (
23292 <fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
23293 &self.name,
23294 ),
23295 <ExtendedAttributeValue as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
23296 &mut self.value,
23297 ),
23298 <SetExtendedAttributeMode as fidl::encoding::ValueTypeMarker>::borrow(
23299 &self.mode,
23300 ),
23301 ),
23302 encoder,
23303 offset,
23304 _depth,
23305 )
23306 }
23307 }
23308 unsafe impl<
23309 T0: fidl::encoding::Encode<
23310 fidl::encoding::Vector<u8, 255>,
23311 fidl::encoding::DefaultFuchsiaResourceDialect,
23312 >,
23313 T1: fidl::encoding::Encode<
23314 ExtendedAttributeValue,
23315 fidl::encoding::DefaultFuchsiaResourceDialect,
23316 >,
23317 T2: fidl::encoding::Encode<
23318 SetExtendedAttributeMode,
23319 fidl::encoding::DefaultFuchsiaResourceDialect,
23320 >,
23321 >
23322 fidl::encoding::Encode<
23323 NodeSetExtendedAttributeRequest,
23324 fidl::encoding::DefaultFuchsiaResourceDialect,
23325 > for (T0, T1, T2)
23326 {
23327 #[inline]
23328 unsafe fn encode(
23329 self,
23330 encoder: &mut fidl::encoding::Encoder<
23331 '_,
23332 fidl::encoding::DefaultFuchsiaResourceDialect,
23333 >,
23334 offset: usize,
23335 depth: fidl::encoding::Depth,
23336 ) -> fidl::Result<()> {
23337 encoder.debug_check_bounds::<NodeSetExtendedAttributeRequest>(offset);
23338 unsafe {
23341 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
23342 (ptr as *mut u64).write_unaligned(0);
23343 }
23344 self.0.encode(encoder, offset + 0, depth)?;
23346 self.1.encode(encoder, offset + 16, depth)?;
23347 self.2.encode(encoder, offset + 32, depth)?;
23348 Ok(())
23349 }
23350 }
23351
23352 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23353 for NodeSetExtendedAttributeRequest
23354 {
23355 #[inline(always)]
23356 fn new_empty() -> Self {
23357 Self {
23358 name: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect),
23359 value: fidl::new_empty!(
23360 ExtendedAttributeValue,
23361 fidl::encoding::DefaultFuchsiaResourceDialect
23362 ),
23363 mode: fidl::new_empty!(
23364 SetExtendedAttributeMode,
23365 fidl::encoding::DefaultFuchsiaResourceDialect
23366 ),
23367 }
23368 }
23369
23370 #[inline]
23371 unsafe fn decode(
23372 &mut self,
23373 decoder: &mut fidl::encoding::Decoder<
23374 '_,
23375 fidl::encoding::DefaultFuchsiaResourceDialect,
23376 >,
23377 offset: usize,
23378 _depth: fidl::encoding::Depth,
23379 ) -> fidl::Result<()> {
23380 decoder.debug_check_bounds::<Self>(offset);
23381 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
23383 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23384 let mask = 0xffffffff00000000u64;
23385 let maskedval = padval & mask;
23386 if maskedval != 0 {
23387 return Err(fidl::Error::NonZeroPadding {
23388 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
23389 });
23390 }
23391 fidl::decode!(fidl::encoding::Vector<u8, 255>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.name, decoder, offset + 0, _depth)?;
23392 fidl::decode!(
23393 ExtendedAttributeValue,
23394 fidl::encoding::DefaultFuchsiaResourceDialect,
23395 &mut self.value,
23396 decoder,
23397 offset + 16,
23398 _depth
23399 )?;
23400 fidl::decode!(
23401 SetExtendedAttributeMode,
23402 fidl::encoding::DefaultFuchsiaResourceDialect,
23403 &mut self.mode,
23404 decoder,
23405 offset + 32,
23406 _depth
23407 )?;
23408 Ok(())
23409 }
23410 }
23411
23412 impl fidl::encoding::ResourceTypeMarker for OpenableOpenRequest {
23413 type Borrowed<'a> = &'a mut Self;
23414 fn take_or_borrow<'a>(
23415 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23416 ) -> Self::Borrowed<'a> {
23417 value
23418 }
23419 }
23420
23421 unsafe impl fidl::encoding::TypeMarker for OpenableOpenRequest {
23422 type Owned = Self;
23423
23424 #[inline(always)]
23425 fn inline_align(_context: fidl::encoding::Context) -> usize {
23426 8
23427 }
23428
23429 #[inline(always)]
23430 fn inline_size(_context: fidl::encoding::Context) -> usize {
23431 48
23432 }
23433 }
23434
23435 unsafe impl
23436 fidl::encoding::Encode<OpenableOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
23437 for &mut OpenableOpenRequest
23438 {
23439 #[inline]
23440 unsafe fn encode(
23441 self,
23442 encoder: &mut fidl::encoding::Encoder<
23443 '_,
23444 fidl::encoding::DefaultFuchsiaResourceDialect,
23445 >,
23446 offset: usize,
23447 _depth: fidl::encoding::Depth,
23448 ) -> fidl::Result<()> {
23449 encoder.debug_check_bounds::<OpenableOpenRequest>(offset);
23450 fidl::encoding::Encode::<OpenableOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
23452 (
23453 <fidl::encoding::BoundedString<4095> as fidl::encoding::ValueTypeMarker>::borrow(&self.path),
23454 <Flags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
23455 <Options as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
23456 <fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.object),
23457 ),
23458 encoder, offset, _depth
23459 )
23460 }
23461 }
23462 unsafe impl<
23463 T0: fidl::encoding::Encode<
23464 fidl::encoding::BoundedString<4095>,
23465 fidl::encoding::DefaultFuchsiaResourceDialect,
23466 >,
23467 T1: fidl::encoding::Encode<Flags, fidl::encoding::DefaultFuchsiaResourceDialect>,
23468 T2: fidl::encoding::Encode<Options, fidl::encoding::DefaultFuchsiaResourceDialect>,
23469 T3: fidl::encoding::Encode<
23470 fidl::encoding::HandleType<
23471 fidl::Channel,
23472 { fidl::ObjectType::CHANNEL.into_raw() },
23473 2147483648,
23474 >,
23475 fidl::encoding::DefaultFuchsiaResourceDialect,
23476 >,
23477 > fidl::encoding::Encode<OpenableOpenRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
23478 for (T0, T1, T2, T3)
23479 {
23480 #[inline]
23481 unsafe fn encode(
23482 self,
23483 encoder: &mut fidl::encoding::Encoder<
23484 '_,
23485 fidl::encoding::DefaultFuchsiaResourceDialect,
23486 >,
23487 offset: usize,
23488 depth: fidl::encoding::Depth,
23489 ) -> fidl::Result<()> {
23490 encoder.debug_check_bounds::<OpenableOpenRequest>(offset);
23491 unsafe {
23494 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
23495 (ptr as *mut u64).write_unaligned(0);
23496 }
23497 self.0.encode(encoder, offset + 0, depth)?;
23499 self.1.encode(encoder, offset + 16, depth)?;
23500 self.2.encode(encoder, offset + 24, depth)?;
23501 self.3.encode(encoder, offset + 40, depth)?;
23502 Ok(())
23503 }
23504 }
23505
23506 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23507 for OpenableOpenRequest
23508 {
23509 #[inline(always)]
23510 fn new_empty() -> Self {
23511 Self {
23512 path: fidl::new_empty!(
23513 fidl::encoding::BoundedString<4095>,
23514 fidl::encoding::DefaultFuchsiaResourceDialect
23515 ),
23516 flags: fidl::new_empty!(Flags, fidl::encoding::DefaultFuchsiaResourceDialect),
23517 options: fidl::new_empty!(Options, fidl::encoding::DefaultFuchsiaResourceDialect),
23518 object: fidl::new_empty!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
23519 }
23520 }
23521
23522 #[inline]
23523 unsafe fn decode(
23524 &mut self,
23525 decoder: &mut fidl::encoding::Decoder<
23526 '_,
23527 fidl::encoding::DefaultFuchsiaResourceDialect,
23528 >,
23529 offset: usize,
23530 _depth: fidl::encoding::Depth,
23531 ) -> fidl::Result<()> {
23532 decoder.debug_check_bounds::<Self>(offset);
23533 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
23535 let padval = unsafe { (ptr as *const u64).read_unaligned() };
23536 let mask = 0xffffffff00000000u64;
23537 let maskedval = padval & mask;
23538 if maskedval != 0 {
23539 return Err(fidl::Error::NonZeroPadding {
23540 padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
23541 });
23542 }
23543 fidl::decode!(
23544 fidl::encoding::BoundedString<4095>,
23545 fidl::encoding::DefaultFuchsiaResourceDialect,
23546 &mut self.path,
23547 decoder,
23548 offset + 0,
23549 _depth
23550 )?;
23551 fidl::decode!(
23552 Flags,
23553 fidl::encoding::DefaultFuchsiaResourceDialect,
23554 &mut self.flags,
23555 decoder,
23556 offset + 16,
23557 _depth
23558 )?;
23559 fidl::decode!(
23560 Options,
23561 fidl::encoding::DefaultFuchsiaResourceDialect,
23562 &mut self.options,
23563 decoder,
23564 offset + 24,
23565 _depth
23566 )?;
23567 fidl::decode!(fidl::encoding::HandleType<fidl::Channel, { fidl::ObjectType::CHANNEL.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.object, decoder, offset + 40, _depth)?;
23568 Ok(())
23569 }
23570 }
23571
23572 impl ConnectionInfo {
23573 #[inline(always)]
23574 fn max_ordinal_present(&self) -> u64 {
23575 if let Some(_) = self.rights {
23576 return 1;
23577 }
23578 0
23579 }
23580 }
23581
23582 impl fidl::encoding::ResourceTypeMarker for ConnectionInfo {
23583 type Borrowed<'a> = &'a mut Self;
23584 fn take_or_borrow<'a>(
23585 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23586 ) -> Self::Borrowed<'a> {
23587 value
23588 }
23589 }
23590
23591 unsafe impl fidl::encoding::TypeMarker for ConnectionInfo {
23592 type Owned = Self;
23593
23594 #[inline(always)]
23595 fn inline_align(_context: fidl::encoding::Context) -> usize {
23596 8
23597 }
23598
23599 #[inline(always)]
23600 fn inline_size(_context: fidl::encoding::Context) -> usize {
23601 16
23602 }
23603 }
23604
23605 unsafe impl
23606 fidl::encoding::Encode<ConnectionInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
23607 for &mut ConnectionInfo
23608 {
23609 unsafe fn encode(
23610 self,
23611 encoder: &mut fidl::encoding::Encoder<
23612 '_,
23613 fidl::encoding::DefaultFuchsiaResourceDialect,
23614 >,
23615 offset: usize,
23616 mut depth: fidl::encoding::Depth,
23617 ) -> fidl::Result<()> {
23618 encoder.debug_check_bounds::<ConnectionInfo>(offset);
23619 let max_ordinal: u64 = self.max_ordinal_present();
23621 encoder.write_num(max_ordinal, offset);
23622 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
23623 if max_ordinal == 0 {
23625 return Ok(());
23626 }
23627 depth.increment()?;
23628 let envelope_size = 8;
23629 let bytes_len = max_ordinal as usize * envelope_size;
23630 #[allow(unused_variables)]
23631 let offset = encoder.out_of_line_offset(bytes_len);
23632 let mut _prev_end_offset: usize = 0;
23633 if 1 > max_ordinal {
23634 return Ok(());
23635 }
23636
23637 let cur_offset: usize = (1 - 1) * envelope_size;
23640
23641 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23643
23644 fidl::encoding::encode_in_envelope_optional::<
23649 Operations,
23650 fidl::encoding::DefaultFuchsiaResourceDialect,
23651 >(
23652 self.rights.as_ref().map(<Operations as fidl::encoding::ValueTypeMarker>::borrow),
23653 encoder,
23654 offset + cur_offset,
23655 depth,
23656 )?;
23657
23658 _prev_end_offset = cur_offset + envelope_size;
23659
23660 Ok(())
23661 }
23662 }
23663
23664 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
23665 for ConnectionInfo
23666 {
23667 #[inline(always)]
23668 fn new_empty() -> Self {
23669 Self::default()
23670 }
23671
23672 unsafe fn decode(
23673 &mut self,
23674 decoder: &mut fidl::encoding::Decoder<
23675 '_,
23676 fidl::encoding::DefaultFuchsiaResourceDialect,
23677 >,
23678 offset: usize,
23679 mut depth: fidl::encoding::Depth,
23680 ) -> fidl::Result<()> {
23681 decoder.debug_check_bounds::<Self>(offset);
23682 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
23683 None => return Err(fidl::Error::NotNullable),
23684 Some(len) => len,
23685 };
23686 if len == 0 {
23688 return Ok(());
23689 };
23690 depth.increment()?;
23691 let envelope_size = 8;
23692 let bytes_len = len * envelope_size;
23693 let offset = decoder.out_of_line_offset(bytes_len)?;
23694 let mut _next_ordinal_to_read = 0;
23696 let mut next_offset = offset;
23697 let end_offset = offset + bytes_len;
23698 _next_ordinal_to_read += 1;
23699 if next_offset >= end_offset {
23700 return Ok(());
23701 }
23702
23703 while _next_ordinal_to_read < 1 {
23705 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23706 _next_ordinal_to_read += 1;
23707 next_offset += envelope_size;
23708 }
23709
23710 let next_out_of_line = decoder.next_out_of_line();
23711 let handles_before = decoder.remaining_handles();
23712 if let Some((inlined, num_bytes, num_handles)) =
23713 fidl::encoding::decode_envelope_header(decoder, next_offset)?
23714 {
23715 let member_inline_size =
23716 <Operations as fidl::encoding::TypeMarker>::inline_size(decoder.context);
23717 if inlined != (member_inline_size <= 4) {
23718 return Err(fidl::Error::InvalidInlineBitInEnvelope);
23719 }
23720 let inner_offset;
23721 let mut inner_depth = depth.clone();
23722 if inlined {
23723 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
23724 inner_offset = next_offset;
23725 } else {
23726 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
23727 inner_depth.increment()?;
23728 }
23729 let val_ref = self.rights.get_or_insert_with(|| {
23730 fidl::new_empty!(Operations, fidl::encoding::DefaultFuchsiaResourceDialect)
23731 });
23732 fidl::decode!(
23733 Operations,
23734 fidl::encoding::DefaultFuchsiaResourceDialect,
23735 val_ref,
23736 decoder,
23737 inner_offset,
23738 inner_depth
23739 )?;
23740 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
23741 {
23742 return Err(fidl::Error::InvalidNumBytesInEnvelope);
23743 }
23744 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
23745 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
23746 }
23747 }
23748
23749 next_offset += envelope_size;
23750
23751 while next_offset < end_offset {
23753 _next_ordinal_to_read += 1;
23754 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
23755 next_offset += envelope_size;
23756 }
23757
23758 Ok(())
23759 }
23760 }
23761
23762 impl FileInfo {
23763 #[inline(always)]
23764 fn max_ordinal_present(&self) -> u64 {
23765 if let Some(_) = self.attributes {
23766 return 4;
23767 }
23768 if let Some(_) = self.stream {
23769 return 3;
23770 }
23771 if let Some(_) = self.observer {
23772 return 2;
23773 }
23774 if let Some(_) = self.is_append {
23775 return 1;
23776 }
23777 0
23778 }
23779 }
23780
23781 impl fidl::encoding::ResourceTypeMarker for FileInfo {
23782 type Borrowed<'a> = &'a mut Self;
23783 fn take_or_borrow<'a>(
23784 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
23785 ) -> Self::Borrowed<'a> {
23786 value
23787 }
23788 }
23789
23790 unsafe impl fidl::encoding::TypeMarker for FileInfo {
23791 type Owned = Self;
23792
23793 #[inline(always)]
23794 fn inline_align(_context: fidl::encoding::Context) -> usize {
23795 8
23796 }
23797
23798 #[inline(always)]
23799 fn inline_size(_context: fidl::encoding::Context) -> usize {
23800 16
23801 }
23802 }
23803
23804 unsafe impl fidl::encoding::Encode<FileInfo, fidl::encoding::DefaultFuchsiaResourceDialect>
23805 for &mut FileInfo
23806 {
23807 unsafe fn encode(
23808 self,
23809 encoder: &mut fidl::encoding::Encoder<
23810 '_,
23811 fidl::encoding::DefaultFuchsiaResourceDialect,
23812 >,
23813 offset: usize,
23814 mut depth: fidl::encoding::Depth,
23815 ) -> fidl::Result<()> {
23816 encoder.debug_check_bounds::<FileInfo>(offset);
23817 let max_ordinal: u64 = self.max_ordinal_present();
23819 encoder.write_num(max_ordinal, offset);
23820 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
23821 if max_ordinal == 0 {
23823 return Ok(());
23824 }
23825 depth.increment()?;
23826 let envelope_size = 8;
23827 let bytes_len = max_ordinal as usize * envelope_size;
23828 #[allow(unused_variables)]
23829 let offset = encoder.out_of_line_offset(bytes_len);
23830 let mut _prev_end_offset: usize = 0;
23831 if 1 > max_ordinal {
23832 return Ok(());
23833 }
23834
23835 let cur_offset: usize = (1 - 1) * envelope_size;
23838
23839 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23841
23842 fidl::encoding::encode_in_envelope_optional::<
23847 bool,
23848 fidl::encoding::DefaultFuchsiaResourceDialect,
23849 >(
23850 self.is_append.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
23851 encoder,
23852 offset + cur_offset,
23853 depth,
23854 )?;
23855
23856 _prev_end_offset = cur_offset + envelope_size;
23857 if 2 > max_ordinal {
23858 return Ok(());
23859 }
23860
23861 let cur_offset: usize = (2 - 1) * envelope_size;
23864
23865 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23867
23868 fidl::encoding::encode_in_envelope_optional::<
23873 fidl::encoding::HandleType<
23874 fidl::Event,
23875 { fidl::ObjectType::EVENT.into_raw() },
23876 2147483648,
23877 >,
23878 fidl::encoding::DefaultFuchsiaResourceDialect,
23879 >(
23880 self.observer.as_mut().map(
23881 <fidl::encoding::HandleType<
23882 fidl::Event,
23883 { fidl::ObjectType::EVENT.into_raw() },
23884 2147483648,
23885 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
23886 ),
23887 encoder,
23888 offset + cur_offset,
23889 depth,
23890 )?;
23891
23892 _prev_end_offset = cur_offset + envelope_size;
23893 if 3 > max_ordinal {
23894 return Ok(());
23895 }
23896
23897 let cur_offset: usize = (3 - 1) * envelope_size;
23900
23901 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23903
23904 fidl::encoding::encode_in_envelope_optional::<
23909 fidl::encoding::HandleType<
23910 fidl::Stream,
23911 { fidl::ObjectType::STREAM.into_raw() },
23912 2147483648,
23913 >,
23914 fidl::encoding::DefaultFuchsiaResourceDialect,
23915 >(
23916 self.stream.as_mut().map(
23917 <fidl::encoding::HandleType<
23918 fidl::Stream,
23919 { fidl::ObjectType::STREAM.into_raw() },
23920 2147483648,
23921 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
23922 ),
23923 encoder,
23924 offset + cur_offset,
23925 depth,
23926 )?;
23927
23928 _prev_end_offset = cur_offset + envelope_size;
23929 if 4 > max_ordinal {
23930 return Ok(());
23931 }
23932
23933 let cur_offset: usize = (4 - 1) * envelope_size;
23936
23937 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
23939
23940 fidl::encoding::encode_in_envelope_optional::<
23945 NodeAttributes2,
23946 fidl::encoding::DefaultFuchsiaResourceDialect,
23947 >(
23948 self.attributes
23949 .as_ref()
23950 .map(<NodeAttributes2 as fidl::encoding::ValueTypeMarker>::borrow),
23951 encoder,
23952 offset + cur_offset,
23953 depth,
23954 )?;
23955
23956 _prev_end_offset = cur_offset + envelope_size;
23957
23958 Ok(())
23959 }
23960 }
23961
23962 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for FileInfo {
23963 #[inline(always)]
23964 fn new_empty() -> Self {
23965 Self::default()
23966 }
23967
23968 unsafe fn decode(
23969 &mut self,
23970 decoder: &mut fidl::encoding::Decoder<
23971 '_,
23972 fidl::encoding::DefaultFuchsiaResourceDialect,
23973 >,
23974 offset: usize,
23975 mut depth: fidl::encoding::Depth,
23976 ) -> fidl::Result<()> {
23977 decoder.debug_check_bounds::<Self>(offset);
23978 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
23979 None => return Err(fidl::Error::NotNullable),
23980 Some(len) => len,
23981 };
23982 if len == 0 {
23984 return Ok(());
23985 };
23986 depth.increment()?;
23987 let envelope_size = 8;
23988 let bytes_len = len * envelope_size;
23989 let offset = decoder.out_of_line_offset(bytes_len)?;
23990 let mut _next_ordinal_to_read = 0;
23992 let mut next_offset = offset;
23993 let end_offset = offset + bytes_len;
23994 _next_ordinal_to_read += 1;
23995 if next_offset >= end_offset {
23996 return Ok(());
23997 }
23998
23999 while _next_ordinal_to_read < 1 {
24001 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24002 _next_ordinal_to_read += 1;
24003 next_offset += envelope_size;
24004 }
24005
24006 let next_out_of_line = decoder.next_out_of_line();
24007 let handles_before = decoder.remaining_handles();
24008 if let Some((inlined, num_bytes, num_handles)) =
24009 fidl::encoding::decode_envelope_header(decoder, next_offset)?
24010 {
24011 let member_inline_size =
24012 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
24013 if inlined != (member_inline_size <= 4) {
24014 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24015 }
24016 let inner_offset;
24017 let mut inner_depth = depth.clone();
24018 if inlined {
24019 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
24020 inner_offset = next_offset;
24021 } else {
24022 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24023 inner_depth.increment()?;
24024 }
24025 let val_ref = self.is_append.get_or_insert_with(|| {
24026 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
24027 });
24028 fidl::decode!(
24029 bool,
24030 fidl::encoding::DefaultFuchsiaResourceDialect,
24031 val_ref,
24032 decoder,
24033 inner_offset,
24034 inner_depth
24035 )?;
24036 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
24037 {
24038 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24039 }
24040 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24041 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24042 }
24043 }
24044
24045 next_offset += envelope_size;
24046 _next_ordinal_to_read += 1;
24047 if next_offset >= end_offset {
24048 return Ok(());
24049 }
24050
24051 while _next_ordinal_to_read < 2 {
24053 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24054 _next_ordinal_to_read += 1;
24055 next_offset += envelope_size;
24056 }
24057
24058 let next_out_of_line = decoder.next_out_of_line();
24059 let handles_before = decoder.remaining_handles();
24060 if let Some((inlined, num_bytes, num_handles)) =
24061 fidl::encoding::decode_envelope_header(decoder, next_offset)?
24062 {
24063 let member_inline_size = <fidl::encoding::HandleType<
24064 fidl::Event,
24065 { fidl::ObjectType::EVENT.into_raw() },
24066 2147483648,
24067 > as fidl::encoding::TypeMarker>::inline_size(
24068 decoder.context
24069 );
24070 if inlined != (member_inline_size <= 4) {
24071 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24072 }
24073 let inner_offset;
24074 let mut inner_depth = depth.clone();
24075 if inlined {
24076 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
24077 inner_offset = next_offset;
24078 } else {
24079 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24080 inner_depth.increment()?;
24081 }
24082 let val_ref =
24083 self.observer.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
24084 fidl::decode!(fidl::encoding::HandleType<fidl::Event, { fidl::ObjectType::EVENT.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
24085 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
24086 {
24087 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24088 }
24089 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24090 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24091 }
24092 }
24093
24094 next_offset += envelope_size;
24095 _next_ordinal_to_read += 1;
24096 if next_offset >= end_offset {
24097 return Ok(());
24098 }
24099
24100 while _next_ordinal_to_read < 3 {
24102 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24103 _next_ordinal_to_read += 1;
24104 next_offset += envelope_size;
24105 }
24106
24107 let next_out_of_line = decoder.next_out_of_line();
24108 let handles_before = decoder.remaining_handles();
24109 if let Some((inlined, num_bytes, num_handles)) =
24110 fidl::encoding::decode_envelope_header(decoder, next_offset)?
24111 {
24112 let member_inline_size = <fidl::encoding::HandleType<
24113 fidl::Stream,
24114 { fidl::ObjectType::STREAM.into_raw() },
24115 2147483648,
24116 > as fidl::encoding::TypeMarker>::inline_size(
24117 decoder.context
24118 );
24119 if inlined != (member_inline_size <= 4) {
24120 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24121 }
24122 let inner_offset;
24123 let mut inner_depth = depth.clone();
24124 if inlined {
24125 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
24126 inner_offset = next_offset;
24127 } else {
24128 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24129 inner_depth.increment()?;
24130 }
24131 let val_ref =
24132 self.stream.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
24133 fidl::decode!(fidl::encoding::HandleType<fidl::Stream, { fidl::ObjectType::STREAM.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
24134 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
24135 {
24136 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24137 }
24138 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24139 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24140 }
24141 }
24142
24143 next_offset += envelope_size;
24144 _next_ordinal_to_read += 1;
24145 if next_offset >= end_offset {
24146 return Ok(());
24147 }
24148
24149 while _next_ordinal_to_read < 4 {
24151 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24152 _next_ordinal_to_read += 1;
24153 next_offset += envelope_size;
24154 }
24155
24156 let next_out_of_line = decoder.next_out_of_line();
24157 let handles_before = decoder.remaining_handles();
24158 if let Some((inlined, num_bytes, num_handles)) =
24159 fidl::encoding::decode_envelope_header(decoder, next_offset)?
24160 {
24161 let member_inline_size =
24162 <NodeAttributes2 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
24163 if inlined != (member_inline_size <= 4) {
24164 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24165 }
24166 let inner_offset;
24167 let mut inner_depth = depth.clone();
24168 if inlined {
24169 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
24170 inner_offset = next_offset;
24171 } else {
24172 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24173 inner_depth.increment()?;
24174 }
24175 let val_ref = self.attributes.get_or_insert_with(|| {
24176 fidl::new_empty!(NodeAttributes2, fidl::encoding::DefaultFuchsiaResourceDialect)
24177 });
24178 fidl::decode!(
24179 NodeAttributes2,
24180 fidl::encoding::DefaultFuchsiaResourceDialect,
24181 val_ref,
24182 decoder,
24183 inner_offset,
24184 inner_depth
24185 )?;
24186 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
24187 {
24188 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24189 }
24190 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24191 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24192 }
24193 }
24194
24195 next_offset += envelope_size;
24196
24197 while next_offset < end_offset {
24199 _next_ordinal_to_read += 1;
24200 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
24201 next_offset += envelope_size;
24202 }
24203
24204 Ok(())
24205 }
24206 }
24207
24208 impl fidl::encoding::ResourceTypeMarker for ExtendedAttributeValue {
24209 type Borrowed<'a> = &'a mut Self;
24210 fn take_or_borrow<'a>(
24211 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
24212 ) -> Self::Borrowed<'a> {
24213 value
24214 }
24215 }
24216
24217 unsafe impl fidl::encoding::TypeMarker for ExtendedAttributeValue {
24218 type Owned = Self;
24219
24220 #[inline(always)]
24221 fn inline_align(_context: fidl::encoding::Context) -> usize {
24222 8
24223 }
24224
24225 #[inline(always)]
24226 fn inline_size(_context: fidl::encoding::Context) -> usize {
24227 16
24228 }
24229 }
24230
24231 unsafe impl
24232 fidl::encoding::Encode<
24233 ExtendedAttributeValue,
24234 fidl::encoding::DefaultFuchsiaResourceDialect,
24235 > for &mut ExtendedAttributeValue
24236 {
24237 #[inline]
24238 unsafe fn encode(
24239 self,
24240 encoder: &mut fidl::encoding::Encoder<
24241 '_,
24242 fidl::encoding::DefaultFuchsiaResourceDialect,
24243 >,
24244 offset: usize,
24245 _depth: fidl::encoding::Depth,
24246 ) -> fidl::Result<()> {
24247 encoder.debug_check_bounds::<ExtendedAttributeValue>(offset);
24248 encoder.write_num::<u64>(self.ordinal(), offset);
24249 match self {
24250 ExtendedAttributeValue::Bytes(ref val) => fidl::encoding::encode_in_envelope::<
24251 fidl::encoding::Vector<u8, 32768>,
24252 fidl::encoding::DefaultFuchsiaResourceDialect,
24253 >(
24254 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::ValueTypeMarker>::borrow(
24255 val,
24256 ),
24257 encoder,
24258 offset + 8,
24259 _depth,
24260 ),
24261 ExtendedAttributeValue::Buffer(ref mut val) => {
24262 fidl::encoding::encode_in_envelope::<
24263 fidl::encoding::HandleType<
24264 fidl::Vmo,
24265 { fidl::ObjectType::VMO.into_raw() },
24266 2147483648,
24267 >,
24268 fidl::encoding::DefaultFuchsiaResourceDialect,
24269 >(
24270 <fidl::encoding::HandleType<
24271 fidl::Vmo,
24272 { fidl::ObjectType::VMO.into_raw() },
24273 2147483648,
24274 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
24275 val
24276 ),
24277 encoder,
24278 offset + 8,
24279 _depth,
24280 )
24281 }
24282 ExtendedAttributeValue::__SourceBreaking { .. } => {
24283 Err(fidl::Error::UnknownUnionTag)
24284 }
24285 }
24286 }
24287 }
24288
24289 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
24290 for ExtendedAttributeValue
24291 {
24292 #[inline(always)]
24293 fn new_empty() -> Self {
24294 Self::__SourceBreaking { unknown_ordinal: 0 }
24295 }
24296
24297 #[inline]
24298 unsafe fn decode(
24299 &mut self,
24300 decoder: &mut fidl::encoding::Decoder<
24301 '_,
24302 fidl::encoding::DefaultFuchsiaResourceDialect,
24303 >,
24304 offset: usize,
24305 mut depth: fidl::encoding::Depth,
24306 ) -> fidl::Result<()> {
24307 decoder.debug_check_bounds::<Self>(offset);
24308 #[allow(unused_variables)]
24309 let next_out_of_line = decoder.next_out_of_line();
24310 let handles_before = decoder.remaining_handles();
24311 let (ordinal, inlined, num_bytes, num_handles) =
24312 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
24313
24314 let member_inline_size = match ordinal {
24315 1 => {
24316 <fidl::encoding::Vector<u8, 32768> as fidl::encoding::TypeMarker>::inline_size(
24317 decoder.context,
24318 )
24319 }
24320 2 => <fidl::encoding::HandleType<
24321 fidl::Vmo,
24322 { fidl::ObjectType::VMO.into_raw() },
24323 2147483648,
24324 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24325 0 => return Err(fidl::Error::UnknownUnionTag),
24326 _ => num_bytes as usize,
24327 };
24328
24329 if inlined != (member_inline_size <= 4) {
24330 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24331 }
24332 let _inner_offset;
24333 if inlined {
24334 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
24335 _inner_offset = offset + 8;
24336 } else {
24337 depth.increment()?;
24338 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24339 }
24340 match ordinal {
24341 1 => {
24342 #[allow(irrefutable_let_patterns)]
24343 if let ExtendedAttributeValue::Bytes(_) = self {
24344 } else {
24346 *self = ExtendedAttributeValue::Bytes(
24348 fidl::new_empty!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect),
24349 );
24350 }
24351 #[allow(irrefutable_let_patterns)]
24352 if let ExtendedAttributeValue::Bytes(ref mut val) = self {
24353 fidl::decode!(fidl::encoding::Vector<u8, 32768>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
24354 } else {
24355 unreachable!()
24356 }
24357 }
24358 2 => {
24359 #[allow(irrefutable_let_patterns)]
24360 if let ExtendedAttributeValue::Buffer(_) = self {
24361 } else {
24363 *self = ExtendedAttributeValue::Buffer(
24365 fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
24366 );
24367 }
24368 #[allow(irrefutable_let_patterns)]
24369 if let ExtendedAttributeValue::Buffer(ref mut val) = self {
24370 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
24371 } else {
24372 unreachable!()
24373 }
24374 }
24375 #[allow(deprecated)]
24376 ordinal => {
24377 for _ in 0..num_handles {
24378 decoder.drop_next_handle()?;
24379 }
24380 *self = ExtendedAttributeValue::__SourceBreaking { unknown_ordinal: ordinal };
24381 }
24382 }
24383 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
24384 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24385 }
24386 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24387 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24388 }
24389 Ok(())
24390 }
24391 }
24392
24393 impl fidl::encoding::ResourceTypeMarker for NodeInfoDeprecated {
24394 type Borrowed<'a> = &'a mut Self;
24395 fn take_or_borrow<'a>(
24396 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
24397 ) -> Self::Borrowed<'a> {
24398 value
24399 }
24400 }
24401
24402 unsafe impl fidl::encoding::TypeMarker for NodeInfoDeprecated {
24403 type Owned = Self;
24404
24405 #[inline(always)]
24406 fn inline_align(_context: fidl::encoding::Context) -> usize {
24407 8
24408 }
24409
24410 #[inline(always)]
24411 fn inline_size(_context: fidl::encoding::Context) -> usize {
24412 16
24413 }
24414 }
24415
24416 unsafe impl
24417 fidl::encoding::Encode<NodeInfoDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>
24418 for &mut NodeInfoDeprecated
24419 {
24420 #[inline]
24421 unsafe fn encode(
24422 self,
24423 encoder: &mut fidl::encoding::Encoder<
24424 '_,
24425 fidl::encoding::DefaultFuchsiaResourceDialect,
24426 >,
24427 offset: usize,
24428 _depth: fidl::encoding::Depth,
24429 ) -> fidl::Result<()> {
24430 encoder.debug_check_bounds::<NodeInfoDeprecated>(offset);
24431 encoder.write_num::<u64>(self.ordinal(), offset);
24432 match self {
24433 NodeInfoDeprecated::Service(ref val) => fidl::encoding::encode_in_envelope::<
24434 Service,
24435 fidl::encoding::DefaultFuchsiaResourceDialect,
24436 >(
24437 <Service as fidl::encoding::ValueTypeMarker>::borrow(val),
24438 encoder,
24439 offset + 8,
24440 _depth,
24441 ),
24442 NodeInfoDeprecated::File(ref mut val) => fidl::encoding::encode_in_envelope::<
24443 FileObject,
24444 fidl::encoding::DefaultFuchsiaResourceDialect,
24445 >(
24446 <FileObject as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
24447 encoder,
24448 offset + 8,
24449 _depth,
24450 ),
24451 NodeInfoDeprecated::Directory(ref val) => fidl::encoding::encode_in_envelope::<
24452 DirectoryObject,
24453 fidl::encoding::DefaultFuchsiaResourceDialect,
24454 >(
24455 <DirectoryObject as fidl::encoding::ValueTypeMarker>::borrow(val),
24456 encoder,
24457 offset + 8,
24458 _depth,
24459 ),
24460 NodeInfoDeprecated::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
24461 SymlinkObject,
24462 fidl::encoding::DefaultFuchsiaResourceDialect,
24463 >(
24464 <SymlinkObject as fidl::encoding::ValueTypeMarker>::borrow(val),
24465 encoder,
24466 offset + 8,
24467 _depth,
24468 ),
24469 }
24470 }
24471 }
24472
24473 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
24474 for NodeInfoDeprecated
24475 {
24476 #[inline(always)]
24477 fn new_empty() -> Self {
24478 Self::Service(fidl::new_empty!(Service, fidl::encoding::DefaultFuchsiaResourceDialect))
24479 }
24480
24481 #[inline]
24482 unsafe fn decode(
24483 &mut self,
24484 decoder: &mut fidl::encoding::Decoder<
24485 '_,
24486 fidl::encoding::DefaultFuchsiaResourceDialect,
24487 >,
24488 offset: usize,
24489 mut depth: fidl::encoding::Depth,
24490 ) -> fidl::Result<()> {
24491 decoder.debug_check_bounds::<Self>(offset);
24492 #[allow(unused_variables)]
24493 let next_out_of_line = decoder.next_out_of_line();
24494 let handles_before = decoder.remaining_handles();
24495 let (ordinal, inlined, num_bytes, num_handles) =
24496 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
24497
24498 let member_inline_size = match ordinal {
24499 1 => <Service as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24500 2 => <FileObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24501 3 => <DirectoryObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24502 4 => <SymlinkObject as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24503 _ => return Err(fidl::Error::UnknownUnionTag),
24504 };
24505
24506 if inlined != (member_inline_size <= 4) {
24507 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24508 }
24509 let _inner_offset;
24510 if inlined {
24511 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
24512 _inner_offset = offset + 8;
24513 } else {
24514 depth.increment()?;
24515 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24516 }
24517 match ordinal {
24518 1 => {
24519 #[allow(irrefutable_let_patterns)]
24520 if let NodeInfoDeprecated::Service(_) = self {
24521 } else {
24523 *self = NodeInfoDeprecated::Service(fidl::new_empty!(
24525 Service,
24526 fidl::encoding::DefaultFuchsiaResourceDialect
24527 ));
24528 }
24529 #[allow(irrefutable_let_patterns)]
24530 if let NodeInfoDeprecated::Service(ref mut val) = self {
24531 fidl::decode!(
24532 Service,
24533 fidl::encoding::DefaultFuchsiaResourceDialect,
24534 val,
24535 decoder,
24536 _inner_offset,
24537 depth
24538 )?;
24539 } else {
24540 unreachable!()
24541 }
24542 }
24543 2 => {
24544 #[allow(irrefutable_let_patterns)]
24545 if let NodeInfoDeprecated::File(_) = self {
24546 } else {
24548 *self = NodeInfoDeprecated::File(fidl::new_empty!(
24550 FileObject,
24551 fidl::encoding::DefaultFuchsiaResourceDialect
24552 ));
24553 }
24554 #[allow(irrefutable_let_patterns)]
24555 if let NodeInfoDeprecated::File(ref mut val) = self {
24556 fidl::decode!(
24557 FileObject,
24558 fidl::encoding::DefaultFuchsiaResourceDialect,
24559 val,
24560 decoder,
24561 _inner_offset,
24562 depth
24563 )?;
24564 } else {
24565 unreachable!()
24566 }
24567 }
24568 3 => {
24569 #[allow(irrefutable_let_patterns)]
24570 if let NodeInfoDeprecated::Directory(_) = self {
24571 } else {
24573 *self = NodeInfoDeprecated::Directory(fidl::new_empty!(
24575 DirectoryObject,
24576 fidl::encoding::DefaultFuchsiaResourceDialect
24577 ));
24578 }
24579 #[allow(irrefutable_let_patterns)]
24580 if let NodeInfoDeprecated::Directory(ref mut val) = self {
24581 fidl::decode!(
24582 DirectoryObject,
24583 fidl::encoding::DefaultFuchsiaResourceDialect,
24584 val,
24585 decoder,
24586 _inner_offset,
24587 depth
24588 )?;
24589 } else {
24590 unreachable!()
24591 }
24592 }
24593 4 => {
24594 #[allow(irrefutable_let_patterns)]
24595 if let NodeInfoDeprecated::Symlink(_) = self {
24596 } else {
24598 *self = NodeInfoDeprecated::Symlink(fidl::new_empty!(
24600 SymlinkObject,
24601 fidl::encoding::DefaultFuchsiaResourceDialect
24602 ));
24603 }
24604 #[allow(irrefutable_let_patterns)]
24605 if let NodeInfoDeprecated::Symlink(ref mut val) = self {
24606 fidl::decode!(
24607 SymlinkObject,
24608 fidl::encoding::DefaultFuchsiaResourceDialect,
24609 val,
24610 decoder,
24611 _inner_offset,
24612 depth
24613 )?;
24614 } else {
24615 unreachable!()
24616 }
24617 }
24618 ordinal => panic!("unexpected ordinal {:?}", ordinal),
24619 }
24620 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
24621 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24622 }
24623 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24624 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24625 }
24626 Ok(())
24627 }
24628 }
24629
24630 impl fidl::encoding::ResourceTypeMarker for Representation {
24631 type Borrowed<'a> = &'a mut Self;
24632 fn take_or_borrow<'a>(
24633 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
24634 ) -> Self::Borrowed<'a> {
24635 value
24636 }
24637 }
24638
24639 unsafe impl fidl::encoding::TypeMarker for Representation {
24640 type Owned = Self;
24641
24642 #[inline(always)]
24643 fn inline_align(_context: fidl::encoding::Context) -> usize {
24644 8
24645 }
24646
24647 #[inline(always)]
24648 fn inline_size(_context: fidl::encoding::Context) -> usize {
24649 16
24650 }
24651 }
24652
24653 unsafe impl
24654 fidl::encoding::Encode<Representation, fidl::encoding::DefaultFuchsiaResourceDialect>
24655 for &mut Representation
24656 {
24657 #[inline]
24658 unsafe fn encode(
24659 self,
24660 encoder: &mut fidl::encoding::Encoder<
24661 '_,
24662 fidl::encoding::DefaultFuchsiaResourceDialect,
24663 >,
24664 offset: usize,
24665 _depth: fidl::encoding::Depth,
24666 ) -> fidl::Result<()> {
24667 encoder.debug_check_bounds::<Representation>(offset);
24668 encoder.write_num::<u64>(self.ordinal(), offset);
24669 match self {
24670 Representation::Node(ref val) => fidl::encoding::encode_in_envelope::<
24671 NodeInfo,
24672 fidl::encoding::DefaultFuchsiaResourceDialect,
24673 >(
24674 <NodeInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
24675 encoder,
24676 offset + 8,
24677 _depth,
24678 ),
24679 Representation::Directory(ref val) => fidl::encoding::encode_in_envelope::<
24680 DirectoryInfo,
24681 fidl::encoding::DefaultFuchsiaResourceDialect,
24682 >(
24683 <DirectoryInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
24684 encoder,
24685 offset + 8,
24686 _depth,
24687 ),
24688 Representation::File(ref mut val) => fidl::encoding::encode_in_envelope::<
24689 FileInfo,
24690 fidl::encoding::DefaultFuchsiaResourceDialect,
24691 >(
24692 <FileInfo as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
24693 encoder,
24694 offset + 8,
24695 _depth,
24696 ),
24697 Representation::Symlink(ref val) => fidl::encoding::encode_in_envelope::<
24698 SymlinkInfo,
24699 fidl::encoding::DefaultFuchsiaResourceDialect,
24700 >(
24701 <SymlinkInfo as fidl::encoding::ValueTypeMarker>::borrow(val),
24702 encoder,
24703 offset + 8,
24704 _depth,
24705 ),
24706 Representation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
24707 }
24708 }
24709 }
24710
24711 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
24712 for Representation
24713 {
24714 #[inline(always)]
24715 fn new_empty() -> Self {
24716 Self::__SourceBreaking { unknown_ordinal: 0 }
24717 }
24718
24719 #[inline]
24720 unsafe fn decode(
24721 &mut self,
24722 decoder: &mut fidl::encoding::Decoder<
24723 '_,
24724 fidl::encoding::DefaultFuchsiaResourceDialect,
24725 >,
24726 offset: usize,
24727 mut depth: fidl::encoding::Depth,
24728 ) -> fidl::Result<()> {
24729 decoder.debug_check_bounds::<Self>(offset);
24730 #[allow(unused_variables)]
24731 let next_out_of_line = decoder.next_out_of_line();
24732 let handles_before = decoder.remaining_handles();
24733 let (ordinal, inlined, num_bytes, num_handles) =
24734 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
24735
24736 let member_inline_size = match ordinal {
24737 1 => <NodeInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24738 2 => <DirectoryInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24739 3 => <FileInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24740 4 => <SymlinkInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context),
24741 0 => return Err(fidl::Error::UnknownUnionTag),
24742 _ => num_bytes as usize,
24743 };
24744
24745 if inlined != (member_inline_size <= 4) {
24746 return Err(fidl::Error::InvalidInlineBitInEnvelope);
24747 }
24748 let _inner_offset;
24749 if inlined {
24750 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
24751 _inner_offset = offset + 8;
24752 } else {
24753 depth.increment()?;
24754 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
24755 }
24756 match ordinal {
24757 1 => {
24758 #[allow(irrefutable_let_patterns)]
24759 if let Representation::Node(_) = self {
24760 } else {
24762 *self = Representation::Node(fidl::new_empty!(
24764 NodeInfo,
24765 fidl::encoding::DefaultFuchsiaResourceDialect
24766 ));
24767 }
24768 #[allow(irrefutable_let_patterns)]
24769 if let Representation::Node(ref mut val) = self {
24770 fidl::decode!(
24771 NodeInfo,
24772 fidl::encoding::DefaultFuchsiaResourceDialect,
24773 val,
24774 decoder,
24775 _inner_offset,
24776 depth
24777 )?;
24778 } else {
24779 unreachable!()
24780 }
24781 }
24782 2 => {
24783 #[allow(irrefutable_let_patterns)]
24784 if let Representation::Directory(_) = self {
24785 } else {
24787 *self = Representation::Directory(fidl::new_empty!(
24789 DirectoryInfo,
24790 fidl::encoding::DefaultFuchsiaResourceDialect
24791 ));
24792 }
24793 #[allow(irrefutable_let_patterns)]
24794 if let Representation::Directory(ref mut val) = self {
24795 fidl::decode!(
24796 DirectoryInfo,
24797 fidl::encoding::DefaultFuchsiaResourceDialect,
24798 val,
24799 decoder,
24800 _inner_offset,
24801 depth
24802 )?;
24803 } else {
24804 unreachable!()
24805 }
24806 }
24807 3 => {
24808 #[allow(irrefutable_let_patterns)]
24809 if let Representation::File(_) = self {
24810 } else {
24812 *self = Representation::File(fidl::new_empty!(
24814 FileInfo,
24815 fidl::encoding::DefaultFuchsiaResourceDialect
24816 ));
24817 }
24818 #[allow(irrefutable_let_patterns)]
24819 if let Representation::File(ref mut val) = self {
24820 fidl::decode!(
24821 FileInfo,
24822 fidl::encoding::DefaultFuchsiaResourceDialect,
24823 val,
24824 decoder,
24825 _inner_offset,
24826 depth
24827 )?;
24828 } else {
24829 unreachable!()
24830 }
24831 }
24832 4 => {
24833 #[allow(irrefutable_let_patterns)]
24834 if let Representation::Symlink(_) = self {
24835 } else {
24837 *self = Representation::Symlink(fidl::new_empty!(
24839 SymlinkInfo,
24840 fidl::encoding::DefaultFuchsiaResourceDialect
24841 ));
24842 }
24843 #[allow(irrefutable_let_patterns)]
24844 if let Representation::Symlink(ref mut val) = self {
24845 fidl::decode!(
24846 SymlinkInfo,
24847 fidl::encoding::DefaultFuchsiaResourceDialect,
24848 val,
24849 decoder,
24850 _inner_offset,
24851 depth
24852 )?;
24853 } else {
24854 unreachable!()
24855 }
24856 }
24857 #[allow(deprecated)]
24858 ordinal => {
24859 for _ in 0..num_handles {
24860 decoder.drop_next_handle()?;
24861 }
24862 *self = Representation::__SourceBreaking { unknown_ordinal: ordinal };
24863 }
24864 }
24865 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
24866 return Err(fidl::Error::InvalidNumBytesInEnvelope);
24867 }
24868 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
24869 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
24870 }
24871 Ok(())
24872 }
24873 }
24874}