1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_fuchsia_io::natural::*;
8
9 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10 pub struct ConnectionInfo {
11 pub rights: ::core::option::Option<crate::natural::Operations>,
12 }
13
14 impl ConnectionInfo {
15 fn __max_ordinal(&self) -> usize {
16 if self.rights.is_some() {
17 return 1;
18 }
19
20 0
21 }
22 }
23
24 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ConnectionInfo<'static>, ___E> for ConnectionInfo
25 where
26 ___E: ::fidl_next::Encoder + ?Sized,
27 ___E: ::fidl_next::fuchsia::HandleEncoder,
28 {
29 #[inline]
30 fn encode(
31 mut self,
32 encoder: &mut ___E,
33 out: &mut ::core::mem::MaybeUninit<crate::wire::ConnectionInfo<'static>>,
34 _: (),
35 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
36 ::fidl_next::munge!(let crate::wire::ConnectionInfo { table } = out);
37
38 let max_ord = self.__max_ordinal();
39
40 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
41 ::fidl_next::Wire::zero_padding(&mut out);
42
43 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
44 ::fidl_next::wire::Envelope,
45 >(encoder, max_ord);
46
47 for i in 1..=max_ord {
48 match i {
49 1 => {
50 if let Some(value) = self.rights.take() {
51 ::fidl_next::wire::Envelope::encode_value::<
52 crate::wire::Operations,
53 ___E,
54 >(
55 value, preallocated.encoder, &mut out, ()
56 )?;
57 } else {
58 ::fidl_next::wire::Envelope::encode_zero(&mut out)
59 }
60 }
61
62 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
63 }
64 unsafe {
65 preallocated.write_next(out.assume_init_ref());
66 }
67 }
68
69 ::fidl_next::wire::Table::encode_len(table, max_ord);
70
71 Ok(())
72 }
73 }
74
75 impl<'de> ::fidl_next::FromWire<crate::wire::ConnectionInfo<'de>> for ConnectionInfo {
76 #[inline]
77 fn from_wire(wire_: crate::wire::ConnectionInfo<'de>) -> Self {
78 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
79
80 let rights = wire_.table.get(1);
81
82 Self {
83 rights: rights.map(|envelope| {
84 ::fidl_next::FromWire::from_wire(unsafe {
85 envelope.read_unchecked::<crate::wire::Operations>()
86 })
87 }),
88 }
89 }
90 }
91
92 #[derive(Debug, PartialEq)]
93 #[repr(C)]
94 pub struct DirectoryGetTokenResponse {
95 pub s: i32,
96
97 pub token: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
98 }
99
100 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>
101 for DirectoryGetTokenResponse
102 where
103 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
104 ___E: ::fidl_next::fuchsia::HandleEncoder,
105 {
106 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
107 Self,
108 crate::wire::DirectoryGetTokenResponse,
109 > = unsafe {
110 ::fidl_next::CopyOptimization::enable_if(
111 true
112
113 && <
114 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
115 >::COPY_OPTIMIZATION.is_enabled()
116
117 && <
118 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
119 >::COPY_OPTIMIZATION.is_enabled()
120
121 )
122 };
123
124 #[inline]
125 fn encode(
126 self,
127 encoder_: &mut ___E,
128 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryGetTokenResponse>,
129 _: (),
130 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
131 ::fidl_next::munge! {
132 let crate::wire::DirectoryGetTokenResponse {
133 s,
134 token,
135
136 } = out_;
137 }
138
139 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
140
141 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
142
143 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
144
145 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
146
147 Ok(())
148 }
149 }
150
151 unsafe impl<___E>
152 ::fidl_next::EncodeOption<
153 ::fidl_next::wire::Box<'static, crate::wire::DirectoryGetTokenResponse>,
154 ___E,
155 > for DirectoryGetTokenResponse
156 where
157 ___E: ::fidl_next::Encoder + ?Sized,
158 DirectoryGetTokenResponse:
159 ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>,
160 {
161 #[inline]
162 fn encode_option(
163 this: ::core::option::Option<Self>,
164 encoder: &mut ___E,
165 out: &mut ::core::mem::MaybeUninit<
166 ::fidl_next::wire::Box<'static, crate::wire::DirectoryGetTokenResponse>,
167 >,
168 _: (),
169 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
170 if let Some(inner) = this {
171 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
172 ::fidl_next::wire::Box::encode_present(out);
173 } else {
174 ::fidl_next::wire::Box::encode_absent(out);
175 }
176
177 Ok(())
178 }
179 }
180
181 impl ::fidl_next::FromWire<crate::wire::DirectoryGetTokenResponse> for DirectoryGetTokenResponse {
182 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
183 crate::wire::DirectoryGetTokenResponse,
184 Self,
185 > = unsafe {
186 ::fidl_next::CopyOptimization::enable_if(
187 true
188
189 && <
190 i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>
191 >::COPY_OPTIMIZATION.is_enabled()
192
193 && <
194 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
195 >::COPY_OPTIMIZATION.is_enabled()
196
197 )
198 };
199
200 #[inline]
201 fn from_wire(wire: crate::wire::DirectoryGetTokenResponse) -> Self {
202 Self {
203 s: ::fidl_next::FromWire::from_wire(wire.s),
204
205 token: ::fidl_next::FromWire::from_wire(wire.token),
206 }
207 }
208 }
209
210 #[derive(Debug, PartialEq)]
211 pub struct DirectoryLinkRequest {
212 pub src: ::std::string::String,
213
214 pub dst_parent_token: ::fidl_next::fuchsia::zx::NullableHandle,
215
216 pub dst: ::std::string::String,
217 }
218
219 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
220 for DirectoryLinkRequest
221 where
222 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
223 ___E: ::fidl_next::Encoder,
224 ___E: ::fidl_next::fuchsia::HandleEncoder,
225 {
226 #[inline]
227 fn encode(
228 self,
229 encoder_: &mut ___E,
230 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
231 _: (),
232 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
233 ::fidl_next::munge! {
234 let crate::wire::DirectoryLinkRequest {
235 src,
236 dst_parent_token,
237 dst,
238
239 } = out_;
240 }
241
242 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
243
244 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(src.as_mut_ptr()) };
245 ::fidl_next::Constrained::validate(_field, 255)?;
246
247 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
248
249 let mut _field =
250 unsafe { ::fidl_next::Slot::new_unchecked(dst_parent_token.as_mut_ptr()) };
251
252 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
253
254 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dst.as_mut_ptr()) };
255 ::fidl_next::Constrained::validate(_field, 255)?;
256
257 Ok(())
258 }
259 }
260
261 unsafe impl<___E>
262 ::fidl_next::EncodeOption<
263 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkRequest<'static>>,
264 ___E,
265 > for DirectoryLinkRequest
266 where
267 ___E: ::fidl_next::Encoder + ?Sized,
268 DirectoryLinkRequest: ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>,
269 {
270 #[inline]
271 fn encode_option(
272 this: ::core::option::Option<Self>,
273 encoder: &mut ___E,
274 out: &mut ::core::mem::MaybeUninit<
275 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkRequest<'static>>,
276 >,
277 _: (),
278 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
279 if let Some(inner) = this {
280 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
281 ::fidl_next::wire::Box::encode_present(out);
282 } else {
283 ::fidl_next::wire::Box::encode_absent(out);
284 }
285
286 Ok(())
287 }
288 }
289
290 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryLinkRequest<'de>> for DirectoryLinkRequest {
291 #[inline]
292 fn from_wire(wire: crate::wire::DirectoryLinkRequest<'de>) -> Self {
293 Self {
294 src: ::fidl_next::FromWire::from_wire(wire.src),
295
296 dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
297
298 dst: ::fidl_next::FromWire::from_wire(wire.dst),
299 }
300 }
301 }
302
303 #[doc = " The type to identify a connection to a node.\n It represents a capability: a reference to a node with associated rights.\n"]
304 pub type Token = ::fidl_next::fuchsia::zx::Event;
305
306 #[derive(Debug, PartialEq)]
307 pub struct DirectoryRenameRequest {
308 pub src: ::std::string::String,
309
310 pub dst_parent_token: ::fidl_next::fuchsia::zx::Event,
311
312 pub dst: ::std::string::String,
313 }
314
315 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
316 for DirectoryRenameRequest
317 where
318 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
319 ___E: ::fidl_next::Encoder,
320 ___E: ::fidl_next::fuchsia::HandleEncoder,
321 {
322 #[inline]
323 fn encode(
324 self,
325 encoder_: &mut ___E,
326 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
327 _: (),
328 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
329 ::fidl_next::munge! {
330 let crate::wire::DirectoryRenameRequest {
331 src,
332 dst_parent_token,
333 dst,
334
335 } = out_;
336 }
337
338 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
339
340 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(src.as_mut_ptr()) };
341 ::fidl_next::Constrained::validate(_field, 255)?;
342
343 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
344
345 let mut _field =
346 unsafe { ::fidl_next::Slot::new_unchecked(dst_parent_token.as_mut_ptr()) };
347
348 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
349
350 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dst.as_mut_ptr()) };
351 ::fidl_next::Constrained::validate(_field, 255)?;
352
353 Ok(())
354 }
355 }
356
357 unsafe impl<___E>
358 ::fidl_next::EncodeOption<
359 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRenameRequest<'static>>,
360 ___E,
361 > for DirectoryRenameRequest
362 where
363 ___E: ::fidl_next::Encoder + ?Sized,
364 DirectoryRenameRequest:
365 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>,
366 {
367 #[inline]
368 fn encode_option(
369 this: ::core::option::Option<Self>,
370 encoder: &mut ___E,
371 out: &mut ::core::mem::MaybeUninit<
372 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRenameRequest<'static>>,
373 >,
374 _: (),
375 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
376 if let Some(inner) = this {
377 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
378 ::fidl_next::wire::Box::encode_present(out);
379 } else {
380 ::fidl_next::wire::Box::encode_absent(out);
381 }
382
383 Ok(())
384 }
385 }
386
387 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryRenameRequest<'de>>
388 for DirectoryRenameRequest
389 {
390 #[inline]
391 fn from_wire(wire: crate::wire::DirectoryRenameRequest<'de>) -> Self {
392 Self {
393 src: ::fidl_next::FromWire::from_wire(wire.src),
394
395 dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
396
397 dst: ::fidl_next::FromWire::from_wire(wire.dst),
398 }
399 }
400 }
401
402 #[derive(Debug, PartialEq)]
403 #[repr(C)]
404 pub struct DirectoryWatchRequest {
405 pub mask: crate::natural::WatchMask,
406
407 pub options: u32,
408
409 pub watcher:
410 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::fuchsia::zx::Channel>,
411 }
412
413 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
414 for DirectoryWatchRequest
415 where
416 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
417 ___E: ::fidl_next::fuchsia::HandleEncoder,
418 {
419 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
420 Self,
421 crate::wire::DirectoryWatchRequest,
422 > = unsafe {
423 ::fidl_next::CopyOptimization::enable_if(
424 true
425
426 && <
427 crate::natural::WatchMask as ::fidl_next::Encode<crate::wire::WatchMask, ___E>
428 >::COPY_OPTIMIZATION.is_enabled()
429
430 && <
431 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
432 >::COPY_OPTIMIZATION.is_enabled()
433
434 && <
435 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::wire::fuchsia::Channel>, ___E>
436 >::COPY_OPTIMIZATION.is_enabled()
437
438 )
439 };
440
441 #[inline]
442 fn encode(
443 self,
444 encoder_: &mut ___E,
445 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
446 _: (),
447 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
448 ::fidl_next::munge! {
449 let crate::wire::DirectoryWatchRequest {
450 mask,
451 options,
452 watcher,
453
454 } = out_;
455 }
456
457 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
458
459 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mask.as_mut_ptr()) };
460
461 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
462
463 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
464
465 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
466
467 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(watcher.as_mut_ptr()) };
468
469 Ok(())
470 }
471 }
472
473 unsafe impl<___E>
474 ::fidl_next::EncodeOption<
475 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchRequest>,
476 ___E,
477 > for DirectoryWatchRequest
478 where
479 ___E: ::fidl_next::Encoder + ?Sized,
480 DirectoryWatchRequest: ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>,
481 {
482 #[inline]
483 fn encode_option(
484 this: ::core::option::Option<Self>,
485 encoder: &mut ___E,
486 out: &mut ::core::mem::MaybeUninit<
487 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchRequest>,
488 >,
489 _: (),
490 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
491 if let Some(inner) = this {
492 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
493 ::fidl_next::wire::Box::encode_present(out);
494 } else {
495 ::fidl_next::wire::Box::encode_absent(out);
496 }
497
498 Ok(())
499 }
500 }
501
502 impl ::fidl_next::FromWire<crate::wire::DirectoryWatchRequest> for DirectoryWatchRequest {
503 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
504 crate::wire::DirectoryWatchRequest,
505 Self,
506 > = unsafe {
507 ::fidl_next::CopyOptimization::enable_if(
508 true && <crate::natural::WatchMask as ::fidl_next::FromWire<
509 crate::wire::WatchMask,
510 >>::COPY_OPTIMIZATION
511 .is_enabled()
512 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
513 .is_enabled()
514 && <::fidl_next::ServerEnd<
515 crate::DirectoryWatcher,
516 ::fidl_next::fuchsia::zx::Channel,
517 > as ::fidl_next::FromWire<
518 ::fidl_next::ServerEnd<
519 crate::DirectoryWatcher,
520 ::fidl_next::wire::fuchsia::Channel,
521 >,
522 >>::COPY_OPTIMIZATION
523 .is_enabled(),
524 )
525 };
526
527 #[inline]
528 fn from_wire(wire: crate::wire::DirectoryWatchRequest) -> Self {
529 Self {
530 mask: ::fidl_next::FromWire::from_wire(wire.mask),
531
532 options: ::fidl_next::FromWire::from_wire(wire.options),
533
534 watcher: ::fidl_next::FromWire::from_wire(wire.watcher),
535 }
536 }
537 }
538
539 #[derive(Debug, PartialEq)]
540 pub struct NodeOnOpenRequest {
541 pub s: i32,
542
543 pub info: ::core::option::Option<::std::boxed::Box<crate::natural::NodeInfoDeprecated>>,
544 }
545
546 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
547 for NodeOnOpenRequest
548 where
549 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
550 ___E: ::fidl_next::Encoder,
551 ___E: ::fidl_next::fuchsia::HandleEncoder,
552 {
553 #[inline]
554 fn encode(
555 self,
556 encoder_: &mut ___E,
557 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
558 _: (),
559 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
560 ::fidl_next::munge! {
561 let crate::wire::NodeOnOpenRequest {
562 s,
563 info,
564
565 } = out_;
566 }
567
568 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
569
570 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
571
572 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
573
574 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
575
576 Ok(())
577 }
578 }
579
580 unsafe impl<___E>
581 ::fidl_next::EncodeOption<
582 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
583 ___E,
584 > for NodeOnOpenRequest
585 where
586 ___E: ::fidl_next::Encoder + ?Sized,
587 NodeOnOpenRequest: ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>,
588 {
589 #[inline]
590 fn encode_option(
591 this: ::core::option::Option<Self>,
592 encoder: &mut ___E,
593 out: &mut ::core::mem::MaybeUninit<
594 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
595 >,
596 _: (),
597 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
598 if let Some(inner) = this {
599 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
600 ::fidl_next::wire::Box::encode_present(out);
601 } else {
602 ::fidl_next::wire::Box::encode_absent(out);
603 }
604
605 Ok(())
606 }
607 }
608
609 impl<'de> ::fidl_next::FromWire<crate::wire::NodeOnOpenRequest<'de>> for NodeOnOpenRequest {
610 #[inline]
611 fn from_wire(wire: crate::wire::NodeOnOpenRequest<'de>) -> Self {
612 Self {
613 s: ::fidl_next::FromWire::from_wire(wire.s),
614
615 info: ::fidl_next::FromWire::from_wire(wire.info),
616 }
617 }
618 }
619
620 #[derive(Debug, PartialEq)]
621 #[repr(C)]
622 pub struct NodeListExtendedAttributesRequest {
623 pub iterator: ::fidl_next::ServerEnd<
624 crate::ExtendedAttributeIterator,
625 ::fidl_next::fuchsia::zx::Channel,
626 >,
627 }
628
629 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
630 for NodeListExtendedAttributesRequest
631 where
632 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
633 ___E: ::fidl_next::fuchsia::HandleEncoder,
634 {
635 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
636 Self,
637 crate::wire::NodeListExtendedAttributesRequest,
638 > = unsafe {
639 ::fidl_next::CopyOptimization::enable_if(
640 true && <::fidl_next::ServerEnd<
641 crate::ExtendedAttributeIterator,
642 ::fidl_next::fuchsia::zx::Channel,
643 > as ::fidl_next::Encode<
644 ::fidl_next::ServerEnd<
645 crate::ExtendedAttributeIterator,
646 ::fidl_next::wire::fuchsia::Channel,
647 >,
648 ___E,
649 >>::COPY_OPTIMIZATION
650 .is_enabled(),
651 )
652 };
653
654 #[inline]
655 fn encode(
656 self,
657 encoder_: &mut ___E,
658 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
659 _: (),
660 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
661 ::fidl_next::munge! {
662 let crate::wire::NodeListExtendedAttributesRequest {
663 iterator,
664
665 } = out_;
666 }
667
668 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
669
670 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
671
672 Ok(())
673 }
674 }
675
676 unsafe impl<___E>
677 ::fidl_next::EncodeOption<
678 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
679 ___E,
680 > for NodeListExtendedAttributesRequest
681 where
682 ___E: ::fidl_next::Encoder + ?Sized,
683 NodeListExtendedAttributesRequest:
684 ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>,
685 {
686 #[inline]
687 fn encode_option(
688 this: ::core::option::Option<Self>,
689 encoder: &mut ___E,
690 out: &mut ::core::mem::MaybeUninit<
691 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
692 >,
693 _: (),
694 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
695 if let Some(inner) = this {
696 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
697 ::fidl_next::wire::Box::encode_present(out);
698 } else {
699 ::fidl_next::wire::Box::encode_absent(out);
700 }
701
702 Ok(())
703 }
704 }
705
706 impl ::fidl_next::FromWire<crate::wire::NodeListExtendedAttributesRequest>
707 for NodeListExtendedAttributesRequest
708 {
709 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
710 crate::wire::NodeListExtendedAttributesRequest,
711 Self,
712 > = unsafe {
713 ::fidl_next::CopyOptimization::enable_if(
714 true && <::fidl_next::ServerEnd<
715 crate::ExtendedAttributeIterator,
716 ::fidl_next::fuchsia::zx::Channel,
717 > as ::fidl_next::FromWire<
718 ::fidl_next::ServerEnd<
719 crate::ExtendedAttributeIterator,
720 ::fidl_next::wire::fuchsia::Channel,
721 >,
722 >>::COPY_OPTIMIZATION
723 .is_enabled(),
724 )
725 };
726
727 #[inline]
728 fn from_wire(wire: crate::wire::NodeListExtendedAttributesRequest) -> Self {
729 Self { iterator: ::fidl_next::FromWire::from_wire(wire.iterator) }
730 }
731 }
732
733 #[doc = " The value type for an extended attribute. If the value is less than 32768\n bytes, then it is included inline. Values larger than this size are written\n into a vmo buffer.\n"]
734 #[derive(Debug, PartialEq)]
735 pub enum ExtendedAttributeValue {
736 Bytes(::std::vec::Vec<u8>),
737
738 Buffer(::fidl_next::fuchsia::zx::Vmo),
739
740 UnknownOrdinal_(u64),
741 }
742
743 impl ExtendedAttributeValue {
744 pub fn is_unknown(&self) -> bool {
745 #[allow(unreachable_patterns)]
746 match self {
747 Self::UnknownOrdinal_(_) => true,
748 _ => false,
749 }
750 }
751 }
752
753 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>
754 for ExtendedAttributeValue
755 where
756 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
757 ___E: ::fidl_next::Encoder,
758 ___E: ::fidl_next::fuchsia::HandleEncoder,
759 {
760 #[inline]
761 fn encode(
762 self,
763 encoder: &mut ___E,
764 out: &mut ::core::mem::MaybeUninit<crate::wire::ExtendedAttributeValue<'static>>,
765 _: (),
766 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
767 ::fidl_next::munge!(let crate::wire::ExtendedAttributeValue { raw, _phantom: _ } = out);
768
769 match self {
770 Self::Bytes(value) => ::fidl_next::wire::Union::encode_as::<
771 ___E,
772 ::fidl_next::wire::Vector<'static, u8>,
773 >(value, 1, encoder, raw, (32768, ()))?,
774
775 Self::Buffer(value) => ::fidl_next::wire::Union::encode_as::<
776 ___E,
777 ::fidl_next::wire::fuchsia::Vmo,
778 >(value, 2, encoder, raw, ())?,
779
780 Self::UnknownOrdinal_(ordinal) => {
781 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
782 }
783 }
784
785 Ok(())
786 }
787 }
788
789 unsafe impl<___E>
790 ::fidl_next::EncodeOption<crate::wire_optional::ExtendedAttributeValue<'static>, ___E>
791 for ExtendedAttributeValue
792 where
793 ___E: ?Sized,
794 ExtendedAttributeValue:
795 ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
796 {
797 #[inline]
798 fn encode_option(
799 this: ::core::option::Option<Self>,
800 encoder: &mut ___E,
801 out: &mut ::core::mem::MaybeUninit<
802 crate::wire_optional::ExtendedAttributeValue<'static>,
803 >,
804 _: (),
805 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
806 ::fidl_next::munge!(let crate::wire_optional::ExtendedAttributeValue { raw, _phantom: _ } = &mut *out);
807
808 if let Some(inner) = this {
809 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
810 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
811 } else {
812 ::fidl_next::wire::Union::encode_absent(raw);
813 }
814
815 Ok(())
816 }
817 }
818
819 impl<'de> ::fidl_next::FromWire<crate::wire::ExtendedAttributeValue<'de>>
820 for ExtendedAttributeValue
821 {
822 #[inline]
823 fn from_wire(wire: crate::wire::ExtendedAttributeValue<'de>) -> Self {
824 let wire = ::core::mem::ManuallyDrop::new(wire);
825 match wire.raw.ordinal() {
826 1 => Self::Bytes(::fidl_next::FromWire::from_wire(unsafe {
827 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
828 })),
829
830 2 => Self::Buffer(::fidl_next::FromWire::from_wire(unsafe {
831 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
832 })),
833
834 ord => return Self::UnknownOrdinal_(ord as u64),
835 }
836 }
837 }
838
839 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
840 for ExtendedAttributeValue
841 {
842 #[inline]
843 fn from_wire_option(
844 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
845 ) -> ::core::option::Option<Self> {
846 if let Some(inner) = wire.into_option() {
847 Some(::fidl_next::FromWire::from_wire(inner))
848 } else {
849 None
850 }
851 }
852 }
853
854 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
855 for Box<ExtendedAttributeValue>
856 {
857 #[inline]
858 fn from_wire_option(
859 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
860 ) -> ::core::option::Option<Self> {
861 <ExtendedAttributeValue as ::fidl_next::FromWireOption<
862 crate::wire_optional::ExtendedAttributeValue<'de>,
863 >>::from_wire_option(wire)
864 .map(Box::new)
865 }
866 }
867
868 #[derive(Debug, PartialEq)]
869 pub struct NodeSetExtendedAttributeRequest {
870 pub name: ::std::vec::Vec<u8>,
871
872 pub value: crate::natural::ExtendedAttributeValue,
873
874 pub mode: crate::natural::SetExtendedAttributeMode,
875 }
876
877 unsafe impl<___E>
878 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
879 for NodeSetExtendedAttributeRequest
880 where
881 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
882 ___E: ::fidl_next::Encoder,
883 ___E: ::fidl_next::fuchsia::HandleEncoder,
884 {
885 #[inline]
886 fn encode(
887 self,
888 encoder_: &mut ___E,
889 out_: &mut ::core::mem::MaybeUninit<
890 crate::wire::NodeSetExtendedAttributeRequest<'static>,
891 >,
892 _: (),
893 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
894 ::fidl_next::munge! {
895 let crate::wire::NodeSetExtendedAttributeRequest {
896 name,
897 value,
898 mode,
899
900 } = out_;
901 }
902
903 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
904
905 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
906 ::fidl_next::Constrained::validate(_field, (255, ()))?;
907
908 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
909
910 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
911
912 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
913
914 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
915
916 Ok(())
917 }
918 }
919
920 unsafe impl<___E>
921 ::fidl_next::EncodeOption<
922 ::fidl_next::wire::Box<'static, crate::wire::NodeSetExtendedAttributeRequest<'static>>,
923 ___E,
924 > for NodeSetExtendedAttributeRequest
925 where
926 ___E: ::fidl_next::Encoder + ?Sized,
927 NodeSetExtendedAttributeRequest:
928 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>,
929 {
930 #[inline]
931 fn encode_option(
932 this: ::core::option::Option<Self>,
933 encoder: &mut ___E,
934 out: &mut ::core::mem::MaybeUninit<
935 ::fidl_next::wire::Box<
936 'static,
937 crate::wire::NodeSetExtendedAttributeRequest<'static>,
938 >,
939 >,
940 _: (),
941 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
942 if let Some(inner) = this {
943 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
944 ::fidl_next::wire::Box::encode_present(out);
945 } else {
946 ::fidl_next::wire::Box::encode_absent(out);
947 }
948
949 Ok(())
950 }
951 }
952
953 impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetExtendedAttributeRequest<'de>>
954 for NodeSetExtendedAttributeRequest
955 {
956 #[inline]
957 fn from_wire(wire: crate::wire::NodeSetExtendedAttributeRequest<'de>) -> Self {
958 Self {
959 name: ::fidl_next::FromWire::from_wire(wire.name),
960
961 value: ::fidl_next::FromWire::from_wire(wire.value),
962
963 mode: ::fidl_next::FromWire::from_wire(wire.mode),
964 }
965 }
966 }
967
968 #[doc = " Auxiliary data for the file representation of a node.\n"]
969 #[derive(Debug, Default, PartialEq)]
970 pub struct FileInfo {
971 pub is_append: ::core::option::Option<bool>,
972
973 pub observer: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
974
975 pub stream: ::core::option::Option<::fidl_next::fuchsia::zx::Stream>,
976
977 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
978 }
979
980 impl FileInfo {
981 fn __max_ordinal(&self) -> usize {
982 if self.attributes.is_some() {
983 return 4;
984 }
985
986 if self.stream.is_some() {
987 return 3;
988 }
989
990 if self.observer.is_some() {
991 return 2;
992 }
993
994 if self.is_append.is_some() {
995 return 1;
996 }
997
998 0
999 }
1000 }
1001
1002 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileInfo<'static>, ___E> for FileInfo
1003 where
1004 ___E: ::fidl_next::Encoder + ?Sized,
1005 ___E: ::fidl_next::fuchsia::HandleEncoder,
1006 {
1007 #[inline]
1008 fn encode(
1009 mut self,
1010 encoder: &mut ___E,
1011 out: &mut ::core::mem::MaybeUninit<crate::wire::FileInfo<'static>>,
1012 _: (),
1013 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1014 ::fidl_next::munge!(let crate::wire::FileInfo { table } = out);
1015
1016 let max_ord = self.__max_ordinal();
1017
1018 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1019 ::fidl_next::Wire::zero_padding(&mut out);
1020
1021 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1022 ::fidl_next::wire::Envelope,
1023 >(encoder, max_ord);
1024
1025 for i in 1..=max_ord {
1026 match i {
1027 4 => {
1028 if let Some(value) = self.attributes.take() {
1029 ::fidl_next::wire::Envelope::encode_value::<
1030 crate::wire::NodeAttributes2<'static>,
1031 ___E,
1032 >(
1033 value, preallocated.encoder, &mut out, ()
1034 )?;
1035 } else {
1036 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1037 }
1038 }
1039
1040 3 => {
1041 if let Some(value) = self.stream.take() {
1042 ::fidl_next::wire::Envelope::encode_value::<
1043 ::fidl_next::wire::fuchsia::Stream,
1044 ___E,
1045 >(
1046 value, preallocated.encoder, &mut out, ()
1047 )?;
1048 } else {
1049 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1050 }
1051 }
1052
1053 2 => {
1054 if let Some(value) = self.observer.take() {
1055 ::fidl_next::wire::Envelope::encode_value::<
1056 ::fidl_next::wire::fuchsia::Event,
1057 ___E,
1058 >(
1059 value, preallocated.encoder, &mut out, ()
1060 )?;
1061 } else {
1062 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1063 }
1064 }
1065
1066 1 => {
1067 if let Some(value) = self.is_append.take() {
1068 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1069 value,
1070 preallocated.encoder,
1071 &mut out,
1072 (),
1073 )?;
1074 } else {
1075 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1076 }
1077 }
1078
1079 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1080 }
1081 unsafe {
1082 preallocated.write_next(out.assume_init_ref());
1083 }
1084 }
1085
1086 ::fidl_next::wire::Table::encode_len(table, max_ord);
1087
1088 Ok(())
1089 }
1090 }
1091
1092 impl<'de> ::fidl_next::FromWire<crate::wire::FileInfo<'de>> for FileInfo {
1093 #[inline]
1094 fn from_wire(wire_: crate::wire::FileInfo<'de>) -> Self {
1095 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1096
1097 let is_append = wire_.table.get(1);
1098
1099 let observer = wire_.table.get(2);
1100
1101 let stream = wire_.table.get(3);
1102
1103 let attributes = wire_.table.get(4);
1104
1105 Self {
1106 is_append: is_append.map(|envelope| {
1107 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1108 }),
1109
1110 observer: observer.map(|envelope| {
1111 ::fidl_next::FromWire::from_wire(unsafe {
1112 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
1113 })
1114 }),
1115
1116 stream: stream.map(|envelope| {
1117 ::fidl_next::FromWire::from_wire(unsafe {
1118 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Stream>()
1119 })
1120 }),
1121
1122 attributes: attributes.map(|envelope| {
1123 ::fidl_next::FromWire::from_wire(unsafe {
1124 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
1125 })
1126 }),
1127 }
1128 }
1129 }
1130
1131 #[derive(Debug, PartialEq)]
1132 pub enum Representation {
1133 Node(crate::natural::NodeInfo),
1134
1135 Directory(crate::natural::DirectoryInfo),
1136
1137 File(crate::natural::FileInfo),
1138
1139 Symlink(crate::natural::SymlinkInfo),
1140
1141 UnknownOrdinal_(u64),
1142 }
1143
1144 impl Representation {
1145 pub fn is_unknown(&self) -> bool {
1146 #[allow(unreachable_patterns)]
1147 match self {
1148 Self::UnknownOrdinal_(_) => true,
1149 _ => false,
1150 }
1151 }
1152 }
1153
1154 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Representation<'static>, ___E> for Representation
1155 where
1156 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1157 ___E: ::fidl_next::Encoder,
1158 ___E: ::fidl_next::fuchsia::HandleEncoder,
1159 {
1160 #[inline]
1161 fn encode(
1162 self,
1163 encoder: &mut ___E,
1164 out: &mut ::core::mem::MaybeUninit<crate::wire::Representation<'static>>,
1165 _: (),
1166 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1167 ::fidl_next::munge!(let crate::wire::Representation { raw, _phantom: _ } = out);
1168
1169 match self {
1170 Self::Node(value) => ::fidl_next::wire::Union::encode_as::<
1171 ___E,
1172 crate::wire::NodeInfo<'static>,
1173 >(value, 1, encoder, raw, ())?,
1174
1175 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
1176 ___E,
1177 crate::wire::DirectoryInfo<'static>,
1178 >(value, 2, encoder, raw, ())?,
1179
1180 Self::File(value) => ::fidl_next::wire::Union::encode_as::<
1181 ___E,
1182 crate::wire::FileInfo<'static>,
1183 >(value, 3, encoder, raw, ())?,
1184
1185 Self::Symlink(value) => ::fidl_next::wire::Union::encode_as::<
1186 ___E,
1187 crate::wire::SymlinkInfo<'static>,
1188 >(value, 4, encoder, raw, ())?,
1189
1190 Self::UnknownOrdinal_(ordinal) => {
1191 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1192 }
1193 }
1194
1195 Ok(())
1196 }
1197 }
1198
1199 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Representation<'static>, ___E>
1200 for Representation
1201 where
1202 ___E: ?Sized,
1203 Representation: ::fidl_next::Encode<crate::wire::Representation<'static>, ___E>,
1204 {
1205 #[inline]
1206 fn encode_option(
1207 this: ::core::option::Option<Self>,
1208 encoder: &mut ___E,
1209 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Representation<'static>>,
1210 _: (),
1211 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1212 ::fidl_next::munge!(let crate::wire_optional::Representation { raw, _phantom: _ } = &mut *out);
1213
1214 if let Some(inner) = this {
1215 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1216 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1217 } else {
1218 ::fidl_next::wire::Union::encode_absent(raw);
1219 }
1220
1221 Ok(())
1222 }
1223 }
1224
1225 impl<'de> ::fidl_next::FromWire<crate::wire::Representation<'de>> for Representation {
1226 #[inline]
1227 fn from_wire(wire: crate::wire::Representation<'de>) -> Self {
1228 let wire = ::core::mem::ManuallyDrop::new(wire);
1229 match wire.raw.ordinal() {
1230 1 => Self::Node(::fidl_next::FromWire::from_wire(unsafe {
1231 wire.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>()
1232 })),
1233
1234 2 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
1235 wire.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
1236 })),
1237
1238 3 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
1239 wire.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>()
1240 })),
1241
1242 4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
1243 wire.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>()
1244 })),
1245
1246 ord => return Self::UnknownOrdinal_(ord as u64),
1247 }
1248 }
1249 }
1250
1251 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1252 for Representation
1253 {
1254 #[inline]
1255 fn from_wire_option(
1256 wire: crate::wire_optional::Representation<'de>,
1257 ) -> ::core::option::Option<Self> {
1258 if let Some(inner) = wire.into_option() {
1259 Some(::fidl_next::FromWire::from_wire(inner))
1260 } else {
1261 None
1262 }
1263 }
1264 }
1265
1266 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1267 for Box<Representation>
1268 {
1269 #[inline]
1270 fn from_wire_option(
1271 wire: crate::wire_optional::Representation<'de>,
1272 ) -> ::core::option::Option<Self> {
1273 <Representation as ::fidl_next::FromWireOption<
1274 crate::wire_optional::Representation<'de>,
1275 >>::from_wire_option(wire)
1276 .map(Box::new)
1277 }
1278 }
1279
1280 #[derive(Debug, PartialEq)]
1281 pub struct DirectoryOpenRequest {
1282 pub path: ::std::string::String,
1283
1284 pub flags: crate::natural::Flags,
1285
1286 pub options: crate::natural::Options,
1287
1288 pub object: ::fidl_next::fuchsia::zx::Channel,
1289 }
1290
1291 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryOpenRequest<'static>, ___E>
1292 for DirectoryOpenRequest
1293 where
1294 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1295 ___E: ::fidl_next::Encoder,
1296 ___E: ::fidl_next::fuchsia::HandleEncoder,
1297 {
1298 #[inline]
1299 fn encode(
1300 self,
1301 encoder_: &mut ___E,
1302 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryOpenRequest<'static>>,
1303 _: (),
1304 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1305 ::fidl_next::munge! {
1306 let crate::wire::DirectoryOpenRequest {
1307 path,
1308 flags,
1309 options,
1310 object,
1311
1312 } = out_;
1313 }
1314
1315 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
1316
1317 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
1318 ::fidl_next::Constrained::validate(_field, 4095)?;
1319
1320 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1321
1322 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1323
1324 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
1325
1326 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
1327
1328 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1329
1330 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1331
1332 Ok(())
1333 }
1334 }
1335
1336 unsafe impl<___E>
1337 ::fidl_next::EncodeOption<
1338 ::fidl_next::wire::Box<'static, crate::wire::DirectoryOpenRequest<'static>>,
1339 ___E,
1340 > for DirectoryOpenRequest
1341 where
1342 ___E: ::fidl_next::Encoder + ?Sized,
1343 DirectoryOpenRequest: ::fidl_next::Encode<crate::wire::DirectoryOpenRequest<'static>, ___E>,
1344 {
1345 #[inline]
1346 fn encode_option(
1347 this: ::core::option::Option<Self>,
1348 encoder: &mut ___E,
1349 out: &mut ::core::mem::MaybeUninit<
1350 ::fidl_next::wire::Box<'static, crate::wire::DirectoryOpenRequest<'static>>,
1351 >,
1352 _: (),
1353 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1354 if let Some(inner) = this {
1355 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1356 ::fidl_next::wire::Box::encode_present(out);
1357 } else {
1358 ::fidl_next::wire::Box::encode_absent(out);
1359 }
1360
1361 Ok(())
1362 }
1363 }
1364
1365 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryOpenRequest<'de>> for DirectoryOpenRequest {
1366 #[inline]
1367 fn from_wire(wire: crate::wire::DirectoryOpenRequest<'de>) -> Self {
1368 Self {
1369 path: ::fidl_next::FromWire::from_wire(wire.path),
1370
1371 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1372
1373 options: ::fidl_next::FromWire::from_wire(wire.options),
1374
1375 object: ::fidl_next::FromWire::from_wire(wire.object),
1376 }
1377 }
1378 }
1379
1380 #[derive(Debug, PartialEq)]
1381 #[repr(C)]
1382 pub struct NodeDeprecatedCloneRequest {
1383 pub flags: crate::natural::OpenFlags,
1384
1385 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1386 }
1387
1388 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
1389 for NodeDeprecatedCloneRequest
1390 where
1391 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1392 ___E: ::fidl_next::fuchsia::HandleEncoder,
1393 {
1394 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1395 Self,
1396 crate::wire::NodeDeprecatedCloneRequest,
1397 > = unsafe {
1398 ::fidl_next::CopyOptimization::enable_if(
1399 true
1400
1401 && <
1402 crate::natural::OpenFlags as ::fidl_next::Encode<crate::wire::OpenFlags, ___E>
1403 >::COPY_OPTIMIZATION.is_enabled()
1404
1405 && <
1406 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>, ___E>
1407 >::COPY_OPTIMIZATION.is_enabled()
1408
1409 )
1410 };
1411
1412 #[inline]
1413 fn encode(
1414 self,
1415 encoder_: &mut ___E,
1416 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
1417 _: (),
1418 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1419 ::fidl_next::munge! {
1420 let crate::wire::NodeDeprecatedCloneRequest {
1421 flags,
1422 object,
1423
1424 } = out_;
1425 }
1426
1427 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1428
1429 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1430
1431 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1432
1433 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1434
1435 Ok(())
1436 }
1437 }
1438
1439 unsafe impl<___E>
1440 ::fidl_next::EncodeOption<
1441 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1442 ___E,
1443 > for NodeDeprecatedCloneRequest
1444 where
1445 ___E: ::fidl_next::Encoder + ?Sized,
1446 NodeDeprecatedCloneRequest:
1447 ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>,
1448 {
1449 #[inline]
1450 fn encode_option(
1451 this: ::core::option::Option<Self>,
1452 encoder: &mut ___E,
1453 out: &mut ::core::mem::MaybeUninit<
1454 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1455 >,
1456 _: (),
1457 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1458 if let Some(inner) = this {
1459 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1460 ::fidl_next::wire::Box::encode_present(out);
1461 } else {
1462 ::fidl_next::wire::Box::encode_absent(out);
1463 }
1464
1465 Ok(())
1466 }
1467 }
1468
1469 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedCloneRequest> for NodeDeprecatedCloneRequest {
1470 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1471 crate::wire::NodeDeprecatedCloneRequest,
1472 Self,
1473 > = unsafe {
1474 ::fidl_next::CopyOptimization::enable_if(
1475 true
1476
1477 && <
1478 crate::natural::OpenFlags as ::fidl_next::FromWire<crate::wire::OpenFlags>
1479 >::COPY_OPTIMIZATION.is_enabled()
1480
1481 && <
1482 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>>
1483 >::COPY_OPTIMIZATION.is_enabled()
1484
1485 )
1486 };
1487
1488 #[inline]
1489 fn from_wire(wire: crate::wire::NodeDeprecatedCloneRequest) -> Self {
1490 Self {
1491 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1492
1493 object: ::fidl_next::FromWire::from_wire(wire.object),
1494 }
1495 }
1496 }
1497
1498 #[derive(Debug, PartialEq)]
1499 pub struct DirectoryDeprecatedOpenRequest {
1500 pub flags: crate::natural::OpenFlags,
1501
1502 pub mode: crate::natural::ModeType,
1503
1504 pub path: ::std::string::String,
1505
1506 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1507 }
1508
1509 unsafe impl<___E>
1510 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
1511 for DirectoryDeprecatedOpenRequest
1512 where
1513 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1514 ___E: ::fidl_next::Encoder,
1515 ___E: ::fidl_next::fuchsia::HandleEncoder,
1516 {
1517 #[inline]
1518 fn encode(
1519 self,
1520 encoder_: &mut ___E,
1521 out_: &mut ::core::mem::MaybeUninit<
1522 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
1523 >,
1524 _: (),
1525 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1526 ::fidl_next::munge! {
1527 let crate::wire::DirectoryDeprecatedOpenRequest {
1528 flags,
1529 mode,
1530 path,
1531 object,
1532
1533 } = out_;
1534 }
1535
1536 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1537
1538 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1539
1540 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
1541
1542 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1543
1544 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
1545
1546 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
1547 ::fidl_next::Constrained::validate(_field, 4095)?;
1548
1549 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1550
1551 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1552
1553 Ok(())
1554 }
1555 }
1556
1557 unsafe impl<___E>
1558 ::fidl_next::EncodeOption<
1559 ::fidl_next::wire::Box<'static, crate::wire::DirectoryDeprecatedOpenRequest<'static>>,
1560 ___E,
1561 > for DirectoryDeprecatedOpenRequest
1562 where
1563 ___E: ::fidl_next::Encoder + ?Sized,
1564 DirectoryDeprecatedOpenRequest:
1565 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>,
1566 {
1567 #[inline]
1568 fn encode_option(
1569 this: ::core::option::Option<Self>,
1570 encoder: &mut ___E,
1571 out: &mut ::core::mem::MaybeUninit<
1572 ::fidl_next::wire::Box<
1573 'static,
1574 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
1575 >,
1576 >,
1577 _: (),
1578 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1579 if let Some(inner) = this {
1580 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1581 ::fidl_next::wire::Box::encode_present(out);
1582 } else {
1583 ::fidl_next::wire::Box::encode_absent(out);
1584 }
1585
1586 Ok(())
1587 }
1588 }
1589
1590 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryDeprecatedOpenRequest<'de>>
1591 for DirectoryDeprecatedOpenRequest
1592 {
1593 #[inline]
1594 fn from_wire(wire: crate::wire::DirectoryDeprecatedOpenRequest<'de>) -> Self {
1595 Self {
1596 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1597
1598 mode: ::fidl_next::FromWire::from_wire(wire.mode),
1599
1600 path: ::fidl_next::FromWire::from_wire(wire.path),
1601
1602 object: ::fidl_next::FromWire::from_wire(wire.object),
1603 }
1604 }
1605 }
1606
1607 #[derive(Debug, PartialEq)]
1608 pub struct DirectoryCreateSymlinkRequest {
1609 pub name: ::std::string::String,
1610
1611 pub target: ::std::vec::Vec<u8>,
1612
1613 pub connection: ::core::option::Option<
1614 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::fuchsia::zx::Channel>,
1615 >,
1616 }
1617
1618 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
1619 for DirectoryCreateSymlinkRequest
1620 where
1621 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1622 ___E: ::fidl_next::Encoder,
1623 ___E: ::fidl_next::fuchsia::HandleEncoder,
1624 {
1625 #[inline]
1626 fn encode(
1627 self,
1628 encoder_: &mut ___E,
1629 out_: &mut ::core::mem::MaybeUninit<
1630 crate::wire::DirectoryCreateSymlinkRequest<'static>,
1631 >,
1632 _: (),
1633 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1634 ::fidl_next::munge! {
1635 let crate::wire::DirectoryCreateSymlinkRequest {
1636 name,
1637 target,
1638 connection,
1639
1640 } = out_;
1641 }
1642
1643 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
1644
1645 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
1646 ::fidl_next::Constrained::validate(_field, 255)?;
1647
1648 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
1649
1650 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
1651 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
1652
1653 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
1654
1655 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(connection.as_mut_ptr()) };
1656
1657 Ok(())
1658 }
1659 }
1660
1661 unsafe impl<___E>
1662 ::fidl_next::EncodeOption<
1663 ::fidl_next::wire::Box<'static, crate::wire::DirectoryCreateSymlinkRequest<'static>>,
1664 ___E,
1665 > for DirectoryCreateSymlinkRequest
1666 where
1667 ___E: ::fidl_next::Encoder + ?Sized,
1668 DirectoryCreateSymlinkRequest:
1669 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>,
1670 {
1671 #[inline]
1672 fn encode_option(
1673 this: ::core::option::Option<Self>,
1674 encoder: &mut ___E,
1675 out: &mut ::core::mem::MaybeUninit<
1676 ::fidl_next::wire::Box<
1677 'static,
1678 crate::wire::DirectoryCreateSymlinkRequest<'static>,
1679 >,
1680 >,
1681 _: (),
1682 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1683 if let Some(inner) = this {
1684 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1685 ::fidl_next::wire::Box::encode_present(out);
1686 } else {
1687 ::fidl_next::wire::Box::encode_absent(out);
1688 }
1689
1690 Ok(())
1691 }
1692 }
1693
1694 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryCreateSymlinkRequest<'de>>
1695 for DirectoryCreateSymlinkRequest
1696 {
1697 #[inline]
1698 fn from_wire(wire: crate::wire::DirectoryCreateSymlinkRequest<'de>) -> Self {
1699 Self {
1700 name: ::fidl_next::FromWire::from_wire(wire.name),
1701
1702 target: ::fidl_next::FromWire::from_wire(wire.target),
1703
1704 connection: ::fidl_next::FromWire::from_wire(wire.connection),
1705 }
1706 }
1707 }
1708
1709 #[derive(Debug, PartialEq)]
1710 #[repr(C)]
1711 pub struct FileGetBackingMemoryResponse {
1712 pub vmo: ::fidl_next::fuchsia::zx::Vmo,
1713 }
1714
1715 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
1716 for FileGetBackingMemoryResponse
1717 where
1718 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1719 ___E: ::fidl_next::fuchsia::HandleEncoder,
1720 {
1721 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1722 Self,
1723 crate::wire::FileGetBackingMemoryResponse,
1724 > = unsafe {
1725 ::fidl_next::CopyOptimization::enable_if(
1726 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::Encode<
1727 ::fidl_next::wire::fuchsia::Vmo,
1728 ___E,
1729 >>::COPY_OPTIMIZATION
1730 .is_enabled(),
1731 )
1732 };
1733
1734 #[inline]
1735 fn encode(
1736 self,
1737 encoder_: &mut ___E,
1738 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
1739 _: (),
1740 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1741 ::fidl_next::munge! {
1742 let crate::wire::FileGetBackingMemoryResponse {
1743 vmo,
1744
1745 } = out_;
1746 }
1747
1748 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
1749
1750 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo.as_mut_ptr()) };
1751
1752 Ok(())
1753 }
1754 }
1755
1756 unsafe impl<___E>
1757 ::fidl_next::EncodeOption<
1758 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryResponse>,
1759 ___E,
1760 > for FileGetBackingMemoryResponse
1761 where
1762 ___E: ::fidl_next::Encoder + ?Sized,
1763 FileGetBackingMemoryResponse:
1764 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>,
1765 {
1766 #[inline]
1767 fn encode_option(
1768 this: ::core::option::Option<Self>,
1769 encoder: &mut ___E,
1770 out: &mut ::core::mem::MaybeUninit<
1771 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryResponse>,
1772 >,
1773 _: (),
1774 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1775 if let Some(inner) = this {
1776 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1777 ::fidl_next::wire::Box::encode_present(out);
1778 } else {
1779 ::fidl_next::wire::Box::encode_absent(out);
1780 }
1781
1782 Ok(())
1783 }
1784 }
1785
1786 impl ::fidl_next::FromWire<crate::wire::FileGetBackingMemoryResponse>
1787 for FileGetBackingMemoryResponse
1788 {
1789 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1790 crate::wire::FileGetBackingMemoryResponse,
1791 Self,
1792 > = unsafe {
1793 ::fidl_next::CopyOptimization::enable_if(
1794 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::FromWire<
1795 ::fidl_next::wire::fuchsia::Vmo,
1796 >>::COPY_OPTIMIZATION
1797 .is_enabled(),
1798 )
1799 };
1800
1801 #[inline]
1802 fn from_wire(wire: crate::wire::FileGetBackingMemoryResponse) -> Self {
1803 Self { vmo: ::fidl_next::FromWire::from_wire(wire.vmo) }
1804 }
1805 }
1806
1807 #[derive(Debug, PartialEq)]
1808 pub struct LinkableLinkIntoRequest {
1809 pub dst_parent_token: ::fidl_next::fuchsia::zx::Event,
1810
1811 pub dst: ::std::string::String,
1812 }
1813
1814 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
1815 for LinkableLinkIntoRequest
1816 where
1817 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1818 ___E: ::fidl_next::Encoder,
1819 ___E: ::fidl_next::fuchsia::HandleEncoder,
1820 {
1821 #[inline]
1822 fn encode(
1823 self,
1824 encoder_: &mut ___E,
1825 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
1826 _: (),
1827 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1828 ::fidl_next::munge! {
1829 let crate::wire::LinkableLinkIntoRequest {
1830 dst_parent_token,
1831 dst,
1832
1833 } = out_;
1834 }
1835
1836 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
1837
1838 let mut _field =
1839 unsafe { ::fidl_next::Slot::new_unchecked(dst_parent_token.as_mut_ptr()) };
1840
1841 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
1842
1843 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dst.as_mut_ptr()) };
1844 ::fidl_next::Constrained::validate(_field, 255)?;
1845
1846 Ok(())
1847 }
1848 }
1849
1850 unsafe impl<___E>
1851 ::fidl_next::EncodeOption<
1852 ::fidl_next::wire::Box<'static, crate::wire::LinkableLinkIntoRequest<'static>>,
1853 ___E,
1854 > for LinkableLinkIntoRequest
1855 where
1856 ___E: ::fidl_next::Encoder + ?Sized,
1857 LinkableLinkIntoRequest:
1858 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>,
1859 {
1860 #[inline]
1861 fn encode_option(
1862 this: ::core::option::Option<Self>,
1863 encoder: &mut ___E,
1864 out: &mut ::core::mem::MaybeUninit<
1865 ::fidl_next::wire::Box<'static, crate::wire::LinkableLinkIntoRequest<'static>>,
1866 >,
1867 _: (),
1868 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1869 if let Some(inner) = this {
1870 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1871 ::fidl_next::wire::Box::encode_present(out);
1872 } else {
1873 ::fidl_next::wire::Box::encode_absent(out);
1874 }
1875
1876 Ok(())
1877 }
1878 }
1879
1880 impl<'de> ::fidl_next::FromWire<crate::wire::LinkableLinkIntoRequest<'de>>
1881 for LinkableLinkIntoRequest
1882 {
1883 #[inline]
1884 fn from_wire(wire: crate::wire::LinkableLinkIntoRequest<'de>) -> Self {
1885 Self {
1886 dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
1887
1888 dst: ::fidl_next::FromWire::from_wire(wire.dst),
1889 }
1890 }
1891 }
1892
1893 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1894 pub struct FileAllocateRequest {
1895 pub offset: u64,
1896
1897 pub length: u64,
1898
1899 pub mode: crate::natural::AllocateMode,
1900 }
1901
1902 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
1903 for FileAllocateRequest
1904 where
1905 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1906 ___E: ::fidl_next::fuchsia::HandleEncoder,
1907 {
1908 #[inline]
1909 fn encode(
1910 self,
1911 encoder_: &mut ___E,
1912 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
1913 _: (),
1914 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1915 ::fidl_next::munge! {
1916 let crate::wire::FileAllocateRequest {
1917 offset,
1918 length,
1919 mode,
1920
1921 } = out_;
1922 }
1923
1924 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
1925
1926 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
1927
1928 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
1929
1930 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
1931
1932 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
1933
1934 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1935
1936 Ok(())
1937 }
1938 }
1939
1940 unsafe impl<___E>
1941 ::fidl_next::EncodeOption<
1942 ::fidl_next::wire::Box<'static, crate::wire::FileAllocateRequest>,
1943 ___E,
1944 > for FileAllocateRequest
1945 where
1946 ___E: ::fidl_next::Encoder + ?Sized,
1947 FileAllocateRequest: ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>,
1948 {
1949 #[inline]
1950 fn encode_option(
1951 this: ::core::option::Option<Self>,
1952 encoder: &mut ___E,
1953 out: &mut ::core::mem::MaybeUninit<
1954 ::fidl_next::wire::Box<'static, crate::wire::FileAllocateRequest>,
1955 >,
1956 _: (),
1957 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1958 if let Some(inner) = this {
1959 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1960 ::fidl_next::wire::Box::encode_present(out);
1961 } else {
1962 ::fidl_next::wire::Box::encode_absent(out);
1963 }
1964
1965 Ok(())
1966 }
1967 }
1968
1969 impl ::fidl_next::FromWire<crate::wire::FileAllocateRequest> for FileAllocateRequest {
1970 #[inline]
1971 fn from_wire(wire: crate::wire::FileAllocateRequest) -> Self {
1972 Self {
1973 offset: ::fidl_next::FromWire::from_wire(wire.offset),
1974
1975 length: ::fidl_next::FromWire::from_wire(wire.length),
1976
1977 mode: ::fidl_next::FromWire::from_wire(wire.mode),
1978 }
1979 }
1980 }
1981
1982 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1983 pub struct FileEnableVerityRequest {
1984 pub options: crate::natural::VerificationOptions,
1985 }
1986
1987 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
1988 for FileEnableVerityRequest
1989 where
1990 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1991 ___E: ::fidl_next::Encoder,
1992 ___E: ::fidl_next::fuchsia::HandleEncoder,
1993 {
1994 #[inline]
1995 fn encode(
1996 self,
1997 encoder_: &mut ___E,
1998 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
1999 _: (),
2000 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2001 ::fidl_next::munge! {
2002 let crate::wire::FileEnableVerityRequest {
2003 options,
2004
2005 } = out_;
2006 }
2007
2008 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
2009
2010 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2011
2012 Ok(())
2013 }
2014 }
2015
2016 unsafe impl<___E>
2017 ::fidl_next::EncodeOption<
2018 ::fidl_next::wire::Box<'static, crate::wire::FileEnableVerityRequest<'static>>,
2019 ___E,
2020 > for FileEnableVerityRequest
2021 where
2022 ___E: ::fidl_next::Encoder + ?Sized,
2023 FileEnableVerityRequest:
2024 ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>,
2025 {
2026 #[inline]
2027 fn encode_option(
2028 this: ::core::option::Option<Self>,
2029 encoder: &mut ___E,
2030 out: &mut ::core::mem::MaybeUninit<
2031 ::fidl_next::wire::Box<'static, crate::wire::FileEnableVerityRequest<'static>>,
2032 >,
2033 _: (),
2034 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2035 if let Some(inner) = this {
2036 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2037 ::fidl_next::wire::Box::encode_present(out);
2038 } else {
2039 ::fidl_next::wire::Box::encode_absent(out);
2040 }
2041
2042 Ok(())
2043 }
2044 }
2045
2046 impl<'de> ::fidl_next::FromWire<crate::wire::FileEnableVerityRequest<'de>>
2047 for FileEnableVerityRequest
2048 {
2049 #[inline]
2050 fn from_wire(wire: crate::wire::FileEnableVerityRequest<'de>) -> Self {
2051 Self { options: ::fidl_next::FromWire::from_wire(wire.options) }
2052 }
2053 }
2054
2055 #[derive(Debug, PartialEq)]
2056 #[repr(C)]
2057 pub struct FileObject {
2058 pub event: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
2059
2060 pub stream: ::core::option::Option<::fidl_next::fuchsia::zx::Stream>,
2061 }
2062
2063 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject
2064 where
2065 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2066 ___E: ::fidl_next::fuchsia::HandleEncoder,
2067 {
2068 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::FileObject> = unsafe {
2069 ::fidl_next::CopyOptimization::enable_if(
2070 true
2071
2072 && <
2073 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>
2074 >::COPY_OPTIMIZATION.is_enabled()
2075
2076 && <
2077 ::core::option::Option<::fidl_next::fuchsia::zx::Stream> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalStream, ___E>
2078 >::COPY_OPTIMIZATION.is_enabled()
2079
2080 )
2081 };
2082
2083 #[inline]
2084 fn encode(
2085 self,
2086 encoder_: &mut ___E,
2087 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
2088 _: (),
2089 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2090 ::fidl_next::munge! {
2091 let crate::wire::FileObject {
2092 event,
2093 stream,
2094
2095 } = out_;
2096 }
2097
2098 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
2099
2100 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
2101
2102 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
2103
2104 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(stream.as_mut_ptr()) };
2105
2106 Ok(())
2107 }
2108 }
2109
2110 unsafe impl<___E>
2111 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::FileObject>, ___E>
2112 for FileObject
2113 where
2114 ___E: ::fidl_next::Encoder + ?Sized,
2115 FileObject: ::fidl_next::Encode<crate::wire::FileObject, ___E>,
2116 {
2117 #[inline]
2118 fn encode_option(
2119 this: ::core::option::Option<Self>,
2120 encoder: &mut ___E,
2121 out: &mut ::core::mem::MaybeUninit<
2122 ::fidl_next::wire::Box<'static, crate::wire::FileObject>,
2123 >,
2124 _: (),
2125 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2126 if let Some(inner) = this {
2127 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2128 ::fidl_next::wire::Box::encode_present(out);
2129 } else {
2130 ::fidl_next::wire::Box::encode_absent(out);
2131 }
2132
2133 Ok(())
2134 }
2135 }
2136
2137 impl ::fidl_next::FromWire<crate::wire::FileObject> for FileObject {
2138 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::FileObject, Self> = unsafe {
2139 ::fidl_next::CopyOptimization::enable_if(
2140 true
2141
2142 && <
2143 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalEvent>
2144 >::COPY_OPTIMIZATION.is_enabled()
2145
2146 && <
2147 ::core::option::Option<::fidl_next::fuchsia::zx::Stream> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalStream>
2148 >::COPY_OPTIMIZATION.is_enabled()
2149
2150 )
2151 };
2152
2153 #[inline]
2154 fn from_wire(wire: crate::wire::FileObject) -> Self {
2155 Self {
2156 event: ::fidl_next::FromWire::from_wire(wire.event),
2157
2158 stream: ::fidl_next::FromWire::from_wire(wire.stream),
2159 }
2160 }
2161 }
2162
2163 #[derive(Debug, PartialEq)]
2164 pub enum NodeInfoDeprecated {
2165 Service(crate::natural::Service),
2166
2167 File(crate::natural::FileObject),
2168
2169 Directory(crate::natural::DirectoryObject),
2170
2171 Symlink(crate::natural::SymlinkObject),
2172 }
2173
2174 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeInfoDeprecated<'static>, ___E>
2175 for NodeInfoDeprecated
2176 where
2177 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2178 ___E: ::fidl_next::Encoder,
2179 ___E: ::fidl_next::fuchsia::HandleEncoder,
2180 {
2181 #[inline]
2182 fn encode(
2183 self,
2184 encoder: &mut ___E,
2185 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfoDeprecated<'static>>,
2186 _: (),
2187 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2188 ::fidl_next::munge!(let crate::wire::NodeInfoDeprecated { raw, _phantom: _ } = out);
2189
2190 match self {
2191 Self::Service(value) => ::fidl_next::wire::Union::encode_as::<
2192 ___E,
2193 crate::wire::Service,
2194 >(value, 1, encoder, raw, ())?,
2195
2196 Self::File(value) => ::fidl_next::wire::Union::encode_as::<
2197 ___E,
2198 crate::wire::FileObject,
2199 >(value, 2, encoder, raw, ())?,
2200
2201 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
2202 ___E,
2203 crate::wire::DirectoryObject,
2204 >(value, 3, encoder, raw, ())?,
2205
2206 Self::Symlink(value) => ::fidl_next::wire::Union::encode_as::<
2207 ___E,
2208 crate::wire::SymlinkObject<'static>,
2209 >(value, 4, encoder, raw, ())?,
2210 }
2211
2212 Ok(())
2213 }
2214 }
2215
2216 unsafe impl<___E>
2217 ::fidl_next::EncodeOption<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>
2218 for NodeInfoDeprecated
2219 where
2220 ___E: ?Sized,
2221 NodeInfoDeprecated: ::fidl_next::Encode<crate::wire::NodeInfoDeprecated<'static>, ___E>,
2222 {
2223 #[inline]
2224 fn encode_option(
2225 this: ::core::option::Option<Self>,
2226 encoder: &mut ___E,
2227 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::NodeInfoDeprecated<'static>>,
2228 _: (),
2229 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2230 ::fidl_next::munge!(let crate::wire_optional::NodeInfoDeprecated { raw, _phantom: _ } = &mut *out);
2231
2232 if let Some(inner) = this {
2233 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2234 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2235 } else {
2236 ::fidl_next::wire::Union::encode_absent(raw);
2237 }
2238
2239 Ok(())
2240 }
2241 }
2242
2243 impl<'de> ::fidl_next::FromWire<crate::wire::NodeInfoDeprecated<'de>> for NodeInfoDeprecated {
2244 #[inline]
2245 fn from_wire(wire: crate::wire::NodeInfoDeprecated<'de>) -> Self {
2246 let wire = ::core::mem::ManuallyDrop::new(wire);
2247 match wire.raw.ordinal() {
2248 1 => Self::Service(::fidl_next::FromWire::from_wire(unsafe {
2249 wire.raw.get().read_unchecked::<crate::wire::Service>()
2250 })),
2251
2252 2 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
2253 wire.raw.get().read_unchecked::<crate::wire::FileObject>()
2254 })),
2255
2256 3 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
2257 wire.raw.get().read_unchecked::<crate::wire::DirectoryObject>()
2258 })),
2259
2260 4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
2261 wire.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
2262 })),
2263
2264 _ => unsafe { ::core::hint::unreachable_unchecked() },
2265 }
2266 }
2267 }
2268
2269 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::NodeInfoDeprecated<'de>>
2270 for NodeInfoDeprecated
2271 {
2272 #[inline]
2273 fn from_wire_option(
2274 wire: crate::wire_optional::NodeInfoDeprecated<'de>,
2275 ) -> ::core::option::Option<Self> {
2276 if let Some(inner) = wire.into_option() {
2277 Some(::fidl_next::FromWire::from_wire(inner))
2278 } else {
2279 None
2280 }
2281 }
2282 }
2283
2284 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::NodeInfoDeprecated<'de>>
2285 for Box<NodeInfoDeprecated>
2286 {
2287 #[inline]
2288 fn from_wire_option(
2289 wire: crate::wire_optional::NodeInfoDeprecated<'de>,
2290 ) -> ::core::option::Option<Self> {
2291 <NodeInfoDeprecated as ::fidl_next::FromWireOption<
2292 crate::wire_optional::NodeInfoDeprecated<'de>,
2293 >>::from_wire_option(wire)
2294 .map(Box::new)
2295 }
2296 }
2297}
2298
2299pub mod wire {
2300
2301 pub use fidl_next_common_fuchsia_io::wire::*;
2302
2303 #[repr(C)]
2305 pub struct ConnectionInfo<'de> {
2306 pub(crate) table: ::fidl_next::wire::Table<'de>,
2307 }
2308
2309 impl<'de> Drop for ConnectionInfo<'de> {
2310 fn drop(&mut self) {
2311 let _ = self
2312 .table
2313 .get(1)
2314 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Operations>() });
2315 }
2316 }
2317
2318 impl ::fidl_next::Constrained for ConnectionInfo<'_> {
2319 type Constraint = ();
2320
2321 fn validate(
2322 _: ::fidl_next::Slot<'_, Self>,
2323 _: Self::Constraint,
2324 ) -> Result<(), ::fidl_next::ValidationError> {
2325 Ok(())
2326 }
2327 }
2328
2329 unsafe impl ::fidl_next::Wire for ConnectionInfo<'static> {
2330 type Narrowed<'de> = ConnectionInfo<'de>;
2331
2332 #[inline]
2333 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2334 ::fidl_next::munge!(let Self { table } = out);
2335 ::fidl_next::wire::Table::zero_padding(table);
2336 }
2337 }
2338
2339 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ConnectionInfo<'de>
2340 where
2341 ___D: ::fidl_next::Decoder<'de> + ?Sized,
2342 ___D: ::fidl_next::fuchsia::HandleDecoder,
2343 {
2344 fn decode(
2345 slot: ::fidl_next::Slot<'_, Self>,
2346 decoder: &mut ___D,
2347 _: (),
2348 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2349 ::fidl_next::munge!(let Self { table } = slot);
2350
2351 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2352 match ordinal {
2353 0 => unsafe { ::core::hint::unreachable_unchecked() },
2354
2355 1 => {
2356 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Operations>(
2357 slot.as_mut(),
2358 decoder,
2359 (),
2360 )?;
2361
2362 Ok(())
2363 }
2364
2365 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2366 }
2367 })
2368 }
2369 }
2370
2371 impl<'de> ConnectionInfo<'de> {
2372 pub fn rights(&self) -> ::core::option::Option<&crate::wire::Operations> {
2373 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2374 }
2375 }
2376
2377 impl<'de> ::core::fmt::Debug for ConnectionInfo<'de> {
2378 fn fmt(
2379 &self,
2380 f: &mut ::core::fmt::Formatter<'_>,
2381 ) -> ::core::result::Result<(), ::core::fmt::Error> {
2382 f.debug_struct("ConnectionInfo").field("rights", &self.rights()).finish()
2383 }
2384 }
2385
2386 impl<'de> ::fidl_next::IntoNatural for ConnectionInfo<'de> {
2387 type Natural = crate::natural::ConnectionInfo;
2388 }
2389
2390 #[derive(Debug)]
2392 #[repr(C)]
2393 pub struct DirectoryGetTokenResponse {
2394 pub s: ::fidl_next::wire::Int32,
2395
2396 pub token: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
2397 }
2398
2399 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryGetTokenResponse>(), 8);
2400 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryGetTokenResponse>(), 4);
2401
2402 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryGetTokenResponse, s), 0);
2403
2404 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryGetTokenResponse, token), 4);
2405
2406 impl ::fidl_next::Constrained for DirectoryGetTokenResponse {
2407 type Constraint = ();
2408
2409 fn validate(
2410 _: ::fidl_next::Slot<'_, Self>,
2411 _: Self::Constraint,
2412 ) -> Result<(), ::fidl_next::ValidationError> {
2413 Ok(())
2414 }
2415 }
2416
2417 unsafe impl ::fidl_next::Wire for DirectoryGetTokenResponse {
2418 type Narrowed<'de> = DirectoryGetTokenResponse;
2419
2420 #[inline]
2421 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2422 ::fidl_next::munge! {
2423 let Self {
2424 s,
2425 token,
2426
2427 } = &mut *out_;
2428 }
2429
2430 ::fidl_next::Wire::zero_padding(s);
2431
2432 ::fidl_next::Wire::zero_padding(token);
2433 }
2434 }
2435
2436 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryGetTokenResponse
2437 where
2438 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2439 ___D: ::fidl_next::fuchsia::HandleDecoder,
2440 {
2441 fn decode(
2442 slot_: ::fidl_next::Slot<'_, Self>,
2443 decoder_: &mut ___D,
2444 _: (),
2445 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2446 ::fidl_next::munge! {
2447 let Self {
2448 mut s,
2449 mut token,
2450
2451 } = slot_;
2452 }
2453
2454 let _field = s.as_mut();
2455
2456 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2457
2458 let _field = token.as_mut();
2459
2460 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
2461
2462 Ok(())
2463 }
2464 }
2465
2466 impl ::fidl_next::IntoNatural for DirectoryGetTokenResponse {
2467 type Natural = crate::natural::DirectoryGetTokenResponse;
2468 }
2469
2470 #[derive(Debug)]
2472 #[repr(C)]
2473 pub struct DirectoryLinkRequest<'de> {
2474 pub src: ::fidl_next::wire::String<'de>,
2475
2476 pub dst_parent_token: ::fidl_next::wire::fuchsia::NullableHandle,
2477
2478 pub dst: ::fidl_next::wire::String<'de>,
2479 }
2480
2481 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkRequest<'_>>(), 40);
2482 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkRequest<'_>>(), 8);
2483
2484 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, src), 0);
2485
2486 static_assertions::const_assert_eq!(
2487 std::mem::offset_of!(DirectoryLinkRequest<'_>, dst_parent_token),
2488 16
2489 );
2490
2491 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, dst), 24);
2492
2493 impl ::fidl_next::Constrained for DirectoryLinkRequest<'_> {
2494 type Constraint = ();
2495
2496 fn validate(
2497 _: ::fidl_next::Slot<'_, Self>,
2498 _: Self::Constraint,
2499 ) -> Result<(), ::fidl_next::ValidationError> {
2500 Ok(())
2501 }
2502 }
2503
2504 unsafe impl ::fidl_next::Wire for DirectoryLinkRequest<'static> {
2505 type Narrowed<'de> = DirectoryLinkRequest<'de>;
2506
2507 #[inline]
2508 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2509 ::fidl_next::munge! {
2510 let Self {
2511 src,
2512 dst_parent_token,
2513 dst,
2514
2515 } = &mut *out_;
2516 }
2517
2518 ::fidl_next::Wire::zero_padding(src);
2519
2520 ::fidl_next::Wire::zero_padding(dst_parent_token);
2521
2522 ::fidl_next::Wire::zero_padding(dst);
2523
2524 unsafe {
2525 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2526 }
2527 }
2528 }
2529
2530 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryLinkRequest<'de>
2531 where
2532 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2533 ___D: ::fidl_next::Decoder<'de>,
2534 ___D: ::fidl_next::fuchsia::HandleDecoder,
2535 {
2536 fn decode(
2537 slot_: ::fidl_next::Slot<'_, Self>,
2538 decoder_: &mut ___D,
2539 _: (),
2540 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2541 if slot_.as_bytes()[20..24] != [0u8; 4] {
2542 return Err(::fidl_next::DecodeError::InvalidPadding);
2543 }
2544
2545 ::fidl_next::munge! {
2546 let Self {
2547 mut src,
2548 mut dst_parent_token,
2549 mut dst,
2550
2551 } = slot_;
2552 }
2553
2554 let _field = src.as_mut();
2555 ::fidl_next::Constrained::validate(_field, 255)?;
2556 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2557
2558 let src = unsafe { src.deref_unchecked() };
2559
2560 if src.len() > 255 {
2561 return Err(::fidl_next::DecodeError::VectorTooLong {
2562 size: src.len() as u64,
2563 limit: 255,
2564 });
2565 }
2566
2567 let _field = dst_parent_token.as_mut();
2568
2569 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2570
2571 let _field = dst.as_mut();
2572 ::fidl_next::Constrained::validate(_field, 255)?;
2573 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2574
2575 let dst = unsafe { dst.deref_unchecked() };
2576
2577 if dst.len() > 255 {
2578 return Err(::fidl_next::DecodeError::VectorTooLong {
2579 size: dst.len() as u64,
2580 limit: 255,
2581 });
2582 }
2583
2584 Ok(())
2585 }
2586 }
2587
2588 impl<'de> ::fidl_next::IntoNatural for DirectoryLinkRequest<'de> {
2589 type Natural = crate::natural::DirectoryLinkRequest;
2590 }
2591
2592 pub type Token = ::fidl_next::wire::fuchsia::Event;
2594
2595 #[derive(Debug)]
2597 #[repr(C)]
2598 pub struct DirectoryRenameRequest<'de> {
2599 pub src: ::fidl_next::wire::String<'de>,
2600
2601 pub dst_parent_token: ::fidl_next::wire::fuchsia::Event,
2602
2603 pub dst: ::fidl_next::wire::String<'de>,
2604 }
2605
2606 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRenameRequest<'_>>(), 40);
2607 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRenameRequest<'_>>(), 8);
2608
2609 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, src), 0);
2610
2611 static_assertions::const_assert_eq!(
2612 std::mem::offset_of!(DirectoryRenameRequest<'_>, dst_parent_token),
2613 16
2614 );
2615
2616 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, dst), 24);
2617
2618 impl ::fidl_next::Constrained for DirectoryRenameRequest<'_> {
2619 type Constraint = ();
2620
2621 fn validate(
2622 _: ::fidl_next::Slot<'_, Self>,
2623 _: Self::Constraint,
2624 ) -> Result<(), ::fidl_next::ValidationError> {
2625 Ok(())
2626 }
2627 }
2628
2629 unsafe impl ::fidl_next::Wire for DirectoryRenameRequest<'static> {
2630 type Narrowed<'de> = DirectoryRenameRequest<'de>;
2631
2632 #[inline]
2633 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2634 ::fidl_next::munge! {
2635 let Self {
2636 src,
2637 dst_parent_token,
2638 dst,
2639
2640 } = &mut *out_;
2641 }
2642
2643 ::fidl_next::Wire::zero_padding(src);
2644
2645 ::fidl_next::Wire::zero_padding(dst_parent_token);
2646
2647 ::fidl_next::Wire::zero_padding(dst);
2648
2649 unsafe {
2650 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2651 }
2652 }
2653 }
2654
2655 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryRenameRequest<'de>
2656 where
2657 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2658 ___D: ::fidl_next::Decoder<'de>,
2659 ___D: ::fidl_next::fuchsia::HandleDecoder,
2660 {
2661 fn decode(
2662 slot_: ::fidl_next::Slot<'_, Self>,
2663 decoder_: &mut ___D,
2664 _: (),
2665 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2666 if slot_.as_bytes()[20..24] != [0u8; 4] {
2667 return Err(::fidl_next::DecodeError::InvalidPadding);
2668 }
2669
2670 ::fidl_next::munge! {
2671 let Self {
2672 mut src,
2673 mut dst_parent_token,
2674 mut dst,
2675
2676 } = slot_;
2677 }
2678
2679 let _field = src.as_mut();
2680 ::fidl_next::Constrained::validate(_field, 255)?;
2681 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2682
2683 let src = unsafe { src.deref_unchecked() };
2684
2685 if src.len() > 255 {
2686 return Err(::fidl_next::DecodeError::VectorTooLong {
2687 size: src.len() as u64,
2688 limit: 255,
2689 });
2690 }
2691
2692 let _field = dst_parent_token.as_mut();
2693
2694 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2695
2696 let _field = dst.as_mut();
2697 ::fidl_next::Constrained::validate(_field, 255)?;
2698 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2699
2700 let dst = unsafe { dst.deref_unchecked() };
2701
2702 if dst.len() > 255 {
2703 return Err(::fidl_next::DecodeError::VectorTooLong {
2704 size: dst.len() as u64,
2705 limit: 255,
2706 });
2707 }
2708
2709 Ok(())
2710 }
2711 }
2712
2713 impl<'de> ::fidl_next::IntoNatural for DirectoryRenameRequest<'de> {
2714 type Natural = crate::natural::DirectoryRenameRequest;
2715 }
2716
2717 #[derive(Debug)]
2719 #[repr(C)]
2720 pub struct DirectoryWatchRequest {
2721 pub mask: crate::wire::WatchMask,
2722
2723 pub options: ::fidl_next::wire::Uint32,
2724
2725 pub watcher:
2726 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::wire::fuchsia::Channel>,
2727 }
2728
2729 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchRequest>(), 12);
2730 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchRequest>(), 4);
2731
2732 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, mask), 0);
2733
2734 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, options), 4);
2735
2736 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, watcher), 8);
2737
2738 impl ::fidl_next::Constrained for DirectoryWatchRequest {
2739 type Constraint = ();
2740
2741 fn validate(
2742 _: ::fidl_next::Slot<'_, Self>,
2743 _: Self::Constraint,
2744 ) -> Result<(), ::fidl_next::ValidationError> {
2745 Ok(())
2746 }
2747 }
2748
2749 unsafe impl ::fidl_next::Wire for DirectoryWatchRequest {
2750 type Narrowed<'de> = DirectoryWatchRequest;
2751
2752 #[inline]
2753 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2754 ::fidl_next::munge! {
2755 let Self {
2756 mask,
2757 options,
2758 watcher,
2759
2760 } = &mut *out_;
2761 }
2762
2763 ::fidl_next::Wire::zero_padding(mask);
2764
2765 ::fidl_next::Wire::zero_padding(options);
2766
2767 ::fidl_next::Wire::zero_padding(watcher);
2768 }
2769 }
2770
2771 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchRequest
2772 where
2773 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2774 ___D: ::fidl_next::fuchsia::HandleDecoder,
2775 {
2776 fn decode(
2777 slot_: ::fidl_next::Slot<'_, Self>,
2778 decoder_: &mut ___D,
2779 _: (),
2780 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2781 ::fidl_next::munge! {
2782 let Self {
2783 mut mask,
2784 mut options,
2785 mut watcher,
2786
2787 } = slot_;
2788 }
2789
2790 let _field = mask.as_mut();
2791
2792 ::fidl_next::Decode::decode(mask.as_mut(), decoder_, ())?;
2793
2794 let _field = options.as_mut();
2795
2796 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
2797
2798 let _field = watcher.as_mut();
2799
2800 ::fidl_next::Decode::decode(watcher.as_mut(), decoder_, ())?;
2801
2802 Ok(())
2803 }
2804 }
2805
2806 impl ::fidl_next::IntoNatural for DirectoryWatchRequest {
2807 type Natural = crate::natural::DirectoryWatchRequest;
2808 }
2809
2810 #[derive(Debug)]
2812 #[repr(C)]
2813 pub struct NodeOnOpenRequest<'de> {
2814 pub s: ::fidl_next::wire::Int32,
2815
2816 pub info: crate::wire_optional::NodeInfoDeprecated<'de>,
2817 }
2818
2819 static_assertions::const_assert_eq!(std::mem::size_of::<NodeOnOpenRequest<'_>>(), 24);
2820 static_assertions::const_assert_eq!(std::mem::align_of::<NodeOnOpenRequest<'_>>(), 8);
2821
2822 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, s), 0);
2823
2824 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, info), 8);
2825
2826 impl ::fidl_next::Constrained for NodeOnOpenRequest<'_> {
2827 type Constraint = ();
2828
2829 fn validate(
2830 _: ::fidl_next::Slot<'_, Self>,
2831 _: Self::Constraint,
2832 ) -> Result<(), ::fidl_next::ValidationError> {
2833 Ok(())
2834 }
2835 }
2836
2837 unsafe impl ::fidl_next::Wire for NodeOnOpenRequest<'static> {
2838 type Narrowed<'de> = NodeOnOpenRequest<'de>;
2839
2840 #[inline]
2841 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2842 ::fidl_next::munge! {
2843 let Self {
2844 s,
2845 info,
2846
2847 } = &mut *out_;
2848 }
2849
2850 ::fidl_next::Wire::zero_padding(s);
2851
2852 ::fidl_next::Wire::zero_padding(info);
2853
2854 unsafe {
2855 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2856 }
2857 }
2858 }
2859
2860 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeOnOpenRequest<'de>
2861 where
2862 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2863 ___D: ::fidl_next::Decoder<'de>,
2864 ___D: ::fidl_next::fuchsia::HandleDecoder,
2865 {
2866 fn decode(
2867 slot_: ::fidl_next::Slot<'_, Self>,
2868 decoder_: &mut ___D,
2869 _: (),
2870 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2871 if slot_.as_bytes()[4..8] != [0u8; 4] {
2872 return Err(::fidl_next::DecodeError::InvalidPadding);
2873 }
2874
2875 ::fidl_next::munge! {
2876 let Self {
2877 mut s,
2878 mut info,
2879
2880 } = slot_;
2881 }
2882
2883 let _field = s.as_mut();
2884
2885 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2886
2887 let _field = info.as_mut();
2888
2889 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
2890
2891 Ok(())
2892 }
2893 }
2894
2895 impl<'de> ::fidl_next::IntoNatural for NodeOnOpenRequest<'de> {
2896 type Natural = crate::natural::NodeOnOpenRequest;
2897 }
2898
2899 #[derive(Debug)]
2901 #[repr(C)]
2902 pub struct NodeListExtendedAttributesRequest {
2903 pub iterator: ::fidl_next::ServerEnd<
2904 crate::ExtendedAttributeIterator,
2905 ::fidl_next::wire::fuchsia::Channel,
2906 >,
2907 }
2908
2909 static_assertions::const_assert_eq!(
2910 std::mem::size_of::<NodeListExtendedAttributesRequest>(),
2911 4
2912 );
2913 static_assertions::const_assert_eq!(
2914 std::mem::align_of::<NodeListExtendedAttributesRequest>(),
2915 4
2916 );
2917
2918 static_assertions::const_assert_eq!(
2919 std::mem::offset_of!(NodeListExtendedAttributesRequest, iterator),
2920 0
2921 );
2922
2923 impl ::fidl_next::Constrained for NodeListExtendedAttributesRequest {
2924 type Constraint = ();
2925
2926 fn validate(
2927 _: ::fidl_next::Slot<'_, Self>,
2928 _: Self::Constraint,
2929 ) -> Result<(), ::fidl_next::ValidationError> {
2930 Ok(())
2931 }
2932 }
2933
2934 unsafe impl ::fidl_next::Wire for NodeListExtendedAttributesRequest {
2935 type Narrowed<'de> = NodeListExtendedAttributesRequest;
2936
2937 #[inline]
2938 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2939 ::fidl_next::munge! {
2940 let Self {
2941 iterator,
2942
2943 } = &mut *out_;
2944 }
2945
2946 ::fidl_next::Wire::zero_padding(iterator);
2947 }
2948 }
2949
2950 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeListExtendedAttributesRequest
2951 where
2952 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2953 ___D: ::fidl_next::fuchsia::HandleDecoder,
2954 {
2955 fn decode(
2956 slot_: ::fidl_next::Slot<'_, Self>,
2957 decoder_: &mut ___D,
2958 _: (),
2959 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2960 ::fidl_next::munge! {
2961 let Self {
2962 mut iterator,
2963
2964 } = slot_;
2965 }
2966
2967 let _field = iterator.as_mut();
2968
2969 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
2970
2971 Ok(())
2972 }
2973 }
2974
2975 impl ::fidl_next::IntoNatural for NodeListExtendedAttributesRequest {
2976 type Natural = crate::natural::NodeListExtendedAttributesRequest;
2977 }
2978
2979 #[repr(transparent)]
2981 pub struct ExtendedAttributeValue<'de> {
2982 pub(crate) raw: ::fidl_next::wire::Union,
2983 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2984 }
2985
2986 impl<'de> Drop for ExtendedAttributeValue<'de> {
2987 fn drop(&mut self) {
2988 match self.raw.ordinal() {
2989 1 => {
2990 let _ = unsafe {
2991 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2992 };
2993 }
2994
2995 2 => {
2996 let _ = unsafe {
2997 self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2998 };
2999 }
3000
3001 _ => (),
3002 }
3003 }
3004 }
3005
3006 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
3007 type Constraint = ();
3008
3009 fn validate(
3010 _: ::fidl_next::Slot<'_, Self>,
3011 _: Self::Constraint,
3012 ) -> Result<(), ::fidl_next::ValidationError> {
3013 Ok(())
3014 }
3015 }
3016
3017 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
3018 type Narrowed<'de> = ExtendedAttributeValue<'de>;
3019
3020 #[inline]
3021 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3022 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3023 ::fidl_next::wire::Union::zero_padding(raw);
3024 }
3025 }
3026
3027 pub mod extended_attribute_value {
3028 pub enum Ref<'de> {
3029 Bytes(&'de ::fidl_next::wire::Vector<'de, u8>),
3030
3031 Buffer(&'de ::fidl_next::wire::fuchsia::Vmo),
3032
3033 UnknownOrdinal_(u64),
3034 }
3035 }
3036
3037 impl<'de> ExtendedAttributeValue<'de> {
3038 pub fn as_ref(&self) -> crate::wire::extended_attribute_value::Ref<'_> {
3039 match self.raw.ordinal() {
3040 1 => crate::wire::extended_attribute_value::Ref::Bytes(unsafe {
3041 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
3042 }),
3043
3044 2 => crate::wire::extended_attribute_value::Ref::Buffer(unsafe {
3045 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
3046 }),
3047
3048 unknown => crate::wire::extended_attribute_value::Ref::UnknownOrdinal_(unknown),
3049 }
3050 }
3051 }
3052
3053 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
3054 where
3055 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3056 ___D: ::fidl_next::Decoder<'de>,
3057 ___D: ::fidl_next::fuchsia::HandleDecoder,
3058 {
3059 fn decode(
3060 mut slot: ::fidl_next::Slot<'_, Self>,
3061 decoder: &mut ___D,
3062 _: (),
3063 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3064 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3065 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3066 1 => {
3067 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3068 raw,
3069 decoder,
3070 (32768, ()),
3071 )?
3072 }
3073
3074 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Vmo>(
3075 raw,
3076 decoder,
3077 (),
3078 )?,
3079
3080 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3081 }
3082
3083 Ok(())
3084 }
3085 }
3086
3087 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
3088 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3089 match self.raw.ordinal() {
3090 1 => unsafe {
3091 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
3092 },
3093 2 => unsafe {
3094 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>().fmt(f)
3095 },
3096 _ => unsafe { ::core::hint::unreachable_unchecked() },
3097 }
3098 }
3099 }
3100
3101 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
3102 type Natural = crate::natural::ExtendedAttributeValue;
3103 }
3104
3105 #[derive(Debug)]
3107 #[repr(C)]
3108 pub struct NodeSetExtendedAttributeRequest<'de> {
3109 pub name: ::fidl_next::wire::Vector<'de, u8>,
3110
3111 pub value: crate::wire::ExtendedAttributeValue<'de>,
3112
3113 pub mode: crate::wire::SetExtendedAttributeMode,
3114 }
3115
3116 static_assertions::const_assert_eq!(
3117 std::mem::size_of::<NodeSetExtendedAttributeRequest<'_>>(),
3118 40
3119 );
3120 static_assertions::const_assert_eq!(
3121 std::mem::align_of::<NodeSetExtendedAttributeRequest<'_>>(),
3122 8
3123 );
3124
3125 static_assertions::const_assert_eq!(
3126 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, name),
3127 0
3128 );
3129
3130 static_assertions::const_assert_eq!(
3131 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, value),
3132 16
3133 );
3134
3135 static_assertions::const_assert_eq!(
3136 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, mode),
3137 32
3138 );
3139
3140 impl ::fidl_next::Constrained for NodeSetExtendedAttributeRequest<'_> {
3141 type Constraint = ();
3142
3143 fn validate(
3144 _: ::fidl_next::Slot<'_, Self>,
3145 _: Self::Constraint,
3146 ) -> Result<(), ::fidl_next::ValidationError> {
3147 Ok(())
3148 }
3149 }
3150
3151 unsafe impl ::fidl_next::Wire for NodeSetExtendedAttributeRequest<'static> {
3152 type Narrowed<'de> = NodeSetExtendedAttributeRequest<'de>;
3153
3154 #[inline]
3155 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3156 ::fidl_next::munge! {
3157 let Self {
3158 name,
3159 value,
3160 mode,
3161
3162 } = &mut *out_;
3163 }
3164
3165 ::fidl_next::Wire::zero_padding(name);
3166
3167 ::fidl_next::Wire::zero_padding(value);
3168
3169 ::fidl_next::Wire::zero_padding(mode);
3170
3171 unsafe {
3172 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3173 }
3174 }
3175 }
3176
3177 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetExtendedAttributeRequest<'de>
3178 where
3179 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3180 ___D: ::fidl_next::Decoder<'de>,
3181 ___D: ::fidl_next::fuchsia::HandleDecoder,
3182 {
3183 fn decode(
3184 slot_: ::fidl_next::Slot<'_, Self>,
3185 decoder_: &mut ___D,
3186 _: (),
3187 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3188 if slot_.as_bytes()[36..40] != [0u8; 4] {
3189 return Err(::fidl_next::DecodeError::InvalidPadding);
3190 }
3191
3192 ::fidl_next::munge! {
3193 let Self {
3194 mut name,
3195 mut value,
3196 mut mode,
3197
3198 } = slot_;
3199 }
3200
3201 let _field = name.as_mut();
3202 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3203 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
3204
3205 let name = unsafe { name.deref_unchecked() };
3206
3207 if name.len() > 255 {
3208 return Err(::fidl_next::DecodeError::VectorTooLong {
3209 size: name.len() as u64,
3210 limit: 255,
3211 });
3212 }
3213
3214 let _field = value.as_mut();
3215
3216 ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
3217
3218 let _field = mode.as_mut();
3219
3220 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3221
3222 Ok(())
3223 }
3224 }
3225
3226 impl<'de> ::fidl_next::IntoNatural for NodeSetExtendedAttributeRequest<'de> {
3227 type Natural = crate::natural::NodeSetExtendedAttributeRequest;
3228 }
3229
3230 #[repr(C)]
3232 pub struct FileInfo<'de> {
3233 pub(crate) table: ::fidl_next::wire::Table<'de>,
3234 }
3235
3236 impl<'de> Drop for FileInfo<'de> {
3237 fn drop(&mut self) {
3238 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3239
3240 let _ = self.table.get(2).map(|envelope| unsafe {
3241 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
3242 });
3243
3244 let _ = self.table.get(3).map(|envelope| unsafe {
3245 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Stream>()
3246 });
3247
3248 let _ = self.table.get(4).map(|envelope| unsafe {
3249 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
3250 });
3251 }
3252 }
3253
3254 impl ::fidl_next::Constrained for FileInfo<'_> {
3255 type Constraint = ();
3256
3257 fn validate(
3258 _: ::fidl_next::Slot<'_, Self>,
3259 _: Self::Constraint,
3260 ) -> Result<(), ::fidl_next::ValidationError> {
3261 Ok(())
3262 }
3263 }
3264
3265 unsafe impl ::fidl_next::Wire for FileInfo<'static> {
3266 type Narrowed<'de> = FileInfo<'de>;
3267
3268 #[inline]
3269 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3270 ::fidl_next::munge!(let Self { table } = out);
3271 ::fidl_next::wire::Table::zero_padding(table);
3272 }
3273 }
3274
3275 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileInfo<'de>
3276 where
3277 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3278 ___D: ::fidl_next::fuchsia::HandleDecoder,
3279 {
3280 fn decode(
3281 slot: ::fidl_next::Slot<'_, Self>,
3282 decoder: &mut ___D,
3283 _: (),
3284 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3285 ::fidl_next::munge!(let Self { table } = slot);
3286
3287 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3288 match ordinal {
3289 0 => unsafe { ::core::hint::unreachable_unchecked() },
3290
3291 1 => {
3292 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3293 slot.as_mut(),
3294 decoder,
3295 (),
3296 )?;
3297
3298 Ok(())
3299 }
3300
3301 2 => {
3302 ::fidl_next::wire::Envelope::decode_as::<
3303 ___D,
3304 ::fidl_next::wire::fuchsia::Event,
3305 >(slot.as_mut(), decoder, ())?;
3306
3307 Ok(())
3308 }
3309
3310 3 => {
3311 ::fidl_next::wire::Envelope::decode_as::<
3312 ___D,
3313 ::fidl_next::wire::fuchsia::Stream,
3314 >(slot.as_mut(), decoder, ())?;
3315
3316 Ok(())
3317 }
3318
3319 4 => {
3320 ::fidl_next::wire::Envelope::decode_as::<
3321 ___D,
3322 crate::wire::NodeAttributes2<'de>,
3323 >(slot.as_mut(), decoder, ())?;
3324
3325 Ok(())
3326 }
3327
3328 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3329 }
3330 })
3331 }
3332 }
3333
3334 impl<'de> FileInfo<'de> {
3335 pub fn is_append(&self) -> ::core::option::Option<&bool> {
3336 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3337 }
3338
3339 pub fn observer(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
3340 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3341 }
3342
3343 pub fn stream(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Stream> {
3344 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3345 }
3346
3347 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
3348 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3349 }
3350 }
3351
3352 impl<'de> ::core::fmt::Debug for FileInfo<'de> {
3353 fn fmt(
3354 &self,
3355 f: &mut ::core::fmt::Formatter<'_>,
3356 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3357 f.debug_struct("FileInfo")
3358 .field("is_append", &self.is_append())
3359 .field("observer", &self.observer())
3360 .field("stream", &self.stream())
3361 .field("attributes", &self.attributes())
3362 .finish()
3363 }
3364 }
3365
3366 impl<'de> ::fidl_next::IntoNatural for FileInfo<'de> {
3367 type Natural = crate::natural::FileInfo;
3368 }
3369
3370 #[repr(transparent)]
3372 pub struct Representation<'de> {
3373 pub(crate) raw: ::fidl_next::wire::Union,
3374 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3375 }
3376
3377 impl<'de> Drop for Representation<'de> {
3378 fn drop(&mut self) {
3379 match self.raw.ordinal() {
3380 1 => {
3381 let _ =
3382 unsafe { self.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>() };
3383 }
3384
3385 2 => {
3386 let _ = unsafe {
3387 self.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
3388 };
3389 }
3390
3391 3 => {
3392 let _ =
3393 unsafe { self.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>() };
3394 }
3395
3396 4 => {
3397 let _ =
3398 unsafe { self.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>() };
3399 }
3400
3401 _ => (),
3402 }
3403 }
3404 }
3405
3406 impl ::fidl_next::Constrained for Representation<'_> {
3407 type Constraint = ();
3408
3409 fn validate(
3410 _: ::fidl_next::Slot<'_, Self>,
3411 _: Self::Constraint,
3412 ) -> Result<(), ::fidl_next::ValidationError> {
3413 Ok(())
3414 }
3415 }
3416
3417 unsafe impl ::fidl_next::Wire for Representation<'static> {
3418 type Narrowed<'de> = Representation<'de>;
3419
3420 #[inline]
3421 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3422 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3423 ::fidl_next::wire::Union::zero_padding(raw);
3424 }
3425 }
3426
3427 pub mod representation {
3428 pub enum Ref<'de> {
3429 Node(&'de crate::wire::NodeInfo<'de>),
3430
3431 Directory(&'de crate::wire::DirectoryInfo<'de>),
3432
3433 File(&'de crate::wire::FileInfo<'de>),
3434
3435 Symlink(&'de crate::wire::SymlinkInfo<'de>),
3436
3437 UnknownOrdinal_(u64),
3438 }
3439 }
3440
3441 impl<'de> Representation<'de> {
3442 pub fn as_ref(&self) -> crate::wire::representation::Ref<'_> {
3443 match self.raw.ordinal() {
3444 1 => crate::wire::representation::Ref::Node(unsafe {
3445 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>()
3446 }),
3447
3448 2 => crate::wire::representation::Ref::Directory(unsafe {
3449 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>()
3450 }),
3451
3452 3 => crate::wire::representation::Ref::File(unsafe {
3453 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>()
3454 }),
3455
3456 4 => crate::wire::representation::Ref::Symlink(unsafe {
3457 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>()
3458 }),
3459
3460 unknown => crate::wire::representation::Ref::UnknownOrdinal_(unknown),
3461 }
3462 }
3463 }
3464
3465 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
3466 where
3467 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3468 ___D: ::fidl_next::Decoder<'de>,
3469 ___D: ::fidl_next::fuchsia::HandleDecoder,
3470 {
3471 fn decode(
3472 mut slot: ::fidl_next::Slot<'_, Self>,
3473 decoder: &mut ___D,
3474 _: (),
3475 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3476 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3477 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3478 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
3479 raw,
3480 decoder,
3481 (),
3482 )?,
3483
3484 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
3485 raw,
3486 decoder,
3487 (),
3488 )?,
3489
3490 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
3491 raw,
3492 decoder,
3493 (),
3494 )?,
3495
3496 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
3497 raw,
3498 decoder,
3499 (),
3500 )?,
3501
3502 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3503 }
3504
3505 Ok(())
3506 }
3507 }
3508
3509 impl<'de> ::core::fmt::Debug for Representation<'de> {
3510 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3511 match self.raw.ordinal() {
3512 1 => unsafe {
3513 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>().fmt(f)
3514 },
3515 2 => unsafe {
3516 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>().fmt(f)
3517 },
3518 3 => unsafe {
3519 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>().fmt(f)
3520 },
3521 4 => unsafe {
3522 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>().fmt(f)
3523 },
3524 _ => unsafe { ::core::hint::unreachable_unchecked() },
3525 }
3526 }
3527 }
3528
3529 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
3530 type Natural = crate::natural::Representation;
3531 }
3532
3533 #[derive(Debug)]
3535 #[repr(C)]
3536 pub struct DirectoryOpenRequest<'de> {
3537 pub path: ::fidl_next::wire::String<'de>,
3538
3539 pub flags: crate::wire::Flags,
3540
3541 pub options: crate::wire::Options<'de>,
3542
3543 pub object: ::fidl_next::wire::fuchsia::Channel,
3544 }
3545
3546 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryOpenRequest<'_>>(), 48);
3547 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryOpenRequest<'_>>(), 8);
3548
3549 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, path), 0);
3550
3551 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, flags), 16);
3552
3553 static_assertions::const_assert_eq!(
3554 std::mem::offset_of!(DirectoryOpenRequest<'_>, options),
3555 24
3556 );
3557
3558 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, object), 40);
3559
3560 impl ::fidl_next::Constrained for DirectoryOpenRequest<'_> {
3561 type Constraint = ();
3562
3563 fn validate(
3564 _: ::fidl_next::Slot<'_, Self>,
3565 _: Self::Constraint,
3566 ) -> Result<(), ::fidl_next::ValidationError> {
3567 Ok(())
3568 }
3569 }
3570
3571 unsafe impl ::fidl_next::Wire for DirectoryOpenRequest<'static> {
3572 type Narrowed<'de> = DirectoryOpenRequest<'de>;
3573
3574 #[inline]
3575 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3576 ::fidl_next::munge! {
3577 let Self {
3578 path,
3579 flags,
3580 options,
3581 object,
3582
3583 } = &mut *out_;
3584 }
3585
3586 ::fidl_next::Wire::zero_padding(path);
3587
3588 ::fidl_next::Wire::zero_padding(flags);
3589
3590 ::fidl_next::Wire::zero_padding(options);
3591
3592 ::fidl_next::Wire::zero_padding(object);
3593
3594 unsafe {
3595 out_.as_mut_ptr().cast::<u8>().add(44).write_bytes(0, 4);
3596 }
3597 }
3598 }
3599
3600 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryOpenRequest<'de>
3601 where
3602 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3603 ___D: ::fidl_next::Decoder<'de>,
3604 ___D: ::fidl_next::fuchsia::HandleDecoder,
3605 {
3606 fn decode(
3607 slot_: ::fidl_next::Slot<'_, Self>,
3608 decoder_: &mut ___D,
3609 _: (),
3610 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3611 if slot_.as_bytes()[44..48] != [0u8; 4] {
3612 return Err(::fidl_next::DecodeError::InvalidPadding);
3613 }
3614
3615 ::fidl_next::munge! {
3616 let Self {
3617 mut path,
3618 mut flags,
3619 mut options,
3620 mut object,
3621
3622 } = slot_;
3623 }
3624
3625 let _field = path.as_mut();
3626 ::fidl_next::Constrained::validate(_field, 4095)?;
3627 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3628
3629 let path = unsafe { path.deref_unchecked() };
3630
3631 if path.len() > 4095 {
3632 return Err(::fidl_next::DecodeError::VectorTooLong {
3633 size: path.len() as u64,
3634 limit: 4095,
3635 });
3636 }
3637
3638 let _field = flags.as_mut();
3639
3640 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3641
3642 let _field = options.as_mut();
3643
3644 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
3645
3646 let _field = object.as_mut();
3647
3648 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3649
3650 Ok(())
3651 }
3652 }
3653
3654 impl<'de> ::fidl_next::IntoNatural for DirectoryOpenRequest<'de> {
3655 type Natural = crate::natural::DirectoryOpenRequest;
3656 }
3657
3658 #[derive(Debug)]
3660 #[repr(C)]
3661 pub struct NodeDeprecatedCloneRequest {
3662 pub flags: crate::wire::OpenFlags,
3663
3664 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
3665 }
3666
3667 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedCloneRequest>(), 8);
3668 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedCloneRequest>(), 4);
3669
3670 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedCloneRequest, flags), 0);
3671
3672 static_assertions::const_assert_eq!(
3673 std::mem::offset_of!(NodeDeprecatedCloneRequest, object),
3674 4
3675 );
3676
3677 impl ::fidl_next::Constrained for NodeDeprecatedCloneRequest {
3678 type Constraint = ();
3679
3680 fn validate(
3681 _: ::fidl_next::Slot<'_, Self>,
3682 _: Self::Constraint,
3683 ) -> Result<(), ::fidl_next::ValidationError> {
3684 Ok(())
3685 }
3686 }
3687
3688 unsafe impl ::fidl_next::Wire for NodeDeprecatedCloneRequest {
3689 type Narrowed<'de> = NodeDeprecatedCloneRequest;
3690
3691 #[inline]
3692 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3693 ::fidl_next::munge! {
3694 let Self {
3695 flags,
3696 object,
3697
3698 } = &mut *out_;
3699 }
3700
3701 ::fidl_next::Wire::zero_padding(flags);
3702
3703 ::fidl_next::Wire::zero_padding(object);
3704 }
3705 }
3706
3707 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedCloneRequest
3708 where
3709 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3710 ___D: ::fidl_next::fuchsia::HandleDecoder,
3711 {
3712 fn decode(
3713 slot_: ::fidl_next::Slot<'_, Self>,
3714 decoder_: &mut ___D,
3715 _: (),
3716 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3717 ::fidl_next::munge! {
3718 let Self {
3719 mut flags,
3720 mut object,
3721
3722 } = slot_;
3723 }
3724
3725 let _field = flags.as_mut();
3726
3727 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3728
3729 let _field = object.as_mut();
3730
3731 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3732
3733 Ok(())
3734 }
3735 }
3736
3737 impl ::fidl_next::IntoNatural for NodeDeprecatedCloneRequest {
3738 type Natural = crate::natural::NodeDeprecatedCloneRequest;
3739 }
3740
3741 #[derive(Debug)]
3743 #[repr(C)]
3744 pub struct DirectoryDeprecatedOpenRequest<'de> {
3745 pub flags: crate::wire::OpenFlags,
3746
3747 pub mode: crate::wire::ModeType,
3748
3749 pub path: ::fidl_next::wire::String<'de>,
3750
3751 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
3752 }
3753
3754 static_assertions::const_assert_eq!(
3755 std::mem::size_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3756 32
3757 );
3758 static_assertions::const_assert_eq!(
3759 std::mem::align_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3760 8
3761 );
3762
3763 static_assertions::const_assert_eq!(
3764 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, flags),
3765 0
3766 );
3767
3768 static_assertions::const_assert_eq!(
3769 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, mode),
3770 4
3771 );
3772
3773 static_assertions::const_assert_eq!(
3774 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, path),
3775 8
3776 );
3777
3778 static_assertions::const_assert_eq!(
3779 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, object),
3780 24
3781 );
3782
3783 impl ::fidl_next::Constrained for DirectoryDeprecatedOpenRequest<'_> {
3784 type Constraint = ();
3785
3786 fn validate(
3787 _: ::fidl_next::Slot<'_, Self>,
3788 _: Self::Constraint,
3789 ) -> Result<(), ::fidl_next::ValidationError> {
3790 Ok(())
3791 }
3792 }
3793
3794 unsafe impl ::fidl_next::Wire for DirectoryDeprecatedOpenRequest<'static> {
3795 type Narrowed<'de> = DirectoryDeprecatedOpenRequest<'de>;
3796
3797 #[inline]
3798 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3799 ::fidl_next::munge! {
3800 let Self {
3801 flags,
3802 mode,
3803 path,
3804 object,
3805
3806 } = &mut *out_;
3807 }
3808
3809 ::fidl_next::Wire::zero_padding(flags);
3810
3811 ::fidl_next::Wire::zero_padding(mode);
3812
3813 ::fidl_next::Wire::zero_padding(path);
3814
3815 ::fidl_next::Wire::zero_padding(object);
3816
3817 unsafe {
3818 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
3819 }
3820 }
3821 }
3822
3823 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryDeprecatedOpenRequest<'de>
3824 where
3825 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3826 ___D: ::fidl_next::Decoder<'de>,
3827 ___D: ::fidl_next::fuchsia::HandleDecoder,
3828 {
3829 fn decode(
3830 slot_: ::fidl_next::Slot<'_, Self>,
3831 decoder_: &mut ___D,
3832 _: (),
3833 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3834 if slot_.as_bytes()[28..32] != [0u8; 4] {
3835 return Err(::fidl_next::DecodeError::InvalidPadding);
3836 }
3837
3838 ::fidl_next::munge! {
3839 let Self {
3840 mut flags,
3841 mut mode,
3842 mut path,
3843 mut object,
3844
3845 } = slot_;
3846 }
3847
3848 let _field = flags.as_mut();
3849
3850 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3851
3852 let _field = mode.as_mut();
3853
3854 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3855
3856 let _field = path.as_mut();
3857 ::fidl_next::Constrained::validate(_field, 4095)?;
3858 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3859
3860 let path = unsafe { path.deref_unchecked() };
3861
3862 if path.len() > 4095 {
3863 return Err(::fidl_next::DecodeError::VectorTooLong {
3864 size: path.len() as u64,
3865 limit: 4095,
3866 });
3867 }
3868
3869 let _field = object.as_mut();
3870
3871 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3872
3873 Ok(())
3874 }
3875 }
3876
3877 impl<'de> ::fidl_next::IntoNatural for DirectoryDeprecatedOpenRequest<'de> {
3878 type Natural = crate::natural::DirectoryDeprecatedOpenRequest;
3879 }
3880
3881 #[derive(Debug)]
3883 #[repr(C)]
3884 pub struct DirectoryCreateSymlinkRequest<'de> {
3885 pub name: ::fidl_next::wire::String<'de>,
3886
3887 pub target: ::fidl_next::wire::Vector<'de, u8>,
3888
3889 pub connection:
3890 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
3891 }
3892
3893 static_assertions::const_assert_eq!(
3894 std::mem::size_of::<DirectoryCreateSymlinkRequest<'_>>(),
3895 40
3896 );
3897 static_assertions::const_assert_eq!(
3898 std::mem::align_of::<DirectoryCreateSymlinkRequest<'_>>(),
3899 8
3900 );
3901
3902 static_assertions::const_assert_eq!(
3903 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, name),
3904 0
3905 );
3906
3907 static_assertions::const_assert_eq!(
3908 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, target),
3909 16
3910 );
3911
3912 static_assertions::const_assert_eq!(
3913 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, connection),
3914 32
3915 );
3916
3917 impl ::fidl_next::Constrained for DirectoryCreateSymlinkRequest<'_> {
3918 type Constraint = ();
3919
3920 fn validate(
3921 _: ::fidl_next::Slot<'_, Self>,
3922 _: Self::Constraint,
3923 ) -> Result<(), ::fidl_next::ValidationError> {
3924 Ok(())
3925 }
3926 }
3927
3928 unsafe impl ::fidl_next::Wire for DirectoryCreateSymlinkRequest<'static> {
3929 type Narrowed<'de> = DirectoryCreateSymlinkRequest<'de>;
3930
3931 #[inline]
3932 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3933 ::fidl_next::munge! {
3934 let Self {
3935 name,
3936 target,
3937 connection,
3938
3939 } = &mut *out_;
3940 }
3941
3942 ::fidl_next::Wire::zero_padding(name);
3943
3944 ::fidl_next::Wire::zero_padding(target);
3945
3946 ::fidl_next::Wire::zero_padding(connection);
3947
3948 unsafe {
3949 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3950 }
3951 }
3952 }
3953
3954 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryCreateSymlinkRequest<'de>
3955 where
3956 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3957 ___D: ::fidl_next::Decoder<'de>,
3958 ___D: ::fidl_next::fuchsia::HandleDecoder,
3959 {
3960 fn decode(
3961 slot_: ::fidl_next::Slot<'_, Self>,
3962 decoder_: &mut ___D,
3963 _: (),
3964 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3965 if slot_.as_bytes()[36..40] != [0u8; 4] {
3966 return Err(::fidl_next::DecodeError::InvalidPadding);
3967 }
3968
3969 ::fidl_next::munge! {
3970 let Self {
3971 mut name,
3972 mut target,
3973 mut connection,
3974
3975 } = slot_;
3976 }
3977
3978 let _field = name.as_mut();
3979 ::fidl_next::Constrained::validate(_field, 255)?;
3980 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
3981
3982 let name = unsafe { name.deref_unchecked() };
3983
3984 if name.len() > 255 {
3985 return Err(::fidl_next::DecodeError::VectorTooLong {
3986 size: name.len() as u64,
3987 limit: 255,
3988 });
3989 }
3990
3991 let _field = target.as_mut();
3992 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
3993 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
3994
3995 let target = unsafe { target.deref_unchecked() };
3996
3997 if target.len() > 4095 {
3998 return Err(::fidl_next::DecodeError::VectorTooLong {
3999 size: target.len() as u64,
4000 limit: 4095,
4001 });
4002 }
4003
4004 let _field = connection.as_mut();
4005
4006 ::fidl_next::Decode::decode(connection.as_mut(), decoder_, ())?;
4007
4008 Ok(())
4009 }
4010 }
4011
4012 impl<'de> ::fidl_next::IntoNatural for DirectoryCreateSymlinkRequest<'de> {
4013 type Natural = crate::natural::DirectoryCreateSymlinkRequest;
4014 }
4015
4016 #[derive(Debug)]
4018 #[repr(C)]
4019 pub struct FileGetBackingMemoryResponse {
4020 pub vmo: ::fidl_next::wire::fuchsia::Vmo,
4021 }
4022
4023 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryResponse>(), 4);
4024 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryResponse>(), 4);
4025
4026 static_assertions::const_assert_eq!(std::mem::offset_of!(FileGetBackingMemoryResponse, vmo), 0);
4027
4028 impl ::fidl_next::Constrained for FileGetBackingMemoryResponse {
4029 type Constraint = ();
4030
4031 fn validate(
4032 _: ::fidl_next::Slot<'_, Self>,
4033 _: Self::Constraint,
4034 ) -> Result<(), ::fidl_next::ValidationError> {
4035 Ok(())
4036 }
4037 }
4038
4039 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryResponse {
4040 type Narrowed<'de> = FileGetBackingMemoryResponse;
4041
4042 #[inline]
4043 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4044 ::fidl_next::munge! {
4045 let Self {
4046 vmo,
4047
4048 } = &mut *out_;
4049 }
4050
4051 ::fidl_next::Wire::zero_padding(vmo);
4052 }
4053 }
4054
4055 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryResponse
4056 where
4057 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4058 ___D: ::fidl_next::fuchsia::HandleDecoder,
4059 {
4060 fn decode(
4061 slot_: ::fidl_next::Slot<'_, Self>,
4062 decoder_: &mut ___D,
4063 _: (),
4064 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4065 ::fidl_next::munge! {
4066 let Self {
4067 mut vmo,
4068
4069 } = slot_;
4070 }
4071
4072 let _field = vmo.as_mut();
4073
4074 ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
4075
4076 Ok(())
4077 }
4078 }
4079
4080 impl ::fidl_next::IntoNatural for FileGetBackingMemoryResponse {
4081 type Natural = crate::natural::FileGetBackingMemoryResponse;
4082 }
4083
4084 #[derive(Debug)]
4086 #[repr(C)]
4087 pub struct LinkableLinkIntoRequest<'de> {
4088 pub dst_parent_token: ::fidl_next::wire::fuchsia::Event,
4089
4090 pub dst: ::fidl_next::wire::String<'de>,
4091 }
4092
4093 static_assertions::const_assert_eq!(std::mem::size_of::<LinkableLinkIntoRequest<'_>>(), 24);
4094 static_assertions::const_assert_eq!(std::mem::align_of::<LinkableLinkIntoRequest<'_>>(), 8);
4095
4096 static_assertions::const_assert_eq!(
4097 std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst_parent_token),
4098 0
4099 );
4100
4101 static_assertions::const_assert_eq!(std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst), 8);
4102
4103 impl ::fidl_next::Constrained for LinkableLinkIntoRequest<'_> {
4104 type Constraint = ();
4105
4106 fn validate(
4107 _: ::fidl_next::Slot<'_, Self>,
4108 _: Self::Constraint,
4109 ) -> Result<(), ::fidl_next::ValidationError> {
4110 Ok(())
4111 }
4112 }
4113
4114 unsafe impl ::fidl_next::Wire for LinkableLinkIntoRequest<'static> {
4115 type Narrowed<'de> = LinkableLinkIntoRequest<'de>;
4116
4117 #[inline]
4118 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4119 ::fidl_next::munge! {
4120 let Self {
4121 dst_parent_token,
4122 dst,
4123
4124 } = &mut *out_;
4125 }
4126
4127 ::fidl_next::Wire::zero_padding(dst_parent_token);
4128
4129 ::fidl_next::Wire::zero_padding(dst);
4130
4131 unsafe {
4132 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
4133 }
4134 }
4135 }
4136
4137 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LinkableLinkIntoRequest<'de>
4138 where
4139 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4140 ___D: ::fidl_next::Decoder<'de>,
4141 ___D: ::fidl_next::fuchsia::HandleDecoder,
4142 {
4143 fn decode(
4144 slot_: ::fidl_next::Slot<'_, Self>,
4145 decoder_: &mut ___D,
4146 _: (),
4147 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4148 if slot_.as_bytes()[4..8] != [0u8; 4] {
4149 return Err(::fidl_next::DecodeError::InvalidPadding);
4150 }
4151
4152 ::fidl_next::munge! {
4153 let Self {
4154 mut dst_parent_token,
4155 mut dst,
4156
4157 } = slot_;
4158 }
4159
4160 let _field = dst_parent_token.as_mut();
4161
4162 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
4163
4164 let _field = dst.as_mut();
4165 ::fidl_next::Constrained::validate(_field, 255)?;
4166 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
4167
4168 let dst = unsafe { dst.deref_unchecked() };
4169
4170 if dst.len() > 255 {
4171 return Err(::fidl_next::DecodeError::VectorTooLong {
4172 size: dst.len() as u64,
4173 limit: 255,
4174 });
4175 }
4176
4177 Ok(())
4178 }
4179 }
4180
4181 impl<'de> ::fidl_next::IntoNatural for LinkableLinkIntoRequest<'de> {
4182 type Natural = crate::natural::LinkableLinkIntoRequest;
4183 }
4184
4185 #[derive(Debug)]
4187 #[repr(C)]
4188 pub struct FileAllocateRequest {
4189 pub offset: ::fidl_next::wire::Uint64,
4190
4191 pub length: ::fidl_next::wire::Uint64,
4192
4193 pub mode: crate::wire::AllocateMode,
4194 }
4195
4196 static_assertions::const_assert_eq!(std::mem::size_of::<FileAllocateRequest>(), 24);
4197 static_assertions::const_assert_eq!(std::mem::align_of::<FileAllocateRequest>(), 8);
4198
4199 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, offset), 0);
4200
4201 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, length), 8);
4202
4203 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, mode), 16);
4204
4205 impl ::fidl_next::Constrained for FileAllocateRequest {
4206 type Constraint = ();
4207
4208 fn validate(
4209 _: ::fidl_next::Slot<'_, Self>,
4210 _: Self::Constraint,
4211 ) -> Result<(), ::fidl_next::ValidationError> {
4212 Ok(())
4213 }
4214 }
4215
4216 unsafe impl ::fidl_next::Wire for FileAllocateRequest {
4217 type Narrowed<'de> = FileAllocateRequest;
4218
4219 #[inline]
4220 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4221 ::fidl_next::munge! {
4222 let Self {
4223 offset,
4224 length,
4225 mode,
4226
4227 } = &mut *out_;
4228 }
4229
4230 ::fidl_next::Wire::zero_padding(offset);
4231
4232 ::fidl_next::Wire::zero_padding(length);
4233
4234 ::fidl_next::Wire::zero_padding(mode);
4235
4236 unsafe {
4237 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4238 }
4239 }
4240 }
4241
4242 unsafe impl<___D> ::fidl_next::Decode<___D> for FileAllocateRequest
4243 where
4244 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4245 ___D: ::fidl_next::fuchsia::HandleDecoder,
4246 {
4247 fn decode(
4248 slot_: ::fidl_next::Slot<'_, Self>,
4249 decoder_: &mut ___D,
4250 _: (),
4251 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4252 if slot_.as_bytes()[20..24] != [0u8; 4] {
4253 return Err(::fidl_next::DecodeError::InvalidPadding);
4254 }
4255
4256 ::fidl_next::munge! {
4257 let Self {
4258 mut offset,
4259 mut length,
4260 mut mode,
4261
4262 } = slot_;
4263 }
4264
4265 let _field = offset.as_mut();
4266
4267 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
4268
4269 let _field = length.as_mut();
4270
4271 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
4272
4273 let _field = mode.as_mut();
4274
4275 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
4276
4277 Ok(())
4278 }
4279 }
4280
4281 impl ::fidl_next::IntoNatural for FileAllocateRequest {
4282 type Natural = crate::natural::FileAllocateRequest;
4283 }
4284
4285 #[derive(Debug)]
4287 #[repr(C)]
4288 pub struct FileEnableVerityRequest<'de> {
4289 pub options: crate::wire::VerificationOptions<'de>,
4290 }
4291
4292 static_assertions::const_assert_eq!(std::mem::size_of::<FileEnableVerityRequest<'_>>(), 16);
4293 static_assertions::const_assert_eq!(std::mem::align_of::<FileEnableVerityRequest<'_>>(), 8);
4294
4295 static_assertions::const_assert_eq!(
4296 std::mem::offset_of!(FileEnableVerityRequest<'_>, options),
4297 0
4298 );
4299
4300 impl ::fidl_next::Constrained for FileEnableVerityRequest<'_> {
4301 type Constraint = ();
4302
4303 fn validate(
4304 _: ::fidl_next::Slot<'_, Self>,
4305 _: Self::Constraint,
4306 ) -> Result<(), ::fidl_next::ValidationError> {
4307 Ok(())
4308 }
4309 }
4310
4311 unsafe impl ::fidl_next::Wire for FileEnableVerityRequest<'static> {
4312 type Narrowed<'de> = FileEnableVerityRequest<'de>;
4313
4314 #[inline]
4315 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4316 ::fidl_next::munge! {
4317 let Self {
4318 options,
4319
4320 } = &mut *out_;
4321 }
4322
4323 ::fidl_next::Wire::zero_padding(options);
4324 }
4325 }
4326
4327 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileEnableVerityRequest<'de>
4328 where
4329 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4330 ___D: ::fidl_next::Decoder<'de>,
4331 ___D: ::fidl_next::fuchsia::HandleDecoder,
4332 {
4333 fn decode(
4334 slot_: ::fidl_next::Slot<'_, Self>,
4335 decoder_: &mut ___D,
4336 _: (),
4337 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4338 ::fidl_next::munge! {
4339 let Self {
4340 mut options,
4341
4342 } = slot_;
4343 }
4344
4345 let _field = options.as_mut();
4346
4347 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
4348
4349 Ok(())
4350 }
4351 }
4352
4353 impl<'de> ::fidl_next::IntoNatural for FileEnableVerityRequest<'de> {
4354 type Natural = crate::natural::FileEnableVerityRequest;
4355 }
4356
4357 #[derive(Debug)]
4359 #[repr(C)]
4360 pub struct FileObject {
4361 pub event: ::fidl_next::wire::fuchsia::OptionalEvent,
4362
4363 pub stream: ::fidl_next::wire::fuchsia::OptionalStream,
4364 }
4365
4366 static_assertions::const_assert_eq!(std::mem::size_of::<FileObject>(), 8);
4367 static_assertions::const_assert_eq!(std::mem::align_of::<FileObject>(), 4);
4368
4369 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, event), 0);
4370
4371 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, stream), 4);
4372
4373 impl ::fidl_next::Constrained for FileObject {
4374 type Constraint = ();
4375
4376 fn validate(
4377 _: ::fidl_next::Slot<'_, Self>,
4378 _: Self::Constraint,
4379 ) -> Result<(), ::fidl_next::ValidationError> {
4380 Ok(())
4381 }
4382 }
4383
4384 unsafe impl ::fidl_next::Wire for FileObject {
4385 type Narrowed<'de> = FileObject;
4386
4387 #[inline]
4388 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4389 ::fidl_next::munge! {
4390 let Self {
4391 event,
4392 stream,
4393
4394 } = &mut *out_;
4395 }
4396
4397 ::fidl_next::Wire::zero_padding(event);
4398
4399 ::fidl_next::Wire::zero_padding(stream);
4400 }
4401 }
4402
4403 unsafe impl<___D> ::fidl_next::Decode<___D> for FileObject
4404 where
4405 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4406 ___D: ::fidl_next::fuchsia::HandleDecoder,
4407 {
4408 fn decode(
4409 slot_: ::fidl_next::Slot<'_, Self>,
4410 decoder_: &mut ___D,
4411 _: (),
4412 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4413 ::fidl_next::munge! {
4414 let Self {
4415 mut event,
4416 mut stream,
4417
4418 } = slot_;
4419 }
4420
4421 let _field = event.as_mut();
4422
4423 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
4424
4425 let _field = stream.as_mut();
4426
4427 ::fidl_next::Decode::decode(stream.as_mut(), decoder_, ())?;
4428
4429 Ok(())
4430 }
4431 }
4432
4433 impl ::fidl_next::IntoNatural for FileObject {
4434 type Natural = crate::natural::FileObject;
4435 }
4436
4437 #[repr(transparent)]
4439 pub struct NodeInfoDeprecated<'de> {
4440 pub(crate) raw: ::fidl_next::wire::Union,
4441 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4442 }
4443
4444 impl<'de> Drop for NodeInfoDeprecated<'de> {
4445 fn drop(&mut self) {
4446 match self.raw.ordinal() {
4447 1 => {
4448 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Service>() };
4449 }
4450
4451 2 => {
4452 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::FileObject>() };
4453 }
4454
4455 3 => {
4456 let _ =
4457 unsafe { self.raw.get().read_unchecked::<crate::wire::DirectoryObject>() };
4458 }
4459
4460 4 => {
4461 let _ = unsafe {
4462 self.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4463 };
4464 }
4465
4466 _ => unsafe { ::core::hint::unreachable_unchecked() },
4467 }
4468 }
4469 }
4470
4471 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4472 type Constraint = ();
4473
4474 fn validate(
4475 _: ::fidl_next::Slot<'_, Self>,
4476 _: Self::Constraint,
4477 ) -> Result<(), ::fidl_next::ValidationError> {
4478 Ok(())
4479 }
4480 }
4481
4482 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4483 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4484
4485 #[inline]
4486 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4487 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4488 ::fidl_next::wire::Union::zero_padding(raw);
4489 }
4490 }
4491
4492 pub mod node_info_deprecated {
4493 pub enum Ref<'de> {
4494 Service(&'de crate::wire::Service),
4495
4496 File(&'de crate::wire::FileObject),
4497
4498 Directory(&'de crate::wire::DirectoryObject),
4499
4500 Symlink(&'de crate::wire::SymlinkObject<'de>),
4501 }
4502 }
4503
4504 impl<'de> NodeInfoDeprecated<'de> {
4505 pub fn as_ref(&self) -> crate::wire::node_info_deprecated::Ref<'_> {
4506 match self.raw.ordinal() {
4507 1 => crate::wire::node_info_deprecated::Ref::Service(unsafe {
4508 self.raw.get().deref_unchecked::<crate::wire::Service>()
4509 }),
4510
4511 2 => crate::wire::node_info_deprecated::Ref::File(unsafe {
4512 self.raw.get().deref_unchecked::<crate::wire::FileObject>()
4513 }),
4514
4515 3 => crate::wire::node_info_deprecated::Ref::Directory(unsafe {
4516 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>()
4517 }),
4518
4519 4 => crate::wire::node_info_deprecated::Ref::Symlink(unsafe {
4520 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>()
4521 }),
4522
4523 _ => unsafe { ::core::hint::unreachable_unchecked() },
4524 }
4525 }
4526 }
4527
4528 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4529 where
4530 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4531 ___D: ::fidl_next::Decoder<'de>,
4532 ___D: ::fidl_next::fuchsia::HandleDecoder,
4533 {
4534 fn decode(
4535 mut slot: ::fidl_next::Slot<'_, Self>,
4536 decoder: &mut ___D,
4537 _: (),
4538 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4539 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4540 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4541 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4542 raw,
4543 decoder,
4544 (),
4545 )?,
4546
4547 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4548 raw,
4549 decoder,
4550 (),
4551 )?,
4552
4553 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4554 raw,
4555 decoder,
4556 (),
4557 )?,
4558
4559 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4560 raw,
4561 decoder,
4562 (),
4563 )?,
4564
4565 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
4566 }
4567
4568 Ok(())
4569 }
4570 }
4571
4572 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4573 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4574 match self.raw.ordinal() {
4575 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Service>().fmt(f) },
4576 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::FileObject>().fmt(f) },
4577 3 => unsafe {
4578 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>().fmt(f)
4579 },
4580 4 => unsafe {
4581 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>().fmt(f)
4582 },
4583 _ => unsafe { ::core::hint::unreachable_unchecked() },
4584 }
4585 }
4586 }
4587
4588 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4589 type Natural = crate::natural::NodeInfoDeprecated;
4590 }
4591}
4592
4593pub mod wire_optional {
4594
4595 pub use fidl_next_common_fuchsia_io::wire_optional::*;
4596
4597 #[repr(transparent)]
4598 pub struct ExtendedAttributeValue<'de> {
4599 pub(crate) raw: ::fidl_next::wire::Union,
4600 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4601 }
4602
4603 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
4604 type Constraint = ();
4605
4606 fn validate(
4607 _: ::fidl_next::Slot<'_, Self>,
4608 _: Self::Constraint,
4609 ) -> Result<(), ::fidl_next::ValidationError> {
4610 Ok(())
4611 }
4612 }
4613
4614 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
4615 type Narrowed<'de> = ExtendedAttributeValue<'de>;
4616
4617 #[inline]
4618 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4619 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4620 ::fidl_next::wire::Union::zero_padding(raw);
4621 }
4622 }
4623
4624 impl<'de> ExtendedAttributeValue<'de> {
4625 pub fn is_some(&self) -> bool {
4626 self.raw.is_some()
4627 }
4628
4629 pub fn is_none(&self) -> bool {
4630 self.raw.is_none()
4631 }
4632
4633 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ExtendedAttributeValue<'de>> {
4634 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4635 }
4636
4637 pub fn into_option(
4638 self,
4639 ) -> ::core::option::Option<crate::wire::ExtendedAttributeValue<'de>> {
4640 if self.is_some() {
4641 Some(crate::wire::ExtendedAttributeValue {
4642 raw: self.raw,
4643 _phantom: ::core::marker::PhantomData,
4644 })
4645 } else {
4646 None
4647 }
4648 }
4649 }
4650
4651 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
4652 where
4653 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4654 ___D: ::fidl_next::Decoder<'de>,
4655 ___D: ::fidl_next::fuchsia::HandleDecoder,
4656 {
4657 fn decode(
4658 mut slot: ::fidl_next::Slot<'_, Self>,
4659 decoder: &mut ___D,
4660 _: (),
4661 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4662 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4663 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4664 1 => {
4665 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
4666 raw,
4667 decoder,
4668 (32768, ()),
4669 )?
4670 }
4671
4672 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Vmo>(
4673 raw,
4674 decoder,
4675 (),
4676 )?,
4677
4678 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4679 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4680 }
4681
4682 Ok(())
4683 }
4684 }
4685
4686 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
4687 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4688 self.as_ref().fmt(f)
4689 }
4690 }
4691
4692 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
4693 type Natural = ::core::option::Option<crate::natural::ExtendedAttributeValue>;
4694 }
4695
4696 #[repr(transparent)]
4697 pub struct Representation<'de> {
4698 pub(crate) raw: ::fidl_next::wire::Union,
4699 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4700 }
4701
4702 impl ::fidl_next::Constrained for Representation<'_> {
4703 type Constraint = ();
4704
4705 fn validate(
4706 _: ::fidl_next::Slot<'_, Self>,
4707 _: Self::Constraint,
4708 ) -> Result<(), ::fidl_next::ValidationError> {
4709 Ok(())
4710 }
4711 }
4712
4713 unsafe impl ::fidl_next::Wire for Representation<'static> {
4714 type Narrowed<'de> = Representation<'de>;
4715
4716 #[inline]
4717 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4718 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4719 ::fidl_next::wire::Union::zero_padding(raw);
4720 }
4721 }
4722
4723 impl<'de> Representation<'de> {
4724 pub fn is_some(&self) -> bool {
4725 self.raw.is_some()
4726 }
4727
4728 pub fn is_none(&self) -> bool {
4729 self.raw.is_none()
4730 }
4731
4732 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Representation<'de>> {
4733 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4734 }
4735
4736 pub fn into_option(self) -> ::core::option::Option<crate::wire::Representation<'de>> {
4737 if self.is_some() {
4738 Some(crate::wire::Representation {
4739 raw: self.raw,
4740 _phantom: ::core::marker::PhantomData,
4741 })
4742 } else {
4743 None
4744 }
4745 }
4746 }
4747
4748 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
4749 where
4750 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4751 ___D: ::fidl_next::Decoder<'de>,
4752 ___D: ::fidl_next::fuchsia::HandleDecoder,
4753 {
4754 fn decode(
4755 mut slot: ::fidl_next::Slot<'_, Self>,
4756 decoder: &mut ___D,
4757 _: (),
4758 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4759 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4760 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4761 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
4762 raw,
4763 decoder,
4764 (),
4765 )?,
4766
4767 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
4768 raw,
4769 decoder,
4770 (),
4771 )?,
4772
4773 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
4774 raw,
4775 decoder,
4776 (),
4777 )?,
4778
4779 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
4780 raw,
4781 decoder,
4782 (),
4783 )?,
4784
4785 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4786 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4787 }
4788
4789 Ok(())
4790 }
4791 }
4792
4793 impl<'de> ::core::fmt::Debug for Representation<'de> {
4794 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4795 self.as_ref().fmt(f)
4796 }
4797 }
4798
4799 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
4800 type Natural = ::core::option::Option<crate::natural::Representation>;
4801 }
4802
4803 #[repr(transparent)]
4804 pub struct NodeInfoDeprecated<'de> {
4805 pub(crate) raw: ::fidl_next::wire::Union,
4806 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4807 }
4808
4809 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4810 type Constraint = ();
4811
4812 fn validate(
4813 _: ::fidl_next::Slot<'_, Self>,
4814 _: Self::Constraint,
4815 ) -> Result<(), ::fidl_next::ValidationError> {
4816 Ok(())
4817 }
4818 }
4819
4820 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4821 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4822
4823 #[inline]
4824 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4825 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4826 ::fidl_next::wire::Union::zero_padding(raw);
4827 }
4828 }
4829
4830 impl<'de> NodeInfoDeprecated<'de> {
4831 pub fn is_some(&self) -> bool {
4832 self.raw.is_some()
4833 }
4834
4835 pub fn is_none(&self) -> bool {
4836 self.raw.is_none()
4837 }
4838
4839 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::NodeInfoDeprecated<'de>> {
4840 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4841 }
4842
4843 pub fn into_option(self) -> ::core::option::Option<crate::wire::NodeInfoDeprecated<'de>> {
4844 if self.is_some() {
4845 Some(crate::wire::NodeInfoDeprecated {
4846 raw: self.raw,
4847 _phantom: ::core::marker::PhantomData,
4848 })
4849 } else {
4850 None
4851 }
4852 }
4853 }
4854
4855 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4856 where
4857 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4858 ___D: ::fidl_next::Decoder<'de>,
4859 ___D: ::fidl_next::fuchsia::HandleDecoder,
4860 {
4861 fn decode(
4862 mut slot: ::fidl_next::Slot<'_, Self>,
4863 decoder: &mut ___D,
4864 _: (),
4865 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4866 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4867 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4868 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4869 raw,
4870 decoder,
4871 (),
4872 )?,
4873
4874 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4875 raw,
4876 decoder,
4877 (),
4878 )?,
4879
4880 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4881 raw,
4882 decoder,
4883 (),
4884 )?,
4885
4886 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4887 raw,
4888 decoder,
4889 (),
4890 )?,
4891
4892 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4893 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4894 }
4895
4896 Ok(())
4897 }
4898 }
4899
4900 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4901 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4902 self.as_ref().fmt(f)
4903 }
4904 }
4905
4906 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4907 type Natural = ::core::option::Option<crate::natural::NodeInfoDeprecated>;
4908 }
4909}
4910
4911pub mod generic {
4912
4913 pub use fidl_next_common_fuchsia_io::generic::*;
4914
4915 pub struct DirectoryGetTokenResponse<T0, T1> {
4917 pub s: T0,
4918
4919 pub token: T1,
4920 }
4921
4922 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>
4923 for DirectoryGetTokenResponse<T0, T1>
4924 where
4925 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4926 ___E: ::fidl_next::fuchsia::HandleEncoder,
4927 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
4928 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
4929 {
4930 #[inline]
4931 fn encode(
4932 self,
4933 encoder_: &mut ___E,
4934 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryGetTokenResponse>,
4935 _: (),
4936 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4937 ::fidl_next::munge! {
4938 let crate::wire::DirectoryGetTokenResponse {
4939 s,
4940 token,
4941
4942 } = out_;
4943 }
4944
4945 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4946
4947 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
4948
4949 Ok(())
4950 }
4951 }
4952
4953 pub struct DirectoryLinkRequest<T0, T1, T2> {
4955 pub src: T0,
4956
4957 pub dst_parent_token: T1,
4958
4959 pub dst: T2,
4960 }
4961
4962 unsafe impl<___E, T0, T1, T2>
4963 ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
4964 for DirectoryLinkRequest<T0, T1, T2>
4965 where
4966 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4967 ___E: ::fidl_next::Encoder,
4968 ___E: ::fidl_next::fuchsia::HandleEncoder,
4969 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4970 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
4971 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4972 {
4973 #[inline]
4974 fn encode(
4975 self,
4976 encoder_: &mut ___E,
4977 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
4978 _: (),
4979 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4980 ::fidl_next::munge! {
4981 let crate::wire::DirectoryLinkRequest {
4982 src,
4983 dst_parent_token,
4984 dst,
4985
4986 } = out_;
4987 }
4988
4989 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
4990
4991 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
4992
4993 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
4994
4995 Ok(())
4996 }
4997 }
4998
4999 pub struct DirectoryRenameRequest<T0, T1, T2> {
5001 pub src: T0,
5002
5003 pub dst_parent_token: T1,
5004
5005 pub dst: T2,
5006 }
5007
5008 unsafe impl<___E, T0, T1, T2>
5009 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
5010 for DirectoryRenameRequest<T0, T1, T2>
5011 where
5012 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5013 ___E: ::fidl_next::Encoder,
5014 ___E: ::fidl_next::fuchsia::HandleEncoder,
5015 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5016 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5017 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5018 {
5019 #[inline]
5020 fn encode(
5021 self,
5022 encoder_: &mut ___E,
5023 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
5024 _: (),
5025 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5026 ::fidl_next::munge! {
5027 let crate::wire::DirectoryRenameRequest {
5028 src,
5029 dst_parent_token,
5030 dst,
5031
5032 } = out_;
5033 }
5034
5035 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5036
5037 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5038
5039 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5040
5041 Ok(())
5042 }
5043 }
5044
5045 pub struct DirectoryWatchRequest<T0, T1, T2> {
5047 pub mask: T0,
5048
5049 pub options: T1,
5050
5051 pub watcher: T2,
5052 }
5053
5054 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
5055 for DirectoryWatchRequest<T0, T1, T2>
5056 where
5057 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5058 ___E: ::fidl_next::fuchsia::HandleEncoder,
5059 T0: ::fidl_next::Encode<crate::wire::WatchMask, ___E>,
5060 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5061 T2: ::fidl_next::Encode<
5062 ::fidl_next::ServerEnd<
5063 crate::DirectoryWatcher,
5064 ::fidl_next::wire::fuchsia::Channel,
5065 >,
5066 ___E,
5067 >,
5068 {
5069 #[inline]
5070 fn encode(
5071 self,
5072 encoder_: &mut ___E,
5073 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
5074 _: (),
5075 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5076 ::fidl_next::munge! {
5077 let crate::wire::DirectoryWatchRequest {
5078 mask,
5079 options,
5080 watcher,
5081
5082 } = out_;
5083 }
5084
5085 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
5086
5087 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5088
5089 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
5090
5091 Ok(())
5092 }
5093 }
5094
5095 pub struct NodeOnOpenRequest<T0, T1> {
5097 pub s: T0,
5098
5099 pub info: T1,
5100 }
5101
5102 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
5103 for NodeOnOpenRequest<T0, T1>
5104 where
5105 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5106 ___E: ::fidl_next::Encoder,
5107 ___E: ::fidl_next::fuchsia::HandleEncoder,
5108 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5109 T1: ::fidl_next::Encode<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>,
5110 {
5111 #[inline]
5112 fn encode(
5113 self,
5114 encoder_: &mut ___E,
5115 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
5116 _: (),
5117 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5118 ::fidl_next::munge! {
5119 let crate::wire::NodeOnOpenRequest {
5120 s,
5121 info,
5122
5123 } = out_;
5124 }
5125
5126 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5127
5128 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
5129
5130 Ok(())
5131 }
5132 }
5133
5134 pub struct NodeListExtendedAttributesRequest<T0> {
5136 pub iterator: T0,
5137 }
5138
5139 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
5140 for NodeListExtendedAttributesRequest<T0>
5141 where
5142 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5143 ___E: ::fidl_next::fuchsia::HandleEncoder,
5144 T0: ::fidl_next::Encode<
5145 ::fidl_next::ServerEnd<
5146 crate::ExtendedAttributeIterator,
5147 ::fidl_next::wire::fuchsia::Channel,
5148 >,
5149 ___E,
5150 >,
5151 {
5152 #[inline]
5153 fn encode(
5154 self,
5155 encoder_: &mut ___E,
5156 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
5157 _: (),
5158 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5159 ::fidl_next::munge! {
5160 let crate::wire::NodeListExtendedAttributesRequest {
5161 iterator,
5162
5163 } = out_;
5164 }
5165
5166 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
5167
5168 Ok(())
5169 }
5170 }
5171
5172 pub struct NodeSetExtendedAttributeRequest<T0, T1, T2> {
5174 pub name: T0,
5175
5176 pub value: T1,
5177
5178 pub mode: T2,
5179 }
5180
5181 unsafe impl<___E, T0, T1, T2>
5182 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
5183 for NodeSetExtendedAttributeRequest<T0, T1, T2>
5184 where
5185 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5186 ___E: ::fidl_next::Encoder,
5187 ___E: ::fidl_next::fuchsia::HandleEncoder,
5188 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5189 T1: ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
5190 T2: ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>,
5191 {
5192 #[inline]
5193 fn encode(
5194 self,
5195 encoder_: &mut ___E,
5196 out_: &mut ::core::mem::MaybeUninit<
5197 crate::wire::NodeSetExtendedAttributeRequest<'static>,
5198 >,
5199 _: (),
5200 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5201 ::fidl_next::munge! {
5202 let crate::wire::NodeSetExtendedAttributeRequest {
5203 name,
5204 value,
5205 mode,
5206
5207 } = out_;
5208 }
5209
5210 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
5211
5212 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
5213
5214 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5215
5216 Ok(())
5217 }
5218 }
5219
5220 pub struct DirectoryOpenRequest<T0, T1, T2, T3> {
5222 pub path: T0,
5223
5224 pub flags: T1,
5225
5226 pub options: T2,
5227
5228 pub object: T3,
5229 }
5230
5231 unsafe impl<___E, T0, T1, T2, T3>
5232 ::fidl_next::Encode<crate::wire::DirectoryOpenRequest<'static>, ___E>
5233 for DirectoryOpenRequest<T0, T1, T2, T3>
5234 where
5235 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5236 ___E: ::fidl_next::Encoder,
5237 ___E: ::fidl_next::fuchsia::HandleEncoder,
5238 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5239 T1: ::fidl_next::Encode<crate::wire::Flags, ___E>,
5240 T2: ::fidl_next::Encode<crate::wire::Options<'static>, ___E>,
5241 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
5242 {
5243 #[inline]
5244 fn encode(
5245 self,
5246 encoder_: &mut ___E,
5247 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryOpenRequest<'static>>,
5248 _: (),
5249 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5250 ::fidl_next::munge! {
5251 let crate::wire::DirectoryOpenRequest {
5252 path,
5253 flags,
5254 options,
5255 object,
5256
5257 } = out_;
5258 }
5259
5260 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5261
5262 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5263
5264 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5265
5266 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5267
5268 Ok(())
5269 }
5270 }
5271
5272 pub struct NodeDeprecatedCloneRequest<T0, T1> {
5274 pub flags: T0,
5275
5276 pub object: T1,
5277 }
5278
5279 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
5280 for NodeDeprecatedCloneRequest<T0, T1>
5281 where
5282 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5283 ___E: ::fidl_next::fuchsia::HandleEncoder,
5284 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5285 T1: ::fidl_next::Encode<
5286 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5287 ___E,
5288 >,
5289 {
5290 #[inline]
5291 fn encode(
5292 self,
5293 encoder_: &mut ___E,
5294 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
5295 _: (),
5296 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5297 ::fidl_next::munge! {
5298 let crate::wire::NodeDeprecatedCloneRequest {
5299 flags,
5300 object,
5301
5302 } = out_;
5303 }
5304
5305 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5306
5307 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5308
5309 Ok(())
5310 }
5311 }
5312
5313 pub struct DirectoryDeprecatedOpenRequest<T0, T1, T2, T3> {
5315 pub flags: T0,
5316
5317 pub mode: T1,
5318
5319 pub path: T2,
5320
5321 pub object: T3,
5322 }
5323
5324 unsafe impl<___E, T0, T1, T2, T3>
5325 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
5326 for DirectoryDeprecatedOpenRequest<T0, T1, T2, T3>
5327 where
5328 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5329 ___E: ::fidl_next::Encoder,
5330 ___E: ::fidl_next::fuchsia::HandleEncoder,
5331 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5332 T1: ::fidl_next::Encode<crate::wire::ModeType, ___E>,
5333 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5334 T3: ::fidl_next::Encode<
5335 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5336 ___E,
5337 >,
5338 {
5339 #[inline]
5340 fn encode(
5341 self,
5342 encoder_: &mut ___E,
5343 out_: &mut ::core::mem::MaybeUninit<
5344 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
5345 >,
5346 _: (),
5347 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5348 ::fidl_next::munge! {
5349 let crate::wire::DirectoryDeprecatedOpenRequest {
5350 flags,
5351 mode,
5352 path,
5353 object,
5354
5355 } = out_;
5356 }
5357
5358 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5359
5360 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5361
5362 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5363
5364 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5365
5366 Ok(())
5367 }
5368 }
5369
5370 pub struct DirectoryCreateSymlinkRequest<T0, T1, T2> {
5372 pub name: T0,
5373
5374 pub target: T1,
5375
5376 pub connection: T2,
5377 }
5378
5379 unsafe impl<___E, T0, T1, T2>
5380 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
5381 for DirectoryCreateSymlinkRequest<T0, T1, T2>
5382 where
5383 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5384 ___E: ::fidl_next::Encoder,
5385 ___E: ::fidl_next::fuchsia::HandleEncoder,
5386 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5387 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5388 T2: ::fidl_next::Encode<
5389 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
5390 ___E,
5391 >,
5392 {
5393 #[inline]
5394 fn encode(
5395 self,
5396 encoder_: &mut ___E,
5397 out_: &mut ::core::mem::MaybeUninit<
5398 crate::wire::DirectoryCreateSymlinkRequest<'static>,
5399 >,
5400 _: (),
5401 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5402 ::fidl_next::munge! {
5403 let crate::wire::DirectoryCreateSymlinkRequest {
5404 name,
5405 target,
5406 connection,
5407
5408 } = out_;
5409 }
5410
5411 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
5412
5413 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
5414
5415 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
5416
5417 Ok(())
5418 }
5419 }
5420
5421 pub struct FileGetBackingMemoryResponse<T0> {
5423 pub vmo: T0,
5424 }
5425
5426 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
5427 for FileGetBackingMemoryResponse<T0>
5428 where
5429 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5430 ___E: ::fidl_next::fuchsia::HandleEncoder,
5431 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
5432 {
5433 #[inline]
5434 fn encode(
5435 self,
5436 encoder_: &mut ___E,
5437 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
5438 _: (),
5439 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5440 ::fidl_next::munge! {
5441 let crate::wire::FileGetBackingMemoryResponse {
5442 vmo,
5443
5444 } = out_;
5445 }
5446
5447 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
5448
5449 Ok(())
5450 }
5451 }
5452
5453 pub struct LinkableLinkIntoRequest<T0, T1> {
5455 pub dst_parent_token: T0,
5456
5457 pub dst: T1,
5458 }
5459
5460 unsafe impl<___E, T0, T1>
5461 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
5462 for LinkableLinkIntoRequest<T0, T1>
5463 where
5464 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5465 ___E: ::fidl_next::Encoder,
5466 ___E: ::fidl_next::fuchsia::HandleEncoder,
5467 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5468 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5469 {
5470 #[inline]
5471 fn encode(
5472 self,
5473 encoder_: &mut ___E,
5474 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
5475 _: (),
5476 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5477 ::fidl_next::munge! {
5478 let crate::wire::LinkableLinkIntoRequest {
5479 dst_parent_token,
5480 dst,
5481
5482 } = out_;
5483 }
5484
5485 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5486
5487 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5488
5489 Ok(())
5490 }
5491 }
5492
5493 pub struct FileAllocateRequest<T0, T1, T2> {
5495 pub offset: T0,
5496
5497 pub length: T1,
5498
5499 pub mode: T2,
5500 }
5501
5502 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
5503 for FileAllocateRequest<T0, T1, T2>
5504 where
5505 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5506 ___E: ::fidl_next::fuchsia::HandleEncoder,
5507 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5508 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5509 T2: ::fidl_next::Encode<crate::wire::AllocateMode, ___E>,
5510 {
5511 #[inline]
5512 fn encode(
5513 self,
5514 encoder_: &mut ___E,
5515 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
5516 _: (),
5517 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5518 ::fidl_next::munge! {
5519 let crate::wire::FileAllocateRequest {
5520 offset,
5521 length,
5522 mode,
5523
5524 } = out_;
5525 }
5526
5527 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
5528
5529 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
5530
5531 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5532
5533 Ok(())
5534 }
5535 }
5536
5537 pub struct FileEnableVerityRequest<T0> {
5539 pub options: T0,
5540 }
5541
5542 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
5543 for FileEnableVerityRequest<T0>
5544 where
5545 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5546 ___E: ::fidl_next::Encoder,
5547 ___E: ::fidl_next::fuchsia::HandleEncoder,
5548 T0: ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>,
5549 {
5550 #[inline]
5551 fn encode(
5552 self,
5553 encoder_: &mut ___E,
5554 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
5555 _: (),
5556 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5557 ::fidl_next::munge! {
5558 let crate::wire::FileEnableVerityRequest {
5559 options,
5560
5561 } = out_;
5562 }
5563
5564 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5565
5566 Ok(())
5567 }
5568 }
5569
5570 pub struct FileObject<T0, T1> {
5572 pub event: T0,
5573
5574 pub stream: T1,
5575 }
5576
5577 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject<T0, T1>
5578 where
5579 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5580 ___E: ::fidl_next::fuchsia::HandleEncoder,
5581 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
5582 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalStream, ___E>,
5583 {
5584 #[inline]
5585 fn encode(
5586 self,
5587 encoder_: &mut ___E,
5588 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
5589 _: (),
5590 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5591 ::fidl_next::munge! {
5592 let crate::wire::FileObject {
5593 event,
5594 stream,
5595
5596 } = out_;
5597 }
5598
5599 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
5600
5601 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
5602
5603 Ok(())
5604 }
5605 }
5606}
5607
5608pub use self::natural::*;
5609
5610#[doc = " Node defines the minimal interface for entities which can be accessed in a filesystem.\n"]
5612#[derive(PartialEq, Debug)]
5613pub struct Node;
5614
5615impl ::fidl_next::Discoverable for Node {
5616 const PROTOCOL_NAME: &'static str = "fuchsia.io.Node";
5617}
5618
5619#[cfg(target_os = "fuchsia")]
5620impl ::fidl_next::HasTransport for Node {
5621 type Transport = ::fidl_next::fuchsia::zx::Channel;
5622}
5623
5624pub mod node {
5625 pub mod prelude {
5626 pub use crate::{
5627 Node, NodeClientHandler, NodeLocalClientHandler, NodeLocalServerHandler,
5628 NodeServerHandler, node,
5629 };
5630
5631 pub use crate::natural::ExtendedAttributeValue;
5632
5633 pub use crate::natural::MutableNodeAttributes;
5634
5635 pub use crate::natural::NodeAttributes2;
5636
5637 pub use crate::natural::NodeDeprecatedCloneRequest;
5638
5639 pub use crate::natural::NodeDeprecatedGetAttrResponse;
5640
5641 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
5642
5643 pub use crate::natural::NodeDeprecatedSetAttrRequest;
5644
5645 pub use crate::natural::NodeDeprecatedSetAttrResponse;
5646
5647 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
5648
5649 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
5650
5651 pub use crate::natural::NodeGetAttributesRequest;
5652
5653 pub use crate::natural::NodeGetExtendedAttributeRequest;
5654
5655 pub use crate::natural::NodeListExtendedAttributesRequest;
5656
5657 pub use crate::natural::NodeOnOpenRequest;
5658
5659 pub use crate::natural::NodeQueryFilesystemResponse;
5660
5661 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
5662
5663 pub use crate::natural::NodeSetExtendedAttributeRequest;
5664
5665 pub use crate::natural::NodeSetFlagsRequest;
5666
5667 pub use crate::natural::NodeGetFlagsResponse;
5668
5669 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
5670
5671 pub use crate::natural::NodeSetExtendedAttributeResponse;
5672
5673 pub use crate::natural::NodeSetFlagsResponse;
5674
5675 pub use crate::natural::NodeSyncResponse;
5676
5677 pub use crate::natural::NodeUpdateAttributesResponse;
5678
5679 pub use crate::natural::Representation;
5680
5681 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
5682
5683 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
5684
5685 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
5686 }
5687
5688 pub struct Clone;
5689
5690 impl ::fidl_next::Method for Clone {
5691 const ORDINAL: u64 = 2366825959783828089;
5692 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5693 ::fidl_next::protocol::Flexibility::Strict;
5694
5695 type Protocol = crate::Node;
5696
5697 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
5698 }
5699
5700 pub struct Close;
5701
5702 impl ::fidl_next::Method for Close {
5703 const ORDINAL: u64 = 6540867515453498750;
5704 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5705 ::fidl_next::protocol::Flexibility::Strict;
5706
5707 type Protocol = crate::Node;
5708
5709 type Request = ::fidl_next::wire::EmptyMessageBody;
5710 }
5711
5712 impl ::fidl_next::TwoWayMethod for Close {
5713 type Response = ::fidl_next::wire::Result<
5714 'static,
5715 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
5716 ::fidl_next::wire::Int32,
5717 >;
5718 }
5719
5720 impl<___R> ::fidl_next::Respond<___R> for Close {
5721 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
5722
5723 fn respond(response: ___R) -> Self::Output {
5724 ::core::result::Result::Ok(response)
5725 }
5726 }
5727
5728 impl<___R> ::fidl_next::RespondErr<___R> for Close {
5729 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
5730
5731 fn respond_err(response: ___R) -> Self::Output {
5732 ::core::result::Result::Err(response)
5733 }
5734 }
5735
5736 pub struct Query;
5737
5738 impl ::fidl_next::Method for Query {
5739 const ORDINAL: u64 = 2763219980499352582;
5740 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5741 ::fidl_next::protocol::Flexibility::Strict;
5742
5743 type Protocol = crate::Node;
5744
5745 type Request = ::fidl_next::wire::EmptyMessageBody;
5746 }
5747
5748 impl ::fidl_next::TwoWayMethod for Query {
5749 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
5750 }
5751
5752 impl<___R> ::fidl_next::Respond<___R> for Query {
5753 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
5754
5755 fn respond(response: ___R) -> Self::Output {
5756 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
5757 }
5758 }
5759
5760 pub struct DeprecatedClone;
5761
5762 impl ::fidl_next::Method for DeprecatedClone {
5763 const ORDINAL: u64 = 6512600400724287855;
5764 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5765 ::fidl_next::protocol::Flexibility::Flexible;
5766
5767 type Protocol = crate::Node;
5768
5769 type Request = crate::wire::NodeDeprecatedCloneRequest;
5770 }
5771
5772 pub struct OnOpen;
5773
5774 impl ::fidl_next::Method for OnOpen {
5775 const ORDINAL: u64 = 9207534335756671346;
5776 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5777 ::fidl_next::protocol::Flexibility::Flexible;
5778
5779 type Protocol = crate::Node;
5780
5781 type Request = crate::wire::NodeOnOpenRequest<'static>;
5782 }
5783
5784 pub struct DeprecatedGetAttr;
5785
5786 impl ::fidl_next::Method for DeprecatedGetAttr {
5787 const ORDINAL: u64 = 8689798978500614909;
5788 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5789 ::fidl_next::protocol::Flexibility::Strict;
5790
5791 type Protocol = crate::Node;
5792
5793 type Request = ::fidl_next::wire::EmptyMessageBody;
5794 }
5795
5796 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
5797 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
5798 }
5799
5800 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
5801 type Output = ___R;
5802
5803 fn respond(response: ___R) -> Self::Output {
5804 response
5805 }
5806 }
5807
5808 pub struct DeprecatedSetAttr;
5809
5810 impl ::fidl_next::Method for DeprecatedSetAttr {
5811 const ORDINAL: u64 = 4721673413776871238;
5812 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5813 ::fidl_next::protocol::Flexibility::Strict;
5814
5815 type Protocol = crate::Node;
5816
5817 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
5818 }
5819
5820 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
5821 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
5822 }
5823
5824 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
5825 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
5826
5827 fn respond(response: ___R) -> Self::Output {
5828 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
5829 }
5830 }
5831
5832 pub struct DeprecatedGetFlags;
5833
5834 impl ::fidl_next::Method for DeprecatedGetFlags {
5835 const ORDINAL: u64 = 6595803110182632097;
5836 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5837 ::fidl_next::protocol::Flexibility::Strict;
5838
5839 type Protocol = crate::Node;
5840
5841 type Request = ::fidl_next::wire::EmptyMessageBody;
5842 }
5843
5844 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
5845 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
5846 }
5847
5848 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
5849 type Output = ___R;
5850
5851 fn respond(response: ___R) -> Self::Output {
5852 response
5853 }
5854 }
5855
5856 pub struct DeprecatedSetFlags;
5857
5858 impl ::fidl_next::Method for DeprecatedSetFlags {
5859 const ORDINAL: u64 = 5950864159036794675;
5860 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5861 ::fidl_next::protocol::Flexibility::Strict;
5862
5863 type Protocol = crate::Node;
5864
5865 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
5866 }
5867
5868 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
5869 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
5870 }
5871
5872 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
5873 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
5874
5875 fn respond(response: ___R) -> Self::Output {
5876 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
5877 }
5878 }
5879
5880 pub struct GetFlags;
5881
5882 impl ::fidl_next::Method for GetFlags {
5883 const ORDINAL: u64 = 105530239381466147;
5884 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5885 ::fidl_next::protocol::Flexibility::Flexible;
5886
5887 type Protocol = crate::Node;
5888
5889 type Request = ::fidl_next::wire::EmptyMessageBody;
5890 }
5891
5892 impl ::fidl_next::TwoWayMethod for GetFlags {
5893 type Response = ::fidl_next::wire::FlexibleResult<
5894 'static,
5895 crate::wire::NodeGetFlagsResponse,
5896 ::fidl_next::wire::Int32,
5897 >;
5898 }
5899
5900 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
5901 type Output = ::fidl_next::FlexibleResult<
5902 crate::generic::NodeGetFlagsResponse<___R>,
5903 ::fidl_next::util::Never,
5904 >;
5905
5906 fn respond(response: ___R) -> Self::Output {
5907 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
5908 flags: response,
5909 })
5910 }
5911 }
5912
5913 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
5914 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
5915
5916 fn respond_err(response: ___R) -> Self::Output {
5917 ::fidl_next::FlexibleResult::Err(response)
5918 }
5919 }
5920
5921 pub struct SetFlags;
5922
5923 impl ::fidl_next::Method for SetFlags {
5924 const ORDINAL: u64 = 6172186066099445416;
5925 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5926 ::fidl_next::protocol::Flexibility::Flexible;
5927
5928 type Protocol = crate::Node;
5929
5930 type Request = crate::wire::NodeSetFlagsRequest;
5931 }
5932
5933 impl ::fidl_next::TwoWayMethod for SetFlags {
5934 type Response = ::fidl_next::wire::FlexibleResult<
5935 'static,
5936 crate::wire::NodeSetFlagsResponse,
5937 ::fidl_next::wire::Int32,
5938 >;
5939 }
5940
5941 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
5942 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
5943
5944 fn respond(response: ___R) -> Self::Output {
5945 ::fidl_next::FlexibleResult::Ok(response)
5946 }
5947 }
5948
5949 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
5950 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
5951
5952 fn respond_err(response: ___R) -> Self::Output {
5953 ::fidl_next::FlexibleResult::Err(response)
5954 }
5955 }
5956
5957 pub struct QueryFilesystem;
5958
5959 impl ::fidl_next::Method for QueryFilesystem {
5960 const ORDINAL: u64 = 8013111122914313744;
5961 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5962 ::fidl_next::protocol::Flexibility::Strict;
5963
5964 type Protocol = crate::Node;
5965
5966 type Request = ::fidl_next::wire::EmptyMessageBody;
5967 }
5968
5969 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
5970 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
5971 }
5972
5973 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
5974 type Output = ___R;
5975
5976 fn respond(response: ___R) -> Self::Output {
5977 response
5978 }
5979 }
5980
5981 pub struct OnRepresentation;
5982
5983 impl ::fidl_next::Method for OnRepresentation {
5984 const ORDINAL: u64 = 6679970090861613324;
5985 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5986 ::fidl_next::protocol::Flexibility::Strict;
5987
5988 type Protocol = crate::Node;
5989
5990 type Request = crate::wire::Representation<'static>;
5991 }
5992
5993 pub struct GetAttributes;
5994
5995 impl ::fidl_next::Method for GetAttributes {
5996 const ORDINAL: u64 = 4414537700416816443;
5997 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5998 ::fidl_next::protocol::Flexibility::Strict;
5999
6000 type Protocol = crate::Node;
6001
6002 type Request = crate::wire::NodeGetAttributesRequest;
6003 }
6004
6005 impl ::fidl_next::TwoWayMethod for GetAttributes {
6006 type Response = ::fidl_next::wire::Result<
6007 'static,
6008 crate::wire::NodeAttributes2<'static>,
6009 ::fidl_next::wire::Int32,
6010 >;
6011 }
6012
6013 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
6014 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6015
6016 fn respond(response: ___R) -> Self::Output {
6017 ::core::result::Result::Ok(response)
6018 }
6019 }
6020
6021 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
6022 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6023
6024 fn respond_err(response: ___R) -> Self::Output {
6025 ::core::result::Result::Err(response)
6026 }
6027 }
6028
6029 pub struct UpdateAttributes;
6030
6031 impl ::fidl_next::Method for UpdateAttributes {
6032 const ORDINAL: u64 = 3677402239314018056;
6033 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6034 ::fidl_next::protocol::Flexibility::Strict;
6035
6036 type Protocol = crate::Node;
6037
6038 type Request = crate::wire::MutableNodeAttributes<'static>;
6039 }
6040
6041 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
6042 type Response = ::fidl_next::wire::Result<
6043 'static,
6044 crate::wire::NodeUpdateAttributesResponse,
6045 ::fidl_next::wire::Int32,
6046 >;
6047 }
6048
6049 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
6050 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6051
6052 fn respond(response: ___R) -> Self::Output {
6053 ::core::result::Result::Ok(response)
6054 }
6055 }
6056
6057 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
6058 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6059
6060 fn respond_err(response: ___R) -> Self::Output {
6061 ::core::result::Result::Err(response)
6062 }
6063 }
6064
6065 pub struct Sync;
6066
6067 impl ::fidl_next::Method for Sync {
6068 const ORDINAL: u64 = 3196473584242777161;
6069 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6070 ::fidl_next::protocol::Flexibility::Strict;
6071
6072 type Protocol = crate::Node;
6073
6074 type Request = ::fidl_next::wire::EmptyMessageBody;
6075 }
6076
6077 impl ::fidl_next::TwoWayMethod for Sync {
6078 type Response = ::fidl_next::wire::Result<
6079 'static,
6080 crate::wire::NodeSyncResponse,
6081 ::fidl_next::wire::Int32,
6082 >;
6083 }
6084
6085 impl<___R> ::fidl_next::Respond<___R> for Sync {
6086 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6087
6088 fn respond(response: ___R) -> Self::Output {
6089 ::core::result::Result::Ok(response)
6090 }
6091 }
6092
6093 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
6094 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6095
6096 fn respond_err(response: ___R) -> Self::Output {
6097 ::core::result::Result::Err(response)
6098 }
6099 }
6100
6101 pub struct ListExtendedAttributes;
6102
6103 impl ::fidl_next::Method for ListExtendedAttributes {
6104 const ORDINAL: u64 = 5431626189872037072;
6105 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6106 ::fidl_next::protocol::Flexibility::Strict;
6107
6108 type Protocol = crate::Node;
6109
6110 type Request = crate::wire::NodeListExtendedAttributesRequest;
6111 }
6112
6113 pub struct GetExtendedAttribute;
6114
6115 impl ::fidl_next::Method for GetExtendedAttribute {
6116 const ORDINAL: u64 = 5043930208506967771;
6117 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6118 ::fidl_next::protocol::Flexibility::Strict;
6119
6120 type Protocol = crate::Node;
6121
6122 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
6123 }
6124
6125 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
6126 type Response = ::fidl_next::wire::Result<
6127 'static,
6128 crate::wire::ExtendedAttributeValue<'static>,
6129 ::fidl_next::wire::Int32,
6130 >;
6131 }
6132
6133 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
6134 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6135
6136 fn respond(response: ___R) -> Self::Output {
6137 ::core::result::Result::Ok(response)
6138 }
6139 }
6140
6141 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
6142 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6143
6144 fn respond_err(response: ___R) -> Self::Output {
6145 ::core::result::Result::Err(response)
6146 }
6147 }
6148
6149 pub struct SetExtendedAttribute;
6150
6151 impl ::fidl_next::Method for SetExtendedAttribute {
6152 const ORDINAL: u64 = 5374223046099989052;
6153 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6154 ::fidl_next::protocol::Flexibility::Strict;
6155
6156 type Protocol = crate::Node;
6157
6158 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
6159 }
6160
6161 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
6162 type Response = ::fidl_next::wire::Result<
6163 'static,
6164 crate::wire::NodeSetExtendedAttributeResponse,
6165 ::fidl_next::wire::Int32,
6166 >;
6167 }
6168
6169 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
6170 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6171
6172 fn respond(response: ___R) -> Self::Output {
6173 ::core::result::Result::Ok(response)
6174 }
6175 }
6176
6177 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
6178 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6179
6180 fn respond_err(response: ___R) -> Self::Output {
6181 ::core::result::Result::Err(response)
6182 }
6183 }
6184
6185 pub struct RemoveExtendedAttribute;
6186
6187 impl ::fidl_next::Method for RemoveExtendedAttribute {
6188 const ORDINAL: u64 = 8794297771444732717;
6189 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6190 ::fidl_next::protocol::Flexibility::Strict;
6191
6192 type Protocol = crate::Node;
6193
6194 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
6195 }
6196
6197 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
6198 type Response = ::fidl_next::wire::Result<
6199 'static,
6200 crate::wire::NodeRemoveExtendedAttributeResponse,
6201 ::fidl_next::wire::Int32,
6202 >;
6203 }
6204
6205 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
6206 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6207
6208 fn respond(response: ___R) -> Self::Output {
6209 ::core::result::Result::Ok(response)
6210 }
6211 }
6212
6213 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
6214 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6215
6216 fn respond_err(response: ___R) -> Self::Output {
6217 ::core::result::Result::Err(response)
6218 }
6219 }
6220
6221 mod ___detail {
6222 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
6223 where
6224 ___T: ::fidl_next::Transport,
6225 {
6226 type Client = NodeClient<___T>;
6227 type Server = NodeServer<___T>;
6228 }
6229
6230 #[repr(transparent)]
6232 pub struct NodeClient<___T: ::fidl_next::Transport> {
6233 #[allow(dead_code)]
6234 client: ::fidl_next::protocol::Client<___T>,
6235 }
6236
6237 impl<___T> NodeClient<___T>
6238 where
6239 ___T: ::fidl_next::Transport,
6240 {
6241 pub fn clone(
6242 &self,
6243
6244 request: impl ::fidl_next::Encode<
6245 ::fidl_next::ServerEnd<
6246 ::fidl_next_fuchsia_unknown::Cloneable,
6247 ::fidl_next::wire::fuchsia::Channel,
6248 >,
6249 <___T as ::fidl_next::Transport>::SendBuffer,
6250 >,
6251 ) -> ::fidl_next::SendFuture<'_, ___T>
6252 where
6253 <___T as ::fidl_next::Transport>::SendBuffer:
6254 ::fidl_next::encoder::InternalHandleEncoder,
6255 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6256 {
6257 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
6258 request,
6259 })
6260 }
6261
6262 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6263 where
6264 ___R: ::fidl_next::Encode<
6265 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
6266 <___T as ::fidl_next::Transport>::SendBuffer,
6267 >,
6268 {
6269 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6270 2366825959783828089,
6271 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
6272 request,
6273 ))
6274 }
6275
6276 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
6277 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
6278 ::fidl_next::TwoWayFuture::from_untyped(
6279 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6280 6540867515453498750,
6281 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
6282 (),
6283 ),
6284 )
6285 }
6286
6287 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
6288 ::fidl_next::TwoWayFuture::from_untyped(
6289 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6290 2763219980499352582,
6291 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
6292 (),
6293 ),
6294 )
6295 }
6296
6297 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6298 pub fn deprecated_clone(
6299 &self,
6300
6301 flags: impl ::fidl_next::Encode<
6302 crate::wire::OpenFlags,
6303 <___T as ::fidl_next::Transport>::SendBuffer,
6304 >,
6305
6306 object: impl ::fidl_next::Encode<
6307 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
6308 <___T as ::fidl_next::Transport>::SendBuffer,
6309 >,
6310 ) -> ::fidl_next::SendFuture<'_, ___T>
6311 where
6312 <___T as ::fidl_next::Transport>::SendBuffer:
6313 ::fidl_next::encoder::InternalHandleEncoder,
6314 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6315 {
6316 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
6317 flags,
6318
6319 object,
6320 })
6321 }
6322
6323 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6324 pub fn deprecated_clone_with<___R>(
6325 &self,
6326 request: ___R,
6327 ) -> ::fidl_next::SendFuture<'_, ___T>
6328 where
6329 ___R: ::fidl_next::Encode<
6330 crate::wire::NodeDeprecatedCloneRequest,
6331 <___T as ::fidl_next::Transport>::SendBuffer,
6332 >,
6333 {
6334 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6335 6512600400724287855,
6336 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
6337 request,
6338 ))
6339 }
6340
6341 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6342 pub fn deprecated_get_attr(
6343 &self,
6344 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
6345 ::fidl_next::TwoWayFuture::from_untyped(
6346 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6347 8689798978500614909,
6348 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
6349 (),
6350 ),
6351 )
6352 }
6353
6354 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6355 pub fn deprecated_set_attr(
6356 &self,
6357
6358 flags: impl ::fidl_next::Encode<
6359 crate::wire::NodeAttributeFlags,
6360 <___T as ::fidl_next::Transport>::SendBuffer,
6361 >,
6362
6363 attributes: impl ::fidl_next::Encode<
6364 crate::wire::NodeAttributes,
6365 <___T as ::fidl_next::Transport>::SendBuffer,
6366 >,
6367 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6368 where
6369 <___T as ::fidl_next::Transport>::SendBuffer:
6370 ::fidl_next::encoder::InternalHandleEncoder,
6371 {
6372 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
6373 flags,
6374
6375 attributes,
6376 })
6377 }
6378
6379 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6380 pub fn deprecated_set_attr_with<___R>(
6381 &self,
6382 request: ___R,
6383 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6384 where
6385 ___R: ::fidl_next::Encode<
6386 crate::wire::NodeDeprecatedSetAttrRequest,
6387 <___T as ::fidl_next::Transport>::SendBuffer,
6388 >,
6389 {
6390 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6391 4721673413776871238,
6392 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
6393 request,
6394 ))
6395 }
6396
6397 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6398 pub fn deprecated_get_flags(
6399 &self,
6400 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
6401 ::fidl_next::TwoWayFuture::from_untyped(
6402 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6403 6595803110182632097,
6404 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
6405 (),
6406 ),
6407 )
6408 }
6409
6410 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6411 pub fn deprecated_set_flags(
6412 &self,
6413
6414 flags: impl ::fidl_next::Encode<
6415 crate::wire::OpenFlags,
6416 <___T as ::fidl_next::Transport>::SendBuffer,
6417 >,
6418 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6419 where
6420 <___T as ::fidl_next::Transport>::SendBuffer:
6421 ::fidl_next::encoder::InternalHandleEncoder,
6422 {
6423 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
6424 flags,
6425 })
6426 }
6427
6428 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6429 pub fn deprecated_set_flags_with<___R>(
6430 &self,
6431 request: ___R,
6432 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6433 where
6434 ___R: ::fidl_next::Encode<
6435 crate::wire::NodeDeprecatedSetFlagsRequest,
6436 <___T as ::fidl_next::Transport>::SendBuffer,
6437 >,
6438 {
6439 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6440 5950864159036794675,
6441 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
6442 request,
6443 ))
6444 }
6445
6446 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
6447 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
6448 ::fidl_next::TwoWayFuture::from_untyped(
6449 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6450 105530239381466147,
6451 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
6452 (),
6453 ),
6454 )
6455 }
6456
6457 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
6458 pub fn set_flags(
6459 &self,
6460
6461 flags: impl ::fidl_next::Encode<
6462 crate::wire::Flags,
6463 <___T as ::fidl_next::Transport>::SendBuffer,
6464 >,
6465 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6466 where
6467 <___T as ::fidl_next::Transport>::SendBuffer:
6468 ::fidl_next::encoder::InternalHandleEncoder,
6469 {
6470 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
6471 }
6472
6473 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
6474 pub fn set_flags_with<___R>(
6475 &self,
6476 request: ___R,
6477 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6478 where
6479 ___R: ::fidl_next::Encode<
6480 crate::wire::NodeSetFlagsRequest,
6481 <___T as ::fidl_next::Transport>::SendBuffer,
6482 >,
6483 {
6484 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6485 6172186066099445416,
6486 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
6487 request,
6488 ))
6489 }
6490
6491 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
6492 pub fn query_filesystem(
6493 &self,
6494 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
6495 ::fidl_next::TwoWayFuture::from_untyped(
6496 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6497 8013111122914313744,
6498 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
6499 (),
6500 ),
6501 )
6502 }
6503
6504 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
6505 pub fn get_attributes(
6506 &self,
6507
6508 query: impl ::fidl_next::Encode<
6509 crate::wire::NodeAttributesQuery,
6510 <___T as ::fidl_next::Transport>::SendBuffer,
6511 >,
6512 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6513 where
6514 <___T as ::fidl_next::Transport>::SendBuffer:
6515 ::fidl_next::encoder::InternalHandleEncoder,
6516 {
6517 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
6518 }
6519
6520 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
6521 pub fn get_attributes_with<___R>(
6522 &self,
6523 request: ___R,
6524 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6525 where
6526 ___R: ::fidl_next::Encode<
6527 crate::wire::NodeGetAttributesRequest,
6528 <___T as ::fidl_next::Transport>::SendBuffer,
6529 >,
6530 {
6531 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6532 4414537700416816443,
6533 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
6534 request,
6535 ))
6536 }
6537
6538 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
6539 pub fn update_attributes_with<___R>(
6540 &self,
6541 request: ___R,
6542 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
6543 where
6544 ___R: ::fidl_next::Encode<
6545 crate::wire::MutableNodeAttributes<'static>,
6546 <___T as ::fidl_next::Transport>::SendBuffer,
6547 >,
6548 {
6549 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6550 3677402239314018056,
6551 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
6552 request,
6553 ))
6554 }
6555
6556 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
6557 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
6558 ::fidl_next::TwoWayFuture::from_untyped(
6559 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6560 3196473584242777161,
6561 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
6562 (),
6563 ),
6564 )
6565 }
6566
6567 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
6568 pub fn list_extended_attributes(
6569 &self,
6570
6571 iterator: impl ::fidl_next::Encode<
6572 ::fidl_next::ServerEnd<
6573 crate::ExtendedAttributeIterator,
6574 ::fidl_next::wire::fuchsia::Channel,
6575 >,
6576 <___T as ::fidl_next::Transport>::SendBuffer,
6577 >,
6578 ) -> ::fidl_next::SendFuture<'_, ___T>
6579 where
6580 <___T as ::fidl_next::Transport>::SendBuffer:
6581 ::fidl_next::encoder::InternalHandleEncoder,
6582 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6583 {
6584 self.list_extended_attributes_with(
6585 crate::generic::NodeListExtendedAttributesRequest { iterator },
6586 )
6587 }
6588
6589 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
6590 pub fn list_extended_attributes_with<___R>(
6591 &self,
6592 request: ___R,
6593 ) -> ::fidl_next::SendFuture<'_, ___T>
6594 where
6595 ___R: ::fidl_next::Encode<
6596 crate::wire::NodeListExtendedAttributesRequest,
6597 <___T as ::fidl_next::Transport>::SendBuffer,
6598 >,
6599 {
6600 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6601 5431626189872037072,
6602 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
6603 request,
6604 ))
6605 }
6606
6607 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
6608 pub fn get_extended_attribute(
6609 &self,
6610
6611 name: impl ::fidl_next::Encode<
6612 ::fidl_next::wire::Vector<'static, u8>,
6613 <___T as ::fidl_next::Transport>::SendBuffer,
6614 >,
6615 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
6616 where
6617 <___T as ::fidl_next::Transport>::SendBuffer:
6618 ::fidl_next::encoder::InternalHandleEncoder,
6619 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6620 {
6621 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
6622 name,
6623 })
6624 }
6625
6626 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
6627 pub fn get_extended_attribute_with<___R>(
6628 &self,
6629 request: ___R,
6630 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
6631 where
6632 ___R: ::fidl_next::Encode<
6633 crate::wire::NodeGetExtendedAttributeRequest<'static>,
6634 <___T as ::fidl_next::Transport>::SendBuffer,
6635 >,
6636 {
6637 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6638 5043930208506967771,
6639 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6640 request,
6641 ))
6642 }
6643
6644 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
6645 pub fn set_extended_attribute(
6646 &self,
6647
6648 name: impl ::fidl_next::Encode<
6649 ::fidl_next::wire::Vector<'static, u8>,
6650 <___T as ::fidl_next::Transport>::SendBuffer,
6651 >,
6652
6653 value: impl ::fidl_next::Encode<
6654 crate::wire::ExtendedAttributeValue<'static>,
6655 <___T as ::fidl_next::Transport>::SendBuffer,
6656 >,
6657
6658 mode: impl ::fidl_next::Encode<
6659 crate::wire::SetExtendedAttributeMode,
6660 <___T as ::fidl_next::Transport>::SendBuffer,
6661 >,
6662 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
6663 where
6664 <___T as ::fidl_next::Transport>::SendBuffer:
6665 ::fidl_next::encoder::InternalHandleEncoder,
6666 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6667 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6668 {
6669 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
6670 name,
6671
6672 value,
6673
6674 mode,
6675 })
6676 }
6677
6678 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
6679 pub fn set_extended_attribute_with<___R>(
6680 &self,
6681 request: ___R,
6682 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
6683 where
6684 ___R: ::fidl_next::Encode<
6685 crate::wire::NodeSetExtendedAttributeRequest<'static>,
6686 <___T as ::fidl_next::Transport>::SendBuffer,
6687 >,
6688 {
6689 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6690 5374223046099989052,
6691 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6692 request,
6693 ))
6694 }
6695
6696 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
6697 pub fn remove_extended_attribute(
6698 &self,
6699
6700 name: impl ::fidl_next::Encode<
6701 ::fidl_next::wire::Vector<'static, u8>,
6702 <___T as ::fidl_next::Transport>::SendBuffer,
6703 >,
6704 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
6705 where
6706 <___T as ::fidl_next::Transport>::SendBuffer:
6707 ::fidl_next::encoder::InternalHandleEncoder,
6708 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6709 {
6710 self.remove_extended_attribute_with(
6711 crate::generic::NodeRemoveExtendedAttributeRequest { name },
6712 )
6713 }
6714
6715 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
6716 pub fn remove_extended_attribute_with<___R>(
6717 &self,
6718 request: ___R,
6719 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
6720 where
6721 ___R: ::fidl_next::Encode<
6722 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
6723 <___T as ::fidl_next::Transport>::SendBuffer,
6724 >,
6725 {
6726 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6727 8794297771444732717,
6728 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6729 request,
6730 ))
6731 }
6732 }
6733
6734 #[repr(transparent)]
6736 pub struct NodeServer<___T: ::fidl_next::Transport> {
6737 server: ::fidl_next::protocol::Server<___T>,
6738 }
6739
6740 impl<___T> NodeServer<___T>
6741 where
6742 ___T: ::fidl_next::Transport,
6743 {
6744 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
6745 pub fn on_open(
6746 &self,
6747
6748 s: impl ::fidl_next::Encode<
6749 ::fidl_next::wire::Int32,
6750 <___T as ::fidl_next::Transport>::SendBuffer,
6751 >,
6752
6753 info: impl ::fidl_next::Encode<
6754 crate::wire_optional::NodeInfoDeprecated<'static>,
6755 <___T as ::fidl_next::Transport>::SendBuffer,
6756 >,
6757 ) -> ::fidl_next::SendFuture<'_, ___T>
6758 where
6759 <___T as ::fidl_next::Transport>::SendBuffer:
6760 ::fidl_next::encoder::InternalHandleEncoder,
6761 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6762 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6763 {
6764 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
6765 }
6766
6767 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
6768
6769 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6770 where
6771 ___R: ::fidl_next::Encode<
6772 <super::OnOpen as ::fidl_next::Method>::Request,
6773 <___T as ::fidl_next::Transport>::SendBuffer,
6774 >,
6775 {
6776 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6777 9207534335756671346,
6778 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
6779 request,
6780 ))
6781 }
6782
6783 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
6784
6785 pub fn on_representation_with<___R>(
6786 &self,
6787 request: ___R,
6788 ) -> ::fidl_next::SendFuture<'_, ___T>
6789 where
6790 ___R: ::fidl_next::Encode<
6791 <super::OnRepresentation as ::fidl_next::Method>::Request,
6792 <___T as ::fidl_next::Transport>::SendBuffer,
6793 >,
6794 {
6795 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6796 6679970090861613324,
6797 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
6798 request,
6799 ))
6800 }
6801 }
6802 }
6803}
6804
6805#[diagnostic::on_unimplemented(
6806 note = "If {Self} implements the non-local NodeClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
6807)]
6808
6809pub trait NodeLocalClientHandler<
6813 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6814 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6815>
6816{
6817 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
6818 fn on_open(
6819 &mut self,
6820
6821 request: ::fidl_next::Request<node::OnOpen, ___T>,
6822 ) -> impl ::core::future::Future<Output = ()>;
6823
6824 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
6825 fn on_representation(
6826 &mut self,
6827
6828 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
6829 ) -> impl ::core::future::Future<Output = ()>;
6830
6831 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6832 ::core::future::ready(())
6833 }
6834}
6835
6836impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Node
6837where
6838 ___H: NodeLocalClientHandler<___T>,
6839 ___T: ::fidl_next::Transport,
6840 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
6841 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6842 Constraint = (),
6843 >,
6844 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
6845 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6846 Constraint = (),
6847 >,
6848{
6849 async fn on_event(
6850 handler: &mut ___H,
6851 ordinal: u64,
6852 flexibility: ::fidl_next::protocol::Flexibility,
6853 body: ::fidl_next::Body<___T>,
6854 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6855 match ordinal {
6856 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
6857 Ok(decoded) => {
6858 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
6859 Ok(())
6860 }
6861 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6862 ordinal: 9207534335756671346,
6863 error,
6864 }),
6865 },
6866
6867 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
6868 Ok(decoded) => {
6869 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
6870 Ok(())
6871 }
6872 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6873 ordinal: 6679970090861613324,
6874 error,
6875 }),
6876 },
6877
6878 ordinal => {
6879 handler.on_unknown_interaction(ordinal).await;
6880 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
6881 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6882 } else {
6883 Ok(())
6884 }
6885 }
6886 }
6887 }
6888}
6889
6890#[diagnostic::on_unimplemented(
6891 note = "If {Self} implements the non-local NodeServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
6892)]
6893
6894pub trait NodeLocalServerHandler<
6898 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6899 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6900>
6901{
6902 fn clone(
6903 &mut self,
6904
6905 request: ::fidl_next::Request<node::Clone, ___T>,
6906 ) -> impl ::core::future::Future<Output = ()>;
6907
6908 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
6909 fn close(
6910 &mut self,
6911
6912 responder: ::fidl_next::Responder<node::Close, ___T>,
6913 ) -> impl ::core::future::Future<Output = ()>;
6914
6915 fn query(
6916 &mut self,
6917
6918 responder: ::fidl_next::Responder<node::Query, ___T>,
6919 ) -> impl ::core::future::Future<Output = ()>;
6920
6921 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6922 fn deprecated_clone(
6923 &mut self,
6924
6925 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
6926 ) -> impl ::core::future::Future<Output = ()>;
6927
6928 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6929 fn deprecated_get_attr(
6930 &mut self,
6931
6932 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
6933 ) -> impl ::core::future::Future<Output = ()>;
6934
6935 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6936 fn deprecated_set_attr(
6937 &mut self,
6938
6939 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
6940
6941 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
6942 ) -> impl ::core::future::Future<Output = ()>;
6943
6944 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6945 fn deprecated_get_flags(
6946 &mut self,
6947
6948 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
6949 ) -> impl ::core::future::Future<Output = ()>;
6950
6951 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6952 fn deprecated_set_flags(
6953 &mut self,
6954
6955 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
6956
6957 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
6958 ) -> impl ::core::future::Future<Output = ()>;
6959
6960 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
6961 fn get_flags(
6962 &mut self,
6963
6964 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
6965 ) -> impl ::core::future::Future<Output = ()>;
6966
6967 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
6968 fn set_flags(
6969 &mut self,
6970
6971 request: ::fidl_next::Request<node::SetFlags, ___T>,
6972
6973 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
6974 ) -> impl ::core::future::Future<Output = ()>;
6975
6976 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
6977 fn query_filesystem(
6978 &mut self,
6979
6980 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
6981 ) -> impl ::core::future::Future<Output = ()>;
6982
6983 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
6984 fn get_attributes(
6985 &mut self,
6986
6987 request: ::fidl_next::Request<node::GetAttributes, ___T>,
6988
6989 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
6990 ) -> impl ::core::future::Future<Output = ()>;
6991
6992 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
6993 fn update_attributes(
6994 &mut self,
6995
6996 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
6997
6998 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
6999 ) -> impl ::core::future::Future<Output = ()>;
7000
7001 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
7002 fn sync(
7003 &mut self,
7004
7005 responder: ::fidl_next::Responder<node::Sync, ___T>,
7006 ) -> impl ::core::future::Future<Output = ()>;
7007
7008 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
7009 fn list_extended_attributes(
7010 &mut self,
7011
7012 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
7013 ) -> impl ::core::future::Future<Output = ()>;
7014
7015 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
7016 fn get_extended_attribute(
7017 &mut self,
7018
7019 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
7020
7021 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
7022 ) -> impl ::core::future::Future<Output = ()>;
7023
7024 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
7025 fn set_extended_attribute(
7026 &mut self,
7027
7028 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
7029
7030 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
7031 ) -> impl ::core::future::Future<Output = ()>;
7032
7033 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
7034 fn remove_extended_attribute(
7035 &mut self,
7036
7037 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
7038
7039 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
7040 ) -> impl ::core::future::Future<Output = ()>;
7041
7042 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7043 ::core::future::ready(())
7044 }
7045}
7046
7047impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Node
7048where
7049 ___H: NodeLocalServerHandler<___T>,
7050 ___T: ::fidl_next::Transport,
7051 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
7052 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7053 Constraint = (),
7054 >,
7055 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
7056 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7057 Constraint = (),
7058 >,
7059 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
7060 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7061 Constraint = (),
7062 >,
7063 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
7064 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7065 Constraint = (),
7066 >,
7067 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
7068 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7069 Constraint = (),
7070 >,
7071 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
7072 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7073 Constraint = (),
7074 >,
7075 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
7076 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7077 Constraint = (),
7078 >,
7079 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
7080 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7081 Constraint = (),
7082 >,
7083 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7084 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7085 Constraint = (),
7086 >,
7087 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7088 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7089 Constraint = (),
7090 >,
7091 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7092 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7093 Constraint = (),
7094 >,
7095{
7096 async fn on_one_way(
7097 handler: &mut ___H,
7098 ordinal: u64,
7099 flexibility: ::fidl_next::protocol::Flexibility,
7100 body: ::fidl_next::Body<___T>,
7101 ) -> ::core::result::Result<
7102 (),
7103 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7104 > {
7105 match ordinal {
7106 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7107 Ok(decoded) => {
7108 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
7109 Ok(())
7110 }
7111 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7112 ordinal: 2366825959783828089,
7113 error,
7114 }),
7115 },
7116
7117 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7118 Ok(decoded) => {
7119 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
7120 Ok(())
7121 }
7122 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7123 ordinal: 6512600400724287855,
7124 error,
7125 }),
7126 },
7127
7128 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7129 Ok(decoded) => {
7130 handler
7131 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
7132 .await;
7133 Ok(())
7134 }
7135 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7136 ordinal: 5431626189872037072,
7137 error,
7138 }),
7139 },
7140
7141 ordinal => {
7142 handler.on_unknown_interaction(ordinal).await;
7143 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7144 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7145 } else {
7146 Ok(())
7147 }
7148 }
7149 }
7150 }
7151
7152 async fn on_two_way(
7153 handler: &mut ___H,
7154 ordinal: u64,
7155 flexibility: ::fidl_next::protocol::Flexibility,
7156 body: ::fidl_next::Body<___T>,
7157 responder: ::fidl_next::protocol::Responder<___T>,
7158 ) -> ::core::result::Result<
7159 (),
7160 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7161 > {
7162 match ordinal {
7163 6540867515453498750 => {
7164 let responder = ::fidl_next::Responder::from_untyped(responder);
7165
7166 handler.close(responder).await;
7167 Ok(())
7168 }
7169
7170 2763219980499352582 => {
7171 let responder = ::fidl_next::Responder::from_untyped(responder);
7172
7173 handler.query(responder).await;
7174 Ok(())
7175 }
7176
7177 8689798978500614909 => {
7178 let responder = ::fidl_next::Responder::from_untyped(responder);
7179
7180 handler.deprecated_get_attr(responder).await;
7181 Ok(())
7182 }
7183
7184 4721673413776871238 => {
7185 let responder = ::fidl_next::Responder::from_untyped(responder);
7186
7187 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7188 Ok(decoded) => {
7189 handler
7190 .deprecated_set_attr(
7191 ::fidl_next::Request::from_decoded(decoded),
7192 responder,
7193 )
7194 .await;
7195 Ok(())
7196 }
7197 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7198 ordinal: 4721673413776871238,
7199 error,
7200 }),
7201 }
7202 }
7203
7204 6595803110182632097 => {
7205 let responder = ::fidl_next::Responder::from_untyped(responder);
7206
7207 handler.deprecated_get_flags(responder).await;
7208 Ok(())
7209 }
7210
7211 5950864159036794675 => {
7212 let responder = ::fidl_next::Responder::from_untyped(responder);
7213
7214 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7215 Ok(decoded) => {
7216 handler
7217 .deprecated_set_flags(
7218 ::fidl_next::Request::from_decoded(decoded),
7219 responder,
7220 )
7221 .await;
7222 Ok(())
7223 }
7224 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7225 ordinal: 5950864159036794675,
7226 error,
7227 }),
7228 }
7229 }
7230
7231 105530239381466147 => {
7232 let responder = ::fidl_next::Responder::from_untyped(responder);
7233
7234 handler.get_flags(responder).await;
7235 Ok(())
7236 }
7237
7238 6172186066099445416 => {
7239 let responder = ::fidl_next::Responder::from_untyped(responder);
7240
7241 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7242 Ok(decoded) => {
7243 handler
7244 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
7245 .await;
7246 Ok(())
7247 }
7248 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7249 ordinal: 6172186066099445416,
7250 error,
7251 }),
7252 }
7253 }
7254
7255 8013111122914313744 => {
7256 let responder = ::fidl_next::Responder::from_untyped(responder);
7257
7258 handler.query_filesystem(responder).await;
7259 Ok(())
7260 }
7261
7262 4414537700416816443 => {
7263 let responder = ::fidl_next::Responder::from_untyped(responder);
7264
7265 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7266 Ok(decoded) => {
7267 handler
7268 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
7269 .await;
7270 Ok(())
7271 }
7272 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7273 ordinal: 4414537700416816443,
7274 error,
7275 }),
7276 }
7277 }
7278
7279 3677402239314018056 => {
7280 let responder = ::fidl_next::Responder::from_untyped(responder);
7281
7282 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7283 Ok(decoded) => {
7284 handler
7285 .update_attributes(
7286 ::fidl_next::Request::from_decoded(decoded),
7287 responder,
7288 )
7289 .await;
7290 Ok(())
7291 }
7292 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7293 ordinal: 3677402239314018056,
7294 error,
7295 }),
7296 }
7297 }
7298
7299 3196473584242777161 => {
7300 let responder = ::fidl_next::Responder::from_untyped(responder);
7301
7302 handler.sync(responder).await;
7303 Ok(())
7304 }
7305
7306 5043930208506967771 => {
7307 let responder = ::fidl_next::Responder::from_untyped(responder);
7308
7309 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7310 Ok(decoded) => {
7311 handler
7312 .get_extended_attribute(
7313 ::fidl_next::Request::from_decoded(decoded),
7314 responder,
7315 )
7316 .await;
7317 Ok(())
7318 }
7319 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7320 ordinal: 5043930208506967771,
7321 error,
7322 }),
7323 }
7324 }
7325
7326 5374223046099989052 => {
7327 let responder = ::fidl_next::Responder::from_untyped(responder);
7328
7329 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7330 Ok(decoded) => {
7331 handler
7332 .set_extended_attribute(
7333 ::fidl_next::Request::from_decoded(decoded),
7334 responder,
7335 )
7336 .await;
7337 Ok(())
7338 }
7339 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7340 ordinal: 5374223046099989052,
7341 error,
7342 }),
7343 }
7344 }
7345
7346 8794297771444732717 => {
7347 let responder = ::fidl_next::Responder::from_untyped(responder);
7348
7349 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7350 Ok(decoded) => {
7351 handler
7352 .remove_extended_attribute(
7353 ::fidl_next::Request::from_decoded(decoded),
7354 responder,
7355 )
7356 .await;
7357 Ok(())
7358 }
7359 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7360 ordinal: 8794297771444732717,
7361 error,
7362 }),
7363 }
7364 }
7365
7366 ordinal => {
7367 handler.on_unknown_interaction(ordinal).await;
7368 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7369 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7370 } else {
7371 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
7372 ordinal,
7373 flexibility,
7374 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
7375 )
7376 .expect("encoding a framework error should never fail")
7377 .await?;
7378 Ok(())
7379 }
7380 }
7381 }
7382 }
7383}
7384
7385pub trait NodeClientHandler<
7389 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7390 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7391>
7392{
7393 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
7394 fn on_open(
7395 &mut self,
7396
7397 request: ::fidl_next::Request<node::OnOpen, ___T>,
7398 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7399
7400 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
7401 fn on_representation(
7402 &mut self,
7403
7404 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
7405 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7406
7407 fn on_unknown_interaction(
7408 &mut self,
7409 ordinal: u64,
7410 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7411 ::core::future::ready(())
7412 }
7413}
7414
7415impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
7416where
7417 ___H: NodeClientHandler<___T> + ::core::marker::Send,
7418 ___T: ::fidl_next::Transport,
7419 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
7420 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7421 Constraint = (),
7422 >,
7423 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
7424 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7425 Constraint = (),
7426 >,
7427{
7428 async fn on_event(
7429 handler: &mut ___H,
7430 ordinal: u64,
7431 flexibility: ::fidl_next::protocol::Flexibility,
7432 body: ::fidl_next::Body<___T>,
7433 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7434 match ordinal {
7435 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7436 Ok(decoded) => {
7437 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
7438 Ok(())
7439 }
7440 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7441 ordinal: 9207534335756671346,
7442 error,
7443 }),
7444 },
7445
7446 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7447 Ok(decoded) => {
7448 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
7449 Ok(())
7450 }
7451 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7452 ordinal: 6679970090861613324,
7453 error,
7454 }),
7455 },
7456
7457 ordinal => {
7458 handler.on_unknown_interaction(ordinal).await;
7459 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7460 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7461 } else {
7462 Ok(())
7463 }
7464 }
7465 }
7466 }
7467}
7468
7469pub trait NodeServerHandler<
7473 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7474 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7475>
7476{
7477 fn clone(
7478 &mut self,
7479
7480 request: ::fidl_next::Request<node::Clone, ___T>,
7481 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7482
7483 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
7484 fn close(
7485 &mut self,
7486
7487 responder: ::fidl_next::Responder<node::Close, ___T>,
7488 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7489
7490 fn query(
7491 &mut self,
7492
7493 responder: ::fidl_next::Responder<node::Query, ___T>,
7494 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7495
7496 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
7497 fn deprecated_clone(
7498 &mut self,
7499
7500 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
7501 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7502
7503 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
7504 fn deprecated_get_attr(
7505 &mut self,
7506
7507 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
7508 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7509
7510 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
7511 fn deprecated_set_attr(
7512 &mut self,
7513
7514 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
7515
7516 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
7517 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7518
7519 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
7520 fn deprecated_get_flags(
7521 &mut self,
7522
7523 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
7524 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7525
7526 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
7527 fn deprecated_set_flags(
7528 &mut self,
7529
7530 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
7531
7532 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
7533 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7534
7535 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
7536 fn get_flags(
7537 &mut self,
7538
7539 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
7540 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7541
7542 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
7543 fn set_flags(
7544 &mut self,
7545
7546 request: ::fidl_next::Request<node::SetFlags, ___T>,
7547
7548 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
7549 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7550
7551 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
7552 fn query_filesystem(
7553 &mut self,
7554
7555 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
7556 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7557
7558 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
7559 fn get_attributes(
7560 &mut self,
7561
7562 request: ::fidl_next::Request<node::GetAttributes, ___T>,
7563
7564 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
7565 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7566
7567 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
7568 fn update_attributes(
7569 &mut self,
7570
7571 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
7572
7573 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
7574 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7575
7576 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
7577 fn sync(
7578 &mut self,
7579
7580 responder: ::fidl_next::Responder<node::Sync, ___T>,
7581 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7582
7583 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
7584 fn list_extended_attributes(
7585 &mut self,
7586
7587 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
7588 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7589
7590 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
7591 fn get_extended_attribute(
7592 &mut self,
7593
7594 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
7595
7596 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
7597 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7598
7599 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
7600 fn set_extended_attribute(
7601 &mut self,
7602
7603 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
7604
7605 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
7606 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7607
7608 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
7609 fn remove_extended_attribute(
7610 &mut self,
7611
7612 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
7613
7614 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
7615 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7616
7617 fn on_unknown_interaction(
7618 &mut self,
7619 ordinal: u64,
7620 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7621 ::core::future::ready(())
7622 }
7623}
7624
7625impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
7626where
7627 ___H: NodeServerHandler<___T> + ::core::marker::Send,
7628 ___T: ::fidl_next::Transport,
7629 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
7630 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7631 Constraint = (),
7632 >,
7633 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
7634 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7635 Constraint = (),
7636 >,
7637 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
7638 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7639 Constraint = (),
7640 >,
7641 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
7642 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7643 Constraint = (),
7644 >,
7645 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
7646 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7647 Constraint = (),
7648 >,
7649 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
7650 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7651 Constraint = (),
7652 >,
7653 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
7654 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7655 Constraint = (),
7656 >,
7657 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
7658 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7659 Constraint = (),
7660 >,
7661 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7662 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7663 Constraint = (),
7664 >,
7665 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7666 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7667 Constraint = (),
7668 >,
7669 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7670 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7671 Constraint = (),
7672 >,
7673{
7674 async fn on_one_way(
7675 handler: &mut ___H,
7676 ordinal: u64,
7677 flexibility: ::fidl_next::protocol::Flexibility,
7678 body: ::fidl_next::Body<___T>,
7679 ) -> ::core::result::Result<
7680 (),
7681 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7682 > {
7683 match ordinal {
7684 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7685 Ok(decoded) => {
7686 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
7687 Ok(())
7688 }
7689 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7690 ordinal: 2366825959783828089,
7691 error,
7692 }),
7693 },
7694
7695 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7696 Ok(decoded) => {
7697 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
7698 Ok(())
7699 }
7700 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7701 ordinal: 6512600400724287855,
7702 error,
7703 }),
7704 },
7705
7706 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7707 Ok(decoded) => {
7708 handler
7709 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
7710 .await;
7711 Ok(())
7712 }
7713 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7714 ordinal: 5431626189872037072,
7715 error,
7716 }),
7717 },
7718
7719 ordinal => {
7720 handler.on_unknown_interaction(ordinal).await;
7721 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7722 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7723 } else {
7724 Ok(())
7725 }
7726 }
7727 }
7728 }
7729
7730 async fn on_two_way(
7731 handler: &mut ___H,
7732 ordinal: u64,
7733 flexibility: ::fidl_next::protocol::Flexibility,
7734 body: ::fidl_next::Body<___T>,
7735 responder: ::fidl_next::protocol::Responder<___T>,
7736 ) -> ::core::result::Result<
7737 (),
7738 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7739 > {
7740 match ordinal {
7741 6540867515453498750 => {
7742 let responder = ::fidl_next::Responder::from_untyped(responder);
7743
7744 handler.close(responder).await;
7745 Ok(())
7746 }
7747
7748 2763219980499352582 => {
7749 let responder = ::fidl_next::Responder::from_untyped(responder);
7750
7751 handler.query(responder).await;
7752 Ok(())
7753 }
7754
7755 8689798978500614909 => {
7756 let responder = ::fidl_next::Responder::from_untyped(responder);
7757
7758 handler.deprecated_get_attr(responder).await;
7759 Ok(())
7760 }
7761
7762 4721673413776871238 => {
7763 let responder = ::fidl_next::Responder::from_untyped(responder);
7764
7765 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7766 Ok(decoded) => {
7767 handler
7768 .deprecated_set_attr(
7769 ::fidl_next::Request::from_decoded(decoded),
7770 responder,
7771 )
7772 .await;
7773 Ok(())
7774 }
7775 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7776 ordinal: 4721673413776871238,
7777 error,
7778 }),
7779 }
7780 }
7781
7782 6595803110182632097 => {
7783 let responder = ::fidl_next::Responder::from_untyped(responder);
7784
7785 handler.deprecated_get_flags(responder).await;
7786 Ok(())
7787 }
7788
7789 5950864159036794675 => {
7790 let responder = ::fidl_next::Responder::from_untyped(responder);
7791
7792 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7793 Ok(decoded) => {
7794 handler
7795 .deprecated_set_flags(
7796 ::fidl_next::Request::from_decoded(decoded),
7797 responder,
7798 )
7799 .await;
7800 Ok(())
7801 }
7802 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7803 ordinal: 5950864159036794675,
7804 error,
7805 }),
7806 }
7807 }
7808
7809 105530239381466147 => {
7810 let responder = ::fidl_next::Responder::from_untyped(responder);
7811
7812 handler.get_flags(responder).await;
7813 Ok(())
7814 }
7815
7816 6172186066099445416 => {
7817 let responder = ::fidl_next::Responder::from_untyped(responder);
7818
7819 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7820 Ok(decoded) => {
7821 handler
7822 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
7823 .await;
7824 Ok(())
7825 }
7826 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7827 ordinal: 6172186066099445416,
7828 error,
7829 }),
7830 }
7831 }
7832
7833 8013111122914313744 => {
7834 let responder = ::fidl_next::Responder::from_untyped(responder);
7835
7836 handler.query_filesystem(responder).await;
7837 Ok(())
7838 }
7839
7840 4414537700416816443 => {
7841 let responder = ::fidl_next::Responder::from_untyped(responder);
7842
7843 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7844 Ok(decoded) => {
7845 handler
7846 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
7847 .await;
7848 Ok(())
7849 }
7850 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7851 ordinal: 4414537700416816443,
7852 error,
7853 }),
7854 }
7855 }
7856
7857 3677402239314018056 => {
7858 let responder = ::fidl_next::Responder::from_untyped(responder);
7859
7860 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7861 Ok(decoded) => {
7862 handler
7863 .update_attributes(
7864 ::fidl_next::Request::from_decoded(decoded),
7865 responder,
7866 )
7867 .await;
7868 Ok(())
7869 }
7870 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7871 ordinal: 3677402239314018056,
7872 error,
7873 }),
7874 }
7875 }
7876
7877 3196473584242777161 => {
7878 let responder = ::fidl_next::Responder::from_untyped(responder);
7879
7880 handler.sync(responder).await;
7881 Ok(())
7882 }
7883
7884 5043930208506967771 => {
7885 let responder = ::fidl_next::Responder::from_untyped(responder);
7886
7887 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7888 Ok(decoded) => {
7889 handler
7890 .get_extended_attribute(
7891 ::fidl_next::Request::from_decoded(decoded),
7892 responder,
7893 )
7894 .await;
7895 Ok(())
7896 }
7897 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7898 ordinal: 5043930208506967771,
7899 error,
7900 }),
7901 }
7902 }
7903
7904 5374223046099989052 => {
7905 let responder = ::fidl_next::Responder::from_untyped(responder);
7906
7907 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7908 Ok(decoded) => {
7909 handler
7910 .set_extended_attribute(
7911 ::fidl_next::Request::from_decoded(decoded),
7912 responder,
7913 )
7914 .await;
7915 Ok(())
7916 }
7917 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7918 ordinal: 5374223046099989052,
7919 error,
7920 }),
7921 }
7922 }
7923
7924 8794297771444732717 => {
7925 let responder = ::fidl_next::Responder::from_untyped(responder);
7926
7927 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7928 Ok(decoded) => {
7929 handler
7930 .remove_extended_attribute(
7931 ::fidl_next::Request::from_decoded(decoded),
7932 responder,
7933 )
7934 .await;
7935 Ok(())
7936 }
7937 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7938 ordinal: 8794297771444732717,
7939 error,
7940 }),
7941 }
7942 }
7943
7944 ordinal => {
7945 handler.on_unknown_interaction(ordinal).await;
7946 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7947 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7948 } else {
7949 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
7950 ordinal,
7951 flexibility,
7952 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
7953 )
7954 .expect("encoding a framework error should never fail")
7955 .await?;
7956 Ok(())
7957 }
7958 }
7959 }
7960 }
7961}
7962
7963impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
7964where
7965 ___T: ::fidl_next::Transport,
7966{
7967 async fn on_open(&mut self, _: ::fidl_next::Request<node::OnOpen, ___T>) {}
7968
7969 async fn on_representation(&mut self, _: ::fidl_next::Request<node::OnRepresentation, ___T>) {}
7970
7971 async fn on_unknown_interaction(&mut self, _: u64) {}
7972}
7973
7974impl<___H, ___T> NodeLocalClientHandler<___T> for ::fidl_next::Local<___H>
7975where
7976 ___H: NodeClientHandler<___T>,
7977 ___T: ::fidl_next::Transport,
7978{
7979 async fn on_open(&mut self, request: ::fidl_next::Request<node::OnOpen, ___T>) {
7980 ___H::on_open(&mut self.0, request).await
7981 }
7982
7983 async fn on_representation(
7984 &mut self,
7985
7986 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
7987 ) {
7988 ___H::on_representation(&mut self.0, request).await
7989 }
7990
7991 async fn on_unknown_interaction(&mut self, ordinal: u64) {
7992 ___H::on_unknown_interaction(&mut self.0, ordinal).await
7993 }
7994}
7995
7996impl<___H, ___T> NodeLocalServerHandler<___T> for ::fidl_next::Local<___H>
7997where
7998 ___H: NodeServerHandler<___T>,
7999 ___T: ::fidl_next::Transport,
8000{
8001 async fn clone(&mut self, request: ::fidl_next::Request<node::Clone, ___T>) {
8002 ___H::clone(&mut self.0, request).await
8003 }
8004
8005 async fn close(&mut self, responder: ::fidl_next::Responder<node::Close, ___T>) {
8006 ___H::close(&mut self.0, responder).await
8007 }
8008
8009 async fn query(&mut self, responder: ::fidl_next::Responder<node::Query, ___T>) {
8010 ___H::query(&mut self.0, responder).await
8011 }
8012
8013 async fn deprecated_clone(
8014 &mut self,
8015
8016 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
8017 ) {
8018 ___H::deprecated_clone(&mut self.0, request).await
8019 }
8020
8021 async fn deprecated_get_attr(
8022 &mut self,
8023
8024 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
8025 ) {
8026 ___H::deprecated_get_attr(&mut self.0, responder).await
8027 }
8028
8029 async fn deprecated_set_attr(
8030 &mut self,
8031
8032 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
8033
8034 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
8035 ) {
8036 ___H::deprecated_set_attr(&mut self.0, request, responder).await
8037 }
8038
8039 async fn deprecated_get_flags(
8040 &mut self,
8041
8042 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
8043 ) {
8044 ___H::deprecated_get_flags(&mut self.0, responder).await
8045 }
8046
8047 async fn deprecated_set_flags(
8048 &mut self,
8049
8050 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
8051
8052 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
8053 ) {
8054 ___H::deprecated_set_flags(&mut self.0, request, responder).await
8055 }
8056
8057 async fn get_flags(&mut self, responder: ::fidl_next::Responder<node::GetFlags, ___T>) {
8058 ___H::get_flags(&mut self.0, responder).await
8059 }
8060
8061 async fn set_flags(
8062 &mut self,
8063
8064 request: ::fidl_next::Request<node::SetFlags, ___T>,
8065
8066 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
8067 ) {
8068 ___H::set_flags(&mut self.0, request, responder).await
8069 }
8070
8071 async fn query_filesystem(
8072 &mut self,
8073
8074 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
8075 ) {
8076 ___H::query_filesystem(&mut self.0, responder).await
8077 }
8078
8079 async fn get_attributes(
8080 &mut self,
8081
8082 request: ::fidl_next::Request<node::GetAttributes, ___T>,
8083
8084 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
8085 ) {
8086 ___H::get_attributes(&mut self.0, request, responder).await
8087 }
8088
8089 async fn update_attributes(
8090 &mut self,
8091
8092 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
8093
8094 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
8095 ) {
8096 ___H::update_attributes(&mut self.0, request, responder).await
8097 }
8098
8099 async fn sync(&mut self, responder: ::fidl_next::Responder<node::Sync, ___T>) {
8100 ___H::sync(&mut self.0, responder).await
8101 }
8102
8103 async fn list_extended_attributes(
8104 &mut self,
8105
8106 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
8107 ) {
8108 ___H::list_extended_attributes(&mut self.0, request).await
8109 }
8110
8111 async fn get_extended_attribute(
8112 &mut self,
8113
8114 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
8115
8116 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
8117 ) {
8118 ___H::get_extended_attribute(&mut self.0, request, responder).await
8119 }
8120
8121 async fn set_extended_attribute(
8122 &mut self,
8123
8124 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
8125
8126 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
8127 ) {
8128 ___H::set_extended_attribute(&mut self.0, request, responder).await
8129 }
8130
8131 async fn remove_extended_attribute(
8132 &mut self,
8133
8134 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
8135
8136 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
8137 ) {
8138 ___H::remove_extended_attribute(&mut self.0, request, responder).await
8139 }
8140
8141 async fn on_unknown_interaction(&mut self, ordinal: u64) {
8142 ___H::on_unknown_interaction(&mut self.0, ordinal).await
8143 }
8144}
8145
8146#[doc = " Directory defines a node which is capable of containing other Objects.\n"]
8148#[derive(PartialEq, Debug)]
8149pub struct Directory;
8150
8151impl ::fidl_next::Discoverable for Directory {
8152 const PROTOCOL_NAME: &'static str = "fuchsia.io.Directory";
8153}
8154
8155#[cfg(target_os = "fuchsia")]
8156impl ::fidl_next::HasTransport for Directory {
8157 type Transport = ::fidl_next::fuchsia::zx::Channel;
8158}
8159
8160pub mod directory {
8161 pub mod prelude {
8162 pub use crate::{
8163 Directory, DirectoryClientHandler, DirectoryLocalClientHandler,
8164 DirectoryLocalServerHandler, DirectoryServerHandler, directory,
8165 };
8166
8167 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
8168
8169 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
8170
8171 pub use crate::natural::DirectoryCreateSymlinkRequest;
8172
8173 pub use crate::natural::DirectoryDeprecatedOpenRequest;
8174
8175 pub use crate::natural::DirectoryGetTokenResponse;
8176
8177 pub use crate::natural::DirectoryLinkRequest;
8178
8179 pub use crate::natural::DirectoryLinkResponse;
8180
8181 pub use crate::natural::DirectoryOpenRequest;
8182
8183 pub use crate::natural::DirectoryReadDirentsRequest;
8184
8185 pub use crate::natural::DirectoryReadDirentsResponse;
8186
8187 pub use crate::natural::DirectoryRenameRequest;
8188
8189 pub use crate::natural::DirectoryRewindResponse;
8190
8191 pub use crate::natural::DirectoryUnlinkRequest;
8192
8193 pub use crate::natural::DirectoryWatchRequest;
8194
8195 pub use crate::natural::DirectoryWatchResponse;
8196
8197 pub use crate::natural::DirectoryCreateSymlinkResponse;
8198
8199 pub use crate::natural::DirectoryRenameResponse;
8200
8201 pub use crate::natural::DirectoryUnlinkResponse;
8202
8203 pub use crate::natural::ExtendedAttributeValue;
8204
8205 pub use crate::natural::MutableNodeAttributes;
8206
8207 pub use crate::natural::NodeAttributes2;
8208
8209 pub use crate::natural::NodeDeprecatedCloneRequest;
8210
8211 pub use crate::natural::NodeDeprecatedGetAttrResponse;
8212
8213 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
8214
8215 pub use crate::natural::NodeDeprecatedSetAttrRequest;
8216
8217 pub use crate::natural::NodeDeprecatedSetAttrResponse;
8218
8219 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
8220
8221 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
8222
8223 pub use crate::natural::NodeGetAttributesRequest;
8224
8225 pub use crate::natural::NodeGetExtendedAttributeRequest;
8226
8227 pub use crate::natural::NodeListExtendedAttributesRequest;
8228
8229 pub use crate::natural::NodeOnOpenRequest;
8230
8231 pub use crate::natural::NodeQueryFilesystemResponse;
8232
8233 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
8234
8235 pub use crate::natural::NodeSetExtendedAttributeRequest;
8236
8237 pub use crate::natural::NodeSetFlagsRequest;
8238
8239 pub use crate::natural::NodeGetFlagsResponse;
8240
8241 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
8242
8243 pub use crate::natural::NodeSetExtendedAttributeResponse;
8244
8245 pub use crate::natural::NodeSetFlagsResponse;
8246
8247 pub use crate::natural::NodeSyncResponse;
8248
8249 pub use crate::natural::NodeUpdateAttributesResponse;
8250
8251 pub use crate::natural::Representation;
8252
8253 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
8254
8255 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
8256
8257 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
8258 }
8259
8260 pub struct AdvisoryLock;
8261
8262 impl ::fidl_next::Method for AdvisoryLock {
8263 const ORDINAL: u64 = 7992130864415541162;
8264 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8265 ::fidl_next::protocol::Flexibility::Strict;
8266
8267 type Protocol = crate::Directory;
8268
8269 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
8270 }
8271
8272 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
8273 type Response = ::fidl_next::wire::Result<
8274 'static,
8275 crate::wire::AdvisoryLockingAdvisoryLockResponse,
8276 ::fidl_next::wire::Int32,
8277 >;
8278 }
8279
8280 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
8281 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8282
8283 fn respond(response: ___R) -> Self::Output {
8284 ::core::result::Result::Ok(response)
8285 }
8286 }
8287
8288 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
8289 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8290
8291 fn respond_err(response: ___R) -> Self::Output {
8292 ::core::result::Result::Err(response)
8293 }
8294 }
8295
8296 pub struct Clone;
8297
8298 impl ::fidl_next::Method for Clone {
8299 const ORDINAL: u64 = 2366825959783828089;
8300 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8301 ::fidl_next::protocol::Flexibility::Strict;
8302
8303 type Protocol = crate::Directory;
8304
8305 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
8306 }
8307
8308 pub struct Close;
8309
8310 impl ::fidl_next::Method for Close {
8311 const ORDINAL: u64 = 6540867515453498750;
8312 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8313 ::fidl_next::protocol::Flexibility::Strict;
8314
8315 type Protocol = crate::Directory;
8316
8317 type Request = ::fidl_next::wire::EmptyMessageBody;
8318 }
8319
8320 impl ::fidl_next::TwoWayMethod for Close {
8321 type Response = ::fidl_next::wire::Result<
8322 'static,
8323 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
8324 ::fidl_next::wire::Int32,
8325 >;
8326 }
8327
8328 impl<___R> ::fidl_next::Respond<___R> for Close {
8329 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8330
8331 fn respond(response: ___R) -> Self::Output {
8332 ::core::result::Result::Ok(response)
8333 }
8334 }
8335
8336 impl<___R> ::fidl_next::RespondErr<___R> for Close {
8337 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8338
8339 fn respond_err(response: ___R) -> Self::Output {
8340 ::core::result::Result::Err(response)
8341 }
8342 }
8343
8344 pub struct Query;
8345
8346 impl ::fidl_next::Method for Query {
8347 const ORDINAL: u64 = 2763219980499352582;
8348 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8349 ::fidl_next::protocol::Flexibility::Strict;
8350
8351 type Protocol = crate::Directory;
8352
8353 type Request = ::fidl_next::wire::EmptyMessageBody;
8354 }
8355
8356 impl ::fidl_next::TwoWayMethod for Query {
8357 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
8358 }
8359
8360 impl<___R> ::fidl_next::Respond<___R> for Query {
8361 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
8362
8363 fn respond(response: ___R) -> Self::Output {
8364 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
8365 }
8366 }
8367
8368 pub struct DeprecatedClone;
8369
8370 impl ::fidl_next::Method for DeprecatedClone {
8371 const ORDINAL: u64 = 6512600400724287855;
8372 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8373 ::fidl_next::protocol::Flexibility::Flexible;
8374
8375 type Protocol = crate::Directory;
8376
8377 type Request = crate::wire::NodeDeprecatedCloneRequest;
8378 }
8379
8380 pub struct OnOpen;
8381
8382 impl ::fidl_next::Method for OnOpen {
8383 const ORDINAL: u64 = 9207534335756671346;
8384 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8385 ::fidl_next::protocol::Flexibility::Flexible;
8386
8387 type Protocol = crate::Directory;
8388
8389 type Request = crate::wire::NodeOnOpenRequest<'static>;
8390 }
8391
8392 pub struct DeprecatedGetAttr;
8393
8394 impl ::fidl_next::Method for DeprecatedGetAttr {
8395 const ORDINAL: u64 = 8689798978500614909;
8396 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8397 ::fidl_next::protocol::Flexibility::Strict;
8398
8399 type Protocol = crate::Directory;
8400
8401 type Request = ::fidl_next::wire::EmptyMessageBody;
8402 }
8403
8404 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
8405 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
8406 }
8407
8408 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
8409 type Output = ___R;
8410
8411 fn respond(response: ___R) -> Self::Output {
8412 response
8413 }
8414 }
8415
8416 pub struct DeprecatedSetAttr;
8417
8418 impl ::fidl_next::Method for DeprecatedSetAttr {
8419 const ORDINAL: u64 = 4721673413776871238;
8420 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8421 ::fidl_next::protocol::Flexibility::Strict;
8422
8423 type Protocol = crate::Directory;
8424
8425 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
8426 }
8427
8428 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
8429 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
8430 }
8431
8432 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
8433 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
8434
8435 fn respond(response: ___R) -> Self::Output {
8436 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
8437 }
8438 }
8439
8440 pub struct DeprecatedGetFlags;
8441
8442 impl ::fidl_next::Method for DeprecatedGetFlags {
8443 const ORDINAL: u64 = 6595803110182632097;
8444 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8445 ::fidl_next::protocol::Flexibility::Strict;
8446
8447 type Protocol = crate::Directory;
8448
8449 type Request = ::fidl_next::wire::EmptyMessageBody;
8450 }
8451
8452 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
8453 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
8454 }
8455
8456 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
8457 type Output = ___R;
8458
8459 fn respond(response: ___R) -> Self::Output {
8460 response
8461 }
8462 }
8463
8464 pub struct DeprecatedSetFlags;
8465
8466 impl ::fidl_next::Method for DeprecatedSetFlags {
8467 const ORDINAL: u64 = 5950864159036794675;
8468 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8469 ::fidl_next::protocol::Flexibility::Strict;
8470
8471 type Protocol = crate::Directory;
8472
8473 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
8474 }
8475
8476 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
8477 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
8478 }
8479
8480 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
8481 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
8482
8483 fn respond(response: ___R) -> Self::Output {
8484 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
8485 }
8486 }
8487
8488 pub struct GetFlags;
8489
8490 impl ::fidl_next::Method for GetFlags {
8491 const ORDINAL: u64 = 105530239381466147;
8492 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8493 ::fidl_next::protocol::Flexibility::Flexible;
8494
8495 type Protocol = crate::Directory;
8496
8497 type Request = ::fidl_next::wire::EmptyMessageBody;
8498 }
8499
8500 impl ::fidl_next::TwoWayMethod for GetFlags {
8501 type Response = ::fidl_next::wire::FlexibleResult<
8502 'static,
8503 crate::wire::NodeGetFlagsResponse,
8504 ::fidl_next::wire::Int32,
8505 >;
8506 }
8507
8508 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
8509 type Output = ::fidl_next::FlexibleResult<
8510 crate::generic::NodeGetFlagsResponse<___R>,
8511 ::fidl_next::util::Never,
8512 >;
8513
8514 fn respond(response: ___R) -> Self::Output {
8515 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
8516 flags: response,
8517 })
8518 }
8519 }
8520
8521 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
8522 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8523
8524 fn respond_err(response: ___R) -> Self::Output {
8525 ::fidl_next::FlexibleResult::Err(response)
8526 }
8527 }
8528
8529 pub struct SetFlags;
8530
8531 impl ::fidl_next::Method for SetFlags {
8532 const ORDINAL: u64 = 6172186066099445416;
8533 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8534 ::fidl_next::protocol::Flexibility::Flexible;
8535
8536 type Protocol = crate::Directory;
8537
8538 type Request = crate::wire::NodeSetFlagsRequest;
8539 }
8540
8541 impl ::fidl_next::TwoWayMethod for SetFlags {
8542 type Response = ::fidl_next::wire::FlexibleResult<
8543 'static,
8544 crate::wire::NodeSetFlagsResponse,
8545 ::fidl_next::wire::Int32,
8546 >;
8547 }
8548
8549 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
8550 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
8551
8552 fn respond(response: ___R) -> Self::Output {
8553 ::fidl_next::FlexibleResult::Ok(response)
8554 }
8555 }
8556
8557 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
8558 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8559
8560 fn respond_err(response: ___R) -> Self::Output {
8561 ::fidl_next::FlexibleResult::Err(response)
8562 }
8563 }
8564
8565 pub struct QueryFilesystem;
8566
8567 impl ::fidl_next::Method for QueryFilesystem {
8568 const ORDINAL: u64 = 8013111122914313744;
8569 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8570 ::fidl_next::protocol::Flexibility::Strict;
8571
8572 type Protocol = crate::Directory;
8573
8574 type Request = ::fidl_next::wire::EmptyMessageBody;
8575 }
8576
8577 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
8578 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
8579 }
8580
8581 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
8582 type Output = ___R;
8583
8584 fn respond(response: ___R) -> Self::Output {
8585 response
8586 }
8587 }
8588
8589 pub struct OnRepresentation;
8590
8591 impl ::fidl_next::Method for OnRepresentation {
8592 const ORDINAL: u64 = 6679970090861613324;
8593 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8594 ::fidl_next::protocol::Flexibility::Strict;
8595
8596 type Protocol = crate::Directory;
8597
8598 type Request = crate::wire::Representation<'static>;
8599 }
8600
8601 pub struct GetAttributes;
8602
8603 impl ::fidl_next::Method for GetAttributes {
8604 const ORDINAL: u64 = 4414537700416816443;
8605 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8606 ::fidl_next::protocol::Flexibility::Strict;
8607
8608 type Protocol = crate::Directory;
8609
8610 type Request = crate::wire::NodeGetAttributesRequest;
8611 }
8612
8613 impl ::fidl_next::TwoWayMethod for GetAttributes {
8614 type Response = ::fidl_next::wire::Result<
8615 'static,
8616 crate::wire::NodeAttributes2<'static>,
8617 ::fidl_next::wire::Int32,
8618 >;
8619 }
8620
8621 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
8622 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8623
8624 fn respond(response: ___R) -> Self::Output {
8625 ::core::result::Result::Ok(response)
8626 }
8627 }
8628
8629 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
8630 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8631
8632 fn respond_err(response: ___R) -> Self::Output {
8633 ::core::result::Result::Err(response)
8634 }
8635 }
8636
8637 pub struct UpdateAttributes;
8638
8639 impl ::fidl_next::Method for UpdateAttributes {
8640 const ORDINAL: u64 = 3677402239314018056;
8641 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8642 ::fidl_next::protocol::Flexibility::Strict;
8643
8644 type Protocol = crate::Directory;
8645
8646 type Request = crate::wire::MutableNodeAttributes<'static>;
8647 }
8648
8649 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
8650 type Response = ::fidl_next::wire::Result<
8651 'static,
8652 crate::wire::NodeUpdateAttributesResponse,
8653 ::fidl_next::wire::Int32,
8654 >;
8655 }
8656
8657 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
8658 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8659
8660 fn respond(response: ___R) -> Self::Output {
8661 ::core::result::Result::Ok(response)
8662 }
8663 }
8664
8665 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
8666 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8667
8668 fn respond_err(response: ___R) -> Self::Output {
8669 ::core::result::Result::Err(response)
8670 }
8671 }
8672
8673 pub struct Sync;
8674
8675 impl ::fidl_next::Method for Sync {
8676 const ORDINAL: u64 = 3196473584242777161;
8677 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8678 ::fidl_next::protocol::Flexibility::Strict;
8679
8680 type Protocol = crate::Directory;
8681
8682 type Request = ::fidl_next::wire::EmptyMessageBody;
8683 }
8684
8685 impl ::fidl_next::TwoWayMethod for Sync {
8686 type Response = ::fidl_next::wire::Result<
8687 'static,
8688 crate::wire::NodeSyncResponse,
8689 ::fidl_next::wire::Int32,
8690 >;
8691 }
8692
8693 impl<___R> ::fidl_next::Respond<___R> for Sync {
8694 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8695
8696 fn respond(response: ___R) -> Self::Output {
8697 ::core::result::Result::Ok(response)
8698 }
8699 }
8700
8701 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
8702 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8703
8704 fn respond_err(response: ___R) -> Self::Output {
8705 ::core::result::Result::Err(response)
8706 }
8707 }
8708
8709 pub struct ListExtendedAttributes;
8710
8711 impl ::fidl_next::Method for ListExtendedAttributes {
8712 const ORDINAL: u64 = 5431626189872037072;
8713 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8714 ::fidl_next::protocol::Flexibility::Strict;
8715
8716 type Protocol = crate::Directory;
8717
8718 type Request = crate::wire::NodeListExtendedAttributesRequest;
8719 }
8720
8721 pub struct GetExtendedAttribute;
8722
8723 impl ::fidl_next::Method for GetExtendedAttribute {
8724 const ORDINAL: u64 = 5043930208506967771;
8725 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8726 ::fidl_next::protocol::Flexibility::Strict;
8727
8728 type Protocol = crate::Directory;
8729
8730 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
8731 }
8732
8733 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
8734 type Response = ::fidl_next::wire::Result<
8735 'static,
8736 crate::wire::ExtendedAttributeValue<'static>,
8737 ::fidl_next::wire::Int32,
8738 >;
8739 }
8740
8741 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
8742 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8743
8744 fn respond(response: ___R) -> Self::Output {
8745 ::core::result::Result::Ok(response)
8746 }
8747 }
8748
8749 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
8750 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8751
8752 fn respond_err(response: ___R) -> Self::Output {
8753 ::core::result::Result::Err(response)
8754 }
8755 }
8756
8757 pub struct SetExtendedAttribute;
8758
8759 impl ::fidl_next::Method for SetExtendedAttribute {
8760 const ORDINAL: u64 = 5374223046099989052;
8761 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8762 ::fidl_next::protocol::Flexibility::Strict;
8763
8764 type Protocol = crate::Directory;
8765
8766 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
8767 }
8768
8769 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
8770 type Response = ::fidl_next::wire::Result<
8771 'static,
8772 crate::wire::NodeSetExtendedAttributeResponse,
8773 ::fidl_next::wire::Int32,
8774 >;
8775 }
8776
8777 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
8778 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8779
8780 fn respond(response: ___R) -> Self::Output {
8781 ::core::result::Result::Ok(response)
8782 }
8783 }
8784
8785 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
8786 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8787
8788 fn respond_err(response: ___R) -> Self::Output {
8789 ::core::result::Result::Err(response)
8790 }
8791 }
8792
8793 pub struct RemoveExtendedAttribute;
8794
8795 impl ::fidl_next::Method for RemoveExtendedAttribute {
8796 const ORDINAL: u64 = 8794297771444732717;
8797 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8798 ::fidl_next::protocol::Flexibility::Strict;
8799
8800 type Protocol = crate::Directory;
8801
8802 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
8803 }
8804
8805 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
8806 type Response = ::fidl_next::wire::Result<
8807 'static,
8808 crate::wire::NodeRemoveExtendedAttributeResponse,
8809 ::fidl_next::wire::Int32,
8810 >;
8811 }
8812
8813 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
8814 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8815
8816 fn respond(response: ___R) -> Self::Output {
8817 ::core::result::Result::Ok(response)
8818 }
8819 }
8820
8821 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
8822 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8823
8824 fn respond_err(response: ___R) -> Self::Output {
8825 ::core::result::Result::Err(response)
8826 }
8827 }
8828
8829 pub struct DeprecatedOpen;
8830
8831 impl ::fidl_next::Method for DeprecatedOpen {
8832 const ORDINAL: u64 = 3193127272456937152;
8833 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8834 ::fidl_next::protocol::Flexibility::Flexible;
8835
8836 type Protocol = crate::Directory;
8837
8838 type Request = crate::wire::DirectoryDeprecatedOpenRequest<'static>;
8839 }
8840
8841 pub struct Open;
8842
8843 impl ::fidl_next::Method for Open {
8844 const ORDINAL: u64 = 6236883748953765593;
8845 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8846 ::fidl_next::protocol::Flexibility::Strict;
8847
8848 type Protocol = crate::Directory;
8849
8850 type Request = crate::wire::DirectoryOpenRequest<'static>;
8851 }
8852
8853 pub struct ReadDirents;
8854
8855 impl ::fidl_next::Method for ReadDirents {
8856 const ORDINAL: u64 = 3855785432100874762;
8857 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8858 ::fidl_next::protocol::Flexibility::Strict;
8859
8860 type Protocol = crate::Directory;
8861
8862 type Request = crate::wire::DirectoryReadDirentsRequest;
8863 }
8864
8865 impl ::fidl_next::TwoWayMethod for ReadDirents {
8866 type Response = crate::wire::DirectoryReadDirentsResponse<'static>;
8867 }
8868
8869 impl<___R> ::fidl_next::Respond<___R> for ReadDirents {
8870 type Output = ___R;
8871
8872 fn respond(response: ___R) -> Self::Output {
8873 response
8874 }
8875 }
8876
8877 pub struct Rewind;
8878
8879 impl ::fidl_next::Method for Rewind {
8880 const ORDINAL: u64 = 1635123508515392625;
8881 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8882 ::fidl_next::protocol::Flexibility::Strict;
8883
8884 type Protocol = crate::Directory;
8885
8886 type Request = ::fidl_next::wire::EmptyMessageBody;
8887 }
8888
8889 impl ::fidl_next::TwoWayMethod for Rewind {
8890 type Response = crate::wire::DirectoryRewindResponse;
8891 }
8892
8893 impl<___R> ::fidl_next::Respond<___R> for Rewind {
8894 type Output = crate::generic::DirectoryRewindResponse<___R>;
8895
8896 fn respond(response: ___R) -> Self::Output {
8897 crate::generic::DirectoryRewindResponse { s: response }
8898 }
8899 }
8900
8901 pub struct GetToken;
8902
8903 impl ::fidl_next::Method for GetToken {
8904 const ORDINAL: u64 = 2787337947777369685;
8905 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8906 ::fidl_next::protocol::Flexibility::Strict;
8907
8908 type Protocol = crate::Directory;
8909
8910 type Request = ::fidl_next::wire::EmptyMessageBody;
8911 }
8912
8913 impl ::fidl_next::TwoWayMethod for GetToken {
8914 type Response = crate::wire::DirectoryGetTokenResponse;
8915 }
8916
8917 impl<___R> ::fidl_next::Respond<___R> for GetToken {
8918 type Output = ___R;
8919
8920 fn respond(response: ___R) -> Self::Output {
8921 response
8922 }
8923 }
8924
8925 pub struct Link;
8926
8927 impl ::fidl_next::Method for Link {
8928 const ORDINAL: u64 = 8360374984291987687;
8929 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8930 ::fidl_next::protocol::Flexibility::Strict;
8931
8932 type Protocol = crate::Directory;
8933
8934 type Request = crate::wire::DirectoryLinkRequest<'static>;
8935 }
8936
8937 impl ::fidl_next::TwoWayMethod for Link {
8938 type Response = crate::wire::DirectoryLinkResponse;
8939 }
8940
8941 impl<___R> ::fidl_next::Respond<___R> for Link {
8942 type Output = crate::generic::DirectoryLinkResponse<___R>;
8943
8944 fn respond(response: ___R) -> Self::Output {
8945 crate::generic::DirectoryLinkResponse { s: response }
8946 }
8947 }
8948
8949 pub struct Unlink;
8950
8951 impl ::fidl_next::Method for Unlink {
8952 const ORDINAL: u64 = 8433556716759383021;
8953 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8954 ::fidl_next::protocol::Flexibility::Strict;
8955
8956 type Protocol = crate::Directory;
8957
8958 type Request = crate::wire::DirectoryUnlinkRequest<'static>;
8959 }
8960
8961 impl ::fidl_next::TwoWayMethod for Unlink {
8962 type Response = ::fidl_next::wire::Result<
8963 'static,
8964 crate::wire::DirectoryUnlinkResponse,
8965 ::fidl_next::wire::Int32,
8966 >;
8967 }
8968
8969 impl<___R> ::fidl_next::Respond<___R> for Unlink {
8970 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8971
8972 fn respond(response: ___R) -> Self::Output {
8973 ::core::result::Result::Ok(response)
8974 }
8975 }
8976
8977 impl<___R> ::fidl_next::RespondErr<___R> for Unlink {
8978 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8979
8980 fn respond_err(response: ___R) -> Self::Output {
8981 ::core::result::Result::Err(response)
8982 }
8983 }
8984
8985 pub struct Rename;
8986
8987 impl ::fidl_next::Method for Rename {
8988 const ORDINAL: u64 = 8097726607824333022;
8989 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8990 ::fidl_next::protocol::Flexibility::Strict;
8991
8992 type Protocol = crate::Directory;
8993
8994 type Request = crate::wire::DirectoryRenameRequest<'static>;
8995 }
8996
8997 impl ::fidl_next::TwoWayMethod for Rename {
8998 type Response = ::fidl_next::wire::Result<
8999 'static,
9000 crate::wire::DirectoryRenameResponse,
9001 ::fidl_next::wire::Int32,
9002 >;
9003 }
9004
9005 impl<___R> ::fidl_next::Respond<___R> for Rename {
9006 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9007
9008 fn respond(response: ___R) -> Self::Output {
9009 ::core::result::Result::Ok(response)
9010 }
9011 }
9012
9013 impl<___R> ::fidl_next::RespondErr<___R> for Rename {
9014 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9015
9016 fn respond_err(response: ___R) -> Self::Output {
9017 ::core::result::Result::Err(response)
9018 }
9019 }
9020
9021 pub struct CreateSymlink;
9022
9023 impl ::fidl_next::Method for CreateSymlink {
9024 const ORDINAL: u64 = 2435901052462315657;
9025 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9026 ::fidl_next::protocol::Flexibility::Strict;
9027
9028 type Protocol = crate::Directory;
9029
9030 type Request = crate::wire::DirectoryCreateSymlinkRequest<'static>;
9031 }
9032
9033 impl ::fidl_next::TwoWayMethod for CreateSymlink {
9034 type Response = ::fidl_next::wire::Result<
9035 'static,
9036 crate::wire::DirectoryCreateSymlinkResponse,
9037 ::fidl_next::wire::Int32,
9038 >;
9039 }
9040
9041 impl<___R> ::fidl_next::Respond<___R> for CreateSymlink {
9042 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9043
9044 fn respond(response: ___R) -> Self::Output {
9045 ::core::result::Result::Ok(response)
9046 }
9047 }
9048
9049 impl<___R> ::fidl_next::RespondErr<___R> for CreateSymlink {
9050 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9051
9052 fn respond_err(response: ___R) -> Self::Output {
9053 ::core::result::Result::Err(response)
9054 }
9055 }
9056
9057 pub struct Watch;
9058
9059 impl ::fidl_next::Method for Watch {
9060 const ORDINAL: u64 = 6275512344170098065;
9061 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9062 ::fidl_next::protocol::Flexibility::Strict;
9063
9064 type Protocol = crate::Directory;
9065
9066 type Request = crate::wire::DirectoryWatchRequest;
9067 }
9068
9069 impl ::fidl_next::TwoWayMethod for Watch {
9070 type Response = crate::wire::DirectoryWatchResponse;
9071 }
9072
9073 impl<___R> ::fidl_next::Respond<___R> for Watch {
9074 type Output = crate::generic::DirectoryWatchResponse<___R>;
9075
9076 fn respond(response: ___R) -> Self::Output {
9077 crate::generic::DirectoryWatchResponse { s: response }
9078 }
9079 }
9080
9081 mod ___detail {
9082 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Directory
9083 where
9084 ___T: ::fidl_next::Transport,
9085 {
9086 type Client = DirectoryClient<___T>;
9087 type Server = DirectoryServer<___T>;
9088 }
9089
9090 #[repr(transparent)]
9092 pub struct DirectoryClient<___T: ::fidl_next::Transport> {
9093 #[allow(dead_code)]
9094 client: ::fidl_next::protocol::Client<___T>,
9095 }
9096
9097 impl<___T> DirectoryClient<___T>
9098 where
9099 ___T: ::fidl_next::Transport,
9100 {
9101 #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n to acquire the given type of lock.\n"]
9102 pub fn advisory_lock(
9103 &self,
9104
9105 request: impl ::fidl_next::Encode<
9106 crate::wire::AdvisoryLockRequest<'static>,
9107 <___T as ::fidl_next::Transport>::SendBuffer,
9108 >,
9109 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
9110 where
9111 <___T as ::fidl_next::Transport>::SendBuffer:
9112 ::fidl_next::encoder::InternalHandleEncoder,
9113 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9114 {
9115 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
9116 request,
9117 })
9118 }
9119
9120 #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n to acquire the given type of lock.\n"]
9121 pub fn advisory_lock_with<___R>(
9122 &self,
9123 request: ___R,
9124 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
9125 where
9126 ___R: ::fidl_next::Encode<
9127 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
9128 <___T as ::fidl_next::Transport>::SendBuffer,
9129 >,
9130 {
9131 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9132 7992130864415541162,
9133 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
9134 request,
9135 ))
9136 }
9137
9138 pub fn clone(
9139 &self,
9140
9141 request: impl ::fidl_next::Encode<
9142 ::fidl_next::ServerEnd<
9143 ::fidl_next_fuchsia_unknown::Cloneable,
9144 ::fidl_next::wire::fuchsia::Channel,
9145 >,
9146 <___T as ::fidl_next::Transport>::SendBuffer,
9147 >,
9148 ) -> ::fidl_next::SendFuture<'_, ___T>
9149 where
9150 <___T as ::fidl_next::Transport>::SendBuffer:
9151 ::fidl_next::encoder::InternalHandleEncoder,
9152 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9153 {
9154 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
9155 request,
9156 })
9157 }
9158
9159 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
9160 where
9161 ___R: ::fidl_next::Encode<
9162 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
9163 <___T as ::fidl_next::Transport>::SendBuffer,
9164 >,
9165 {
9166 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9167 2366825959783828089,
9168 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
9169 request,
9170 ))
9171 }
9172
9173 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
9174 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
9175 ::fidl_next::TwoWayFuture::from_untyped(
9176 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9177 6540867515453498750,
9178 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
9179 (),
9180 ),
9181 )
9182 }
9183
9184 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
9185 ::fidl_next::TwoWayFuture::from_untyped(
9186 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9187 2763219980499352582,
9188 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
9189 (),
9190 ),
9191 )
9192 }
9193
9194 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9195 pub fn deprecated_clone(
9196 &self,
9197
9198 flags: impl ::fidl_next::Encode<
9199 crate::wire::OpenFlags,
9200 <___T as ::fidl_next::Transport>::SendBuffer,
9201 >,
9202
9203 object: impl ::fidl_next::Encode<
9204 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
9205 <___T as ::fidl_next::Transport>::SendBuffer,
9206 >,
9207 ) -> ::fidl_next::SendFuture<'_, ___T>
9208 where
9209 <___T as ::fidl_next::Transport>::SendBuffer:
9210 ::fidl_next::encoder::InternalHandleEncoder,
9211 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9212 {
9213 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
9214 flags,
9215
9216 object,
9217 })
9218 }
9219
9220 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9221 pub fn deprecated_clone_with<___R>(
9222 &self,
9223 request: ___R,
9224 ) -> ::fidl_next::SendFuture<'_, ___T>
9225 where
9226 ___R: ::fidl_next::Encode<
9227 crate::wire::NodeDeprecatedCloneRequest,
9228 <___T as ::fidl_next::Transport>::SendBuffer,
9229 >,
9230 {
9231 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9232 6512600400724287855,
9233 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
9234 request,
9235 ))
9236 }
9237
9238 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
9239 pub fn deprecated_get_attr(
9240 &self,
9241 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
9242 ::fidl_next::TwoWayFuture::from_untyped(
9243 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9244 8689798978500614909,
9245 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
9246 (),
9247 ),
9248 )
9249 }
9250
9251 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9252 pub fn deprecated_set_attr(
9253 &self,
9254
9255 flags: impl ::fidl_next::Encode<
9256 crate::wire::NodeAttributeFlags,
9257 <___T as ::fidl_next::Transport>::SendBuffer,
9258 >,
9259
9260 attributes: impl ::fidl_next::Encode<
9261 crate::wire::NodeAttributes,
9262 <___T as ::fidl_next::Transport>::SendBuffer,
9263 >,
9264 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
9265 where
9266 <___T as ::fidl_next::Transport>::SendBuffer:
9267 ::fidl_next::encoder::InternalHandleEncoder,
9268 {
9269 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
9270 flags,
9271
9272 attributes,
9273 })
9274 }
9275
9276 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9277 pub fn deprecated_set_attr_with<___R>(
9278 &self,
9279 request: ___R,
9280 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
9281 where
9282 ___R: ::fidl_next::Encode<
9283 crate::wire::NodeDeprecatedSetAttrRequest,
9284 <___T as ::fidl_next::Transport>::SendBuffer,
9285 >,
9286 {
9287 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9288 4721673413776871238,
9289 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
9290 request,
9291 ))
9292 }
9293
9294 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
9295 pub fn deprecated_get_flags(
9296 &self,
9297 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
9298 ::fidl_next::TwoWayFuture::from_untyped(
9299 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9300 6595803110182632097,
9301 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
9302 (),
9303 ),
9304 )
9305 }
9306
9307 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9308 pub fn deprecated_set_flags(
9309 &self,
9310
9311 flags: impl ::fidl_next::Encode<
9312 crate::wire::OpenFlags,
9313 <___T as ::fidl_next::Transport>::SendBuffer,
9314 >,
9315 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
9316 where
9317 <___T as ::fidl_next::Transport>::SendBuffer:
9318 ::fidl_next::encoder::InternalHandleEncoder,
9319 {
9320 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
9321 flags,
9322 })
9323 }
9324
9325 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9326 pub fn deprecated_set_flags_with<___R>(
9327 &self,
9328 request: ___R,
9329 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
9330 where
9331 ___R: ::fidl_next::Encode<
9332 crate::wire::NodeDeprecatedSetFlagsRequest,
9333 <___T as ::fidl_next::Transport>::SendBuffer,
9334 >,
9335 {
9336 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9337 5950864159036794675,
9338 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
9339 request,
9340 ))
9341 }
9342
9343 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
9344 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
9345 ::fidl_next::TwoWayFuture::from_untyped(
9346 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9347 105530239381466147,
9348 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
9349 (),
9350 ),
9351 )
9352 }
9353
9354 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
9355 pub fn set_flags(
9356 &self,
9357
9358 flags: impl ::fidl_next::Encode<
9359 crate::wire::Flags,
9360 <___T as ::fidl_next::Transport>::SendBuffer,
9361 >,
9362 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
9363 where
9364 <___T as ::fidl_next::Transport>::SendBuffer:
9365 ::fidl_next::encoder::InternalHandleEncoder,
9366 {
9367 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
9368 }
9369
9370 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
9371 pub fn set_flags_with<___R>(
9372 &self,
9373 request: ___R,
9374 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
9375 where
9376 ___R: ::fidl_next::Encode<
9377 crate::wire::NodeSetFlagsRequest,
9378 <___T as ::fidl_next::Transport>::SendBuffer,
9379 >,
9380 {
9381 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9382 6172186066099445416,
9383 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
9384 request,
9385 ))
9386 }
9387
9388 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
9389 pub fn query_filesystem(
9390 &self,
9391 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
9392 ::fidl_next::TwoWayFuture::from_untyped(
9393 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9394 8013111122914313744,
9395 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
9396 (),
9397 ),
9398 )
9399 }
9400
9401 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
9402 pub fn get_attributes(
9403 &self,
9404
9405 query: impl ::fidl_next::Encode<
9406 crate::wire::NodeAttributesQuery,
9407 <___T as ::fidl_next::Transport>::SendBuffer,
9408 >,
9409 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
9410 where
9411 <___T as ::fidl_next::Transport>::SendBuffer:
9412 ::fidl_next::encoder::InternalHandleEncoder,
9413 {
9414 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
9415 }
9416
9417 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
9418 pub fn get_attributes_with<___R>(
9419 &self,
9420 request: ___R,
9421 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
9422 where
9423 ___R: ::fidl_next::Encode<
9424 crate::wire::NodeGetAttributesRequest,
9425 <___T as ::fidl_next::Transport>::SendBuffer,
9426 >,
9427 {
9428 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9429 4414537700416816443,
9430 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
9431 request,
9432 ))
9433 }
9434
9435 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
9436 pub fn update_attributes_with<___R>(
9437 &self,
9438 request: ___R,
9439 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
9440 where
9441 ___R: ::fidl_next::Encode<
9442 crate::wire::MutableNodeAttributes<'static>,
9443 <___T as ::fidl_next::Transport>::SendBuffer,
9444 >,
9445 {
9446 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9447 3677402239314018056,
9448 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
9449 request,
9450 ))
9451 }
9452
9453 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
9454 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
9455 ::fidl_next::TwoWayFuture::from_untyped(
9456 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9457 3196473584242777161,
9458 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
9459 (),
9460 ),
9461 )
9462 }
9463
9464 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
9465 pub fn list_extended_attributes(
9466 &self,
9467
9468 iterator: impl ::fidl_next::Encode<
9469 ::fidl_next::ServerEnd<
9470 crate::ExtendedAttributeIterator,
9471 ::fidl_next::wire::fuchsia::Channel,
9472 >,
9473 <___T as ::fidl_next::Transport>::SendBuffer,
9474 >,
9475 ) -> ::fidl_next::SendFuture<'_, ___T>
9476 where
9477 <___T as ::fidl_next::Transport>::SendBuffer:
9478 ::fidl_next::encoder::InternalHandleEncoder,
9479 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9480 {
9481 self.list_extended_attributes_with(
9482 crate::generic::NodeListExtendedAttributesRequest { iterator },
9483 )
9484 }
9485
9486 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
9487 pub fn list_extended_attributes_with<___R>(
9488 &self,
9489 request: ___R,
9490 ) -> ::fidl_next::SendFuture<'_, ___T>
9491 where
9492 ___R: ::fidl_next::Encode<
9493 crate::wire::NodeListExtendedAttributesRequest,
9494 <___T as ::fidl_next::Transport>::SendBuffer,
9495 >,
9496 {
9497 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9498 5431626189872037072,
9499 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
9500 request,
9501 ))
9502 }
9503
9504 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
9505 pub fn get_extended_attribute(
9506 &self,
9507
9508 name: impl ::fidl_next::Encode<
9509 ::fidl_next::wire::Vector<'static, u8>,
9510 <___T as ::fidl_next::Transport>::SendBuffer,
9511 >,
9512 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
9513 where
9514 <___T as ::fidl_next::Transport>::SendBuffer:
9515 ::fidl_next::encoder::InternalHandleEncoder,
9516 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9517 {
9518 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
9519 name,
9520 })
9521 }
9522
9523 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
9524 pub fn get_extended_attribute_with<___R>(
9525 &self,
9526 request: ___R,
9527 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
9528 where
9529 ___R: ::fidl_next::Encode<
9530 crate::wire::NodeGetExtendedAttributeRequest<'static>,
9531 <___T as ::fidl_next::Transport>::SendBuffer,
9532 >,
9533 {
9534 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9535 5043930208506967771,
9536 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
9537 request,
9538 ))
9539 }
9540
9541 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
9542 pub fn set_extended_attribute(
9543 &self,
9544
9545 name: impl ::fidl_next::Encode<
9546 ::fidl_next::wire::Vector<'static, u8>,
9547 <___T as ::fidl_next::Transport>::SendBuffer,
9548 >,
9549
9550 value: impl ::fidl_next::Encode<
9551 crate::wire::ExtendedAttributeValue<'static>,
9552 <___T as ::fidl_next::Transport>::SendBuffer,
9553 >,
9554
9555 mode: impl ::fidl_next::Encode<
9556 crate::wire::SetExtendedAttributeMode,
9557 <___T as ::fidl_next::Transport>::SendBuffer,
9558 >,
9559 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
9560 where
9561 <___T as ::fidl_next::Transport>::SendBuffer:
9562 ::fidl_next::encoder::InternalHandleEncoder,
9563 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9564 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9565 {
9566 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
9567 name,
9568
9569 value,
9570
9571 mode,
9572 })
9573 }
9574
9575 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
9576 pub fn set_extended_attribute_with<___R>(
9577 &self,
9578 request: ___R,
9579 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
9580 where
9581 ___R: ::fidl_next::Encode<
9582 crate::wire::NodeSetExtendedAttributeRequest<'static>,
9583 <___T as ::fidl_next::Transport>::SendBuffer,
9584 >,
9585 {
9586 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9587 5374223046099989052,
9588 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
9589 request,
9590 ))
9591 }
9592
9593 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
9594 pub fn remove_extended_attribute(
9595 &self,
9596
9597 name: impl ::fidl_next::Encode<
9598 ::fidl_next::wire::Vector<'static, u8>,
9599 <___T as ::fidl_next::Transport>::SendBuffer,
9600 >,
9601 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
9602 where
9603 <___T as ::fidl_next::Transport>::SendBuffer:
9604 ::fidl_next::encoder::InternalHandleEncoder,
9605 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9606 {
9607 self.remove_extended_attribute_with(
9608 crate::generic::NodeRemoveExtendedAttributeRequest { name },
9609 )
9610 }
9611
9612 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
9613 pub fn remove_extended_attribute_with<___R>(
9614 &self,
9615 request: ___R,
9616 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
9617 where
9618 ___R: ::fidl_next::Encode<
9619 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
9620 <___T as ::fidl_next::Transport>::SendBuffer,
9621 >,
9622 {
9623 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9624 8794297771444732717,
9625 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
9626 request,
9627 ))
9628 }
9629
9630 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
9631 pub fn deprecated_open(
9632 &self,
9633
9634 flags: impl ::fidl_next::Encode<
9635 crate::wire::OpenFlags,
9636 <___T as ::fidl_next::Transport>::SendBuffer,
9637 >,
9638
9639 mode: impl ::fidl_next::Encode<
9640 crate::wire::ModeType,
9641 <___T as ::fidl_next::Transport>::SendBuffer,
9642 >,
9643
9644 path: impl ::fidl_next::Encode<
9645 ::fidl_next::wire::String<'static>,
9646 <___T as ::fidl_next::Transport>::SendBuffer,
9647 >,
9648
9649 object: impl ::fidl_next::Encode<
9650 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
9651 <___T as ::fidl_next::Transport>::SendBuffer,
9652 >,
9653 ) -> ::fidl_next::SendFuture<'_, ___T>
9654 where
9655 <___T as ::fidl_next::Transport>::SendBuffer:
9656 ::fidl_next::encoder::InternalHandleEncoder,
9657 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9658 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9659 {
9660 self.deprecated_open_with(crate::generic::DirectoryDeprecatedOpenRequest {
9661 flags,
9662
9663 mode,
9664
9665 path,
9666
9667 object,
9668 })
9669 }
9670
9671 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
9672 pub fn deprecated_open_with<___R>(
9673 &self,
9674 request: ___R,
9675 ) -> ::fidl_next::SendFuture<'_, ___T>
9676 where
9677 ___R: ::fidl_next::Encode<
9678 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
9679 <___T as ::fidl_next::Transport>::SendBuffer,
9680 >,
9681 {
9682 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9683 3193127272456937152,
9684 <super::DeprecatedOpen as ::fidl_next::Method>::FLEXIBILITY,
9685 request,
9686 ))
9687 }
9688
9689 #[doc = " Open (or create) a node relative to this directory. Any errors are communicated via an\n epitaph sent on the `object` channel.\n\n Errors:\n * `ZX_ERR_BAD_PATH` if `path` is invalid\n * See [`Flags`] for other errors which may be communicated based on `flags`\n"]
9690 pub fn open(
9691 &self,
9692
9693 path: impl ::fidl_next::Encode<
9694 ::fidl_next::wire::String<'static>,
9695 <___T as ::fidl_next::Transport>::SendBuffer,
9696 >,
9697
9698 flags: impl ::fidl_next::Encode<
9699 crate::wire::Flags,
9700 <___T as ::fidl_next::Transport>::SendBuffer,
9701 >,
9702
9703 options: impl ::fidl_next::Encode<
9704 crate::wire::Options<'static>,
9705 <___T as ::fidl_next::Transport>::SendBuffer,
9706 >,
9707
9708 object: impl ::fidl_next::Encode<
9709 ::fidl_next::wire::fuchsia::Channel,
9710 <___T as ::fidl_next::Transport>::SendBuffer,
9711 >,
9712 ) -> ::fidl_next::SendFuture<'_, ___T>
9713 where
9714 <___T as ::fidl_next::Transport>::SendBuffer:
9715 ::fidl_next::encoder::InternalHandleEncoder,
9716 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9717 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9718 {
9719 self.open_with(crate::generic::DirectoryOpenRequest {
9720 path,
9721
9722 flags,
9723
9724 options,
9725
9726 object,
9727 })
9728 }
9729
9730 #[doc = " Open (or create) a node relative to this directory. Any errors are communicated via an\n epitaph sent on the `object` channel.\n\n Errors:\n * `ZX_ERR_BAD_PATH` if `path` is invalid\n * See [`Flags`] for other errors which may be communicated based on `flags`\n"]
9731 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
9732 where
9733 ___R: ::fidl_next::Encode<
9734 crate::wire::DirectoryOpenRequest<'static>,
9735 <___T as ::fidl_next::Transport>::SendBuffer,
9736 >,
9737 {
9738 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9739 6236883748953765593,
9740 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
9741 request,
9742 ))
9743 }
9744
9745 #[doc = " Reads a collection of variably sized dirents into a buffer.\n The number of dirents in a directory may be very large: akin to\n calling read multiple times on a file, directories have a seek\n offset which is updated on subsequent calls to ReadDirents.\n Each call to ReadDirents will only return whole dirent structures,\n they will not get split across ReadDirent calls. When the seek\n offset reaches the end, `dirents` will be empty.\n\n These dirents are of the form:\n ```\n struct dirent {\n // Describes the inode of the entry.\n uint64 ino;\n // Describes the length of the dirent name in bytes.\n uint8 size;\n // Describes the type of the entry. Aligned with the\n // POSIX d_type values. Use `DirentType` constants.\n uint8 type;\n // Unterminated name of entry.\n char name[0];\n }\n ```\n\n This method does not require any rights, since one could always probe for\n directory contents by triggering name conflicts during file creation.\n"]
9746 pub fn read_dirents(
9747 &self,
9748
9749 max_bytes: impl ::fidl_next::Encode<
9750 ::fidl_next::wire::Uint64,
9751 <___T as ::fidl_next::Transport>::SendBuffer,
9752 >,
9753 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
9754 where
9755 <___T as ::fidl_next::Transport>::SendBuffer:
9756 ::fidl_next::encoder::InternalHandleEncoder,
9757 {
9758 self.read_dirents_with(crate::generic::DirectoryReadDirentsRequest { max_bytes })
9759 }
9760
9761 #[doc = " Reads a collection of variably sized dirents into a buffer.\n The number of dirents in a directory may be very large: akin to\n calling read multiple times on a file, directories have a seek\n offset which is updated on subsequent calls to ReadDirents.\n Each call to ReadDirents will only return whole dirent structures,\n they will not get split across ReadDirent calls. When the seek\n offset reaches the end, `dirents` will be empty.\n\n These dirents are of the form:\n ```\n struct dirent {\n // Describes the inode of the entry.\n uint64 ino;\n // Describes the length of the dirent name in bytes.\n uint8 size;\n // Describes the type of the entry. Aligned with the\n // POSIX d_type values. Use `DirentType` constants.\n uint8 type;\n // Unterminated name of entry.\n char name[0];\n }\n ```\n\n This method does not require any rights, since one could always probe for\n directory contents by triggering name conflicts during file creation.\n"]
9762 pub fn read_dirents_with<___R>(
9763 &self,
9764 request: ___R,
9765 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
9766 where
9767 ___R: ::fidl_next::Encode<
9768 crate::wire::DirectoryReadDirentsRequest,
9769 <___T as ::fidl_next::Transport>::SendBuffer,
9770 >,
9771 {
9772 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9773 3855785432100874762,
9774 <super::ReadDirents as ::fidl_next::Method>::FLEXIBILITY,
9775 request,
9776 ))
9777 }
9778
9779 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
9780 pub fn rewind(&self) -> ::fidl_next::TwoWayFuture<'_, super::Rewind, ___T> {
9781 ::fidl_next::TwoWayFuture::from_untyped(
9782 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9783 1635123508515392625,
9784 <super::Rewind as ::fidl_next::Method>::FLEXIBILITY,
9785 (),
9786 ),
9787 )
9788 }
9789
9790 #[doc = " Acquires a token to a Directory which can be used to identify access to it at a later point\n in time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns\n `ZX_ERR_BAD_HANDLE`.\n"]
9791 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
9792 ::fidl_next::TwoWayFuture::from_untyped(
9793 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9794 2787337947777369685,
9795 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
9796 (),
9797 ),
9798 )
9799 }
9800
9801 #[doc = " Creates a link to an object named src by the name dst, within a directory represented by\n token.\n\n `src` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE` and\n `OpenFlags.RIGHT_READABLE`, otherwise returns `ZX_ERR_BAD_HANDLE`.\n\n This will be atomic with respect to renaming or unlinking the source concurrently e.g. if\n there are two actors operating concurrently, and one actor performs a rename that affects\n the source within this directory, and the other does a link, each will appear to occur\n atomically in an unspecified order.\n"]
9802 pub fn link(
9803 &self,
9804
9805 src: impl ::fidl_next::Encode<
9806 ::fidl_next::wire::String<'static>,
9807 <___T as ::fidl_next::Transport>::SendBuffer,
9808 >,
9809
9810 dst_parent_token: impl ::fidl_next::Encode<
9811 ::fidl_next::wire::fuchsia::NullableHandle,
9812 <___T as ::fidl_next::Transport>::SendBuffer,
9813 >,
9814
9815 dst: impl ::fidl_next::Encode<
9816 ::fidl_next::wire::String<'static>,
9817 <___T as ::fidl_next::Transport>::SendBuffer,
9818 >,
9819 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
9820 where
9821 <___T as ::fidl_next::Transport>::SendBuffer:
9822 ::fidl_next::encoder::InternalHandleEncoder,
9823 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9824 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9825 {
9826 self.link_with(crate::generic::DirectoryLinkRequest { src, dst_parent_token, dst })
9827 }
9828
9829 #[doc = " Creates a link to an object named src by the name dst, within a directory represented by\n token.\n\n `src` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE` and\n `OpenFlags.RIGHT_READABLE`, otherwise returns `ZX_ERR_BAD_HANDLE`.\n\n This will be atomic with respect to renaming or unlinking the source concurrently e.g. if\n there are two actors operating concurrently, and one actor performs a rename that affects\n the source within this directory, and the other does a link, each will appear to occur\n atomically in an unspecified order.\n"]
9830 pub fn link_with<___R>(
9831 &self,
9832 request: ___R,
9833 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
9834 where
9835 ___R: ::fidl_next::Encode<
9836 crate::wire::DirectoryLinkRequest<'static>,
9837 <___T as ::fidl_next::Transport>::SendBuffer,
9838 >,
9839 {
9840 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9841 8360374984291987687,
9842 <super::Link as ::fidl_next::Method>::FLEXIBILITY,
9843 request,
9844 ))
9845 }
9846
9847 #[doc = " Removes a child node from the this directory\'s list of entries.\n\n Note: this does not guarantee that the underlying object is destroyed.\n Although the link will be removed from the containing directory,\n objects with multiple references (such as files which are still open)\n will not actually be destroyed until all references are closed.\n\n * error `ZX_ERR_ACCESS_DENIED` if the connection does not have\n [`Rights.WRITE_BYTES`].\n * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not\n support writing.\n * error `ZX_ERR_BAD_PATH` if `name` is invalid.\n * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory.\n * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point,\n containing a remote channel.\n * error `ZX_ERR_NOT_DIR` if the options requested a directory but\n something other than a directory was found.\n\n Other errors may be returned for filesystem-specific reasons.\n\n This method requires the following rights:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n"]
9848 pub fn unlink(
9849 &self,
9850
9851 name: impl ::fidl_next::Encode<
9852 ::fidl_next::wire::String<'static>,
9853 <___T as ::fidl_next::Transport>::SendBuffer,
9854 >,
9855
9856 options: impl ::fidl_next::Encode<
9857 crate::wire::UnlinkOptions<'static>,
9858 <___T as ::fidl_next::Transport>::SendBuffer,
9859 >,
9860 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
9861 where
9862 <___T as ::fidl_next::Transport>::SendBuffer:
9863 ::fidl_next::encoder::InternalHandleEncoder,
9864 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9865 {
9866 self.unlink_with(crate::generic::DirectoryUnlinkRequest { name, options })
9867 }
9868
9869 #[doc = " Removes a child node from the this directory\'s list of entries.\n\n Note: this does not guarantee that the underlying object is destroyed.\n Although the link will be removed from the containing directory,\n objects with multiple references (such as files which are still open)\n will not actually be destroyed until all references are closed.\n\n * error `ZX_ERR_ACCESS_DENIED` if the connection does not have\n [`Rights.WRITE_BYTES`].\n * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not\n support writing.\n * error `ZX_ERR_BAD_PATH` if `name` is invalid.\n * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory.\n * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point,\n containing a remote channel.\n * error `ZX_ERR_NOT_DIR` if the options requested a directory but\n something other than a directory was found.\n\n Other errors may be returned for filesystem-specific reasons.\n\n This method requires the following rights:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n"]
9870 pub fn unlink_with<___R>(
9871 &self,
9872 request: ___R,
9873 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
9874 where
9875 ___R: ::fidl_next::Encode<
9876 crate::wire::DirectoryUnlinkRequest<'static>,
9877 <___T as ::fidl_next::Transport>::SendBuffer,
9878 >,
9879 {
9880 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9881 8433556716759383021,
9882 <super::Unlink as ::fidl_next::Method>::FLEXIBILITY,
9883 request,
9884 ))
9885 }
9886
9887 #[doc = " Renames a node named `src` to the name `dst`, in a directory represented\n by `dst_parent_token`.\n\n `src` and `dst` must be valid node names.\n See [`Name`] for what constitutes a valid name.\n\n This method requires the following rights on both the current connection, and the connection\n identified by `dst_parent_token`:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n\n The following requirements are necessary to avoid rights escalations.\n\n If the source and destination directory differ, the source directory must also have the\n maximal set of abilities supported for files, which would typically be\n [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`], [`Rights.GET_ATTRIBUTES`] and\n [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also support the [`Rights.EXECUTE`]\n right.\n\n If `src` refers to a directory, and differs from the destination directory, then the source\n directory must have also have the [`Rights.CONNECT`] and [`Rights.TRAVERSE`] rights.\n\n * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.\n * error `ZX_ERR_ACCESS_DENIED` for insufficient rights.\n"]
9888 pub fn rename(
9889 &self,
9890
9891 src: impl ::fidl_next::Encode<
9892 ::fidl_next::wire::String<'static>,
9893 <___T as ::fidl_next::Transport>::SendBuffer,
9894 >,
9895
9896 dst_parent_token: impl ::fidl_next::Encode<
9897 ::fidl_next::wire::fuchsia::Event,
9898 <___T as ::fidl_next::Transport>::SendBuffer,
9899 >,
9900
9901 dst: impl ::fidl_next::Encode<
9902 ::fidl_next::wire::String<'static>,
9903 <___T as ::fidl_next::Transport>::SendBuffer,
9904 >,
9905 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
9906 where
9907 <___T as ::fidl_next::Transport>::SendBuffer:
9908 ::fidl_next::encoder::InternalHandleEncoder,
9909 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9910 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9911 {
9912 self.rename_with(crate::generic::DirectoryRenameRequest {
9913 src,
9914
9915 dst_parent_token,
9916
9917 dst,
9918 })
9919 }
9920
9921 #[doc = " Renames a node named `src` to the name `dst`, in a directory represented\n by `dst_parent_token`.\n\n `src` and `dst` must be valid node names.\n See [`Name`] for what constitutes a valid name.\n\n This method requires the following rights on both the current connection, and the connection\n identified by `dst_parent_token`:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n\n The following requirements are necessary to avoid rights escalations.\n\n If the source and destination directory differ, the source directory must also have the\n maximal set of abilities supported for files, which would typically be\n [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`], [`Rights.GET_ATTRIBUTES`] and\n [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also support the [`Rights.EXECUTE`]\n right.\n\n If `src` refers to a directory, and differs from the destination directory, then the source\n directory must have also have the [`Rights.CONNECT`] and [`Rights.TRAVERSE`] rights.\n\n * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.\n * error `ZX_ERR_ACCESS_DENIED` for insufficient rights.\n"]
9922 pub fn rename_with<___R>(
9923 &self,
9924 request: ___R,
9925 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
9926 where
9927 ___R: ::fidl_next::Encode<
9928 crate::wire::DirectoryRenameRequest<'static>,
9929 <___T as ::fidl_next::Transport>::SendBuffer,
9930 >,
9931 {
9932 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9933 8097726607824333022,
9934 <super::Rename as ::fidl_next::Method>::FLEXIBILITY,
9935 request,
9936 ))
9937 }
9938
9939 #[doc = " Creates a symbolic link.\n\n `name` is the name to be given to the created symbolic link.\n `target` is the target of the symbolic link, which has no meaning on the server. The server\n will perform no validation of `target` except for a server chosen maximum length.\n `connection` is an optional server end of a channel that will speak the Symlink protocol\n on the successfully created node.\n\n * [`Rights.MODIFY_DIRECTORY`]\n\n * error `ZX_ERR_ALREADY_EXISTS` if `name` already exists.\n * error `ZX_ERR_BAD_PATH` if `target` exceeds the server length limit for symbolic links.\n * error `ZX_ERR_INVALID_ARGS` if `name` is not a valid [`Name`].\n * error `ZX_ERR_NOT_SUPPORTED` if creating symbolic links is not supported by the server.\n"]
9940 pub fn create_symlink(
9941 &self,
9942
9943 name: impl ::fidl_next::Encode<
9944 ::fidl_next::wire::String<'static>,
9945 <___T as ::fidl_next::Transport>::SendBuffer,
9946 >,
9947
9948 target: impl ::fidl_next::Encode<
9949 ::fidl_next::wire::Vector<'static, u8>,
9950 <___T as ::fidl_next::Transport>::SendBuffer,
9951 >,
9952
9953 connection: impl ::fidl_next::Encode<
9954 ::fidl_next::ServerEnd<
9955 crate::Symlink,
9956 ::fidl_next::wire::fuchsia::OptionalChannel,
9957 >,
9958 <___T as ::fidl_next::Transport>::SendBuffer,
9959 >,
9960 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
9961 where
9962 <___T as ::fidl_next::Transport>::SendBuffer:
9963 ::fidl_next::encoder::InternalHandleEncoder,
9964 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9965 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9966 {
9967 self.create_symlink_with(crate::generic::DirectoryCreateSymlinkRequest {
9968 name,
9969
9970 target,
9971
9972 connection,
9973 })
9974 }
9975
9976 #[doc = " Creates a symbolic link.\n\n `name` is the name to be given to the created symbolic link.\n `target` is the target of the symbolic link, which has no meaning on the server. The server\n will perform no validation of `target` except for a server chosen maximum length.\n `connection` is an optional server end of a channel that will speak the Symlink protocol\n on the successfully created node.\n\n * [`Rights.MODIFY_DIRECTORY`]\n\n * error `ZX_ERR_ALREADY_EXISTS` if `name` already exists.\n * error `ZX_ERR_BAD_PATH` if `target` exceeds the server length limit for symbolic links.\n * error `ZX_ERR_INVALID_ARGS` if `name` is not a valid [`Name`].\n * error `ZX_ERR_NOT_SUPPORTED` if creating symbolic links is not supported by the server.\n"]
9977 pub fn create_symlink_with<___R>(
9978 &self,
9979 request: ___R,
9980 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
9981 where
9982 ___R: ::fidl_next::Encode<
9983 crate::wire::DirectoryCreateSymlinkRequest<'static>,
9984 <___T as ::fidl_next::Transport>::SendBuffer,
9985 >,
9986 {
9987 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9988 2435901052462315657,
9989 <super::CreateSymlink as ::fidl_next::Method>::FLEXIBILITY,
9990 request,
9991 ))
9992 }
9993
9994 #[doc = " Watches a directory, receiving events of added messages on the\n watcher request channel.\n\n Options must be zero; it is reserved.\n\n This method does not require any rights, similar to ReadDirents.\n"]
9995 pub fn watch(
9996 &self,
9997
9998 mask: impl ::fidl_next::Encode<
9999 crate::wire::WatchMask,
10000 <___T as ::fidl_next::Transport>::SendBuffer,
10001 >,
10002
10003 options: impl ::fidl_next::Encode<
10004 ::fidl_next::wire::Uint32,
10005 <___T as ::fidl_next::Transport>::SendBuffer,
10006 >,
10007
10008 watcher: impl ::fidl_next::Encode<
10009 ::fidl_next::ServerEnd<
10010 crate::DirectoryWatcher,
10011 ::fidl_next::wire::fuchsia::Channel,
10012 >,
10013 <___T as ::fidl_next::Transport>::SendBuffer,
10014 >,
10015 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
10016 where
10017 <___T as ::fidl_next::Transport>::SendBuffer:
10018 ::fidl_next::encoder::InternalHandleEncoder,
10019 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10020 {
10021 self.watch_with(crate::generic::DirectoryWatchRequest { mask, options, watcher })
10022 }
10023
10024 #[doc = " Watches a directory, receiving events of added messages on the\n watcher request channel.\n\n Options must be zero; it is reserved.\n\n This method does not require any rights, similar to ReadDirents.\n"]
10025 pub fn watch_with<___R>(
10026 &self,
10027 request: ___R,
10028 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
10029 where
10030 ___R: ::fidl_next::Encode<
10031 crate::wire::DirectoryWatchRequest,
10032 <___T as ::fidl_next::Transport>::SendBuffer,
10033 >,
10034 {
10035 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10036 6275512344170098065,
10037 <super::Watch as ::fidl_next::Method>::FLEXIBILITY,
10038 request,
10039 ))
10040 }
10041 }
10042
10043 #[repr(transparent)]
10045 pub struct DirectoryServer<___T: ::fidl_next::Transport> {
10046 server: ::fidl_next::protocol::Server<___T>,
10047 }
10048
10049 impl<___T> DirectoryServer<___T>
10050 where
10051 ___T: ::fidl_next::Transport,
10052 {
10053 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
10054 pub fn on_open(
10055 &self,
10056
10057 s: impl ::fidl_next::Encode<
10058 ::fidl_next::wire::Int32,
10059 <___T as ::fidl_next::Transport>::SendBuffer,
10060 >,
10061
10062 info: impl ::fidl_next::Encode<
10063 crate::wire_optional::NodeInfoDeprecated<'static>,
10064 <___T as ::fidl_next::Transport>::SendBuffer,
10065 >,
10066 ) -> ::fidl_next::SendFuture<'_, ___T>
10067 where
10068 <___T as ::fidl_next::Transport>::SendBuffer:
10069 ::fidl_next::encoder::InternalHandleEncoder,
10070 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10071 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10072 {
10073 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
10074 }
10075
10076 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
10077
10078 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
10079 where
10080 ___R: ::fidl_next::Encode<
10081 <super::OnOpen as ::fidl_next::Method>::Request,
10082 <___T as ::fidl_next::Transport>::SendBuffer,
10083 >,
10084 {
10085 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
10086 9207534335756671346,
10087 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
10088 request,
10089 ))
10090 }
10091
10092 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
10093
10094 pub fn on_representation_with<___R>(
10095 &self,
10096 request: ___R,
10097 ) -> ::fidl_next::SendFuture<'_, ___T>
10098 where
10099 ___R: ::fidl_next::Encode<
10100 <super::OnRepresentation as ::fidl_next::Method>::Request,
10101 <___T as ::fidl_next::Transport>::SendBuffer,
10102 >,
10103 {
10104 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
10105 6679970090861613324,
10106 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
10107 request,
10108 ))
10109 }
10110 }
10111 }
10112}
10113
10114#[diagnostic::on_unimplemented(
10115 note = "If {Self} implements the non-local DirectoryClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
10116)]
10117
10118pub trait DirectoryLocalClientHandler<
10122 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10123 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10124>
10125{
10126 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
10127 fn on_open(
10128 &mut self,
10129
10130 request: ::fidl_next::Request<directory::OnOpen, ___T>,
10131 ) -> impl ::core::future::Future<Output = ()>;
10132
10133 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
10134 fn on_representation(
10135 &mut self,
10136
10137 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
10138 ) -> impl ::core::future::Future<Output = ()>;
10139
10140 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10141 ::core::future::ready(())
10142 }
10143}
10144
10145impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Directory
10146where
10147 ___H: DirectoryLocalClientHandler<___T>,
10148 ___T: ::fidl_next::Transport,
10149 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
10150 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10151 Constraint = (),
10152 >,
10153 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
10154 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10155 Constraint = (),
10156 >,
10157{
10158 async fn on_event(
10159 handler: &mut ___H,
10160 ordinal: u64,
10161 flexibility: ::fidl_next::protocol::Flexibility,
10162 body: ::fidl_next::Body<___T>,
10163 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10164 match ordinal {
10165 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10166 Ok(decoded) => {
10167 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
10168 Ok(())
10169 }
10170 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10171 ordinal: 9207534335756671346,
10172 error,
10173 }),
10174 },
10175
10176 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10177 Ok(decoded) => {
10178 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
10179 Ok(())
10180 }
10181 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10182 ordinal: 6679970090861613324,
10183 error,
10184 }),
10185 },
10186
10187 ordinal => {
10188 handler.on_unknown_interaction(ordinal).await;
10189 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10190 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10191 } else {
10192 Ok(())
10193 }
10194 }
10195 }
10196 }
10197}
10198
10199#[diagnostic::on_unimplemented(
10200 note = "If {Self} implements the non-local DirectoryServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
10201)]
10202
10203pub trait DirectoryLocalServerHandler<
10207 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10208 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10209>
10210{
10211 #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n to acquire the given type of lock.\n"]
10212 fn advisory_lock(
10213 &mut self,
10214
10215 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
10216
10217 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
10218 ) -> impl ::core::future::Future<Output = ()>;
10219
10220 fn clone(
10221 &mut self,
10222
10223 request: ::fidl_next::Request<directory::Clone, ___T>,
10224 ) -> impl ::core::future::Future<Output = ()>;
10225
10226 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
10227 fn close(
10228 &mut self,
10229
10230 responder: ::fidl_next::Responder<directory::Close, ___T>,
10231 ) -> impl ::core::future::Future<Output = ()>;
10232
10233 fn query(
10234 &mut self,
10235
10236 responder: ::fidl_next::Responder<directory::Query, ___T>,
10237 ) -> impl ::core::future::Future<Output = ()>;
10238
10239 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
10240 fn deprecated_clone(
10241 &mut self,
10242
10243 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
10244 ) -> impl ::core::future::Future<Output = ()>;
10245
10246 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
10247 fn deprecated_get_attr(
10248 &mut self,
10249
10250 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
10251 ) -> impl ::core::future::Future<Output = ()>;
10252
10253 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
10254 fn deprecated_set_attr(
10255 &mut self,
10256
10257 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
10258
10259 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
10260 ) -> impl ::core::future::Future<Output = ()>;
10261
10262 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
10263 fn deprecated_get_flags(
10264 &mut self,
10265
10266 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
10267 ) -> impl ::core::future::Future<Output = ()>;
10268
10269 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
10270 fn deprecated_set_flags(
10271 &mut self,
10272
10273 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
10274
10275 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
10276 ) -> impl ::core::future::Future<Output = ()>;
10277
10278 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
10279 fn get_flags(
10280 &mut self,
10281
10282 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
10283 ) -> impl ::core::future::Future<Output = ()>;
10284
10285 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
10286 fn set_flags(
10287 &mut self,
10288
10289 request: ::fidl_next::Request<directory::SetFlags, ___T>,
10290
10291 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
10292 ) -> impl ::core::future::Future<Output = ()>;
10293
10294 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
10295 fn query_filesystem(
10296 &mut self,
10297
10298 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
10299 ) -> impl ::core::future::Future<Output = ()>;
10300
10301 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
10302 fn get_attributes(
10303 &mut self,
10304
10305 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
10306
10307 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
10308 ) -> impl ::core::future::Future<Output = ()>;
10309
10310 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
10311 fn update_attributes(
10312 &mut self,
10313
10314 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
10315
10316 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
10317 ) -> impl ::core::future::Future<Output = ()>;
10318
10319 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
10320 fn sync(
10321 &mut self,
10322
10323 responder: ::fidl_next::Responder<directory::Sync, ___T>,
10324 ) -> impl ::core::future::Future<Output = ()>;
10325
10326 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
10327 fn list_extended_attributes(
10328 &mut self,
10329
10330 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
10331 ) -> impl ::core::future::Future<Output = ()>;
10332
10333 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
10334 fn get_extended_attribute(
10335 &mut self,
10336
10337 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
10338
10339 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
10340 ) -> impl ::core::future::Future<Output = ()>;
10341
10342 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
10343 fn set_extended_attribute(
10344 &mut self,
10345
10346 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
10347
10348 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
10349 ) -> impl ::core::future::Future<Output = ()>;
10350
10351 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
10352 fn remove_extended_attribute(
10353 &mut self,
10354
10355 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
10356
10357 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
10358 ) -> impl ::core::future::Future<Output = ()>;
10359
10360 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
10361 fn deprecated_open(
10362 &mut self,
10363
10364 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
10365 ) -> impl ::core::future::Future<Output = ()>;
10366
10367 #[doc = " Open (or create) a node relative to this directory. Any errors are communicated via an\n epitaph sent on the `object` channel.\n\n Errors:\n * `ZX_ERR_BAD_PATH` if `path` is invalid\n * See [`Flags`] for other errors which may be communicated based on `flags`\n"]
10368 fn open(
10369 &mut self,
10370
10371 request: ::fidl_next::Request<directory::Open, ___T>,
10372 ) -> impl ::core::future::Future<Output = ()>;
10373
10374 #[doc = " Reads a collection of variably sized dirents into a buffer.\n The number of dirents in a directory may be very large: akin to\n calling read multiple times on a file, directories have a seek\n offset which is updated on subsequent calls to ReadDirents.\n Each call to ReadDirents will only return whole dirent structures,\n they will not get split across ReadDirent calls. When the seek\n offset reaches the end, `dirents` will be empty.\n\n These dirents are of the form:\n ```\n struct dirent {\n // Describes the inode of the entry.\n uint64 ino;\n // Describes the length of the dirent name in bytes.\n uint8 size;\n // Describes the type of the entry. Aligned with the\n // POSIX d_type values. Use `DirentType` constants.\n uint8 type;\n // Unterminated name of entry.\n char name[0];\n }\n ```\n\n This method does not require any rights, since one could always probe for\n directory contents by triggering name conflicts during file creation.\n"]
10375 fn read_dirents(
10376 &mut self,
10377
10378 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
10379
10380 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
10381 ) -> impl ::core::future::Future<Output = ()>;
10382
10383 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
10384 fn rewind(
10385 &mut self,
10386
10387 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
10388 ) -> impl ::core::future::Future<Output = ()>;
10389
10390 #[doc = " Acquires a token to a Directory which can be used to identify access to it at a later point\n in time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns\n `ZX_ERR_BAD_HANDLE`.\n"]
10391 fn get_token(
10392 &mut self,
10393
10394 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
10395 ) -> impl ::core::future::Future<Output = ()>;
10396
10397 #[doc = " Creates a link to an object named src by the name dst, within a directory represented by\n token.\n\n `src` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE` and\n `OpenFlags.RIGHT_READABLE`, otherwise returns `ZX_ERR_BAD_HANDLE`.\n\n This will be atomic with respect to renaming or unlinking the source concurrently e.g. if\n there are two actors operating concurrently, and one actor performs a rename that affects\n the source within this directory, and the other does a link, each will appear to occur\n atomically in an unspecified order.\n"]
10398 fn link(
10399 &mut self,
10400
10401 request: ::fidl_next::Request<directory::Link, ___T>,
10402
10403 responder: ::fidl_next::Responder<directory::Link, ___T>,
10404 ) -> impl ::core::future::Future<Output = ()>;
10405
10406 #[doc = " Removes a child node from the this directory\'s list of entries.\n\n Note: this does not guarantee that the underlying object is destroyed.\n Although the link will be removed from the containing directory,\n objects with multiple references (such as files which are still open)\n will not actually be destroyed until all references are closed.\n\n * error `ZX_ERR_ACCESS_DENIED` if the connection does not have\n [`Rights.WRITE_BYTES`].\n * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not\n support writing.\n * error `ZX_ERR_BAD_PATH` if `name` is invalid.\n * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory.\n * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point,\n containing a remote channel.\n * error `ZX_ERR_NOT_DIR` if the options requested a directory but\n something other than a directory was found.\n\n Other errors may be returned for filesystem-specific reasons.\n\n This method requires the following rights:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n"]
10407 fn unlink(
10408 &mut self,
10409
10410 request: ::fidl_next::Request<directory::Unlink, ___T>,
10411
10412 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
10413 ) -> impl ::core::future::Future<Output = ()>;
10414
10415 #[doc = " Renames a node named `src` to the name `dst`, in a directory represented\n by `dst_parent_token`.\n\n `src` and `dst` must be valid node names.\n See [`Name`] for what constitutes a valid name.\n\n This method requires the following rights on both the current connection, and the connection\n identified by `dst_parent_token`:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n\n The following requirements are necessary to avoid rights escalations.\n\n If the source and destination directory differ, the source directory must also have the\n maximal set of abilities supported for files, which would typically be\n [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`], [`Rights.GET_ATTRIBUTES`] and\n [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also support the [`Rights.EXECUTE`]\n right.\n\n If `src` refers to a directory, and differs from the destination directory, then the source\n directory must have also have the [`Rights.CONNECT`] and [`Rights.TRAVERSE`] rights.\n\n * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.\n * error `ZX_ERR_ACCESS_DENIED` for insufficient rights.\n"]
10416 fn rename(
10417 &mut self,
10418
10419 request: ::fidl_next::Request<directory::Rename, ___T>,
10420
10421 responder: ::fidl_next::Responder<directory::Rename, ___T>,
10422 ) -> impl ::core::future::Future<Output = ()>;
10423
10424 #[doc = " Creates a symbolic link.\n\n `name` is the name to be given to the created symbolic link.\n `target` is the target of the symbolic link, which has no meaning on the server. The server\n will perform no validation of `target` except for a server chosen maximum length.\n `connection` is an optional server end of a channel that will speak the Symlink protocol\n on the successfully created node.\n\n * [`Rights.MODIFY_DIRECTORY`]\n\n * error `ZX_ERR_ALREADY_EXISTS` if `name` already exists.\n * error `ZX_ERR_BAD_PATH` if `target` exceeds the server length limit for symbolic links.\n * error `ZX_ERR_INVALID_ARGS` if `name` is not a valid [`Name`].\n * error `ZX_ERR_NOT_SUPPORTED` if creating symbolic links is not supported by the server.\n"]
10425 fn create_symlink(
10426 &mut self,
10427
10428 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
10429
10430 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
10431 ) -> impl ::core::future::Future<Output = ()>;
10432
10433 #[doc = " Watches a directory, receiving events of added messages on the\n watcher request channel.\n\n Options must be zero; it is reserved.\n\n This method does not require any rights, similar to ReadDirents.\n"]
10434 fn watch(
10435 &mut self,
10436
10437 request: ::fidl_next::Request<directory::Watch, ___T>,
10438
10439 responder: ::fidl_next::Responder<directory::Watch, ___T>,
10440 ) -> impl ::core::future::Future<Output = ()>;
10441
10442 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10443 ::core::future::ready(())
10444 }
10445}
10446
10447impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Directory
10448where
10449 ___H: DirectoryLocalServerHandler<___T>,
10450 ___T: ::fidl_next::Transport,
10451 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
10452 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10453 Constraint = (),
10454 >,
10455 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
10456 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10457 Constraint = (),
10458 >,
10459 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
10460 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10461 Constraint = (),
10462 >,
10463 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
10464 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10465 Constraint = (),
10466 >,
10467 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
10468 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10469 Constraint = (),
10470 >,
10471 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
10472 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10473 Constraint = (),
10474 >,
10475 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
10476 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10477 Constraint = (),
10478 >,
10479 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
10480 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10481 Constraint = (),
10482 >,
10483 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
10484 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10485 Constraint = (),
10486 >,
10487 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
10488 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10489 Constraint = (),
10490 >,
10491 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
10492 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10493 Constraint = (),
10494 >,
10495 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
10496 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10497 Constraint = (),
10498 >,
10499 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
10500 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10501 Constraint = (),
10502 >,
10503 for<'de> crate::wire::DirectoryOpenRequest<'de>: ::fidl_next::Decode<
10504 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10505 Constraint = (),
10506 >,
10507 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
10508 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10509 Constraint = (),
10510 >,
10511 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
10512 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10513 Constraint = (),
10514 >,
10515 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
10516 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10517 Constraint = (),
10518 >,
10519 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
10520 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10521 Constraint = (),
10522 >,
10523 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
10524 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10525 Constraint = (),
10526 >,
10527 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
10528 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10529 Constraint = (),
10530 >,
10531{
10532 async fn on_one_way(
10533 handler: &mut ___H,
10534 ordinal: u64,
10535 flexibility: ::fidl_next::protocol::Flexibility,
10536 body: ::fidl_next::Body<___T>,
10537 ) -> ::core::result::Result<
10538 (),
10539 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10540 > {
10541 match ordinal {
10542 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10543 Ok(decoded) => {
10544 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
10545 Ok(())
10546 }
10547 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10548 ordinal: 2366825959783828089,
10549 error,
10550 }),
10551 },
10552
10553 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10554 Ok(decoded) => {
10555 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
10556 Ok(())
10557 }
10558 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10559 ordinal: 6512600400724287855,
10560 error,
10561 }),
10562 },
10563
10564 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10565 Ok(decoded) => {
10566 handler
10567 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
10568 .await;
10569 Ok(())
10570 }
10571 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10572 ordinal: 5431626189872037072,
10573 error,
10574 }),
10575 },
10576
10577 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10578 Ok(decoded) => {
10579 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
10580 Ok(())
10581 }
10582 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10583 ordinal: 3193127272456937152,
10584 error,
10585 }),
10586 },
10587
10588 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10589 Ok(decoded) => {
10590 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
10591 Ok(())
10592 }
10593 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10594 ordinal: 6236883748953765593,
10595 error,
10596 }),
10597 },
10598
10599 ordinal => {
10600 handler.on_unknown_interaction(ordinal).await;
10601 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10602 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10603 } else {
10604 Ok(())
10605 }
10606 }
10607 }
10608 }
10609
10610 async fn on_two_way(
10611 handler: &mut ___H,
10612 ordinal: u64,
10613 flexibility: ::fidl_next::protocol::Flexibility,
10614 body: ::fidl_next::Body<___T>,
10615 responder: ::fidl_next::protocol::Responder<___T>,
10616 ) -> ::core::result::Result<
10617 (),
10618 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10619 > {
10620 match ordinal {
10621 7992130864415541162 => {
10622 let responder = ::fidl_next::Responder::from_untyped(responder);
10623
10624 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10625 Ok(decoded) => {
10626 handler
10627 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
10628 .await;
10629 Ok(())
10630 }
10631 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10632 ordinal: 7992130864415541162,
10633 error,
10634 }),
10635 }
10636 }
10637
10638 6540867515453498750 => {
10639 let responder = ::fidl_next::Responder::from_untyped(responder);
10640
10641 handler.close(responder).await;
10642 Ok(())
10643 }
10644
10645 2763219980499352582 => {
10646 let responder = ::fidl_next::Responder::from_untyped(responder);
10647
10648 handler.query(responder).await;
10649 Ok(())
10650 }
10651
10652 8689798978500614909 => {
10653 let responder = ::fidl_next::Responder::from_untyped(responder);
10654
10655 handler.deprecated_get_attr(responder).await;
10656 Ok(())
10657 }
10658
10659 4721673413776871238 => {
10660 let responder = ::fidl_next::Responder::from_untyped(responder);
10661
10662 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10663 Ok(decoded) => {
10664 handler
10665 .deprecated_set_attr(
10666 ::fidl_next::Request::from_decoded(decoded),
10667 responder,
10668 )
10669 .await;
10670 Ok(())
10671 }
10672 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10673 ordinal: 4721673413776871238,
10674 error,
10675 }),
10676 }
10677 }
10678
10679 6595803110182632097 => {
10680 let responder = ::fidl_next::Responder::from_untyped(responder);
10681
10682 handler.deprecated_get_flags(responder).await;
10683 Ok(())
10684 }
10685
10686 5950864159036794675 => {
10687 let responder = ::fidl_next::Responder::from_untyped(responder);
10688
10689 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10690 Ok(decoded) => {
10691 handler
10692 .deprecated_set_flags(
10693 ::fidl_next::Request::from_decoded(decoded),
10694 responder,
10695 )
10696 .await;
10697 Ok(())
10698 }
10699 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10700 ordinal: 5950864159036794675,
10701 error,
10702 }),
10703 }
10704 }
10705
10706 105530239381466147 => {
10707 let responder = ::fidl_next::Responder::from_untyped(responder);
10708
10709 handler.get_flags(responder).await;
10710 Ok(())
10711 }
10712
10713 6172186066099445416 => {
10714 let responder = ::fidl_next::Responder::from_untyped(responder);
10715
10716 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10717 Ok(decoded) => {
10718 handler
10719 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
10720 .await;
10721 Ok(())
10722 }
10723 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10724 ordinal: 6172186066099445416,
10725 error,
10726 }),
10727 }
10728 }
10729
10730 8013111122914313744 => {
10731 let responder = ::fidl_next::Responder::from_untyped(responder);
10732
10733 handler.query_filesystem(responder).await;
10734 Ok(())
10735 }
10736
10737 4414537700416816443 => {
10738 let responder = ::fidl_next::Responder::from_untyped(responder);
10739
10740 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10741 Ok(decoded) => {
10742 handler
10743 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
10744 .await;
10745 Ok(())
10746 }
10747 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10748 ordinal: 4414537700416816443,
10749 error,
10750 }),
10751 }
10752 }
10753
10754 3677402239314018056 => {
10755 let responder = ::fidl_next::Responder::from_untyped(responder);
10756
10757 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10758 Ok(decoded) => {
10759 handler
10760 .update_attributes(
10761 ::fidl_next::Request::from_decoded(decoded),
10762 responder,
10763 )
10764 .await;
10765 Ok(())
10766 }
10767 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10768 ordinal: 3677402239314018056,
10769 error,
10770 }),
10771 }
10772 }
10773
10774 3196473584242777161 => {
10775 let responder = ::fidl_next::Responder::from_untyped(responder);
10776
10777 handler.sync(responder).await;
10778 Ok(())
10779 }
10780
10781 5043930208506967771 => {
10782 let responder = ::fidl_next::Responder::from_untyped(responder);
10783
10784 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10785 Ok(decoded) => {
10786 handler
10787 .get_extended_attribute(
10788 ::fidl_next::Request::from_decoded(decoded),
10789 responder,
10790 )
10791 .await;
10792 Ok(())
10793 }
10794 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10795 ordinal: 5043930208506967771,
10796 error,
10797 }),
10798 }
10799 }
10800
10801 5374223046099989052 => {
10802 let responder = ::fidl_next::Responder::from_untyped(responder);
10803
10804 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10805 Ok(decoded) => {
10806 handler
10807 .set_extended_attribute(
10808 ::fidl_next::Request::from_decoded(decoded),
10809 responder,
10810 )
10811 .await;
10812 Ok(())
10813 }
10814 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10815 ordinal: 5374223046099989052,
10816 error,
10817 }),
10818 }
10819 }
10820
10821 8794297771444732717 => {
10822 let responder = ::fidl_next::Responder::from_untyped(responder);
10823
10824 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10825 Ok(decoded) => {
10826 handler
10827 .remove_extended_attribute(
10828 ::fidl_next::Request::from_decoded(decoded),
10829 responder,
10830 )
10831 .await;
10832 Ok(())
10833 }
10834 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10835 ordinal: 8794297771444732717,
10836 error,
10837 }),
10838 }
10839 }
10840
10841 3855785432100874762 => {
10842 let responder = ::fidl_next::Responder::from_untyped(responder);
10843
10844 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10845 Ok(decoded) => {
10846 handler
10847 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
10848 .await;
10849 Ok(())
10850 }
10851 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10852 ordinal: 3855785432100874762,
10853 error,
10854 }),
10855 }
10856 }
10857
10858 1635123508515392625 => {
10859 let responder = ::fidl_next::Responder::from_untyped(responder);
10860
10861 handler.rewind(responder).await;
10862 Ok(())
10863 }
10864
10865 2787337947777369685 => {
10866 let responder = ::fidl_next::Responder::from_untyped(responder);
10867
10868 handler.get_token(responder).await;
10869 Ok(())
10870 }
10871
10872 8360374984291987687 => {
10873 let responder = ::fidl_next::Responder::from_untyped(responder);
10874
10875 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10876 Ok(decoded) => {
10877 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
10878 Ok(())
10879 }
10880 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10881 ordinal: 8360374984291987687,
10882 error,
10883 }),
10884 }
10885 }
10886
10887 8433556716759383021 => {
10888 let responder = ::fidl_next::Responder::from_untyped(responder);
10889
10890 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10891 Ok(decoded) => {
10892 handler
10893 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
10894 .await;
10895 Ok(())
10896 }
10897 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10898 ordinal: 8433556716759383021,
10899 error,
10900 }),
10901 }
10902 }
10903
10904 8097726607824333022 => {
10905 let responder = ::fidl_next::Responder::from_untyped(responder);
10906
10907 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10908 Ok(decoded) => {
10909 handler
10910 .rename(::fidl_next::Request::from_decoded(decoded), responder)
10911 .await;
10912 Ok(())
10913 }
10914 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10915 ordinal: 8097726607824333022,
10916 error,
10917 }),
10918 }
10919 }
10920
10921 2435901052462315657 => {
10922 let responder = ::fidl_next::Responder::from_untyped(responder);
10923
10924 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10925 Ok(decoded) => {
10926 handler
10927 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
10928 .await;
10929 Ok(())
10930 }
10931 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10932 ordinal: 2435901052462315657,
10933 error,
10934 }),
10935 }
10936 }
10937
10938 6275512344170098065 => {
10939 let responder = ::fidl_next::Responder::from_untyped(responder);
10940
10941 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10942 Ok(decoded) => {
10943 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
10944 Ok(())
10945 }
10946 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10947 ordinal: 6275512344170098065,
10948 error,
10949 }),
10950 }
10951 }
10952
10953 ordinal => {
10954 handler.on_unknown_interaction(ordinal).await;
10955 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10956 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10957 } else {
10958 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
10959 ordinal,
10960 flexibility,
10961 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
10962 )
10963 .expect("encoding a framework error should never fail")
10964 .await?;
10965 Ok(())
10966 }
10967 }
10968 }
10969 }
10970}
10971
10972pub trait DirectoryClientHandler<
10976 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10977 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10978>
10979{
10980 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
10981 fn on_open(
10982 &mut self,
10983
10984 request: ::fidl_next::Request<directory::OnOpen, ___T>,
10985 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10986
10987 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
10988 fn on_representation(
10989 &mut self,
10990
10991 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
10992 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10993
10994 fn on_unknown_interaction(
10995 &mut self,
10996 ordinal: u64,
10997 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
10998 ::core::future::ready(())
10999 }
11000}
11001
11002impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Directory
11003where
11004 ___H: DirectoryClientHandler<___T> + ::core::marker::Send,
11005 ___T: ::fidl_next::Transport,
11006 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
11007 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11008 Constraint = (),
11009 >,
11010 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
11011 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11012 Constraint = (),
11013 >,
11014{
11015 async fn on_event(
11016 handler: &mut ___H,
11017 ordinal: u64,
11018 flexibility: ::fidl_next::protocol::Flexibility,
11019 body: ::fidl_next::Body<___T>,
11020 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11021 match ordinal {
11022 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11023 Ok(decoded) => {
11024 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
11025 Ok(())
11026 }
11027 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11028 ordinal: 9207534335756671346,
11029 error,
11030 }),
11031 },
11032
11033 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11034 Ok(decoded) => {
11035 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
11036 Ok(())
11037 }
11038 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11039 ordinal: 6679970090861613324,
11040 error,
11041 }),
11042 },
11043
11044 ordinal => {
11045 handler.on_unknown_interaction(ordinal).await;
11046 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11047 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11048 } else {
11049 Ok(())
11050 }
11051 }
11052 }
11053 }
11054}
11055
11056pub trait DirectoryServerHandler<
11060 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11061 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11062>
11063{
11064 #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n to acquire the given type of lock.\n"]
11065 fn advisory_lock(
11066 &mut self,
11067
11068 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
11069
11070 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
11071 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11072
11073 fn clone(
11074 &mut self,
11075
11076 request: ::fidl_next::Request<directory::Clone, ___T>,
11077 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11078
11079 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
11080 fn close(
11081 &mut self,
11082
11083 responder: ::fidl_next::Responder<directory::Close, ___T>,
11084 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11085
11086 fn query(
11087 &mut self,
11088
11089 responder: ::fidl_next::Responder<directory::Query, ___T>,
11090 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11091
11092 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11093 fn deprecated_clone(
11094 &mut self,
11095
11096 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
11097 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11098
11099 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
11100 fn deprecated_get_attr(
11101 &mut self,
11102
11103 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
11104 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11105
11106 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
11107 fn deprecated_set_attr(
11108 &mut self,
11109
11110 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
11111
11112 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
11113 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11114
11115 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
11116 fn deprecated_get_flags(
11117 &mut self,
11118
11119 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
11120 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11121
11122 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11123 fn deprecated_set_flags(
11124 &mut self,
11125
11126 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
11127
11128 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
11129 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11130
11131 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
11132 fn get_flags(
11133 &mut self,
11134
11135 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
11136 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11137
11138 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
11139 fn set_flags(
11140 &mut self,
11141
11142 request: ::fidl_next::Request<directory::SetFlags, ___T>,
11143
11144 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
11145 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11146
11147 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
11148 fn query_filesystem(
11149 &mut self,
11150
11151 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
11152 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11153
11154 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
11155 fn get_attributes(
11156 &mut self,
11157
11158 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
11159
11160 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
11161 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11162
11163 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
11164 fn update_attributes(
11165 &mut self,
11166
11167 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
11168
11169 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
11170 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11171
11172 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
11173 fn sync(
11174 &mut self,
11175
11176 responder: ::fidl_next::Responder<directory::Sync, ___T>,
11177 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11178
11179 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
11180 fn list_extended_attributes(
11181 &mut self,
11182
11183 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
11184 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11185
11186 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
11187 fn get_extended_attribute(
11188 &mut self,
11189
11190 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
11191
11192 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
11193 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11194
11195 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
11196 fn set_extended_attribute(
11197 &mut self,
11198
11199 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
11200
11201 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
11202 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11203
11204 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
11205 fn remove_extended_attribute(
11206 &mut self,
11207
11208 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
11209
11210 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
11211 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11212
11213 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
11214 fn deprecated_open(
11215 &mut self,
11216
11217 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
11218 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11219
11220 #[doc = " Open (or create) a node relative to this directory. Any errors are communicated via an\n epitaph sent on the `object` channel.\n\n Errors:\n * `ZX_ERR_BAD_PATH` if `path` is invalid\n * See [`Flags`] for other errors which may be communicated based on `flags`\n"]
11221 fn open(
11222 &mut self,
11223
11224 request: ::fidl_next::Request<directory::Open, ___T>,
11225 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11226
11227 #[doc = " Reads a collection of variably sized dirents into a buffer.\n The number of dirents in a directory may be very large: akin to\n calling read multiple times on a file, directories have a seek\n offset which is updated on subsequent calls to ReadDirents.\n Each call to ReadDirents will only return whole dirent structures,\n they will not get split across ReadDirent calls. When the seek\n offset reaches the end, `dirents` will be empty.\n\n These dirents are of the form:\n ```\n struct dirent {\n // Describes the inode of the entry.\n uint64 ino;\n // Describes the length of the dirent name in bytes.\n uint8 size;\n // Describes the type of the entry. Aligned with the\n // POSIX d_type values. Use `DirentType` constants.\n uint8 type;\n // Unterminated name of entry.\n char name[0];\n }\n ```\n\n This method does not require any rights, since one could always probe for\n directory contents by triggering name conflicts during file creation.\n"]
11228 fn read_dirents(
11229 &mut self,
11230
11231 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
11232
11233 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
11234 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11235
11236 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
11237 fn rewind(
11238 &mut self,
11239
11240 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
11241 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11242
11243 #[doc = " Acquires a token to a Directory which can be used to identify access to it at a later point\n in time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns\n `ZX_ERR_BAD_HANDLE`.\n"]
11244 fn get_token(
11245 &mut self,
11246
11247 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
11248 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11249
11250 #[doc = " Creates a link to an object named src by the name dst, within a directory represented by\n token.\n\n `src` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will\n return `ZX_ERR_INVALID_ARGS`.\n\n This method requires following rights: `OpenFlags.RIGHT_WRITABLE` and\n `OpenFlags.RIGHT_READABLE`, otherwise returns `ZX_ERR_BAD_HANDLE`.\n\n This will be atomic with respect to renaming or unlinking the source concurrently e.g. if\n there are two actors operating concurrently, and one actor performs a rename that affects\n the source within this directory, and the other does a link, each will appear to occur\n atomically in an unspecified order.\n"]
11251 fn link(
11252 &mut self,
11253
11254 request: ::fidl_next::Request<directory::Link, ___T>,
11255
11256 responder: ::fidl_next::Responder<directory::Link, ___T>,
11257 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11258
11259 #[doc = " Removes a child node from the this directory\'s list of entries.\n\n Note: this does not guarantee that the underlying object is destroyed.\n Although the link will be removed from the containing directory,\n objects with multiple references (such as files which are still open)\n will not actually be destroyed until all references are closed.\n\n * error `ZX_ERR_ACCESS_DENIED` if the connection does not have\n [`Rights.WRITE_BYTES`].\n * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not\n support writing.\n * error `ZX_ERR_BAD_PATH` if `name` is invalid.\n * error `ZX_ERR_NOT_EMPTY` if `name` refers to a non-empty directory.\n * error `ZX_ERR_UNAVAILABLE` if `name` refers to a mount point,\n containing a remote channel.\n * error `ZX_ERR_NOT_DIR` if the options requested a directory but\n something other than a directory was found.\n\n Other errors may be returned for filesystem-specific reasons.\n\n This method requires the following rights:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n"]
11260 fn unlink(
11261 &mut self,
11262
11263 request: ::fidl_next::Request<directory::Unlink, ___T>,
11264
11265 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
11266 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11267
11268 #[doc = " Renames a node named `src` to the name `dst`, in a directory represented\n by `dst_parent_token`.\n\n `src` and `dst` must be valid node names.\n See [`Name`] for what constitutes a valid name.\n\n This method requires the following rights on both the current connection, and the connection\n identified by `dst_parent_token`:\n\n * [`Rights.ENUMERATE`]\n * [`Rights.MODIFY_DIRECTORY`]\n\n The following requirements are necessary to avoid rights escalations.\n\n If the source and destination directory differ, the source directory must also have the\n maximal set of abilities supported for files, which would typically be\n [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`], [`Rights.GET_ATTRIBUTES`] and\n [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also support the [`Rights.EXECUTE`]\n right.\n\n If `src` refers to a directory, and differs from the destination directory, then the source\n directory must have also have the [`Rights.CONNECT`] and [`Rights.TRAVERSE`] rights.\n\n * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.\n * error `ZX_ERR_ACCESS_DENIED` for insufficient rights.\n"]
11269 fn rename(
11270 &mut self,
11271
11272 request: ::fidl_next::Request<directory::Rename, ___T>,
11273
11274 responder: ::fidl_next::Responder<directory::Rename, ___T>,
11275 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11276
11277 #[doc = " Creates a symbolic link.\n\n `name` is the name to be given to the created symbolic link.\n `target` is the target of the symbolic link, which has no meaning on the server. The server\n will perform no validation of `target` except for a server chosen maximum length.\n `connection` is an optional server end of a channel that will speak the Symlink protocol\n on the successfully created node.\n\n * [`Rights.MODIFY_DIRECTORY`]\n\n * error `ZX_ERR_ALREADY_EXISTS` if `name` already exists.\n * error `ZX_ERR_BAD_PATH` if `target` exceeds the server length limit for symbolic links.\n * error `ZX_ERR_INVALID_ARGS` if `name` is not a valid [`Name`].\n * error `ZX_ERR_NOT_SUPPORTED` if creating symbolic links is not supported by the server.\n"]
11278 fn create_symlink(
11279 &mut self,
11280
11281 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
11282
11283 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
11284 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11285
11286 #[doc = " Watches a directory, receiving events of added messages on the\n watcher request channel.\n\n Options must be zero; it is reserved.\n\n This method does not require any rights, similar to ReadDirents.\n"]
11287 fn watch(
11288 &mut self,
11289
11290 request: ::fidl_next::Request<directory::Watch, ___T>,
11291
11292 responder: ::fidl_next::Responder<directory::Watch, ___T>,
11293 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11294
11295 fn on_unknown_interaction(
11296 &mut self,
11297 ordinal: u64,
11298 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11299 ::core::future::ready(())
11300 }
11301}
11302
11303impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Directory
11304where
11305 ___H: DirectoryServerHandler<___T> + ::core::marker::Send,
11306 ___T: ::fidl_next::Transport,
11307 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
11308 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11309 Constraint = (),
11310 >,
11311 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
11312 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11313 Constraint = (),
11314 >,
11315 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
11316 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11317 Constraint = (),
11318 >,
11319 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
11320 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11321 Constraint = (),
11322 >,
11323 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
11324 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11325 Constraint = (),
11326 >,
11327 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
11328 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11329 Constraint = (),
11330 >,
11331 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
11332 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11333 Constraint = (),
11334 >,
11335 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
11336 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11337 Constraint = (),
11338 >,
11339 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
11340 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11341 Constraint = (),
11342 >,
11343 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11344 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11345 Constraint = (),
11346 >,
11347 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11348 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11349 Constraint = (),
11350 >,
11351 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11352 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11353 Constraint = (),
11354 >,
11355 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
11356 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11357 Constraint = (),
11358 >,
11359 for<'de> crate::wire::DirectoryOpenRequest<'de>: ::fidl_next::Decode<
11360 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11361 Constraint = (),
11362 >,
11363 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
11364 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11365 Constraint = (),
11366 >,
11367 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
11368 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11369 Constraint = (),
11370 >,
11371 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
11372 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11373 Constraint = (),
11374 >,
11375 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
11376 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11377 Constraint = (),
11378 >,
11379 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
11380 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11381 Constraint = (),
11382 >,
11383 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
11384 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11385 Constraint = (),
11386 >,
11387{
11388 async fn on_one_way(
11389 handler: &mut ___H,
11390 ordinal: u64,
11391 flexibility: ::fidl_next::protocol::Flexibility,
11392 body: ::fidl_next::Body<___T>,
11393 ) -> ::core::result::Result<
11394 (),
11395 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11396 > {
11397 match ordinal {
11398 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11399 Ok(decoded) => {
11400 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
11401 Ok(())
11402 }
11403 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11404 ordinal: 2366825959783828089,
11405 error,
11406 }),
11407 },
11408
11409 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11410 Ok(decoded) => {
11411 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
11412 Ok(())
11413 }
11414 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11415 ordinal: 6512600400724287855,
11416 error,
11417 }),
11418 },
11419
11420 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11421 Ok(decoded) => {
11422 handler
11423 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
11424 .await;
11425 Ok(())
11426 }
11427 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11428 ordinal: 5431626189872037072,
11429 error,
11430 }),
11431 },
11432
11433 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11434 Ok(decoded) => {
11435 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
11436 Ok(())
11437 }
11438 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11439 ordinal: 3193127272456937152,
11440 error,
11441 }),
11442 },
11443
11444 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11445 Ok(decoded) => {
11446 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
11447 Ok(())
11448 }
11449 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11450 ordinal: 6236883748953765593,
11451 error,
11452 }),
11453 },
11454
11455 ordinal => {
11456 handler.on_unknown_interaction(ordinal).await;
11457 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11458 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11459 } else {
11460 Ok(())
11461 }
11462 }
11463 }
11464 }
11465
11466 async fn on_two_way(
11467 handler: &mut ___H,
11468 ordinal: u64,
11469 flexibility: ::fidl_next::protocol::Flexibility,
11470 body: ::fidl_next::Body<___T>,
11471 responder: ::fidl_next::protocol::Responder<___T>,
11472 ) -> ::core::result::Result<
11473 (),
11474 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11475 > {
11476 match ordinal {
11477 7992130864415541162 => {
11478 let responder = ::fidl_next::Responder::from_untyped(responder);
11479
11480 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11481 Ok(decoded) => {
11482 handler
11483 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
11484 .await;
11485 Ok(())
11486 }
11487 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11488 ordinal: 7992130864415541162,
11489 error,
11490 }),
11491 }
11492 }
11493
11494 6540867515453498750 => {
11495 let responder = ::fidl_next::Responder::from_untyped(responder);
11496
11497 handler.close(responder).await;
11498 Ok(())
11499 }
11500
11501 2763219980499352582 => {
11502 let responder = ::fidl_next::Responder::from_untyped(responder);
11503
11504 handler.query(responder).await;
11505 Ok(())
11506 }
11507
11508 8689798978500614909 => {
11509 let responder = ::fidl_next::Responder::from_untyped(responder);
11510
11511 handler.deprecated_get_attr(responder).await;
11512 Ok(())
11513 }
11514
11515 4721673413776871238 => {
11516 let responder = ::fidl_next::Responder::from_untyped(responder);
11517
11518 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11519 Ok(decoded) => {
11520 handler
11521 .deprecated_set_attr(
11522 ::fidl_next::Request::from_decoded(decoded),
11523 responder,
11524 )
11525 .await;
11526 Ok(())
11527 }
11528 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11529 ordinal: 4721673413776871238,
11530 error,
11531 }),
11532 }
11533 }
11534
11535 6595803110182632097 => {
11536 let responder = ::fidl_next::Responder::from_untyped(responder);
11537
11538 handler.deprecated_get_flags(responder).await;
11539 Ok(())
11540 }
11541
11542 5950864159036794675 => {
11543 let responder = ::fidl_next::Responder::from_untyped(responder);
11544
11545 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11546 Ok(decoded) => {
11547 handler
11548 .deprecated_set_flags(
11549 ::fidl_next::Request::from_decoded(decoded),
11550 responder,
11551 )
11552 .await;
11553 Ok(())
11554 }
11555 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11556 ordinal: 5950864159036794675,
11557 error,
11558 }),
11559 }
11560 }
11561
11562 105530239381466147 => {
11563 let responder = ::fidl_next::Responder::from_untyped(responder);
11564
11565 handler.get_flags(responder).await;
11566 Ok(())
11567 }
11568
11569 6172186066099445416 => {
11570 let responder = ::fidl_next::Responder::from_untyped(responder);
11571
11572 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11573 Ok(decoded) => {
11574 handler
11575 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
11576 .await;
11577 Ok(())
11578 }
11579 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11580 ordinal: 6172186066099445416,
11581 error,
11582 }),
11583 }
11584 }
11585
11586 8013111122914313744 => {
11587 let responder = ::fidl_next::Responder::from_untyped(responder);
11588
11589 handler.query_filesystem(responder).await;
11590 Ok(())
11591 }
11592
11593 4414537700416816443 => {
11594 let responder = ::fidl_next::Responder::from_untyped(responder);
11595
11596 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11597 Ok(decoded) => {
11598 handler
11599 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
11600 .await;
11601 Ok(())
11602 }
11603 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11604 ordinal: 4414537700416816443,
11605 error,
11606 }),
11607 }
11608 }
11609
11610 3677402239314018056 => {
11611 let responder = ::fidl_next::Responder::from_untyped(responder);
11612
11613 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11614 Ok(decoded) => {
11615 handler
11616 .update_attributes(
11617 ::fidl_next::Request::from_decoded(decoded),
11618 responder,
11619 )
11620 .await;
11621 Ok(())
11622 }
11623 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11624 ordinal: 3677402239314018056,
11625 error,
11626 }),
11627 }
11628 }
11629
11630 3196473584242777161 => {
11631 let responder = ::fidl_next::Responder::from_untyped(responder);
11632
11633 handler.sync(responder).await;
11634 Ok(())
11635 }
11636
11637 5043930208506967771 => {
11638 let responder = ::fidl_next::Responder::from_untyped(responder);
11639
11640 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11641 Ok(decoded) => {
11642 handler
11643 .get_extended_attribute(
11644 ::fidl_next::Request::from_decoded(decoded),
11645 responder,
11646 )
11647 .await;
11648 Ok(())
11649 }
11650 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11651 ordinal: 5043930208506967771,
11652 error,
11653 }),
11654 }
11655 }
11656
11657 5374223046099989052 => {
11658 let responder = ::fidl_next::Responder::from_untyped(responder);
11659
11660 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11661 Ok(decoded) => {
11662 handler
11663 .set_extended_attribute(
11664 ::fidl_next::Request::from_decoded(decoded),
11665 responder,
11666 )
11667 .await;
11668 Ok(())
11669 }
11670 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11671 ordinal: 5374223046099989052,
11672 error,
11673 }),
11674 }
11675 }
11676
11677 8794297771444732717 => {
11678 let responder = ::fidl_next::Responder::from_untyped(responder);
11679
11680 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11681 Ok(decoded) => {
11682 handler
11683 .remove_extended_attribute(
11684 ::fidl_next::Request::from_decoded(decoded),
11685 responder,
11686 )
11687 .await;
11688 Ok(())
11689 }
11690 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11691 ordinal: 8794297771444732717,
11692 error,
11693 }),
11694 }
11695 }
11696
11697 3855785432100874762 => {
11698 let responder = ::fidl_next::Responder::from_untyped(responder);
11699
11700 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11701 Ok(decoded) => {
11702 handler
11703 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
11704 .await;
11705 Ok(())
11706 }
11707 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11708 ordinal: 3855785432100874762,
11709 error,
11710 }),
11711 }
11712 }
11713
11714 1635123508515392625 => {
11715 let responder = ::fidl_next::Responder::from_untyped(responder);
11716
11717 handler.rewind(responder).await;
11718 Ok(())
11719 }
11720
11721 2787337947777369685 => {
11722 let responder = ::fidl_next::Responder::from_untyped(responder);
11723
11724 handler.get_token(responder).await;
11725 Ok(())
11726 }
11727
11728 8360374984291987687 => {
11729 let responder = ::fidl_next::Responder::from_untyped(responder);
11730
11731 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11732 Ok(decoded) => {
11733 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
11734 Ok(())
11735 }
11736 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11737 ordinal: 8360374984291987687,
11738 error,
11739 }),
11740 }
11741 }
11742
11743 8433556716759383021 => {
11744 let responder = ::fidl_next::Responder::from_untyped(responder);
11745
11746 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11747 Ok(decoded) => {
11748 handler
11749 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
11750 .await;
11751 Ok(())
11752 }
11753 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11754 ordinal: 8433556716759383021,
11755 error,
11756 }),
11757 }
11758 }
11759
11760 8097726607824333022 => {
11761 let responder = ::fidl_next::Responder::from_untyped(responder);
11762
11763 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11764 Ok(decoded) => {
11765 handler
11766 .rename(::fidl_next::Request::from_decoded(decoded), responder)
11767 .await;
11768 Ok(())
11769 }
11770 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11771 ordinal: 8097726607824333022,
11772 error,
11773 }),
11774 }
11775 }
11776
11777 2435901052462315657 => {
11778 let responder = ::fidl_next::Responder::from_untyped(responder);
11779
11780 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11781 Ok(decoded) => {
11782 handler
11783 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
11784 .await;
11785 Ok(())
11786 }
11787 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11788 ordinal: 2435901052462315657,
11789 error,
11790 }),
11791 }
11792 }
11793
11794 6275512344170098065 => {
11795 let responder = ::fidl_next::Responder::from_untyped(responder);
11796
11797 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11798 Ok(decoded) => {
11799 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
11800 Ok(())
11801 }
11802 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11803 ordinal: 6275512344170098065,
11804 error,
11805 }),
11806 }
11807 }
11808
11809 ordinal => {
11810 handler.on_unknown_interaction(ordinal).await;
11811 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11812 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11813 } else {
11814 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
11815 ordinal,
11816 flexibility,
11817 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
11818 )
11819 .expect("encoding a framework error should never fail")
11820 .await?;
11821 Ok(())
11822 }
11823 }
11824 }
11825 }
11826}
11827
11828impl<___T> DirectoryClientHandler<___T> for ::fidl_next::IgnoreEvents
11829where
11830 ___T: ::fidl_next::Transport,
11831{
11832 async fn on_open(&mut self, _: ::fidl_next::Request<directory::OnOpen, ___T>) {}
11833
11834 async fn on_representation(
11835 &mut self,
11836
11837 _: ::fidl_next::Request<directory::OnRepresentation, ___T>,
11838 ) {
11839 }
11840
11841 async fn on_unknown_interaction(&mut self, _: u64) {}
11842}
11843
11844impl<___H, ___T> DirectoryLocalClientHandler<___T> for ::fidl_next::Local<___H>
11845where
11846 ___H: DirectoryClientHandler<___T>,
11847 ___T: ::fidl_next::Transport,
11848{
11849 async fn on_open(&mut self, request: ::fidl_next::Request<directory::OnOpen, ___T>) {
11850 ___H::on_open(&mut self.0, request).await
11851 }
11852
11853 async fn on_representation(
11854 &mut self,
11855
11856 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
11857 ) {
11858 ___H::on_representation(&mut self.0, request).await
11859 }
11860
11861 async fn on_unknown_interaction(&mut self, ordinal: u64) {
11862 ___H::on_unknown_interaction(&mut self.0, ordinal).await
11863 }
11864}
11865
11866impl<___H, ___T> DirectoryLocalServerHandler<___T> for ::fidl_next::Local<___H>
11867where
11868 ___H: DirectoryServerHandler<___T>,
11869 ___T: ::fidl_next::Transport,
11870{
11871 async fn advisory_lock(
11872 &mut self,
11873
11874 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
11875
11876 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
11877 ) {
11878 ___H::advisory_lock(&mut self.0, request, responder).await
11879 }
11880
11881 async fn clone(&mut self, request: ::fidl_next::Request<directory::Clone, ___T>) {
11882 ___H::clone(&mut self.0, request).await
11883 }
11884
11885 async fn close(&mut self, responder: ::fidl_next::Responder<directory::Close, ___T>) {
11886 ___H::close(&mut self.0, responder).await
11887 }
11888
11889 async fn query(&mut self, responder: ::fidl_next::Responder<directory::Query, ___T>) {
11890 ___H::query(&mut self.0, responder).await
11891 }
11892
11893 async fn deprecated_clone(
11894 &mut self,
11895
11896 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
11897 ) {
11898 ___H::deprecated_clone(&mut self.0, request).await
11899 }
11900
11901 async fn deprecated_get_attr(
11902 &mut self,
11903
11904 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
11905 ) {
11906 ___H::deprecated_get_attr(&mut self.0, responder).await
11907 }
11908
11909 async fn deprecated_set_attr(
11910 &mut self,
11911
11912 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
11913
11914 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
11915 ) {
11916 ___H::deprecated_set_attr(&mut self.0, request, responder).await
11917 }
11918
11919 async fn deprecated_get_flags(
11920 &mut self,
11921
11922 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
11923 ) {
11924 ___H::deprecated_get_flags(&mut self.0, responder).await
11925 }
11926
11927 async fn deprecated_set_flags(
11928 &mut self,
11929
11930 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
11931
11932 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
11933 ) {
11934 ___H::deprecated_set_flags(&mut self.0, request, responder).await
11935 }
11936
11937 async fn get_flags(&mut self, responder: ::fidl_next::Responder<directory::GetFlags, ___T>) {
11938 ___H::get_flags(&mut self.0, responder).await
11939 }
11940
11941 async fn set_flags(
11942 &mut self,
11943
11944 request: ::fidl_next::Request<directory::SetFlags, ___T>,
11945
11946 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
11947 ) {
11948 ___H::set_flags(&mut self.0, request, responder).await
11949 }
11950
11951 async fn query_filesystem(
11952 &mut self,
11953
11954 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
11955 ) {
11956 ___H::query_filesystem(&mut self.0, responder).await
11957 }
11958
11959 async fn get_attributes(
11960 &mut self,
11961
11962 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
11963
11964 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
11965 ) {
11966 ___H::get_attributes(&mut self.0, request, responder).await
11967 }
11968
11969 async fn update_attributes(
11970 &mut self,
11971
11972 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
11973
11974 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
11975 ) {
11976 ___H::update_attributes(&mut self.0, request, responder).await
11977 }
11978
11979 async fn sync(&mut self, responder: ::fidl_next::Responder<directory::Sync, ___T>) {
11980 ___H::sync(&mut self.0, responder).await
11981 }
11982
11983 async fn list_extended_attributes(
11984 &mut self,
11985
11986 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
11987 ) {
11988 ___H::list_extended_attributes(&mut self.0, request).await
11989 }
11990
11991 async fn get_extended_attribute(
11992 &mut self,
11993
11994 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
11995
11996 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
11997 ) {
11998 ___H::get_extended_attribute(&mut self.0, request, responder).await
11999 }
12000
12001 async fn set_extended_attribute(
12002 &mut self,
12003
12004 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
12005
12006 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
12007 ) {
12008 ___H::set_extended_attribute(&mut self.0, request, responder).await
12009 }
12010
12011 async fn remove_extended_attribute(
12012 &mut self,
12013
12014 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
12015
12016 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
12017 ) {
12018 ___H::remove_extended_attribute(&mut self.0, request, responder).await
12019 }
12020
12021 async fn deprecated_open(
12022 &mut self,
12023
12024 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
12025 ) {
12026 ___H::deprecated_open(&mut self.0, request).await
12027 }
12028
12029 async fn open(&mut self, request: ::fidl_next::Request<directory::Open, ___T>) {
12030 ___H::open(&mut self.0, request).await
12031 }
12032
12033 async fn read_dirents(
12034 &mut self,
12035
12036 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
12037
12038 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
12039 ) {
12040 ___H::read_dirents(&mut self.0, request, responder).await
12041 }
12042
12043 async fn rewind(&mut self, responder: ::fidl_next::Responder<directory::Rewind, ___T>) {
12044 ___H::rewind(&mut self.0, responder).await
12045 }
12046
12047 async fn get_token(&mut self, responder: ::fidl_next::Responder<directory::GetToken, ___T>) {
12048 ___H::get_token(&mut self.0, responder).await
12049 }
12050
12051 async fn link(
12052 &mut self,
12053
12054 request: ::fidl_next::Request<directory::Link, ___T>,
12055
12056 responder: ::fidl_next::Responder<directory::Link, ___T>,
12057 ) {
12058 ___H::link(&mut self.0, request, responder).await
12059 }
12060
12061 async fn unlink(
12062 &mut self,
12063
12064 request: ::fidl_next::Request<directory::Unlink, ___T>,
12065
12066 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
12067 ) {
12068 ___H::unlink(&mut self.0, request, responder).await
12069 }
12070
12071 async fn rename(
12072 &mut self,
12073
12074 request: ::fidl_next::Request<directory::Rename, ___T>,
12075
12076 responder: ::fidl_next::Responder<directory::Rename, ___T>,
12077 ) {
12078 ___H::rename(&mut self.0, request, responder).await
12079 }
12080
12081 async fn create_symlink(
12082 &mut self,
12083
12084 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
12085
12086 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
12087 ) {
12088 ___H::create_symlink(&mut self.0, request, responder).await
12089 }
12090
12091 async fn watch(
12092 &mut self,
12093
12094 request: ::fidl_next::Request<directory::Watch, ___T>,
12095
12096 responder: ::fidl_next::Responder<directory::Watch, ___T>,
12097 ) {
12098 ___H::watch(&mut self.0, request, responder).await
12099 }
12100
12101 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12102 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12103 }
12104}
12105
12106#[derive(PartialEq, Debug)]
12108pub struct Linkable;
12109
12110#[cfg(target_os = "fuchsia")]
12111impl ::fidl_next::HasTransport for Linkable {
12112 type Transport = ::fidl_next::fuchsia::zx::Channel;
12113}
12114
12115pub mod linkable {
12116 pub mod prelude {
12117 pub use crate::{
12118 Linkable, LinkableClientHandler, LinkableLocalClientHandler,
12119 LinkableLocalServerHandler, LinkableServerHandler, linkable,
12120 };
12121
12122 pub use crate::natural::LinkableLinkIntoRequest;
12123
12124 pub use crate::natural::LinkableLinkIntoResponse;
12125 }
12126
12127 pub struct LinkInto;
12128
12129 impl ::fidl_next::Method for LinkInto {
12130 const ORDINAL: u64 = 6121399674497678964;
12131 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12132 ::fidl_next::protocol::Flexibility::Strict;
12133
12134 type Protocol = crate::Linkable;
12135
12136 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
12137 }
12138
12139 impl ::fidl_next::TwoWayMethod for LinkInto {
12140 type Response = ::fidl_next::wire::Result<
12141 'static,
12142 crate::wire::LinkableLinkIntoResponse,
12143 ::fidl_next::wire::Int32,
12144 >;
12145 }
12146
12147 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
12148 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
12149
12150 fn respond(response: ___R) -> Self::Output {
12151 ::core::result::Result::Ok(response)
12152 }
12153 }
12154
12155 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
12156 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
12157
12158 fn respond_err(response: ___R) -> Self::Output {
12159 ::core::result::Result::Err(response)
12160 }
12161 }
12162
12163 mod ___detail {
12164 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Linkable
12165 where
12166 ___T: ::fidl_next::Transport,
12167 {
12168 type Client = LinkableClient<___T>;
12169 type Server = LinkableServer<___T>;
12170 }
12171
12172 #[repr(transparent)]
12174 pub struct LinkableClient<___T: ::fidl_next::Transport> {
12175 #[allow(dead_code)]
12176 client: ::fidl_next::protocol::Client<___T>,
12177 }
12178
12179 impl<___T> LinkableClient<___T>
12180 where
12181 ___T: ::fidl_next::Transport,
12182 {
12183 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
12184 pub fn link_into(
12185 &self,
12186
12187 dst_parent_token: impl ::fidl_next::Encode<
12188 ::fidl_next::wire::fuchsia::Event,
12189 <___T as ::fidl_next::Transport>::SendBuffer,
12190 >,
12191
12192 dst: impl ::fidl_next::Encode<
12193 ::fidl_next::wire::String<'static>,
12194 <___T as ::fidl_next::Transport>::SendBuffer,
12195 >,
12196 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
12197 where
12198 <___T as ::fidl_next::Transport>::SendBuffer:
12199 ::fidl_next::encoder::InternalHandleEncoder,
12200 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12201 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12202 {
12203 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
12204 dst_parent_token,
12205
12206 dst,
12207 })
12208 }
12209
12210 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
12211 pub fn link_into_with<___R>(
12212 &self,
12213 request: ___R,
12214 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
12215 where
12216 ___R: ::fidl_next::Encode<
12217 crate::wire::LinkableLinkIntoRequest<'static>,
12218 <___T as ::fidl_next::Transport>::SendBuffer,
12219 >,
12220 {
12221 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12222 6121399674497678964,
12223 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
12224 request,
12225 ))
12226 }
12227 }
12228
12229 #[repr(transparent)]
12231 pub struct LinkableServer<___T: ::fidl_next::Transport> {
12232 server: ::fidl_next::protocol::Server<___T>,
12233 }
12234
12235 impl<___T> LinkableServer<___T> where ___T: ::fidl_next::Transport {}
12236 }
12237}
12238
12239#[diagnostic::on_unimplemented(
12240 note = "If {Self} implements the non-local LinkableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
12241)]
12242
12243pub trait LinkableLocalClientHandler<
12247 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12248 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12249>
12250{
12251}
12252
12253impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Linkable
12254where
12255 ___H: LinkableLocalClientHandler<___T>,
12256 ___T: ::fidl_next::Transport,
12257{
12258 async fn on_event(
12259 handler: &mut ___H,
12260 ordinal: u64,
12261 flexibility: ::fidl_next::protocol::Flexibility,
12262 body: ::fidl_next::Body<___T>,
12263 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12264 match ordinal {
12265 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12266 }
12267 }
12268}
12269
12270#[diagnostic::on_unimplemented(
12271 note = "If {Self} implements the non-local LinkableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
12272)]
12273
12274pub trait LinkableLocalServerHandler<
12278 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12279 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12280>
12281{
12282 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
12283 fn link_into(
12284 &mut self,
12285
12286 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12287
12288 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12289 ) -> impl ::core::future::Future<Output = ()>;
12290}
12291
12292impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Linkable
12293where
12294 ___H: LinkableLocalServerHandler<___T>,
12295 ___T: ::fidl_next::Transport,
12296 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12297 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12298 Constraint = (),
12299 >,
12300{
12301 async fn on_one_way(
12302 handler: &mut ___H,
12303 ordinal: u64,
12304 flexibility: ::fidl_next::protocol::Flexibility,
12305 body: ::fidl_next::Body<___T>,
12306 ) -> ::core::result::Result<
12307 (),
12308 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12309 > {
12310 match ordinal {
12311 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12312 }
12313 }
12314
12315 async fn on_two_way(
12316 handler: &mut ___H,
12317 ordinal: u64,
12318 flexibility: ::fidl_next::protocol::Flexibility,
12319 body: ::fidl_next::Body<___T>,
12320 responder: ::fidl_next::protocol::Responder<___T>,
12321 ) -> ::core::result::Result<
12322 (),
12323 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12324 > {
12325 match ordinal {
12326 6121399674497678964 => {
12327 let responder = ::fidl_next::Responder::from_untyped(responder);
12328
12329 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12330 Ok(decoded) => {
12331 handler
12332 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
12333 .await;
12334 Ok(())
12335 }
12336 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12337 ordinal: 6121399674497678964,
12338 error,
12339 }),
12340 }
12341 }
12342
12343 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12344 }
12345 }
12346}
12347
12348pub trait LinkableClientHandler<
12352 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12353 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12354>
12355{
12356}
12357
12358impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Linkable
12359where
12360 ___H: LinkableClientHandler<___T> + ::core::marker::Send,
12361 ___T: ::fidl_next::Transport,
12362{
12363 async fn on_event(
12364 handler: &mut ___H,
12365 ordinal: u64,
12366 flexibility: ::fidl_next::protocol::Flexibility,
12367 body: ::fidl_next::Body<___T>,
12368 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12369 match ordinal {
12370 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12371 }
12372 }
12373}
12374
12375pub trait LinkableServerHandler<
12379 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12380 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12381>
12382{
12383 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
12384 fn link_into(
12385 &mut self,
12386
12387 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12388
12389 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12390 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12391}
12392
12393impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Linkable
12394where
12395 ___H: LinkableServerHandler<___T> + ::core::marker::Send,
12396 ___T: ::fidl_next::Transport,
12397 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12398 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12399 Constraint = (),
12400 >,
12401{
12402 async fn on_one_way(
12403 handler: &mut ___H,
12404 ordinal: u64,
12405 flexibility: ::fidl_next::protocol::Flexibility,
12406 body: ::fidl_next::Body<___T>,
12407 ) -> ::core::result::Result<
12408 (),
12409 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12410 > {
12411 match ordinal {
12412 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12413 }
12414 }
12415
12416 async fn on_two_way(
12417 handler: &mut ___H,
12418 ordinal: u64,
12419 flexibility: ::fidl_next::protocol::Flexibility,
12420 body: ::fidl_next::Body<___T>,
12421 responder: ::fidl_next::protocol::Responder<___T>,
12422 ) -> ::core::result::Result<
12423 (),
12424 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12425 > {
12426 match ordinal {
12427 6121399674497678964 => {
12428 let responder = ::fidl_next::Responder::from_untyped(responder);
12429
12430 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12431 Ok(decoded) => {
12432 handler
12433 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
12434 .await;
12435 Ok(())
12436 }
12437 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12438 ordinal: 6121399674497678964,
12439 error,
12440 }),
12441 }
12442 }
12443
12444 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12445 }
12446 }
12447}
12448
12449impl<___T> LinkableClientHandler<___T> for ::fidl_next::IgnoreEvents where
12450 ___T: ::fidl_next::Transport
12451{
12452}
12453
12454impl<___H, ___T> LinkableLocalClientHandler<___T> for ::fidl_next::Local<___H>
12455where
12456 ___H: LinkableClientHandler<___T>,
12457 ___T: ::fidl_next::Transport,
12458{
12459}
12460
12461impl<___H, ___T> LinkableLocalServerHandler<___T> for ::fidl_next::Local<___H>
12462where
12463 ___H: LinkableServerHandler<___T>,
12464 ___T: ::fidl_next::Transport,
12465{
12466 async fn link_into(
12467 &mut self,
12468
12469 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12470
12471 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12472 ) {
12473 ___H::link_into(&mut self.0, request, responder).await
12474 }
12475}
12476
12477#[doc = " A [`Node`] which contains a sequence of bytes of definite length.\n\n NOTE: cloned connections do not share their seek offset with their source\n connection.\n"]
12479#[derive(PartialEq, Debug)]
12480pub struct File;
12481
12482impl ::fidl_next::Discoverable for File {
12483 const PROTOCOL_NAME: &'static str = "fuchsia.io.File";
12484}
12485
12486#[cfg(target_os = "fuchsia")]
12487impl ::fidl_next::HasTransport for File {
12488 type Transport = ::fidl_next::fuchsia::zx::Channel;
12489}
12490
12491pub mod file {
12492 pub mod prelude {
12493 pub use crate::{
12494 File, FileClientHandler, FileLocalClientHandler, FileLocalServerHandler,
12495 FileServerHandler, file,
12496 };
12497
12498 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
12499
12500 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
12501
12502 pub use crate::natural::ExtendedAttributeValue;
12503
12504 pub use crate::natural::FileAllocateRequest;
12505
12506 pub use crate::natural::FileEnableVerityRequest;
12507
12508 pub use crate::natural::FileGetBackingMemoryRequest;
12509
12510 pub use crate::natural::FileInfo;
12511
12512 pub use crate::natural::FileReadAtRequest;
12513
12514 pub use crate::natural::FileResizeRequest;
12515
12516 pub use crate::natural::FileSeekRequest;
12517
12518 pub use crate::natural::FileWriteAtRequest;
12519
12520 pub use crate::natural::FileAllocateResponse;
12521
12522 pub use crate::natural::FileEnableVerityResponse;
12523
12524 pub use crate::natural::FileGetBackingMemoryResponse;
12525
12526 pub use crate::natural::FileReadAtResponse;
12527
12528 pub use crate::natural::FileResizeResponse;
12529
12530 pub use crate::natural::FileSeekResponse;
12531
12532 pub use crate::natural::FileWriteAtResponse;
12533
12534 pub use crate::natural::LinkableLinkIntoRequest;
12535
12536 pub use crate::natural::LinkableLinkIntoResponse;
12537
12538 pub use crate::natural::MutableNodeAttributes;
12539
12540 pub use crate::natural::NodeAttributes2;
12541
12542 pub use crate::natural::NodeDeprecatedCloneRequest;
12543
12544 pub use crate::natural::NodeDeprecatedGetAttrResponse;
12545
12546 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
12547
12548 pub use crate::natural::NodeDeprecatedSetAttrRequest;
12549
12550 pub use crate::natural::NodeDeprecatedSetAttrResponse;
12551
12552 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
12553
12554 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
12555
12556 pub use crate::natural::NodeGetAttributesRequest;
12557
12558 pub use crate::natural::NodeGetExtendedAttributeRequest;
12559
12560 pub use crate::natural::NodeListExtendedAttributesRequest;
12561
12562 pub use crate::natural::NodeOnOpenRequest;
12563
12564 pub use crate::natural::NodeQueryFilesystemResponse;
12565
12566 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
12567
12568 pub use crate::natural::NodeSetExtendedAttributeRequest;
12569
12570 pub use crate::natural::NodeSetFlagsRequest;
12571
12572 pub use crate::natural::NodeGetFlagsResponse;
12573
12574 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
12575
12576 pub use crate::natural::NodeSetExtendedAttributeResponse;
12577
12578 pub use crate::natural::NodeSetFlagsResponse;
12579
12580 pub use crate::natural::NodeSyncResponse;
12581
12582 pub use crate::natural::NodeUpdateAttributesResponse;
12583
12584 pub use crate::natural::ReadableReadRequest;
12585
12586 pub use crate::natural::ReadableReadResponse;
12587
12588 pub use crate::natural::Representation;
12589
12590 pub use crate::natural::WritableWriteRequest;
12591
12592 pub use crate::natural::WritableWriteResponse;
12593
12594 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
12595
12596 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
12597
12598 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
12599 }
12600
12601 pub struct AdvisoryLock;
12602
12603 impl ::fidl_next::Method for AdvisoryLock {
12604 const ORDINAL: u64 = 7992130864415541162;
12605 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12606 ::fidl_next::protocol::Flexibility::Strict;
12607
12608 type Protocol = crate::File;
12609
12610 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
12611 }
12612
12613 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
12614 type Response = ::fidl_next::wire::Result<
12615 'static,
12616 crate::wire::AdvisoryLockingAdvisoryLockResponse,
12617 ::fidl_next::wire::Int32,
12618 >;
12619 }
12620
12621 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
12622 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
12623
12624 fn respond(response: ___R) -> Self::Output {
12625 ::core::result::Result::Ok(response)
12626 }
12627 }
12628
12629 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
12630 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
12631
12632 fn respond_err(response: ___R) -> Self::Output {
12633 ::core::result::Result::Err(response)
12634 }
12635 }
12636
12637 pub struct LinkInto;
12638
12639 impl ::fidl_next::Method for LinkInto {
12640 const ORDINAL: u64 = 6121399674497678964;
12641 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12642 ::fidl_next::protocol::Flexibility::Strict;
12643
12644 type Protocol = crate::File;
12645
12646 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
12647 }
12648
12649 impl ::fidl_next::TwoWayMethod for LinkInto {
12650 type Response = ::fidl_next::wire::Result<
12651 'static,
12652 crate::wire::LinkableLinkIntoResponse,
12653 ::fidl_next::wire::Int32,
12654 >;
12655 }
12656
12657 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
12658 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
12659
12660 fn respond(response: ___R) -> Self::Output {
12661 ::core::result::Result::Ok(response)
12662 }
12663 }
12664
12665 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
12666 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
12667
12668 fn respond_err(response: ___R) -> Self::Output {
12669 ::core::result::Result::Err(response)
12670 }
12671 }
12672
12673 pub struct Clone;
12674
12675 impl ::fidl_next::Method for Clone {
12676 const ORDINAL: u64 = 2366825959783828089;
12677 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12678 ::fidl_next::protocol::Flexibility::Strict;
12679
12680 type Protocol = crate::File;
12681
12682 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
12683 }
12684
12685 pub struct Close;
12686
12687 impl ::fidl_next::Method for Close {
12688 const ORDINAL: u64 = 6540867515453498750;
12689 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12690 ::fidl_next::protocol::Flexibility::Strict;
12691
12692 type Protocol = crate::File;
12693
12694 type Request = ::fidl_next::wire::EmptyMessageBody;
12695 }
12696
12697 impl ::fidl_next::TwoWayMethod for Close {
12698 type Response = ::fidl_next::wire::Result<
12699 'static,
12700 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
12701 ::fidl_next::wire::Int32,
12702 >;
12703 }
12704
12705 impl<___R> ::fidl_next::Respond<___R> for Close {
12706 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
12707
12708 fn respond(response: ___R) -> Self::Output {
12709 ::core::result::Result::Ok(response)
12710 }
12711 }
12712
12713 impl<___R> ::fidl_next::RespondErr<___R> for Close {
12714 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
12715
12716 fn respond_err(response: ___R) -> Self::Output {
12717 ::core::result::Result::Err(response)
12718 }
12719 }
12720
12721 pub struct Query;
12722
12723 impl ::fidl_next::Method for Query {
12724 const ORDINAL: u64 = 2763219980499352582;
12725 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12726 ::fidl_next::protocol::Flexibility::Strict;
12727
12728 type Protocol = crate::File;
12729
12730 type Request = ::fidl_next::wire::EmptyMessageBody;
12731 }
12732
12733 impl ::fidl_next::TwoWayMethod for Query {
12734 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
12735 }
12736
12737 impl<___R> ::fidl_next::Respond<___R> for Query {
12738 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
12739
12740 fn respond(response: ___R) -> Self::Output {
12741 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
12742 }
12743 }
12744
12745 pub struct DeprecatedClone;
12746
12747 impl ::fidl_next::Method for DeprecatedClone {
12748 const ORDINAL: u64 = 6512600400724287855;
12749 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12750 ::fidl_next::protocol::Flexibility::Flexible;
12751
12752 type Protocol = crate::File;
12753
12754 type Request = crate::wire::NodeDeprecatedCloneRequest;
12755 }
12756
12757 pub struct OnOpen;
12758
12759 impl ::fidl_next::Method for OnOpen {
12760 const ORDINAL: u64 = 9207534335756671346;
12761 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12762 ::fidl_next::protocol::Flexibility::Flexible;
12763
12764 type Protocol = crate::File;
12765
12766 type Request = crate::wire::NodeOnOpenRequest<'static>;
12767 }
12768
12769 pub struct DeprecatedGetAttr;
12770
12771 impl ::fidl_next::Method for DeprecatedGetAttr {
12772 const ORDINAL: u64 = 8689798978500614909;
12773 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12774 ::fidl_next::protocol::Flexibility::Strict;
12775
12776 type Protocol = crate::File;
12777
12778 type Request = ::fidl_next::wire::EmptyMessageBody;
12779 }
12780
12781 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
12782 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
12783 }
12784
12785 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
12786 type Output = ___R;
12787
12788 fn respond(response: ___R) -> Self::Output {
12789 response
12790 }
12791 }
12792
12793 pub struct DeprecatedSetAttr;
12794
12795 impl ::fidl_next::Method for DeprecatedSetAttr {
12796 const ORDINAL: u64 = 4721673413776871238;
12797 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12798 ::fidl_next::protocol::Flexibility::Strict;
12799
12800 type Protocol = crate::File;
12801
12802 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
12803 }
12804
12805 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
12806 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
12807 }
12808
12809 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
12810 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
12811
12812 fn respond(response: ___R) -> Self::Output {
12813 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
12814 }
12815 }
12816
12817 pub struct DeprecatedGetFlags;
12818
12819 impl ::fidl_next::Method for DeprecatedGetFlags {
12820 const ORDINAL: u64 = 6595803110182632097;
12821 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12822 ::fidl_next::protocol::Flexibility::Strict;
12823
12824 type Protocol = crate::File;
12825
12826 type Request = ::fidl_next::wire::EmptyMessageBody;
12827 }
12828
12829 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
12830 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
12831 }
12832
12833 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
12834 type Output = ___R;
12835
12836 fn respond(response: ___R) -> Self::Output {
12837 response
12838 }
12839 }
12840
12841 pub struct DeprecatedSetFlags;
12842
12843 impl ::fidl_next::Method for DeprecatedSetFlags {
12844 const ORDINAL: u64 = 5950864159036794675;
12845 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12846 ::fidl_next::protocol::Flexibility::Strict;
12847
12848 type Protocol = crate::File;
12849
12850 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
12851 }
12852
12853 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
12854 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
12855 }
12856
12857 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
12858 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
12859
12860 fn respond(response: ___R) -> Self::Output {
12861 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
12862 }
12863 }
12864
12865 pub struct GetFlags;
12866
12867 impl ::fidl_next::Method for GetFlags {
12868 const ORDINAL: u64 = 105530239381466147;
12869 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12870 ::fidl_next::protocol::Flexibility::Flexible;
12871
12872 type Protocol = crate::File;
12873
12874 type Request = ::fidl_next::wire::EmptyMessageBody;
12875 }
12876
12877 impl ::fidl_next::TwoWayMethod for GetFlags {
12878 type Response = ::fidl_next::wire::FlexibleResult<
12879 'static,
12880 crate::wire::NodeGetFlagsResponse,
12881 ::fidl_next::wire::Int32,
12882 >;
12883 }
12884
12885 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
12886 type Output = ::fidl_next::FlexibleResult<
12887 crate::generic::NodeGetFlagsResponse<___R>,
12888 ::fidl_next::util::Never,
12889 >;
12890
12891 fn respond(response: ___R) -> Self::Output {
12892 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
12893 flags: response,
12894 })
12895 }
12896 }
12897
12898 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
12899 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
12900
12901 fn respond_err(response: ___R) -> Self::Output {
12902 ::fidl_next::FlexibleResult::Err(response)
12903 }
12904 }
12905
12906 pub struct SetFlags;
12907
12908 impl ::fidl_next::Method for SetFlags {
12909 const ORDINAL: u64 = 6172186066099445416;
12910 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12911 ::fidl_next::protocol::Flexibility::Flexible;
12912
12913 type Protocol = crate::File;
12914
12915 type Request = crate::wire::NodeSetFlagsRequest;
12916 }
12917
12918 impl ::fidl_next::TwoWayMethod for SetFlags {
12919 type Response = ::fidl_next::wire::FlexibleResult<
12920 'static,
12921 crate::wire::NodeSetFlagsResponse,
12922 ::fidl_next::wire::Int32,
12923 >;
12924 }
12925
12926 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
12927 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
12928
12929 fn respond(response: ___R) -> Self::Output {
12930 ::fidl_next::FlexibleResult::Ok(response)
12931 }
12932 }
12933
12934 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
12935 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
12936
12937 fn respond_err(response: ___R) -> Self::Output {
12938 ::fidl_next::FlexibleResult::Err(response)
12939 }
12940 }
12941
12942 pub struct QueryFilesystem;
12943
12944 impl ::fidl_next::Method for QueryFilesystem {
12945 const ORDINAL: u64 = 8013111122914313744;
12946 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12947 ::fidl_next::protocol::Flexibility::Strict;
12948
12949 type Protocol = crate::File;
12950
12951 type Request = ::fidl_next::wire::EmptyMessageBody;
12952 }
12953
12954 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
12955 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
12956 }
12957
12958 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
12959 type Output = ___R;
12960
12961 fn respond(response: ___R) -> Self::Output {
12962 response
12963 }
12964 }
12965
12966 pub struct OnRepresentation;
12967
12968 impl ::fidl_next::Method for OnRepresentation {
12969 const ORDINAL: u64 = 6679970090861613324;
12970 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12971 ::fidl_next::protocol::Flexibility::Strict;
12972
12973 type Protocol = crate::File;
12974
12975 type Request = crate::wire::Representation<'static>;
12976 }
12977
12978 pub struct GetAttributes;
12979
12980 impl ::fidl_next::Method for GetAttributes {
12981 const ORDINAL: u64 = 4414537700416816443;
12982 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12983 ::fidl_next::protocol::Flexibility::Strict;
12984
12985 type Protocol = crate::File;
12986
12987 type Request = crate::wire::NodeGetAttributesRequest;
12988 }
12989
12990 impl ::fidl_next::TwoWayMethod for GetAttributes {
12991 type Response = ::fidl_next::wire::Result<
12992 'static,
12993 crate::wire::NodeAttributes2<'static>,
12994 ::fidl_next::wire::Int32,
12995 >;
12996 }
12997
12998 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
12999 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13000
13001 fn respond(response: ___R) -> Self::Output {
13002 ::core::result::Result::Ok(response)
13003 }
13004 }
13005
13006 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
13007 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13008
13009 fn respond_err(response: ___R) -> Self::Output {
13010 ::core::result::Result::Err(response)
13011 }
13012 }
13013
13014 pub struct UpdateAttributes;
13015
13016 impl ::fidl_next::Method for UpdateAttributes {
13017 const ORDINAL: u64 = 3677402239314018056;
13018 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13019 ::fidl_next::protocol::Flexibility::Strict;
13020
13021 type Protocol = crate::File;
13022
13023 type Request = crate::wire::MutableNodeAttributes<'static>;
13024 }
13025
13026 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
13027 type Response = ::fidl_next::wire::Result<
13028 'static,
13029 crate::wire::NodeUpdateAttributesResponse,
13030 ::fidl_next::wire::Int32,
13031 >;
13032 }
13033
13034 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
13035 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13036
13037 fn respond(response: ___R) -> Self::Output {
13038 ::core::result::Result::Ok(response)
13039 }
13040 }
13041
13042 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
13043 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13044
13045 fn respond_err(response: ___R) -> Self::Output {
13046 ::core::result::Result::Err(response)
13047 }
13048 }
13049
13050 pub struct Sync;
13051
13052 impl ::fidl_next::Method for Sync {
13053 const ORDINAL: u64 = 3196473584242777161;
13054 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13055 ::fidl_next::protocol::Flexibility::Strict;
13056
13057 type Protocol = crate::File;
13058
13059 type Request = ::fidl_next::wire::EmptyMessageBody;
13060 }
13061
13062 impl ::fidl_next::TwoWayMethod for Sync {
13063 type Response = ::fidl_next::wire::Result<
13064 'static,
13065 crate::wire::NodeSyncResponse,
13066 ::fidl_next::wire::Int32,
13067 >;
13068 }
13069
13070 impl<___R> ::fidl_next::Respond<___R> for Sync {
13071 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13072
13073 fn respond(response: ___R) -> Self::Output {
13074 ::core::result::Result::Ok(response)
13075 }
13076 }
13077
13078 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
13079 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13080
13081 fn respond_err(response: ___R) -> Self::Output {
13082 ::core::result::Result::Err(response)
13083 }
13084 }
13085
13086 pub struct ListExtendedAttributes;
13087
13088 impl ::fidl_next::Method for ListExtendedAttributes {
13089 const ORDINAL: u64 = 5431626189872037072;
13090 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13091 ::fidl_next::protocol::Flexibility::Strict;
13092
13093 type Protocol = crate::File;
13094
13095 type Request = crate::wire::NodeListExtendedAttributesRequest;
13096 }
13097
13098 pub struct GetExtendedAttribute;
13099
13100 impl ::fidl_next::Method for GetExtendedAttribute {
13101 const ORDINAL: u64 = 5043930208506967771;
13102 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13103 ::fidl_next::protocol::Flexibility::Strict;
13104
13105 type Protocol = crate::File;
13106
13107 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
13108 }
13109
13110 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
13111 type Response = ::fidl_next::wire::Result<
13112 'static,
13113 crate::wire::ExtendedAttributeValue<'static>,
13114 ::fidl_next::wire::Int32,
13115 >;
13116 }
13117
13118 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
13119 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13120
13121 fn respond(response: ___R) -> Self::Output {
13122 ::core::result::Result::Ok(response)
13123 }
13124 }
13125
13126 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
13127 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13128
13129 fn respond_err(response: ___R) -> Self::Output {
13130 ::core::result::Result::Err(response)
13131 }
13132 }
13133
13134 pub struct SetExtendedAttribute;
13135
13136 impl ::fidl_next::Method for SetExtendedAttribute {
13137 const ORDINAL: u64 = 5374223046099989052;
13138 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13139 ::fidl_next::protocol::Flexibility::Strict;
13140
13141 type Protocol = crate::File;
13142
13143 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
13144 }
13145
13146 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
13147 type Response = ::fidl_next::wire::Result<
13148 'static,
13149 crate::wire::NodeSetExtendedAttributeResponse,
13150 ::fidl_next::wire::Int32,
13151 >;
13152 }
13153
13154 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
13155 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13156
13157 fn respond(response: ___R) -> Self::Output {
13158 ::core::result::Result::Ok(response)
13159 }
13160 }
13161
13162 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
13163 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13164
13165 fn respond_err(response: ___R) -> Self::Output {
13166 ::core::result::Result::Err(response)
13167 }
13168 }
13169
13170 pub struct RemoveExtendedAttribute;
13171
13172 impl ::fidl_next::Method for RemoveExtendedAttribute {
13173 const ORDINAL: u64 = 8794297771444732717;
13174 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13175 ::fidl_next::protocol::Flexibility::Strict;
13176
13177 type Protocol = crate::File;
13178
13179 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
13180 }
13181
13182 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
13183 type Response = ::fidl_next::wire::Result<
13184 'static,
13185 crate::wire::NodeRemoveExtendedAttributeResponse,
13186 ::fidl_next::wire::Int32,
13187 >;
13188 }
13189
13190 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
13191 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13192
13193 fn respond(response: ___R) -> Self::Output {
13194 ::core::result::Result::Ok(response)
13195 }
13196 }
13197
13198 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
13199 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13200
13201 fn respond_err(response: ___R) -> Self::Output {
13202 ::core::result::Result::Err(response)
13203 }
13204 }
13205
13206 pub struct Read;
13207
13208 impl ::fidl_next::Method for Read {
13209 const ORDINAL: u64 = 395825947633028830;
13210 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13211 ::fidl_next::protocol::Flexibility::Strict;
13212
13213 type Protocol = crate::File;
13214
13215 type Request = crate::wire::ReadableReadRequest;
13216 }
13217
13218 impl ::fidl_next::TwoWayMethod for Read {
13219 type Response = ::fidl_next::wire::Result<
13220 'static,
13221 crate::wire::ReadableReadResponse<'static>,
13222 ::fidl_next::wire::Int32,
13223 >;
13224 }
13225
13226 impl<___R> ::fidl_next::Respond<___R> for Read {
13227 type Output = ::core::result::Result<
13228 crate::generic::ReadableReadResponse<___R>,
13229 ::fidl_next::util::Never,
13230 >;
13231
13232 fn respond(response: ___R) -> Self::Output {
13233 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
13234 }
13235 }
13236
13237 impl<___R> ::fidl_next::RespondErr<___R> for Read {
13238 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13239
13240 fn respond_err(response: ___R) -> Self::Output {
13241 ::core::result::Result::Err(response)
13242 }
13243 }
13244
13245 pub struct Write;
13246
13247 impl ::fidl_next::Method for Write {
13248 const ORDINAL: u64 = 7651971425397809026;
13249 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13250 ::fidl_next::protocol::Flexibility::Strict;
13251
13252 type Protocol = crate::File;
13253
13254 type Request = crate::wire::WritableWriteRequest<'static>;
13255 }
13256
13257 impl ::fidl_next::TwoWayMethod for Write {
13258 type Response = ::fidl_next::wire::Result<
13259 'static,
13260 crate::wire::WritableWriteResponse,
13261 ::fidl_next::wire::Int32,
13262 >;
13263 }
13264
13265 impl<___R> ::fidl_next::Respond<___R> for Write {
13266 type Output = ::core::result::Result<
13267 crate::generic::WritableWriteResponse<___R>,
13268 ::fidl_next::util::Never,
13269 >;
13270
13271 fn respond(response: ___R) -> Self::Output {
13272 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
13273 actual_count: response,
13274 })
13275 }
13276 }
13277
13278 impl<___R> ::fidl_next::RespondErr<___R> for Write {
13279 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13280
13281 fn respond_err(response: ___R) -> Self::Output {
13282 ::core::result::Result::Err(response)
13283 }
13284 }
13285
13286 pub struct Describe;
13287
13288 impl ::fidl_next::Method for Describe {
13289 const ORDINAL: u64 = 7545125870053689020;
13290 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13291 ::fidl_next::protocol::Flexibility::Strict;
13292
13293 type Protocol = crate::File;
13294
13295 type Request = ::fidl_next::wire::EmptyMessageBody;
13296 }
13297
13298 impl ::fidl_next::TwoWayMethod for Describe {
13299 type Response = crate::wire::FileInfo<'static>;
13300 }
13301
13302 impl<___R> ::fidl_next::Respond<___R> for Describe {
13303 type Output = ___R;
13304
13305 fn respond(response: ___R) -> Self::Output {
13306 response
13307 }
13308 }
13309
13310 pub struct Seek;
13311
13312 impl ::fidl_next::Method for Seek {
13313 const ORDINAL: u64 = 8649041485622956551;
13314 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13315 ::fidl_next::protocol::Flexibility::Strict;
13316
13317 type Protocol = crate::File;
13318
13319 type Request = crate::wire::FileSeekRequest;
13320 }
13321
13322 impl ::fidl_next::TwoWayMethod for Seek {
13323 type Response = ::fidl_next::wire::Result<
13324 'static,
13325 crate::wire::FileSeekResponse,
13326 ::fidl_next::wire::Int32,
13327 >;
13328 }
13329
13330 impl<___R> ::fidl_next::Respond<___R> for Seek {
13331 type Output = ::core::result::Result<
13332 crate::generic::FileSeekResponse<___R>,
13333 ::fidl_next::util::Never,
13334 >;
13335
13336 fn respond(response: ___R) -> Self::Output {
13337 ::core::result::Result::Ok(crate::generic::FileSeekResponse {
13338 offset_from_start: response,
13339 })
13340 }
13341 }
13342
13343 impl<___R> ::fidl_next::RespondErr<___R> for Seek {
13344 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13345
13346 fn respond_err(response: ___R) -> Self::Output {
13347 ::core::result::Result::Err(response)
13348 }
13349 }
13350
13351 pub struct ReadAt;
13352
13353 impl ::fidl_next::Method for ReadAt {
13354 const ORDINAL: u64 = 1587416148701180478;
13355 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13356 ::fidl_next::protocol::Flexibility::Strict;
13357
13358 type Protocol = crate::File;
13359
13360 type Request = crate::wire::FileReadAtRequest;
13361 }
13362
13363 impl ::fidl_next::TwoWayMethod for ReadAt {
13364 type Response = ::fidl_next::wire::Result<
13365 'static,
13366 crate::wire::FileReadAtResponse<'static>,
13367 ::fidl_next::wire::Int32,
13368 >;
13369 }
13370
13371 impl<___R> ::fidl_next::Respond<___R> for ReadAt {
13372 type Output = ::core::result::Result<
13373 crate::generic::FileReadAtResponse<___R>,
13374 ::fidl_next::util::Never,
13375 >;
13376
13377 fn respond(response: ___R) -> Self::Output {
13378 ::core::result::Result::Ok(crate::generic::FileReadAtResponse { data: response })
13379 }
13380 }
13381
13382 impl<___R> ::fidl_next::RespondErr<___R> for ReadAt {
13383 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13384
13385 fn respond_err(response: ___R) -> Self::Output {
13386 ::core::result::Result::Err(response)
13387 }
13388 }
13389
13390 pub struct WriteAt;
13391
13392 impl ::fidl_next::Method for WriteAt {
13393 const ORDINAL: u64 = 8736683935131400491;
13394 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13395 ::fidl_next::protocol::Flexibility::Strict;
13396
13397 type Protocol = crate::File;
13398
13399 type Request = crate::wire::FileWriteAtRequest<'static>;
13400 }
13401
13402 impl ::fidl_next::TwoWayMethod for WriteAt {
13403 type Response = ::fidl_next::wire::Result<
13404 'static,
13405 crate::wire::FileWriteAtResponse,
13406 ::fidl_next::wire::Int32,
13407 >;
13408 }
13409
13410 impl<___R> ::fidl_next::Respond<___R> for WriteAt {
13411 type Output = ::core::result::Result<
13412 crate::generic::FileWriteAtResponse<___R>,
13413 ::fidl_next::util::Never,
13414 >;
13415
13416 fn respond(response: ___R) -> Self::Output {
13417 ::core::result::Result::Ok(crate::generic::FileWriteAtResponse {
13418 actual_count: response,
13419 })
13420 }
13421 }
13422
13423 impl<___R> ::fidl_next::RespondErr<___R> for WriteAt {
13424 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13425
13426 fn respond_err(response: ___R) -> Self::Output {
13427 ::core::result::Result::Err(response)
13428 }
13429 }
13430
13431 pub struct Resize;
13432
13433 impl ::fidl_next::Method for Resize {
13434 const ORDINAL: u64 = 3134648685270758458;
13435 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13436 ::fidl_next::protocol::Flexibility::Strict;
13437
13438 type Protocol = crate::File;
13439
13440 type Request = crate::wire::FileResizeRequest;
13441 }
13442
13443 impl ::fidl_next::TwoWayMethod for Resize {
13444 type Response = ::fidl_next::wire::Result<
13445 'static,
13446 crate::wire::FileResizeResponse,
13447 ::fidl_next::wire::Int32,
13448 >;
13449 }
13450
13451 impl<___R> ::fidl_next::Respond<___R> for Resize {
13452 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13453
13454 fn respond(response: ___R) -> Self::Output {
13455 ::core::result::Result::Ok(response)
13456 }
13457 }
13458
13459 impl<___R> ::fidl_next::RespondErr<___R> for Resize {
13460 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13461
13462 fn respond_err(response: ___R) -> Self::Output {
13463 ::core::result::Result::Err(response)
13464 }
13465 }
13466
13467 pub struct GetBackingMemory;
13468
13469 impl ::fidl_next::Method for GetBackingMemory {
13470 const ORDINAL: u64 = 46911652864194091;
13471 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13472 ::fidl_next::protocol::Flexibility::Strict;
13473
13474 type Protocol = crate::File;
13475
13476 type Request = crate::wire::FileGetBackingMemoryRequest;
13477 }
13478
13479 impl ::fidl_next::TwoWayMethod for GetBackingMemory {
13480 type Response = ::fidl_next::wire::Result<
13481 'static,
13482 crate::wire::FileGetBackingMemoryResponse,
13483 ::fidl_next::wire::Int32,
13484 >;
13485 }
13486
13487 impl<___R> ::fidl_next::Respond<___R> for GetBackingMemory {
13488 type Output = ::core::result::Result<
13489 crate::generic::FileGetBackingMemoryResponse<___R>,
13490 ::fidl_next::util::Never,
13491 >;
13492
13493 fn respond(response: ___R) -> Self::Output {
13494 ::core::result::Result::Ok(crate::generic::FileGetBackingMemoryResponse {
13495 vmo: response,
13496 })
13497 }
13498 }
13499
13500 impl<___R> ::fidl_next::RespondErr<___R> for GetBackingMemory {
13501 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13502
13503 fn respond_err(response: ___R) -> Self::Output {
13504 ::core::result::Result::Err(response)
13505 }
13506 }
13507
13508 pub struct Allocate;
13509
13510 impl ::fidl_next::Method for Allocate {
13511 const ORDINAL: u64 = 8645235848064269614;
13512 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13513 ::fidl_next::protocol::Flexibility::Flexible;
13514
13515 type Protocol = crate::File;
13516
13517 type Request = crate::wire::FileAllocateRequest;
13518 }
13519
13520 impl ::fidl_next::TwoWayMethod for Allocate {
13521 type Response = ::fidl_next::wire::FlexibleResult<
13522 'static,
13523 crate::wire::FileAllocateResponse,
13524 ::fidl_next::wire::Int32,
13525 >;
13526 }
13527
13528 impl<___R> ::fidl_next::Respond<___R> for Allocate {
13529 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13530
13531 fn respond(response: ___R) -> Self::Output {
13532 ::fidl_next::FlexibleResult::Ok(response)
13533 }
13534 }
13535
13536 impl<___R> ::fidl_next::RespondErr<___R> for Allocate {
13537 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13538
13539 fn respond_err(response: ___R) -> Self::Output {
13540 ::fidl_next::FlexibleResult::Err(response)
13541 }
13542 }
13543
13544 pub struct EnableVerity;
13545
13546 impl ::fidl_next::Method for EnableVerity {
13547 const ORDINAL: u64 = 3189145313204943035;
13548 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13549 ::fidl_next::protocol::Flexibility::Flexible;
13550
13551 type Protocol = crate::File;
13552
13553 type Request = crate::wire::FileEnableVerityRequest<'static>;
13554 }
13555
13556 impl ::fidl_next::TwoWayMethod for EnableVerity {
13557 type Response = ::fidl_next::wire::FlexibleResult<
13558 'static,
13559 crate::wire::FileEnableVerityResponse,
13560 ::fidl_next::wire::Int32,
13561 >;
13562 }
13563
13564 impl<___R> ::fidl_next::Respond<___R> for EnableVerity {
13565 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13566
13567 fn respond(response: ___R) -> Self::Output {
13568 ::fidl_next::FlexibleResult::Ok(response)
13569 }
13570 }
13571
13572 impl<___R> ::fidl_next::RespondErr<___R> for EnableVerity {
13573 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13574
13575 fn respond_err(response: ___R) -> Self::Output {
13576 ::fidl_next::FlexibleResult::Err(response)
13577 }
13578 }
13579
13580 mod ___detail {
13581 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::File
13582 where
13583 ___T: ::fidl_next::Transport,
13584 {
13585 type Client = FileClient<___T>;
13586 type Server = FileServer<___T>;
13587 }
13588
13589 #[repr(transparent)]
13591 pub struct FileClient<___T: ::fidl_next::Transport> {
13592 #[allow(dead_code)]
13593 client: ::fidl_next::protocol::Client<___T>,
13594 }
13595
13596 impl<___T> FileClient<___T>
13597 where
13598 ___T: ::fidl_next::Transport,
13599 {
13600 #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n to acquire the given type of lock.\n"]
13601 pub fn advisory_lock(
13602 &self,
13603
13604 request: impl ::fidl_next::Encode<
13605 crate::wire::AdvisoryLockRequest<'static>,
13606 <___T as ::fidl_next::Transport>::SendBuffer,
13607 >,
13608 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
13609 where
13610 <___T as ::fidl_next::Transport>::SendBuffer:
13611 ::fidl_next::encoder::InternalHandleEncoder,
13612 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
13613 {
13614 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
13615 request,
13616 })
13617 }
13618
13619 #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n to acquire the given type of lock.\n"]
13620 pub fn advisory_lock_with<___R>(
13621 &self,
13622 request: ___R,
13623 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
13624 where
13625 ___R: ::fidl_next::Encode<
13626 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
13627 <___T as ::fidl_next::Transport>::SendBuffer,
13628 >,
13629 {
13630 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13631 7992130864415541162,
13632 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
13633 request,
13634 ))
13635 }
13636
13637 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
13638 pub fn link_into(
13639 &self,
13640
13641 dst_parent_token: impl ::fidl_next::Encode<
13642 ::fidl_next::wire::fuchsia::Event,
13643 <___T as ::fidl_next::Transport>::SendBuffer,
13644 >,
13645
13646 dst: impl ::fidl_next::Encode<
13647 ::fidl_next::wire::String<'static>,
13648 <___T as ::fidl_next::Transport>::SendBuffer,
13649 >,
13650 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
13651 where
13652 <___T as ::fidl_next::Transport>::SendBuffer:
13653 ::fidl_next::encoder::InternalHandleEncoder,
13654 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
13655 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
13656 {
13657 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
13658 dst_parent_token,
13659
13660 dst,
13661 })
13662 }
13663
13664 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
13665 pub fn link_into_with<___R>(
13666 &self,
13667 request: ___R,
13668 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
13669 where
13670 ___R: ::fidl_next::Encode<
13671 crate::wire::LinkableLinkIntoRequest<'static>,
13672 <___T as ::fidl_next::Transport>::SendBuffer,
13673 >,
13674 {
13675 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13676 6121399674497678964,
13677 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
13678 request,
13679 ))
13680 }
13681
13682 pub fn clone(
13683 &self,
13684
13685 request: impl ::fidl_next::Encode<
13686 ::fidl_next::ServerEnd<
13687 ::fidl_next_fuchsia_unknown::Cloneable,
13688 ::fidl_next::wire::fuchsia::Channel,
13689 >,
13690 <___T as ::fidl_next::Transport>::SendBuffer,
13691 >,
13692 ) -> ::fidl_next::SendFuture<'_, ___T>
13693 where
13694 <___T as ::fidl_next::Transport>::SendBuffer:
13695 ::fidl_next::encoder::InternalHandleEncoder,
13696 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
13697 {
13698 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
13699 request,
13700 })
13701 }
13702
13703 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
13704 where
13705 ___R: ::fidl_next::Encode<
13706 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
13707 <___T as ::fidl_next::Transport>::SendBuffer,
13708 >,
13709 {
13710 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
13711 2366825959783828089,
13712 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
13713 request,
13714 ))
13715 }
13716
13717 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
13718 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
13719 ::fidl_next::TwoWayFuture::from_untyped(
13720 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13721 6540867515453498750,
13722 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
13723 (),
13724 ),
13725 )
13726 }
13727
13728 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
13729 ::fidl_next::TwoWayFuture::from_untyped(
13730 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13731 2763219980499352582,
13732 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
13733 (),
13734 ),
13735 )
13736 }
13737
13738 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
13739 pub fn deprecated_clone(
13740 &self,
13741
13742 flags: impl ::fidl_next::Encode<
13743 crate::wire::OpenFlags,
13744 <___T as ::fidl_next::Transport>::SendBuffer,
13745 >,
13746
13747 object: impl ::fidl_next::Encode<
13748 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
13749 <___T as ::fidl_next::Transport>::SendBuffer,
13750 >,
13751 ) -> ::fidl_next::SendFuture<'_, ___T>
13752 where
13753 <___T as ::fidl_next::Transport>::SendBuffer:
13754 ::fidl_next::encoder::InternalHandleEncoder,
13755 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
13756 {
13757 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
13758 flags,
13759
13760 object,
13761 })
13762 }
13763
13764 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
13765 pub fn deprecated_clone_with<___R>(
13766 &self,
13767 request: ___R,
13768 ) -> ::fidl_next::SendFuture<'_, ___T>
13769 where
13770 ___R: ::fidl_next::Encode<
13771 crate::wire::NodeDeprecatedCloneRequest,
13772 <___T as ::fidl_next::Transport>::SendBuffer,
13773 >,
13774 {
13775 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
13776 6512600400724287855,
13777 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
13778 request,
13779 ))
13780 }
13781
13782 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
13783 pub fn deprecated_get_attr(
13784 &self,
13785 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
13786 ::fidl_next::TwoWayFuture::from_untyped(
13787 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13788 8689798978500614909,
13789 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
13790 (),
13791 ),
13792 )
13793 }
13794
13795 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
13796 pub fn deprecated_set_attr(
13797 &self,
13798
13799 flags: impl ::fidl_next::Encode<
13800 crate::wire::NodeAttributeFlags,
13801 <___T as ::fidl_next::Transport>::SendBuffer,
13802 >,
13803
13804 attributes: impl ::fidl_next::Encode<
13805 crate::wire::NodeAttributes,
13806 <___T as ::fidl_next::Transport>::SendBuffer,
13807 >,
13808 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
13809 where
13810 <___T as ::fidl_next::Transport>::SendBuffer:
13811 ::fidl_next::encoder::InternalHandleEncoder,
13812 {
13813 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
13814 flags,
13815
13816 attributes,
13817 })
13818 }
13819
13820 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
13821 pub fn deprecated_set_attr_with<___R>(
13822 &self,
13823 request: ___R,
13824 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
13825 where
13826 ___R: ::fidl_next::Encode<
13827 crate::wire::NodeDeprecatedSetAttrRequest,
13828 <___T as ::fidl_next::Transport>::SendBuffer,
13829 >,
13830 {
13831 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13832 4721673413776871238,
13833 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
13834 request,
13835 ))
13836 }
13837
13838 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
13839 pub fn deprecated_get_flags(
13840 &self,
13841 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
13842 ::fidl_next::TwoWayFuture::from_untyped(
13843 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13844 6595803110182632097,
13845 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
13846 (),
13847 ),
13848 )
13849 }
13850
13851 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
13852 pub fn deprecated_set_flags(
13853 &self,
13854
13855 flags: impl ::fidl_next::Encode<
13856 crate::wire::OpenFlags,
13857 <___T as ::fidl_next::Transport>::SendBuffer,
13858 >,
13859 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
13860 where
13861 <___T as ::fidl_next::Transport>::SendBuffer:
13862 ::fidl_next::encoder::InternalHandleEncoder,
13863 {
13864 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
13865 flags,
13866 })
13867 }
13868
13869 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
13870 pub fn deprecated_set_flags_with<___R>(
13871 &self,
13872 request: ___R,
13873 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
13874 where
13875 ___R: ::fidl_next::Encode<
13876 crate::wire::NodeDeprecatedSetFlagsRequest,
13877 <___T as ::fidl_next::Transport>::SendBuffer,
13878 >,
13879 {
13880 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13881 5950864159036794675,
13882 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
13883 request,
13884 ))
13885 }
13886
13887 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
13888 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
13889 ::fidl_next::TwoWayFuture::from_untyped(
13890 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13891 105530239381466147,
13892 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
13893 (),
13894 ),
13895 )
13896 }
13897
13898 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
13899 pub fn set_flags(
13900 &self,
13901
13902 flags: impl ::fidl_next::Encode<
13903 crate::wire::Flags,
13904 <___T as ::fidl_next::Transport>::SendBuffer,
13905 >,
13906 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
13907 where
13908 <___T as ::fidl_next::Transport>::SendBuffer:
13909 ::fidl_next::encoder::InternalHandleEncoder,
13910 {
13911 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
13912 }
13913
13914 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
13915 pub fn set_flags_with<___R>(
13916 &self,
13917 request: ___R,
13918 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
13919 where
13920 ___R: ::fidl_next::Encode<
13921 crate::wire::NodeSetFlagsRequest,
13922 <___T as ::fidl_next::Transport>::SendBuffer,
13923 >,
13924 {
13925 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13926 6172186066099445416,
13927 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
13928 request,
13929 ))
13930 }
13931
13932 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
13933 pub fn query_filesystem(
13934 &self,
13935 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
13936 ::fidl_next::TwoWayFuture::from_untyped(
13937 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13938 8013111122914313744,
13939 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
13940 (),
13941 ),
13942 )
13943 }
13944
13945 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
13946 pub fn get_attributes(
13947 &self,
13948
13949 query: impl ::fidl_next::Encode<
13950 crate::wire::NodeAttributesQuery,
13951 <___T as ::fidl_next::Transport>::SendBuffer,
13952 >,
13953 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
13954 where
13955 <___T as ::fidl_next::Transport>::SendBuffer:
13956 ::fidl_next::encoder::InternalHandleEncoder,
13957 {
13958 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
13959 }
13960
13961 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
13962 pub fn get_attributes_with<___R>(
13963 &self,
13964 request: ___R,
13965 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
13966 where
13967 ___R: ::fidl_next::Encode<
13968 crate::wire::NodeGetAttributesRequest,
13969 <___T as ::fidl_next::Transport>::SendBuffer,
13970 >,
13971 {
13972 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13973 4414537700416816443,
13974 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
13975 request,
13976 ))
13977 }
13978
13979 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
13980 pub fn update_attributes_with<___R>(
13981 &self,
13982 request: ___R,
13983 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
13984 where
13985 ___R: ::fidl_next::Encode<
13986 crate::wire::MutableNodeAttributes<'static>,
13987 <___T as ::fidl_next::Transport>::SendBuffer,
13988 >,
13989 {
13990 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13991 3677402239314018056,
13992 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
13993 request,
13994 ))
13995 }
13996
13997 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
13998 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
13999 ::fidl_next::TwoWayFuture::from_untyped(
14000 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14001 3196473584242777161,
14002 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
14003 (),
14004 ),
14005 )
14006 }
14007
14008 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14009 pub fn list_extended_attributes(
14010 &self,
14011
14012 iterator: impl ::fidl_next::Encode<
14013 ::fidl_next::ServerEnd<
14014 crate::ExtendedAttributeIterator,
14015 ::fidl_next::wire::fuchsia::Channel,
14016 >,
14017 <___T as ::fidl_next::Transport>::SendBuffer,
14018 >,
14019 ) -> ::fidl_next::SendFuture<'_, ___T>
14020 where
14021 <___T as ::fidl_next::Transport>::SendBuffer:
14022 ::fidl_next::encoder::InternalHandleEncoder,
14023 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14024 {
14025 self.list_extended_attributes_with(
14026 crate::generic::NodeListExtendedAttributesRequest { iterator },
14027 )
14028 }
14029
14030 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14031 pub fn list_extended_attributes_with<___R>(
14032 &self,
14033 request: ___R,
14034 ) -> ::fidl_next::SendFuture<'_, ___T>
14035 where
14036 ___R: ::fidl_next::Encode<
14037 crate::wire::NodeListExtendedAttributesRequest,
14038 <___T as ::fidl_next::Transport>::SendBuffer,
14039 >,
14040 {
14041 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14042 5431626189872037072,
14043 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
14044 request,
14045 ))
14046 }
14047
14048 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14049 pub fn get_extended_attribute(
14050 &self,
14051
14052 name: impl ::fidl_next::Encode<
14053 ::fidl_next::wire::Vector<'static, u8>,
14054 <___T as ::fidl_next::Transport>::SendBuffer,
14055 >,
14056 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14057 where
14058 <___T as ::fidl_next::Transport>::SendBuffer:
14059 ::fidl_next::encoder::InternalHandleEncoder,
14060 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14061 {
14062 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
14063 name,
14064 })
14065 }
14066
14067 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14068 pub fn get_extended_attribute_with<___R>(
14069 &self,
14070 request: ___R,
14071 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14072 where
14073 ___R: ::fidl_next::Encode<
14074 crate::wire::NodeGetExtendedAttributeRequest<'static>,
14075 <___T as ::fidl_next::Transport>::SendBuffer,
14076 >,
14077 {
14078 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14079 5043930208506967771,
14080 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14081 request,
14082 ))
14083 }
14084
14085 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14086 pub fn set_extended_attribute(
14087 &self,
14088
14089 name: impl ::fidl_next::Encode<
14090 ::fidl_next::wire::Vector<'static, u8>,
14091 <___T as ::fidl_next::Transport>::SendBuffer,
14092 >,
14093
14094 value: impl ::fidl_next::Encode<
14095 crate::wire::ExtendedAttributeValue<'static>,
14096 <___T as ::fidl_next::Transport>::SendBuffer,
14097 >,
14098
14099 mode: impl ::fidl_next::Encode<
14100 crate::wire::SetExtendedAttributeMode,
14101 <___T as ::fidl_next::Transport>::SendBuffer,
14102 >,
14103 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14104 where
14105 <___T as ::fidl_next::Transport>::SendBuffer:
14106 ::fidl_next::encoder::InternalHandleEncoder,
14107 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14108 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14109 {
14110 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
14111 name,
14112
14113 value,
14114
14115 mode,
14116 })
14117 }
14118
14119 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14120 pub fn set_extended_attribute_with<___R>(
14121 &self,
14122 request: ___R,
14123 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14124 where
14125 ___R: ::fidl_next::Encode<
14126 crate::wire::NodeSetExtendedAttributeRequest<'static>,
14127 <___T as ::fidl_next::Transport>::SendBuffer,
14128 >,
14129 {
14130 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14131 5374223046099989052,
14132 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14133 request,
14134 ))
14135 }
14136
14137 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14138 pub fn remove_extended_attribute(
14139 &self,
14140
14141 name: impl ::fidl_next::Encode<
14142 ::fidl_next::wire::Vector<'static, u8>,
14143 <___T as ::fidl_next::Transport>::SendBuffer,
14144 >,
14145 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14146 where
14147 <___T as ::fidl_next::Transport>::SendBuffer:
14148 ::fidl_next::encoder::InternalHandleEncoder,
14149 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14150 {
14151 self.remove_extended_attribute_with(
14152 crate::generic::NodeRemoveExtendedAttributeRequest { name },
14153 )
14154 }
14155
14156 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14157 pub fn remove_extended_attribute_with<___R>(
14158 &self,
14159 request: ___R,
14160 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14161 where
14162 ___R: ::fidl_next::Encode<
14163 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
14164 <___T as ::fidl_next::Transport>::SendBuffer,
14165 >,
14166 {
14167 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14168 8794297771444732717,
14169 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14170 request,
14171 ))
14172 }
14173
14174 #[doc = " Reads up to \'count\' bytes at the seek offset.\n The seek offset is moved forward by the number of bytes read.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that the seek offset\n has reached the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that the\n seek offset is already at or beyond the end of file, and no data could\n be read.\n * If `count` is zero, the server should perform all the checks ensuring\n read access without actually read anything, and return an empty\n `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
14175 pub fn read(
14176 &self,
14177
14178 count: impl ::fidl_next::Encode<
14179 ::fidl_next::wire::Uint64,
14180 <___T as ::fidl_next::Transport>::SendBuffer,
14181 >,
14182 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
14183 where
14184 <___T as ::fidl_next::Transport>::SendBuffer:
14185 ::fidl_next::encoder::InternalHandleEncoder,
14186 {
14187 self.read_with(crate::generic::ReadableReadRequest { count })
14188 }
14189
14190 #[doc = " Reads up to \'count\' bytes at the seek offset.\n The seek offset is moved forward by the number of bytes read.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that the seek offset\n has reached the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that the\n seek offset is already at or beyond the end of file, and no data could\n be read.\n * If `count` is zero, the server should perform all the checks ensuring\n read access without actually read anything, and return an empty\n `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
14191 pub fn read_with<___R>(
14192 &self,
14193 request: ___R,
14194 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
14195 where
14196 ___R: ::fidl_next::Encode<
14197 crate::wire::ReadableReadRequest,
14198 <___T as ::fidl_next::Transport>::SendBuffer,
14199 >,
14200 {
14201 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14202 395825947633028830,
14203 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
14204 request,
14205 ))
14206 }
14207
14208 #[doc = " Writes data at the seek offset.\n The seek offset is moved forward by the number of bytes written.\n If the file is in append mode, the seek offset is first set to the end\n of the file, followed by the write, in one atomic step.\n\n The file size may grow if the seek offset plus `data.length` is beyond\n the current end of file.\n\n + request `data` the byte buffer to write to the file.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n space, `actual_count` may be less than `data.length`. If no bytes\n could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n ensuring write access without mutating the file and return a\n successful write of zero bytes. The seek offset is still updated if\n in append mode.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
14209 pub fn write(
14210 &self,
14211
14212 data: impl ::fidl_next::Encode<
14213 ::fidl_next::wire::Vector<'static, u8>,
14214 <___T as ::fidl_next::Transport>::SendBuffer,
14215 >,
14216 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
14217 where
14218 <___T as ::fidl_next::Transport>::SendBuffer:
14219 ::fidl_next::encoder::InternalHandleEncoder,
14220 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14221 {
14222 self.write_with(crate::generic::WritableWriteRequest { data })
14223 }
14224
14225 #[doc = " Writes data at the seek offset.\n The seek offset is moved forward by the number of bytes written.\n If the file is in append mode, the seek offset is first set to the end\n of the file, followed by the write, in one atomic step.\n\n The file size may grow if the seek offset plus `data.length` is beyond\n the current end of file.\n\n + request `data` the byte buffer to write to the file.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n space, `actual_count` may be less than `data.length`. If no bytes\n could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n ensuring write access without mutating the file and return a\n successful write of zero bytes. The seek offset is still updated if\n in append mode.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
14226 pub fn write_with<___R>(
14227 &self,
14228 request: ___R,
14229 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
14230 where
14231 ___R: ::fidl_next::Encode<
14232 crate::wire::WritableWriteRequest<'static>,
14233 <___T as ::fidl_next::Transport>::SendBuffer,
14234 >,
14235 {
14236 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14237 7651971425397809026,
14238 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
14239 request,
14240 ))
14241 }
14242
14243 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
14244 ::fidl_next::TwoWayFuture::from_untyped(
14245 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14246 7545125870053689020,
14247 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
14248 (),
14249 ),
14250 )
14251 }
14252
14253 #[doc = " Moves the offset at which the next invocation of [`Read`] or [`Write`]\n will occur. The seek offset is specific to each file connection.\n\n + request `origin` the reference point where `offset` will be based on.\n + request `offset` the number of bytes to seek.\n - response `offset_from_start` the adjusted seek offset, from the start\n of the file.\n\n This method does not require any rights.\n"]
14254 pub fn seek(
14255 &self,
14256
14257 origin: impl ::fidl_next::Encode<
14258 crate::wire::SeekOrigin,
14259 <___T as ::fidl_next::Transport>::SendBuffer,
14260 >,
14261
14262 offset: impl ::fidl_next::Encode<
14263 ::fidl_next::wire::Int64,
14264 <___T as ::fidl_next::Transport>::SendBuffer,
14265 >,
14266 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
14267 where
14268 <___T as ::fidl_next::Transport>::SendBuffer:
14269 ::fidl_next::encoder::InternalHandleEncoder,
14270 {
14271 self.seek_with(crate::generic::FileSeekRequest { origin, offset })
14272 }
14273
14274 #[doc = " Moves the offset at which the next invocation of [`Read`] or [`Write`]\n will occur. The seek offset is specific to each file connection.\n\n + request `origin` the reference point where `offset` will be based on.\n + request `offset` the number of bytes to seek.\n - response `offset_from_start` the adjusted seek offset, from the start\n of the file.\n\n This method does not require any rights.\n"]
14275 pub fn seek_with<___R>(
14276 &self,
14277 request: ___R,
14278 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
14279 where
14280 ___R: ::fidl_next::Encode<
14281 crate::wire::FileSeekRequest,
14282 <___T as ::fidl_next::Transport>::SendBuffer,
14283 >,
14284 {
14285 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14286 8649041485622956551,
14287 <super::Seek as ::fidl_next::Method>::FLEXIBILITY,
14288 request,
14289 ))
14290 }
14291
14292 #[doc = " Reads up to \'count\' bytes at the provided offset.\n Does not affect the seek offset.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that `ReadAt` has hit\n the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that `offset`\n is at or past the end of file, and no data can be read.\n * If `count` is zero, the server should perform all the checks ensuring\n read access without actually reading anything, and return an empty\n `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
14293 pub fn read_at(
14294 &self,
14295
14296 count: impl ::fidl_next::Encode<
14297 ::fidl_next::wire::Uint64,
14298 <___T as ::fidl_next::Transport>::SendBuffer,
14299 >,
14300
14301 offset: impl ::fidl_next::Encode<
14302 ::fidl_next::wire::Uint64,
14303 <___T as ::fidl_next::Transport>::SendBuffer,
14304 >,
14305 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
14306 where
14307 <___T as ::fidl_next::Transport>::SendBuffer:
14308 ::fidl_next::encoder::InternalHandleEncoder,
14309 {
14310 self.read_at_with(crate::generic::FileReadAtRequest { count, offset })
14311 }
14312
14313 #[doc = " Reads up to \'count\' bytes at the provided offset.\n Does not affect the seek offset.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that `ReadAt` has hit\n the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that `offset`\n is at or past the end of file, and no data can be read.\n * If `count` is zero, the server should perform all the checks ensuring\n read access without actually reading anything, and return an empty\n `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
14314 pub fn read_at_with<___R>(
14315 &self,
14316 request: ___R,
14317 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
14318 where
14319 ___R: ::fidl_next::Encode<
14320 crate::wire::FileReadAtRequest,
14321 <___T as ::fidl_next::Transport>::SendBuffer,
14322 >,
14323 {
14324 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14325 1587416148701180478,
14326 <super::ReadAt as ::fidl_next::Method>::FLEXIBILITY,
14327 request,
14328 ))
14329 }
14330
14331 #[doc = " Writes data at the provided offset.\n Does not affect the seek offset.\n\n The file size may grow if `offset` plus `data.length` is past the\n current end of file.\n\n + request `data` the byte buffer to write to the file.\n + request `offset` the offset from start of the file to begin writing.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n space, `actual_count` may be less than `data.length`. If no bytes\n could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n ensuring write access without mutating the file, and will return a\n successful write of zero bytes.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
14332 pub fn write_at(
14333 &self,
14334
14335 data: impl ::fidl_next::Encode<
14336 ::fidl_next::wire::Vector<'static, u8>,
14337 <___T as ::fidl_next::Transport>::SendBuffer,
14338 >,
14339
14340 offset: impl ::fidl_next::Encode<
14341 ::fidl_next::wire::Uint64,
14342 <___T as ::fidl_next::Transport>::SendBuffer,
14343 >,
14344 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
14345 where
14346 <___T as ::fidl_next::Transport>::SendBuffer:
14347 ::fidl_next::encoder::InternalHandleEncoder,
14348 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14349 {
14350 self.write_at_with(crate::generic::FileWriteAtRequest { data, offset })
14351 }
14352
14353 #[doc = " Writes data at the provided offset.\n Does not affect the seek offset.\n\n The file size may grow if `offset` plus `data.length` is past the\n current end of file.\n\n + request `data` the byte buffer to write to the file.\n + request `offset` the offset from start of the file to begin writing.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n space, `actual_count` may be less than `data.length`. If no bytes\n could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n ensuring write access without mutating the file, and will return a\n successful write of zero bytes.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
14354 pub fn write_at_with<___R>(
14355 &self,
14356 request: ___R,
14357 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
14358 where
14359 ___R: ::fidl_next::Encode<
14360 crate::wire::FileWriteAtRequest<'static>,
14361 <___T as ::fidl_next::Transport>::SendBuffer,
14362 >,
14363 {
14364 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14365 8736683935131400491,
14366 <super::WriteAt as ::fidl_next::Method>::FLEXIBILITY,
14367 request,
14368 ))
14369 }
14370
14371 #[doc = " Shrinks or grows the file size to \'length\' bytes.\n\n If file size is reduced by this operation, the extra trailing data\'\n is discarded.\n If file size is increased by this operation, the extended area appears\n as if it was zeroed.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
14372 pub fn resize(
14373 &self,
14374
14375 length: impl ::fidl_next::Encode<
14376 ::fidl_next::wire::Uint64,
14377 <___T as ::fidl_next::Transport>::SendBuffer,
14378 >,
14379 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
14380 where
14381 <___T as ::fidl_next::Transport>::SendBuffer:
14382 ::fidl_next::encoder::InternalHandleEncoder,
14383 {
14384 self.resize_with(crate::generic::FileResizeRequest { length })
14385 }
14386
14387 #[doc = " Shrinks or grows the file size to \'length\' bytes.\n\n If file size is reduced by this operation, the extra trailing data\'\n is discarded.\n If file size is increased by this operation, the extended area appears\n as if it was zeroed.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
14388 pub fn resize_with<___R>(
14389 &self,
14390 request: ___R,
14391 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
14392 where
14393 ___R: ::fidl_next::Encode<
14394 crate::wire::FileResizeRequest,
14395 <___T as ::fidl_next::Transport>::SendBuffer,
14396 >,
14397 {
14398 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14399 3134648685270758458,
14400 <super::Resize as ::fidl_next::Method>::FLEXIBILITY,
14401 request,
14402 ))
14403 }
14404
14405 #[doc = " Acquires a [`zx.Handle:VMO`] representing this file, if there is one,\n with the requested access rights.\n\n Implementations are not required to implement files backed by VMOs so\n this request may fail. Additionally, implementations may only support\n a certain subset of the flags. Clients should be prepared with fallback\n behavior if this request fails.\n\n If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the\n implementation is free to choose the semantics of the returned VMO.\n\n + request `flags` a [`VmoFlags`] indicating the desired mode of access.\n - response `vmo` the requested [`zx.Handle:VMO`].\n * error a [`zx.Status`] value indicating the failure.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].\n * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].\n * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].\n"]
14406 pub fn get_backing_memory(
14407 &self,
14408
14409 flags: impl ::fidl_next::Encode<
14410 crate::wire::VmoFlags,
14411 <___T as ::fidl_next::Transport>::SendBuffer,
14412 >,
14413 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
14414 where
14415 <___T as ::fidl_next::Transport>::SendBuffer:
14416 ::fidl_next::encoder::InternalHandleEncoder,
14417 {
14418 self.get_backing_memory_with(crate::generic::FileGetBackingMemoryRequest { flags })
14419 }
14420
14421 #[doc = " Acquires a [`zx.Handle:VMO`] representing this file, if there is one,\n with the requested access rights.\n\n Implementations are not required to implement files backed by VMOs so\n this request may fail. Additionally, implementations may only support\n a certain subset of the flags. Clients should be prepared with fallback\n behavior if this request fails.\n\n If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the\n implementation is free to choose the semantics of the returned VMO.\n\n + request `flags` a [`VmoFlags`] indicating the desired mode of access.\n - response `vmo` the requested [`zx.Handle:VMO`].\n * error a [`zx.Status`] value indicating the failure.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].\n * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].\n * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].\n"]
14422 pub fn get_backing_memory_with<___R>(
14423 &self,
14424 request: ___R,
14425 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
14426 where
14427 ___R: ::fidl_next::Encode<
14428 crate::wire::FileGetBackingMemoryRequest,
14429 <___T as ::fidl_next::Transport>::SendBuffer,
14430 >,
14431 {
14432 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14433 46911652864194091,
14434 <super::GetBackingMemory as ::fidl_next::Method>::FLEXIBILITY,
14435 request,
14436 ))
14437 }
14438
14439 #[doc = " Pre-allocate on-disk space for this file.\n"]
14440 pub fn allocate(
14441 &self,
14442
14443 offset: impl ::fidl_next::Encode<
14444 ::fidl_next::wire::Uint64,
14445 <___T as ::fidl_next::Transport>::SendBuffer,
14446 >,
14447
14448 length: impl ::fidl_next::Encode<
14449 ::fidl_next::wire::Uint64,
14450 <___T as ::fidl_next::Transport>::SendBuffer,
14451 >,
14452
14453 mode: impl ::fidl_next::Encode<
14454 crate::wire::AllocateMode,
14455 <___T as ::fidl_next::Transport>::SendBuffer,
14456 >,
14457 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
14458 where
14459 <___T as ::fidl_next::Transport>::SendBuffer:
14460 ::fidl_next::encoder::InternalHandleEncoder,
14461 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14462 {
14463 self.allocate_with(crate::generic::FileAllocateRequest { offset, length, mode })
14464 }
14465
14466 #[doc = " Pre-allocate on-disk space for this file.\n"]
14467 pub fn allocate_with<___R>(
14468 &self,
14469 request: ___R,
14470 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
14471 where
14472 ___R: ::fidl_next::Encode<
14473 crate::wire::FileAllocateRequest,
14474 <___T as ::fidl_next::Transport>::SendBuffer,
14475 >,
14476 {
14477 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14478 8645235848064269614,
14479 <super::Allocate as ::fidl_next::Method>::FLEXIBILITY,
14480 request,
14481 ))
14482 }
14483
14484 #[doc = " Enables verification for the file (permanently) which involves computing a merkle tree for\n the file. Forces a flush prior to building the merkle tree to ensure cached data is\n captured. Future reads will be verified against the computed merkle tree and writes will be\n rejected. This method can take some time to complete as it depends on the size of the file.\n This method can be aborted by closing the connection that this method was issued on.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.\n Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.\n Also returns any error that might arise from reading the file, or from flushing the file,\n such as `ZX_ERR_IO`.\n"]
14485 pub fn enable_verity(
14486 &self,
14487
14488 options: impl ::fidl_next::Encode<
14489 crate::wire::VerificationOptions<'static>,
14490 <___T as ::fidl_next::Transport>::SendBuffer,
14491 >,
14492 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
14493 where
14494 <___T as ::fidl_next::Transport>::SendBuffer:
14495 ::fidl_next::encoder::InternalHandleEncoder,
14496 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14497 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14498 {
14499 self.enable_verity_with(crate::generic::FileEnableVerityRequest { options })
14500 }
14501
14502 #[doc = " Enables verification for the file (permanently) which involves computing a merkle tree for\n the file. Forces a flush prior to building the merkle tree to ensure cached data is\n captured. Future reads will be verified against the computed merkle tree and writes will be\n rejected. This method can take some time to complete as it depends on the size of the file.\n This method can be aborted by closing the connection that this method was issued on.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.\n Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.\n Also returns any error that might arise from reading the file, or from flushing the file,\n such as `ZX_ERR_IO`.\n"]
14503 pub fn enable_verity_with<___R>(
14504 &self,
14505 request: ___R,
14506 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
14507 where
14508 ___R: ::fidl_next::Encode<
14509 crate::wire::FileEnableVerityRequest<'static>,
14510 <___T as ::fidl_next::Transport>::SendBuffer,
14511 >,
14512 {
14513 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14514 3189145313204943035,
14515 <super::EnableVerity as ::fidl_next::Method>::FLEXIBILITY,
14516 request,
14517 ))
14518 }
14519 }
14520
14521 #[repr(transparent)]
14523 pub struct FileServer<___T: ::fidl_next::Transport> {
14524 server: ::fidl_next::protocol::Server<___T>,
14525 }
14526
14527 impl<___T> FileServer<___T>
14528 where
14529 ___T: ::fidl_next::Transport,
14530 {
14531 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
14532 pub fn on_open(
14533 &self,
14534
14535 s: impl ::fidl_next::Encode<
14536 ::fidl_next::wire::Int32,
14537 <___T as ::fidl_next::Transport>::SendBuffer,
14538 >,
14539
14540 info: impl ::fidl_next::Encode<
14541 crate::wire_optional::NodeInfoDeprecated<'static>,
14542 <___T as ::fidl_next::Transport>::SendBuffer,
14543 >,
14544 ) -> ::fidl_next::SendFuture<'_, ___T>
14545 where
14546 <___T as ::fidl_next::Transport>::SendBuffer:
14547 ::fidl_next::encoder::InternalHandleEncoder,
14548 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14549 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14550 {
14551 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
14552 }
14553
14554 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
14555
14556 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14557 where
14558 ___R: ::fidl_next::Encode<
14559 <super::OnOpen as ::fidl_next::Method>::Request,
14560 <___T as ::fidl_next::Transport>::SendBuffer,
14561 >,
14562 {
14563 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14564 9207534335756671346,
14565 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
14566 request,
14567 ))
14568 }
14569
14570 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
14571
14572 pub fn on_representation_with<___R>(
14573 &self,
14574 request: ___R,
14575 ) -> ::fidl_next::SendFuture<'_, ___T>
14576 where
14577 ___R: ::fidl_next::Encode<
14578 <super::OnRepresentation as ::fidl_next::Method>::Request,
14579 <___T as ::fidl_next::Transport>::SendBuffer,
14580 >,
14581 {
14582 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14583 6679970090861613324,
14584 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
14585 request,
14586 ))
14587 }
14588 }
14589 }
14590}
14591
14592#[diagnostic::on_unimplemented(
14593 note = "If {Self} implements the non-local FileClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
14594)]
14595
14596pub trait FileLocalClientHandler<
14600 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14601 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14602>
14603{
14604 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
14605 fn on_open(
14606 &mut self,
14607
14608 request: ::fidl_next::Request<file::OnOpen, ___T>,
14609 ) -> impl ::core::future::Future<Output = ()>;
14610
14611 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
14612 fn on_representation(
14613 &mut self,
14614
14615 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
14616 ) -> impl ::core::future::Future<Output = ()>;
14617
14618 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14619 ::core::future::ready(())
14620 }
14621}
14622
14623impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for File
14624where
14625 ___H: FileLocalClientHandler<___T>,
14626 ___T: ::fidl_next::Transport,
14627 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
14628 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14629 Constraint = (),
14630 >,
14631 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
14632 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14633 Constraint = (),
14634 >,
14635{
14636 async fn on_event(
14637 handler: &mut ___H,
14638 ordinal: u64,
14639 flexibility: ::fidl_next::protocol::Flexibility,
14640 body: ::fidl_next::Body<___T>,
14641 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14642 match ordinal {
14643 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
14644 Ok(decoded) => {
14645 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
14646 Ok(())
14647 }
14648 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14649 ordinal: 9207534335756671346,
14650 error,
14651 }),
14652 },
14653
14654 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
14655 Ok(decoded) => {
14656 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
14657 Ok(())
14658 }
14659 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14660 ordinal: 6679970090861613324,
14661 error,
14662 }),
14663 },
14664
14665 ordinal => {
14666 handler.on_unknown_interaction(ordinal).await;
14667 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14668 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14669 } else {
14670 Ok(())
14671 }
14672 }
14673 }
14674 }
14675}
14676
14677#[diagnostic::on_unimplemented(
14678 note = "If {Self} implements the non-local FileServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
14679)]
14680
14681pub trait FileLocalServerHandler<
14685 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14686 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14687>
14688{
14689 #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n to acquire the given type of lock.\n"]
14690 fn advisory_lock(
14691 &mut self,
14692
14693 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
14694
14695 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
14696 ) -> impl ::core::future::Future<Output = ()>;
14697
14698 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
14699 fn link_into(
14700 &mut self,
14701
14702 request: ::fidl_next::Request<file::LinkInto, ___T>,
14703
14704 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
14705 ) -> impl ::core::future::Future<Output = ()>;
14706
14707 fn clone(
14708 &mut self,
14709
14710 request: ::fidl_next::Request<file::Clone, ___T>,
14711 ) -> impl ::core::future::Future<Output = ()>;
14712
14713 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
14714 fn close(
14715 &mut self,
14716
14717 responder: ::fidl_next::Responder<file::Close, ___T>,
14718 ) -> impl ::core::future::Future<Output = ()>;
14719
14720 fn query(
14721 &mut self,
14722
14723 responder: ::fidl_next::Responder<file::Query, ___T>,
14724 ) -> impl ::core::future::Future<Output = ()>;
14725
14726 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14727 fn deprecated_clone(
14728 &mut self,
14729
14730 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
14731 ) -> impl ::core::future::Future<Output = ()>;
14732
14733 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14734 fn deprecated_get_attr(
14735 &mut self,
14736
14737 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
14738 ) -> impl ::core::future::Future<Output = ()>;
14739
14740 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14741 fn deprecated_set_attr(
14742 &mut self,
14743
14744 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
14745
14746 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
14747 ) -> impl ::core::future::Future<Output = ()>;
14748
14749 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14750 fn deprecated_get_flags(
14751 &mut self,
14752
14753 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
14754 ) -> impl ::core::future::Future<Output = ()>;
14755
14756 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14757 fn deprecated_set_flags(
14758 &mut self,
14759
14760 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
14761
14762 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
14763 ) -> impl ::core::future::Future<Output = ()>;
14764
14765 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
14766 fn get_flags(
14767 &mut self,
14768
14769 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
14770 ) -> impl ::core::future::Future<Output = ()>;
14771
14772 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
14773 fn set_flags(
14774 &mut self,
14775
14776 request: ::fidl_next::Request<file::SetFlags, ___T>,
14777
14778 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
14779 ) -> impl ::core::future::Future<Output = ()>;
14780
14781 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
14782 fn query_filesystem(
14783 &mut self,
14784
14785 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
14786 ) -> impl ::core::future::Future<Output = ()>;
14787
14788 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14789 fn get_attributes(
14790 &mut self,
14791
14792 request: ::fidl_next::Request<file::GetAttributes, ___T>,
14793
14794 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
14795 ) -> impl ::core::future::Future<Output = ()>;
14796
14797 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14798 fn update_attributes(
14799 &mut self,
14800
14801 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
14802
14803 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
14804 ) -> impl ::core::future::Future<Output = ()>;
14805
14806 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
14807 fn sync(
14808 &mut self,
14809
14810 responder: ::fidl_next::Responder<file::Sync, ___T>,
14811 ) -> impl ::core::future::Future<Output = ()>;
14812
14813 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14814 fn list_extended_attributes(
14815 &mut self,
14816
14817 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
14818 ) -> impl ::core::future::Future<Output = ()>;
14819
14820 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14821 fn get_extended_attribute(
14822 &mut self,
14823
14824 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
14825
14826 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
14827 ) -> impl ::core::future::Future<Output = ()>;
14828
14829 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14830 fn set_extended_attribute(
14831 &mut self,
14832
14833 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
14834
14835 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
14836 ) -> impl ::core::future::Future<Output = ()>;
14837
14838 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14839 fn remove_extended_attribute(
14840 &mut self,
14841
14842 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
14843
14844 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
14845 ) -> impl ::core::future::Future<Output = ()>;
14846
14847 #[doc = " Reads up to \'count\' bytes at the seek offset.\n The seek offset is moved forward by the number of bytes read.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that the seek offset\n has reached the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that the\n seek offset is already at or beyond the end of file, and no data could\n be read.\n * If `count` is zero, the server should perform all the checks ensuring\n read access without actually read anything, and return an empty\n `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
14848 fn read(
14849 &mut self,
14850
14851 request: ::fidl_next::Request<file::Read, ___T>,
14852
14853 responder: ::fidl_next::Responder<file::Read, ___T>,
14854 ) -> impl ::core::future::Future<Output = ()>;
14855
14856 #[doc = " Writes data at the seek offset.\n The seek offset is moved forward by the number of bytes written.\n If the file is in append mode, the seek offset is first set to the end\n of the file, followed by the write, in one atomic step.\n\n The file size may grow if the seek offset plus `data.length` is beyond\n the current end of file.\n\n + request `data` the byte buffer to write to the file.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n space, `actual_count` may be less than `data.length`. If no bytes\n could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n ensuring write access without mutating the file and return a\n successful write of zero bytes. The seek offset is still updated if\n in append mode.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
14857 fn write(
14858 &mut self,
14859
14860 request: ::fidl_next::Request<file::Write, ___T>,
14861
14862 responder: ::fidl_next::Responder<file::Write, ___T>,
14863 ) -> impl ::core::future::Future<Output = ()>;
14864
14865 fn describe(
14866 &mut self,
14867
14868 responder: ::fidl_next::Responder<file::Describe, ___T>,
14869 ) -> impl ::core::future::Future<Output = ()>;
14870
14871 #[doc = " Moves the offset at which the next invocation of [`Read`] or [`Write`]\n will occur. The seek offset is specific to each file connection.\n\n + request `origin` the reference point where `offset` will be based on.\n + request `offset` the number of bytes to seek.\n - response `offset_from_start` the adjusted seek offset, from the start\n of the file.\n\n This method does not require any rights.\n"]
14872 fn seek(
14873 &mut self,
14874
14875 request: ::fidl_next::Request<file::Seek, ___T>,
14876
14877 responder: ::fidl_next::Responder<file::Seek, ___T>,
14878 ) -> impl ::core::future::Future<Output = ()>;
14879
14880 #[doc = " Reads up to \'count\' bytes at the provided offset.\n Does not affect the seek offset.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that `ReadAt` has hit\n the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that `offset`\n is at or past the end of file, and no data can be read.\n * If `count` is zero, the server should perform all the checks ensuring\n read access without actually reading anything, and return an empty\n `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
14881 fn read_at(
14882 &mut self,
14883
14884 request: ::fidl_next::Request<file::ReadAt, ___T>,
14885
14886 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
14887 ) -> impl ::core::future::Future<Output = ()>;
14888
14889 #[doc = " Writes data at the provided offset.\n Does not affect the seek offset.\n\n The file size may grow if `offset` plus `data.length` is past the\n current end of file.\n\n + request `data` the byte buffer to write to the file.\n + request `offset` the offset from start of the file to begin writing.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n space, `actual_count` may be less than `data.length`. If no bytes\n could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n ensuring write access without mutating the file, and will return a\n successful write of zero bytes.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
14890 fn write_at(
14891 &mut self,
14892
14893 request: ::fidl_next::Request<file::WriteAt, ___T>,
14894
14895 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
14896 ) -> impl ::core::future::Future<Output = ()>;
14897
14898 #[doc = " Shrinks or grows the file size to \'length\' bytes.\n\n If file size is reduced by this operation, the extra trailing data\'\n is discarded.\n If file size is increased by this operation, the extended area appears\n as if it was zeroed.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
14899 fn resize(
14900 &mut self,
14901
14902 request: ::fidl_next::Request<file::Resize, ___T>,
14903
14904 responder: ::fidl_next::Responder<file::Resize, ___T>,
14905 ) -> impl ::core::future::Future<Output = ()>;
14906
14907 #[doc = " Acquires a [`zx.Handle:VMO`] representing this file, if there is one,\n with the requested access rights.\n\n Implementations are not required to implement files backed by VMOs so\n this request may fail. Additionally, implementations may only support\n a certain subset of the flags. Clients should be prepared with fallback\n behavior if this request fails.\n\n If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the\n implementation is free to choose the semantics of the returned VMO.\n\n + request `flags` a [`VmoFlags`] indicating the desired mode of access.\n - response `vmo` the requested [`zx.Handle:VMO`].\n * error a [`zx.Status`] value indicating the failure.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].\n * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].\n * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].\n"]
14908 fn get_backing_memory(
14909 &mut self,
14910
14911 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
14912
14913 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
14914 ) -> impl ::core::future::Future<Output = ()>;
14915
14916 #[doc = " Pre-allocate on-disk space for this file.\n"]
14917 fn allocate(
14918 &mut self,
14919
14920 request: ::fidl_next::Request<file::Allocate, ___T>,
14921
14922 responder: ::fidl_next::Responder<file::Allocate, ___T>,
14923 ) -> impl ::core::future::Future<Output = ()>;
14924
14925 #[doc = " Enables verification for the file (permanently) which involves computing a merkle tree for\n the file. Forces a flush prior to building the merkle tree to ensure cached data is\n captured. Future reads will be verified against the computed merkle tree and writes will be\n rejected. This method can take some time to complete as it depends on the size of the file.\n This method can be aborted by closing the connection that this method was issued on.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.\n Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.\n Also returns any error that might arise from reading the file, or from flushing the file,\n such as `ZX_ERR_IO`.\n"]
14926 fn enable_verity(
14927 &mut self,
14928
14929 request: ::fidl_next::Request<file::EnableVerity, ___T>,
14930
14931 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
14932 ) -> impl ::core::future::Future<Output = ()>;
14933
14934 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14935 ::core::future::ready(())
14936 }
14937}
14938
14939impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for File
14940where
14941 ___H: FileLocalServerHandler<___T>,
14942 ___T: ::fidl_next::Transport,
14943 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
14944 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14945 Constraint = (),
14946 >,
14947 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
14948 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14949 Constraint = (),
14950 >,
14951 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
14952 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14953 Constraint = (),
14954 >,
14955 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
14956 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14957 Constraint = (),
14958 >,
14959 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
14960 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14961 Constraint = (),
14962 >,
14963 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
14964 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14965 Constraint = (),
14966 >,
14967 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
14968 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14969 Constraint = (),
14970 >,
14971 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
14972 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14973 Constraint = (),
14974 >,
14975 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
14976 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14977 Constraint = (),
14978 >,
14979 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
14980 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14981 Constraint = (),
14982 >,
14983 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
14984 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14985 Constraint = (),
14986 >,
14987 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
14988 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14989 Constraint = (),
14990 >,
14991 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
14992 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14993 Constraint = (),
14994 >,
14995 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
14996 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14997 Constraint = (),
14998 >,
14999 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
15000 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15001 Constraint = (),
15002 >,
15003 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
15004 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15005 Constraint = (),
15006 >,
15007 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
15008 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15009 Constraint = (),
15010 >,
15011 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
15012 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15013 Constraint = (),
15014 >,
15015 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
15016 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15017 Constraint = (),
15018 >,
15019 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
15020 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15021 Constraint = (),
15022 >,
15023 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
15024 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15025 Constraint = (),
15026 >,
15027 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
15028 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15029 Constraint = (),
15030 >,
15031{
15032 async fn on_one_way(
15033 handler: &mut ___H,
15034 ordinal: u64,
15035 flexibility: ::fidl_next::protocol::Flexibility,
15036 body: ::fidl_next::Body<___T>,
15037 ) -> ::core::result::Result<
15038 (),
15039 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15040 > {
15041 match ordinal {
15042 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15043 Ok(decoded) => {
15044 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
15045 Ok(())
15046 }
15047 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15048 ordinal: 2366825959783828089,
15049 error,
15050 }),
15051 },
15052
15053 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15054 Ok(decoded) => {
15055 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
15056 Ok(())
15057 }
15058 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15059 ordinal: 6512600400724287855,
15060 error,
15061 }),
15062 },
15063
15064 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15065 Ok(decoded) => {
15066 handler
15067 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
15068 .await;
15069 Ok(())
15070 }
15071 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15072 ordinal: 5431626189872037072,
15073 error,
15074 }),
15075 },
15076
15077 ordinal => {
15078 handler.on_unknown_interaction(ordinal).await;
15079 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15080 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15081 } else {
15082 Ok(())
15083 }
15084 }
15085 }
15086 }
15087
15088 async fn on_two_way(
15089 handler: &mut ___H,
15090 ordinal: u64,
15091 flexibility: ::fidl_next::protocol::Flexibility,
15092 body: ::fidl_next::Body<___T>,
15093 responder: ::fidl_next::protocol::Responder<___T>,
15094 ) -> ::core::result::Result<
15095 (),
15096 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15097 > {
15098 match ordinal {
15099 7992130864415541162 => {
15100 let responder = ::fidl_next::Responder::from_untyped(responder);
15101
15102 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15103 Ok(decoded) => {
15104 handler
15105 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
15106 .await;
15107 Ok(())
15108 }
15109 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15110 ordinal: 7992130864415541162,
15111 error,
15112 }),
15113 }
15114 }
15115
15116 6121399674497678964 => {
15117 let responder = ::fidl_next::Responder::from_untyped(responder);
15118
15119 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15120 Ok(decoded) => {
15121 handler
15122 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
15123 .await;
15124 Ok(())
15125 }
15126 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15127 ordinal: 6121399674497678964,
15128 error,
15129 }),
15130 }
15131 }
15132
15133 6540867515453498750 => {
15134 let responder = ::fidl_next::Responder::from_untyped(responder);
15135
15136 handler.close(responder).await;
15137 Ok(())
15138 }
15139
15140 2763219980499352582 => {
15141 let responder = ::fidl_next::Responder::from_untyped(responder);
15142
15143 handler.query(responder).await;
15144 Ok(())
15145 }
15146
15147 8689798978500614909 => {
15148 let responder = ::fidl_next::Responder::from_untyped(responder);
15149
15150 handler.deprecated_get_attr(responder).await;
15151 Ok(())
15152 }
15153
15154 4721673413776871238 => {
15155 let responder = ::fidl_next::Responder::from_untyped(responder);
15156
15157 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15158 Ok(decoded) => {
15159 handler
15160 .deprecated_set_attr(
15161 ::fidl_next::Request::from_decoded(decoded),
15162 responder,
15163 )
15164 .await;
15165 Ok(())
15166 }
15167 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15168 ordinal: 4721673413776871238,
15169 error,
15170 }),
15171 }
15172 }
15173
15174 6595803110182632097 => {
15175 let responder = ::fidl_next::Responder::from_untyped(responder);
15176
15177 handler.deprecated_get_flags(responder).await;
15178 Ok(())
15179 }
15180
15181 5950864159036794675 => {
15182 let responder = ::fidl_next::Responder::from_untyped(responder);
15183
15184 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15185 Ok(decoded) => {
15186 handler
15187 .deprecated_set_flags(
15188 ::fidl_next::Request::from_decoded(decoded),
15189 responder,
15190 )
15191 .await;
15192 Ok(())
15193 }
15194 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15195 ordinal: 5950864159036794675,
15196 error,
15197 }),
15198 }
15199 }
15200
15201 105530239381466147 => {
15202 let responder = ::fidl_next::Responder::from_untyped(responder);
15203
15204 handler.get_flags(responder).await;
15205 Ok(())
15206 }
15207
15208 6172186066099445416 => {
15209 let responder = ::fidl_next::Responder::from_untyped(responder);
15210
15211 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15212 Ok(decoded) => {
15213 handler
15214 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
15215 .await;
15216 Ok(())
15217 }
15218 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15219 ordinal: 6172186066099445416,
15220 error,
15221 }),
15222 }
15223 }
15224
15225 8013111122914313744 => {
15226 let responder = ::fidl_next::Responder::from_untyped(responder);
15227
15228 handler.query_filesystem(responder).await;
15229 Ok(())
15230 }
15231
15232 4414537700416816443 => {
15233 let responder = ::fidl_next::Responder::from_untyped(responder);
15234
15235 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15236 Ok(decoded) => {
15237 handler
15238 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
15239 .await;
15240 Ok(())
15241 }
15242 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15243 ordinal: 4414537700416816443,
15244 error,
15245 }),
15246 }
15247 }
15248
15249 3677402239314018056 => {
15250 let responder = ::fidl_next::Responder::from_untyped(responder);
15251
15252 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15253 Ok(decoded) => {
15254 handler
15255 .update_attributes(
15256 ::fidl_next::Request::from_decoded(decoded),
15257 responder,
15258 )
15259 .await;
15260 Ok(())
15261 }
15262 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15263 ordinal: 3677402239314018056,
15264 error,
15265 }),
15266 }
15267 }
15268
15269 3196473584242777161 => {
15270 let responder = ::fidl_next::Responder::from_untyped(responder);
15271
15272 handler.sync(responder).await;
15273 Ok(())
15274 }
15275
15276 5043930208506967771 => {
15277 let responder = ::fidl_next::Responder::from_untyped(responder);
15278
15279 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15280 Ok(decoded) => {
15281 handler
15282 .get_extended_attribute(
15283 ::fidl_next::Request::from_decoded(decoded),
15284 responder,
15285 )
15286 .await;
15287 Ok(())
15288 }
15289 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15290 ordinal: 5043930208506967771,
15291 error,
15292 }),
15293 }
15294 }
15295
15296 5374223046099989052 => {
15297 let responder = ::fidl_next::Responder::from_untyped(responder);
15298
15299 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15300 Ok(decoded) => {
15301 handler
15302 .set_extended_attribute(
15303 ::fidl_next::Request::from_decoded(decoded),
15304 responder,
15305 )
15306 .await;
15307 Ok(())
15308 }
15309 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15310 ordinal: 5374223046099989052,
15311 error,
15312 }),
15313 }
15314 }
15315
15316 8794297771444732717 => {
15317 let responder = ::fidl_next::Responder::from_untyped(responder);
15318
15319 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15320 Ok(decoded) => {
15321 handler
15322 .remove_extended_attribute(
15323 ::fidl_next::Request::from_decoded(decoded),
15324 responder,
15325 )
15326 .await;
15327 Ok(())
15328 }
15329 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15330 ordinal: 8794297771444732717,
15331 error,
15332 }),
15333 }
15334 }
15335
15336 395825947633028830 => {
15337 let responder = ::fidl_next::Responder::from_untyped(responder);
15338
15339 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15340 Ok(decoded) => {
15341 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
15342 Ok(())
15343 }
15344 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15345 ordinal: 395825947633028830,
15346 error,
15347 }),
15348 }
15349 }
15350
15351 7651971425397809026 => {
15352 let responder = ::fidl_next::Responder::from_untyped(responder);
15353
15354 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15355 Ok(decoded) => {
15356 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
15357 Ok(())
15358 }
15359 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15360 ordinal: 7651971425397809026,
15361 error,
15362 }),
15363 }
15364 }
15365
15366 7545125870053689020 => {
15367 let responder = ::fidl_next::Responder::from_untyped(responder);
15368
15369 handler.describe(responder).await;
15370 Ok(())
15371 }
15372
15373 8649041485622956551 => {
15374 let responder = ::fidl_next::Responder::from_untyped(responder);
15375
15376 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15377 Ok(decoded) => {
15378 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
15379 Ok(())
15380 }
15381 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15382 ordinal: 8649041485622956551,
15383 error,
15384 }),
15385 }
15386 }
15387
15388 1587416148701180478 => {
15389 let responder = ::fidl_next::Responder::from_untyped(responder);
15390
15391 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15392 Ok(decoded) => {
15393 handler
15394 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
15395 .await;
15396 Ok(())
15397 }
15398 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15399 ordinal: 1587416148701180478,
15400 error,
15401 }),
15402 }
15403 }
15404
15405 8736683935131400491 => {
15406 let responder = ::fidl_next::Responder::from_untyped(responder);
15407
15408 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15409 Ok(decoded) => {
15410 handler
15411 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
15412 .await;
15413 Ok(())
15414 }
15415 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15416 ordinal: 8736683935131400491,
15417 error,
15418 }),
15419 }
15420 }
15421
15422 3134648685270758458 => {
15423 let responder = ::fidl_next::Responder::from_untyped(responder);
15424
15425 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15426 Ok(decoded) => {
15427 handler
15428 .resize(::fidl_next::Request::from_decoded(decoded), responder)
15429 .await;
15430 Ok(())
15431 }
15432 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15433 ordinal: 3134648685270758458,
15434 error,
15435 }),
15436 }
15437 }
15438
15439 46911652864194091 => {
15440 let responder = ::fidl_next::Responder::from_untyped(responder);
15441
15442 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15443 Ok(decoded) => {
15444 handler
15445 .get_backing_memory(
15446 ::fidl_next::Request::from_decoded(decoded),
15447 responder,
15448 )
15449 .await;
15450 Ok(())
15451 }
15452 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15453 ordinal: 46911652864194091,
15454 error,
15455 }),
15456 }
15457 }
15458
15459 8645235848064269614 => {
15460 let responder = ::fidl_next::Responder::from_untyped(responder);
15461
15462 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15463 Ok(decoded) => {
15464 handler
15465 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
15466 .await;
15467 Ok(())
15468 }
15469 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15470 ordinal: 8645235848064269614,
15471 error,
15472 }),
15473 }
15474 }
15475
15476 3189145313204943035 => {
15477 let responder = ::fidl_next::Responder::from_untyped(responder);
15478
15479 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15480 Ok(decoded) => {
15481 handler
15482 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
15483 .await;
15484 Ok(())
15485 }
15486 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15487 ordinal: 3189145313204943035,
15488 error,
15489 }),
15490 }
15491 }
15492
15493 ordinal => {
15494 handler.on_unknown_interaction(ordinal).await;
15495 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15496 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15497 } else {
15498 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
15499 ordinal,
15500 flexibility,
15501 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
15502 )
15503 .expect("encoding a framework error should never fail")
15504 .await?;
15505 Ok(())
15506 }
15507 }
15508 }
15509 }
15510}
15511
15512pub trait FileClientHandler<
15516 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15517 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15518>
15519{
15520 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
15521 fn on_open(
15522 &mut self,
15523
15524 request: ::fidl_next::Request<file::OnOpen, ___T>,
15525 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15526
15527 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
15528 fn on_representation(
15529 &mut self,
15530
15531 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
15532 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15533
15534 fn on_unknown_interaction(
15535 &mut self,
15536 ordinal: u64,
15537 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15538 ::core::future::ready(())
15539 }
15540}
15541
15542impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for File
15543where
15544 ___H: FileClientHandler<___T> + ::core::marker::Send,
15545 ___T: ::fidl_next::Transport,
15546 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
15547 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15548 Constraint = (),
15549 >,
15550 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
15551 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15552 Constraint = (),
15553 >,
15554{
15555 async fn on_event(
15556 handler: &mut ___H,
15557 ordinal: u64,
15558 flexibility: ::fidl_next::protocol::Flexibility,
15559 body: ::fidl_next::Body<___T>,
15560 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15561 match ordinal {
15562 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15563 Ok(decoded) => {
15564 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
15565 Ok(())
15566 }
15567 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15568 ordinal: 9207534335756671346,
15569 error,
15570 }),
15571 },
15572
15573 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15574 Ok(decoded) => {
15575 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
15576 Ok(())
15577 }
15578 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15579 ordinal: 6679970090861613324,
15580 error,
15581 }),
15582 },
15583
15584 ordinal => {
15585 handler.on_unknown_interaction(ordinal).await;
15586 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15587 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15588 } else {
15589 Ok(())
15590 }
15591 }
15592 }
15593 }
15594}
15595
15596pub trait FileServerHandler<
15600 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15601 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15602>
15603{
15604 #[doc = " Acquires an advisory lock on the underlying file.\n\n The lock lasts until either this connection is closed or\n this method is called with |AdvisoryLockType.UNLOCK| to release the lock\n explicitly.\n\n Advisory locks are purely advisory. They do not prevent actual read or\n write operations from occurring on the file, either through this\n connection or through other connections.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].\n * [`Rights.WRITE_BYTES`] if `request.type` is\n [`AdvisoryLockType.WRITE`].\n\n # Errors\n\n * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For\n example, another connection might hold a conflicting lock type.\n * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.\n * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights\n to acquire the given type of lock.\n"]
15605 fn advisory_lock(
15606 &mut self,
15607
15608 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
15609
15610 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
15611 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15612
15613 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
15614 fn link_into(
15615 &mut self,
15616
15617 request: ::fidl_next::Request<file::LinkInto, ___T>,
15618
15619 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
15620 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15621
15622 fn clone(
15623 &mut self,
15624
15625 request: ::fidl_next::Request<file::Clone, ___T>,
15626 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15627
15628 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
15629 fn close(
15630 &mut self,
15631
15632 responder: ::fidl_next::Responder<file::Close, ___T>,
15633 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15634
15635 fn query(
15636 &mut self,
15637
15638 responder: ::fidl_next::Responder<file::Query, ___T>,
15639 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15640
15641 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
15642 fn deprecated_clone(
15643 &mut self,
15644
15645 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
15646 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15647
15648 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
15649 fn deprecated_get_attr(
15650 &mut self,
15651
15652 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
15653 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15654
15655 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
15656 fn deprecated_set_attr(
15657 &mut self,
15658
15659 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
15660
15661 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
15662 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15663
15664 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
15665 fn deprecated_get_flags(
15666 &mut self,
15667
15668 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
15669 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15670
15671 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
15672 fn deprecated_set_flags(
15673 &mut self,
15674
15675 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
15676
15677 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
15678 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15679
15680 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
15681 fn get_flags(
15682 &mut self,
15683
15684 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
15685 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15686
15687 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
15688 fn set_flags(
15689 &mut self,
15690
15691 request: ::fidl_next::Request<file::SetFlags, ___T>,
15692
15693 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
15694 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15695
15696 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
15697 fn query_filesystem(
15698 &mut self,
15699
15700 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
15701 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15702
15703 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15704 fn get_attributes(
15705 &mut self,
15706
15707 request: ::fidl_next::Request<file::GetAttributes, ___T>,
15708
15709 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
15710 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15711
15712 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
15713 fn update_attributes(
15714 &mut self,
15715
15716 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
15717
15718 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
15719 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15720
15721 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
15722 fn sync(
15723 &mut self,
15724
15725 responder: ::fidl_next::Responder<file::Sync, ___T>,
15726 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15727
15728 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15729 fn list_extended_attributes(
15730 &mut self,
15731
15732 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
15733 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15734
15735 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15736 fn get_extended_attribute(
15737 &mut self,
15738
15739 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
15740
15741 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
15742 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15743
15744 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
15745 fn set_extended_attribute(
15746 &mut self,
15747
15748 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
15749
15750 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
15751 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15752
15753 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
15754 fn remove_extended_attribute(
15755 &mut self,
15756
15757 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
15758
15759 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
15760 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15761
15762 #[doc = " Reads up to \'count\' bytes at the seek offset.\n The seek offset is moved forward by the number of bytes read.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that the seek offset\n has reached the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that the\n seek offset is already at or beyond the end of file, and no data could\n be read.\n * If `count` is zero, the server should perform all the checks ensuring\n read access without actually read anything, and return an empty\n `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
15763 fn read(
15764 &mut self,
15765
15766 request: ::fidl_next::Request<file::Read, ___T>,
15767
15768 responder: ::fidl_next::Responder<file::Read, ___T>,
15769 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15770
15771 #[doc = " Writes data at the seek offset.\n The seek offset is moved forward by the number of bytes written.\n If the file is in append mode, the seek offset is first set to the end\n of the file, followed by the write, in one atomic step.\n\n The file size may grow if the seek offset plus `data.length` is beyond\n the current end of file.\n\n + request `data` the byte buffer to write to the file.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n space, `actual_count` may be less than `data.length`. If no bytes\n could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n ensuring write access without mutating the file and return a\n successful write of zero bytes. The seek offset is still updated if\n in append mode.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
15772 fn write(
15773 &mut self,
15774
15775 request: ::fidl_next::Request<file::Write, ___T>,
15776
15777 responder: ::fidl_next::Responder<file::Write, ___T>,
15778 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15779
15780 fn describe(
15781 &mut self,
15782
15783 responder: ::fidl_next::Responder<file::Describe, ___T>,
15784 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15785
15786 #[doc = " Moves the offset at which the next invocation of [`Read`] or [`Write`]\n will occur. The seek offset is specific to each file connection.\n\n + request `origin` the reference point where `offset` will be based on.\n + request `offset` the number of bytes to seek.\n - response `offset_from_start` the adjusted seek offset, from the start\n of the file.\n\n This method does not require any rights.\n"]
15787 fn seek(
15788 &mut self,
15789
15790 request: ::fidl_next::Request<file::Seek, ___T>,
15791
15792 responder: ::fidl_next::Responder<file::Seek, ___T>,
15793 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15794
15795 #[doc = " Reads up to \'count\' bytes at the provided offset.\n Does not affect the seek offset.\n\n ## Invariants\n\n * The returned `data.length` will never be greater than `count`.\n * If `data.length` is less than `count`, it means that `ReadAt` has hit\n the end of file as part of this operation.\n * If `data.length` is zero while `count` is not, it means that `offset`\n is at or past the end of file, and no data can be read.\n * If `count` is zero, the server should perform all the checks ensuring\n read access without actually reading anything, and return an empty\n `data` vector.\n\n This method requires the [`Rights.READ_BYTES`] right.\n\n Returns `ZX_ERR_OUT_OF_RANGE` if `count` is greater than `MAX_TRANSFER_SIZE`.\n"]
15796 fn read_at(
15797 &mut self,
15798
15799 request: ::fidl_next::Request<file::ReadAt, ___T>,
15800
15801 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
15802 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15803
15804 #[doc = " Writes data at the provided offset.\n Does not affect the seek offset.\n\n The file size may grow if `offset` plus `data.length` is past the\n current end of file.\n\n + request `data` the byte buffer to write to the file.\n + request `offset` the offset from start of the file to begin writing.\n - response `actual_count` the number of bytes written.\n\n ## Invariants\n\n * The returned `actual_count` will never be greater than `data.length`.\n * If the server is unable to write all the data due to e.g. not enough\n space, `actual_count` may be less than `data.length`. If no bytes\n could be written, an error is returned.\n * If `data.length` is zero, the server should perform all the checks\n ensuring write access without mutating the file, and will return a\n successful write of zero bytes.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
15805 fn write_at(
15806 &mut self,
15807
15808 request: ::fidl_next::Request<file::WriteAt, ___T>,
15809
15810 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
15811 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15812
15813 #[doc = " Shrinks or grows the file size to \'length\' bytes.\n\n If file size is reduced by this operation, the extra trailing data\'\n is discarded.\n If file size is increased by this operation, the extended area appears\n as if it was zeroed.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
15814 fn resize(
15815 &mut self,
15816
15817 request: ::fidl_next::Request<file::Resize, ___T>,
15818
15819 responder: ::fidl_next::Responder<file::Resize, ___T>,
15820 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15821
15822 #[doc = " Acquires a [`zx.Handle:VMO`] representing this file, if there is one,\n with the requested access rights.\n\n Implementations are not required to implement files backed by VMOs so\n this request may fail. Additionally, implementations may only support\n a certain subset of the flags. Clients should be prepared with fallback\n behavior if this request fails.\n\n If a client specifies neither `PRIVATE_CLONE` nor `SHARED_BUFFER`, the\n implementation is free to choose the semantics of the returned VMO.\n\n + request `flags` a [`VmoFlags`] indicating the desired mode of access.\n - response `vmo` the requested [`zx.Handle:VMO`].\n * error a [`zx.Status`] value indicating the failure.\n\n This method requires the following rights:\n\n * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].\n * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].\n * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].\n"]
15823 fn get_backing_memory(
15824 &mut self,
15825
15826 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
15827
15828 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
15829 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15830
15831 #[doc = " Pre-allocate on-disk space for this file.\n"]
15832 fn allocate(
15833 &mut self,
15834
15835 request: ::fidl_next::Request<file::Allocate, ___T>,
15836
15837 responder: ::fidl_next::Responder<file::Allocate, ___T>,
15838 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15839
15840 #[doc = " Enables verification for the file (permanently) which involves computing a merkle tree for\n the file. Forces a flush prior to building the merkle tree to ensure cached data is\n captured. Future reads will be verified against the computed merkle tree and writes will be\n rejected. This method can take some time to complete as it depends on the size of the file.\n This method can be aborted by closing the connection that this method was issued on.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.\n Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.\n Also returns any error that might arise from reading the file, or from flushing the file,\n such as `ZX_ERR_IO`.\n"]
15841 fn enable_verity(
15842 &mut self,
15843
15844 request: ::fidl_next::Request<file::EnableVerity, ___T>,
15845
15846 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
15847 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15848
15849 fn on_unknown_interaction(
15850 &mut self,
15851 ordinal: u64,
15852 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15853 ::core::future::ready(())
15854 }
15855}
15856
15857impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for File
15858where
15859 ___H: FileServerHandler<___T> + ::core::marker::Send,
15860 ___T: ::fidl_next::Transport,
15861 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
15862 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15863 Constraint = (),
15864 >,
15865 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
15866 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15867 Constraint = (),
15868 >,
15869 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
15870 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15871 Constraint = (),
15872 >,
15873 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
15874 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15875 Constraint = (),
15876 >,
15877 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
15878 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15879 Constraint = (),
15880 >,
15881 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
15882 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15883 Constraint = (),
15884 >,
15885 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
15886 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15887 Constraint = (),
15888 >,
15889 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
15890 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15891 Constraint = (),
15892 >,
15893 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
15894 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15895 Constraint = (),
15896 >,
15897 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
15898 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15899 Constraint = (),
15900 >,
15901 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15902 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15903 Constraint = (),
15904 >,
15905 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15906 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15907 Constraint = (),
15908 >,
15909 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15910 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15911 Constraint = (),
15912 >,
15913 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
15914 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15915 Constraint = (),
15916 >,
15917 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
15918 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15919 Constraint = (),
15920 >,
15921 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
15922 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15923 Constraint = (),
15924 >,
15925 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
15926 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15927 Constraint = (),
15928 >,
15929 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
15930 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15931 Constraint = (),
15932 >,
15933 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
15934 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15935 Constraint = (),
15936 >,
15937 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
15938 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15939 Constraint = (),
15940 >,
15941 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
15942 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15943 Constraint = (),
15944 >,
15945 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
15946 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15947 Constraint = (),
15948 >,
15949{
15950 async fn on_one_way(
15951 handler: &mut ___H,
15952 ordinal: u64,
15953 flexibility: ::fidl_next::protocol::Flexibility,
15954 body: ::fidl_next::Body<___T>,
15955 ) -> ::core::result::Result<
15956 (),
15957 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15958 > {
15959 match ordinal {
15960 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15961 Ok(decoded) => {
15962 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
15963 Ok(())
15964 }
15965 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15966 ordinal: 2366825959783828089,
15967 error,
15968 }),
15969 },
15970
15971 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15972 Ok(decoded) => {
15973 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
15974 Ok(())
15975 }
15976 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15977 ordinal: 6512600400724287855,
15978 error,
15979 }),
15980 },
15981
15982 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15983 Ok(decoded) => {
15984 handler
15985 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
15986 .await;
15987 Ok(())
15988 }
15989 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15990 ordinal: 5431626189872037072,
15991 error,
15992 }),
15993 },
15994
15995 ordinal => {
15996 handler.on_unknown_interaction(ordinal).await;
15997 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15998 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15999 } else {
16000 Ok(())
16001 }
16002 }
16003 }
16004 }
16005
16006 async fn on_two_way(
16007 handler: &mut ___H,
16008 ordinal: u64,
16009 flexibility: ::fidl_next::protocol::Flexibility,
16010 body: ::fidl_next::Body<___T>,
16011 responder: ::fidl_next::protocol::Responder<___T>,
16012 ) -> ::core::result::Result<
16013 (),
16014 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16015 > {
16016 match ordinal {
16017 7992130864415541162 => {
16018 let responder = ::fidl_next::Responder::from_untyped(responder);
16019
16020 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16021 Ok(decoded) => {
16022 handler
16023 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
16024 .await;
16025 Ok(())
16026 }
16027 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16028 ordinal: 7992130864415541162,
16029 error,
16030 }),
16031 }
16032 }
16033
16034 6121399674497678964 => {
16035 let responder = ::fidl_next::Responder::from_untyped(responder);
16036
16037 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16038 Ok(decoded) => {
16039 handler
16040 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
16041 .await;
16042 Ok(())
16043 }
16044 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16045 ordinal: 6121399674497678964,
16046 error,
16047 }),
16048 }
16049 }
16050
16051 6540867515453498750 => {
16052 let responder = ::fidl_next::Responder::from_untyped(responder);
16053
16054 handler.close(responder).await;
16055 Ok(())
16056 }
16057
16058 2763219980499352582 => {
16059 let responder = ::fidl_next::Responder::from_untyped(responder);
16060
16061 handler.query(responder).await;
16062 Ok(())
16063 }
16064
16065 8689798978500614909 => {
16066 let responder = ::fidl_next::Responder::from_untyped(responder);
16067
16068 handler.deprecated_get_attr(responder).await;
16069 Ok(())
16070 }
16071
16072 4721673413776871238 => {
16073 let responder = ::fidl_next::Responder::from_untyped(responder);
16074
16075 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16076 Ok(decoded) => {
16077 handler
16078 .deprecated_set_attr(
16079 ::fidl_next::Request::from_decoded(decoded),
16080 responder,
16081 )
16082 .await;
16083 Ok(())
16084 }
16085 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16086 ordinal: 4721673413776871238,
16087 error,
16088 }),
16089 }
16090 }
16091
16092 6595803110182632097 => {
16093 let responder = ::fidl_next::Responder::from_untyped(responder);
16094
16095 handler.deprecated_get_flags(responder).await;
16096 Ok(())
16097 }
16098
16099 5950864159036794675 => {
16100 let responder = ::fidl_next::Responder::from_untyped(responder);
16101
16102 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16103 Ok(decoded) => {
16104 handler
16105 .deprecated_set_flags(
16106 ::fidl_next::Request::from_decoded(decoded),
16107 responder,
16108 )
16109 .await;
16110 Ok(())
16111 }
16112 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16113 ordinal: 5950864159036794675,
16114 error,
16115 }),
16116 }
16117 }
16118
16119 105530239381466147 => {
16120 let responder = ::fidl_next::Responder::from_untyped(responder);
16121
16122 handler.get_flags(responder).await;
16123 Ok(())
16124 }
16125
16126 6172186066099445416 => {
16127 let responder = ::fidl_next::Responder::from_untyped(responder);
16128
16129 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16130 Ok(decoded) => {
16131 handler
16132 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
16133 .await;
16134 Ok(())
16135 }
16136 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16137 ordinal: 6172186066099445416,
16138 error,
16139 }),
16140 }
16141 }
16142
16143 8013111122914313744 => {
16144 let responder = ::fidl_next::Responder::from_untyped(responder);
16145
16146 handler.query_filesystem(responder).await;
16147 Ok(())
16148 }
16149
16150 4414537700416816443 => {
16151 let responder = ::fidl_next::Responder::from_untyped(responder);
16152
16153 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16154 Ok(decoded) => {
16155 handler
16156 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
16157 .await;
16158 Ok(())
16159 }
16160 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16161 ordinal: 4414537700416816443,
16162 error,
16163 }),
16164 }
16165 }
16166
16167 3677402239314018056 => {
16168 let responder = ::fidl_next::Responder::from_untyped(responder);
16169
16170 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16171 Ok(decoded) => {
16172 handler
16173 .update_attributes(
16174 ::fidl_next::Request::from_decoded(decoded),
16175 responder,
16176 )
16177 .await;
16178 Ok(())
16179 }
16180 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16181 ordinal: 3677402239314018056,
16182 error,
16183 }),
16184 }
16185 }
16186
16187 3196473584242777161 => {
16188 let responder = ::fidl_next::Responder::from_untyped(responder);
16189
16190 handler.sync(responder).await;
16191 Ok(())
16192 }
16193
16194 5043930208506967771 => {
16195 let responder = ::fidl_next::Responder::from_untyped(responder);
16196
16197 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16198 Ok(decoded) => {
16199 handler
16200 .get_extended_attribute(
16201 ::fidl_next::Request::from_decoded(decoded),
16202 responder,
16203 )
16204 .await;
16205 Ok(())
16206 }
16207 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16208 ordinal: 5043930208506967771,
16209 error,
16210 }),
16211 }
16212 }
16213
16214 5374223046099989052 => {
16215 let responder = ::fidl_next::Responder::from_untyped(responder);
16216
16217 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16218 Ok(decoded) => {
16219 handler
16220 .set_extended_attribute(
16221 ::fidl_next::Request::from_decoded(decoded),
16222 responder,
16223 )
16224 .await;
16225 Ok(())
16226 }
16227 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16228 ordinal: 5374223046099989052,
16229 error,
16230 }),
16231 }
16232 }
16233
16234 8794297771444732717 => {
16235 let responder = ::fidl_next::Responder::from_untyped(responder);
16236
16237 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16238 Ok(decoded) => {
16239 handler
16240 .remove_extended_attribute(
16241 ::fidl_next::Request::from_decoded(decoded),
16242 responder,
16243 )
16244 .await;
16245 Ok(())
16246 }
16247 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16248 ordinal: 8794297771444732717,
16249 error,
16250 }),
16251 }
16252 }
16253
16254 395825947633028830 => {
16255 let responder = ::fidl_next::Responder::from_untyped(responder);
16256
16257 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16258 Ok(decoded) => {
16259 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
16260 Ok(())
16261 }
16262 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16263 ordinal: 395825947633028830,
16264 error,
16265 }),
16266 }
16267 }
16268
16269 7651971425397809026 => {
16270 let responder = ::fidl_next::Responder::from_untyped(responder);
16271
16272 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16273 Ok(decoded) => {
16274 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
16275 Ok(())
16276 }
16277 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16278 ordinal: 7651971425397809026,
16279 error,
16280 }),
16281 }
16282 }
16283
16284 7545125870053689020 => {
16285 let responder = ::fidl_next::Responder::from_untyped(responder);
16286
16287 handler.describe(responder).await;
16288 Ok(())
16289 }
16290
16291 8649041485622956551 => {
16292 let responder = ::fidl_next::Responder::from_untyped(responder);
16293
16294 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16295 Ok(decoded) => {
16296 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
16297 Ok(())
16298 }
16299 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16300 ordinal: 8649041485622956551,
16301 error,
16302 }),
16303 }
16304 }
16305
16306 1587416148701180478 => {
16307 let responder = ::fidl_next::Responder::from_untyped(responder);
16308
16309 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16310 Ok(decoded) => {
16311 handler
16312 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
16313 .await;
16314 Ok(())
16315 }
16316 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16317 ordinal: 1587416148701180478,
16318 error,
16319 }),
16320 }
16321 }
16322
16323 8736683935131400491 => {
16324 let responder = ::fidl_next::Responder::from_untyped(responder);
16325
16326 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16327 Ok(decoded) => {
16328 handler
16329 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
16330 .await;
16331 Ok(())
16332 }
16333 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16334 ordinal: 8736683935131400491,
16335 error,
16336 }),
16337 }
16338 }
16339
16340 3134648685270758458 => {
16341 let responder = ::fidl_next::Responder::from_untyped(responder);
16342
16343 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16344 Ok(decoded) => {
16345 handler
16346 .resize(::fidl_next::Request::from_decoded(decoded), responder)
16347 .await;
16348 Ok(())
16349 }
16350 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16351 ordinal: 3134648685270758458,
16352 error,
16353 }),
16354 }
16355 }
16356
16357 46911652864194091 => {
16358 let responder = ::fidl_next::Responder::from_untyped(responder);
16359
16360 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16361 Ok(decoded) => {
16362 handler
16363 .get_backing_memory(
16364 ::fidl_next::Request::from_decoded(decoded),
16365 responder,
16366 )
16367 .await;
16368 Ok(())
16369 }
16370 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16371 ordinal: 46911652864194091,
16372 error,
16373 }),
16374 }
16375 }
16376
16377 8645235848064269614 => {
16378 let responder = ::fidl_next::Responder::from_untyped(responder);
16379
16380 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16381 Ok(decoded) => {
16382 handler
16383 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
16384 .await;
16385 Ok(())
16386 }
16387 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16388 ordinal: 8645235848064269614,
16389 error,
16390 }),
16391 }
16392 }
16393
16394 3189145313204943035 => {
16395 let responder = ::fidl_next::Responder::from_untyped(responder);
16396
16397 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16398 Ok(decoded) => {
16399 handler
16400 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
16401 .await;
16402 Ok(())
16403 }
16404 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16405 ordinal: 3189145313204943035,
16406 error,
16407 }),
16408 }
16409 }
16410
16411 ordinal => {
16412 handler.on_unknown_interaction(ordinal).await;
16413 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16414 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16415 } else {
16416 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
16417 ordinal,
16418 flexibility,
16419 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
16420 )
16421 .expect("encoding a framework error should never fail")
16422 .await?;
16423 Ok(())
16424 }
16425 }
16426 }
16427 }
16428}
16429
16430impl<___T> FileClientHandler<___T> for ::fidl_next::IgnoreEvents
16431where
16432 ___T: ::fidl_next::Transport,
16433{
16434 async fn on_open(&mut self, _: ::fidl_next::Request<file::OnOpen, ___T>) {}
16435
16436 async fn on_representation(&mut self, _: ::fidl_next::Request<file::OnRepresentation, ___T>) {}
16437
16438 async fn on_unknown_interaction(&mut self, _: u64) {}
16439}
16440
16441impl<___H, ___T> FileLocalClientHandler<___T> for ::fidl_next::Local<___H>
16442where
16443 ___H: FileClientHandler<___T>,
16444 ___T: ::fidl_next::Transport,
16445{
16446 async fn on_open(&mut self, request: ::fidl_next::Request<file::OnOpen, ___T>) {
16447 ___H::on_open(&mut self.0, request).await
16448 }
16449
16450 async fn on_representation(
16451 &mut self,
16452
16453 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
16454 ) {
16455 ___H::on_representation(&mut self.0, request).await
16456 }
16457
16458 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16459 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16460 }
16461}
16462
16463impl<___H, ___T> FileLocalServerHandler<___T> for ::fidl_next::Local<___H>
16464where
16465 ___H: FileServerHandler<___T>,
16466 ___T: ::fidl_next::Transport,
16467{
16468 async fn advisory_lock(
16469 &mut self,
16470
16471 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
16472
16473 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
16474 ) {
16475 ___H::advisory_lock(&mut self.0, request, responder).await
16476 }
16477
16478 async fn link_into(
16479 &mut self,
16480
16481 request: ::fidl_next::Request<file::LinkInto, ___T>,
16482
16483 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
16484 ) {
16485 ___H::link_into(&mut self.0, request, responder).await
16486 }
16487
16488 async fn clone(&mut self, request: ::fidl_next::Request<file::Clone, ___T>) {
16489 ___H::clone(&mut self.0, request).await
16490 }
16491
16492 async fn close(&mut self, responder: ::fidl_next::Responder<file::Close, ___T>) {
16493 ___H::close(&mut self.0, responder).await
16494 }
16495
16496 async fn query(&mut self, responder: ::fidl_next::Responder<file::Query, ___T>) {
16497 ___H::query(&mut self.0, responder).await
16498 }
16499
16500 async fn deprecated_clone(
16501 &mut self,
16502
16503 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
16504 ) {
16505 ___H::deprecated_clone(&mut self.0, request).await
16506 }
16507
16508 async fn deprecated_get_attr(
16509 &mut self,
16510
16511 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
16512 ) {
16513 ___H::deprecated_get_attr(&mut self.0, responder).await
16514 }
16515
16516 async fn deprecated_set_attr(
16517 &mut self,
16518
16519 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
16520
16521 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
16522 ) {
16523 ___H::deprecated_set_attr(&mut self.0, request, responder).await
16524 }
16525
16526 async fn deprecated_get_flags(
16527 &mut self,
16528
16529 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
16530 ) {
16531 ___H::deprecated_get_flags(&mut self.0, responder).await
16532 }
16533
16534 async fn deprecated_set_flags(
16535 &mut self,
16536
16537 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
16538
16539 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
16540 ) {
16541 ___H::deprecated_set_flags(&mut self.0, request, responder).await
16542 }
16543
16544 async fn get_flags(&mut self, responder: ::fidl_next::Responder<file::GetFlags, ___T>) {
16545 ___H::get_flags(&mut self.0, responder).await
16546 }
16547
16548 async fn set_flags(
16549 &mut self,
16550
16551 request: ::fidl_next::Request<file::SetFlags, ___T>,
16552
16553 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
16554 ) {
16555 ___H::set_flags(&mut self.0, request, responder).await
16556 }
16557
16558 async fn query_filesystem(
16559 &mut self,
16560
16561 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
16562 ) {
16563 ___H::query_filesystem(&mut self.0, responder).await
16564 }
16565
16566 async fn get_attributes(
16567 &mut self,
16568
16569 request: ::fidl_next::Request<file::GetAttributes, ___T>,
16570
16571 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
16572 ) {
16573 ___H::get_attributes(&mut self.0, request, responder).await
16574 }
16575
16576 async fn update_attributes(
16577 &mut self,
16578
16579 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
16580
16581 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
16582 ) {
16583 ___H::update_attributes(&mut self.0, request, responder).await
16584 }
16585
16586 async fn sync(&mut self, responder: ::fidl_next::Responder<file::Sync, ___T>) {
16587 ___H::sync(&mut self.0, responder).await
16588 }
16589
16590 async fn list_extended_attributes(
16591 &mut self,
16592
16593 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
16594 ) {
16595 ___H::list_extended_attributes(&mut self.0, request).await
16596 }
16597
16598 async fn get_extended_attribute(
16599 &mut self,
16600
16601 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
16602
16603 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
16604 ) {
16605 ___H::get_extended_attribute(&mut self.0, request, responder).await
16606 }
16607
16608 async fn set_extended_attribute(
16609 &mut self,
16610
16611 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
16612
16613 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
16614 ) {
16615 ___H::set_extended_attribute(&mut self.0, request, responder).await
16616 }
16617
16618 async fn remove_extended_attribute(
16619 &mut self,
16620
16621 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
16622
16623 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
16624 ) {
16625 ___H::remove_extended_attribute(&mut self.0, request, responder).await
16626 }
16627
16628 async fn read(
16629 &mut self,
16630
16631 request: ::fidl_next::Request<file::Read, ___T>,
16632
16633 responder: ::fidl_next::Responder<file::Read, ___T>,
16634 ) {
16635 ___H::read(&mut self.0, request, responder).await
16636 }
16637
16638 async fn write(
16639 &mut self,
16640
16641 request: ::fidl_next::Request<file::Write, ___T>,
16642
16643 responder: ::fidl_next::Responder<file::Write, ___T>,
16644 ) {
16645 ___H::write(&mut self.0, request, responder).await
16646 }
16647
16648 async fn describe(&mut self, responder: ::fidl_next::Responder<file::Describe, ___T>) {
16649 ___H::describe(&mut self.0, responder).await
16650 }
16651
16652 async fn seek(
16653 &mut self,
16654
16655 request: ::fidl_next::Request<file::Seek, ___T>,
16656
16657 responder: ::fidl_next::Responder<file::Seek, ___T>,
16658 ) {
16659 ___H::seek(&mut self.0, request, responder).await
16660 }
16661
16662 async fn read_at(
16663 &mut self,
16664
16665 request: ::fidl_next::Request<file::ReadAt, ___T>,
16666
16667 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
16668 ) {
16669 ___H::read_at(&mut self.0, request, responder).await
16670 }
16671
16672 async fn write_at(
16673 &mut self,
16674
16675 request: ::fidl_next::Request<file::WriteAt, ___T>,
16676
16677 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
16678 ) {
16679 ___H::write_at(&mut self.0, request, responder).await
16680 }
16681
16682 async fn resize(
16683 &mut self,
16684
16685 request: ::fidl_next::Request<file::Resize, ___T>,
16686
16687 responder: ::fidl_next::Responder<file::Resize, ___T>,
16688 ) {
16689 ___H::resize(&mut self.0, request, responder).await
16690 }
16691
16692 async fn get_backing_memory(
16693 &mut self,
16694
16695 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
16696
16697 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
16698 ) {
16699 ___H::get_backing_memory(&mut self.0, request, responder).await
16700 }
16701
16702 async fn allocate(
16703 &mut self,
16704
16705 request: ::fidl_next::Request<file::Allocate, ___T>,
16706
16707 responder: ::fidl_next::Responder<file::Allocate, ___T>,
16708 ) {
16709 ___H::allocate(&mut self.0, request, responder).await
16710 }
16711
16712 async fn enable_verity(
16713 &mut self,
16714
16715 request: ::fidl_next::Request<file::EnableVerity, ___T>,
16716
16717 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
16718 ) {
16719 ___H::enable_verity(&mut self.0, request, responder).await
16720 }
16721
16722 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16723 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16724 }
16725}
16726
16727#[doc = " A [\'Node\'] which contains a symbolic link.\n"]
16729#[derive(PartialEq, Debug)]
16730pub struct Symlink;
16731
16732impl ::fidl_next::Discoverable for Symlink {
16733 const PROTOCOL_NAME: &'static str = "fuchsia.io.Symlink";
16734}
16735
16736#[cfg(target_os = "fuchsia")]
16737impl ::fidl_next::HasTransport for Symlink {
16738 type Transport = ::fidl_next::fuchsia::zx::Channel;
16739}
16740
16741pub mod symlink {
16742 pub mod prelude {
16743 pub use crate::{
16744 Symlink, SymlinkClientHandler, SymlinkLocalClientHandler, SymlinkLocalServerHandler,
16745 SymlinkServerHandler, symlink,
16746 };
16747
16748 pub use crate::natural::ExtendedAttributeValue;
16749
16750 pub use crate::natural::LinkableLinkIntoRequest;
16751
16752 pub use crate::natural::LinkableLinkIntoResponse;
16753
16754 pub use crate::natural::MutableNodeAttributes;
16755
16756 pub use crate::natural::NodeAttributes2;
16757
16758 pub use crate::natural::NodeDeprecatedCloneRequest;
16759
16760 pub use crate::natural::NodeDeprecatedGetAttrResponse;
16761
16762 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
16763
16764 pub use crate::natural::NodeDeprecatedSetAttrRequest;
16765
16766 pub use crate::natural::NodeDeprecatedSetAttrResponse;
16767
16768 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
16769
16770 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
16771
16772 pub use crate::natural::NodeGetAttributesRequest;
16773
16774 pub use crate::natural::NodeGetExtendedAttributeRequest;
16775
16776 pub use crate::natural::NodeListExtendedAttributesRequest;
16777
16778 pub use crate::natural::NodeOnOpenRequest;
16779
16780 pub use crate::natural::NodeQueryFilesystemResponse;
16781
16782 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
16783
16784 pub use crate::natural::NodeSetExtendedAttributeRequest;
16785
16786 pub use crate::natural::NodeSetFlagsRequest;
16787
16788 pub use crate::natural::NodeGetFlagsResponse;
16789
16790 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
16791
16792 pub use crate::natural::NodeSetExtendedAttributeResponse;
16793
16794 pub use crate::natural::NodeSetFlagsResponse;
16795
16796 pub use crate::natural::NodeSyncResponse;
16797
16798 pub use crate::natural::NodeUpdateAttributesResponse;
16799
16800 pub use crate::natural::Representation;
16801
16802 pub use crate::natural::SymlinkInfo;
16803
16804 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
16805
16806 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
16807
16808 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
16809 }
16810
16811 pub struct LinkInto;
16812
16813 impl ::fidl_next::Method for LinkInto {
16814 const ORDINAL: u64 = 6121399674497678964;
16815 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16816 ::fidl_next::protocol::Flexibility::Strict;
16817
16818 type Protocol = crate::Symlink;
16819
16820 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
16821 }
16822
16823 impl ::fidl_next::TwoWayMethod for LinkInto {
16824 type Response = ::fidl_next::wire::Result<
16825 'static,
16826 crate::wire::LinkableLinkIntoResponse,
16827 ::fidl_next::wire::Int32,
16828 >;
16829 }
16830
16831 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
16832 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
16833
16834 fn respond(response: ___R) -> Self::Output {
16835 ::core::result::Result::Ok(response)
16836 }
16837 }
16838
16839 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
16840 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
16841
16842 fn respond_err(response: ___R) -> Self::Output {
16843 ::core::result::Result::Err(response)
16844 }
16845 }
16846
16847 pub struct Clone;
16848
16849 impl ::fidl_next::Method for Clone {
16850 const ORDINAL: u64 = 2366825959783828089;
16851 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16852 ::fidl_next::protocol::Flexibility::Strict;
16853
16854 type Protocol = crate::Symlink;
16855
16856 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
16857 }
16858
16859 pub struct Close;
16860
16861 impl ::fidl_next::Method for Close {
16862 const ORDINAL: u64 = 6540867515453498750;
16863 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16864 ::fidl_next::protocol::Flexibility::Strict;
16865
16866 type Protocol = crate::Symlink;
16867
16868 type Request = ::fidl_next::wire::EmptyMessageBody;
16869 }
16870
16871 impl ::fidl_next::TwoWayMethod for Close {
16872 type Response = ::fidl_next::wire::Result<
16873 'static,
16874 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
16875 ::fidl_next::wire::Int32,
16876 >;
16877 }
16878
16879 impl<___R> ::fidl_next::Respond<___R> for Close {
16880 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
16881
16882 fn respond(response: ___R) -> Self::Output {
16883 ::core::result::Result::Ok(response)
16884 }
16885 }
16886
16887 impl<___R> ::fidl_next::RespondErr<___R> for Close {
16888 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
16889
16890 fn respond_err(response: ___R) -> Self::Output {
16891 ::core::result::Result::Err(response)
16892 }
16893 }
16894
16895 pub struct Query;
16896
16897 impl ::fidl_next::Method for Query {
16898 const ORDINAL: u64 = 2763219980499352582;
16899 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16900 ::fidl_next::protocol::Flexibility::Strict;
16901
16902 type Protocol = crate::Symlink;
16903
16904 type Request = ::fidl_next::wire::EmptyMessageBody;
16905 }
16906
16907 impl ::fidl_next::TwoWayMethod for Query {
16908 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
16909 }
16910
16911 impl<___R> ::fidl_next::Respond<___R> for Query {
16912 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
16913
16914 fn respond(response: ___R) -> Self::Output {
16915 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
16916 }
16917 }
16918
16919 pub struct DeprecatedClone;
16920
16921 impl ::fidl_next::Method for DeprecatedClone {
16922 const ORDINAL: u64 = 6512600400724287855;
16923 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16924 ::fidl_next::protocol::Flexibility::Flexible;
16925
16926 type Protocol = crate::Symlink;
16927
16928 type Request = crate::wire::NodeDeprecatedCloneRequest;
16929 }
16930
16931 pub struct OnOpen;
16932
16933 impl ::fidl_next::Method for OnOpen {
16934 const ORDINAL: u64 = 9207534335756671346;
16935 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16936 ::fidl_next::protocol::Flexibility::Flexible;
16937
16938 type Protocol = crate::Symlink;
16939
16940 type Request = crate::wire::NodeOnOpenRequest<'static>;
16941 }
16942
16943 pub struct DeprecatedGetAttr;
16944
16945 impl ::fidl_next::Method for DeprecatedGetAttr {
16946 const ORDINAL: u64 = 8689798978500614909;
16947 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16948 ::fidl_next::protocol::Flexibility::Strict;
16949
16950 type Protocol = crate::Symlink;
16951
16952 type Request = ::fidl_next::wire::EmptyMessageBody;
16953 }
16954
16955 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
16956 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
16957 }
16958
16959 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
16960 type Output = ___R;
16961
16962 fn respond(response: ___R) -> Self::Output {
16963 response
16964 }
16965 }
16966
16967 pub struct DeprecatedSetAttr;
16968
16969 impl ::fidl_next::Method for DeprecatedSetAttr {
16970 const ORDINAL: u64 = 4721673413776871238;
16971 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16972 ::fidl_next::protocol::Flexibility::Strict;
16973
16974 type Protocol = crate::Symlink;
16975
16976 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
16977 }
16978
16979 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
16980 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
16981 }
16982
16983 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
16984 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
16985
16986 fn respond(response: ___R) -> Self::Output {
16987 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
16988 }
16989 }
16990
16991 pub struct DeprecatedGetFlags;
16992
16993 impl ::fidl_next::Method for DeprecatedGetFlags {
16994 const ORDINAL: u64 = 6595803110182632097;
16995 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16996 ::fidl_next::protocol::Flexibility::Strict;
16997
16998 type Protocol = crate::Symlink;
16999
17000 type Request = ::fidl_next::wire::EmptyMessageBody;
17001 }
17002
17003 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
17004 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
17005 }
17006
17007 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
17008 type Output = ___R;
17009
17010 fn respond(response: ___R) -> Self::Output {
17011 response
17012 }
17013 }
17014
17015 pub struct DeprecatedSetFlags;
17016
17017 impl ::fidl_next::Method for DeprecatedSetFlags {
17018 const ORDINAL: u64 = 5950864159036794675;
17019 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17020 ::fidl_next::protocol::Flexibility::Strict;
17021
17022 type Protocol = crate::Symlink;
17023
17024 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
17025 }
17026
17027 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
17028 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
17029 }
17030
17031 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
17032 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
17033
17034 fn respond(response: ___R) -> Self::Output {
17035 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
17036 }
17037 }
17038
17039 pub struct GetFlags;
17040
17041 impl ::fidl_next::Method for GetFlags {
17042 const ORDINAL: u64 = 105530239381466147;
17043 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17044 ::fidl_next::protocol::Flexibility::Flexible;
17045
17046 type Protocol = crate::Symlink;
17047
17048 type Request = ::fidl_next::wire::EmptyMessageBody;
17049 }
17050
17051 impl ::fidl_next::TwoWayMethod for GetFlags {
17052 type Response = ::fidl_next::wire::FlexibleResult<
17053 'static,
17054 crate::wire::NodeGetFlagsResponse,
17055 ::fidl_next::wire::Int32,
17056 >;
17057 }
17058
17059 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
17060 type Output = ::fidl_next::FlexibleResult<
17061 crate::generic::NodeGetFlagsResponse<___R>,
17062 ::fidl_next::util::Never,
17063 >;
17064
17065 fn respond(response: ___R) -> Self::Output {
17066 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
17067 flags: response,
17068 })
17069 }
17070 }
17071
17072 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
17073 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
17074
17075 fn respond_err(response: ___R) -> Self::Output {
17076 ::fidl_next::FlexibleResult::Err(response)
17077 }
17078 }
17079
17080 pub struct SetFlags;
17081
17082 impl ::fidl_next::Method for SetFlags {
17083 const ORDINAL: u64 = 6172186066099445416;
17084 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17085 ::fidl_next::protocol::Flexibility::Flexible;
17086
17087 type Protocol = crate::Symlink;
17088
17089 type Request = crate::wire::NodeSetFlagsRequest;
17090 }
17091
17092 impl ::fidl_next::TwoWayMethod for SetFlags {
17093 type Response = ::fidl_next::wire::FlexibleResult<
17094 'static,
17095 crate::wire::NodeSetFlagsResponse,
17096 ::fidl_next::wire::Int32,
17097 >;
17098 }
17099
17100 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
17101 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
17102
17103 fn respond(response: ___R) -> Self::Output {
17104 ::fidl_next::FlexibleResult::Ok(response)
17105 }
17106 }
17107
17108 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
17109 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
17110
17111 fn respond_err(response: ___R) -> Self::Output {
17112 ::fidl_next::FlexibleResult::Err(response)
17113 }
17114 }
17115
17116 pub struct QueryFilesystem;
17117
17118 impl ::fidl_next::Method for QueryFilesystem {
17119 const ORDINAL: u64 = 8013111122914313744;
17120 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17121 ::fidl_next::protocol::Flexibility::Strict;
17122
17123 type Protocol = crate::Symlink;
17124
17125 type Request = ::fidl_next::wire::EmptyMessageBody;
17126 }
17127
17128 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
17129 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
17130 }
17131
17132 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
17133 type Output = ___R;
17134
17135 fn respond(response: ___R) -> Self::Output {
17136 response
17137 }
17138 }
17139
17140 pub struct OnRepresentation;
17141
17142 impl ::fidl_next::Method for OnRepresentation {
17143 const ORDINAL: u64 = 6679970090861613324;
17144 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17145 ::fidl_next::protocol::Flexibility::Strict;
17146
17147 type Protocol = crate::Symlink;
17148
17149 type Request = crate::wire::Representation<'static>;
17150 }
17151
17152 pub struct GetAttributes;
17153
17154 impl ::fidl_next::Method for GetAttributes {
17155 const ORDINAL: u64 = 4414537700416816443;
17156 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17157 ::fidl_next::protocol::Flexibility::Strict;
17158
17159 type Protocol = crate::Symlink;
17160
17161 type Request = crate::wire::NodeGetAttributesRequest;
17162 }
17163
17164 impl ::fidl_next::TwoWayMethod for GetAttributes {
17165 type Response = ::fidl_next::wire::Result<
17166 'static,
17167 crate::wire::NodeAttributes2<'static>,
17168 ::fidl_next::wire::Int32,
17169 >;
17170 }
17171
17172 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
17173 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17174
17175 fn respond(response: ___R) -> Self::Output {
17176 ::core::result::Result::Ok(response)
17177 }
17178 }
17179
17180 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
17181 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17182
17183 fn respond_err(response: ___R) -> Self::Output {
17184 ::core::result::Result::Err(response)
17185 }
17186 }
17187
17188 pub struct UpdateAttributes;
17189
17190 impl ::fidl_next::Method for UpdateAttributes {
17191 const ORDINAL: u64 = 3677402239314018056;
17192 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17193 ::fidl_next::protocol::Flexibility::Strict;
17194
17195 type Protocol = crate::Symlink;
17196
17197 type Request = crate::wire::MutableNodeAttributes<'static>;
17198 }
17199
17200 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
17201 type Response = ::fidl_next::wire::Result<
17202 'static,
17203 crate::wire::NodeUpdateAttributesResponse,
17204 ::fidl_next::wire::Int32,
17205 >;
17206 }
17207
17208 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
17209 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17210
17211 fn respond(response: ___R) -> Self::Output {
17212 ::core::result::Result::Ok(response)
17213 }
17214 }
17215
17216 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
17217 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17218
17219 fn respond_err(response: ___R) -> Self::Output {
17220 ::core::result::Result::Err(response)
17221 }
17222 }
17223
17224 pub struct Sync;
17225
17226 impl ::fidl_next::Method for Sync {
17227 const ORDINAL: u64 = 3196473584242777161;
17228 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17229 ::fidl_next::protocol::Flexibility::Strict;
17230
17231 type Protocol = crate::Symlink;
17232
17233 type Request = ::fidl_next::wire::EmptyMessageBody;
17234 }
17235
17236 impl ::fidl_next::TwoWayMethod for Sync {
17237 type Response = ::fidl_next::wire::Result<
17238 'static,
17239 crate::wire::NodeSyncResponse,
17240 ::fidl_next::wire::Int32,
17241 >;
17242 }
17243
17244 impl<___R> ::fidl_next::Respond<___R> for Sync {
17245 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17246
17247 fn respond(response: ___R) -> Self::Output {
17248 ::core::result::Result::Ok(response)
17249 }
17250 }
17251
17252 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
17253 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17254
17255 fn respond_err(response: ___R) -> Self::Output {
17256 ::core::result::Result::Err(response)
17257 }
17258 }
17259
17260 pub struct ListExtendedAttributes;
17261
17262 impl ::fidl_next::Method for ListExtendedAttributes {
17263 const ORDINAL: u64 = 5431626189872037072;
17264 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17265 ::fidl_next::protocol::Flexibility::Strict;
17266
17267 type Protocol = crate::Symlink;
17268
17269 type Request = crate::wire::NodeListExtendedAttributesRequest;
17270 }
17271
17272 pub struct GetExtendedAttribute;
17273
17274 impl ::fidl_next::Method for GetExtendedAttribute {
17275 const ORDINAL: u64 = 5043930208506967771;
17276 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17277 ::fidl_next::protocol::Flexibility::Strict;
17278
17279 type Protocol = crate::Symlink;
17280
17281 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
17282 }
17283
17284 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
17285 type Response = ::fidl_next::wire::Result<
17286 'static,
17287 crate::wire::ExtendedAttributeValue<'static>,
17288 ::fidl_next::wire::Int32,
17289 >;
17290 }
17291
17292 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
17293 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17294
17295 fn respond(response: ___R) -> Self::Output {
17296 ::core::result::Result::Ok(response)
17297 }
17298 }
17299
17300 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
17301 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17302
17303 fn respond_err(response: ___R) -> Self::Output {
17304 ::core::result::Result::Err(response)
17305 }
17306 }
17307
17308 pub struct SetExtendedAttribute;
17309
17310 impl ::fidl_next::Method for SetExtendedAttribute {
17311 const ORDINAL: u64 = 5374223046099989052;
17312 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17313 ::fidl_next::protocol::Flexibility::Strict;
17314
17315 type Protocol = crate::Symlink;
17316
17317 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
17318 }
17319
17320 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
17321 type Response = ::fidl_next::wire::Result<
17322 'static,
17323 crate::wire::NodeSetExtendedAttributeResponse,
17324 ::fidl_next::wire::Int32,
17325 >;
17326 }
17327
17328 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
17329 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17330
17331 fn respond(response: ___R) -> Self::Output {
17332 ::core::result::Result::Ok(response)
17333 }
17334 }
17335
17336 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
17337 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17338
17339 fn respond_err(response: ___R) -> Self::Output {
17340 ::core::result::Result::Err(response)
17341 }
17342 }
17343
17344 pub struct RemoveExtendedAttribute;
17345
17346 impl ::fidl_next::Method for RemoveExtendedAttribute {
17347 const ORDINAL: u64 = 8794297771444732717;
17348 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17349 ::fidl_next::protocol::Flexibility::Strict;
17350
17351 type Protocol = crate::Symlink;
17352
17353 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
17354 }
17355
17356 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
17357 type Response = ::fidl_next::wire::Result<
17358 'static,
17359 crate::wire::NodeRemoveExtendedAttributeResponse,
17360 ::fidl_next::wire::Int32,
17361 >;
17362 }
17363
17364 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
17365 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17366
17367 fn respond(response: ___R) -> Self::Output {
17368 ::core::result::Result::Ok(response)
17369 }
17370 }
17371
17372 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
17373 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17374
17375 fn respond_err(response: ___R) -> Self::Output {
17376 ::core::result::Result::Err(response)
17377 }
17378 }
17379
17380 pub struct Describe;
17381
17382 impl ::fidl_next::Method for Describe {
17383 const ORDINAL: u64 = 8371117097481679347;
17384 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17385 ::fidl_next::protocol::Flexibility::Flexible;
17386
17387 type Protocol = crate::Symlink;
17388
17389 type Request = ::fidl_next::wire::EmptyMessageBody;
17390 }
17391
17392 impl ::fidl_next::TwoWayMethod for Describe {
17393 type Response = ::fidl_next::wire::Flexible<'static, crate::wire::SymlinkInfo<'static>>;
17394 }
17395
17396 impl<___R> ::fidl_next::Respond<___R> for Describe {
17397 type Output = ::fidl_next::Flexible<___R>;
17398
17399 fn respond(response: ___R) -> Self::Output {
17400 ::fidl_next::Flexible::Ok(response)
17401 }
17402 }
17403
17404 mod ___detail {
17405 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Symlink
17406 where
17407 ___T: ::fidl_next::Transport,
17408 {
17409 type Client = SymlinkClient<___T>;
17410 type Server = SymlinkServer<___T>;
17411 }
17412
17413 #[repr(transparent)]
17415 pub struct SymlinkClient<___T: ::fidl_next::Transport> {
17416 #[allow(dead_code)]
17417 client: ::fidl_next::protocol::Client<___T>,
17418 }
17419
17420 impl<___T> SymlinkClient<___T>
17421 where
17422 ___T: ::fidl_next::Transport,
17423 {
17424 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
17425 pub fn link_into(
17426 &self,
17427
17428 dst_parent_token: impl ::fidl_next::Encode<
17429 ::fidl_next::wire::fuchsia::Event,
17430 <___T as ::fidl_next::Transport>::SendBuffer,
17431 >,
17432
17433 dst: impl ::fidl_next::Encode<
17434 ::fidl_next::wire::String<'static>,
17435 <___T as ::fidl_next::Transport>::SendBuffer,
17436 >,
17437 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
17438 where
17439 <___T as ::fidl_next::Transport>::SendBuffer:
17440 ::fidl_next::encoder::InternalHandleEncoder,
17441 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17442 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
17443 {
17444 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
17445 dst_parent_token,
17446
17447 dst,
17448 })
17449 }
17450
17451 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
17452 pub fn link_into_with<___R>(
17453 &self,
17454 request: ___R,
17455 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
17456 where
17457 ___R: ::fidl_next::Encode<
17458 crate::wire::LinkableLinkIntoRequest<'static>,
17459 <___T as ::fidl_next::Transport>::SendBuffer,
17460 >,
17461 {
17462 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17463 6121399674497678964,
17464 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
17465 request,
17466 ))
17467 }
17468
17469 pub fn clone(
17470 &self,
17471
17472 request: impl ::fidl_next::Encode<
17473 ::fidl_next::ServerEnd<
17474 ::fidl_next_fuchsia_unknown::Cloneable,
17475 ::fidl_next::wire::fuchsia::Channel,
17476 >,
17477 <___T as ::fidl_next::Transport>::SendBuffer,
17478 >,
17479 ) -> ::fidl_next::SendFuture<'_, ___T>
17480 where
17481 <___T as ::fidl_next::Transport>::SendBuffer:
17482 ::fidl_next::encoder::InternalHandleEncoder,
17483 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
17484 {
17485 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
17486 request,
17487 })
17488 }
17489
17490 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
17491 where
17492 ___R: ::fidl_next::Encode<
17493 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
17494 <___T as ::fidl_next::Transport>::SendBuffer,
17495 >,
17496 {
17497 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
17498 2366825959783828089,
17499 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
17500 request,
17501 ))
17502 }
17503
17504 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
17505 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
17506 ::fidl_next::TwoWayFuture::from_untyped(
17507 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17508 6540867515453498750,
17509 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
17510 (),
17511 ),
17512 )
17513 }
17514
17515 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
17516 ::fidl_next::TwoWayFuture::from_untyped(
17517 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17518 2763219980499352582,
17519 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
17520 (),
17521 ),
17522 )
17523 }
17524
17525 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
17526 pub fn deprecated_clone(
17527 &self,
17528
17529 flags: impl ::fidl_next::Encode<
17530 crate::wire::OpenFlags,
17531 <___T as ::fidl_next::Transport>::SendBuffer,
17532 >,
17533
17534 object: impl ::fidl_next::Encode<
17535 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
17536 <___T as ::fidl_next::Transport>::SendBuffer,
17537 >,
17538 ) -> ::fidl_next::SendFuture<'_, ___T>
17539 where
17540 <___T as ::fidl_next::Transport>::SendBuffer:
17541 ::fidl_next::encoder::InternalHandleEncoder,
17542 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
17543 {
17544 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
17545 flags,
17546
17547 object,
17548 })
17549 }
17550
17551 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
17552 pub fn deprecated_clone_with<___R>(
17553 &self,
17554 request: ___R,
17555 ) -> ::fidl_next::SendFuture<'_, ___T>
17556 where
17557 ___R: ::fidl_next::Encode<
17558 crate::wire::NodeDeprecatedCloneRequest,
17559 <___T as ::fidl_next::Transport>::SendBuffer,
17560 >,
17561 {
17562 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
17563 6512600400724287855,
17564 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
17565 request,
17566 ))
17567 }
17568
17569 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
17570 pub fn deprecated_get_attr(
17571 &self,
17572 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
17573 ::fidl_next::TwoWayFuture::from_untyped(
17574 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17575 8689798978500614909,
17576 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
17577 (),
17578 ),
17579 )
17580 }
17581
17582 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
17583 pub fn deprecated_set_attr(
17584 &self,
17585
17586 flags: impl ::fidl_next::Encode<
17587 crate::wire::NodeAttributeFlags,
17588 <___T as ::fidl_next::Transport>::SendBuffer,
17589 >,
17590
17591 attributes: impl ::fidl_next::Encode<
17592 crate::wire::NodeAttributes,
17593 <___T as ::fidl_next::Transport>::SendBuffer,
17594 >,
17595 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
17596 where
17597 <___T as ::fidl_next::Transport>::SendBuffer:
17598 ::fidl_next::encoder::InternalHandleEncoder,
17599 {
17600 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
17601 flags,
17602
17603 attributes,
17604 })
17605 }
17606
17607 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
17608 pub fn deprecated_set_attr_with<___R>(
17609 &self,
17610 request: ___R,
17611 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
17612 where
17613 ___R: ::fidl_next::Encode<
17614 crate::wire::NodeDeprecatedSetAttrRequest,
17615 <___T as ::fidl_next::Transport>::SendBuffer,
17616 >,
17617 {
17618 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17619 4721673413776871238,
17620 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
17621 request,
17622 ))
17623 }
17624
17625 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
17626 pub fn deprecated_get_flags(
17627 &self,
17628 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
17629 ::fidl_next::TwoWayFuture::from_untyped(
17630 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17631 6595803110182632097,
17632 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
17633 (),
17634 ),
17635 )
17636 }
17637
17638 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
17639 pub fn deprecated_set_flags(
17640 &self,
17641
17642 flags: impl ::fidl_next::Encode<
17643 crate::wire::OpenFlags,
17644 <___T as ::fidl_next::Transport>::SendBuffer,
17645 >,
17646 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
17647 where
17648 <___T as ::fidl_next::Transport>::SendBuffer:
17649 ::fidl_next::encoder::InternalHandleEncoder,
17650 {
17651 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
17652 flags,
17653 })
17654 }
17655
17656 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
17657 pub fn deprecated_set_flags_with<___R>(
17658 &self,
17659 request: ___R,
17660 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
17661 where
17662 ___R: ::fidl_next::Encode<
17663 crate::wire::NodeDeprecatedSetFlagsRequest,
17664 <___T as ::fidl_next::Transport>::SendBuffer,
17665 >,
17666 {
17667 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17668 5950864159036794675,
17669 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
17670 request,
17671 ))
17672 }
17673
17674 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
17675 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
17676 ::fidl_next::TwoWayFuture::from_untyped(
17677 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17678 105530239381466147,
17679 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
17680 (),
17681 ),
17682 )
17683 }
17684
17685 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
17686 pub fn set_flags(
17687 &self,
17688
17689 flags: impl ::fidl_next::Encode<
17690 crate::wire::Flags,
17691 <___T as ::fidl_next::Transport>::SendBuffer,
17692 >,
17693 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
17694 where
17695 <___T as ::fidl_next::Transport>::SendBuffer:
17696 ::fidl_next::encoder::InternalHandleEncoder,
17697 {
17698 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
17699 }
17700
17701 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
17702 pub fn set_flags_with<___R>(
17703 &self,
17704 request: ___R,
17705 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
17706 where
17707 ___R: ::fidl_next::Encode<
17708 crate::wire::NodeSetFlagsRequest,
17709 <___T as ::fidl_next::Transport>::SendBuffer,
17710 >,
17711 {
17712 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17713 6172186066099445416,
17714 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
17715 request,
17716 ))
17717 }
17718
17719 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
17720 pub fn query_filesystem(
17721 &self,
17722 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
17723 ::fidl_next::TwoWayFuture::from_untyped(
17724 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17725 8013111122914313744,
17726 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
17727 (),
17728 ),
17729 )
17730 }
17731
17732 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
17733 pub fn get_attributes(
17734 &self,
17735
17736 query: impl ::fidl_next::Encode<
17737 crate::wire::NodeAttributesQuery,
17738 <___T as ::fidl_next::Transport>::SendBuffer,
17739 >,
17740 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
17741 where
17742 <___T as ::fidl_next::Transport>::SendBuffer:
17743 ::fidl_next::encoder::InternalHandleEncoder,
17744 {
17745 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
17746 }
17747
17748 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
17749 pub fn get_attributes_with<___R>(
17750 &self,
17751 request: ___R,
17752 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
17753 where
17754 ___R: ::fidl_next::Encode<
17755 crate::wire::NodeGetAttributesRequest,
17756 <___T as ::fidl_next::Transport>::SendBuffer,
17757 >,
17758 {
17759 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17760 4414537700416816443,
17761 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
17762 request,
17763 ))
17764 }
17765
17766 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
17767 pub fn update_attributes_with<___R>(
17768 &self,
17769 request: ___R,
17770 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
17771 where
17772 ___R: ::fidl_next::Encode<
17773 crate::wire::MutableNodeAttributes<'static>,
17774 <___T as ::fidl_next::Transport>::SendBuffer,
17775 >,
17776 {
17777 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17778 3677402239314018056,
17779 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
17780 request,
17781 ))
17782 }
17783
17784 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
17785 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
17786 ::fidl_next::TwoWayFuture::from_untyped(
17787 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17788 3196473584242777161,
17789 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
17790 (),
17791 ),
17792 )
17793 }
17794
17795 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
17796 pub fn list_extended_attributes(
17797 &self,
17798
17799 iterator: impl ::fidl_next::Encode<
17800 ::fidl_next::ServerEnd<
17801 crate::ExtendedAttributeIterator,
17802 ::fidl_next::wire::fuchsia::Channel,
17803 >,
17804 <___T as ::fidl_next::Transport>::SendBuffer,
17805 >,
17806 ) -> ::fidl_next::SendFuture<'_, ___T>
17807 where
17808 <___T as ::fidl_next::Transport>::SendBuffer:
17809 ::fidl_next::encoder::InternalHandleEncoder,
17810 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
17811 {
17812 self.list_extended_attributes_with(
17813 crate::generic::NodeListExtendedAttributesRequest { iterator },
17814 )
17815 }
17816
17817 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
17818 pub fn list_extended_attributes_with<___R>(
17819 &self,
17820 request: ___R,
17821 ) -> ::fidl_next::SendFuture<'_, ___T>
17822 where
17823 ___R: ::fidl_next::Encode<
17824 crate::wire::NodeListExtendedAttributesRequest,
17825 <___T as ::fidl_next::Transport>::SendBuffer,
17826 >,
17827 {
17828 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
17829 5431626189872037072,
17830 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
17831 request,
17832 ))
17833 }
17834
17835 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
17836 pub fn get_extended_attribute(
17837 &self,
17838
17839 name: impl ::fidl_next::Encode<
17840 ::fidl_next::wire::Vector<'static, u8>,
17841 <___T as ::fidl_next::Transport>::SendBuffer,
17842 >,
17843 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
17844 where
17845 <___T as ::fidl_next::Transport>::SendBuffer:
17846 ::fidl_next::encoder::InternalHandleEncoder,
17847 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17848 {
17849 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
17850 name,
17851 })
17852 }
17853
17854 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
17855 pub fn get_extended_attribute_with<___R>(
17856 &self,
17857 request: ___R,
17858 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
17859 where
17860 ___R: ::fidl_next::Encode<
17861 crate::wire::NodeGetExtendedAttributeRequest<'static>,
17862 <___T as ::fidl_next::Transport>::SendBuffer,
17863 >,
17864 {
17865 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17866 5043930208506967771,
17867 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
17868 request,
17869 ))
17870 }
17871
17872 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
17873 pub fn set_extended_attribute(
17874 &self,
17875
17876 name: impl ::fidl_next::Encode<
17877 ::fidl_next::wire::Vector<'static, u8>,
17878 <___T as ::fidl_next::Transport>::SendBuffer,
17879 >,
17880
17881 value: impl ::fidl_next::Encode<
17882 crate::wire::ExtendedAttributeValue<'static>,
17883 <___T as ::fidl_next::Transport>::SendBuffer,
17884 >,
17885
17886 mode: impl ::fidl_next::Encode<
17887 crate::wire::SetExtendedAttributeMode,
17888 <___T as ::fidl_next::Transport>::SendBuffer,
17889 >,
17890 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
17891 where
17892 <___T as ::fidl_next::Transport>::SendBuffer:
17893 ::fidl_next::encoder::InternalHandleEncoder,
17894 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17895 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
17896 {
17897 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
17898 name,
17899
17900 value,
17901
17902 mode,
17903 })
17904 }
17905
17906 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
17907 pub fn set_extended_attribute_with<___R>(
17908 &self,
17909 request: ___R,
17910 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
17911 where
17912 ___R: ::fidl_next::Encode<
17913 crate::wire::NodeSetExtendedAttributeRequest<'static>,
17914 <___T as ::fidl_next::Transport>::SendBuffer,
17915 >,
17916 {
17917 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17918 5374223046099989052,
17919 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
17920 request,
17921 ))
17922 }
17923
17924 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
17925 pub fn remove_extended_attribute(
17926 &self,
17927
17928 name: impl ::fidl_next::Encode<
17929 ::fidl_next::wire::Vector<'static, u8>,
17930 <___T as ::fidl_next::Transport>::SendBuffer,
17931 >,
17932 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
17933 where
17934 <___T as ::fidl_next::Transport>::SendBuffer:
17935 ::fidl_next::encoder::InternalHandleEncoder,
17936 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17937 {
17938 self.remove_extended_attribute_with(
17939 crate::generic::NodeRemoveExtendedAttributeRequest { name },
17940 )
17941 }
17942
17943 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
17944 pub fn remove_extended_attribute_with<___R>(
17945 &self,
17946 request: ___R,
17947 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
17948 where
17949 ___R: ::fidl_next::Encode<
17950 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
17951 <___T as ::fidl_next::Transport>::SendBuffer,
17952 >,
17953 {
17954 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17955 8794297771444732717,
17956 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
17957 request,
17958 ))
17959 }
17960
17961 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
17962 ::fidl_next::TwoWayFuture::from_untyped(
17963 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17964 8371117097481679347,
17965 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
17966 (),
17967 ),
17968 )
17969 }
17970 }
17971
17972 #[repr(transparent)]
17974 pub struct SymlinkServer<___T: ::fidl_next::Transport> {
17975 server: ::fidl_next::protocol::Server<___T>,
17976 }
17977
17978 impl<___T> SymlinkServer<___T>
17979 where
17980 ___T: ::fidl_next::Transport,
17981 {
17982 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
17983 pub fn on_open(
17984 &self,
17985
17986 s: impl ::fidl_next::Encode<
17987 ::fidl_next::wire::Int32,
17988 <___T as ::fidl_next::Transport>::SendBuffer,
17989 >,
17990
17991 info: impl ::fidl_next::Encode<
17992 crate::wire_optional::NodeInfoDeprecated<'static>,
17993 <___T as ::fidl_next::Transport>::SendBuffer,
17994 >,
17995 ) -> ::fidl_next::SendFuture<'_, ___T>
17996 where
17997 <___T as ::fidl_next::Transport>::SendBuffer:
17998 ::fidl_next::encoder::InternalHandleEncoder,
17999 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18000 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18001 {
18002 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
18003 }
18004
18005 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
18006
18007 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
18008 where
18009 ___R: ::fidl_next::Encode<
18010 <super::OnOpen as ::fidl_next::Method>::Request,
18011 <___T as ::fidl_next::Transport>::SendBuffer,
18012 >,
18013 {
18014 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
18015 9207534335756671346,
18016 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
18017 request,
18018 ))
18019 }
18020
18021 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
18022
18023 pub fn on_representation_with<___R>(
18024 &self,
18025 request: ___R,
18026 ) -> ::fidl_next::SendFuture<'_, ___T>
18027 where
18028 ___R: ::fidl_next::Encode<
18029 <super::OnRepresentation as ::fidl_next::Method>::Request,
18030 <___T as ::fidl_next::Transport>::SendBuffer,
18031 >,
18032 {
18033 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
18034 6679970090861613324,
18035 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
18036 request,
18037 ))
18038 }
18039 }
18040 }
18041}
18042
18043#[diagnostic::on_unimplemented(
18044 note = "If {Self} implements the non-local SymlinkClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18045)]
18046
18047pub trait SymlinkLocalClientHandler<
18051 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18052 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18053>
18054{
18055 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
18056 fn on_open(
18057 &mut self,
18058
18059 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
18060 ) -> impl ::core::future::Future<Output = ()>;
18061
18062 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
18063 fn on_representation(
18064 &mut self,
18065
18066 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
18067 ) -> impl ::core::future::Future<Output = ()>;
18068
18069 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
18070 ::core::future::ready(())
18071 }
18072}
18073
18074impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Symlink
18075where
18076 ___H: SymlinkLocalClientHandler<___T>,
18077 ___T: ::fidl_next::Transport,
18078 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
18079 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18080 Constraint = (),
18081 >,
18082 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
18083 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18084 Constraint = (),
18085 >,
18086{
18087 async fn on_event(
18088 handler: &mut ___H,
18089 ordinal: u64,
18090 flexibility: ::fidl_next::protocol::Flexibility,
18091 body: ::fidl_next::Body<___T>,
18092 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18093 match ordinal {
18094 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18095 Ok(decoded) => {
18096 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
18097 Ok(())
18098 }
18099 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18100 ordinal: 9207534335756671346,
18101 error,
18102 }),
18103 },
18104
18105 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18106 Ok(decoded) => {
18107 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
18108 Ok(())
18109 }
18110 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18111 ordinal: 6679970090861613324,
18112 error,
18113 }),
18114 },
18115
18116 ordinal => {
18117 handler.on_unknown_interaction(ordinal).await;
18118 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
18119 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18120 } else {
18121 Ok(())
18122 }
18123 }
18124 }
18125 }
18126}
18127
18128#[diagnostic::on_unimplemented(
18129 note = "If {Self} implements the non-local SymlinkServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18130)]
18131
18132pub trait SymlinkLocalServerHandler<
18136 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18137 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18138>
18139{
18140 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
18141 fn link_into(
18142 &mut self,
18143
18144 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
18145
18146 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
18147 ) -> impl ::core::future::Future<Output = ()>;
18148
18149 fn clone(
18150 &mut self,
18151
18152 request: ::fidl_next::Request<symlink::Clone, ___T>,
18153 ) -> impl ::core::future::Future<Output = ()>;
18154
18155 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
18156 fn close(
18157 &mut self,
18158
18159 responder: ::fidl_next::Responder<symlink::Close, ___T>,
18160 ) -> impl ::core::future::Future<Output = ()>;
18161
18162 fn query(
18163 &mut self,
18164
18165 responder: ::fidl_next::Responder<symlink::Query, ___T>,
18166 ) -> impl ::core::future::Future<Output = ()>;
18167
18168 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
18169 fn deprecated_clone(
18170 &mut self,
18171
18172 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
18173 ) -> impl ::core::future::Future<Output = ()>;
18174
18175 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
18176 fn deprecated_get_attr(
18177 &mut self,
18178
18179 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
18180 ) -> impl ::core::future::Future<Output = ()>;
18181
18182 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18183 fn deprecated_set_attr(
18184 &mut self,
18185
18186 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
18187
18188 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
18189 ) -> impl ::core::future::Future<Output = ()>;
18190
18191 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
18192 fn deprecated_get_flags(
18193 &mut self,
18194
18195 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
18196 ) -> impl ::core::future::Future<Output = ()>;
18197
18198 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18199 fn deprecated_set_flags(
18200 &mut self,
18201
18202 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
18203
18204 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
18205 ) -> impl ::core::future::Future<Output = ()>;
18206
18207 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
18208 fn get_flags(
18209 &mut self,
18210
18211 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
18212 ) -> impl ::core::future::Future<Output = ()>;
18213
18214 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
18215 fn set_flags(
18216 &mut self,
18217
18218 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
18219
18220 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
18221 ) -> impl ::core::future::Future<Output = ()>;
18222
18223 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
18224 fn query_filesystem(
18225 &mut self,
18226
18227 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
18228 ) -> impl ::core::future::Future<Output = ()>;
18229
18230 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
18231 fn get_attributes(
18232 &mut self,
18233
18234 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
18235
18236 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
18237 ) -> impl ::core::future::Future<Output = ()>;
18238
18239 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
18240 fn update_attributes(
18241 &mut self,
18242
18243 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
18244
18245 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
18246 ) -> impl ::core::future::Future<Output = ()>;
18247
18248 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
18249 fn sync(
18250 &mut self,
18251
18252 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
18253 ) -> impl ::core::future::Future<Output = ()>;
18254
18255 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
18256 fn list_extended_attributes(
18257 &mut self,
18258
18259 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
18260 ) -> impl ::core::future::Future<Output = ()>;
18261
18262 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
18263 fn get_extended_attribute(
18264 &mut self,
18265
18266 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
18267
18268 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
18269 ) -> impl ::core::future::Future<Output = ()>;
18270
18271 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
18272 fn set_extended_attribute(
18273 &mut self,
18274
18275 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
18276
18277 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
18278 ) -> impl ::core::future::Future<Output = ()>;
18279
18280 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
18281 fn remove_extended_attribute(
18282 &mut self,
18283
18284 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
18285
18286 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
18287 ) -> impl ::core::future::Future<Output = ()>;
18288
18289 fn describe(
18290 &mut self,
18291
18292 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
18293 ) -> impl ::core::future::Future<Output = ()>;
18294
18295 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
18296 ::core::future::ready(())
18297 }
18298}
18299
18300impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Symlink
18301where
18302 ___H: SymlinkLocalServerHandler<___T>,
18303 ___T: ::fidl_next::Transport,
18304 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
18305 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18306 Constraint = (),
18307 >,
18308 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
18309 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18310 Constraint = (),
18311 >,
18312 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
18313 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18314 Constraint = (),
18315 >,
18316 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
18317 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18318 Constraint = (),
18319 >,
18320 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
18321 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18322 Constraint = (),
18323 >,
18324 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
18325 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18326 Constraint = (),
18327 >,
18328 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
18329 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18330 Constraint = (),
18331 >,
18332 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
18333 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18334 Constraint = (),
18335 >,
18336 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
18337 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18338 Constraint = (),
18339 >,
18340 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18341 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18342 Constraint = (),
18343 >,
18344 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18345 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18346 Constraint = (),
18347 >,
18348 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18349 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18350 Constraint = (),
18351 >,
18352{
18353 async fn on_one_way(
18354 handler: &mut ___H,
18355 ordinal: u64,
18356 flexibility: ::fidl_next::protocol::Flexibility,
18357 body: ::fidl_next::Body<___T>,
18358 ) -> ::core::result::Result<
18359 (),
18360 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18361 > {
18362 match ordinal {
18363 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18364 Ok(decoded) => {
18365 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
18366 Ok(())
18367 }
18368 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18369 ordinal: 2366825959783828089,
18370 error,
18371 }),
18372 },
18373
18374 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18375 Ok(decoded) => {
18376 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
18377 Ok(())
18378 }
18379 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18380 ordinal: 6512600400724287855,
18381 error,
18382 }),
18383 },
18384
18385 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18386 Ok(decoded) => {
18387 handler
18388 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
18389 .await;
18390 Ok(())
18391 }
18392 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18393 ordinal: 5431626189872037072,
18394 error,
18395 }),
18396 },
18397
18398 ordinal => {
18399 handler.on_unknown_interaction(ordinal).await;
18400 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
18401 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18402 } else {
18403 Ok(())
18404 }
18405 }
18406 }
18407 }
18408
18409 async fn on_two_way(
18410 handler: &mut ___H,
18411 ordinal: u64,
18412 flexibility: ::fidl_next::protocol::Flexibility,
18413 body: ::fidl_next::Body<___T>,
18414 responder: ::fidl_next::protocol::Responder<___T>,
18415 ) -> ::core::result::Result<
18416 (),
18417 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18418 > {
18419 match ordinal {
18420 6121399674497678964 => {
18421 let responder = ::fidl_next::Responder::from_untyped(responder);
18422
18423 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18424 Ok(decoded) => {
18425 handler
18426 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
18427 .await;
18428 Ok(())
18429 }
18430 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18431 ordinal: 6121399674497678964,
18432 error,
18433 }),
18434 }
18435 }
18436
18437 6540867515453498750 => {
18438 let responder = ::fidl_next::Responder::from_untyped(responder);
18439
18440 handler.close(responder).await;
18441 Ok(())
18442 }
18443
18444 2763219980499352582 => {
18445 let responder = ::fidl_next::Responder::from_untyped(responder);
18446
18447 handler.query(responder).await;
18448 Ok(())
18449 }
18450
18451 8689798978500614909 => {
18452 let responder = ::fidl_next::Responder::from_untyped(responder);
18453
18454 handler.deprecated_get_attr(responder).await;
18455 Ok(())
18456 }
18457
18458 4721673413776871238 => {
18459 let responder = ::fidl_next::Responder::from_untyped(responder);
18460
18461 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18462 Ok(decoded) => {
18463 handler
18464 .deprecated_set_attr(
18465 ::fidl_next::Request::from_decoded(decoded),
18466 responder,
18467 )
18468 .await;
18469 Ok(())
18470 }
18471 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18472 ordinal: 4721673413776871238,
18473 error,
18474 }),
18475 }
18476 }
18477
18478 6595803110182632097 => {
18479 let responder = ::fidl_next::Responder::from_untyped(responder);
18480
18481 handler.deprecated_get_flags(responder).await;
18482 Ok(())
18483 }
18484
18485 5950864159036794675 => {
18486 let responder = ::fidl_next::Responder::from_untyped(responder);
18487
18488 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18489 Ok(decoded) => {
18490 handler
18491 .deprecated_set_flags(
18492 ::fidl_next::Request::from_decoded(decoded),
18493 responder,
18494 )
18495 .await;
18496 Ok(())
18497 }
18498 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18499 ordinal: 5950864159036794675,
18500 error,
18501 }),
18502 }
18503 }
18504
18505 105530239381466147 => {
18506 let responder = ::fidl_next::Responder::from_untyped(responder);
18507
18508 handler.get_flags(responder).await;
18509 Ok(())
18510 }
18511
18512 6172186066099445416 => {
18513 let responder = ::fidl_next::Responder::from_untyped(responder);
18514
18515 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18516 Ok(decoded) => {
18517 handler
18518 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
18519 .await;
18520 Ok(())
18521 }
18522 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18523 ordinal: 6172186066099445416,
18524 error,
18525 }),
18526 }
18527 }
18528
18529 8013111122914313744 => {
18530 let responder = ::fidl_next::Responder::from_untyped(responder);
18531
18532 handler.query_filesystem(responder).await;
18533 Ok(())
18534 }
18535
18536 4414537700416816443 => {
18537 let responder = ::fidl_next::Responder::from_untyped(responder);
18538
18539 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18540 Ok(decoded) => {
18541 handler
18542 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
18543 .await;
18544 Ok(())
18545 }
18546 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18547 ordinal: 4414537700416816443,
18548 error,
18549 }),
18550 }
18551 }
18552
18553 3677402239314018056 => {
18554 let responder = ::fidl_next::Responder::from_untyped(responder);
18555
18556 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18557 Ok(decoded) => {
18558 handler
18559 .update_attributes(
18560 ::fidl_next::Request::from_decoded(decoded),
18561 responder,
18562 )
18563 .await;
18564 Ok(())
18565 }
18566 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18567 ordinal: 3677402239314018056,
18568 error,
18569 }),
18570 }
18571 }
18572
18573 3196473584242777161 => {
18574 let responder = ::fidl_next::Responder::from_untyped(responder);
18575
18576 handler.sync(responder).await;
18577 Ok(())
18578 }
18579
18580 5043930208506967771 => {
18581 let responder = ::fidl_next::Responder::from_untyped(responder);
18582
18583 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18584 Ok(decoded) => {
18585 handler
18586 .get_extended_attribute(
18587 ::fidl_next::Request::from_decoded(decoded),
18588 responder,
18589 )
18590 .await;
18591 Ok(())
18592 }
18593 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18594 ordinal: 5043930208506967771,
18595 error,
18596 }),
18597 }
18598 }
18599
18600 5374223046099989052 => {
18601 let responder = ::fidl_next::Responder::from_untyped(responder);
18602
18603 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18604 Ok(decoded) => {
18605 handler
18606 .set_extended_attribute(
18607 ::fidl_next::Request::from_decoded(decoded),
18608 responder,
18609 )
18610 .await;
18611 Ok(())
18612 }
18613 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18614 ordinal: 5374223046099989052,
18615 error,
18616 }),
18617 }
18618 }
18619
18620 8794297771444732717 => {
18621 let responder = ::fidl_next::Responder::from_untyped(responder);
18622
18623 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18624 Ok(decoded) => {
18625 handler
18626 .remove_extended_attribute(
18627 ::fidl_next::Request::from_decoded(decoded),
18628 responder,
18629 )
18630 .await;
18631 Ok(())
18632 }
18633 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18634 ordinal: 8794297771444732717,
18635 error,
18636 }),
18637 }
18638 }
18639
18640 8371117097481679347 => {
18641 let responder = ::fidl_next::Responder::from_untyped(responder);
18642
18643 handler.describe(responder).await;
18644 Ok(())
18645 }
18646
18647 ordinal => {
18648 handler.on_unknown_interaction(ordinal).await;
18649 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
18650 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18651 } else {
18652 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
18653 ordinal,
18654 flexibility,
18655 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
18656 )
18657 .expect("encoding a framework error should never fail")
18658 .await?;
18659 Ok(())
18660 }
18661 }
18662 }
18663 }
18664}
18665
18666pub trait SymlinkClientHandler<
18670 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18671 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18672>
18673{
18674 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
18675 fn on_open(
18676 &mut self,
18677
18678 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
18679 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18680
18681 #[doc = " An event produced eagerly by the server if requested by [`Flags.FLAG_SEND_REPRESENTATION`].\n This event will be sent as the first message from the server, and is sent exactly once.\n\n The active variant corresponds to the negotiated protocol for the target node (i.e. the\n protocol which this channel now speaks). Additionally, auxiliary handles and requested\n attributes are also returned in the event.\n"]
18682 fn on_representation(
18683 &mut self,
18684
18685 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
18686 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18687
18688 fn on_unknown_interaction(
18689 &mut self,
18690 ordinal: u64,
18691 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
18692 ::core::future::ready(())
18693 }
18694}
18695
18696impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Symlink
18697where
18698 ___H: SymlinkClientHandler<___T> + ::core::marker::Send,
18699 ___T: ::fidl_next::Transport,
18700 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
18701 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18702 Constraint = (),
18703 >,
18704 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
18705 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18706 Constraint = (),
18707 >,
18708{
18709 async fn on_event(
18710 handler: &mut ___H,
18711 ordinal: u64,
18712 flexibility: ::fidl_next::protocol::Flexibility,
18713 body: ::fidl_next::Body<___T>,
18714 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18715 match ordinal {
18716 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18717 Ok(decoded) => {
18718 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
18719 Ok(())
18720 }
18721 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18722 ordinal: 9207534335756671346,
18723 error,
18724 }),
18725 },
18726
18727 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18728 Ok(decoded) => {
18729 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
18730 Ok(())
18731 }
18732 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18733 ordinal: 6679970090861613324,
18734 error,
18735 }),
18736 },
18737
18738 ordinal => {
18739 handler.on_unknown_interaction(ordinal).await;
18740 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
18741 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18742 } else {
18743 Ok(())
18744 }
18745 }
18746 }
18747 }
18748}
18749
18750pub trait SymlinkServerHandler<
18754 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18755 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18756>
18757{
18758 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
18759 fn link_into(
18760 &mut self,
18761
18762 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
18763
18764 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
18765 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18766
18767 fn clone(
18768 &mut self,
18769
18770 request: ::fidl_next::Request<symlink::Clone, ___T>,
18771 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18772
18773 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
18774 fn close(
18775 &mut self,
18776
18777 responder: ::fidl_next::Responder<symlink::Close, ___T>,
18778 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18779
18780 fn query(
18781 &mut self,
18782
18783 responder: ::fidl_next::Responder<symlink::Query, ___T>,
18784 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18785
18786 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
18787 fn deprecated_clone(
18788 &mut self,
18789
18790 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
18791 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18792
18793 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
18794 fn deprecated_get_attr(
18795 &mut self,
18796
18797 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
18798 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18799
18800 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18801 fn deprecated_set_attr(
18802 &mut self,
18803
18804 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
18805
18806 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
18807 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18808
18809 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
18810 fn deprecated_get_flags(
18811 &mut self,
18812
18813 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
18814 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18815
18816 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18817 fn deprecated_set_flags(
18818 &mut self,
18819
18820 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
18821
18822 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
18823 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18824
18825 #[doc = " Queries the flags that apply to this node after it has been opened/created. This method does\n not require any rights.\n\n Note that the final set of flags that apply to the connection may differ from those\n specified with the `fuchsia.io/Directory.Open` request used to create it:\n - `Flags.PERM_INHERIT_*`: Only applies when determining connection rights.\n - `Flags.PROTOCOL_*`: Only the protocol of the connection will be present.\n - `Flags.FLAG_*`: Only applies when opening the resource, not part of the connection.\n"]
18826 fn get_flags(
18827 &mut self,
18828
18829 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
18830 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18831
18832 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
18833 fn set_flags(
18834 &mut self,
18835
18836 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
18837
18838 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
18839 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18840
18841 #[doc = " Query the filesystem for details specific to the filesystem and/or volume. If the current\n volume has different settings or the storage is accounted seperately from the rest of the\n filesystem that may be reported instead of filesystem-wide details.\n"]
18842 fn query_filesystem(
18843 &mut self,
18844
18845 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
18846 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18847
18848 #[doc = " Acquires information about the node.\n\n The attributes of a node should be stable, independent of the\n specific protocol used to access it.\n\n If a particular attribute is not applicable or not supported,\n filesystems should leave the corresponding field absent.\n\n + `query` a bit-mask specifying which attributes to fetch. The server\n should not return more than necessary.\n - `attributes` the returned attributes.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
18849 fn get_attributes(
18850 &mut self,
18851
18852 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
18853
18854 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
18855 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18856
18857 #[doc = " Updates information about the node.\n\n + `attributes` the presence of a table field in `attributes` indicates\n the intent to update the corresponding attribute.\n\n Returns `ZX_ERR_NOT_SUPPORTED` if the node does not support any of the specified attributes.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
18858 fn update_attributes(
18859 &mut self,
18860
18861 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
18862
18863 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
18864 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18865
18866 #[doc = " Synchronizes updates to the node to the underlying media, if it exists.\n\n This method will return when the filesystem server has flushed the\n relevant updates to the underlying media, but does not guarantee the\n underlying media has persisted the information, nor that any information\n is committed to hardware. Clients may use `Sync` to ensure ordering\n between operations.\n\n This method does not require any rights.\n"]
18867 fn sync(
18868 &mut self,
18869
18870 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
18871 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18872
18873 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
18874 fn list_extended_attributes(
18875 &mut self,
18876
18877 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
18878 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18879
18880 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
18881 fn get_extended_attribute(
18882 &mut self,
18883
18884 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
18885
18886 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
18887 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18888
18889 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
18890 fn set_extended_attribute(
18891 &mut self,
18892
18893 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
18894
18895 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
18896 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18897
18898 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
18899 fn remove_extended_attribute(
18900 &mut self,
18901
18902 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
18903
18904 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
18905 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18906
18907 fn describe(
18908 &mut self,
18909
18910 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
18911 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18912
18913 fn on_unknown_interaction(
18914 &mut self,
18915 ordinal: u64,
18916 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
18917 ::core::future::ready(())
18918 }
18919}
18920
18921impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Symlink
18922where
18923 ___H: SymlinkServerHandler<___T> + ::core::marker::Send,
18924 ___T: ::fidl_next::Transport,
18925 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
18926 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18927 Constraint = (),
18928 >,
18929 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
18930 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18931 Constraint = (),
18932 >,
18933 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
18934 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18935 Constraint = (),
18936 >,
18937 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
18938 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18939 Constraint = (),
18940 >,
18941 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
18942 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18943 Constraint = (),
18944 >,
18945 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
18946 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18947 Constraint = (),
18948 >,
18949 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
18950 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18951 Constraint = (),
18952 >,
18953 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
18954 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18955 Constraint = (),
18956 >,
18957 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
18958 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18959 Constraint = (),
18960 >,
18961 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18962 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18963 Constraint = (),
18964 >,
18965 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18966 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18967 Constraint = (),
18968 >,
18969 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18970 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18971 Constraint = (),
18972 >,
18973{
18974 async fn on_one_way(
18975 handler: &mut ___H,
18976 ordinal: u64,
18977 flexibility: ::fidl_next::protocol::Flexibility,
18978 body: ::fidl_next::Body<___T>,
18979 ) -> ::core::result::Result<
18980 (),
18981 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18982 > {
18983 match ordinal {
18984 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18985 Ok(decoded) => {
18986 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
18987 Ok(())
18988 }
18989 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18990 ordinal: 2366825959783828089,
18991 error,
18992 }),
18993 },
18994
18995 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18996 Ok(decoded) => {
18997 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
18998 Ok(())
18999 }
19000 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19001 ordinal: 6512600400724287855,
19002 error,
19003 }),
19004 },
19005
19006 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
19007 Ok(decoded) => {
19008 handler
19009 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
19010 .await;
19011 Ok(())
19012 }
19013 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19014 ordinal: 5431626189872037072,
19015 error,
19016 }),
19017 },
19018
19019 ordinal => {
19020 handler.on_unknown_interaction(ordinal).await;
19021 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
19022 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19023 } else {
19024 Ok(())
19025 }
19026 }
19027 }
19028 }
19029
19030 async fn on_two_way(
19031 handler: &mut ___H,
19032 ordinal: u64,
19033 flexibility: ::fidl_next::protocol::Flexibility,
19034 body: ::fidl_next::Body<___T>,
19035 responder: ::fidl_next::protocol::Responder<___T>,
19036 ) -> ::core::result::Result<
19037 (),
19038 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19039 > {
19040 match ordinal {
19041 6121399674497678964 => {
19042 let responder = ::fidl_next::Responder::from_untyped(responder);
19043
19044 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19045 Ok(decoded) => {
19046 handler
19047 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
19048 .await;
19049 Ok(())
19050 }
19051 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19052 ordinal: 6121399674497678964,
19053 error,
19054 }),
19055 }
19056 }
19057
19058 6540867515453498750 => {
19059 let responder = ::fidl_next::Responder::from_untyped(responder);
19060
19061 handler.close(responder).await;
19062 Ok(())
19063 }
19064
19065 2763219980499352582 => {
19066 let responder = ::fidl_next::Responder::from_untyped(responder);
19067
19068 handler.query(responder).await;
19069 Ok(())
19070 }
19071
19072 8689798978500614909 => {
19073 let responder = ::fidl_next::Responder::from_untyped(responder);
19074
19075 handler.deprecated_get_attr(responder).await;
19076 Ok(())
19077 }
19078
19079 4721673413776871238 => {
19080 let responder = ::fidl_next::Responder::from_untyped(responder);
19081
19082 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19083 Ok(decoded) => {
19084 handler
19085 .deprecated_set_attr(
19086 ::fidl_next::Request::from_decoded(decoded),
19087 responder,
19088 )
19089 .await;
19090 Ok(())
19091 }
19092 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19093 ordinal: 4721673413776871238,
19094 error,
19095 }),
19096 }
19097 }
19098
19099 6595803110182632097 => {
19100 let responder = ::fidl_next::Responder::from_untyped(responder);
19101
19102 handler.deprecated_get_flags(responder).await;
19103 Ok(())
19104 }
19105
19106 5950864159036794675 => {
19107 let responder = ::fidl_next::Responder::from_untyped(responder);
19108
19109 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19110 Ok(decoded) => {
19111 handler
19112 .deprecated_set_flags(
19113 ::fidl_next::Request::from_decoded(decoded),
19114 responder,
19115 )
19116 .await;
19117 Ok(())
19118 }
19119 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19120 ordinal: 5950864159036794675,
19121 error,
19122 }),
19123 }
19124 }
19125
19126 105530239381466147 => {
19127 let responder = ::fidl_next::Responder::from_untyped(responder);
19128
19129 handler.get_flags(responder).await;
19130 Ok(())
19131 }
19132
19133 6172186066099445416 => {
19134 let responder = ::fidl_next::Responder::from_untyped(responder);
19135
19136 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19137 Ok(decoded) => {
19138 handler
19139 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
19140 .await;
19141 Ok(())
19142 }
19143 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19144 ordinal: 6172186066099445416,
19145 error,
19146 }),
19147 }
19148 }
19149
19150 8013111122914313744 => {
19151 let responder = ::fidl_next::Responder::from_untyped(responder);
19152
19153 handler.query_filesystem(responder).await;
19154 Ok(())
19155 }
19156
19157 4414537700416816443 => {
19158 let responder = ::fidl_next::Responder::from_untyped(responder);
19159
19160 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19161 Ok(decoded) => {
19162 handler
19163 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
19164 .await;
19165 Ok(())
19166 }
19167 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19168 ordinal: 4414537700416816443,
19169 error,
19170 }),
19171 }
19172 }
19173
19174 3677402239314018056 => {
19175 let responder = ::fidl_next::Responder::from_untyped(responder);
19176
19177 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19178 Ok(decoded) => {
19179 handler
19180 .update_attributes(
19181 ::fidl_next::Request::from_decoded(decoded),
19182 responder,
19183 )
19184 .await;
19185 Ok(())
19186 }
19187 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19188 ordinal: 3677402239314018056,
19189 error,
19190 }),
19191 }
19192 }
19193
19194 3196473584242777161 => {
19195 let responder = ::fidl_next::Responder::from_untyped(responder);
19196
19197 handler.sync(responder).await;
19198 Ok(())
19199 }
19200
19201 5043930208506967771 => {
19202 let responder = ::fidl_next::Responder::from_untyped(responder);
19203
19204 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19205 Ok(decoded) => {
19206 handler
19207 .get_extended_attribute(
19208 ::fidl_next::Request::from_decoded(decoded),
19209 responder,
19210 )
19211 .await;
19212 Ok(())
19213 }
19214 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19215 ordinal: 5043930208506967771,
19216 error,
19217 }),
19218 }
19219 }
19220
19221 5374223046099989052 => {
19222 let responder = ::fidl_next::Responder::from_untyped(responder);
19223
19224 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19225 Ok(decoded) => {
19226 handler
19227 .set_extended_attribute(
19228 ::fidl_next::Request::from_decoded(decoded),
19229 responder,
19230 )
19231 .await;
19232 Ok(())
19233 }
19234 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19235 ordinal: 5374223046099989052,
19236 error,
19237 }),
19238 }
19239 }
19240
19241 8794297771444732717 => {
19242 let responder = ::fidl_next::Responder::from_untyped(responder);
19243
19244 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19245 Ok(decoded) => {
19246 handler
19247 .remove_extended_attribute(
19248 ::fidl_next::Request::from_decoded(decoded),
19249 responder,
19250 )
19251 .await;
19252 Ok(())
19253 }
19254 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19255 ordinal: 8794297771444732717,
19256 error,
19257 }),
19258 }
19259 }
19260
19261 8371117097481679347 => {
19262 let responder = ::fidl_next::Responder::from_untyped(responder);
19263
19264 handler.describe(responder).await;
19265 Ok(())
19266 }
19267
19268 ordinal => {
19269 handler.on_unknown_interaction(ordinal).await;
19270 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
19271 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19272 } else {
19273 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
19274 ordinal,
19275 flexibility,
19276 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
19277 )
19278 .expect("encoding a framework error should never fail")
19279 .await?;
19280 Ok(())
19281 }
19282 }
19283 }
19284 }
19285}
19286
19287impl<___T> SymlinkClientHandler<___T> for ::fidl_next::IgnoreEvents
19288where
19289 ___T: ::fidl_next::Transport,
19290{
19291 async fn on_open(&mut self, _: ::fidl_next::Request<symlink::OnOpen, ___T>) {}
19292
19293 async fn on_representation(
19294 &mut self,
19295
19296 _: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19297 ) {
19298 }
19299
19300 async fn on_unknown_interaction(&mut self, _: u64) {}
19301}
19302
19303impl<___H, ___T> SymlinkLocalClientHandler<___T> for ::fidl_next::Local<___H>
19304where
19305 ___H: SymlinkClientHandler<___T>,
19306 ___T: ::fidl_next::Transport,
19307{
19308 async fn on_open(&mut self, request: ::fidl_next::Request<symlink::OnOpen, ___T>) {
19309 ___H::on_open(&mut self.0, request).await
19310 }
19311
19312 async fn on_representation(
19313 &mut self,
19314
19315 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19316 ) {
19317 ___H::on_representation(&mut self.0, request).await
19318 }
19319
19320 async fn on_unknown_interaction(&mut self, ordinal: u64) {
19321 ___H::on_unknown_interaction(&mut self.0, ordinal).await
19322 }
19323}
19324
19325impl<___H, ___T> SymlinkLocalServerHandler<___T> for ::fidl_next::Local<___H>
19326where
19327 ___H: SymlinkServerHandler<___T>,
19328 ___T: ::fidl_next::Transport,
19329{
19330 async fn link_into(
19331 &mut self,
19332
19333 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
19334
19335 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
19336 ) {
19337 ___H::link_into(&mut self.0, request, responder).await
19338 }
19339
19340 async fn clone(&mut self, request: ::fidl_next::Request<symlink::Clone, ___T>) {
19341 ___H::clone(&mut self.0, request).await
19342 }
19343
19344 async fn close(&mut self, responder: ::fidl_next::Responder<symlink::Close, ___T>) {
19345 ___H::close(&mut self.0, responder).await
19346 }
19347
19348 async fn query(&mut self, responder: ::fidl_next::Responder<symlink::Query, ___T>) {
19349 ___H::query(&mut self.0, responder).await
19350 }
19351
19352 async fn deprecated_clone(
19353 &mut self,
19354
19355 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
19356 ) {
19357 ___H::deprecated_clone(&mut self.0, request).await
19358 }
19359
19360 async fn deprecated_get_attr(
19361 &mut self,
19362
19363 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
19364 ) {
19365 ___H::deprecated_get_attr(&mut self.0, responder).await
19366 }
19367
19368 async fn deprecated_set_attr(
19369 &mut self,
19370
19371 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
19372
19373 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
19374 ) {
19375 ___H::deprecated_set_attr(&mut self.0, request, responder).await
19376 }
19377
19378 async fn deprecated_get_flags(
19379 &mut self,
19380
19381 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
19382 ) {
19383 ___H::deprecated_get_flags(&mut self.0, responder).await
19384 }
19385
19386 async fn deprecated_set_flags(
19387 &mut self,
19388
19389 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
19390
19391 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
19392 ) {
19393 ___H::deprecated_set_flags(&mut self.0, request, responder).await
19394 }
19395
19396 async fn get_flags(&mut self, responder: ::fidl_next::Responder<symlink::GetFlags, ___T>) {
19397 ___H::get_flags(&mut self.0, responder).await
19398 }
19399
19400 async fn set_flags(
19401 &mut self,
19402
19403 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
19404
19405 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
19406 ) {
19407 ___H::set_flags(&mut self.0, request, responder).await
19408 }
19409
19410 async fn query_filesystem(
19411 &mut self,
19412
19413 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
19414 ) {
19415 ___H::query_filesystem(&mut self.0, responder).await
19416 }
19417
19418 async fn get_attributes(
19419 &mut self,
19420
19421 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
19422
19423 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
19424 ) {
19425 ___H::get_attributes(&mut self.0, request, responder).await
19426 }
19427
19428 async fn update_attributes(
19429 &mut self,
19430
19431 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
19432
19433 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
19434 ) {
19435 ___H::update_attributes(&mut self.0, request, responder).await
19436 }
19437
19438 async fn sync(&mut self, responder: ::fidl_next::Responder<symlink::Sync, ___T>) {
19439 ___H::sync(&mut self.0, responder).await
19440 }
19441
19442 async fn list_extended_attributes(
19443 &mut self,
19444
19445 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
19446 ) {
19447 ___H::list_extended_attributes(&mut self.0, request).await
19448 }
19449
19450 async fn get_extended_attribute(
19451 &mut self,
19452
19453 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
19454
19455 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
19456 ) {
19457 ___H::get_extended_attribute(&mut self.0, request, responder).await
19458 }
19459
19460 async fn set_extended_attribute(
19461 &mut self,
19462
19463 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
19464
19465 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
19466 ) {
19467 ___H::set_extended_attribute(&mut self.0, request, responder).await
19468 }
19469
19470 async fn remove_extended_attribute(
19471 &mut self,
19472
19473 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
19474
19475 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
19476 ) {
19477 ___H::remove_extended_attribute(&mut self.0, request, responder).await
19478 }
19479
19480 async fn describe(&mut self, responder: ::fidl_next::Responder<symlink::Describe, ___T>) {
19481 ___H::describe(&mut self.0, responder).await
19482 }
19483
19484 async fn on_unknown_interaction(&mut self, ordinal: u64) {
19485 ___H::on_unknown_interaction(&mut self.0, ordinal).await
19486 }
19487}
19488
19489pub use fidl_next_common_fuchsia_io::*;