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 OpenableOpenRequest {
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::OpenableOpenRequest<'static>, ___E>
1292 for OpenableOpenRequest
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::OpenableOpenRequest<'static>>,
1303 _: (),
1304 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1305 ::fidl_next::munge! {
1306 let crate::wire::OpenableOpenRequest {
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::OpenableOpenRequest<'static>>,
1339 ___E,
1340 > for OpenableOpenRequest
1341 where
1342 ___E: ::fidl_next::Encoder + ?Sized,
1343 OpenableOpenRequest: ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'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::OpenableOpenRequest<'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::OpenableOpenRequest<'de>> for OpenableOpenRequest {
1366 #[inline]
1367 fn from_wire(wire: crate::wire::OpenableOpenRequest<'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 OpenableOpenRequest<'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::<OpenableOpenRequest<'_>>(), 48);
3547 static_assertions::const_assert_eq!(std::mem::align_of::<OpenableOpenRequest<'_>>(), 8);
3548
3549 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, path), 0);
3550
3551 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, flags), 16);
3552
3553 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, options), 24);
3554
3555 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, object), 40);
3556
3557 impl ::fidl_next::Constrained for OpenableOpenRequest<'_> {
3558 type Constraint = ();
3559
3560 fn validate(
3561 _: ::fidl_next::Slot<'_, Self>,
3562 _: Self::Constraint,
3563 ) -> Result<(), ::fidl_next::ValidationError> {
3564 Ok(())
3565 }
3566 }
3567
3568 unsafe impl ::fidl_next::Wire for OpenableOpenRequest<'static> {
3569 type Narrowed<'de> = OpenableOpenRequest<'de>;
3570
3571 #[inline]
3572 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3573 ::fidl_next::munge! {
3574 let Self {
3575 path,
3576 flags,
3577 options,
3578 object,
3579
3580 } = &mut *out_;
3581 }
3582
3583 ::fidl_next::Wire::zero_padding(path);
3584
3585 ::fidl_next::Wire::zero_padding(flags);
3586
3587 ::fidl_next::Wire::zero_padding(options);
3588
3589 ::fidl_next::Wire::zero_padding(object);
3590
3591 unsafe {
3592 out_.as_mut_ptr().cast::<u8>().add(44).write_bytes(0, 4);
3593 }
3594 }
3595 }
3596
3597 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OpenableOpenRequest<'de>
3598 where
3599 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3600 ___D: ::fidl_next::Decoder<'de>,
3601 ___D: ::fidl_next::fuchsia::HandleDecoder,
3602 {
3603 fn decode(
3604 slot_: ::fidl_next::Slot<'_, Self>,
3605 decoder_: &mut ___D,
3606 _: (),
3607 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3608 if slot_.as_bytes()[44..48] != [0u8; 4] {
3609 return Err(::fidl_next::DecodeError::InvalidPadding);
3610 }
3611
3612 ::fidl_next::munge! {
3613 let Self {
3614 mut path,
3615 mut flags,
3616 mut options,
3617 mut object,
3618
3619 } = slot_;
3620 }
3621
3622 let _field = path.as_mut();
3623 ::fidl_next::Constrained::validate(_field, 4095)?;
3624 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3625
3626 let path = unsafe { path.deref_unchecked() };
3627
3628 if path.len() > 4095 {
3629 return Err(::fidl_next::DecodeError::VectorTooLong {
3630 size: path.len() as u64,
3631 limit: 4095,
3632 });
3633 }
3634
3635 let _field = flags.as_mut();
3636
3637 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3638
3639 let _field = options.as_mut();
3640
3641 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
3642
3643 let _field = object.as_mut();
3644
3645 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3646
3647 Ok(())
3648 }
3649 }
3650
3651 impl<'de> ::fidl_next::IntoNatural for OpenableOpenRequest<'de> {
3652 type Natural = crate::natural::OpenableOpenRequest;
3653 }
3654
3655 #[derive(Debug)]
3657 #[repr(C)]
3658 pub struct NodeDeprecatedCloneRequest {
3659 pub flags: crate::wire::OpenFlags,
3660
3661 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
3662 }
3663
3664 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedCloneRequest>(), 8);
3665 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedCloneRequest>(), 4);
3666
3667 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedCloneRequest, flags), 0);
3668
3669 static_assertions::const_assert_eq!(
3670 std::mem::offset_of!(NodeDeprecatedCloneRequest, object),
3671 4
3672 );
3673
3674 impl ::fidl_next::Constrained for NodeDeprecatedCloneRequest {
3675 type Constraint = ();
3676
3677 fn validate(
3678 _: ::fidl_next::Slot<'_, Self>,
3679 _: Self::Constraint,
3680 ) -> Result<(), ::fidl_next::ValidationError> {
3681 Ok(())
3682 }
3683 }
3684
3685 unsafe impl ::fidl_next::Wire for NodeDeprecatedCloneRequest {
3686 type Narrowed<'de> = NodeDeprecatedCloneRequest;
3687
3688 #[inline]
3689 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3690 ::fidl_next::munge! {
3691 let Self {
3692 flags,
3693 object,
3694
3695 } = &mut *out_;
3696 }
3697
3698 ::fidl_next::Wire::zero_padding(flags);
3699
3700 ::fidl_next::Wire::zero_padding(object);
3701 }
3702 }
3703
3704 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedCloneRequest
3705 where
3706 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3707 ___D: ::fidl_next::fuchsia::HandleDecoder,
3708 {
3709 fn decode(
3710 slot_: ::fidl_next::Slot<'_, Self>,
3711 decoder_: &mut ___D,
3712 _: (),
3713 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3714 ::fidl_next::munge! {
3715 let Self {
3716 mut flags,
3717 mut object,
3718
3719 } = slot_;
3720 }
3721
3722 let _field = flags.as_mut();
3723
3724 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3725
3726 let _field = object.as_mut();
3727
3728 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3729
3730 Ok(())
3731 }
3732 }
3733
3734 impl ::fidl_next::IntoNatural for NodeDeprecatedCloneRequest {
3735 type Natural = crate::natural::NodeDeprecatedCloneRequest;
3736 }
3737
3738 #[derive(Debug)]
3740 #[repr(C)]
3741 pub struct DirectoryDeprecatedOpenRequest<'de> {
3742 pub flags: crate::wire::OpenFlags,
3743
3744 pub mode: crate::wire::ModeType,
3745
3746 pub path: ::fidl_next::wire::String<'de>,
3747
3748 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
3749 }
3750
3751 static_assertions::const_assert_eq!(
3752 std::mem::size_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3753 32
3754 );
3755 static_assertions::const_assert_eq!(
3756 std::mem::align_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3757 8
3758 );
3759
3760 static_assertions::const_assert_eq!(
3761 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, flags),
3762 0
3763 );
3764
3765 static_assertions::const_assert_eq!(
3766 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, mode),
3767 4
3768 );
3769
3770 static_assertions::const_assert_eq!(
3771 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, path),
3772 8
3773 );
3774
3775 static_assertions::const_assert_eq!(
3776 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, object),
3777 24
3778 );
3779
3780 impl ::fidl_next::Constrained for DirectoryDeprecatedOpenRequest<'_> {
3781 type Constraint = ();
3782
3783 fn validate(
3784 _: ::fidl_next::Slot<'_, Self>,
3785 _: Self::Constraint,
3786 ) -> Result<(), ::fidl_next::ValidationError> {
3787 Ok(())
3788 }
3789 }
3790
3791 unsafe impl ::fidl_next::Wire for DirectoryDeprecatedOpenRequest<'static> {
3792 type Narrowed<'de> = DirectoryDeprecatedOpenRequest<'de>;
3793
3794 #[inline]
3795 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3796 ::fidl_next::munge! {
3797 let Self {
3798 flags,
3799 mode,
3800 path,
3801 object,
3802
3803 } = &mut *out_;
3804 }
3805
3806 ::fidl_next::Wire::zero_padding(flags);
3807
3808 ::fidl_next::Wire::zero_padding(mode);
3809
3810 ::fidl_next::Wire::zero_padding(path);
3811
3812 ::fidl_next::Wire::zero_padding(object);
3813
3814 unsafe {
3815 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
3816 }
3817 }
3818 }
3819
3820 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryDeprecatedOpenRequest<'de>
3821 where
3822 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3823 ___D: ::fidl_next::Decoder<'de>,
3824 ___D: ::fidl_next::fuchsia::HandleDecoder,
3825 {
3826 fn decode(
3827 slot_: ::fidl_next::Slot<'_, Self>,
3828 decoder_: &mut ___D,
3829 _: (),
3830 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3831 if slot_.as_bytes()[28..32] != [0u8; 4] {
3832 return Err(::fidl_next::DecodeError::InvalidPadding);
3833 }
3834
3835 ::fidl_next::munge! {
3836 let Self {
3837 mut flags,
3838 mut mode,
3839 mut path,
3840 mut object,
3841
3842 } = slot_;
3843 }
3844
3845 let _field = flags.as_mut();
3846
3847 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3848
3849 let _field = mode.as_mut();
3850
3851 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3852
3853 let _field = path.as_mut();
3854 ::fidl_next::Constrained::validate(_field, 4095)?;
3855 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3856
3857 let path = unsafe { path.deref_unchecked() };
3858
3859 if path.len() > 4095 {
3860 return Err(::fidl_next::DecodeError::VectorTooLong {
3861 size: path.len() as u64,
3862 limit: 4095,
3863 });
3864 }
3865
3866 let _field = object.as_mut();
3867
3868 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3869
3870 Ok(())
3871 }
3872 }
3873
3874 impl<'de> ::fidl_next::IntoNatural for DirectoryDeprecatedOpenRequest<'de> {
3875 type Natural = crate::natural::DirectoryDeprecatedOpenRequest;
3876 }
3877
3878 #[derive(Debug)]
3880 #[repr(C)]
3881 pub struct DirectoryCreateSymlinkRequest<'de> {
3882 pub name: ::fidl_next::wire::String<'de>,
3883
3884 pub target: ::fidl_next::wire::Vector<'de, u8>,
3885
3886 pub connection:
3887 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
3888 }
3889
3890 static_assertions::const_assert_eq!(
3891 std::mem::size_of::<DirectoryCreateSymlinkRequest<'_>>(),
3892 40
3893 );
3894 static_assertions::const_assert_eq!(
3895 std::mem::align_of::<DirectoryCreateSymlinkRequest<'_>>(),
3896 8
3897 );
3898
3899 static_assertions::const_assert_eq!(
3900 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, name),
3901 0
3902 );
3903
3904 static_assertions::const_assert_eq!(
3905 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, target),
3906 16
3907 );
3908
3909 static_assertions::const_assert_eq!(
3910 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, connection),
3911 32
3912 );
3913
3914 impl ::fidl_next::Constrained for DirectoryCreateSymlinkRequest<'_> {
3915 type Constraint = ();
3916
3917 fn validate(
3918 _: ::fidl_next::Slot<'_, Self>,
3919 _: Self::Constraint,
3920 ) -> Result<(), ::fidl_next::ValidationError> {
3921 Ok(())
3922 }
3923 }
3924
3925 unsafe impl ::fidl_next::Wire for DirectoryCreateSymlinkRequest<'static> {
3926 type Narrowed<'de> = DirectoryCreateSymlinkRequest<'de>;
3927
3928 #[inline]
3929 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3930 ::fidl_next::munge! {
3931 let Self {
3932 name,
3933 target,
3934 connection,
3935
3936 } = &mut *out_;
3937 }
3938
3939 ::fidl_next::Wire::zero_padding(name);
3940
3941 ::fidl_next::Wire::zero_padding(target);
3942
3943 ::fidl_next::Wire::zero_padding(connection);
3944
3945 unsafe {
3946 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3947 }
3948 }
3949 }
3950
3951 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryCreateSymlinkRequest<'de>
3952 where
3953 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3954 ___D: ::fidl_next::Decoder<'de>,
3955 ___D: ::fidl_next::fuchsia::HandleDecoder,
3956 {
3957 fn decode(
3958 slot_: ::fidl_next::Slot<'_, Self>,
3959 decoder_: &mut ___D,
3960 _: (),
3961 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3962 if slot_.as_bytes()[36..40] != [0u8; 4] {
3963 return Err(::fidl_next::DecodeError::InvalidPadding);
3964 }
3965
3966 ::fidl_next::munge! {
3967 let Self {
3968 mut name,
3969 mut target,
3970 mut connection,
3971
3972 } = slot_;
3973 }
3974
3975 let _field = name.as_mut();
3976 ::fidl_next::Constrained::validate(_field, 255)?;
3977 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
3978
3979 let name = unsafe { name.deref_unchecked() };
3980
3981 if name.len() > 255 {
3982 return Err(::fidl_next::DecodeError::VectorTooLong {
3983 size: name.len() as u64,
3984 limit: 255,
3985 });
3986 }
3987
3988 let _field = target.as_mut();
3989 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
3990 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
3991
3992 let target = unsafe { target.deref_unchecked() };
3993
3994 if target.len() > 4095 {
3995 return Err(::fidl_next::DecodeError::VectorTooLong {
3996 size: target.len() as u64,
3997 limit: 4095,
3998 });
3999 }
4000
4001 let _field = connection.as_mut();
4002
4003 ::fidl_next::Decode::decode(connection.as_mut(), decoder_, ())?;
4004
4005 Ok(())
4006 }
4007 }
4008
4009 impl<'de> ::fidl_next::IntoNatural for DirectoryCreateSymlinkRequest<'de> {
4010 type Natural = crate::natural::DirectoryCreateSymlinkRequest;
4011 }
4012
4013 #[derive(Debug)]
4015 #[repr(C)]
4016 pub struct FileGetBackingMemoryResponse {
4017 pub vmo: ::fidl_next::wire::fuchsia::Vmo,
4018 }
4019
4020 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryResponse>(), 4);
4021 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryResponse>(), 4);
4022
4023 static_assertions::const_assert_eq!(std::mem::offset_of!(FileGetBackingMemoryResponse, vmo), 0);
4024
4025 impl ::fidl_next::Constrained for FileGetBackingMemoryResponse {
4026 type Constraint = ();
4027
4028 fn validate(
4029 _: ::fidl_next::Slot<'_, Self>,
4030 _: Self::Constraint,
4031 ) -> Result<(), ::fidl_next::ValidationError> {
4032 Ok(())
4033 }
4034 }
4035
4036 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryResponse {
4037 type Narrowed<'de> = FileGetBackingMemoryResponse;
4038
4039 #[inline]
4040 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4041 ::fidl_next::munge! {
4042 let Self {
4043 vmo,
4044
4045 } = &mut *out_;
4046 }
4047
4048 ::fidl_next::Wire::zero_padding(vmo);
4049 }
4050 }
4051
4052 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryResponse
4053 where
4054 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4055 ___D: ::fidl_next::fuchsia::HandleDecoder,
4056 {
4057 fn decode(
4058 slot_: ::fidl_next::Slot<'_, Self>,
4059 decoder_: &mut ___D,
4060 _: (),
4061 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4062 ::fidl_next::munge! {
4063 let Self {
4064 mut vmo,
4065
4066 } = slot_;
4067 }
4068
4069 let _field = vmo.as_mut();
4070
4071 ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
4072
4073 Ok(())
4074 }
4075 }
4076
4077 impl ::fidl_next::IntoNatural for FileGetBackingMemoryResponse {
4078 type Natural = crate::natural::FileGetBackingMemoryResponse;
4079 }
4080
4081 #[derive(Debug)]
4083 #[repr(C)]
4084 pub struct LinkableLinkIntoRequest<'de> {
4085 pub dst_parent_token: ::fidl_next::wire::fuchsia::Event,
4086
4087 pub dst: ::fidl_next::wire::String<'de>,
4088 }
4089
4090 static_assertions::const_assert_eq!(std::mem::size_of::<LinkableLinkIntoRequest<'_>>(), 24);
4091 static_assertions::const_assert_eq!(std::mem::align_of::<LinkableLinkIntoRequest<'_>>(), 8);
4092
4093 static_assertions::const_assert_eq!(
4094 std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst_parent_token),
4095 0
4096 );
4097
4098 static_assertions::const_assert_eq!(std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst), 8);
4099
4100 impl ::fidl_next::Constrained for LinkableLinkIntoRequest<'_> {
4101 type Constraint = ();
4102
4103 fn validate(
4104 _: ::fidl_next::Slot<'_, Self>,
4105 _: Self::Constraint,
4106 ) -> Result<(), ::fidl_next::ValidationError> {
4107 Ok(())
4108 }
4109 }
4110
4111 unsafe impl ::fidl_next::Wire for LinkableLinkIntoRequest<'static> {
4112 type Narrowed<'de> = LinkableLinkIntoRequest<'de>;
4113
4114 #[inline]
4115 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4116 ::fidl_next::munge! {
4117 let Self {
4118 dst_parent_token,
4119 dst,
4120
4121 } = &mut *out_;
4122 }
4123
4124 ::fidl_next::Wire::zero_padding(dst_parent_token);
4125
4126 ::fidl_next::Wire::zero_padding(dst);
4127
4128 unsafe {
4129 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
4130 }
4131 }
4132 }
4133
4134 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LinkableLinkIntoRequest<'de>
4135 where
4136 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4137 ___D: ::fidl_next::Decoder<'de>,
4138 ___D: ::fidl_next::fuchsia::HandleDecoder,
4139 {
4140 fn decode(
4141 slot_: ::fidl_next::Slot<'_, Self>,
4142 decoder_: &mut ___D,
4143 _: (),
4144 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4145 if slot_.as_bytes()[4..8] != [0u8; 4] {
4146 return Err(::fidl_next::DecodeError::InvalidPadding);
4147 }
4148
4149 ::fidl_next::munge! {
4150 let Self {
4151 mut dst_parent_token,
4152 mut dst,
4153
4154 } = slot_;
4155 }
4156
4157 let _field = dst_parent_token.as_mut();
4158
4159 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
4160
4161 let _field = dst.as_mut();
4162 ::fidl_next::Constrained::validate(_field, 255)?;
4163 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
4164
4165 let dst = unsafe { dst.deref_unchecked() };
4166
4167 if dst.len() > 255 {
4168 return Err(::fidl_next::DecodeError::VectorTooLong {
4169 size: dst.len() as u64,
4170 limit: 255,
4171 });
4172 }
4173
4174 Ok(())
4175 }
4176 }
4177
4178 impl<'de> ::fidl_next::IntoNatural for LinkableLinkIntoRequest<'de> {
4179 type Natural = crate::natural::LinkableLinkIntoRequest;
4180 }
4181
4182 #[derive(Debug)]
4184 #[repr(C)]
4185 pub struct FileAllocateRequest {
4186 pub offset: ::fidl_next::wire::Uint64,
4187
4188 pub length: ::fidl_next::wire::Uint64,
4189
4190 pub mode: crate::wire::AllocateMode,
4191 }
4192
4193 static_assertions::const_assert_eq!(std::mem::size_of::<FileAllocateRequest>(), 24);
4194 static_assertions::const_assert_eq!(std::mem::align_of::<FileAllocateRequest>(), 8);
4195
4196 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, offset), 0);
4197
4198 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, length), 8);
4199
4200 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, mode), 16);
4201
4202 impl ::fidl_next::Constrained for FileAllocateRequest {
4203 type Constraint = ();
4204
4205 fn validate(
4206 _: ::fidl_next::Slot<'_, Self>,
4207 _: Self::Constraint,
4208 ) -> Result<(), ::fidl_next::ValidationError> {
4209 Ok(())
4210 }
4211 }
4212
4213 unsafe impl ::fidl_next::Wire for FileAllocateRequest {
4214 type Narrowed<'de> = FileAllocateRequest;
4215
4216 #[inline]
4217 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4218 ::fidl_next::munge! {
4219 let Self {
4220 offset,
4221 length,
4222 mode,
4223
4224 } = &mut *out_;
4225 }
4226
4227 ::fidl_next::Wire::zero_padding(offset);
4228
4229 ::fidl_next::Wire::zero_padding(length);
4230
4231 ::fidl_next::Wire::zero_padding(mode);
4232
4233 unsafe {
4234 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4235 }
4236 }
4237 }
4238
4239 unsafe impl<___D> ::fidl_next::Decode<___D> for FileAllocateRequest
4240 where
4241 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4242 ___D: ::fidl_next::fuchsia::HandleDecoder,
4243 {
4244 fn decode(
4245 slot_: ::fidl_next::Slot<'_, Self>,
4246 decoder_: &mut ___D,
4247 _: (),
4248 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4249 if slot_.as_bytes()[20..24] != [0u8; 4] {
4250 return Err(::fidl_next::DecodeError::InvalidPadding);
4251 }
4252
4253 ::fidl_next::munge! {
4254 let Self {
4255 mut offset,
4256 mut length,
4257 mut mode,
4258
4259 } = slot_;
4260 }
4261
4262 let _field = offset.as_mut();
4263
4264 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
4265
4266 let _field = length.as_mut();
4267
4268 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
4269
4270 let _field = mode.as_mut();
4271
4272 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
4273
4274 Ok(())
4275 }
4276 }
4277
4278 impl ::fidl_next::IntoNatural for FileAllocateRequest {
4279 type Natural = crate::natural::FileAllocateRequest;
4280 }
4281
4282 #[derive(Debug)]
4284 #[repr(C)]
4285 pub struct FileEnableVerityRequest<'de> {
4286 pub options: crate::wire::VerificationOptions<'de>,
4287 }
4288
4289 static_assertions::const_assert_eq!(std::mem::size_of::<FileEnableVerityRequest<'_>>(), 16);
4290 static_assertions::const_assert_eq!(std::mem::align_of::<FileEnableVerityRequest<'_>>(), 8);
4291
4292 static_assertions::const_assert_eq!(
4293 std::mem::offset_of!(FileEnableVerityRequest<'_>, options),
4294 0
4295 );
4296
4297 impl ::fidl_next::Constrained for FileEnableVerityRequest<'_> {
4298 type Constraint = ();
4299
4300 fn validate(
4301 _: ::fidl_next::Slot<'_, Self>,
4302 _: Self::Constraint,
4303 ) -> Result<(), ::fidl_next::ValidationError> {
4304 Ok(())
4305 }
4306 }
4307
4308 unsafe impl ::fidl_next::Wire for FileEnableVerityRequest<'static> {
4309 type Narrowed<'de> = FileEnableVerityRequest<'de>;
4310
4311 #[inline]
4312 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4313 ::fidl_next::munge! {
4314 let Self {
4315 options,
4316
4317 } = &mut *out_;
4318 }
4319
4320 ::fidl_next::Wire::zero_padding(options);
4321 }
4322 }
4323
4324 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileEnableVerityRequest<'de>
4325 where
4326 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4327 ___D: ::fidl_next::Decoder<'de>,
4328 ___D: ::fidl_next::fuchsia::HandleDecoder,
4329 {
4330 fn decode(
4331 slot_: ::fidl_next::Slot<'_, Self>,
4332 decoder_: &mut ___D,
4333 _: (),
4334 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4335 ::fidl_next::munge! {
4336 let Self {
4337 mut options,
4338
4339 } = slot_;
4340 }
4341
4342 let _field = options.as_mut();
4343
4344 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
4345
4346 Ok(())
4347 }
4348 }
4349
4350 impl<'de> ::fidl_next::IntoNatural for FileEnableVerityRequest<'de> {
4351 type Natural = crate::natural::FileEnableVerityRequest;
4352 }
4353
4354 #[derive(Debug)]
4356 #[repr(C)]
4357 pub struct FileObject {
4358 pub event: ::fidl_next::wire::fuchsia::OptionalEvent,
4359
4360 pub stream: ::fidl_next::wire::fuchsia::OptionalStream,
4361 }
4362
4363 static_assertions::const_assert_eq!(std::mem::size_of::<FileObject>(), 8);
4364 static_assertions::const_assert_eq!(std::mem::align_of::<FileObject>(), 4);
4365
4366 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, event), 0);
4367
4368 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, stream), 4);
4369
4370 impl ::fidl_next::Constrained for FileObject {
4371 type Constraint = ();
4372
4373 fn validate(
4374 _: ::fidl_next::Slot<'_, Self>,
4375 _: Self::Constraint,
4376 ) -> Result<(), ::fidl_next::ValidationError> {
4377 Ok(())
4378 }
4379 }
4380
4381 unsafe impl ::fidl_next::Wire for FileObject {
4382 type Narrowed<'de> = FileObject;
4383
4384 #[inline]
4385 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4386 ::fidl_next::munge! {
4387 let Self {
4388 event,
4389 stream,
4390
4391 } = &mut *out_;
4392 }
4393
4394 ::fidl_next::Wire::zero_padding(event);
4395
4396 ::fidl_next::Wire::zero_padding(stream);
4397 }
4398 }
4399
4400 unsafe impl<___D> ::fidl_next::Decode<___D> for FileObject
4401 where
4402 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4403 ___D: ::fidl_next::fuchsia::HandleDecoder,
4404 {
4405 fn decode(
4406 slot_: ::fidl_next::Slot<'_, Self>,
4407 decoder_: &mut ___D,
4408 _: (),
4409 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4410 ::fidl_next::munge! {
4411 let Self {
4412 mut event,
4413 mut stream,
4414
4415 } = slot_;
4416 }
4417
4418 let _field = event.as_mut();
4419
4420 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
4421
4422 let _field = stream.as_mut();
4423
4424 ::fidl_next::Decode::decode(stream.as_mut(), decoder_, ())?;
4425
4426 Ok(())
4427 }
4428 }
4429
4430 impl ::fidl_next::IntoNatural for FileObject {
4431 type Natural = crate::natural::FileObject;
4432 }
4433
4434 #[repr(transparent)]
4436 pub struct NodeInfoDeprecated<'de> {
4437 pub(crate) raw: ::fidl_next::wire::Union,
4438 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4439 }
4440
4441 impl<'de> Drop for NodeInfoDeprecated<'de> {
4442 fn drop(&mut self) {
4443 match self.raw.ordinal() {
4444 1 => {
4445 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Service>() };
4446 }
4447
4448 2 => {
4449 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::FileObject>() };
4450 }
4451
4452 3 => {
4453 let _ =
4454 unsafe { self.raw.get().read_unchecked::<crate::wire::DirectoryObject>() };
4455 }
4456
4457 4 => {
4458 let _ = unsafe {
4459 self.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4460 };
4461 }
4462
4463 _ => unsafe { ::core::hint::unreachable_unchecked() },
4464 }
4465 }
4466 }
4467
4468 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4469 type Constraint = ();
4470
4471 fn validate(
4472 _: ::fidl_next::Slot<'_, Self>,
4473 _: Self::Constraint,
4474 ) -> Result<(), ::fidl_next::ValidationError> {
4475 Ok(())
4476 }
4477 }
4478
4479 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4480 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4481
4482 #[inline]
4483 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4484 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4485 ::fidl_next::wire::Union::zero_padding(raw);
4486 }
4487 }
4488
4489 pub mod node_info_deprecated {
4490 pub enum Ref<'de> {
4491 Service(&'de crate::wire::Service),
4492
4493 File(&'de crate::wire::FileObject),
4494
4495 Directory(&'de crate::wire::DirectoryObject),
4496
4497 Symlink(&'de crate::wire::SymlinkObject<'de>),
4498 }
4499 }
4500
4501 impl<'de> NodeInfoDeprecated<'de> {
4502 pub fn as_ref(&self) -> crate::wire::node_info_deprecated::Ref<'_> {
4503 match self.raw.ordinal() {
4504 1 => crate::wire::node_info_deprecated::Ref::Service(unsafe {
4505 self.raw.get().deref_unchecked::<crate::wire::Service>()
4506 }),
4507
4508 2 => crate::wire::node_info_deprecated::Ref::File(unsafe {
4509 self.raw.get().deref_unchecked::<crate::wire::FileObject>()
4510 }),
4511
4512 3 => crate::wire::node_info_deprecated::Ref::Directory(unsafe {
4513 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>()
4514 }),
4515
4516 4 => crate::wire::node_info_deprecated::Ref::Symlink(unsafe {
4517 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>()
4518 }),
4519
4520 _ => unsafe { ::core::hint::unreachable_unchecked() },
4521 }
4522 }
4523 }
4524
4525 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4526 where
4527 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4528 ___D: ::fidl_next::Decoder<'de>,
4529 ___D: ::fidl_next::fuchsia::HandleDecoder,
4530 {
4531 fn decode(
4532 mut slot: ::fidl_next::Slot<'_, Self>,
4533 decoder: &mut ___D,
4534 _: (),
4535 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4536 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4537 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4538 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4539 raw,
4540 decoder,
4541 (),
4542 )?,
4543
4544 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4545 raw,
4546 decoder,
4547 (),
4548 )?,
4549
4550 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4551 raw,
4552 decoder,
4553 (),
4554 )?,
4555
4556 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4557 raw,
4558 decoder,
4559 (),
4560 )?,
4561
4562 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
4563 }
4564
4565 Ok(())
4566 }
4567 }
4568
4569 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4570 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4571 match self.raw.ordinal() {
4572 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Service>().fmt(f) },
4573 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::FileObject>().fmt(f) },
4574 3 => unsafe {
4575 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>().fmt(f)
4576 },
4577 4 => unsafe {
4578 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>().fmt(f)
4579 },
4580 _ => unsafe { ::core::hint::unreachable_unchecked() },
4581 }
4582 }
4583 }
4584
4585 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4586 type Natural = crate::natural::NodeInfoDeprecated;
4587 }
4588}
4589
4590pub mod wire_optional {
4591
4592 pub use fidl_next_common_fuchsia_io::wire_optional::*;
4593
4594 #[repr(transparent)]
4595 pub struct ExtendedAttributeValue<'de> {
4596 pub(crate) raw: ::fidl_next::wire::Union,
4597 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4598 }
4599
4600 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
4601 type Constraint = ();
4602
4603 fn validate(
4604 _: ::fidl_next::Slot<'_, Self>,
4605 _: Self::Constraint,
4606 ) -> Result<(), ::fidl_next::ValidationError> {
4607 Ok(())
4608 }
4609 }
4610
4611 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
4612 type Narrowed<'de> = ExtendedAttributeValue<'de>;
4613
4614 #[inline]
4615 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4616 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4617 ::fidl_next::wire::Union::zero_padding(raw);
4618 }
4619 }
4620
4621 impl<'de> ExtendedAttributeValue<'de> {
4622 pub fn is_some(&self) -> bool {
4623 self.raw.is_some()
4624 }
4625
4626 pub fn is_none(&self) -> bool {
4627 self.raw.is_none()
4628 }
4629
4630 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ExtendedAttributeValue<'de>> {
4631 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4632 }
4633
4634 pub fn into_option(
4635 self,
4636 ) -> ::core::option::Option<crate::wire::ExtendedAttributeValue<'de>> {
4637 if self.is_some() {
4638 Some(crate::wire::ExtendedAttributeValue {
4639 raw: self.raw,
4640 _phantom: ::core::marker::PhantomData,
4641 })
4642 } else {
4643 None
4644 }
4645 }
4646 }
4647
4648 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
4649 where
4650 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4651 ___D: ::fidl_next::Decoder<'de>,
4652 ___D: ::fidl_next::fuchsia::HandleDecoder,
4653 {
4654 fn decode(
4655 mut slot: ::fidl_next::Slot<'_, Self>,
4656 decoder: &mut ___D,
4657 _: (),
4658 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4659 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4660 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4661 1 => {
4662 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
4663 raw,
4664 decoder,
4665 (32768, ()),
4666 )?
4667 }
4668
4669 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Vmo>(
4670 raw,
4671 decoder,
4672 (),
4673 )?,
4674
4675 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4676 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4677 }
4678
4679 Ok(())
4680 }
4681 }
4682
4683 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
4684 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4685 self.as_ref().fmt(f)
4686 }
4687 }
4688
4689 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
4690 type Natural = ::core::option::Option<crate::natural::ExtendedAttributeValue>;
4691 }
4692
4693 #[repr(transparent)]
4694 pub struct Representation<'de> {
4695 pub(crate) raw: ::fidl_next::wire::Union,
4696 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4697 }
4698
4699 impl ::fidl_next::Constrained for Representation<'_> {
4700 type Constraint = ();
4701
4702 fn validate(
4703 _: ::fidl_next::Slot<'_, Self>,
4704 _: Self::Constraint,
4705 ) -> Result<(), ::fidl_next::ValidationError> {
4706 Ok(())
4707 }
4708 }
4709
4710 unsafe impl ::fidl_next::Wire for Representation<'static> {
4711 type Narrowed<'de> = Representation<'de>;
4712
4713 #[inline]
4714 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4715 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4716 ::fidl_next::wire::Union::zero_padding(raw);
4717 }
4718 }
4719
4720 impl<'de> Representation<'de> {
4721 pub fn is_some(&self) -> bool {
4722 self.raw.is_some()
4723 }
4724
4725 pub fn is_none(&self) -> bool {
4726 self.raw.is_none()
4727 }
4728
4729 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Representation<'de>> {
4730 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4731 }
4732
4733 pub fn into_option(self) -> ::core::option::Option<crate::wire::Representation<'de>> {
4734 if self.is_some() {
4735 Some(crate::wire::Representation {
4736 raw: self.raw,
4737 _phantom: ::core::marker::PhantomData,
4738 })
4739 } else {
4740 None
4741 }
4742 }
4743 }
4744
4745 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
4746 where
4747 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4748 ___D: ::fidl_next::Decoder<'de>,
4749 ___D: ::fidl_next::fuchsia::HandleDecoder,
4750 {
4751 fn decode(
4752 mut slot: ::fidl_next::Slot<'_, Self>,
4753 decoder: &mut ___D,
4754 _: (),
4755 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4756 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4757 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4758 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
4759 raw,
4760 decoder,
4761 (),
4762 )?,
4763
4764 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
4765 raw,
4766 decoder,
4767 (),
4768 )?,
4769
4770 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
4771 raw,
4772 decoder,
4773 (),
4774 )?,
4775
4776 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
4777 raw,
4778 decoder,
4779 (),
4780 )?,
4781
4782 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4783 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4784 }
4785
4786 Ok(())
4787 }
4788 }
4789
4790 impl<'de> ::core::fmt::Debug for Representation<'de> {
4791 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4792 self.as_ref().fmt(f)
4793 }
4794 }
4795
4796 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
4797 type Natural = ::core::option::Option<crate::natural::Representation>;
4798 }
4799
4800 #[repr(transparent)]
4801 pub struct NodeInfoDeprecated<'de> {
4802 pub(crate) raw: ::fidl_next::wire::Union,
4803 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4804 }
4805
4806 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4807 type Constraint = ();
4808
4809 fn validate(
4810 _: ::fidl_next::Slot<'_, Self>,
4811 _: Self::Constraint,
4812 ) -> Result<(), ::fidl_next::ValidationError> {
4813 Ok(())
4814 }
4815 }
4816
4817 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4818 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4819
4820 #[inline]
4821 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4822 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4823 ::fidl_next::wire::Union::zero_padding(raw);
4824 }
4825 }
4826
4827 impl<'de> NodeInfoDeprecated<'de> {
4828 pub fn is_some(&self) -> bool {
4829 self.raw.is_some()
4830 }
4831
4832 pub fn is_none(&self) -> bool {
4833 self.raw.is_none()
4834 }
4835
4836 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::NodeInfoDeprecated<'de>> {
4837 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4838 }
4839
4840 pub fn into_option(self) -> ::core::option::Option<crate::wire::NodeInfoDeprecated<'de>> {
4841 if self.is_some() {
4842 Some(crate::wire::NodeInfoDeprecated {
4843 raw: self.raw,
4844 _phantom: ::core::marker::PhantomData,
4845 })
4846 } else {
4847 None
4848 }
4849 }
4850 }
4851
4852 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4853 where
4854 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4855 ___D: ::fidl_next::Decoder<'de>,
4856 ___D: ::fidl_next::fuchsia::HandleDecoder,
4857 {
4858 fn decode(
4859 mut slot: ::fidl_next::Slot<'_, Self>,
4860 decoder: &mut ___D,
4861 _: (),
4862 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4863 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4864 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4865 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4866 raw,
4867 decoder,
4868 (),
4869 )?,
4870
4871 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4872 raw,
4873 decoder,
4874 (),
4875 )?,
4876
4877 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4878 raw,
4879 decoder,
4880 (),
4881 )?,
4882
4883 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4884 raw,
4885 decoder,
4886 (),
4887 )?,
4888
4889 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4890 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4891 }
4892
4893 Ok(())
4894 }
4895 }
4896
4897 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4898 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4899 self.as_ref().fmt(f)
4900 }
4901 }
4902
4903 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4904 type Natural = ::core::option::Option<crate::natural::NodeInfoDeprecated>;
4905 }
4906}
4907
4908pub mod generic {
4909
4910 pub use fidl_next_common_fuchsia_io::generic::*;
4911
4912 pub struct DirectoryGetTokenResponse<T0, T1> {
4914 pub s: T0,
4915
4916 pub token: T1,
4917 }
4918
4919 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>
4920 for DirectoryGetTokenResponse<T0, T1>
4921 where
4922 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4923 ___E: ::fidl_next::fuchsia::HandleEncoder,
4924 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
4925 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
4926 {
4927 #[inline]
4928 fn encode(
4929 self,
4930 encoder_: &mut ___E,
4931 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryGetTokenResponse>,
4932 _: (),
4933 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4934 ::fidl_next::munge! {
4935 let crate::wire::DirectoryGetTokenResponse {
4936 s,
4937 token,
4938
4939 } = out_;
4940 }
4941
4942 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4943
4944 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
4945
4946 Ok(())
4947 }
4948 }
4949
4950 pub struct DirectoryLinkRequest<T0, T1, T2> {
4952 pub src: T0,
4953
4954 pub dst_parent_token: T1,
4955
4956 pub dst: T2,
4957 }
4958
4959 unsafe impl<___E, T0, T1, T2>
4960 ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
4961 for DirectoryLinkRequest<T0, T1, T2>
4962 where
4963 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4964 ___E: ::fidl_next::Encoder,
4965 ___E: ::fidl_next::fuchsia::HandleEncoder,
4966 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4967 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
4968 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4969 {
4970 #[inline]
4971 fn encode(
4972 self,
4973 encoder_: &mut ___E,
4974 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
4975 _: (),
4976 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4977 ::fidl_next::munge! {
4978 let crate::wire::DirectoryLinkRequest {
4979 src,
4980 dst_parent_token,
4981 dst,
4982
4983 } = out_;
4984 }
4985
4986 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
4987
4988 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
4989
4990 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
4991
4992 Ok(())
4993 }
4994 }
4995
4996 pub struct DirectoryRenameRequest<T0, T1, T2> {
4998 pub src: T0,
4999
5000 pub dst_parent_token: T1,
5001
5002 pub dst: T2,
5003 }
5004
5005 unsafe impl<___E, T0, T1, T2>
5006 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
5007 for DirectoryRenameRequest<T0, T1, T2>
5008 where
5009 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5010 ___E: ::fidl_next::Encoder,
5011 ___E: ::fidl_next::fuchsia::HandleEncoder,
5012 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5013 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5014 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5015 {
5016 #[inline]
5017 fn encode(
5018 self,
5019 encoder_: &mut ___E,
5020 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
5021 _: (),
5022 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5023 ::fidl_next::munge! {
5024 let crate::wire::DirectoryRenameRequest {
5025 src,
5026 dst_parent_token,
5027 dst,
5028
5029 } = out_;
5030 }
5031
5032 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5033
5034 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5035
5036 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5037
5038 Ok(())
5039 }
5040 }
5041
5042 pub struct DirectoryWatchRequest<T0, T1, T2> {
5044 pub mask: T0,
5045
5046 pub options: T1,
5047
5048 pub watcher: T2,
5049 }
5050
5051 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
5052 for DirectoryWatchRequest<T0, T1, T2>
5053 where
5054 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5055 ___E: ::fidl_next::fuchsia::HandleEncoder,
5056 T0: ::fidl_next::Encode<crate::wire::WatchMask, ___E>,
5057 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5058 T2: ::fidl_next::Encode<
5059 ::fidl_next::ServerEnd<
5060 crate::DirectoryWatcher,
5061 ::fidl_next::wire::fuchsia::Channel,
5062 >,
5063 ___E,
5064 >,
5065 {
5066 #[inline]
5067 fn encode(
5068 self,
5069 encoder_: &mut ___E,
5070 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
5071 _: (),
5072 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5073 ::fidl_next::munge! {
5074 let crate::wire::DirectoryWatchRequest {
5075 mask,
5076 options,
5077 watcher,
5078
5079 } = out_;
5080 }
5081
5082 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
5083
5084 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5085
5086 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
5087
5088 Ok(())
5089 }
5090 }
5091
5092 pub struct NodeOnOpenRequest<T0, T1> {
5094 pub s: T0,
5095
5096 pub info: T1,
5097 }
5098
5099 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
5100 for NodeOnOpenRequest<T0, T1>
5101 where
5102 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5103 ___E: ::fidl_next::Encoder,
5104 ___E: ::fidl_next::fuchsia::HandleEncoder,
5105 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5106 T1: ::fidl_next::Encode<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>,
5107 {
5108 #[inline]
5109 fn encode(
5110 self,
5111 encoder_: &mut ___E,
5112 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
5113 _: (),
5114 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5115 ::fidl_next::munge! {
5116 let crate::wire::NodeOnOpenRequest {
5117 s,
5118 info,
5119
5120 } = out_;
5121 }
5122
5123 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5124
5125 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
5126
5127 Ok(())
5128 }
5129 }
5130
5131 pub struct NodeListExtendedAttributesRequest<T0> {
5133 pub iterator: T0,
5134 }
5135
5136 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
5137 for NodeListExtendedAttributesRequest<T0>
5138 where
5139 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5140 ___E: ::fidl_next::fuchsia::HandleEncoder,
5141 T0: ::fidl_next::Encode<
5142 ::fidl_next::ServerEnd<
5143 crate::ExtendedAttributeIterator,
5144 ::fidl_next::wire::fuchsia::Channel,
5145 >,
5146 ___E,
5147 >,
5148 {
5149 #[inline]
5150 fn encode(
5151 self,
5152 encoder_: &mut ___E,
5153 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
5154 _: (),
5155 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5156 ::fidl_next::munge! {
5157 let crate::wire::NodeListExtendedAttributesRequest {
5158 iterator,
5159
5160 } = out_;
5161 }
5162
5163 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
5164
5165 Ok(())
5166 }
5167 }
5168
5169 pub struct NodeSetExtendedAttributeRequest<T0, T1, T2> {
5171 pub name: T0,
5172
5173 pub value: T1,
5174
5175 pub mode: T2,
5176 }
5177
5178 unsafe impl<___E, T0, T1, T2>
5179 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
5180 for NodeSetExtendedAttributeRequest<T0, T1, T2>
5181 where
5182 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5183 ___E: ::fidl_next::Encoder,
5184 ___E: ::fidl_next::fuchsia::HandleEncoder,
5185 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5186 T1: ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
5187 T2: ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>,
5188 {
5189 #[inline]
5190 fn encode(
5191 self,
5192 encoder_: &mut ___E,
5193 out_: &mut ::core::mem::MaybeUninit<
5194 crate::wire::NodeSetExtendedAttributeRequest<'static>,
5195 >,
5196 _: (),
5197 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5198 ::fidl_next::munge! {
5199 let crate::wire::NodeSetExtendedAttributeRequest {
5200 name,
5201 value,
5202 mode,
5203
5204 } = out_;
5205 }
5206
5207 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
5208
5209 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
5210
5211 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5212
5213 Ok(())
5214 }
5215 }
5216
5217 pub struct OpenableOpenRequest<T0, T1, T2, T3> {
5219 pub path: T0,
5220
5221 pub flags: T1,
5222
5223 pub options: T2,
5224
5225 pub object: T3,
5226 }
5227
5228 unsafe impl<___E, T0, T1, T2, T3>
5229 ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'static>, ___E>
5230 for OpenableOpenRequest<T0, T1, T2, T3>
5231 where
5232 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5233 ___E: ::fidl_next::Encoder,
5234 ___E: ::fidl_next::fuchsia::HandleEncoder,
5235 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5236 T1: ::fidl_next::Encode<crate::wire::Flags, ___E>,
5237 T2: ::fidl_next::Encode<crate::wire::Options<'static>, ___E>,
5238 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
5239 {
5240 #[inline]
5241 fn encode(
5242 self,
5243 encoder_: &mut ___E,
5244 out_: &mut ::core::mem::MaybeUninit<crate::wire::OpenableOpenRequest<'static>>,
5245 _: (),
5246 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5247 ::fidl_next::munge! {
5248 let crate::wire::OpenableOpenRequest {
5249 path,
5250 flags,
5251 options,
5252 object,
5253
5254 } = out_;
5255 }
5256
5257 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5258
5259 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5260
5261 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5262
5263 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5264
5265 Ok(())
5266 }
5267 }
5268
5269 pub struct NodeDeprecatedCloneRequest<T0, T1> {
5271 pub flags: T0,
5272
5273 pub object: T1,
5274 }
5275
5276 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
5277 for NodeDeprecatedCloneRequest<T0, T1>
5278 where
5279 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5280 ___E: ::fidl_next::fuchsia::HandleEncoder,
5281 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5282 T1: ::fidl_next::Encode<
5283 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5284 ___E,
5285 >,
5286 {
5287 #[inline]
5288 fn encode(
5289 self,
5290 encoder_: &mut ___E,
5291 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
5292 _: (),
5293 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5294 ::fidl_next::munge! {
5295 let crate::wire::NodeDeprecatedCloneRequest {
5296 flags,
5297 object,
5298
5299 } = out_;
5300 }
5301
5302 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5303
5304 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5305
5306 Ok(())
5307 }
5308 }
5309
5310 pub struct DirectoryDeprecatedOpenRequest<T0, T1, T2, T3> {
5312 pub flags: T0,
5313
5314 pub mode: T1,
5315
5316 pub path: T2,
5317
5318 pub object: T3,
5319 }
5320
5321 unsafe impl<___E, T0, T1, T2, T3>
5322 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
5323 for DirectoryDeprecatedOpenRequest<T0, T1, T2, T3>
5324 where
5325 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5326 ___E: ::fidl_next::Encoder,
5327 ___E: ::fidl_next::fuchsia::HandleEncoder,
5328 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5329 T1: ::fidl_next::Encode<crate::wire::ModeType, ___E>,
5330 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5331 T3: ::fidl_next::Encode<
5332 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5333 ___E,
5334 >,
5335 {
5336 #[inline]
5337 fn encode(
5338 self,
5339 encoder_: &mut ___E,
5340 out_: &mut ::core::mem::MaybeUninit<
5341 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
5342 >,
5343 _: (),
5344 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5345 ::fidl_next::munge! {
5346 let crate::wire::DirectoryDeprecatedOpenRequest {
5347 flags,
5348 mode,
5349 path,
5350 object,
5351
5352 } = out_;
5353 }
5354
5355 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5356
5357 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5358
5359 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5360
5361 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5362
5363 Ok(())
5364 }
5365 }
5366
5367 pub struct DirectoryCreateSymlinkRequest<T0, T1, T2> {
5369 pub name: T0,
5370
5371 pub target: T1,
5372
5373 pub connection: T2,
5374 }
5375
5376 unsafe impl<___E, T0, T1, T2>
5377 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
5378 for DirectoryCreateSymlinkRequest<T0, T1, T2>
5379 where
5380 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5381 ___E: ::fidl_next::Encoder,
5382 ___E: ::fidl_next::fuchsia::HandleEncoder,
5383 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5384 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5385 T2: ::fidl_next::Encode<
5386 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
5387 ___E,
5388 >,
5389 {
5390 #[inline]
5391 fn encode(
5392 self,
5393 encoder_: &mut ___E,
5394 out_: &mut ::core::mem::MaybeUninit<
5395 crate::wire::DirectoryCreateSymlinkRequest<'static>,
5396 >,
5397 _: (),
5398 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5399 ::fidl_next::munge! {
5400 let crate::wire::DirectoryCreateSymlinkRequest {
5401 name,
5402 target,
5403 connection,
5404
5405 } = out_;
5406 }
5407
5408 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
5409
5410 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
5411
5412 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
5413
5414 Ok(())
5415 }
5416 }
5417
5418 pub struct FileGetBackingMemoryResponse<T0> {
5420 pub vmo: T0,
5421 }
5422
5423 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
5424 for FileGetBackingMemoryResponse<T0>
5425 where
5426 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5427 ___E: ::fidl_next::fuchsia::HandleEncoder,
5428 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
5429 {
5430 #[inline]
5431 fn encode(
5432 self,
5433 encoder_: &mut ___E,
5434 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
5435 _: (),
5436 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5437 ::fidl_next::munge! {
5438 let crate::wire::FileGetBackingMemoryResponse {
5439 vmo,
5440
5441 } = out_;
5442 }
5443
5444 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
5445
5446 Ok(())
5447 }
5448 }
5449
5450 pub struct LinkableLinkIntoRequest<T0, T1> {
5452 pub dst_parent_token: T0,
5453
5454 pub dst: T1,
5455 }
5456
5457 unsafe impl<___E, T0, T1>
5458 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
5459 for LinkableLinkIntoRequest<T0, T1>
5460 where
5461 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5462 ___E: ::fidl_next::Encoder,
5463 ___E: ::fidl_next::fuchsia::HandleEncoder,
5464 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5465 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5466 {
5467 #[inline]
5468 fn encode(
5469 self,
5470 encoder_: &mut ___E,
5471 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
5472 _: (),
5473 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5474 ::fidl_next::munge! {
5475 let crate::wire::LinkableLinkIntoRequest {
5476 dst_parent_token,
5477 dst,
5478
5479 } = out_;
5480 }
5481
5482 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5483
5484 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5485
5486 Ok(())
5487 }
5488 }
5489
5490 pub struct FileAllocateRequest<T0, T1, T2> {
5492 pub offset: T0,
5493
5494 pub length: T1,
5495
5496 pub mode: T2,
5497 }
5498
5499 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
5500 for FileAllocateRequest<T0, T1, T2>
5501 where
5502 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5503 ___E: ::fidl_next::fuchsia::HandleEncoder,
5504 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5505 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5506 T2: ::fidl_next::Encode<crate::wire::AllocateMode, ___E>,
5507 {
5508 #[inline]
5509 fn encode(
5510 self,
5511 encoder_: &mut ___E,
5512 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
5513 _: (),
5514 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5515 ::fidl_next::munge! {
5516 let crate::wire::FileAllocateRequest {
5517 offset,
5518 length,
5519 mode,
5520
5521 } = out_;
5522 }
5523
5524 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
5525
5526 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
5527
5528 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5529
5530 Ok(())
5531 }
5532 }
5533
5534 pub struct FileEnableVerityRequest<T0> {
5536 pub options: T0,
5537 }
5538
5539 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
5540 for FileEnableVerityRequest<T0>
5541 where
5542 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5543 ___E: ::fidl_next::Encoder,
5544 ___E: ::fidl_next::fuchsia::HandleEncoder,
5545 T0: ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>,
5546 {
5547 #[inline]
5548 fn encode(
5549 self,
5550 encoder_: &mut ___E,
5551 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
5552 _: (),
5553 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5554 ::fidl_next::munge! {
5555 let crate::wire::FileEnableVerityRequest {
5556 options,
5557
5558 } = out_;
5559 }
5560
5561 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5562
5563 Ok(())
5564 }
5565 }
5566
5567 pub struct FileObject<T0, T1> {
5569 pub event: T0,
5570
5571 pub stream: T1,
5572 }
5573
5574 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject<T0, T1>
5575 where
5576 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5577 ___E: ::fidl_next::fuchsia::HandleEncoder,
5578 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
5579 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalStream, ___E>,
5580 {
5581 #[inline]
5582 fn encode(
5583 self,
5584 encoder_: &mut ___E,
5585 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
5586 _: (),
5587 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5588 ::fidl_next::munge! {
5589 let crate::wire::FileObject {
5590 event,
5591 stream,
5592
5593 } = out_;
5594 }
5595
5596 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
5597
5598 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
5599
5600 Ok(())
5601 }
5602 }
5603}
5604
5605pub use self::natural::*;
5606
5607#[doc = " Openable defines a node which is capable of opening other objects.\n"]
5609#[derive(PartialEq, Debug)]
5610pub struct Openable;
5611
5612#[cfg(target_os = "fuchsia")]
5613impl ::fidl_next::HasTransport for Openable {
5614 type Transport = ::fidl_next::fuchsia::zx::Channel;
5615}
5616
5617pub mod openable {
5618 pub mod prelude {
5619 pub use crate::{
5620 Openable, OpenableClientHandler, OpenableLocalClientHandler,
5621 OpenableLocalServerHandler, OpenableServerHandler, openable,
5622 };
5623
5624 pub use crate::natural::OpenableOpenRequest;
5625 }
5626
5627 pub struct Open;
5628
5629 impl ::fidl_next::Method for Open {
5630 const ORDINAL: u64 = 6236883748953765593;
5631 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5632 ::fidl_next::protocol::Flexibility::Flexible;
5633
5634 type Protocol = crate::Openable;
5635
5636 type Request = crate::wire::OpenableOpenRequest<'static>;
5637 }
5638
5639 mod ___detail {
5640 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Openable
5641 where
5642 ___T: ::fidl_next::Transport,
5643 {
5644 type Client = OpenableClient<___T>;
5645 type Server = OpenableServer<___T>;
5646 }
5647
5648 #[repr(transparent)]
5650 pub struct OpenableClient<___T: ::fidl_next::Transport> {
5651 #[allow(dead_code)]
5652 client: ::fidl_next::protocol::Client<___T>,
5653 }
5654
5655 impl<___T> OpenableClient<___T>
5656 where
5657 ___T: ::fidl_next::Transport,
5658 {
5659 #[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"]
5660 pub fn open(
5661 &self,
5662
5663 path: impl ::fidl_next::Encode<
5664 ::fidl_next::wire::String<'static>,
5665 <___T as ::fidl_next::Transport>::SendBuffer,
5666 >,
5667
5668 flags: impl ::fidl_next::Encode<
5669 crate::wire::Flags,
5670 <___T as ::fidl_next::Transport>::SendBuffer,
5671 >,
5672
5673 options: impl ::fidl_next::Encode<
5674 crate::wire::Options<'static>,
5675 <___T as ::fidl_next::Transport>::SendBuffer,
5676 >,
5677
5678 object: impl ::fidl_next::Encode<
5679 ::fidl_next::wire::fuchsia::Channel,
5680 <___T as ::fidl_next::Transport>::SendBuffer,
5681 >,
5682 ) -> ::fidl_next::SendFuture<'_, ___T>
5683 where
5684 <___T as ::fidl_next::Transport>::SendBuffer:
5685 ::fidl_next::encoder::InternalHandleEncoder,
5686 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5687 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5688 {
5689 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
5690 }
5691
5692 #[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"]
5693 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
5694 where
5695 ___R: ::fidl_next::Encode<
5696 crate::wire::OpenableOpenRequest<'static>,
5697 <___T as ::fidl_next::Transport>::SendBuffer,
5698 >,
5699 {
5700 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5701 6236883748953765593,
5702 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
5703 request,
5704 ))
5705 }
5706 }
5707
5708 #[repr(transparent)]
5710 pub struct OpenableServer<___T: ::fidl_next::Transport> {
5711 server: ::fidl_next::protocol::Server<___T>,
5712 }
5713
5714 impl<___T> OpenableServer<___T> where ___T: ::fidl_next::Transport {}
5715 }
5716}
5717
5718#[diagnostic::on_unimplemented(
5719 note = "If {Self} implements the non-local OpenableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5720)]
5721
5722pub trait OpenableLocalClientHandler<
5726 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5727 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5728>
5729{
5730 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5731 ::core::future::ready(())
5732 }
5733}
5734
5735impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Openable
5736where
5737 ___H: OpenableLocalClientHandler<___T>,
5738 ___T: ::fidl_next::Transport,
5739{
5740 async fn on_event(
5741 handler: &mut ___H,
5742 ordinal: u64,
5743 flexibility: ::fidl_next::protocol::Flexibility,
5744 body: ::fidl_next::Body<___T>,
5745 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5746 match ordinal {
5747 ordinal => {
5748 handler.on_unknown_interaction(ordinal).await;
5749 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
5750 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5751 } else {
5752 Ok(())
5753 }
5754 }
5755 }
5756 }
5757}
5758
5759#[diagnostic::on_unimplemented(
5760 note = "If {Self} implements the non-local OpenableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5761)]
5762
5763pub trait OpenableLocalServerHandler<
5767 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5768 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5769>
5770{
5771 #[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"]
5772 fn open(
5773 &mut self,
5774
5775 request: ::fidl_next::Request<openable::Open, ___T>,
5776 ) -> impl ::core::future::Future<Output = ()>;
5777
5778 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5779 ::core::future::ready(())
5780 }
5781}
5782
5783impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Openable
5784where
5785 ___H: OpenableLocalServerHandler<___T>,
5786 ___T: ::fidl_next::Transport,
5787 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
5788 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5789 Constraint = (),
5790 >,
5791{
5792 async fn on_one_way(
5793 handler: &mut ___H,
5794 ordinal: u64,
5795 flexibility: ::fidl_next::protocol::Flexibility,
5796 body: ::fidl_next::Body<___T>,
5797 ) -> ::core::result::Result<
5798 (),
5799 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5800 > {
5801 match ordinal {
5802 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
5803 Ok(decoded) => {
5804 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
5805 Ok(())
5806 }
5807 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5808 ordinal: 6236883748953765593,
5809 error,
5810 }),
5811 },
5812
5813 ordinal => {
5814 handler.on_unknown_interaction(ordinal).await;
5815 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
5816 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5817 } else {
5818 Ok(())
5819 }
5820 }
5821 }
5822 }
5823
5824 async fn on_two_way(
5825 handler: &mut ___H,
5826 ordinal: u64,
5827 flexibility: ::fidl_next::protocol::Flexibility,
5828 body: ::fidl_next::Body<___T>,
5829 responder: ::fidl_next::protocol::Responder<___T>,
5830 ) -> ::core::result::Result<
5831 (),
5832 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5833 > {
5834 match ordinal {
5835 ordinal => {
5836 handler.on_unknown_interaction(ordinal).await;
5837 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
5838 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5839 } else {
5840 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
5841 ordinal,
5842 flexibility,
5843 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
5844 )
5845 .expect("encoding a framework error should never fail")
5846 .await?;
5847 Ok(())
5848 }
5849 }
5850 }
5851 }
5852}
5853
5854pub trait OpenableClientHandler<
5858 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5859 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5860>
5861{
5862 fn on_unknown_interaction(
5863 &mut self,
5864 ordinal: u64,
5865 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5866 ::core::future::ready(())
5867 }
5868}
5869
5870impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Openable
5871where
5872 ___H: OpenableClientHandler<___T> + ::core::marker::Send,
5873 ___T: ::fidl_next::Transport,
5874{
5875 async fn on_event(
5876 handler: &mut ___H,
5877 ordinal: u64,
5878 flexibility: ::fidl_next::protocol::Flexibility,
5879 body: ::fidl_next::Body<___T>,
5880 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5881 match ordinal {
5882 ordinal => {
5883 handler.on_unknown_interaction(ordinal).await;
5884 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
5885 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5886 } else {
5887 Ok(())
5888 }
5889 }
5890 }
5891 }
5892}
5893
5894pub trait OpenableServerHandler<
5898 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5899 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5900>
5901{
5902 #[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"]
5903 fn open(
5904 &mut self,
5905
5906 request: ::fidl_next::Request<openable::Open, ___T>,
5907 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5908
5909 fn on_unknown_interaction(
5910 &mut self,
5911 ordinal: u64,
5912 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5913 ::core::future::ready(())
5914 }
5915}
5916
5917impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Openable
5918where
5919 ___H: OpenableServerHandler<___T> + ::core::marker::Send,
5920 ___T: ::fidl_next::Transport,
5921 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
5922 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5923 Constraint = (),
5924 >,
5925{
5926 async fn on_one_way(
5927 handler: &mut ___H,
5928 ordinal: u64,
5929 flexibility: ::fidl_next::protocol::Flexibility,
5930 body: ::fidl_next::Body<___T>,
5931 ) -> ::core::result::Result<
5932 (),
5933 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5934 > {
5935 match ordinal {
5936 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
5937 Ok(decoded) => {
5938 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
5939 Ok(())
5940 }
5941 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5942 ordinal: 6236883748953765593,
5943 error,
5944 }),
5945 },
5946
5947 ordinal => {
5948 handler.on_unknown_interaction(ordinal).await;
5949 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
5950 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5951 } else {
5952 Ok(())
5953 }
5954 }
5955 }
5956 }
5957
5958 async fn on_two_way(
5959 handler: &mut ___H,
5960 ordinal: u64,
5961 flexibility: ::fidl_next::protocol::Flexibility,
5962 body: ::fidl_next::Body<___T>,
5963 responder: ::fidl_next::protocol::Responder<___T>,
5964 ) -> ::core::result::Result<
5965 (),
5966 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5967 > {
5968 match ordinal {
5969 ordinal => {
5970 handler.on_unknown_interaction(ordinal).await;
5971 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
5972 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5973 } else {
5974 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
5975 ordinal,
5976 flexibility,
5977 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
5978 )
5979 .expect("encoding a framework error should never fail")
5980 .await?;
5981 Ok(())
5982 }
5983 }
5984 }
5985 }
5986}
5987
5988impl<___T> OpenableClientHandler<___T> for ::fidl_next::IgnoreEvents
5989where
5990 ___T: ::fidl_next::Transport,
5991{
5992 async fn on_unknown_interaction(&mut self, _: u64) {}
5993}
5994
5995impl<___H, ___T> OpenableLocalClientHandler<___T> for ::fidl_next::Local<___H>
5996where
5997 ___H: OpenableClientHandler<___T>,
5998 ___T: ::fidl_next::Transport,
5999{
6000 async fn on_unknown_interaction(&mut self, ordinal: u64) {
6001 ___H::on_unknown_interaction(&mut self.0, ordinal).await
6002 }
6003}
6004
6005impl<___H, ___T> OpenableLocalServerHandler<___T> for ::fidl_next::Local<___H>
6006where
6007 ___H: OpenableServerHandler<___T>,
6008 ___T: ::fidl_next::Transport,
6009{
6010 async fn open(&mut self, request: ::fidl_next::Request<openable::Open, ___T>) {
6011 ___H::open(&mut self.0, request).await
6012 }
6013
6014 async fn on_unknown_interaction(&mut self, ordinal: u64) {
6015 ___H::on_unknown_interaction(&mut self.0, ordinal).await
6016 }
6017}
6018
6019#[doc = " Node defines the minimal interface for entities which can be accessed in a filesystem.\n"]
6021#[derive(PartialEq, Debug)]
6022pub struct Node;
6023
6024impl ::fidl_next::Discoverable for Node {
6025 const PROTOCOL_NAME: &'static str = "fuchsia.io.Node";
6026}
6027
6028#[cfg(target_os = "fuchsia")]
6029impl ::fidl_next::HasTransport for Node {
6030 type Transport = ::fidl_next::fuchsia::zx::Channel;
6031}
6032
6033pub mod node {
6034 pub mod prelude {
6035 pub use crate::{
6036 Node, NodeClientHandler, NodeLocalClientHandler, NodeLocalServerHandler,
6037 NodeServerHandler, node,
6038 };
6039
6040 pub use crate::natural::ExtendedAttributeValue;
6041
6042 pub use crate::natural::MutableNodeAttributes;
6043
6044 pub use crate::natural::NodeAttributes2;
6045
6046 pub use crate::natural::NodeDeprecatedCloneRequest;
6047
6048 pub use crate::natural::NodeDeprecatedGetAttrResponse;
6049
6050 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
6051
6052 pub use crate::natural::NodeDeprecatedSetAttrRequest;
6053
6054 pub use crate::natural::NodeDeprecatedSetAttrResponse;
6055
6056 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
6057
6058 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
6059
6060 pub use crate::natural::NodeGetAttributesRequest;
6061
6062 pub use crate::natural::NodeGetExtendedAttributeRequest;
6063
6064 pub use crate::natural::NodeListExtendedAttributesRequest;
6065
6066 pub use crate::natural::NodeOnOpenRequest;
6067
6068 pub use crate::natural::NodeQueryFilesystemResponse;
6069
6070 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
6071
6072 pub use crate::natural::NodeSetExtendedAttributeRequest;
6073
6074 pub use crate::natural::NodeSetFlagsRequest;
6075
6076 pub use crate::natural::NodeGetFlagsResponse;
6077
6078 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
6079
6080 pub use crate::natural::NodeSetExtendedAttributeResponse;
6081
6082 pub use crate::natural::NodeSetFlagsResponse;
6083
6084 pub use crate::natural::NodeSyncResponse;
6085
6086 pub use crate::natural::NodeUpdateAttributesResponse;
6087
6088 pub use crate::natural::Representation;
6089
6090 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
6091
6092 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
6093
6094 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
6095 }
6096
6097 pub struct Clone;
6098
6099 impl ::fidl_next::Method for Clone {
6100 const ORDINAL: u64 = 2366825959783828089;
6101 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6102 ::fidl_next::protocol::Flexibility::Strict;
6103
6104 type Protocol = crate::Node;
6105
6106 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
6107 }
6108
6109 pub struct Close;
6110
6111 impl ::fidl_next::Method for Close {
6112 const ORDINAL: u64 = 6540867515453498750;
6113 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6114 ::fidl_next::protocol::Flexibility::Strict;
6115
6116 type Protocol = crate::Node;
6117
6118 type Request = ::fidl_next::wire::EmptyMessageBody;
6119 }
6120
6121 impl ::fidl_next::TwoWayMethod for Close {
6122 type Response = ::fidl_next::wire::Result<
6123 'static,
6124 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
6125 ::fidl_next::wire::Int32,
6126 >;
6127 }
6128
6129 impl<___R> ::fidl_next::Respond<___R> for Close {
6130 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6131
6132 fn respond(response: ___R) -> Self::Output {
6133 ::core::result::Result::Ok(response)
6134 }
6135 }
6136
6137 impl<___R> ::fidl_next::RespondErr<___R> for Close {
6138 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6139
6140 fn respond_err(response: ___R) -> Self::Output {
6141 ::core::result::Result::Err(response)
6142 }
6143 }
6144
6145 pub struct Query;
6146
6147 impl ::fidl_next::Method for Query {
6148 const ORDINAL: u64 = 2763219980499352582;
6149 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6150 ::fidl_next::protocol::Flexibility::Strict;
6151
6152 type Protocol = crate::Node;
6153
6154 type Request = ::fidl_next::wire::EmptyMessageBody;
6155 }
6156
6157 impl ::fidl_next::TwoWayMethod for Query {
6158 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
6159 }
6160
6161 impl<___R> ::fidl_next::Respond<___R> for Query {
6162 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
6163
6164 fn respond(response: ___R) -> Self::Output {
6165 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
6166 }
6167 }
6168
6169 pub struct DeprecatedClone;
6170
6171 impl ::fidl_next::Method for DeprecatedClone {
6172 const ORDINAL: u64 = 6512600400724287855;
6173 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6174 ::fidl_next::protocol::Flexibility::Flexible;
6175
6176 type Protocol = crate::Node;
6177
6178 type Request = crate::wire::NodeDeprecatedCloneRequest;
6179 }
6180
6181 pub struct OnOpen;
6182
6183 impl ::fidl_next::Method for OnOpen {
6184 const ORDINAL: u64 = 9207534335756671346;
6185 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6186 ::fidl_next::protocol::Flexibility::Flexible;
6187
6188 type Protocol = crate::Node;
6189
6190 type Request = crate::wire::NodeOnOpenRequest<'static>;
6191 }
6192
6193 pub struct DeprecatedGetAttr;
6194
6195 impl ::fidl_next::Method for DeprecatedGetAttr {
6196 const ORDINAL: u64 = 8689798978500614909;
6197 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6198 ::fidl_next::protocol::Flexibility::Strict;
6199
6200 type Protocol = crate::Node;
6201
6202 type Request = ::fidl_next::wire::EmptyMessageBody;
6203 }
6204
6205 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
6206 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
6207 }
6208
6209 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
6210 type Output = ___R;
6211
6212 fn respond(response: ___R) -> Self::Output {
6213 response
6214 }
6215 }
6216
6217 pub struct DeprecatedSetAttr;
6218
6219 impl ::fidl_next::Method for DeprecatedSetAttr {
6220 const ORDINAL: u64 = 4721673413776871238;
6221 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6222 ::fidl_next::protocol::Flexibility::Strict;
6223
6224 type Protocol = crate::Node;
6225
6226 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
6227 }
6228
6229 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
6230 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
6231 }
6232
6233 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
6234 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
6235
6236 fn respond(response: ___R) -> Self::Output {
6237 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
6238 }
6239 }
6240
6241 pub struct DeprecatedGetFlags;
6242
6243 impl ::fidl_next::Method for DeprecatedGetFlags {
6244 const ORDINAL: u64 = 6595803110182632097;
6245 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6246 ::fidl_next::protocol::Flexibility::Strict;
6247
6248 type Protocol = crate::Node;
6249
6250 type Request = ::fidl_next::wire::EmptyMessageBody;
6251 }
6252
6253 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
6254 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
6255 }
6256
6257 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
6258 type Output = ___R;
6259
6260 fn respond(response: ___R) -> Self::Output {
6261 response
6262 }
6263 }
6264
6265 pub struct DeprecatedSetFlags;
6266
6267 impl ::fidl_next::Method for DeprecatedSetFlags {
6268 const ORDINAL: u64 = 5950864159036794675;
6269 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6270 ::fidl_next::protocol::Flexibility::Strict;
6271
6272 type Protocol = crate::Node;
6273
6274 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
6275 }
6276
6277 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
6278 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
6279 }
6280
6281 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
6282 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
6283
6284 fn respond(response: ___R) -> Self::Output {
6285 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
6286 }
6287 }
6288
6289 pub struct GetFlags;
6290
6291 impl ::fidl_next::Method for GetFlags {
6292 const ORDINAL: u64 = 105530239381466147;
6293 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6294 ::fidl_next::protocol::Flexibility::Flexible;
6295
6296 type Protocol = crate::Node;
6297
6298 type Request = ::fidl_next::wire::EmptyMessageBody;
6299 }
6300
6301 impl ::fidl_next::TwoWayMethod for GetFlags {
6302 type Response = ::fidl_next::wire::FlexibleResult<
6303 'static,
6304 crate::wire::NodeGetFlagsResponse,
6305 ::fidl_next::wire::Int32,
6306 >;
6307 }
6308
6309 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
6310 type Output = ::fidl_next::FlexibleResult<
6311 crate::generic::NodeGetFlagsResponse<___R>,
6312 ::fidl_next::util::Never,
6313 >;
6314
6315 fn respond(response: ___R) -> Self::Output {
6316 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
6317 flags: response,
6318 })
6319 }
6320 }
6321
6322 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
6323 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
6324
6325 fn respond_err(response: ___R) -> Self::Output {
6326 ::fidl_next::FlexibleResult::Err(response)
6327 }
6328 }
6329
6330 pub struct SetFlags;
6331
6332 impl ::fidl_next::Method for SetFlags {
6333 const ORDINAL: u64 = 6172186066099445416;
6334 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6335 ::fidl_next::protocol::Flexibility::Flexible;
6336
6337 type Protocol = crate::Node;
6338
6339 type Request = crate::wire::NodeSetFlagsRequest;
6340 }
6341
6342 impl ::fidl_next::TwoWayMethod for SetFlags {
6343 type Response = ::fidl_next::wire::FlexibleResult<
6344 'static,
6345 crate::wire::NodeSetFlagsResponse,
6346 ::fidl_next::wire::Int32,
6347 >;
6348 }
6349
6350 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
6351 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
6352
6353 fn respond(response: ___R) -> Self::Output {
6354 ::fidl_next::FlexibleResult::Ok(response)
6355 }
6356 }
6357
6358 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
6359 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
6360
6361 fn respond_err(response: ___R) -> Self::Output {
6362 ::fidl_next::FlexibleResult::Err(response)
6363 }
6364 }
6365
6366 pub struct QueryFilesystem;
6367
6368 impl ::fidl_next::Method for QueryFilesystem {
6369 const ORDINAL: u64 = 8013111122914313744;
6370 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6371 ::fidl_next::protocol::Flexibility::Strict;
6372
6373 type Protocol = crate::Node;
6374
6375 type Request = ::fidl_next::wire::EmptyMessageBody;
6376 }
6377
6378 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
6379 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
6380 }
6381
6382 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
6383 type Output = ___R;
6384
6385 fn respond(response: ___R) -> Self::Output {
6386 response
6387 }
6388 }
6389
6390 pub struct OnRepresentation;
6391
6392 impl ::fidl_next::Method for OnRepresentation {
6393 const ORDINAL: u64 = 6679970090861613324;
6394 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6395 ::fidl_next::protocol::Flexibility::Strict;
6396
6397 type Protocol = crate::Node;
6398
6399 type Request = crate::wire::Representation<'static>;
6400 }
6401
6402 pub struct GetAttributes;
6403
6404 impl ::fidl_next::Method for GetAttributes {
6405 const ORDINAL: u64 = 4414537700416816443;
6406 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6407 ::fidl_next::protocol::Flexibility::Strict;
6408
6409 type Protocol = crate::Node;
6410
6411 type Request = crate::wire::NodeGetAttributesRequest;
6412 }
6413
6414 impl ::fidl_next::TwoWayMethod for GetAttributes {
6415 type Response = ::fidl_next::wire::Result<
6416 'static,
6417 crate::wire::NodeAttributes2<'static>,
6418 ::fidl_next::wire::Int32,
6419 >;
6420 }
6421
6422 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
6423 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6424
6425 fn respond(response: ___R) -> Self::Output {
6426 ::core::result::Result::Ok(response)
6427 }
6428 }
6429
6430 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
6431 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6432
6433 fn respond_err(response: ___R) -> Self::Output {
6434 ::core::result::Result::Err(response)
6435 }
6436 }
6437
6438 pub struct UpdateAttributes;
6439
6440 impl ::fidl_next::Method for UpdateAttributes {
6441 const ORDINAL: u64 = 3677402239314018056;
6442 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6443 ::fidl_next::protocol::Flexibility::Strict;
6444
6445 type Protocol = crate::Node;
6446
6447 type Request = crate::wire::MutableNodeAttributes<'static>;
6448 }
6449
6450 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
6451 type Response = ::fidl_next::wire::Result<
6452 'static,
6453 crate::wire::NodeUpdateAttributesResponse,
6454 ::fidl_next::wire::Int32,
6455 >;
6456 }
6457
6458 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
6459 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6460
6461 fn respond(response: ___R) -> Self::Output {
6462 ::core::result::Result::Ok(response)
6463 }
6464 }
6465
6466 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
6467 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6468
6469 fn respond_err(response: ___R) -> Self::Output {
6470 ::core::result::Result::Err(response)
6471 }
6472 }
6473
6474 pub struct Sync;
6475
6476 impl ::fidl_next::Method for Sync {
6477 const ORDINAL: u64 = 3196473584242777161;
6478 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6479 ::fidl_next::protocol::Flexibility::Strict;
6480
6481 type Protocol = crate::Node;
6482
6483 type Request = ::fidl_next::wire::EmptyMessageBody;
6484 }
6485
6486 impl ::fidl_next::TwoWayMethod for Sync {
6487 type Response = ::fidl_next::wire::Result<
6488 'static,
6489 crate::wire::NodeSyncResponse,
6490 ::fidl_next::wire::Int32,
6491 >;
6492 }
6493
6494 impl<___R> ::fidl_next::Respond<___R> for Sync {
6495 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6496
6497 fn respond(response: ___R) -> Self::Output {
6498 ::core::result::Result::Ok(response)
6499 }
6500 }
6501
6502 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
6503 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6504
6505 fn respond_err(response: ___R) -> Self::Output {
6506 ::core::result::Result::Err(response)
6507 }
6508 }
6509
6510 pub struct ListExtendedAttributes;
6511
6512 impl ::fidl_next::Method for ListExtendedAttributes {
6513 const ORDINAL: u64 = 5431626189872037072;
6514 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6515 ::fidl_next::protocol::Flexibility::Strict;
6516
6517 type Protocol = crate::Node;
6518
6519 type Request = crate::wire::NodeListExtendedAttributesRequest;
6520 }
6521
6522 pub struct GetExtendedAttribute;
6523
6524 impl ::fidl_next::Method for GetExtendedAttribute {
6525 const ORDINAL: u64 = 5043930208506967771;
6526 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6527 ::fidl_next::protocol::Flexibility::Strict;
6528
6529 type Protocol = crate::Node;
6530
6531 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
6532 }
6533
6534 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
6535 type Response = ::fidl_next::wire::Result<
6536 'static,
6537 crate::wire::ExtendedAttributeValue<'static>,
6538 ::fidl_next::wire::Int32,
6539 >;
6540 }
6541
6542 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
6543 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6544
6545 fn respond(response: ___R) -> Self::Output {
6546 ::core::result::Result::Ok(response)
6547 }
6548 }
6549
6550 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
6551 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6552
6553 fn respond_err(response: ___R) -> Self::Output {
6554 ::core::result::Result::Err(response)
6555 }
6556 }
6557
6558 pub struct SetExtendedAttribute;
6559
6560 impl ::fidl_next::Method for SetExtendedAttribute {
6561 const ORDINAL: u64 = 5374223046099989052;
6562 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6563 ::fidl_next::protocol::Flexibility::Strict;
6564
6565 type Protocol = crate::Node;
6566
6567 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
6568 }
6569
6570 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
6571 type Response = ::fidl_next::wire::Result<
6572 'static,
6573 crate::wire::NodeSetExtendedAttributeResponse,
6574 ::fidl_next::wire::Int32,
6575 >;
6576 }
6577
6578 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
6579 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6580
6581 fn respond(response: ___R) -> Self::Output {
6582 ::core::result::Result::Ok(response)
6583 }
6584 }
6585
6586 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
6587 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6588
6589 fn respond_err(response: ___R) -> Self::Output {
6590 ::core::result::Result::Err(response)
6591 }
6592 }
6593
6594 pub struct RemoveExtendedAttribute;
6595
6596 impl ::fidl_next::Method for RemoveExtendedAttribute {
6597 const ORDINAL: u64 = 8794297771444732717;
6598 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6599 ::fidl_next::protocol::Flexibility::Strict;
6600
6601 type Protocol = crate::Node;
6602
6603 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
6604 }
6605
6606 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
6607 type Response = ::fidl_next::wire::Result<
6608 'static,
6609 crate::wire::NodeRemoveExtendedAttributeResponse,
6610 ::fidl_next::wire::Int32,
6611 >;
6612 }
6613
6614 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
6615 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6616
6617 fn respond(response: ___R) -> Self::Output {
6618 ::core::result::Result::Ok(response)
6619 }
6620 }
6621
6622 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
6623 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6624
6625 fn respond_err(response: ___R) -> Self::Output {
6626 ::core::result::Result::Err(response)
6627 }
6628 }
6629
6630 mod ___detail {
6631 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
6632 where
6633 ___T: ::fidl_next::Transport,
6634 {
6635 type Client = NodeClient<___T>;
6636 type Server = NodeServer<___T>;
6637 }
6638
6639 #[repr(transparent)]
6641 pub struct NodeClient<___T: ::fidl_next::Transport> {
6642 #[allow(dead_code)]
6643 client: ::fidl_next::protocol::Client<___T>,
6644 }
6645
6646 impl<___T> NodeClient<___T>
6647 where
6648 ___T: ::fidl_next::Transport,
6649 {
6650 pub fn clone(
6651 &self,
6652
6653 request: impl ::fidl_next::Encode<
6654 ::fidl_next::ServerEnd<
6655 ::fidl_next_fuchsia_unknown::Cloneable,
6656 ::fidl_next::wire::fuchsia::Channel,
6657 >,
6658 <___T as ::fidl_next::Transport>::SendBuffer,
6659 >,
6660 ) -> ::fidl_next::SendFuture<'_, ___T>
6661 where
6662 <___T as ::fidl_next::Transport>::SendBuffer:
6663 ::fidl_next::encoder::InternalHandleEncoder,
6664 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6665 {
6666 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
6667 request,
6668 })
6669 }
6670
6671 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6672 where
6673 ___R: ::fidl_next::Encode<
6674 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
6675 <___T as ::fidl_next::Transport>::SendBuffer,
6676 >,
6677 {
6678 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6679 2366825959783828089,
6680 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
6681 request,
6682 ))
6683 }
6684
6685 #[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"]
6686 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
6687 ::fidl_next::TwoWayFuture::from_untyped(
6688 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6689 6540867515453498750,
6690 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
6691 (),
6692 ),
6693 )
6694 }
6695
6696 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
6697 ::fidl_next::TwoWayFuture::from_untyped(
6698 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6699 2763219980499352582,
6700 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
6701 (),
6702 ),
6703 )
6704 }
6705
6706 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6707 pub fn deprecated_clone(
6708 &self,
6709
6710 flags: impl ::fidl_next::Encode<
6711 crate::wire::OpenFlags,
6712 <___T as ::fidl_next::Transport>::SendBuffer,
6713 >,
6714
6715 object: impl ::fidl_next::Encode<
6716 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
6717 <___T as ::fidl_next::Transport>::SendBuffer,
6718 >,
6719 ) -> ::fidl_next::SendFuture<'_, ___T>
6720 where
6721 <___T as ::fidl_next::Transport>::SendBuffer:
6722 ::fidl_next::encoder::InternalHandleEncoder,
6723 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6724 {
6725 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
6726 flags,
6727
6728 object,
6729 })
6730 }
6731
6732 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6733 pub fn deprecated_clone_with<___R>(
6734 &self,
6735 request: ___R,
6736 ) -> ::fidl_next::SendFuture<'_, ___T>
6737 where
6738 ___R: ::fidl_next::Encode<
6739 crate::wire::NodeDeprecatedCloneRequest,
6740 <___T as ::fidl_next::Transport>::SendBuffer,
6741 >,
6742 {
6743 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6744 6512600400724287855,
6745 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
6746 request,
6747 ))
6748 }
6749
6750 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6751 pub fn deprecated_get_attr(
6752 &self,
6753 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
6754 ::fidl_next::TwoWayFuture::from_untyped(
6755 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6756 8689798978500614909,
6757 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
6758 (),
6759 ),
6760 )
6761 }
6762
6763 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6764 pub fn deprecated_set_attr(
6765 &self,
6766
6767 flags: impl ::fidl_next::Encode<
6768 crate::wire::NodeAttributeFlags,
6769 <___T as ::fidl_next::Transport>::SendBuffer,
6770 >,
6771
6772 attributes: impl ::fidl_next::Encode<
6773 crate::wire::NodeAttributes,
6774 <___T as ::fidl_next::Transport>::SendBuffer,
6775 >,
6776 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6777 where
6778 <___T as ::fidl_next::Transport>::SendBuffer:
6779 ::fidl_next::encoder::InternalHandleEncoder,
6780 {
6781 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
6782 flags,
6783
6784 attributes,
6785 })
6786 }
6787
6788 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6789 pub fn deprecated_set_attr_with<___R>(
6790 &self,
6791 request: ___R,
6792 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6793 where
6794 ___R: ::fidl_next::Encode<
6795 crate::wire::NodeDeprecatedSetAttrRequest,
6796 <___T as ::fidl_next::Transport>::SendBuffer,
6797 >,
6798 {
6799 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6800 4721673413776871238,
6801 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
6802 request,
6803 ))
6804 }
6805
6806 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6807 pub fn deprecated_get_flags(
6808 &self,
6809 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
6810 ::fidl_next::TwoWayFuture::from_untyped(
6811 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6812 6595803110182632097,
6813 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
6814 (),
6815 ),
6816 )
6817 }
6818
6819 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6820 pub fn deprecated_set_flags(
6821 &self,
6822
6823 flags: impl ::fidl_next::Encode<
6824 crate::wire::OpenFlags,
6825 <___T as ::fidl_next::Transport>::SendBuffer,
6826 >,
6827 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6828 where
6829 <___T as ::fidl_next::Transport>::SendBuffer:
6830 ::fidl_next::encoder::InternalHandleEncoder,
6831 {
6832 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
6833 flags,
6834 })
6835 }
6836
6837 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6838 pub fn deprecated_set_flags_with<___R>(
6839 &self,
6840 request: ___R,
6841 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6842 where
6843 ___R: ::fidl_next::Encode<
6844 crate::wire::NodeDeprecatedSetFlagsRequest,
6845 <___T as ::fidl_next::Transport>::SendBuffer,
6846 >,
6847 {
6848 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6849 5950864159036794675,
6850 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
6851 request,
6852 ))
6853 }
6854
6855 #[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"]
6856 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
6857 ::fidl_next::TwoWayFuture::from_untyped(
6858 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6859 105530239381466147,
6860 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
6861 (),
6862 ),
6863 )
6864 }
6865
6866 #[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"]
6867 pub fn set_flags(
6868 &self,
6869
6870 flags: impl ::fidl_next::Encode<
6871 crate::wire::Flags,
6872 <___T as ::fidl_next::Transport>::SendBuffer,
6873 >,
6874 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6875 where
6876 <___T as ::fidl_next::Transport>::SendBuffer:
6877 ::fidl_next::encoder::InternalHandleEncoder,
6878 {
6879 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
6880 }
6881
6882 #[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"]
6883 pub fn set_flags_with<___R>(
6884 &self,
6885 request: ___R,
6886 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6887 where
6888 ___R: ::fidl_next::Encode<
6889 crate::wire::NodeSetFlagsRequest,
6890 <___T as ::fidl_next::Transport>::SendBuffer,
6891 >,
6892 {
6893 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6894 6172186066099445416,
6895 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
6896 request,
6897 ))
6898 }
6899
6900 #[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"]
6901 pub fn query_filesystem(
6902 &self,
6903 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
6904 ::fidl_next::TwoWayFuture::from_untyped(
6905 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6906 8013111122914313744,
6907 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
6908 (),
6909 ),
6910 )
6911 }
6912
6913 #[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"]
6914 pub fn get_attributes(
6915 &self,
6916
6917 query: impl ::fidl_next::Encode<
6918 crate::wire::NodeAttributesQuery,
6919 <___T as ::fidl_next::Transport>::SendBuffer,
6920 >,
6921 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6922 where
6923 <___T as ::fidl_next::Transport>::SendBuffer:
6924 ::fidl_next::encoder::InternalHandleEncoder,
6925 {
6926 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
6927 }
6928
6929 #[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"]
6930 pub fn get_attributes_with<___R>(
6931 &self,
6932 request: ___R,
6933 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6934 where
6935 ___R: ::fidl_next::Encode<
6936 crate::wire::NodeGetAttributesRequest,
6937 <___T as ::fidl_next::Transport>::SendBuffer,
6938 >,
6939 {
6940 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6941 4414537700416816443,
6942 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
6943 request,
6944 ))
6945 }
6946
6947 #[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"]
6948 pub fn update_attributes_with<___R>(
6949 &self,
6950 request: ___R,
6951 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
6952 where
6953 ___R: ::fidl_next::Encode<
6954 crate::wire::MutableNodeAttributes<'static>,
6955 <___T as ::fidl_next::Transport>::SendBuffer,
6956 >,
6957 {
6958 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6959 3677402239314018056,
6960 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
6961 request,
6962 ))
6963 }
6964
6965 #[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"]
6966 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
6967 ::fidl_next::TwoWayFuture::from_untyped(
6968 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6969 3196473584242777161,
6970 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
6971 (),
6972 ),
6973 )
6974 }
6975
6976 #[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"]
6977 pub fn list_extended_attributes(
6978 &self,
6979
6980 iterator: impl ::fidl_next::Encode<
6981 ::fidl_next::ServerEnd<
6982 crate::ExtendedAttributeIterator,
6983 ::fidl_next::wire::fuchsia::Channel,
6984 >,
6985 <___T as ::fidl_next::Transport>::SendBuffer,
6986 >,
6987 ) -> ::fidl_next::SendFuture<'_, ___T>
6988 where
6989 <___T as ::fidl_next::Transport>::SendBuffer:
6990 ::fidl_next::encoder::InternalHandleEncoder,
6991 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6992 {
6993 self.list_extended_attributes_with(
6994 crate::generic::NodeListExtendedAttributesRequest { iterator },
6995 )
6996 }
6997
6998 #[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"]
6999 pub fn list_extended_attributes_with<___R>(
7000 &self,
7001 request: ___R,
7002 ) -> ::fidl_next::SendFuture<'_, ___T>
7003 where
7004 ___R: ::fidl_next::Encode<
7005 crate::wire::NodeListExtendedAttributesRequest,
7006 <___T as ::fidl_next::Transport>::SendBuffer,
7007 >,
7008 {
7009 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7010 5431626189872037072,
7011 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
7012 request,
7013 ))
7014 }
7015
7016 #[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"]
7017 pub fn get_extended_attribute(
7018 &self,
7019
7020 name: impl ::fidl_next::Encode<
7021 ::fidl_next::wire::Vector<'static, u8>,
7022 <___T as ::fidl_next::Transport>::SendBuffer,
7023 >,
7024 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
7025 where
7026 <___T as ::fidl_next::Transport>::SendBuffer:
7027 ::fidl_next::encoder::InternalHandleEncoder,
7028 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7029 {
7030 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
7031 name,
7032 })
7033 }
7034
7035 #[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"]
7036 pub fn get_extended_attribute_with<___R>(
7037 &self,
7038 request: ___R,
7039 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
7040 where
7041 ___R: ::fidl_next::Encode<
7042 crate::wire::NodeGetExtendedAttributeRequest<'static>,
7043 <___T as ::fidl_next::Transport>::SendBuffer,
7044 >,
7045 {
7046 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7047 5043930208506967771,
7048 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
7049 request,
7050 ))
7051 }
7052
7053 #[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"]
7054 pub fn set_extended_attribute(
7055 &self,
7056
7057 name: impl ::fidl_next::Encode<
7058 ::fidl_next::wire::Vector<'static, u8>,
7059 <___T as ::fidl_next::Transport>::SendBuffer,
7060 >,
7061
7062 value: impl ::fidl_next::Encode<
7063 crate::wire::ExtendedAttributeValue<'static>,
7064 <___T as ::fidl_next::Transport>::SendBuffer,
7065 >,
7066
7067 mode: impl ::fidl_next::Encode<
7068 crate::wire::SetExtendedAttributeMode,
7069 <___T as ::fidl_next::Transport>::SendBuffer,
7070 >,
7071 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
7072 where
7073 <___T as ::fidl_next::Transport>::SendBuffer:
7074 ::fidl_next::encoder::InternalHandleEncoder,
7075 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7076 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7077 {
7078 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
7079 name,
7080
7081 value,
7082
7083 mode,
7084 })
7085 }
7086
7087 #[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"]
7088 pub fn set_extended_attribute_with<___R>(
7089 &self,
7090 request: ___R,
7091 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
7092 where
7093 ___R: ::fidl_next::Encode<
7094 crate::wire::NodeSetExtendedAttributeRequest<'static>,
7095 <___T as ::fidl_next::Transport>::SendBuffer,
7096 >,
7097 {
7098 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7099 5374223046099989052,
7100 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
7101 request,
7102 ))
7103 }
7104
7105 #[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"]
7106 pub fn remove_extended_attribute(
7107 &self,
7108
7109 name: impl ::fidl_next::Encode<
7110 ::fidl_next::wire::Vector<'static, u8>,
7111 <___T as ::fidl_next::Transport>::SendBuffer,
7112 >,
7113 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
7114 where
7115 <___T as ::fidl_next::Transport>::SendBuffer:
7116 ::fidl_next::encoder::InternalHandleEncoder,
7117 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7118 {
7119 self.remove_extended_attribute_with(
7120 crate::generic::NodeRemoveExtendedAttributeRequest { name },
7121 )
7122 }
7123
7124 #[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"]
7125 pub fn remove_extended_attribute_with<___R>(
7126 &self,
7127 request: ___R,
7128 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
7129 where
7130 ___R: ::fidl_next::Encode<
7131 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
7132 <___T as ::fidl_next::Transport>::SendBuffer,
7133 >,
7134 {
7135 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7136 8794297771444732717,
7137 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
7138 request,
7139 ))
7140 }
7141 }
7142
7143 #[repr(transparent)]
7145 pub struct NodeServer<___T: ::fidl_next::Transport> {
7146 server: ::fidl_next::protocol::Server<___T>,
7147 }
7148
7149 impl<___T> NodeServer<___T>
7150 where
7151 ___T: ::fidl_next::Transport,
7152 {
7153 #[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"]
7154 pub fn on_open(
7155 &self,
7156
7157 s: impl ::fidl_next::Encode<
7158 ::fidl_next::wire::Int32,
7159 <___T as ::fidl_next::Transport>::SendBuffer,
7160 >,
7161
7162 info: impl ::fidl_next::Encode<
7163 crate::wire_optional::NodeInfoDeprecated<'static>,
7164 <___T as ::fidl_next::Transport>::SendBuffer,
7165 >,
7166 ) -> ::fidl_next::SendFuture<'_, ___T>
7167 where
7168 <___T as ::fidl_next::Transport>::SendBuffer:
7169 ::fidl_next::encoder::InternalHandleEncoder,
7170 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7171 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7172 {
7173 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
7174 }
7175
7176 #[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"]
7177
7178 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
7179 where
7180 ___R: ::fidl_next::Encode<
7181 <super::OnOpen as ::fidl_next::Method>::Request,
7182 <___T as ::fidl_next::Transport>::SendBuffer,
7183 >,
7184 {
7185 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
7186 9207534335756671346,
7187 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
7188 request,
7189 ))
7190 }
7191
7192 #[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"]
7193
7194 pub fn on_representation_with<___R>(
7195 &self,
7196 request: ___R,
7197 ) -> ::fidl_next::SendFuture<'_, ___T>
7198 where
7199 ___R: ::fidl_next::Encode<
7200 <super::OnRepresentation as ::fidl_next::Method>::Request,
7201 <___T as ::fidl_next::Transport>::SendBuffer,
7202 >,
7203 {
7204 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
7205 6679970090861613324,
7206 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
7207 request,
7208 ))
7209 }
7210 }
7211 }
7212}
7213
7214#[diagnostic::on_unimplemented(
7215 note = "If {Self} implements the non-local NodeClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
7216)]
7217
7218pub trait NodeLocalClientHandler<
7222 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7223 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7224>
7225{
7226 #[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"]
7227 fn on_open(
7228 &mut self,
7229
7230 request: ::fidl_next::Request<node::OnOpen, ___T>,
7231 ) -> impl ::core::future::Future<Output = ()>;
7232
7233 #[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"]
7234 fn on_representation(
7235 &mut self,
7236
7237 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
7238 ) -> impl ::core::future::Future<Output = ()>;
7239
7240 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7241 ::core::future::ready(())
7242 }
7243}
7244
7245impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Node
7246where
7247 ___H: NodeLocalClientHandler<___T>,
7248 ___T: ::fidl_next::Transport,
7249 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
7250 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7251 Constraint = (),
7252 >,
7253 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
7254 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7255 Constraint = (),
7256 >,
7257{
7258 async fn on_event(
7259 handler: &mut ___H,
7260 ordinal: u64,
7261 flexibility: ::fidl_next::protocol::Flexibility,
7262 body: ::fidl_next::Body<___T>,
7263 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7264 match ordinal {
7265 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7266 Ok(decoded) => {
7267 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
7268 Ok(())
7269 }
7270 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7271 ordinal: 9207534335756671346,
7272 error,
7273 }),
7274 },
7275
7276 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7277 Ok(decoded) => {
7278 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
7279 Ok(())
7280 }
7281 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7282 ordinal: 6679970090861613324,
7283 error,
7284 }),
7285 },
7286
7287 ordinal => {
7288 handler.on_unknown_interaction(ordinal).await;
7289 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7290 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7291 } else {
7292 Ok(())
7293 }
7294 }
7295 }
7296 }
7297}
7298
7299#[diagnostic::on_unimplemented(
7300 note = "If {Self} implements the non-local NodeServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
7301)]
7302
7303pub trait NodeLocalServerHandler<
7307 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7308 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7309>
7310{
7311 fn clone(
7312 &mut self,
7313
7314 request: ::fidl_next::Request<node::Clone, ___T>,
7315 ) -> impl ::core::future::Future<Output = ()>;
7316
7317 #[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"]
7318 fn close(
7319 &mut self,
7320
7321 responder: ::fidl_next::Responder<node::Close, ___T>,
7322 ) -> impl ::core::future::Future<Output = ()>;
7323
7324 fn query(
7325 &mut self,
7326
7327 responder: ::fidl_next::Responder<node::Query, ___T>,
7328 ) -> impl ::core::future::Future<Output = ()>;
7329
7330 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
7331 fn deprecated_clone(
7332 &mut self,
7333
7334 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
7335 ) -> impl ::core::future::Future<Output = ()>;
7336
7337 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
7338 fn deprecated_get_attr(
7339 &mut self,
7340
7341 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
7342 ) -> impl ::core::future::Future<Output = ()>;
7343
7344 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
7345 fn deprecated_set_attr(
7346 &mut self,
7347
7348 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
7349
7350 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
7351 ) -> impl ::core::future::Future<Output = ()>;
7352
7353 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
7354 fn deprecated_get_flags(
7355 &mut self,
7356
7357 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
7358 ) -> impl ::core::future::Future<Output = ()>;
7359
7360 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
7361 fn deprecated_set_flags(
7362 &mut self,
7363
7364 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
7365
7366 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
7367 ) -> impl ::core::future::Future<Output = ()>;
7368
7369 #[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"]
7370 fn get_flags(
7371 &mut self,
7372
7373 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
7374 ) -> impl ::core::future::Future<Output = ()>;
7375
7376 #[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"]
7377 fn set_flags(
7378 &mut self,
7379
7380 request: ::fidl_next::Request<node::SetFlags, ___T>,
7381
7382 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
7383 ) -> impl ::core::future::Future<Output = ()>;
7384
7385 #[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"]
7386 fn query_filesystem(
7387 &mut self,
7388
7389 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
7390 ) -> impl ::core::future::Future<Output = ()>;
7391
7392 #[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"]
7393 fn get_attributes(
7394 &mut self,
7395
7396 request: ::fidl_next::Request<node::GetAttributes, ___T>,
7397
7398 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
7399 ) -> impl ::core::future::Future<Output = ()>;
7400
7401 #[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"]
7402 fn update_attributes(
7403 &mut self,
7404
7405 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
7406
7407 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
7408 ) -> impl ::core::future::Future<Output = ()>;
7409
7410 #[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"]
7411 fn sync(
7412 &mut self,
7413
7414 responder: ::fidl_next::Responder<node::Sync, ___T>,
7415 ) -> impl ::core::future::Future<Output = ()>;
7416
7417 #[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"]
7418 fn list_extended_attributes(
7419 &mut self,
7420
7421 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
7422 ) -> impl ::core::future::Future<Output = ()>;
7423
7424 #[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"]
7425 fn get_extended_attribute(
7426 &mut self,
7427
7428 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
7429
7430 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
7431 ) -> impl ::core::future::Future<Output = ()>;
7432
7433 #[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"]
7434 fn set_extended_attribute(
7435 &mut self,
7436
7437 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
7438
7439 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
7440 ) -> impl ::core::future::Future<Output = ()>;
7441
7442 #[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"]
7443 fn remove_extended_attribute(
7444 &mut self,
7445
7446 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
7447
7448 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
7449 ) -> impl ::core::future::Future<Output = ()>;
7450
7451 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7452 ::core::future::ready(())
7453 }
7454}
7455
7456impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Node
7457where
7458 ___H: NodeLocalServerHandler<___T>,
7459 ___T: ::fidl_next::Transport,
7460 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
7461 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7462 Constraint = (),
7463 >,
7464 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
7465 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7466 Constraint = (),
7467 >,
7468 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
7469 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7470 Constraint = (),
7471 >,
7472 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
7473 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7474 Constraint = (),
7475 >,
7476 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
7477 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7478 Constraint = (),
7479 >,
7480 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
7481 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7482 Constraint = (),
7483 >,
7484 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
7485 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7486 Constraint = (),
7487 >,
7488 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
7489 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7490 Constraint = (),
7491 >,
7492 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7493 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7494 Constraint = (),
7495 >,
7496 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7497 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7498 Constraint = (),
7499 >,
7500 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7501 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7502 Constraint = (),
7503 >,
7504{
7505 async fn on_one_way(
7506 handler: &mut ___H,
7507 ordinal: u64,
7508 flexibility: ::fidl_next::protocol::Flexibility,
7509 body: ::fidl_next::Body<___T>,
7510 ) -> ::core::result::Result<
7511 (),
7512 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7513 > {
7514 match ordinal {
7515 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7516 Ok(decoded) => {
7517 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
7518 Ok(())
7519 }
7520 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7521 ordinal: 2366825959783828089,
7522 error,
7523 }),
7524 },
7525
7526 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7527 Ok(decoded) => {
7528 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
7529 Ok(())
7530 }
7531 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7532 ordinal: 6512600400724287855,
7533 error,
7534 }),
7535 },
7536
7537 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7538 Ok(decoded) => {
7539 handler
7540 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
7541 .await;
7542 Ok(())
7543 }
7544 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7545 ordinal: 5431626189872037072,
7546 error,
7547 }),
7548 },
7549
7550 ordinal => {
7551 handler.on_unknown_interaction(ordinal).await;
7552 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7553 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7554 } else {
7555 Ok(())
7556 }
7557 }
7558 }
7559 }
7560
7561 async fn on_two_way(
7562 handler: &mut ___H,
7563 ordinal: u64,
7564 flexibility: ::fidl_next::protocol::Flexibility,
7565 body: ::fidl_next::Body<___T>,
7566 responder: ::fidl_next::protocol::Responder<___T>,
7567 ) -> ::core::result::Result<
7568 (),
7569 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7570 > {
7571 match ordinal {
7572 6540867515453498750 => {
7573 let responder = ::fidl_next::Responder::from_untyped(responder);
7574
7575 handler.close(responder).await;
7576 Ok(())
7577 }
7578
7579 2763219980499352582 => {
7580 let responder = ::fidl_next::Responder::from_untyped(responder);
7581
7582 handler.query(responder).await;
7583 Ok(())
7584 }
7585
7586 8689798978500614909 => {
7587 let responder = ::fidl_next::Responder::from_untyped(responder);
7588
7589 handler.deprecated_get_attr(responder).await;
7590 Ok(())
7591 }
7592
7593 4721673413776871238 => {
7594 let responder = ::fidl_next::Responder::from_untyped(responder);
7595
7596 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7597 Ok(decoded) => {
7598 handler
7599 .deprecated_set_attr(
7600 ::fidl_next::Request::from_decoded(decoded),
7601 responder,
7602 )
7603 .await;
7604 Ok(())
7605 }
7606 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7607 ordinal: 4721673413776871238,
7608 error,
7609 }),
7610 }
7611 }
7612
7613 6595803110182632097 => {
7614 let responder = ::fidl_next::Responder::from_untyped(responder);
7615
7616 handler.deprecated_get_flags(responder).await;
7617 Ok(())
7618 }
7619
7620 5950864159036794675 => {
7621 let responder = ::fidl_next::Responder::from_untyped(responder);
7622
7623 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7624 Ok(decoded) => {
7625 handler
7626 .deprecated_set_flags(
7627 ::fidl_next::Request::from_decoded(decoded),
7628 responder,
7629 )
7630 .await;
7631 Ok(())
7632 }
7633 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7634 ordinal: 5950864159036794675,
7635 error,
7636 }),
7637 }
7638 }
7639
7640 105530239381466147 => {
7641 let responder = ::fidl_next::Responder::from_untyped(responder);
7642
7643 handler.get_flags(responder).await;
7644 Ok(())
7645 }
7646
7647 6172186066099445416 => {
7648 let responder = ::fidl_next::Responder::from_untyped(responder);
7649
7650 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7651 Ok(decoded) => {
7652 handler
7653 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
7654 .await;
7655 Ok(())
7656 }
7657 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7658 ordinal: 6172186066099445416,
7659 error,
7660 }),
7661 }
7662 }
7663
7664 8013111122914313744 => {
7665 let responder = ::fidl_next::Responder::from_untyped(responder);
7666
7667 handler.query_filesystem(responder).await;
7668 Ok(())
7669 }
7670
7671 4414537700416816443 => {
7672 let responder = ::fidl_next::Responder::from_untyped(responder);
7673
7674 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7675 Ok(decoded) => {
7676 handler
7677 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
7678 .await;
7679 Ok(())
7680 }
7681 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7682 ordinal: 4414537700416816443,
7683 error,
7684 }),
7685 }
7686 }
7687
7688 3677402239314018056 => {
7689 let responder = ::fidl_next::Responder::from_untyped(responder);
7690
7691 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7692 Ok(decoded) => {
7693 handler
7694 .update_attributes(
7695 ::fidl_next::Request::from_decoded(decoded),
7696 responder,
7697 )
7698 .await;
7699 Ok(())
7700 }
7701 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7702 ordinal: 3677402239314018056,
7703 error,
7704 }),
7705 }
7706 }
7707
7708 3196473584242777161 => {
7709 let responder = ::fidl_next::Responder::from_untyped(responder);
7710
7711 handler.sync(responder).await;
7712 Ok(())
7713 }
7714
7715 5043930208506967771 => {
7716 let responder = ::fidl_next::Responder::from_untyped(responder);
7717
7718 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7719 Ok(decoded) => {
7720 handler
7721 .get_extended_attribute(
7722 ::fidl_next::Request::from_decoded(decoded),
7723 responder,
7724 )
7725 .await;
7726 Ok(())
7727 }
7728 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7729 ordinal: 5043930208506967771,
7730 error,
7731 }),
7732 }
7733 }
7734
7735 5374223046099989052 => {
7736 let responder = ::fidl_next::Responder::from_untyped(responder);
7737
7738 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7739 Ok(decoded) => {
7740 handler
7741 .set_extended_attribute(
7742 ::fidl_next::Request::from_decoded(decoded),
7743 responder,
7744 )
7745 .await;
7746 Ok(())
7747 }
7748 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7749 ordinal: 5374223046099989052,
7750 error,
7751 }),
7752 }
7753 }
7754
7755 8794297771444732717 => {
7756 let responder = ::fidl_next::Responder::from_untyped(responder);
7757
7758 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7759 Ok(decoded) => {
7760 handler
7761 .remove_extended_attribute(
7762 ::fidl_next::Request::from_decoded(decoded),
7763 responder,
7764 )
7765 .await;
7766 Ok(())
7767 }
7768 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7769 ordinal: 8794297771444732717,
7770 error,
7771 }),
7772 }
7773 }
7774
7775 ordinal => {
7776 handler.on_unknown_interaction(ordinal).await;
7777 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7778 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7779 } else {
7780 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
7781 ordinal,
7782 flexibility,
7783 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
7784 )
7785 .expect("encoding a framework error should never fail")
7786 .await?;
7787 Ok(())
7788 }
7789 }
7790 }
7791 }
7792}
7793
7794pub trait NodeClientHandler<
7798 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7799 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7800>
7801{
7802 #[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"]
7803 fn on_open(
7804 &mut self,
7805
7806 request: ::fidl_next::Request<node::OnOpen, ___T>,
7807 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7808
7809 #[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"]
7810 fn on_representation(
7811 &mut self,
7812
7813 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
7814 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7815
7816 fn on_unknown_interaction(
7817 &mut self,
7818 ordinal: u64,
7819 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7820 ::core::future::ready(())
7821 }
7822}
7823
7824impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
7825where
7826 ___H: NodeClientHandler<___T> + ::core::marker::Send,
7827 ___T: ::fidl_next::Transport,
7828 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
7829 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7830 Constraint = (),
7831 >,
7832 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
7833 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7834 Constraint = (),
7835 >,
7836{
7837 async fn on_event(
7838 handler: &mut ___H,
7839 ordinal: u64,
7840 flexibility: ::fidl_next::protocol::Flexibility,
7841 body: ::fidl_next::Body<___T>,
7842 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7843 match ordinal {
7844 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7845 Ok(decoded) => {
7846 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
7847 Ok(())
7848 }
7849 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7850 ordinal: 9207534335756671346,
7851 error,
7852 }),
7853 },
7854
7855 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7856 Ok(decoded) => {
7857 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
7858 Ok(())
7859 }
7860 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7861 ordinal: 6679970090861613324,
7862 error,
7863 }),
7864 },
7865
7866 ordinal => {
7867 handler.on_unknown_interaction(ordinal).await;
7868 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7869 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7870 } else {
7871 Ok(())
7872 }
7873 }
7874 }
7875 }
7876}
7877
7878pub trait NodeServerHandler<
7882 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7883 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7884>
7885{
7886 fn clone(
7887 &mut self,
7888
7889 request: ::fidl_next::Request<node::Clone, ___T>,
7890 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7891
7892 #[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"]
7893 fn close(
7894 &mut self,
7895
7896 responder: ::fidl_next::Responder<node::Close, ___T>,
7897 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7898
7899 fn query(
7900 &mut self,
7901
7902 responder: ::fidl_next::Responder<node::Query, ___T>,
7903 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7904
7905 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
7906 fn deprecated_clone(
7907 &mut self,
7908
7909 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
7910 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7911
7912 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
7913 fn deprecated_get_attr(
7914 &mut self,
7915
7916 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
7917 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7918
7919 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
7920 fn deprecated_set_attr(
7921 &mut self,
7922
7923 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
7924
7925 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
7926 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7927
7928 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
7929 fn deprecated_get_flags(
7930 &mut self,
7931
7932 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
7933 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7934
7935 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
7936 fn deprecated_set_flags(
7937 &mut self,
7938
7939 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
7940
7941 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
7942 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7943
7944 #[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"]
7945 fn get_flags(
7946 &mut self,
7947
7948 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
7949 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7950
7951 #[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"]
7952 fn set_flags(
7953 &mut self,
7954
7955 request: ::fidl_next::Request<node::SetFlags, ___T>,
7956
7957 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
7958 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7959
7960 #[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"]
7961 fn query_filesystem(
7962 &mut self,
7963
7964 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
7965 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7966
7967 #[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"]
7968 fn get_attributes(
7969 &mut self,
7970
7971 request: ::fidl_next::Request<node::GetAttributes, ___T>,
7972
7973 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
7974 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7975
7976 #[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"]
7977 fn update_attributes(
7978 &mut self,
7979
7980 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
7981
7982 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
7983 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7984
7985 #[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"]
7986 fn sync(
7987 &mut self,
7988
7989 responder: ::fidl_next::Responder<node::Sync, ___T>,
7990 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7991
7992 #[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"]
7993 fn list_extended_attributes(
7994 &mut self,
7995
7996 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
7997 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7998
7999 #[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"]
8000 fn get_extended_attribute(
8001 &mut self,
8002
8003 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
8004
8005 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
8006 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8007
8008 #[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"]
8009 fn set_extended_attribute(
8010 &mut self,
8011
8012 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
8013
8014 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
8015 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8016
8017 #[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"]
8018 fn remove_extended_attribute(
8019 &mut self,
8020
8021 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
8022
8023 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
8024 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8025
8026 fn on_unknown_interaction(
8027 &mut self,
8028 ordinal: u64,
8029 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
8030 ::core::future::ready(())
8031 }
8032}
8033
8034impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
8035where
8036 ___H: NodeServerHandler<___T> + ::core::marker::Send,
8037 ___T: ::fidl_next::Transport,
8038 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
8039 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8040 Constraint = (),
8041 >,
8042 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
8043 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8044 Constraint = (),
8045 >,
8046 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
8047 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8048 Constraint = (),
8049 >,
8050 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
8051 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8052 Constraint = (),
8053 >,
8054 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
8055 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8056 Constraint = (),
8057 >,
8058 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
8059 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8060 Constraint = (),
8061 >,
8062 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
8063 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8064 Constraint = (),
8065 >,
8066 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
8067 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8068 Constraint = (),
8069 >,
8070 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8071 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8072 Constraint = (),
8073 >,
8074 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8075 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8076 Constraint = (),
8077 >,
8078 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8079 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8080 Constraint = (),
8081 >,
8082{
8083 async fn on_one_way(
8084 handler: &mut ___H,
8085 ordinal: u64,
8086 flexibility: ::fidl_next::protocol::Flexibility,
8087 body: ::fidl_next::Body<___T>,
8088 ) -> ::core::result::Result<
8089 (),
8090 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8091 > {
8092 match ordinal {
8093 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
8094 Ok(decoded) => {
8095 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
8096 Ok(())
8097 }
8098 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8099 ordinal: 2366825959783828089,
8100 error,
8101 }),
8102 },
8103
8104 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
8105 Ok(decoded) => {
8106 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
8107 Ok(())
8108 }
8109 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8110 ordinal: 6512600400724287855,
8111 error,
8112 }),
8113 },
8114
8115 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
8116 Ok(decoded) => {
8117 handler
8118 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
8119 .await;
8120 Ok(())
8121 }
8122 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8123 ordinal: 5431626189872037072,
8124 error,
8125 }),
8126 },
8127
8128 ordinal => {
8129 handler.on_unknown_interaction(ordinal).await;
8130 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
8131 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8132 } else {
8133 Ok(())
8134 }
8135 }
8136 }
8137 }
8138
8139 async fn on_two_way(
8140 handler: &mut ___H,
8141 ordinal: u64,
8142 flexibility: ::fidl_next::protocol::Flexibility,
8143 body: ::fidl_next::Body<___T>,
8144 responder: ::fidl_next::protocol::Responder<___T>,
8145 ) -> ::core::result::Result<
8146 (),
8147 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8148 > {
8149 match ordinal {
8150 6540867515453498750 => {
8151 let responder = ::fidl_next::Responder::from_untyped(responder);
8152
8153 handler.close(responder).await;
8154 Ok(())
8155 }
8156
8157 2763219980499352582 => {
8158 let responder = ::fidl_next::Responder::from_untyped(responder);
8159
8160 handler.query(responder).await;
8161 Ok(())
8162 }
8163
8164 8689798978500614909 => {
8165 let responder = ::fidl_next::Responder::from_untyped(responder);
8166
8167 handler.deprecated_get_attr(responder).await;
8168 Ok(())
8169 }
8170
8171 4721673413776871238 => {
8172 let responder = ::fidl_next::Responder::from_untyped(responder);
8173
8174 match ::fidl_next::AsDecoderExt::into_decoded(body) {
8175 Ok(decoded) => {
8176 handler
8177 .deprecated_set_attr(
8178 ::fidl_next::Request::from_decoded(decoded),
8179 responder,
8180 )
8181 .await;
8182 Ok(())
8183 }
8184 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8185 ordinal: 4721673413776871238,
8186 error,
8187 }),
8188 }
8189 }
8190
8191 6595803110182632097 => {
8192 let responder = ::fidl_next::Responder::from_untyped(responder);
8193
8194 handler.deprecated_get_flags(responder).await;
8195 Ok(())
8196 }
8197
8198 5950864159036794675 => {
8199 let responder = ::fidl_next::Responder::from_untyped(responder);
8200
8201 match ::fidl_next::AsDecoderExt::into_decoded(body) {
8202 Ok(decoded) => {
8203 handler
8204 .deprecated_set_flags(
8205 ::fidl_next::Request::from_decoded(decoded),
8206 responder,
8207 )
8208 .await;
8209 Ok(())
8210 }
8211 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8212 ordinal: 5950864159036794675,
8213 error,
8214 }),
8215 }
8216 }
8217
8218 105530239381466147 => {
8219 let responder = ::fidl_next::Responder::from_untyped(responder);
8220
8221 handler.get_flags(responder).await;
8222 Ok(())
8223 }
8224
8225 6172186066099445416 => {
8226 let responder = ::fidl_next::Responder::from_untyped(responder);
8227
8228 match ::fidl_next::AsDecoderExt::into_decoded(body) {
8229 Ok(decoded) => {
8230 handler
8231 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
8232 .await;
8233 Ok(())
8234 }
8235 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8236 ordinal: 6172186066099445416,
8237 error,
8238 }),
8239 }
8240 }
8241
8242 8013111122914313744 => {
8243 let responder = ::fidl_next::Responder::from_untyped(responder);
8244
8245 handler.query_filesystem(responder).await;
8246 Ok(())
8247 }
8248
8249 4414537700416816443 => {
8250 let responder = ::fidl_next::Responder::from_untyped(responder);
8251
8252 match ::fidl_next::AsDecoderExt::into_decoded(body) {
8253 Ok(decoded) => {
8254 handler
8255 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
8256 .await;
8257 Ok(())
8258 }
8259 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8260 ordinal: 4414537700416816443,
8261 error,
8262 }),
8263 }
8264 }
8265
8266 3677402239314018056 => {
8267 let responder = ::fidl_next::Responder::from_untyped(responder);
8268
8269 match ::fidl_next::AsDecoderExt::into_decoded(body) {
8270 Ok(decoded) => {
8271 handler
8272 .update_attributes(
8273 ::fidl_next::Request::from_decoded(decoded),
8274 responder,
8275 )
8276 .await;
8277 Ok(())
8278 }
8279 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8280 ordinal: 3677402239314018056,
8281 error,
8282 }),
8283 }
8284 }
8285
8286 3196473584242777161 => {
8287 let responder = ::fidl_next::Responder::from_untyped(responder);
8288
8289 handler.sync(responder).await;
8290 Ok(())
8291 }
8292
8293 5043930208506967771 => {
8294 let responder = ::fidl_next::Responder::from_untyped(responder);
8295
8296 match ::fidl_next::AsDecoderExt::into_decoded(body) {
8297 Ok(decoded) => {
8298 handler
8299 .get_extended_attribute(
8300 ::fidl_next::Request::from_decoded(decoded),
8301 responder,
8302 )
8303 .await;
8304 Ok(())
8305 }
8306 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8307 ordinal: 5043930208506967771,
8308 error,
8309 }),
8310 }
8311 }
8312
8313 5374223046099989052 => {
8314 let responder = ::fidl_next::Responder::from_untyped(responder);
8315
8316 match ::fidl_next::AsDecoderExt::into_decoded(body) {
8317 Ok(decoded) => {
8318 handler
8319 .set_extended_attribute(
8320 ::fidl_next::Request::from_decoded(decoded),
8321 responder,
8322 )
8323 .await;
8324 Ok(())
8325 }
8326 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8327 ordinal: 5374223046099989052,
8328 error,
8329 }),
8330 }
8331 }
8332
8333 8794297771444732717 => {
8334 let responder = ::fidl_next::Responder::from_untyped(responder);
8335
8336 match ::fidl_next::AsDecoderExt::into_decoded(body) {
8337 Ok(decoded) => {
8338 handler
8339 .remove_extended_attribute(
8340 ::fidl_next::Request::from_decoded(decoded),
8341 responder,
8342 )
8343 .await;
8344 Ok(())
8345 }
8346 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8347 ordinal: 8794297771444732717,
8348 error,
8349 }),
8350 }
8351 }
8352
8353 ordinal => {
8354 handler.on_unknown_interaction(ordinal).await;
8355 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
8356 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8357 } else {
8358 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
8359 ordinal,
8360 flexibility,
8361 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
8362 )
8363 .expect("encoding a framework error should never fail")
8364 .await?;
8365 Ok(())
8366 }
8367 }
8368 }
8369 }
8370}
8371
8372impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
8373where
8374 ___T: ::fidl_next::Transport,
8375{
8376 async fn on_open(&mut self, _: ::fidl_next::Request<node::OnOpen, ___T>) {}
8377
8378 async fn on_representation(&mut self, _: ::fidl_next::Request<node::OnRepresentation, ___T>) {}
8379
8380 async fn on_unknown_interaction(&mut self, _: u64) {}
8381}
8382
8383impl<___H, ___T> NodeLocalClientHandler<___T> for ::fidl_next::Local<___H>
8384where
8385 ___H: NodeClientHandler<___T>,
8386 ___T: ::fidl_next::Transport,
8387{
8388 async fn on_open(&mut self, request: ::fidl_next::Request<node::OnOpen, ___T>) {
8389 ___H::on_open(&mut self.0, request).await
8390 }
8391
8392 async fn on_representation(
8393 &mut self,
8394
8395 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
8396 ) {
8397 ___H::on_representation(&mut self.0, request).await
8398 }
8399
8400 async fn on_unknown_interaction(&mut self, ordinal: u64) {
8401 ___H::on_unknown_interaction(&mut self.0, ordinal).await
8402 }
8403}
8404
8405impl<___H, ___T> NodeLocalServerHandler<___T> for ::fidl_next::Local<___H>
8406where
8407 ___H: NodeServerHandler<___T>,
8408 ___T: ::fidl_next::Transport,
8409{
8410 async fn clone(&mut self, request: ::fidl_next::Request<node::Clone, ___T>) {
8411 ___H::clone(&mut self.0, request).await
8412 }
8413
8414 async fn close(&mut self, responder: ::fidl_next::Responder<node::Close, ___T>) {
8415 ___H::close(&mut self.0, responder).await
8416 }
8417
8418 async fn query(&mut self, responder: ::fidl_next::Responder<node::Query, ___T>) {
8419 ___H::query(&mut self.0, responder).await
8420 }
8421
8422 async fn deprecated_clone(
8423 &mut self,
8424
8425 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
8426 ) {
8427 ___H::deprecated_clone(&mut self.0, request).await
8428 }
8429
8430 async fn deprecated_get_attr(
8431 &mut self,
8432
8433 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
8434 ) {
8435 ___H::deprecated_get_attr(&mut self.0, responder).await
8436 }
8437
8438 async fn deprecated_set_attr(
8439 &mut self,
8440
8441 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
8442
8443 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
8444 ) {
8445 ___H::deprecated_set_attr(&mut self.0, request, responder).await
8446 }
8447
8448 async fn deprecated_get_flags(
8449 &mut self,
8450
8451 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
8452 ) {
8453 ___H::deprecated_get_flags(&mut self.0, responder).await
8454 }
8455
8456 async fn deprecated_set_flags(
8457 &mut self,
8458
8459 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
8460
8461 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
8462 ) {
8463 ___H::deprecated_set_flags(&mut self.0, request, responder).await
8464 }
8465
8466 async fn get_flags(&mut self, responder: ::fidl_next::Responder<node::GetFlags, ___T>) {
8467 ___H::get_flags(&mut self.0, responder).await
8468 }
8469
8470 async fn set_flags(
8471 &mut self,
8472
8473 request: ::fidl_next::Request<node::SetFlags, ___T>,
8474
8475 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
8476 ) {
8477 ___H::set_flags(&mut self.0, request, responder).await
8478 }
8479
8480 async fn query_filesystem(
8481 &mut self,
8482
8483 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
8484 ) {
8485 ___H::query_filesystem(&mut self.0, responder).await
8486 }
8487
8488 async fn get_attributes(
8489 &mut self,
8490
8491 request: ::fidl_next::Request<node::GetAttributes, ___T>,
8492
8493 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
8494 ) {
8495 ___H::get_attributes(&mut self.0, request, responder).await
8496 }
8497
8498 async fn update_attributes(
8499 &mut self,
8500
8501 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
8502
8503 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
8504 ) {
8505 ___H::update_attributes(&mut self.0, request, responder).await
8506 }
8507
8508 async fn sync(&mut self, responder: ::fidl_next::Responder<node::Sync, ___T>) {
8509 ___H::sync(&mut self.0, responder).await
8510 }
8511
8512 async fn list_extended_attributes(
8513 &mut self,
8514
8515 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
8516 ) {
8517 ___H::list_extended_attributes(&mut self.0, request).await
8518 }
8519
8520 async fn get_extended_attribute(
8521 &mut self,
8522
8523 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
8524
8525 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
8526 ) {
8527 ___H::get_extended_attribute(&mut self.0, request, responder).await
8528 }
8529
8530 async fn set_extended_attribute(
8531 &mut self,
8532
8533 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
8534
8535 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
8536 ) {
8537 ___H::set_extended_attribute(&mut self.0, request, responder).await
8538 }
8539
8540 async fn remove_extended_attribute(
8541 &mut self,
8542
8543 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
8544
8545 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
8546 ) {
8547 ___H::remove_extended_attribute(&mut self.0, request, responder).await
8548 }
8549
8550 async fn on_unknown_interaction(&mut self, ordinal: u64) {
8551 ___H::on_unknown_interaction(&mut self.0, ordinal).await
8552 }
8553}
8554
8555#[doc = " Directory defines a node which is capable of containing other Objects.\n"]
8557#[derive(PartialEq, Debug)]
8558pub struct Directory;
8559
8560impl ::fidl_next::Discoverable for Directory {
8561 const PROTOCOL_NAME: &'static str = "fuchsia.io.Directory";
8562}
8563
8564#[cfg(target_os = "fuchsia")]
8565impl ::fidl_next::HasTransport for Directory {
8566 type Transport = ::fidl_next::fuchsia::zx::Channel;
8567}
8568
8569pub mod directory {
8570 pub mod prelude {
8571 pub use crate::{
8572 Directory, DirectoryClientHandler, DirectoryLocalClientHandler,
8573 DirectoryLocalServerHandler, DirectoryServerHandler, directory,
8574 };
8575
8576 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
8577
8578 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
8579
8580 pub use crate::natural::DirectoryCreateSymlinkRequest;
8581
8582 pub use crate::natural::DirectoryDeprecatedOpenRequest;
8583
8584 pub use crate::natural::DirectoryGetTokenResponse;
8585
8586 pub use crate::natural::DirectoryLinkRequest;
8587
8588 pub use crate::natural::DirectoryLinkResponse;
8589
8590 pub use crate::natural::DirectoryReadDirentsRequest;
8591
8592 pub use crate::natural::DirectoryReadDirentsResponse;
8593
8594 pub use crate::natural::DirectoryRenameRequest;
8595
8596 pub use crate::natural::DirectoryRewindResponse;
8597
8598 pub use crate::natural::DirectoryUnlinkRequest;
8599
8600 pub use crate::natural::DirectoryWatchRequest;
8601
8602 pub use crate::natural::DirectoryWatchResponse;
8603
8604 pub use crate::natural::DirectoryCreateSymlinkResponse;
8605
8606 pub use crate::natural::DirectoryRenameResponse;
8607
8608 pub use crate::natural::DirectoryUnlinkResponse;
8609
8610 pub use crate::natural::ExtendedAttributeValue;
8611
8612 pub use crate::natural::MutableNodeAttributes;
8613
8614 pub use crate::natural::NodeAttributes2;
8615
8616 pub use crate::natural::NodeDeprecatedCloneRequest;
8617
8618 pub use crate::natural::NodeDeprecatedGetAttrResponse;
8619
8620 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
8621
8622 pub use crate::natural::NodeDeprecatedSetAttrRequest;
8623
8624 pub use crate::natural::NodeDeprecatedSetAttrResponse;
8625
8626 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
8627
8628 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
8629
8630 pub use crate::natural::NodeGetAttributesRequest;
8631
8632 pub use crate::natural::NodeGetExtendedAttributeRequest;
8633
8634 pub use crate::natural::NodeListExtendedAttributesRequest;
8635
8636 pub use crate::natural::NodeOnOpenRequest;
8637
8638 pub use crate::natural::NodeQueryFilesystemResponse;
8639
8640 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
8641
8642 pub use crate::natural::NodeSetExtendedAttributeRequest;
8643
8644 pub use crate::natural::NodeSetFlagsRequest;
8645
8646 pub use crate::natural::NodeGetFlagsResponse;
8647
8648 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
8649
8650 pub use crate::natural::NodeSetExtendedAttributeResponse;
8651
8652 pub use crate::natural::NodeSetFlagsResponse;
8653
8654 pub use crate::natural::NodeSyncResponse;
8655
8656 pub use crate::natural::NodeUpdateAttributesResponse;
8657
8658 pub use crate::natural::OpenableOpenRequest;
8659
8660 pub use crate::natural::Representation;
8661
8662 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
8663
8664 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
8665
8666 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
8667 }
8668
8669 pub struct AdvisoryLock;
8670
8671 impl ::fidl_next::Method for AdvisoryLock {
8672 const ORDINAL: u64 = 7992130864415541162;
8673 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8674 ::fidl_next::protocol::Flexibility::Strict;
8675
8676 type Protocol = crate::Directory;
8677
8678 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
8679 }
8680
8681 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
8682 type Response = ::fidl_next::wire::Result<
8683 'static,
8684 crate::wire::AdvisoryLockingAdvisoryLockResponse,
8685 ::fidl_next::wire::Int32,
8686 >;
8687 }
8688
8689 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
8690 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8691
8692 fn respond(response: ___R) -> Self::Output {
8693 ::core::result::Result::Ok(response)
8694 }
8695 }
8696
8697 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
8698 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8699
8700 fn respond_err(response: ___R) -> Self::Output {
8701 ::core::result::Result::Err(response)
8702 }
8703 }
8704
8705 pub struct Clone;
8706
8707 impl ::fidl_next::Method for Clone {
8708 const ORDINAL: u64 = 2366825959783828089;
8709 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8710 ::fidl_next::protocol::Flexibility::Strict;
8711
8712 type Protocol = crate::Directory;
8713
8714 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
8715 }
8716
8717 pub struct Close;
8718
8719 impl ::fidl_next::Method for Close {
8720 const ORDINAL: u64 = 6540867515453498750;
8721 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8722 ::fidl_next::protocol::Flexibility::Strict;
8723
8724 type Protocol = crate::Directory;
8725
8726 type Request = ::fidl_next::wire::EmptyMessageBody;
8727 }
8728
8729 impl ::fidl_next::TwoWayMethod for Close {
8730 type Response = ::fidl_next::wire::Result<
8731 'static,
8732 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
8733 ::fidl_next::wire::Int32,
8734 >;
8735 }
8736
8737 impl<___R> ::fidl_next::Respond<___R> for Close {
8738 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8739
8740 fn respond(response: ___R) -> Self::Output {
8741 ::core::result::Result::Ok(response)
8742 }
8743 }
8744
8745 impl<___R> ::fidl_next::RespondErr<___R> for Close {
8746 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8747
8748 fn respond_err(response: ___R) -> Self::Output {
8749 ::core::result::Result::Err(response)
8750 }
8751 }
8752
8753 pub struct Query;
8754
8755 impl ::fidl_next::Method for Query {
8756 const ORDINAL: u64 = 2763219980499352582;
8757 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8758 ::fidl_next::protocol::Flexibility::Strict;
8759
8760 type Protocol = crate::Directory;
8761
8762 type Request = ::fidl_next::wire::EmptyMessageBody;
8763 }
8764
8765 impl ::fidl_next::TwoWayMethod for Query {
8766 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
8767 }
8768
8769 impl<___R> ::fidl_next::Respond<___R> for Query {
8770 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
8771
8772 fn respond(response: ___R) -> Self::Output {
8773 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
8774 }
8775 }
8776
8777 pub struct DeprecatedClone;
8778
8779 impl ::fidl_next::Method for DeprecatedClone {
8780 const ORDINAL: u64 = 6512600400724287855;
8781 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8782 ::fidl_next::protocol::Flexibility::Flexible;
8783
8784 type Protocol = crate::Directory;
8785
8786 type Request = crate::wire::NodeDeprecatedCloneRequest;
8787 }
8788
8789 pub struct OnOpen;
8790
8791 impl ::fidl_next::Method for OnOpen {
8792 const ORDINAL: u64 = 9207534335756671346;
8793 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8794 ::fidl_next::protocol::Flexibility::Flexible;
8795
8796 type Protocol = crate::Directory;
8797
8798 type Request = crate::wire::NodeOnOpenRequest<'static>;
8799 }
8800
8801 pub struct DeprecatedGetAttr;
8802
8803 impl ::fidl_next::Method for DeprecatedGetAttr {
8804 const ORDINAL: u64 = 8689798978500614909;
8805 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8806 ::fidl_next::protocol::Flexibility::Strict;
8807
8808 type Protocol = crate::Directory;
8809
8810 type Request = ::fidl_next::wire::EmptyMessageBody;
8811 }
8812
8813 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
8814 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
8815 }
8816
8817 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
8818 type Output = ___R;
8819
8820 fn respond(response: ___R) -> Self::Output {
8821 response
8822 }
8823 }
8824
8825 pub struct DeprecatedSetAttr;
8826
8827 impl ::fidl_next::Method for DeprecatedSetAttr {
8828 const ORDINAL: u64 = 4721673413776871238;
8829 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8830 ::fidl_next::protocol::Flexibility::Strict;
8831
8832 type Protocol = crate::Directory;
8833
8834 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
8835 }
8836
8837 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
8838 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
8839 }
8840
8841 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
8842 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
8843
8844 fn respond(response: ___R) -> Self::Output {
8845 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
8846 }
8847 }
8848
8849 pub struct DeprecatedGetFlags;
8850
8851 impl ::fidl_next::Method for DeprecatedGetFlags {
8852 const ORDINAL: u64 = 6595803110182632097;
8853 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8854 ::fidl_next::protocol::Flexibility::Strict;
8855
8856 type Protocol = crate::Directory;
8857
8858 type Request = ::fidl_next::wire::EmptyMessageBody;
8859 }
8860
8861 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
8862 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
8863 }
8864
8865 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
8866 type Output = ___R;
8867
8868 fn respond(response: ___R) -> Self::Output {
8869 response
8870 }
8871 }
8872
8873 pub struct DeprecatedSetFlags;
8874
8875 impl ::fidl_next::Method for DeprecatedSetFlags {
8876 const ORDINAL: u64 = 5950864159036794675;
8877 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8878 ::fidl_next::protocol::Flexibility::Strict;
8879
8880 type Protocol = crate::Directory;
8881
8882 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
8883 }
8884
8885 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
8886 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
8887 }
8888
8889 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
8890 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
8891
8892 fn respond(response: ___R) -> Self::Output {
8893 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
8894 }
8895 }
8896
8897 pub struct GetFlags;
8898
8899 impl ::fidl_next::Method for GetFlags {
8900 const ORDINAL: u64 = 105530239381466147;
8901 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8902 ::fidl_next::protocol::Flexibility::Flexible;
8903
8904 type Protocol = crate::Directory;
8905
8906 type Request = ::fidl_next::wire::EmptyMessageBody;
8907 }
8908
8909 impl ::fidl_next::TwoWayMethod for GetFlags {
8910 type Response = ::fidl_next::wire::FlexibleResult<
8911 'static,
8912 crate::wire::NodeGetFlagsResponse,
8913 ::fidl_next::wire::Int32,
8914 >;
8915 }
8916
8917 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
8918 type Output = ::fidl_next::FlexibleResult<
8919 crate::generic::NodeGetFlagsResponse<___R>,
8920 ::fidl_next::util::Never,
8921 >;
8922
8923 fn respond(response: ___R) -> Self::Output {
8924 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
8925 flags: response,
8926 })
8927 }
8928 }
8929
8930 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
8931 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8932
8933 fn respond_err(response: ___R) -> Self::Output {
8934 ::fidl_next::FlexibleResult::Err(response)
8935 }
8936 }
8937
8938 pub struct SetFlags;
8939
8940 impl ::fidl_next::Method for SetFlags {
8941 const ORDINAL: u64 = 6172186066099445416;
8942 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8943 ::fidl_next::protocol::Flexibility::Flexible;
8944
8945 type Protocol = crate::Directory;
8946
8947 type Request = crate::wire::NodeSetFlagsRequest;
8948 }
8949
8950 impl ::fidl_next::TwoWayMethod for SetFlags {
8951 type Response = ::fidl_next::wire::FlexibleResult<
8952 'static,
8953 crate::wire::NodeSetFlagsResponse,
8954 ::fidl_next::wire::Int32,
8955 >;
8956 }
8957
8958 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
8959 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
8960
8961 fn respond(response: ___R) -> Self::Output {
8962 ::fidl_next::FlexibleResult::Ok(response)
8963 }
8964 }
8965
8966 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
8967 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8968
8969 fn respond_err(response: ___R) -> Self::Output {
8970 ::fidl_next::FlexibleResult::Err(response)
8971 }
8972 }
8973
8974 pub struct QueryFilesystem;
8975
8976 impl ::fidl_next::Method for QueryFilesystem {
8977 const ORDINAL: u64 = 8013111122914313744;
8978 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8979 ::fidl_next::protocol::Flexibility::Strict;
8980
8981 type Protocol = crate::Directory;
8982
8983 type Request = ::fidl_next::wire::EmptyMessageBody;
8984 }
8985
8986 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
8987 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
8988 }
8989
8990 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
8991 type Output = ___R;
8992
8993 fn respond(response: ___R) -> Self::Output {
8994 response
8995 }
8996 }
8997
8998 pub struct OnRepresentation;
8999
9000 impl ::fidl_next::Method for OnRepresentation {
9001 const ORDINAL: u64 = 6679970090861613324;
9002 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9003 ::fidl_next::protocol::Flexibility::Strict;
9004
9005 type Protocol = crate::Directory;
9006
9007 type Request = crate::wire::Representation<'static>;
9008 }
9009
9010 pub struct GetAttributes;
9011
9012 impl ::fidl_next::Method for GetAttributes {
9013 const ORDINAL: u64 = 4414537700416816443;
9014 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9015 ::fidl_next::protocol::Flexibility::Strict;
9016
9017 type Protocol = crate::Directory;
9018
9019 type Request = crate::wire::NodeGetAttributesRequest;
9020 }
9021
9022 impl ::fidl_next::TwoWayMethod for GetAttributes {
9023 type Response = ::fidl_next::wire::Result<
9024 'static,
9025 crate::wire::NodeAttributes2<'static>,
9026 ::fidl_next::wire::Int32,
9027 >;
9028 }
9029
9030 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
9031 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9032
9033 fn respond(response: ___R) -> Self::Output {
9034 ::core::result::Result::Ok(response)
9035 }
9036 }
9037
9038 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
9039 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9040
9041 fn respond_err(response: ___R) -> Self::Output {
9042 ::core::result::Result::Err(response)
9043 }
9044 }
9045
9046 pub struct UpdateAttributes;
9047
9048 impl ::fidl_next::Method for UpdateAttributes {
9049 const ORDINAL: u64 = 3677402239314018056;
9050 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9051 ::fidl_next::protocol::Flexibility::Strict;
9052
9053 type Protocol = crate::Directory;
9054
9055 type Request = crate::wire::MutableNodeAttributes<'static>;
9056 }
9057
9058 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
9059 type Response = ::fidl_next::wire::Result<
9060 'static,
9061 crate::wire::NodeUpdateAttributesResponse,
9062 ::fidl_next::wire::Int32,
9063 >;
9064 }
9065
9066 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
9067 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9068
9069 fn respond(response: ___R) -> Self::Output {
9070 ::core::result::Result::Ok(response)
9071 }
9072 }
9073
9074 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
9075 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9076
9077 fn respond_err(response: ___R) -> Self::Output {
9078 ::core::result::Result::Err(response)
9079 }
9080 }
9081
9082 pub struct Sync;
9083
9084 impl ::fidl_next::Method for Sync {
9085 const ORDINAL: u64 = 3196473584242777161;
9086 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9087 ::fidl_next::protocol::Flexibility::Strict;
9088
9089 type Protocol = crate::Directory;
9090
9091 type Request = ::fidl_next::wire::EmptyMessageBody;
9092 }
9093
9094 impl ::fidl_next::TwoWayMethod for Sync {
9095 type Response = ::fidl_next::wire::Result<
9096 'static,
9097 crate::wire::NodeSyncResponse,
9098 ::fidl_next::wire::Int32,
9099 >;
9100 }
9101
9102 impl<___R> ::fidl_next::Respond<___R> for Sync {
9103 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9104
9105 fn respond(response: ___R) -> Self::Output {
9106 ::core::result::Result::Ok(response)
9107 }
9108 }
9109
9110 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
9111 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9112
9113 fn respond_err(response: ___R) -> Self::Output {
9114 ::core::result::Result::Err(response)
9115 }
9116 }
9117
9118 pub struct ListExtendedAttributes;
9119
9120 impl ::fidl_next::Method for ListExtendedAttributes {
9121 const ORDINAL: u64 = 5431626189872037072;
9122 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9123 ::fidl_next::protocol::Flexibility::Strict;
9124
9125 type Protocol = crate::Directory;
9126
9127 type Request = crate::wire::NodeListExtendedAttributesRequest;
9128 }
9129
9130 pub struct GetExtendedAttribute;
9131
9132 impl ::fidl_next::Method for GetExtendedAttribute {
9133 const ORDINAL: u64 = 5043930208506967771;
9134 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9135 ::fidl_next::protocol::Flexibility::Strict;
9136
9137 type Protocol = crate::Directory;
9138
9139 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
9140 }
9141
9142 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
9143 type Response = ::fidl_next::wire::Result<
9144 'static,
9145 crate::wire::ExtendedAttributeValue<'static>,
9146 ::fidl_next::wire::Int32,
9147 >;
9148 }
9149
9150 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
9151 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9152
9153 fn respond(response: ___R) -> Self::Output {
9154 ::core::result::Result::Ok(response)
9155 }
9156 }
9157
9158 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
9159 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9160
9161 fn respond_err(response: ___R) -> Self::Output {
9162 ::core::result::Result::Err(response)
9163 }
9164 }
9165
9166 pub struct SetExtendedAttribute;
9167
9168 impl ::fidl_next::Method for SetExtendedAttribute {
9169 const ORDINAL: u64 = 5374223046099989052;
9170 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9171 ::fidl_next::protocol::Flexibility::Strict;
9172
9173 type Protocol = crate::Directory;
9174
9175 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
9176 }
9177
9178 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
9179 type Response = ::fidl_next::wire::Result<
9180 'static,
9181 crate::wire::NodeSetExtendedAttributeResponse,
9182 ::fidl_next::wire::Int32,
9183 >;
9184 }
9185
9186 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
9187 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9188
9189 fn respond(response: ___R) -> Self::Output {
9190 ::core::result::Result::Ok(response)
9191 }
9192 }
9193
9194 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
9195 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9196
9197 fn respond_err(response: ___R) -> Self::Output {
9198 ::core::result::Result::Err(response)
9199 }
9200 }
9201
9202 pub struct RemoveExtendedAttribute;
9203
9204 impl ::fidl_next::Method for RemoveExtendedAttribute {
9205 const ORDINAL: u64 = 8794297771444732717;
9206 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9207 ::fidl_next::protocol::Flexibility::Strict;
9208
9209 type Protocol = crate::Directory;
9210
9211 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
9212 }
9213
9214 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
9215 type Response = ::fidl_next::wire::Result<
9216 'static,
9217 crate::wire::NodeRemoveExtendedAttributeResponse,
9218 ::fidl_next::wire::Int32,
9219 >;
9220 }
9221
9222 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
9223 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9224
9225 fn respond(response: ___R) -> Self::Output {
9226 ::core::result::Result::Ok(response)
9227 }
9228 }
9229
9230 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
9231 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9232
9233 fn respond_err(response: ___R) -> Self::Output {
9234 ::core::result::Result::Err(response)
9235 }
9236 }
9237
9238 pub struct Open;
9239
9240 impl ::fidl_next::Method for Open {
9241 const ORDINAL: u64 = 6236883748953765593;
9242 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9243 ::fidl_next::protocol::Flexibility::Flexible;
9244
9245 type Protocol = crate::Directory;
9246
9247 type Request = crate::wire::OpenableOpenRequest<'static>;
9248 }
9249
9250 pub struct DeprecatedOpen;
9251
9252 impl ::fidl_next::Method for DeprecatedOpen {
9253 const ORDINAL: u64 = 3193127272456937152;
9254 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9255 ::fidl_next::protocol::Flexibility::Flexible;
9256
9257 type Protocol = crate::Directory;
9258
9259 type Request = crate::wire::DirectoryDeprecatedOpenRequest<'static>;
9260 }
9261
9262 pub struct ReadDirents;
9263
9264 impl ::fidl_next::Method for ReadDirents {
9265 const ORDINAL: u64 = 3855785432100874762;
9266 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9267 ::fidl_next::protocol::Flexibility::Strict;
9268
9269 type Protocol = crate::Directory;
9270
9271 type Request = crate::wire::DirectoryReadDirentsRequest;
9272 }
9273
9274 impl ::fidl_next::TwoWayMethod for ReadDirents {
9275 type Response = crate::wire::DirectoryReadDirentsResponse<'static>;
9276 }
9277
9278 impl<___R> ::fidl_next::Respond<___R> for ReadDirents {
9279 type Output = ___R;
9280
9281 fn respond(response: ___R) -> Self::Output {
9282 response
9283 }
9284 }
9285
9286 pub struct Rewind;
9287
9288 impl ::fidl_next::Method for Rewind {
9289 const ORDINAL: u64 = 1635123508515392625;
9290 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9291 ::fidl_next::protocol::Flexibility::Strict;
9292
9293 type Protocol = crate::Directory;
9294
9295 type Request = ::fidl_next::wire::EmptyMessageBody;
9296 }
9297
9298 impl ::fidl_next::TwoWayMethod for Rewind {
9299 type Response = crate::wire::DirectoryRewindResponse;
9300 }
9301
9302 impl<___R> ::fidl_next::Respond<___R> for Rewind {
9303 type Output = crate::generic::DirectoryRewindResponse<___R>;
9304
9305 fn respond(response: ___R) -> Self::Output {
9306 crate::generic::DirectoryRewindResponse { s: response }
9307 }
9308 }
9309
9310 pub struct GetToken;
9311
9312 impl ::fidl_next::Method for GetToken {
9313 const ORDINAL: u64 = 2787337947777369685;
9314 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9315 ::fidl_next::protocol::Flexibility::Strict;
9316
9317 type Protocol = crate::Directory;
9318
9319 type Request = ::fidl_next::wire::EmptyMessageBody;
9320 }
9321
9322 impl ::fidl_next::TwoWayMethod for GetToken {
9323 type Response = crate::wire::DirectoryGetTokenResponse;
9324 }
9325
9326 impl<___R> ::fidl_next::Respond<___R> for GetToken {
9327 type Output = ___R;
9328
9329 fn respond(response: ___R) -> Self::Output {
9330 response
9331 }
9332 }
9333
9334 pub struct Link;
9335
9336 impl ::fidl_next::Method for Link {
9337 const ORDINAL: u64 = 8360374984291987687;
9338 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9339 ::fidl_next::protocol::Flexibility::Strict;
9340
9341 type Protocol = crate::Directory;
9342
9343 type Request = crate::wire::DirectoryLinkRequest<'static>;
9344 }
9345
9346 impl ::fidl_next::TwoWayMethod for Link {
9347 type Response = crate::wire::DirectoryLinkResponse;
9348 }
9349
9350 impl<___R> ::fidl_next::Respond<___R> for Link {
9351 type Output = crate::generic::DirectoryLinkResponse<___R>;
9352
9353 fn respond(response: ___R) -> Self::Output {
9354 crate::generic::DirectoryLinkResponse { s: response }
9355 }
9356 }
9357
9358 pub struct Unlink;
9359
9360 impl ::fidl_next::Method for Unlink {
9361 const ORDINAL: u64 = 8433556716759383021;
9362 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9363 ::fidl_next::protocol::Flexibility::Strict;
9364
9365 type Protocol = crate::Directory;
9366
9367 type Request = crate::wire::DirectoryUnlinkRequest<'static>;
9368 }
9369
9370 impl ::fidl_next::TwoWayMethod for Unlink {
9371 type Response = ::fidl_next::wire::Result<
9372 'static,
9373 crate::wire::DirectoryUnlinkResponse,
9374 ::fidl_next::wire::Int32,
9375 >;
9376 }
9377
9378 impl<___R> ::fidl_next::Respond<___R> for Unlink {
9379 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9380
9381 fn respond(response: ___R) -> Self::Output {
9382 ::core::result::Result::Ok(response)
9383 }
9384 }
9385
9386 impl<___R> ::fidl_next::RespondErr<___R> for Unlink {
9387 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9388
9389 fn respond_err(response: ___R) -> Self::Output {
9390 ::core::result::Result::Err(response)
9391 }
9392 }
9393
9394 pub struct Rename;
9395
9396 impl ::fidl_next::Method for Rename {
9397 const ORDINAL: u64 = 8097726607824333022;
9398 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9399 ::fidl_next::protocol::Flexibility::Strict;
9400
9401 type Protocol = crate::Directory;
9402
9403 type Request = crate::wire::DirectoryRenameRequest<'static>;
9404 }
9405
9406 impl ::fidl_next::TwoWayMethod for Rename {
9407 type Response = ::fidl_next::wire::Result<
9408 'static,
9409 crate::wire::DirectoryRenameResponse,
9410 ::fidl_next::wire::Int32,
9411 >;
9412 }
9413
9414 impl<___R> ::fidl_next::Respond<___R> for Rename {
9415 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9416
9417 fn respond(response: ___R) -> Self::Output {
9418 ::core::result::Result::Ok(response)
9419 }
9420 }
9421
9422 impl<___R> ::fidl_next::RespondErr<___R> for Rename {
9423 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9424
9425 fn respond_err(response: ___R) -> Self::Output {
9426 ::core::result::Result::Err(response)
9427 }
9428 }
9429
9430 pub struct CreateSymlink;
9431
9432 impl ::fidl_next::Method for CreateSymlink {
9433 const ORDINAL: u64 = 2435901052462315657;
9434 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9435 ::fidl_next::protocol::Flexibility::Strict;
9436
9437 type Protocol = crate::Directory;
9438
9439 type Request = crate::wire::DirectoryCreateSymlinkRequest<'static>;
9440 }
9441
9442 impl ::fidl_next::TwoWayMethod for CreateSymlink {
9443 type Response = ::fidl_next::wire::Result<
9444 'static,
9445 crate::wire::DirectoryCreateSymlinkResponse,
9446 ::fidl_next::wire::Int32,
9447 >;
9448 }
9449
9450 impl<___R> ::fidl_next::Respond<___R> for CreateSymlink {
9451 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9452
9453 fn respond(response: ___R) -> Self::Output {
9454 ::core::result::Result::Ok(response)
9455 }
9456 }
9457
9458 impl<___R> ::fidl_next::RespondErr<___R> for CreateSymlink {
9459 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9460
9461 fn respond_err(response: ___R) -> Self::Output {
9462 ::core::result::Result::Err(response)
9463 }
9464 }
9465
9466 pub struct Watch;
9467
9468 impl ::fidl_next::Method for Watch {
9469 const ORDINAL: u64 = 6275512344170098065;
9470 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9471 ::fidl_next::protocol::Flexibility::Strict;
9472
9473 type Protocol = crate::Directory;
9474
9475 type Request = crate::wire::DirectoryWatchRequest;
9476 }
9477
9478 impl ::fidl_next::TwoWayMethod for Watch {
9479 type Response = crate::wire::DirectoryWatchResponse;
9480 }
9481
9482 impl<___R> ::fidl_next::Respond<___R> for Watch {
9483 type Output = crate::generic::DirectoryWatchResponse<___R>;
9484
9485 fn respond(response: ___R) -> Self::Output {
9486 crate::generic::DirectoryWatchResponse { s: response }
9487 }
9488 }
9489
9490 mod ___detail {
9491 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Directory
9492 where
9493 ___T: ::fidl_next::Transport,
9494 {
9495 type Client = DirectoryClient<___T>;
9496 type Server = DirectoryServer<___T>;
9497 }
9498
9499 #[repr(transparent)]
9501 pub struct DirectoryClient<___T: ::fidl_next::Transport> {
9502 #[allow(dead_code)]
9503 client: ::fidl_next::protocol::Client<___T>,
9504 }
9505
9506 impl<___T> DirectoryClient<___T>
9507 where
9508 ___T: ::fidl_next::Transport,
9509 {
9510 #[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"]
9511 pub fn advisory_lock(
9512 &self,
9513
9514 request: impl ::fidl_next::Encode<
9515 crate::wire::AdvisoryLockRequest<'static>,
9516 <___T as ::fidl_next::Transport>::SendBuffer,
9517 >,
9518 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
9519 where
9520 <___T as ::fidl_next::Transport>::SendBuffer:
9521 ::fidl_next::encoder::InternalHandleEncoder,
9522 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9523 {
9524 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
9525 request,
9526 })
9527 }
9528
9529 #[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"]
9530 pub fn advisory_lock_with<___R>(
9531 &self,
9532 request: ___R,
9533 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
9534 where
9535 ___R: ::fidl_next::Encode<
9536 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
9537 <___T as ::fidl_next::Transport>::SendBuffer,
9538 >,
9539 {
9540 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9541 7992130864415541162,
9542 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
9543 request,
9544 ))
9545 }
9546
9547 pub fn clone(
9548 &self,
9549
9550 request: impl ::fidl_next::Encode<
9551 ::fidl_next::ServerEnd<
9552 ::fidl_next_fuchsia_unknown::Cloneable,
9553 ::fidl_next::wire::fuchsia::Channel,
9554 >,
9555 <___T as ::fidl_next::Transport>::SendBuffer,
9556 >,
9557 ) -> ::fidl_next::SendFuture<'_, ___T>
9558 where
9559 <___T as ::fidl_next::Transport>::SendBuffer:
9560 ::fidl_next::encoder::InternalHandleEncoder,
9561 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9562 {
9563 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
9564 request,
9565 })
9566 }
9567
9568 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
9569 where
9570 ___R: ::fidl_next::Encode<
9571 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
9572 <___T as ::fidl_next::Transport>::SendBuffer,
9573 >,
9574 {
9575 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9576 2366825959783828089,
9577 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
9578 request,
9579 ))
9580 }
9581
9582 #[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"]
9583 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
9584 ::fidl_next::TwoWayFuture::from_untyped(
9585 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9586 6540867515453498750,
9587 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
9588 (),
9589 ),
9590 )
9591 }
9592
9593 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
9594 ::fidl_next::TwoWayFuture::from_untyped(
9595 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9596 2763219980499352582,
9597 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
9598 (),
9599 ),
9600 )
9601 }
9602
9603 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9604 pub fn deprecated_clone(
9605 &self,
9606
9607 flags: impl ::fidl_next::Encode<
9608 crate::wire::OpenFlags,
9609 <___T as ::fidl_next::Transport>::SendBuffer,
9610 >,
9611
9612 object: impl ::fidl_next::Encode<
9613 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
9614 <___T as ::fidl_next::Transport>::SendBuffer,
9615 >,
9616 ) -> ::fidl_next::SendFuture<'_, ___T>
9617 where
9618 <___T as ::fidl_next::Transport>::SendBuffer:
9619 ::fidl_next::encoder::InternalHandleEncoder,
9620 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9621 {
9622 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
9623 flags,
9624
9625 object,
9626 })
9627 }
9628
9629 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9630 pub fn deprecated_clone_with<___R>(
9631 &self,
9632 request: ___R,
9633 ) -> ::fidl_next::SendFuture<'_, ___T>
9634 where
9635 ___R: ::fidl_next::Encode<
9636 crate::wire::NodeDeprecatedCloneRequest,
9637 <___T as ::fidl_next::Transport>::SendBuffer,
9638 >,
9639 {
9640 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9641 6512600400724287855,
9642 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
9643 request,
9644 ))
9645 }
9646
9647 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
9648 pub fn deprecated_get_attr(
9649 &self,
9650 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
9651 ::fidl_next::TwoWayFuture::from_untyped(
9652 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9653 8689798978500614909,
9654 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
9655 (),
9656 ),
9657 )
9658 }
9659
9660 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9661 pub fn deprecated_set_attr(
9662 &self,
9663
9664 flags: impl ::fidl_next::Encode<
9665 crate::wire::NodeAttributeFlags,
9666 <___T as ::fidl_next::Transport>::SendBuffer,
9667 >,
9668
9669 attributes: impl ::fidl_next::Encode<
9670 crate::wire::NodeAttributes,
9671 <___T as ::fidl_next::Transport>::SendBuffer,
9672 >,
9673 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
9674 where
9675 <___T as ::fidl_next::Transport>::SendBuffer:
9676 ::fidl_next::encoder::InternalHandleEncoder,
9677 {
9678 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
9679 flags,
9680
9681 attributes,
9682 })
9683 }
9684
9685 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9686 pub fn deprecated_set_attr_with<___R>(
9687 &self,
9688 request: ___R,
9689 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
9690 where
9691 ___R: ::fidl_next::Encode<
9692 crate::wire::NodeDeprecatedSetAttrRequest,
9693 <___T as ::fidl_next::Transport>::SendBuffer,
9694 >,
9695 {
9696 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9697 4721673413776871238,
9698 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
9699 request,
9700 ))
9701 }
9702
9703 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
9704 pub fn deprecated_get_flags(
9705 &self,
9706 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
9707 ::fidl_next::TwoWayFuture::from_untyped(
9708 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9709 6595803110182632097,
9710 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
9711 (),
9712 ),
9713 )
9714 }
9715
9716 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9717 pub fn deprecated_set_flags(
9718 &self,
9719
9720 flags: impl ::fidl_next::Encode<
9721 crate::wire::OpenFlags,
9722 <___T as ::fidl_next::Transport>::SendBuffer,
9723 >,
9724 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
9725 where
9726 <___T as ::fidl_next::Transport>::SendBuffer:
9727 ::fidl_next::encoder::InternalHandleEncoder,
9728 {
9729 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
9730 flags,
9731 })
9732 }
9733
9734 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9735 pub fn deprecated_set_flags_with<___R>(
9736 &self,
9737 request: ___R,
9738 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
9739 where
9740 ___R: ::fidl_next::Encode<
9741 crate::wire::NodeDeprecatedSetFlagsRequest,
9742 <___T as ::fidl_next::Transport>::SendBuffer,
9743 >,
9744 {
9745 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9746 5950864159036794675,
9747 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
9748 request,
9749 ))
9750 }
9751
9752 #[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"]
9753 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
9754 ::fidl_next::TwoWayFuture::from_untyped(
9755 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9756 105530239381466147,
9757 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
9758 (),
9759 ),
9760 )
9761 }
9762
9763 #[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"]
9764 pub fn set_flags(
9765 &self,
9766
9767 flags: impl ::fidl_next::Encode<
9768 crate::wire::Flags,
9769 <___T as ::fidl_next::Transport>::SendBuffer,
9770 >,
9771 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
9772 where
9773 <___T as ::fidl_next::Transport>::SendBuffer:
9774 ::fidl_next::encoder::InternalHandleEncoder,
9775 {
9776 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
9777 }
9778
9779 #[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"]
9780 pub fn set_flags_with<___R>(
9781 &self,
9782 request: ___R,
9783 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
9784 where
9785 ___R: ::fidl_next::Encode<
9786 crate::wire::NodeSetFlagsRequest,
9787 <___T as ::fidl_next::Transport>::SendBuffer,
9788 >,
9789 {
9790 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9791 6172186066099445416,
9792 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
9793 request,
9794 ))
9795 }
9796
9797 #[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"]
9798 pub fn query_filesystem(
9799 &self,
9800 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
9801 ::fidl_next::TwoWayFuture::from_untyped(
9802 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9803 8013111122914313744,
9804 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
9805 (),
9806 ),
9807 )
9808 }
9809
9810 #[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"]
9811 pub fn get_attributes(
9812 &self,
9813
9814 query: impl ::fidl_next::Encode<
9815 crate::wire::NodeAttributesQuery,
9816 <___T as ::fidl_next::Transport>::SendBuffer,
9817 >,
9818 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
9819 where
9820 <___T as ::fidl_next::Transport>::SendBuffer:
9821 ::fidl_next::encoder::InternalHandleEncoder,
9822 {
9823 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
9824 }
9825
9826 #[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"]
9827 pub fn get_attributes_with<___R>(
9828 &self,
9829 request: ___R,
9830 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
9831 where
9832 ___R: ::fidl_next::Encode<
9833 crate::wire::NodeGetAttributesRequest,
9834 <___T as ::fidl_next::Transport>::SendBuffer,
9835 >,
9836 {
9837 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9838 4414537700416816443,
9839 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
9840 request,
9841 ))
9842 }
9843
9844 #[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"]
9845 pub fn update_attributes_with<___R>(
9846 &self,
9847 request: ___R,
9848 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
9849 where
9850 ___R: ::fidl_next::Encode<
9851 crate::wire::MutableNodeAttributes<'static>,
9852 <___T as ::fidl_next::Transport>::SendBuffer,
9853 >,
9854 {
9855 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9856 3677402239314018056,
9857 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
9858 request,
9859 ))
9860 }
9861
9862 #[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"]
9863 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
9864 ::fidl_next::TwoWayFuture::from_untyped(
9865 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9866 3196473584242777161,
9867 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
9868 (),
9869 ),
9870 )
9871 }
9872
9873 #[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"]
9874 pub fn list_extended_attributes(
9875 &self,
9876
9877 iterator: impl ::fidl_next::Encode<
9878 ::fidl_next::ServerEnd<
9879 crate::ExtendedAttributeIterator,
9880 ::fidl_next::wire::fuchsia::Channel,
9881 >,
9882 <___T as ::fidl_next::Transport>::SendBuffer,
9883 >,
9884 ) -> ::fidl_next::SendFuture<'_, ___T>
9885 where
9886 <___T as ::fidl_next::Transport>::SendBuffer:
9887 ::fidl_next::encoder::InternalHandleEncoder,
9888 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9889 {
9890 self.list_extended_attributes_with(
9891 crate::generic::NodeListExtendedAttributesRequest { iterator },
9892 )
9893 }
9894
9895 #[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"]
9896 pub fn list_extended_attributes_with<___R>(
9897 &self,
9898 request: ___R,
9899 ) -> ::fidl_next::SendFuture<'_, ___T>
9900 where
9901 ___R: ::fidl_next::Encode<
9902 crate::wire::NodeListExtendedAttributesRequest,
9903 <___T as ::fidl_next::Transport>::SendBuffer,
9904 >,
9905 {
9906 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9907 5431626189872037072,
9908 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
9909 request,
9910 ))
9911 }
9912
9913 #[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"]
9914 pub fn get_extended_attribute(
9915 &self,
9916
9917 name: impl ::fidl_next::Encode<
9918 ::fidl_next::wire::Vector<'static, u8>,
9919 <___T as ::fidl_next::Transport>::SendBuffer,
9920 >,
9921 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
9922 where
9923 <___T as ::fidl_next::Transport>::SendBuffer:
9924 ::fidl_next::encoder::InternalHandleEncoder,
9925 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9926 {
9927 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
9928 name,
9929 })
9930 }
9931
9932 #[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"]
9933 pub fn get_extended_attribute_with<___R>(
9934 &self,
9935 request: ___R,
9936 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
9937 where
9938 ___R: ::fidl_next::Encode<
9939 crate::wire::NodeGetExtendedAttributeRequest<'static>,
9940 <___T as ::fidl_next::Transport>::SendBuffer,
9941 >,
9942 {
9943 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9944 5043930208506967771,
9945 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
9946 request,
9947 ))
9948 }
9949
9950 #[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"]
9951 pub fn set_extended_attribute(
9952 &self,
9953
9954 name: impl ::fidl_next::Encode<
9955 ::fidl_next::wire::Vector<'static, u8>,
9956 <___T as ::fidl_next::Transport>::SendBuffer,
9957 >,
9958
9959 value: impl ::fidl_next::Encode<
9960 crate::wire::ExtendedAttributeValue<'static>,
9961 <___T as ::fidl_next::Transport>::SendBuffer,
9962 >,
9963
9964 mode: impl ::fidl_next::Encode<
9965 crate::wire::SetExtendedAttributeMode,
9966 <___T as ::fidl_next::Transport>::SendBuffer,
9967 >,
9968 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
9969 where
9970 <___T as ::fidl_next::Transport>::SendBuffer:
9971 ::fidl_next::encoder::InternalHandleEncoder,
9972 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9973 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9974 {
9975 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
9976 name,
9977
9978 value,
9979
9980 mode,
9981 })
9982 }
9983
9984 #[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"]
9985 pub fn set_extended_attribute_with<___R>(
9986 &self,
9987 request: ___R,
9988 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
9989 where
9990 ___R: ::fidl_next::Encode<
9991 crate::wire::NodeSetExtendedAttributeRequest<'static>,
9992 <___T as ::fidl_next::Transport>::SendBuffer,
9993 >,
9994 {
9995 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9996 5374223046099989052,
9997 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
9998 request,
9999 ))
10000 }
10001
10002 #[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"]
10003 pub fn remove_extended_attribute(
10004 &self,
10005
10006 name: impl ::fidl_next::Encode<
10007 ::fidl_next::wire::Vector<'static, u8>,
10008 <___T as ::fidl_next::Transport>::SendBuffer,
10009 >,
10010 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
10011 where
10012 <___T as ::fidl_next::Transport>::SendBuffer:
10013 ::fidl_next::encoder::InternalHandleEncoder,
10014 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10015 {
10016 self.remove_extended_attribute_with(
10017 crate::generic::NodeRemoveExtendedAttributeRequest { name },
10018 )
10019 }
10020
10021 #[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"]
10022 pub fn remove_extended_attribute_with<___R>(
10023 &self,
10024 request: ___R,
10025 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
10026 where
10027 ___R: ::fidl_next::Encode<
10028 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
10029 <___T as ::fidl_next::Transport>::SendBuffer,
10030 >,
10031 {
10032 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10033 8794297771444732717,
10034 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
10035 request,
10036 ))
10037 }
10038
10039 #[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"]
10040 pub fn open(
10041 &self,
10042
10043 path: impl ::fidl_next::Encode<
10044 ::fidl_next::wire::String<'static>,
10045 <___T as ::fidl_next::Transport>::SendBuffer,
10046 >,
10047
10048 flags: impl ::fidl_next::Encode<
10049 crate::wire::Flags,
10050 <___T as ::fidl_next::Transport>::SendBuffer,
10051 >,
10052
10053 options: impl ::fidl_next::Encode<
10054 crate::wire::Options<'static>,
10055 <___T as ::fidl_next::Transport>::SendBuffer,
10056 >,
10057
10058 object: impl ::fidl_next::Encode<
10059 ::fidl_next::wire::fuchsia::Channel,
10060 <___T as ::fidl_next::Transport>::SendBuffer,
10061 >,
10062 ) -> ::fidl_next::SendFuture<'_, ___T>
10063 where
10064 <___T as ::fidl_next::Transport>::SendBuffer:
10065 ::fidl_next::encoder::InternalHandleEncoder,
10066 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10067 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10068 {
10069 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
10070 }
10071
10072 #[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"]
10073 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
10074 where
10075 ___R: ::fidl_next::Encode<
10076 crate::wire::OpenableOpenRequest<'static>,
10077 <___T as ::fidl_next::Transport>::SendBuffer,
10078 >,
10079 {
10080 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
10081 6236883748953765593,
10082 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
10083 request,
10084 ))
10085 }
10086
10087 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
10088 pub fn deprecated_open(
10089 &self,
10090
10091 flags: impl ::fidl_next::Encode<
10092 crate::wire::OpenFlags,
10093 <___T as ::fidl_next::Transport>::SendBuffer,
10094 >,
10095
10096 mode: impl ::fidl_next::Encode<
10097 crate::wire::ModeType,
10098 <___T as ::fidl_next::Transport>::SendBuffer,
10099 >,
10100
10101 path: impl ::fidl_next::Encode<
10102 ::fidl_next::wire::String<'static>,
10103 <___T as ::fidl_next::Transport>::SendBuffer,
10104 >,
10105
10106 object: impl ::fidl_next::Encode<
10107 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
10108 <___T as ::fidl_next::Transport>::SendBuffer,
10109 >,
10110 ) -> ::fidl_next::SendFuture<'_, ___T>
10111 where
10112 <___T as ::fidl_next::Transport>::SendBuffer:
10113 ::fidl_next::encoder::InternalHandleEncoder,
10114 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10115 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10116 {
10117 self.deprecated_open_with(crate::generic::DirectoryDeprecatedOpenRequest {
10118 flags,
10119
10120 mode,
10121
10122 path,
10123
10124 object,
10125 })
10126 }
10127
10128 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
10129 pub fn deprecated_open_with<___R>(
10130 &self,
10131 request: ___R,
10132 ) -> ::fidl_next::SendFuture<'_, ___T>
10133 where
10134 ___R: ::fidl_next::Encode<
10135 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
10136 <___T as ::fidl_next::Transport>::SendBuffer,
10137 >,
10138 {
10139 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
10140 3193127272456937152,
10141 <super::DeprecatedOpen as ::fidl_next::Method>::FLEXIBILITY,
10142 request,
10143 ))
10144 }
10145
10146 #[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"]
10147 pub fn read_dirents(
10148 &self,
10149
10150 max_bytes: impl ::fidl_next::Encode<
10151 ::fidl_next::wire::Uint64,
10152 <___T as ::fidl_next::Transport>::SendBuffer,
10153 >,
10154 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
10155 where
10156 <___T as ::fidl_next::Transport>::SendBuffer:
10157 ::fidl_next::encoder::InternalHandleEncoder,
10158 {
10159 self.read_dirents_with(crate::generic::DirectoryReadDirentsRequest { max_bytes })
10160 }
10161
10162 #[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"]
10163 pub fn read_dirents_with<___R>(
10164 &self,
10165 request: ___R,
10166 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
10167 where
10168 ___R: ::fidl_next::Encode<
10169 crate::wire::DirectoryReadDirentsRequest,
10170 <___T as ::fidl_next::Transport>::SendBuffer,
10171 >,
10172 {
10173 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10174 3855785432100874762,
10175 <super::ReadDirents as ::fidl_next::Method>::FLEXIBILITY,
10176 request,
10177 ))
10178 }
10179
10180 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
10181 pub fn rewind(&self) -> ::fidl_next::TwoWayFuture<'_, super::Rewind, ___T> {
10182 ::fidl_next::TwoWayFuture::from_untyped(
10183 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10184 1635123508515392625,
10185 <super::Rewind as ::fidl_next::Method>::FLEXIBILITY,
10186 (),
10187 ),
10188 )
10189 }
10190
10191 #[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"]
10192 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
10193 ::fidl_next::TwoWayFuture::from_untyped(
10194 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10195 2787337947777369685,
10196 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
10197 (),
10198 ),
10199 )
10200 }
10201
10202 #[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"]
10203 pub fn link(
10204 &self,
10205
10206 src: impl ::fidl_next::Encode<
10207 ::fidl_next::wire::String<'static>,
10208 <___T as ::fidl_next::Transport>::SendBuffer,
10209 >,
10210
10211 dst_parent_token: impl ::fidl_next::Encode<
10212 ::fidl_next::wire::fuchsia::NullableHandle,
10213 <___T as ::fidl_next::Transport>::SendBuffer,
10214 >,
10215
10216 dst: impl ::fidl_next::Encode<
10217 ::fidl_next::wire::String<'static>,
10218 <___T as ::fidl_next::Transport>::SendBuffer,
10219 >,
10220 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
10221 where
10222 <___T as ::fidl_next::Transport>::SendBuffer:
10223 ::fidl_next::encoder::InternalHandleEncoder,
10224 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10225 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10226 {
10227 self.link_with(crate::generic::DirectoryLinkRequest { src, dst_parent_token, dst })
10228 }
10229
10230 #[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"]
10231 pub fn link_with<___R>(
10232 &self,
10233 request: ___R,
10234 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
10235 where
10236 ___R: ::fidl_next::Encode<
10237 crate::wire::DirectoryLinkRequest<'static>,
10238 <___T as ::fidl_next::Transport>::SendBuffer,
10239 >,
10240 {
10241 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10242 8360374984291987687,
10243 <super::Link as ::fidl_next::Method>::FLEXIBILITY,
10244 request,
10245 ))
10246 }
10247
10248 #[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"]
10249 pub fn unlink(
10250 &self,
10251
10252 name: impl ::fidl_next::Encode<
10253 ::fidl_next::wire::String<'static>,
10254 <___T as ::fidl_next::Transport>::SendBuffer,
10255 >,
10256
10257 options: impl ::fidl_next::Encode<
10258 crate::wire::UnlinkOptions<'static>,
10259 <___T as ::fidl_next::Transport>::SendBuffer,
10260 >,
10261 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
10262 where
10263 <___T as ::fidl_next::Transport>::SendBuffer:
10264 ::fidl_next::encoder::InternalHandleEncoder,
10265 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10266 {
10267 self.unlink_with(crate::generic::DirectoryUnlinkRequest { name, options })
10268 }
10269
10270 #[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"]
10271 pub fn unlink_with<___R>(
10272 &self,
10273 request: ___R,
10274 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
10275 where
10276 ___R: ::fidl_next::Encode<
10277 crate::wire::DirectoryUnlinkRequest<'static>,
10278 <___T as ::fidl_next::Transport>::SendBuffer,
10279 >,
10280 {
10281 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10282 8433556716759383021,
10283 <super::Unlink as ::fidl_next::Method>::FLEXIBILITY,
10284 request,
10285 ))
10286 }
10287
10288 #[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"]
10289 pub fn rename(
10290 &self,
10291
10292 src: impl ::fidl_next::Encode<
10293 ::fidl_next::wire::String<'static>,
10294 <___T as ::fidl_next::Transport>::SendBuffer,
10295 >,
10296
10297 dst_parent_token: impl ::fidl_next::Encode<
10298 ::fidl_next::wire::fuchsia::Event,
10299 <___T as ::fidl_next::Transport>::SendBuffer,
10300 >,
10301
10302 dst: impl ::fidl_next::Encode<
10303 ::fidl_next::wire::String<'static>,
10304 <___T as ::fidl_next::Transport>::SendBuffer,
10305 >,
10306 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
10307 where
10308 <___T as ::fidl_next::Transport>::SendBuffer:
10309 ::fidl_next::encoder::InternalHandleEncoder,
10310 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10311 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10312 {
10313 self.rename_with(crate::generic::DirectoryRenameRequest {
10314 src,
10315
10316 dst_parent_token,
10317
10318 dst,
10319 })
10320 }
10321
10322 #[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"]
10323 pub fn rename_with<___R>(
10324 &self,
10325 request: ___R,
10326 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
10327 where
10328 ___R: ::fidl_next::Encode<
10329 crate::wire::DirectoryRenameRequest<'static>,
10330 <___T as ::fidl_next::Transport>::SendBuffer,
10331 >,
10332 {
10333 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10334 8097726607824333022,
10335 <super::Rename as ::fidl_next::Method>::FLEXIBILITY,
10336 request,
10337 ))
10338 }
10339
10340 #[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"]
10341 pub fn create_symlink(
10342 &self,
10343
10344 name: impl ::fidl_next::Encode<
10345 ::fidl_next::wire::String<'static>,
10346 <___T as ::fidl_next::Transport>::SendBuffer,
10347 >,
10348
10349 target: impl ::fidl_next::Encode<
10350 ::fidl_next::wire::Vector<'static, u8>,
10351 <___T as ::fidl_next::Transport>::SendBuffer,
10352 >,
10353
10354 connection: impl ::fidl_next::Encode<
10355 ::fidl_next::ServerEnd<
10356 crate::Symlink,
10357 ::fidl_next::wire::fuchsia::OptionalChannel,
10358 >,
10359 <___T as ::fidl_next::Transport>::SendBuffer,
10360 >,
10361 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
10362 where
10363 <___T as ::fidl_next::Transport>::SendBuffer:
10364 ::fidl_next::encoder::InternalHandleEncoder,
10365 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10366 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10367 {
10368 self.create_symlink_with(crate::generic::DirectoryCreateSymlinkRequest {
10369 name,
10370
10371 target,
10372
10373 connection,
10374 })
10375 }
10376
10377 #[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"]
10378 pub fn create_symlink_with<___R>(
10379 &self,
10380 request: ___R,
10381 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
10382 where
10383 ___R: ::fidl_next::Encode<
10384 crate::wire::DirectoryCreateSymlinkRequest<'static>,
10385 <___T as ::fidl_next::Transport>::SendBuffer,
10386 >,
10387 {
10388 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10389 2435901052462315657,
10390 <super::CreateSymlink as ::fidl_next::Method>::FLEXIBILITY,
10391 request,
10392 ))
10393 }
10394
10395 #[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"]
10396 pub fn watch(
10397 &self,
10398
10399 mask: impl ::fidl_next::Encode<
10400 crate::wire::WatchMask,
10401 <___T as ::fidl_next::Transport>::SendBuffer,
10402 >,
10403
10404 options: impl ::fidl_next::Encode<
10405 ::fidl_next::wire::Uint32,
10406 <___T as ::fidl_next::Transport>::SendBuffer,
10407 >,
10408
10409 watcher: impl ::fidl_next::Encode<
10410 ::fidl_next::ServerEnd<
10411 crate::DirectoryWatcher,
10412 ::fidl_next::wire::fuchsia::Channel,
10413 >,
10414 <___T as ::fidl_next::Transport>::SendBuffer,
10415 >,
10416 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
10417 where
10418 <___T as ::fidl_next::Transport>::SendBuffer:
10419 ::fidl_next::encoder::InternalHandleEncoder,
10420 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10421 {
10422 self.watch_with(crate::generic::DirectoryWatchRequest { mask, options, watcher })
10423 }
10424
10425 #[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"]
10426 pub fn watch_with<___R>(
10427 &self,
10428 request: ___R,
10429 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
10430 where
10431 ___R: ::fidl_next::Encode<
10432 crate::wire::DirectoryWatchRequest,
10433 <___T as ::fidl_next::Transport>::SendBuffer,
10434 >,
10435 {
10436 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10437 6275512344170098065,
10438 <super::Watch as ::fidl_next::Method>::FLEXIBILITY,
10439 request,
10440 ))
10441 }
10442 }
10443
10444 #[repr(transparent)]
10446 pub struct DirectoryServer<___T: ::fidl_next::Transport> {
10447 server: ::fidl_next::protocol::Server<___T>,
10448 }
10449
10450 impl<___T> DirectoryServer<___T>
10451 where
10452 ___T: ::fidl_next::Transport,
10453 {
10454 #[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"]
10455 pub fn on_open(
10456 &self,
10457
10458 s: impl ::fidl_next::Encode<
10459 ::fidl_next::wire::Int32,
10460 <___T as ::fidl_next::Transport>::SendBuffer,
10461 >,
10462
10463 info: impl ::fidl_next::Encode<
10464 crate::wire_optional::NodeInfoDeprecated<'static>,
10465 <___T as ::fidl_next::Transport>::SendBuffer,
10466 >,
10467 ) -> ::fidl_next::SendFuture<'_, ___T>
10468 where
10469 <___T as ::fidl_next::Transport>::SendBuffer:
10470 ::fidl_next::encoder::InternalHandleEncoder,
10471 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10472 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10473 {
10474 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
10475 }
10476
10477 #[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"]
10478
10479 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
10480 where
10481 ___R: ::fidl_next::Encode<
10482 <super::OnOpen as ::fidl_next::Method>::Request,
10483 <___T as ::fidl_next::Transport>::SendBuffer,
10484 >,
10485 {
10486 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
10487 9207534335756671346,
10488 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
10489 request,
10490 ))
10491 }
10492
10493 #[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"]
10494
10495 pub fn on_representation_with<___R>(
10496 &self,
10497 request: ___R,
10498 ) -> ::fidl_next::SendFuture<'_, ___T>
10499 where
10500 ___R: ::fidl_next::Encode<
10501 <super::OnRepresentation as ::fidl_next::Method>::Request,
10502 <___T as ::fidl_next::Transport>::SendBuffer,
10503 >,
10504 {
10505 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
10506 6679970090861613324,
10507 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
10508 request,
10509 ))
10510 }
10511 }
10512 }
10513}
10514
10515#[diagnostic::on_unimplemented(
10516 note = "If {Self} implements the non-local DirectoryClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
10517)]
10518
10519pub trait DirectoryLocalClientHandler<
10523 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10524 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10525>
10526{
10527 #[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"]
10528 fn on_open(
10529 &mut self,
10530
10531 request: ::fidl_next::Request<directory::OnOpen, ___T>,
10532 ) -> impl ::core::future::Future<Output = ()>;
10533
10534 #[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"]
10535 fn on_representation(
10536 &mut self,
10537
10538 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
10539 ) -> impl ::core::future::Future<Output = ()>;
10540
10541 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10542 ::core::future::ready(())
10543 }
10544}
10545
10546impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Directory
10547where
10548 ___H: DirectoryLocalClientHandler<___T>,
10549 ___T: ::fidl_next::Transport,
10550 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
10551 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10552 Constraint = (),
10553 >,
10554 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
10555 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10556 Constraint = (),
10557 >,
10558{
10559 async fn on_event(
10560 handler: &mut ___H,
10561 ordinal: u64,
10562 flexibility: ::fidl_next::protocol::Flexibility,
10563 body: ::fidl_next::Body<___T>,
10564 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10565 match ordinal {
10566 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10567 Ok(decoded) => {
10568 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
10569 Ok(())
10570 }
10571 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10572 ordinal: 9207534335756671346,
10573 error,
10574 }),
10575 },
10576
10577 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10578 Ok(decoded) => {
10579 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
10580 Ok(())
10581 }
10582 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10583 ordinal: 6679970090861613324,
10584 error,
10585 }),
10586 },
10587
10588 ordinal => {
10589 handler.on_unknown_interaction(ordinal).await;
10590 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10591 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10592 } else {
10593 Ok(())
10594 }
10595 }
10596 }
10597 }
10598}
10599
10600#[diagnostic::on_unimplemented(
10601 note = "If {Self} implements the non-local DirectoryServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
10602)]
10603
10604pub trait DirectoryLocalServerHandler<
10608 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10609 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10610>
10611{
10612 #[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"]
10613 fn advisory_lock(
10614 &mut self,
10615
10616 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
10617
10618 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
10619 ) -> impl ::core::future::Future<Output = ()>;
10620
10621 fn clone(
10622 &mut self,
10623
10624 request: ::fidl_next::Request<directory::Clone, ___T>,
10625 ) -> impl ::core::future::Future<Output = ()>;
10626
10627 #[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"]
10628 fn close(
10629 &mut self,
10630
10631 responder: ::fidl_next::Responder<directory::Close, ___T>,
10632 ) -> impl ::core::future::Future<Output = ()>;
10633
10634 fn query(
10635 &mut self,
10636
10637 responder: ::fidl_next::Responder<directory::Query, ___T>,
10638 ) -> impl ::core::future::Future<Output = ()>;
10639
10640 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
10641 fn deprecated_clone(
10642 &mut self,
10643
10644 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
10645 ) -> impl ::core::future::Future<Output = ()>;
10646
10647 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
10648 fn deprecated_get_attr(
10649 &mut self,
10650
10651 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
10652 ) -> impl ::core::future::Future<Output = ()>;
10653
10654 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
10655 fn deprecated_set_attr(
10656 &mut self,
10657
10658 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
10659
10660 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
10661 ) -> impl ::core::future::Future<Output = ()>;
10662
10663 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
10664 fn deprecated_get_flags(
10665 &mut self,
10666
10667 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
10668 ) -> impl ::core::future::Future<Output = ()>;
10669
10670 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
10671 fn deprecated_set_flags(
10672 &mut self,
10673
10674 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
10675
10676 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
10677 ) -> impl ::core::future::Future<Output = ()>;
10678
10679 #[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"]
10680 fn get_flags(
10681 &mut self,
10682
10683 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
10684 ) -> impl ::core::future::Future<Output = ()>;
10685
10686 #[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"]
10687 fn set_flags(
10688 &mut self,
10689
10690 request: ::fidl_next::Request<directory::SetFlags, ___T>,
10691
10692 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
10693 ) -> impl ::core::future::Future<Output = ()>;
10694
10695 #[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"]
10696 fn query_filesystem(
10697 &mut self,
10698
10699 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
10700 ) -> impl ::core::future::Future<Output = ()>;
10701
10702 #[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"]
10703 fn get_attributes(
10704 &mut self,
10705
10706 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
10707
10708 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
10709 ) -> impl ::core::future::Future<Output = ()>;
10710
10711 #[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"]
10712 fn update_attributes(
10713 &mut self,
10714
10715 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
10716
10717 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
10718 ) -> impl ::core::future::Future<Output = ()>;
10719
10720 #[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"]
10721 fn sync(
10722 &mut self,
10723
10724 responder: ::fidl_next::Responder<directory::Sync, ___T>,
10725 ) -> impl ::core::future::Future<Output = ()>;
10726
10727 #[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"]
10728 fn list_extended_attributes(
10729 &mut self,
10730
10731 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
10732 ) -> impl ::core::future::Future<Output = ()>;
10733
10734 #[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"]
10735 fn get_extended_attribute(
10736 &mut self,
10737
10738 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
10739
10740 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
10741 ) -> impl ::core::future::Future<Output = ()>;
10742
10743 #[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"]
10744 fn set_extended_attribute(
10745 &mut self,
10746
10747 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
10748
10749 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
10750 ) -> impl ::core::future::Future<Output = ()>;
10751
10752 #[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"]
10753 fn remove_extended_attribute(
10754 &mut self,
10755
10756 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
10757
10758 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
10759 ) -> impl ::core::future::Future<Output = ()>;
10760
10761 #[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"]
10762 fn open(
10763 &mut self,
10764
10765 request: ::fidl_next::Request<directory::Open, ___T>,
10766 ) -> impl ::core::future::Future<Output = ()>;
10767
10768 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
10769 fn deprecated_open(
10770 &mut self,
10771
10772 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
10773 ) -> impl ::core::future::Future<Output = ()>;
10774
10775 #[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"]
10776 fn read_dirents(
10777 &mut self,
10778
10779 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
10780
10781 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
10782 ) -> impl ::core::future::Future<Output = ()>;
10783
10784 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
10785 fn rewind(
10786 &mut self,
10787
10788 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
10789 ) -> impl ::core::future::Future<Output = ()>;
10790
10791 #[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"]
10792 fn get_token(
10793 &mut self,
10794
10795 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
10796 ) -> impl ::core::future::Future<Output = ()>;
10797
10798 #[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"]
10799 fn link(
10800 &mut self,
10801
10802 request: ::fidl_next::Request<directory::Link, ___T>,
10803
10804 responder: ::fidl_next::Responder<directory::Link, ___T>,
10805 ) -> impl ::core::future::Future<Output = ()>;
10806
10807 #[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"]
10808 fn unlink(
10809 &mut self,
10810
10811 request: ::fidl_next::Request<directory::Unlink, ___T>,
10812
10813 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
10814 ) -> impl ::core::future::Future<Output = ()>;
10815
10816 #[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"]
10817 fn rename(
10818 &mut self,
10819
10820 request: ::fidl_next::Request<directory::Rename, ___T>,
10821
10822 responder: ::fidl_next::Responder<directory::Rename, ___T>,
10823 ) -> impl ::core::future::Future<Output = ()>;
10824
10825 #[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"]
10826 fn create_symlink(
10827 &mut self,
10828
10829 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
10830
10831 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
10832 ) -> impl ::core::future::Future<Output = ()>;
10833
10834 #[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"]
10835 fn watch(
10836 &mut self,
10837
10838 request: ::fidl_next::Request<directory::Watch, ___T>,
10839
10840 responder: ::fidl_next::Responder<directory::Watch, ___T>,
10841 ) -> impl ::core::future::Future<Output = ()>;
10842
10843 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10844 ::core::future::ready(())
10845 }
10846}
10847
10848impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Directory
10849where
10850 ___H: DirectoryLocalServerHandler<___T>,
10851 ___T: ::fidl_next::Transport,
10852 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
10853 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10854 Constraint = (),
10855 >,
10856 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
10857 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10858 Constraint = (),
10859 >,
10860 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
10861 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10862 Constraint = (),
10863 >,
10864 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
10865 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10866 Constraint = (),
10867 >,
10868 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
10869 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10870 Constraint = (),
10871 >,
10872 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
10873 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10874 Constraint = (),
10875 >,
10876 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
10877 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10878 Constraint = (),
10879 >,
10880 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
10881 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10882 Constraint = (),
10883 >,
10884 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
10885 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10886 Constraint = (),
10887 >,
10888 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
10889 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10890 Constraint = (),
10891 >,
10892 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
10893 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10894 Constraint = (),
10895 >,
10896 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
10897 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10898 Constraint = (),
10899 >,
10900 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
10901 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10902 Constraint = (),
10903 >,
10904 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
10905 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10906 Constraint = (),
10907 >,
10908 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
10909 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10910 Constraint = (),
10911 >,
10912 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
10913 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10914 Constraint = (),
10915 >,
10916 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
10917 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10918 Constraint = (),
10919 >,
10920 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
10921 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10922 Constraint = (),
10923 >,
10924 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
10925 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10926 Constraint = (),
10927 >,
10928 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
10929 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10930 Constraint = (),
10931 >,
10932{
10933 async fn on_one_way(
10934 handler: &mut ___H,
10935 ordinal: u64,
10936 flexibility: ::fidl_next::protocol::Flexibility,
10937 body: ::fidl_next::Body<___T>,
10938 ) -> ::core::result::Result<
10939 (),
10940 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10941 > {
10942 match ordinal {
10943 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10944 Ok(decoded) => {
10945 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
10946 Ok(())
10947 }
10948 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10949 ordinal: 2366825959783828089,
10950 error,
10951 }),
10952 },
10953
10954 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10955 Ok(decoded) => {
10956 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
10957 Ok(())
10958 }
10959 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10960 ordinal: 6512600400724287855,
10961 error,
10962 }),
10963 },
10964
10965 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10966 Ok(decoded) => {
10967 handler
10968 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
10969 .await;
10970 Ok(())
10971 }
10972 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10973 ordinal: 5431626189872037072,
10974 error,
10975 }),
10976 },
10977
10978 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10979 Ok(decoded) => {
10980 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
10981 Ok(())
10982 }
10983 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10984 ordinal: 6236883748953765593,
10985 error,
10986 }),
10987 },
10988
10989 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10990 Ok(decoded) => {
10991 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
10992 Ok(())
10993 }
10994 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10995 ordinal: 3193127272456937152,
10996 error,
10997 }),
10998 },
10999
11000 ordinal => {
11001 handler.on_unknown_interaction(ordinal).await;
11002 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11003 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11004 } else {
11005 Ok(())
11006 }
11007 }
11008 }
11009 }
11010
11011 async fn on_two_way(
11012 handler: &mut ___H,
11013 ordinal: u64,
11014 flexibility: ::fidl_next::protocol::Flexibility,
11015 body: ::fidl_next::Body<___T>,
11016 responder: ::fidl_next::protocol::Responder<___T>,
11017 ) -> ::core::result::Result<
11018 (),
11019 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11020 > {
11021 match ordinal {
11022 7992130864415541162 => {
11023 let responder = ::fidl_next::Responder::from_untyped(responder);
11024
11025 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11026 Ok(decoded) => {
11027 handler
11028 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
11029 .await;
11030 Ok(())
11031 }
11032 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11033 ordinal: 7992130864415541162,
11034 error,
11035 }),
11036 }
11037 }
11038
11039 6540867515453498750 => {
11040 let responder = ::fidl_next::Responder::from_untyped(responder);
11041
11042 handler.close(responder).await;
11043 Ok(())
11044 }
11045
11046 2763219980499352582 => {
11047 let responder = ::fidl_next::Responder::from_untyped(responder);
11048
11049 handler.query(responder).await;
11050 Ok(())
11051 }
11052
11053 8689798978500614909 => {
11054 let responder = ::fidl_next::Responder::from_untyped(responder);
11055
11056 handler.deprecated_get_attr(responder).await;
11057 Ok(())
11058 }
11059
11060 4721673413776871238 => {
11061 let responder = ::fidl_next::Responder::from_untyped(responder);
11062
11063 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11064 Ok(decoded) => {
11065 handler
11066 .deprecated_set_attr(
11067 ::fidl_next::Request::from_decoded(decoded),
11068 responder,
11069 )
11070 .await;
11071 Ok(())
11072 }
11073 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11074 ordinal: 4721673413776871238,
11075 error,
11076 }),
11077 }
11078 }
11079
11080 6595803110182632097 => {
11081 let responder = ::fidl_next::Responder::from_untyped(responder);
11082
11083 handler.deprecated_get_flags(responder).await;
11084 Ok(())
11085 }
11086
11087 5950864159036794675 => {
11088 let responder = ::fidl_next::Responder::from_untyped(responder);
11089
11090 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11091 Ok(decoded) => {
11092 handler
11093 .deprecated_set_flags(
11094 ::fidl_next::Request::from_decoded(decoded),
11095 responder,
11096 )
11097 .await;
11098 Ok(())
11099 }
11100 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11101 ordinal: 5950864159036794675,
11102 error,
11103 }),
11104 }
11105 }
11106
11107 105530239381466147 => {
11108 let responder = ::fidl_next::Responder::from_untyped(responder);
11109
11110 handler.get_flags(responder).await;
11111 Ok(())
11112 }
11113
11114 6172186066099445416 => {
11115 let responder = ::fidl_next::Responder::from_untyped(responder);
11116
11117 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11118 Ok(decoded) => {
11119 handler
11120 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
11121 .await;
11122 Ok(())
11123 }
11124 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11125 ordinal: 6172186066099445416,
11126 error,
11127 }),
11128 }
11129 }
11130
11131 8013111122914313744 => {
11132 let responder = ::fidl_next::Responder::from_untyped(responder);
11133
11134 handler.query_filesystem(responder).await;
11135 Ok(())
11136 }
11137
11138 4414537700416816443 => {
11139 let responder = ::fidl_next::Responder::from_untyped(responder);
11140
11141 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11142 Ok(decoded) => {
11143 handler
11144 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
11145 .await;
11146 Ok(())
11147 }
11148 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11149 ordinal: 4414537700416816443,
11150 error,
11151 }),
11152 }
11153 }
11154
11155 3677402239314018056 => {
11156 let responder = ::fidl_next::Responder::from_untyped(responder);
11157
11158 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11159 Ok(decoded) => {
11160 handler
11161 .update_attributes(
11162 ::fidl_next::Request::from_decoded(decoded),
11163 responder,
11164 )
11165 .await;
11166 Ok(())
11167 }
11168 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11169 ordinal: 3677402239314018056,
11170 error,
11171 }),
11172 }
11173 }
11174
11175 3196473584242777161 => {
11176 let responder = ::fidl_next::Responder::from_untyped(responder);
11177
11178 handler.sync(responder).await;
11179 Ok(())
11180 }
11181
11182 5043930208506967771 => {
11183 let responder = ::fidl_next::Responder::from_untyped(responder);
11184
11185 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11186 Ok(decoded) => {
11187 handler
11188 .get_extended_attribute(
11189 ::fidl_next::Request::from_decoded(decoded),
11190 responder,
11191 )
11192 .await;
11193 Ok(())
11194 }
11195 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11196 ordinal: 5043930208506967771,
11197 error,
11198 }),
11199 }
11200 }
11201
11202 5374223046099989052 => {
11203 let responder = ::fidl_next::Responder::from_untyped(responder);
11204
11205 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11206 Ok(decoded) => {
11207 handler
11208 .set_extended_attribute(
11209 ::fidl_next::Request::from_decoded(decoded),
11210 responder,
11211 )
11212 .await;
11213 Ok(())
11214 }
11215 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11216 ordinal: 5374223046099989052,
11217 error,
11218 }),
11219 }
11220 }
11221
11222 8794297771444732717 => {
11223 let responder = ::fidl_next::Responder::from_untyped(responder);
11224
11225 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11226 Ok(decoded) => {
11227 handler
11228 .remove_extended_attribute(
11229 ::fidl_next::Request::from_decoded(decoded),
11230 responder,
11231 )
11232 .await;
11233 Ok(())
11234 }
11235 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11236 ordinal: 8794297771444732717,
11237 error,
11238 }),
11239 }
11240 }
11241
11242 3855785432100874762 => {
11243 let responder = ::fidl_next::Responder::from_untyped(responder);
11244
11245 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11246 Ok(decoded) => {
11247 handler
11248 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
11249 .await;
11250 Ok(())
11251 }
11252 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11253 ordinal: 3855785432100874762,
11254 error,
11255 }),
11256 }
11257 }
11258
11259 1635123508515392625 => {
11260 let responder = ::fidl_next::Responder::from_untyped(responder);
11261
11262 handler.rewind(responder).await;
11263 Ok(())
11264 }
11265
11266 2787337947777369685 => {
11267 let responder = ::fidl_next::Responder::from_untyped(responder);
11268
11269 handler.get_token(responder).await;
11270 Ok(())
11271 }
11272
11273 8360374984291987687 => {
11274 let responder = ::fidl_next::Responder::from_untyped(responder);
11275
11276 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11277 Ok(decoded) => {
11278 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
11279 Ok(())
11280 }
11281 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11282 ordinal: 8360374984291987687,
11283 error,
11284 }),
11285 }
11286 }
11287
11288 8433556716759383021 => {
11289 let responder = ::fidl_next::Responder::from_untyped(responder);
11290
11291 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11292 Ok(decoded) => {
11293 handler
11294 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
11295 .await;
11296 Ok(())
11297 }
11298 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11299 ordinal: 8433556716759383021,
11300 error,
11301 }),
11302 }
11303 }
11304
11305 8097726607824333022 => {
11306 let responder = ::fidl_next::Responder::from_untyped(responder);
11307
11308 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11309 Ok(decoded) => {
11310 handler
11311 .rename(::fidl_next::Request::from_decoded(decoded), responder)
11312 .await;
11313 Ok(())
11314 }
11315 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11316 ordinal: 8097726607824333022,
11317 error,
11318 }),
11319 }
11320 }
11321
11322 2435901052462315657 => {
11323 let responder = ::fidl_next::Responder::from_untyped(responder);
11324
11325 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11326 Ok(decoded) => {
11327 handler
11328 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
11329 .await;
11330 Ok(())
11331 }
11332 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11333 ordinal: 2435901052462315657,
11334 error,
11335 }),
11336 }
11337 }
11338
11339 6275512344170098065 => {
11340 let responder = ::fidl_next::Responder::from_untyped(responder);
11341
11342 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11343 Ok(decoded) => {
11344 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
11345 Ok(())
11346 }
11347 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11348 ordinal: 6275512344170098065,
11349 error,
11350 }),
11351 }
11352 }
11353
11354 ordinal => {
11355 handler.on_unknown_interaction(ordinal).await;
11356 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11357 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11358 } else {
11359 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
11360 ordinal,
11361 flexibility,
11362 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
11363 )
11364 .expect("encoding a framework error should never fail")
11365 .await?;
11366 Ok(())
11367 }
11368 }
11369 }
11370 }
11371}
11372
11373pub trait DirectoryClientHandler<
11377 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11378 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11379>
11380{
11381 #[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"]
11382 fn on_open(
11383 &mut self,
11384
11385 request: ::fidl_next::Request<directory::OnOpen, ___T>,
11386 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11387
11388 #[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"]
11389 fn on_representation(
11390 &mut self,
11391
11392 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
11393 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11394
11395 fn on_unknown_interaction(
11396 &mut self,
11397 ordinal: u64,
11398 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11399 ::core::future::ready(())
11400 }
11401}
11402
11403impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Directory
11404where
11405 ___H: DirectoryClientHandler<___T> + ::core::marker::Send,
11406 ___T: ::fidl_next::Transport,
11407 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
11408 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11409 Constraint = (),
11410 >,
11411 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
11412 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11413 Constraint = (),
11414 >,
11415{
11416 async fn on_event(
11417 handler: &mut ___H,
11418 ordinal: u64,
11419 flexibility: ::fidl_next::protocol::Flexibility,
11420 body: ::fidl_next::Body<___T>,
11421 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11422 match ordinal {
11423 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11424 Ok(decoded) => {
11425 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
11426 Ok(())
11427 }
11428 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11429 ordinal: 9207534335756671346,
11430 error,
11431 }),
11432 },
11433
11434 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11435 Ok(decoded) => {
11436 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
11437 Ok(())
11438 }
11439 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11440 ordinal: 6679970090861613324,
11441 error,
11442 }),
11443 },
11444
11445 ordinal => {
11446 handler.on_unknown_interaction(ordinal).await;
11447 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11448 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11449 } else {
11450 Ok(())
11451 }
11452 }
11453 }
11454 }
11455}
11456
11457pub trait DirectoryServerHandler<
11461 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11462 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11463>
11464{
11465 #[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"]
11466 fn advisory_lock(
11467 &mut self,
11468
11469 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
11470
11471 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
11472 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11473
11474 fn clone(
11475 &mut self,
11476
11477 request: ::fidl_next::Request<directory::Clone, ___T>,
11478 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11479
11480 #[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"]
11481 fn close(
11482 &mut self,
11483
11484 responder: ::fidl_next::Responder<directory::Close, ___T>,
11485 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11486
11487 fn query(
11488 &mut self,
11489
11490 responder: ::fidl_next::Responder<directory::Query, ___T>,
11491 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11492
11493 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11494 fn deprecated_clone(
11495 &mut self,
11496
11497 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
11498 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11499
11500 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
11501 fn deprecated_get_attr(
11502 &mut self,
11503
11504 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
11505 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11506
11507 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
11508 fn deprecated_set_attr(
11509 &mut self,
11510
11511 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
11512
11513 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
11514 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11515
11516 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
11517 fn deprecated_get_flags(
11518 &mut self,
11519
11520 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
11521 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11522
11523 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11524 fn deprecated_set_flags(
11525 &mut self,
11526
11527 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
11528
11529 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
11530 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11531
11532 #[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"]
11533 fn get_flags(
11534 &mut self,
11535
11536 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
11537 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11538
11539 #[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"]
11540 fn set_flags(
11541 &mut self,
11542
11543 request: ::fidl_next::Request<directory::SetFlags, ___T>,
11544
11545 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
11546 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11547
11548 #[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"]
11549 fn query_filesystem(
11550 &mut self,
11551
11552 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
11553 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11554
11555 #[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"]
11556 fn get_attributes(
11557 &mut self,
11558
11559 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
11560
11561 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
11562 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11563
11564 #[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"]
11565 fn update_attributes(
11566 &mut self,
11567
11568 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
11569
11570 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
11571 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11572
11573 #[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"]
11574 fn sync(
11575 &mut self,
11576
11577 responder: ::fidl_next::Responder<directory::Sync, ___T>,
11578 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11579
11580 #[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"]
11581 fn list_extended_attributes(
11582 &mut self,
11583
11584 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
11585 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11586
11587 #[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"]
11588 fn get_extended_attribute(
11589 &mut self,
11590
11591 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
11592
11593 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
11594 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11595
11596 #[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"]
11597 fn set_extended_attribute(
11598 &mut self,
11599
11600 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
11601
11602 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
11603 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11604
11605 #[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"]
11606 fn remove_extended_attribute(
11607 &mut self,
11608
11609 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
11610
11611 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
11612 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11613
11614 #[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"]
11615 fn open(
11616 &mut self,
11617
11618 request: ::fidl_next::Request<directory::Open, ___T>,
11619 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11620
11621 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
11622 fn deprecated_open(
11623 &mut self,
11624
11625 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
11626 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11627
11628 #[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"]
11629 fn read_dirents(
11630 &mut self,
11631
11632 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
11633
11634 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
11635 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11636
11637 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
11638 fn rewind(
11639 &mut self,
11640
11641 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
11642 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11643
11644 #[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"]
11645 fn get_token(
11646 &mut self,
11647
11648 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
11649 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11650
11651 #[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"]
11652 fn link(
11653 &mut self,
11654
11655 request: ::fidl_next::Request<directory::Link, ___T>,
11656
11657 responder: ::fidl_next::Responder<directory::Link, ___T>,
11658 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11659
11660 #[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"]
11661 fn unlink(
11662 &mut self,
11663
11664 request: ::fidl_next::Request<directory::Unlink, ___T>,
11665
11666 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
11667 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11668
11669 #[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"]
11670 fn rename(
11671 &mut self,
11672
11673 request: ::fidl_next::Request<directory::Rename, ___T>,
11674
11675 responder: ::fidl_next::Responder<directory::Rename, ___T>,
11676 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11677
11678 #[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"]
11679 fn create_symlink(
11680 &mut self,
11681
11682 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
11683
11684 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
11685 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11686
11687 #[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"]
11688 fn watch(
11689 &mut self,
11690
11691 request: ::fidl_next::Request<directory::Watch, ___T>,
11692
11693 responder: ::fidl_next::Responder<directory::Watch, ___T>,
11694 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11695
11696 fn on_unknown_interaction(
11697 &mut self,
11698 ordinal: u64,
11699 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11700 ::core::future::ready(())
11701 }
11702}
11703
11704impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Directory
11705where
11706 ___H: DirectoryServerHandler<___T> + ::core::marker::Send,
11707 ___T: ::fidl_next::Transport,
11708 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
11709 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11710 Constraint = (),
11711 >,
11712 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
11713 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11714 Constraint = (),
11715 >,
11716 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
11717 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11718 Constraint = (),
11719 >,
11720 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
11721 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11722 Constraint = (),
11723 >,
11724 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
11725 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11726 Constraint = (),
11727 >,
11728 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
11729 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11730 Constraint = (),
11731 >,
11732 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
11733 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11734 Constraint = (),
11735 >,
11736 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
11737 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11738 Constraint = (),
11739 >,
11740 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
11741 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11742 Constraint = (),
11743 >,
11744 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11745 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11746 Constraint = (),
11747 >,
11748 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11749 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11750 Constraint = (),
11751 >,
11752 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11753 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11754 Constraint = (),
11755 >,
11756 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
11757 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11758 Constraint = (),
11759 >,
11760 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
11761 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11762 Constraint = (),
11763 >,
11764 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
11765 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11766 Constraint = (),
11767 >,
11768 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
11769 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11770 Constraint = (),
11771 >,
11772 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
11773 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11774 Constraint = (),
11775 >,
11776 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
11777 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11778 Constraint = (),
11779 >,
11780 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
11781 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11782 Constraint = (),
11783 >,
11784 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
11785 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11786 Constraint = (),
11787 >,
11788{
11789 async fn on_one_way(
11790 handler: &mut ___H,
11791 ordinal: u64,
11792 flexibility: ::fidl_next::protocol::Flexibility,
11793 body: ::fidl_next::Body<___T>,
11794 ) -> ::core::result::Result<
11795 (),
11796 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11797 > {
11798 match ordinal {
11799 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11800 Ok(decoded) => {
11801 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
11802 Ok(())
11803 }
11804 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11805 ordinal: 2366825959783828089,
11806 error,
11807 }),
11808 },
11809
11810 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11811 Ok(decoded) => {
11812 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
11813 Ok(())
11814 }
11815 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11816 ordinal: 6512600400724287855,
11817 error,
11818 }),
11819 },
11820
11821 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11822 Ok(decoded) => {
11823 handler
11824 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
11825 .await;
11826 Ok(())
11827 }
11828 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11829 ordinal: 5431626189872037072,
11830 error,
11831 }),
11832 },
11833
11834 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11835 Ok(decoded) => {
11836 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
11837 Ok(())
11838 }
11839 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11840 ordinal: 6236883748953765593,
11841 error,
11842 }),
11843 },
11844
11845 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11846 Ok(decoded) => {
11847 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
11848 Ok(())
11849 }
11850 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11851 ordinal: 3193127272456937152,
11852 error,
11853 }),
11854 },
11855
11856 ordinal => {
11857 handler.on_unknown_interaction(ordinal).await;
11858 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11859 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11860 } else {
11861 Ok(())
11862 }
11863 }
11864 }
11865 }
11866
11867 async fn on_two_way(
11868 handler: &mut ___H,
11869 ordinal: u64,
11870 flexibility: ::fidl_next::protocol::Flexibility,
11871 body: ::fidl_next::Body<___T>,
11872 responder: ::fidl_next::protocol::Responder<___T>,
11873 ) -> ::core::result::Result<
11874 (),
11875 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11876 > {
11877 match ordinal {
11878 7992130864415541162 => {
11879 let responder = ::fidl_next::Responder::from_untyped(responder);
11880
11881 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11882 Ok(decoded) => {
11883 handler
11884 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
11885 .await;
11886 Ok(())
11887 }
11888 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11889 ordinal: 7992130864415541162,
11890 error,
11891 }),
11892 }
11893 }
11894
11895 6540867515453498750 => {
11896 let responder = ::fidl_next::Responder::from_untyped(responder);
11897
11898 handler.close(responder).await;
11899 Ok(())
11900 }
11901
11902 2763219980499352582 => {
11903 let responder = ::fidl_next::Responder::from_untyped(responder);
11904
11905 handler.query(responder).await;
11906 Ok(())
11907 }
11908
11909 8689798978500614909 => {
11910 let responder = ::fidl_next::Responder::from_untyped(responder);
11911
11912 handler.deprecated_get_attr(responder).await;
11913 Ok(())
11914 }
11915
11916 4721673413776871238 => {
11917 let responder = ::fidl_next::Responder::from_untyped(responder);
11918
11919 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11920 Ok(decoded) => {
11921 handler
11922 .deprecated_set_attr(
11923 ::fidl_next::Request::from_decoded(decoded),
11924 responder,
11925 )
11926 .await;
11927 Ok(())
11928 }
11929 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11930 ordinal: 4721673413776871238,
11931 error,
11932 }),
11933 }
11934 }
11935
11936 6595803110182632097 => {
11937 let responder = ::fidl_next::Responder::from_untyped(responder);
11938
11939 handler.deprecated_get_flags(responder).await;
11940 Ok(())
11941 }
11942
11943 5950864159036794675 => {
11944 let responder = ::fidl_next::Responder::from_untyped(responder);
11945
11946 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11947 Ok(decoded) => {
11948 handler
11949 .deprecated_set_flags(
11950 ::fidl_next::Request::from_decoded(decoded),
11951 responder,
11952 )
11953 .await;
11954 Ok(())
11955 }
11956 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11957 ordinal: 5950864159036794675,
11958 error,
11959 }),
11960 }
11961 }
11962
11963 105530239381466147 => {
11964 let responder = ::fidl_next::Responder::from_untyped(responder);
11965
11966 handler.get_flags(responder).await;
11967 Ok(())
11968 }
11969
11970 6172186066099445416 => {
11971 let responder = ::fidl_next::Responder::from_untyped(responder);
11972
11973 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11974 Ok(decoded) => {
11975 handler
11976 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
11977 .await;
11978 Ok(())
11979 }
11980 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11981 ordinal: 6172186066099445416,
11982 error,
11983 }),
11984 }
11985 }
11986
11987 8013111122914313744 => {
11988 let responder = ::fidl_next::Responder::from_untyped(responder);
11989
11990 handler.query_filesystem(responder).await;
11991 Ok(())
11992 }
11993
11994 4414537700416816443 => {
11995 let responder = ::fidl_next::Responder::from_untyped(responder);
11996
11997 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11998 Ok(decoded) => {
11999 handler
12000 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
12001 .await;
12002 Ok(())
12003 }
12004 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12005 ordinal: 4414537700416816443,
12006 error,
12007 }),
12008 }
12009 }
12010
12011 3677402239314018056 => {
12012 let responder = ::fidl_next::Responder::from_untyped(responder);
12013
12014 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12015 Ok(decoded) => {
12016 handler
12017 .update_attributes(
12018 ::fidl_next::Request::from_decoded(decoded),
12019 responder,
12020 )
12021 .await;
12022 Ok(())
12023 }
12024 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12025 ordinal: 3677402239314018056,
12026 error,
12027 }),
12028 }
12029 }
12030
12031 3196473584242777161 => {
12032 let responder = ::fidl_next::Responder::from_untyped(responder);
12033
12034 handler.sync(responder).await;
12035 Ok(())
12036 }
12037
12038 5043930208506967771 => {
12039 let responder = ::fidl_next::Responder::from_untyped(responder);
12040
12041 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12042 Ok(decoded) => {
12043 handler
12044 .get_extended_attribute(
12045 ::fidl_next::Request::from_decoded(decoded),
12046 responder,
12047 )
12048 .await;
12049 Ok(())
12050 }
12051 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12052 ordinal: 5043930208506967771,
12053 error,
12054 }),
12055 }
12056 }
12057
12058 5374223046099989052 => {
12059 let responder = ::fidl_next::Responder::from_untyped(responder);
12060
12061 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12062 Ok(decoded) => {
12063 handler
12064 .set_extended_attribute(
12065 ::fidl_next::Request::from_decoded(decoded),
12066 responder,
12067 )
12068 .await;
12069 Ok(())
12070 }
12071 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12072 ordinal: 5374223046099989052,
12073 error,
12074 }),
12075 }
12076 }
12077
12078 8794297771444732717 => {
12079 let responder = ::fidl_next::Responder::from_untyped(responder);
12080
12081 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12082 Ok(decoded) => {
12083 handler
12084 .remove_extended_attribute(
12085 ::fidl_next::Request::from_decoded(decoded),
12086 responder,
12087 )
12088 .await;
12089 Ok(())
12090 }
12091 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12092 ordinal: 8794297771444732717,
12093 error,
12094 }),
12095 }
12096 }
12097
12098 3855785432100874762 => {
12099 let responder = ::fidl_next::Responder::from_untyped(responder);
12100
12101 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12102 Ok(decoded) => {
12103 handler
12104 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
12105 .await;
12106 Ok(())
12107 }
12108 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12109 ordinal: 3855785432100874762,
12110 error,
12111 }),
12112 }
12113 }
12114
12115 1635123508515392625 => {
12116 let responder = ::fidl_next::Responder::from_untyped(responder);
12117
12118 handler.rewind(responder).await;
12119 Ok(())
12120 }
12121
12122 2787337947777369685 => {
12123 let responder = ::fidl_next::Responder::from_untyped(responder);
12124
12125 handler.get_token(responder).await;
12126 Ok(())
12127 }
12128
12129 8360374984291987687 => {
12130 let responder = ::fidl_next::Responder::from_untyped(responder);
12131
12132 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12133 Ok(decoded) => {
12134 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
12135 Ok(())
12136 }
12137 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12138 ordinal: 8360374984291987687,
12139 error,
12140 }),
12141 }
12142 }
12143
12144 8433556716759383021 => {
12145 let responder = ::fidl_next::Responder::from_untyped(responder);
12146
12147 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12148 Ok(decoded) => {
12149 handler
12150 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
12151 .await;
12152 Ok(())
12153 }
12154 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12155 ordinal: 8433556716759383021,
12156 error,
12157 }),
12158 }
12159 }
12160
12161 8097726607824333022 => {
12162 let responder = ::fidl_next::Responder::from_untyped(responder);
12163
12164 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12165 Ok(decoded) => {
12166 handler
12167 .rename(::fidl_next::Request::from_decoded(decoded), responder)
12168 .await;
12169 Ok(())
12170 }
12171 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12172 ordinal: 8097726607824333022,
12173 error,
12174 }),
12175 }
12176 }
12177
12178 2435901052462315657 => {
12179 let responder = ::fidl_next::Responder::from_untyped(responder);
12180
12181 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12182 Ok(decoded) => {
12183 handler
12184 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
12185 .await;
12186 Ok(())
12187 }
12188 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12189 ordinal: 2435901052462315657,
12190 error,
12191 }),
12192 }
12193 }
12194
12195 6275512344170098065 => {
12196 let responder = ::fidl_next::Responder::from_untyped(responder);
12197
12198 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12199 Ok(decoded) => {
12200 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
12201 Ok(())
12202 }
12203 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12204 ordinal: 6275512344170098065,
12205 error,
12206 }),
12207 }
12208 }
12209
12210 ordinal => {
12211 handler.on_unknown_interaction(ordinal).await;
12212 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12213 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12214 } else {
12215 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
12216 ordinal,
12217 flexibility,
12218 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
12219 )
12220 .expect("encoding a framework error should never fail")
12221 .await?;
12222 Ok(())
12223 }
12224 }
12225 }
12226 }
12227}
12228
12229impl<___T> DirectoryClientHandler<___T> for ::fidl_next::IgnoreEvents
12230where
12231 ___T: ::fidl_next::Transport,
12232{
12233 async fn on_open(&mut self, _: ::fidl_next::Request<directory::OnOpen, ___T>) {}
12234
12235 async fn on_representation(
12236 &mut self,
12237
12238 _: ::fidl_next::Request<directory::OnRepresentation, ___T>,
12239 ) {
12240 }
12241
12242 async fn on_unknown_interaction(&mut self, _: u64) {}
12243}
12244
12245impl<___H, ___T> DirectoryLocalClientHandler<___T> for ::fidl_next::Local<___H>
12246where
12247 ___H: DirectoryClientHandler<___T>,
12248 ___T: ::fidl_next::Transport,
12249{
12250 async fn on_open(&mut self, request: ::fidl_next::Request<directory::OnOpen, ___T>) {
12251 ___H::on_open(&mut self.0, request).await
12252 }
12253
12254 async fn on_representation(
12255 &mut self,
12256
12257 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
12258 ) {
12259 ___H::on_representation(&mut self.0, request).await
12260 }
12261
12262 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12263 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12264 }
12265}
12266
12267impl<___H, ___T> DirectoryLocalServerHandler<___T> for ::fidl_next::Local<___H>
12268where
12269 ___H: DirectoryServerHandler<___T>,
12270 ___T: ::fidl_next::Transport,
12271{
12272 async fn advisory_lock(
12273 &mut self,
12274
12275 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
12276
12277 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
12278 ) {
12279 ___H::advisory_lock(&mut self.0, request, responder).await
12280 }
12281
12282 async fn clone(&mut self, request: ::fidl_next::Request<directory::Clone, ___T>) {
12283 ___H::clone(&mut self.0, request).await
12284 }
12285
12286 async fn close(&mut self, responder: ::fidl_next::Responder<directory::Close, ___T>) {
12287 ___H::close(&mut self.0, responder).await
12288 }
12289
12290 async fn query(&mut self, responder: ::fidl_next::Responder<directory::Query, ___T>) {
12291 ___H::query(&mut self.0, responder).await
12292 }
12293
12294 async fn deprecated_clone(
12295 &mut self,
12296
12297 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
12298 ) {
12299 ___H::deprecated_clone(&mut self.0, request).await
12300 }
12301
12302 async fn deprecated_get_attr(
12303 &mut self,
12304
12305 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
12306 ) {
12307 ___H::deprecated_get_attr(&mut self.0, responder).await
12308 }
12309
12310 async fn deprecated_set_attr(
12311 &mut self,
12312
12313 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
12314
12315 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
12316 ) {
12317 ___H::deprecated_set_attr(&mut self.0, request, responder).await
12318 }
12319
12320 async fn deprecated_get_flags(
12321 &mut self,
12322
12323 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
12324 ) {
12325 ___H::deprecated_get_flags(&mut self.0, responder).await
12326 }
12327
12328 async fn deprecated_set_flags(
12329 &mut self,
12330
12331 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
12332
12333 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
12334 ) {
12335 ___H::deprecated_set_flags(&mut self.0, request, responder).await
12336 }
12337
12338 async fn get_flags(&mut self, responder: ::fidl_next::Responder<directory::GetFlags, ___T>) {
12339 ___H::get_flags(&mut self.0, responder).await
12340 }
12341
12342 async fn set_flags(
12343 &mut self,
12344
12345 request: ::fidl_next::Request<directory::SetFlags, ___T>,
12346
12347 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
12348 ) {
12349 ___H::set_flags(&mut self.0, request, responder).await
12350 }
12351
12352 async fn query_filesystem(
12353 &mut self,
12354
12355 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
12356 ) {
12357 ___H::query_filesystem(&mut self.0, responder).await
12358 }
12359
12360 async fn get_attributes(
12361 &mut self,
12362
12363 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
12364
12365 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
12366 ) {
12367 ___H::get_attributes(&mut self.0, request, responder).await
12368 }
12369
12370 async fn update_attributes(
12371 &mut self,
12372
12373 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
12374
12375 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
12376 ) {
12377 ___H::update_attributes(&mut self.0, request, responder).await
12378 }
12379
12380 async fn sync(&mut self, responder: ::fidl_next::Responder<directory::Sync, ___T>) {
12381 ___H::sync(&mut self.0, responder).await
12382 }
12383
12384 async fn list_extended_attributes(
12385 &mut self,
12386
12387 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
12388 ) {
12389 ___H::list_extended_attributes(&mut self.0, request).await
12390 }
12391
12392 async fn get_extended_attribute(
12393 &mut self,
12394
12395 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
12396
12397 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
12398 ) {
12399 ___H::get_extended_attribute(&mut self.0, request, responder).await
12400 }
12401
12402 async fn set_extended_attribute(
12403 &mut self,
12404
12405 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
12406
12407 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
12408 ) {
12409 ___H::set_extended_attribute(&mut self.0, request, responder).await
12410 }
12411
12412 async fn remove_extended_attribute(
12413 &mut self,
12414
12415 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
12416
12417 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
12418 ) {
12419 ___H::remove_extended_attribute(&mut self.0, request, responder).await
12420 }
12421
12422 async fn open(&mut self, request: ::fidl_next::Request<directory::Open, ___T>) {
12423 ___H::open(&mut self.0, request).await
12424 }
12425
12426 async fn deprecated_open(
12427 &mut self,
12428
12429 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
12430 ) {
12431 ___H::deprecated_open(&mut self.0, request).await
12432 }
12433
12434 async fn read_dirents(
12435 &mut self,
12436
12437 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
12438
12439 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
12440 ) {
12441 ___H::read_dirents(&mut self.0, request, responder).await
12442 }
12443
12444 async fn rewind(&mut self, responder: ::fidl_next::Responder<directory::Rewind, ___T>) {
12445 ___H::rewind(&mut self.0, responder).await
12446 }
12447
12448 async fn get_token(&mut self, responder: ::fidl_next::Responder<directory::GetToken, ___T>) {
12449 ___H::get_token(&mut self.0, responder).await
12450 }
12451
12452 async fn link(
12453 &mut self,
12454
12455 request: ::fidl_next::Request<directory::Link, ___T>,
12456
12457 responder: ::fidl_next::Responder<directory::Link, ___T>,
12458 ) {
12459 ___H::link(&mut self.0, request, responder).await
12460 }
12461
12462 async fn unlink(
12463 &mut self,
12464
12465 request: ::fidl_next::Request<directory::Unlink, ___T>,
12466
12467 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
12468 ) {
12469 ___H::unlink(&mut self.0, request, responder).await
12470 }
12471
12472 async fn rename(
12473 &mut self,
12474
12475 request: ::fidl_next::Request<directory::Rename, ___T>,
12476
12477 responder: ::fidl_next::Responder<directory::Rename, ___T>,
12478 ) {
12479 ___H::rename(&mut self.0, request, responder).await
12480 }
12481
12482 async fn create_symlink(
12483 &mut self,
12484
12485 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
12486
12487 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
12488 ) {
12489 ___H::create_symlink(&mut self.0, request, responder).await
12490 }
12491
12492 async fn watch(
12493 &mut self,
12494
12495 request: ::fidl_next::Request<directory::Watch, ___T>,
12496
12497 responder: ::fidl_next::Responder<directory::Watch, ___T>,
12498 ) {
12499 ___H::watch(&mut self.0, request, responder).await
12500 }
12501
12502 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12503 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12504 }
12505}
12506
12507#[derive(PartialEq, Debug)]
12509pub struct Linkable;
12510
12511#[cfg(target_os = "fuchsia")]
12512impl ::fidl_next::HasTransport for Linkable {
12513 type Transport = ::fidl_next::fuchsia::zx::Channel;
12514}
12515
12516pub mod linkable {
12517 pub mod prelude {
12518 pub use crate::{
12519 Linkable, LinkableClientHandler, LinkableLocalClientHandler,
12520 LinkableLocalServerHandler, LinkableServerHandler, linkable,
12521 };
12522
12523 pub use crate::natural::LinkableLinkIntoRequest;
12524
12525 pub use crate::natural::LinkableLinkIntoResponse;
12526 }
12527
12528 pub struct LinkInto;
12529
12530 impl ::fidl_next::Method for LinkInto {
12531 const ORDINAL: u64 = 6121399674497678964;
12532 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12533 ::fidl_next::protocol::Flexibility::Strict;
12534
12535 type Protocol = crate::Linkable;
12536
12537 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
12538 }
12539
12540 impl ::fidl_next::TwoWayMethod for LinkInto {
12541 type Response = ::fidl_next::wire::Result<
12542 'static,
12543 crate::wire::LinkableLinkIntoResponse,
12544 ::fidl_next::wire::Int32,
12545 >;
12546 }
12547
12548 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
12549 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
12550
12551 fn respond(response: ___R) -> Self::Output {
12552 ::core::result::Result::Ok(response)
12553 }
12554 }
12555
12556 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
12557 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
12558
12559 fn respond_err(response: ___R) -> Self::Output {
12560 ::core::result::Result::Err(response)
12561 }
12562 }
12563
12564 mod ___detail {
12565 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Linkable
12566 where
12567 ___T: ::fidl_next::Transport,
12568 {
12569 type Client = LinkableClient<___T>;
12570 type Server = LinkableServer<___T>;
12571 }
12572
12573 #[repr(transparent)]
12575 pub struct LinkableClient<___T: ::fidl_next::Transport> {
12576 #[allow(dead_code)]
12577 client: ::fidl_next::protocol::Client<___T>,
12578 }
12579
12580 impl<___T> LinkableClient<___T>
12581 where
12582 ___T: ::fidl_next::Transport,
12583 {
12584 #[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"]
12585 pub fn link_into(
12586 &self,
12587
12588 dst_parent_token: impl ::fidl_next::Encode<
12589 ::fidl_next::wire::fuchsia::Event,
12590 <___T as ::fidl_next::Transport>::SendBuffer,
12591 >,
12592
12593 dst: impl ::fidl_next::Encode<
12594 ::fidl_next::wire::String<'static>,
12595 <___T as ::fidl_next::Transport>::SendBuffer,
12596 >,
12597 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
12598 where
12599 <___T as ::fidl_next::Transport>::SendBuffer:
12600 ::fidl_next::encoder::InternalHandleEncoder,
12601 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12602 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12603 {
12604 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
12605 dst_parent_token,
12606
12607 dst,
12608 })
12609 }
12610
12611 #[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"]
12612 pub fn link_into_with<___R>(
12613 &self,
12614 request: ___R,
12615 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
12616 where
12617 ___R: ::fidl_next::Encode<
12618 crate::wire::LinkableLinkIntoRequest<'static>,
12619 <___T as ::fidl_next::Transport>::SendBuffer,
12620 >,
12621 {
12622 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12623 6121399674497678964,
12624 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
12625 request,
12626 ))
12627 }
12628 }
12629
12630 #[repr(transparent)]
12632 pub struct LinkableServer<___T: ::fidl_next::Transport> {
12633 server: ::fidl_next::protocol::Server<___T>,
12634 }
12635
12636 impl<___T> LinkableServer<___T> where ___T: ::fidl_next::Transport {}
12637 }
12638}
12639
12640#[diagnostic::on_unimplemented(
12641 note = "If {Self} implements the non-local LinkableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
12642)]
12643
12644pub trait LinkableLocalClientHandler<
12648 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12649 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12650>
12651{
12652}
12653
12654impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Linkable
12655where
12656 ___H: LinkableLocalClientHandler<___T>,
12657 ___T: ::fidl_next::Transport,
12658{
12659 async fn on_event(
12660 handler: &mut ___H,
12661 ordinal: u64,
12662 flexibility: ::fidl_next::protocol::Flexibility,
12663 body: ::fidl_next::Body<___T>,
12664 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12665 match ordinal {
12666 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12667 }
12668 }
12669}
12670
12671#[diagnostic::on_unimplemented(
12672 note = "If {Self} implements the non-local LinkableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
12673)]
12674
12675pub trait LinkableLocalServerHandler<
12679 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12680 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12681>
12682{
12683 #[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"]
12684 fn link_into(
12685 &mut self,
12686
12687 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12688
12689 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12690 ) -> impl ::core::future::Future<Output = ()>;
12691}
12692
12693impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Linkable
12694where
12695 ___H: LinkableLocalServerHandler<___T>,
12696 ___T: ::fidl_next::Transport,
12697 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12698 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12699 Constraint = (),
12700 >,
12701{
12702 async fn on_one_way(
12703 handler: &mut ___H,
12704 ordinal: u64,
12705 flexibility: ::fidl_next::protocol::Flexibility,
12706 body: ::fidl_next::Body<___T>,
12707 ) -> ::core::result::Result<
12708 (),
12709 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12710 > {
12711 match ordinal {
12712 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12713 }
12714 }
12715
12716 async fn on_two_way(
12717 handler: &mut ___H,
12718 ordinal: u64,
12719 flexibility: ::fidl_next::protocol::Flexibility,
12720 body: ::fidl_next::Body<___T>,
12721 responder: ::fidl_next::protocol::Responder<___T>,
12722 ) -> ::core::result::Result<
12723 (),
12724 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12725 > {
12726 match ordinal {
12727 6121399674497678964 => {
12728 let responder = ::fidl_next::Responder::from_untyped(responder);
12729
12730 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12731 Ok(decoded) => {
12732 handler
12733 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
12734 .await;
12735 Ok(())
12736 }
12737 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12738 ordinal: 6121399674497678964,
12739 error,
12740 }),
12741 }
12742 }
12743
12744 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12745 }
12746 }
12747}
12748
12749pub trait LinkableClientHandler<
12753 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12754 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12755>
12756{
12757}
12758
12759impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Linkable
12760where
12761 ___H: LinkableClientHandler<___T> + ::core::marker::Send,
12762 ___T: ::fidl_next::Transport,
12763{
12764 async fn on_event(
12765 handler: &mut ___H,
12766 ordinal: u64,
12767 flexibility: ::fidl_next::protocol::Flexibility,
12768 body: ::fidl_next::Body<___T>,
12769 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12770 match ordinal {
12771 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12772 }
12773 }
12774}
12775
12776pub trait LinkableServerHandler<
12780 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12781 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12782>
12783{
12784 #[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"]
12785 fn link_into(
12786 &mut self,
12787
12788 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12789
12790 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12791 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12792}
12793
12794impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Linkable
12795where
12796 ___H: LinkableServerHandler<___T> + ::core::marker::Send,
12797 ___T: ::fidl_next::Transport,
12798 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12799 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12800 Constraint = (),
12801 >,
12802{
12803 async fn on_one_way(
12804 handler: &mut ___H,
12805 ordinal: u64,
12806 flexibility: ::fidl_next::protocol::Flexibility,
12807 body: ::fidl_next::Body<___T>,
12808 ) -> ::core::result::Result<
12809 (),
12810 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12811 > {
12812 match ordinal {
12813 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12814 }
12815 }
12816
12817 async fn on_two_way(
12818 handler: &mut ___H,
12819 ordinal: u64,
12820 flexibility: ::fidl_next::protocol::Flexibility,
12821 body: ::fidl_next::Body<___T>,
12822 responder: ::fidl_next::protocol::Responder<___T>,
12823 ) -> ::core::result::Result<
12824 (),
12825 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12826 > {
12827 match ordinal {
12828 6121399674497678964 => {
12829 let responder = ::fidl_next::Responder::from_untyped(responder);
12830
12831 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12832 Ok(decoded) => {
12833 handler
12834 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
12835 .await;
12836 Ok(())
12837 }
12838 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12839 ordinal: 6121399674497678964,
12840 error,
12841 }),
12842 }
12843 }
12844
12845 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12846 }
12847 }
12848}
12849
12850impl<___T> LinkableClientHandler<___T> for ::fidl_next::IgnoreEvents where
12851 ___T: ::fidl_next::Transport
12852{
12853}
12854
12855impl<___H, ___T> LinkableLocalClientHandler<___T> for ::fidl_next::Local<___H>
12856where
12857 ___H: LinkableClientHandler<___T>,
12858 ___T: ::fidl_next::Transport,
12859{
12860}
12861
12862impl<___H, ___T> LinkableLocalServerHandler<___T> for ::fidl_next::Local<___H>
12863where
12864 ___H: LinkableServerHandler<___T>,
12865 ___T: ::fidl_next::Transport,
12866{
12867 async fn link_into(
12868 &mut self,
12869
12870 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12871
12872 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12873 ) {
12874 ___H::link_into(&mut self.0, request, responder).await
12875 }
12876}
12877
12878#[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"]
12880#[derive(PartialEq, Debug)]
12881pub struct File;
12882
12883impl ::fidl_next::Discoverable for File {
12884 const PROTOCOL_NAME: &'static str = "fuchsia.io.File";
12885}
12886
12887#[cfg(target_os = "fuchsia")]
12888impl ::fidl_next::HasTransport for File {
12889 type Transport = ::fidl_next::fuchsia::zx::Channel;
12890}
12891
12892pub mod file {
12893 pub mod prelude {
12894 pub use crate::{
12895 File, FileClientHandler, FileLocalClientHandler, FileLocalServerHandler,
12896 FileServerHandler, file,
12897 };
12898
12899 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
12900
12901 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
12902
12903 pub use crate::natural::ExtendedAttributeValue;
12904
12905 pub use crate::natural::FileAllocateRequest;
12906
12907 pub use crate::natural::FileEnableVerityRequest;
12908
12909 pub use crate::natural::FileGetBackingMemoryRequest;
12910
12911 pub use crate::natural::FileInfo;
12912
12913 pub use crate::natural::FileReadAtRequest;
12914
12915 pub use crate::natural::FileResizeRequest;
12916
12917 pub use crate::natural::FileSeekRequest;
12918
12919 pub use crate::natural::FileWriteAtRequest;
12920
12921 pub use crate::natural::FileAllocateResponse;
12922
12923 pub use crate::natural::FileEnableVerityResponse;
12924
12925 pub use crate::natural::FileGetBackingMemoryResponse;
12926
12927 pub use crate::natural::FileReadAtResponse;
12928
12929 pub use crate::natural::FileResizeResponse;
12930
12931 pub use crate::natural::FileSeekResponse;
12932
12933 pub use crate::natural::FileWriteAtResponse;
12934
12935 pub use crate::natural::LinkableLinkIntoRequest;
12936
12937 pub use crate::natural::LinkableLinkIntoResponse;
12938
12939 pub use crate::natural::MutableNodeAttributes;
12940
12941 pub use crate::natural::NodeAttributes2;
12942
12943 pub use crate::natural::NodeDeprecatedCloneRequest;
12944
12945 pub use crate::natural::NodeDeprecatedGetAttrResponse;
12946
12947 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
12948
12949 pub use crate::natural::NodeDeprecatedSetAttrRequest;
12950
12951 pub use crate::natural::NodeDeprecatedSetAttrResponse;
12952
12953 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
12954
12955 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
12956
12957 pub use crate::natural::NodeGetAttributesRequest;
12958
12959 pub use crate::natural::NodeGetExtendedAttributeRequest;
12960
12961 pub use crate::natural::NodeListExtendedAttributesRequest;
12962
12963 pub use crate::natural::NodeOnOpenRequest;
12964
12965 pub use crate::natural::NodeQueryFilesystemResponse;
12966
12967 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
12968
12969 pub use crate::natural::NodeSetExtendedAttributeRequest;
12970
12971 pub use crate::natural::NodeSetFlagsRequest;
12972
12973 pub use crate::natural::NodeGetFlagsResponse;
12974
12975 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
12976
12977 pub use crate::natural::NodeSetExtendedAttributeResponse;
12978
12979 pub use crate::natural::NodeSetFlagsResponse;
12980
12981 pub use crate::natural::NodeSyncResponse;
12982
12983 pub use crate::natural::NodeUpdateAttributesResponse;
12984
12985 pub use crate::natural::ReadableReadRequest;
12986
12987 pub use crate::natural::ReadableReadResponse;
12988
12989 pub use crate::natural::Representation;
12990
12991 pub use crate::natural::WritableWriteRequest;
12992
12993 pub use crate::natural::WritableWriteResponse;
12994
12995 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
12996
12997 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
12998
12999 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
13000 }
13001
13002 pub struct AdvisoryLock;
13003
13004 impl ::fidl_next::Method for AdvisoryLock {
13005 const ORDINAL: u64 = 7992130864415541162;
13006 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13007 ::fidl_next::protocol::Flexibility::Strict;
13008
13009 type Protocol = crate::File;
13010
13011 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
13012 }
13013
13014 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
13015 type Response = ::fidl_next::wire::Result<
13016 'static,
13017 crate::wire::AdvisoryLockingAdvisoryLockResponse,
13018 ::fidl_next::wire::Int32,
13019 >;
13020 }
13021
13022 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
13023 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13024
13025 fn respond(response: ___R) -> Self::Output {
13026 ::core::result::Result::Ok(response)
13027 }
13028 }
13029
13030 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
13031 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13032
13033 fn respond_err(response: ___R) -> Self::Output {
13034 ::core::result::Result::Err(response)
13035 }
13036 }
13037
13038 pub struct LinkInto;
13039
13040 impl ::fidl_next::Method for LinkInto {
13041 const ORDINAL: u64 = 6121399674497678964;
13042 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13043 ::fidl_next::protocol::Flexibility::Strict;
13044
13045 type Protocol = crate::File;
13046
13047 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
13048 }
13049
13050 impl ::fidl_next::TwoWayMethod for LinkInto {
13051 type Response = ::fidl_next::wire::Result<
13052 'static,
13053 crate::wire::LinkableLinkIntoResponse,
13054 ::fidl_next::wire::Int32,
13055 >;
13056 }
13057
13058 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
13059 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13060
13061 fn respond(response: ___R) -> Self::Output {
13062 ::core::result::Result::Ok(response)
13063 }
13064 }
13065
13066 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
13067 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13068
13069 fn respond_err(response: ___R) -> Self::Output {
13070 ::core::result::Result::Err(response)
13071 }
13072 }
13073
13074 pub struct Clone;
13075
13076 impl ::fidl_next::Method for Clone {
13077 const ORDINAL: u64 = 2366825959783828089;
13078 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13079 ::fidl_next::protocol::Flexibility::Strict;
13080
13081 type Protocol = crate::File;
13082
13083 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
13084 }
13085
13086 pub struct Close;
13087
13088 impl ::fidl_next::Method for Close {
13089 const ORDINAL: u64 = 6540867515453498750;
13090 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13091 ::fidl_next::protocol::Flexibility::Strict;
13092
13093 type Protocol = crate::File;
13094
13095 type Request = ::fidl_next::wire::EmptyMessageBody;
13096 }
13097
13098 impl ::fidl_next::TwoWayMethod for Close {
13099 type Response = ::fidl_next::wire::Result<
13100 'static,
13101 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
13102 ::fidl_next::wire::Int32,
13103 >;
13104 }
13105
13106 impl<___R> ::fidl_next::Respond<___R> for Close {
13107 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13108
13109 fn respond(response: ___R) -> Self::Output {
13110 ::core::result::Result::Ok(response)
13111 }
13112 }
13113
13114 impl<___R> ::fidl_next::RespondErr<___R> for Close {
13115 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13116
13117 fn respond_err(response: ___R) -> Self::Output {
13118 ::core::result::Result::Err(response)
13119 }
13120 }
13121
13122 pub struct Query;
13123
13124 impl ::fidl_next::Method for Query {
13125 const ORDINAL: u64 = 2763219980499352582;
13126 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13127 ::fidl_next::protocol::Flexibility::Strict;
13128
13129 type Protocol = crate::File;
13130
13131 type Request = ::fidl_next::wire::EmptyMessageBody;
13132 }
13133
13134 impl ::fidl_next::TwoWayMethod for Query {
13135 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
13136 }
13137
13138 impl<___R> ::fidl_next::Respond<___R> for Query {
13139 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
13140
13141 fn respond(response: ___R) -> Self::Output {
13142 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
13143 }
13144 }
13145
13146 pub struct DeprecatedClone;
13147
13148 impl ::fidl_next::Method for DeprecatedClone {
13149 const ORDINAL: u64 = 6512600400724287855;
13150 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13151 ::fidl_next::protocol::Flexibility::Flexible;
13152
13153 type Protocol = crate::File;
13154
13155 type Request = crate::wire::NodeDeprecatedCloneRequest;
13156 }
13157
13158 pub struct OnOpen;
13159
13160 impl ::fidl_next::Method for OnOpen {
13161 const ORDINAL: u64 = 9207534335756671346;
13162 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13163 ::fidl_next::protocol::Flexibility::Flexible;
13164
13165 type Protocol = crate::File;
13166
13167 type Request = crate::wire::NodeOnOpenRequest<'static>;
13168 }
13169
13170 pub struct DeprecatedGetAttr;
13171
13172 impl ::fidl_next::Method for DeprecatedGetAttr {
13173 const ORDINAL: u64 = 8689798978500614909;
13174 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13175 ::fidl_next::protocol::Flexibility::Strict;
13176
13177 type Protocol = crate::File;
13178
13179 type Request = ::fidl_next::wire::EmptyMessageBody;
13180 }
13181
13182 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
13183 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
13184 }
13185
13186 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
13187 type Output = ___R;
13188
13189 fn respond(response: ___R) -> Self::Output {
13190 response
13191 }
13192 }
13193
13194 pub struct DeprecatedSetAttr;
13195
13196 impl ::fidl_next::Method for DeprecatedSetAttr {
13197 const ORDINAL: u64 = 4721673413776871238;
13198 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13199 ::fidl_next::protocol::Flexibility::Strict;
13200
13201 type Protocol = crate::File;
13202
13203 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
13204 }
13205
13206 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
13207 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
13208 }
13209
13210 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
13211 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
13212
13213 fn respond(response: ___R) -> Self::Output {
13214 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
13215 }
13216 }
13217
13218 pub struct DeprecatedGetFlags;
13219
13220 impl ::fidl_next::Method for DeprecatedGetFlags {
13221 const ORDINAL: u64 = 6595803110182632097;
13222 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13223 ::fidl_next::protocol::Flexibility::Strict;
13224
13225 type Protocol = crate::File;
13226
13227 type Request = ::fidl_next::wire::EmptyMessageBody;
13228 }
13229
13230 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
13231 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
13232 }
13233
13234 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
13235 type Output = ___R;
13236
13237 fn respond(response: ___R) -> Self::Output {
13238 response
13239 }
13240 }
13241
13242 pub struct DeprecatedSetFlags;
13243
13244 impl ::fidl_next::Method for DeprecatedSetFlags {
13245 const ORDINAL: u64 = 5950864159036794675;
13246 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13247 ::fidl_next::protocol::Flexibility::Strict;
13248
13249 type Protocol = crate::File;
13250
13251 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
13252 }
13253
13254 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
13255 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
13256 }
13257
13258 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
13259 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
13260
13261 fn respond(response: ___R) -> Self::Output {
13262 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
13263 }
13264 }
13265
13266 pub struct GetFlags;
13267
13268 impl ::fidl_next::Method for GetFlags {
13269 const ORDINAL: u64 = 105530239381466147;
13270 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13271 ::fidl_next::protocol::Flexibility::Flexible;
13272
13273 type Protocol = crate::File;
13274
13275 type Request = ::fidl_next::wire::EmptyMessageBody;
13276 }
13277
13278 impl ::fidl_next::TwoWayMethod for GetFlags {
13279 type Response = ::fidl_next::wire::FlexibleResult<
13280 'static,
13281 crate::wire::NodeGetFlagsResponse,
13282 ::fidl_next::wire::Int32,
13283 >;
13284 }
13285
13286 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
13287 type Output = ::fidl_next::FlexibleResult<
13288 crate::generic::NodeGetFlagsResponse<___R>,
13289 ::fidl_next::util::Never,
13290 >;
13291
13292 fn respond(response: ___R) -> Self::Output {
13293 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
13294 flags: response,
13295 })
13296 }
13297 }
13298
13299 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
13300 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13301
13302 fn respond_err(response: ___R) -> Self::Output {
13303 ::fidl_next::FlexibleResult::Err(response)
13304 }
13305 }
13306
13307 pub struct SetFlags;
13308
13309 impl ::fidl_next::Method for SetFlags {
13310 const ORDINAL: u64 = 6172186066099445416;
13311 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13312 ::fidl_next::protocol::Flexibility::Flexible;
13313
13314 type Protocol = crate::File;
13315
13316 type Request = crate::wire::NodeSetFlagsRequest;
13317 }
13318
13319 impl ::fidl_next::TwoWayMethod for SetFlags {
13320 type Response = ::fidl_next::wire::FlexibleResult<
13321 'static,
13322 crate::wire::NodeSetFlagsResponse,
13323 ::fidl_next::wire::Int32,
13324 >;
13325 }
13326
13327 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
13328 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13329
13330 fn respond(response: ___R) -> Self::Output {
13331 ::fidl_next::FlexibleResult::Ok(response)
13332 }
13333 }
13334
13335 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
13336 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13337
13338 fn respond_err(response: ___R) -> Self::Output {
13339 ::fidl_next::FlexibleResult::Err(response)
13340 }
13341 }
13342
13343 pub struct QueryFilesystem;
13344
13345 impl ::fidl_next::Method for QueryFilesystem {
13346 const ORDINAL: u64 = 8013111122914313744;
13347 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13348 ::fidl_next::protocol::Flexibility::Strict;
13349
13350 type Protocol = crate::File;
13351
13352 type Request = ::fidl_next::wire::EmptyMessageBody;
13353 }
13354
13355 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
13356 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
13357 }
13358
13359 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
13360 type Output = ___R;
13361
13362 fn respond(response: ___R) -> Self::Output {
13363 response
13364 }
13365 }
13366
13367 pub struct OnRepresentation;
13368
13369 impl ::fidl_next::Method for OnRepresentation {
13370 const ORDINAL: u64 = 6679970090861613324;
13371 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13372 ::fidl_next::protocol::Flexibility::Strict;
13373
13374 type Protocol = crate::File;
13375
13376 type Request = crate::wire::Representation<'static>;
13377 }
13378
13379 pub struct GetAttributes;
13380
13381 impl ::fidl_next::Method for GetAttributes {
13382 const ORDINAL: u64 = 4414537700416816443;
13383 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13384 ::fidl_next::protocol::Flexibility::Strict;
13385
13386 type Protocol = crate::File;
13387
13388 type Request = crate::wire::NodeGetAttributesRequest;
13389 }
13390
13391 impl ::fidl_next::TwoWayMethod for GetAttributes {
13392 type Response = ::fidl_next::wire::Result<
13393 'static,
13394 crate::wire::NodeAttributes2<'static>,
13395 ::fidl_next::wire::Int32,
13396 >;
13397 }
13398
13399 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
13400 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13401
13402 fn respond(response: ___R) -> Self::Output {
13403 ::core::result::Result::Ok(response)
13404 }
13405 }
13406
13407 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
13408 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13409
13410 fn respond_err(response: ___R) -> Self::Output {
13411 ::core::result::Result::Err(response)
13412 }
13413 }
13414
13415 pub struct UpdateAttributes;
13416
13417 impl ::fidl_next::Method for UpdateAttributes {
13418 const ORDINAL: u64 = 3677402239314018056;
13419 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13420 ::fidl_next::protocol::Flexibility::Strict;
13421
13422 type Protocol = crate::File;
13423
13424 type Request = crate::wire::MutableNodeAttributes<'static>;
13425 }
13426
13427 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
13428 type Response = ::fidl_next::wire::Result<
13429 'static,
13430 crate::wire::NodeUpdateAttributesResponse,
13431 ::fidl_next::wire::Int32,
13432 >;
13433 }
13434
13435 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
13436 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13437
13438 fn respond(response: ___R) -> Self::Output {
13439 ::core::result::Result::Ok(response)
13440 }
13441 }
13442
13443 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
13444 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13445
13446 fn respond_err(response: ___R) -> Self::Output {
13447 ::core::result::Result::Err(response)
13448 }
13449 }
13450
13451 pub struct Sync;
13452
13453 impl ::fidl_next::Method for Sync {
13454 const ORDINAL: u64 = 3196473584242777161;
13455 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13456 ::fidl_next::protocol::Flexibility::Strict;
13457
13458 type Protocol = crate::File;
13459
13460 type Request = ::fidl_next::wire::EmptyMessageBody;
13461 }
13462
13463 impl ::fidl_next::TwoWayMethod for Sync {
13464 type Response = ::fidl_next::wire::Result<
13465 'static,
13466 crate::wire::NodeSyncResponse,
13467 ::fidl_next::wire::Int32,
13468 >;
13469 }
13470
13471 impl<___R> ::fidl_next::Respond<___R> for Sync {
13472 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13473
13474 fn respond(response: ___R) -> Self::Output {
13475 ::core::result::Result::Ok(response)
13476 }
13477 }
13478
13479 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
13480 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13481
13482 fn respond_err(response: ___R) -> Self::Output {
13483 ::core::result::Result::Err(response)
13484 }
13485 }
13486
13487 pub struct ListExtendedAttributes;
13488
13489 impl ::fidl_next::Method for ListExtendedAttributes {
13490 const ORDINAL: u64 = 5431626189872037072;
13491 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13492 ::fidl_next::protocol::Flexibility::Strict;
13493
13494 type Protocol = crate::File;
13495
13496 type Request = crate::wire::NodeListExtendedAttributesRequest;
13497 }
13498
13499 pub struct GetExtendedAttribute;
13500
13501 impl ::fidl_next::Method for GetExtendedAttribute {
13502 const ORDINAL: u64 = 5043930208506967771;
13503 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13504 ::fidl_next::protocol::Flexibility::Strict;
13505
13506 type Protocol = crate::File;
13507
13508 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
13509 }
13510
13511 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
13512 type Response = ::fidl_next::wire::Result<
13513 'static,
13514 crate::wire::ExtendedAttributeValue<'static>,
13515 ::fidl_next::wire::Int32,
13516 >;
13517 }
13518
13519 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
13520 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13521
13522 fn respond(response: ___R) -> Self::Output {
13523 ::core::result::Result::Ok(response)
13524 }
13525 }
13526
13527 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
13528 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13529
13530 fn respond_err(response: ___R) -> Self::Output {
13531 ::core::result::Result::Err(response)
13532 }
13533 }
13534
13535 pub struct SetExtendedAttribute;
13536
13537 impl ::fidl_next::Method for SetExtendedAttribute {
13538 const ORDINAL: u64 = 5374223046099989052;
13539 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13540 ::fidl_next::protocol::Flexibility::Strict;
13541
13542 type Protocol = crate::File;
13543
13544 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
13545 }
13546
13547 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
13548 type Response = ::fidl_next::wire::Result<
13549 'static,
13550 crate::wire::NodeSetExtendedAttributeResponse,
13551 ::fidl_next::wire::Int32,
13552 >;
13553 }
13554
13555 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
13556 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13557
13558 fn respond(response: ___R) -> Self::Output {
13559 ::core::result::Result::Ok(response)
13560 }
13561 }
13562
13563 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
13564 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13565
13566 fn respond_err(response: ___R) -> Self::Output {
13567 ::core::result::Result::Err(response)
13568 }
13569 }
13570
13571 pub struct RemoveExtendedAttribute;
13572
13573 impl ::fidl_next::Method for RemoveExtendedAttribute {
13574 const ORDINAL: u64 = 8794297771444732717;
13575 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13576 ::fidl_next::protocol::Flexibility::Strict;
13577
13578 type Protocol = crate::File;
13579
13580 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
13581 }
13582
13583 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
13584 type Response = ::fidl_next::wire::Result<
13585 'static,
13586 crate::wire::NodeRemoveExtendedAttributeResponse,
13587 ::fidl_next::wire::Int32,
13588 >;
13589 }
13590
13591 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
13592 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13593
13594 fn respond(response: ___R) -> Self::Output {
13595 ::core::result::Result::Ok(response)
13596 }
13597 }
13598
13599 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
13600 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13601
13602 fn respond_err(response: ___R) -> Self::Output {
13603 ::core::result::Result::Err(response)
13604 }
13605 }
13606
13607 pub struct Read;
13608
13609 impl ::fidl_next::Method for Read {
13610 const ORDINAL: u64 = 395825947633028830;
13611 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13612 ::fidl_next::protocol::Flexibility::Strict;
13613
13614 type Protocol = crate::File;
13615
13616 type Request = crate::wire::ReadableReadRequest;
13617 }
13618
13619 impl ::fidl_next::TwoWayMethod for Read {
13620 type Response = ::fidl_next::wire::Result<
13621 'static,
13622 crate::wire::ReadableReadResponse<'static>,
13623 ::fidl_next::wire::Int32,
13624 >;
13625 }
13626
13627 impl<___R> ::fidl_next::Respond<___R> for Read {
13628 type Output = ::core::result::Result<
13629 crate::generic::ReadableReadResponse<___R>,
13630 ::fidl_next::util::Never,
13631 >;
13632
13633 fn respond(response: ___R) -> Self::Output {
13634 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
13635 }
13636 }
13637
13638 impl<___R> ::fidl_next::RespondErr<___R> for Read {
13639 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13640
13641 fn respond_err(response: ___R) -> Self::Output {
13642 ::core::result::Result::Err(response)
13643 }
13644 }
13645
13646 pub struct Write;
13647
13648 impl ::fidl_next::Method for Write {
13649 const ORDINAL: u64 = 7651971425397809026;
13650 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13651 ::fidl_next::protocol::Flexibility::Strict;
13652
13653 type Protocol = crate::File;
13654
13655 type Request = crate::wire::WritableWriteRequest<'static>;
13656 }
13657
13658 impl ::fidl_next::TwoWayMethod for Write {
13659 type Response = ::fidl_next::wire::Result<
13660 'static,
13661 crate::wire::WritableWriteResponse,
13662 ::fidl_next::wire::Int32,
13663 >;
13664 }
13665
13666 impl<___R> ::fidl_next::Respond<___R> for Write {
13667 type Output = ::core::result::Result<
13668 crate::generic::WritableWriteResponse<___R>,
13669 ::fidl_next::util::Never,
13670 >;
13671
13672 fn respond(response: ___R) -> Self::Output {
13673 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
13674 actual_count: response,
13675 })
13676 }
13677 }
13678
13679 impl<___R> ::fidl_next::RespondErr<___R> for Write {
13680 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13681
13682 fn respond_err(response: ___R) -> Self::Output {
13683 ::core::result::Result::Err(response)
13684 }
13685 }
13686
13687 pub struct Describe;
13688
13689 impl ::fidl_next::Method for Describe {
13690 const ORDINAL: u64 = 7545125870053689020;
13691 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13692 ::fidl_next::protocol::Flexibility::Strict;
13693
13694 type Protocol = crate::File;
13695
13696 type Request = ::fidl_next::wire::EmptyMessageBody;
13697 }
13698
13699 impl ::fidl_next::TwoWayMethod for Describe {
13700 type Response = crate::wire::FileInfo<'static>;
13701 }
13702
13703 impl<___R> ::fidl_next::Respond<___R> for Describe {
13704 type Output = ___R;
13705
13706 fn respond(response: ___R) -> Self::Output {
13707 response
13708 }
13709 }
13710
13711 pub struct Seek;
13712
13713 impl ::fidl_next::Method for Seek {
13714 const ORDINAL: u64 = 8649041485622956551;
13715 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13716 ::fidl_next::protocol::Flexibility::Strict;
13717
13718 type Protocol = crate::File;
13719
13720 type Request = crate::wire::FileSeekRequest;
13721 }
13722
13723 impl ::fidl_next::TwoWayMethod for Seek {
13724 type Response = ::fidl_next::wire::Result<
13725 'static,
13726 crate::wire::FileSeekResponse,
13727 ::fidl_next::wire::Int32,
13728 >;
13729 }
13730
13731 impl<___R> ::fidl_next::Respond<___R> for Seek {
13732 type Output = ::core::result::Result<
13733 crate::generic::FileSeekResponse<___R>,
13734 ::fidl_next::util::Never,
13735 >;
13736
13737 fn respond(response: ___R) -> Self::Output {
13738 ::core::result::Result::Ok(crate::generic::FileSeekResponse {
13739 offset_from_start: response,
13740 })
13741 }
13742 }
13743
13744 impl<___R> ::fidl_next::RespondErr<___R> for Seek {
13745 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13746
13747 fn respond_err(response: ___R) -> Self::Output {
13748 ::core::result::Result::Err(response)
13749 }
13750 }
13751
13752 pub struct ReadAt;
13753
13754 impl ::fidl_next::Method for ReadAt {
13755 const ORDINAL: u64 = 1587416148701180478;
13756 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13757 ::fidl_next::protocol::Flexibility::Strict;
13758
13759 type Protocol = crate::File;
13760
13761 type Request = crate::wire::FileReadAtRequest;
13762 }
13763
13764 impl ::fidl_next::TwoWayMethod for ReadAt {
13765 type Response = ::fidl_next::wire::Result<
13766 'static,
13767 crate::wire::FileReadAtResponse<'static>,
13768 ::fidl_next::wire::Int32,
13769 >;
13770 }
13771
13772 impl<___R> ::fidl_next::Respond<___R> for ReadAt {
13773 type Output = ::core::result::Result<
13774 crate::generic::FileReadAtResponse<___R>,
13775 ::fidl_next::util::Never,
13776 >;
13777
13778 fn respond(response: ___R) -> Self::Output {
13779 ::core::result::Result::Ok(crate::generic::FileReadAtResponse { data: response })
13780 }
13781 }
13782
13783 impl<___R> ::fidl_next::RespondErr<___R> for ReadAt {
13784 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13785
13786 fn respond_err(response: ___R) -> Self::Output {
13787 ::core::result::Result::Err(response)
13788 }
13789 }
13790
13791 pub struct WriteAt;
13792
13793 impl ::fidl_next::Method for WriteAt {
13794 const ORDINAL: u64 = 8736683935131400491;
13795 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13796 ::fidl_next::protocol::Flexibility::Strict;
13797
13798 type Protocol = crate::File;
13799
13800 type Request = crate::wire::FileWriteAtRequest<'static>;
13801 }
13802
13803 impl ::fidl_next::TwoWayMethod for WriteAt {
13804 type Response = ::fidl_next::wire::Result<
13805 'static,
13806 crate::wire::FileWriteAtResponse,
13807 ::fidl_next::wire::Int32,
13808 >;
13809 }
13810
13811 impl<___R> ::fidl_next::Respond<___R> for WriteAt {
13812 type Output = ::core::result::Result<
13813 crate::generic::FileWriteAtResponse<___R>,
13814 ::fidl_next::util::Never,
13815 >;
13816
13817 fn respond(response: ___R) -> Self::Output {
13818 ::core::result::Result::Ok(crate::generic::FileWriteAtResponse {
13819 actual_count: response,
13820 })
13821 }
13822 }
13823
13824 impl<___R> ::fidl_next::RespondErr<___R> for WriteAt {
13825 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13826
13827 fn respond_err(response: ___R) -> Self::Output {
13828 ::core::result::Result::Err(response)
13829 }
13830 }
13831
13832 pub struct Resize;
13833
13834 impl ::fidl_next::Method for Resize {
13835 const ORDINAL: u64 = 3134648685270758458;
13836 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13837 ::fidl_next::protocol::Flexibility::Strict;
13838
13839 type Protocol = crate::File;
13840
13841 type Request = crate::wire::FileResizeRequest;
13842 }
13843
13844 impl ::fidl_next::TwoWayMethod for Resize {
13845 type Response = ::fidl_next::wire::Result<
13846 'static,
13847 crate::wire::FileResizeResponse,
13848 ::fidl_next::wire::Int32,
13849 >;
13850 }
13851
13852 impl<___R> ::fidl_next::Respond<___R> for Resize {
13853 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13854
13855 fn respond(response: ___R) -> Self::Output {
13856 ::core::result::Result::Ok(response)
13857 }
13858 }
13859
13860 impl<___R> ::fidl_next::RespondErr<___R> for Resize {
13861 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13862
13863 fn respond_err(response: ___R) -> Self::Output {
13864 ::core::result::Result::Err(response)
13865 }
13866 }
13867
13868 pub struct GetBackingMemory;
13869
13870 impl ::fidl_next::Method for GetBackingMemory {
13871 const ORDINAL: u64 = 46911652864194091;
13872 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13873 ::fidl_next::protocol::Flexibility::Strict;
13874
13875 type Protocol = crate::File;
13876
13877 type Request = crate::wire::FileGetBackingMemoryRequest;
13878 }
13879
13880 impl ::fidl_next::TwoWayMethod for GetBackingMemory {
13881 type Response = ::fidl_next::wire::Result<
13882 'static,
13883 crate::wire::FileGetBackingMemoryResponse,
13884 ::fidl_next::wire::Int32,
13885 >;
13886 }
13887
13888 impl<___R> ::fidl_next::Respond<___R> for GetBackingMemory {
13889 type Output = ::core::result::Result<
13890 crate::generic::FileGetBackingMemoryResponse<___R>,
13891 ::fidl_next::util::Never,
13892 >;
13893
13894 fn respond(response: ___R) -> Self::Output {
13895 ::core::result::Result::Ok(crate::generic::FileGetBackingMemoryResponse {
13896 vmo: response,
13897 })
13898 }
13899 }
13900
13901 impl<___R> ::fidl_next::RespondErr<___R> for GetBackingMemory {
13902 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13903
13904 fn respond_err(response: ___R) -> Self::Output {
13905 ::core::result::Result::Err(response)
13906 }
13907 }
13908
13909 pub struct Allocate;
13910
13911 impl ::fidl_next::Method for Allocate {
13912 const ORDINAL: u64 = 8645235848064269614;
13913 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13914 ::fidl_next::protocol::Flexibility::Flexible;
13915
13916 type Protocol = crate::File;
13917
13918 type Request = crate::wire::FileAllocateRequest;
13919 }
13920
13921 impl ::fidl_next::TwoWayMethod for Allocate {
13922 type Response = ::fidl_next::wire::FlexibleResult<
13923 'static,
13924 crate::wire::FileAllocateResponse,
13925 ::fidl_next::wire::Int32,
13926 >;
13927 }
13928
13929 impl<___R> ::fidl_next::Respond<___R> for Allocate {
13930 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13931
13932 fn respond(response: ___R) -> Self::Output {
13933 ::fidl_next::FlexibleResult::Ok(response)
13934 }
13935 }
13936
13937 impl<___R> ::fidl_next::RespondErr<___R> for Allocate {
13938 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13939
13940 fn respond_err(response: ___R) -> Self::Output {
13941 ::fidl_next::FlexibleResult::Err(response)
13942 }
13943 }
13944
13945 pub struct EnableVerity;
13946
13947 impl ::fidl_next::Method for EnableVerity {
13948 const ORDINAL: u64 = 3189145313204943035;
13949 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13950 ::fidl_next::protocol::Flexibility::Flexible;
13951
13952 type Protocol = crate::File;
13953
13954 type Request = crate::wire::FileEnableVerityRequest<'static>;
13955 }
13956
13957 impl ::fidl_next::TwoWayMethod for EnableVerity {
13958 type Response = ::fidl_next::wire::FlexibleResult<
13959 'static,
13960 crate::wire::FileEnableVerityResponse,
13961 ::fidl_next::wire::Int32,
13962 >;
13963 }
13964
13965 impl<___R> ::fidl_next::Respond<___R> for EnableVerity {
13966 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13967
13968 fn respond(response: ___R) -> Self::Output {
13969 ::fidl_next::FlexibleResult::Ok(response)
13970 }
13971 }
13972
13973 impl<___R> ::fidl_next::RespondErr<___R> for EnableVerity {
13974 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13975
13976 fn respond_err(response: ___R) -> Self::Output {
13977 ::fidl_next::FlexibleResult::Err(response)
13978 }
13979 }
13980
13981 mod ___detail {
13982 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::File
13983 where
13984 ___T: ::fidl_next::Transport,
13985 {
13986 type Client = FileClient<___T>;
13987 type Server = FileServer<___T>;
13988 }
13989
13990 #[repr(transparent)]
13992 pub struct FileClient<___T: ::fidl_next::Transport> {
13993 #[allow(dead_code)]
13994 client: ::fidl_next::protocol::Client<___T>,
13995 }
13996
13997 impl<___T> FileClient<___T>
13998 where
13999 ___T: ::fidl_next::Transport,
14000 {
14001 #[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"]
14002 pub fn advisory_lock(
14003 &self,
14004
14005 request: impl ::fidl_next::Encode<
14006 crate::wire::AdvisoryLockRequest<'static>,
14007 <___T as ::fidl_next::Transport>::SendBuffer,
14008 >,
14009 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
14010 where
14011 <___T as ::fidl_next::Transport>::SendBuffer:
14012 ::fidl_next::encoder::InternalHandleEncoder,
14013 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14014 {
14015 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
14016 request,
14017 })
14018 }
14019
14020 #[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"]
14021 pub fn advisory_lock_with<___R>(
14022 &self,
14023 request: ___R,
14024 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
14025 where
14026 ___R: ::fidl_next::Encode<
14027 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
14028 <___T as ::fidl_next::Transport>::SendBuffer,
14029 >,
14030 {
14031 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14032 7992130864415541162,
14033 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
14034 request,
14035 ))
14036 }
14037
14038 #[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"]
14039 pub fn link_into(
14040 &self,
14041
14042 dst_parent_token: impl ::fidl_next::Encode<
14043 ::fidl_next::wire::fuchsia::Event,
14044 <___T as ::fidl_next::Transport>::SendBuffer,
14045 >,
14046
14047 dst: impl ::fidl_next::Encode<
14048 ::fidl_next::wire::String<'static>,
14049 <___T as ::fidl_next::Transport>::SendBuffer,
14050 >,
14051 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14052 where
14053 <___T as ::fidl_next::Transport>::SendBuffer:
14054 ::fidl_next::encoder::InternalHandleEncoder,
14055 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14056 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14057 {
14058 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
14059 dst_parent_token,
14060
14061 dst,
14062 })
14063 }
14064
14065 #[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"]
14066 pub fn link_into_with<___R>(
14067 &self,
14068 request: ___R,
14069 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14070 where
14071 ___R: ::fidl_next::Encode<
14072 crate::wire::LinkableLinkIntoRequest<'static>,
14073 <___T as ::fidl_next::Transport>::SendBuffer,
14074 >,
14075 {
14076 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14077 6121399674497678964,
14078 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
14079 request,
14080 ))
14081 }
14082
14083 pub fn clone(
14084 &self,
14085
14086 request: impl ::fidl_next::Encode<
14087 ::fidl_next::ServerEnd<
14088 ::fidl_next_fuchsia_unknown::Cloneable,
14089 ::fidl_next::wire::fuchsia::Channel,
14090 >,
14091 <___T as ::fidl_next::Transport>::SendBuffer,
14092 >,
14093 ) -> ::fidl_next::SendFuture<'_, ___T>
14094 where
14095 <___T as ::fidl_next::Transport>::SendBuffer:
14096 ::fidl_next::encoder::InternalHandleEncoder,
14097 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14098 {
14099 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
14100 request,
14101 })
14102 }
14103
14104 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14105 where
14106 ___R: ::fidl_next::Encode<
14107 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
14108 <___T as ::fidl_next::Transport>::SendBuffer,
14109 >,
14110 {
14111 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14112 2366825959783828089,
14113 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
14114 request,
14115 ))
14116 }
14117
14118 #[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"]
14119 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
14120 ::fidl_next::TwoWayFuture::from_untyped(
14121 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14122 6540867515453498750,
14123 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
14124 (),
14125 ),
14126 )
14127 }
14128
14129 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
14130 ::fidl_next::TwoWayFuture::from_untyped(
14131 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14132 2763219980499352582,
14133 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
14134 (),
14135 ),
14136 )
14137 }
14138
14139 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14140 pub fn deprecated_clone(
14141 &self,
14142
14143 flags: impl ::fidl_next::Encode<
14144 crate::wire::OpenFlags,
14145 <___T as ::fidl_next::Transport>::SendBuffer,
14146 >,
14147
14148 object: impl ::fidl_next::Encode<
14149 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
14150 <___T as ::fidl_next::Transport>::SendBuffer,
14151 >,
14152 ) -> ::fidl_next::SendFuture<'_, ___T>
14153 where
14154 <___T as ::fidl_next::Transport>::SendBuffer:
14155 ::fidl_next::encoder::InternalHandleEncoder,
14156 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14157 {
14158 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
14159 flags,
14160
14161 object,
14162 })
14163 }
14164
14165 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14166 pub fn deprecated_clone_with<___R>(
14167 &self,
14168 request: ___R,
14169 ) -> ::fidl_next::SendFuture<'_, ___T>
14170 where
14171 ___R: ::fidl_next::Encode<
14172 crate::wire::NodeDeprecatedCloneRequest,
14173 <___T as ::fidl_next::Transport>::SendBuffer,
14174 >,
14175 {
14176 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14177 6512600400724287855,
14178 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
14179 request,
14180 ))
14181 }
14182
14183 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14184 pub fn deprecated_get_attr(
14185 &self,
14186 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
14187 ::fidl_next::TwoWayFuture::from_untyped(
14188 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14189 8689798978500614909,
14190 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
14191 (),
14192 ),
14193 )
14194 }
14195
14196 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14197 pub fn deprecated_set_attr(
14198 &self,
14199
14200 flags: impl ::fidl_next::Encode<
14201 crate::wire::NodeAttributeFlags,
14202 <___T as ::fidl_next::Transport>::SendBuffer,
14203 >,
14204
14205 attributes: impl ::fidl_next::Encode<
14206 crate::wire::NodeAttributes,
14207 <___T as ::fidl_next::Transport>::SendBuffer,
14208 >,
14209 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14210 where
14211 <___T as ::fidl_next::Transport>::SendBuffer:
14212 ::fidl_next::encoder::InternalHandleEncoder,
14213 {
14214 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
14215 flags,
14216
14217 attributes,
14218 })
14219 }
14220
14221 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14222 pub fn deprecated_set_attr_with<___R>(
14223 &self,
14224 request: ___R,
14225 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14226 where
14227 ___R: ::fidl_next::Encode<
14228 crate::wire::NodeDeprecatedSetAttrRequest,
14229 <___T as ::fidl_next::Transport>::SendBuffer,
14230 >,
14231 {
14232 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14233 4721673413776871238,
14234 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
14235 request,
14236 ))
14237 }
14238
14239 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14240 pub fn deprecated_get_flags(
14241 &self,
14242 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
14243 ::fidl_next::TwoWayFuture::from_untyped(
14244 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14245 6595803110182632097,
14246 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
14247 (),
14248 ),
14249 )
14250 }
14251
14252 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14253 pub fn deprecated_set_flags(
14254 &self,
14255
14256 flags: impl ::fidl_next::Encode<
14257 crate::wire::OpenFlags,
14258 <___T as ::fidl_next::Transport>::SendBuffer,
14259 >,
14260 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14261 where
14262 <___T as ::fidl_next::Transport>::SendBuffer:
14263 ::fidl_next::encoder::InternalHandleEncoder,
14264 {
14265 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
14266 flags,
14267 })
14268 }
14269
14270 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14271 pub fn deprecated_set_flags_with<___R>(
14272 &self,
14273 request: ___R,
14274 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14275 where
14276 ___R: ::fidl_next::Encode<
14277 crate::wire::NodeDeprecatedSetFlagsRequest,
14278 <___T as ::fidl_next::Transport>::SendBuffer,
14279 >,
14280 {
14281 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14282 5950864159036794675,
14283 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
14284 request,
14285 ))
14286 }
14287
14288 #[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"]
14289 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
14290 ::fidl_next::TwoWayFuture::from_untyped(
14291 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14292 105530239381466147,
14293 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
14294 (),
14295 ),
14296 )
14297 }
14298
14299 #[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"]
14300 pub fn set_flags(
14301 &self,
14302
14303 flags: impl ::fidl_next::Encode<
14304 crate::wire::Flags,
14305 <___T as ::fidl_next::Transport>::SendBuffer,
14306 >,
14307 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14308 where
14309 <___T as ::fidl_next::Transport>::SendBuffer:
14310 ::fidl_next::encoder::InternalHandleEncoder,
14311 {
14312 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
14313 }
14314
14315 #[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"]
14316 pub fn set_flags_with<___R>(
14317 &self,
14318 request: ___R,
14319 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14320 where
14321 ___R: ::fidl_next::Encode<
14322 crate::wire::NodeSetFlagsRequest,
14323 <___T as ::fidl_next::Transport>::SendBuffer,
14324 >,
14325 {
14326 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14327 6172186066099445416,
14328 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
14329 request,
14330 ))
14331 }
14332
14333 #[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"]
14334 pub fn query_filesystem(
14335 &self,
14336 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
14337 ::fidl_next::TwoWayFuture::from_untyped(
14338 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14339 8013111122914313744,
14340 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
14341 (),
14342 ),
14343 )
14344 }
14345
14346 #[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"]
14347 pub fn get_attributes(
14348 &self,
14349
14350 query: impl ::fidl_next::Encode<
14351 crate::wire::NodeAttributesQuery,
14352 <___T as ::fidl_next::Transport>::SendBuffer,
14353 >,
14354 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14355 where
14356 <___T as ::fidl_next::Transport>::SendBuffer:
14357 ::fidl_next::encoder::InternalHandleEncoder,
14358 {
14359 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
14360 }
14361
14362 #[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"]
14363 pub fn get_attributes_with<___R>(
14364 &self,
14365 request: ___R,
14366 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14367 where
14368 ___R: ::fidl_next::Encode<
14369 crate::wire::NodeGetAttributesRequest,
14370 <___T as ::fidl_next::Transport>::SendBuffer,
14371 >,
14372 {
14373 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14374 4414537700416816443,
14375 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
14376 request,
14377 ))
14378 }
14379
14380 #[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"]
14381 pub fn update_attributes_with<___R>(
14382 &self,
14383 request: ___R,
14384 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
14385 where
14386 ___R: ::fidl_next::Encode<
14387 crate::wire::MutableNodeAttributes<'static>,
14388 <___T as ::fidl_next::Transport>::SendBuffer,
14389 >,
14390 {
14391 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14392 3677402239314018056,
14393 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
14394 request,
14395 ))
14396 }
14397
14398 #[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"]
14399 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
14400 ::fidl_next::TwoWayFuture::from_untyped(
14401 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14402 3196473584242777161,
14403 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
14404 (),
14405 ),
14406 )
14407 }
14408
14409 #[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"]
14410 pub fn list_extended_attributes(
14411 &self,
14412
14413 iterator: impl ::fidl_next::Encode<
14414 ::fidl_next::ServerEnd<
14415 crate::ExtendedAttributeIterator,
14416 ::fidl_next::wire::fuchsia::Channel,
14417 >,
14418 <___T as ::fidl_next::Transport>::SendBuffer,
14419 >,
14420 ) -> ::fidl_next::SendFuture<'_, ___T>
14421 where
14422 <___T as ::fidl_next::Transport>::SendBuffer:
14423 ::fidl_next::encoder::InternalHandleEncoder,
14424 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14425 {
14426 self.list_extended_attributes_with(
14427 crate::generic::NodeListExtendedAttributesRequest { iterator },
14428 )
14429 }
14430
14431 #[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"]
14432 pub fn list_extended_attributes_with<___R>(
14433 &self,
14434 request: ___R,
14435 ) -> ::fidl_next::SendFuture<'_, ___T>
14436 where
14437 ___R: ::fidl_next::Encode<
14438 crate::wire::NodeListExtendedAttributesRequest,
14439 <___T as ::fidl_next::Transport>::SendBuffer,
14440 >,
14441 {
14442 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14443 5431626189872037072,
14444 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
14445 request,
14446 ))
14447 }
14448
14449 #[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"]
14450 pub fn get_extended_attribute(
14451 &self,
14452
14453 name: impl ::fidl_next::Encode<
14454 ::fidl_next::wire::Vector<'static, u8>,
14455 <___T as ::fidl_next::Transport>::SendBuffer,
14456 >,
14457 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14458 where
14459 <___T as ::fidl_next::Transport>::SendBuffer:
14460 ::fidl_next::encoder::InternalHandleEncoder,
14461 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14462 {
14463 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
14464 name,
14465 })
14466 }
14467
14468 #[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"]
14469 pub fn get_extended_attribute_with<___R>(
14470 &self,
14471 request: ___R,
14472 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14473 where
14474 ___R: ::fidl_next::Encode<
14475 crate::wire::NodeGetExtendedAttributeRequest<'static>,
14476 <___T as ::fidl_next::Transport>::SendBuffer,
14477 >,
14478 {
14479 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14480 5043930208506967771,
14481 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14482 request,
14483 ))
14484 }
14485
14486 #[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"]
14487 pub fn set_extended_attribute(
14488 &self,
14489
14490 name: impl ::fidl_next::Encode<
14491 ::fidl_next::wire::Vector<'static, u8>,
14492 <___T as ::fidl_next::Transport>::SendBuffer,
14493 >,
14494
14495 value: impl ::fidl_next::Encode<
14496 crate::wire::ExtendedAttributeValue<'static>,
14497 <___T as ::fidl_next::Transport>::SendBuffer,
14498 >,
14499
14500 mode: impl ::fidl_next::Encode<
14501 crate::wire::SetExtendedAttributeMode,
14502 <___T as ::fidl_next::Transport>::SendBuffer,
14503 >,
14504 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14505 where
14506 <___T as ::fidl_next::Transport>::SendBuffer:
14507 ::fidl_next::encoder::InternalHandleEncoder,
14508 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14509 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14510 {
14511 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
14512 name,
14513
14514 value,
14515
14516 mode,
14517 })
14518 }
14519
14520 #[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"]
14521 pub fn set_extended_attribute_with<___R>(
14522 &self,
14523 request: ___R,
14524 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14525 where
14526 ___R: ::fidl_next::Encode<
14527 crate::wire::NodeSetExtendedAttributeRequest<'static>,
14528 <___T as ::fidl_next::Transport>::SendBuffer,
14529 >,
14530 {
14531 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14532 5374223046099989052,
14533 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14534 request,
14535 ))
14536 }
14537
14538 #[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"]
14539 pub fn remove_extended_attribute(
14540 &self,
14541
14542 name: impl ::fidl_next::Encode<
14543 ::fidl_next::wire::Vector<'static, u8>,
14544 <___T as ::fidl_next::Transport>::SendBuffer,
14545 >,
14546 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14547 where
14548 <___T as ::fidl_next::Transport>::SendBuffer:
14549 ::fidl_next::encoder::InternalHandleEncoder,
14550 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14551 {
14552 self.remove_extended_attribute_with(
14553 crate::generic::NodeRemoveExtendedAttributeRequest { name },
14554 )
14555 }
14556
14557 #[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"]
14558 pub fn remove_extended_attribute_with<___R>(
14559 &self,
14560 request: ___R,
14561 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14562 where
14563 ___R: ::fidl_next::Encode<
14564 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
14565 <___T as ::fidl_next::Transport>::SendBuffer,
14566 >,
14567 {
14568 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14569 8794297771444732717,
14570 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14571 request,
14572 ))
14573 }
14574
14575 #[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"]
14576 pub fn read(
14577 &self,
14578
14579 count: impl ::fidl_next::Encode<
14580 ::fidl_next::wire::Uint64,
14581 <___T as ::fidl_next::Transport>::SendBuffer,
14582 >,
14583 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
14584 where
14585 <___T as ::fidl_next::Transport>::SendBuffer:
14586 ::fidl_next::encoder::InternalHandleEncoder,
14587 {
14588 self.read_with(crate::generic::ReadableReadRequest { count })
14589 }
14590
14591 #[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"]
14592 pub fn read_with<___R>(
14593 &self,
14594 request: ___R,
14595 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
14596 where
14597 ___R: ::fidl_next::Encode<
14598 crate::wire::ReadableReadRequest,
14599 <___T as ::fidl_next::Transport>::SendBuffer,
14600 >,
14601 {
14602 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14603 395825947633028830,
14604 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
14605 request,
14606 ))
14607 }
14608
14609 #[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"]
14610 pub fn write(
14611 &self,
14612
14613 data: impl ::fidl_next::Encode<
14614 ::fidl_next::wire::Vector<'static, u8>,
14615 <___T as ::fidl_next::Transport>::SendBuffer,
14616 >,
14617 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
14618 where
14619 <___T as ::fidl_next::Transport>::SendBuffer:
14620 ::fidl_next::encoder::InternalHandleEncoder,
14621 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14622 {
14623 self.write_with(crate::generic::WritableWriteRequest { data })
14624 }
14625
14626 #[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"]
14627 pub fn write_with<___R>(
14628 &self,
14629 request: ___R,
14630 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
14631 where
14632 ___R: ::fidl_next::Encode<
14633 crate::wire::WritableWriteRequest<'static>,
14634 <___T as ::fidl_next::Transport>::SendBuffer,
14635 >,
14636 {
14637 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14638 7651971425397809026,
14639 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
14640 request,
14641 ))
14642 }
14643
14644 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
14645 ::fidl_next::TwoWayFuture::from_untyped(
14646 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14647 7545125870053689020,
14648 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
14649 (),
14650 ),
14651 )
14652 }
14653
14654 #[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"]
14655 pub fn seek(
14656 &self,
14657
14658 origin: impl ::fidl_next::Encode<
14659 crate::wire::SeekOrigin,
14660 <___T as ::fidl_next::Transport>::SendBuffer,
14661 >,
14662
14663 offset: impl ::fidl_next::Encode<
14664 ::fidl_next::wire::Int64,
14665 <___T as ::fidl_next::Transport>::SendBuffer,
14666 >,
14667 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
14668 where
14669 <___T as ::fidl_next::Transport>::SendBuffer:
14670 ::fidl_next::encoder::InternalHandleEncoder,
14671 {
14672 self.seek_with(crate::generic::FileSeekRequest { origin, offset })
14673 }
14674
14675 #[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"]
14676 pub fn seek_with<___R>(
14677 &self,
14678 request: ___R,
14679 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
14680 where
14681 ___R: ::fidl_next::Encode<
14682 crate::wire::FileSeekRequest,
14683 <___T as ::fidl_next::Transport>::SendBuffer,
14684 >,
14685 {
14686 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14687 8649041485622956551,
14688 <super::Seek as ::fidl_next::Method>::FLEXIBILITY,
14689 request,
14690 ))
14691 }
14692
14693 #[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"]
14694 pub fn read_at(
14695 &self,
14696
14697 count: impl ::fidl_next::Encode<
14698 ::fidl_next::wire::Uint64,
14699 <___T as ::fidl_next::Transport>::SendBuffer,
14700 >,
14701
14702 offset: impl ::fidl_next::Encode<
14703 ::fidl_next::wire::Uint64,
14704 <___T as ::fidl_next::Transport>::SendBuffer,
14705 >,
14706 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
14707 where
14708 <___T as ::fidl_next::Transport>::SendBuffer:
14709 ::fidl_next::encoder::InternalHandleEncoder,
14710 {
14711 self.read_at_with(crate::generic::FileReadAtRequest { count, offset })
14712 }
14713
14714 #[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"]
14715 pub fn read_at_with<___R>(
14716 &self,
14717 request: ___R,
14718 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
14719 where
14720 ___R: ::fidl_next::Encode<
14721 crate::wire::FileReadAtRequest,
14722 <___T as ::fidl_next::Transport>::SendBuffer,
14723 >,
14724 {
14725 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14726 1587416148701180478,
14727 <super::ReadAt as ::fidl_next::Method>::FLEXIBILITY,
14728 request,
14729 ))
14730 }
14731
14732 #[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"]
14733 pub fn write_at(
14734 &self,
14735
14736 data: impl ::fidl_next::Encode<
14737 ::fidl_next::wire::Vector<'static, u8>,
14738 <___T as ::fidl_next::Transport>::SendBuffer,
14739 >,
14740
14741 offset: impl ::fidl_next::Encode<
14742 ::fidl_next::wire::Uint64,
14743 <___T as ::fidl_next::Transport>::SendBuffer,
14744 >,
14745 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
14746 where
14747 <___T as ::fidl_next::Transport>::SendBuffer:
14748 ::fidl_next::encoder::InternalHandleEncoder,
14749 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14750 {
14751 self.write_at_with(crate::generic::FileWriteAtRequest { data, offset })
14752 }
14753
14754 #[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"]
14755 pub fn write_at_with<___R>(
14756 &self,
14757 request: ___R,
14758 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
14759 where
14760 ___R: ::fidl_next::Encode<
14761 crate::wire::FileWriteAtRequest<'static>,
14762 <___T as ::fidl_next::Transport>::SendBuffer,
14763 >,
14764 {
14765 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14766 8736683935131400491,
14767 <super::WriteAt as ::fidl_next::Method>::FLEXIBILITY,
14768 request,
14769 ))
14770 }
14771
14772 #[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"]
14773 pub fn resize(
14774 &self,
14775
14776 length: impl ::fidl_next::Encode<
14777 ::fidl_next::wire::Uint64,
14778 <___T as ::fidl_next::Transport>::SendBuffer,
14779 >,
14780 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
14781 where
14782 <___T as ::fidl_next::Transport>::SendBuffer:
14783 ::fidl_next::encoder::InternalHandleEncoder,
14784 {
14785 self.resize_with(crate::generic::FileResizeRequest { length })
14786 }
14787
14788 #[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"]
14789 pub fn resize_with<___R>(
14790 &self,
14791 request: ___R,
14792 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
14793 where
14794 ___R: ::fidl_next::Encode<
14795 crate::wire::FileResizeRequest,
14796 <___T as ::fidl_next::Transport>::SendBuffer,
14797 >,
14798 {
14799 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14800 3134648685270758458,
14801 <super::Resize as ::fidl_next::Method>::FLEXIBILITY,
14802 request,
14803 ))
14804 }
14805
14806 #[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"]
14807 pub fn get_backing_memory(
14808 &self,
14809
14810 flags: impl ::fidl_next::Encode<
14811 crate::wire::VmoFlags,
14812 <___T as ::fidl_next::Transport>::SendBuffer,
14813 >,
14814 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
14815 where
14816 <___T as ::fidl_next::Transport>::SendBuffer:
14817 ::fidl_next::encoder::InternalHandleEncoder,
14818 {
14819 self.get_backing_memory_with(crate::generic::FileGetBackingMemoryRequest { flags })
14820 }
14821
14822 #[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"]
14823 pub fn get_backing_memory_with<___R>(
14824 &self,
14825 request: ___R,
14826 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
14827 where
14828 ___R: ::fidl_next::Encode<
14829 crate::wire::FileGetBackingMemoryRequest,
14830 <___T as ::fidl_next::Transport>::SendBuffer,
14831 >,
14832 {
14833 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14834 46911652864194091,
14835 <super::GetBackingMemory as ::fidl_next::Method>::FLEXIBILITY,
14836 request,
14837 ))
14838 }
14839
14840 #[doc = " Pre-allocate on-disk space for this file.\n"]
14841 pub fn allocate(
14842 &self,
14843
14844 offset: impl ::fidl_next::Encode<
14845 ::fidl_next::wire::Uint64,
14846 <___T as ::fidl_next::Transport>::SendBuffer,
14847 >,
14848
14849 length: impl ::fidl_next::Encode<
14850 ::fidl_next::wire::Uint64,
14851 <___T as ::fidl_next::Transport>::SendBuffer,
14852 >,
14853
14854 mode: impl ::fidl_next::Encode<
14855 crate::wire::AllocateMode,
14856 <___T as ::fidl_next::Transport>::SendBuffer,
14857 >,
14858 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
14859 where
14860 <___T as ::fidl_next::Transport>::SendBuffer:
14861 ::fidl_next::encoder::InternalHandleEncoder,
14862 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14863 {
14864 self.allocate_with(crate::generic::FileAllocateRequest { offset, length, mode })
14865 }
14866
14867 #[doc = " Pre-allocate on-disk space for this file.\n"]
14868 pub fn allocate_with<___R>(
14869 &self,
14870 request: ___R,
14871 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
14872 where
14873 ___R: ::fidl_next::Encode<
14874 crate::wire::FileAllocateRequest,
14875 <___T as ::fidl_next::Transport>::SendBuffer,
14876 >,
14877 {
14878 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14879 8645235848064269614,
14880 <super::Allocate as ::fidl_next::Method>::FLEXIBILITY,
14881 request,
14882 ))
14883 }
14884
14885 #[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"]
14886 pub fn enable_verity(
14887 &self,
14888
14889 options: impl ::fidl_next::Encode<
14890 crate::wire::VerificationOptions<'static>,
14891 <___T as ::fidl_next::Transport>::SendBuffer,
14892 >,
14893 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
14894 where
14895 <___T as ::fidl_next::Transport>::SendBuffer:
14896 ::fidl_next::encoder::InternalHandleEncoder,
14897 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14898 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14899 {
14900 self.enable_verity_with(crate::generic::FileEnableVerityRequest { options })
14901 }
14902
14903 #[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"]
14904 pub fn enable_verity_with<___R>(
14905 &self,
14906 request: ___R,
14907 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
14908 where
14909 ___R: ::fidl_next::Encode<
14910 crate::wire::FileEnableVerityRequest<'static>,
14911 <___T as ::fidl_next::Transport>::SendBuffer,
14912 >,
14913 {
14914 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14915 3189145313204943035,
14916 <super::EnableVerity as ::fidl_next::Method>::FLEXIBILITY,
14917 request,
14918 ))
14919 }
14920 }
14921
14922 #[repr(transparent)]
14924 pub struct FileServer<___T: ::fidl_next::Transport> {
14925 server: ::fidl_next::protocol::Server<___T>,
14926 }
14927
14928 impl<___T> FileServer<___T>
14929 where
14930 ___T: ::fidl_next::Transport,
14931 {
14932 #[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"]
14933 pub fn on_open(
14934 &self,
14935
14936 s: impl ::fidl_next::Encode<
14937 ::fidl_next::wire::Int32,
14938 <___T as ::fidl_next::Transport>::SendBuffer,
14939 >,
14940
14941 info: impl ::fidl_next::Encode<
14942 crate::wire_optional::NodeInfoDeprecated<'static>,
14943 <___T as ::fidl_next::Transport>::SendBuffer,
14944 >,
14945 ) -> ::fidl_next::SendFuture<'_, ___T>
14946 where
14947 <___T as ::fidl_next::Transport>::SendBuffer:
14948 ::fidl_next::encoder::InternalHandleEncoder,
14949 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14950 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14951 {
14952 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
14953 }
14954
14955 #[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"]
14956
14957 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14958 where
14959 ___R: ::fidl_next::Encode<
14960 <super::OnOpen as ::fidl_next::Method>::Request,
14961 <___T as ::fidl_next::Transport>::SendBuffer,
14962 >,
14963 {
14964 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14965 9207534335756671346,
14966 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
14967 request,
14968 ))
14969 }
14970
14971 #[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"]
14972
14973 pub fn on_representation_with<___R>(
14974 &self,
14975 request: ___R,
14976 ) -> ::fidl_next::SendFuture<'_, ___T>
14977 where
14978 ___R: ::fidl_next::Encode<
14979 <super::OnRepresentation as ::fidl_next::Method>::Request,
14980 <___T as ::fidl_next::Transport>::SendBuffer,
14981 >,
14982 {
14983 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14984 6679970090861613324,
14985 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
14986 request,
14987 ))
14988 }
14989 }
14990 }
14991}
14992
14993#[diagnostic::on_unimplemented(
14994 note = "If {Self} implements the non-local FileClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
14995)]
14996
14997pub trait FileLocalClientHandler<
15001 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15002 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15003>
15004{
15005 #[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"]
15006 fn on_open(
15007 &mut self,
15008
15009 request: ::fidl_next::Request<file::OnOpen, ___T>,
15010 ) -> impl ::core::future::Future<Output = ()>;
15011
15012 #[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"]
15013 fn on_representation(
15014 &mut self,
15015
15016 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
15017 ) -> impl ::core::future::Future<Output = ()>;
15018
15019 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15020 ::core::future::ready(())
15021 }
15022}
15023
15024impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for File
15025where
15026 ___H: FileLocalClientHandler<___T>,
15027 ___T: ::fidl_next::Transport,
15028 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
15029 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15030 Constraint = (),
15031 >,
15032 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
15033 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15034 Constraint = (),
15035 >,
15036{
15037 async fn on_event(
15038 handler: &mut ___H,
15039 ordinal: u64,
15040 flexibility: ::fidl_next::protocol::Flexibility,
15041 body: ::fidl_next::Body<___T>,
15042 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15043 match ordinal {
15044 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15045 Ok(decoded) => {
15046 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
15047 Ok(())
15048 }
15049 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15050 ordinal: 9207534335756671346,
15051 error,
15052 }),
15053 },
15054
15055 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15056 Ok(decoded) => {
15057 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
15058 Ok(())
15059 }
15060 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15061 ordinal: 6679970090861613324,
15062 error,
15063 }),
15064 },
15065
15066 ordinal => {
15067 handler.on_unknown_interaction(ordinal).await;
15068 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15069 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15070 } else {
15071 Ok(())
15072 }
15073 }
15074 }
15075 }
15076}
15077
15078#[diagnostic::on_unimplemented(
15079 note = "If {Self} implements the non-local FileServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
15080)]
15081
15082pub trait FileLocalServerHandler<
15086 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15087 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15088>
15089{
15090 #[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"]
15091 fn advisory_lock(
15092 &mut self,
15093
15094 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
15095
15096 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
15097 ) -> impl ::core::future::Future<Output = ()>;
15098
15099 #[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"]
15100 fn link_into(
15101 &mut self,
15102
15103 request: ::fidl_next::Request<file::LinkInto, ___T>,
15104
15105 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
15106 ) -> impl ::core::future::Future<Output = ()>;
15107
15108 fn clone(
15109 &mut self,
15110
15111 request: ::fidl_next::Request<file::Clone, ___T>,
15112 ) -> impl ::core::future::Future<Output = ()>;
15113
15114 #[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"]
15115 fn close(
15116 &mut self,
15117
15118 responder: ::fidl_next::Responder<file::Close, ___T>,
15119 ) -> impl ::core::future::Future<Output = ()>;
15120
15121 fn query(
15122 &mut self,
15123
15124 responder: ::fidl_next::Responder<file::Query, ___T>,
15125 ) -> impl ::core::future::Future<Output = ()>;
15126
15127 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
15128 fn deprecated_clone(
15129 &mut self,
15130
15131 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
15132 ) -> impl ::core::future::Future<Output = ()>;
15133
15134 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
15135 fn deprecated_get_attr(
15136 &mut self,
15137
15138 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
15139 ) -> impl ::core::future::Future<Output = ()>;
15140
15141 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
15142 fn deprecated_set_attr(
15143 &mut self,
15144
15145 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
15146
15147 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
15148 ) -> impl ::core::future::Future<Output = ()>;
15149
15150 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
15151 fn deprecated_get_flags(
15152 &mut self,
15153
15154 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
15155 ) -> impl ::core::future::Future<Output = ()>;
15156
15157 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
15158 fn deprecated_set_flags(
15159 &mut self,
15160
15161 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
15162
15163 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
15164 ) -> impl ::core::future::Future<Output = ()>;
15165
15166 #[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"]
15167 fn get_flags(
15168 &mut self,
15169
15170 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
15171 ) -> impl ::core::future::Future<Output = ()>;
15172
15173 #[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"]
15174 fn set_flags(
15175 &mut self,
15176
15177 request: ::fidl_next::Request<file::SetFlags, ___T>,
15178
15179 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
15180 ) -> impl ::core::future::Future<Output = ()>;
15181
15182 #[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"]
15183 fn query_filesystem(
15184 &mut self,
15185
15186 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
15187 ) -> impl ::core::future::Future<Output = ()>;
15188
15189 #[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"]
15190 fn get_attributes(
15191 &mut self,
15192
15193 request: ::fidl_next::Request<file::GetAttributes, ___T>,
15194
15195 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
15196 ) -> impl ::core::future::Future<Output = ()>;
15197
15198 #[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"]
15199 fn update_attributes(
15200 &mut self,
15201
15202 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
15203
15204 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
15205 ) -> impl ::core::future::Future<Output = ()>;
15206
15207 #[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"]
15208 fn sync(
15209 &mut self,
15210
15211 responder: ::fidl_next::Responder<file::Sync, ___T>,
15212 ) -> impl ::core::future::Future<Output = ()>;
15213
15214 #[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"]
15215 fn list_extended_attributes(
15216 &mut self,
15217
15218 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
15219 ) -> impl ::core::future::Future<Output = ()>;
15220
15221 #[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"]
15222 fn get_extended_attribute(
15223 &mut self,
15224
15225 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
15226
15227 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
15228 ) -> impl ::core::future::Future<Output = ()>;
15229
15230 #[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"]
15231 fn set_extended_attribute(
15232 &mut self,
15233
15234 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
15235
15236 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
15237 ) -> impl ::core::future::Future<Output = ()>;
15238
15239 #[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"]
15240 fn remove_extended_attribute(
15241 &mut self,
15242
15243 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
15244
15245 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
15246 ) -> impl ::core::future::Future<Output = ()>;
15247
15248 #[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"]
15249 fn read(
15250 &mut self,
15251
15252 request: ::fidl_next::Request<file::Read, ___T>,
15253
15254 responder: ::fidl_next::Responder<file::Read, ___T>,
15255 ) -> impl ::core::future::Future<Output = ()>;
15256
15257 #[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"]
15258 fn write(
15259 &mut self,
15260
15261 request: ::fidl_next::Request<file::Write, ___T>,
15262
15263 responder: ::fidl_next::Responder<file::Write, ___T>,
15264 ) -> impl ::core::future::Future<Output = ()>;
15265
15266 fn describe(
15267 &mut self,
15268
15269 responder: ::fidl_next::Responder<file::Describe, ___T>,
15270 ) -> impl ::core::future::Future<Output = ()>;
15271
15272 #[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"]
15273 fn seek(
15274 &mut self,
15275
15276 request: ::fidl_next::Request<file::Seek, ___T>,
15277
15278 responder: ::fidl_next::Responder<file::Seek, ___T>,
15279 ) -> impl ::core::future::Future<Output = ()>;
15280
15281 #[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"]
15282 fn read_at(
15283 &mut self,
15284
15285 request: ::fidl_next::Request<file::ReadAt, ___T>,
15286
15287 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
15288 ) -> impl ::core::future::Future<Output = ()>;
15289
15290 #[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"]
15291 fn write_at(
15292 &mut self,
15293
15294 request: ::fidl_next::Request<file::WriteAt, ___T>,
15295
15296 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
15297 ) -> impl ::core::future::Future<Output = ()>;
15298
15299 #[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"]
15300 fn resize(
15301 &mut self,
15302
15303 request: ::fidl_next::Request<file::Resize, ___T>,
15304
15305 responder: ::fidl_next::Responder<file::Resize, ___T>,
15306 ) -> impl ::core::future::Future<Output = ()>;
15307
15308 #[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"]
15309 fn get_backing_memory(
15310 &mut self,
15311
15312 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
15313
15314 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
15315 ) -> impl ::core::future::Future<Output = ()>;
15316
15317 #[doc = " Pre-allocate on-disk space for this file.\n"]
15318 fn allocate(
15319 &mut self,
15320
15321 request: ::fidl_next::Request<file::Allocate, ___T>,
15322
15323 responder: ::fidl_next::Responder<file::Allocate, ___T>,
15324 ) -> impl ::core::future::Future<Output = ()>;
15325
15326 #[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"]
15327 fn enable_verity(
15328 &mut self,
15329
15330 request: ::fidl_next::Request<file::EnableVerity, ___T>,
15331
15332 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
15333 ) -> impl ::core::future::Future<Output = ()>;
15334
15335 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15336 ::core::future::ready(())
15337 }
15338}
15339
15340impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for File
15341where
15342 ___H: FileLocalServerHandler<___T>,
15343 ___T: ::fidl_next::Transport,
15344 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
15345 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15346 Constraint = (),
15347 >,
15348 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
15349 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15350 Constraint = (),
15351 >,
15352 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
15353 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15354 Constraint = (),
15355 >,
15356 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
15357 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15358 Constraint = (),
15359 >,
15360 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
15361 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15362 Constraint = (),
15363 >,
15364 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
15365 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15366 Constraint = (),
15367 >,
15368 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
15369 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15370 Constraint = (),
15371 >,
15372 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
15373 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15374 Constraint = (),
15375 >,
15376 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
15377 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15378 Constraint = (),
15379 >,
15380 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
15381 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15382 Constraint = (),
15383 >,
15384 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15385 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15386 Constraint = (),
15387 >,
15388 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15389 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15390 Constraint = (),
15391 >,
15392 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15393 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15394 Constraint = (),
15395 >,
15396 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
15397 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15398 Constraint = (),
15399 >,
15400 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
15401 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15402 Constraint = (),
15403 >,
15404 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
15405 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15406 Constraint = (),
15407 >,
15408 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
15409 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15410 Constraint = (),
15411 >,
15412 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
15413 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15414 Constraint = (),
15415 >,
15416 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
15417 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15418 Constraint = (),
15419 >,
15420 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
15421 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15422 Constraint = (),
15423 >,
15424 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
15425 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15426 Constraint = (),
15427 >,
15428 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
15429 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15430 Constraint = (),
15431 >,
15432{
15433 async fn on_one_way(
15434 handler: &mut ___H,
15435 ordinal: u64,
15436 flexibility: ::fidl_next::protocol::Flexibility,
15437 body: ::fidl_next::Body<___T>,
15438 ) -> ::core::result::Result<
15439 (),
15440 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15441 > {
15442 match ordinal {
15443 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15444 Ok(decoded) => {
15445 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
15446 Ok(())
15447 }
15448 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15449 ordinal: 2366825959783828089,
15450 error,
15451 }),
15452 },
15453
15454 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15455 Ok(decoded) => {
15456 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
15457 Ok(())
15458 }
15459 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15460 ordinal: 6512600400724287855,
15461 error,
15462 }),
15463 },
15464
15465 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15466 Ok(decoded) => {
15467 handler
15468 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
15469 .await;
15470 Ok(())
15471 }
15472 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15473 ordinal: 5431626189872037072,
15474 error,
15475 }),
15476 },
15477
15478 ordinal => {
15479 handler.on_unknown_interaction(ordinal).await;
15480 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15481 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15482 } else {
15483 Ok(())
15484 }
15485 }
15486 }
15487 }
15488
15489 async fn on_two_way(
15490 handler: &mut ___H,
15491 ordinal: u64,
15492 flexibility: ::fidl_next::protocol::Flexibility,
15493 body: ::fidl_next::Body<___T>,
15494 responder: ::fidl_next::protocol::Responder<___T>,
15495 ) -> ::core::result::Result<
15496 (),
15497 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15498 > {
15499 match ordinal {
15500 7992130864415541162 => {
15501 let responder = ::fidl_next::Responder::from_untyped(responder);
15502
15503 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15504 Ok(decoded) => {
15505 handler
15506 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
15507 .await;
15508 Ok(())
15509 }
15510 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15511 ordinal: 7992130864415541162,
15512 error,
15513 }),
15514 }
15515 }
15516
15517 6121399674497678964 => {
15518 let responder = ::fidl_next::Responder::from_untyped(responder);
15519
15520 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15521 Ok(decoded) => {
15522 handler
15523 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
15524 .await;
15525 Ok(())
15526 }
15527 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15528 ordinal: 6121399674497678964,
15529 error,
15530 }),
15531 }
15532 }
15533
15534 6540867515453498750 => {
15535 let responder = ::fidl_next::Responder::from_untyped(responder);
15536
15537 handler.close(responder).await;
15538 Ok(())
15539 }
15540
15541 2763219980499352582 => {
15542 let responder = ::fidl_next::Responder::from_untyped(responder);
15543
15544 handler.query(responder).await;
15545 Ok(())
15546 }
15547
15548 8689798978500614909 => {
15549 let responder = ::fidl_next::Responder::from_untyped(responder);
15550
15551 handler.deprecated_get_attr(responder).await;
15552 Ok(())
15553 }
15554
15555 4721673413776871238 => {
15556 let responder = ::fidl_next::Responder::from_untyped(responder);
15557
15558 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15559 Ok(decoded) => {
15560 handler
15561 .deprecated_set_attr(
15562 ::fidl_next::Request::from_decoded(decoded),
15563 responder,
15564 )
15565 .await;
15566 Ok(())
15567 }
15568 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15569 ordinal: 4721673413776871238,
15570 error,
15571 }),
15572 }
15573 }
15574
15575 6595803110182632097 => {
15576 let responder = ::fidl_next::Responder::from_untyped(responder);
15577
15578 handler.deprecated_get_flags(responder).await;
15579 Ok(())
15580 }
15581
15582 5950864159036794675 => {
15583 let responder = ::fidl_next::Responder::from_untyped(responder);
15584
15585 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15586 Ok(decoded) => {
15587 handler
15588 .deprecated_set_flags(
15589 ::fidl_next::Request::from_decoded(decoded),
15590 responder,
15591 )
15592 .await;
15593 Ok(())
15594 }
15595 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15596 ordinal: 5950864159036794675,
15597 error,
15598 }),
15599 }
15600 }
15601
15602 105530239381466147 => {
15603 let responder = ::fidl_next::Responder::from_untyped(responder);
15604
15605 handler.get_flags(responder).await;
15606 Ok(())
15607 }
15608
15609 6172186066099445416 => {
15610 let responder = ::fidl_next::Responder::from_untyped(responder);
15611
15612 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15613 Ok(decoded) => {
15614 handler
15615 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
15616 .await;
15617 Ok(())
15618 }
15619 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15620 ordinal: 6172186066099445416,
15621 error,
15622 }),
15623 }
15624 }
15625
15626 8013111122914313744 => {
15627 let responder = ::fidl_next::Responder::from_untyped(responder);
15628
15629 handler.query_filesystem(responder).await;
15630 Ok(())
15631 }
15632
15633 4414537700416816443 => {
15634 let responder = ::fidl_next::Responder::from_untyped(responder);
15635
15636 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15637 Ok(decoded) => {
15638 handler
15639 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
15640 .await;
15641 Ok(())
15642 }
15643 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15644 ordinal: 4414537700416816443,
15645 error,
15646 }),
15647 }
15648 }
15649
15650 3677402239314018056 => {
15651 let responder = ::fidl_next::Responder::from_untyped(responder);
15652
15653 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15654 Ok(decoded) => {
15655 handler
15656 .update_attributes(
15657 ::fidl_next::Request::from_decoded(decoded),
15658 responder,
15659 )
15660 .await;
15661 Ok(())
15662 }
15663 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15664 ordinal: 3677402239314018056,
15665 error,
15666 }),
15667 }
15668 }
15669
15670 3196473584242777161 => {
15671 let responder = ::fidl_next::Responder::from_untyped(responder);
15672
15673 handler.sync(responder).await;
15674 Ok(())
15675 }
15676
15677 5043930208506967771 => {
15678 let responder = ::fidl_next::Responder::from_untyped(responder);
15679
15680 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15681 Ok(decoded) => {
15682 handler
15683 .get_extended_attribute(
15684 ::fidl_next::Request::from_decoded(decoded),
15685 responder,
15686 )
15687 .await;
15688 Ok(())
15689 }
15690 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15691 ordinal: 5043930208506967771,
15692 error,
15693 }),
15694 }
15695 }
15696
15697 5374223046099989052 => {
15698 let responder = ::fidl_next::Responder::from_untyped(responder);
15699
15700 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15701 Ok(decoded) => {
15702 handler
15703 .set_extended_attribute(
15704 ::fidl_next::Request::from_decoded(decoded),
15705 responder,
15706 )
15707 .await;
15708 Ok(())
15709 }
15710 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15711 ordinal: 5374223046099989052,
15712 error,
15713 }),
15714 }
15715 }
15716
15717 8794297771444732717 => {
15718 let responder = ::fidl_next::Responder::from_untyped(responder);
15719
15720 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15721 Ok(decoded) => {
15722 handler
15723 .remove_extended_attribute(
15724 ::fidl_next::Request::from_decoded(decoded),
15725 responder,
15726 )
15727 .await;
15728 Ok(())
15729 }
15730 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15731 ordinal: 8794297771444732717,
15732 error,
15733 }),
15734 }
15735 }
15736
15737 395825947633028830 => {
15738 let responder = ::fidl_next::Responder::from_untyped(responder);
15739
15740 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15741 Ok(decoded) => {
15742 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
15743 Ok(())
15744 }
15745 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15746 ordinal: 395825947633028830,
15747 error,
15748 }),
15749 }
15750 }
15751
15752 7651971425397809026 => {
15753 let responder = ::fidl_next::Responder::from_untyped(responder);
15754
15755 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15756 Ok(decoded) => {
15757 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
15758 Ok(())
15759 }
15760 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15761 ordinal: 7651971425397809026,
15762 error,
15763 }),
15764 }
15765 }
15766
15767 7545125870053689020 => {
15768 let responder = ::fidl_next::Responder::from_untyped(responder);
15769
15770 handler.describe(responder).await;
15771 Ok(())
15772 }
15773
15774 8649041485622956551 => {
15775 let responder = ::fidl_next::Responder::from_untyped(responder);
15776
15777 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15778 Ok(decoded) => {
15779 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
15780 Ok(())
15781 }
15782 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15783 ordinal: 8649041485622956551,
15784 error,
15785 }),
15786 }
15787 }
15788
15789 1587416148701180478 => {
15790 let responder = ::fidl_next::Responder::from_untyped(responder);
15791
15792 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15793 Ok(decoded) => {
15794 handler
15795 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
15796 .await;
15797 Ok(())
15798 }
15799 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15800 ordinal: 1587416148701180478,
15801 error,
15802 }),
15803 }
15804 }
15805
15806 8736683935131400491 => {
15807 let responder = ::fidl_next::Responder::from_untyped(responder);
15808
15809 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15810 Ok(decoded) => {
15811 handler
15812 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
15813 .await;
15814 Ok(())
15815 }
15816 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15817 ordinal: 8736683935131400491,
15818 error,
15819 }),
15820 }
15821 }
15822
15823 3134648685270758458 => {
15824 let responder = ::fidl_next::Responder::from_untyped(responder);
15825
15826 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15827 Ok(decoded) => {
15828 handler
15829 .resize(::fidl_next::Request::from_decoded(decoded), responder)
15830 .await;
15831 Ok(())
15832 }
15833 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15834 ordinal: 3134648685270758458,
15835 error,
15836 }),
15837 }
15838 }
15839
15840 46911652864194091 => {
15841 let responder = ::fidl_next::Responder::from_untyped(responder);
15842
15843 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15844 Ok(decoded) => {
15845 handler
15846 .get_backing_memory(
15847 ::fidl_next::Request::from_decoded(decoded),
15848 responder,
15849 )
15850 .await;
15851 Ok(())
15852 }
15853 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15854 ordinal: 46911652864194091,
15855 error,
15856 }),
15857 }
15858 }
15859
15860 8645235848064269614 => {
15861 let responder = ::fidl_next::Responder::from_untyped(responder);
15862
15863 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15864 Ok(decoded) => {
15865 handler
15866 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
15867 .await;
15868 Ok(())
15869 }
15870 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15871 ordinal: 8645235848064269614,
15872 error,
15873 }),
15874 }
15875 }
15876
15877 3189145313204943035 => {
15878 let responder = ::fidl_next::Responder::from_untyped(responder);
15879
15880 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15881 Ok(decoded) => {
15882 handler
15883 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
15884 .await;
15885 Ok(())
15886 }
15887 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15888 ordinal: 3189145313204943035,
15889 error,
15890 }),
15891 }
15892 }
15893
15894 ordinal => {
15895 handler.on_unknown_interaction(ordinal).await;
15896 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15897 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15898 } else {
15899 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
15900 ordinal,
15901 flexibility,
15902 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
15903 )
15904 .expect("encoding a framework error should never fail")
15905 .await?;
15906 Ok(())
15907 }
15908 }
15909 }
15910 }
15911}
15912
15913pub trait FileClientHandler<
15917 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15918 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15919>
15920{
15921 #[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"]
15922 fn on_open(
15923 &mut self,
15924
15925 request: ::fidl_next::Request<file::OnOpen, ___T>,
15926 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15927
15928 #[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"]
15929 fn on_representation(
15930 &mut self,
15931
15932 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
15933 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15934
15935 fn on_unknown_interaction(
15936 &mut self,
15937 ordinal: u64,
15938 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15939 ::core::future::ready(())
15940 }
15941}
15942
15943impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for File
15944where
15945 ___H: FileClientHandler<___T> + ::core::marker::Send,
15946 ___T: ::fidl_next::Transport,
15947 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
15948 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15949 Constraint = (),
15950 >,
15951 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
15952 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15953 Constraint = (),
15954 >,
15955{
15956 async fn on_event(
15957 handler: &mut ___H,
15958 ordinal: u64,
15959 flexibility: ::fidl_next::protocol::Flexibility,
15960 body: ::fidl_next::Body<___T>,
15961 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15962 match ordinal {
15963 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15964 Ok(decoded) => {
15965 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
15966 Ok(())
15967 }
15968 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15969 ordinal: 9207534335756671346,
15970 error,
15971 }),
15972 },
15973
15974 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15975 Ok(decoded) => {
15976 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
15977 Ok(())
15978 }
15979 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15980 ordinal: 6679970090861613324,
15981 error,
15982 }),
15983 },
15984
15985 ordinal => {
15986 handler.on_unknown_interaction(ordinal).await;
15987 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15988 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15989 } else {
15990 Ok(())
15991 }
15992 }
15993 }
15994 }
15995}
15996
15997pub trait FileServerHandler<
16001 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16002 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16003>
16004{
16005 #[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"]
16006 fn advisory_lock(
16007 &mut self,
16008
16009 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
16010
16011 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
16012 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16013
16014 #[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"]
16015 fn link_into(
16016 &mut self,
16017
16018 request: ::fidl_next::Request<file::LinkInto, ___T>,
16019
16020 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
16021 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16022
16023 fn clone(
16024 &mut self,
16025
16026 request: ::fidl_next::Request<file::Clone, ___T>,
16027 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16028
16029 #[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"]
16030 fn close(
16031 &mut self,
16032
16033 responder: ::fidl_next::Responder<file::Close, ___T>,
16034 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16035
16036 fn query(
16037 &mut self,
16038
16039 responder: ::fidl_next::Responder<file::Query, ___T>,
16040 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16041
16042 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
16043 fn deprecated_clone(
16044 &mut self,
16045
16046 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
16047 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16048
16049 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
16050 fn deprecated_get_attr(
16051 &mut self,
16052
16053 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
16054 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16055
16056 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
16057 fn deprecated_set_attr(
16058 &mut self,
16059
16060 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
16061
16062 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
16063 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16064
16065 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
16066 fn deprecated_get_flags(
16067 &mut self,
16068
16069 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
16070 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16071
16072 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
16073 fn deprecated_set_flags(
16074 &mut self,
16075
16076 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
16077
16078 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
16079 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16080
16081 #[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"]
16082 fn get_flags(
16083 &mut self,
16084
16085 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
16086 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16087
16088 #[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"]
16089 fn set_flags(
16090 &mut self,
16091
16092 request: ::fidl_next::Request<file::SetFlags, ___T>,
16093
16094 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
16095 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16096
16097 #[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"]
16098 fn query_filesystem(
16099 &mut self,
16100
16101 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
16102 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16103
16104 #[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"]
16105 fn get_attributes(
16106 &mut self,
16107
16108 request: ::fidl_next::Request<file::GetAttributes, ___T>,
16109
16110 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
16111 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16112
16113 #[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"]
16114 fn update_attributes(
16115 &mut self,
16116
16117 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
16118
16119 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
16120 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16121
16122 #[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"]
16123 fn sync(
16124 &mut self,
16125
16126 responder: ::fidl_next::Responder<file::Sync, ___T>,
16127 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16128
16129 #[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"]
16130 fn list_extended_attributes(
16131 &mut self,
16132
16133 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
16134 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16135
16136 #[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"]
16137 fn get_extended_attribute(
16138 &mut self,
16139
16140 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
16141
16142 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
16143 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16144
16145 #[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"]
16146 fn set_extended_attribute(
16147 &mut self,
16148
16149 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
16150
16151 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
16152 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16153
16154 #[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"]
16155 fn remove_extended_attribute(
16156 &mut self,
16157
16158 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
16159
16160 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
16161 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16162
16163 #[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"]
16164 fn read(
16165 &mut self,
16166
16167 request: ::fidl_next::Request<file::Read, ___T>,
16168
16169 responder: ::fidl_next::Responder<file::Read, ___T>,
16170 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16171
16172 #[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"]
16173 fn write(
16174 &mut self,
16175
16176 request: ::fidl_next::Request<file::Write, ___T>,
16177
16178 responder: ::fidl_next::Responder<file::Write, ___T>,
16179 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16180
16181 fn describe(
16182 &mut self,
16183
16184 responder: ::fidl_next::Responder<file::Describe, ___T>,
16185 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16186
16187 #[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"]
16188 fn seek(
16189 &mut self,
16190
16191 request: ::fidl_next::Request<file::Seek, ___T>,
16192
16193 responder: ::fidl_next::Responder<file::Seek, ___T>,
16194 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16195
16196 #[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"]
16197 fn read_at(
16198 &mut self,
16199
16200 request: ::fidl_next::Request<file::ReadAt, ___T>,
16201
16202 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
16203 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16204
16205 #[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"]
16206 fn write_at(
16207 &mut self,
16208
16209 request: ::fidl_next::Request<file::WriteAt, ___T>,
16210
16211 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
16212 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16213
16214 #[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"]
16215 fn resize(
16216 &mut self,
16217
16218 request: ::fidl_next::Request<file::Resize, ___T>,
16219
16220 responder: ::fidl_next::Responder<file::Resize, ___T>,
16221 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16222
16223 #[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"]
16224 fn get_backing_memory(
16225 &mut self,
16226
16227 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
16228
16229 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
16230 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16231
16232 #[doc = " Pre-allocate on-disk space for this file.\n"]
16233 fn allocate(
16234 &mut self,
16235
16236 request: ::fidl_next::Request<file::Allocate, ___T>,
16237
16238 responder: ::fidl_next::Responder<file::Allocate, ___T>,
16239 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16240
16241 #[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"]
16242 fn enable_verity(
16243 &mut self,
16244
16245 request: ::fidl_next::Request<file::EnableVerity, ___T>,
16246
16247 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
16248 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16249
16250 fn on_unknown_interaction(
16251 &mut self,
16252 ordinal: u64,
16253 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16254 ::core::future::ready(())
16255 }
16256}
16257
16258impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for File
16259where
16260 ___H: FileServerHandler<___T> + ::core::marker::Send,
16261 ___T: ::fidl_next::Transport,
16262 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
16263 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16264 Constraint = (),
16265 >,
16266 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
16267 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16268 Constraint = (),
16269 >,
16270 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
16271 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16272 Constraint = (),
16273 >,
16274 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
16275 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16276 Constraint = (),
16277 >,
16278 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
16279 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16280 Constraint = (),
16281 >,
16282 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
16283 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16284 Constraint = (),
16285 >,
16286 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
16287 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16288 Constraint = (),
16289 >,
16290 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
16291 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16292 Constraint = (),
16293 >,
16294 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
16295 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16296 Constraint = (),
16297 >,
16298 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
16299 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16300 Constraint = (),
16301 >,
16302 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16303 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16304 Constraint = (),
16305 >,
16306 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16307 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16308 Constraint = (),
16309 >,
16310 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16311 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16312 Constraint = (),
16313 >,
16314 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
16315 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16316 Constraint = (),
16317 >,
16318 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
16319 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16320 Constraint = (),
16321 >,
16322 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
16323 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16324 Constraint = (),
16325 >,
16326 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
16327 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16328 Constraint = (),
16329 >,
16330 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
16331 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16332 Constraint = (),
16333 >,
16334 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
16335 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16336 Constraint = (),
16337 >,
16338 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
16339 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16340 Constraint = (),
16341 >,
16342 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
16343 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16344 Constraint = (),
16345 >,
16346 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
16347 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16348 Constraint = (),
16349 >,
16350{
16351 async fn on_one_way(
16352 handler: &mut ___H,
16353 ordinal: u64,
16354 flexibility: ::fidl_next::protocol::Flexibility,
16355 body: ::fidl_next::Body<___T>,
16356 ) -> ::core::result::Result<
16357 (),
16358 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16359 > {
16360 match ordinal {
16361 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
16362 Ok(decoded) => {
16363 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
16364 Ok(())
16365 }
16366 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16367 ordinal: 2366825959783828089,
16368 error,
16369 }),
16370 },
16371
16372 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
16373 Ok(decoded) => {
16374 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
16375 Ok(())
16376 }
16377 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16378 ordinal: 6512600400724287855,
16379 error,
16380 }),
16381 },
16382
16383 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
16384 Ok(decoded) => {
16385 handler
16386 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
16387 .await;
16388 Ok(())
16389 }
16390 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16391 ordinal: 5431626189872037072,
16392 error,
16393 }),
16394 },
16395
16396 ordinal => {
16397 handler.on_unknown_interaction(ordinal).await;
16398 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16399 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16400 } else {
16401 Ok(())
16402 }
16403 }
16404 }
16405 }
16406
16407 async fn on_two_way(
16408 handler: &mut ___H,
16409 ordinal: u64,
16410 flexibility: ::fidl_next::protocol::Flexibility,
16411 body: ::fidl_next::Body<___T>,
16412 responder: ::fidl_next::protocol::Responder<___T>,
16413 ) -> ::core::result::Result<
16414 (),
16415 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16416 > {
16417 match ordinal {
16418 7992130864415541162 => {
16419 let responder = ::fidl_next::Responder::from_untyped(responder);
16420
16421 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16422 Ok(decoded) => {
16423 handler
16424 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
16425 .await;
16426 Ok(())
16427 }
16428 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16429 ordinal: 7992130864415541162,
16430 error,
16431 }),
16432 }
16433 }
16434
16435 6121399674497678964 => {
16436 let responder = ::fidl_next::Responder::from_untyped(responder);
16437
16438 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16439 Ok(decoded) => {
16440 handler
16441 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
16442 .await;
16443 Ok(())
16444 }
16445 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16446 ordinal: 6121399674497678964,
16447 error,
16448 }),
16449 }
16450 }
16451
16452 6540867515453498750 => {
16453 let responder = ::fidl_next::Responder::from_untyped(responder);
16454
16455 handler.close(responder).await;
16456 Ok(())
16457 }
16458
16459 2763219980499352582 => {
16460 let responder = ::fidl_next::Responder::from_untyped(responder);
16461
16462 handler.query(responder).await;
16463 Ok(())
16464 }
16465
16466 8689798978500614909 => {
16467 let responder = ::fidl_next::Responder::from_untyped(responder);
16468
16469 handler.deprecated_get_attr(responder).await;
16470 Ok(())
16471 }
16472
16473 4721673413776871238 => {
16474 let responder = ::fidl_next::Responder::from_untyped(responder);
16475
16476 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16477 Ok(decoded) => {
16478 handler
16479 .deprecated_set_attr(
16480 ::fidl_next::Request::from_decoded(decoded),
16481 responder,
16482 )
16483 .await;
16484 Ok(())
16485 }
16486 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16487 ordinal: 4721673413776871238,
16488 error,
16489 }),
16490 }
16491 }
16492
16493 6595803110182632097 => {
16494 let responder = ::fidl_next::Responder::from_untyped(responder);
16495
16496 handler.deprecated_get_flags(responder).await;
16497 Ok(())
16498 }
16499
16500 5950864159036794675 => {
16501 let responder = ::fidl_next::Responder::from_untyped(responder);
16502
16503 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16504 Ok(decoded) => {
16505 handler
16506 .deprecated_set_flags(
16507 ::fidl_next::Request::from_decoded(decoded),
16508 responder,
16509 )
16510 .await;
16511 Ok(())
16512 }
16513 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16514 ordinal: 5950864159036794675,
16515 error,
16516 }),
16517 }
16518 }
16519
16520 105530239381466147 => {
16521 let responder = ::fidl_next::Responder::from_untyped(responder);
16522
16523 handler.get_flags(responder).await;
16524 Ok(())
16525 }
16526
16527 6172186066099445416 => {
16528 let responder = ::fidl_next::Responder::from_untyped(responder);
16529
16530 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16531 Ok(decoded) => {
16532 handler
16533 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
16534 .await;
16535 Ok(())
16536 }
16537 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16538 ordinal: 6172186066099445416,
16539 error,
16540 }),
16541 }
16542 }
16543
16544 8013111122914313744 => {
16545 let responder = ::fidl_next::Responder::from_untyped(responder);
16546
16547 handler.query_filesystem(responder).await;
16548 Ok(())
16549 }
16550
16551 4414537700416816443 => {
16552 let responder = ::fidl_next::Responder::from_untyped(responder);
16553
16554 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16555 Ok(decoded) => {
16556 handler
16557 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
16558 .await;
16559 Ok(())
16560 }
16561 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16562 ordinal: 4414537700416816443,
16563 error,
16564 }),
16565 }
16566 }
16567
16568 3677402239314018056 => {
16569 let responder = ::fidl_next::Responder::from_untyped(responder);
16570
16571 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16572 Ok(decoded) => {
16573 handler
16574 .update_attributes(
16575 ::fidl_next::Request::from_decoded(decoded),
16576 responder,
16577 )
16578 .await;
16579 Ok(())
16580 }
16581 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16582 ordinal: 3677402239314018056,
16583 error,
16584 }),
16585 }
16586 }
16587
16588 3196473584242777161 => {
16589 let responder = ::fidl_next::Responder::from_untyped(responder);
16590
16591 handler.sync(responder).await;
16592 Ok(())
16593 }
16594
16595 5043930208506967771 => {
16596 let responder = ::fidl_next::Responder::from_untyped(responder);
16597
16598 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16599 Ok(decoded) => {
16600 handler
16601 .get_extended_attribute(
16602 ::fidl_next::Request::from_decoded(decoded),
16603 responder,
16604 )
16605 .await;
16606 Ok(())
16607 }
16608 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16609 ordinal: 5043930208506967771,
16610 error,
16611 }),
16612 }
16613 }
16614
16615 5374223046099989052 => {
16616 let responder = ::fidl_next::Responder::from_untyped(responder);
16617
16618 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16619 Ok(decoded) => {
16620 handler
16621 .set_extended_attribute(
16622 ::fidl_next::Request::from_decoded(decoded),
16623 responder,
16624 )
16625 .await;
16626 Ok(())
16627 }
16628 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16629 ordinal: 5374223046099989052,
16630 error,
16631 }),
16632 }
16633 }
16634
16635 8794297771444732717 => {
16636 let responder = ::fidl_next::Responder::from_untyped(responder);
16637
16638 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16639 Ok(decoded) => {
16640 handler
16641 .remove_extended_attribute(
16642 ::fidl_next::Request::from_decoded(decoded),
16643 responder,
16644 )
16645 .await;
16646 Ok(())
16647 }
16648 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16649 ordinal: 8794297771444732717,
16650 error,
16651 }),
16652 }
16653 }
16654
16655 395825947633028830 => {
16656 let responder = ::fidl_next::Responder::from_untyped(responder);
16657
16658 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16659 Ok(decoded) => {
16660 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
16661 Ok(())
16662 }
16663 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16664 ordinal: 395825947633028830,
16665 error,
16666 }),
16667 }
16668 }
16669
16670 7651971425397809026 => {
16671 let responder = ::fidl_next::Responder::from_untyped(responder);
16672
16673 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16674 Ok(decoded) => {
16675 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
16676 Ok(())
16677 }
16678 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16679 ordinal: 7651971425397809026,
16680 error,
16681 }),
16682 }
16683 }
16684
16685 7545125870053689020 => {
16686 let responder = ::fidl_next::Responder::from_untyped(responder);
16687
16688 handler.describe(responder).await;
16689 Ok(())
16690 }
16691
16692 8649041485622956551 => {
16693 let responder = ::fidl_next::Responder::from_untyped(responder);
16694
16695 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16696 Ok(decoded) => {
16697 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
16698 Ok(())
16699 }
16700 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16701 ordinal: 8649041485622956551,
16702 error,
16703 }),
16704 }
16705 }
16706
16707 1587416148701180478 => {
16708 let responder = ::fidl_next::Responder::from_untyped(responder);
16709
16710 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16711 Ok(decoded) => {
16712 handler
16713 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
16714 .await;
16715 Ok(())
16716 }
16717 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16718 ordinal: 1587416148701180478,
16719 error,
16720 }),
16721 }
16722 }
16723
16724 8736683935131400491 => {
16725 let responder = ::fidl_next::Responder::from_untyped(responder);
16726
16727 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16728 Ok(decoded) => {
16729 handler
16730 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
16731 .await;
16732 Ok(())
16733 }
16734 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16735 ordinal: 8736683935131400491,
16736 error,
16737 }),
16738 }
16739 }
16740
16741 3134648685270758458 => {
16742 let responder = ::fidl_next::Responder::from_untyped(responder);
16743
16744 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16745 Ok(decoded) => {
16746 handler
16747 .resize(::fidl_next::Request::from_decoded(decoded), responder)
16748 .await;
16749 Ok(())
16750 }
16751 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16752 ordinal: 3134648685270758458,
16753 error,
16754 }),
16755 }
16756 }
16757
16758 46911652864194091 => {
16759 let responder = ::fidl_next::Responder::from_untyped(responder);
16760
16761 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16762 Ok(decoded) => {
16763 handler
16764 .get_backing_memory(
16765 ::fidl_next::Request::from_decoded(decoded),
16766 responder,
16767 )
16768 .await;
16769 Ok(())
16770 }
16771 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16772 ordinal: 46911652864194091,
16773 error,
16774 }),
16775 }
16776 }
16777
16778 8645235848064269614 => {
16779 let responder = ::fidl_next::Responder::from_untyped(responder);
16780
16781 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16782 Ok(decoded) => {
16783 handler
16784 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
16785 .await;
16786 Ok(())
16787 }
16788 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16789 ordinal: 8645235848064269614,
16790 error,
16791 }),
16792 }
16793 }
16794
16795 3189145313204943035 => {
16796 let responder = ::fidl_next::Responder::from_untyped(responder);
16797
16798 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16799 Ok(decoded) => {
16800 handler
16801 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
16802 .await;
16803 Ok(())
16804 }
16805 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16806 ordinal: 3189145313204943035,
16807 error,
16808 }),
16809 }
16810 }
16811
16812 ordinal => {
16813 handler.on_unknown_interaction(ordinal).await;
16814 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16815 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16816 } else {
16817 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
16818 ordinal,
16819 flexibility,
16820 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
16821 )
16822 .expect("encoding a framework error should never fail")
16823 .await?;
16824 Ok(())
16825 }
16826 }
16827 }
16828 }
16829}
16830
16831impl<___T> FileClientHandler<___T> for ::fidl_next::IgnoreEvents
16832where
16833 ___T: ::fidl_next::Transport,
16834{
16835 async fn on_open(&mut self, _: ::fidl_next::Request<file::OnOpen, ___T>) {}
16836
16837 async fn on_representation(&mut self, _: ::fidl_next::Request<file::OnRepresentation, ___T>) {}
16838
16839 async fn on_unknown_interaction(&mut self, _: u64) {}
16840}
16841
16842impl<___H, ___T> FileLocalClientHandler<___T> for ::fidl_next::Local<___H>
16843where
16844 ___H: FileClientHandler<___T>,
16845 ___T: ::fidl_next::Transport,
16846{
16847 async fn on_open(&mut self, request: ::fidl_next::Request<file::OnOpen, ___T>) {
16848 ___H::on_open(&mut self.0, request).await
16849 }
16850
16851 async fn on_representation(
16852 &mut self,
16853
16854 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
16855 ) {
16856 ___H::on_representation(&mut self.0, request).await
16857 }
16858
16859 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16860 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16861 }
16862}
16863
16864impl<___H, ___T> FileLocalServerHandler<___T> for ::fidl_next::Local<___H>
16865where
16866 ___H: FileServerHandler<___T>,
16867 ___T: ::fidl_next::Transport,
16868{
16869 async fn advisory_lock(
16870 &mut self,
16871
16872 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
16873
16874 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
16875 ) {
16876 ___H::advisory_lock(&mut self.0, request, responder).await
16877 }
16878
16879 async fn link_into(
16880 &mut self,
16881
16882 request: ::fidl_next::Request<file::LinkInto, ___T>,
16883
16884 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
16885 ) {
16886 ___H::link_into(&mut self.0, request, responder).await
16887 }
16888
16889 async fn clone(&mut self, request: ::fidl_next::Request<file::Clone, ___T>) {
16890 ___H::clone(&mut self.0, request).await
16891 }
16892
16893 async fn close(&mut self, responder: ::fidl_next::Responder<file::Close, ___T>) {
16894 ___H::close(&mut self.0, responder).await
16895 }
16896
16897 async fn query(&mut self, responder: ::fidl_next::Responder<file::Query, ___T>) {
16898 ___H::query(&mut self.0, responder).await
16899 }
16900
16901 async fn deprecated_clone(
16902 &mut self,
16903
16904 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
16905 ) {
16906 ___H::deprecated_clone(&mut self.0, request).await
16907 }
16908
16909 async fn deprecated_get_attr(
16910 &mut self,
16911
16912 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
16913 ) {
16914 ___H::deprecated_get_attr(&mut self.0, responder).await
16915 }
16916
16917 async fn deprecated_set_attr(
16918 &mut self,
16919
16920 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
16921
16922 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
16923 ) {
16924 ___H::deprecated_set_attr(&mut self.0, request, responder).await
16925 }
16926
16927 async fn deprecated_get_flags(
16928 &mut self,
16929
16930 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
16931 ) {
16932 ___H::deprecated_get_flags(&mut self.0, responder).await
16933 }
16934
16935 async fn deprecated_set_flags(
16936 &mut self,
16937
16938 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
16939
16940 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
16941 ) {
16942 ___H::deprecated_set_flags(&mut self.0, request, responder).await
16943 }
16944
16945 async fn get_flags(&mut self, responder: ::fidl_next::Responder<file::GetFlags, ___T>) {
16946 ___H::get_flags(&mut self.0, responder).await
16947 }
16948
16949 async fn set_flags(
16950 &mut self,
16951
16952 request: ::fidl_next::Request<file::SetFlags, ___T>,
16953
16954 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
16955 ) {
16956 ___H::set_flags(&mut self.0, request, responder).await
16957 }
16958
16959 async fn query_filesystem(
16960 &mut self,
16961
16962 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
16963 ) {
16964 ___H::query_filesystem(&mut self.0, responder).await
16965 }
16966
16967 async fn get_attributes(
16968 &mut self,
16969
16970 request: ::fidl_next::Request<file::GetAttributes, ___T>,
16971
16972 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
16973 ) {
16974 ___H::get_attributes(&mut self.0, request, responder).await
16975 }
16976
16977 async fn update_attributes(
16978 &mut self,
16979
16980 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
16981
16982 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
16983 ) {
16984 ___H::update_attributes(&mut self.0, request, responder).await
16985 }
16986
16987 async fn sync(&mut self, responder: ::fidl_next::Responder<file::Sync, ___T>) {
16988 ___H::sync(&mut self.0, responder).await
16989 }
16990
16991 async fn list_extended_attributes(
16992 &mut self,
16993
16994 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
16995 ) {
16996 ___H::list_extended_attributes(&mut self.0, request).await
16997 }
16998
16999 async fn get_extended_attribute(
17000 &mut self,
17001
17002 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
17003
17004 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
17005 ) {
17006 ___H::get_extended_attribute(&mut self.0, request, responder).await
17007 }
17008
17009 async fn set_extended_attribute(
17010 &mut self,
17011
17012 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
17013
17014 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
17015 ) {
17016 ___H::set_extended_attribute(&mut self.0, request, responder).await
17017 }
17018
17019 async fn remove_extended_attribute(
17020 &mut self,
17021
17022 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
17023
17024 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
17025 ) {
17026 ___H::remove_extended_attribute(&mut self.0, request, responder).await
17027 }
17028
17029 async fn read(
17030 &mut self,
17031
17032 request: ::fidl_next::Request<file::Read, ___T>,
17033
17034 responder: ::fidl_next::Responder<file::Read, ___T>,
17035 ) {
17036 ___H::read(&mut self.0, request, responder).await
17037 }
17038
17039 async fn write(
17040 &mut self,
17041
17042 request: ::fidl_next::Request<file::Write, ___T>,
17043
17044 responder: ::fidl_next::Responder<file::Write, ___T>,
17045 ) {
17046 ___H::write(&mut self.0, request, responder).await
17047 }
17048
17049 async fn describe(&mut self, responder: ::fidl_next::Responder<file::Describe, ___T>) {
17050 ___H::describe(&mut self.0, responder).await
17051 }
17052
17053 async fn seek(
17054 &mut self,
17055
17056 request: ::fidl_next::Request<file::Seek, ___T>,
17057
17058 responder: ::fidl_next::Responder<file::Seek, ___T>,
17059 ) {
17060 ___H::seek(&mut self.0, request, responder).await
17061 }
17062
17063 async fn read_at(
17064 &mut self,
17065
17066 request: ::fidl_next::Request<file::ReadAt, ___T>,
17067
17068 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
17069 ) {
17070 ___H::read_at(&mut self.0, request, responder).await
17071 }
17072
17073 async fn write_at(
17074 &mut self,
17075
17076 request: ::fidl_next::Request<file::WriteAt, ___T>,
17077
17078 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
17079 ) {
17080 ___H::write_at(&mut self.0, request, responder).await
17081 }
17082
17083 async fn resize(
17084 &mut self,
17085
17086 request: ::fidl_next::Request<file::Resize, ___T>,
17087
17088 responder: ::fidl_next::Responder<file::Resize, ___T>,
17089 ) {
17090 ___H::resize(&mut self.0, request, responder).await
17091 }
17092
17093 async fn get_backing_memory(
17094 &mut self,
17095
17096 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
17097
17098 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
17099 ) {
17100 ___H::get_backing_memory(&mut self.0, request, responder).await
17101 }
17102
17103 async fn allocate(
17104 &mut self,
17105
17106 request: ::fidl_next::Request<file::Allocate, ___T>,
17107
17108 responder: ::fidl_next::Responder<file::Allocate, ___T>,
17109 ) {
17110 ___H::allocate(&mut self.0, request, responder).await
17111 }
17112
17113 async fn enable_verity(
17114 &mut self,
17115
17116 request: ::fidl_next::Request<file::EnableVerity, ___T>,
17117
17118 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
17119 ) {
17120 ___H::enable_verity(&mut self.0, request, responder).await
17121 }
17122
17123 async fn on_unknown_interaction(&mut self, ordinal: u64) {
17124 ___H::on_unknown_interaction(&mut self.0, ordinal).await
17125 }
17126}
17127
17128#[doc = " A [\'Node\'] which contains a symbolic link.\n"]
17130#[derive(PartialEq, Debug)]
17131pub struct Symlink;
17132
17133impl ::fidl_next::Discoverable for Symlink {
17134 const PROTOCOL_NAME: &'static str = "fuchsia.io.Symlink";
17135}
17136
17137#[cfg(target_os = "fuchsia")]
17138impl ::fidl_next::HasTransport for Symlink {
17139 type Transport = ::fidl_next::fuchsia::zx::Channel;
17140}
17141
17142pub mod symlink {
17143 pub mod prelude {
17144 pub use crate::{
17145 Symlink, SymlinkClientHandler, SymlinkLocalClientHandler, SymlinkLocalServerHandler,
17146 SymlinkServerHandler, symlink,
17147 };
17148
17149 pub use crate::natural::ExtendedAttributeValue;
17150
17151 pub use crate::natural::LinkableLinkIntoRequest;
17152
17153 pub use crate::natural::LinkableLinkIntoResponse;
17154
17155 pub use crate::natural::MutableNodeAttributes;
17156
17157 pub use crate::natural::NodeAttributes2;
17158
17159 pub use crate::natural::NodeDeprecatedCloneRequest;
17160
17161 pub use crate::natural::NodeDeprecatedGetAttrResponse;
17162
17163 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
17164
17165 pub use crate::natural::NodeDeprecatedSetAttrRequest;
17166
17167 pub use crate::natural::NodeDeprecatedSetAttrResponse;
17168
17169 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
17170
17171 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
17172
17173 pub use crate::natural::NodeGetAttributesRequest;
17174
17175 pub use crate::natural::NodeGetExtendedAttributeRequest;
17176
17177 pub use crate::natural::NodeListExtendedAttributesRequest;
17178
17179 pub use crate::natural::NodeOnOpenRequest;
17180
17181 pub use crate::natural::NodeQueryFilesystemResponse;
17182
17183 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
17184
17185 pub use crate::natural::NodeSetExtendedAttributeRequest;
17186
17187 pub use crate::natural::NodeSetFlagsRequest;
17188
17189 pub use crate::natural::NodeGetFlagsResponse;
17190
17191 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
17192
17193 pub use crate::natural::NodeSetExtendedAttributeResponse;
17194
17195 pub use crate::natural::NodeSetFlagsResponse;
17196
17197 pub use crate::natural::NodeSyncResponse;
17198
17199 pub use crate::natural::NodeUpdateAttributesResponse;
17200
17201 pub use crate::natural::OpenableOpenRequest;
17202
17203 pub use crate::natural::Representation;
17204
17205 pub use crate::natural::SymlinkInfo;
17206
17207 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
17208
17209 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
17210
17211 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
17212 }
17213
17214 pub struct LinkInto;
17215
17216 impl ::fidl_next::Method for LinkInto {
17217 const ORDINAL: u64 = 6121399674497678964;
17218 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17219 ::fidl_next::protocol::Flexibility::Strict;
17220
17221 type Protocol = crate::Symlink;
17222
17223 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
17224 }
17225
17226 impl ::fidl_next::TwoWayMethod for LinkInto {
17227 type Response = ::fidl_next::wire::Result<
17228 'static,
17229 crate::wire::LinkableLinkIntoResponse,
17230 ::fidl_next::wire::Int32,
17231 >;
17232 }
17233
17234 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
17235 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17236
17237 fn respond(response: ___R) -> Self::Output {
17238 ::core::result::Result::Ok(response)
17239 }
17240 }
17241
17242 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
17243 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17244
17245 fn respond_err(response: ___R) -> Self::Output {
17246 ::core::result::Result::Err(response)
17247 }
17248 }
17249
17250 pub struct Clone;
17251
17252 impl ::fidl_next::Method for Clone {
17253 const ORDINAL: u64 = 2366825959783828089;
17254 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17255 ::fidl_next::protocol::Flexibility::Strict;
17256
17257 type Protocol = crate::Symlink;
17258
17259 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
17260 }
17261
17262 pub struct Close;
17263
17264 impl ::fidl_next::Method for Close {
17265 const ORDINAL: u64 = 6540867515453498750;
17266 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17267 ::fidl_next::protocol::Flexibility::Strict;
17268
17269 type Protocol = crate::Symlink;
17270
17271 type Request = ::fidl_next::wire::EmptyMessageBody;
17272 }
17273
17274 impl ::fidl_next::TwoWayMethod for Close {
17275 type Response = ::fidl_next::wire::Result<
17276 'static,
17277 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
17278 ::fidl_next::wire::Int32,
17279 >;
17280 }
17281
17282 impl<___R> ::fidl_next::Respond<___R> for Close {
17283 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17284
17285 fn respond(response: ___R) -> Self::Output {
17286 ::core::result::Result::Ok(response)
17287 }
17288 }
17289
17290 impl<___R> ::fidl_next::RespondErr<___R> for Close {
17291 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17292
17293 fn respond_err(response: ___R) -> Self::Output {
17294 ::core::result::Result::Err(response)
17295 }
17296 }
17297
17298 pub struct Query;
17299
17300 impl ::fidl_next::Method for Query {
17301 const ORDINAL: u64 = 2763219980499352582;
17302 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17303 ::fidl_next::protocol::Flexibility::Strict;
17304
17305 type Protocol = crate::Symlink;
17306
17307 type Request = ::fidl_next::wire::EmptyMessageBody;
17308 }
17309
17310 impl ::fidl_next::TwoWayMethod for Query {
17311 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
17312 }
17313
17314 impl<___R> ::fidl_next::Respond<___R> for Query {
17315 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
17316
17317 fn respond(response: ___R) -> Self::Output {
17318 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
17319 }
17320 }
17321
17322 pub struct DeprecatedClone;
17323
17324 impl ::fidl_next::Method for DeprecatedClone {
17325 const ORDINAL: u64 = 6512600400724287855;
17326 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17327 ::fidl_next::protocol::Flexibility::Flexible;
17328
17329 type Protocol = crate::Symlink;
17330
17331 type Request = crate::wire::NodeDeprecatedCloneRequest;
17332 }
17333
17334 pub struct OnOpen;
17335
17336 impl ::fidl_next::Method for OnOpen {
17337 const ORDINAL: u64 = 9207534335756671346;
17338 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17339 ::fidl_next::protocol::Flexibility::Flexible;
17340
17341 type Protocol = crate::Symlink;
17342
17343 type Request = crate::wire::NodeOnOpenRequest<'static>;
17344 }
17345
17346 pub struct DeprecatedGetAttr;
17347
17348 impl ::fidl_next::Method for DeprecatedGetAttr {
17349 const ORDINAL: u64 = 8689798978500614909;
17350 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17351 ::fidl_next::protocol::Flexibility::Strict;
17352
17353 type Protocol = crate::Symlink;
17354
17355 type Request = ::fidl_next::wire::EmptyMessageBody;
17356 }
17357
17358 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
17359 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
17360 }
17361
17362 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
17363 type Output = ___R;
17364
17365 fn respond(response: ___R) -> Self::Output {
17366 response
17367 }
17368 }
17369
17370 pub struct DeprecatedSetAttr;
17371
17372 impl ::fidl_next::Method for DeprecatedSetAttr {
17373 const ORDINAL: u64 = 4721673413776871238;
17374 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17375 ::fidl_next::protocol::Flexibility::Strict;
17376
17377 type Protocol = crate::Symlink;
17378
17379 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
17380 }
17381
17382 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
17383 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
17384 }
17385
17386 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
17387 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
17388
17389 fn respond(response: ___R) -> Self::Output {
17390 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
17391 }
17392 }
17393
17394 pub struct DeprecatedGetFlags;
17395
17396 impl ::fidl_next::Method for DeprecatedGetFlags {
17397 const ORDINAL: u64 = 6595803110182632097;
17398 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17399 ::fidl_next::protocol::Flexibility::Strict;
17400
17401 type Protocol = crate::Symlink;
17402
17403 type Request = ::fidl_next::wire::EmptyMessageBody;
17404 }
17405
17406 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
17407 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
17408 }
17409
17410 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
17411 type Output = ___R;
17412
17413 fn respond(response: ___R) -> Self::Output {
17414 response
17415 }
17416 }
17417
17418 pub struct DeprecatedSetFlags;
17419
17420 impl ::fidl_next::Method for DeprecatedSetFlags {
17421 const ORDINAL: u64 = 5950864159036794675;
17422 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17423 ::fidl_next::protocol::Flexibility::Strict;
17424
17425 type Protocol = crate::Symlink;
17426
17427 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
17428 }
17429
17430 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
17431 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
17432 }
17433
17434 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
17435 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
17436
17437 fn respond(response: ___R) -> Self::Output {
17438 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
17439 }
17440 }
17441
17442 pub struct GetFlags;
17443
17444 impl ::fidl_next::Method for GetFlags {
17445 const ORDINAL: u64 = 105530239381466147;
17446 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17447 ::fidl_next::protocol::Flexibility::Flexible;
17448
17449 type Protocol = crate::Symlink;
17450
17451 type Request = ::fidl_next::wire::EmptyMessageBody;
17452 }
17453
17454 impl ::fidl_next::TwoWayMethod for GetFlags {
17455 type Response = ::fidl_next::wire::FlexibleResult<
17456 'static,
17457 crate::wire::NodeGetFlagsResponse,
17458 ::fidl_next::wire::Int32,
17459 >;
17460 }
17461
17462 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
17463 type Output = ::fidl_next::FlexibleResult<
17464 crate::generic::NodeGetFlagsResponse<___R>,
17465 ::fidl_next::util::Never,
17466 >;
17467
17468 fn respond(response: ___R) -> Self::Output {
17469 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
17470 flags: response,
17471 })
17472 }
17473 }
17474
17475 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
17476 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
17477
17478 fn respond_err(response: ___R) -> Self::Output {
17479 ::fidl_next::FlexibleResult::Err(response)
17480 }
17481 }
17482
17483 pub struct SetFlags;
17484
17485 impl ::fidl_next::Method for SetFlags {
17486 const ORDINAL: u64 = 6172186066099445416;
17487 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17488 ::fidl_next::protocol::Flexibility::Flexible;
17489
17490 type Protocol = crate::Symlink;
17491
17492 type Request = crate::wire::NodeSetFlagsRequest;
17493 }
17494
17495 impl ::fidl_next::TwoWayMethod for SetFlags {
17496 type Response = ::fidl_next::wire::FlexibleResult<
17497 'static,
17498 crate::wire::NodeSetFlagsResponse,
17499 ::fidl_next::wire::Int32,
17500 >;
17501 }
17502
17503 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
17504 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
17505
17506 fn respond(response: ___R) -> Self::Output {
17507 ::fidl_next::FlexibleResult::Ok(response)
17508 }
17509 }
17510
17511 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
17512 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
17513
17514 fn respond_err(response: ___R) -> Self::Output {
17515 ::fidl_next::FlexibleResult::Err(response)
17516 }
17517 }
17518
17519 pub struct QueryFilesystem;
17520
17521 impl ::fidl_next::Method for QueryFilesystem {
17522 const ORDINAL: u64 = 8013111122914313744;
17523 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17524 ::fidl_next::protocol::Flexibility::Strict;
17525
17526 type Protocol = crate::Symlink;
17527
17528 type Request = ::fidl_next::wire::EmptyMessageBody;
17529 }
17530
17531 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
17532 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
17533 }
17534
17535 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
17536 type Output = ___R;
17537
17538 fn respond(response: ___R) -> Self::Output {
17539 response
17540 }
17541 }
17542
17543 pub struct OnRepresentation;
17544
17545 impl ::fidl_next::Method for OnRepresentation {
17546 const ORDINAL: u64 = 6679970090861613324;
17547 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17548 ::fidl_next::protocol::Flexibility::Strict;
17549
17550 type Protocol = crate::Symlink;
17551
17552 type Request = crate::wire::Representation<'static>;
17553 }
17554
17555 pub struct GetAttributes;
17556
17557 impl ::fidl_next::Method for GetAttributes {
17558 const ORDINAL: u64 = 4414537700416816443;
17559 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17560 ::fidl_next::protocol::Flexibility::Strict;
17561
17562 type Protocol = crate::Symlink;
17563
17564 type Request = crate::wire::NodeGetAttributesRequest;
17565 }
17566
17567 impl ::fidl_next::TwoWayMethod for GetAttributes {
17568 type Response = ::fidl_next::wire::Result<
17569 'static,
17570 crate::wire::NodeAttributes2<'static>,
17571 ::fidl_next::wire::Int32,
17572 >;
17573 }
17574
17575 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
17576 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17577
17578 fn respond(response: ___R) -> Self::Output {
17579 ::core::result::Result::Ok(response)
17580 }
17581 }
17582
17583 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
17584 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17585
17586 fn respond_err(response: ___R) -> Self::Output {
17587 ::core::result::Result::Err(response)
17588 }
17589 }
17590
17591 pub struct UpdateAttributes;
17592
17593 impl ::fidl_next::Method for UpdateAttributes {
17594 const ORDINAL: u64 = 3677402239314018056;
17595 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17596 ::fidl_next::protocol::Flexibility::Strict;
17597
17598 type Protocol = crate::Symlink;
17599
17600 type Request = crate::wire::MutableNodeAttributes<'static>;
17601 }
17602
17603 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
17604 type Response = ::fidl_next::wire::Result<
17605 'static,
17606 crate::wire::NodeUpdateAttributesResponse,
17607 ::fidl_next::wire::Int32,
17608 >;
17609 }
17610
17611 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
17612 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17613
17614 fn respond(response: ___R) -> Self::Output {
17615 ::core::result::Result::Ok(response)
17616 }
17617 }
17618
17619 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
17620 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17621
17622 fn respond_err(response: ___R) -> Self::Output {
17623 ::core::result::Result::Err(response)
17624 }
17625 }
17626
17627 pub struct Sync;
17628
17629 impl ::fidl_next::Method for Sync {
17630 const ORDINAL: u64 = 3196473584242777161;
17631 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17632 ::fidl_next::protocol::Flexibility::Strict;
17633
17634 type Protocol = crate::Symlink;
17635
17636 type Request = ::fidl_next::wire::EmptyMessageBody;
17637 }
17638
17639 impl ::fidl_next::TwoWayMethod for Sync {
17640 type Response = ::fidl_next::wire::Result<
17641 'static,
17642 crate::wire::NodeSyncResponse,
17643 ::fidl_next::wire::Int32,
17644 >;
17645 }
17646
17647 impl<___R> ::fidl_next::Respond<___R> for Sync {
17648 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17649
17650 fn respond(response: ___R) -> Self::Output {
17651 ::core::result::Result::Ok(response)
17652 }
17653 }
17654
17655 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
17656 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17657
17658 fn respond_err(response: ___R) -> Self::Output {
17659 ::core::result::Result::Err(response)
17660 }
17661 }
17662
17663 pub struct ListExtendedAttributes;
17664
17665 impl ::fidl_next::Method for ListExtendedAttributes {
17666 const ORDINAL: u64 = 5431626189872037072;
17667 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17668 ::fidl_next::protocol::Flexibility::Strict;
17669
17670 type Protocol = crate::Symlink;
17671
17672 type Request = crate::wire::NodeListExtendedAttributesRequest;
17673 }
17674
17675 pub struct GetExtendedAttribute;
17676
17677 impl ::fidl_next::Method for GetExtendedAttribute {
17678 const ORDINAL: u64 = 5043930208506967771;
17679 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17680 ::fidl_next::protocol::Flexibility::Strict;
17681
17682 type Protocol = crate::Symlink;
17683
17684 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
17685 }
17686
17687 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
17688 type Response = ::fidl_next::wire::Result<
17689 'static,
17690 crate::wire::ExtendedAttributeValue<'static>,
17691 ::fidl_next::wire::Int32,
17692 >;
17693 }
17694
17695 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
17696 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17697
17698 fn respond(response: ___R) -> Self::Output {
17699 ::core::result::Result::Ok(response)
17700 }
17701 }
17702
17703 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
17704 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17705
17706 fn respond_err(response: ___R) -> Self::Output {
17707 ::core::result::Result::Err(response)
17708 }
17709 }
17710
17711 pub struct SetExtendedAttribute;
17712
17713 impl ::fidl_next::Method for SetExtendedAttribute {
17714 const ORDINAL: u64 = 5374223046099989052;
17715 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17716 ::fidl_next::protocol::Flexibility::Strict;
17717
17718 type Protocol = crate::Symlink;
17719
17720 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
17721 }
17722
17723 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
17724 type Response = ::fidl_next::wire::Result<
17725 'static,
17726 crate::wire::NodeSetExtendedAttributeResponse,
17727 ::fidl_next::wire::Int32,
17728 >;
17729 }
17730
17731 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
17732 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17733
17734 fn respond(response: ___R) -> Self::Output {
17735 ::core::result::Result::Ok(response)
17736 }
17737 }
17738
17739 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
17740 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17741
17742 fn respond_err(response: ___R) -> Self::Output {
17743 ::core::result::Result::Err(response)
17744 }
17745 }
17746
17747 pub struct RemoveExtendedAttribute;
17748
17749 impl ::fidl_next::Method for RemoveExtendedAttribute {
17750 const ORDINAL: u64 = 8794297771444732717;
17751 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17752 ::fidl_next::protocol::Flexibility::Strict;
17753
17754 type Protocol = crate::Symlink;
17755
17756 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
17757 }
17758
17759 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
17760 type Response = ::fidl_next::wire::Result<
17761 'static,
17762 crate::wire::NodeRemoveExtendedAttributeResponse,
17763 ::fidl_next::wire::Int32,
17764 >;
17765 }
17766
17767 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
17768 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17769
17770 fn respond(response: ___R) -> Self::Output {
17771 ::core::result::Result::Ok(response)
17772 }
17773 }
17774
17775 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
17776 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17777
17778 fn respond_err(response: ___R) -> Self::Output {
17779 ::core::result::Result::Err(response)
17780 }
17781 }
17782
17783 pub struct Open;
17784
17785 impl ::fidl_next::Method for Open {
17786 const ORDINAL: u64 = 6236883748953765593;
17787 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17788 ::fidl_next::protocol::Flexibility::Flexible;
17789
17790 type Protocol = crate::Symlink;
17791
17792 type Request = crate::wire::OpenableOpenRequest<'static>;
17793 }
17794
17795 pub struct Describe;
17796
17797 impl ::fidl_next::Method for Describe {
17798 const ORDINAL: u64 = 8371117097481679347;
17799 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17800 ::fidl_next::protocol::Flexibility::Flexible;
17801
17802 type Protocol = crate::Symlink;
17803
17804 type Request = ::fidl_next::wire::EmptyMessageBody;
17805 }
17806
17807 impl ::fidl_next::TwoWayMethod for Describe {
17808 type Response = ::fidl_next::wire::Flexible<'static, crate::wire::SymlinkInfo<'static>>;
17809 }
17810
17811 impl<___R> ::fidl_next::Respond<___R> for Describe {
17812 type Output = ::fidl_next::Flexible<___R>;
17813
17814 fn respond(response: ___R) -> Self::Output {
17815 ::fidl_next::Flexible::Ok(response)
17816 }
17817 }
17818
17819 mod ___detail {
17820 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Symlink
17821 where
17822 ___T: ::fidl_next::Transport,
17823 {
17824 type Client = SymlinkClient<___T>;
17825 type Server = SymlinkServer<___T>;
17826 }
17827
17828 #[repr(transparent)]
17830 pub struct SymlinkClient<___T: ::fidl_next::Transport> {
17831 #[allow(dead_code)]
17832 client: ::fidl_next::protocol::Client<___T>,
17833 }
17834
17835 impl<___T> SymlinkClient<___T>
17836 where
17837 ___T: ::fidl_next::Transport,
17838 {
17839 #[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"]
17840 pub fn link_into(
17841 &self,
17842
17843 dst_parent_token: impl ::fidl_next::Encode<
17844 ::fidl_next::wire::fuchsia::Event,
17845 <___T as ::fidl_next::Transport>::SendBuffer,
17846 >,
17847
17848 dst: impl ::fidl_next::Encode<
17849 ::fidl_next::wire::String<'static>,
17850 <___T as ::fidl_next::Transport>::SendBuffer,
17851 >,
17852 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
17853 where
17854 <___T as ::fidl_next::Transport>::SendBuffer:
17855 ::fidl_next::encoder::InternalHandleEncoder,
17856 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17857 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
17858 {
17859 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
17860 dst_parent_token,
17861
17862 dst,
17863 })
17864 }
17865
17866 #[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"]
17867 pub fn link_into_with<___R>(
17868 &self,
17869 request: ___R,
17870 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
17871 where
17872 ___R: ::fidl_next::Encode<
17873 crate::wire::LinkableLinkIntoRequest<'static>,
17874 <___T as ::fidl_next::Transport>::SendBuffer,
17875 >,
17876 {
17877 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17878 6121399674497678964,
17879 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
17880 request,
17881 ))
17882 }
17883
17884 pub fn clone(
17885 &self,
17886
17887 request: impl ::fidl_next::Encode<
17888 ::fidl_next::ServerEnd<
17889 ::fidl_next_fuchsia_unknown::Cloneable,
17890 ::fidl_next::wire::fuchsia::Channel,
17891 >,
17892 <___T as ::fidl_next::Transport>::SendBuffer,
17893 >,
17894 ) -> ::fidl_next::SendFuture<'_, ___T>
17895 where
17896 <___T as ::fidl_next::Transport>::SendBuffer:
17897 ::fidl_next::encoder::InternalHandleEncoder,
17898 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
17899 {
17900 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
17901 request,
17902 })
17903 }
17904
17905 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
17906 where
17907 ___R: ::fidl_next::Encode<
17908 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
17909 <___T as ::fidl_next::Transport>::SendBuffer,
17910 >,
17911 {
17912 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
17913 2366825959783828089,
17914 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
17915 request,
17916 ))
17917 }
17918
17919 #[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"]
17920 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
17921 ::fidl_next::TwoWayFuture::from_untyped(
17922 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17923 6540867515453498750,
17924 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
17925 (),
17926 ),
17927 )
17928 }
17929
17930 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
17931 ::fidl_next::TwoWayFuture::from_untyped(
17932 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17933 2763219980499352582,
17934 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
17935 (),
17936 ),
17937 )
17938 }
17939
17940 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
17941 pub fn deprecated_clone(
17942 &self,
17943
17944 flags: impl ::fidl_next::Encode<
17945 crate::wire::OpenFlags,
17946 <___T as ::fidl_next::Transport>::SendBuffer,
17947 >,
17948
17949 object: impl ::fidl_next::Encode<
17950 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
17951 <___T as ::fidl_next::Transport>::SendBuffer,
17952 >,
17953 ) -> ::fidl_next::SendFuture<'_, ___T>
17954 where
17955 <___T as ::fidl_next::Transport>::SendBuffer:
17956 ::fidl_next::encoder::InternalHandleEncoder,
17957 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
17958 {
17959 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
17960 flags,
17961
17962 object,
17963 })
17964 }
17965
17966 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
17967 pub fn deprecated_clone_with<___R>(
17968 &self,
17969 request: ___R,
17970 ) -> ::fidl_next::SendFuture<'_, ___T>
17971 where
17972 ___R: ::fidl_next::Encode<
17973 crate::wire::NodeDeprecatedCloneRequest,
17974 <___T as ::fidl_next::Transport>::SendBuffer,
17975 >,
17976 {
17977 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
17978 6512600400724287855,
17979 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
17980 request,
17981 ))
17982 }
17983
17984 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
17985 pub fn deprecated_get_attr(
17986 &self,
17987 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
17988 ::fidl_next::TwoWayFuture::from_untyped(
17989 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17990 8689798978500614909,
17991 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
17992 (),
17993 ),
17994 )
17995 }
17996
17997 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
17998 pub fn deprecated_set_attr(
17999 &self,
18000
18001 flags: impl ::fidl_next::Encode<
18002 crate::wire::NodeAttributeFlags,
18003 <___T as ::fidl_next::Transport>::SendBuffer,
18004 >,
18005
18006 attributes: impl ::fidl_next::Encode<
18007 crate::wire::NodeAttributes,
18008 <___T as ::fidl_next::Transport>::SendBuffer,
18009 >,
18010 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
18011 where
18012 <___T as ::fidl_next::Transport>::SendBuffer:
18013 ::fidl_next::encoder::InternalHandleEncoder,
18014 {
18015 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
18016 flags,
18017
18018 attributes,
18019 })
18020 }
18021
18022 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18023 pub fn deprecated_set_attr_with<___R>(
18024 &self,
18025 request: ___R,
18026 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
18027 where
18028 ___R: ::fidl_next::Encode<
18029 crate::wire::NodeDeprecatedSetAttrRequest,
18030 <___T as ::fidl_next::Transport>::SendBuffer,
18031 >,
18032 {
18033 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18034 4721673413776871238,
18035 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
18036 request,
18037 ))
18038 }
18039
18040 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
18041 pub fn deprecated_get_flags(
18042 &self,
18043 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
18044 ::fidl_next::TwoWayFuture::from_untyped(
18045 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18046 6595803110182632097,
18047 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
18048 (),
18049 ),
18050 )
18051 }
18052
18053 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18054 pub fn deprecated_set_flags(
18055 &self,
18056
18057 flags: impl ::fidl_next::Encode<
18058 crate::wire::OpenFlags,
18059 <___T as ::fidl_next::Transport>::SendBuffer,
18060 >,
18061 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
18062 where
18063 <___T as ::fidl_next::Transport>::SendBuffer:
18064 ::fidl_next::encoder::InternalHandleEncoder,
18065 {
18066 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
18067 flags,
18068 })
18069 }
18070
18071 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18072 pub fn deprecated_set_flags_with<___R>(
18073 &self,
18074 request: ___R,
18075 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
18076 where
18077 ___R: ::fidl_next::Encode<
18078 crate::wire::NodeDeprecatedSetFlagsRequest,
18079 <___T as ::fidl_next::Transport>::SendBuffer,
18080 >,
18081 {
18082 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18083 5950864159036794675,
18084 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
18085 request,
18086 ))
18087 }
18088
18089 #[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"]
18090 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
18091 ::fidl_next::TwoWayFuture::from_untyped(
18092 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18093 105530239381466147,
18094 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
18095 (),
18096 ),
18097 )
18098 }
18099
18100 #[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"]
18101 pub fn set_flags(
18102 &self,
18103
18104 flags: impl ::fidl_next::Encode<
18105 crate::wire::Flags,
18106 <___T as ::fidl_next::Transport>::SendBuffer,
18107 >,
18108 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
18109 where
18110 <___T as ::fidl_next::Transport>::SendBuffer:
18111 ::fidl_next::encoder::InternalHandleEncoder,
18112 {
18113 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
18114 }
18115
18116 #[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"]
18117 pub fn set_flags_with<___R>(
18118 &self,
18119 request: ___R,
18120 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
18121 where
18122 ___R: ::fidl_next::Encode<
18123 crate::wire::NodeSetFlagsRequest,
18124 <___T as ::fidl_next::Transport>::SendBuffer,
18125 >,
18126 {
18127 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18128 6172186066099445416,
18129 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
18130 request,
18131 ))
18132 }
18133
18134 #[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"]
18135 pub fn query_filesystem(
18136 &self,
18137 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
18138 ::fidl_next::TwoWayFuture::from_untyped(
18139 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18140 8013111122914313744,
18141 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
18142 (),
18143 ),
18144 )
18145 }
18146
18147 #[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"]
18148 pub fn get_attributes(
18149 &self,
18150
18151 query: impl ::fidl_next::Encode<
18152 crate::wire::NodeAttributesQuery,
18153 <___T as ::fidl_next::Transport>::SendBuffer,
18154 >,
18155 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
18156 where
18157 <___T as ::fidl_next::Transport>::SendBuffer:
18158 ::fidl_next::encoder::InternalHandleEncoder,
18159 {
18160 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
18161 }
18162
18163 #[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"]
18164 pub fn get_attributes_with<___R>(
18165 &self,
18166 request: ___R,
18167 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
18168 where
18169 ___R: ::fidl_next::Encode<
18170 crate::wire::NodeGetAttributesRequest,
18171 <___T as ::fidl_next::Transport>::SendBuffer,
18172 >,
18173 {
18174 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18175 4414537700416816443,
18176 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
18177 request,
18178 ))
18179 }
18180
18181 #[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"]
18182 pub fn update_attributes_with<___R>(
18183 &self,
18184 request: ___R,
18185 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
18186 where
18187 ___R: ::fidl_next::Encode<
18188 crate::wire::MutableNodeAttributes<'static>,
18189 <___T as ::fidl_next::Transport>::SendBuffer,
18190 >,
18191 {
18192 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18193 3677402239314018056,
18194 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
18195 request,
18196 ))
18197 }
18198
18199 #[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"]
18200 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
18201 ::fidl_next::TwoWayFuture::from_untyped(
18202 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18203 3196473584242777161,
18204 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
18205 (),
18206 ),
18207 )
18208 }
18209
18210 #[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"]
18211 pub fn list_extended_attributes(
18212 &self,
18213
18214 iterator: impl ::fidl_next::Encode<
18215 ::fidl_next::ServerEnd<
18216 crate::ExtendedAttributeIterator,
18217 ::fidl_next::wire::fuchsia::Channel,
18218 >,
18219 <___T as ::fidl_next::Transport>::SendBuffer,
18220 >,
18221 ) -> ::fidl_next::SendFuture<'_, ___T>
18222 where
18223 <___T as ::fidl_next::Transport>::SendBuffer:
18224 ::fidl_next::encoder::InternalHandleEncoder,
18225 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18226 {
18227 self.list_extended_attributes_with(
18228 crate::generic::NodeListExtendedAttributesRequest { iterator },
18229 )
18230 }
18231
18232 #[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"]
18233 pub fn list_extended_attributes_with<___R>(
18234 &self,
18235 request: ___R,
18236 ) -> ::fidl_next::SendFuture<'_, ___T>
18237 where
18238 ___R: ::fidl_next::Encode<
18239 crate::wire::NodeListExtendedAttributesRequest,
18240 <___T as ::fidl_next::Transport>::SendBuffer,
18241 >,
18242 {
18243 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
18244 5431626189872037072,
18245 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
18246 request,
18247 ))
18248 }
18249
18250 #[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"]
18251 pub fn get_extended_attribute(
18252 &self,
18253
18254 name: impl ::fidl_next::Encode<
18255 ::fidl_next::wire::Vector<'static, u8>,
18256 <___T as ::fidl_next::Transport>::SendBuffer,
18257 >,
18258 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
18259 where
18260 <___T as ::fidl_next::Transport>::SendBuffer:
18261 ::fidl_next::encoder::InternalHandleEncoder,
18262 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18263 {
18264 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
18265 name,
18266 })
18267 }
18268
18269 #[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"]
18270 pub fn get_extended_attribute_with<___R>(
18271 &self,
18272 request: ___R,
18273 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
18274 where
18275 ___R: ::fidl_next::Encode<
18276 crate::wire::NodeGetExtendedAttributeRequest<'static>,
18277 <___T as ::fidl_next::Transport>::SendBuffer,
18278 >,
18279 {
18280 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18281 5043930208506967771,
18282 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
18283 request,
18284 ))
18285 }
18286
18287 #[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"]
18288 pub fn set_extended_attribute(
18289 &self,
18290
18291 name: impl ::fidl_next::Encode<
18292 ::fidl_next::wire::Vector<'static, u8>,
18293 <___T as ::fidl_next::Transport>::SendBuffer,
18294 >,
18295
18296 value: impl ::fidl_next::Encode<
18297 crate::wire::ExtendedAttributeValue<'static>,
18298 <___T as ::fidl_next::Transport>::SendBuffer,
18299 >,
18300
18301 mode: impl ::fidl_next::Encode<
18302 crate::wire::SetExtendedAttributeMode,
18303 <___T as ::fidl_next::Transport>::SendBuffer,
18304 >,
18305 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
18306 where
18307 <___T as ::fidl_next::Transport>::SendBuffer:
18308 ::fidl_next::encoder::InternalHandleEncoder,
18309 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18310 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18311 {
18312 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
18313 name,
18314
18315 value,
18316
18317 mode,
18318 })
18319 }
18320
18321 #[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"]
18322 pub fn set_extended_attribute_with<___R>(
18323 &self,
18324 request: ___R,
18325 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
18326 where
18327 ___R: ::fidl_next::Encode<
18328 crate::wire::NodeSetExtendedAttributeRequest<'static>,
18329 <___T as ::fidl_next::Transport>::SendBuffer,
18330 >,
18331 {
18332 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18333 5374223046099989052,
18334 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
18335 request,
18336 ))
18337 }
18338
18339 #[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"]
18340 pub fn remove_extended_attribute(
18341 &self,
18342
18343 name: impl ::fidl_next::Encode<
18344 ::fidl_next::wire::Vector<'static, u8>,
18345 <___T as ::fidl_next::Transport>::SendBuffer,
18346 >,
18347 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
18348 where
18349 <___T as ::fidl_next::Transport>::SendBuffer:
18350 ::fidl_next::encoder::InternalHandleEncoder,
18351 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18352 {
18353 self.remove_extended_attribute_with(
18354 crate::generic::NodeRemoveExtendedAttributeRequest { name },
18355 )
18356 }
18357
18358 #[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"]
18359 pub fn remove_extended_attribute_with<___R>(
18360 &self,
18361 request: ___R,
18362 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
18363 where
18364 ___R: ::fidl_next::Encode<
18365 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
18366 <___T as ::fidl_next::Transport>::SendBuffer,
18367 >,
18368 {
18369 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18370 8794297771444732717,
18371 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
18372 request,
18373 ))
18374 }
18375
18376 #[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"]
18377 pub fn open(
18378 &self,
18379
18380 path: impl ::fidl_next::Encode<
18381 ::fidl_next::wire::String<'static>,
18382 <___T as ::fidl_next::Transport>::SendBuffer,
18383 >,
18384
18385 flags: impl ::fidl_next::Encode<
18386 crate::wire::Flags,
18387 <___T as ::fidl_next::Transport>::SendBuffer,
18388 >,
18389
18390 options: impl ::fidl_next::Encode<
18391 crate::wire::Options<'static>,
18392 <___T as ::fidl_next::Transport>::SendBuffer,
18393 >,
18394
18395 object: impl ::fidl_next::Encode<
18396 ::fidl_next::wire::fuchsia::Channel,
18397 <___T as ::fidl_next::Transport>::SendBuffer,
18398 >,
18399 ) -> ::fidl_next::SendFuture<'_, ___T>
18400 where
18401 <___T as ::fidl_next::Transport>::SendBuffer:
18402 ::fidl_next::encoder::InternalHandleEncoder,
18403 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18404 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18405 {
18406 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
18407 }
18408
18409 #[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"]
18410 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
18411 where
18412 ___R: ::fidl_next::Encode<
18413 crate::wire::OpenableOpenRequest<'static>,
18414 <___T as ::fidl_next::Transport>::SendBuffer,
18415 >,
18416 {
18417 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
18418 6236883748953765593,
18419 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
18420 request,
18421 ))
18422 }
18423
18424 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
18425 ::fidl_next::TwoWayFuture::from_untyped(
18426 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18427 8371117097481679347,
18428 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
18429 (),
18430 ),
18431 )
18432 }
18433 }
18434
18435 #[repr(transparent)]
18437 pub struct SymlinkServer<___T: ::fidl_next::Transport> {
18438 server: ::fidl_next::protocol::Server<___T>,
18439 }
18440
18441 impl<___T> SymlinkServer<___T>
18442 where
18443 ___T: ::fidl_next::Transport,
18444 {
18445 #[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"]
18446 pub fn on_open(
18447 &self,
18448
18449 s: impl ::fidl_next::Encode<
18450 ::fidl_next::wire::Int32,
18451 <___T as ::fidl_next::Transport>::SendBuffer,
18452 >,
18453
18454 info: impl ::fidl_next::Encode<
18455 crate::wire_optional::NodeInfoDeprecated<'static>,
18456 <___T as ::fidl_next::Transport>::SendBuffer,
18457 >,
18458 ) -> ::fidl_next::SendFuture<'_, ___T>
18459 where
18460 <___T as ::fidl_next::Transport>::SendBuffer:
18461 ::fidl_next::encoder::InternalHandleEncoder,
18462 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18463 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18464 {
18465 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
18466 }
18467
18468 #[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"]
18469
18470 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
18471 where
18472 ___R: ::fidl_next::Encode<
18473 <super::OnOpen as ::fidl_next::Method>::Request,
18474 <___T as ::fidl_next::Transport>::SendBuffer,
18475 >,
18476 {
18477 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
18478 9207534335756671346,
18479 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
18480 request,
18481 ))
18482 }
18483
18484 #[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"]
18485
18486 pub fn on_representation_with<___R>(
18487 &self,
18488 request: ___R,
18489 ) -> ::fidl_next::SendFuture<'_, ___T>
18490 where
18491 ___R: ::fidl_next::Encode<
18492 <super::OnRepresentation as ::fidl_next::Method>::Request,
18493 <___T as ::fidl_next::Transport>::SendBuffer,
18494 >,
18495 {
18496 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
18497 6679970090861613324,
18498 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
18499 request,
18500 ))
18501 }
18502 }
18503 }
18504}
18505
18506#[diagnostic::on_unimplemented(
18507 note = "If {Self} implements the non-local SymlinkClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18508)]
18509
18510pub trait SymlinkLocalClientHandler<
18514 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18515 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18516>
18517{
18518 #[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"]
18519 fn on_open(
18520 &mut self,
18521
18522 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
18523 ) -> impl ::core::future::Future<Output = ()>;
18524
18525 #[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"]
18526 fn on_representation(
18527 &mut self,
18528
18529 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
18530 ) -> impl ::core::future::Future<Output = ()>;
18531
18532 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
18533 ::core::future::ready(())
18534 }
18535}
18536
18537impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Symlink
18538where
18539 ___H: SymlinkLocalClientHandler<___T>,
18540 ___T: ::fidl_next::Transport,
18541 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
18542 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18543 Constraint = (),
18544 >,
18545 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
18546 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18547 Constraint = (),
18548 >,
18549{
18550 async fn on_event(
18551 handler: &mut ___H,
18552 ordinal: u64,
18553 flexibility: ::fidl_next::protocol::Flexibility,
18554 body: ::fidl_next::Body<___T>,
18555 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18556 match ordinal {
18557 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18558 Ok(decoded) => {
18559 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
18560 Ok(())
18561 }
18562 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18563 ordinal: 9207534335756671346,
18564 error,
18565 }),
18566 },
18567
18568 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18569 Ok(decoded) => {
18570 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
18571 Ok(())
18572 }
18573 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18574 ordinal: 6679970090861613324,
18575 error,
18576 }),
18577 },
18578
18579 ordinal => {
18580 handler.on_unknown_interaction(ordinal).await;
18581 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
18582 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18583 } else {
18584 Ok(())
18585 }
18586 }
18587 }
18588 }
18589}
18590
18591#[diagnostic::on_unimplemented(
18592 note = "If {Self} implements the non-local SymlinkServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18593)]
18594
18595pub trait SymlinkLocalServerHandler<
18599 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18600 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18601>
18602{
18603 #[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"]
18604 fn link_into(
18605 &mut self,
18606
18607 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
18608
18609 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
18610 ) -> impl ::core::future::Future<Output = ()>;
18611
18612 fn clone(
18613 &mut self,
18614
18615 request: ::fidl_next::Request<symlink::Clone, ___T>,
18616 ) -> impl ::core::future::Future<Output = ()>;
18617
18618 #[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"]
18619 fn close(
18620 &mut self,
18621
18622 responder: ::fidl_next::Responder<symlink::Close, ___T>,
18623 ) -> impl ::core::future::Future<Output = ()>;
18624
18625 fn query(
18626 &mut self,
18627
18628 responder: ::fidl_next::Responder<symlink::Query, ___T>,
18629 ) -> impl ::core::future::Future<Output = ()>;
18630
18631 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
18632 fn deprecated_clone(
18633 &mut self,
18634
18635 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
18636 ) -> impl ::core::future::Future<Output = ()>;
18637
18638 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
18639 fn deprecated_get_attr(
18640 &mut self,
18641
18642 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
18643 ) -> impl ::core::future::Future<Output = ()>;
18644
18645 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18646 fn deprecated_set_attr(
18647 &mut self,
18648
18649 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
18650
18651 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
18652 ) -> impl ::core::future::Future<Output = ()>;
18653
18654 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
18655 fn deprecated_get_flags(
18656 &mut self,
18657
18658 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
18659 ) -> impl ::core::future::Future<Output = ()>;
18660
18661 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18662 fn deprecated_set_flags(
18663 &mut self,
18664
18665 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
18666
18667 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
18668 ) -> impl ::core::future::Future<Output = ()>;
18669
18670 #[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"]
18671 fn get_flags(
18672 &mut self,
18673
18674 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
18675 ) -> impl ::core::future::Future<Output = ()>;
18676
18677 #[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"]
18678 fn set_flags(
18679 &mut self,
18680
18681 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
18682
18683 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
18684 ) -> impl ::core::future::Future<Output = ()>;
18685
18686 #[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"]
18687 fn query_filesystem(
18688 &mut self,
18689
18690 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
18691 ) -> impl ::core::future::Future<Output = ()>;
18692
18693 #[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"]
18694 fn get_attributes(
18695 &mut self,
18696
18697 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
18698
18699 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
18700 ) -> impl ::core::future::Future<Output = ()>;
18701
18702 #[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"]
18703 fn update_attributes(
18704 &mut self,
18705
18706 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
18707
18708 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
18709 ) -> impl ::core::future::Future<Output = ()>;
18710
18711 #[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"]
18712 fn sync(
18713 &mut self,
18714
18715 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
18716 ) -> impl ::core::future::Future<Output = ()>;
18717
18718 #[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"]
18719 fn list_extended_attributes(
18720 &mut self,
18721
18722 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
18723 ) -> impl ::core::future::Future<Output = ()>;
18724
18725 #[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"]
18726 fn get_extended_attribute(
18727 &mut self,
18728
18729 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
18730
18731 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
18732 ) -> impl ::core::future::Future<Output = ()>;
18733
18734 #[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"]
18735 fn set_extended_attribute(
18736 &mut self,
18737
18738 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
18739
18740 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
18741 ) -> impl ::core::future::Future<Output = ()>;
18742
18743 #[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"]
18744 fn remove_extended_attribute(
18745 &mut self,
18746
18747 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
18748
18749 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
18750 ) -> impl ::core::future::Future<Output = ()>;
18751
18752 #[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"]
18753 fn open(
18754 &mut self,
18755
18756 request: ::fidl_next::Request<symlink::Open, ___T>,
18757 ) -> impl ::core::future::Future<Output = ()>;
18758
18759 fn describe(
18760 &mut self,
18761
18762 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
18763 ) -> impl ::core::future::Future<Output = ()>;
18764
18765 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
18766 ::core::future::ready(())
18767 }
18768}
18769
18770impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Symlink
18771where
18772 ___H: SymlinkLocalServerHandler<___T>,
18773 ___T: ::fidl_next::Transport,
18774 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
18775 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18776 Constraint = (),
18777 >,
18778 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
18779 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18780 Constraint = (),
18781 >,
18782 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
18783 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18784 Constraint = (),
18785 >,
18786 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
18787 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18788 Constraint = (),
18789 >,
18790 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
18791 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18792 Constraint = (),
18793 >,
18794 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
18795 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18796 Constraint = (),
18797 >,
18798 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
18799 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18800 Constraint = (),
18801 >,
18802 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
18803 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18804 Constraint = (),
18805 >,
18806 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
18807 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18808 Constraint = (),
18809 >,
18810 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18811 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18812 Constraint = (),
18813 >,
18814 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18815 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18816 Constraint = (),
18817 >,
18818 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18819 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18820 Constraint = (),
18821 >,
18822 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
18823 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18824 Constraint = (),
18825 >,
18826{
18827 async fn on_one_way(
18828 handler: &mut ___H,
18829 ordinal: u64,
18830 flexibility: ::fidl_next::protocol::Flexibility,
18831 body: ::fidl_next::Body<___T>,
18832 ) -> ::core::result::Result<
18833 (),
18834 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18835 > {
18836 match ordinal {
18837 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18838 Ok(decoded) => {
18839 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
18840 Ok(())
18841 }
18842 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18843 ordinal: 2366825959783828089,
18844 error,
18845 }),
18846 },
18847
18848 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18849 Ok(decoded) => {
18850 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
18851 Ok(())
18852 }
18853 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18854 ordinal: 6512600400724287855,
18855 error,
18856 }),
18857 },
18858
18859 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18860 Ok(decoded) => {
18861 handler
18862 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
18863 .await;
18864 Ok(())
18865 }
18866 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18867 ordinal: 5431626189872037072,
18868 error,
18869 }),
18870 },
18871
18872 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18873 Ok(decoded) => {
18874 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
18875 Ok(())
18876 }
18877 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18878 ordinal: 6236883748953765593,
18879 error,
18880 }),
18881 },
18882
18883 ordinal => {
18884 handler.on_unknown_interaction(ordinal).await;
18885 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
18886 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18887 } else {
18888 Ok(())
18889 }
18890 }
18891 }
18892 }
18893
18894 async fn on_two_way(
18895 handler: &mut ___H,
18896 ordinal: u64,
18897 flexibility: ::fidl_next::protocol::Flexibility,
18898 body: ::fidl_next::Body<___T>,
18899 responder: ::fidl_next::protocol::Responder<___T>,
18900 ) -> ::core::result::Result<
18901 (),
18902 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18903 > {
18904 match ordinal {
18905 6121399674497678964 => {
18906 let responder = ::fidl_next::Responder::from_untyped(responder);
18907
18908 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18909 Ok(decoded) => {
18910 handler
18911 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
18912 .await;
18913 Ok(())
18914 }
18915 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18916 ordinal: 6121399674497678964,
18917 error,
18918 }),
18919 }
18920 }
18921
18922 6540867515453498750 => {
18923 let responder = ::fidl_next::Responder::from_untyped(responder);
18924
18925 handler.close(responder).await;
18926 Ok(())
18927 }
18928
18929 2763219980499352582 => {
18930 let responder = ::fidl_next::Responder::from_untyped(responder);
18931
18932 handler.query(responder).await;
18933 Ok(())
18934 }
18935
18936 8689798978500614909 => {
18937 let responder = ::fidl_next::Responder::from_untyped(responder);
18938
18939 handler.deprecated_get_attr(responder).await;
18940 Ok(())
18941 }
18942
18943 4721673413776871238 => {
18944 let responder = ::fidl_next::Responder::from_untyped(responder);
18945
18946 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18947 Ok(decoded) => {
18948 handler
18949 .deprecated_set_attr(
18950 ::fidl_next::Request::from_decoded(decoded),
18951 responder,
18952 )
18953 .await;
18954 Ok(())
18955 }
18956 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18957 ordinal: 4721673413776871238,
18958 error,
18959 }),
18960 }
18961 }
18962
18963 6595803110182632097 => {
18964 let responder = ::fidl_next::Responder::from_untyped(responder);
18965
18966 handler.deprecated_get_flags(responder).await;
18967 Ok(())
18968 }
18969
18970 5950864159036794675 => {
18971 let responder = ::fidl_next::Responder::from_untyped(responder);
18972
18973 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18974 Ok(decoded) => {
18975 handler
18976 .deprecated_set_flags(
18977 ::fidl_next::Request::from_decoded(decoded),
18978 responder,
18979 )
18980 .await;
18981 Ok(())
18982 }
18983 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18984 ordinal: 5950864159036794675,
18985 error,
18986 }),
18987 }
18988 }
18989
18990 105530239381466147 => {
18991 let responder = ::fidl_next::Responder::from_untyped(responder);
18992
18993 handler.get_flags(responder).await;
18994 Ok(())
18995 }
18996
18997 6172186066099445416 => {
18998 let responder = ::fidl_next::Responder::from_untyped(responder);
18999
19000 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19001 Ok(decoded) => {
19002 handler
19003 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
19004 .await;
19005 Ok(())
19006 }
19007 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19008 ordinal: 6172186066099445416,
19009 error,
19010 }),
19011 }
19012 }
19013
19014 8013111122914313744 => {
19015 let responder = ::fidl_next::Responder::from_untyped(responder);
19016
19017 handler.query_filesystem(responder).await;
19018 Ok(())
19019 }
19020
19021 4414537700416816443 => {
19022 let responder = ::fidl_next::Responder::from_untyped(responder);
19023
19024 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19025 Ok(decoded) => {
19026 handler
19027 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
19028 .await;
19029 Ok(())
19030 }
19031 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19032 ordinal: 4414537700416816443,
19033 error,
19034 }),
19035 }
19036 }
19037
19038 3677402239314018056 => {
19039 let responder = ::fidl_next::Responder::from_untyped(responder);
19040
19041 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19042 Ok(decoded) => {
19043 handler
19044 .update_attributes(
19045 ::fidl_next::Request::from_decoded(decoded),
19046 responder,
19047 )
19048 .await;
19049 Ok(())
19050 }
19051 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19052 ordinal: 3677402239314018056,
19053 error,
19054 }),
19055 }
19056 }
19057
19058 3196473584242777161 => {
19059 let responder = ::fidl_next::Responder::from_untyped(responder);
19060
19061 handler.sync(responder).await;
19062 Ok(())
19063 }
19064
19065 5043930208506967771 => {
19066 let responder = ::fidl_next::Responder::from_untyped(responder);
19067
19068 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19069 Ok(decoded) => {
19070 handler
19071 .get_extended_attribute(
19072 ::fidl_next::Request::from_decoded(decoded),
19073 responder,
19074 )
19075 .await;
19076 Ok(())
19077 }
19078 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19079 ordinal: 5043930208506967771,
19080 error,
19081 }),
19082 }
19083 }
19084
19085 5374223046099989052 => {
19086 let responder = ::fidl_next::Responder::from_untyped(responder);
19087
19088 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19089 Ok(decoded) => {
19090 handler
19091 .set_extended_attribute(
19092 ::fidl_next::Request::from_decoded(decoded),
19093 responder,
19094 )
19095 .await;
19096 Ok(())
19097 }
19098 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19099 ordinal: 5374223046099989052,
19100 error,
19101 }),
19102 }
19103 }
19104
19105 8794297771444732717 => {
19106 let responder = ::fidl_next::Responder::from_untyped(responder);
19107
19108 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19109 Ok(decoded) => {
19110 handler
19111 .remove_extended_attribute(
19112 ::fidl_next::Request::from_decoded(decoded),
19113 responder,
19114 )
19115 .await;
19116 Ok(())
19117 }
19118 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19119 ordinal: 8794297771444732717,
19120 error,
19121 }),
19122 }
19123 }
19124
19125 8371117097481679347 => {
19126 let responder = ::fidl_next::Responder::from_untyped(responder);
19127
19128 handler.describe(responder).await;
19129 Ok(())
19130 }
19131
19132 ordinal => {
19133 handler.on_unknown_interaction(ordinal).await;
19134 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
19135 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19136 } else {
19137 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
19138 ordinal,
19139 flexibility,
19140 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
19141 )
19142 .expect("encoding a framework error should never fail")
19143 .await?;
19144 Ok(())
19145 }
19146 }
19147 }
19148 }
19149}
19150
19151pub trait SymlinkClientHandler<
19155 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19156 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19157>
19158{
19159 #[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"]
19160 fn on_open(
19161 &mut self,
19162
19163 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
19164 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19165
19166 #[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"]
19167 fn on_representation(
19168 &mut self,
19169
19170 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19171 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19172
19173 fn on_unknown_interaction(
19174 &mut self,
19175 ordinal: u64,
19176 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
19177 ::core::future::ready(())
19178 }
19179}
19180
19181impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Symlink
19182where
19183 ___H: SymlinkClientHandler<___T> + ::core::marker::Send,
19184 ___T: ::fidl_next::Transport,
19185 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
19186 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19187 Constraint = (),
19188 >,
19189 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
19190 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19191 Constraint = (),
19192 >,
19193{
19194 async fn on_event(
19195 handler: &mut ___H,
19196 ordinal: u64,
19197 flexibility: ::fidl_next::protocol::Flexibility,
19198 body: ::fidl_next::Body<___T>,
19199 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
19200 match ordinal {
19201 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
19202 Ok(decoded) => {
19203 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
19204 Ok(())
19205 }
19206 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19207 ordinal: 9207534335756671346,
19208 error,
19209 }),
19210 },
19211
19212 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
19213 Ok(decoded) => {
19214 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
19215 Ok(())
19216 }
19217 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19218 ordinal: 6679970090861613324,
19219 error,
19220 }),
19221 },
19222
19223 ordinal => {
19224 handler.on_unknown_interaction(ordinal).await;
19225 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
19226 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19227 } else {
19228 Ok(())
19229 }
19230 }
19231 }
19232 }
19233}
19234
19235pub trait SymlinkServerHandler<
19239 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19240 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19241>
19242{
19243 #[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"]
19244 fn link_into(
19245 &mut self,
19246
19247 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
19248
19249 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
19250 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19251
19252 fn clone(
19253 &mut self,
19254
19255 request: ::fidl_next::Request<symlink::Clone, ___T>,
19256 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19257
19258 #[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"]
19259 fn close(
19260 &mut self,
19261
19262 responder: ::fidl_next::Responder<symlink::Close, ___T>,
19263 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19264
19265 fn query(
19266 &mut self,
19267
19268 responder: ::fidl_next::Responder<symlink::Query, ___T>,
19269 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19270
19271 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
19272 fn deprecated_clone(
19273 &mut self,
19274
19275 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
19276 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19277
19278 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
19279 fn deprecated_get_attr(
19280 &mut self,
19281
19282 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
19283 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19284
19285 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
19286 fn deprecated_set_attr(
19287 &mut self,
19288
19289 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
19290
19291 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
19292 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19293
19294 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
19295 fn deprecated_get_flags(
19296 &mut self,
19297
19298 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
19299 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19300
19301 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
19302 fn deprecated_set_flags(
19303 &mut self,
19304
19305 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
19306
19307 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
19308 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19309
19310 #[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"]
19311 fn get_flags(
19312 &mut self,
19313
19314 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
19315 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19316
19317 #[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"]
19318 fn set_flags(
19319 &mut self,
19320
19321 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
19322
19323 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
19324 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19325
19326 #[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"]
19327 fn query_filesystem(
19328 &mut self,
19329
19330 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
19331 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19332
19333 #[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"]
19334 fn get_attributes(
19335 &mut self,
19336
19337 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
19338
19339 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
19340 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19341
19342 #[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"]
19343 fn update_attributes(
19344 &mut self,
19345
19346 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
19347
19348 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
19349 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19350
19351 #[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"]
19352 fn sync(
19353 &mut self,
19354
19355 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
19356 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19357
19358 #[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"]
19359 fn list_extended_attributes(
19360 &mut self,
19361
19362 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
19363 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19364
19365 #[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"]
19366 fn get_extended_attribute(
19367 &mut self,
19368
19369 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
19370
19371 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
19372 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19373
19374 #[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"]
19375 fn set_extended_attribute(
19376 &mut self,
19377
19378 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
19379
19380 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
19381 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19382
19383 #[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"]
19384 fn remove_extended_attribute(
19385 &mut self,
19386
19387 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
19388
19389 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
19390 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19391
19392 #[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"]
19393 fn open(
19394 &mut self,
19395
19396 request: ::fidl_next::Request<symlink::Open, ___T>,
19397 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19398
19399 fn describe(
19400 &mut self,
19401
19402 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
19403 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19404
19405 fn on_unknown_interaction(
19406 &mut self,
19407 ordinal: u64,
19408 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
19409 ::core::future::ready(())
19410 }
19411}
19412
19413impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Symlink
19414where
19415 ___H: SymlinkServerHandler<___T> + ::core::marker::Send,
19416 ___T: ::fidl_next::Transport,
19417 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
19418 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19419 Constraint = (),
19420 >,
19421 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
19422 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19423 Constraint = (),
19424 >,
19425 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
19426 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19427 Constraint = (),
19428 >,
19429 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
19430 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19431 Constraint = (),
19432 >,
19433 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
19434 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19435 Constraint = (),
19436 >,
19437 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
19438 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19439 Constraint = (),
19440 >,
19441 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
19442 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19443 Constraint = (),
19444 >,
19445 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
19446 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19447 Constraint = (),
19448 >,
19449 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
19450 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19451 Constraint = (),
19452 >,
19453 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19454 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19455 Constraint = (),
19456 >,
19457 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19458 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19459 Constraint = (),
19460 >,
19461 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19462 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19463 Constraint = (),
19464 >,
19465 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
19466 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19467 Constraint = (),
19468 >,
19469{
19470 async fn on_one_way(
19471 handler: &mut ___H,
19472 ordinal: u64,
19473 flexibility: ::fidl_next::protocol::Flexibility,
19474 body: ::fidl_next::Body<___T>,
19475 ) -> ::core::result::Result<
19476 (),
19477 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19478 > {
19479 match ordinal {
19480 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
19481 Ok(decoded) => {
19482 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
19483 Ok(())
19484 }
19485 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19486 ordinal: 2366825959783828089,
19487 error,
19488 }),
19489 },
19490
19491 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
19492 Ok(decoded) => {
19493 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
19494 Ok(())
19495 }
19496 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19497 ordinal: 6512600400724287855,
19498 error,
19499 }),
19500 },
19501
19502 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
19503 Ok(decoded) => {
19504 handler
19505 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
19506 .await;
19507 Ok(())
19508 }
19509 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19510 ordinal: 5431626189872037072,
19511 error,
19512 }),
19513 },
19514
19515 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
19516 Ok(decoded) => {
19517 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
19518 Ok(())
19519 }
19520 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19521 ordinal: 6236883748953765593,
19522 error,
19523 }),
19524 },
19525
19526 ordinal => {
19527 handler.on_unknown_interaction(ordinal).await;
19528 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
19529 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19530 } else {
19531 Ok(())
19532 }
19533 }
19534 }
19535 }
19536
19537 async fn on_two_way(
19538 handler: &mut ___H,
19539 ordinal: u64,
19540 flexibility: ::fidl_next::protocol::Flexibility,
19541 body: ::fidl_next::Body<___T>,
19542 responder: ::fidl_next::protocol::Responder<___T>,
19543 ) -> ::core::result::Result<
19544 (),
19545 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19546 > {
19547 match ordinal {
19548 6121399674497678964 => {
19549 let responder = ::fidl_next::Responder::from_untyped(responder);
19550
19551 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19552 Ok(decoded) => {
19553 handler
19554 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
19555 .await;
19556 Ok(())
19557 }
19558 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19559 ordinal: 6121399674497678964,
19560 error,
19561 }),
19562 }
19563 }
19564
19565 6540867515453498750 => {
19566 let responder = ::fidl_next::Responder::from_untyped(responder);
19567
19568 handler.close(responder).await;
19569 Ok(())
19570 }
19571
19572 2763219980499352582 => {
19573 let responder = ::fidl_next::Responder::from_untyped(responder);
19574
19575 handler.query(responder).await;
19576 Ok(())
19577 }
19578
19579 8689798978500614909 => {
19580 let responder = ::fidl_next::Responder::from_untyped(responder);
19581
19582 handler.deprecated_get_attr(responder).await;
19583 Ok(())
19584 }
19585
19586 4721673413776871238 => {
19587 let responder = ::fidl_next::Responder::from_untyped(responder);
19588
19589 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19590 Ok(decoded) => {
19591 handler
19592 .deprecated_set_attr(
19593 ::fidl_next::Request::from_decoded(decoded),
19594 responder,
19595 )
19596 .await;
19597 Ok(())
19598 }
19599 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19600 ordinal: 4721673413776871238,
19601 error,
19602 }),
19603 }
19604 }
19605
19606 6595803110182632097 => {
19607 let responder = ::fidl_next::Responder::from_untyped(responder);
19608
19609 handler.deprecated_get_flags(responder).await;
19610 Ok(())
19611 }
19612
19613 5950864159036794675 => {
19614 let responder = ::fidl_next::Responder::from_untyped(responder);
19615
19616 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19617 Ok(decoded) => {
19618 handler
19619 .deprecated_set_flags(
19620 ::fidl_next::Request::from_decoded(decoded),
19621 responder,
19622 )
19623 .await;
19624 Ok(())
19625 }
19626 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19627 ordinal: 5950864159036794675,
19628 error,
19629 }),
19630 }
19631 }
19632
19633 105530239381466147 => {
19634 let responder = ::fidl_next::Responder::from_untyped(responder);
19635
19636 handler.get_flags(responder).await;
19637 Ok(())
19638 }
19639
19640 6172186066099445416 => {
19641 let responder = ::fidl_next::Responder::from_untyped(responder);
19642
19643 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19644 Ok(decoded) => {
19645 handler
19646 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
19647 .await;
19648 Ok(())
19649 }
19650 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19651 ordinal: 6172186066099445416,
19652 error,
19653 }),
19654 }
19655 }
19656
19657 8013111122914313744 => {
19658 let responder = ::fidl_next::Responder::from_untyped(responder);
19659
19660 handler.query_filesystem(responder).await;
19661 Ok(())
19662 }
19663
19664 4414537700416816443 => {
19665 let responder = ::fidl_next::Responder::from_untyped(responder);
19666
19667 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19668 Ok(decoded) => {
19669 handler
19670 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
19671 .await;
19672 Ok(())
19673 }
19674 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19675 ordinal: 4414537700416816443,
19676 error,
19677 }),
19678 }
19679 }
19680
19681 3677402239314018056 => {
19682 let responder = ::fidl_next::Responder::from_untyped(responder);
19683
19684 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19685 Ok(decoded) => {
19686 handler
19687 .update_attributes(
19688 ::fidl_next::Request::from_decoded(decoded),
19689 responder,
19690 )
19691 .await;
19692 Ok(())
19693 }
19694 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19695 ordinal: 3677402239314018056,
19696 error,
19697 }),
19698 }
19699 }
19700
19701 3196473584242777161 => {
19702 let responder = ::fidl_next::Responder::from_untyped(responder);
19703
19704 handler.sync(responder).await;
19705 Ok(())
19706 }
19707
19708 5043930208506967771 => {
19709 let responder = ::fidl_next::Responder::from_untyped(responder);
19710
19711 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19712 Ok(decoded) => {
19713 handler
19714 .get_extended_attribute(
19715 ::fidl_next::Request::from_decoded(decoded),
19716 responder,
19717 )
19718 .await;
19719 Ok(())
19720 }
19721 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19722 ordinal: 5043930208506967771,
19723 error,
19724 }),
19725 }
19726 }
19727
19728 5374223046099989052 => {
19729 let responder = ::fidl_next::Responder::from_untyped(responder);
19730
19731 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19732 Ok(decoded) => {
19733 handler
19734 .set_extended_attribute(
19735 ::fidl_next::Request::from_decoded(decoded),
19736 responder,
19737 )
19738 .await;
19739 Ok(())
19740 }
19741 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19742 ordinal: 5374223046099989052,
19743 error,
19744 }),
19745 }
19746 }
19747
19748 8794297771444732717 => {
19749 let responder = ::fidl_next::Responder::from_untyped(responder);
19750
19751 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19752 Ok(decoded) => {
19753 handler
19754 .remove_extended_attribute(
19755 ::fidl_next::Request::from_decoded(decoded),
19756 responder,
19757 )
19758 .await;
19759 Ok(())
19760 }
19761 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19762 ordinal: 8794297771444732717,
19763 error,
19764 }),
19765 }
19766 }
19767
19768 8371117097481679347 => {
19769 let responder = ::fidl_next::Responder::from_untyped(responder);
19770
19771 handler.describe(responder).await;
19772 Ok(())
19773 }
19774
19775 ordinal => {
19776 handler.on_unknown_interaction(ordinal).await;
19777 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
19778 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19779 } else {
19780 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
19781 ordinal,
19782 flexibility,
19783 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
19784 )
19785 .expect("encoding a framework error should never fail")
19786 .await?;
19787 Ok(())
19788 }
19789 }
19790 }
19791 }
19792}
19793
19794impl<___T> SymlinkClientHandler<___T> for ::fidl_next::IgnoreEvents
19795where
19796 ___T: ::fidl_next::Transport,
19797{
19798 async fn on_open(&mut self, _: ::fidl_next::Request<symlink::OnOpen, ___T>) {}
19799
19800 async fn on_representation(
19801 &mut self,
19802
19803 _: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19804 ) {
19805 }
19806
19807 async fn on_unknown_interaction(&mut self, _: u64) {}
19808}
19809
19810impl<___H, ___T> SymlinkLocalClientHandler<___T> for ::fidl_next::Local<___H>
19811where
19812 ___H: SymlinkClientHandler<___T>,
19813 ___T: ::fidl_next::Transport,
19814{
19815 async fn on_open(&mut self, request: ::fidl_next::Request<symlink::OnOpen, ___T>) {
19816 ___H::on_open(&mut self.0, request).await
19817 }
19818
19819 async fn on_representation(
19820 &mut self,
19821
19822 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19823 ) {
19824 ___H::on_representation(&mut self.0, request).await
19825 }
19826
19827 async fn on_unknown_interaction(&mut self, ordinal: u64) {
19828 ___H::on_unknown_interaction(&mut self.0, ordinal).await
19829 }
19830}
19831
19832impl<___H, ___T> SymlinkLocalServerHandler<___T> for ::fidl_next::Local<___H>
19833where
19834 ___H: SymlinkServerHandler<___T>,
19835 ___T: ::fidl_next::Transport,
19836{
19837 async fn link_into(
19838 &mut self,
19839
19840 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
19841
19842 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
19843 ) {
19844 ___H::link_into(&mut self.0, request, responder).await
19845 }
19846
19847 async fn clone(&mut self, request: ::fidl_next::Request<symlink::Clone, ___T>) {
19848 ___H::clone(&mut self.0, request).await
19849 }
19850
19851 async fn close(&mut self, responder: ::fidl_next::Responder<symlink::Close, ___T>) {
19852 ___H::close(&mut self.0, responder).await
19853 }
19854
19855 async fn query(&mut self, responder: ::fidl_next::Responder<symlink::Query, ___T>) {
19856 ___H::query(&mut self.0, responder).await
19857 }
19858
19859 async fn deprecated_clone(
19860 &mut self,
19861
19862 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
19863 ) {
19864 ___H::deprecated_clone(&mut self.0, request).await
19865 }
19866
19867 async fn deprecated_get_attr(
19868 &mut self,
19869
19870 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
19871 ) {
19872 ___H::deprecated_get_attr(&mut self.0, responder).await
19873 }
19874
19875 async fn deprecated_set_attr(
19876 &mut self,
19877
19878 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
19879
19880 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
19881 ) {
19882 ___H::deprecated_set_attr(&mut self.0, request, responder).await
19883 }
19884
19885 async fn deprecated_get_flags(
19886 &mut self,
19887
19888 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
19889 ) {
19890 ___H::deprecated_get_flags(&mut self.0, responder).await
19891 }
19892
19893 async fn deprecated_set_flags(
19894 &mut self,
19895
19896 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
19897
19898 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
19899 ) {
19900 ___H::deprecated_set_flags(&mut self.0, request, responder).await
19901 }
19902
19903 async fn get_flags(&mut self, responder: ::fidl_next::Responder<symlink::GetFlags, ___T>) {
19904 ___H::get_flags(&mut self.0, responder).await
19905 }
19906
19907 async fn set_flags(
19908 &mut self,
19909
19910 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
19911
19912 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
19913 ) {
19914 ___H::set_flags(&mut self.0, request, responder).await
19915 }
19916
19917 async fn query_filesystem(
19918 &mut self,
19919
19920 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
19921 ) {
19922 ___H::query_filesystem(&mut self.0, responder).await
19923 }
19924
19925 async fn get_attributes(
19926 &mut self,
19927
19928 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
19929
19930 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
19931 ) {
19932 ___H::get_attributes(&mut self.0, request, responder).await
19933 }
19934
19935 async fn update_attributes(
19936 &mut self,
19937
19938 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
19939
19940 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
19941 ) {
19942 ___H::update_attributes(&mut self.0, request, responder).await
19943 }
19944
19945 async fn sync(&mut self, responder: ::fidl_next::Responder<symlink::Sync, ___T>) {
19946 ___H::sync(&mut self.0, responder).await
19947 }
19948
19949 async fn list_extended_attributes(
19950 &mut self,
19951
19952 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
19953 ) {
19954 ___H::list_extended_attributes(&mut self.0, request).await
19955 }
19956
19957 async fn get_extended_attribute(
19958 &mut self,
19959
19960 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
19961
19962 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
19963 ) {
19964 ___H::get_extended_attribute(&mut self.0, request, responder).await
19965 }
19966
19967 async fn set_extended_attribute(
19968 &mut self,
19969
19970 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
19971
19972 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
19973 ) {
19974 ___H::set_extended_attribute(&mut self.0, request, responder).await
19975 }
19976
19977 async fn remove_extended_attribute(
19978 &mut self,
19979
19980 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
19981
19982 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
19983 ) {
19984 ___H::remove_extended_attribute(&mut self.0, request, responder).await
19985 }
19986
19987 async fn open(&mut self, request: ::fidl_next::Request<symlink::Open, ___T>) {
19988 ___H::open(&mut self.0, request).await
19989 }
19990
19991 async fn describe(&mut self, responder: ::fidl_next::Responder<symlink::Describe, ___T>) {
19992 ___H::describe(&mut self.0, responder).await
19993 }
19994
19995 async fn on_unknown_interaction(&mut self, ordinal: u64) {
19996 ___H::on_unknown_interaction(&mut self.0, ordinal).await
19997 }
19998}
19999
20000pub use fidl_next_common_fuchsia_io::*;