1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_fuchsia_io::natural::*;
8
9 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10 pub struct ConnectionInfo {
11 pub rights: ::core::option::Option<crate::natural::Operations>,
12 }
13
14 impl ConnectionInfo {
15 fn __max_ordinal(&self) -> usize {
16 if self.rights.is_some() {
17 return 1;
18 }
19
20 0
21 }
22 }
23
24 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ConnectionInfo<'static>, ___E> for ConnectionInfo
25 where
26 ___E: ::fidl_next::Encoder + ?Sized,
27 ___E: ::fidl_next::fuchsia::HandleEncoder,
28 {
29 #[inline]
30 fn encode(
31 mut self,
32 encoder: &mut ___E,
33 out: &mut ::core::mem::MaybeUninit<crate::wire::ConnectionInfo<'static>>,
34 _: (),
35 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
36 ::fidl_next::munge!(let crate::wire::ConnectionInfo { table } = out);
37
38 let max_ord = self.__max_ordinal();
39
40 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
41 ::fidl_next::Wire::zero_padding(&mut out);
42
43 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
44 ::fidl_next::wire::Envelope,
45 >(encoder, max_ord);
46
47 for i in 1..=max_ord {
48 match i {
49 1 => {
50 if let Some(value) = self.rights.take() {
51 ::fidl_next::wire::Envelope::encode_value::<
52 crate::wire::Operations,
53 ___E,
54 >(
55 value, preallocated.encoder, &mut out, ()
56 )?;
57 } else {
58 ::fidl_next::wire::Envelope::encode_zero(&mut out)
59 }
60 }
61
62 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
63 }
64 unsafe {
65 preallocated.write_next(out.assume_init_ref());
66 }
67 }
68
69 ::fidl_next::wire::Table::encode_len(table, max_ord);
70
71 Ok(())
72 }
73 }
74
75 impl<'de> ::fidl_next::FromWire<crate::wire::ConnectionInfo<'de>> for ConnectionInfo {
76 #[inline]
77 fn from_wire(wire_: crate::wire::ConnectionInfo<'de>) -> Self {
78 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
79
80 let rights = wire_.table.get(1);
81
82 Self {
83 rights: rights.map(|envelope| {
84 ::fidl_next::FromWire::from_wire(unsafe {
85 envelope.read_unchecked::<crate::wire::Operations>()
86 })
87 }),
88 }
89 }
90 }
91
92 #[derive(Debug, PartialEq)]
93 #[repr(C)]
94 pub struct DirectoryGetTokenResponse {
95 pub s: i32,
96
97 pub token: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
98 }
99
100 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>
101 for DirectoryGetTokenResponse
102 where
103 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
104 ___E: ::fidl_next::fuchsia::HandleEncoder,
105 {
106 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
107 Self,
108 crate::wire::DirectoryGetTokenResponse,
109 > = unsafe {
110 ::fidl_next::CopyOptimization::enable_if(
111 true
112
113 && <
114 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
115 >::COPY_OPTIMIZATION.is_enabled()
116
117 && <
118 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
119 >::COPY_OPTIMIZATION.is_enabled()
120
121 )
122 };
123
124 #[inline]
125 fn encode(
126 self,
127 encoder_: &mut ___E,
128 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryGetTokenResponse>,
129 _: (),
130 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
131 ::fidl_next::munge! {
132 let crate::wire::DirectoryGetTokenResponse {
133 s,
134 token,
135
136 } = out_;
137 }
138
139 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
140
141 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
142
143 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
144
145 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
146
147 Ok(())
148 }
149 }
150
151 unsafe impl<___E>
152 ::fidl_next::EncodeOption<
153 ::fidl_next::wire::Box<'static, crate::wire::DirectoryGetTokenResponse>,
154 ___E,
155 > for DirectoryGetTokenResponse
156 where
157 ___E: ::fidl_next::Encoder + ?Sized,
158 DirectoryGetTokenResponse:
159 ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>,
160 {
161 #[inline]
162 fn encode_option(
163 this: ::core::option::Option<Self>,
164 encoder: &mut ___E,
165 out: &mut ::core::mem::MaybeUninit<
166 ::fidl_next::wire::Box<'static, crate::wire::DirectoryGetTokenResponse>,
167 >,
168 _: (),
169 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
170 if let Some(inner) = this {
171 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
172 ::fidl_next::wire::Box::encode_present(out);
173 } else {
174 ::fidl_next::wire::Box::encode_absent(out);
175 }
176
177 Ok(())
178 }
179 }
180
181 impl ::fidl_next::FromWire<crate::wire::DirectoryGetTokenResponse> for DirectoryGetTokenResponse {
182 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
183 crate::wire::DirectoryGetTokenResponse,
184 Self,
185 > = unsafe {
186 ::fidl_next::CopyOptimization::enable_if(
187 true
188
189 && <
190 i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>
191 >::COPY_OPTIMIZATION.is_enabled()
192
193 && <
194 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
195 >::COPY_OPTIMIZATION.is_enabled()
196
197 )
198 };
199
200 #[inline]
201 fn from_wire(wire: crate::wire::DirectoryGetTokenResponse) -> Self {
202 Self {
203 s: ::fidl_next::FromWire::from_wire(wire.s),
204
205 token: ::fidl_next::FromWire::from_wire(wire.token),
206 }
207 }
208 }
209
210 #[derive(Debug, PartialEq)]
211 pub struct DirectoryLinkRequest {
212 pub src: ::std::string::String,
213
214 pub dst_parent_token: ::fidl_next::fuchsia::zx::NullableHandle,
215
216 pub dst: ::std::string::String,
217 }
218
219 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
220 for DirectoryLinkRequest
221 where
222 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
223 ___E: ::fidl_next::Encoder,
224 ___E: ::fidl_next::fuchsia::HandleEncoder,
225 {
226 #[inline]
227 fn encode(
228 self,
229 encoder_: &mut ___E,
230 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
231 _: (),
232 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
233 ::fidl_next::munge! {
234 let crate::wire::DirectoryLinkRequest {
235 src,
236 dst_parent_token,
237 dst,
238
239 } = out_;
240 }
241
242 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
243
244 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(src.as_mut_ptr()) };
245 ::fidl_next::Constrained::validate(_field, 255)?;
246
247 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
248
249 let mut _field =
250 unsafe { ::fidl_next::Slot::new_unchecked(dst_parent_token.as_mut_ptr()) };
251
252 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
253
254 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dst.as_mut_ptr()) };
255 ::fidl_next::Constrained::validate(_field, 255)?;
256
257 Ok(())
258 }
259 }
260
261 unsafe impl<___E>
262 ::fidl_next::EncodeOption<
263 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkRequest<'static>>,
264 ___E,
265 > for DirectoryLinkRequest
266 where
267 ___E: ::fidl_next::Encoder + ?Sized,
268 DirectoryLinkRequest: ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>,
269 {
270 #[inline]
271 fn encode_option(
272 this: ::core::option::Option<Self>,
273 encoder: &mut ___E,
274 out: &mut ::core::mem::MaybeUninit<
275 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkRequest<'static>>,
276 >,
277 _: (),
278 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
279 if let Some(inner) = this {
280 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
281 ::fidl_next::wire::Box::encode_present(out);
282 } else {
283 ::fidl_next::wire::Box::encode_absent(out);
284 }
285
286 Ok(())
287 }
288 }
289
290 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryLinkRequest<'de>> for DirectoryLinkRequest {
291 #[inline]
292 fn from_wire(wire: crate::wire::DirectoryLinkRequest<'de>) -> Self {
293 Self {
294 src: ::fidl_next::FromWire::from_wire(wire.src),
295
296 dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
297
298 dst: ::fidl_next::FromWire::from_wire(wire.dst),
299 }
300 }
301 }
302
303 #[doc = " The type to identify a connection to a node.\n It represents a capability: a reference to a node with associated rights.\n"]
304 pub type Token = ::fidl_next::fuchsia::zx::Event;
305
306 #[derive(Debug, PartialEq)]
307 pub struct DirectoryRenameRequest {
308 pub src: ::std::string::String,
309
310 pub dst_parent_token: ::fidl_next::fuchsia::zx::Event,
311
312 pub dst: ::std::string::String,
313 }
314
315 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
316 for DirectoryRenameRequest
317 where
318 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
319 ___E: ::fidl_next::Encoder,
320 ___E: ::fidl_next::fuchsia::HandleEncoder,
321 {
322 #[inline]
323 fn encode(
324 self,
325 encoder_: &mut ___E,
326 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
327 _: (),
328 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
329 ::fidl_next::munge! {
330 let crate::wire::DirectoryRenameRequest {
331 src,
332 dst_parent_token,
333 dst,
334
335 } = out_;
336 }
337
338 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
339
340 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(src.as_mut_ptr()) };
341 ::fidl_next::Constrained::validate(_field, 255)?;
342
343 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
344
345 let mut _field =
346 unsafe { ::fidl_next::Slot::new_unchecked(dst_parent_token.as_mut_ptr()) };
347
348 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
349
350 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dst.as_mut_ptr()) };
351 ::fidl_next::Constrained::validate(_field, 255)?;
352
353 Ok(())
354 }
355 }
356
357 unsafe impl<___E>
358 ::fidl_next::EncodeOption<
359 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRenameRequest<'static>>,
360 ___E,
361 > for DirectoryRenameRequest
362 where
363 ___E: ::fidl_next::Encoder + ?Sized,
364 DirectoryRenameRequest:
365 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>,
366 {
367 #[inline]
368 fn encode_option(
369 this: ::core::option::Option<Self>,
370 encoder: &mut ___E,
371 out: &mut ::core::mem::MaybeUninit<
372 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRenameRequest<'static>>,
373 >,
374 _: (),
375 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
376 if let Some(inner) = this {
377 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
378 ::fidl_next::wire::Box::encode_present(out);
379 } else {
380 ::fidl_next::wire::Box::encode_absent(out);
381 }
382
383 Ok(())
384 }
385 }
386
387 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryRenameRequest<'de>>
388 for DirectoryRenameRequest
389 {
390 #[inline]
391 fn from_wire(wire: crate::wire::DirectoryRenameRequest<'de>) -> Self {
392 Self {
393 src: ::fidl_next::FromWire::from_wire(wire.src),
394
395 dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
396
397 dst: ::fidl_next::FromWire::from_wire(wire.dst),
398 }
399 }
400 }
401
402 #[derive(Debug, PartialEq)]
403 #[repr(C)]
404 pub struct DirectoryWatchRequest {
405 pub mask: crate::natural::WatchMask,
406
407 pub options: u32,
408
409 pub watcher:
410 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::fuchsia::zx::Channel>,
411 }
412
413 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
414 for DirectoryWatchRequest
415 where
416 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
417 ___E: ::fidl_next::fuchsia::HandleEncoder,
418 {
419 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
420 Self,
421 crate::wire::DirectoryWatchRequest,
422 > = unsafe {
423 ::fidl_next::CopyOptimization::enable_if(
424 true
425
426 && <
427 crate::natural::WatchMask as ::fidl_next::Encode<crate::wire::WatchMask, ___E>
428 >::COPY_OPTIMIZATION.is_enabled()
429
430 && <
431 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
432 >::COPY_OPTIMIZATION.is_enabled()
433
434 && <
435 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::wire::fuchsia::Channel>, ___E>
436 >::COPY_OPTIMIZATION.is_enabled()
437
438 )
439 };
440
441 #[inline]
442 fn encode(
443 self,
444 encoder_: &mut ___E,
445 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
446 _: (),
447 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
448 ::fidl_next::munge! {
449 let crate::wire::DirectoryWatchRequest {
450 mask,
451 options,
452 watcher,
453
454 } = out_;
455 }
456
457 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
458
459 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mask.as_mut_ptr()) };
460
461 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
462
463 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
464
465 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
466
467 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(watcher.as_mut_ptr()) };
468
469 Ok(())
470 }
471 }
472
473 unsafe impl<___E>
474 ::fidl_next::EncodeOption<
475 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchRequest>,
476 ___E,
477 > for DirectoryWatchRequest
478 where
479 ___E: ::fidl_next::Encoder + ?Sized,
480 DirectoryWatchRequest: ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>,
481 {
482 #[inline]
483 fn encode_option(
484 this: ::core::option::Option<Self>,
485 encoder: &mut ___E,
486 out: &mut ::core::mem::MaybeUninit<
487 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchRequest>,
488 >,
489 _: (),
490 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
491 if let Some(inner) = this {
492 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
493 ::fidl_next::wire::Box::encode_present(out);
494 } else {
495 ::fidl_next::wire::Box::encode_absent(out);
496 }
497
498 Ok(())
499 }
500 }
501
502 impl ::fidl_next::FromWire<crate::wire::DirectoryWatchRequest> for DirectoryWatchRequest {
503 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
504 crate::wire::DirectoryWatchRequest,
505 Self,
506 > = unsafe {
507 ::fidl_next::CopyOptimization::enable_if(
508 true && <crate::natural::WatchMask as ::fidl_next::FromWire<
509 crate::wire::WatchMask,
510 >>::COPY_OPTIMIZATION
511 .is_enabled()
512 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
513 .is_enabled()
514 && <::fidl_next::ServerEnd<
515 crate::DirectoryWatcher,
516 ::fidl_next::fuchsia::zx::Channel,
517 > as ::fidl_next::FromWire<
518 ::fidl_next::ServerEnd<
519 crate::DirectoryWatcher,
520 ::fidl_next::wire::fuchsia::Channel,
521 >,
522 >>::COPY_OPTIMIZATION
523 .is_enabled(),
524 )
525 };
526
527 #[inline]
528 fn from_wire(wire: crate::wire::DirectoryWatchRequest) -> Self {
529 Self {
530 mask: ::fidl_next::FromWire::from_wire(wire.mask),
531
532 options: ::fidl_next::FromWire::from_wire(wire.options),
533
534 watcher: ::fidl_next::FromWire::from_wire(wire.watcher),
535 }
536 }
537 }
538
539 #[derive(Debug, PartialEq)]
540 pub struct NodeOnOpenRequest {
541 pub s: i32,
542
543 pub info: ::core::option::Option<::std::boxed::Box<crate::natural::NodeInfoDeprecated>>,
544 }
545
546 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
547 for NodeOnOpenRequest
548 where
549 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
550 ___E: ::fidl_next::Encoder,
551 ___E: ::fidl_next::fuchsia::HandleEncoder,
552 {
553 #[inline]
554 fn encode(
555 self,
556 encoder_: &mut ___E,
557 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
558 _: (),
559 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
560 ::fidl_next::munge! {
561 let crate::wire::NodeOnOpenRequest {
562 s,
563 info,
564
565 } = out_;
566 }
567
568 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
569
570 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
571
572 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
573
574 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
575
576 Ok(())
577 }
578 }
579
580 unsafe impl<___E>
581 ::fidl_next::EncodeOption<
582 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
583 ___E,
584 > for NodeOnOpenRequest
585 where
586 ___E: ::fidl_next::Encoder + ?Sized,
587 NodeOnOpenRequest: ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>,
588 {
589 #[inline]
590 fn encode_option(
591 this: ::core::option::Option<Self>,
592 encoder: &mut ___E,
593 out: &mut ::core::mem::MaybeUninit<
594 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
595 >,
596 _: (),
597 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
598 if let Some(inner) = this {
599 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
600 ::fidl_next::wire::Box::encode_present(out);
601 } else {
602 ::fidl_next::wire::Box::encode_absent(out);
603 }
604
605 Ok(())
606 }
607 }
608
609 impl<'de> ::fidl_next::FromWire<crate::wire::NodeOnOpenRequest<'de>> for NodeOnOpenRequest {
610 #[inline]
611 fn from_wire(wire: crate::wire::NodeOnOpenRequest<'de>) -> Self {
612 Self {
613 s: ::fidl_next::FromWire::from_wire(wire.s),
614
615 info: ::fidl_next::FromWire::from_wire(wire.info),
616 }
617 }
618 }
619
620 #[derive(Debug, PartialEq)]
621 #[repr(C)]
622 pub struct NodeListExtendedAttributesRequest {
623 pub iterator: ::fidl_next::ServerEnd<
624 crate::ExtendedAttributeIterator,
625 ::fidl_next::fuchsia::zx::Channel,
626 >,
627 }
628
629 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
630 for NodeListExtendedAttributesRequest
631 where
632 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
633 ___E: ::fidl_next::fuchsia::HandleEncoder,
634 {
635 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
636 Self,
637 crate::wire::NodeListExtendedAttributesRequest,
638 > = unsafe {
639 ::fidl_next::CopyOptimization::enable_if(
640 true && <::fidl_next::ServerEnd<
641 crate::ExtendedAttributeIterator,
642 ::fidl_next::fuchsia::zx::Channel,
643 > as ::fidl_next::Encode<
644 ::fidl_next::ServerEnd<
645 crate::ExtendedAttributeIterator,
646 ::fidl_next::wire::fuchsia::Channel,
647 >,
648 ___E,
649 >>::COPY_OPTIMIZATION
650 .is_enabled(),
651 )
652 };
653
654 #[inline]
655 fn encode(
656 self,
657 encoder_: &mut ___E,
658 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
659 _: (),
660 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
661 ::fidl_next::munge! {
662 let crate::wire::NodeListExtendedAttributesRequest {
663 iterator,
664
665 } = out_;
666 }
667
668 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
669
670 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
671
672 Ok(())
673 }
674 }
675
676 unsafe impl<___E>
677 ::fidl_next::EncodeOption<
678 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
679 ___E,
680 > for NodeListExtendedAttributesRequest
681 where
682 ___E: ::fidl_next::Encoder + ?Sized,
683 NodeListExtendedAttributesRequest:
684 ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>,
685 {
686 #[inline]
687 fn encode_option(
688 this: ::core::option::Option<Self>,
689 encoder: &mut ___E,
690 out: &mut ::core::mem::MaybeUninit<
691 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
692 >,
693 _: (),
694 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
695 if let Some(inner) = this {
696 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
697 ::fidl_next::wire::Box::encode_present(out);
698 } else {
699 ::fidl_next::wire::Box::encode_absent(out);
700 }
701
702 Ok(())
703 }
704 }
705
706 impl ::fidl_next::FromWire<crate::wire::NodeListExtendedAttributesRequest>
707 for NodeListExtendedAttributesRequest
708 {
709 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
710 crate::wire::NodeListExtendedAttributesRequest,
711 Self,
712 > = unsafe {
713 ::fidl_next::CopyOptimization::enable_if(
714 true && <::fidl_next::ServerEnd<
715 crate::ExtendedAttributeIterator,
716 ::fidl_next::fuchsia::zx::Channel,
717 > as ::fidl_next::FromWire<
718 ::fidl_next::ServerEnd<
719 crate::ExtendedAttributeIterator,
720 ::fidl_next::wire::fuchsia::Channel,
721 >,
722 >>::COPY_OPTIMIZATION
723 .is_enabled(),
724 )
725 };
726
727 #[inline]
728 fn from_wire(wire: crate::wire::NodeListExtendedAttributesRequest) -> Self {
729 Self { iterator: ::fidl_next::FromWire::from_wire(wire.iterator) }
730 }
731 }
732
733 #[doc = " The value type for an extended attribute. If the value is less than 32768\n bytes, then it is included inline. Values larger than this size are written\n into a vmo buffer.\n"]
734 #[derive(Debug, PartialEq)]
735 pub enum ExtendedAttributeValue {
736 Bytes(::std::vec::Vec<u8>),
737
738 Buffer(::fidl_next::fuchsia::zx::Vmo),
739
740 UnknownOrdinal_(u64),
741 }
742
743 impl ExtendedAttributeValue {
744 pub fn is_unknown(&self) -> bool {
745 #[allow(unreachable_patterns)]
746 match self {
747 Self::UnknownOrdinal_(_) => true,
748 _ => false,
749 }
750 }
751 }
752
753 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>
754 for ExtendedAttributeValue
755 where
756 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
757 ___E: ::fidl_next::Encoder,
758 ___E: ::fidl_next::fuchsia::HandleEncoder,
759 {
760 #[inline]
761 fn encode(
762 self,
763 encoder: &mut ___E,
764 out: &mut ::core::mem::MaybeUninit<crate::wire::ExtendedAttributeValue<'static>>,
765 _: (),
766 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
767 ::fidl_next::munge!(let crate::wire::ExtendedAttributeValue { raw, _phantom: _ } = out);
768
769 match self {
770 Self::Bytes(value) => ::fidl_next::wire::Union::encode_as::<
771 ___E,
772 ::fidl_next::wire::Vector<'static, u8>,
773 >(value, 1, encoder, raw, (32768, ()))?,
774
775 Self::Buffer(value) => ::fidl_next::wire::Union::encode_as::<
776 ___E,
777 ::fidl_next::wire::fuchsia::Vmo,
778 >(value, 2, encoder, raw, ())?,
779
780 Self::UnknownOrdinal_(ordinal) => {
781 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
782 }
783 }
784
785 Ok(())
786 }
787 }
788
789 unsafe impl<___E>
790 ::fidl_next::EncodeOption<crate::wire_optional::ExtendedAttributeValue<'static>, ___E>
791 for ExtendedAttributeValue
792 where
793 ___E: ?Sized,
794 ExtendedAttributeValue:
795 ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
796 {
797 #[inline]
798 fn encode_option(
799 this: ::core::option::Option<Self>,
800 encoder: &mut ___E,
801 out: &mut ::core::mem::MaybeUninit<
802 crate::wire_optional::ExtendedAttributeValue<'static>,
803 >,
804 _: (),
805 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
806 ::fidl_next::munge!(let crate::wire_optional::ExtendedAttributeValue { raw, _phantom: _ } = &mut *out);
807
808 if let Some(inner) = this {
809 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
810 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
811 } else {
812 ::fidl_next::wire::Union::encode_absent(raw);
813 }
814
815 Ok(())
816 }
817 }
818
819 impl<'de> ::fidl_next::FromWire<crate::wire::ExtendedAttributeValue<'de>>
820 for ExtendedAttributeValue
821 {
822 #[inline]
823 fn from_wire(wire: crate::wire::ExtendedAttributeValue<'de>) -> Self {
824 let wire = ::core::mem::ManuallyDrop::new(wire);
825 match wire.raw.ordinal() {
826 1 => Self::Bytes(::fidl_next::FromWire::from_wire(unsafe {
827 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
828 })),
829
830 2 => Self::Buffer(::fidl_next::FromWire::from_wire(unsafe {
831 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
832 })),
833
834 ord => return Self::UnknownOrdinal_(ord as u64),
835 }
836 }
837 }
838
839 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
840 for ExtendedAttributeValue
841 {
842 #[inline]
843 fn from_wire_option(
844 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
845 ) -> ::core::option::Option<Self> {
846 if let Some(inner) = wire.into_option() {
847 Some(::fidl_next::FromWire::from_wire(inner))
848 } else {
849 None
850 }
851 }
852 }
853
854 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
855 for Box<ExtendedAttributeValue>
856 {
857 #[inline]
858 fn from_wire_option(
859 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
860 ) -> ::core::option::Option<Self> {
861 <ExtendedAttributeValue as ::fidl_next::FromWireOption<
862 crate::wire_optional::ExtendedAttributeValue<'de>,
863 >>::from_wire_option(wire)
864 .map(Box::new)
865 }
866 }
867
868 #[derive(Debug, PartialEq)]
869 pub struct NodeSetExtendedAttributeRequest {
870 pub name: ::std::vec::Vec<u8>,
871
872 pub value: crate::natural::ExtendedAttributeValue,
873
874 pub mode: crate::natural::SetExtendedAttributeMode,
875 }
876
877 unsafe impl<___E>
878 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
879 for NodeSetExtendedAttributeRequest
880 where
881 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
882 ___E: ::fidl_next::Encoder,
883 ___E: ::fidl_next::fuchsia::HandleEncoder,
884 {
885 #[inline]
886 fn encode(
887 self,
888 encoder_: &mut ___E,
889 out_: &mut ::core::mem::MaybeUninit<
890 crate::wire::NodeSetExtendedAttributeRequest<'static>,
891 >,
892 _: (),
893 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
894 ::fidl_next::munge! {
895 let crate::wire::NodeSetExtendedAttributeRequest {
896 name,
897 value,
898 mode,
899
900 } = out_;
901 }
902
903 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
904
905 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
906 ::fidl_next::Constrained::validate(_field, (255, ()))?;
907
908 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
909
910 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
911
912 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
913
914 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
915
916 Ok(())
917 }
918 }
919
920 unsafe impl<___E>
921 ::fidl_next::EncodeOption<
922 ::fidl_next::wire::Box<'static, crate::wire::NodeSetExtendedAttributeRequest<'static>>,
923 ___E,
924 > for NodeSetExtendedAttributeRequest
925 where
926 ___E: ::fidl_next::Encoder + ?Sized,
927 NodeSetExtendedAttributeRequest:
928 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>,
929 {
930 #[inline]
931 fn encode_option(
932 this: ::core::option::Option<Self>,
933 encoder: &mut ___E,
934 out: &mut ::core::mem::MaybeUninit<
935 ::fidl_next::wire::Box<
936 'static,
937 crate::wire::NodeSetExtendedAttributeRequest<'static>,
938 >,
939 >,
940 _: (),
941 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
942 if let Some(inner) = this {
943 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
944 ::fidl_next::wire::Box::encode_present(out);
945 } else {
946 ::fidl_next::wire::Box::encode_absent(out);
947 }
948
949 Ok(())
950 }
951 }
952
953 impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetExtendedAttributeRequest<'de>>
954 for NodeSetExtendedAttributeRequest
955 {
956 #[inline]
957 fn from_wire(wire: crate::wire::NodeSetExtendedAttributeRequest<'de>) -> Self {
958 Self {
959 name: ::fidl_next::FromWire::from_wire(wire.name),
960
961 value: ::fidl_next::FromWire::from_wire(wire.value),
962
963 mode: ::fidl_next::FromWire::from_wire(wire.mode),
964 }
965 }
966 }
967
968 #[doc = " Auxiliary data for the file representation of a node.\n"]
969 #[derive(Debug, Default, PartialEq)]
970 pub struct FileInfo {
971 pub is_append: ::core::option::Option<bool>,
972
973 pub observer: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
974
975 pub stream: ::core::option::Option<::fidl_next::fuchsia::zx::Stream>,
976
977 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
978 }
979
980 impl FileInfo {
981 fn __max_ordinal(&self) -> usize {
982 if self.attributes.is_some() {
983 return 4;
984 }
985
986 if self.stream.is_some() {
987 return 3;
988 }
989
990 if self.observer.is_some() {
991 return 2;
992 }
993
994 if self.is_append.is_some() {
995 return 1;
996 }
997
998 0
999 }
1000 }
1001
1002 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileInfo<'static>, ___E> for FileInfo
1003 where
1004 ___E: ::fidl_next::Encoder + ?Sized,
1005 ___E: ::fidl_next::fuchsia::HandleEncoder,
1006 {
1007 #[inline]
1008 fn encode(
1009 mut self,
1010 encoder: &mut ___E,
1011 out: &mut ::core::mem::MaybeUninit<crate::wire::FileInfo<'static>>,
1012 _: (),
1013 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1014 ::fidl_next::munge!(let crate::wire::FileInfo { table } = out);
1015
1016 let max_ord = self.__max_ordinal();
1017
1018 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1019 ::fidl_next::Wire::zero_padding(&mut out);
1020
1021 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1022 ::fidl_next::wire::Envelope,
1023 >(encoder, max_ord);
1024
1025 for i in 1..=max_ord {
1026 match i {
1027 4 => {
1028 if let Some(value) = self.attributes.take() {
1029 ::fidl_next::wire::Envelope::encode_value::<
1030 crate::wire::NodeAttributes2<'static>,
1031 ___E,
1032 >(
1033 value, preallocated.encoder, &mut out, ()
1034 )?;
1035 } else {
1036 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1037 }
1038 }
1039
1040 3 => {
1041 if let Some(value) = self.stream.take() {
1042 ::fidl_next::wire::Envelope::encode_value::<
1043 ::fidl_next::wire::fuchsia::Stream,
1044 ___E,
1045 >(
1046 value, preallocated.encoder, &mut out, ()
1047 )?;
1048 } else {
1049 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1050 }
1051 }
1052
1053 2 => {
1054 if let Some(value) = self.observer.take() {
1055 ::fidl_next::wire::Envelope::encode_value::<
1056 ::fidl_next::wire::fuchsia::Event,
1057 ___E,
1058 >(
1059 value, preallocated.encoder, &mut out, ()
1060 )?;
1061 } else {
1062 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1063 }
1064 }
1065
1066 1 => {
1067 if let Some(value) = self.is_append.take() {
1068 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1069 value,
1070 preallocated.encoder,
1071 &mut out,
1072 (),
1073 )?;
1074 } else {
1075 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1076 }
1077 }
1078
1079 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1080 }
1081 unsafe {
1082 preallocated.write_next(out.assume_init_ref());
1083 }
1084 }
1085
1086 ::fidl_next::wire::Table::encode_len(table, max_ord);
1087
1088 Ok(())
1089 }
1090 }
1091
1092 impl<'de> ::fidl_next::FromWire<crate::wire::FileInfo<'de>> for FileInfo {
1093 #[inline]
1094 fn from_wire(wire_: crate::wire::FileInfo<'de>) -> Self {
1095 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1096
1097 let is_append = wire_.table.get(1);
1098
1099 let observer = wire_.table.get(2);
1100
1101 let stream = wire_.table.get(3);
1102
1103 let attributes = wire_.table.get(4);
1104
1105 Self {
1106 is_append: is_append.map(|envelope| {
1107 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1108 }),
1109
1110 observer: observer.map(|envelope| {
1111 ::fidl_next::FromWire::from_wire(unsafe {
1112 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
1113 })
1114 }),
1115
1116 stream: stream.map(|envelope| {
1117 ::fidl_next::FromWire::from_wire(unsafe {
1118 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Stream>()
1119 })
1120 }),
1121
1122 attributes: attributes.map(|envelope| {
1123 ::fidl_next::FromWire::from_wire(unsafe {
1124 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
1125 })
1126 }),
1127 }
1128 }
1129 }
1130
1131 #[derive(Debug, PartialEq)]
1132 pub enum Representation {
1133 Node(crate::natural::NodeInfo),
1134
1135 Directory(crate::natural::DirectoryInfo),
1136
1137 File(crate::natural::FileInfo),
1138
1139 Symlink(crate::natural::SymlinkInfo),
1140
1141 UnknownOrdinal_(u64),
1142 }
1143
1144 impl Representation {
1145 pub fn is_unknown(&self) -> bool {
1146 #[allow(unreachable_patterns)]
1147 match self {
1148 Self::UnknownOrdinal_(_) => true,
1149 _ => false,
1150 }
1151 }
1152 }
1153
1154 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Representation<'static>, ___E> for Representation
1155 where
1156 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1157 ___E: ::fidl_next::Encoder,
1158 ___E: ::fidl_next::fuchsia::HandleEncoder,
1159 {
1160 #[inline]
1161 fn encode(
1162 self,
1163 encoder: &mut ___E,
1164 out: &mut ::core::mem::MaybeUninit<crate::wire::Representation<'static>>,
1165 _: (),
1166 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1167 ::fidl_next::munge!(let crate::wire::Representation { raw, _phantom: _ } = out);
1168
1169 match self {
1170 Self::Node(value) => ::fidl_next::wire::Union::encode_as::<
1171 ___E,
1172 crate::wire::NodeInfo<'static>,
1173 >(value, 1, encoder, raw, ())?,
1174
1175 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
1176 ___E,
1177 crate::wire::DirectoryInfo<'static>,
1178 >(value, 2, encoder, raw, ())?,
1179
1180 Self::File(value) => ::fidl_next::wire::Union::encode_as::<
1181 ___E,
1182 crate::wire::FileInfo<'static>,
1183 >(value, 3, encoder, raw, ())?,
1184
1185 Self::Symlink(value) => ::fidl_next::wire::Union::encode_as::<
1186 ___E,
1187 crate::wire::SymlinkInfo<'static>,
1188 >(value, 4, encoder, raw, ())?,
1189
1190 Self::UnknownOrdinal_(ordinal) => {
1191 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1192 }
1193 }
1194
1195 Ok(())
1196 }
1197 }
1198
1199 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Representation<'static>, ___E>
1200 for Representation
1201 where
1202 ___E: ?Sized,
1203 Representation: ::fidl_next::Encode<crate::wire::Representation<'static>, ___E>,
1204 {
1205 #[inline]
1206 fn encode_option(
1207 this: ::core::option::Option<Self>,
1208 encoder: &mut ___E,
1209 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Representation<'static>>,
1210 _: (),
1211 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1212 ::fidl_next::munge!(let crate::wire_optional::Representation { raw, _phantom: _ } = &mut *out);
1213
1214 if let Some(inner) = this {
1215 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1216 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1217 } else {
1218 ::fidl_next::wire::Union::encode_absent(raw);
1219 }
1220
1221 Ok(())
1222 }
1223 }
1224
1225 impl<'de> ::fidl_next::FromWire<crate::wire::Representation<'de>> for Representation {
1226 #[inline]
1227 fn from_wire(wire: crate::wire::Representation<'de>) -> Self {
1228 let wire = ::core::mem::ManuallyDrop::new(wire);
1229 match wire.raw.ordinal() {
1230 1 => Self::Node(::fidl_next::FromWire::from_wire(unsafe {
1231 wire.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>()
1232 })),
1233
1234 2 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
1235 wire.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
1236 })),
1237
1238 3 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
1239 wire.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>()
1240 })),
1241
1242 4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
1243 wire.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>()
1244 })),
1245
1246 ord => return Self::UnknownOrdinal_(ord as u64),
1247 }
1248 }
1249 }
1250
1251 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1252 for Representation
1253 {
1254 #[inline]
1255 fn from_wire_option(
1256 wire: crate::wire_optional::Representation<'de>,
1257 ) -> ::core::option::Option<Self> {
1258 if let Some(inner) = wire.into_option() {
1259 Some(::fidl_next::FromWire::from_wire(inner))
1260 } else {
1261 None
1262 }
1263 }
1264 }
1265
1266 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1267 for Box<Representation>
1268 {
1269 #[inline]
1270 fn from_wire_option(
1271 wire: crate::wire_optional::Representation<'de>,
1272 ) -> ::core::option::Option<Self> {
1273 <Representation as ::fidl_next::FromWireOption<
1274 crate::wire_optional::Representation<'de>,
1275 >>::from_wire_option(wire)
1276 .map(Box::new)
1277 }
1278 }
1279
1280 #[derive(Debug, PartialEq)]
1281 pub struct DirectoryOpenRequest {
1282 pub path: ::std::string::String,
1283
1284 pub flags: crate::natural::Flags,
1285
1286 pub options: crate::natural::Options,
1287
1288 pub object: ::fidl_next::fuchsia::zx::Channel,
1289 }
1290
1291 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryOpenRequest<'static>, ___E>
1292 for DirectoryOpenRequest
1293 where
1294 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1295 ___E: ::fidl_next::Encoder,
1296 ___E: ::fidl_next::fuchsia::HandleEncoder,
1297 {
1298 #[inline]
1299 fn encode(
1300 self,
1301 encoder_: &mut ___E,
1302 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryOpenRequest<'static>>,
1303 _: (),
1304 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1305 ::fidl_next::munge! {
1306 let crate::wire::DirectoryOpenRequest {
1307 path,
1308 flags,
1309 options,
1310 object,
1311
1312 } = out_;
1313 }
1314
1315 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
1316
1317 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
1318 ::fidl_next::Constrained::validate(_field, 4095)?;
1319
1320 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1321
1322 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1323
1324 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
1325
1326 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
1327
1328 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1329
1330 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1331
1332 Ok(())
1333 }
1334 }
1335
1336 unsafe impl<___E>
1337 ::fidl_next::EncodeOption<
1338 ::fidl_next::wire::Box<'static, crate::wire::DirectoryOpenRequest<'static>>,
1339 ___E,
1340 > for DirectoryOpenRequest
1341 where
1342 ___E: ::fidl_next::Encoder + ?Sized,
1343 DirectoryOpenRequest: ::fidl_next::Encode<crate::wire::DirectoryOpenRequest<'static>, ___E>,
1344 {
1345 #[inline]
1346 fn encode_option(
1347 this: ::core::option::Option<Self>,
1348 encoder: &mut ___E,
1349 out: &mut ::core::mem::MaybeUninit<
1350 ::fidl_next::wire::Box<'static, crate::wire::DirectoryOpenRequest<'static>>,
1351 >,
1352 _: (),
1353 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1354 if let Some(inner) = this {
1355 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1356 ::fidl_next::wire::Box::encode_present(out);
1357 } else {
1358 ::fidl_next::wire::Box::encode_absent(out);
1359 }
1360
1361 Ok(())
1362 }
1363 }
1364
1365 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryOpenRequest<'de>> for DirectoryOpenRequest {
1366 #[inline]
1367 fn from_wire(wire: crate::wire::DirectoryOpenRequest<'de>) -> Self {
1368 Self {
1369 path: ::fidl_next::FromWire::from_wire(wire.path),
1370
1371 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1372
1373 options: ::fidl_next::FromWire::from_wire(wire.options),
1374
1375 object: ::fidl_next::FromWire::from_wire(wire.object),
1376 }
1377 }
1378 }
1379
1380 #[derive(Debug, PartialEq)]
1381 #[repr(C)]
1382 pub struct NodeDeprecatedCloneRequest {
1383 pub flags: crate::natural::OpenFlags,
1384
1385 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1386 }
1387
1388 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
1389 for NodeDeprecatedCloneRequest
1390 where
1391 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1392 ___E: ::fidl_next::fuchsia::HandleEncoder,
1393 {
1394 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1395 Self,
1396 crate::wire::NodeDeprecatedCloneRequest,
1397 > = unsafe {
1398 ::fidl_next::CopyOptimization::enable_if(
1399 true
1400
1401 && <
1402 crate::natural::OpenFlags as ::fidl_next::Encode<crate::wire::OpenFlags, ___E>
1403 >::COPY_OPTIMIZATION.is_enabled()
1404
1405 && <
1406 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>, ___E>
1407 >::COPY_OPTIMIZATION.is_enabled()
1408
1409 )
1410 };
1411
1412 #[inline]
1413 fn encode(
1414 self,
1415 encoder_: &mut ___E,
1416 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
1417 _: (),
1418 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1419 ::fidl_next::munge! {
1420 let crate::wire::NodeDeprecatedCloneRequest {
1421 flags,
1422 object,
1423
1424 } = out_;
1425 }
1426
1427 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1428
1429 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1430
1431 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1432
1433 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1434
1435 Ok(())
1436 }
1437 }
1438
1439 unsafe impl<___E>
1440 ::fidl_next::EncodeOption<
1441 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1442 ___E,
1443 > for NodeDeprecatedCloneRequest
1444 where
1445 ___E: ::fidl_next::Encoder + ?Sized,
1446 NodeDeprecatedCloneRequest:
1447 ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>,
1448 {
1449 #[inline]
1450 fn encode_option(
1451 this: ::core::option::Option<Self>,
1452 encoder: &mut ___E,
1453 out: &mut ::core::mem::MaybeUninit<
1454 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1455 >,
1456 _: (),
1457 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1458 if let Some(inner) = this {
1459 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1460 ::fidl_next::wire::Box::encode_present(out);
1461 } else {
1462 ::fidl_next::wire::Box::encode_absent(out);
1463 }
1464
1465 Ok(())
1466 }
1467 }
1468
1469 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedCloneRequest> for NodeDeprecatedCloneRequest {
1470 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1471 crate::wire::NodeDeprecatedCloneRequest,
1472 Self,
1473 > = unsafe {
1474 ::fidl_next::CopyOptimization::enable_if(
1475 true
1476
1477 && <
1478 crate::natural::OpenFlags as ::fidl_next::FromWire<crate::wire::OpenFlags>
1479 >::COPY_OPTIMIZATION.is_enabled()
1480
1481 && <
1482 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>>
1483 >::COPY_OPTIMIZATION.is_enabled()
1484
1485 )
1486 };
1487
1488 #[inline]
1489 fn from_wire(wire: crate::wire::NodeDeprecatedCloneRequest) -> Self {
1490 Self {
1491 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1492
1493 object: ::fidl_next::FromWire::from_wire(wire.object),
1494 }
1495 }
1496 }
1497
1498 #[derive(Debug, PartialEq)]
1499 pub struct DirectoryDeprecatedOpenRequest {
1500 pub flags: crate::natural::OpenFlags,
1501
1502 pub mode: crate::natural::ModeType,
1503
1504 pub path: ::std::string::String,
1505
1506 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1507 }
1508
1509 unsafe impl<___E>
1510 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
1511 for DirectoryDeprecatedOpenRequest
1512 where
1513 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1514 ___E: ::fidl_next::Encoder,
1515 ___E: ::fidl_next::fuchsia::HandleEncoder,
1516 {
1517 #[inline]
1518 fn encode(
1519 self,
1520 encoder_: &mut ___E,
1521 out_: &mut ::core::mem::MaybeUninit<
1522 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
1523 >,
1524 _: (),
1525 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1526 ::fidl_next::munge! {
1527 let crate::wire::DirectoryDeprecatedOpenRequest {
1528 flags,
1529 mode,
1530 path,
1531 object,
1532
1533 } = out_;
1534 }
1535
1536 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1537
1538 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1539
1540 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
1541
1542 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1543
1544 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
1545
1546 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
1547 ::fidl_next::Constrained::validate(_field, 4095)?;
1548
1549 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1550
1551 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1552
1553 Ok(())
1554 }
1555 }
1556
1557 unsafe impl<___E>
1558 ::fidl_next::EncodeOption<
1559 ::fidl_next::wire::Box<'static, crate::wire::DirectoryDeprecatedOpenRequest<'static>>,
1560 ___E,
1561 > for DirectoryDeprecatedOpenRequest
1562 where
1563 ___E: ::fidl_next::Encoder + ?Sized,
1564 DirectoryDeprecatedOpenRequest:
1565 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>,
1566 {
1567 #[inline]
1568 fn encode_option(
1569 this: ::core::option::Option<Self>,
1570 encoder: &mut ___E,
1571 out: &mut ::core::mem::MaybeUninit<
1572 ::fidl_next::wire::Box<
1573 'static,
1574 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
1575 >,
1576 >,
1577 _: (),
1578 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1579 if let Some(inner) = this {
1580 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1581 ::fidl_next::wire::Box::encode_present(out);
1582 } else {
1583 ::fidl_next::wire::Box::encode_absent(out);
1584 }
1585
1586 Ok(())
1587 }
1588 }
1589
1590 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryDeprecatedOpenRequest<'de>>
1591 for DirectoryDeprecatedOpenRequest
1592 {
1593 #[inline]
1594 fn from_wire(wire: crate::wire::DirectoryDeprecatedOpenRequest<'de>) -> Self {
1595 Self {
1596 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1597
1598 mode: ::fidl_next::FromWire::from_wire(wire.mode),
1599
1600 path: ::fidl_next::FromWire::from_wire(wire.path),
1601
1602 object: ::fidl_next::FromWire::from_wire(wire.object),
1603 }
1604 }
1605 }
1606
1607 #[derive(Debug, PartialEq)]
1608 pub struct DirectoryCreateSymlinkRequest {
1609 pub name: ::std::string::String,
1610
1611 pub target: ::std::vec::Vec<u8>,
1612
1613 pub connection: ::core::option::Option<
1614 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::fuchsia::zx::Channel>,
1615 >,
1616 }
1617
1618 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
1619 for DirectoryCreateSymlinkRequest
1620 where
1621 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1622 ___E: ::fidl_next::Encoder,
1623 ___E: ::fidl_next::fuchsia::HandleEncoder,
1624 {
1625 #[inline]
1626 fn encode(
1627 self,
1628 encoder_: &mut ___E,
1629 out_: &mut ::core::mem::MaybeUninit<
1630 crate::wire::DirectoryCreateSymlinkRequest<'static>,
1631 >,
1632 _: (),
1633 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1634 ::fidl_next::munge! {
1635 let crate::wire::DirectoryCreateSymlinkRequest {
1636 name,
1637 target,
1638 connection,
1639
1640 } = out_;
1641 }
1642
1643 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
1644
1645 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
1646 ::fidl_next::Constrained::validate(_field, 255)?;
1647
1648 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
1649
1650 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
1651 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
1652
1653 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
1654
1655 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(connection.as_mut_ptr()) };
1656
1657 Ok(())
1658 }
1659 }
1660
1661 unsafe impl<___E>
1662 ::fidl_next::EncodeOption<
1663 ::fidl_next::wire::Box<'static, crate::wire::DirectoryCreateSymlinkRequest<'static>>,
1664 ___E,
1665 > for DirectoryCreateSymlinkRequest
1666 where
1667 ___E: ::fidl_next::Encoder + ?Sized,
1668 DirectoryCreateSymlinkRequest:
1669 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>,
1670 {
1671 #[inline]
1672 fn encode_option(
1673 this: ::core::option::Option<Self>,
1674 encoder: &mut ___E,
1675 out: &mut ::core::mem::MaybeUninit<
1676 ::fidl_next::wire::Box<
1677 'static,
1678 crate::wire::DirectoryCreateSymlinkRequest<'static>,
1679 >,
1680 >,
1681 _: (),
1682 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1683 if let Some(inner) = this {
1684 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1685 ::fidl_next::wire::Box::encode_present(out);
1686 } else {
1687 ::fidl_next::wire::Box::encode_absent(out);
1688 }
1689
1690 Ok(())
1691 }
1692 }
1693
1694 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryCreateSymlinkRequest<'de>>
1695 for DirectoryCreateSymlinkRequest
1696 {
1697 #[inline]
1698 fn from_wire(wire: crate::wire::DirectoryCreateSymlinkRequest<'de>) -> Self {
1699 Self {
1700 name: ::fidl_next::FromWire::from_wire(wire.name),
1701
1702 target: ::fidl_next::FromWire::from_wire(wire.target),
1703
1704 connection: ::fidl_next::FromWire::from_wire(wire.connection),
1705 }
1706 }
1707 }
1708
1709 #[derive(Debug, PartialEq)]
1710 #[repr(C)]
1711 pub struct FileGetBackingMemoryResponse {
1712 pub vmo: ::fidl_next::fuchsia::zx::Vmo,
1713 }
1714
1715 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
1716 for FileGetBackingMemoryResponse
1717 where
1718 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1719 ___E: ::fidl_next::fuchsia::HandleEncoder,
1720 {
1721 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1722 Self,
1723 crate::wire::FileGetBackingMemoryResponse,
1724 > = unsafe {
1725 ::fidl_next::CopyOptimization::enable_if(
1726 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::Encode<
1727 ::fidl_next::wire::fuchsia::Vmo,
1728 ___E,
1729 >>::COPY_OPTIMIZATION
1730 .is_enabled(),
1731 )
1732 };
1733
1734 #[inline]
1735 fn encode(
1736 self,
1737 encoder_: &mut ___E,
1738 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
1739 _: (),
1740 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1741 ::fidl_next::munge! {
1742 let crate::wire::FileGetBackingMemoryResponse {
1743 vmo,
1744
1745 } = out_;
1746 }
1747
1748 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
1749
1750 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo.as_mut_ptr()) };
1751
1752 Ok(())
1753 }
1754 }
1755
1756 unsafe impl<___E>
1757 ::fidl_next::EncodeOption<
1758 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryResponse>,
1759 ___E,
1760 > for FileGetBackingMemoryResponse
1761 where
1762 ___E: ::fidl_next::Encoder + ?Sized,
1763 FileGetBackingMemoryResponse:
1764 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>,
1765 {
1766 #[inline]
1767 fn encode_option(
1768 this: ::core::option::Option<Self>,
1769 encoder: &mut ___E,
1770 out: &mut ::core::mem::MaybeUninit<
1771 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryResponse>,
1772 >,
1773 _: (),
1774 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1775 if let Some(inner) = this {
1776 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1777 ::fidl_next::wire::Box::encode_present(out);
1778 } else {
1779 ::fidl_next::wire::Box::encode_absent(out);
1780 }
1781
1782 Ok(())
1783 }
1784 }
1785
1786 impl ::fidl_next::FromWire<crate::wire::FileGetBackingMemoryResponse>
1787 for FileGetBackingMemoryResponse
1788 {
1789 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1790 crate::wire::FileGetBackingMemoryResponse,
1791 Self,
1792 > = unsafe {
1793 ::fidl_next::CopyOptimization::enable_if(
1794 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::FromWire<
1795 ::fidl_next::wire::fuchsia::Vmo,
1796 >>::COPY_OPTIMIZATION
1797 .is_enabled(),
1798 )
1799 };
1800
1801 #[inline]
1802 fn from_wire(wire: crate::wire::FileGetBackingMemoryResponse) -> Self {
1803 Self { vmo: ::fidl_next::FromWire::from_wire(wire.vmo) }
1804 }
1805 }
1806
1807 #[derive(Debug, PartialEq)]
1808 pub struct LinkableLinkIntoRequest {
1809 pub dst_parent_token: ::fidl_next::fuchsia::zx::Event,
1810
1811 pub dst: ::std::string::String,
1812 }
1813
1814 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
1815 for LinkableLinkIntoRequest
1816 where
1817 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1818 ___E: ::fidl_next::Encoder,
1819 ___E: ::fidl_next::fuchsia::HandleEncoder,
1820 {
1821 #[inline]
1822 fn encode(
1823 self,
1824 encoder_: &mut ___E,
1825 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
1826 _: (),
1827 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1828 ::fidl_next::munge! {
1829 let crate::wire::LinkableLinkIntoRequest {
1830 dst_parent_token,
1831 dst,
1832
1833 } = out_;
1834 }
1835
1836 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
1837
1838 let mut _field =
1839 unsafe { ::fidl_next::Slot::new_unchecked(dst_parent_token.as_mut_ptr()) };
1840
1841 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
1842
1843 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dst.as_mut_ptr()) };
1844 ::fidl_next::Constrained::validate(_field, 255)?;
1845
1846 Ok(())
1847 }
1848 }
1849
1850 unsafe impl<___E>
1851 ::fidl_next::EncodeOption<
1852 ::fidl_next::wire::Box<'static, crate::wire::LinkableLinkIntoRequest<'static>>,
1853 ___E,
1854 > for LinkableLinkIntoRequest
1855 where
1856 ___E: ::fidl_next::Encoder + ?Sized,
1857 LinkableLinkIntoRequest:
1858 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>,
1859 {
1860 #[inline]
1861 fn encode_option(
1862 this: ::core::option::Option<Self>,
1863 encoder: &mut ___E,
1864 out: &mut ::core::mem::MaybeUninit<
1865 ::fidl_next::wire::Box<'static, crate::wire::LinkableLinkIntoRequest<'static>>,
1866 >,
1867 _: (),
1868 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1869 if let Some(inner) = this {
1870 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1871 ::fidl_next::wire::Box::encode_present(out);
1872 } else {
1873 ::fidl_next::wire::Box::encode_absent(out);
1874 }
1875
1876 Ok(())
1877 }
1878 }
1879
1880 impl<'de> ::fidl_next::FromWire<crate::wire::LinkableLinkIntoRequest<'de>>
1881 for LinkableLinkIntoRequest
1882 {
1883 #[inline]
1884 fn from_wire(wire: crate::wire::LinkableLinkIntoRequest<'de>) -> Self {
1885 Self {
1886 dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
1887
1888 dst: ::fidl_next::FromWire::from_wire(wire.dst),
1889 }
1890 }
1891 }
1892
1893 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1894 pub struct FileAllocateRequest {
1895 pub offset: u64,
1896
1897 pub length: u64,
1898
1899 pub mode: crate::natural::AllocateMode,
1900 }
1901
1902 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
1903 for FileAllocateRequest
1904 where
1905 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1906 ___E: ::fidl_next::fuchsia::HandleEncoder,
1907 {
1908 #[inline]
1909 fn encode(
1910 self,
1911 encoder_: &mut ___E,
1912 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
1913 _: (),
1914 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1915 ::fidl_next::munge! {
1916 let crate::wire::FileAllocateRequest {
1917 offset,
1918 length,
1919 mode,
1920
1921 } = out_;
1922 }
1923
1924 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
1925
1926 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
1927
1928 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
1929
1930 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
1931
1932 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
1933
1934 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1935
1936 Ok(())
1937 }
1938 }
1939
1940 unsafe impl<___E>
1941 ::fidl_next::EncodeOption<
1942 ::fidl_next::wire::Box<'static, crate::wire::FileAllocateRequest>,
1943 ___E,
1944 > for FileAllocateRequest
1945 where
1946 ___E: ::fidl_next::Encoder + ?Sized,
1947 FileAllocateRequest: ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>,
1948 {
1949 #[inline]
1950 fn encode_option(
1951 this: ::core::option::Option<Self>,
1952 encoder: &mut ___E,
1953 out: &mut ::core::mem::MaybeUninit<
1954 ::fidl_next::wire::Box<'static, crate::wire::FileAllocateRequest>,
1955 >,
1956 _: (),
1957 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1958 if let Some(inner) = this {
1959 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1960 ::fidl_next::wire::Box::encode_present(out);
1961 } else {
1962 ::fidl_next::wire::Box::encode_absent(out);
1963 }
1964
1965 Ok(())
1966 }
1967 }
1968
1969 impl ::fidl_next::FromWire<crate::wire::FileAllocateRequest> for FileAllocateRequest {
1970 #[inline]
1971 fn from_wire(wire: crate::wire::FileAllocateRequest) -> Self {
1972 Self {
1973 offset: ::fidl_next::FromWire::from_wire(wire.offset),
1974
1975 length: ::fidl_next::FromWire::from_wire(wire.length),
1976
1977 mode: ::fidl_next::FromWire::from_wire(wire.mode),
1978 }
1979 }
1980 }
1981
1982 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1983 pub struct FileEnableVerityRequest {
1984 pub options: crate::natural::VerificationOptions,
1985 }
1986
1987 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
1988 for FileEnableVerityRequest
1989 where
1990 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1991 ___E: ::fidl_next::Encoder,
1992 ___E: ::fidl_next::fuchsia::HandleEncoder,
1993 {
1994 #[inline]
1995 fn encode(
1996 self,
1997 encoder_: &mut ___E,
1998 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
1999 _: (),
2000 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2001 ::fidl_next::munge! {
2002 let crate::wire::FileEnableVerityRequest {
2003 options,
2004
2005 } = out_;
2006 }
2007
2008 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
2009
2010 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2011
2012 Ok(())
2013 }
2014 }
2015
2016 unsafe impl<___E>
2017 ::fidl_next::EncodeOption<
2018 ::fidl_next::wire::Box<'static, crate::wire::FileEnableVerityRequest<'static>>,
2019 ___E,
2020 > for FileEnableVerityRequest
2021 where
2022 ___E: ::fidl_next::Encoder + ?Sized,
2023 FileEnableVerityRequest:
2024 ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>,
2025 {
2026 #[inline]
2027 fn encode_option(
2028 this: ::core::option::Option<Self>,
2029 encoder: &mut ___E,
2030 out: &mut ::core::mem::MaybeUninit<
2031 ::fidl_next::wire::Box<'static, crate::wire::FileEnableVerityRequest<'static>>,
2032 >,
2033 _: (),
2034 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2035 if let Some(inner) = this {
2036 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2037 ::fidl_next::wire::Box::encode_present(out);
2038 } else {
2039 ::fidl_next::wire::Box::encode_absent(out);
2040 }
2041
2042 Ok(())
2043 }
2044 }
2045
2046 impl<'de> ::fidl_next::FromWire<crate::wire::FileEnableVerityRequest<'de>>
2047 for FileEnableVerityRequest
2048 {
2049 #[inline]
2050 fn from_wire(wire: crate::wire::FileEnableVerityRequest<'de>) -> Self {
2051 Self { options: ::fidl_next::FromWire::from_wire(wire.options) }
2052 }
2053 }
2054
2055 #[derive(Debug, PartialEq)]
2056 #[repr(C)]
2057 pub struct FileObject {
2058 pub event: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
2059
2060 pub stream: ::core::option::Option<::fidl_next::fuchsia::zx::Stream>,
2061 }
2062
2063 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject
2064 where
2065 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2066 ___E: ::fidl_next::fuchsia::HandleEncoder,
2067 {
2068 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::FileObject> = unsafe {
2069 ::fidl_next::CopyOptimization::enable_if(
2070 true
2071
2072 && <
2073 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>
2074 >::COPY_OPTIMIZATION.is_enabled()
2075
2076 && <
2077 ::core::option::Option<::fidl_next::fuchsia::zx::Stream> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalStream, ___E>
2078 >::COPY_OPTIMIZATION.is_enabled()
2079
2080 )
2081 };
2082
2083 #[inline]
2084 fn encode(
2085 self,
2086 encoder_: &mut ___E,
2087 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
2088 _: (),
2089 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2090 ::fidl_next::munge! {
2091 let crate::wire::FileObject {
2092 event,
2093 stream,
2094
2095 } = out_;
2096 }
2097
2098 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
2099
2100 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
2101
2102 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
2103
2104 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(stream.as_mut_ptr()) };
2105
2106 Ok(())
2107 }
2108 }
2109
2110 unsafe impl<___E>
2111 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::FileObject>, ___E>
2112 for FileObject
2113 where
2114 ___E: ::fidl_next::Encoder + ?Sized,
2115 FileObject: ::fidl_next::Encode<crate::wire::FileObject, ___E>,
2116 {
2117 #[inline]
2118 fn encode_option(
2119 this: ::core::option::Option<Self>,
2120 encoder: &mut ___E,
2121 out: &mut ::core::mem::MaybeUninit<
2122 ::fidl_next::wire::Box<'static, crate::wire::FileObject>,
2123 >,
2124 _: (),
2125 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2126 if let Some(inner) = this {
2127 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2128 ::fidl_next::wire::Box::encode_present(out);
2129 } else {
2130 ::fidl_next::wire::Box::encode_absent(out);
2131 }
2132
2133 Ok(())
2134 }
2135 }
2136
2137 impl ::fidl_next::FromWire<crate::wire::FileObject> for FileObject {
2138 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::FileObject, Self> = unsafe {
2139 ::fidl_next::CopyOptimization::enable_if(
2140 true
2141
2142 && <
2143 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalEvent>
2144 >::COPY_OPTIMIZATION.is_enabled()
2145
2146 && <
2147 ::core::option::Option<::fidl_next::fuchsia::zx::Stream> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalStream>
2148 >::COPY_OPTIMIZATION.is_enabled()
2149
2150 )
2151 };
2152
2153 #[inline]
2154 fn from_wire(wire: crate::wire::FileObject) -> Self {
2155 Self {
2156 event: ::fidl_next::FromWire::from_wire(wire.event),
2157
2158 stream: ::fidl_next::FromWire::from_wire(wire.stream),
2159 }
2160 }
2161 }
2162
2163 #[derive(Debug, PartialEq)]
2164 pub enum NodeInfoDeprecated {
2165 Service(crate::natural::Service),
2166
2167 File(crate::natural::FileObject),
2168
2169 Directory(crate::natural::DirectoryObject),
2170
2171 Symlink(crate::natural::SymlinkObject),
2172 }
2173
2174 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeInfoDeprecated<'static>, ___E>
2175 for NodeInfoDeprecated
2176 where
2177 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2178 ___E: ::fidl_next::Encoder,
2179 ___E: ::fidl_next::fuchsia::HandleEncoder,
2180 {
2181 #[inline]
2182 fn encode(
2183 self,
2184 encoder: &mut ___E,
2185 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfoDeprecated<'static>>,
2186 _: (),
2187 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2188 ::fidl_next::munge!(let crate::wire::NodeInfoDeprecated { raw, _phantom: _ } = out);
2189
2190 match self {
2191 Self::Service(value) => ::fidl_next::wire::Union::encode_as::<
2192 ___E,
2193 crate::wire::Service,
2194 >(value, 1, encoder, raw, ())?,
2195
2196 Self::File(value) => ::fidl_next::wire::Union::encode_as::<
2197 ___E,
2198 crate::wire::FileObject,
2199 >(value, 2, encoder, raw, ())?,
2200
2201 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
2202 ___E,
2203 crate::wire::DirectoryObject,
2204 >(value, 3, encoder, raw, ())?,
2205
2206 Self::Symlink(value) => ::fidl_next::wire::Union::encode_as::<
2207 ___E,
2208 crate::wire::SymlinkObject<'static>,
2209 >(value, 4, encoder, raw, ())?,
2210 }
2211
2212 Ok(())
2213 }
2214 }
2215
2216 unsafe impl<___E>
2217 ::fidl_next::EncodeOption<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>
2218 for NodeInfoDeprecated
2219 where
2220 ___E: ?Sized,
2221 NodeInfoDeprecated: ::fidl_next::Encode<crate::wire::NodeInfoDeprecated<'static>, ___E>,
2222 {
2223 #[inline]
2224 fn encode_option(
2225 this: ::core::option::Option<Self>,
2226 encoder: &mut ___E,
2227 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::NodeInfoDeprecated<'static>>,
2228 _: (),
2229 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2230 ::fidl_next::munge!(let crate::wire_optional::NodeInfoDeprecated { raw, _phantom: _ } = &mut *out);
2231
2232 if let Some(inner) = this {
2233 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2234 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2235 } else {
2236 ::fidl_next::wire::Union::encode_absent(raw);
2237 }
2238
2239 Ok(())
2240 }
2241 }
2242
2243 impl<'de> ::fidl_next::FromWire<crate::wire::NodeInfoDeprecated<'de>> for NodeInfoDeprecated {
2244 #[inline]
2245 fn from_wire(wire: crate::wire::NodeInfoDeprecated<'de>) -> Self {
2246 let wire = ::core::mem::ManuallyDrop::new(wire);
2247 match wire.raw.ordinal() {
2248 1 => Self::Service(::fidl_next::FromWire::from_wire(unsafe {
2249 wire.raw.get().read_unchecked::<crate::wire::Service>()
2250 })),
2251
2252 2 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
2253 wire.raw.get().read_unchecked::<crate::wire::FileObject>()
2254 })),
2255
2256 3 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
2257 wire.raw.get().read_unchecked::<crate::wire::DirectoryObject>()
2258 })),
2259
2260 4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
2261 wire.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
2262 })),
2263
2264 _ => unsafe { ::core::hint::unreachable_unchecked() },
2265 }
2266 }
2267 }
2268
2269 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::NodeInfoDeprecated<'de>>
2270 for NodeInfoDeprecated
2271 {
2272 #[inline]
2273 fn from_wire_option(
2274 wire: crate::wire_optional::NodeInfoDeprecated<'de>,
2275 ) -> ::core::option::Option<Self> {
2276 if let Some(inner) = wire.into_option() {
2277 Some(::fidl_next::FromWire::from_wire(inner))
2278 } else {
2279 None
2280 }
2281 }
2282 }
2283
2284 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::NodeInfoDeprecated<'de>>
2285 for Box<NodeInfoDeprecated>
2286 {
2287 #[inline]
2288 fn from_wire_option(
2289 wire: crate::wire_optional::NodeInfoDeprecated<'de>,
2290 ) -> ::core::option::Option<Self> {
2291 <NodeInfoDeprecated as ::fidl_next::FromWireOption<
2292 crate::wire_optional::NodeInfoDeprecated<'de>,
2293 >>::from_wire_option(wire)
2294 .map(Box::new)
2295 }
2296 }
2297}
2298
2299pub mod wire {
2300
2301 pub use fidl_next_common_fuchsia_io::wire::*;
2302
2303 #[repr(C)]
2305 pub struct ConnectionInfo<'de> {
2306 pub(crate) table: ::fidl_next::wire::Table<'de>,
2307 }
2308
2309 impl<'de> Drop for ConnectionInfo<'de> {
2310 fn drop(&mut self) {
2311 let _ = self
2312 .table
2313 .get(1)
2314 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Operations>() });
2315 }
2316 }
2317
2318 impl ::fidl_next::Constrained for ConnectionInfo<'_> {
2319 type Constraint = ();
2320
2321 fn validate(
2322 _: ::fidl_next::Slot<'_, Self>,
2323 _: Self::Constraint,
2324 ) -> Result<(), ::fidl_next::ValidationError> {
2325 Ok(())
2326 }
2327 }
2328
2329 unsafe impl ::fidl_next::Wire for ConnectionInfo<'static> {
2330 type Narrowed<'de> = ConnectionInfo<'de>;
2331
2332 #[inline]
2333 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2334 ::fidl_next::munge!(let Self { table } = out);
2335 ::fidl_next::wire::Table::zero_padding(table);
2336 }
2337 }
2338
2339 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ConnectionInfo<'de>
2340 where
2341 ___D: ::fidl_next::Decoder<'de> + ?Sized,
2342 ___D: ::fidl_next::fuchsia::HandleDecoder,
2343 {
2344 fn decode(
2345 slot: ::fidl_next::Slot<'_, Self>,
2346 decoder: &mut ___D,
2347 _: (),
2348 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2349 ::fidl_next::munge!(let Self { table } = slot);
2350
2351 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2352 match ordinal {
2353 0 => unsafe { ::core::hint::unreachable_unchecked() },
2354
2355 1 => {
2356 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Operations>(
2357 slot.as_mut(),
2358 decoder,
2359 (),
2360 )?;
2361
2362 Ok(())
2363 }
2364
2365 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2366 }
2367 })
2368 }
2369 }
2370
2371 impl<'de> ConnectionInfo<'de> {
2372 pub fn rights(&self) -> ::core::option::Option<&crate::wire::Operations> {
2373 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2374 }
2375 }
2376
2377 impl<'de> ::core::fmt::Debug for ConnectionInfo<'de> {
2378 fn fmt(
2379 &self,
2380 f: &mut ::core::fmt::Formatter<'_>,
2381 ) -> ::core::result::Result<(), ::core::fmt::Error> {
2382 f.debug_struct("ConnectionInfo").field("rights", &self.rights()).finish()
2383 }
2384 }
2385
2386 impl<'de> ::fidl_next::IntoNatural for ConnectionInfo<'de> {
2387 type Natural = crate::natural::ConnectionInfo;
2388 }
2389
2390 #[derive(Debug)]
2392 #[repr(C)]
2393 pub struct DirectoryGetTokenResponse {
2394 pub s: ::fidl_next::wire::Int32,
2395
2396 pub token: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
2397 }
2398
2399 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryGetTokenResponse>(), 8);
2400 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryGetTokenResponse>(), 4);
2401
2402 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryGetTokenResponse, s), 0);
2403
2404 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryGetTokenResponse, token), 4);
2405
2406 impl ::fidl_next::Constrained for DirectoryGetTokenResponse {
2407 type Constraint = ();
2408
2409 fn validate(
2410 _: ::fidl_next::Slot<'_, Self>,
2411 _: Self::Constraint,
2412 ) -> Result<(), ::fidl_next::ValidationError> {
2413 Ok(())
2414 }
2415 }
2416
2417 unsafe impl ::fidl_next::Wire for DirectoryGetTokenResponse {
2418 type Narrowed<'de> = DirectoryGetTokenResponse;
2419
2420 #[inline]
2421 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2422 ::fidl_next::munge! {
2423 let Self {
2424 s,
2425 token,
2426
2427 } = &mut *out_;
2428 }
2429
2430 ::fidl_next::Wire::zero_padding(s);
2431
2432 ::fidl_next::Wire::zero_padding(token);
2433 }
2434 }
2435
2436 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryGetTokenResponse
2437 where
2438 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2439 ___D: ::fidl_next::fuchsia::HandleDecoder,
2440 {
2441 fn decode(
2442 slot_: ::fidl_next::Slot<'_, Self>,
2443 decoder_: &mut ___D,
2444 _: (),
2445 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2446 ::fidl_next::munge! {
2447 let Self {
2448 mut s,
2449 mut token,
2450
2451 } = slot_;
2452 }
2453
2454 let _field = s.as_mut();
2455
2456 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2457
2458 let _field = token.as_mut();
2459
2460 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
2461
2462 Ok(())
2463 }
2464 }
2465
2466 impl ::fidl_next::IntoNatural for DirectoryGetTokenResponse {
2467 type Natural = crate::natural::DirectoryGetTokenResponse;
2468 }
2469
2470 #[derive(Debug)]
2472 #[repr(C)]
2473 pub struct DirectoryLinkRequest<'de> {
2474 pub src: ::fidl_next::wire::String<'de>,
2475
2476 pub dst_parent_token: ::fidl_next::wire::fuchsia::NullableHandle,
2477
2478 pub dst: ::fidl_next::wire::String<'de>,
2479 }
2480
2481 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkRequest<'_>>(), 40);
2482 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkRequest<'_>>(), 8);
2483
2484 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, src), 0);
2485
2486 static_assertions::const_assert_eq!(
2487 std::mem::offset_of!(DirectoryLinkRequest<'_>, dst_parent_token),
2488 16
2489 );
2490
2491 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, dst), 24);
2492
2493 impl ::fidl_next::Constrained for DirectoryLinkRequest<'_> {
2494 type Constraint = ();
2495
2496 fn validate(
2497 _: ::fidl_next::Slot<'_, Self>,
2498 _: Self::Constraint,
2499 ) -> Result<(), ::fidl_next::ValidationError> {
2500 Ok(())
2501 }
2502 }
2503
2504 unsafe impl ::fidl_next::Wire for DirectoryLinkRequest<'static> {
2505 type Narrowed<'de> = DirectoryLinkRequest<'de>;
2506
2507 #[inline]
2508 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2509 ::fidl_next::munge! {
2510 let Self {
2511 src,
2512 dst_parent_token,
2513 dst,
2514
2515 } = &mut *out_;
2516 }
2517
2518 ::fidl_next::Wire::zero_padding(src);
2519
2520 ::fidl_next::Wire::zero_padding(dst_parent_token);
2521
2522 ::fidl_next::Wire::zero_padding(dst);
2523
2524 unsafe {
2525 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2526 }
2527 }
2528 }
2529
2530 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryLinkRequest<'de>
2531 where
2532 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2533 ___D: ::fidl_next::Decoder<'de>,
2534 ___D: ::fidl_next::fuchsia::HandleDecoder,
2535 {
2536 fn decode(
2537 slot_: ::fidl_next::Slot<'_, Self>,
2538 decoder_: &mut ___D,
2539 _: (),
2540 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2541 if slot_.as_bytes()[20..24] != [0u8; 4] {
2542 return Err(::fidl_next::DecodeError::InvalidPadding);
2543 }
2544
2545 ::fidl_next::munge! {
2546 let Self {
2547 mut src,
2548 mut dst_parent_token,
2549 mut dst,
2550
2551 } = slot_;
2552 }
2553
2554 let _field = src.as_mut();
2555 ::fidl_next::Constrained::validate(_field, 255)?;
2556 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2557
2558 let src = unsafe { src.deref_unchecked() };
2559
2560 if src.len() > 255 {
2561 return Err(::fidl_next::DecodeError::VectorTooLong {
2562 size: src.len() as u64,
2563 limit: 255,
2564 });
2565 }
2566
2567 let _field = dst_parent_token.as_mut();
2568
2569 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2570
2571 let _field = dst.as_mut();
2572 ::fidl_next::Constrained::validate(_field, 255)?;
2573 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2574
2575 let dst = unsafe { dst.deref_unchecked() };
2576
2577 if dst.len() > 255 {
2578 return Err(::fidl_next::DecodeError::VectorTooLong {
2579 size: dst.len() as u64,
2580 limit: 255,
2581 });
2582 }
2583
2584 Ok(())
2585 }
2586 }
2587
2588 impl<'de> ::fidl_next::IntoNatural for DirectoryLinkRequest<'de> {
2589 type Natural = crate::natural::DirectoryLinkRequest;
2590 }
2591
2592 pub type Token = ::fidl_next::wire::fuchsia::Event;
2594
2595 #[derive(Debug)]
2597 #[repr(C)]
2598 pub struct DirectoryRenameRequest<'de> {
2599 pub src: ::fidl_next::wire::String<'de>,
2600
2601 pub dst_parent_token: ::fidl_next::wire::fuchsia::Event,
2602
2603 pub dst: ::fidl_next::wire::String<'de>,
2604 }
2605
2606 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRenameRequest<'_>>(), 40);
2607 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRenameRequest<'_>>(), 8);
2608
2609 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, src), 0);
2610
2611 static_assertions::const_assert_eq!(
2612 std::mem::offset_of!(DirectoryRenameRequest<'_>, dst_parent_token),
2613 16
2614 );
2615
2616 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, dst), 24);
2617
2618 impl ::fidl_next::Constrained for DirectoryRenameRequest<'_> {
2619 type Constraint = ();
2620
2621 fn validate(
2622 _: ::fidl_next::Slot<'_, Self>,
2623 _: Self::Constraint,
2624 ) -> Result<(), ::fidl_next::ValidationError> {
2625 Ok(())
2626 }
2627 }
2628
2629 unsafe impl ::fidl_next::Wire for DirectoryRenameRequest<'static> {
2630 type Narrowed<'de> = DirectoryRenameRequest<'de>;
2631
2632 #[inline]
2633 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2634 ::fidl_next::munge! {
2635 let Self {
2636 src,
2637 dst_parent_token,
2638 dst,
2639
2640 } = &mut *out_;
2641 }
2642
2643 ::fidl_next::Wire::zero_padding(src);
2644
2645 ::fidl_next::Wire::zero_padding(dst_parent_token);
2646
2647 ::fidl_next::Wire::zero_padding(dst);
2648
2649 unsafe {
2650 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2651 }
2652 }
2653 }
2654
2655 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryRenameRequest<'de>
2656 where
2657 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2658 ___D: ::fidl_next::Decoder<'de>,
2659 ___D: ::fidl_next::fuchsia::HandleDecoder,
2660 {
2661 fn decode(
2662 slot_: ::fidl_next::Slot<'_, Self>,
2663 decoder_: &mut ___D,
2664 _: (),
2665 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2666 if slot_.as_bytes()[20..24] != [0u8; 4] {
2667 return Err(::fidl_next::DecodeError::InvalidPadding);
2668 }
2669
2670 ::fidl_next::munge! {
2671 let Self {
2672 mut src,
2673 mut dst_parent_token,
2674 mut dst,
2675
2676 } = slot_;
2677 }
2678
2679 let _field = src.as_mut();
2680 ::fidl_next::Constrained::validate(_field, 255)?;
2681 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2682
2683 let src = unsafe { src.deref_unchecked() };
2684
2685 if src.len() > 255 {
2686 return Err(::fidl_next::DecodeError::VectorTooLong {
2687 size: src.len() as u64,
2688 limit: 255,
2689 });
2690 }
2691
2692 let _field = dst_parent_token.as_mut();
2693
2694 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2695
2696 let _field = dst.as_mut();
2697 ::fidl_next::Constrained::validate(_field, 255)?;
2698 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2699
2700 let dst = unsafe { dst.deref_unchecked() };
2701
2702 if dst.len() > 255 {
2703 return Err(::fidl_next::DecodeError::VectorTooLong {
2704 size: dst.len() as u64,
2705 limit: 255,
2706 });
2707 }
2708
2709 Ok(())
2710 }
2711 }
2712
2713 impl<'de> ::fidl_next::IntoNatural for DirectoryRenameRequest<'de> {
2714 type Natural = crate::natural::DirectoryRenameRequest;
2715 }
2716
2717 #[derive(Debug)]
2719 #[repr(C)]
2720 pub struct DirectoryWatchRequest {
2721 pub mask: crate::wire::WatchMask,
2722
2723 pub options: ::fidl_next::wire::Uint32,
2724
2725 pub watcher:
2726 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::wire::fuchsia::Channel>,
2727 }
2728
2729 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchRequest>(), 12);
2730 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchRequest>(), 4);
2731
2732 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, mask), 0);
2733
2734 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, options), 4);
2735
2736 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, watcher), 8);
2737
2738 impl ::fidl_next::Constrained for DirectoryWatchRequest {
2739 type Constraint = ();
2740
2741 fn validate(
2742 _: ::fidl_next::Slot<'_, Self>,
2743 _: Self::Constraint,
2744 ) -> Result<(), ::fidl_next::ValidationError> {
2745 Ok(())
2746 }
2747 }
2748
2749 unsafe impl ::fidl_next::Wire for DirectoryWatchRequest {
2750 type Narrowed<'de> = DirectoryWatchRequest;
2751
2752 #[inline]
2753 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2754 ::fidl_next::munge! {
2755 let Self {
2756 mask,
2757 options,
2758 watcher,
2759
2760 } = &mut *out_;
2761 }
2762
2763 ::fidl_next::Wire::zero_padding(mask);
2764
2765 ::fidl_next::Wire::zero_padding(options);
2766
2767 ::fidl_next::Wire::zero_padding(watcher);
2768 }
2769 }
2770
2771 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchRequest
2772 where
2773 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2774 ___D: ::fidl_next::fuchsia::HandleDecoder,
2775 {
2776 fn decode(
2777 slot_: ::fidl_next::Slot<'_, Self>,
2778 decoder_: &mut ___D,
2779 _: (),
2780 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2781 ::fidl_next::munge! {
2782 let Self {
2783 mut mask,
2784 mut options,
2785 mut watcher,
2786
2787 } = slot_;
2788 }
2789
2790 let _field = mask.as_mut();
2791
2792 ::fidl_next::Decode::decode(mask.as_mut(), decoder_, ())?;
2793
2794 let _field = options.as_mut();
2795
2796 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
2797
2798 let _field = watcher.as_mut();
2799
2800 ::fidl_next::Decode::decode(watcher.as_mut(), decoder_, ())?;
2801
2802 Ok(())
2803 }
2804 }
2805
2806 impl ::fidl_next::IntoNatural for DirectoryWatchRequest {
2807 type Natural = crate::natural::DirectoryWatchRequest;
2808 }
2809
2810 #[derive(Debug)]
2812 #[repr(C)]
2813 pub struct NodeOnOpenRequest<'de> {
2814 pub s: ::fidl_next::wire::Int32,
2815
2816 pub info: crate::wire_optional::NodeInfoDeprecated<'de>,
2817 }
2818
2819 static_assertions::const_assert_eq!(std::mem::size_of::<NodeOnOpenRequest<'_>>(), 24);
2820 static_assertions::const_assert_eq!(std::mem::align_of::<NodeOnOpenRequest<'_>>(), 8);
2821
2822 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, s), 0);
2823
2824 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, info), 8);
2825
2826 impl ::fidl_next::Constrained for NodeOnOpenRequest<'_> {
2827 type Constraint = ();
2828
2829 fn validate(
2830 _: ::fidl_next::Slot<'_, Self>,
2831 _: Self::Constraint,
2832 ) -> Result<(), ::fidl_next::ValidationError> {
2833 Ok(())
2834 }
2835 }
2836
2837 unsafe impl ::fidl_next::Wire for NodeOnOpenRequest<'static> {
2838 type Narrowed<'de> = NodeOnOpenRequest<'de>;
2839
2840 #[inline]
2841 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2842 ::fidl_next::munge! {
2843 let Self {
2844 s,
2845 info,
2846
2847 } = &mut *out_;
2848 }
2849
2850 ::fidl_next::Wire::zero_padding(s);
2851
2852 ::fidl_next::Wire::zero_padding(info);
2853
2854 unsafe {
2855 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2856 }
2857 }
2858 }
2859
2860 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeOnOpenRequest<'de>
2861 where
2862 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2863 ___D: ::fidl_next::Decoder<'de>,
2864 ___D: ::fidl_next::fuchsia::HandleDecoder,
2865 {
2866 fn decode(
2867 slot_: ::fidl_next::Slot<'_, Self>,
2868 decoder_: &mut ___D,
2869 _: (),
2870 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2871 if slot_.as_bytes()[4..8] != [0u8; 4] {
2872 return Err(::fidl_next::DecodeError::InvalidPadding);
2873 }
2874
2875 ::fidl_next::munge! {
2876 let Self {
2877 mut s,
2878 mut info,
2879
2880 } = slot_;
2881 }
2882
2883 let _field = s.as_mut();
2884
2885 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2886
2887 let _field = info.as_mut();
2888
2889 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
2890
2891 Ok(())
2892 }
2893 }
2894
2895 impl<'de> ::fidl_next::IntoNatural for NodeOnOpenRequest<'de> {
2896 type Natural = crate::natural::NodeOnOpenRequest;
2897 }
2898
2899 #[derive(Debug)]
2901 #[repr(C)]
2902 pub struct NodeListExtendedAttributesRequest {
2903 pub iterator: ::fidl_next::ServerEnd<
2904 crate::ExtendedAttributeIterator,
2905 ::fidl_next::wire::fuchsia::Channel,
2906 >,
2907 }
2908
2909 static_assertions::const_assert_eq!(
2910 std::mem::size_of::<NodeListExtendedAttributesRequest>(),
2911 4
2912 );
2913 static_assertions::const_assert_eq!(
2914 std::mem::align_of::<NodeListExtendedAttributesRequest>(),
2915 4
2916 );
2917
2918 static_assertions::const_assert_eq!(
2919 std::mem::offset_of!(NodeListExtendedAttributesRequest, iterator),
2920 0
2921 );
2922
2923 impl ::fidl_next::Constrained for NodeListExtendedAttributesRequest {
2924 type Constraint = ();
2925
2926 fn validate(
2927 _: ::fidl_next::Slot<'_, Self>,
2928 _: Self::Constraint,
2929 ) -> Result<(), ::fidl_next::ValidationError> {
2930 Ok(())
2931 }
2932 }
2933
2934 unsafe impl ::fidl_next::Wire for NodeListExtendedAttributesRequest {
2935 type Narrowed<'de> = NodeListExtendedAttributesRequest;
2936
2937 #[inline]
2938 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2939 ::fidl_next::munge! {
2940 let Self {
2941 iterator,
2942
2943 } = &mut *out_;
2944 }
2945
2946 ::fidl_next::Wire::zero_padding(iterator);
2947 }
2948 }
2949
2950 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeListExtendedAttributesRequest
2951 where
2952 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2953 ___D: ::fidl_next::fuchsia::HandleDecoder,
2954 {
2955 fn decode(
2956 slot_: ::fidl_next::Slot<'_, Self>,
2957 decoder_: &mut ___D,
2958 _: (),
2959 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2960 ::fidl_next::munge! {
2961 let Self {
2962 mut iterator,
2963
2964 } = slot_;
2965 }
2966
2967 let _field = iterator.as_mut();
2968
2969 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
2970
2971 Ok(())
2972 }
2973 }
2974
2975 impl ::fidl_next::IntoNatural for NodeListExtendedAttributesRequest {
2976 type Natural = crate::natural::NodeListExtendedAttributesRequest;
2977 }
2978
2979 #[repr(transparent)]
2981 pub struct ExtendedAttributeValue<'de> {
2982 pub(crate) raw: ::fidl_next::wire::Union,
2983 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2984 }
2985
2986 impl<'de> Drop for ExtendedAttributeValue<'de> {
2987 fn drop(&mut self) {
2988 match self.raw.ordinal() {
2989 1 => {
2990 let _ = unsafe {
2991 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2992 };
2993 }
2994
2995 2 => {
2996 let _ = unsafe {
2997 self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2998 };
2999 }
3000
3001 _ => (),
3002 }
3003 }
3004 }
3005
3006 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
3007 type Constraint = ();
3008
3009 fn validate(
3010 _: ::fidl_next::Slot<'_, Self>,
3011 _: Self::Constraint,
3012 ) -> Result<(), ::fidl_next::ValidationError> {
3013 Ok(())
3014 }
3015 }
3016
3017 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
3018 type Narrowed<'de> = ExtendedAttributeValue<'de>;
3019
3020 #[inline]
3021 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3022 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3023 ::fidl_next::wire::Union::zero_padding(raw);
3024 }
3025 }
3026
3027 pub mod extended_attribute_value {
3028 pub enum Ref<'de> {
3029 Bytes(&'de ::fidl_next::wire::Vector<'de, u8>),
3030
3031 Buffer(&'de ::fidl_next::wire::fuchsia::Vmo),
3032
3033 UnknownOrdinal_(u64),
3034 }
3035 }
3036
3037 impl<'de> ExtendedAttributeValue<'de> {
3038 pub fn as_ref(&self) -> crate::wire::extended_attribute_value::Ref<'_> {
3039 match self.raw.ordinal() {
3040 1 => crate::wire::extended_attribute_value::Ref::Bytes(unsafe {
3041 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
3042 }),
3043
3044 2 => crate::wire::extended_attribute_value::Ref::Buffer(unsafe {
3045 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
3046 }),
3047
3048 unknown => crate::wire::extended_attribute_value::Ref::UnknownOrdinal_(unknown),
3049 }
3050 }
3051 }
3052
3053 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
3054 where
3055 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3056 ___D: ::fidl_next::Decoder<'de>,
3057 ___D: ::fidl_next::fuchsia::HandleDecoder,
3058 {
3059 fn decode(
3060 mut slot: ::fidl_next::Slot<'_, Self>,
3061 decoder: &mut ___D,
3062 _: (),
3063 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3064 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3065 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3066 1 => {
3067 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3068 raw,
3069 decoder,
3070 (32768, ()),
3071 )?
3072 }
3073
3074 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Vmo>(
3075 raw,
3076 decoder,
3077 (),
3078 )?,
3079
3080 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3081 }
3082
3083 Ok(())
3084 }
3085 }
3086
3087 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
3088 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3089 match self.raw.ordinal() {
3090 1 => unsafe {
3091 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
3092 },
3093 2 => unsafe {
3094 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>().fmt(f)
3095 },
3096 _ => unsafe { ::core::hint::unreachable_unchecked() },
3097 }
3098 }
3099 }
3100
3101 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
3102 type Natural = crate::natural::ExtendedAttributeValue;
3103 }
3104
3105 #[derive(Debug)]
3107 #[repr(C)]
3108 pub struct NodeSetExtendedAttributeRequest<'de> {
3109 pub name: ::fidl_next::wire::Vector<'de, u8>,
3110
3111 pub value: crate::wire::ExtendedAttributeValue<'de>,
3112
3113 pub mode: crate::wire::SetExtendedAttributeMode,
3114 }
3115
3116 static_assertions::const_assert_eq!(
3117 std::mem::size_of::<NodeSetExtendedAttributeRequest<'_>>(),
3118 40
3119 );
3120 static_assertions::const_assert_eq!(
3121 std::mem::align_of::<NodeSetExtendedAttributeRequest<'_>>(),
3122 8
3123 );
3124
3125 static_assertions::const_assert_eq!(
3126 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, name),
3127 0
3128 );
3129
3130 static_assertions::const_assert_eq!(
3131 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, value),
3132 16
3133 );
3134
3135 static_assertions::const_assert_eq!(
3136 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, mode),
3137 32
3138 );
3139
3140 impl ::fidl_next::Constrained for NodeSetExtendedAttributeRequest<'_> {
3141 type Constraint = ();
3142
3143 fn validate(
3144 _: ::fidl_next::Slot<'_, Self>,
3145 _: Self::Constraint,
3146 ) -> Result<(), ::fidl_next::ValidationError> {
3147 Ok(())
3148 }
3149 }
3150
3151 unsafe impl ::fidl_next::Wire for NodeSetExtendedAttributeRequest<'static> {
3152 type Narrowed<'de> = NodeSetExtendedAttributeRequest<'de>;
3153
3154 #[inline]
3155 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3156 ::fidl_next::munge! {
3157 let Self {
3158 name,
3159 value,
3160 mode,
3161
3162 } = &mut *out_;
3163 }
3164
3165 ::fidl_next::Wire::zero_padding(name);
3166
3167 ::fidl_next::Wire::zero_padding(value);
3168
3169 ::fidl_next::Wire::zero_padding(mode);
3170
3171 unsafe {
3172 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3173 }
3174 }
3175 }
3176
3177 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetExtendedAttributeRequest<'de>
3178 where
3179 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3180 ___D: ::fidl_next::Decoder<'de>,
3181 ___D: ::fidl_next::fuchsia::HandleDecoder,
3182 {
3183 fn decode(
3184 slot_: ::fidl_next::Slot<'_, Self>,
3185 decoder_: &mut ___D,
3186 _: (),
3187 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3188 if slot_.as_bytes()[36..40] != [0u8; 4] {
3189 return Err(::fidl_next::DecodeError::InvalidPadding);
3190 }
3191
3192 ::fidl_next::munge! {
3193 let Self {
3194 mut name,
3195 mut value,
3196 mut mode,
3197
3198 } = slot_;
3199 }
3200
3201 let _field = name.as_mut();
3202 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3203 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
3204
3205 let name = unsafe { name.deref_unchecked() };
3206
3207 if name.len() > 255 {
3208 return Err(::fidl_next::DecodeError::VectorTooLong {
3209 size: name.len() as u64,
3210 limit: 255,
3211 });
3212 }
3213
3214 let _field = value.as_mut();
3215
3216 ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
3217
3218 let _field = mode.as_mut();
3219
3220 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3221
3222 Ok(())
3223 }
3224 }
3225
3226 impl<'de> ::fidl_next::IntoNatural for NodeSetExtendedAttributeRequest<'de> {
3227 type Natural = crate::natural::NodeSetExtendedAttributeRequest;
3228 }
3229
3230 #[repr(C)]
3232 pub struct FileInfo<'de> {
3233 pub(crate) table: ::fidl_next::wire::Table<'de>,
3234 }
3235
3236 impl<'de> Drop for FileInfo<'de> {
3237 fn drop(&mut self) {
3238 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3239
3240 let _ = self.table.get(2).map(|envelope| unsafe {
3241 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
3242 });
3243
3244 let _ = self.table.get(3).map(|envelope| unsafe {
3245 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Stream>()
3246 });
3247
3248 let _ = self.table.get(4).map(|envelope| unsafe {
3249 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
3250 });
3251 }
3252 }
3253
3254 impl ::fidl_next::Constrained for FileInfo<'_> {
3255 type Constraint = ();
3256
3257 fn validate(
3258 _: ::fidl_next::Slot<'_, Self>,
3259 _: Self::Constraint,
3260 ) -> Result<(), ::fidl_next::ValidationError> {
3261 Ok(())
3262 }
3263 }
3264
3265 unsafe impl ::fidl_next::Wire for FileInfo<'static> {
3266 type Narrowed<'de> = FileInfo<'de>;
3267
3268 #[inline]
3269 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3270 ::fidl_next::munge!(let Self { table } = out);
3271 ::fidl_next::wire::Table::zero_padding(table);
3272 }
3273 }
3274
3275 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileInfo<'de>
3276 where
3277 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3278 ___D: ::fidl_next::fuchsia::HandleDecoder,
3279 {
3280 fn decode(
3281 slot: ::fidl_next::Slot<'_, Self>,
3282 decoder: &mut ___D,
3283 _: (),
3284 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3285 ::fidl_next::munge!(let Self { table } = slot);
3286
3287 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3288 match ordinal {
3289 0 => unsafe { ::core::hint::unreachable_unchecked() },
3290
3291 1 => {
3292 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3293 slot.as_mut(),
3294 decoder,
3295 (),
3296 )?;
3297
3298 Ok(())
3299 }
3300
3301 2 => {
3302 ::fidl_next::wire::Envelope::decode_as::<
3303 ___D,
3304 ::fidl_next::wire::fuchsia::Event,
3305 >(slot.as_mut(), decoder, ())?;
3306
3307 Ok(())
3308 }
3309
3310 3 => {
3311 ::fidl_next::wire::Envelope::decode_as::<
3312 ___D,
3313 ::fidl_next::wire::fuchsia::Stream,
3314 >(slot.as_mut(), decoder, ())?;
3315
3316 Ok(())
3317 }
3318
3319 4 => {
3320 ::fidl_next::wire::Envelope::decode_as::<
3321 ___D,
3322 crate::wire::NodeAttributes2<'de>,
3323 >(slot.as_mut(), decoder, ())?;
3324
3325 Ok(())
3326 }
3327
3328 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3329 }
3330 })
3331 }
3332 }
3333
3334 impl<'de> FileInfo<'de> {
3335 pub fn is_append(&self) -> ::core::option::Option<&bool> {
3336 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3337 }
3338
3339 pub fn observer(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
3340 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3341 }
3342
3343 pub fn stream(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Stream> {
3344 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3345 }
3346
3347 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
3348 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3349 }
3350 }
3351
3352 impl<'de> ::core::fmt::Debug for FileInfo<'de> {
3353 fn fmt(
3354 &self,
3355 f: &mut ::core::fmt::Formatter<'_>,
3356 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3357 f.debug_struct("FileInfo")
3358 .field("is_append", &self.is_append())
3359 .field("observer", &self.observer())
3360 .field("stream", &self.stream())
3361 .field("attributes", &self.attributes())
3362 .finish()
3363 }
3364 }
3365
3366 impl<'de> ::fidl_next::IntoNatural for FileInfo<'de> {
3367 type Natural = crate::natural::FileInfo;
3368 }
3369
3370 #[repr(transparent)]
3372 pub struct Representation<'de> {
3373 pub(crate) raw: ::fidl_next::wire::Union,
3374 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3375 }
3376
3377 impl<'de> Drop for Representation<'de> {
3378 fn drop(&mut self) {
3379 match self.raw.ordinal() {
3380 1 => {
3381 let _ =
3382 unsafe { self.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>() };
3383 }
3384
3385 2 => {
3386 let _ = unsafe {
3387 self.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
3388 };
3389 }
3390
3391 3 => {
3392 let _ =
3393 unsafe { self.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>() };
3394 }
3395
3396 4 => {
3397 let _ =
3398 unsafe { self.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>() };
3399 }
3400
3401 _ => (),
3402 }
3403 }
3404 }
3405
3406 impl ::fidl_next::Constrained for Representation<'_> {
3407 type Constraint = ();
3408
3409 fn validate(
3410 _: ::fidl_next::Slot<'_, Self>,
3411 _: Self::Constraint,
3412 ) -> Result<(), ::fidl_next::ValidationError> {
3413 Ok(())
3414 }
3415 }
3416
3417 unsafe impl ::fidl_next::Wire for Representation<'static> {
3418 type Narrowed<'de> = Representation<'de>;
3419
3420 #[inline]
3421 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3422 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3423 ::fidl_next::wire::Union::zero_padding(raw);
3424 }
3425 }
3426
3427 pub mod representation {
3428 pub enum Ref<'de> {
3429 Node(&'de crate::wire::NodeInfo<'de>),
3430
3431 Directory(&'de crate::wire::DirectoryInfo<'de>),
3432
3433 File(&'de crate::wire::FileInfo<'de>),
3434
3435 Symlink(&'de crate::wire::SymlinkInfo<'de>),
3436
3437 UnknownOrdinal_(u64),
3438 }
3439 }
3440
3441 impl<'de> Representation<'de> {
3442 pub fn as_ref(&self) -> crate::wire::representation::Ref<'_> {
3443 match self.raw.ordinal() {
3444 1 => crate::wire::representation::Ref::Node(unsafe {
3445 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>()
3446 }),
3447
3448 2 => crate::wire::representation::Ref::Directory(unsafe {
3449 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>()
3450 }),
3451
3452 3 => crate::wire::representation::Ref::File(unsafe {
3453 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>()
3454 }),
3455
3456 4 => crate::wire::representation::Ref::Symlink(unsafe {
3457 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>()
3458 }),
3459
3460 unknown => crate::wire::representation::Ref::UnknownOrdinal_(unknown),
3461 }
3462 }
3463 }
3464
3465 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
3466 where
3467 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3468 ___D: ::fidl_next::Decoder<'de>,
3469 ___D: ::fidl_next::fuchsia::HandleDecoder,
3470 {
3471 fn decode(
3472 mut slot: ::fidl_next::Slot<'_, Self>,
3473 decoder: &mut ___D,
3474 _: (),
3475 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3476 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3477 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3478 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
3479 raw,
3480 decoder,
3481 (),
3482 )?,
3483
3484 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
3485 raw,
3486 decoder,
3487 (),
3488 )?,
3489
3490 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
3491 raw,
3492 decoder,
3493 (),
3494 )?,
3495
3496 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
3497 raw,
3498 decoder,
3499 (),
3500 )?,
3501
3502 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3503 }
3504
3505 Ok(())
3506 }
3507 }
3508
3509 impl<'de> ::core::fmt::Debug for Representation<'de> {
3510 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3511 match self.raw.ordinal() {
3512 1 => unsafe {
3513 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>().fmt(f)
3514 },
3515 2 => unsafe {
3516 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>().fmt(f)
3517 },
3518 3 => unsafe {
3519 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>().fmt(f)
3520 },
3521 4 => unsafe {
3522 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>().fmt(f)
3523 },
3524 _ => unsafe { ::core::hint::unreachable_unchecked() },
3525 }
3526 }
3527 }
3528
3529 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
3530 type Natural = crate::natural::Representation;
3531 }
3532
3533 #[derive(Debug)]
3535 #[repr(C)]
3536 pub struct DirectoryOpenRequest<'de> {
3537 pub path: ::fidl_next::wire::String<'de>,
3538
3539 pub flags: crate::wire::Flags,
3540
3541 pub options: crate::wire::Options<'de>,
3542
3543 pub object: ::fidl_next::wire::fuchsia::Channel,
3544 }
3545
3546 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryOpenRequest<'_>>(), 48);
3547 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryOpenRequest<'_>>(), 8);
3548
3549 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, path), 0);
3550
3551 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, flags), 16);
3552
3553 static_assertions::const_assert_eq!(
3554 std::mem::offset_of!(DirectoryOpenRequest<'_>, options),
3555 24
3556 );
3557
3558 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, object), 40);
3559
3560 impl ::fidl_next::Constrained for DirectoryOpenRequest<'_> {
3561 type Constraint = ();
3562
3563 fn validate(
3564 _: ::fidl_next::Slot<'_, Self>,
3565 _: Self::Constraint,
3566 ) -> Result<(), ::fidl_next::ValidationError> {
3567 Ok(())
3568 }
3569 }
3570
3571 unsafe impl ::fidl_next::Wire for DirectoryOpenRequest<'static> {
3572 type Narrowed<'de> = DirectoryOpenRequest<'de>;
3573
3574 #[inline]
3575 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3576 ::fidl_next::munge! {
3577 let Self {
3578 path,
3579 flags,
3580 options,
3581 object,
3582
3583 } = &mut *out_;
3584 }
3585
3586 ::fidl_next::Wire::zero_padding(path);
3587
3588 ::fidl_next::Wire::zero_padding(flags);
3589
3590 ::fidl_next::Wire::zero_padding(options);
3591
3592 ::fidl_next::Wire::zero_padding(object);
3593
3594 unsafe {
3595 out_.as_mut_ptr().cast::<u8>().add(44).write_bytes(0, 4);
3596 }
3597 }
3598 }
3599
3600 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryOpenRequest<'de>
3601 where
3602 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3603 ___D: ::fidl_next::Decoder<'de>,
3604 ___D: ::fidl_next::fuchsia::HandleDecoder,
3605 {
3606 fn decode(
3607 slot_: ::fidl_next::Slot<'_, Self>,
3608 decoder_: &mut ___D,
3609 _: (),
3610 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3611 if slot_.as_bytes()[44..48] != [0u8; 4] {
3612 return Err(::fidl_next::DecodeError::InvalidPadding);
3613 }
3614
3615 ::fidl_next::munge! {
3616 let Self {
3617 mut path,
3618 mut flags,
3619 mut options,
3620 mut object,
3621
3622 } = slot_;
3623 }
3624
3625 let _field = path.as_mut();
3626 ::fidl_next::Constrained::validate(_field, 4095)?;
3627 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3628
3629 let path = unsafe { path.deref_unchecked() };
3630
3631 if path.len() > 4095 {
3632 return Err(::fidl_next::DecodeError::VectorTooLong {
3633 size: path.len() as u64,
3634 limit: 4095,
3635 });
3636 }
3637
3638 let _field = flags.as_mut();
3639
3640 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3641
3642 let _field = options.as_mut();
3643
3644 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
3645
3646 let _field = object.as_mut();
3647
3648 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3649
3650 Ok(())
3651 }
3652 }
3653
3654 impl<'de> ::fidl_next::IntoNatural for DirectoryOpenRequest<'de> {
3655 type Natural = crate::natural::DirectoryOpenRequest;
3656 }
3657
3658 #[derive(Debug)]
3660 #[repr(C)]
3661 pub struct NodeDeprecatedCloneRequest {
3662 pub flags: crate::wire::OpenFlags,
3663
3664 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
3665 }
3666
3667 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedCloneRequest>(), 8);
3668 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedCloneRequest>(), 4);
3669
3670 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedCloneRequest, flags), 0);
3671
3672 static_assertions::const_assert_eq!(
3673 std::mem::offset_of!(NodeDeprecatedCloneRequest, object),
3674 4
3675 );
3676
3677 impl ::fidl_next::Constrained for NodeDeprecatedCloneRequest {
3678 type Constraint = ();
3679
3680 fn validate(
3681 _: ::fidl_next::Slot<'_, Self>,
3682 _: Self::Constraint,
3683 ) -> Result<(), ::fidl_next::ValidationError> {
3684 Ok(())
3685 }
3686 }
3687
3688 unsafe impl ::fidl_next::Wire for NodeDeprecatedCloneRequest {
3689 type Narrowed<'de> = NodeDeprecatedCloneRequest;
3690
3691 #[inline]
3692 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3693 ::fidl_next::munge! {
3694 let Self {
3695 flags,
3696 object,
3697
3698 } = &mut *out_;
3699 }
3700
3701 ::fidl_next::Wire::zero_padding(flags);
3702
3703 ::fidl_next::Wire::zero_padding(object);
3704 }
3705 }
3706
3707 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedCloneRequest
3708 where
3709 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3710 ___D: ::fidl_next::fuchsia::HandleDecoder,
3711 {
3712 fn decode(
3713 slot_: ::fidl_next::Slot<'_, Self>,
3714 decoder_: &mut ___D,
3715 _: (),
3716 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3717 ::fidl_next::munge! {
3718 let Self {
3719 mut flags,
3720 mut object,
3721
3722 } = slot_;
3723 }
3724
3725 let _field = flags.as_mut();
3726
3727 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3728
3729 let _field = object.as_mut();
3730
3731 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3732
3733 Ok(())
3734 }
3735 }
3736
3737 impl ::fidl_next::IntoNatural for NodeDeprecatedCloneRequest {
3738 type Natural = crate::natural::NodeDeprecatedCloneRequest;
3739 }
3740
3741 #[derive(Debug)]
3743 #[repr(C)]
3744 pub struct DirectoryDeprecatedOpenRequest<'de> {
3745 pub flags: crate::wire::OpenFlags,
3746
3747 pub mode: crate::wire::ModeType,
3748
3749 pub path: ::fidl_next::wire::String<'de>,
3750
3751 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
3752 }
3753
3754 static_assertions::const_assert_eq!(
3755 std::mem::size_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3756 32
3757 );
3758 static_assertions::const_assert_eq!(
3759 std::mem::align_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3760 8
3761 );
3762
3763 static_assertions::const_assert_eq!(
3764 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, flags),
3765 0
3766 );
3767
3768 static_assertions::const_assert_eq!(
3769 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, mode),
3770 4
3771 );
3772
3773 static_assertions::const_assert_eq!(
3774 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, path),
3775 8
3776 );
3777
3778 static_assertions::const_assert_eq!(
3779 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, object),
3780 24
3781 );
3782
3783 impl ::fidl_next::Constrained for DirectoryDeprecatedOpenRequest<'_> {
3784 type Constraint = ();
3785
3786 fn validate(
3787 _: ::fidl_next::Slot<'_, Self>,
3788 _: Self::Constraint,
3789 ) -> Result<(), ::fidl_next::ValidationError> {
3790 Ok(())
3791 }
3792 }
3793
3794 unsafe impl ::fidl_next::Wire for DirectoryDeprecatedOpenRequest<'static> {
3795 type Narrowed<'de> = DirectoryDeprecatedOpenRequest<'de>;
3796
3797 #[inline]
3798 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3799 ::fidl_next::munge! {
3800 let Self {
3801 flags,
3802 mode,
3803 path,
3804 object,
3805
3806 } = &mut *out_;
3807 }
3808
3809 ::fidl_next::Wire::zero_padding(flags);
3810
3811 ::fidl_next::Wire::zero_padding(mode);
3812
3813 ::fidl_next::Wire::zero_padding(path);
3814
3815 ::fidl_next::Wire::zero_padding(object);
3816
3817 unsafe {
3818 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
3819 }
3820 }
3821 }
3822
3823 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryDeprecatedOpenRequest<'de>
3824 where
3825 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3826 ___D: ::fidl_next::Decoder<'de>,
3827 ___D: ::fidl_next::fuchsia::HandleDecoder,
3828 {
3829 fn decode(
3830 slot_: ::fidl_next::Slot<'_, Self>,
3831 decoder_: &mut ___D,
3832 _: (),
3833 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3834 if slot_.as_bytes()[28..32] != [0u8; 4] {
3835 return Err(::fidl_next::DecodeError::InvalidPadding);
3836 }
3837
3838 ::fidl_next::munge! {
3839 let Self {
3840 mut flags,
3841 mut mode,
3842 mut path,
3843 mut object,
3844
3845 } = slot_;
3846 }
3847
3848 let _field = flags.as_mut();
3849
3850 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3851
3852 let _field = mode.as_mut();
3853
3854 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3855
3856 let _field = path.as_mut();
3857 ::fidl_next::Constrained::validate(_field, 4095)?;
3858 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3859
3860 let path = unsafe { path.deref_unchecked() };
3861
3862 if path.len() > 4095 {
3863 return Err(::fidl_next::DecodeError::VectorTooLong {
3864 size: path.len() as u64,
3865 limit: 4095,
3866 });
3867 }
3868
3869 let _field = object.as_mut();
3870
3871 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3872
3873 Ok(())
3874 }
3875 }
3876
3877 impl<'de> ::fidl_next::IntoNatural for DirectoryDeprecatedOpenRequest<'de> {
3878 type Natural = crate::natural::DirectoryDeprecatedOpenRequest;
3879 }
3880
3881 #[derive(Debug)]
3883 #[repr(C)]
3884 pub struct DirectoryCreateSymlinkRequest<'de> {
3885 pub name: ::fidl_next::wire::String<'de>,
3886
3887 pub target: ::fidl_next::wire::Vector<'de, u8>,
3888
3889 pub connection:
3890 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
3891 }
3892
3893 static_assertions::const_assert_eq!(
3894 std::mem::size_of::<DirectoryCreateSymlinkRequest<'_>>(),
3895 40
3896 );
3897 static_assertions::const_assert_eq!(
3898 std::mem::align_of::<DirectoryCreateSymlinkRequest<'_>>(),
3899 8
3900 );
3901
3902 static_assertions::const_assert_eq!(
3903 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, name),
3904 0
3905 );
3906
3907 static_assertions::const_assert_eq!(
3908 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, target),
3909 16
3910 );
3911
3912 static_assertions::const_assert_eq!(
3913 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, connection),
3914 32
3915 );
3916
3917 impl ::fidl_next::Constrained for DirectoryCreateSymlinkRequest<'_> {
3918 type Constraint = ();
3919
3920 fn validate(
3921 _: ::fidl_next::Slot<'_, Self>,
3922 _: Self::Constraint,
3923 ) -> Result<(), ::fidl_next::ValidationError> {
3924 Ok(())
3925 }
3926 }
3927
3928 unsafe impl ::fidl_next::Wire for DirectoryCreateSymlinkRequest<'static> {
3929 type Narrowed<'de> = DirectoryCreateSymlinkRequest<'de>;
3930
3931 #[inline]
3932 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3933 ::fidl_next::munge! {
3934 let Self {
3935 name,
3936 target,
3937 connection,
3938
3939 } = &mut *out_;
3940 }
3941
3942 ::fidl_next::Wire::zero_padding(name);
3943
3944 ::fidl_next::Wire::zero_padding(target);
3945
3946 ::fidl_next::Wire::zero_padding(connection);
3947
3948 unsafe {
3949 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3950 }
3951 }
3952 }
3953
3954 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryCreateSymlinkRequest<'de>
3955 where
3956 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3957 ___D: ::fidl_next::Decoder<'de>,
3958 ___D: ::fidl_next::fuchsia::HandleDecoder,
3959 {
3960 fn decode(
3961 slot_: ::fidl_next::Slot<'_, Self>,
3962 decoder_: &mut ___D,
3963 _: (),
3964 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3965 if slot_.as_bytes()[36..40] != [0u8; 4] {
3966 return Err(::fidl_next::DecodeError::InvalidPadding);
3967 }
3968
3969 ::fidl_next::munge! {
3970 let Self {
3971 mut name,
3972 mut target,
3973 mut connection,
3974
3975 } = slot_;
3976 }
3977
3978 let _field = name.as_mut();
3979 ::fidl_next::Constrained::validate(_field, 255)?;
3980 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
3981
3982 let name = unsafe { name.deref_unchecked() };
3983
3984 if name.len() > 255 {
3985 return Err(::fidl_next::DecodeError::VectorTooLong {
3986 size: name.len() as u64,
3987 limit: 255,
3988 });
3989 }
3990
3991 let _field = target.as_mut();
3992 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
3993 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
3994
3995 let target = unsafe { target.deref_unchecked() };
3996
3997 if target.len() > 4095 {
3998 return Err(::fidl_next::DecodeError::VectorTooLong {
3999 size: target.len() as u64,
4000 limit: 4095,
4001 });
4002 }
4003
4004 let _field = connection.as_mut();
4005
4006 ::fidl_next::Decode::decode(connection.as_mut(), decoder_, ())?;
4007
4008 Ok(())
4009 }
4010 }
4011
4012 impl<'de> ::fidl_next::IntoNatural for DirectoryCreateSymlinkRequest<'de> {
4013 type Natural = crate::natural::DirectoryCreateSymlinkRequest;
4014 }
4015
4016 #[derive(Debug)]
4018 #[repr(C)]
4019 pub struct FileGetBackingMemoryResponse {
4020 pub vmo: ::fidl_next::wire::fuchsia::Vmo,
4021 }
4022
4023 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryResponse>(), 4);
4024 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryResponse>(), 4);
4025
4026 static_assertions::const_assert_eq!(std::mem::offset_of!(FileGetBackingMemoryResponse, vmo), 0);
4027
4028 impl ::fidl_next::Constrained for FileGetBackingMemoryResponse {
4029 type Constraint = ();
4030
4031 fn validate(
4032 _: ::fidl_next::Slot<'_, Self>,
4033 _: Self::Constraint,
4034 ) -> Result<(), ::fidl_next::ValidationError> {
4035 Ok(())
4036 }
4037 }
4038
4039 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryResponse {
4040 type Narrowed<'de> = FileGetBackingMemoryResponse;
4041
4042 #[inline]
4043 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4044 ::fidl_next::munge! {
4045 let Self {
4046 vmo,
4047
4048 } = &mut *out_;
4049 }
4050
4051 ::fidl_next::Wire::zero_padding(vmo);
4052 }
4053 }
4054
4055 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryResponse
4056 where
4057 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4058 ___D: ::fidl_next::fuchsia::HandleDecoder,
4059 {
4060 fn decode(
4061 slot_: ::fidl_next::Slot<'_, Self>,
4062 decoder_: &mut ___D,
4063 _: (),
4064 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4065 ::fidl_next::munge! {
4066 let Self {
4067 mut vmo,
4068
4069 } = slot_;
4070 }
4071
4072 let _field = vmo.as_mut();
4073
4074 ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
4075
4076 Ok(())
4077 }
4078 }
4079
4080 impl ::fidl_next::IntoNatural for FileGetBackingMemoryResponse {
4081 type Natural = crate::natural::FileGetBackingMemoryResponse;
4082 }
4083
4084 #[derive(Debug)]
4086 #[repr(C)]
4087 pub struct LinkableLinkIntoRequest<'de> {
4088 pub dst_parent_token: ::fidl_next::wire::fuchsia::Event,
4089
4090 pub dst: ::fidl_next::wire::String<'de>,
4091 }
4092
4093 static_assertions::const_assert_eq!(std::mem::size_of::<LinkableLinkIntoRequest<'_>>(), 24);
4094 static_assertions::const_assert_eq!(std::mem::align_of::<LinkableLinkIntoRequest<'_>>(), 8);
4095
4096 static_assertions::const_assert_eq!(
4097 std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst_parent_token),
4098 0
4099 );
4100
4101 static_assertions::const_assert_eq!(std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst), 8);
4102
4103 impl ::fidl_next::Constrained for LinkableLinkIntoRequest<'_> {
4104 type Constraint = ();
4105
4106 fn validate(
4107 _: ::fidl_next::Slot<'_, Self>,
4108 _: Self::Constraint,
4109 ) -> Result<(), ::fidl_next::ValidationError> {
4110 Ok(())
4111 }
4112 }
4113
4114 unsafe impl ::fidl_next::Wire for LinkableLinkIntoRequest<'static> {
4115 type Narrowed<'de> = LinkableLinkIntoRequest<'de>;
4116
4117 #[inline]
4118 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4119 ::fidl_next::munge! {
4120 let Self {
4121 dst_parent_token,
4122 dst,
4123
4124 } = &mut *out_;
4125 }
4126
4127 ::fidl_next::Wire::zero_padding(dst_parent_token);
4128
4129 ::fidl_next::Wire::zero_padding(dst);
4130
4131 unsafe {
4132 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
4133 }
4134 }
4135 }
4136
4137 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LinkableLinkIntoRequest<'de>
4138 where
4139 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4140 ___D: ::fidl_next::Decoder<'de>,
4141 ___D: ::fidl_next::fuchsia::HandleDecoder,
4142 {
4143 fn decode(
4144 slot_: ::fidl_next::Slot<'_, Self>,
4145 decoder_: &mut ___D,
4146 _: (),
4147 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4148 if slot_.as_bytes()[4..8] != [0u8; 4] {
4149 return Err(::fidl_next::DecodeError::InvalidPadding);
4150 }
4151
4152 ::fidl_next::munge! {
4153 let Self {
4154 mut dst_parent_token,
4155 mut dst,
4156
4157 } = slot_;
4158 }
4159
4160 let _field = dst_parent_token.as_mut();
4161
4162 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
4163
4164 let _field = dst.as_mut();
4165 ::fidl_next::Constrained::validate(_field, 255)?;
4166 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
4167
4168 let dst = unsafe { dst.deref_unchecked() };
4169
4170 if dst.len() > 255 {
4171 return Err(::fidl_next::DecodeError::VectorTooLong {
4172 size: dst.len() as u64,
4173 limit: 255,
4174 });
4175 }
4176
4177 Ok(())
4178 }
4179 }
4180
4181 impl<'de> ::fidl_next::IntoNatural for LinkableLinkIntoRequest<'de> {
4182 type Natural = crate::natural::LinkableLinkIntoRequest;
4183 }
4184
4185 #[derive(Debug)]
4187 #[repr(C)]
4188 pub struct FileAllocateRequest {
4189 pub offset: ::fidl_next::wire::Uint64,
4190
4191 pub length: ::fidl_next::wire::Uint64,
4192
4193 pub mode: crate::wire::AllocateMode,
4194 }
4195
4196 static_assertions::const_assert_eq!(std::mem::size_of::<FileAllocateRequest>(), 24);
4197 static_assertions::const_assert_eq!(std::mem::align_of::<FileAllocateRequest>(), 8);
4198
4199 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, offset), 0);
4200
4201 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, length), 8);
4202
4203 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, mode), 16);
4204
4205 impl ::fidl_next::Constrained for FileAllocateRequest {
4206 type Constraint = ();
4207
4208 fn validate(
4209 _: ::fidl_next::Slot<'_, Self>,
4210 _: Self::Constraint,
4211 ) -> Result<(), ::fidl_next::ValidationError> {
4212 Ok(())
4213 }
4214 }
4215
4216 unsafe impl ::fidl_next::Wire for FileAllocateRequest {
4217 type Narrowed<'de> = FileAllocateRequest;
4218
4219 #[inline]
4220 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4221 ::fidl_next::munge! {
4222 let Self {
4223 offset,
4224 length,
4225 mode,
4226
4227 } = &mut *out_;
4228 }
4229
4230 ::fidl_next::Wire::zero_padding(offset);
4231
4232 ::fidl_next::Wire::zero_padding(length);
4233
4234 ::fidl_next::Wire::zero_padding(mode);
4235
4236 unsafe {
4237 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4238 }
4239 }
4240 }
4241
4242 unsafe impl<___D> ::fidl_next::Decode<___D> for FileAllocateRequest
4243 where
4244 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4245 ___D: ::fidl_next::fuchsia::HandleDecoder,
4246 {
4247 fn decode(
4248 slot_: ::fidl_next::Slot<'_, Self>,
4249 decoder_: &mut ___D,
4250 _: (),
4251 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4252 if slot_.as_bytes()[20..24] != [0u8; 4] {
4253 return Err(::fidl_next::DecodeError::InvalidPadding);
4254 }
4255
4256 ::fidl_next::munge! {
4257 let Self {
4258 mut offset,
4259 mut length,
4260 mut mode,
4261
4262 } = slot_;
4263 }
4264
4265 let _field = offset.as_mut();
4266
4267 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
4268
4269 let _field = length.as_mut();
4270
4271 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
4272
4273 let _field = mode.as_mut();
4274
4275 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
4276
4277 Ok(())
4278 }
4279 }
4280
4281 impl ::fidl_next::IntoNatural for FileAllocateRequest {
4282 type Natural = crate::natural::FileAllocateRequest;
4283 }
4284
4285 #[derive(Debug)]
4287 #[repr(C)]
4288 pub struct FileEnableVerityRequest<'de> {
4289 pub options: crate::wire::VerificationOptions<'de>,
4290 }
4291
4292 static_assertions::const_assert_eq!(std::mem::size_of::<FileEnableVerityRequest<'_>>(), 16);
4293 static_assertions::const_assert_eq!(std::mem::align_of::<FileEnableVerityRequest<'_>>(), 8);
4294
4295 static_assertions::const_assert_eq!(
4296 std::mem::offset_of!(FileEnableVerityRequest<'_>, options),
4297 0
4298 );
4299
4300 impl ::fidl_next::Constrained for FileEnableVerityRequest<'_> {
4301 type Constraint = ();
4302
4303 fn validate(
4304 _: ::fidl_next::Slot<'_, Self>,
4305 _: Self::Constraint,
4306 ) -> Result<(), ::fidl_next::ValidationError> {
4307 Ok(())
4308 }
4309 }
4310
4311 unsafe impl ::fidl_next::Wire for FileEnableVerityRequest<'static> {
4312 type Narrowed<'de> = FileEnableVerityRequest<'de>;
4313
4314 #[inline]
4315 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4316 ::fidl_next::munge! {
4317 let Self {
4318 options,
4319
4320 } = &mut *out_;
4321 }
4322
4323 ::fidl_next::Wire::zero_padding(options);
4324 }
4325 }
4326
4327 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileEnableVerityRequest<'de>
4328 where
4329 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4330 ___D: ::fidl_next::Decoder<'de>,
4331 ___D: ::fidl_next::fuchsia::HandleDecoder,
4332 {
4333 fn decode(
4334 slot_: ::fidl_next::Slot<'_, Self>,
4335 decoder_: &mut ___D,
4336 _: (),
4337 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4338 ::fidl_next::munge! {
4339 let Self {
4340 mut options,
4341
4342 } = slot_;
4343 }
4344
4345 let _field = options.as_mut();
4346
4347 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
4348
4349 Ok(())
4350 }
4351 }
4352
4353 impl<'de> ::fidl_next::IntoNatural for FileEnableVerityRequest<'de> {
4354 type Natural = crate::natural::FileEnableVerityRequest;
4355 }
4356
4357 #[derive(Debug)]
4359 #[repr(C)]
4360 pub struct FileObject {
4361 pub event: ::fidl_next::wire::fuchsia::OptionalEvent,
4362
4363 pub stream: ::fidl_next::wire::fuchsia::OptionalStream,
4364 }
4365
4366 static_assertions::const_assert_eq!(std::mem::size_of::<FileObject>(), 8);
4367 static_assertions::const_assert_eq!(std::mem::align_of::<FileObject>(), 4);
4368
4369 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, event), 0);
4370
4371 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, stream), 4);
4372
4373 impl ::fidl_next::Constrained for FileObject {
4374 type Constraint = ();
4375
4376 fn validate(
4377 _: ::fidl_next::Slot<'_, Self>,
4378 _: Self::Constraint,
4379 ) -> Result<(), ::fidl_next::ValidationError> {
4380 Ok(())
4381 }
4382 }
4383
4384 unsafe impl ::fidl_next::Wire for FileObject {
4385 type Narrowed<'de> = FileObject;
4386
4387 #[inline]
4388 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4389 ::fidl_next::munge! {
4390 let Self {
4391 event,
4392 stream,
4393
4394 } = &mut *out_;
4395 }
4396
4397 ::fidl_next::Wire::zero_padding(event);
4398
4399 ::fidl_next::Wire::zero_padding(stream);
4400 }
4401 }
4402
4403 unsafe impl<___D> ::fidl_next::Decode<___D> for FileObject
4404 where
4405 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4406 ___D: ::fidl_next::fuchsia::HandleDecoder,
4407 {
4408 fn decode(
4409 slot_: ::fidl_next::Slot<'_, Self>,
4410 decoder_: &mut ___D,
4411 _: (),
4412 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4413 ::fidl_next::munge! {
4414 let Self {
4415 mut event,
4416 mut stream,
4417
4418 } = slot_;
4419 }
4420
4421 let _field = event.as_mut();
4422
4423 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
4424
4425 let _field = stream.as_mut();
4426
4427 ::fidl_next::Decode::decode(stream.as_mut(), decoder_, ())?;
4428
4429 Ok(())
4430 }
4431 }
4432
4433 impl ::fidl_next::IntoNatural for FileObject {
4434 type Natural = crate::natural::FileObject;
4435 }
4436
4437 #[repr(transparent)]
4439 pub struct NodeInfoDeprecated<'de> {
4440 pub(crate) raw: ::fidl_next::wire::Union,
4441 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4442 }
4443
4444 impl<'de> Drop for NodeInfoDeprecated<'de> {
4445 fn drop(&mut self) {
4446 match self.raw.ordinal() {
4447 1 => {
4448 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Service>() };
4449 }
4450
4451 2 => {
4452 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::FileObject>() };
4453 }
4454
4455 3 => {
4456 let _ =
4457 unsafe { self.raw.get().read_unchecked::<crate::wire::DirectoryObject>() };
4458 }
4459
4460 4 => {
4461 let _ = unsafe {
4462 self.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4463 };
4464 }
4465
4466 _ => unsafe { ::core::hint::unreachable_unchecked() },
4467 }
4468 }
4469 }
4470
4471 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4472 type Constraint = ();
4473
4474 fn validate(
4475 _: ::fidl_next::Slot<'_, Self>,
4476 _: Self::Constraint,
4477 ) -> Result<(), ::fidl_next::ValidationError> {
4478 Ok(())
4479 }
4480 }
4481
4482 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4483 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4484
4485 #[inline]
4486 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4487 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4488 ::fidl_next::wire::Union::zero_padding(raw);
4489 }
4490 }
4491
4492 pub mod node_info_deprecated {
4493 pub enum Ref<'de> {
4494 Service(&'de crate::wire::Service),
4495
4496 File(&'de crate::wire::FileObject),
4497
4498 Directory(&'de crate::wire::DirectoryObject),
4499
4500 Symlink(&'de crate::wire::SymlinkObject<'de>),
4501 }
4502 }
4503
4504 impl<'de> NodeInfoDeprecated<'de> {
4505 pub fn as_ref(&self) -> crate::wire::node_info_deprecated::Ref<'_> {
4506 match self.raw.ordinal() {
4507 1 => crate::wire::node_info_deprecated::Ref::Service(unsafe {
4508 self.raw.get().deref_unchecked::<crate::wire::Service>()
4509 }),
4510
4511 2 => crate::wire::node_info_deprecated::Ref::File(unsafe {
4512 self.raw.get().deref_unchecked::<crate::wire::FileObject>()
4513 }),
4514
4515 3 => crate::wire::node_info_deprecated::Ref::Directory(unsafe {
4516 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>()
4517 }),
4518
4519 4 => crate::wire::node_info_deprecated::Ref::Symlink(unsafe {
4520 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>()
4521 }),
4522
4523 _ => unsafe { ::core::hint::unreachable_unchecked() },
4524 }
4525 }
4526 }
4527
4528 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4529 where
4530 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4531 ___D: ::fidl_next::Decoder<'de>,
4532 ___D: ::fidl_next::fuchsia::HandleDecoder,
4533 {
4534 fn decode(
4535 mut slot: ::fidl_next::Slot<'_, Self>,
4536 decoder: &mut ___D,
4537 _: (),
4538 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4539 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4540 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4541 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4542 raw,
4543 decoder,
4544 (),
4545 )?,
4546
4547 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4548 raw,
4549 decoder,
4550 (),
4551 )?,
4552
4553 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4554 raw,
4555 decoder,
4556 (),
4557 )?,
4558
4559 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4560 raw,
4561 decoder,
4562 (),
4563 )?,
4564
4565 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
4566 }
4567
4568 Ok(())
4569 }
4570 }
4571
4572 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4573 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4574 match self.raw.ordinal() {
4575 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Service>().fmt(f) },
4576 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::FileObject>().fmt(f) },
4577 3 => unsafe {
4578 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>().fmt(f)
4579 },
4580 4 => unsafe {
4581 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>().fmt(f)
4582 },
4583 _ => unsafe { ::core::hint::unreachable_unchecked() },
4584 }
4585 }
4586 }
4587
4588 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4589 type Natural = crate::natural::NodeInfoDeprecated;
4590 }
4591}
4592
4593pub mod wire_optional {
4594
4595 pub use fidl_next_common_fuchsia_io::wire_optional::*;
4596
4597 #[repr(transparent)]
4598 pub struct ExtendedAttributeValue<'de> {
4599 pub(crate) raw: ::fidl_next::wire::Union,
4600 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4601 }
4602
4603 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
4604 type Constraint = ();
4605
4606 fn validate(
4607 _: ::fidl_next::Slot<'_, Self>,
4608 _: Self::Constraint,
4609 ) -> Result<(), ::fidl_next::ValidationError> {
4610 Ok(())
4611 }
4612 }
4613
4614 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
4615 type Narrowed<'de> = ExtendedAttributeValue<'de>;
4616
4617 #[inline]
4618 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4619 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4620 ::fidl_next::wire::Union::zero_padding(raw);
4621 }
4622 }
4623
4624 impl<'de> ExtendedAttributeValue<'de> {
4625 pub fn is_some(&self) -> bool {
4626 self.raw.is_some()
4627 }
4628
4629 pub fn is_none(&self) -> bool {
4630 self.raw.is_none()
4631 }
4632
4633 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ExtendedAttributeValue<'de>> {
4634 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4635 }
4636
4637 pub fn into_option(
4638 self,
4639 ) -> ::core::option::Option<crate::wire::ExtendedAttributeValue<'de>> {
4640 if self.is_some() {
4641 Some(crate::wire::ExtendedAttributeValue {
4642 raw: self.raw,
4643 _phantom: ::core::marker::PhantomData,
4644 })
4645 } else {
4646 None
4647 }
4648 }
4649 }
4650
4651 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
4652 where
4653 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4654 ___D: ::fidl_next::Decoder<'de>,
4655 ___D: ::fidl_next::fuchsia::HandleDecoder,
4656 {
4657 fn decode(
4658 mut slot: ::fidl_next::Slot<'_, Self>,
4659 decoder: &mut ___D,
4660 _: (),
4661 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4662 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4663 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4664 1 => {
4665 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
4666 raw,
4667 decoder,
4668 (32768, ()),
4669 )?
4670 }
4671
4672 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Vmo>(
4673 raw,
4674 decoder,
4675 (),
4676 )?,
4677
4678 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4679 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4680 }
4681
4682 Ok(())
4683 }
4684 }
4685
4686 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
4687 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4688 self.as_ref().fmt(f)
4689 }
4690 }
4691
4692 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
4693 type Natural = ::core::option::Option<crate::natural::ExtendedAttributeValue>;
4694 }
4695
4696 #[repr(transparent)]
4697 pub struct Representation<'de> {
4698 pub(crate) raw: ::fidl_next::wire::Union,
4699 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4700 }
4701
4702 impl ::fidl_next::Constrained for Representation<'_> {
4703 type Constraint = ();
4704
4705 fn validate(
4706 _: ::fidl_next::Slot<'_, Self>,
4707 _: Self::Constraint,
4708 ) -> Result<(), ::fidl_next::ValidationError> {
4709 Ok(())
4710 }
4711 }
4712
4713 unsafe impl ::fidl_next::Wire for Representation<'static> {
4714 type Narrowed<'de> = Representation<'de>;
4715
4716 #[inline]
4717 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4718 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4719 ::fidl_next::wire::Union::zero_padding(raw);
4720 }
4721 }
4722
4723 impl<'de> Representation<'de> {
4724 pub fn is_some(&self) -> bool {
4725 self.raw.is_some()
4726 }
4727
4728 pub fn is_none(&self) -> bool {
4729 self.raw.is_none()
4730 }
4731
4732 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Representation<'de>> {
4733 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4734 }
4735
4736 pub fn into_option(self) -> ::core::option::Option<crate::wire::Representation<'de>> {
4737 if self.is_some() {
4738 Some(crate::wire::Representation {
4739 raw: self.raw,
4740 _phantom: ::core::marker::PhantomData,
4741 })
4742 } else {
4743 None
4744 }
4745 }
4746 }
4747
4748 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
4749 where
4750 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4751 ___D: ::fidl_next::Decoder<'de>,
4752 ___D: ::fidl_next::fuchsia::HandleDecoder,
4753 {
4754 fn decode(
4755 mut slot: ::fidl_next::Slot<'_, Self>,
4756 decoder: &mut ___D,
4757 _: (),
4758 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4759 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4760 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4761 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
4762 raw,
4763 decoder,
4764 (),
4765 )?,
4766
4767 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
4768 raw,
4769 decoder,
4770 (),
4771 )?,
4772
4773 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
4774 raw,
4775 decoder,
4776 (),
4777 )?,
4778
4779 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
4780 raw,
4781 decoder,
4782 (),
4783 )?,
4784
4785 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4786 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4787 }
4788
4789 Ok(())
4790 }
4791 }
4792
4793 impl<'de> ::core::fmt::Debug for Representation<'de> {
4794 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4795 self.as_ref().fmt(f)
4796 }
4797 }
4798
4799 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
4800 type Natural = ::core::option::Option<crate::natural::Representation>;
4801 }
4802
4803 #[repr(transparent)]
4804 pub struct NodeInfoDeprecated<'de> {
4805 pub(crate) raw: ::fidl_next::wire::Union,
4806 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4807 }
4808
4809 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4810 type Constraint = ();
4811
4812 fn validate(
4813 _: ::fidl_next::Slot<'_, Self>,
4814 _: Self::Constraint,
4815 ) -> Result<(), ::fidl_next::ValidationError> {
4816 Ok(())
4817 }
4818 }
4819
4820 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4821 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4822
4823 #[inline]
4824 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4825 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4826 ::fidl_next::wire::Union::zero_padding(raw);
4827 }
4828 }
4829
4830 impl<'de> NodeInfoDeprecated<'de> {
4831 pub fn is_some(&self) -> bool {
4832 self.raw.is_some()
4833 }
4834
4835 pub fn is_none(&self) -> bool {
4836 self.raw.is_none()
4837 }
4838
4839 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::NodeInfoDeprecated<'de>> {
4840 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4841 }
4842
4843 pub fn into_option(self) -> ::core::option::Option<crate::wire::NodeInfoDeprecated<'de>> {
4844 if self.is_some() {
4845 Some(crate::wire::NodeInfoDeprecated {
4846 raw: self.raw,
4847 _phantom: ::core::marker::PhantomData,
4848 })
4849 } else {
4850 None
4851 }
4852 }
4853 }
4854
4855 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4856 where
4857 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4858 ___D: ::fidl_next::Decoder<'de>,
4859 ___D: ::fidl_next::fuchsia::HandleDecoder,
4860 {
4861 fn decode(
4862 mut slot: ::fidl_next::Slot<'_, Self>,
4863 decoder: &mut ___D,
4864 _: (),
4865 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4866 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4867 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4868 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4869 raw,
4870 decoder,
4871 (),
4872 )?,
4873
4874 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4875 raw,
4876 decoder,
4877 (),
4878 )?,
4879
4880 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4881 raw,
4882 decoder,
4883 (),
4884 )?,
4885
4886 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4887 raw,
4888 decoder,
4889 (),
4890 )?,
4891
4892 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4893 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4894 }
4895
4896 Ok(())
4897 }
4898 }
4899
4900 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4901 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4902 self.as_ref().fmt(f)
4903 }
4904 }
4905
4906 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4907 type Natural = ::core::option::Option<crate::natural::NodeInfoDeprecated>;
4908 }
4909}
4910
4911pub mod generic {
4912
4913 pub use fidl_next_common_fuchsia_io::generic::*;
4914
4915 pub struct DirectoryGetTokenResponse<T0, T1> {
4917 pub s: T0,
4918
4919 pub token: T1,
4920 }
4921
4922 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>
4923 for DirectoryGetTokenResponse<T0, T1>
4924 where
4925 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4926 ___E: ::fidl_next::fuchsia::HandleEncoder,
4927 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
4928 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
4929 {
4930 #[inline]
4931 fn encode(
4932 self,
4933 encoder_: &mut ___E,
4934 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryGetTokenResponse>,
4935 _: (),
4936 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4937 ::fidl_next::munge! {
4938 let crate::wire::DirectoryGetTokenResponse {
4939 s,
4940 token,
4941
4942 } = out_;
4943 }
4944
4945 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4946
4947 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
4948
4949 Ok(())
4950 }
4951 }
4952
4953 pub struct DirectoryLinkRequest<T0, T1, T2> {
4955 pub src: T0,
4956
4957 pub dst_parent_token: T1,
4958
4959 pub dst: T2,
4960 }
4961
4962 unsafe impl<___E, T0, T1, T2>
4963 ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
4964 for DirectoryLinkRequest<T0, T1, T2>
4965 where
4966 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4967 ___E: ::fidl_next::Encoder,
4968 ___E: ::fidl_next::fuchsia::HandleEncoder,
4969 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4970 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
4971 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4972 {
4973 #[inline]
4974 fn encode(
4975 self,
4976 encoder_: &mut ___E,
4977 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
4978 _: (),
4979 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4980 ::fidl_next::munge! {
4981 let crate::wire::DirectoryLinkRequest {
4982 src,
4983 dst_parent_token,
4984 dst,
4985
4986 } = out_;
4987 }
4988
4989 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
4990
4991 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
4992
4993 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
4994
4995 Ok(())
4996 }
4997 }
4998
4999 pub struct DirectoryRenameRequest<T0, T1, T2> {
5001 pub src: T0,
5002
5003 pub dst_parent_token: T1,
5004
5005 pub dst: T2,
5006 }
5007
5008 unsafe impl<___E, T0, T1, T2>
5009 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
5010 for DirectoryRenameRequest<T0, T1, T2>
5011 where
5012 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5013 ___E: ::fidl_next::Encoder,
5014 ___E: ::fidl_next::fuchsia::HandleEncoder,
5015 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5016 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5017 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5018 {
5019 #[inline]
5020 fn encode(
5021 self,
5022 encoder_: &mut ___E,
5023 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
5024 _: (),
5025 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5026 ::fidl_next::munge! {
5027 let crate::wire::DirectoryRenameRequest {
5028 src,
5029 dst_parent_token,
5030 dst,
5031
5032 } = out_;
5033 }
5034
5035 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5036
5037 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5038
5039 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5040
5041 Ok(())
5042 }
5043 }
5044
5045 pub struct DirectoryWatchRequest<T0, T1, T2> {
5047 pub mask: T0,
5048
5049 pub options: T1,
5050
5051 pub watcher: T2,
5052 }
5053
5054 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
5055 for DirectoryWatchRequest<T0, T1, T2>
5056 where
5057 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5058 ___E: ::fidl_next::fuchsia::HandleEncoder,
5059 T0: ::fidl_next::Encode<crate::wire::WatchMask, ___E>,
5060 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5061 T2: ::fidl_next::Encode<
5062 ::fidl_next::ServerEnd<
5063 crate::DirectoryWatcher,
5064 ::fidl_next::wire::fuchsia::Channel,
5065 >,
5066 ___E,
5067 >,
5068 {
5069 #[inline]
5070 fn encode(
5071 self,
5072 encoder_: &mut ___E,
5073 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
5074 _: (),
5075 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5076 ::fidl_next::munge! {
5077 let crate::wire::DirectoryWatchRequest {
5078 mask,
5079 options,
5080 watcher,
5081
5082 } = out_;
5083 }
5084
5085 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
5086
5087 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5088
5089 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
5090
5091 Ok(())
5092 }
5093 }
5094
5095 pub struct NodeOnOpenRequest<T0, T1> {
5097 pub s: T0,
5098
5099 pub info: T1,
5100 }
5101
5102 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
5103 for NodeOnOpenRequest<T0, T1>
5104 where
5105 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5106 ___E: ::fidl_next::Encoder,
5107 ___E: ::fidl_next::fuchsia::HandleEncoder,
5108 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5109 T1: ::fidl_next::Encode<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>,
5110 {
5111 #[inline]
5112 fn encode(
5113 self,
5114 encoder_: &mut ___E,
5115 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
5116 _: (),
5117 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5118 ::fidl_next::munge! {
5119 let crate::wire::NodeOnOpenRequest {
5120 s,
5121 info,
5122
5123 } = out_;
5124 }
5125
5126 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5127
5128 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
5129
5130 Ok(())
5131 }
5132 }
5133
5134 pub struct NodeListExtendedAttributesRequest<T0> {
5136 pub iterator: T0,
5137 }
5138
5139 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
5140 for NodeListExtendedAttributesRequest<T0>
5141 where
5142 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5143 ___E: ::fidl_next::fuchsia::HandleEncoder,
5144 T0: ::fidl_next::Encode<
5145 ::fidl_next::ServerEnd<
5146 crate::ExtendedAttributeIterator,
5147 ::fidl_next::wire::fuchsia::Channel,
5148 >,
5149 ___E,
5150 >,
5151 {
5152 #[inline]
5153 fn encode(
5154 self,
5155 encoder_: &mut ___E,
5156 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
5157 _: (),
5158 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5159 ::fidl_next::munge! {
5160 let crate::wire::NodeListExtendedAttributesRequest {
5161 iterator,
5162
5163 } = out_;
5164 }
5165
5166 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
5167
5168 Ok(())
5169 }
5170 }
5171
5172 pub struct NodeSetExtendedAttributeRequest<T0, T1, T2> {
5174 pub name: T0,
5175
5176 pub value: T1,
5177
5178 pub mode: T2,
5179 }
5180
5181 unsafe impl<___E, T0, T1, T2>
5182 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
5183 for NodeSetExtendedAttributeRequest<T0, T1, T2>
5184 where
5185 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5186 ___E: ::fidl_next::Encoder,
5187 ___E: ::fidl_next::fuchsia::HandleEncoder,
5188 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5189 T1: ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
5190 T2: ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>,
5191 {
5192 #[inline]
5193 fn encode(
5194 self,
5195 encoder_: &mut ___E,
5196 out_: &mut ::core::mem::MaybeUninit<
5197 crate::wire::NodeSetExtendedAttributeRequest<'static>,
5198 >,
5199 _: (),
5200 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5201 ::fidl_next::munge! {
5202 let crate::wire::NodeSetExtendedAttributeRequest {
5203 name,
5204 value,
5205 mode,
5206
5207 } = out_;
5208 }
5209
5210 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
5211
5212 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
5213
5214 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5215
5216 Ok(())
5217 }
5218 }
5219
5220 pub struct DirectoryOpenRequest<T0, T1, T2, T3> {
5222 pub path: T0,
5223
5224 pub flags: T1,
5225
5226 pub options: T2,
5227
5228 pub object: T3,
5229 }
5230
5231 unsafe impl<___E, T0, T1, T2, T3>
5232 ::fidl_next::Encode<crate::wire::DirectoryOpenRequest<'static>, ___E>
5233 for DirectoryOpenRequest<T0, T1, T2, T3>
5234 where
5235 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5236 ___E: ::fidl_next::Encoder,
5237 ___E: ::fidl_next::fuchsia::HandleEncoder,
5238 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5239 T1: ::fidl_next::Encode<crate::wire::Flags, ___E>,
5240 T2: ::fidl_next::Encode<crate::wire::Options<'static>, ___E>,
5241 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
5242 {
5243 #[inline]
5244 fn encode(
5245 self,
5246 encoder_: &mut ___E,
5247 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryOpenRequest<'static>>,
5248 _: (),
5249 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5250 ::fidl_next::munge! {
5251 let crate::wire::DirectoryOpenRequest {
5252 path,
5253 flags,
5254 options,
5255 object,
5256
5257 } = out_;
5258 }
5259
5260 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5261
5262 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5263
5264 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5265
5266 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5267
5268 Ok(())
5269 }
5270 }
5271
5272 pub struct NodeDeprecatedCloneRequest<T0, T1> {
5274 pub flags: T0,
5275
5276 pub object: T1,
5277 }
5278
5279 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
5280 for NodeDeprecatedCloneRequest<T0, T1>
5281 where
5282 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5283 ___E: ::fidl_next::fuchsia::HandleEncoder,
5284 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5285 T1: ::fidl_next::Encode<
5286 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5287 ___E,
5288 >,
5289 {
5290 #[inline]
5291 fn encode(
5292 self,
5293 encoder_: &mut ___E,
5294 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
5295 _: (),
5296 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5297 ::fidl_next::munge! {
5298 let crate::wire::NodeDeprecatedCloneRequest {
5299 flags,
5300 object,
5301
5302 } = out_;
5303 }
5304
5305 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5306
5307 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5308
5309 Ok(())
5310 }
5311 }
5312
5313 pub struct DirectoryDeprecatedOpenRequest<T0, T1, T2, T3> {
5315 pub flags: T0,
5316
5317 pub mode: T1,
5318
5319 pub path: T2,
5320
5321 pub object: T3,
5322 }
5323
5324 unsafe impl<___E, T0, T1, T2, T3>
5325 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
5326 for DirectoryDeprecatedOpenRequest<T0, T1, T2, T3>
5327 where
5328 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5329 ___E: ::fidl_next::Encoder,
5330 ___E: ::fidl_next::fuchsia::HandleEncoder,
5331 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5332 T1: ::fidl_next::Encode<crate::wire::ModeType, ___E>,
5333 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5334 T3: ::fidl_next::Encode<
5335 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5336 ___E,
5337 >,
5338 {
5339 #[inline]
5340 fn encode(
5341 self,
5342 encoder_: &mut ___E,
5343 out_: &mut ::core::mem::MaybeUninit<
5344 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
5345 >,
5346 _: (),
5347 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5348 ::fidl_next::munge! {
5349 let crate::wire::DirectoryDeprecatedOpenRequest {
5350 flags,
5351 mode,
5352 path,
5353 object,
5354
5355 } = out_;
5356 }
5357
5358 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5359
5360 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5361
5362 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5363
5364 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5365
5366 Ok(())
5367 }
5368 }
5369
5370 pub struct DirectoryCreateSymlinkRequest<T0, T1, T2> {
5372 pub name: T0,
5373
5374 pub target: T1,
5375
5376 pub connection: T2,
5377 }
5378
5379 unsafe impl<___E, T0, T1, T2>
5380 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
5381 for DirectoryCreateSymlinkRequest<T0, T1, T2>
5382 where
5383 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5384 ___E: ::fidl_next::Encoder,
5385 ___E: ::fidl_next::fuchsia::HandleEncoder,
5386 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5387 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5388 T2: ::fidl_next::Encode<
5389 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
5390 ___E,
5391 >,
5392 {
5393 #[inline]
5394 fn encode(
5395 self,
5396 encoder_: &mut ___E,
5397 out_: &mut ::core::mem::MaybeUninit<
5398 crate::wire::DirectoryCreateSymlinkRequest<'static>,
5399 >,
5400 _: (),
5401 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5402 ::fidl_next::munge! {
5403 let crate::wire::DirectoryCreateSymlinkRequest {
5404 name,
5405 target,
5406 connection,
5407
5408 } = out_;
5409 }
5410
5411 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
5412
5413 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
5414
5415 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
5416
5417 Ok(())
5418 }
5419 }
5420
5421 pub struct FileGetBackingMemoryResponse<T0> {
5423 pub vmo: T0,
5424 }
5425
5426 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
5427 for FileGetBackingMemoryResponse<T0>
5428 where
5429 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5430 ___E: ::fidl_next::fuchsia::HandleEncoder,
5431 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
5432 {
5433 #[inline]
5434 fn encode(
5435 self,
5436 encoder_: &mut ___E,
5437 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
5438 _: (),
5439 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5440 ::fidl_next::munge! {
5441 let crate::wire::FileGetBackingMemoryResponse {
5442 vmo,
5443
5444 } = out_;
5445 }
5446
5447 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
5448
5449 Ok(())
5450 }
5451 }
5452
5453 pub struct LinkableLinkIntoRequest<T0, T1> {
5455 pub dst_parent_token: T0,
5456
5457 pub dst: T1,
5458 }
5459
5460 unsafe impl<___E, T0, T1>
5461 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
5462 for LinkableLinkIntoRequest<T0, T1>
5463 where
5464 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5465 ___E: ::fidl_next::Encoder,
5466 ___E: ::fidl_next::fuchsia::HandleEncoder,
5467 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5468 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5469 {
5470 #[inline]
5471 fn encode(
5472 self,
5473 encoder_: &mut ___E,
5474 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
5475 _: (),
5476 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5477 ::fidl_next::munge! {
5478 let crate::wire::LinkableLinkIntoRequest {
5479 dst_parent_token,
5480 dst,
5481
5482 } = out_;
5483 }
5484
5485 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5486
5487 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5488
5489 Ok(())
5490 }
5491 }
5492
5493 pub struct FileAllocateRequest<T0, T1, T2> {
5495 pub offset: T0,
5496
5497 pub length: T1,
5498
5499 pub mode: T2,
5500 }
5501
5502 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
5503 for FileAllocateRequest<T0, T1, T2>
5504 where
5505 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5506 ___E: ::fidl_next::fuchsia::HandleEncoder,
5507 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5508 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5509 T2: ::fidl_next::Encode<crate::wire::AllocateMode, ___E>,
5510 {
5511 #[inline]
5512 fn encode(
5513 self,
5514 encoder_: &mut ___E,
5515 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
5516 _: (),
5517 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5518 ::fidl_next::munge! {
5519 let crate::wire::FileAllocateRequest {
5520 offset,
5521 length,
5522 mode,
5523
5524 } = out_;
5525 }
5526
5527 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
5528
5529 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
5530
5531 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5532
5533 Ok(())
5534 }
5535 }
5536
5537 pub struct FileEnableVerityRequest<T0> {
5539 pub options: T0,
5540 }
5541
5542 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
5543 for FileEnableVerityRequest<T0>
5544 where
5545 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5546 ___E: ::fidl_next::Encoder,
5547 ___E: ::fidl_next::fuchsia::HandleEncoder,
5548 T0: ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>,
5549 {
5550 #[inline]
5551 fn encode(
5552 self,
5553 encoder_: &mut ___E,
5554 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
5555 _: (),
5556 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5557 ::fidl_next::munge! {
5558 let crate::wire::FileEnableVerityRequest {
5559 options,
5560
5561 } = out_;
5562 }
5563
5564 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5565
5566 Ok(())
5567 }
5568 }
5569
5570 pub struct FileObject<T0, T1> {
5572 pub event: T0,
5573
5574 pub stream: T1,
5575 }
5576
5577 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject<T0, T1>
5578 where
5579 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5580 ___E: ::fidl_next::fuchsia::HandleEncoder,
5581 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
5582 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalStream, ___E>,
5583 {
5584 #[inline]
5585 fn encode(
5586 self,
5587 encoder_: &mut ___E,
5588 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
5589 _: (),
5590 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5591 ::fidl_next::munge! {
5592 let crate::wire::FileObject {
5593 event,
5594 stream,
5595
5596 } = out_;
5597 }
5598
5599 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
5600
5601 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
5602
5603 Ok(())
5604 }
5605 }
5606}
5607
5608pub use self::natural::*;
5609
5610#[doc = " Node defines the minimal interface for entities which can be accessed in a filesystem.\n"]
5612#[derive(PartialEq, Debug)]
5613pub struct Node;
5614
5615impl ::fidl_next::Discoverable for Node {
5616 const PROTOCOL_NAME: &'static str = "fuchsia.io.Node";
5617}
5618
5619#[cfg(target_os = "fuchsia")]
5620impl ::fidl_next::HasTransport for Node {
5621 type Transport = ::fidl_next::fuchsia::zx::Channel;
5622}
5623
5624pub mod node {
5625 pub mod prelude {
5626 pub use crate::{Node, NodeClientHandler, NodeServerHandler, node};
5627
5628 pub use crate::natural::ExtendedAttributeValue;
5629
5630 pub use crate::natural::MutableNodeAttributes;
5631
5632 pub use crate::natural::NodeAttributes2;
5633
5634 pub use crate::natural::NodeDeprecatedCloneRequest;
5635
5636 pub use crate::natural::NodeDeprecatedGetAttrResponse;
5637
5638 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
5639
5640 pub use crate::natural::NodeDeprecatedSetAttrRequest;
5641
5642 pub use crate::natural::NodeDeprecatedSetAttrResponse;
5643
5644 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
5645
5646 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
5647
5648 pub use crate::natural::NodeGetAttributesRequest;
5649
5650 pub use crate::natural::NodeGetExtendedAttributeRequest;
5651
5652 pub use crate::natural::NodeListExtendedAttributesRequest;
5653
5654 pub use crate::natural::NodeOnOpenRequest;
5655
5656 pub use crate::natural::NodeQueryFilesystemResponse;
5657
5658 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
5659
5660 pub use crate::natural::NodeSetExtendedAttributeRequest;
5661
5662 pub use crate::natural::NodeSetFlagsRequest;
5663
5664 pub use crate::natural::NodeGetFlagsResponse;
5665
5666 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
5667
5668 pub use crate::natural::NodeSetExtendedAttributeResponse;
5669
5670 pub use crate::natural::NodeSetFlagsResponse;
5671
5672 pub use crate::natural::NodeSyncResponse;
5673
5674 pub use crate::natural::NodeUpdateAttributesResponse;
5675
5676 pub use crate::natural::Representation;
5677
5678 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
5679
5680 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
5681
5682 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
5683 }
5684
5685 pub struct Clone;
5686
5687 impl ::fidl_next::Method for Clone {
5688 const ORDINAL: u64 = 2366825959783828089;
5689 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5690 ::fidl_next::protocol::Flexibility::Strict;
5691
5692 type Protocol = crate::Node;
5693
5694 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
5695 }
5696
5697 pub struct Close;
5698
5699 impl ::fidl_next::Method for Close {
5700 const ORDINAL: u64 = 6540867515453498750;
5701 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5702 ::fidl_next::protocol::Flexibility::Strict;
5703
5704 type Protocol = crate::Node;
5705
5706 type Request = ::fidl_next::wire::EmptyMessageBody;
5707 }
5708
5709 impl ::fidl_next::TwoWayMethod for Close {
5710 type Response = ::fidl_next::wire::Result<
5711 'static,
5712 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
5713 ::fidl_next::wire::Int32,
5714 >;
5715 }
5716
5717 impl<___R> ::fidl_next::Respond<___R> for Close {
5718 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
5719
5720 fn respond(response: ___R) -> Self::Output {
5721 ::core::result::Result::Ok(response)
5722 }
5723 }
5724
5725 impl<___R> ::fidl_next::RespondErr<___R> for Close {
5726 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
5727
5728 fn respond_err(response: ___R) -> Self::Output {
5729 ::core::result::Result::Err(response)
5730 }
5731 }
5732
5733 pub struct Query;
5734
5735 impl ::fidl_next::Method for Query {
5736 const ORDINAL: u64 = 2763219980499352582;
5737 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5738 ::fidl_next::protocol::Flexibility::Strict;
5739
5740 type Protocol = crate::Node;
5741
5742 type Request = ::fidl_next::wire::EmptyMessageBody;
5743 }
5744
5745 impl ::fidl_next::TwoWayMethod for Query {
5746 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
5747 }
5748
5749 impl<___R> ::fidl_next::Respond<___R> for Query {
5750 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
5751
5752 fn respond(response: ___R) -> Self::Output {
5753 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
5754 }
5755 }
5756
5757 pub struct DeprecatedClone;
5758
5759 impl ::fidl_next::Method for DeprecatedClone {
5760 const ORDINAL: u64 = 6512600400724287855;
5761 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5762 ::fidl_next::protocol::Flexibility::Flexible;
5763
5764 type Protocol = crate::Node;
5765
5766 type Request = crate::wire::NodeDeprecatedCloneRequest;
5767 }
5768
5769 pub struct OnOpen;
5770
5771 impl ::fidl_next::Method for OnOpen {
5772 const ORDINAL: u64 = 9207534335756671346;
5773 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5774 ::fidl_next::protocol::Flexibility::Flexible;
5775
5776 type Protocol = crate::Node;
5777
5778 type Request = crate::wire::NodeOnOpenRequest<'static>;
5779 }
5780
5781 pub struct DeprecatedGetAttr;
5782
5783 impl ::fidl_next::Method for DeprecatedGetAttr {
5784 const ORDINAL: u64 = 8689798978500614909;
5785 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5786 ::fidl_next::protocol::Flexibility::Strict;
5787
5788 type Protocol = crate::Node;
5789
5790 type Request = ::fidl_next::wire::EmptyMessageBody;
5791 }
5792
5793 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
5794 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
5795 }
5796
5797 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
5798 type Output = ___R;
5799
5800 fn respond(response: ___R) -> Self::Output {
5801 response
5802 }
5803 }
5804
5805 pub struct DeprecatedSetAttr;
5806
5807 impl ::fidl_next::Method for DeprecatedSetAttr {
5808 const ORDINAL: u64 = 4721673413776871238;
5809 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5810 ::fidl_next::protocol::Flexibility::Strict;
5811
5812 type Protocol = crate::Node;
5813
5814 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
5815 }
5816
5817 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
5818 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
5819 }
5820
5821 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
5822 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
5823
5824 fn respond(response: ___R) -> Self::Output {
5825 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
5826 }
5827 }
5828
5829 pub struct DeprecatedGetFlags;
5830
5831 impl ::fidl_next::Method for DeprecatedGetFlags {
5832 const ORDINAL: u64 = 6595803110182632097;
5833 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5834 ::fidl_next::protocol::Flexibility::Strict;
5835
5836 type Protocol = crate::Node;
5837
5838 type Request = ::fidl_next::wire::EmptyMessageBody;
5839 }
5840
5841 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
5842 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
5843 }
5844
5845 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
5846 type Output = ___R;
5847
5848 fn respond(response: ___R) -> Self::Output {
5849 response
5850 }
5851 }
5852
5853 pub struct DeprecatedSetFlags;
5854
5855 impl ::fidl_next::Method for DeprecatedSetFlags {
5856 const ORDINAL: u64 = 5950864159036794675;
5857 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5858 ::fidl_next::protocol::Flexibility::Strict;
5859
5860 type Protocol = crate::Node;
5861
5862 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
5863 }
5864
5865 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
5866 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
5867 }
5868
5869 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
5870 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
5871
5872 fn respond(response: ___R) -> Self::Output {
5873 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
5874 }
5875 }
5876
5877 pub struct GetFlags;
5878
5879 impl ::fidl_next::Method for GetFlags {
5880 const ORDINAL: u64 = 105530239381466147;
5881 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5882 ::fidl_next::protocol::Flexibility::Flexible;
5883
5884 type Protocol = crate::Node;
5885
5886 type Request = ::fidl_next::wire::EmptyMessageBody;
5887 }
5888
5889 impl ::fidl_next::TwoWayMethod for GetFlags {
5890 type Response = ::fidl_next::wire::FlexibleResult<
5891 'static,
5892 crate::wire::NodeGetFlagsResponse,
5893 ::fidl_next::wire::Int32,
5894 >;
5895 }
5896
5897 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
5898 type Output = ::fidl_next::FlexibleResult<
5899 crate::generic::NodeGetFlagsResponse<___R>,
5900 ::fidl_next::util::Never,
5901 >;
5902
5903 fn respond(response: ___R) -> Self::Output {
5904 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
5905 flags: response,
5906 })
5907 }
5908 }
5909
5910 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
5911 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
5912
5913 fn respond_err(response: ___R) -> Self::Output {
5914 ::fidl_next::FlexibleResult::Err(response)
5915 }
5916 }
5917
5918 pub struct SetFlags;
5919
5920 impl ::fidl_next::Method for SetFlags {
5921 const ORDINAL: u64 = 6172186066099445416;
5922 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5923 ::fidl_next::protocol::Flexibility::Flexible;
5924
5925 type Protocol = crate::Node;
5926
5927 type Request = crate::wire::NodeSetFlagsRequest;
5928 }
5929
5930 impl ::fidl_next::TwoWayMethod for SetFlags {
5931 type Response = ::fidl_next::wire::FlexibleResult<
5932 'static,
5933 crate::wire::NodeSetFlagsResponse,
5934 ::fidl_next::wire::Int32,
5935 >;
5936 }
5937
5938 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
5939 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
5940
5941 fn respond(response: ___R) -> Self::Output {
5942 ::fidl_next::FlexibleResult::Ok(response)
5943 }
5944 }
5945
5946 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
5947 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
5948
5949 fn respond_err(response: ___R) -> Self::Output {
5950 ::fidl_next::FlexibleResult::Err(response)
5951 }
5952 }
5953
5954 pub struct QueryFilesystem;
5955
5956 impl ::fidl_next::Method for QueryFilesystem {
5957 const ORDINAL: u64 = 8013111122914313744;
5958 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5959 ::fidl_next::protocol::Flexibility::Strict;
5960
5961 type Protocol = crate::Node;
5962
5963 type Request = ::fidl_next::wire::EmptyMessageBody;
5964 }
5965
5966 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
5967 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
5968 }
5969
5970 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
5971 type Output = ___R;
5972
5973 fn respond(response: ___R) -> Self::Output {
5974 response
5975 }
5976 }
5977
5978 pub struct OnRepresentation;
5979
5980 impl ::fidl_next::Method for OnRepresentation {
5981 const ORDINAL: u64 = 6679970090861613324;
5982 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5983 ::fidl_next::protocol::Flexibility::Strict;
5984
5985 type Protocol = crate::Node;
5986
5987 type Request = crate::wire::Representation<'static>;
5988 }
5989
5990 pub struct GetAttributes;
5991
5992 impl ::fidl_next::Method for GetAttributes {
5993 const ORDINAL: u64 = 4414537700416816443;
5994 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5995 ::fidl_next::protocol::Flexibility::Strict;
5996
5997 type Protocol = crate::Node;
5998
5999 type Request = crate::wire::NodeGetAttributesRequest;
6000 }
6001
6002 impl ::fidl_next::TwoWayMethod for GetAttributes {
6003 type Response = ::fidl_next::wire::Result<
6004 'static,
6005 crate::wire::NodeAttributes2<'static>,
6006 ::fidl_next::wire::Int32,
6007 >;
6008 }
6009
6010 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
6011 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6012
6013 fn respond(response: ___R) -> Self::Output {
6014 ::core::result::Result::Ok(response)
6015 }
6016 }
6017
6018 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
6019 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6020
6021 fn respond_err(response: ___R) -> Self::Output {
6022 ::core::result::Result::Err(response)
6023 }
6024 }
6025
6026 pub struct UpdateAttributes;
6027
6028 impl ::fidl_next::Method for UpdateAttributes {
6029 const ORDINAL: u64 = 3677402239314018056;
6030 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6031 ::fidl_next::protocol::Flexibility::Strict;
6032
6033 type Protocol = crate::Node;
6034
6035 type Request = crate::wire::MutableNodeAttributes<'static>;
6036 }
6037
6038 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
6039 type Response = ::fidl_next::wire::Result<
6040 'static,
6041 crate::wire::NodeUpdateAttributesResponse,
6042 ::fidl_next::wire::Int32,
6043 >;
6044 }
6045
6046 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
6047 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6048
6049 fn respond(response: ___R) -> Self::Output {
6050 ::core::result::Result::Ok(response)
6051 }
6052 }
6053
6054 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
6055 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6056
6057 fn respond_err(response: ___R) -> Self::Output {
6058 ::core::result::Result::Err(response)
6059 }
6060 }
6061
6062 pub struct Sync;
6063
6064 impl ::fidl_next::Method for Sync {
6065 const ORDINAL: u64 = 3196473584242777161;
6066 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6067 ::fidl_next::protocol::Flexibility::Strict;
6068
6069 type Protocol = crate::Node;
6070
6071 type Request = ::fidl_next::wire::EmptyMessageBody;
6072 }
6073
6074 impl ::fidl_next::TwoWayMethod for Sync {
6075 type Response = ::fidl_next::wire::Result<
6076 'static,
6077 crate::wire::NodeSyncResponse,
6078 ::fidl_next::wire::Int32,
6079 >;
6080 }
6081
6082 impl<___R> ::fidl_next::Respond<___R> for Sync {
6083 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6084
6085 fn respond(response: ___R) -> Self::Output {
6086 ::core::result::Result::Ok(response)
6087 }
6088 }
6089
6090 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
6091 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6092
6093 fn respond_err(response: ___R) -> Self::Output {
6094 ::core::result::Result::Err(response)
6095 }
6096 }
6097
6098 pub struct ListExtendedAttributes;
6099
6100 impl ::fidl_next::Method for ListExtendedAttributes {
6101 const ORDINAL: u64 = 5431626189872037072;
6102 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6103 ::fidl_next::protocol::Flexibility::Strict;
6104
6105 type Protocol = crate::Node;
6106
6107 type Request = crate::wire::NodeListExtendedAttributesRequest;
6108 }
6109
6110 pub struct GetExtendedAttribute;
6111
6112 impl ::fidl_next::Method for GetExtendedAttribute {
6113 const ORDINAL: u64 = 5043930208506967771;
6114 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6115 ::fidl_next::protocol::Flexibility::Strict;
6116
6117 type Protocol = crate::Node;
6118
6119 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
6120 }
6121
6122 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
6123 type Response = ::fidl_next::wire::Result<
6124 'static,
6125 crate::wire::ExtendedAttributeValue<'static>,
6126 ::fidl_next::wire::Int32,
6127 >;
6128 }
6129
6130 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
6131 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6132
6133 fn respond(response: ___R) -> Self::Output {
6134 ::core::result::Result::Ok(response)
6135 }
6136 }
6137
6138 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
6139 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6140
6141 fn respond_err(response: ___R) -> Self::Output {
6142 ::core::result::Result::Err(response)
6143 }
6144 }
6145
6146 pub struct SetExtendedAttribute;
6147
6148 impl ::fidl_next::Method for SetExtendedAttribute {
6149 const ORDINAL: u64 = 5374223046099989052;
6150 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6151 ::fidl_next::protocol::Flexibility::Strict;
6152
6153 type Protocol = crate::Node;
6154
6155 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
6156 }
6157
6158 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
6159 type Response = ::fidl_next::wire::Result<
6160 'static,
6161 crate::wire::NodeSetExtendedAttributeResponse,
6162 ::fidl_next::wire::Int32,
6163 >;
6164 }
6165
6166 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
6167 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6168
6169 fn respond(response: ___R) -> Self::Output {
6170 ::core::result::Result::Ok(response)
6171 }
6172 }
6173
6174 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
6175 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6176
6177 fn respond_err(response: ___R) -> Self::Output {
6178 ::core::result::Result::Err(response)
6179 }
6180 }
6181
6182 pub struct RemoveExtendedAttribute;
6183
6184 impl ::fidl_next::Method for RemoveExtendedAttribute {
6185 const ORDINAL: u64 = 8794297771444732717;
6186 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6187 ::fidl_next::protocol::Flexibility::Strict;
6188
6189 type Protocol = crate::Node;
6190
6191 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
6192 }
6193
6194 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
6195 type Response = ::fidl_next::wire::Result<
6196 'static,
6197 crate::wire::NodeRemoveExtendedAttributeResponse,
6198 ::fidl_next::wire::Int32,
6199 >;
6200 }
6201
6202 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
6203 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6204
6205 fn respond(response: ___R) -> Self::Output {
6206 ::core::result::Result::Ok(response)
6207 }
6208 }
6209
6210 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
6211 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6212
6213 fn respond_err(response: ___R) -> Self::Output {
6214 ::core::result::Result::Err(response)
6215 }
6216 }
6217
6218 mod ___detail {
6219 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
6220 where
6221 ___T: ::fidl_next::Transport,
6222 {
6223 type Client = NodeClient<___T>;
6224 type Server = NodeServer<___T>;
6225 }
6226
6227 #[repr(transparent)]
6229 pub struct NodeClient<___T: ::fidl_next::Transport> {
6230 #[allow(dead_code)]
6231 client: ::fidl_next::protocol::Client<___T>,
6232 }
6233
6234 impl<___T> NodeClient<___T>
6235 where
6236 ___T: ::fidl_next::Transport,
6237 {
6238 pub fn clone(
6239 &self,
6240
6241 request: impl ::fidl_next::Encode<
6242 ::fidl_next::ServerEnd<
6243 ::fidl_next_fuchsia_unknown::Cloneable,
6244 ::fidl_next::wire::fuchsia::Channel,
6245 >,
6246 <___T as ::fidl_next::Transport>::SendBuffer,
6247 >,
6248 ) -> ::fidl_next::SendFuture<'_, ___T>
6249 where
6250 <___T as ::fidl_next::Transport>::SendBuffer:
6251 ::fidl_next::encoder::InternalHandleEncoder,
6252 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6253 {
6254 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
6255 request,
6256 })
6257 }
6258
6259 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6260 where
6261 ___R: ::fidl_next::Encode<
6262 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
6263 <___T as ::fidl_next::Transport>::SendBuffer,
6264 >,
6265 {
6266 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6267 2366825959783828089,
6268 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
6269 request,
6270 ))
6271 }
6272
6273 #[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"]
6274 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
6275 ::fidl_next::TwoWayFuture::from_untyped(
6276 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6277 6540867515453498750,
6278 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
6279 (),
6280 ),
6281 )
6282 }
6283
6284 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
6285 ::fidl_next::TwoWayFuture::from_untyped(
6286 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6287 2763219980499352582,
6288 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
6289 (),
6290 ),
6291 )
6292 }
6293
6294 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6295 pub fn deprecated_clone(
6296 &self,
6297
6298 flags: impl ::fidl_next::Encode<
6299 crate::wire::OpenFlags,
6300 <___T as ::fidl_next::Transport>::SendBuffer,
6301 >,
6302
6303 object: impl ::fidl_next::Encode<
6304 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
6305 <___T as ::fidl_next::Transport>::SendBuffer,
6306 >,
6307 ) -> ::fidl_next::SendFuture<'_, ___T>
6308 where
6309 <___T as ::fidl_next::Transport>::SendBuffer:
6310 ::fidl_next::encoder::InternalHandleEncoder,
6311 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6312 {
6313 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
6314 flags,
6315
6316 object,
6317 })
6318 }
6319
6320 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6321 pub fn deprecated_clone_with<___R>(
6322 &self,
6323 request: ___R,
6324 ) -> ::fidl_next::SendFuture<'_, ___T>
6325 where
6326 ___R: ::fidl_next::Encode<
6327 crate::wire::NodeDeprecatedCloneRequest,
6328 <___T as ::fidl_next::Transport>::SendBuffer,
6329 >,
6330 {
6331 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6332 6512600400724287855,
6333 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
6334 request,
6335 ))
6336 }
6337
6338 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6339 pub fn deprecated_get_attr(
6340 &self,
6341 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
6342 ::fidl_next::TwoWayFuture::from_untyped(
6343 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6344 8689798978500614909,
6345 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
6346 (),
6347 ),
6348 )
6349 }
6350
6351 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6352 pub fn deprecated_set_attr(
6353 &self,
6354
6355 flags: impl ::fidl_next::Encode<
6356 crate::wire::NodeAttributeFlags,
6357 <___T as ::fidl_next::Transport>::SendBuffer,
6358 >,
6359
6360 attributes: impl ::fidl_next::Encode<
6361 crate::wire::NodeAttributes,
6362 <___T as ::fidl_next::Transport>::SendBuffer,
6363 >,
6364 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6365 where
6366 <___T as ::fidl_next::Transport>::SendBuffer:
6367 ::fidl_next::encoder::InternalHandleEncoder,
6368 {
6369 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
6370 flags,
6371
6372 attributes,
6373 })
6374 }
6375
6376 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6377 pub fn deprecated_set_attr_with<___R>(
6378 &self,
6379 request: ___R,
6380 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6381 where
6382 ___R: ::fidl_next::Encode<
6383 crate::wire::NodeDeprecatedSetAttrRequest,
6384 <___T as ::fidl_next::Transport>::SendBuffer,
6385 >,
6386 {
6387 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6388 4721673413776871238,
6389 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
6390 request,
6391 ))
6392 }
6393
6394 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6395 pub fn deprecated_get_flags(
6396 &self,
6397 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
6398 ::fidl_next::TwoWayFuture::from_untyped(
6399 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6400 6595803110182632097,
6401 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
6402 (),
6403 ),
6404 )
6405 }
6406
6407 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6408 pub fn deprecated_set_flags(
6409 &self,
6410
6411 flags: impl ::fidl_next::Encode<
6412 crate::wire::OpenFlags,
6413 <___T as ::fidl_next::Transport>::SendBuffer,
6414 >,
6415 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6416 where
6417 <___T as ::fidl_next::Transport>::SendBuffer:
6418 ::fidl_next::encoder::InternalHandleEncoder,
6419 {
6420 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
6421 flags,
6422 })
6423 }
6424
6425 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6426 pub fn deprecated_set_flags_with<___R>(
6427 &self,
6428 request: ___R,
6429 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6430 where
6431 ___R: ::fidl_next::Encode<
6432 crate::wire::NodeDeprecatedSetFlagsRequest,
6433 <___T as ::fidl_next::Transport>::SendBuffer,
6434 >,
6435 {
6436 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6437 5950864159036794675,
6438 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
6439 request,
6440 ))
6441 }
6442
6443 #[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"]
6444 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
6445 ::fidl_next::TwoWayFuture::from_untyped(
6446 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6447 105530239381466147,
6448 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
6449 (),
6450 ),
6451 )
6452 }
6453
6454 #[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"]
6455 pub fn set_flags(
6456 &self,
6457
6458 flags: impl ::fidl_next::Encode<
6459 crate::wire::Flags,
6460 <___T as ::fidl_next::Transport>::SendBuffer,
6461 >,
6462 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6463 where
6464 <___T as ::fidl_next::Transport>::SendBuffer:
6465 ::fidl_next::encoder::InternalHandleEncoder,
6466 {
6467 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
6468 }
6469
6470 #[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"]
6471 pub fn set_flags_with<___R>(
6472 &self,
6473 request: ___R,
6474 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6475 where
6476 ___R: ::fidl_next::Encode<
6477 crate::wire::NodeSetFlagsRequest,
6478 <___T as ::fidl_next::Transport>::SendBuffer,
6479 >,
6480 {
6481 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6482 6172186066099445416,
6483 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
6484 request,
6485 ))
6486 }
6487
6488 #[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"]
6489 pub fn query_filesystem(
6490 &self,
6491 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
6492 ::fidl_next::TwoWayFuture::from_untyped(
6493 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6494 8013111122914313744,
6495 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
6496 (),
6497 ),
6498 )
6499 }
6500
6501 #[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"]
6502 pub fn get_attributes(
6503 &self,
6504
6505 query: impl ::fidl_next::Encode<
6506 crate::wire::NodeAttributesQuery,
6507 <___T as ::fidl_next::Transport>::SendBuffer,
6508 >,
6509 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6510 where
6511 <___T as ::fidl_next::Transport>::SendBuffer:
6512 ::fidl_next::encoder::InternalHandleEncoder,
6513 {
6514 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
6515 }
6516
6517 #[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"]
6518 pub fn get_attributes_with<___R>(
6519 &self,
6520 request: ___R,
6521 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6522 where
6523 ___R: ::fidl_next::Encode<
6524 crate::wire::NodeGetAttributesRequest,
6525 <___T as ::fidl_next::Transport>::SendBuffer,
6526 >,
6527 {
6528 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6529 4414537700416816443,
6530 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
6531 request,
6532 ))
6533 }
6534
6535 #[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"]
6536 pub fn update_attributes_with<___R>(
6537 &self,
6538 request: ___R,
6539 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
6540 where
6541 ___R: ::fidl_next::Encode<
6542 crate::wire::MutableNodeAttributes<'static>,
6543 <___T as ::fidl_next::Transport>::SendBuffer,
6544 >,
6545 {
6546 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6547 3677402239314018056,
6548 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
6549 request,
6550 ))
6551 }
6552
6553 #[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"]
6554 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
6555 ::fidl_next::TwoWayFuture::from_untyped(
6556 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6557 3196473584242777161,
6558 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
6559 (),
6560 ),
6561 )
6562 }
6563
6564 #[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"]
6565 pub fn list_extended_attributes(
6566 &self,
6567
6568 iterator: impl ::fidl_next::Encode<
6569 ::fidl_next::ServerEnd<
6570 crate::ExtendedAttributeIterator,
6571 ::fidl_next::wire::fuchsia::Channel,
6572 >,
6573 <___T as ::fidl_next::Transport>::SendBuffer,
6574 >,
6575 ) -> ::fidl_next::SendFuture<'_, ___T>
6576 where
6577 <___T as ::fidl_next::Transport>::SendBuffer:
6578 ::fidl_next::encoder::InternalHandleEncoder,
6579 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6580 {
6581 self.list_extended_attributes_with(
6582 crate::generic::NodeListExtendedAttributesRequest { iterator },
6583 )
6584 }
6585
6586 #[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"]
6587 pub fn list_extended_attributes_with<___R>(
6588 &self,
6589 request: ___R,
6590 ) -> ::fidl_next::SendFuture<'_, ___T>
6591 where
6592 ___R: ::fidl_next::Encode<
6593 crate::wire::NodeListExtendedAttributesRequest,
6594 <___T as ::fidl_next::Transport>::SendBuffer,
6595 >,
6596 {
6597 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6598 5431626189872037072,
6599 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
6600 request,
6601 ))
6602 }
6603
6604 #[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"]
6605 pub fn get_extended_attribute(
6606 &self,
6607
6608 name: impl ::fidl_next::Encode<
6609 ::fidl_next::wire::Vector<'static, u8>,
6610 <___T as ::fidl_next::Transport>::SendBuffer,
6611 >,
6612 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
6613 where
6614 <___T as ::fidl_next::Transport>::SendBuffer:
6615 ::fidl_next::encoder::InternalHandleEncoder,
6616 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6617 {
6618 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
6619 name,
6620 })
6621 }
6622
6623 #[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"]
6624 pub fn get_extended_attribute_with<___R>(
6625 &self,
6626 request: ___R,
6627 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
6628 where
6629 ___R: ::fidl_next::Encode<
6630 crate::wire::NodeGetExtendedAttributeRequest<'static>,
6631 <___T as ::fidl_next::Transport>::SendBuffer,
6632 >,
6633 {
6634 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6635 5043930208506967771,
6636 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6637 request,
6638 ))
6639 }
6640
6641 #[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"]
6642 pub fn set_extended_attribute(
6643 &self,
6644
6645 name: impl ::fidl_next::Encode<
6646 ::fidl_next::wire::Vector<'static, u8>,
6647 <___T as ::fidl_next::Transport>::SendBuffer,
6648 >,
6649
6650 value: impl ::fidl_next::Encode<
6651 crate::wire::ExtendedAttributeValue<'static>,
6652 <___T as ::fidl_next::Transport>::SendBuffer,
6653 >,
6654
6655 mode: impl ::fidl_next::Encode<
6656 crate::wire::SetExtendedAttributeMode,
6657 <___T as ::fidl_next::Transport>::SendBuffer,
6658 >,
6659 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
6660 where
6661 <___T as ::fidl_next::Transport>::SendBuffer:
6662 ::fidl_next::encoder::InternalHandleEncoder,
6663 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6664 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6665 {
6666 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
6667 name,
6668
6669 value,
6670
6671 mode,
6672 })
6673 }
6674
6675 #[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"]
6676 pub fn set_extended_attribute_with<___R>(
6677 &self,
6678 request: ___R,
6679 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
6680 where
6681 ___R: ::fidl_next::Encode<
6682 crate::wire::NodeSetExtendedAttributeRequest<'static>,
6683 <___T as ::fidl_next::Transport>::SendBuffer,
6684 >,
6685 {
6686 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6687 5374223046099989052,
6688 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6689 request,
6690 ))
6691 }
6692
6693 #[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"]
6694 pub fn remove_extended_attribute(
6695 &self,
6696
6697 name: impl ::fidl_next::Encode<
6698 ::fidl_next::wire::Vector<'static, u8>,
6699 <___T as ::fidl_next::Transport>::SendBuffer,
6700 >,
6701 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
6702 where
6703 <___T as ::fidl_next::Transport>::SendBuffer:
6704 ::fidl_next::encoder::InternalHandleEncoder,
6705 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6706 {
6707 self.remove_extended_attribute_with(
6708 crate::generic::NodeRemoveExtendedAttributeRequest { name },
6709 )
6710 }
6711
6712 #[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"]
6713 pub fn remove_extended_attribute_with<___R>(
6714 &self,
6715 request: ___R,
6716 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
6717 where
6718 ___R: ::fidl_next::Encode<
6719 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
6720 <___T as ::fidl_next::Transport>::SendBuffer,
6721 >,
6722 {
6723 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6724 8794297771444732717,
6725 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6726 request,
6727 ))
6728 }
6729 }
6730
6731 #[repr(transparent)]
6733 pub struct NodeServer<___T: ::fidl_next::Transport> {
6734 server: ::fidl_next::protocol::Server<___T>,
6735 }
6736
6737 impl<___T> NodeServer<___T>
6738 where
6739 ___T: ::fidl_next::Transport,
6740 {
6741 #[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"]
6742 pub fn on_open(
6743 &self,
6744
6745 s: impl ::fidl_next::Encode<
6746 ::fidl_next::wire::Int32,
6747 <___T as ::fidl_next::Transport>::SendBuffer,
6748 >,
6749
6750 info: impl ::fidl_next::Encode<
6751 crate::wire_optional::NodeInfoDeprecated<'static>,
6752 <___T as ::fidl_next::Transport>::SendBuffer,
6753 >,
6754 ) -> ::fidl_next::SendFuture<'_, ___T>
6755 where
6756 <___T as ::fidl_next::Transport>::SendBuffer:
6757 ::fidl_next::encoder::InternalHandleEncoder,
6758 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6759 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6760 {
6761 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
6762 }
6763
6764 #[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"]
6765
6766 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6767 where
6768 ___R: ::fidl_next::Encode<
6769 <super::OnOpen as ::fidl_next::Method>::Request,
6770 <___T as ::fidl_next::Transport>::SendBuffer,
6771 >,
6772 {
6773 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6774 9207534335756671346,
6775 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
6776 request,
6777 ))
6778 }
6779
6780 #[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"]
6781
6782 pub fn on_representation_with<___R>(
6783 &self,
6784 request: ___R,
6785 ) -> ::fidl_next::SendFuture<'_, ___T>
6786 where
6787 ___R: ::fidl_next::Encode<
6788 <super::OnRepresentation as ::fidl_next::Method>::Request,
6789 <___T as ::fidl_next::Transport>::SendBuffer,
6790 >,
6791 {
6792 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6793 6679970090861613324,
6794 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
6795 request,
6796 ))
6797 }
6798 }
6799 }
6800}
6801
6802pub trait NodeClientHandler<
6806 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6807 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6808>
6809{
6810 #[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"]
6811 fn on_open(
6812 &mut self,
6813
6814 request: ::fidl_next::Request<node::OnOpen, ___T>,
6815 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6816
6817 #[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"]
6818 fn on_representation(
6819 &mut self,
6820
6821 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
6822 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6823
6824 fn on_unknown_interaction(
6825 &mut self,
6826 ordinal: u64,
6827 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6828 ::core::future::ready(())
6829 }
6830}
6831
6832impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
6833where
6834 ___T: ::fidl_next::Transport,
6835{
6836 async fn on_open(&mut self, _: ::fidl_next::Request<node::OnOpen, ___T>) {}
6837
6838 async fn on_representation(&mut self, _: ::fidl_next::Request<node::OnRepresentation, ___T>) {}
6839
6840 async fn on_unknown_interaction(&mut self, _: u64) {}
6841}
6842
6843impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
6844where
6845 ___H: NodeClientHandler<___T> + ::core::marker::Send,
6846 ___T: ::fidl_next::Transport,
6847 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
6848 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6849 Constraint = (),
6850 >,
6851 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
6852 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6853 Constraint = (),
6854 >,
6855{
6856 async fn on_event(
6857 handler: &mut ___H,
6858 ordinal: u64,
6859 flexibility: ::fidl_next::protocol::Flexibility,
6860 body: ::fidl_next::Body<___T>,
6861 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6862 match ordinal {
6863 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
6864 Ok(decoded) => {
6865 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
6866 Ok(())
6867 }
6868 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6869 ordinal: 9207534335756671346,
6870 error,
6871 }),
6872 },
6873
6874 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
6875 Ok(decoded) => {
6876 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
6877 Ok(())
6878 }
6879 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6880 ordinal: 6679970090861613324,
6881 error,
6882 }),
6883 },
6884
6885 ordinal => {
6886 handler.on_unknown_interaction(ordinal).await;
6887 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
6888 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6889 } else {
6890 Ok(())
6891 }
6892 }
6893 }
6894 }
6895}
6896
6897pub trait NodeServerHandler<
6901 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6902 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6903>
6904{
6905 fn clone(
6906 &mut self,
6907
6908 request: ::fidl_next::Request<node::Clone, ___T>,
6909 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6910
6911 #[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"]
6912 fn close(
6913 &mut self,
6914
6915 responder: ::fidl_next::Responder<node::Close, ___T>,
6916 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6917
6918 fn query(
6919 &mut self,
6920
6921 responder: ::fidl_next::Responder<node::Query, ___T>,
6922 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6923
6924 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6925 fn deprecated_clone(
6926 &mut self,
6927
6928 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
6929 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6930
6931 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6932 fn deprecated_get_attr(
6933 &mut self,
6934
6935 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
6936 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6937
6938 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6939 fn deprecated_set_attr(
6940 &mut self,
6941
6942 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
6943
6944 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
6945 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6946
6947 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6948 fn deprecated_get_flags(
6949 &mut self,
6950
6951 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
6952 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6953
6954 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6955 fn deprecated_set_flags(
6956 &mut self,
6957
6958 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
6959
6960 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
6961 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6962
6963 #[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"]
6964 fn get_flags(
6965 &mut self,
6966
6967 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
6968 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6969
6970 #[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"]
6971 fn set_flags(
6972 &mut self,
6973
6974 request: ::fidl_next::Request<node::SetFlags, ___T>,
6975
6976 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
6977 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6978
6979 #[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"]
6980 fn query_filesystem(
6981 &mut self,
6982
6983 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
6984 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6985
6986 #[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"]
6987 fn get_attributes(
6988 &mut self,
6989
6990 request: ::fidl_next::Request<node::GetAttributes, ___T>,
6991
6992 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
6993 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6994
6995 #[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"]
6996 fn update_attributes(
6997 &mut self,
6998
6999 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
7000
7001 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
7002 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7003
7004 #[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"]
7005 fn sync(
7006 &mut self,
7007
7008 responder: ::fidl_next::Responder<node::Sync, ___T>,
7009 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7010
7011 #[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"]
7012 fn list_extended_attributes(
7013 &mut self,
7014
7015 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
7016 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7017
7018 #[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"]
7019 fn get_extended_attribute(
7020 &mut self,
7021
7022 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
7023
7024 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
7025 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7026
7027 #[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"]
7028 fn set_extended_attribute(
7029 &mut self,
7030
7031 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
7032
7033 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
7034 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7035
7036 #[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"]
7037 fn remove_extended_attribute(
7038 &mut self,
7039
7040 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
7041
7042 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
7043 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7044
7045 fn on_unknown_interaction(
7046 &mut self,
7047 ordinal: u64,
7048 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7049 ::core::future::ready(())
7050 }
7051}
7052
7053impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
7054where
7055 ___H: NodeServerHandler<___T> + ::core::marker::Send,
7056 ___T: ::fidl_next::Transport,
7057 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
7058 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7059 Constraint = (),
7060 >,
7061 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
7062 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7063 Constraint = (),
7064 >,
7065 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
7066 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7067 Constraint = (),
7068 >,
7069 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
7070 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7071 Constraint = (),
7072 >,
7073 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
7074 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7075 Constraint = (),
7076 >,
7077 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
7078 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7079 Constraint = (),
7080 >,
7081 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
7082 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7083 Constraint = (),
7084 >,
7085 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
7086 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7087 Constraint = (),
7088 >,
7089 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7090 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7091 Constraint = (),
7092 >,
7093 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7094 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7095 Constraint = (),
7096 >,
7097 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7098 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7099 Constraint = (),
7100 >,
7101{
7102 async fn on_one_way(
7103 handler: &mut ___H,
7104 ordinal: u64,
7105 flexibility: ::fidl_next::protocol::Flexibility,
7106 body: ::fidl_next::Body<___T>,
7107 ) -> ::core::result::Result<
7108 (),
7109 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7110 > {
7111 match ordinal {
7112 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7113 Ok(decoded) => {
7114 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
7115 Ok(())
7116 }
7117 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7118 ordinal: 2366825959783828089,
7119 error,
7120 }),
7121 },
7122
7123 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7124 Ok(decoded) => {
7125 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
7126 Ok(())
7127 }
7128 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7129 ordinal: 6512600400724287855,
7130 error,
7131 }),
7132 },
7133
7134 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7135 Ok(decoded) => {
7136 handler
7137 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
7138 .await;
7139 Ok(())
7140 }
7141 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7142 ordinal: 5431626189872037072,
7143 error,
7144 }),
7145 },
7146
7147 ordinal => {
7148 handler.on_unknown_interaction(ordinal).await;
7149 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7150 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7151 } else {
7152 Ok(())
7153 }
7154 }
7155 }
7156 }
7157
7158 async fn on_two_way(
7159 handler: &mut ___H,
7160 ordinal: u64,
7161 flexibility: ::fidl_next::protocol::Flexibility,
7162 body: ::fidl_next::Body<___T>,
7163 responder: ::fidl_next::protocol::Responder<___T>,
7164 ) -> ::core::result::Result<
7165 (),
7166 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7167 > {
7168 match ordinal {
7169 6540867515453498750 => {
7170 let responder = ::fidl_next::Responder::from_untyped(responder);
7171
7172 handler.close(responder).await;
7173 Ok(())
7174 }
7175
7176 2763219980499352582 => {
7177 let responder = ::fidl_next::Responder::from_untyped(responder);
7178
7179 handler.query(responder).await;
7180 Ok(())
7181 }
7182
7183 8689798978500614909 => {
7184 let responder = ::fidl_next::Responder::from_untyped(responder);
7185
7186 handler.deprecated_get_attr(responder).await;
7187 Ok(())
7188 }
7189
7190 4721673413776871238 => {
7191 let responder = ::fidl_next::Responder::from_untyped(responder);
7192
7193 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7194 Ok(decoded) => {
7195 handler
7196 .deprecated_set_attr(
7197 ::fidl_next::Request::from_decoded(decoded),
7198 responder,
7199 )
7200 .await;
7201 Ok(())
7202 }
7203 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7204 ordinal: 4721673413776871238,
7205 error,
7206 }),
7207 }
7208 }
7209
7210 6595803110182632097 => {
7211 let responder = ::fidl_next::Responder::from_untyped(responder);
7212
7213 handler.deprecated_get_flags(responder).await;
7214 Ok(())
7215 }
7216
7217 5950864159036794675 => {
7218 let responder = ::fidl_next::Responder::from_untyped(responder);
7219
7220 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7221 Ok(decoded) => {
7222 handler
7223 .deprecated_set_flags(
7224 ::fidl_next::Request::from_decoded(decoded),
7225 responder,
7226 )
7227 .await;
7228 Ok(())
7229 }
7230 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7231 ordinal: 5950864159036794675,
7232 error,
7233 }),
7234 }
7235 }
7236
7237 105530239381466147 => {
7238 let responder = ::fidl_next::Responder::from_untyped(responder);
7239
7240 handler.get_flags(responder).await;
7241 Ok(())
7242 }
7243
7244 6172186066099445416 => {
7245 let responder = ::fidl_next::Responder::from_untyped(responder);
7246
7247 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7248 Ok(decoded) => {
7249 handler
7250 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
7251 .await;
7252 Ok(())
7253 }
7254 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7255 ordinal: 6172186066099445416,
7256 error,
7257 }),
7258 }
7259 }
7260
7261 8013111122914313744 => {
7262 let responder = ::fidl_next::Responder::from_untyped(responder);
7263
7264 handler.query_filesystem(responder).await;
7265 Ok(())
7266 }
7267
7268 4414537700416816443 => {
7269 let responder = ::fidl_next::Responder::from_untyped(responder);
7270
7271 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7272 Ok(decoded) => {
7273 handler
7274 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
7275 .await;
7276 Ok(())
7277 }
7278 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7279 ordinal: 4414537700416816443,
7280 error,
7281 }),
7282 }
7283 }
7284
7285 3677402239314018056 => {
7286 let responder = ::fidl_next::Responder::from_untyped(responder);
7287
7288 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7289 Ok(decoded) => {
7290 handler
7291 .update_attributes(
7292 ::fidl_next::Request::from_decoded(decoded),
7293 responder,
7294 )
7295 .await;
7296 Ok(())
7297 }
7298 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7299 ordinal: 3677402239314018056,
7300 error,
7301 }),
7302 }
7303 }
7304
7305 3196473584242777161 => {
7306 let responder = ::fidl_next::Responder::from_untyped(responder);
7307
7308 handler.sync(responder).await;
7309 Ok(())
7310 }
7311
7312 5043930208506967771 => {
7313 let responder = ::fidl_next::Responder::from_untyped(responder);
7314
7315 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7316 Ok(decoded) => {
7317 handler
7318 .get_extended_attribute(
7319 ::fidl_next::Request::from_decoded(decoded),
7320 responder,
7321 )
7322 .await;
7323 Ok(())
7324 }
7325 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7326 ordinal: 5043930208506967771,
7327 error,
7328 }),
7329 }
7330 }
7331
7332 5374223046099989052 => {
7333 let responder = ::fidl_next::Responder::from_untyped(responder);
7334
7335 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7336 Ok(decoded) => {
7337 handler
7338 .set_extended_attribute(
7339 ::fidl_next::Request::from_decoded(decoded),
7340 responder,
7341 )
7342 .await;
7343 Ok(())
7344 }
7345 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7346 ordinal: 5374223046099989052,
7347 error,
7348 }),
7349 }
7350 }
7351
7352 8794297771444732717 => {
7353 let responder = ::fidl_next::Responder::from_untyped(responder);
7354
7355 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7356 Ok(decoded) => {
7357 handler
7358 .remove_extended_attribute(
7359 ::fidl_next::Request::from_decoded(decoded),
7360 responder,
7361 )
7362 .await;
7363 Ok(())
7364 }
7365 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7366 ordinal: 8794297771444732717,
7367 error,
7368 }),
7369 }
7370 }
7371
7372 ordinal => {
7373 handler.on_unknown_interaction(ordinal).await;
7374 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7375 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7376 } else {
7377 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
7378 ordinal,
7379 flexibility,
7380 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
7381 )
7382 .expect("encoding a framework error should never fail")
7383 .await?;
7384 Ok(())
7385 }
7386 }
7387 }
7388 }
7389}
7390
7391#[doc = " Directory defines a node which is capable of containing other Objects.\n"]
7393#[derive(PartialEq, Debug)]
7394pub struct Directory;
7395
7396impl ::fidl_next::Discoverable for Directory {
7397 const PROTOCOL_NAME: &'static str = "fuchsia.io.Directory";
7398}
7399
7400#[cfg(target_os = "fuchsia")]
7401impl ::fidl_next::HasTransport for Directory {
7402 type Transport = ::fidl_next::fuchsia::zx::Channel;
7403}
7404
7405pub mod directory {
7406 pub mod prelude {
7407 pub use crate::{Directory, DirectoryClientHandler, DirectoryServerHandler, directory};
7408
7409 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
7410
7411 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
7412
7413 pub use crate::natural::DirectoryCreateSymlinkRequest;
7414
7415 pub use crate::natural::DirectoryDeprecatedOpenRequest;
7416
7417 pub use crate::natural::DirectoryGetTokenResponse;
7418
7419 pub use crate::natural::DirectoryLinkRequest;
7420
7421 pub use crate::natural::DirectoryLinkResponse;
7422
7423 pub use crate::natural::DirectoryOpenRequest;
7424
7425 pub use crate::natural::DirectoryReadDirentsRequest;
7426
7427 pub use crate::natural::DirectoryReadDirentsResponse;
7428
7429 pub use crate::natural::DirectoryRenameRequest;
7430
7431 pub use crate::natural::DirectoryRewindResponse;
7432
7433 pub use crate::natural::DirectoryUnlinkRequest;
7434
7435 pub use crate::natural::DirectoryWatchRequest;
7436
7437 pub use crate::natural::DirectoryWatchResponse;
7438
7439 pub use crate::natural::DirectoryCreateSymlinkResponse;
7440
7441 pub use crate::natural::DirectoryRenameResponse;
7442
7443 pub use crate::natural::DirectoryUnlinkResponse;
7444
7445 pub use crate::natural::ExtendedAttributeValue;
7446
7447 pub use crate::natural::MutableNodeAttributes;
7448
7449 pub use crate::natural::NodeAttributes2;
7450
7451 pub use crate::natural::NodeDeprecatedCloneRequest;
7452
7453 pub use crate::natural::NodeDeprecatedGetAttrResponse;
7454
7455 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
7456
7457 pub use crate::natural::NodeDeprecatedSetAttrRequest;
7458
7459 pub use crate::natural::NodeDeprecatedSetAttrResponse;
7460
7461 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
7462
7463 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
7464
7465 pub use crate::natural::NodeGetAttributesRequest;
7466
7467 pub use crate::natural::NodeGetExtendedAttributeRequest;
7468
7469 pub use crate::natural::NodeListExtendedAttributesRequest;
7470
7471 pub use crate::natural::NodeOnOpenRequest;
7472
7473 pub use crate::natural::NodeQueryFilesystemResponse;
7474
7475 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
7476
7477 pub use crate::natural::NodeSetExtendedAttributeRequest;
7478
7479 pub use crate::natural::NodeSetFlagsRequest;
7480
7481 pub use crate::natural::NodeGetFlagsResponse;
7482
7483 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
7484
7485 pub use crate::natural::NodeSetExtendedAttributeResponse;
7486
7487 pub use crate::natural::NodeSetFlagsResponse;
7488
7489 pub use crate::natural::NodeSyncResponse;
7490
7491 pub use crate::natural::NodeUpdateAttributesResponse;
7492
7493 pub use crate::natural::Representation;
7494
7495 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
7496
7497 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
7498
7499 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
7500 }
7501
7502 pub struct AdvisoryLock;
7503
7504 impl ::fidl_next::Method for AdvisoryLock {
7505 const ORDINAL: u64 = 7992130864415541162;
7506 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7507 ::fidl_next::protocol::Flexibility::Strict;
7508
7509 type Protocol = crate::Directory;
7510
7511 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
7512 }
7513
7514 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
7515 type Response = ::fidl_next::wire::Result<
7516 'static,
7517 crate::wire::AdvisoryLockingAdvisoryLockResponse,
7518 ::fidl_next::wire::Int32,
7519 >;
7520 }
7521
7522 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
7523 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7524
7525 fn respond(response: ___R) -> Self::Output {
7526 ::core::result::Result::Ok(response)
7527 }
7528 }
7529
7530 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
7531 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7532
7533 fn respond_err(response: ___R) -> Self::Output {
7534 ::core::result::Result::Err(response)
7535 }
7536 }
7537
7538 pub struct Clone;
7539
7540 impl ::fidl_next::Method for Clone {
7541 const ORDINAL: u64 = 2366825959783828089;
7542 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7543 ::fidl_next::protocol::Flexibility::Strict;
7544
7545 type Protocol = crate::Directory;
7546
7547 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
7548 }
7549
7550 pub struct Close;
7551
7552 impl ::fidl_next::Method for Close {
7553 const ORDINAL: u64 = 6540867515453498750;
7554 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7555 ::fidl_next::protocol::Flexibility::Strict;
7556
7557 type Protocol = crate::Directory;
7558
7559 type Request = ::fidl_next::wire::EmptyMessageBody;
7560 }
7561
7562 impl ::fidl_next::TwoWayMethod for Close {
7563 type Response = ::fidl_next::wire::Result<
7564 'static,
7565 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
7566 ::fidl_next::wire::Int32,
7567 >;
7568 }
7569
7570 impl<___R> ::fidl_next::Respond<___R> for Close {
7571 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7572
7573 fn respond(response: ___R) -> Self::Output {
7574 ::core::result::Result::Ok(response)
7575 }
7576 }
7577
7578 impl<___R> ::fidl_next::RespondErr<___R> for Close {
7579 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7580
7581 fn respond_err(response: ___R) -> Self::Output {
7582 ::core::result::Result::Err(response)
7583 }
7584 }
7585
7586 pub struct Query;
7587
7588 impl ::fidl_next::Method for Query {
7589 const ORDINAL: u64 = 2763219980499352582;
7590 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7591 ::fidl_next::protocol::Flexibility::Strict;
7592
7593 type Protocol = crate::Directory;
7594
7595 type Request = ::fidl_next::wire::EmptyMessageBody;
7596 }
7597
7598 impl ::fidl_next::TwoWayMethod for Query {
7599 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
7600 }
7601
7602 impl<___R> ::fidl_next::Respond<___R> for Query {
7603 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
7604
7605 fn respond(response: ___R) -> Self::Output {
7606 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
7607 }
7608 }
7609
7610 pub struct DeprecatedClone;
7611
7612 impl ::fidl_next::Method for DeprecatedClone {
7613 const ORDINAL: u64 = 6512600400724287855;
7614 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7615 ::fidl_next::protocol::Flexibility::Flexible;
7616
7617 type Protocol = crate::Directory;
7618
7619 type Request = crate::wire::NodeDeprecatedCloneRequest;
7620 }
7621
7622 pub struct OnOpen;
7623
7624 impl ::fidl_next::Method for OnOpen {
7625 const ORDINAL: u64 = 9207534335756671346;
7626 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7627 ::fidl_next::protocol::Flexibility::Flexible;
7628
7629 type Protocol = crate::Directory;
7630
7631 type Request = crate::wire::NodeOnOpenRequest<'static>;
7632 }
7633
7634 pub struct DeprecatedGetAttr;
7635
7636 impl ::fidl_next::Method for DeprecatedGetAttr {
7637 const ORDINAL: u64 = 8689798978500614909;
7638 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7639 ::fidl_next::protocol::Flexibility::Strict;
7640
7641 type Protocol = crate::Directory;
7642
7643 type Request = ::fidl_next::wire::EmptyMessageBody;
7644 }
7645
7646 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
7647 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
7648 }
7649
7650 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
7651 type Output = ___R;
7652
7653 fn respond(response: ___R) -> Self::Output {
7654 response
7655 }
7656 }
7657
7658 pub struct DeprecatedSetAttr;
7659
7660 impl ::fidl_next::Method for DeprecatedSetAttr {
7661 const ORDINAL: u64 = 4721673413776871238;
7662 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7663 ::fidl_next::protocol::Flexibility::Strict;
7664
7665 type Protocol = crate::Directory;
7666
7667 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
7668 }
7669
7670 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
7671 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
7672 }
7673
7674 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
7675 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
7676
7677 fn respond(response: ___R) -> Self::Output {
7678 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
7679 }
7680 }
7681
7682 pub struct DeprecatedGetFlags;
7683
7684 impl ::fidl_next::Method for DeprecatedGetFlags {
7685 const ORDINAL: u64 = 6595803110182632097;
7686 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7687 ::fidl_next::protocol::Flexibility::Strict;
7688
7689 type Protocol = crate::Directory;
7690
7691 type Request = ::fidl_next::wire::EmptyMessageBody;
7692 }
7693
7694 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
7695 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
7696 }
7697
7698 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
7699 type Output = ___R;
7700
7701 fn respond(response: ___R) -> Self::Output {
7702 response
7703 }
7704 }
7705
7706 pub struct DeprecatedSetFlags;
7707
7708 impl ::fidl_next::Method for DeprecatedSetFlags {
7709 const ORDINAL: u64 = 5950864159036794675;
7710 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7711 ::fidl_next::protocol::Flexibility::Strict;
7712
7713 type Protocol = crate::Directory;
7714
7715 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
7716 }
7717
7718 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
7719 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
7720 }
7721
7722 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
7723 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
7724
7725 fn respond(response: ___R) -> Self::Output {
7726 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
7727 }
7728 }
7729
7730 pub struct GetFlags;
7731
7732 impl ::fidl_next::Method for GetFlags {
7733 const ORDINAL: u64 = 105530239381466147;
7734 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7735 ::fidl_next::protocol::Flexibility::Flexible;
7736
7737 type Protocol = crate::Directory;
7738
7739 type Request = ::fidl_next::wire::EmptyMessageBody;
7740 }
7741
7742 impl ::fidl_next::TwoWayMethod for GetFlags {
7743 type Response = ::fidl_next::wire::FlexibleResult<
7744 'static,
7745 crate::wire::NodeGetFlagsResponse,
7746 ::fidl_next::wire::Int32,
7747 >;
7748 }
7749
7750 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
7751 type Output = ::fidl_next::FlexibleResult<
7752 crate::generic::NodeGetFlagsResponse<___R>,
7753 ::fidl_next::util::Never,
7754 >;
7755
7756 fn respond(response: ___R) -> Self::Output {
7757 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
7758 flags: response,
7759 })
7760 }
7761 }
7762
7763 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
7764 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
7765
7766 fn respond_err(response: ___R) -> Self::Output {
7767 ::fidl_next::FlexibleResult::Err(response)
7768 }
7769 }
7770
7771 pub struct SetFlags;
7772
7773 impl ::fidl_next::Method for SetFlags {
7774 const ORDINAL: u64 = 6172186066099445416;
7775 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7776 ::fidl_next::protocol::Flexibility::Flexible;
7777
7778 type Protocol = crate::Directory;
7779
7780 type Request = crate::wire::NodeSetFlagsRequest;
7781 }
7782
7783 impl ::fidl_next::TwoWayMethod for SetFlags {
7784 type Response = ::fidl_next::wire::FlexibleResult<
7785 'static,
7786 crate::wire::NodeSetFlagsResponse,
7787 ::fidl_next::wire::Int32,
7788 >;
7789 }
7790
7791 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
7792 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
7793
7794 fn respond(response: ___R) -> Self::Output {
7795 ::fidl_next::FlexibleResult::Ok(response)
7796 }
7797 }
7798
7799 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
7800 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
7801
7802 fn respond_err(response: ___R) -> Self::Output {
7803 ::fidl_next::FlexibleResult::Err(response)
7804 }
7805 }
7806
7807 pub struct QueryFilesystem;
7808
7809 impl ::fidl_next::Method for QueryFilesystem {
7810 const ORDINAL: u64 = 8013111122914313744;
7811 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7812 ::fidl_next::protocol::Flexibility::Strict;
7813
7814 type Protocol = crate::Directory;
7815
7816 type Request = ::fidl_next::wire::EmptyMessageBody;
7817 }
7818
7819 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
7820 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
7821 }
7822
7823 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
7824 type Output = ___R;
7825
7826 fn respond(response: ___R) -> Self::Output {
7827 response
7828 }
7829 }
7830
7831 pub struct OnRepresentation;
7832
7833 impl ::fidl_next::Method for OnRepresentation {
7834 const ORDINAL: u64 = 6679970090861613324;
7835 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7836 ::fidl_next::protocol::Flexibility::Strict;
7837
7838 type Protocol = crate::Directory;
7839
7840 type Request = crate::wire::Representation<'static>;
7841 }
7842
7843 pub struct GetAttributes;
7844
7845 impl ::fidl_next::Method for GetAttributes {
7846 const ORDINAL: u64 = 4414537700416816443;
7847 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7848 ::fidl_next::protocol::Flexibility::Strict;
7849
7850 type Protocol = crate::Directory;
7851
7852 type Request = crate::wire::NodeGetAttributesRequest;
7853 }
7854
7855 impl ::fidl_next::TwoWayMethod for GetAttributes {
7856 type Response = ::fidl_next::wire::Result<
7857 'static,
7858 crate::wire::NodeAttributes2<'static>,
7859 ::fidl_next::wire::Int32,
7860 >;
7861 }
7862
7863 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
7864 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7865
7866 fn respond(response: ___R) -> Self::Output {
7867 ::core::result::Result::Ok(response)
7868 }
7869 }
7870
7871 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
7872 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7873
7874 fn respond_err(response: ___R) -> Self::Output {
7875 ::core::result::Result::Err(response)
7876 }
7877 }
7878
7879 pub struct UpdateAttributes;
7880
7881 impl ::fidl_next::Method for UpdateAttributes {
7882 const ORDINAL: u64 = 3677402239314018056;
7883 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7884 ::fidl_next::protocol::Flexibility::Strict;
7885
7886 type Protocol = crate::Directory;
7887
7888 type Request = crate::wire::MutableNodeAttributes<'static>;
7889 }
7890
7891 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
7892 type Response = ::fidl_next::wire::Result<
7893 'static,
7894 crate::wire::NodeUpdateAttributesResponse,
7895 ::fidl_next::wire::Int32,
7896 >;
7897 }
7898
7899 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
7900 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7901
7902 fn respond(response: ___R) -> Self::Output {
7903 ::core::result::Result::Ok(response)
7904 }
7905 }
7906
7907 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
7908 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7909
7910 fn respond_err(response: ___R) -> Self::Output {
7911 ::core::result::Result::Err(response)
7912 }
7913 }
7914
7915 pub struct Sync;
7916
7917 impl ::fidl_next::Method for Sync {
7918 const ORDINAL: u64 = 3196473584242777161;
7919 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7920 ::fidl_next::protocol::Flexibility::Strict;
7921
7922 type Protocol = crate::Directory;
7923
7924 type Request = ::fidl_next::wire::EmptyMessageBody;
7925 }
7926
7927 impl ::fidl_next::TwoWayMethod for Sync {
7928 type Response = ::fidl_next::wire::Result<
7929 'static,
7930 crate::wire::NodeSyncResponse,
7931 ::fidl_next::wire::Int32,
7932 >;
7933 }
7934
7935 impl<___R> ::fidl_next::Respond<___R> for Sync {
7936 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7937
7938 fn respond(response: ___R) -> Self::Output {
7939 ::core::result::Result::Ok(response)
7940 }
7941 }
7942
7943 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
7944 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7945
7946 fn respond_err(response: ___R) -> Self::Output {
7947 ::core::result::Result::Err(response)
7948 }
7949 }
7950
7951 pub struct ListExtendedAttributes;
7952
7953 impl ::fidl_next::Method for ListExtendedAttributes {
7954 const ORDINAL: u64 = 5431626189872037072;
7955 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7956 ::fidl_next::protocol::Flexibility::Strict;
7957
7958 type Protocol = crate::Directory;
7959
7960 type Request = crate::wire::NodeListExtendedAttributesRequest;
7961 }
7962
7963 pub struct GetExtendedAttribute;
7964
7965 impl ::fidl_next::Method for GetExtendedAttribute {
7966 const ORDINAL: u64 = 5043930208506967771;
7967 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7968 ::fidl_next::protocol::Flexibility::Strict;
7969
7970 type Protocol = crate::Directory;
7971
7972 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
7973 }
7974
7975 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
7976 type Response = ::fidl_next::wire::Result<
7977 'static,
7978 crate::wire::ExtendedAttributeValue<'static>,
7979 ::fidl_next::wire::Int32,
7980 >;
7981 }
7982
7983 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
7984 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7985
7986 fn respond(response: ___R) -> Self::Output {
7987 ::core::result::Result::Ok(response)
7988 }
7989 }
7990
7991 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
7992 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7993
7994 fn respond_err(response: ___R) -> Self::Output {
7995 ::core::result::Result::Err(response)
7996 }
7997 }
7998
7999 pub struct SetExtendedAttribute;
8000
8001 impl ::fidl_next::Method for SetExtendedAttribute {
8002 const ORDINAL: u64 = 5374223046099989052;
8003 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8004 ::fidl_next::protocol::Flexibility::Strict;
8005
8006 type Protocol = crate::Directory;
8007
8008 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
8009 }
8010
8011 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
8012 type Response = ::fidl_next::wire::Result<
8013 'static,
8014 crate::wire::NodeSetExtendedAttributeResponse,
8015 ::fidl_next::wire::Int32,
8016 >;
8017 }
8018
8019 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
8020 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8021
8022 fn respond(response: ___R) -> Self::Output {
8023 ::core::result::Result::Ok(response)
8024 }
8025 }
8026
8027 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
8028 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8029
8030 fn respond_err(response: ___R) -> Self::Output {
8031 ::core::result::Result::Err(response)
8032 }
8033 }
8034
8035 pub struct RemoveExtendedAttribute;
8036
8037 impl ::fidl_next::Method for RemoveExtendedAttribute {
8038 const ORDINAL: u64 = 8794297771444732717;
8039 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8040 ::fidl_next::protocol::Flexibility::Strict;
8041
8042 type Protocol = crate::Directory;
8043
8044 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
8045 }
8046
8047 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
8048 type Response = ::fidl_next::wire::Result<
8049 'static,
8050 crate::wire::NodeRemoveExtendedAttributeResponse,
8051 ::fidl_next::wire::Int32,
8052 >;
8053 }
8054
8055 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
8056 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8057
8058 fn respond(response: ___R) -> Self::Output {
8059 ::core::result::Result::Ok(response)
8060 }
8061 }
8062
8063 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
8064 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8065
8066 fn respond_err(response: ___R) -> Self::Output {
8067 ::core::result::Result::Err(response)
8068 }
8069 }
8070
8071 pub struct DeprecatedOpen;
8072
8073 impl ::fidl_next::Method for DeprecatedOpen {
8074 const ORDINAL: u64 = 3193127272456937152;
8075 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8076 ::fidl_next::protocol::Flexibility::Flexible;
8077
8078 type Protocol = crate::Directory;
8079
8080 type Request = crate::wire::DirectoryDeprecatedOpenRequest<'static>;
8081 }
8082
8083 pub struct Open;
8084
8085 impl ::fidl_next::Method for Open {
8086 const ORDINAL: u64 = 6236883748953765593;
8087 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8088 ::fidl_next::protocol::Flexibility::Strict;
8089
8090 type Protocol = crate::Directory;
8091
8092 type Request = crate::wire::DirectoryOpenRequest<'static>;
8093 }
8094
8095 pub struct ReadDirents;
8096
8097 impl ::fidl_next::Method for ReadDirents {
8098 const ORDINAL: u64 = 3855785432100874762;
8099 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8100 ::fidl_next::protocol::Flexibility::Strict;
8101
8102 type Protocol = crate::Directory;
8103
8104 type Request = crate::wire::DirectoryReadDirentsRequest;
8105 }
8106
8107 impl ::fidl_next::TwoWayMethod for ReadDirents {
8108 type Response = crate::wire::DirectoryReadDirentsResponse<'static>;
8109 }
8110
8111 impl<___R> ::fidl_next::Respond<___R> for ReadDirents {
8112 type Output = ___R;
8113
8114 fn respond(response: ___R) -> Self::Output {
8115 response
8116 }
8117 }
8118
8119 pub struct Rewind;
8120
8121 impl ::fidl_next::Method for Rewind {
8122 const ORDINAL: u64 = 1635123508515392625;
8123 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8124 ::fidl_next::protocol::Flexibility::Strict;
8125
8126 type Protocol = crate::Directory;
8127
8128 type Request = ::fidl_next::wire::EmptyMessageBody;
8129 }
8130
8131 impl ::fidl_next::TwoWayMethod for Rewind {
8132 type Response = crate::wire::DirectoryRewindResponse;
8133 }
8134
8135 impl<___R> ::fidl_next::Respond<___R> for Rewind {
8136 type Output = crate::generic::DirectoryRewindResponse<___R>;
8137
8138 fn respond(response: ___R) -> Self::Output {
8139 crate::generic::DirectoryRewindResponse { s: response }
8140 }
8141 }
8142
8143 pub struct GetToken;
8144
8145 impl ::fidl_next::Method for GetToken {
8146 const ORDINAL: u64 = 2787337947777369685;
8147 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8148 ::fidl_next::protocol::Flexibility::Strict;
8149
8150 type Protocol = crate::Directory;
8151
8152 type Request = ::fidl_next::wire::EmptyMessageBody;
8153 }
8154
8155 impl ::fidl_next::TwoWayMethod for GetToken {
8156 type Response = crate::wire::DirectoryGetTokenResponse;
8157 }
8158
8159 impl<___R> ::fidl_next::Respond<___R> for GetToken {
8160 type Output = ___R;
8161
8162 fn respond(response: ___R) -> Self::Output {
8163 response
8164 }
8165 }
8166
8167 pub struct Link;
8168
8169 impl ::fidl_next::Method for Link {
8170 const ORDINAL: u64 = 8360374984291987687;
8171 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8172 ::fidl_next::protocol::Flexibility::Strict;
8173
8174 type Protocol = crate::Directory;
8175
8176 type Request = crate::wire::DirectoryLinkRequest<'static>;
8177 }
8178
8179 impl ::fidl_next::TwoWayMethod for Link {
8180 type Response = crate::wire::DirectoryLinkResponse;
8181 }
8182
8183 impl<___R> ::fidl_next::Respond<___R> for Link {
8184 type Output = crate::generic::DirectoryLinkResponse<___R>;
8185
8186 fn respond(response: ___R) -> Self::Output {
8187 crate::generic::DirectoryLinkResponse { s: response }
8188 }
8189 }
8190
8191 pub struct Unlink;
8192
8193 impl ::fidl_next::Method for Unlink {
8194 const ORDINAL: u64 = 8433556716759383021;
8195 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8196 ::fidl_next::protocol::Flexibility::Strict;
8197
8198 type Protocol = crate::Directory;
8199
8200 type Request = crate::wire::DirectoryUnlinkRequest<'static>;
8201 }
8202
8203 impl ::fidl_next::TwoWayMethod for Unlink {
8204 type Response = ::fidl_next::wire::Result<
8205 'static,
8206 crate::wire::DirectoryUnlinkResponse,
8207 ::fidl_next::wire::Int32,
8208 >;
8209 }
8210
8211 impl<___R> ::fidl_next::Respond<___R> for Unlink {
8212 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8213
8214 fn respond(response: ___R) -> Self::Output {
8215 ::core::result::Result::Ok(response)
8216 }
8217 }
8218
8219 impl<___R> ::fidl_next::RespondErr<___R> for Unlink {
8220 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8221
8222 fn respond_err(response: ___R) -> Self::Output {
8223 ::core::result::Result::Err(response)
8224 }
8225 }
8226
8227 pub struct Rename;
8228
8229 impl ::fidl_next::Method for Rename {
8230 const ORDINAL: u64 = 8097726607824333022;
8231 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8232 ::fidl_next::protocol::Flexibility::Strict;
8233
8234 type Protocol = crate::Directory;
8235
8236 type Request = crate::wire::DirectoryRenameRequest<'static>;
8237 }
8238
8239 impl ::fidl_next::TwoWayMethod for Rename {
8240 type Response = ::fidl_next::wire::Result<
8241 'static,
8242 crate::wire::DirectoryRenameResponse,
8243 ::fidl_next::wire::Int32,
8244 >;
8245 }
8246
8247 impl<___R> ::fidl_next::Respond<___R> for Rename {
8248 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8249
8250 fn respond(response: ___R) -> Self::Output {
8251 ::core::result::Result::Ok(response)
8252 }
8253 }
8254
8255 impl<___R> ::fidl_next::RespondErr<___R> for Rename {
8256 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8257
8258 fn respond_err(response: ___R) -> Self::Output {
8259 ::core::result::Result::Err(response)
8260 }
8261 }
8262
8263 pub struct CreateSymlink;
8264
8265 impl ::fidl_next::Method for CreateSymlink {
8266 const ORDINAL: u64 = 2435901052462315657;
8267 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8268 ::fidl_next::protocol::Flexibility::Strict;
8269
8270 type Protocol = crate::Directory;
8271
8272 type Request = crate::wire::DirectoryCreateSymlinkRequest<'static>;
8273 }
8274
8275 impl ::fidl_next::TwoWayMethod for CreateSymlink {
8276 type Response = ::fidl_next::wire::Result<
8277 'static,
8278 crate::wire::DirectoryCreateSymlinkResponse,
8279 ::fidl_next::wire::Int32,
8280 >;
8281 }
8282
8283 impl<___R> ::fidl_next::Respond<___R> for CreateSymlink {
8284 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8285
8286 fn respond(response: ___R) -> Self::Output {
8287 ::core::result::Result::Ok(response)
8288 }
8289 }
8290
8291 impl<___R> ::fidl_next::RespondErr<___R> for CreateSymlink {
8292 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8293
8294 fn respond_err(response: ___R) -> Self::Output {
8295 ::core::result::Result::Err(response)
8296 }
8297 }
8298
8299 pub struct Watch;
8300
8301 impl ::fidl_next::Method for Watch {
8302 const ORDINAL: u64 = 6275512344170098065;
8303 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8304 ::fidl_next::protocol::Flexibility::Strict;
8305
8306 type Protocol = crate::Directory;
8307
8308 type Request = crate::wire::DirectoryWatchRequest;
8309 }
8310
8311 impl ::fidl_next::TwoWayMethod for Watch {
8312 type Response = crate::wire::DirectoryWatchResponse;
8313 }
8314
8315 impl<___R> ::fidl_next::Respond<___R> for Watch {
8316 type Output = crate::generic::DirectoryWatchResponse<___R>;
8317
8318 fn respond(response: ___R) -> Self::Output {
8319 crate::generic::DirectoryWatchResponse { s: response }
8320 }
8321 }
8322
8323 mod ___detail {
8324 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Directory
8325 where
8326 ___T: ::fidl_next::Transport,
8327 {
8328 type Client = DirectoryClient<___T>;
8329 type Server = DirectoryServer<___T>;
8330 }
8331
8332 #[repr(transparent)]
8334 pub struct DirectoryClient<___T: ::fidl_next::Transport> {
8335 #[allow(dead_code)]
8336 client: ::fidl_next::protocol::Client<___T>,
8337 }
8338
8339 impl<___T> DirectoryClient<___T>
8340 where
8341 ___T: ::fidl_next::Transport,
8342 {
8343 #[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"]
8344 pub fn advisory_lock(
8345 &self,
8346
8347 request: impl ::fidl_next::Encode<
8348 crate::wire::AdvisoryLockRequest<'static>,
8349 <___T as ::fidl_next::Transport>::SendBuffer,
8350 >,
8351 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
8352 where
8353 <___T as ::fidl_next::Transport>::SendBuffer:
8354 ::fidl_next::encoder::InternalHandleEncoder,
8355 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8356 {
8357 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
8358 request,
8359 })
8360 }
8361
8362 #[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"]
8363 pub fn advisory_lock_with<___R>(
8364 &self,
8365 request: ___R,
8366 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
8367 where
8368 ___R: ::fidl_next::Encode<
8369 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
8370 <___T as ::fidl_next::Transport>::SendBuffer,
8371 >,
8372 {
8373 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8374 7992130864415541162,
8375 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
8376 request,
8377 ))
8378 }
8379
8380 pub fn clone(
8381 &self,
8382
8383 request: impl ::fidl_next::Encode<
8384 ::fidl_next::ServerEnd<
8385 ::fidl_next_fuchsia_unknown::Cloneable,
8386 ::fidl_next::wire::fuchsia::Channel,
8387 >,
8388 <___T as ::fidl_next::Transport>::SendBuffer,
8389 >,
8390 ) -> ::fidl_next::SendFuture<'_, ___T>
8391 where
8392 <___T as ::fidl_next::Transport>::SendBuffer:
8393 ::fidl_next::encoder::InternalHandleEncoder,
8394 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8395 {
8396 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
8397 request,
8398 })
8399 }
8400
8401 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
8402 where
8403 ___R: ::fidl_next::Encode<
8404 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
8405 <___T as ::fidl_next::Transport>::SendBuffer,
8406 >,
8407 {
8408 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8409 2366825959783828089,
8410 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
8411 request,
8412 ))
8413 }
8414
8415 #[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"]
8416 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
8417 ::fidl_next::TwoWayFuture::from_untyped(
8418 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8419 6540867515453498750,
8420 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
8421 (),
8422 ),
8423 )
8424 }
8425
8426 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
8427 ::fidl_next::TwoWayFuture::from_untyped(
8428 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8429 2763219980499352582,
8430 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
8431 (),
8432 ),
8433 )
8434 }
8435
8436 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
8437 pub fn deprecated_clone(
8438 &self,
8439
8440 flags: impl ::fidl_next::Encode<
8441 crate::wire::OpenFlags,
8442 <___T as ::fidl_next::Transport>::SendBuffer,
8443 >,
8444
8445 object: impl ::fidl_next::Encode<
8446 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
8447 <___T as ::fidl_next::Transport>::SendBuffer,
8448 >,
8449 ) -> ::fidl_next::SendFuture<'_, ___T>
8450 where
8451 <___T as ::fidl_next::Transport>::SendBuffer:
8452 ::fidl_next::encoder::InternalHandleEncoder,
8453 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8454 {
8455 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
8456 flags,
8457
8458 object,
8459 })
8460 }
8461
8462 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
8463 pub fn deprecated_clone_with<___R>(
8464 &self,
8465 request: ___R,
8466 ) -> ::fidl_next::SendFuture<'_, ___T>
8467 where
8468 ___R: ::fidl_next::Encode<
8469 crate::wire::NodeDeprecatedCloneRequest,
8470 <___T as ::fidl_next::Transport>::SendBuffer,
8471 >,
8472 {
8473 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8474 6512600400724287855,
8475 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
8476 request,
8477 ))
8478 }
8479
8480 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
8481 pub fn deprecated_get_attr(
8482 &self,
8483 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
8484 ::fidl_next::TwoWayFuture::from_untyped(
8485 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8486 8689798978500614909,
8487 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
8488 (),
8489 ),
8490 )
8491 }
8492
8493 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
8494 pub fn deprecated_set_attr(
8495 &self,
8496
8497 flags: impl ::fidl_next::Encode<
8498 crate::wire::NodeAttributeFlags,
8499 <___T as ::fidl_next::Transport>::SendBuffer,
8500 >,
8501
8502 attributes: impl ::fidl_next::Encode<
8503 crate::wire::NodeAttributes,
8504 <___T as ::fidl_next::Transport>::SendBuffer,
8505 >,
8506 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
8507 where
8508 <___T as ::fidl_next::Transport>::SendBuffer:
8509 ::fidl_next::encoder::InternalHandleEncoder,
8510 {
8511 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
8512 flags,
8513
8514 attributes,
8515 })
8516 }
8517
8518 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
8519 pub fn deprecated_set_attr_with<___R>(
8520 &self,
8521 request: ___R,
8522 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
8523 where
8524 ___R: ::fidl_next::Encode<
8525 crate::wire::NodeDeprecatedSetAttrRequest,
8526 <___T as ::fidl_next::Transport>::SendBuffer,
8527 >,
8528 {
8529 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8530 4721673413776871238,
8531 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
8532 request,
8533 ))
8534 }
8535
8536 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
8537 pub fn deprecated_get_flags(
8538 &self,
8539 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
8540 ::fidl_next::TwoWayFuture::from_untyped(
8541 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8542 6595803110182632097,
8543 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
8544 (),
8545 ),
8546 )
8547 }
8548
8549 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
8550 pub fn deprecated_set_flags(
8551 &self,
8552
8553 flags: impl ::fidl_next::Encode<
8554 crate::wire::OpenFlags,
8555 <___T as ::fidl_next::Transport>::SendBuffer,
8556 >,
8557 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
8558 where
8559 <___T as ::fidl_next::Transport>::SendBuffer:
8560 ::fidl_next::encoder::InternalHandleEncoder,
8561 {
8562 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
8563 flags,
8564 })
8565 }
8566
8567 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
8568 pub fn deprecated_set_flags_with<___R>(
8569 &self,
8570 request: ___R,
8571 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
8572 where
8573 ___R: ::fidl_next::Encode<
8574 crate::wire::NodeDeprecatedSetFlagsRequest,
8575 <___T as ::fidl_next::Transport>::SendBuffer,
8576 >,
8577 {
8578 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8579 5950864159036794675,
8580 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
8581 request,
8582 ))
8583 }
8584
8585 #[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"]
8586 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
8587 ::fidl_next::TwoWayFuture::from_untyped(
8588 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8589 105530239381466147,
8590 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
8591 (),
8592 ),
8593 )
8594 }
8595
8596 #[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"]
8597 pub fn set_flags(
8598 &self,
8599
8600 flags: impl ::fidl_next::Encode<
8601 crate::wire::Flags,
8602 <___T as ::fidl_next::Transport>::SendBuffer,
8603 >,
8604 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
8605 where
8606 <___T as ::fidl_next::Transport>::SendBuffer:
8607 ::fidl_next::encoder::InternalHandleEncoder,
8608 {
8609 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
8610 }
8611
8612 #[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"]
8613 pub fn set_flags_with<___R>(
8614 &self,
8615 request: ___R,
8616 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
8617 where
8618 ___R: ::fidl_next::Encode<
8619 crate::wire::NodeSetFlagsRequest,
8620 <___T as ::fidl_next::Transport>::SendBuffer,
8621 >,
8622 {
8623 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8624 6172186066099445416,
8625 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
8626 request,
8627 ))
8628 }
8629
8630 #[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"]
8631 pub fn query_filesystem(
8632 &self,
8633 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
8634 ::fidl_next::TwoWayFuture::from_untyped(
8635 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8636 8013111122914313744,
8637 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
8638 (),
8639 ),
8640 )
8641 }
8642
8643 #[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"]
8644 pub fn get_attributes(
8645 &self,
8646
8647 query: impl ::fidl_next::Encode<
8648 crate::wire::NodeAttributesQuery,
8649 <___T as ::fidl_next::Transport>::SendBuffer,
8650 >,
8651 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
8652 where
8653 <___T as ::fidl_next::Transport>::SendBuffer:
8654 ::fidl_next::encoder::InternalHandleEncoder,
8655 {
8656 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
8657 }
8658
8659 #[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"]
8660 pub fn get_attributes_with<___R>(
8661 &self,
8662 request: ___R,
8663 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
8664 where
8665 ___R: ::fidl_next::Encode<
8666 crate::wire::NodeGetAttributesRequest,
8667 <___T as ::fidl_next::Transport>::SendBuffer,
8668 >,
8669 {
8670 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8671 4414537700416816443,
8672 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
8673 request,
8674 ))
8675 }
8676
8677 #[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"]
8678 pub fn update_attributes_with<___R>(
8679 &self,
8680 request: ___R,
8681 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
8682 where
8683 ___R: ::fidl_next::Encode<
8684 crate::wire::MutableNodeAttributes<'static>,
8685 <___T as ::fidl_next::Transport>::SendBuffer,
8686 >,
8687 {
8688 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8689 3677402239314018056,
8690 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
8691 request,
8692 ))
8693 }
8694
8695 #[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"]
8696 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
8697 ::fidl_next::TwoWayFuture::from_untyped(
8698 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
8699 3196473584242777161,
8700 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
8701 (),
8702 ),
8703 )
8704 }
8705
8706 #[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"]
8707 pub fn list_extended_attributes(
8708 &self,
8709
8710 iterator: impl ::fidl_next::Encode<
8711 ::fidl_next::ServerEnd<
8712 crate::ExtendedAttributeIterator,
8713 ::fidl_next::wire::fuchsia::Channel,
8714 >,
8715 <___T as ::fidl_next::Transport>::SendBuffer,
8716 >,
8717 ) -> ::fidl_next::SendFuture<'_, ___T>
8718 where
8719 <___T as ::fidl_next::Transport>::SendBuffer:
8720 ::fidl_next::encoder::InternalHandleEncoder,
8721 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8722 {
8723 self.list_extended_attributes_with(
8724 crate::generic::NodeListExtendedAttributesRequest { iterator },
8725 )
8726 }
8727
8728 #[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"]
8729 pub fn list_extended_attributes_with<___R>(
8730 &self,
8731 request: ___R,
8732 ) -> ::fidl_next::SendFuture<'_, ___T>
8733 where
8734 ___R: ::fidl_next::Encode<
8735 crate::wire::NodeListExtendedAttributesRequest,
8736 <___T as ::fidl_next::Transport>::SendBuffer,
8737 >,
8738 {
8739 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8740 5431626189872037072,
8741 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
8742 request,
8743 ))
8744 }
8745
8746 #[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"]
8747 pub fn get_extended_attribute(
8748 &self,
8749
8750 name: impl ::fidl_next::Encode<
8751 ::fidl_next::wire::Vector<'static, u8>,
8752 <___T as ::fidl_next::Transport>::SendBuffer,
8753 >,
8754 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
8755 where
8756 <___T as ::fidl_next::Transport>::SendBuffer:
8757 ::fidl_next::encoder::InternalHandleEncoder,
8758 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8759 {
8760 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
8761 name,
8762 })
8763 }
8764
8765 #[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"]
8766 pub fn get_extended_attribute_with<___R>(
8767 &self,
8768 request: ___R,
8769 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
8770 where
8771 ___R: ::fidl_next::Encode<
8772 crate::wire::NodeGetExtendedAttributeRequest<'static>,
8773 <___T as ::fidl_next::Transport>::SendBuffer,
8774 >,
8775 {
8776 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8777 5043930208506967771,
8778 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8779 request,
8780 ))
8781 }
8782
8783 #[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"]
8784 pub fn set_extended_attribute(
8785 &self,
8786
8787 name: impl ::fidl_next::Encode<
8788 ::fidl_next::wire::Vector<'static, u8>,
8789 <___T as ::fidl_next::Transport>::SendBuffer,
8790 >,
8791
8792 value: impl ::fidl_next::Encode<
8793 crate::wire::ExtendedAttributeValue<'static>,
8794 <___T as ::fidl_next::Transport>::SendBuffer,
8795 >,
8796
8797 mode: impl ::fidl_next::Encode<
8798 crate::wire::SetExtendedAttributeMode,
8799 <___T as ::fidl_next::Transport>::SendBuffer,
8800 >,
8801 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
8802 where
8803 <___T as ::fidl_next::Transport>::SendBuffer:
8804 ::fidl_next::encoder::InternalHandleEncoder,
8805 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8806 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8807 {
8808 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
8809 name,
8810
8811 value,
8812
8813 mode,
8814 })
8815 }
8816
8817 #[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"]
8818 pub fn set_extended_attribute_with<___R>(
8819 &self,
8820 request: ___R,
8821 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
8822 where
8823 ___R: ::fidl_next::Encode<
8824 crate::wire::NodeSetExtendedAttributeRequest<'static>,
8825 <___T as ::fidl_next::Transport>::SendBuffer,
8826 >,
8827 {
8828 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8829 5374223046099989052,
8830 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8831 request,
8832 ))
8833 }
8834
8835 #[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"]
8836 pub fn remove_extended_attribute(
8837 &self,
8838
8839 name: impl ::fidl_next::Encode<
8840 ::fidl_next::wire::Vector<'static, u8>,
8841 <___T as ::fidl_next::Transport>::SendBuffer,
8842 >,
8843 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
8844 where
8845 <___T as ::fidl_next::Transport>::SendBuffer:
8846 ::fidl_next::encoder::InternalHandleEncoder,
8847 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8848 {
8849 self.remove_extended_attribute_with(
8850 crate::generic::NodeRemoveExtendedAttributeRequest { name },
8851 )
8852 }
8853
8854 #[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"]
8855 pub fn remove_extended_attribute_with<___R>(
8856 &self,
8857 request: ___R,
8858 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
8859 where
8860 ___R: ::fidl_next::Encode<
8861 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
8862 <___T as ::fidl_next::Transport>::SendBuffer,
8863 >,
8864 {
8865 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8866 8794297771444732717,
8867 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8868 request,
8869 ))
8870 }
8871
8872 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
8873 pub fn deprecated_open(
8874 &self,
8875
8876 flags: impl ::fidl_next::Encode<
8877 crate::wire::OpenFlags,
8878 <___T as ::fidl_next::Transport>::SendBuffer,
8879 >,
8880
8881 mode: impl ::fidl_next::Encode<
8882 crate::wire::ModeType,
8883 <___T as ::fidl_next::Transport>::SendBuffer,
8884 >,
8885
8886 path: impl ::fidl_next::Encode<
8887 ::fidl_next::wire::String<'static>,
8888 <___T as ::fidl_next::Transport>::SendBuffer,
8889 >,
8890
8891 object: impl ::fidl_next::Encode<
8892 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
8893 <___T as ::fidl_next::Transport>::SendBuffer,
8894 >,
8895 ) -> ::fidl_next::SendFuture<'_, ___T>
8896 where
8897 <___T as ::fidl_next::Transport>::SendBuffer:
8898 ::fidl_next::encoder::InternalHandleEncoder,
8899 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8900 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8901 {
8902 self.deprecated_open_with(crate::generic::DirectoryDeprecatedOpenRequest {
8903 flags,
8904
8905 mode,
8906
8907 path,
8908
8909 object,
8910 })
8911 }
8912
8913 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
8914 pub fn deprecated_open_with<___R>(
8915 &self,
8916 request: ___R,
8917 ) -> ::fidl_next::SendFuture<'_, ___T>
8918 where
8919 ___R: ::fidl_next::Encode<
8920 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
8921 <___T as ::fidl_next::Transport>::SendBuffer,
8922 >,
8923 {
8924 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8925 3193127272456937152,
8926 <super::DeprecatedOpen as ::fidl_next::Method>::FLEXIBILITY,
8927 request,
8928 ))
8929 }
8930
8931 #[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"]
8932 pub fn open(
8933 &self,
8934
8935 path: impl ::fidl_next::Encode<
8936 ::fidl_next::wire::String<'static>,
8937 <___T as ::fidl_next::Transport>::SendBuffer,
8938 >,
8939
8940 flags: impl ::fidl_next::Encode<
8941 crate::wire::Flags,
8942 <___T as ::fidl_next::Transport>::SendBuffer,
8943 >,
8944
8945 options: impl ::fidl_next::Encode<
8946 crate::wire::Options<'static>,
8947 <___T as ::fidl_next::Transport>::SendBuffer,
8948 >,
8949
8950 object: impl ::fidl_next::Encode<
8951 ::fidl_next::wire::fuchsia::Channel,
8952 <___T as ::fidl_next::Transport>::SendBuffer,
8953 >,
8954 ) -> ::fidl_next::SendFuture<'_, ___T>
8955 where
8956 <___T as ::fidl_next::Transport>::SendBuffer:
8957 ::fidl_next::encoder::InternalHandleEncoder,
8958 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8959 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8960 {
8961 self.open_with(crate::generic::DirectoryOpenRequest {
8962 path,
8963
8964 flags,
8965
8966 options,
8967
8968 object,
8969 })
8970 }
8971
8972 #[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"]
8973 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
8974 where
8975 ___R: ::fidl_next::Encode<
8976 crate::wire::DirectoryOpenRequest<'static>,
8977 <___T as ::fidl_next::Transport>::SendBuffer,
8978 >,
8979 {
8980 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8981 6236883748953765593,
8982 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
8983 request,
8984 ))
8985 }
8986
8987 #[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"]
8988 pub fn read_dirents(
8989 &self,
8990
8991 max_bytes: impl ::fidl_next::Encode<
8992 ::fidl_next::wire::Uint64,
8993 <___T as ::fidl_next::Transport>::SendBuffer,
8994 >,
8995 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
8996 where
8997 <___T as ::fidl_next::Transport>::SendBuffer:
8998 ::fidl_next::encoder::InternalHandleEncoder,
8999 {
9000 self.read_dirents_with(crate::generic::DirectoryReadDirentsRequest { max_bytes })
9001 }
9002
9003 #[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"]
9004 pub fn read_dirents_with<___R>(
9005 &self,
9006 request: ___R,
9007 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
9008 where
9009 ___R: ::fidl_next::Encode<
9010 crate::wire::DirectoryReadDirentsRequest,
9011 <___T as ::fidl_next::Transport>::SendBuffer,
9012 >,
9013 {
9014 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9015 3855785432100874762,
9016 <super::ReadDirents as ::fidl_next::Method>::FLEXIBILITY,
9017 request,
9018 ))
9019 }
9020
9021 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
9022 pub fn rewind(&self) -> ::fidl_next::TwoWayFuture<'_, super::Rewind, ___T> {
9023 ::fidl_next::TwoWayFuture::from_untyped(
9024 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9025 1635123508515392625,
9026 <super::Rewind as ::fidl_next::Method>::FLEXIBILITY,
9027 (),
9028 ),
9029 )
9030 }
9031
9032 #[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"]
9033 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
9034 ::fidl_next::TwoWayFuture::from_untyped(
9035 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9036 2787337947777369685,
9037 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
9038 (),
9039 ),
9040 )
9041 }
9042
9043 #[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"]
9044 pub fn link(
9045 &self,
9046
9047 src: impl ::fidl_next::Encode<
9048 ::fidl_next::wire::String<'static>,
9049 <___T as ::fidl_next::Transport>::SendBuffer,
9050 >,
9051
9052 dst_parent_token: impl ::fidl_next::Encode<
9053 ::fidl_next::wire::fuchsia::NullableHandle,
9054 <___T as ::fidl_next::Transport>::SendBuffer,
9055 >,
9056
9057 dst: impl ::fidl_next::Encode<
9058 ::fidl_next::wire::String<'static>,
9059 <___T as ::fidl_next::Transport>::SendBuffer,
9060 >,
9061 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
9062 where
9063 <___T as ::fidl_next::Transport>::SendBuffer:
9064 ::fidl_next::encoder::InternalHandleEncoder,
9065 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9066 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9067 {
9068 self.link_with(crate::generic::DirectoryLinkRequest { src, dst_parent_token, dst })
9069 }
9070
9071 #[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"]
9072 pub fn link_with<___R>(
9073 &self,
9074 request: ___R,
9075 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
9076 where
9077 ___R: ::fidl_next::Encode<
9078 crate::wire::DirectoryLinkRequest<'static>,
9079 <___T as ::fidl_next::Transport>::SendBuffer,
9080 >,
9081 {
9082 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9083 8360374984291987687,
9084 <super::Link as ::fidl_next::Method>::FLEXIBILITY,
9085 request,
9086 ))
9087 }
9088
9089 #[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"]
9090 pub fn unlink(
9091 &self,
9092
9093 name: impl ::fidl_next::Encode<
9094 ::fidl_next::wire::String<'static>,
9095 <___T as ::fidl_next::Transport>::SendBuffer,
9096 >,
9097
9098 options: impl ::fidl_next::Encode<
9099 crate::wire::UnlinkOptions<'static>,
9100 <___T as ::fidl_next::Transport>::SendBuffer,
9101 >,
9102 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
9103 where
9104 <___T as ::fidl_next::Transport>::SendBuffer:
9105 ::fidl_next::encoder::InternalHandleEncoder,
9106 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9107 {
9108 self.unlink_with(crate::generic::DirectoryUnlinkRequest { name, options })
9109 }
9110
9111 #[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"]
9112 pub fn unlink_with<___R>(
9113 &self,
9114 request: ___R,
9115 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
9116 where
9117 ___R: ::fidl_next::Encode<
9118 crate::wire::DirectoryUnlinkRequest<'static>,
9119 <___T as ::fidl_next::Transport>::SendBuffer,
9120 >,
9121 {
9122 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9123 8433556716759383021,
9124 <super::Unlink as ::fidl_next::Method>::FLEXIBILITY,
9125 request,
9126 ))
9127 }
9128
9129 #[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"]
9130 pub fn rename(
9131 &self,
9132
9133 src: impl ::fidl_next::Encode<
9134 ::fidl_next::wire::String<'static>,
9135 <___T as ::fidl_next::Transport>::SendBuffer,
9136 >,
9137
9138 dst_parent_token: impl ::fidl_next::Encode<
9139 ::fidl_next::wire::fuchsia::Event,
9140 <___T as ::fidl_next::Transport>::SendBuffer,
9141 >,
9142
9143 dst: impl ::fidl_next::Encode<
9144 ::fidl_next::wire::String<'static>,
9145 <___T as ::fidl_next::Transport>::SendBuffer,
9146 >,
9147 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
9148 where
9149 <___T as ::fidl_next::Transport>::SendBuffer:
9150 ::fidl_next::encoder::InternalHandleEncoder,
9151 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9152 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9153 {
9154 self.rename_with(crate::generic::DirectoryRenameRequest {
9155 src,
9156
9157 dst_parent_token,
9158
9159 dst,
9160 })
9161 }
9162
9163 #[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"]
9164 pub fn rename_with<___R>(
9165 &self,
9166 request: ___R,
9167 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
9168 where
9169 ___R: ::fidl_next::Encode<
9170 crate::wire::DirectoryRenameRequest<'static>,
9171 <___T as ::fidl_next::Transport>::SendBuffer,
9172 >,
9173 {
9174 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9175 8097726607824333022,
9176 <super::Rename as ::fidl_next::Method>::FLEXIBILITY,
9177 request,
9178 ))
9179 }
9180
9181 #[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"]
9182 pub fn create_symlink(
9183 &self,
9184
9185 name: impl ::fidl_next::Encode<
9186 ::fidl_next::wire::String<'static>,
9187 <___T as ::fidl_next::Transport>::SendBuffer,
9188 >,
9189
9190 target: impl ::fidl_next::Encode<
9191 ::fidl_next::wire::Vector<'static, u8>,
9192 <___T as ::fidl_next::Transport>::SendBuffer,
9193 >,
9194
9195 connection: impl ::fidl_next::Encode<
9196 ::fidl_next::ServerEnd<
9197 crate::Symlink,
9198 ::fidl_next::wire::fuchsia::OptionalChannel,
9199 >,
9200 <___T as ::fidl_next::Transport>::SendBuffer,
9201 >,
9202 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
9203 where
9204 <___T as ::fidl_next::Transport>::SendBuffer:
9205 ::fidl_next::encoder::InternalHandleEncoder,
9206 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9207 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9208 {
9209 self.create_symlink_with(crate::generic::DirectoryCreateSymlinkRequest {
9210 name,
9211
9212 target,
9213
9214 connection,
9215 })
9216 }
9217
9218 #[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"]
9219 pub fn create_symlink_with<___R>(
9220 &self,
9221 request: ___R,
9222 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
9223 where
9224 ___R: ::fidl_next::Encode<
9225 crate::wire::DirectoryCreateSymlinkRequest<'static>,
9226 <___T as ::fidl_next::Transport>::SendBuffer,
9227 >,
9228 {
9229 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9230 2435901052462315657,
9231 <super::CreateSymlink as ::fidl_next::Method>::FLEXIBILITY,
9232 request,
9233 ))
9234 }
9235
9236 #[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"]
9237 pub fn watch(
9238 &self,
9239
9240 mask: impl ::fidl_next::Encode<
9241 crate::wire::WatchMask,
9242 <___T as ::fidl_next::Transport>::SendBuffer,
9243 >,
9244
9245 options: impl ::fidl_next::Encode<
9246 ::fidl_next::wire::Uint32,
9247 <___T as ::fidl_next::Transport>::SendBuffer,
9248 >,
9249
9250 watcher: impl ::fidl_next::Encode<
9251 ::fidl_next::ServerEnd<
9252 crate::DirectoryWatcher,
9253 ::fidl_next::wire::fuchsia::Channel,
9254 >,
9255 <___T as ::fidl_next::Transport>::SendBuffer,
9256 >,
9257 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
9258 where
9259 <___T as ::fidl_next::Transport>::SendBuffer:
9260 ::fidl_next::encoder::InternalHandleEncoder,
9261 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9262 {
9263 self.watch_with(crate::generic::DirectoryWatchRequest { mask, options, watcher })
9264 }
9265
9266 #[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"]
9267 pub fn watch_with<___R>(
9268 &self,
9269 request: ___R,
9270 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
9271 where
9272 ___R: ::fidl_next::Encode<
9273 crate::wire::DirectoryWatchRequest,
9274 <___T as ::fidl_next::Transport>::SendBuffer,
9275 >,
9276 {
9277 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9278 6275512344170098065,
9279 <super::Watch as ::fidl_next::Method>::FLEXIBILITY,
9280 request,
9281 ))
9282 }
9283 }
9284
9285 #[repr(transparent)]
9287 pub struct DirectoryServer<___T: ::fidl_next::Transport> {
9288 server: ::fidl_next::protocol::Server<___T>,
9289 }
9290
9291 impl<___T> DirectoryServer<___T>
9292 where
9293 ___T: ::fidl_next::Transport,
9294 {
9295 #[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"]
9296 pub fn on_open(
9297 &self,
9298
9299 s: impl ::fidl_next::Encode<
9300 ::fidl_next::wire::Int32,
9301 <___T as ::fidl_next::Transport>::SendBuffer,
9302 >,
9303
9304 info: impl ::fidl_next::Encode<
9305 crate::wire_optional::NodeInfoDeprecated<'static>,
9306 <___T as ::fidl_next::Transport>::SendBuffer,
9307 >,
9308 ) -> ::fidl_next::SendFuture<'_, ___T>
9309 where
9310 <___T as ::fidl_next::Transport>::SendBuffer:
9311 ::fidl_next::encoder::InternalHandleEncoder,
9312 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9313 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9314 {
9315 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
9316 }
9317
9318 #[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"]
9319
9320 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
9321 where
9322 ___R: ::fidl_next::Encode<
9323 <super::OnOpen as ::fidl_next::Method>::Request,
9324 <___T as ::fidl_next::Transport>::SendBuffer,
9325 >,
9326 {
9327 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
9328 9207534335756671346,
9329 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
9330 request,
9331 ))
9332 }
9333
9334 #[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"]
9335
9336 pub fn on_representation_with<___R>(
9337 &self,
9338 request: ___R,
9339 ) -> ::fidl_next::SendFuture<'_, ___T>
9340 where
9341 ___R: ::fidl_next::Encode<
9342 <super::OnRepresentation as ::fidl_next::Method>::Request,
9343 <___T as ::fidl_next::Transport>::SendBuffer,
9344 >,
9345 {
9346 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
9347 6679970090861613324,
9348 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
9349 request,
9350 ))
9351 }
9352 }
9353 }
9354}
9355
9356pub trait DirectoryClientHandler<
9360 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9361 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9362>
9363{
9364 #[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"]
9365 fn on_open(
9366 &mut self,
9367
9368 request: ::fidl_next::Request<directory::OnOpen, ___T>,
9369 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9370
9371 #[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"]
9372 fn on_representation(
9373 &mut self,
9374
9375 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
9376 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9377
9378 fn on_unknown_interaction(
9379 &mut self,
9380 ordinal: u64,
9381 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9382 ::core::future::ready(())
9383 }
9384}
9385
9386impl<___T> DirectoryClientHandler<___T> for ::fidl_next::IgnoreEvents
9387where
9388 ___T: ::fidl_next::Transport,
9389{
9390 async fn on_open(&mut self, _: ::fidl_next::Request<directory::OnOpen, ___T>) {}
9391
9392 async fn on_representation(
9393 &mut self,
9394
9395 _: ::fidl_next::Request<directory::OnRepresentation, ___T>,
9396 ) {
9397 }
9398
9399 async fn on_unknown_interaction(&mut self, _: u64) {}
9400}
9401
9402impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Directory
9403where
9404 ___H: DirectoryClientHandler<___T> + ::core::marker::Send,
9405 ___T: ::fidl_next::Transport,
9406 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
9407 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9408 Constraint = (),
9409 >,
9410 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
9411 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9412 Constraint = (),
9413 >,
9414{
9415 async fn on_event(
9416 handler: &mut ___H,
9417 ordinal: u64,
9418 flexibility: ::fidl_next::protocol::Flexibility,
9419 body: ::fidl_next::Body<___T>,
9420 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9421 match ordinal {
9422 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9423 Ok(decoded) => {
9424 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
9425 Ok(())
9426 }
9427 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9428 ordinal: 9207534335756671346,
9429 error,
9430 }),
9431 },
9432
9433 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9434 Ok(decoded) => {
9435 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
9436 Ok(())
9437 }
9438 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9439 ordinal: 6679970090861613324,
9440 error,
9441 }),
9442 },
9443
9444 ordinal => {
9445 handler.on_unknown_interaction(ordinal).await;
9446 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
9447 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9448 } else {
9449 Ok(())
9450 }
9451 }
9452 }
9453 }
9454}
9455
9456pub trait DirectoryServerHandler<
9460 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9461 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9462>
9463{
9464 #[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"]
9465 fn advisory_lock(
9466 &mut self,
9467
9468 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
9469
9470 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
9471 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9472
9473 fn clone(
9474 &mut self,
9475
9476 request: ::fidl_next::Request<directory::Clone, ___T>,
9477 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9478
9479 #[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"]
9480 fn close(
9481 &mut self,
9482
9483 responder: ::fidl_next::Responder<directory::Close, ___T>,
9484 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9485
9486 fn query(
9487 &mut self,
9488
9489 responder: ::fidl_next::Responder<directory::Query, ___T>,
9490 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9491
9492 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9493 fn deprecated_clone(
9494 &mut self,
9495
9496 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
9497 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9498
9499 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
9500 fn deprecated_get_attr(
9501 &mut self,
9502
9503 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
9504 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9505
9506 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9507 fn deprecated_set_attr(
9508 &mut self,
9509
9510 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
9511
9512 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
9513 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9514
9515 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
9516 fn deprecated_get_flags(
9517 &mut self,
9518
9519 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
9520 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9521
9522 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9523 fn deprecated_set_flags(
9524 &mut self,
9525
9526 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
9527
9528 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
9529 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9530
9531 #[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"]
9532 fn get_flags(
9533 &mut self,
9534
9535 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
9536 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9537
9538 #[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"]
9539 fn set_flags(
9540 &mut self,
9541
9542 request: ::fidl_next::Request<directory::SetFlags, ___T>,
9543
9544 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
9545 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9546
9547 #[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"]
9548 fn query_filesystem(
9549 &mut self,
9550
9551 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
9552 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9553
9554 #[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"]
9555 fn get_attributes(
9556 &mut self,
9557
9558 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
9559
9560 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
9561 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9562
9563 #[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"]
9564 fn update_attributes(
9565 &mut self,
9566
9567 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
9568
9569 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
9570 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9571
9572 #[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"]
9573 fn sync(
9574 &mut self,
9575
9576 responder: ::fidl_next::Responder<directory::Sync, ___T>,
9577 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9578
9579 #[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"]
9580 fn list_extended_attributes(
9581 &mut self,
9582
9583 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
9584 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9585
9586 #[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"]
9587 fn get_extended_attribute(
9588 &mut self,
9589
9590 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
9591
9592 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
9593 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9594
9595 #[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"]
9596 fn set_extended_attribute(
9597 &mut self,
9598
9599 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
9600
9601 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
9602 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9603
9604 #[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"]
9605 fn remove_extended_attribute(
9606 &mut self,
9607
9608 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
9609
9610 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
9611 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9612
9613 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
9614 fn deprecated_open(
9615 &mut self,
9616
9617 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
9618 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9619
9620 #[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"]
9621 fn open(
9622 &mut self,
9623
9624 request: ::fidl_next::Request<directory::Open, ___T>,
9625 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9626
9627 #[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"]
9628 fn read_dirents(
9629 &mut self,
9630
9631 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
9632
9633 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
9634 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9635
9636 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
9637 fn rewind(
9638 &mut self,
9639
9640 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
9641 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9642
9643 #[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"]
9644 fn get_token(
9645 &mut self,
9646
9647 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
9648 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9649
9650 #[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"]
9651 fn link(
9652 &mut self,
9653
9654 request: ::fidl_next::Request<directory::Link, ___T>,
9655
9656 responder: ::fidl_next::Responder<directory::Link, ___T>,
9657 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9658
9659 #[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"]
9660 fn unlink(
9661 &mut self,
9662
9663 request: ::fidl_next::Request<directory::Unlink, ___T>,
9664
9665 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
9666 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9667
9668 #[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"]
9669 fn rename(
9670 &mut self,
9671
9672 request: ::fidl_next::Request<directory::Rename, ___T>,
9673
9674 responder: ::fidl_next::Responder<directory::Rename, ___T>,
9675 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9676
9677 #[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"]
9678 fn create_symlink(
9679 &mut self,
9680
9681 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
9682
9683 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
9684 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9685
9686 #[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"]
9687 fn watch(
9688 &mut self,
9689
9690 request: ::fidl_next::Request<directory::Watch, ___T>,
9691
9692 responder: ::fidl_next::Responder<directory::Watch, ___T>,
9693 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9694
9695 fn on_unknown_interaction(
9696 &mut self,
9697 ordinal: u64,
9698 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9699 ::core::future::ready(())
9700 }
9701}
9702
9703impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Directory
9704where
9705 ___H: DirectoryServerHandler<___T> + ::core::marker::Send,
9706 ___T: ::fidl_next::Transport,
9707 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
9708 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9709 Constraint = (),
9710 >,
9711 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
9712 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9713 Constraint = (),
9714 >,
9715 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
9716 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9717 Constraint = (),
9718 >,
9719 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
9720 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9721 Constraint = (),
9722 >,
9723 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
9724 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9725 Constraint = (),
9726 >,
9727 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
9728 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9729 Constraint = (),
9730 >,
9731 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
9732 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9733 Constraint = (),
9734 >,
9735 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
9736 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9737 Constraint = (),
9738 >,
9739 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
9740 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9741 Constraint = (),
9742 >,
9743 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9744 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9745 Constraint = (),
9746 >,
9747 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9748 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9749 Constraint = (),
9750 >,
9751 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9752 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9753 Constraint = (),
9754 >,
9755 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
9756 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9757 Constraint = (),
9758 >,
9759 for<'de> crate::wire::DirectoryOpenRequest<'de>: ::fidl_next::Decode<
9760 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9761 Constraint = (),
9762 >,
9763 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
9764 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9765 Constraint = (),
9766 >,
9767 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
9768 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9769 Constraint = (),
9770 >,
9771 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
9772 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9773 Constraint = (),
9774 >,
9775 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
9776 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9777 Constraint = (),
9778 >,
9779 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
9780 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9781 Constraint = (),
9782 >,
9783 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
9784 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9785 Constraint = (),
9786 >,
9787{
9788 async fn on_one_way(
9789 handler: &mut ___H,
9790 ordinal: u64,
9791 flexibility: ::fidl_next::protocol::Flexibility,
9792 body: ::fidl_next::Body<___T>,
9793 ) -> ::core::result::Result<
9794 (),
9795 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9796 > {
9797 match ordinal {
9798 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9799 Ok(decoded) => {
9800 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
9801 Ok(())
9802 }
9803 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9804 ordinal: 2366825959783828089,
9805 error,
9806 }),
9807 },
9808
9809 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9810 Ok(decoded) => {
9811 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
9812 Ok(())
9813 }
9814 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9815 ordinal: 6512600400724287855,
9816 error,
9817 }),
9818 },
9819
9820 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9821 Ok(decoded) => {
9822 handler
9823 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
9824 .await;
9825 Ok(())
9826 }
9827 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9828 ordinal: 5431626189872037072,
9829 error,
9830 }),
9831 },
9832
9833 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9834 Ok(decoded) => {
9835 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
9836 Ok(())
9837 }
9838 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9839 ordinal: 3193127272456937152,
9840 error,
9841 }),
9842 },
9843
9844 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9845 Ok(decoded) => {
9846 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
9847 Ok(())
9848 }
9849 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9850 ordinal: 6236883748953765593,
9851 error,
9852 }),
9853 },
9854
9855 ordinal => {
9856 handler.on_unknown_interaction(ordinal).await;
9857 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
9858 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9859 } else {
9860 Ok(())
9861 }
9862 }
9863 }
9864 }
9865
9866 async fn on_two_way(
9867 handler: &mut ___H,
9868 ordinal: u64,
9869 flexibility: ::fidl_next::protocol::Flexibility,
9870 body: ::fidl_next::Body<___T>,
9871 responder: ::fidl_next::protocol::Responder<___T>,
9872 ) -> ::core::result::Result<
9873 (),
9874 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9875 > {
9876 match ordinal {
9877 7992130864415541162 => {
9878 let responder = ::fidl_next::Responder::from_untyped(responder);
9879
9880 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9881 Ok(decoded) => {
9882 handler
9883 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
9884 .await;
9885 Ok(())
9886 }
9887 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9888 ordinal: 7992130864415541162,
9889 error,
9890 }),
9891 }
9892 }
9893
9894 6540867515453498750 => {
9895 let responder = ::fidl_next::Responder::from_untyped(responder);
9896
9897 handler.close(responder).await;
9898 Ok(())
9899 }
9900
9901 2763219980499352582 => {
9902 let responder = ::fidl_next::Responder::from_untyped(responder);
9903
9904 handler.query(responder).await;
9905 Ok(())
9906 }
9907
9908 8689798978500614909 => {
9909 let responder = ::fidl_next::Responder::from_untyped(responder);
9910
9911 handler.deprecated_get_attr(responder).await;
9912 Ok(())
9913 }
9914
9915 4721673413776871238 => {
9916 let responder = ::fidl_next::Responder::from_untyped(responder);
9917
9918 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9919 Ok(decoded) => {
9920 handler
9921 .deprecated_set_attr(
9922 ::fidl_next::Request::from_decoded(decoded),
9923 responder,
9924 )
9925 .await;
9926 Ok(())
9927 }
9928 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9929 ordinal: 4721673413776871238,
9930 error,
9931 }),
9932 }
9933 }
9934
9935 6595803110182632097 => {
9936 let responder = ::fidl_next::Responder::from_untyped(responder);
9937
9938 handler.deprecated_get_flags(responder).await;
9939 Ok(())
9940 }
9941
9942 5950864159036794675 => {
9943 let responder = ::fidl_next::Responder::from_untyped(responder);
9944
9945 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9946 Ok(decoded) => {
9947 handler
9948 .deprecated_set_flags(
9949 ::fidl_next::Request::from_decoded(decoded),
9950 responder,
9951 )
9952 .await;
9953 Ok(())
9954 }
9955 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9956 ordinal: 5950864159036794675,
9957 error,
9958 }),
9959 }
9960 }
9961
9962 105530239381466147 => {
9963 let responder = ::fidl_next::Responder::from_untyped(responder);
9964
9965 handler.get_flags(responder).await;
9966 Ok(())
9967 }
9968
9969 6172186066099445416 => {
9970 let responder = ::fidl_next::Responder::from_untyped(responder);
9971
9972 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9973 Ok(decoded) => {
9974 handler
9975 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
9976 .await;
9977 Ok(())
9978 }
9979 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9980 ordinal: 6172186066099445416,
9981 error,
9982 }),
9983 }
9984 }
9985
9986 8013111122914313744 => {
9987 let responder = ::fidl_next::Responder::from_untyped(responder);
9988
9989 handler.query_filesystem(responder).await;
9990 Ok(())
9991 }
9992
9993 4414537700416816443 => {
9994 let responder = ::fidl_next::Responder::from_untyped(responder);
9995
9996 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9997 Ok(decoded) => {
9998 handler
9999 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
10000 .await;
10001 Ok(())
10002 }
10003 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10004 ordinal: 4414537700416816443,
10005 error,
10006 }),
10007 }
10008 }
10009
10010 3677402239314018056 => {
10011 let responder = ::fidl_next::Responder::from_untyped(responder);
10012
10013 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10014 Ok(decoded) => {
10015 handler
10016 .update_attributes(
10017 ::fidl_next::Request::from_decoded(decoded),
10018 responder,
10019 )
10020 .await;
10021 Ok(())
10022 }
10023 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10024 ordinal: 3677402239314018056,
10025 error,
10026 }),
10027 }
10028 }
10029
10030 3196473584242777161 => {
10031 let responder = ::fidl_next::Responder::from_untyped(responder);
10032
10033 handler.sync(responder).await;
10034 Ok(())
10035 }
10036
10037 5043930208506967771 => {
10038 let responder = ::fidl_next::Responder::from_untyped(responder);
10039
10040 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10041 Ok(decoded) => {
10042 handler
10043 .get_extended_attribute(
10044 ::fidl_next::Request::from_decoded(decoded),
10045 responder,
10046 )
10047 .await;
10048 Ok(())
10049 }
10050 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10051 ordinal: 5043930208506967771,
10052 error,
10053 }),
10054 }
10055 }
10056
10057 5374223046099989052 => {
10058 let responder = ::fidl_next::Responder::from_untyped(responder);
10059
10060 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10061 Ok(decoded) => {
10062 handler
10063 .set_extended_attribute(
10064 ::fidl_next::Request::from_decoded(decoded),
10065 responder,
10066 )
10067 .await;
10068 Ok(())
10069 }
10070 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10071 ordinal: 5374223046099989052,
10072 error,
10073 }),
10074 }
10075 }
10076
10077 8794297771444732717 => {
10078 let responder = ::fidl_next::Responder::from_untyped(responder);
10079
10080 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10081 Ok(decoded) => {
10082 handler
10083 .remove_extended_attribute(
10084 ::fidl_next::Request::from_decoded(decoded),
10085 responder,
10086 )
10087 .await;
10088 Ok(())
10089 }
10090 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10091 ordinal: 8794297771444732717,
10092 error,
10093 }),
10094 }
10095 }
10096
10097 3855785432100874762 => {
10098 let responder = ::fidl_next::Responder::from_untyped(responder);
10099
10100 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10101 Ok(decoded) => {
10102 handler
10103 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
10104 .await;
10105 Ok(())
10106 }
10107 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10108 ordinal: 3855785432100874762,
10109 error,
10110 }),
10111 }
10112 }
10113
10114 1635123508515392625 => {
10115 let responder = ::fidl_next::Responder::from_untyped(responder);
10116
10117 handler.rewind(responder).await;
10118 Ok(())
10119 }
10120
10121 2787337947777369685 => {
10122 let responder = ::fidl_next::Responder::from_untyped(responder);
10123
10124 handler.get_token(responder).await;
10125 Ok(())
10126 }
10127
10128 8360374984291987687 => {
10129 let responder = ::fidl_next::Responder::from_untyped(responder);
10130
10131 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10132 Ok(decoded) => {
10133 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
10134 Ok(())
10135 }
10136 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10137 ordinal: 8360374984291987687,
10138 error,
10139 }),
10140 }
10141 }
10142
10143 8433556716759383021 => {
10144 let responder = ::fidl_next::Responder::from_untyped(responder);
10145
10146 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10147 Ok(decoded) => {
10148 handler
10149 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
10150 .await;
10151 Ok(())
10152 }
10153 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10154 ordinal: 8433556716759383021,
10155 error,
10156 }),
10157 }
10158 }
10159
10160 8097726607824333022 => {
10161 let responder = ::fidl_next::Responder::from_untyped(responder);
10162
10163 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10164 Ok(decoded) => {
10165 handler
10166 .rename(::fidl_next::Request::from_decoded(decoded), responder)
10167 .await;
10168 Ok(())
10169 }
10170 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10171 ordinal: 8097726607824333022,
10172 error,
10173 }),
10174 }
10175 }
10176
10177 2435901052462315657 => {
10178 let responder = ::fidl_next::Responder::from_untyped(responder);
10179
10180 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10181 Ok(decoded) => {
10182 handler
10183 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
10184 .await;
10185 Ok(())
10186 }
10187 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10188 ordinal: 2435901052462315657,
10189 error,
10190 }),
10191 }
10192 }
10193
10194 6275512344170098065 => {
10195 let responder = ::fidl_next::Responder::from_untyped(responder);
10196
10197 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10198 Ok(decoded) => {
10199 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
10200 Ok(())
10201 }
10202 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10203 ordinal: 6275512344170098065,
10204 error,
10205 }),
10206 }
10207 }
10208
10209 ordinal => {
10210 handler.on_unknown_interaction(ordinal).await;
10211 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10212 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10213 } else {
10214 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
10215 ordinal,
10216 flexibility,
10217 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
10218 )
10219 .expect("encoding a framework error should never fail")
10220 .await?;
10221 Ok(())
10222 }
10223 }
10224 }
10225 }
10226}
10227
10228#[derive(PartialEq, Debug)]
10230pub struct Linkable;
10231
10232#[cfg(target_os = "fuchsia")]
10233impl ::fidl_next::HasTransport for Linkable {
10234 type Transport = ::fidl_next::fuchsia::zx::Channel;
10235}
10236
10237pub mod linkable {
10238 pub mod prelude {
10239 pub use crate::{Linkable, LinkableClientHandler, LinkableServerHandler, linkable};
10240
10241 pub use crate::natural::LinkableLinkIntoRequest;
10242
10243 pub use crate::natural::LinkableLinkIntoResponse;
10244 }
10245
10246 pub struct LinkInto;
10247
10248 impl ::fidl_next::Method for LinkInto {
10249 const ORDINAL: u64 = 6121399674497678964;
10250 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10251 ::fidl_next::protocol::Flexibility::Strict;
10252
10253 type Protocol = crate::Linkable;
10254
10255 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
10256 }
10257
10258 impl ::fidl_next::TwoWayMethod for LinkInto {
10259 type Response = ::fidl_next::wire::Result<
10260 'static,
10261 crate::wire::LinkableLinkIntoResponse,
10262 ::fidl_next::wire::Int32,
10263 >;
10264 }
10265
10266 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
10267 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10268
10269 fn respond(response: ___R) -> Self::Output {
10270 ::core::result::Result::Ok(response)
10271 }
10272 }
10273
10274 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
10275 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10276
10277 fn respond_err(response: ___R) -> Self::Output {
10278 ::core::result::Result::Err(response)
10279 }
10280 }
10281
10282 mod ___detail {
10283 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Linkable
10284 where
10285 ___T: ::fidl_next::Transport,
10286 {
10287 type Client = LinkableClient<___T>;
10288 type Server = LinkableServer<___T>;
10289 }
10290
10291 #[repr(transparent)]
10293 pub struct LinkableClient<___T: ::fidl_next::Transport> {
10294 #[allow(dead_code)]
10295 client: ::fidl_next::protocol::Client<___T>,
10296 }
10297
10298 impl<___T> LinkableClient<___T>
10299 where
10300 ___T: ::fidl_next::Transport,
10301 {
10302 #[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"]
10303 pub fn link_into(
10304 &self,
10305
10306 dst_parent_token: impl ::fidl_next::Encode<
10307 ::fidl_next::wire::fuchsia::Event,
10308 <___T as ::fidl_next::Transport>::SendBuffer,
10309 >,
10310
10311 dst: impl ::fidl_next::Encode<
10312 ::fidl_next::wire::String<'static>,
10313 <___T as ::fidl_next::Transport>::SendBuffer,
10314 >,
10315 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
10316 where
10317 <___T as ::fidl_next::Transport>::SendBuffer:
10318 ::fidl_next::encoder::InternalHandleEncoder,
10319 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10320 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10321 {
10322 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
10323 dst_parent_token,
10324
10325 dst,
10326 })
10327 }
10328
10329 #[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"]
10330 pub fn link_into_with<___R>(
10331 &self,
10332 request: ___R,
10333 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
10334 where
10335 ___R: ::fidl_next::Encode<
10336 crate::wire::LinkableLinkIntoRequest<'static>,
10337 <___T as ::fidl_next::Transport>::SendBuffer,
10338 >,
10339 {
10340 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10341 6121399674497678964,
10342 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
10343 request,
10344 ))
10345 }
10346 }
10347
10348 #[repr(transparent)]
10350 pub struct LinkableServer<___T: ::fidl_next::Transport> {
10351 server: ::fidl_next::protocol::Server<___T>,
10352 }
10353
10354 impl<___T> LinkableServer<___T> where ___T: ::fidl_next::Transport {}
10355 }
10356}
10357
10358pub trait LinkableClientHandler<
10362 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10363 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10364>
10365{
10366}
10367
10368impl<___T> LinkableClientHandler<___T> for ::fidl_next::IgnoreEvents where
10369 ___T: ::fidl_next::Transport
10370{
10371}
10372
10373impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Linkable
10374where
10375 ___H: LinkableClientHandler<___T> + ::core::marker::Send,
10376 ___T: ::fidl_next::Transport,
10377{
10378 async fn on_event(
10379 handler: &mut ___H,
10380 ordinal: u64,
10381 flexibility: ::fidl_next::protocol::Flexibility,
10382 body: ::fidl_next::Body<___T>,
10383 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10384 match ordinal {
10385 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
10386 }
10387 }
10388}
10389
10390pub trait LinkableServerHandler<
10394 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10395 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10396>
10397{
10398 #[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"]
10399 fn link_into(
10400 &mut self,
10401
10402 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
10403
10404 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
10405 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10406}
10407
10408impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Linkable
10409where
10410 ___H: LinkableServerHandler<___T> + ::core::marker::Send,
10411 ___T: ::fidl_next::Transport,
10412 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
10413 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10414 Constraint = (),
10415 >,
10416{
10417 async fn on_one_way(
10418 handler: &mut ___H,
10419 ordinal: u64,
10420 flexibility: ::fidl_next::protocol::Flexibility,
10421 body: ::fidl_next::Body<___T>,
10422 ) -> ::core::result::Result<
10423 (),
10424 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10425 > {
10426 match ordinal {
10427 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
10428 }
10429 }
10430
10431 async fn on_two_way(
10432 handler: &mut ___H,
10433 ordinal: u64,
10434 flexibility: ::fidl_next::protocol::Flexibility,
10435 body: ::fidl_next::Body<___T>,
10436 responder: ::fidl_next::protocol::Responder<___T>,
10437 ) -> ::core::result::Result<
10438 (),
10439 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10440 > {
10441 match ordinal {
10442 6121399674497678964 => {
10443 let responder = ::fidl_next::Responder::from_untyped(responder);
10444
10445 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10446 Ok(decoded) => {
10447 handler
10448 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
10449 .await;
10450 Ok(())
10451 }
10452 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10453 ordinal: 6121399674497678964,
10454 error,
10455 }),
10456 }
10457 }
10458
10459 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
10460 }
10461 }
10462}
10463
10464#[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"]
10466#[derive(PartialEq, Debug)]
10467pub struct File;
10468
10469impl ::fidl_next::Discoverable for File {
10470 const PROTOCOL_NAME: &'static str = "fuchsia.io.File";
10471}
10472
10473#[cfg(target_os = "fuchsia")]
10474impl ::fidl_next::HasTransport for File {
10475 type Transport = ::fidl_next::fuchsia::zx::Channel;
10476}
10477
10478pub mod file {
10479 pub mod prelude {
10480 pub use crate::{File, FileClientHandler, FileServerHandler, file};
10481
10482 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
10483
10484 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
10485
10486 pub use crate::natural::ExtendedAttributeValue;
10487
10488 pub use crate::natural::FileAllocateRequest;
10489
10490 pub use crate::natural::FileEnableVerityRequest;
10491
10492 pub use crate::natural::FileGetBackingMemoryRequest;
10493
10494 pub use crate::natural::FileInfo;
10495
10496 pub use crate::natural::FileReadAtRequest;
10497
10498 pub use crate::natural::FileResizeRequest;
10499
10500 pub use crate::natural::FileSeekRequest;
10501
10502 pub use crate::natural::FileWriteAtRequest;
10503
10504 pub use crate::natural::FileAllocateResponse;
10505
10506 pub use crate::natural::FileEnableVerityResponse;
10507
10508 pub use crate::natural::FileGetBackingMemoryResponse;
10509
10510 pub use crate::natural::FileReadAtResponse;
10511
10512 pub use crate::natural::FileResizeResponse;
10513
10514 pub use crate::natural::FileSeekResponse;
10515
10516 pub use crate::natural::FileWriteAtResponse;
10517
10518 pub use crate::natural::LinkableLinkIntoRequest;
10519
10520 pub use crate::natural::LinkableLinkIntoResponse;
10521
10522 pub use crate::natural::MutableNodeAttributes;
10523
10524 pub use crate::natural::NodeAttributes2;
10525
10526 pub use crate::natural::NodeDeprecatedCloneRequest;
10527
10528 pub use crate::natural::NodeDeprecatedGetAttrResponse;
10529
10530 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
10531
10532 pub use crate::natural::NodeDeprecatedSetAttrRequest;
10533
10534 pub use crate::natural::NodeDeprecatedSetAttrResponse;
10535
10536 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
10537
10538 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
10539
10540 pub use crate::natural::NodeGetAttributesRequest;
10541
10542 pub use crate::natural::NodeGetExtendedAttributeRequest;
10543
10544 pub use crate::natural::NodeListExtendedAttributesRequest;
10545
10546 pub use crate::natural::NodeOnOpenRequest;
10547
10548 pub use crate::natural::NodeQueryFilesystemResponse;
10549
10550 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
10551
10552 pub use crate::natural::NodeSetExtendedAttributeRequest;
10553
10554 pub use crate::natural::NodeSetFlagsRequest;
10555
10556 pub use crate::natural::NodeGetFlagsResponse;
10557
10558 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
10559
10560 pub use crate::natural::NodeSetExtendedAttributeResponse;
10561
10562 pub use crate::natural::NodeSetFlagsResponse;
10563
10564 pub use crate::natural::NodeSyncResponse;
10565
10566 pub use crate::natural::NodeUpdateAttributesResponse;
10567
10568 pub use crate::natural::ReadableReadRequest;
10569
10570 pub use crate::natural::ReadableReadResponse;
10571
10572 pub use crate::natural::Representation;
10573
10574 pub use crate::natural::WritableWriteRequest;
10575
10576 pub use crate::natural::WritableWriteResponse;
10577
10578 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
10579
10580 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
10581
10582 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
10583 }
10584
10585 pub struct AdvisoryLock;
10586
10587 impl ::fidl_next::Method for AdvisoryLock {
10588 const ORDINAL: u64 = 7992130864415541162;
10589 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10590 ::fidl_next::protocol::Flexibility::Strict;
10591
10592 type Protocol = crate::File;
10593
10594 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
10595 }
10596
10597 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
10598 type Response = ::fidl_next::wire::Result<
10599 'static,
10600 crate::wire::AdvisoryLockingAdvisoryLockResponse,
10601 ::fidl_next::wire::Int32,
10602 >;
10603 }
10604
10605 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
10606 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10607
10608 fn respond(response: ___R) -> Self::Output {
10609 ::core::result::Result::Ok(response)
10610 }
10611 }
10612
10613 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
10614 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10615
10616 fn respond_err(response: ___R) -> Self::Output {
10617 ::core::result::Result::Err(response)
10618 }
10619 }
10620
10621 pub struct LinkInto;
10622
10623 impl ::fidl_next::Method for LinkInto {
10624 const ORDINAL: u64 = 6121399674497678964;
10625 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10626 ::fidl_next::protocol::Flexibility::Strict;
10627
10628 type Protocol = crate::File;
10629
10630 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
10631 }
10632
10633 impl ::fidl_next::TwoWayMethod for LinkInto {
10634 type Response = ::fidl_next::wire::Result<
10635 'static,
10636 crate::wire::LinkableLinkIntoResponse,
10637 ::fidl_next::wire::Int32,
10638 >;
10639 }
10640
10641 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
10642 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10643
10644 fn respond(response: ___R) -> Self::Output {
10645 ::core::result::Result::Ok(response)
10646 }
10647 }
10648
10649 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
10650 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10651
10652 fn respond_err(response: ___R) -> Self::Output {
10653 ::core::result::Result::Err(response)
10654 }
10655 }
10656
10657 pub struct Clone;
10658
10659 impl ::fidl_next::Method for Clone {
10660 const ORDINAL: u64 = 2366825959783828089;
10661 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10662 ::fidl_next::protocol::Flexibility::Strict;
10663
10664 type Protocol = crate::File;
10665
10666 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
10667 }
10668
10669 pub struct Close;
10670
10671 impl ::fidl_next::Method for Close {
10672 const ORDINAL: u64 = 6540867515453498750;
10673 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10674 ::fidl_next::protocol::Flexibility::Strict;
10675
10676 type Protocol = crate::File;
10677
10678 type Request = ::fidl_next::wire::EmptyMessageBody;
10679 }
10680
10681 impl ::fidl_next::TwoWayMethod for Close {
10682 type Response = ::fidl_next::wire::Result<
10683 'static,
10684 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
10685 ::fidl_next::wire::Int32,
10686 >;
10687 }
10688
10689 impl<___R> ::fidl_next::Respond<___R> for Close {
10690 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10691
10692 fn respond(response: ___R) -> Self::Output {
10693 ::core::result::Result::Ok(response)
10694 }
10695 }
10696
10697 impl<___R> ::fidl_next::RespondErr<___R> for Close {
10698 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10699
10700 fn respond_err(response: ___R) -> Self::Output {
10701 ::core::result::Result::Err(response)
10702 }
10703 }
10704
10705 pub struct Query;
10706
10707 impl ::fidl_next::Method for Query {
10708 const ORDINAL: u64 = 2763219980499352582;
10709 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10710 ::fidl_next::protocol::Flexibility::Strict;
10711
10712 type Protocol = crate::File;
10713
10714 type Request = ::fidl_next::wire::EmptyMessageBody;
10715 }
10716
10717 impl ::fidl_next::TwoWayMethod for Query {
10718 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
10719 }
10720
10721 impl<___R> ::fidl_next::Respond<___R> for Query {
10722 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
10723
10724 fn respond(response: ___R) -> Self::Output {
10725 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
10726 }
10727 }
10728
10729 pub struct DeprecatedClone;
10730
10731 impl ::fidl_next::Method for DeprecatedClone {
10732 const ORDINAL: u64 = 6512600400724287855;
10733 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10734 ::fidl_next::protocol::Flexibility::Flexible;
10735
10736 type Protocol = crate::File;
10737
10738 type Request = crate::wire::NodeDeprecatedCloneRequest;
10739 }
10740
10741 pub struct OnOpen;
10742
10743 impl ::fidl_next::Method for OnOpen {
10744 const ORDINAL: u64 = 9207534335756671346;
10745 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10746 ::fidl_next::protocol::Flexibility::Flexible;
10747
10748 type Protocol = crate::File;
10749
10750 type Request = crate::wire::NodeOnOpenRequest<'static>;
10751 }
10752
10753 pub struct DeprecatedGetAttr;
10754
10755 impl ::fidl_next::Method for DeprecatedGetAttr {
10756 const ORDINAL: u64 = 8689798978500614909;
10757 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10758 ::fidl_next::protocol::Flexibility::Strict;
10759
10760 type Protocol = crate::File;
10761
10762 type Request = ::fidl_next::wire::EmptyMessageBody;
10763 }
10764
10765 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
10766 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
10767 }
10768
10769 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
10770 type Output = ___R;
10771
10772 fn respond(response: ___R) -> Self::Output {
10773 response
10774 }
10775 }
10776
10777 pub struct DeprecatedSetAttr;
10778
10779 impl ::fidl_next::Method for DeprecatedSetAttr {
10780 const ORDINAL: u64 = 4721673413776871238;
10781 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10782 ::fidl_next::protocol::Flexibility::Strict;
10783
10784 type Protocol = crate::File;
10785
10786 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
10787 }
10788
10789 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
10790 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
10791 }
10792
10793 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
10794 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
10795
10796 fn respond(response: ___R) -> Self::Output {
10797 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
10798 }
10799 }
10800
10801 pub struct DeprecatedGetFlags;
10802
10803 impl ::fidl_next::Method for DeprecatedGetFlags {
10804 const ORDINAL: u64 = 6595803110182632097;
10805 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10806 ::fidl_next::protocol::Flexibility::Strict;
10807
10808 type Protocol = crate::File;
10809
10810 type Request = ::fidl_next::wire::EmptyMessageBody;
10811 }
10812
10813 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
10814 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
10815 }
10816
10817 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
10818 type Output = ___R;
10819
10820 fn respond(response: ___R) -> Self::Output {
10821 response
10822 }
10823 }
10824
10825 pub struct DeprecatedSetFlags;
10826
10827 impl ::fidl_next::Method for DeprecatedSetFlags {
10828 const ORDINAL: u64 = 5950864159036794675;
10829 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10830 ::fidl_next::protocol::Flexibility::Strict;
10831
10832 type Protocol = crate::File;
10833
10834 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
10835 }
10836
10837 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
10838 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
10839 }
10840
10841 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
10842 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
10843
10844 fn respond(response: ___R) -> Self::Output {
10845 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
10846 }
10847 }
10848
10849 pub struct GetFlags;
10850
10851 impl ::fidl_next::Method for GetFlags {
10852 const ORDINAL: u64 = 105530239381466147;
10853 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10854 ::fidl_next::protocol::Flexibility::Flexible;
10855
10856 type Protocol = crate::File;
10857
10858 type Request = ::fidl_next::wire::EmptyMessageBody;
10859 }
10860
10861 impl ::fidl_next::TwoWayMethod for GetFlags {
10862 type Response = ::fidl_next::wire::FlexibleResult<
10863 'static,
10864 crate::wire::NodeGetFlagsResponse,
10865 ::fidl_next::wire::Int32,
10866 >;
10867 }
10868
10869 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
10870 type Output = ::fidl_next::FlexibleResult<
10871 crate::generic::NodeGetFlagsResponse<___R>,
10872 ::fidl_next::util::Never,
10873 >;
10874
10875 fn respond(response: ___R) -> Self::Output {
10876 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
10877 flags: response,
10878 })
10879 }
10880 }
10881
10882 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
10883 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
10884
10885 fn respond_err(response: ___R) -> Self::Output {
10886 ::fidl_next::FlexibleResult::Err(response)
10887 }
10888 }
10889
10890 pub struct SetFlags;
10891
10892 impl ::fidl_next::Method for SetFlags {
10893 const ORDINAL: u64 = 6172186066099445416;
10894 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10895 ::fidl_next::protocol::Flexibility::Flexible;
10896
10897 type Protocol = crate::File;
10898
10899 type Request = crate::wire::NodeSetFlagsRequest;
10900 }
10901
10902 impl ::fidl_next::TwoWayMethod for SetFlags {
10903 type Response = ::fidl_next::wire::FlexibleResult<
10904 'static,
10905 crate::wire::NodeSetFlagsResponse,
10906 ::fidl_next::wire::Int32,
10907 >;
10908 }
10909
10910 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
10911 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
10912
10913 fn respond(response: ___R) -> Self::Output {
10914 ::fidl_next::FlexibleResult::Ok(response)
10915 }
10916 }
10917
10918 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
10919 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
10920
10921 fn respond_err(response: ___R) -> Self::Output {
10922 ::fidl_next::FlexibleResult::Err(response)
10923 }
10924 }
10925
10926 pub struct QueryFilesystem;
10927
10928 impl ::fidl_next::Method for QueryFilesystem {
10929 const ORDINAL: u64 = 8013111122914313744;
10930 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10931 ::fidl_next::protocol::Flexibility::Strict;
10932
10933 type Protocol = crate::File;
10934
10935 type Request = ::fidl_next::wire::EmptyMessageBody;
10936 }
10937
10938 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
10939 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
10940 }
10941
10942 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
10943 type Output = ___R;
10944
10945 fn respond(response: ___R) -> Self::Output {
10946 response
10947 }
10948 }
10949
10950 pub struct OnRepresentation;
10951
10952 impl ::fidl_next::Method for OnRepresentation {
10953 const ORDINAL: u64 = 6679970090861613324;
10954 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10955 ::fidl_next::protocol::Flexibility::Strict;
10956
10957 type Protocol = crate::File;
10958
10959 type Request = crate::wire::Representation<'static>;
10960 }
10961
10962 pub struct GetAttributes;
10963
10964 impl ::fidl_next::Method for GetAttributes {
10965 const ORDINAL: u64 = 4414537700416816443;
10966 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10967 ::fidl_next::protocol::Flexibility::Strict;
10968
10969 type Protocol = crate::File;
10970
10971 type Request = crate::wire::NodeGetAttributesRequest;
10972 }
10973
10974 impl ::fidl_next::TwoWayMethod for GetAttributes {
10975 type Response = ::fidl_next::wire::Result<
10976 'static,
10977 crate::wire::NodeAttributes2<'static>,
10978 ::fidl_next::wire::Int32,
10979 >;
10980 }
10981
10982 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
10983 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10984
10985 fn respond(response: ___R) -> Self::Output {
10986 ::core::result::Result::Ok(response)
10987 }
10988 }
10989
10990 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
10991 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10992
10993 fn respond_err(response: ___R) -> Self::Output {
10994 ::core::result::Result::Err(response)
10995 }
10996 }
10997
10998 pub struct UpdateAttributes;
10999
11000 impl ::fidl_next::Method for UpdateAttributes {
11001 const ORDINAL: u64 = 3677402239314018056;
11002 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11003 ::fidl_next::protocol::Flexibility::Strict;
11004
11005 type Protocol = crate::File;
11006
11007 type Request = crate::wire::MutableNodeAttributes<'static>;
11008 }
11009
11010 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
11011 type Response = ::fidl_next::wire::Result<
11012 'static,
11013 crate::wire::NodeUpdateAttributesResponse,
11014 ::fidl_next::wire::Int32,
11015 >;
11016 }
11017
11018 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
11019 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11020
11021 fn respond(response: ___R) -> Self::Output {
11022 ::core::result::Result::Ok(response)
11023 }
11024 }
11025
11026 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
11027 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11028
11029 fn respond_err(response: ___R) -> Self::Output {
11030 ::core::result::Result::Err(response)
11031 }
11032 }
11033
11034 pub struct Sync;
11035
11036 impl ::fidl_next::Method for Sync {
11037 const ORDINAL: u64 = 3196473584242777161;
11038 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11039 ::fidl_next::protocol::Flexibility::Strict;
11040
11041 type Protocol = crate::File;
11042
11043 type Request = ::fidl_next::wire::EmptyMessageBody;
11044 }
11045
11046 impl ::fidl_next::TwoWayMethod for Sync {
11047 type Response = ::fidl_next::wire::Result<
11048 'static,
11049 crate::wire::NodeSyncResponse,
11050 ::fidl_next::wire::Int32,
11051 >;
11052 }
11053
11054 impl<___R> ::fidl_next::Respond<___R> for Sync {
11055 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11056
11057 fn respond(response: ___R) -> Self::Output {
11058 ::core::result::Result::Ok(response)
11059 }
11060 }
11061
11062 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
11063 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11064
11065 fn respond_err(response: ___R) -> Self::Output {
11066 ::core::result::Result::Err(response)
11067 }
11068 }
11069
11070 pub struct ListExtendedAttributes;
11071
11072 impl ::fidl_next::Method for ListExtendedAttributes {
11073 const ORDINAL: u64 = 5431626189872037072;
11074 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11075 ::fidl_next::protocol::Flexibility::Strict;
11076
11077 type Protocol = crate::File;
11078
11079 type Request = crate::wire::NodeListExtendedAttributesRequest;
11080 }
11081
11082 pub struct GetExtendedAttribute;
11083
11084 impl ::fidl_next::Method for GetExtendedAttribute {
11085 const ORDINAL: u64 = 5043930208506967771;
11086 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11087 ::fidl_next::protocol::Flexibility::Strict;
11088
11089 type Protocol = crate::File;
11090
11091 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
11092 }
11093
11094 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
11095 type Response = ::fidl_next::wire::Result<
11096 'static,
11097 crate::wire::ExtendedAttributeValue<'static>,
11098 ::fidl_next::wire::Int32,
11099 >;
11100 }
11101
11102 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
11103 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11104
11105 fn respond(response: ___R) -> Self::Output {
11106 ::core::result::Result::Ok(response)
11107 }
11108 }
11109
11110 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
11111 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11112
11113 fn respond_err(response: ___R) -> Self::Output {
11114 ::core::result::Result::Err(response)
11115 }
11116 }
11117
11118 pub struct SetExtendedAttribute;
11119
11120 impl ::fidl_next::Method for SetExtendedAttribute {
11121 const ORDINAL: u64 = 5374223046099989052;
11122 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11123 ::fidl_next::protocol::Flexibility::Strict;
11124
11125 type Protocol = crate::File;
11126
11127 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
11128 }
11129
11130 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
11131 type Response = ::fidl_next::wire::Result<
11132 'static,
11133 crate::wire::NodeSetExtendedAttributeResponse,
11134 ::fidl_next::wire::Int32,
11135 >;
11136 }
11137
11138 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
11139 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11140
11141 fn respond(response: ___R) -> Self::Output {
11142 ::core::result::Result::Ok(response)
11143 }
11144 }
11145
11146 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
11147 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11148
11149 fn respond_err(response: ___R) -> Self::Output {
11150 ::core::result::Result::Err(response)
11151 }
11152 }
11153
11154 pub struct RemoveExtendedAttribute;
11155
11156 impl ::fidl_next::Method for RemoveExtendedAttribute {
11157 const ORDINAL: u64 = 8794297771444732717;
11158 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11159 ::fidl_next::protocol::Flexibility::Strict;
11160
11161 type Protocol = crate::File;
11162
11163 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
11164 }
11165
11166 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
11167 type Response = ::fidl_next::wire::Result<
11168 'static,
11169 crate::wire::NodeRemoveExtendedAttributeResponse,
11170 ::fidl_next::wire::Int32,
11171 >;
11172 }
11173
11174 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
11175 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11176
11177 fn respond(response: ___R) -> Self::Output {
11178 ::core::result::Result::Ok(response)
11179 }
11180 }
11181
11182 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
11183 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11184
11185 fn respond_err(response: ___R) -> Self::Output {
11186 ::core::result::Result::Err(response)
11187 }
11188 }
11189
11190 pub struct Read;
11191
11192 impl ::fidl_next::Method for Read {
11193 const ORDINAL: u64 = 395825947633028830;
11194 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11195 ::fidl_next::protocol::Flexibility::Strict;
11196
11197 type Protocol = crate::File;
11198
11199 type Request = crate::wire::ReadableReadRequest;
11200 }
11201
11202 impl ::fidl_next::TwoWayMethod for Read {
11203 type Response = ::fidl_next::wire::Result<
11204 'static,
11205 crate::wire::ReadableReadResponse<'static>,
11206 ::fidl_next::wire::Int32,
11207 >;
11208 }
11209
11210 impl<___R> ::fidl_next::Respond<___R> for Read {
11211 type Output = ::core::result::Result<
11212 crate::generic::ReadableReadResponse<___R>,
11213 ::fidl_next::util::Never,
11214 >;
11215
11216 fn respond(response: ___R) -> Self::Output {
11217 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
11218 }
11219 }
11220
11221 impl<___R> ::fidl_next::RespondErr<___R> for Read {
11222 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11223
11224 fn respond_err(response: ___R) -> Self::Output {
11225 ::core::result::Result::Err(response)
11226 }
11227 }
11228
11229 pub struct Write;
11230
11231 impl ::fidl_next::Method for Write {
11232 const ORDINAL: u64 = 7651971425397809026;
11233 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11234 ::fidl_next::protocol::Flexibility::Strict;
11235
11236 type Protocol = crate::File;
11237
11238 type Request = crate::wire::WritableWriteRequest<'static>;
11239 }
11240
11241 impl ::fidl_next::TwoWayMethod for Write {
11242 type Response = ::fidl_next::wire::Result<
11243 'static,
11244 crate::wire::WritableWriteResponse,
11245 ::fidl_next::wire::Int32,
11246 >;
11247 }
11248
11249 impl<___R> ::fidl_next::Respond<___R> for Write {
11250 type Output = ::core::result::Result<
11251 crate::generic::WritableWriteResponse<___R>,
11252 ::fidl_next::util::Never,
11253 >;
11254
11255 fn respond(response: ___R) -> Self::Output {
11256 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
11257 actual_count: response,
11258 })
11259 }
11260 }
11261
11262 impl<___R> ::fidl_next::RespondErr<___R> for Write {
11263 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11264
11265 fn respond_err(response: ___R) -> Self::Output {
11266 ::core::result::Result::Err(response)
11267 }
11268 }
11269
11270 pub struct Describe;
11271
11272 impl ::fidl_next::Method for Describe {
11273 const ORDINAL: u64 = 7545125870053689020;
11274 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11275 ::fidl_next::protocol::Flexibility::Strict;
11276
11277 type Protocol = crate::File;
11278
11279 type Request = ::fidl_next::wire::EmptyMessageBody;
11280 }
11281
11282 impl ::fidl_next::TwoWayMethod for Describe {
11283 type Response = crate::wire::FileInfo<'static>;
11284 }
11285
11286 impl<___R> ::fidl_next::Respond<___R> for Describe {
11287 type Output = ___R;
11288
11289 fn respond(response: ___R) -> Self::Output {
11290 response
11291 }
11292 }
11293
11294 pub struct Seek;
11295
11296 impl ::fidl_next::Method for Seek {
11297 const ORDINAL: u64 = 8649041485622956551;
11298 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11299 ::fidl_next::protocol::Flexibility::Strict;
11300
11301 type Protocol = crate::File;
11302
11303 type Request = crate::wire::FileSeekRequest;
11304 }
11305
11306 impl ::fidl_next::TwoWayMethod for Seek {
11307 type Response = ::fidl_next::wire::Result<
11308 'static,
11309 crate::wire::FileSeekResponse,
11310 ::fidl_next::wire::Int32,
11311 >;
11312 }
11313
11314 impl<___R> ::fidl_next::Respond<___R> for Seek {
11315 type Output = ::core::result::Result<
11316 crate::generic::FileSeekResponse<___R>,
11317 ::fidl_next::util::Never,
11318 >;
11319
11320 fn respond(response: ___R) -> Self::Output {
11321 ::core::result::Result::Ok(crate::generic::FileSeekResponse {
11322 offset_from_start: response,
11323 })
11324 }
11325 }
11326
11327 impl<___R> ::fidl_next::RespondErr<___R> for Seek {
11328 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11329
11330 fn respond_err(response: ___R) -> Self::Output {
11331 ::core::result::Result::Err(response)
11332 }
11333 }
11334
11335 pub struct ReadAt;
11336
11337 impl ::fidl_next::Method for ReadAt {
11338 const ORDINAL: u64 = 1587416148701180478;
11339 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11340 ::fidl_next::protocol::Flexibility::Strict;
11341
11342 type Protocol = crate::File;
11343
11344 type Request = crate::wire::FileReadAtRequest;
11345 }
11346
11347 impl ::fidl_next::TwoWayMethod for ReadAt {
11348 type Response = ::fidl_next::wire::Result<
11349 'static,
11350 crate::wire::FileReadAtResponse<'static>,
11351 ::fidl_next::wire::Int32,
11352 >;
11353 }
11354
11355 impl<___R> ::fidl_next::Respond<___R> for ReadAt {
11356 type Output = ::core::result::Result<
11357 crate::generic::FileReadAtResponse<___R>,
11358 ::fidl_next::util::Never,
11359 >;
11360
11361 fn respond(response: ___R) -> Self::Output {
11362 ::core::result::Result::Ok(crate::generic::FileReadAtResponse { data: response })
11363 }
11364 }
11365
11366 impl<___R> ::fidl_next::RespondErr<___R> for ReadAt {
11367 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11368
11369 fn respond_err(response: ___R) -> Self::Output {
11370 ::core::result::Result::Err(response)
11371 }
11372 }
11373
11374 pub struct WriteAt;
11375
11376 impl ::fidl_next::Method for WriteAt {
11377 const ORDINAL: u64 = 8736683935131400491;
11378 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11379 ::fidl_next::protocol::Flexibility::Strict;
11380
11381 type Protocol = crate::File;
11382
11383 type Request = crate::wire::FileWriteAtRequest<'static>;
11384 }
11385
11386 impl ::fidl_next::TwoWayMethod for WriteAt {
11387 type Response = ::fidl_next::wire::Result<
11388 'static,
11389 crate::wire::FileWriteAtResponse,
11390 ::fidl_next::wire::Int32,
11391 >;
11392 }
11393
11394 impl<___R> ::fidl_next::Respond<___R> for WriteAt {
11395 type Output = ::core::result::Result<
11396 crate::generic::FileWriteAtResponse<___R>,
11397 ::fidl_next::util::Never,
11398 >;
11399
11400 fn respond(response: ___R) -> Self::Output {
11401 ::core::result::Result::Ok(crate::generic::FileWriteAtResponse {
11402 actual_count: response,
11403 })
11404 }
11405 }
11406
11407 impl<___R> ::fidl_next::RespondErr<___R> for WriteAt {
11408 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11409
11410 fn respond_err(response: ___R) -> Self::Output {
11411 ::core::result::Result::Err(response)
11412 }
11413 }
11414
11415 pub struct Resize;
11416
11417 impl ::fidl_next::Method for Resize {
11418 const ORDINAL: u64 = 3134648685270758458;
11419 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11420 ::fidl_next::protocol::Flexibility::Strict;
11421
11422 type Protocol = crate::File;
11423
11424 type Request = crate::wire::FileResizeRequest;
11425 }
11426
11427 impl ::fidl_next::TwoWayMethod for Resize {
11428 type Response = ::fidl_next::wire::Result<
11429 'static,
11430 crate::wire::FileResizeResponse,
11431 ::fidl_next::wire::Int32,
11432 >;
11433 }
11434
11435 impl<___R> ::fidl_next::Respond<___R> for Resize {
11436 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11437
11438 fn respond(response: ___R) -> Self::Output {
11439 ::core::result::Result::Ok(response)
11440 }
11441 }
11442
11443 impl<___R> ::fidl_next::RespondErr<___R> for Resize {
11444 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11445
11446 fn respond_err(response: ___R) -> Self::Output {
11447 ::core::result::Result::Err(response)
11448 }
11449 }
11450
11451 pub struct GetBackingMemory;
11452
11453 impl ::fidl_next::Method for GetBackingMemory {
11454 const ORDINAL: u64 = 46911652864194091;
11455 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11456 ::fidl_next::protocol::Flexibility::Strict;
11457
11458 type Protocol = crate::File;
11459
11460 type Request = crate::wire::FileGetBackingMemoryRequest;
11461 }
11462
11463 impl ::fidl_next::TwoWayMethod for GetBackingMemory {
11464 type Response = ::fidl_next::wire::Result<
11465 'static,
11466 crate::wire::FileGetBackingMemoryResponse,
11467 ::fidl_next::wire::Int32,
11468 >;
11469 }
11470
11471 impl<___R> ::fidl_next::Respond<___R> for GetBackingMemory {
11472 type Output = ::core::result::Result<
11473 crate::generic::FileGetBackingMemoryResponse<___R>,
11474 ::fidl_next::util::Never,
11475 >;
11476
11477 fn respond(response: ___R) -> Self::Output {
11478 ::core::result::Result::Ok(crate::generic::FileGetBackingMemoryResponse {
11479 vmo: response,
11480 })
11481 }
11482 }
11483
11484 impl<___R> ::fidl_next::RespondErr<___R> for GetBackingMemory {
11485 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11486
11487 fn respond_err(response: ___R) -> Self::Output {
11488 ::core::result::Result::Err(response)
11489 }
11490 }
11491
11492 pub struct Allocate;
11493
11494 impl ::fidl_next::Method for Allocate {
11495 const ORDINAL: u64 = 8645235848064269614;
11496 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11497 ::fidl_next::protocol::Flexibility::Flexible;
11498
11499 type Protocol = crate::File;
11500
11501 type Request = crate::wire::FileAllocateRequest;
11502 }
11503
11504 impl ::fidl_next::TwoWayMethod for Allocate {
11505 type Response = ::fidl_next::wire::FlexibleResult<
11506 'static,
11507 crate::wire::FileAllocateResponse,
11508 ::fidl_next::wire::Int32,
11509 >;
11510 }
11511
11512 impl<___R> ::fidl_next::Respond<___R> for Allocate {
11513 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
11514
11515 fn respond(response: ___R) -> Self::Output {
11516 ::fidl_next::FlexibleResult::Ok(response)
11517 }
11518 }
11519
11520 impl<___R> ::fidl_next::RespondErr<___R> for Allocate {
11521 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
11522
11523 fn respond_err(response: ___R) -> Self::Output {
11524 ::fidl_next::FlexibleResult::Err(response)
11525 }
11526 }
11527
11528 pub struct EnableVerity;
11529
11530 impl ::fidl_next::Method for EnableVerity {
11531 const ORDINAL: u64 = 3189145313204943035;
11532 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11533 ::fidl_next::protocol::Flexibility::Flexible;
11534
11535 type Protocol = crate::File;
11536
11537 type Request = crate::wire::FileEnableVerityRequest<'static>;
11538 }
11539
11540 impl ::fidl_next::TwoWayMethod for EnableVerity {
11541 type Response = ::fidl_next::wire::FlexibleResult<
11542 'static,
11543 crate::wire::FileEnableVerityResponse,
11544 ::fidl_next::wire::Int32,
11545 >;
11546 }
11547
11548 impl<___R> ::fidl_next::Respond<___R> for EnableVerity {
11549 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
11550
11551 fn respond(response: ___R) -> Self::Output {
11552 ::fidl_next::FlexibleResult::Ok(response)
11553 }
11554 }
11555
11556 impl<___R> ::fidl_next::RespondErr<___R> for EnableVerity {
11557 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
11558
11559 fn respond_err(response: ___R) -> Self::Output {
11560 ::fidl_next::FlexibleResult::Err(response)
11561 }
11562 }
11563
11564 mod ___detail {
11565 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::File
11566 where
11567 ___T: ::fidl_next::Transport,
11568 {
11569 type Client = FileClient<___T>;
11570 type Server = FileServer<___T>;
11571 }
11572
11573 #[repr(transparent)]
11575 pub struct FileClient<___T: ::fidl_next::Transport> {
11576 #[allow(dead_code)]
11577 client: ::fidl_next::protocol::Client<___T>,
11578 }
11579
11580 impl<___T> FileClient<___T>
11581 where
11582 ___T: ::fidl_next::Transport,
11583 {
11584 #[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"]
11585 pub fn advisory_lock(
11586 &self,
11587
11588 request: impl ::fidl_next::Encode<
11589 crate::wire::AdvisoryLockRequest<'static>,
11590 <___T as ::fidl_next::Transport>::SendBuffer,
11591 >,
11592 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
11593 where
11594 <___T as ::fidl_next::Transport>::SendBuffer:
11595 ::fidl_next::encoder::InternalHandleEncoder,
11596 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11597 {
11598 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
11599 request,
11600 })
11601 }
11602
11603 #[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"]
11604 pub fn advisory_lock_with<___R>(
11605 &self,
11606 request: ___R,
11607 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
11608 where
11609 ___R: ::fidl_next::Encode<
11610 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
11611 <___T as ::fidl_next::Transport>::SendBuffer,
11612 >,
11613 {
11614 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11615 7992130864415541162,
11616 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
11617 request,
11618 ))
11619 }
11620
11621 #[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"]
11622 pub fn link_into(
11623 &self,
11624
11625 dst_parent_token: impl ::fidl_next::Encode<
11626 ::fidl_next::wire::fuchsia::Event,
11627 <___T as ::fidl_next::Transport>::SendBuffer,
11628 >,
11629
11630 dst: impl ::fidl_next::Encode<
11631 ::fidl_next::wire::String<'static>,
11632 <___T as ::fidl_next::Transport>::SendBuffer,
11633 >,
11634 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
11635 where
11636 <___T as ::fidl_next::Transport>::SendBuffer:
11637 ::fidl_next::encoder::InternalHandleEncoder,
11638 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11639 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11640 {
11641 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
11642 dst_parent_token,
11643
11644 dst,
11645 })
11646 }
11647
11648 #[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"]
11649 pub fn link_into_with<___R>(
11650 &self,
11651 request: ___R,
11652 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
11653 where
11654 ___R: ::fidl_next::Encode<
11655 crate::wire::LinkableLinkIntoRequest<'static>,
11656 <___T as ::fidl_next::Transport>::SendBuffer,
11657 >,
11658 {
11659 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11660 6121399674497678964,
11661 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
11662 request,
11663 ))
11664 }
11665
11666 pub fn clone(
11667 &self,
11668
11669 request: impl ::fidl_next::Encode<
11670 ::fidl_next::ServerEnd<
11671 ::fidl_next_fuchsia_unknown::Cloneable,
11672 ::fidl_next::wire::fuchsia::Channel,
11673 >,
11674 <___T as ::fidl_next::Transport>::SendBuffer,
11675 >,
11676 ) -> ::fidl_next::SendFuture<'_, ___T>
11677 where
11678 <___T as ::fidl_next::Transport>::SendBuffer:
11679 ::fidl_next::encoder::InternalHandleEncoder,
11680 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11681 {
11682 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
11683 request,
11684 })
11685 }
11686
11687 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
11688 where
11689 ___R: ::fidl_next::Encode<
11690 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
11691 <___T as ::fidl_next::Transport>::SendBuffer,
11692 >,
11693 {
11694 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
11695 2366825959783828089,
11696 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
11697 request,
11698 ))
11699 }
11700
11701 #[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"]
11702 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
11703 ::fidl_next::TwoWayFuture::from_untyped(
11704 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
11705 6540867515453498750,
11706 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
11707 (),
11708 ),
11709 )
11710 }
11711
11712 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
11713 ::fidl_next::TwoWayFuture::from_untyped(
11714 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
11715 2763219980499352582,
11716 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
11717 (),
11718 ),
11719 )
11720 }
11721
11722 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11723 pub fn deprecated_clone(
11724 &self,
11725
11726 flags: impl ::fidl_next::Encode<
11727 crate::wire::OpenFlags,
11728 <___T as ::fidl_next::Transport>::SendBuffer,
11729 >,
11730
11731 object: impl ::fidl_next::Encode<
11732 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
11733 <___T as ::fidl_next::Transport>::SendBuffer,
11734 >,
11735 ) -> ::fidl_next::SendFuture<'_, ___T>
11736 where
11737 <___T as ::fidl_next::Transport>::SendBuffer:
11738 ::fidl_next::encoder::InternalHandleEncoder,
11739 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11740 {
11741 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
11742 flags,
11743
11744 object,
11745 })
11746 }
11747
11748 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11749 pub fn deprecated_clone_with<___R>(
11750 &self,
11751 request: ___R,
11752 ) -> ::fidl_next::SendFuture<'_, ___T>
11753 where
11754 ___R: ::fidl_next::Encode<
11755 crate::wire::NodeDeprecatedCloneRequest,
11756 <___T as ::fidl_next::Transport>::SendBuffer,
11757 >,
11758 {
11759 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
11760 6512600400724287855,
11761 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
11762 request,
11763 ))
11764 }
11765
11766 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
11767 pub fn deprecated_get_attr(
11768 &self,
11769 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
11770 ::fidl_next::TwoWayFuture::from_untyped(
11771 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
11772 8689798978500614909,
11773 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
11774 (),
11775 ),
11776 )
11777 }
11778
11779 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
11780 pub fn deprecated_set_attr(
11781 &self,
11782
11783 flags: impl ::fidl_next::Encode<
11784 crate::wire::NodeAttributeFlags,
11785 <___T as ::fidl_next::Transport>::SendBuffer,
11786 >,
11787
11788 attributes: impl ::fidl_next::Encode<
11789 crate::wire::NodeAttributes,
11790 <___T as ::fidl_next::Transport>::SendBuffer,
11791 >,
11792 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
11793 where
11794 <___T as ::fidl_next::Transport>::SendBuffer:
11795 ::fidl_next::encoder::InternalHandleEncoder,
11796 {
11797 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
11798 flags,
11799
11800 attributes,
11801 })
11802 }
11803
11804 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
11805 pub fn deprecated_set_attr_with<___R>(
11806 &self,
11807 request: ___R,
11808 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
11809 where
11810 ___R: ::fidl_next::Encode<
11811 crate::wire::NodeDeprecatedSetAttrRequest,
11812 <___T as ::fidl_next::Transport>::SendBuffer,
11813 >,
11814 {
11815 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11816 4721673413776871238,
11817 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
11818 request,
11819 ))
11820 }
11821
11822 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
11823 pub fn deprecated_get_flags(
11824 &self,
11825 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
11826 ::fidl_next::TwoWayFuture::from_untyped(
11827 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
11828 6595803110182632097,
11829 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
11830 (),
11831 ),
11832 )
11833 }
11834
11835 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11836 pub fn deprecated_set_flags(
11837 &self,
11838
11839 flags: impl ::fidl_next::Encode<
11840 crate::wire::OpenFlags,
11841 <___T as ::fidl_next::Transport>::SendBuffer,
11842 >,
11843 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
11844 where
11845 <___T as ::fidl_next::Transport>::SendBuffer:
11846 ::fidl_next::encoder::InternalHandleEncoder,
11847 {
11848 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
11849 flags,
11850 })
11851 }
11852
11853 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11854 pub fn deprecated_set_flags_with<___R>(
11855 &self,
11856 request: ___R,
11857 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
11858 where
11859 ___R: ::fidl_next::Encode<
11860 crate::wire::NodeDeprecatedSetFlagsRequest,
11861 <___T as ::fidl_next::Transport>::SendBuffer,
11862 >,
11863 {
11864 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11865 5950864159036794675,
11866 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
11867 request,
11868 ))
11869 }
11870
11871 #[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"]
11872 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
11873 ::fidl_next::TwoWayFuture::from_untyped(
11874 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
11875 105530239381466147,
11876 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
11877 (),
11878 ),
11879 )
11880 }
11881
11882 #[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"]
11883 pub fn set_flags(
11884 &self,
11885
11886 flags: impl ::fidl_next::Encode<
11887 crate::wire::Flags,
11888 <___T as ::fidl_next::Transport>::SendBuffer,
11889 >,
11890 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
11891 where
11892 <___T as ::fidl_next::Transport>::SendBuffer:
11893 ::fidl_next::encoder::InternalHandleEncoder,
11894 {
11895 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
11896 }
11897
11898 #[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"]
11899 pub fn set_flags_with<___R>(
11900 &self,
11901 request: ___R,
11902 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
11903 where
11904 ___R: ::fidl_next::Encode<
11905 crate::wire::NodeSetFlagsRequest,
11906 <___T as ::fidl_next::Transport>::SendBuffer,
11907 >,
11908 {
11909 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11910 6172186066099445416,
11911 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
11912 request,
11913 ))
11914 }
11915
11916 #[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"]
11917 pub fn query_filesystem(
11918 &self,
11919 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
11920 ::fidl_next::TwoWayFuture::from_untyped(
11921 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
11922 8013111122914313744,
11923 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
11924 (),
11925 ),
11926 )
11927 }
11928
11929 #[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"]
11930 pub fn get_attributes(
11931 &self,
11932
11933 query: impl ::fidl_next::Encode<
11934 crate::wire::NodeAttributesQuery,
11935 <___T as ::fidl_next::Transport>::SendBuffer,
11936 >,
11937 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
11938 where
11939 <___T as ::fidl_next::Transport>::SendBuffer:
11940 ::fidl_next::encoder::InternalHandleEncoder,
11941 {
11942 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
11943 }
11944
11945 #[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"]
11946 pub fn get_attributes_with<___R>(
11947 &self,
11948 request: ___R,
11949 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
11950 where
11951 ___R: ::fidl_next::Encode<
11952 crate::wire::NodeGetAttributesRequest,
11953 <___T as ::fidl_next::Transport>::SendBuffer,
11954 >,
11955 {
11956 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11957 4414537700416816443,
11958 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
11959 request,
11960 ))
11961 }
11962
11963 #[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"]
11964 pub fn update_attributes_with<___R>(
11965 &self,
11966 request: ___R,
11967 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
11968 where
11969 ___R: ::fidl_next::Encode<
11970 crate::wire::MutableNodeAttributes<'static>,
11971 <___T as ::fidl_next::Transport>::SendBuffer,
11972 >,
11973 {
11974 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11975 3677402239314018056,
11976 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
11977 request,
11978 ))
11979 }
11980
11981 #[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"]
11982 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
11983 ::fidl_next::TwoWayFuture::from_untyped(
11984 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
11985 3196473584242777161,
11986 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
11987 (),
11988 ),
11989 )
11990 }
11991
11992 #[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"]
11993 pub fn list_extended_attributes(
11994 &self,
11995
11996 iterator: impl ::fidl_next::Encode<
11997 ::fidl_next::ServerEnd<
11998 crate::ExtendedAttributeIterator,
11999 ::fidl_next::wire::fuchsia::Channel,
12000 >,
12001 <___T as ::fidl_next::Transport>::SendBuffer,
12002 >,
12003 ) -> ::fidl_next::SendFuture<'_, ___T>
12004 where
12005 <___T as ::fidl_next::Transport>::SendBuffer:
12006 ::fidl_next::encoder::InternalHandleEncoder,
12007 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12008 {
12009 self.list_extended_attributes_with(
12010 crate::generic::NodeListExtendedAttributesRequest { iterator },
12011 )
12012 }
12013
12014 #[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"]
12015 pub fn list_extended_attributes_with<___R>(
12016 &self,
12017 request: ___R,
12018 ) -> ::fidl_next::SendFuture<'_, ___T>
12019 where
12020 ___R: ::fidl_next::Encode<
12021 crate::wire::NodeListExtendedAttributesRequest,
12022 <___T as ::fidl_next::Transport>::SendBuffer,
12023 >,
12024 {
12025 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
12026 5431626189872037072,
12027 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
12028 request,
12029 ))
12030 }
12031
12032 #[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"]
12033 pub fn get_extended_attribute(
12034 &self,
12035
12036 name: impl ::fidl_next::Encode<
12037 ::fidl_next::wire::Vector<'static, u8>,
12038 <___T as ::fidl_next::Transport>::SendBuffer,
12039 >,
12040 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
12041 where
12042 <___T as ::fidl_next::Transport>::SendBuffer:
12043 ::fidl_next::encoder::InternalHandleEncoder,
12044 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12045 {
12046 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
12047 name,
12048 })
12049 }
12050
12051 #[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"]
12052 pub fn get_extended_attribute_with<___R>(
12053 &self,
12054 request: ___R,
12055 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
12056 where
12057 ___R: ::fidl_next::Encode<
12058 crate::wire::NodeGetExtendedAttributeRequest<'static>,
12059 <___T as ::fidl_next::Transport>::SendBuffer,
12060 >,
12061 {
12062 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12063 5043930208506967771,
12064 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
12065 request,
12066 ))
12067 }
12068
12069 #[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"]
12070 pub fn set_extended_attribute(
12071 &self,
12072
12073 name: impl ::fidl_next::Encode<
12074 ::fidl_next::wire::Vector<'static, u8>,
12075 <___T as ::fidl_next::Transport>::SendBuffer,
12076 >,
12077
12078 value: impl ::fidl_next::Encode<
12079 crate::wire::ExtendedAttributeValue<'static>,
12080 <___T as ::fidl_next::Transport>::SendBuffer,
12081 >,
12082
12083 mode: impl ::fidl_next::Encode<
12084 crate::wire::SetExtendedAttributeMode,
12085 <___T as ::fidl_next::Transport>::SendBuffer,
12086 >,
12087 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
12088 where
12089 <___T as ::fidl_next::Transport>::SendBuffer:
12090 ::fidl_next::encoder::InternalHandleEncoder,
12091 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12092 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12093 {
12094 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
12095 name,
12096
12097 value,
12098
12099 mode,
12100 })
12101 }
12102
12103 #[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"]
12104 pub fn set_extended_attribute_with<___R>(
12105 &self,
12106 request: ___R,
12107 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
12108 where
12109 ___R: ::fidl_next::Encode<
12110 crate::wire::NodeSetExtendedAttributeRequest<'static>,
12111 <___T as ::fidl_next::Transport>::SendBuffer,
12112 >,
12113 {
12114 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12115 5374223046099989052,
12116 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
12117 request,
12118 ))
12119 }
12120
12121 #[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"]
12122 pub fn remove_extended_attribute(
12123 &self,
12124
12125 name: impl ::fidl_next::Encode<
12126 ::fidl_next::wire::Vector<'static, u8>,
12127 <___T as ::fidl_next::Transport>::SendBuffer,
12128 >,
12129 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
12130 where
12131 <___T as ::fidl_next::Transport>::SendBuffer:
12132 ::fidl_next::encoder::InternalHandleEncoder,
12133 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12134 {
12135 self.remove_extended_attribute_with(
12136 crate::generic::NodeRemoveExtendedAttributeRequest { name },
12137 )
12138 }
12139
12140 #[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"]
12141 pub fn remove_extended_attribute_with<___R>(
12142 &self,
12143 request: ___R,
12144 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
12145 where
12146 ___R: ::fidl_next::Encode<
12147 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
12148 <___T as ::fidl_next::Transport>::SendBuffer,
12149 >,
12150 {
12151 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12152 8794297771444732717,
12153 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
12154 request,
12155 ))
12156 }
12157
12158 #[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"]
12159 pub fn read(
12160 &self,
12161
12162 count: impl ::fidl_next::Encode<
12163 ::fidl_next::wire::Uint64,
12164 <___T as ::fidl_next::Transport>::SendBuffer,
12165 >,
12166 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
12167 where
12168 <___T as ::fidl_next::Transport>::SendBuffer:
12169 ::fidl_next::encoder::InternalHandleEncoder,
12170 {
12171 self.read_with(crate::generic::ReadableReadRequest { count })
12172 }
12173
12174 #[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"]
12175 pub fn read_with<___R>(
12176 &self,
12177 request: ___R,
12178 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
12179 where
12180 ___R: ::fidl_next::Encode<
12181 crate::wire::ReadableReadRequest,
12182 <___T as ::fidl_next::Transport>::SendBuffer,
12183 >,
12184 {
12185 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12186 395825947633028830,
12187 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
12188 request,
12189 ))
12190 }
12191
12192 #[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"]
12193 pub fn write(
12194 &self,
12195
12196 data: impl ::fidl_next::Encode<
12197 ::fidl_next::wire::Vector<'static, u8>,
12198 <___T as ::fidl_next::Transport>::SendBuffer,
12199 >,
12200 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
12201 where
12202 <___T as ::fidl_next::Transport>::SendBuffer:
12203 ::fidl_next::encoder::InternalHandleEncoder,
12204 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12205 {
12206 self.write_with(crate::generic::WritableWriteRequest { data })
12207 }
12208
12209 #[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"]
12210 pub fn write_with<___R>(
12211 &self,
12212 request: ___R,
12213 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
12214 where
12215 ___R: ::fidl_next::Encode<
12216 crate::wire::WritableWriteRequest<'static>,
12217 <___T as ::fidl_next::Transport>::SendBuffer,
12218 >,
12219 {
12220 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12221 7651971425397809026,
12222 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
12223 request,
12224 ))
12225 }
12226
12227 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
12228 ::fidl_next::TwoWayFuture::from_untyped(
12229 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
12230 7545125870053689020,
12231 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
12232 (),
12233 ),
12234 )
12235 }
12236
12237 #[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"]
12238 pub fn seek(
12239 &self,
12240
12241 origin: impl ::fidl_next::Encode<
12242 crate::wire::SeekOrigin,
12243 <___T as ::fidl_next::Transport>::SendBuffer,
12244 >,
12245
12246 offset: impl ::fidl_next::Encode<
12247 ::fidl_next::wire::Int64,
12248 <___T as ::fidl_next::Transport>::SendBuffer,
12249 >,
12250 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
12251 where
12252 <___T as ::fidl_next::Transport>::SendBuffer:
12253 ::fidl_next::encoder::InternalHandleEncoder,
12254 {
12255 self.seek_with(crate::generic::FileSeekRequest { origin, offset })
12256 }
12257
12258 #[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"]
12259 pub fn seek_with<___R>(
12260 &self,
12261 request: ___R,
12262 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
12263 where
12264 ___R: ::fidl_next::Encode<
12265 crate::wire::FileSeekRequest,
12266 <___T as ::fidl_next::Transport>::SendBuffer,
12267 >,
12268 {
12269 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12270 8649041485622956551,
12271 <super::Seek as ::fidl_next::Method>::FLEXIBILITY,
12272 request,
12273 ))
12274 }
12275
12276 #[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"]
12277 pub fn read_at(
12278 &self,
12279
12280 count: impl ::fidl_next::Encode<
12281 ::fidl_next::wire::Uint64,
12282 <___T as ::fidl_next::Transport>::SendBuffer,
12283 >,
12284
12285 offset: impl ::fidl_next::Encode<
12286 ::fidl_next::wire::Uint64,
12287 <___T as ::fidl_next::Transport>::SendBuffer,
12288 >,
12289 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
12290 where
12291 <___T as ::fidl_next::Transport>::SendBuffer:
12292 ::fidl_next::encoder::InternalHandleEncoder,
12293 {
12294 self.read_at_with(crate::generic::FileReadAtRequest { count, offset })
12295 }
12296
12297 #[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"]
12298 pub fn read_at_with<___R>(
12299 &self,
12300 request: ___R,
12301 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
12302 where
12303 ___R: ::fidl_next::Encode<
12304 crate::wire::FileReadAtRequest,
12305 <___T as ::fidl_next::Transport>::SendBuffer,
12306 >,
12307 {
12308 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12309 1587416148701180478,
12310 <super::ReadAt as ::fidl_next::Method>::FLEXIBILITY,
12311 request,
12312 ))
12313 }
12314
12315 #[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"]
12316 pub fn write_at(
12317 &self,
12318
12319 data: impl ::fidl_next::Encode<
12320 ::fidl_next::wire::Vector<'static, u8>,
12321 <___T as ::fidl_next::Transport>::SendBuffer,
12322 >,
12323
12324 offset: impl ::fidl_next::Encode<
12325 ::fidl_next::wire::Uint64,
12326 <___T as ::fidl_next::Transport>::SendBuffer,
12327 >,
12328 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
12329 where
12330 <___T as ::fidl_next::Transport>::SendBuffer:
12331 ::fidl_next::encoder::InternalHandleEncoder,
12332 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12333 {
12334 self.write_at_with(crate::generic::FileWriteAtRequest { data, offset })
12335 }
12336
12337 #[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"]
12338 pub fn write_at_with<___R>(
12339 &self,
12340 request: ___R,
12341 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
12342 where
12343 ___R: ::fidl_next::Encode<
12344 crate::wire::FileWriteAtRequest<'static>,
12345 <___T as ::fidl_next::Transport>::SendBuffer,
12346 >,
12347 {
12348 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12349 8736683935131400491,
12350 <super::WriteAt as ::fidl_next::Method>::FLEXIBILITY,
12351 request,
12352 ))
12353 }
12354
12355 #[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"]
12356 pub fn resize(
12357 &self,
12358
12359 length: impl ::fidl_next::Encode<
12360 ::fidl_next::wire::Uint64,
12361 <___T as ::fidl_next::Transport>::SendBuffer,
12362 >,
12363 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
12364 where
12365 <___T as ::fidl_next::Transport>::SendBuffer:
12366 ::fidl_next::encoder::InternalHandleEncoder,
12367 {
12368 self.resize_with(crate::generic::FileResizeRequest { length })
12369 }
12370
12371 #[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"]
12372 pub fn resize_with<___R>(
12373 &self,
12374 request: ___R,
12375 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
12376 where
12377 ___R: ::fidl_next::Encode<
12378 crate::wire::FileResizeRequest,
12379 <___T as ::fidl_next::Transport>::SendBuffer,
12380 >,
12381 {
12382 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12383 3134648685270758458,
12384 <super::Resize as ::fidl_next::Method>::FLEXIBILITY,
12385 request,
12386 ))
12387 }
12388
12389 #[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"]
12390 pub fn get_backing_memory(
12391 &self,
12392
12393 flags: impl ::fidl_next::Encode<
12394 crate::wire::VmoFlags,
12395 <___T as ::fidl_next::Transport>::SendBuffer,
12396 >,
12397 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
12398 where
12399 <___T as ::fidl_next::Transport>::SendBuffer:
12400 ::fidl_next::encoder::InternalHandleEncoder,
12401 {
12402 self.get_backing_memory_with(crate::generic::FileGetBackingMemoryRequest { flags })
12403 }
12404
12405 #[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"]
12406 pub fn get_backing_memory_with<___R>(
12407 &self,
12408 request: ___R,
12409 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
12410 where
12411 ___R: ::fidl_next::Encode<
12412 crate::wire::FileGetBackingMemoryRequest,
12413 <___T as ::fidl_next::Transport>::SendBuffer,
12414 >,
12415 {
12416 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12417 46911652864194091,
12418 <super::GetBackingMemory as ::fidl_next::Method>::FLEXIBILITY,
12419 request,
12420 ))
12421 }
12422
12423 #[doc = " Pre-allocate on-disk space for this file.\n"]
12424 pub fn allocate(
12425 &self,
12426
12427 offset: impl ::fidl_next::Encode<
12428 ::fidl_next::wire::Uint64,
12429 <___T as ::fidl_next::Transport>::SendBuffer,
12430 >,
12431
12432 length: impl ::fidl_next::Encode<
12433 ::fidl_next::wire::Uint64,
12434 <___T as ::fidl_next::Transport>::SendBuffer,
12435 >,
12436
12437 mode: impl ::fidl_next::Encode<
12438 crate::wire::AllocateMode,
12439 <___T as ::fidl_next::Transport>::SendBuffer,
12440 >,
12441 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
12442 where
12443 <___T as ::fidl_next::Transport>::SendBuffer:
12444 ::fidl_next::encoder::InternalHandleEncoder,
12445 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12446 {
12447 self.allocate_with(crate::generic::FileAllocateRequest { offset, length, mode })
12448 }
12449
12450 #[doc = " Pre-allocate on-disk space for this file.\n"]
12451 pub fn allocate_with<___R>(
12452 &self,
12453 request: ___R,
12454 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
12455 where
12456 ___R: ::fidl_next::Encode<
12457 crate::wire::FileAllocateRequest,
12458 <___T as ::fidl_next::Transport>::SendBuffer,
12459 >,
12460 {
12461 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12462 8645235848064269614,
12463 <super::Allocate as ::fidl_next::Method>::FLEXIBILITY,
12464 request,
12465 ))
12466 }
12467
12468 #[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"]
12469 pub fn enable_verity(
12470 &self,
12471
12472 options: impl ::fidl_next::Encode<
12473 crate::wire::VerificationOptions<'static>,
12474 <___T as ::fidl_next::Transport>::SendBuffer,
12475 >,
12476 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
12477 where
12478 <___T as ::fidl_next::Transport>::SendBuffer:
12479 ::fidl_next::encoder::InternalHandleEncoder,
12480 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12481 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12482 {
12483 self.enable_verity_with(crate::generic::FileEnableVerityRequest { options })
12484 }
12485
12486 #[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"]
12487 pub fn enable_verity_with<___R>(
12488 &self,
12489 request: ___R,
12490 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
12491 where
12492 ___R: ::fidl_next::Encode<
12493 crate::wire::FileEnableVerityRequest<'static>,
12494 <___T as ::fidl_next::Transport>::SendBuffer,
12495 >,
12496 {
12497 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12498 3189145313204943035,
12499 <super::EnableVerity as ::fidl_next::Method>::FLEXIBILITY,
12500 request,
12501 ))
12502 }
12503 }
12504
12505 #[repr(transparent)]
12507 pub struct FileServer<___T: ::fidl_next::Transport> {
12508 server: ::fidl_next::protocol::Server<___T>,
12509 }
12510
12511 impl<___T> FileServer<___T>
12512 where
12513 ___T: ::fidl_next::Transport,
12514 {
12515 #[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"]
12516 pub fn on_open(
12517 &self,
12518
12519 s: impl ::fidl_next::Encode<
12520 ::fidl_next::wire::Int32,
12521 <___T as ::fidl_next::Transport>::SendBuffer,
12522 >,
12523
12524 info: impl ::fidl_next::Encode<
12525 crate::wire_optional::NodeInfoDeprecated<'static>,
12526 <___T as ::fidl_next::Transport>::SendBuffer,
12527 >,
12528 ) -> ::fidl_next::SendFuture<'_, ___T>
12529 where
12530 <___T as ::fidl_next::Transport>::SendBuffer:
12531 ::fidl_next::encoder::InternalHandleEncoder,
12532 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12533 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12534 {
12535 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
12536 }
12537
12538 #[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"]
12539
12540 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
12541 where
12542 ___R: ::fidl_next::Encode<
12543 <super::OnOpen as ::fidl_next::Method>::Request,
12544 <___T as ::fidl_next::Transport>::SendBuffer,
12545 >,
12546 {
12547 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
12548 9207534335756671346,
12549 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
12550 request,
12551 ))
12552 }
12553
12554 #[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"]
12555
12556 pub fn on_representation_with<___R>(
12557 &self,
12558 request: ___R,
12559 ) -> ::fidl_next::SendFuture<'_, ___T>
12560 where
12561 ___R: ::fidl_next::Encode<
12562 <super::OnRepresentation as ::fidl_next::Method>::Request,
12563 <___T as ::fidl_next::Transport>::SendBuffer,
12564 >,
12565 {
12566 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
12567 6679970090861613324,
12568 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
12569 request,
12570 ))
12571 }
12572 }
12573 }
12574}
12575
12576pub trait FileClientHandler<
12580 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12581 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12582>
12583{
12584 #[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"]
12585 fn on_open(
12586 &mut self,
12587
12588 request: ::fidl_next::Request<file::OnOpen, ___T>,
12589 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12590
12591 #[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"]
12592 fn on_representation(
12593 &mut self,
12594
12595 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
12596 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12597
12598 fn on_unknown_interaction(
12599 &mut self,
12600 ordinal: u64,
12601 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12602 ::core::future::ready(())
12603 }
12604}
12605
12606impl<___T> FileClientHandler<___T> for ::fidl_next::IgnoreEvents
12607where
12608 ___T: ::fidl_next::Transport,
12609{
12610 async fn on_open(&mut self, _: ::fidl_next::Request<file::OnOpen, ___T>) {}
12611
12612 async fn on_representation(&mut self, _: ::fidl_next::Request<file::OnRepresentation, ___T>) {}
12613
12614 async fn on_unknown_interaction(&mut self, _: u64) {}
12615}
12616
12617impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for File
12618where
12619 ___H: FileClientHandler<___T> + ::core::marker::Send,
12620 ___T: ::fidl_next::Transport,
12621 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
12622 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12623 Constraint = (),
12624 >,
12625 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
12626 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12627 Constraint = (),
12628 >,
12629{
12630 async fn on_event(
12631 handler: &mut ___H,
12632 ordinal: u64,
12633 flexibility: ::fidl_next::protocol::Flexibility,
12634 body: ::fidl_next::Body<___T>,
12635 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12636 match ordinal {
12637 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
12638 Ok(decoded) => {
12639 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
12640 Ok(())
12641 }
12642 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12643 ordinal: 9207534335756671346,
12644 error,
12645 }),
12646 },
12647
12648 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
12649 Ok(decoded) => {
12650 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
12651 Ok(())
12652 }
12653 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12654 ordinal: 6679970090861613324,
12655 error,
12656 }),
12657 },
12658
12659 ordinal => {
12660 handler.on_unknown_interaction(ordinal).await;
12661 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12662 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12663 } else {
12664 Ok(())
12665 }
12666 }
12667 }
12668 }
12669}
12670
12671pub trait FileServerHandler<
12675 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12676 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12677>
12678{
12679 #[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"]
12680 fn advisory_lock(
12681 &mut self,
12682
12683 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
12684
12685 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
12686 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12687
12688 #[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"]
12689 fn link_into(
12690 &mut self,
12691
12692 request: ::fidl_next::Request<file::LinkInto, ___T>,
12693
12694 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
12695 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12696
12697 fn clone(
12698 &mut self,
12699
12700 request: ::fidl_next::Request<file::Clone, ___T>,
12701 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12702
12703 #[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"]
12704 fn close(
12705 &mut self,
12706
12707 responder: ::fidl_next::Responder<file::Close, ___T>,
12708 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12709
12710 fn query(
12711 &mut self,
12712
12713 responder: ::fidl_next::Responder<file::Query, ___T>,
12714 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12715
12716 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
12717 fn deprecated_clone(
12718 &mut self,
12719
12720 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
12721 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12722
12723 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
12724 fn deprecated_get_attr(
12725 &mut self,
12726
12727 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
12728 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12729
12730 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
12731 fn deprecated_set_attr(
12732 &mut self,
12733
12734 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
12735
12736 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
12737 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12738
12739 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
12740 fn deprecated_get_flags(
12741 &mut self,
12742
12743 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
12744 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12745
12746 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
12747 fn deprecated_set_flags(
12748 &mut self,
12749
12750 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
12751
12752 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
12753 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12754
12755 #[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"]
12756 fn get_flags(
12757 &mut self,
12758
12759 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
12760 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12761
12762 #[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"]
12763 fn set_flags(
12764 &mut self,
12765
12766 request: ::fidl_next::Request<file::SetFlags, ___T>,
12767
12768 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
12769 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12770
12771 #[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"]
12772 fn query_filesystem(
12773 &mut self,
12774
12775 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
12776 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12777
12778 #[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"]
12779 fn get_attributes(
12780 &mut self,
12781
12782 request: ::fidl_next::Request<file::GetAttributes, ___T>,
12783
12784 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
12785 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12786
12787 #[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"]
12788 fn update_attributes(
12789 &mut self,
12790
12791 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
12792
12793 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
12794 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12795
12796 #[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"]
12797 fn sync(
12798 &mut self,
12799
12800 responder: ::fidl_next::Responder<file::Sync, ___T>,
12801 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12802
12803 #[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"]
12804 fn list_extended_attributes(
12805 &mut self,
12806
12807 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
12808 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12809
12810 #[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"]
12811 fn get_extended_attribute(
12812 &mut self,
12813
12814 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
12815
12816 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
12817 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12818
12819 #[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"]
12820 fn set_extended_attribute(
12821 &mut self,
12822
12823 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
12824
12825 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
12826 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12827
12828 #[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"]
12829 fn remove_extended_attribute(
12830 &mut self,
12831
12832 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
12833
12834 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
12835 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12836
12837 #[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"]
12838 fn read(
12839 &mut self,
12840
12841 request: ::fidl_next::Request<file::Read, ___T>,
12842
12843 responder: ::fidl_next::Responder<file::Read, ___T>,
12844 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12845
12846 #[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"]
12847 fn write(
12848 &mut self,
12849
12850 request: ::fidl_next::Request<file::Write, ___T>,
12851
12852 responder: ::fidl_next::Responder<file::Write, ___T>,
12853 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12854
12855 fn describe(
12856 &mut self,
12857
12858 responder: ::fidl_next::Responder<file::Describe, ___T>,
12859 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12860
12861 #[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"]
12862 fn seek(
12863 &mut self,
12864
12865 request: ::fidl_next::Request<file::Seek, ___T>,
12866
12867 responder: ::fidl_next::Responder<file::Seek, ___T>,
12868 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12869
12870 #[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"]
12871 fn read_at(
12872 &mut self,
12873
12874 request: ::fidl_next::Request<file::ReadAt, ___T>,
12875
12876 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
12877 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12878
12879 #[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"]
12880 fn write_at(
12881 &mut self,
12882
12883 request: ::fidl_next::Request<file::WriteAt, ___T>,
12884
12885 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
12886 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12887
12888 #[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"]
12889 fn resize(
12890 &mut self,
12891
12892 request: ::fidl_next::Request<file::Resize, ___T>,
12893
12894 responder: ::fidl_next::Responder<file::Resize, ___T>,
12895 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12896
12897 #[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"]
12898 fn get_backing_memory(
12899 &mut self,
12900
12901 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
12902
12903 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
12904 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12905
12906 #[doc = " Pre-allocate on-disk space for this file.\n"]
12907 fn allocate(
12908 &mut self,
12909
12910 request: ::fidl_next::Request<file::Allocate, ___T>,
12911
12912 responder: ::fidl_next::Responder<file::Allocate, ___T>,
12913 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12914
12915 #[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"]
12916 fn enable_verity(
12917 &mut self,
12918
12919 request: ::fidl_next::Request<file::EnableVerity, ___T>,
12920
12921 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
12922 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12923
12924 fn on_unknown_interaction(
12925 &mut self,
12926 ordinal: u64,
12927 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12928 ::core::future::ready(())
12929 }
12930}
12931
12932impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for File
12933where
12934 ___H: FileServerHandler<___T> + ::core::marker::Send,
12935 ___T: ::fidl_next::Transport,
12936 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
12937 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12938 Constraint = (),
12939 >,
12940 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12941 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12942 Constraint = (),
12943 >,
12944 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
12945 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12946 Constraint = (),
12947 >,
12948 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
12949 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12950 Constraint = (),
12951 >,
12952 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
12953 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12954 Constraint = (),
12955 >,
12956 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
12957 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12958 Constraint = (),
12959 >,
12960 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
12961 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12962 Constraint = (),
12963 >,
12964 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
12965 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12966 Constraint = (),
12967 >,
12968 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
12969 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12970 Constraint = (),
12971 >,
12972 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
12973 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12974 Constraint = (),
12975 >,
12976 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
12977 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12978 Constraint = (),
12979 >,
12980 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
12981 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12982 Constraint = (),
12983 >,
12984 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
12985 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12986 Constraint = (),
12987 >,
12988 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
12989 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12990 Constraint = (),
12991 >,
12992 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
12993 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12994 Constraint = (),
12995 >,
12996 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
12997 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12998 Constraint = (),
12999 >,
13000 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
13001 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13002 Constraint = (),
13003 >,
13004 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
13005 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13006 Constraint = (),
13007 >,
13008 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
13009 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13010 Constraint = (),
13011 >,
13012 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
13013 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13014 Constraint = (),
13015 >,
13016 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
13017 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13018 Constraint = (),
13019 >,
13020 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
13021 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13022 Constraint = (),
13023 >,
13024{
13025 async fn on_one_way(
13026 handler: &mut ___H,
13027 ordinal: u64,
13028 flexibility: ::fidl_next::protocol::Flexibility,
13029 body: ::fidl_next::Body<___T>,
13030 ) -> ::core::result::Result<
13031 (),
13032 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13033 > {
13034 match ordinal {
13035 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
13036 Ok(decoded) => {
13037 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
13038 Ok(())
13039 }
13040 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13041 ordinal: 2366825959783828089,
13042 error,
13043 }),
13044 },
13045
13046 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
13047 Ok(decoded) => {
13048 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
13049 Ok(())
13050 }
13051 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13052 ordinal: 6512600400724287855,
13053 error,
13054 }),
13055 },
13056
13057 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
13058 Ok(decoded) => {
13059 handler
13060 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
13061 .await;
13062 Ok(())
13063 }
13064 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13065 ordinal: 5431626189872037072,
13066 error,
13067 }),
13068 },
13069
13070 ordinal => {
13071 handler.on_unknown_interaction(ordinal).await;
13072 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13073 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13074 } else {
13075 Ok(())
13076 }
13077 }
13078 }
13079 }
13080
13081 async fn on_two_way(
13082 handler: &mut ___H,
13083 ordinal: u64,
13084 flexibility: ::fidl_next::protocol::Flexibility,
13085 body: ::fidl_next::Body<___T>,
13086 responder: ::fidl_next::protocol::Responder<___T>,
13087 ) -> ::core::result::Result<
13088 (),
13089 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13090 > {
13091 match ordinal {
13092 7992130864415541162 => {
13093 let responder = ::fidl_next::Responder::from_untyped(responder);
13094
13095 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13096 Ok(decoded) => {
13097 handler
13098 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
13099 .await;
13100 Ok(())
13101 }
13102 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13103 ordinal: 7992130864415541162,
13104 error,
13105 }),
13106 }
13107 }
13108
13109 6121399674497678964 => {
13110 let responder = ::fidl_next::Responder::from_untyped(responder);
13111
13112 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13113 Ok(decoded) => {
13114 handler
13115 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
13116 .await;
13117 Ok(())
13118 }
13119 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13120 ordinal: 6121399674497678964,
13121 error,
13122 }),
13123 }
13124 }
13125
13126 6540867515453498750 => {
13127 let responder = ::fidl_next::Responder::from_untyped(responder);
13128
13129 handler.close(responder).await;
13130 Ok(())
13131 }
13132
13133 2763219980499352582 => {
13134 let responder = ::fidl_next::Responder::from_untyped(responder);
13135
13136 handler.query(responder).await;
13137 Ok(())
13138 }
13139
13140 8689798978500614909 => {
13141 let responder = ::fidl_next::Responder::from_untyped(responder);
13142
13143 handler.deprecated_get_attr(responder).await;
13144 Ok(())
13145 }
13146
13147 4721673413776871238 => {
13148 let responder = ::fidl_next::Responder::from_untyped(responder);
13149
13150 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13151 Ok(decoded) => {
13152 handler
13153 .deprecated_set_attr(
13154 ::fidl_next::Request::from_decoded(decoded),
13155 responder,
13156 )
13157 .await;
13158 Ok(())
13159 }
13160 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13161 ordinal: 4721673413776871238,
13162 error,
13163 }),
13164 }
13165 }
13166
13167 6595803110182632097 => {
13168 let responder = ::fidl_next::Responder::from_untyped(responder);
13169
13170 handler.deprecated_get_flags(responder).await;
13171 Ok(())
13172 }
13173
13174 5950864159036794675 => {
13175 let responder = ::fidl_next::Responder::from_untyped(responder);
13176
13177 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13178 Ok(decoded) => {
13179 handler
13180 .deprecated_set_flags(
13181 ::fidl_next::Request::from_decoded(decoded),
13182 responder,
13183 )
13184 .await;
13185 Ok(())
13186 }
13187 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13188 ordinal: 5950864159036794675,
13189 error,
13190 }),
13191 }
13192 }
13193
13194 105530239381466147 => {
13195 let responder = ::fidl_next::Responder::from_untyped(responder);
13196
13197 handler.get_flags(responder).await;
13198 Ok(())
13199 }
13200
13201 6172186066099445416 => {
13202 let responder = ::fidl_next::Responder::from_untyped(responder);
13203
13204 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13205 Ok(decoded) => {
13206 handler
13207 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
13208 .await;
13209 Ok(())
13210 }
13211 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13212 ordinal: 6172186066099445416,
13213 error,
13214 }),
13215 }
13216 }
13217
13218 8013111122914313744 => {
13219 let responder = ::fidl_next::Responder::from_untyped(responder);
13220
13221 handler.query_filesystem(responder).await;
13222 Ok(())
13223 }
13224
13225 4414537700416816443 => {
13226 let responder = ::fidl_next::Responder::from_untyped(responder);
13227
13228 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13229 Ok(decoded) => {
13230 handler
13231 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
13232 .await;
13233 Ok(())
13234 }
13235 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13236 ordinal: 4414537700416816443,
13237 error,
13238 }),
13239 }
13240 }
13241
13242 3677402239314018056 => {
13243 let responder = ::fidl_next::Responder::from_untyped(responder);
13244
13245 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13246 Ok(decoded) => {
13247 handler
13248 .update_attributes(
13249 ::fidl_next::Request::from_decoded(decoded),
13250 responder,
13251 )
13252 .await;
13253 Ok(())
13254 }
13255 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13256 ordinal: 3677402239314018056,
13257 error,
13258 }),
13259 }
13260 }
13261
13262 3196473584242777161 => {
13263 let responder = ::fidl_next::Responder::from_untyped(responder);
13264
13265 handler.sync(responder).await;
13266 Ok(())
13267 }
13268
13269 5043930208506967771 => {
13270 let responder = ::fidl_next::Responder::from_untyped(responder);
13271
13272 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13273 Ok(decoded) => {
13274 handler
13275 .get_extended_attribute(
13276 ::fidl_next::Request::from_decoded(decoded),
13277 responder,
13278 )
13279 .await;
13280 Ok(())
13281 }
13282 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13283 ordinal: 5043930208506967771,
13284 error,
13285 }),
13286 }
13287 }
13288
13289 5374223046099989052 => {
13290 let responder = ::fidl_next::Responder::from_untyped(responder);
13291
13292 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13293 Ok(decoded) => {
13294 handler
13295 .set_extended_attribute(
13296 ::fidl_next::Request::from_decoded(decoded),
13297 responder,
13298 )
13299 .await;
13300 Ok(())
13301 }
13302 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13303 ordinal: 5374223046099989052,
13304 error,
13305 }),
13306 }
13307 }
13308
13309 8794297771444732717 => {
13310 let responder = ::fidl_next::Responder::from_untyped(responder);
13311
13312 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13313 Ok(decoded) => {
13314 handler
13315 .remove_extended_attribute(
13316 ::fidl_next::Request::from_decoded(decoded),
13317 responder,
13318 )
13319 .await;
13320 Ok(())
13321 }
13322 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13323 ordinal: 8794297771444732717,
13324 error,
13325 }),
13326 }
13327 }
13328
13329 395825947633028830 => {
13330 let responder = ::fidl_next::Responder::from_untyped(responder);
13331
13332 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13333 Ok(decoded) => {
13334 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
13335 Ok(())
13336 }
13337 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13338 ordinal: 395825947633028830,
13339 error,
13340 }),
13341 }
13342 }
13343
13344 7651971425397809026 => {
13345 let responder = ::fidl_next::Responder::from_untyped(responder);
13346
13347 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13348 Ok(decoded) => {
13349 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
13350 Ok(())
13351 }
13352 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13353 ordinal: 7651971425397809026,
13354 error,
13355 }),
13356 }
13357 }
13358
13359 7545125870053689020 => {
13360 let responder = ::fidl_next::Responder::from_untyped(responder);
13361
13362 handler.describe(responder).await;
13363 Ok(())
13364 }
13365
13366 8649041485622956551 => {
13367 let responder = ::fidl_next::Responder::from_untyped(responder);
13368
13369 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13370 Ok(decoded) => {
13371 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
13372 Ok(())
13373 }
13374 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13375 ordinal: 8649041485622956551,
13376 error,
13377 }),
13378 }
13379 }
13380
13381 1587416148701180478 => {
13382 let responder = ::fidl_next::Responder::from_untyped(responder);
13383
13384 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13385 Ok(decoded) => {
13386 handler
13387 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
13388 .await;
13389 Ok(())
13390 }
13391 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13392 ordinal: 1587416148701180478,
13393 error,
13394 }),
13395 }
13396 }
13397
13398 8736683935131400491 => {
13399 let responder = ::fidl_next::Responder::from_untyped(responder);
13400
13401 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13402 Ok(decoded) => {
13403 handler
13404 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
13405 .await;
13406 Ok(())
13407 }
13408 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13409 ordinal: 8736683935131400491,
13410 error,
13411 }),
13412 }
13413 }
13414
13415 3134648685270758458 => {
13416 let responder = ::fidl_next::Responder::from_untyped(responder);
13417
13418 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13419 Ok(decoded) => {
13420 handler
13421 .resize(::fidl_next::Request::from_decoded(decoded), responder)
13422 .await;
13423 Ok(())
13424 }
13425 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13426 ordinal: 3134648685270758458,
13427 error,
13428 }),
13429 }
13430 }
13431
13432 46911652864194091 => {
13433 let responder = ::fidl_next::Responder::from_untyped(responder);
13434
13435 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13436 Ok(decoded) => {
13437 handler
13438 .get_backing_memory(
13439 ::fidl_next::Request::from_decoded(decoded),
13440 responder,
13441 )
13442 .await;
13443 Ok(())
13444 }
13445 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13446 ordinal: 46911652864194091,
13447 error,
13448 }),
13449 }
13450 }
13451
13452 8645235848064269614 => {
13453 let responder = ::fidl_next::Responder::from_untyped(responder);
13454
13455 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13456 Ok(decoded) => {
13457 handler
13458 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
13459 .await;
13460 Ok(())
13461 }
13462 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13463 ordinal: 8645235848064269614,
13464 error,
13465 }),
13466 }
13467 }
13468
13469 3189145313204943035 => {
13470 let responder = ::fidl_next::Responder::from_untyped(responder);
13471
13472 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13473 Ok(decoded) => {
13474 handler
13475 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
13476 .await;
13477 Ok(())
13478 }
13479 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13480 ordinal: 3189145313204943035,
13481 error,
13482 }),
13483 }
13484 }
13485
13486 ordinal => {
13487 handler.on_unknown_interaction(ordinal).await;
13488 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13489 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13490 } else {
13491 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
13492 ordinal,
13493 flexibility,
13494 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
13495 )
13496 .expect("encoding a framework error should never fail")
13497 .await?;
13498 Ok(())
13499 }
13500 }
13501 }
13502 }
13503}
13504
13505#[doc = " A [\'Node\'] which contains a symbolic link.\n"]
13507#[derive(PartialEq, Debug)]
13508pub struct Symlink;
13509
13510impl ::fidl_next::Discoverable for Symlink {
13511 const PROTOCOL_NAME: &'static str = "fuchsia.io.Symlink";
13512}
13513
13514#[cfg(target_os = "fuchsia")]
13515impl ::fidl_next::HasTransport for Symlink {
13516 type Transport = ::fidl_next::fuchsia::zx::Channel;
13517}
13518
13519pub mod symlink {
13520 pub mod prelude {
13521 pub use crate::{Symlink, SymlinkClientHandler, SymlinkServerHandler, symlink};
13522
13523 pub use crate::natural::ExtendedAttributeValue;
13524
13525 pub use crate::natural::LinkableLinkIntoRequest;
13526
13527 pub use crate::natural::LinkableLinkIntoResponse;
13528
13529 pub use crate::natural::MutableNodeAttributes;
13530
13531 pub use crate::natural::NodeAttributes2;
13532
13533 pub use crate::natural::NodeDeprecatedCloneRequest;
13534
13535 pub use crate::natural::NodeDeprecatedGetAttrResponse;
13536
13537 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
13538
13539 pub use crate::natural::NodeDeprecatedSetAttrRequest;
13540
13541 pub use crate::natural::NodeDeprecatedSetAttrResponse;
13542
13543 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
13544
13545 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
13546
13547 pub use crate::natural::NodeGetAttributesRequest;
13548
13549 pub use crate::natural::NodeGetExtendedAttributeRequest;
13550
13551 pub use crate::natural::NodeListExtendedAttributesRequest;
13552
13553 pub use crate::natural::NodeOnOpenRequest;
13554
13555 pub use crate::natural::NodeQueryFilesystemResponse;
13556
13557 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
13558
13559 pub use crate::natural::NodeSetExtendedAttributeRequest;
13560
13561 pub use crate::natural::NodeSetFlagsRequest;
13562
13563 pub use crate::natural::NodeGetFlagsResponse;
13564
13565 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
13566
13567 pub use crate::natural::NodeSetExtendedAttributeResponse;
13568
13569 pub use crate::natural::NodeSetFlagsResponse;
13570
13571 pub use crate::natural::NodeSyncResponse;
13572
13573 pub use crate::natural::NodeUpdateAttributesResponse;
13574
13575 pub use crate::natural::Representation;
13576
13577 pub use crate::natural::SymlinkInfo;
13578
13579 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
13580
13581 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
13582
13583 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
13584 }
13585
13586 pub struct LinkInto;
13587
13588 impl ::fidl_next::Method for LinkInto {
13589 const ORDINAL: u64 = 6121399674497678964;
13590 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13591 ::fidl_next::protocol::Flexibility::Strict;
13592
13593 type Protocol = crate::Symlink;
13594
13595 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
13596 }
13597
13598 impl ::fidl_next::TwoWayMethod for LinkInto {
13599 type Response = ::fidl_next::wire::Result<
13600 'static,
13601 crate::wire::LinkableLinkIntoResponse,
13602 ::fidl_next::wire::Int32,
13603 >;
13604 }
13605
13606 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
13607 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13608
13609 fn respond(response: ___R) -> Self::Output {
13610 ::core::result::Result::Ok(response)
13611 }
13612 }
13613
13614 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
13615 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13616
13617 fn respond_err(response: ___R) -> Self::Output {
13618 ::core::result::Result::Err(response)
13619 }
13620 }
13621
13622 pub struct Clone;
13623
13624 impl ::fidl_next::Method for Clone {
13625 const ORDINAL: u64 = 2366825959783828089;
13626 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13627 ::fidl_next::protocol::Flexibility::Strict;
13628
13629 type Protocol = crate::Symlink;
13630
13631 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
13632 }
13633
13634 pub struct Close;
13635
13636 impl ::fidl_next::Method for Close {
13637 const ORDINAL: u64 = 6540867515453498750;
13638 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13639 ::fidl_next::protocol::Flexibility::Strict;
13640
13641 type Protocol = crate::Symlink;
13642
13643 type Request = ::fidl_next::wire::EmptyMessageBody;
13644 }
13645
13646 impl ::fidl_next::TwoWayMethod for Close {
13647 type Response = ::fidl_next::wire::Result<
13648 'static,
13649 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
13650 ::fidl_next::wire::Int32,
13651 >;
13652 }
13653
13654 impl<___R> ::fidl_next::Respond<___R> for Close {
13655 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13656
13657 fn respond(response: ___R) -> Self::Output {
13658 ::core::result::Result::Ok(response)
13659 }
13660 }
13661
13662 impl<___R> ::fidl_next::RespondErr<___R> for Close {
13663 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13664
13665 fn respond_err(response: ___R) -> Self::Output {
13666 ::core::result::Result::Err(response)
13667 }
13668 }
13669
13670 pub struct Query;
13671
13672 impl ::fidl_next::Method for Query {
13673 const ORDINAL: u64 = 2763219980499352582;
13674 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13675 ::fidl_next::protocol::Flexibility::Strict;
13676
13677 type Protocol = crate::Symlink;
13678
13679 type Request = ::fidl_next::wire::EmptyMessageBody;
13680 }
13681
13682 impl ::fidl_next::TwoWayMethod for Query {
13683 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
13684 }
13685
13686 impl<___R> ::fidl_next::Respond<___R> for Query {
13687 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
13688
13689 fn respond(response: ___R) -> Self::Output {
13690 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
13691 }
13692 }
13693
13694 pub struct DeprecatedClone;
13695
13696 impl ::fidl_next::Method for DeprecatedClone {
13697 const ORDINAL: u64 = 6512600400724287855;
13698 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13699 ::fidl_next::protocol::Flexibility::Flexible;
13700
13701 type Protocol = crate::Symlink;
13702
13703 type Request = crate::wire::NodeDeprecatedCloneRequest;
13704 }
13705
13706 pub struct OnOpen;
13707
13708 impl ::fidl_next::Method for OnOpen {
13709 const ORDINAL: u64 = 9207534335756671346;
13710 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13711 ::fidl_next::protocol::Flexibility::Flexible;
13712
13713 type Protocol = crate::Symlink;
13714
13715 type Request = crate::wire::NodeOnOpenRequest<'static>;
13716 }
13717
13718 pub struct DeprecatedGetAttr;
13719
13720 impl ::fidl_next::Method for DeprecatedGetAttr {
13721 const ORDINAL: u64 = 8689798978500614909;
13722 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13723 ::fidl_next::protocol::Flexibility::Strict;
13724
13725 type Protocol = crate::Symlink;
13726
13727 type Request = ::fidl_next::wire::EmptyMessageBody;
13728 }
13729
13730 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
13731 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
13732 }
13733
13734 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
13735 type Output = ___R;
13736
13737 fn respond(response: ___R) -> Self::Output {
13738 response
13739 }
13740 }
13741
13742 pub struct DeprecatedSetAttr;
13743
13744 impl ::fidl_next::Method for DeprecatedSetAttr {
13745 const ORDINAL: u64 = 4721673413776871238;
13746 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13747 ::fidl_next::protocol::Flexibility::Strict;
13748
13749 type Protocol = crate::Symlink;
13750
13751 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
13752 }
13753
13754 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
13755 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
13756 }
13757
13758 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
13759 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
13760
13761 fn respond(response: ___R) -> Self::Output {
13762 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
13763 }
13764 }
13765
13766 pub struct DeprecatedGetFlags;
13767
13768 impl ::fidl_next::Method for DeprecatedGetFlags {
13769 const ORDINAL: u64 = 6595803110182632097;
13770 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13771 ::fidl_next::protocol::Flexibility::Strict;
13772
13773 type Protocol = crate::Symlink;
13774
13775 type Request = ::fidl_next::wire::EmptyMessageBody;
13776 }
13777
13778 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
13779 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
13780 }
13781
13782 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
13783 type Output = ___R;
13784
13785 fn respond(response: ___R) -> Self::Output {
13786 response
13787 }
13788 }
13789
13790 pub struct DeprecatedSetFlags;
13791
13792 impl ::fidl_next::Method for DeprecatedSetFlags {
13793 const ORDINAL: u64 = 5950864159036794675;
13794 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13795 ::fidl_next::protocol::Flexibility::Strict;
13796
13797 type Protocol = crate::Symlink;
13798
13799 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
13800 }
13801
13802 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
13803 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
13804 }
13805
13806 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
13807 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
13808
13809 fn respond(response: ___R) -> Self::Output {
13810 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
13811 }
13812 }
13813
13814 pub struct GetFlags;
13815
13816 impl ::fidl_next::Method for GetFlags {
13817 const ORDINAL: u64 = 105530239381466147;
13818 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13819 ::fidl_next::protocol::Flexibility::Flexible;
13820
13821 type Protocol = crate::Symlink;
13822
13823 type Request = ::fidl_next::wire::EmptyMessageBody;
13824 }
13825
13826 impl ::fidl_next::TwoWayMethod for GetFlags {
13827 type Response = ::fidl_next::wire::FlexibleResult<
13828 'static,
13829 crate::wire::NodeGetFlagsResponse,
13830 ::fidl_next::wire::Int32,
13831 >;
13832 }
13833
13834 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
13835 type Output = ::fidl_next::FlexibleResult<
13836 crate::generic::NodeGetFlagsResponse<___R>,
13837 ::fidl_next::util::Never,
13838 >;
13839
13840 fn respond(response: ___R) -> Self::Output {
13841 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
13842 flags: response,
13843 })
13844 }
13845 }
13846
13847 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
13848 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13849
13850 fn respond_err(response: ___R) -> Self::Output {
13851 ::fidl_next::FlexibleResult::Err(response)
13852 }
13853 }
13854
13855 pub struct SetFlags;
13856
13857 impl ::fidl_next::Method for SetFlags {
13858 const ORDINAL: u64 = 6172186066099445416;
13859 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13860 ::fidl_next::protocol::Flexibility::Flexible;
13861
13862 type Protocol = crate::Symlink;
13863
13864 type Request = crate::wire::NodeSetFlagsRequest;
13865 }
13866
13867 impl ::fidl_next::TwoWayMethod for SetFlags {
13868 type Response = ::fidl_next::wire::FlexibleResult<
13869 'static,
13870 crate::wire::NodeSetFlagsResponse,
13871 ::fidl_next::wire::Int32,
13872 >;
13873 }
13874
13875 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
13876 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13877
13878 fn respond(response: ___R) -> Self::Output {
13879 ::fidl_next::FlexibleResult::Ok(response)
13880 }
13881 }
13882
13883 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
13884 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13885
13886 fn respond_err(response: ___R) -> Self::Output {
13887 ::fidl_next::FlexibleResult::Err(response)
13888 }
13889 }
13890
13891 pub struct QueryFilesystem;
13892
13893 impl ::fidl_next::Method for QueryFilesystem {
13894 const ORDINAL: u64 = 8013111122914313744;
13895 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13896 ::fidl_next::protocol::Flexibility::Strict;
13897
13898 type Protocol = crate::Symlink;
13899
13900 type Request = ::fidl_next::wire::EmptyMessageBody;
13901 }
13902
13903 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
13904 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
13905 }
13906
13907 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
13908 type Output = ___R;
13909
13910 fn respond(response: ___R) -> Self::Output {
13911 response
13912 }
13913 }
13914
13915 pub struct OnRepresentation;
13916
13917 impl ::fidl_next::Method for OnRepresentation {
13918 const ORDINAL: u64 = 6679970090861613324;
13919 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13920 ::fidl_next::protocol::Flexibility::Strict;
13921
13922 type Protocol = crate::Symlink;
13923
13924 type Request = crate::wire::Representation<'static>;
13925 }
13926
13927 pub struct GetAttributes;
13928
13929 impl ::fidl_next::Method for GetAttributes {
13930 const ORDINAL: u64 = 4414537700416816443;
13931 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13932 ::fidl_next::protocol::Flexibility::Strict;
13933
13934 type Protocol = crate::Symlink;
13935
13936 type Request = crate::wire::NodeGetAttributesRequest;
13937 }
13938
13939 impl ::fidl_next::TwoWayMethod for GetAttributes {
13940 type Response = ::fidl_next::wire::Result<
13941 'static,
13942 crate::wire::NodeAttributes2<'static>,
13943 ::fidl_next::wire::Int32,
13944 >;
13945 }
13946
13947 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
13948 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13949
13950 fn respond(response: ___R) -> Self::Output {
13951 ::core::result::Result::Ok(response)
13952 }
13953 }
13954
13955 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
13956 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13957
13958 fn respond_err(response: ___R) -> Self::Output {
13959 ::core::result::Result::Err(response)
13960 }
13961 }
13962
13963 pub struct UpdateAttributes;
13964
13965 impl ::fidl_next::Method for UpdateAttributes {
13966 const ORDINAL: u64 = 3677402239314018056;
13967 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13968 ::fidl_next::protocol::Flexibility::Strict;
13969
13970 type Protocol = crate::Symlink;
13971
13972 type Request = crate::wire::MutableNodeAttributes<'static>;
13973 }
13974
13975 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
13976 type Response = ::fidl_next::wire::Result<
13977 'static,
13978 crate::wire::NodeUpdateAttributesResponse,
13979 ::fidl_next::wire::Int32,
13980 >;
13981 }
13982
13983 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
13984 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13985
13986 fn respond(response: ___R) -> Self::Output {
13987 ::core::result::Result::Ok(response)
13988 }
13989 }
13990
13991 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
13992 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13993
13994 fn respond_err(response: ___R) -> Self::Output {
13995 ::core::result::Result::Err(response)
13996 }
13997 }
13998
13999 pub struct Sync;
14000
14001 impl ::fidl_next::Method for Sync {
14002 const ORDINAL: u64 = 3196473584242777161;
14003 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14004 ::fidl_next::protocol::Flexibility::Strict;
14005
14006 type Protocol = crate::Symlink;
14007
14008 type Request = ::fidl_next::wire::EmptyMessageBody;
14009 }
14010
14011 impl ::fidl_next::TwoWayMethod for Sync {
14012 type Response = ::fidl_next::wire::Result<
14013 'static,
14014 crate::wire::NodeSyncResponse,
14015 ::fidl_next::wire::Int32,
14016 >;
14017 }
14018
14019 impl<___R> ::fidl_next::Respond<___R> for Sync {
14020 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14021
14022 fn respond(response: ___R) -> Self::Output {
14023 ::core::result::Result::Ok(response)
14024 }
14025 }
14026
14027 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
14028 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14029
14030 fn respond_err(response: ___R) -> Self::Output {
14031 ::core::result::Result::Err(response)
14032 }
14033 }
14034
14035 pub struct ListExtendedAttributes;
14036
14037 impl ::fidl_next::Method for ListExtendedAttributes {
14038 const ORDINAL: u64 = 5431626189872037072;
14039 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14040 ::fidl_next::protocol::Flexibility::Strict;
14041
14042 type Protocol = crate::Symlink;
14043
14044 type Request = crate::wire::NodeListExtendedAttributesRequest;
14045 }
14046
14047 pub struct GetExtendedAttribute;
14048
14049 impl ::fidl_next::Method for GetExtendedAttribute {
14050 const ORDINAL: u64 = 5043930208506967771;
14051 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14052 ::fidl_next::protocol::Flexibility::Strict;
14053
14054 type Protocol = crate::Symlink;
14055
14056 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
14057 }
14058
14059 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
14060 type Response = ::fidl_next::wire::Result<
14061 'static,
14062 crate::wire::ExtendedAttributeValue<'static>,
14063 ::fidl_next::wire::Int32,
14064 >;
14065 }
14066
14067 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
14068 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14069
14070 fn respond(response: ___R) -> Self::Output {
14071 ::core::result::Result::Ok(response)
14072 }
14073 }
14074
14075 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
14076 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14077
14078 fn respond_err(response: ___R) -> Self::Output {
14079 ::core::result::Result::Err(response)
14080 }
14081 }
14082
14083 pub struct SetExtendedAttribute;
14084
14085 impl ::fidl_next::Method for SetExtendedAttribute {
14086 const ORDINAL: u64 = 5374223046099989052;
14087 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14088 ::fidl_next::protocol::Flexibility::Strict;
14089
14090 type Protocol = crate::Symlink;
14091
14092 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
14093 }
14094
14095 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
14096 type Response = ::fidl_next::wire::Result<
14097 'static,
14098 crate::wire::NodeSetExtendedAttributeResponse,
14099 ::fidl_next::wire::Int32,
14100 >;
14101 }
14102
14103 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
14104 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14105
14106 fn respond(response: ___R) -> Self::Output {
14107 ::core::result::Result::Ok(response)
14108 }
14109 }
14110
14111 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
14112 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14113
14114 fn respond_err(response: ___R) -> Self::Output {
14115 ::core::result::Result::Err(response)
14116 }
14117 }
14118
14119 pub struct RemoveExtendedAttribute;
14120
14121 impl ::fidl_next::Method for RemoveExtendedAttribute {
14122 const ORDINAL: u64 = 8794297771444732717;
14123 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14124 ::fidl_next::protocol::Flexibility::Strict;
14125
14126 type Protocol = crate::Symlink;
14127
14128 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
14129 }
14130
14131 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
14132 type Response = ::fidl_next::wire::Result<
14133 'static,
14134 crate::wire::NodeRemoveExtendedAttributeResponse,
14135 ::fidl_next::wire::Int32,
14136 >;
14137 }
14138
14139 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
14140 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14141
14142 fn respond(response: ___R) -> Self::Output {
14143 ::core::result::Result::Ok(response)
14144 }
14145 }
14146
14147 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
14148 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14149
14150 fn respond_err(response: ___R) -> Self::Output {
14151 ::core::result::Result::Err(response)
14152 }
14153 }
14154
14155 pub struct Describe;
14156
14157 impl ::fidl_next::Method for Describe {
14158 const ORDINAL: u64 = 8371117097481679347;
14159 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14160 ::fidl_next::protocol::Flexibility::Flexible;
14161
14162 type Protocol = crate::Symlink;
14163
14164 type Request = ::fidl_next::wire::EmptyMessageBody;
14165 }
14166
14167 impl ::fidl_next::TwoWayMethod for Describe {
14168 type Response = ::fidl_next::wire::Flexible<'static, crate::wire::SymlinkInfo<'static>>;
14169 }
14170
14171 impl<___R> ::fidl_next::Respond<___R> for Describe {
14172 type Output = ___R;
14173
14174 fn respond(response: ___R) -> Self::Output {
14175 response
14176 }
14177 }
14178
14179 mod ___detail {
14180 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Symlink
14181 where
14182 ___T: ::fidl_next::Transport,
14183 {
14184 type Client = SymlinkClient<___T>;
14185 type Server = SymlinkServer<___T>;
14186 }
14187
14188 #[repr(transparent)]
14190 pub struct SymlinkClient<___T: ::fidl_next::Transport> {
14191 #[allow(dead_code)]
14192 client: ::fidl_next::protocol::Client<___T>,
14193 }
14194
14195 impl<___T> SymlinkClient<___T>
14196 where
14197 ___T: ::fidl_next::Transport,
14198 {
14199 #[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"]
14200 pub fn link_into(
14201 &self,
14202
14203 dst_parent_token: impl ::fidl_next::Encode<
14204 ::fidl_next::wire::fuchsia::Event,
14205 <___T as ::fidl_next::Transport>::SendBuffer,
14206 >,
14207
14208 dst: impl ::fidl_next::Encode<
14209 ::fidl_next::wire::String<'static>,
14210 <___T as ::fidl_next::Transport>::SendBuffer,
14211 >,
14212 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14213 where
14214 <___T as ::fidl_next::Transport>::SendBuffer:
14215 ::fidl_next::encoder::InternalHandleEncoder,
14216 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14217 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14218 {
14219 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
14220 dst_parent_token,
14221
14222 dst,
14223 })
14224 }
14225
14226 #[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"]
14227 pub fn link_into_with<___R>(
14228 &self,
14229 request: ___R,
14230 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14231 where
14232 ___R: ::fidl_next::Encode<
14233 crate::wire::LinkableLinkIntoRequest<'static>,
14234 <___T as ::fidl_next::Transport>::SendBuffer,
14235 >,
14236 {
14237 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14238 6121399674497678964,
14239 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
14240 request,
14241 ))
14242 }
14243
14244 pub fn clone(
14245 &self,
14246
14247 request: impl ::fidl_next::Encode<
14248 ::fidl_next::ServerEnd<
14249 ::fidl_next_fuchsia_unknown::Cloneable,
14250 ::fidl_next::wire::fuchsia::Channel,
14251 >,
14252 <___T as ::fidl_next::Transport>::SendBuffer,
14253 >,
14254 ) -> ::fidl_next::SendFuture<'_, ___T>
14255 where
14256 <___T as ::fidl_next::Transport>::SendBuffer:
14257 ::fidl_next::encoder::InternalHandleEncoder,
14258 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14259 {
14260 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
14261 request,
14262 })
14263 }
14264
14265 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14266 where
14267 ___R: ::fidl_next::Encode<
14268 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
14269 <___T as ::fidl_next::Transport>::SendBuffer,
14270 >,
14271 {
14272 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14273 2366825959783828089,
14274 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
14275 request,
14276 ))
14277 }
14278
14279 #[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"]
14280 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
14281 ::fidl_next::TwoWayFuture::from_untyped(
14282 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14283 6540867515453498750,
14284 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
14285 (),
14286 ),
14287 )
14288 }
14289
14290 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
14291 ::fidl_next::TwoWayFuture::from_untyped(
14292 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14293 2763219980499352582,
14294 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
14295 (),
14296 ),
14297 )
14298 }
14299
14300 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14301 pub fn deprecated_clone(
14302 &self,
14303
14304 flags: impl ::fidl_next::Encode<
14305 crate::wire::OpenFlags,
14306 <___T as ::fidl_next::Transport>::SendBuffer,
14307 >,
14308
14309 object: impl ::fidl_next::Encode<
14310 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
14311 <___T as ::fidl_next::Transport>::SendBuffer,
14312 >,
14313 ) -> ::fidl_next::SendFuture<'_, ___T>
14314 where
14315 <___T as ::fidl_next::Transport>::SendBuffer:
14316 ::fidl_next::encoder::InternalHandleEncoder,
14317 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14318 {
14319 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
14320 flags,
14321
14322 object,
14323 })
14324 }
14325
14326 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14327 pub fn deprecated_clone_with<___R>(
14328 &self,
14329 request: ___R,
14330 ) -> ::fidl_next::SendFuture<'_, ___T>
14331 where
14332 ___R: ::fidl_next::Encode<
14333 crate::wire::NodeDeprecatedCloneRequest,
14334 <___T as ::fidl_next::Transport>::SendBuffer,
14335 >,
14336 {
14337 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14338 6512600400724287855,
14339 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
14340 request,
14341 ))
14342 }
14343
14344 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14345 pub fn deprecated_get_attr(
14346 &self,
14347 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
14348 ::fidl_next::TwoWayFuture::from_untyped(
14349 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14350 8689798978500614909,
14351 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
14352 (),
14353 ),
14354 )
14355 }
14356
14357 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14358 pub fn deprecated_set_attr(
14359 &self,
14360
14361 flags: impl ::fidl_next::Encode<
14362 crate::wire::NodeAttributeFlags,
14363 <___T as ::fidl_next::Transport>::SendBuffer,
14364 >,
14365
14366 attributes: impl ::fidl_next::Encode<
14367 crate::wire::NodeAttributes,
14368 <___T as ::fidl_next::Transport>::SendBuffer,
14369 >,
14370 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14371 where
14372 <___T as ::fidl_next::Transport>::SendBuffer:
14373 ::fidl_next::encoder::InternalHandleEncoder,
14374 {
14375 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
14376 flags,
14377
14378 attributes,
14379 })
14380 }
14381
14382 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14383 pub fn deprecated_set_attr_with<___R>(
14384 &self,
14385 request: ___R,
14386 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14387 where
14388 ___R: ::fidl_next::Encode<
14389 crate::wire::NodeDeprecatedSetAttrRequest,
14390 <___T as ::fidl_next::Transport>::SendBuffer,
14391 >,
14392 {
14393 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14394 4721673413776871238,
14395 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
14396 request,
14397 ))
14398 }
14399
14400 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14401 pub fn deprecated_get_flags(
14402 &self,
14403 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
14404 ::fidl_next::TwoWayFuture::from_untyped(
14405 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14406 6595803110182632097,
14407 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
14408 (),
14409 ),
14410 )
14411 }
14412
14413 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14414 pub fn deprecated_set_flags(
14415 &self,
14416
14417 flags: impl ::fidl_next::Encode<
14418 crate::wire::OpenFlags,
14419 <___T as ::fidl_next::Transport>::SendBuffer,
14420 >,
14421 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14422 where
14423 <___T as ::fidl_next::Transport>::SendBuffer:
14424 ::fidl_next::encoder::InternalHandleEncoder,
14425 {
14426 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
14427 flags,
14428 })
14429 }
14430
14431 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14432 pub fn deprecated_set_flags_with<___R>(
14433 &self,
14434 request: ___R,
14435 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14436 where
14437 ___R: ::fidl_next::Encode<
14438 crate::wire::NodeDeprecatedSetFlagsRequest,
14439 <___T as ::fidl_next::Transport>::SendBuffer,
14440 >,
14441 {
14442 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14443 5950864159036794675,
14444 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
14445 request,
14446 ))
14447 }
14448
14449 #[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"]
14450 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
14451 ::fidl_next::TwoWayFuture::from_untyped(
14452 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14453 105530239381466147,
14454 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
14455 (),
14456 ),
14457 )
14458 }
14459
14460 #[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"]
14461 pub fn set_flags(
14462 &self,
14463
14464 flags: impl ::fidl_next::Encode<
14465 crate::wire::Flags,
14466 <___T as ::fidl_next::Transport>::SendBuffer,
14467 >,
14468 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14469 where
14470 <___T as ::fidl_next::Transport>::SendBuffer:
14471 ::fidl_next::encoder::InternalHandleEncoder,
14472 {
14473 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
14474 }
14475
14476 #[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"]
14477 pub fn set_flags_with<___R>(
14478 &self,
14479 request: ___R,
14480 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14481 where
14482 ___R: ::fidl_next::Encode<
14483 crate::wire::NodeSetFlagsRequest,
14484 <___T as ::fidl_next::Transport>::SendBuffer,
14485 >,
14486 {
14487 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14488 6172186066099445416,
14489 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
14490 request,
14491 ))
14492 }
14493
14494 #[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"]
14495 pub fn query_filesystem(
14496 &self,
14497 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
14498 ::fidl_next::TwoWayFuture::from_untyped(
14499 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14500 8013111122914313744,
14501 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
14502 (),
14503 ),
14504 )
14505 }
14506
14507 #[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"]
14508 pub fn get_attributes(
14509 &self,
14510
14511 query: impl ::fidl_next::Encode<
14512 crate::wire::NodeAttributesQuery,
14513 <___T as ::fidl_next::Transport>::SendBuffer,
14514 >,
14515 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14516 where
14517 <___T as ::fidl_next::Transport>::SendBuffer:
14518 ::fidl_next::encoder::InternalHandleEncoder,
14519 {
14520 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
14521 }
14522
14523 #[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"]
14524 pub fn get_attributes_with<___R>(
14525 &self,
14526 request: ___R,
14527 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14528 where
14529 ___R: ::fidl_next::Encode<
14530 crate::wire::NodeGetAttributesRequest,
14531 <___T as ::fidl_next::Transport>::SendBuffer,
14532 >,
14533 {
14534 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14535 4414537700416816443,
14536 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
14537 request,
14538 ))
14539 }
14540
14541 #[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"]
14542 pub fn update_attributes_with<___R>(
14543 &self,
14544 request: ___R,
14545 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
14546 where
14547 ___R: ::fidl_next::Encode<
14548 crate::wire::MutableNodeAttributes<'static>,
14549 <___T as ::fidl_next::Transport>::SendBuffer,
14550 >,
14551 {
14552 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14553 3677402239314018056,
14554 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
14555 request,
14556 ))
14557 }
14558
14559 #[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"]
14560 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
14561 ::fidl_next::TwoWayFuture::from_untyped(
14562 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14563 3196473584242777161,
14564 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
14565 (),
14566 ),
14567 )
14568 }
14569
14570 #[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"]
14571 pub fn list_extended_attributes(
14572 &self,
14573
14574 iterator: impl ::fidl_next::Encode<
14575 ::fidl_next::ServerEnd<
14576 crate::ExtendedAttributeIterator,
14577 ::fidl_next::wire::fuchsia::Channel,
14578 >,
14579 <___T as ::fidl_next::Transport>::SendBuffer,
14580 >,
14581 ) -> ::fidl_next::SendFuture<'_, ___T>
14582 where
14583 <___T as ::fidl_next::Transport>::SendBuffer:
14584 ::fidl_next::encoder::InternalHandleEncoder,
14585 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14586 {
14587 self.list_extended_attributes_with(
14588 crate::generic::NodeListExtendedAttributesRequest { iterator },
14589 )
14590 }
14591
14592 #[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"]
14593 pub fn list_extended_attributes_with<___R>(
14594 &self,
14595 request: ___R,
14596 ) -> ::fidl_next::SendFuture<'_, ___T>
14597 where
14598 ___R: ::fidl_next::Encode<
14599 crate::wire::NodeListExtendedAttributesRequest,
14600 <___T as ::fidl_next::Transport>::SendBuffer,
14601 >,
14602 {
14603 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14604 5431626189872037072,
14605 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
14606 request,
14607 ))
14608 }
14609
14610 #[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"]
14611 pub fn get_extended_attribute(
14612 &self,
14613
14614 name: impl ::fidl_next::Encode<
14615 ::fidl_next::wire::Vector<'static, u8>,
14616 <___T as ::fidl_next::Transport>::SendBuffer,
14617 >,
14618 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14619 where
14620 <___T as ::fidl_next::Transport>::SendBuffer:
14621 ::fidl_next::encoder::InternalHandleEncoder,
14622 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14623 {
14624 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
14625 name,
14626 })
14627 }
14628
14629 #[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"]
14630 pub fn get_extended_attribute_with<___R>(
14631 &self,
14632 request: ___R,
14633 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14634 where
14635 ___R: ::fidl_next::Encode<
14636 crate::wire::NodeGetExtendedAttributeRequest<'static>,
14637 <___T as ::fidl_next::Transport>::SendBuffer,
14638 >,
14639 {
14640 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14641 5043930208506967771,
14642 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14643 request,
14644 ))
14645 }
14646
14647 #[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"]
14648 pub fn set_extended_attribute(
14649 &self,
14650
14651 name: impl ::fidl_next::Encode<
14652 ::fidl_next::wire::Vector<'static, u8>,
14653 <___T as ::fidl_next::Transport>::SendBuffer,
14654 >,
14655
14656 value: impl ::fidl_next::Encode<
14657 crate::wire::ExtendedAttributeValue<'static>,
14658 <___T as ::fidl_next::Transport>::SendBuffer,
14659 >,
14660
14661 mode: impl ::fidl_next::Encode<
14662 crate::wire::SetExtendedAttributeMode,
14663 <___T as ::fidl_next::Transport>::SendBuffer,
14664 >,
14665 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14666 where
14667 <___T as ::fidl_next::Transport>::SendBuffer:
14668 ::fidl_next::encoder::InternalHandleEncoder,
14669 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14670 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14671 {
14672 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
14673 name,
14674
14675 value,
14676
14677 mode,
14678 })
14679 }
14680
14681 #[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"]
14682 pub fn set_extended_attribute_with<___R>(
14683 &self,
14684 request: ___R,
14685 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14686 where
14687 ___R: ::fidl_next::Encode<
14688 crate::wire::NodeSetExtendedAttributeRequest<'static>,
14689 <___T as ::fidl_next::Transport>::SendBuffer,
14690 >,
14691 {
14692 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14693 5374223046099989052,
14694 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14695 request,
14696 ))
14697 }
14698
14699 #[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"]
14700 pub fn remove_extended_attribute(
14701 &self,
14702
14703 name: impl ::fidl_next::Encode<
14704 ::fidl_next::wire::Vector<'static, u8>,
14705 <___T as ::fidl_next::Transport>::SendBuffer,
14706 >,
14707 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14708 where
14709 <___T as ::fidl_next::Transport>::SendBuffer:
14710 ::fidl_next::encoder::InternalHandleEncoder,
14711 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14712 {
14713 self.remove_extended_attribute_with(
14714 crate::generic::NodeRemoveExtendedAttributeRequest { name },
14715 )
14716 }
14717
14718 #[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"]
14719 pub fn remove_extended_attribute_with<___R>(
14720 &self,
14721 request: ___R,
14722 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14723 where
14724 ___R: ::fidl_next::Encode<
14725 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
14726 <___T as ::fidl_next::Transport>::SendBuffer,
14727 >,
14728 {
14729 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14730 8794297771444732717,
14731 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14732 request,
14733 ))
14734 }
14735
14736 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
14737 ::fidl_next::TwoWayFuture::from_untyped(
14738 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14739 8371117097481679347,
14740 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
14741 (),
14742 ),
14743 )
14744 }
14745 }
14746
14747 #[repr(transparent)]
14749 pub struct SymlinkServer<___T: ::fidl_next::Transport> {
14750 server: ::fidl_next::protocol::Server<___T>,
14751 }
14752
14753 impl<___T> SymlinkServer<___T>
14754 where
14755 ___T: ::fidl_next::Transport,
14756 {
14757 #[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"]
14758 pub fn on_open(
14759 &self,
14760
14761 s: impl ::fidl_next::Encode<
14762 ::fidl_next::wire::Int32,
14763 <___T as ::fidl_next::Transport>::SendBuffer,
14764 >,
14765
14766 info: impl ::fidl_next::Encode<
14767 crate::wire_optional::NodeInfoDeprecated<'static>,
14768 <___T as ::fidl_next::Transport>::SendBuffer,
14769 >,
14770 ) -> ::fidl_next::SendFuture<'_, ___T>
14771 where
14772 <___T as ::fidl_next::Transport>::SendBuffer:
14773 ::fidl_next::encoder::InternalHandleEncoder,
14774 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14775 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14776 {
14777 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
14778 }
14779
14780 #[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"]
14781
14782 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14783 where
14784 ___R: ::fidl_next::Encode<
14785 <super::OnOpen as ::fidl_next::Method>::Request,
14786 <___T as ::fidl_next::Transport>::SendBuffer,
14787 >,
14788 {
14789 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14790 9207534335756671346,
14791 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
14792 request,
14793 ))
14794 }
14795
14796 #[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"]
14797
14798 pub fn on_representation_with<___R>(
14799 &self,
14800 request: ___R,
14801 ) -> ::fidl_next::SendFuture<'_, ___T>
14802 where
14803 ___R: ::fidl_next::Encode<
14804 <super::OnRepresentation as ::fidl_next::Method>::Request,
14805 <___T as ::fidl_next::Transport>::SendBuffer,
14806 >,
14807 {
14808 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14809 6679970090861613324,
14810 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
14811 request,
14812 ))
14813 }
14814 }
14815 }
14816}
14817
14818pub trait SymlinkClientHandler<
14822 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14823 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14824>
14825{
14826 #[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"]
14827 fn on_open(
14828 &mut self,
14829
14830 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
14831 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14832
14833 #[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"]
14834 fn on_representation(
14835 &mut self,
14836
14837 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
14838 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14839
14840 fn on_unknown_interaction(
14841 &mut self,
14842 ordinal: u64,
14843 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14844 ::core::future::ready(())
14845 }
14846}
14847
14848impl<___T> SymlinkClientHandler<___T> for ::fidl_next::IgnoreEvents
14849where
14850 ___T: ::fidl_next::Transport,
14851{
14852 async fn on_open(&mut self, _: ::fidl_next::Request<symlink::OnOpen, ___T>) {}
14853
14854 async fn on_representation(
14855 &mut self,
14856
14857 _: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
14858 ) {
14859 }
14860
14861 async fn on_unknown_interaction(&mut self, _: u64) {}
14862}
14863
14864impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Symlink
14865where
14866 ___H: SymlinkClientHandler<___T> + ::core::marker::Send,
14867 ___T: ::fidl_next::Transport,
14868 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
14869 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14870 Constraint = (),
14871 >,
14872 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
14873 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14874 Constraint = (),
14875 >,
14876{
14877 async fn on_event(
14878 handler: &mut ___H,
14879 ordinal: u64,
14880 flexibility: ::fidl_next::protocol::Flexibility,
14881 body: ::fidl_next::Body<___T>,
14882 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14883 match ordinal {
14884 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
14885 Ok(decoded) => {
14886 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
14887 Ok(())
14888 }
14889 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14890 ordinal: 9207534335756671346,
14891 error,
14892 }),
14893 },
14894
14895 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
14896 Ok(decoded) => {
14897 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
14898 Ok(())
14899 }
14900 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14901 ordinal: 6679970090861613324,
14902 error,
14903 }),
14904 },
14905
14906 ordinal => {
14907 handler.on_unknown_interaction(ordinal).await;
14908 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14909 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14910 } else {
14911 Ok(())
14912 }
14913 }
14914 }
14915 }
14916}
14917
14918pub trait SymlinkServerHandler<
14922 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14923 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14924>
14925{
14926 #[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"]
14927 fn link_into(
14928 &mut self,
14929
14930 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
14931
14932 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
14933 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14934
14935 fn clone(
14936 &mut self,
14937
14938 request: ::fidl_next::Request<symlink::Clone, ___T>,
14939 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14940
14941 #[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"]
14942 fn close(
14943 &mut self,
14944
14945 responder: ::fidl_next::Responder<symlink::Close, ___T>,
14946 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14947
14948 fn query(
14949 &mut self,
14950
14951 responder: ::fidl_next::Responder<symlink::Query, ___T>,
14952 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14953
14954 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14955 fn deprecated_clone(
14956 &mut self,
14957
14958 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
14959 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14960
14961 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14962 fn deprecated_get_attr(
14963 &mut self,
14964
14965 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
14966 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14967
14968 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14969 fn deprecated_set_attr(
14970 &mut self,
14971
14972 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
14973
14974 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
14975 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14976
14977 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14978 fn deprecated_get_flags(
14979 &mut self,
14980
14981 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
14982 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14983
14984 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14985 fn deprecated_set_flags(
14986 &mut self,
14987
14988 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
14989
14990 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
14991 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14992
14993 #[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"]
14994 fn get_flags(
14995 &mut self,
14996
14997 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
14998 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14999
15000 #[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"]
15001 fn set_flags(
15002 &mut self,
15003
15004 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
15005
15006 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
15007 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15008
15009 #[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"]
15010 fn query_filesystem(
15011 &mut self,
15012
15013 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
15014 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15015
15016 #[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"]
15017 fn get_attributes(
15018 &mut self,
15019
15020 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
15021
15022 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
15023 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15024
15025 #[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"]
15026 fn update_attributes(
15027 &mut self,
15028
15029 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
15030
15031 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
15032 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15033
15034 #[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"]
15035 fn sync(
15036 &mut self,
15037
15038 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
15039 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15040
15041 #[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"]
15042 fn list_extended_attributes(
15043 &mut self,
15044
15045 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
15046 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15047
15048 #[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"]
15049 fn get_extended_attribute(
15050 &mut self,
15051
15052 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
15053
15054 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
15055 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15056
15057 #[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"]
15058 fn set_extended_attribute(
15059 &mut self,
15060
15061 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
15062
15063 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
15064 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15065
15066 #[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"]
15067 fn remove_extended_attribute(
15068 &mut self,
15069
15070 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
15071
15072 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
15073 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15074
15075 fn describe(
15076 &mut self,
15077
15078 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
15079 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15080
15081 fn on_unknown_interaction(
15082 &mut self,
15083 ordinal: u64,
15084 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15085 ::core::future::ready(())
15086 }
15087}
15088
15089impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Symlink
15090where
15091 ___H: SymlinkServerHandler<___T> + ::core::marker::Send,
15092 ___T: ::fidl_next::Transport,
15093 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
15094 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15095 Constraint = (),
15096 >,
15097 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
15098 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15099 Constraint = (),
15100 >,
15101 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
15102 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15103 Constraint = (),
15104 >,
15105 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
15106 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15107 Constraint = (),
15108 >,
15109 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
15110 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15111 Constraint = (),
15112 >,
15113 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
15114 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15115 Constraint = (),
15116 >,
15117 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
15118 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15119 Constraint = (),
15120 >,
15121 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
15122 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15123 Constraint = (),
15124 >,
15125 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
15126 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15127 Constraint = (),
15128 >,
15129 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15130 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15131 Constraint = (),
15132 >,
15133 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15134 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15135 Constraint = (),
15136 >,
15137 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15138 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15139 Constraint = (),
15140 >,
15141{
15142 async fn on_one_way(
15143 handler: &mut ___H,
15144 ordinal: u64,
15145 flexibility: ::fidl_next::protocol::Flexibility,
15146 body: ::fidl_next::Body<___T>,
15147 ) -> ::core::result::Result<
15148 (),
15149 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15150 > {
15151 match ordinal {
15152 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15153 Ok(decoded) => {
15154 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
15155 Ok(())
15156 }
15157 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15158 ordinal: 2366825959783828089,
15159 error,
15160 }),
15161 },
15162
15163 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15164 Ok(decoded) => {
15165 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
15166 Ok(())
15167 }
15168 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15169 ordinal: 6512600400724287855,
15170 error,
15171 }),
15172 },
15173
15174 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15175 Ok(decoded) => {
15176 handler
15177 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
15178 .await;
15179 Ok(())
15180 }
15181 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15182 ordinal: 5431626189872037072,
15183 error,
15184 }),
15185 },
15186
15187 ordinal => {
15188 handler.on_unknown_interaction(ordinal).await;
15189 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15190 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15191 } else {
15192 Ok(())
15193 }
15194 }
15195 }
15196 }
15197
15198 async fn on_two_way(
15199 handler: &mut ___H,
15200 ordinal: u64,
15201 flexibility: ::fidl_next::protocol::Flexibility,
15202 body: ::fidl_next::Body<___T>,
15203 responder: ::fidl_next::protocol::Responder<___T>,
15204 ) -> ::core::result::Result<
15205 (),
15206 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15207 > {
15208 match ordinal {
15209 6121399674497678964 => {
15210 let responder = ::fidl_next::Responder::from_untyped(responder);
15211
15212 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15213 Ok(decoded) => {
15214 handler
15215 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
15216 .await;
15217 Ok(())
15218 }
15219 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15220 ordinal: 6121399674497678964,
15221 error,
15222 }),
15223 }
15224 }
15225
15226 6540867515453498750 => {
15227 let responder = ::fidl_next::Responder::from_untyped(responder);
15228
15229 handler.close(responder).await;
15230 Ok(())
15231 }
15232
15233 2763219980499352582 => {
15234 let responder = ::fidl_next::Responder::from_untyped(responder);
15235
15236 handler.query(responder).await;
15237 Ok(())
15238 }
15239
15240 8689798978500614909 => {
15241 let responder = ::fidl_next::Responder::from_untyped(responder);
15242
15243 handler.deprecated_get_attr(responder).await;
15244 Ok(())
15245 }
15246
15247 4721673413776871238 => {
15248 let responder = ::fidl_next::Responder::from_untyped(responder);
15249
15250 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15251 Ok(decoded) => {
15252 handler
15253 .deprecated_set_attr(
15254 ::fidl_next::Request::from_decoded(decoded),
15255 responder,
15256 )
15257 .await;
15258 Ok(())
15259 }
15260 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15261 ordinal: 4721673413776871238,
15262 error,
15263 }),
15264 }
15265 }
15266
15267 6595803110182632097 => {
15268 let responder = ::fidl_next::Responder::from_untyped(responder);
15269
15270 handler.deprecated_get_flags(responder).await;
15271 Ok(())
15272 }
15273
15274 5950864159036794675 => {
15275 let responder = ::fidl_next::Responder::from_untyped(responder);
15276
15277 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15278 Ok(decoded) => {
15279 handler
15280 .deprecated_set_flags(
15281 ::fidl_next::Request::from_decoded(decoded),
15282 responder,
15283 )
15284 .await;
15285 Ok(())
15286 }
15287 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15288 ordinal: 5950864159036794675,
15289 error,
15290 }),
15291 }
15292 }
15293
15294 105530239381466147 => {
15295 let responder = ::fidl_next::Responder::from_untyped(responder);
15296
15297 handler.get_flags(responder).await;
15298 Ok(())
15299 }
15300
15301 6172186066099445416 => {
15302 let responder = ::fidl_next::Responder::from_untyped(responder);
15303
15304 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15305 Ok(decoded) => {
15306 handler
15307 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
15308 .await;
15309 Ok(())
15310 }
15311 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15312 ordinal: 6172186066099445416,
15313 error,
15314 }),
15315 }
15316 }
15317
15318 8013111122914313744 => {
15319 let responder = ::fidl_next::Responder::from_untyped(responder);
15320
15321 handler.query_filesystem(responder).await;
15322 Ok(())
15323 }
15324
15325 4414537700416816443 => {
15326 let responder = ::fidl_next::Responder::from_untyped(responder);
15327
15328 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15329 Ok(decoded) => {
15330 handler
15331 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
15332 .await;
15333 Ok(())
15334 }
15335 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15336 ordinal: 4414537700416816443,
15337 error,
15338 }),
15339 }
15340 }
15341
15342 3677402239314018056 => {
15343 let responder = ::fidl_next::Responder::from_untyped(responder);
15344
15345 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15346 Ok(decoded) => {
15347 handler
15348 .update_attributes(
15349 ::fidl_next::Request::from_decoded(decoded),
15350 responder,
15351 )
15352 .await;
15353 Ok(())
15354 }
15355 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15356 ordinal: 3677402239314018056,
15357 error,
15358 }),
15359 }
15360 }
15361
15362 3196473584242777161 => {
15363 let responder = ::fidl_next::Responder::from_untyped(responder);
15364
15365 handler.sync(responder).await;
15366 Ok(())
15367 }
15368
15369 5043930208506967771 => {
15370 let responder = ::fidl_next::Responder::from_untyped(responder);
15371
15372 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15373 Ok(decoded) => {
15374 handler
15375 .get_extended_attribute(
15376 ::fidl_next::Request::from_decoded(decoded),
15377 responder,
15378 )
15379 .await;
15380 Ok(())
15381 }
15382 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15383 ordinal: 5043930208506967771,
15384 error,
15385 }),
15386 }
15387 }
15388
15389 5374223046099989052 => {
15390 let responder = ::fidl_next::Responder::from_untyped(responder);
15391
15392 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15393 Ok(decoded) => {
15394 handler
15395 .set_extended_attribute(
15396 ::fidl_next::Request::from_decoded(decoded),
15397 responder,
15398 )
15399 .await;
15400 Ok(())
15401 }
15402 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15403 ordinal: 5374223046099989052,
15404 error,
15405 }),
15406 }
15407 }
15408
15409 8794297771444732717 => {
15410 let responder = ::fidl_next::Responder::from_untyped(responder);
15411
15412 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15413 Ok(decoded) => {
15414 handler
15415 .remove_extended_attribute(
15416 ::fidl_next::Request::from_decoded(decoded),
15417 responder,
15418 )
15419 .await;
15420 Ok(())
15421 }
15422 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15423 ordinal: 8794297771444732717,
15424 error,
15425 }),
15426 }
15427 }
15428
15429 8371117097481679347 => {
15430 let responder = ::fidl_next::Responder::from_untyped(responder);
15431
15432 handler.describe(responder).await;
15433 Ok(())
15434 }
15435
15436 ordinal => {
15437 handler.on_unknown_interaction(ordinal).await;
15438 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15439 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15440 } else {
15441 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
15442 ordinal,
15443 flexibility,
15444 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
15445 )
15446 .expect("encoding a framework error should never fail")
15447 .await?;
15448 Ok(())
15449 }
15450 }
15451 }
15452 }
15453}
15454
15455pub use fidl_next_common_fuchsia_io::*;