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
2425 s,
2426 token,
2427
2428 } = &mut *out_;
2429 }
2430
2431 ::fidl_next::Wire::zero_padding(s);
2432
2433 ::fidl_next::Wire::zero_padding(token);
2434 }
2435 }
2436
2437 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryGetTokenResponse
2438 where
2439 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2440 ___D: ::fidl_next::fuchsia::HandleDecoder,
2441 {
2442 fn decode(
2443 slot_: ::fidl_next::Slot<'_, Self>,
2444 decoder_: &mut ___D,
2445 _: (),
2446 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2447 ::fidl_next::munge! {
2448 let Self {
2449
2450 mut s,
2451 mut token,
2452
2453 } = slot_;
2454 }
2455
2456 let _field = s.as_mut();
2457
2458 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2459
2460 let _field = token.as_mut();
2461
2462 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
2463
2464 Ok(())
2465 }
2466 }
2467
2468 impl ::fidl_next::IntoNatural for DirectoryGetTokenResponse {
2469 type Natural = crate::natural::DirectoryGetTokenResponse;
2470 }
2471
2472 #[derive(Debug)]
2474 #[repr(C)]
2475 pub struct DirectoryLinkRequest<'de> {
2476 pub src: ::fidl_next::wire::String<'de>,
2477
2478 pub dst_parent_token: ::fidl_next::wire::fuchsia::NullableHandle,
2479
2480 pub dst: ::fidl_next::wire::String<'de>,
2481 }
2482
2483 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkRequest<'_>>(), 40);
2484 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkRequest<'_>>(), 8);
2485
2486 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, src), 0);
2487
2488 static_assertions::const_assert_eq!(
2489 std::mem::offset_of!(DirectoryLinkRequest<'_>, dst_parent_token),
2490 16
2491 );
2492
2493 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, dst), 24);
2494
2495 impl ::fidl_next::Constrained for DirectoryLinkRequest<'_> {
2496 type Constraint = ();
2497
2498 fn validate(
2499 _: ::fidl_next::Slot<'_, Self>,
2500 _: Self::Constraint,
2501 ) -> Result<(), ::fidl_next::ValidationError> {
2502 Ok(())
2503 }
2504 }
2505
2506 unsafe impl ::fidl_next::Wire for DirectoryLinkRequest<'static> {
2507 type Narrowed<'de> = DirectoryLinkRequest<'de>;
2508
2509 #[inline]
2510 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2511 ::fidl_next::munge! {
2512 let Self {
2513
2514 src,
2515 dst_parent_token,
2516 dst,
2517
2518 } = &mut *out_;
2519 }
2520
2521 ::fidl_next::Wire::zero_padding(src);
2522
2523 ::fidl_next::Wire::zero_padding(dst_parent_token);
2524
2525 ::fidl_next::Wire::zero_padding(dst);
2526
2527 unsafe {
2528 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2529 }
2530 }
2531 }
2532
2533 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryLinkRequest<'de>
2534 where
2535 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2536 ___D: ::fidl_next::Decoder<'de>,
2537 ___D: ::fidl_next::fuchsia::HandleDecoder,
2538 {
2539 fn decode(
2540 slot_: ::fidl_next::Slot<'_, Self>,
2541 decoder_: &mut ___D,
2542 _: (),
2543 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2544 if slot_.as_bytes()[20..24] != [0u8; 4] {
2545 return Err(::fidl_next::DecodeError::InvalidPadding);
2546 }
2547
2548 ::fidl_next::munge! {
2549 let Self {
2550
2551 mut src,
2552 mut dst_parent_token,
2553 mut dst,
2554
2555 } = slot_;
2556 }
2557
2558 let _field = src.as_mut();
2559 ::fidl_next::Constrained::validate(_field, 255)?;
2560 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2561
2562 let src = unsafe { src.deref_unchecked() };
2563
2564 if src.len() > 255 {
2565 return Err(::fidl_next::DecodeError::VectorTooLong {
2566 size: src.len() as u64,
2567 limit: 255,
2568 });
2569 }
2570
2571 let _field = dst_parent_token.as_mut();
2572
2573 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2574
2575 let _field = dst.as_mut();
2576 ::fidl_next::Constrained::validate(_field, 255)?;
2577 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2578
2579 let dst = unsafe { dst.deref_unchecked() };
2580
2581 if dst.len() > 255 {
2582 return Err(::fidl_next::DecodeError::VectorTooLong {
2583 size: dst.len() as u64,
2584 limit: 255,
2585 });
2586 }
2587
2588 Ok(())
2589 }
2590 }
2591
2592 impl<'de> ::fidl_next::IntoNatural for DirectoryLinkRequest<'de> {
2593 type Natural = crate::natural::DirectoryLinkRequest;
2594 }
2595
2596 pub type Token = ::fidl_next::wire::fuchsia::Event;
2598
2599 #[derive(Debug)]
2601 #[repr(C)]
2602 pub struct DirectoryRenameRequest<'de> {
2603 pub src: ::fidl_next::wire::String<'de>,
2604
2605 pub dst_parent_token: ::fidl_next::wire::fuchsia::Event,
2606
2607 pub dst: ::fidl_next::wire::String<'de>,
2608 }
2609
2610 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRenameRequest<'_>>(), 40);
2611 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRenameRequest<'_>>(), 8);
2612
2613 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, src), 0);
2614
2615 static_assertions::const_assert_eq!(
2616 std::mem::offset_of!(DirectoryRenameRequest<'_>, dst_parent_token),
2617 16
2618 );
2619
2620 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, dst), 24);
2621
2622 impl ::fidl_next::Constrained for DirectoryRenameRequest<'_> {
2623 type Constraint = ();
2624
2625 fn validate(
2626 _: ::fidl_next::Slot<'_, Self>,
2627 _: Self::Constraint,
2628 ) -> Result<(), ::fidl_next::ValidationError> {
2629 Ok(())
2630 }
2631 }
2632
2633 unsafe impl ::fidl_next::Wire for DirectoryRenameRequest<'static> {
2634 type Narrowed<'de> = DirectoryRenameRequest<'de>;
2635
2636 #[inline]
2637 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2638 ::fidl_next::munge! {
2639 let Self {
2640
2641 src,
2642 dst_parent_token,
2643 dst,
2644
2645 } = &mut *out_;
2646 }
2647
2648 ::fidl_next::Wire::zero_padding(src);
2649
2650 ::fidl_next::Wire::zero_padding(dst_parent_token);
2651
2652 ::fidl_next::Wire::zero_padding(dst);
2653
2654 unsafe {
2655 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2656 }
2657 }
2658 }
2659
2660 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryRenameRequest<'de>
2661 where
2662 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2663 ___D: ::fidl_next::Decoder<'de>,
2664 ___D: ::fidl_next::fuchsia::HandleDecoder,
2665 {
2666 fn decode(
2667 slot_: ::fidl_next::Slot<'_, Self>,
2668 decoder_: &mut ___D,
2669 _: (),
2670 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2671 if slot_.as_bytes()[20..24] != [0u8; 4] {
2672 return Err(::fidl_next::DecodeError::InvalidPadding);
2673 }
2674
2675 ::fidl_next::munge! {
2676 let Self {
2677
2678 mut src,
2679 mut dst_parent_token,
2680 mut dst,
2681
2682 } = slot_;
2683 }
2684
2685 let _field = src.as_mut();
2686 ::fidl_next::Constrained::validate(_field, 255)?;
2687 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2688
2689 let src = unsafe { src.deref_unchecked() };
2690
2691 if src.len() > 255 {
2692 return Err(::fidl_next::DecodeError::VectorTooLong {
2693 size: src.len() as u64,
2694 limit: 255,
2695 });
2696 }
2697
2698 let _field = dst_parent_token.as_mut();
2699
2700 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2701
2702 let _field = dst.as_mut();
2703 ::fidl_next::Constrained::validate(_field, 255)?;
2704 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2705
2706 let dst = unsafe { dst.deref_unchecked() };
2707
2708 if dst.len() > 255 {
2709 return Err(::fidl_next::DecodeError::VectorTooLong {
2710 size: dst.len() as u64,
2711 limit: 255,
2712 });
2713 }
2714
2715 Ok(())
2716 }
2717 }
2718
2719 impl<'de> ::fidl_next::IntoNatural for DirectoryRenameRequest<'de> {
2720 type Natural = crate::natural::DirectoryRenameRequest;
2721 }
2722
2723 #[derive(Debug)]
2725 #[repr(C)]
2726 pub struct DirectoryWatchRequest {
2727 pub mask: crate::wire::WatchMask,
2728
2729 pub options: ::fidl_next::wire::Uint32,
2730
2731 pub watcher:
2732 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::wire::fuchsia::Channel>,
2733 }
2734
2735 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchRequest>(), 12);
2736 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchRequest>(), 4);
2737
2738 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, mask), 0);
2739
2740 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, options), 4);
2741
2742 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, watcher), 8);
2743
2744 impl ::fidl_next::Constrained for DirectoryWatchRequest {
2745 type Constraint = ();
2746
2747 fn validate(
2748 _: ::fidl_next::Slot<'_, Self>,
2749 _: Self::Constraint,
2750 ) -> Result<(), ::fidl_next::ValidationError> {
2751 Ok(())
2752 }
2753 }
2754
2755 unsafe impl ::fidl_next::Wire for DirectoryWatchRequest {
2756 type Narrowed<'de> = DirectoryWatchRequest;
2757
2758 #[inline]
2759 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2760 ::fidl_next::munge! {
2761 let Self {
2762
2763 mask,
2764 options,
2765 watcher,
2766
2767 } = &mut *out_;
2768 }
2769
2770 ::fidl_next::Wire::zero_padding(mask);
2771
2772 ::fidl_next::Wire::zero_padding(options);
2773
2774 ::fidl_next::Wire::zero_padding(watcher);
2775 }
2776 }
2777
2778 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchRequest
2779 where
2780 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2781 ___D: ::fidl_next::fuchsia::HandleDecoder,
2782 {
2783 fn decode(
2784 slot_: ::fidl_next::Slot<'_, Self>,
2785 decoder_: &mut ___D,
2786 _: (),
2787 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2788 ::fidl_next::munge! {
2789 let Self {
2790
2791 mut mask,
2792 mut options,
2793 mut watcher,
2794
2795 } = slot_;
2796 }
2797
2798 let _field = mask.as_mut();
2799
2800 ::fidl_next::Decode::decode(mask.as_mut(), decoder_, ())?;
2801
2802 let _field = options.as_mut();
2803
2804 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
2805
2806 let _field = watcher.as_mut();
2807
2808 ::fidl_next::Decode::decode(watcher.as_mut(), decoder_, ())?;
2809
2810 Ok(())
2811 }
2812 }
2813
2814 impl ::fidl_next::IntoNatural for DirectoryWatchRequest {
2815 type Natural = crate::natural::DirectoryWatchRequest;
2816 }
2817
2818 #[derive(Debug)]
2820 #[repr(C)]
2821 pub struct NodeOnOpenRequest<'de> {
2822 pub s: ::fidl_next::wire::Int32,
2823
2824 pub info: crate::wire_optional::NodeInfoDeprecated<'de>,
2825 }
2826
2827 static_assertions::const_assert_eq!(std::mem::size_of::<NodeOnOpenRequest<'_>>(), 24);
2828 static_assertions::const_assert_eq!(std::mem::align_of::<NodeOnOpenRequest<'_>>(), 8);
2829
2830 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, s), 0);
2831
2832 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, info), 8);
2833
2834 impl ::fidl_next::Constrained for NodeOnOpenRequest<'_> {
2835 type Constraint = ();
2836
2837 fn validate(
2838 _: ::fidl_next::Slot<'_, Self>,
2839 _: Self::Constraint,
2840 ) -> Result<(), ::fidl_next::ValidationError> {
2841 Ok(())
2842 }
2843 }
2844
2845 unsafe impl ::fidl_next::Wire for NodeOnOpenRequest<'static> {
2846 type Narrowed<'de> = NodeOnOpenRequest<'de>;
2847
2848 #[inline]
2849 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2850 ::fidl_next::munge! {
2851 let Self {
2852
2853 s,
2854 info,
2855
2856 } = &mut *out_;
2857 }
2858
2859 ::fidl_next::Wire::zero_padding(s);
2860
2861 ::fidl_next::Wire::zero_padding(info);
2862
2863 unsafe {
2864 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2865 }
2866 }
2867 }
2868
2869 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeOnOpenRequest<'de>
2870 where
2871 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2872 ___D: ::fidl_next::Decoder<'de>,
2873 ___D: ::fidl_next::fuchsia::HandleDecoder,
2874 {
2875 fn decode(
2876 slot_: ::fidl_next::Slot<'_, Self>,
2877 decoder_: &mut ___D,
2878 _: (),
2879 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2880 if slot_.as_bytes()[4..8] != [0u8; 4] {
2881 return Err(::fidl_next::DecodeError::InvalidPadding);
2882 }
2883
2884 ::fidl_next::munge! {
2885 let Self {
2886
2887 mut s,
2888 mut info,
2889
2890 } = slot_;
2891 }
2892
2893 let _field = s.as_mut();
2894
2895 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2896
2897 let _field = info.as_mut();
2898
2899 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
2900
2901 Ok(())
2902 }
2903 }
2904
2905 impl<'de> ::fidl_next::IntoNatural for NodeOnOpenRequest<'de> {
2906 type Natural = crate::natural::NodeOnOpenRequest;
2907 }
2908
2909 #[derive(Debug)]
2911 #[repr(C)]
2912 pub struct NodeListExtendedAttributesRequest {
2913 pub iterator: ::fidl_next::ServerEnd<
2914 crate::ExtendedAttributeIterator,
2915 ::fidl_next::wire::fuchsia::Channel,
2916 >,
2917 }
2918
2919 static_assertions::const_assert_eq!(
2920 std::mem::size_of::<NodeListExtendedAttributesRequest>(),
2921 4
2922 );
2923 static_assertions::const_assert_eq!(
2924 std::mem::align_of::<NodeListExtendedAttributesRequest>(),
2925 4
2926 );
2927
2928 static_assertions::const_assert_eq!(
2929 std::mem::offset_of!(NodeListExtendedAttributesRequest, iterator),
2930 0
2931 );
2932
2933 impl ::fidl_next::Constrained for NodeListExtendedAttributesRequest {
2934 type Constraint = ();
2935
2936 fn validate(
2937 _: ::fidl_next::Slot<'_, Self>,
2938 _: Self::Constraint,
2939 ) -> Result<(), ::fidl_next::ValidationError> {
2940 Ok(())
2941 }
2942 }
2943
2944 unsafe impl ::fidl_next::Wire for NodeListExtendedAttributesRequest {
2945 type Narrowed<'de> = NodeListExtendedAttributesRequest;
2946
2947 #[inline]
2948 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2949 ::fidl_next::munge! {
2950 let Self {
2951
2952 iterator,
2953
2954 } = &mut *out_;
2955 }
2956
2957 ::fidl_next::Wire::zero_padding(iterator);
2958 }
2959 }
2960
2961 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeListExtendedAttributesRequest
2962 where
2963 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2964 ___D: ::fidl_next::fuchsia::HandleDecoder,
2965 {
2966 fn decode(
2967 slot_: ::fidl_next::Slot<'_, Self>,
2968 decoder_: &mut ___D,
2969 _: (),
2970 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2971 ::fidl_next::munge! {
2972 let Self {
2973
2974 mut iterator,
2975
2976 } = slot_;
2977 }
2978
2979 let _field = iterator.as_mut();
2980
2981 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
2982
2983 Ok(())
2984 }
2985 }
2986
2987 impl ::fidl_next::IntoNatural for NodeListExtendedAttributesRequest {
2988 type Natural = crate::natural::NodeListExtendedAttributesRequest;
2989 }
2990
2991 #[repr(transparent)]
2993 pub struct ExtendedAttributeValue<'de> {
2994 pub(crate) raw: ::fidl_next::wire::Union,
2995 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2996 }
2997
2998 impl<'de> Drop for ExtendedAttributeValue<'de> {
2999 fn drop(&mut self) {
3000 match self.raw.ordinal() {
3001 1 => {
3002 let _ = unsafe {
3003 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
3004 };
3005 }
3006
3007 2 => {
3008 let _ = unsafe {
3009 self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
3010 };
3011 }
3012
3013 _ => (),
3014 }
3015 }
3016 }
3017
3018 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
3019 type Constraint = ();
3020
3021 fn validate(
3022 _: ::fidl_next::Slot<'_, Self>,
3023 _: Self::Constraint,
3024 ) -> Result<(), ::fidl_next::ValidationError> {
3025 Ok(())
3026 }
3027 }
3028
3029 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
3030 type Narrowed<'de> = ExtendedAttributeValue<'de>;
3031
3032 #[inline]
3033 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3034 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3035 ::fidl_next::wire::Union::zero_padding(raw);
3036 }
3037 }
3038
3039 pub mod extended_attribute_value {
3040 pub enum Ref<'de> {
3041 Bytes(&'de ::fidl_next::wire::Vector<'de, u8>),
3042
3043 Buffer(&'de ::fidl_next::wire::fuchsia::Vmo),
3044
3045 UnknownOrdinal_(u64),
3046 }
3047 }
3048
3049 impl<'de> ExtendedAttributeValue<'de> {
3050 pub fn as_ref(&self) -> crate::wire::extended_attribute_value::Ref<'_> {
3051 match self.raw.ordinal() {
3052 1 => crate::wire::extended_attribute_value::Ref::Bytes(unsafe {
3053 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
3054 }),
3055
3056 2 => crate::wire::extended_attribute_value::Ref::Buffer(unsafe {
3057 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
3058 }),
3059
3060 unknown => crate::wire::extended_attribute_value::Ref::UnknownOrdinal_(unknown),
3061 }
3062 }
3063 }
3064
3065 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
3066 where
3067 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3068 ___D: ::fidl_next::Decoder<'de>,
3069 ___D: ::fidl_next::fuchsia::HandleDecoder,
3070 {
3071 fn decode(
3072 mut slot: ::fidl_next::Slot<'_, Self>,
3073 decoder: &mut ___D,
3074 _: (),
3075 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3076 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3077 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3078 1 => {
3079 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3080 raw,
3081 decoder,
3082 (32768, ()),
3083 )?
3084 }
3085
3086 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Vmo>(
3087 raw,
3088 decoder,
3089 (),
3090 )?,
3091
3092 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3093 }
3094
3095 Ok(())
3096 }
3097 }
3098
3099 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
3100 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3101 match self.raw.ordinal() {
3102 1 => unsafe {
3103 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
3104 },
3105 2 => unsafe {
3106 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>().fmt(f)
3107 },
3108 _ => unsafe { ::core::hint::unreachable_unchecked() },
3109 }
3110 }
3111 }
3112
3113 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
3114 type Natural = crate::natural::ExtendedAttributeValue;
3115 }
3116
3117 #[derive(Debug)]
3119 #[repr(C)]
3120 pub struct NodeSetExtendedAttributeRequest<'de> {
3121 pub name: ::fidl_next::wire::Vector<'de, u8>,
3122
3123 pub value: crate::wire::ExtendedAttributeValue<'de>,
3124
3125 pub mode: crate::wire::SetExtendedAttributeMode,
3126 }
3127
3128 static_assertions::const_assert_eq!(
3129 std::mem::size_of::<NodeSetExtendedAttributeRequest<'_>>(),
3130 40
3131 );
3132 static_assertions::const_assert_eq!(
3133 std::mem::align_of::<NodeSetExtendedAttributeRequest<'_>>(),
3134 8
3135 );
3136
3137 static_assertions::const_assert_eq!(
3138 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, name),
3139 0
3140 );
3141
3142 static_assertions::const_assert_eq!(
3143 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, value),
3144 16
3145 );
3146
3147 static_assertions::const_assert_eq!(
3148 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, mode),
3149 32
3150 );
3151
3152 impl ::fidl_next::Constrained for NodeSetExtendedAttributeRequest<'_> {
3153 type Constraint = ();
3154
3155 fn validate(
3156 _: ::fidl_next::Slot<'_, Self>,
3157 _: Self::Constraint,
3158 ) -> Result<(), ::fidl_next::ValidationError> {
3159 Ok(())
3160 }
3161 }
3162
3163 unsafe impl ::fidl_next::Wire for NodeSetExtendedAttributeRequest<'static> {
3164 type Narrowed<'de> = NodeSetExtendedAttributeRequest<'de>;
3165
3166 #[inline]
3167 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3168 ::fidl_next::munge! {
3169 let Self {
3170
3171 name,
3172 value,
3173 mode,
3174
3175 } = &mut *out_;
3176 }
3177
3178 ::fidl_next::Wire::zero_padding(name);
3179
3180 ::fidl_next::Wire::zero_padding(value);
3181
3182 ::fidl_next::Wire::zero_padding(mode);
3183
3184 unsafe {
3185 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3186 }
3187 }
3188 }
3189
3190 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetExtendedAttributeRequest<'de>
3191 where
3192 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3193 ___D: ::fidl_next::Decoder<'de>,
3194 ___D: ::fidl_next::fuchsia::HandleDecoder,
3195 {
3196 fn decode(
3197 slot_: ::fidl_next::Slot<'_, Self>,
3198 decoder_: &mut ___D,
3199 _: (),
3200 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3201 if slot_.as_bytes()[36..40] != [0u8; 4] {
3202 return Err(::fidl_next::DecodeError::InvalidPadding);
3203 }
3204
3205 ::fidl_next::munge! {
3206 let Self {
3207
3208 mut name,
3209 mut value,
3210 mut mode,
3211
3212 } = slot_;
3213 }
3214
3215 let _field = name.as_mut();
3216 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3217 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
3218
3219 let name = unsafe { name.deref_unchecked() };
3220
3221 if name.len() > 255 {
3222 return Err(::fidl_next::DecodeError::VectorTooLong {
3223 size: name.len() as u64,
3224 limit: 255,
3225 });
3226 }
3227
3228 let _field = value.as_mut();
3229
3230 ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
3231
3232 let _field = mode.as_mut();
3233
3234 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3235
3236 Ok(())
3237 }
3238 }
3239
3240 impl<'de> ::fidl_next::IntoNatural for NodeSetExtendedAttributeRequest<'de> {
3241 type Natural = crate::natural::NodeSetExtendedAttributeRequest;
3242 }
3243
3244 #[repr(C)]
3246 pub struct FileInfo<'de> {
3247 pub(crate) table: ::fidl_next::wire::Table<'de>,
3248 }
3249
3250 impl<'de> Drop for FileInfo<'de> {
3251 fn drop(&mut self) {
3252 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3253
3254 let _ = self.table.get(2).map(|envelope| unsafe {
3255 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
3256 });
3257
3258 let _ = self.table.get(3).map(|envelope| unsafe {
3259 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Stream>()
3260 });
3261
3262 let _ = self.table.get(4).map(|envelope| unsafe {
3263 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
3264 });
3265 }
3266 }
3267
3268 impl ::fidl_next::Constrained for FileInfo<'_> {
3269 type Constraint = ();
3270
3271 fn validate(
3272 _: ::fidl_next::Slot<'_, Self>,
3273 _: Self::Constraint,
3274 ) -> Result<(), ::fidl_next::ValidationError> {
3275 Ok(())
3276 }
3277 }
3278
3279 unsafe impl ::fidl_next::Wire for FileInfo<'static> {
3280 type Narrowed<'de> = FileInfo<'de>;
3281
3282 #[inline]
3283 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3284 ::fidl_next::munge!(let Self { table } = out);
3285 ::fidl_next::wire::Table::zero_padding(table);
3286 }
3287 }
3288
3289 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileInfo<'de>
3290 where
3291 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3292 ___D: ::fidl_next::fuchsia::HandleDecoder,
3293 {
3294 fn decode(
3295 slot: ::fidl_next::Slot<'_, Self>,
3296 decoder: &mut ___D,
3297 _: (),
3298 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3299 ::fidl_next::munge!(let Self { table } = slot);
3300
3301 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3302 match ordinal {
3303 0 => unsafe { ::core::hint::unreachable_unchecked() },
3304
3305 1 => {
3306 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3307 slot.as_mut(),
3308 decoder,
3309 (),
3310 )?;
3311
3312 Ok(())
3313 }
3314
3315 2 => {
3316 ::fidl_next::wire::Envelope::decode_as::<
3317 ___D,
3318 ::fidl_next::wire::fuchsia::Event,
3319 >(slot.as_mut(), decoder, ())?;
3320
3321 Ok(())
3322 }
3323
3324 3 => {
3325 ::fidl_next::wire::Envelope::decode_as::<
3326 ___D,
3327 ::fidl_next::wire::fuchsia::Stream,
3328 >(slot.as_mut(), decoder, ())?;
3329
3330 Ok(())
3331 }
3332
3333 4 => {
3334 ::fidl_next::wire::Envelope::decode_as::<
3335 ___D,
3336 crate::wire::NodeAttributes2<'de>,
3337 >(slot.as_mut(), decoder, ())?;
3338
3339 Ok(())
3340 }
3341
3342 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3343 }
3344 })
3345 }
3346 }
3347
3348 impl<'de> FileInfo<'de> {
3349 pub fn is_append(&self) -> ::core::option::Option<&bool> {
3350 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3351 }
3352
3353 pub fn observer(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
3354 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3355 }
3356
3357 pub fn stream(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Stream> {
3358 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3359 }
3360
3361 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
3362 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3363 }
3364 }
3365
3366 impl<'de> ::core::fmt::Debug for FileInfo<'de> {
3367 fn fmt(
3368 &self,
3369 f: &mut ::core::fmt::Formatter<'_>,
3370 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3371 f.debug_struct("FileInfo")
3372 .field("is_append", &self.is_append())
3373 .field("observer", &self.observer())
3374 .field("stream", &self.stream())
3375 .field("attributes", &self.attributes())
3376 .finish()
3377 }
3378 }
3379
3380 impl<'de> ::fidl_next::IntoNatural for FileInfo<'de> {
3381 type Natural = crate::natural::FileInfo;
3382 }
3383
3384 #[repr(transparent)]
3386 pub struct Representation<'de> {
3387 pub(crate) raw: ::fidl_next::wire::Union,
3388 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3389 }
3390
3391 impl<'de> Drop for Representation<'de> {
3392 fn drop(&mut self) {
3393 match self.raw.ordinal() {
3394 1 => {
3395 let _ =
3396 unsafe { self.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>() };
3397 }
3398
3399 2 => {
3400 let _ = unsafe {
3401 self.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
3402 };
3403 }
3404
3405 3 => {
3406 let _ =
3407 unsafe { self.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>() };
3408 }
3409
3410 4 => {
3411 let _ =
3412 unsafe { self.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>() };
3413 }
3414
3415 _ => (),
3416 }
3417 }
3418 }
3419
3420 impl ::fidl_next::Constrained for Representation<'_> {
3421 type Constraint = ();
3422
3423 fn validate(
3424 _: ::fidl_next::Slot<'_, Self>,
3425 _: Self::Constraint,
3426 ) -> Result<(), ::fidl_next::ValidationError> {
3427 Ok(())
3428 }
3429 }
3430
3431 unsafe impl ::fidl_next::Wire for Representation<'static> {
3432 type Narrowed<'de> = Representation<'de>;
3433
3434 #[inline]
3435 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3436 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3437 ::fidl_next::wire::Union::zero_padding(raw);
3438 }
3439 }
3440
3441 pub mod representation {
3442 pub enum Ref<'de> {
3443 Node(&'de crate::wire::NodeInfo<'de>),
3444
3445 Directory(&'de crate::wire::DirectoryInfo<'de>),
3446
3447 File(&'de crate::wire::FileInfo<'de>),
3448
3449 Symlink(&'de crate::wire::SymlinkInfo<'de>),
3450
3451 UnknownOrdinal_(u64),
3452 }
3453 }
3454
3455 impl<'de> Representation<'de> {
3456 pub fn as_ref(&self) -> crate::wire::representation::Ref<'_> {
3457 match self.raw.ordinal() {
3458 1 => crate::wire::representation::Ref::Node(unsafe {
3459 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>()
3460 }),
3461
3462 2 => crate::wire::representation::Ref::Directory(unsafe {
3463 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>()
3464 }),
3465
3466 3 => crate::wire::representation::Ref::File(unsafe {
3467 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>()
3468 }),
3469
3470 4 => crate::wire::representation::Ref::Symlink(unsafe {
3471 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>()
3472 }),
3473
3474 unknown => crate::wire::representation::Ref::UnknownOrdinal_(unknown),
3475 }
3476 }
3477 }
3478
3479 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
3480 where
3481 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3482 ___D: ::fidl_next::Decoder<'de>,
3483 ___D: ::fidl_next::fuchsia::HandleDecoder,
3484 {
3485 fn decode(
3486 mut slot: ::fidl_next::Slot<'_, Self>,
3487 decoder: &mut ___D,
3488 _: (),
3489 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3490 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3491 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3492 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
3493 raw,
3494 decoder,
3495 (),
3496 )?,
3497
3498 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
3499 raw,
3500 decoder,
3501 (),
3502 )?,
3503
3504 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
3505 raw,
3506 decoder,
3507 (),
3508 )?,
3509
3510 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
3511 raw,
3512 decoder,
3513 (),
3514 )?,
3515
3516 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3517 }
3518
3519 Ok(())
3520 }
3521 }
3522
3523 impl<'de> ::core::fmt::Debug for Representation<'de> {
3524 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3525 match self.raw.ordinal() {
3526 1 => unsafe {
3527 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>().fmt(f)
3528 },
3529 2 => unsafe {
3530 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>().fmt(f)
3531 },
3532 3 => unsafe {
3533 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>().fmt(f)
3534 },
3535 4 => unsafe {
3536 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>().fmt(f)
3537 },
3538 _ => unsafe { ::core::hint::unreachable_unchecked() },
3539 }
3540 }
3541 }
3542
3543 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
3544 type Natural = crate::natural::Representation;
3545 }
3546
3547 #[derive(Debug)]
3549 #[repr(C)]
3550 pub struct DirectoryOpenRequest<'de> {
3551 pub path: ::fidl_next::wire::String<'de>,
3552
3553 pub flags: crate::wire::Flags,
3554
3555 pub options: crate::wire::Options<'de>,
3556
3557 pub object: ::fidl_next::wire::fuchsia::Channel,
3558 }
3559
3560 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryOpenRequest<'_>>(), 48);
3561 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryOpenRequest<'_>>(), 8);
3562
3563 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, path), 0);
3564
3565 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, flags), 16);
3566
3567 static_assertions::const_assert_eq!(
3568 std::mem::offset_of!(DirectoryOpenRequest<'_>, options),
3569 24
3570 );
3571
3572 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, object), 40);
3573
3574 impl ::fidl_next::Constrained for DirectoryOpenRequest<'_> {
3575 type Constraint = ();
3576
3577 fn validate(
3578 _: ::fidl_next::Slot<'_, Self>,
3579 _: Self::Constraint,
3580 ) -> Result<(), ::fidl_next::ValidationError> {
3581 Ok(())
3582 }
3583 }
3584
3585 unsafe impl ::fidl_next::Wire for DirectoryOpenRequest<'static> {
3586 type Narrowed<'de> = DirectoryOpenRequest<'de>;
3587
3588 #[inline]
3589 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3590 ::fidl_next::munge! {
3591 let Self {
3592
3593 path,
3594 flags,
3595 options,
3596 object,
3597
3598 } = &mut *out_;
3599 }
3600
3601 ::fidl_next::Wire::zero_padding(path);
3602
3603 ::fidl_next::Wire::zero_padding(flags);
3604
3605 ::fidl_next::Wire::zero_padding(options);
3606
3607 ::fidl_next::Wire::zero_padding(object);
3608
3609 unsafe {
3610 out_.as_mut_ptr().cast::<u8>().add(44).write_bytes(0, 4);
3611 }
3612 }
3613 }
3614
3615 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryOpenRequest<'de>
3616 where
3617 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3618 ___D: ::fidl_next::Decoder<'de>,
3619 ___D: ::fidl_next::fuchsia::HandleDecoder,
3620 {
3621 fn decode(
3622 slot_: ::fidl_next::Slot<'_, Self>,
3623 decoder_: &mut ___D,
3624 _: (),
3625 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3626 if slot_.as_bytes()[44..48] != [0u8; 4] {
3627 return Err(::fidl_next::DecodeError::InvalidPadding);
3628 }
3629
3630 ::fidl_next::munge! {
3631 let Self {
3632
3633 mut path,
3634 mut flags,
3635 mut options,
3636 mut object,
3637
3638 } = slot_;
3639 }
3640
3641 let _field = path.as_mut();
3642 ::fidl_next::Constrained::validate(_field, 4095)?;
3643 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3644
3645 let path = unsafe { path.deref_unchecked() };
3646
3647 if path.len() > 4095 {
3648 return Err(::fidl_next::DecodeError::VectorTooLong {
3649 size: path.len() as u64,
3650 limit: 4095,
3651 });
3652 }
3653
3654 let _field = flags.as_mut();
3655
3656 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3657
3658 let _field = options.as_mut();
3659
3660 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
3661
3662 let _field = object.as_mut();
3663
3664 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3665
3666 Ok(())
3667 }
3668 }
3669
3670 impl<'de> ::fidl_next::IntoNatural for DirectoryOpenRequest<'de> {
3671 type Natural = crate::natural::DirectoryOpenRequest;
3672 }
3673
3674 #[derive(Debug)]
3676 #[repr(C)]
3677 pub struct NodeDeprecatedCloneRequest {
3678 pub flags: crate::wire::OpenFlags,
3679
3680 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
3681 }
3682
3683 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedCloneRequest>(), 8);
3684 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedCloneRequest>(), 4);
3685
3686 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedCloneRequest, flags), 0);
3687
3688 static_assertions::const_assert_eq!(
3689 std::mem::offset_of!(NodeDeprecatedCloneRequest, object),
3690 4
3691 );
3692
3693 impl ::fidl_next::Constrained for NodeDeprecatedCloneRequest {
3694 type Constraint = ();
3695
3696 fn validate(
3697 _: ::fidl_next::Slot<'_, Self>,
3698 _: Self::Constraint,
3699 ) -> Result<(), ::fidl_next::ValidationError> {
3700 Ok(())
3701 }
3702 }
3703
3704 unsafe impl ::fidl_next::Wire for NodeDeprecatedCloneRequest {
3705 type Narrowed<'de> = NodeDeprecatedCloneRequest;
3706
3707 #[inline]
3708 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3709 ::fidl_next::munge! {
3710 let Self {
3711
3712 flags,
3713 object,
3714
3715 } = &mut *out_;
3716 }
3717
3718 ::fidl_next::Wire::zero_padding(flags);
3719
3720 ::fidl_next::Wire::zero_padding(object);
3721 }
3722 }
3723
3724 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedCloneRequest
3725 where
3726 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3727 ___D: ::fidl_next::fuchsia::HandleDecoder,
3728 {
3729 fn decode(
3730 slot_: ::fidl_next::Slot<'_, Self>,
3731 decoder_: &mut ___D,
3732 _: (),
3733 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3734 ::fidl_next::munge! {
3735 let Self {
3736
3737 mut flags,
3738 mut object,
3739
3740 } = slot_;
3741 }
3742
3743 let _field = flags.as_mut();
3744
3745 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3746
3747 let _field = object.as_mut();
3748
3749 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3750
3751 Ok(())
3752 }
3753 }
3754
3755 impl ::fidl_next::IntoNatural for NodeDeprecatedCloneRequest {
3756 type Natural = crate::natural::NodeDeprecatedCloneRequest;
3757 }
3758
3759 #[derive(Debug)]
3761 #[repr(C)]
3762 pub struct DirectoryDeprecatedOpenRequest<'de> {
3763 pub flags: crate::wire::OpenFlags,
3764
3765 pub mode: crate::wire::ModeType,
3766
3767 pub path: ::fidl_next::wire::String<'de>,
3768
3769 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
3770 }
3771
3772 static_assertions::const_assert_eq!(
3773 std::mem::size_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3774 32
3775 );
3776 static_assertions::const_assert_eq!(
3777 std::mem::align_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3778 8
3779 );
3780
3781 static_assertions::const_assert_eq!(
3782 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, flags),
3783 0
3784 );
3785
3786 static_assertions::const_assert_eq!(
3787 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, mode),
3788 4
3789 );
3790
3791 static_assertions::const_assert_eq!(
3792 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, path),
3793 8
3794 );
3795
3796 static_assertions::const_assert_eq!(
3797 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, object),
3798 24
3799 );
3800
3801 impl ::fidl_next::Constrained for DirectoryDeprecatedOpenRequest<'_> {
3802 type Constraint = ();
3803
3804 fn validate(
3805 _: ::fidl_next::Slot<'_, Self>,
3806 _: Self::Constraint,
3807 ) -> Result<(), ::fidl_next::ValidationError> {
3808 Ok(())
3809 }
3810 }
3811
3812 unsafe impl ::fidl_next::Wire for DirectoryDeprecatedOpenRequest<'static> {
3813 type Narrowed<'de> = DirectoryDeprecatedOpenRequest<'de>;
3814
3815 #[inline]
3816 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3817 ::fidl_next::munge! {
3818 let Self {
3819
3820 flags,
3821 mode,
3822 path,
3823 object,
3824
3825 } = &mut *out_;
3826 }
3827
3828 ::fidl_next::Wire::zero_padding(flags);
3829
3830 ::fidl_next::Wire::zero_padding(mode);
3831
3832 ::fidl_next::Wire::zero_padding(path);
3833
3834 ::fidl_next::Wire::zero_padding(object);
3835
3836 unsafe {
3837 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
3838 }
3839 }
3840 }
3841
3842 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryDeprecatedOpenRequest<'de>
3843 where
3844 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3845 ___D: ::fidl_next::Decoder<'de>,
3846 ___D: ::fidl_next::fuchsia::HandleDecoder,
3847 {
3848 fn decode(
3849 slot_: ::fidl_next::Slot<'_, Self>,
3850 decoder_: &mut ___D,
3851 _: (),
3852 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3853 if slot_.as_bytes()[28..32] != [0u8; 4] {
3854 return Err(::fidl_next::DecodeError::InvalidPadding);
3855 }
3856
3857 ::fidl_next::munge! {
3858 let Self {
3859
3860 mut flags,
3861 mut mode,
3862 mut path,
3863 mut object,
3864
3865 } = slot_;
3866 }
3867
3868 let _field = flags.as_mut();
3869
3870 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3871
3872 let _field = mode.as_mut();
3873
3874 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3875
3876 let _field = path.as_mut();
3877 ::fidl_next::Constrained::validate(_field, 4095)?;
3878 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3879
3880 let path = unsafe { path.deref_unchecked() };
3881
3882 if path.len() > 4095 {
3883 return Err(::fidl_next::DecodeError::VectorTooLong {
3884 size: path.len() as u64,
3885 limit: 4095,
3886 });
3887 }
3888
3889 let _field = object.as_mut();
3890
3891 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3892
3893 Ok(())
3894 }
3895 }
3896
3897 impl<'de> ::fidl_next::IntoNatural for DirectoryDeprecatedOpenRequest<'de> {
3898 type Natural = crate::natural::DirectoryDeprecatedOpenRequest;
3899 }
3900
3901 #[derive(Debug)]
3903 #[repr(C)]
3904 pub struct DirectoryCreateSymlinkRequest<'de> {
3905 pub name: ::fidl_next::wire::String<'de>,
3906
3907 pub target: ::fidl_next::wire::Vector<'de, u8>,
3908
3909 pub connection:
3910 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
3911 }
3912
3913 static_assertions::const_assert_eq!(
3914 std::mem::size_of::<DirectoryCreateSymlinkRequest<'_>>(),
3915 40
3916 );
3917 static_assertions::const_assert_eq!(
3918 std::mem::align_of::<DirectoryCreateSymlinkRequest<'_>>(),
3919 8
3920 );
3921
3922 static_assertions::const_assert_eq!(
3923 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, name),
3924 0
3925 );
3926
3927 static_assertions::const_assert_eq!(
3928 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, target),
3929 16
3930 );
3931
3932 static_assertions::const_assert_eq!(
3933 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, connection),
3934 32
3935 );
3936
3937 impl ::fidl_next::Constrained for DirectoryCreateSymlinkRequest<'_> {
3938 type Constraint = ();
3939
3940 fn validate(
3941 _: ::fidl_next::Slot<'_, Self>,
3942 _: Self::Constraint,
3943 ) -> Result<(), ::fidl_next::ValidationError> {
3944 Ok(())
3945 }
3946 }
3947
3948 unsafe impl ::fidl_next::Wire for DirectoryCreateSymlinkRequest<'static> {
3949 type Narrowed<'de> = DirectoryCreateSymlinkRequest<'de>;
3950
3951 #[inline]
3952 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3953 ::fidl_next::munge! {
3954 let Self {
3955
3956 name,
3957 target,
3958 connection,
3959
3960 } = &mut *out_;
3961 }
3962
3963 ::fidl_next::Wire::zero_padding(name);
3964
3965 ::fidl_next::Wire::zero_padding(target);
3966
3967 ::fidl_next::Wire::zero_padding(connection);
3968
3969 unsafe {
3970 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3971 }
3972 }
3973 }
3974
3975 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryCreateSymlinkRequest<'de>
3976 where
3977 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3978 ___D: ::fidl_next::Decoder<'de>,
3979 ___D: ::fidl_next::fuchsia::HandleDecoder,
3980 {
3981 fn decode(
3982 slot_: ::fidl_next::Slot<'_, Self>,
3983 decoder_: &mut ___D,
3984 _: (),
3985 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3986 if slot_.as_bytes()[36..40] != [0u8; 4] {
3987 return Err(::fidl_next::DecodeError::InvalidPadding);
3988 }
3989
3990 ::fidl_next::munge! {
3991 let Self {
3992
3993 mut name,
3994 mut target,
3995 mut connection,
3996
3997 } = slot_;
3998 }
3999
4000 let _field = name.as_mut();
4001 ::fidl_next::Constrained::validate(_field, 255)?;
4002 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
4003
4004 let name = unsafe { name.deref_unchecked() };
4005
4006 if name.len() > 255 {
4007 return Err(::fidl_next::DecodeError::VectorTooLong {
4008 size: name.len() as u64,
4009 limit: 255,
4010 });
4011 }
4012
4013 let _field = target.as_mut();
4014 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
4015 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
4016
4017 let target = unsafe { target.deref_unchecked() };
4018
4019 if target.len() > 4095 {
4020 return Err(::fidl_next::DecodeError::VectorTooLong {
4021 size: target.len() as u64,
4022 limit: 4095,
4023 });
4024 }
4025
4026 let _field = connection.as_mut();
4027
4028 ::fidl_next::Decode::decode(connection.as_mut(), decoder_, ())?;
4029
4030 Ok(())
4031 }
4032 }
4033
4034 impl<'de> ::fidl_next::IntoNatural for DirectoryCreateSymlinkRequest<'de> {
4035 type Natural = crate::natural::DirectoryCreateSymlinkRequest;
4036 }
4037
4038 #[derive(Debug)]
4040 #[repr(C)]
4041 pub struct FileGetBackingMemoryResponse {
4042 pub vmo: ::fidl_next::wire::fuchsia::Vmo,
4043 }
4044
4045 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryResponse>(), 4);
4046 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryResponse>(), 4);
4047
4048 static_assertions::const_assert_eq!(std::mem::offset_of!(FileGetBackingMemoryResponse, vmo), 0);
4049
4050 impl ::fidl_next::Constrained for FileGetBackingMemoryResponse {
4051 type Constraint = ();
4052
4053 fn validate(
4054 _: ::fidl_next::Slot<'_, Self>,
4055 _: Self::Constraint,
4056 ) -> Result<(), ::fidl_next::ValidationError> {
4057 Ok(())
4058 }
4059 }
4060
4061 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryResponse {
4062 type Narrowed<'de> = FileGetBackingMemoryResponse;
4063
4064 #[inline]
4065 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4066 ::fidl_next::munge! {
4067 let Self {
4068
4069 vmo,
4070
4071 } = &mut *out_;
4072 }
4073
4074 ::fidl_next::Wire::zero_padding(vmo);
4075 }
4076 }
4077
4078 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryResponse
4079 where
4080 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4081 ___D: ::fidl_next::fuchsia::HandleDecoder,
4082 {
4083 fn decode(
4084 slot_: ::fidl_next::Slot<'_, Self>,
4085 decoder_: &mut ___D,
4086 _: (),
4087 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4088 ::fidl_next::munge! {
4089 let Self {
4090
4091 mut vmo,
4092
4093 } = slot_;
4094 }
4095
4096 let _field = vmo.as_mut();
4097
4098 ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
4099
4100 Ok(())
4101 }
4102 }
4103
4104 impl ::fidl_next::IntoNatural for FileGetBackingMemoryResponse {
4105 type Natural = crate::natural::FileGetBackingMemoryResponse;
4106 }
4107
4108 #[derive(Debug)]
4110 #[repr(C)]
4111 pub struct LinkableLinkIntoRequest<'de> {
4112 pub dst_parent_token: ::fidl_next::wire::fuchsia::Event,
4113
4114 pub dst: ::fidl_next::wire::String<'de>,
4115 }
4116
4117 static_assertions::const_assert_eq!(std::mem::size_of::<LinkableLinkIntoRequest<'_>>(), 24);
4118 static_assertions::const_assert_eq!(std::mem::align_of::<LinkableLinkIntoRequest<'_>>(), 8);
4119
4120 static_assertions::const_assert_eq!(
4121 std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst_parent_token),
4122 0
4123 );
4124
4125 static_assertions::const_assert_eq!(std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst), 8);
4126
4127 impl ::fidl_next::Constrained for LinkableLinkIntoRequest<'_> {
4128 type Constraint = ();
4129
4130 fn validate(
4131 _: ::fidl_next::Slot<'_, Self>,
4132 _: Self::Constraint,
4133 ) -> Result<(), ::fidl_next::ValidationError> {
4134 Ok(())
4135 }
4136 }
4137
4138 unsafe impl ::fidl_next::Wire for LinkableLinkIntoRequest<'static> {
4139 type Narrowed<'de> = LinkableLinkIntoRequest<'de>;
4140
4141 #[inline]
4142 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4143 ::fidl_next::munge! {
4144 let Self {
4145
4146 dst_parent_token,
4147 dst,
4148
4149 } = &mut *out_;
4150 }
4151
4152 ::fidl_next::Wire::zero_padding(dst_parent_token);
4153
4154 ::fidl_next::Wire::zero_padding(dst);
4155
4156 unsafe {
4157 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
4158 }
4159 }
4160 }
4161
4162 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LinkableLinkIntoRequest<'de>
4163 where
4164 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4165 ___D: ::fidl_next::Decoder<'de>,
4166 ___D: ::fidl_next::fuchsia::HandleDecoder,
4167 {
4168 fn decode(
4169 slot_: ::fidl_next::Slot<'_, Self>,
4170 decoder_: &mut ___D,
4171 _: (),
4172 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4173 if slot_.as_bytes()[4..8] != [0u8; 4] {
4174 return Err(::fidl_next::DecodeError::InvalidPadding);
4175 }
4176
4177 ::fidl_next::munge! {
4178 let Self {
4179
4180 mut dst_parent_token,
4181 mut dst,
4182
4183 } = slot_;
4184 }
4185
4186 let _field = dst_parent_token.as_mut();
4187
4188 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
4189
4190 let _field = dst.as_mut();
4191 ::fidl_next::Constrained::validate(_field, 255)?;
4192 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
4193
4194 let dst = unsafe { dst.deref_unchecked() };
4195
4196 if dst.len() > 255 {
4197 return Err(::fidl_next::DecodeError::VectorTooLong {
4198 size: dst.len() as u64,
4199 limit: 255,
4200 });
4201 }
4202
4203 Ok(())
4204 }
4205 }
4206
4207 impl<'de> ::fidl_next::IntoNatural for LinkableLinkIntoRequest<'de> {
4208 type Natural = crate::natural::LinkableLinkIntoRequest;
4209 }
4210
4211 #[derive(Debug)]
4213 #[repr(C)]
4214 pub struct FileAllocateRequest {
4215 pub offset: ::fidl_next::wire::Uint64,
4216
4217 pub length: ::fidl_next::wire::Uint64,
4218
4219 pub mode: crate::wire::AllocateMode,
4220 }
4221
4222 static_assertions::const_assert_eq!(std::mem::size_of::<FileAllocateRequest>(), 24);
4223 static_assertions::const_assert_eq!(std::mem::align_of::<FileAllocateRequest>(), 8);
4224
4225 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, offset), 0);
4226
4227 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, length), 8);
4228
4229 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, mode), 16);
4230
4231 impl ::fidl_next::Constrained for FileAllocateRequest {
4232 type Constraint = ();
4233
4234 fn validate(
4235 _: ::fidl_next::Slot<'_, Self>,
4236 _: Self::Constraint,
4237 ) -> Result<(), ::fidl_next::ValidationError> {
4238 Ok(())
4239 }
4240 }
4241
4242 unsafe impl ::fidl_next::Wire for FileAllocateRequest {
4243 type Narrowed<'de> = FileAllocateRequest;
4244
4245 #[inline]
4246 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4247 ::fidl_next::munge! {
4248 let Self {
4249
4250 offset,
4251 length,
4252 mode,
4253
4254 } = &mut *out_;
4255 }
4256
4257 ::fidl_next::Wire::zero_padding(offset);
4258
4259 ::fidl_next::Wire::zero_padding(length);
4260
4261 ::fidl_next::Wire::zero_padding(mode);
4262
4263 unsafe {
4264 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4265 }
4266 }
4267 }
4268
4269 unsafe impl<___D> ::fidl_next::Decode<___D> for FileAllocateRequest
4270 where
4271 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4272 ___D: ::fidl_next::fuchsia::HandleDecoder,
4273 {
4274 fn decode(
4275 slot_: ::fidl_next::Slot<'_, Self>,
4276 decoder_: &mut ___D,
4277 _: (),
4278 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4279 if slot_.as_bytes()[20..24] != [0u8; 4] {
4280 return Err(::fidl_next::DecodeError::InvalidPadding);
4281 }
4282
4283 ::fidl_next::munge! {
4284 let Self {
4285
4286 mut offset,
4287 mut length,
4288 mut mode,
4289
4290 } = slot_;
4291 }
4292
4293 let _field = offset.as_mut();
4294
4295 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
4296
4297 let _field = length.as_mut();
4298
4299 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
4300
4301 let _field = mode.as_mut();
4302
4303 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
4304
4305 Ok(())
4306 }
4307 }
4308
4309 impl ::fidl_next::IntoNatural for FileAllocateRequest {
4310 type Natural = crate::natural::FileAllocateRequest;
4311 }
4312
4313 #[derive(Debug)]
4315 #[repr(C)]
4316 pub struct FileEnableVerityRequest<'de> {
4317 pub options: crate::wire::VerificationOptions<'de>,
4318 }
4319
4320 static_assertions::const_assert_eq!(std::mem::size_of::<FileEnableVerityRequest<'_>>(), 16);
4321 static_assertions::const_assert_eq!(std::mem::align_of::<FileEnableVerityRequest<'_>>(), 8);
4322
4323 static_assertions::const_assert_eq!(
4324 std::mem::offset_of!(FileEnableVerityRequest<'_>, options),
4325 0
4326 );
4327
4328 impl ::fidl_next::Constrained for FileEnableVerityRequest<'_> {
4329 type Constraint = ();
4330
4331 fn validate(
4332 _: ::fidl_next::Slot<'_, Self>,
4333 _: Self::Constraint,
4334 ) -> Result<(), ::fidl_next::ValidationError> {
4335 Ok(())
4336 }
4337 }
4338
4339 unsafe impl ::fidl_next::Wire for FileEnableVerityRequest<'static> {
4340 type Narrowed<'de> = FileEnableVerityRequest<'de>;
4341
4342 #[inline]
4343 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4344 ::fidl_next::munge! {
4345 let Self {
4346
4347 options,
4348
4349 } = &mut *out_;
4350 }
4351
4352 ::fidl_next::Wire::zero_padding(options);
4353 }
4354 }
4355
4356 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileEnableVerityRequest<'de>
4357 where
4358 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4359 ___D: ::fidl_next::Decoder<'de>,
4360 ___D: ::fidl_next::fuchsia::HandleDecoder,
4361 {
4362 fn decode(
4363 slot_: ::fidl_next::Slot<'_, Self>,
4364 decoder_: &mut ___D,
4365 _: (),
4366 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4367 ::fidl_next::munge! {
4368 let Self {
4369
4370 mut options,
4371
4372 } = slot_;
4373 }
4374
4375 let _field = options.as_mut();
4376
4377 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
4378
4379 Ok(())
4380 }
4381 }
4382
4383 impl<'de> ::fidl_next::IntoNatural for FileEnableVerityRequest<'de> {
4384 type Natural = crate::natural::FileEnableVerityRequest;
4385 }
4386
4387 #[derive(Debug)]
4389 #[repr(C)]
4390 pub struct FileObject {
4391 pub event: ::fidl_next::wire::fuchsia::OptionalEvent,
4392
4393 pub stream: ::fidl_next::wire::fuchsia::OptionalStream,
4394 }
4395
4396 static_assertions::const_assert_eq!(std::mem::size_of::<FileObject>(), 8);
4397 static_assertions::const_assert_eq!(std::mem::align_of::<FileObject>(), 4);
4398
4399 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, event), 0);
4400
4401 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, stream), 4);
4402
4403 impl ::fidl_next::Constrained for FileObject {
4404 type Constraint = ();
4405
4406 fn validate(
4407 _: ::fidl_next::Slot<'_, Self>,
4408 _: Self::Constraint,
4409 ) -> Result<(), ::fidl_next::ValidationError> {
4410 Ok(())
4411 }
4412 }
4413
4414 unsafe impl ::fidl_next::Wire for FileObject {
4415 type Narrowed<'de> = FileObject;
4416
4417 #[inline]
4418 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4419 ::fidl_next::munge! {
4420 let Self {
4421
4422 event,
4423 stream,
4424
4425 } = &mut *out_;
4426 }
4427
4428 ::fidl_next::Wire::zero_padding(event);
4429
4430 ::fidl_next::Wire::zero_padding(stream);
4431 }
4432 }
4433
4434 unsafe impl<___D> ::fidl_next::Decode<___D> for FileObject
4435 where
4436 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4437 ___D: ::fidl_next::fuchsia::HandleDecoder,
4438 {
4439 fn decode(
4440 slot_: ::fidl_next::Slot<'_, Self>,
4441 decoder_: &mut ___D,
4442 _: (),
4443 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4444 ::fidl_next::munge! {
4445 let Self {
4446
4447 mut event,
4448 mut stream,
4449
4450 } = slot_;
4451 }
4452
4453 let _field = event.as_mut();
4454
4455 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
4456
4457 let _field = stream.as_mut();
4458
4459 ::fidl_next::Decode::decode(stream.as_mut(), decoder_, ())?;
4460
4461 Ok(())
4462 }
4463 }
4464
4465 impl ::fidl_next::IntoNatural for FileObject {
4466 type Natural = crate::natural::FileObject;
4467 }
4468
4469 #[repr(transparent)]
4471 pub struct NodeInfoDeprecated<'de> {
4472 pub(crate) raw: ::fidl_next::wire::Union,
4473 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4474 }
4475
4476 impl<'de> Drop for NodeInfoDeprecated<'de> {
4477 fn drop(&mut self) {
4478 match self.raw.ordinal() {
4479 1 => {
4480 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Service>() };
4481 }
4482
4483 2 => {
4484 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::FileObject>() };
4485 }
4486
4487 3 => {
4488 let _ =
4489 unsafe { self.raw.get().read_unchecked::<crate::wire::DirectoryObject>() };
4490 }
4491
4492 4 => {
4493 let _ = unsafe {
4494 self.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4495 };
4496 }
4497
4498 _ => unsafe { ::core::hint::unreachable_unchecked() },
4499 }
4500 }
4501 }
4502
4503 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4504 type Constraint = ();
4505
4506 fn validate(
4507 _: ::fidl_next::Slot<'_, Self>,
4508 _: Self::Constraint,
4509 ) -> Result<(), ::fidl_next::ValidationError> {
4510 Ok(())
4511 }
4512 }
4513
4514 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4515 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4516
4517 #[inline]
4518 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4519 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4520 ::fidl_next::wire::Union::zero_padding(raw);
4521 }
4522 }
4523
4524 pub mod node_info_deprecated {
4525 pub enum Ref<'de> {
4526 Service(&'de crate::wire::Service),
4527
4528 File(&'de crate::wire::FileObject),
4529
4530 Directory(&'de crate::wire::DirectoryObject),
4531
4532 Symlink(&'de crate::wire::SymlinkObject<'de>),
4533 }
4534 }
4535
4536 impl<'de> NodeInfoDeprecated<'de> {
4537 pub fn as_ref(&self) -> crate::wire::node_info_deprecated::Ref<'_> {
4538 match self.raw.ordinal() {
4539 1 => crate::wire::node_info_deprecated::Ref::Service(unsafe {
4540 self.raw.get().deref_unchecked::<crate::wire::Service>()
4541 }),
4542
4543 2 => crate::wire::node_info_deprecated::Ref::File(unsafe {
4544 self.raw.get().deref_unchecked::<crate::wire::FileObject>()
4545 }),
4546
4547 3 => crate::wire::node_info_deprecated::Ref::Directory(unsafe {
4548 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>()
4549 }),
4550
4551 4 => crate::wire::node_info_deprecated::Ref::Symlink(unsafe {
4552 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>()
4553 }),
4554
4555 _ => unsafe { ::core::hint::unreachable_unchecked() },
4556 }
4557 }
4558 }
4559
4560 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4561 where
4562 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4563 ___D: ::fidl_next::Decoder<'de>,
4564 ___D: ::fidl_next::fuchsia::HandleDecoder,
4565 {
4566 fn decode(
4567 mut slot: ::fidl_next::Slot<'_, Self>,
4568 decoder: &mut ___D,
4569 _: (),
4570 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4571 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4572 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4573 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4574 raw,
4575 decoder,
4576 (),
4577 )?,
4578
4579 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4580 raw,
4581 decoder,
4582 (),
4583 )?,
4584
4585 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4586 raw,
4587 decoder,
4588 (),
4589 )?,
4590
4591 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4592 raw,
4593 decoder,
4594 (),
4595 )?,
4596
4597 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
4598 }
4599
4600 Ok(())
4601 }
4602 }
4603
4604 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4605 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4606 match self.raw.ordinal() {
4607 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Service>().fmt(f) },
4608 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::FileObject>().fmt(f) },
4609 3 => unsafe {
4610 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>().fmt(f)
4611 },
4612 4 => unsafe {
4613 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>().fmt(f)
4614 },
4615 _ => unsafe { ::core::hint::unreachable_unchecked() },
4616 }
4617 }
4618 }
4619
4620 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4621 type Natural = crate::natural::NodeInfoDeprecated;
4622 }
4623}
4624
4625pub mod wire_optional {
4626
4627 pub use fidl_next_common_fuchsia_io::wire_optional::*;
4628
4629 #[repr(transparent)]
4630 pub struct ExtendedAttributeValue<'de> {
4631 pub(crate) raw: ::fidl_next::wire::Union,
4632 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4633 }
4634
4635 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
4636 type Constraint = ();
4637
4638 fn validate(
4639 _: ::fidl_next::Slot<'_, Self>,
4640 _: Self::Constraint,
4641 ) -> Result<(), ::fidl_next::ValidationError> {
4642 Ok(())
4643 }
4644 }
4645
4646 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
4647 type Narrowed<'de> = ExtendedAttributeValue<'de>;
4648
4649 #[inline]
4650 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4651 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4652 ::fidl_next::wire::Union::zero_padding(raw);
4653 }
4654 }
4655
4656 impl<'de> ExtendedAttributeValue<'de> {
4657 pub fn is_some(&self) -> bool {
4658 self.raw.is_some()
4659 }
4660
4661 pub fn is_none(&self) -> bool {
4662 self.raw.is_none()
4663 }
4664
4665 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ExtendedAttributeValue<'de>> {
4666 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4667 }
4668
4669 pub fn into_option(
4670 self,
4671 ) -> ::core::option::Option<crate::wire::ExtendedAttributeValue<'de>> {
4672 if self.is_some() {
4673 Some(crate::wire::ExtendedAttributeValue {
4674 raw: self.raw,
4675 _phantom: ::core::marker::PhantomData,
4676 })
4677 } else {
4678 None
4679 }
4680 }
4681 }
4682
4683 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
4684 where
4685 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4686 ___D: ::fidl_next::Decoder<'de>,
4687 ___D: ::fidl_next::fuchsia::HandleDecoder,
4688 {
4689 fn decode(
4690 mut slot: ::fidl_next::Slot<'_, Self>,
4691 decoder: &mut ___D,
4692 _: (),
4693 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4694 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4695 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4696 1 => {
4697 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
4698 raw,
4699 decoder,
4700 (32768, ()),
4701 )?
4702 }
4703
4704 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Vmo>(
4705 raw,
4706 decoder,
4707 (),
4708 )?,
4709
4710 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4711 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4712 }
4713
4714 Ok(())
4715 }
4716 }
4717
4718 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
4719 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4720 self.as_ref().fmt(f)
4721 }
4722 }
4723
4724 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
4725 type Natural = ::core::option::Option<crate::natural::ExtendedAttributeValue>;
4726 }
4727
4728 #[repr(transparent)]
4729 pub struct Representation<'de> {
4730 pub(crate) raw: ::fidl_next::wire::Union,
4731 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4732 }
4733
4734 impl ::fidl_next::Constrained for Representation<'_> {
4735 type Constraint = ();
4736
4737 fn validate(
4738 _: ::fidl_next::Slot<'_, Self>,
4739 _: Self::Constraint,
4740 ) -> Result<(), ::fidl_next::ValidationError> {
4741 Ok(())
4742 }
4743 }
4744
4745 unsafe impl ::fidl_next::Wire for Representation<'static> {
4746 type Narrowed<'de> = Representation<'de>;
4747
4748 #[inline]
4749 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4750 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4751 ::fidl_next::wire::Union::zero_padding(raw);
4752 }
4753 }
4754
4755 impl<'de> Representation<'de> {
4756 pub fn is_some(&self) -> bool {
4757 self.raw.is_some()
4758 }
4759
4760 pub fn is_none(&self) -> bool {
4761 self.raw.is_none()
4762 }
4763
4764 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Representation<'de>> {
4765 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4766 }
4767
4768 pub fn into_option(self) -> ::core::option::Option<crate::wire::Representation<'de>> {
4769 if self.is_some() {
4770 Some(crate::wire::Representation {
4771 raw: self.raw,
4772 _phantom: ::core::marker::PhantomData,
4773 })
4774 } else {
4775 None
4776 }
4777 }
4778 }
4779
4780 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
4781 where
4782 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4783 ___D: ::fidl_next::Decoder<'de>,
4784 ___D: ::fidl_next::fuchsia::HandleDecoder,
4785 {
4786 fn decode(
4787 mut slot: ::fidl_next::Slot<'_, Self>,
4788 decoder: &mut ___D,
4789 _: (),
4790 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4791 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4792 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4793 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
4794 raw,
4795 decoder,
4796 (),
4797 )?,
4798
4799 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
4800 raw,
4801 decoder,
4802 (),
4803 )?,
4804
4805 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
4806 raw,
4807 decoder,
4808 (),
4809 )?,
4810
4811 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
4812 raw,
4813 decoder,
4814 (),
4815 )?,
4816
4817 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4818 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4819 }
4820
4821 Ok(())
4822 }
4823 }
4824
4825 impl<'de> ::core::fmt::Debug for Representation<'de> {
4826 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4827 self.as_ref().fmt(f)
4828 }
4829 }
4830
4831 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
4832 type Natural = ::core::option::Option<crate::natural::Representation>;
4833 }
4834
4835 #[repr(transparent)]
4836 pub struct NodeInfoDeprecated<'de> {
4837 pub(crate) raw: ::fidl_next::wire::Union,
4838 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4839 }
4840
4841 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4842 type Constraint = ();
4843
4844 fn validate(
4845 _: ::fidl_next::Slot<'_, Self>,
4846 _: Self::Constraint,
4847 ) -> Result<(), ::fidl_next::ValidationError> {
4848 Ok(())
4849 }
4850 }
4851
4852 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4853 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4854
4855 #[inline]
4856 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4857 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4858 ::fidl_next::wire::Union::zero_padding(raw);
4859 }
4860 }
4861
4862 impl<'de> NodeInfoDeprecated<'de> {
4863 pub fn is_some(&self) -> bool {
4864 self.raw.is_some()
4865 }
4866
4867 pub fn is_none(&self) -> bool {
4868 self.raw.is_none()
4869 }
4870
4871 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::NodeInfoDeprecated<'de>> {
4872 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4873 }
4874
4875 pub fn into_option(self) -> ::core::option::Option<crate::wire::NodeInfoDeprecated<'de>> {
4876 if self.is_some() {
4877 Some(crate::wire::NodeInfoDeprecated {
4878 raw: self.raw,
4879 _phantom: ::core::marker::PhantomData,
4880 })
4881 } else {
4882 None
4883 }
4884 }
4885 }
4886
4887 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4888 where
4889 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4890 ___D: ::fidl_next::Decoder<'de>,
4891 ___D: ::fidl_next::fuchsia::HandleDecoder,
4892 {
4893 fn decode(
4894 mut slot: ::fidl_next::Slot<'_, Self>,
4895 decoder: &mut ___D,
4896 _: (),
4897 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4898 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4899 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4900 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4901 raw,
4902 decoder,
4903 (),
4904 )?,
4905
4906 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4907 raw,
4908 decoder,
4909 (),
4910 )?,
4911
4912 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4913 raw,
4914 decoder,
4915 (),
4916 )?,
4917
4918 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4919 raw,
4920 decoder,
4921 (),
4922 )?,
4923
4924 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4925 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4926 }
4927
4928 Ok(())
4929 }
4930 }
4931
4932 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4933 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4934 self.as_ref().fmt(f)
4935 }
4936 }
4937
4938 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4939 type Natural = ::core::option::Option<crate::natural::NodeInfoDeprecated>;
4940 }
4941}
4942
4943pub mod generic {
4944
4945 pub use fidl_next_common_fuchsia_io::generic::*;
4946
4947 pub struct DirectoryGetTokenResponse<T0, T1> {
4948 pub s: T0,
4949
4950 pub token: T1,
4951 }
4952
4953 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>
4954 for DirectoryGetTokenResponse<T0, T1>
4955 where
4956 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4957 ___E: ::fidl_next::fuchsia::HandleEncoder,
4958 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
4959 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
4960 {
4961 #[inline]
4962 fn encode(
4963 self,
4964 encoder_: &mut ___E,
4965 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryGetTokenResponse>,
4966 _: (),
4967 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4968 ::fidl_next::munge! {
4969 let crate::wire::DirectoryGetTokenResponse {
4970
4971 s,
4972 token,
4973
4974 } = out_;
4975 }
4976
4977 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4978
4979 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
4980
4981 Ok(())
4982 }
4983 }
4984
4985 pub struct DirectoryLinkRequest<T0, T1, T2> {
4986 pub src: T0,
4987
4988 pub dst_parent_token: T1,
4989
4990 pub dst: T2,
4991 }
4992
4993 unsafe impl<___E, T0, T1, T2>
4994 ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
4995 for DirectoryLinkRequest<T0, T1, T2>
4996 where
4997 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4998 ___E: ::fidl_next::Encoder,
4999 ___E: ::fidl_next::fuchsia::HandleEncoder,
5000 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5001 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
5002 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5003 {
5004 #[inline]
5005 fn encode(
5006 self,
5007 encoder_: &mut ___E,
5008 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
5009 _: (),
5010 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5011 ::fidl_next::munge! {
5012 let crate::wire::DirectoryLinkRequest {
5013
5014 src,
5015 dst_parent_token,
5016 dst,
5017
5018 } = out_;
5019 }
5020
5021 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5022
5023 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5024
5025 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5026
5027 Ok(())
5028 }
5029 }
5030
5031 pub struct DirectoryRenameRequest<T0, T1, T2> {
5032 pub src: T0,
5033
5034 pub dst_parent_token: T1,
5035
5036 pub dst: T2,
5037 }
5038
5039 unsafe impl<___E, T0, T1, T2>
5040 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
5041 for DirectoryRenameRequest<T0, T1, T2>
5042 where
5043 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5044 ___E: ::fidl_next::Encoder,
5045 ___E: ::fidl_next::fuchsia::HandleEncoder,
5046 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5047 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5048 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5049 {
5050 #[inline]
5051 fn encode(
5052 self,
5053 encoder_: &mut ___E,
5054 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
5055 _: (),
5056 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5057 ::fidl_next::munge! {
5058 let crate::wire::DirectoryRenameRequest {
5059
5060 src,
5061 dst_parent_token,
5062 dst,
5063
5064 } = out_;
5065 }
5066
5067 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5068
5069 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5070
5071 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5072
5073 Ok(())
5074 }
5075 }
5076
5077 pub struct DirectoryWatchRequest<T0, T1, T2> {
5078 pub mask: T0,
5079
5080 pub options: T1,
5081
5082 pub watcher: T2,
5083 }
5084
5085 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
5086 for DirectoryWatchRequest<T0, T1, T2>
5087 where
5088 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5089 ___E: ::fidl_next::fuchsia::HandleEncoder,
5090 T0: ::fidl_next::Encode<crate::wire::WatchMask, ___E>,
5091 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5092 T2: ::fidl_next::Encode<
5093 ::fidl_next::ServerEnd<
5094 crate::DirectoryWatcher,
5095 ::fidl_next::wire::fuchsia::Channel,
5096 >,
5097 ___E,
5098 >,
5099 {
5100 #[inline]
5101 fn encode(
5102 self,
5103 encoder_: &mut ___E,
5104 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
5105 _: (),
5106 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5107 ::fidl_next::munge! {
5108 let crate::wire::DirectoryWatchRequest {
5109
5110 mask,
5111 options,
5112 watcher,
5113
5114 } = out_;
5115 }
5116
5117 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
5118
5119 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5120
5121 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
5122
5123 Ok(())
5124 }
5125 }
5126
5127 pub struct NodeOnOpenRequest<T0, T1> {
5128 pub s: T0,
5129
5130 pub info: T1,
5131 }
5132
5133 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
5134 for NodeOnOpenRequest<T0, T1>
5135 where
5136 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5137 ___E: ::fidl_next::Encoder,
5138 ___E: ::fidl_next::fuchsia::HandleEncoder,
5139 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5140 T1: ::fidl_next::Encode<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>,
5141 {
5142 #[inline]
5143 fn encode(
5144 self,
5145 encoder_: &mut ___E,
5146 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
5147 _: (),
5148 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5149 ::fidl_next::munge! {
5150 let crate::wire::NodeOnOpenRequest {
5151
5152 s,
5153 info,
5154
5155 } = out_;
5156 }
5157
5158 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5159
5160 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
5161
5162 Ok(())
5163 }
5164 }
5165
5166 pub struct NodeListExtendedAttributesRequest<T0> {
5167 pub iterator: T0,
5168 }
5169
5170 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
5171 for NodeListExtendedAttributesRequest<T0>
5172 where
5173 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5174 ___E: ::fidl_next::fuchsia::HandleEncoder,
5175 T0: ::fidl_next::Encode<
5176 ::fidl_next::ServerEnd<
5177 crate::ExtendedAttributeIterator,
5178 ::fidl_next::wire::fuchsia::Channel,
5179 >,
5180 ___E,
5181 >,
5182 {
5183 #[inline]
5184 fn encode(
5185 self,
5186 encoder_: &mut ___E,
5187 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
5188 _: (),
5189 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5190 ::fidl_next::munge! {
5191 let crate::wire::NodeListExtendedAttributesRequest {
5192
5193 iterator,
5194
5195 } = out_;
5196 }
5197
5198 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
5199
5200 Ok(())
5201 }
5202 }
5203
5204 pub struct NodeSetExtendedAttributeRequest<T0, T1, T2> {
5205 pub name: T0,
5206
5207 pub value: T1,
5208
5209 pub mode: T2,
5210 }
5211
5212 unsafe impl<___E, T0, T1, T2>
5213 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
5214 for NodeSetExtendedAttributeRequest<T0, T1, T2>
5215 where
5216 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5217 ___E: ::fidl_next::Encoder,
5218 ___E: ::fidl_next::fuchsia::HandleEncoder,
5219 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5220 T1: ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
5221 T2: ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>,
5222 {
5223 #[inline]
5224 fn encode(
5225 self,
5226 encoder_: &mut ___E,
5227 out_: &mut ::core::mem::MaybeUninit<
5228 crate::wire::NodeSetExtendedAttributeRequest<'static>,
5229 >,
5230 _: (),
5231 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5232 ::fidl_next::munge! {
5233 let crate::wire::NodeSetExtendedAttributeRequest {
5234
5235 name,
5236 value,
5237 mode,
5238
5239 } = out_;
5240 }
5241
5242 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
5243
5244 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
5245
5246 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5247
5248 Ok(())
5249 }
5250 }
5251
5252 pub struct DirectoryOpenRequest<T0, T1, T2, T3> {
5253 pub path: T0,
5254
5255 pub flags: T1,
5256
5257 pub options: T2,
5258
5259 pub object: T3,
5260 }
5261
5262 unsafe impl<___E, T0, T1, T2, T3>
5263 ::fidl_next::Encode<crate::wire::DirectoryOpenRequest<'static>, ___E>
5264 for DirectoryOpenRequest<T0, T1, T2, T3>
5265 where
5266 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5267 ___E: ::fidl_next::Encoder,
5268 ___E: ::fidl_next::fuchsia::HandleEncoder,
5269 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5270 T1: ::fidl_next::Encode<crate::wire::Flags, ___E>,
5271 T2: ::fidl_next::Encode<crate::wire::Options<'static>, ___E>,
5272 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
5273 {
5274 #[inline]
5275 fn encode(
5276 self,
5277 encoder_: &mut ___E,
5278 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryOpenRequest<'static>>,
5279 _: (),
5280 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5281 ::fidl_next::munge! {
5282 let crate::wire::DirectoryOpenRequest {
5283
5284 path,
5285 flags,
5286 options,
5287 object,
5288
5289 } = out_;
5290 }
5291
5292 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5293
5294 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5295
5296 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5297
5298 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5299
5300 Ok(())
5301 }
5302 }
5303
5304 pub struct NodeDeprecatedCloneRequest<T0, T1> {
5305 pub flags: T0,
5306
5307 pub object: T1,
5308 }
5309
5310 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
5311 for NodeDeprecatedCloneRequest<T0, T1>
5312 where
5313 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5314 ___E: ::fidl_next::fuchsia::HandleEncoder,
5315 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5316 T1: ::fidl_next::Encode<
5317 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5318 ___E,
5319 >,
5320 {
5321 #[inline]
5322 fn encode(
5323 self,
5324 encoder_: &mut ___E,
5325 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
5326 _: (),
5327 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5328 ::fidl_next::munge! {
5329 let crate::wire::NodeDeprecatedCloneRequest {
5330
5331 flags,
5332 object,
5333
5334 } = out_;
5335 }
5336
5337 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5338
5339 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5340
5341 Ok(())
5342 }
5343 }
5344
5345 pub struct DirectoryDeprecatedOpenRequest<T0, T1, T2, T3> {
5346 pub flags: T0,
5347
5348 pub mode: T1,
5349
5350 pub path: T2,
5351
5352 pub object: T3,
5353 }
5354
5355 unsafe impl<___E, T0, T1, T2, T3>
5356 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
5357 for DirectoryDeprecatedOpenRequest<T0, T1, T2, T3>
5358 where
5359 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5360 ___E: ::fidl_next::Encoder,
5361 ___E: ::fidl_next::fuchsia::HandleEncoder,
5362 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5363 T1: ::fidl_next::Encode<crate::wire::ModeType, ___E>,
5364 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5365 T3: ::fidl_next::Encode<
5366 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5367 ___E,
5368 >,
5369 {
5370 #[inline]
5371 fn encode(
5372 self,
5373 encoder_: &mut ___E,
5374 out_: &mut ::core::mem::MaybeUninit<
5375 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
5376 >,
5377 _: (),
5378 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5379 ::fidl_next::munge! {
5380 let crate::wire::DirectoryDeprecatedOpenRequest {
5381
5382 flags,
5383 mode,
5384 path,
5385 object,
5386
5387 } = out_;
5388 }
5389
5390 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5391
5392 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5393
5394 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5395
5396 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5397
5398 Ok(())
5399 }
5400 }
5401
5402 pub struct DirectoryCreateSymlinkRequest<T0, T1, T2> {
5403 pub name: T0,
5404
5405 pub target: T1,
5406
5407 pub connection: T2,
5408 }
5409
5410 unsafe impl<___E, T0, T1, T2>
5411 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
5412 for DirectoryCreateSymlinkRequest<T0, T1, T2>
5413 where
5414 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5415 ___E: ::fidl_next::Encoder,
5416 ___E: ::fidl_next::fuchsia::HandleEncoder,
5417 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5418 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5419 T2: ::fidl_next::Encode<
5420 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
5421 ___E,
5422 >,
5423 {
5424 #[inline]
5425 fn encode(
5426 self,
5427 encoder_: &mut ___E,
5428 out_: &mut ::core::mem::MaybeUninit<
5429 crate::wire::DirectoryCreateSymlinkRequest<'static>,
5430 >,
5431 _: (),
5432 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5433 ::fidl_next::munge! {
5434 let crate::wire::DirectoryCreateSymlinkRequest {
5435
5436 name,
5437 target,
5438 connection,
5439
5440 } = out_;
5441 }
5442
5443 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
5444
5445 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
5446
5447 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
5448
5449 Ok(())
5450 }
5451 }
5452
5453 pub struct FileGetBackingMemoryResponse<T0> {
5454 pub vmo: T0,
5455 }
5456
5457 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
5458 for FileGetBackingMemoryResponse<T0>
5459 where
5460 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5461 ___E: ::fidl_next::fuchsia::HandleEncoder,
5462 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
5463 {
5464 #[inline]
5465 fn encode(
5466 self,
5467 encoder_: &mut ___E,
5468 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
5469 _: (),
5470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5471 ::fidl_next::munge! {
5472 let crate::wire::FileGetBackingMemoryResponse {
5473
5474 vmo,
5475
5476 } = out_;
5477 }
5478
5479 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
5480
5481 Ok(())
5482 }
5483 }
5484
5485 pub struct LinkableLinkIntoRequest<T0, T1> {
5486 pub dst_parent_token: T0,
5487
5488 pub dst: T1,
5489 }
5490
5491 unsafe impl<___E, T0, T1>
5492 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
5493 for LinkableLinkIntoRequest<T0, T1>
5494 where
5495 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5496 ___E: ::fidl_next::Encoder,
5497 ___E: ::fidl_next::fuchsia::HandleEncoder,
5498 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5499 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5500 {
5501 #[inline]
5502 fn encode(
5503 self,
5504 encoder_: &mut ___E,
5505 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
5506 _: (),
5507 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5508 ::fidl_next::munge! {
5509 let crate::wire::LinkableLinkIntoRequest {
5510
5511 dst_parent_token,
5512 dst,
5513
5514 } = out_;
5515 }
5516
5517 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5518
5519 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5520
5521 Ok(())
5522 }
5523 }
5524
5525 pub struct FileAllocateRequest<T0, T1, T2> {
5526 pub offset: T0,
5527
5528 pub length: T1,
5529
5530 pub mode: T2,
5531 }
5532
5533 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
5534 for FileAllocateRequest<T0, T1, T2>
5535 where
5536 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5537 ___E: ::fidl_next::fuchsia::HandleEncoder,
5538 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5539 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5540 T2: ::fidl_next::Encode<crate::wire::AllocateMode, ___E>,
5541 {
5542 #[inline]
5543 fn encode(
5544 self,
5545 encoder_: &mut ___E,
5546 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
5547 _: (),
5548 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5549 ::fidl_next::munge! {
5550 let crate::wire::FileAllocateRequest {
5551
5552 offset,
5553 length,
5554 mode,
5555
5556 } = out_;
5557 }
5558
5559 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
5560
5561 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
5562
5563 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5564
5565 Ok(())
5566 }
5567 }
5568
5569 pub struct FileEnableVerityRequest<T0> {
5570 pub options: T0,
5571 }
5572
5573 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
5574 for FileEnableVerityRequest<T0>
5575 where
5576 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5577 ___E: ::fidl_next::Encoder,
5578 ___E: ::fidl_next::fuchsia::HandleEncoder,
5579 T0: ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>,
5580 {
5581 #[inline]
5582 fn encode(
5583 self,
5584 encoder_: &mut ___E,
5585 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
5586 _: (),
5587 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5588 ::fidl_next::munge! {
5589 let crate::wire::FileEnableVerityRequest {
5590
5591 options,
5592
5593 } = out_;
5594 }
5595
5596 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5597
5598 Ok(())
5599 }
5600 }
5601
5602 pub struct FileObject<T0, T1> {
5603 pub event: T0,
5604
5605 pub stream: T1,
5606 }
5607
5608 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject<T0, T1>
5609 where
5610 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5611 ___E: ::fidl_next::fuchsia::HandleEncoder,
5612 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
5613 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalStream, ___E>,
5614 {
5615 #[inline]
5616 fn encode(
5617 self,
5618 encoder_: &mut ___E,
5619 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
5620 _: (),
5621 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5622 ::fidl_next::munge! {
5623 let crate::wire::FileObject {
5624
5625 event,
5626 stream,
5627
5628 } = out_;
5629 }
5630
5631 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
5632
5633 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
5634
5635 Ok(())
5636 }
5637 }
5638}
5639
5640pub use self::natural::*;
5641
5642#[doc = " Node defines the minimal interface for entities which can be accessed in a filesystem.\n"]
5644#[derive(PartialEq, Debug)]
5645pub struct Node;
5646
5647impl ::fidl_next::Discoverable for Node {
5648 const PROTOCOL_NAME: &'static str = "fuchsia.io.Node";
5649}
5650
5651#[cfg(target_os = "fuchsia")]
5652impl ::fidl_next::HasTransport for Node {
5653 type Transport = ::fidl_next::fuchsia::zx::Channel;
5654}
5655
5656pub mod node {
5657 pub mod prelude {
5658 pub use crate::{Node, NodeClientHandler, NodeServerHandler, node};
5659
5660 pub use crate::natural::ExtendedAttributeValue;
5661
5662 pub use crate::natural::MutableNodeAttributes;
5663
5664 pub use crate::natural::NodeAttributes2;
5665
5666 pub use crate::natural::NodeDeprecatedCloneRequest;
5667
5668 pub use crate::natural::NodeDeprecatedGetAttrResponse;
5669
5670 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
5671
5672 pub use crate::natural::NodeDeprecatedSetAttrRequest;
5673
5674 pub use crate::natural::NodeDeprecatedSetAttrResponse;
5675
5676 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
5677
5678 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
5679
5680 pub use crate::natural::NodeGetAttributesRequest;
5681
5682 pub use crate::natural::NodeGetExtendedAttributeRequest;
5683
5684 pub use crate::natural::NodeListExtendedAttributesRequest;
5685
5686 pub use crate::natural::NodeOnOpenRequest;
5687
5688 pub use crate::natural::NodeQueryFilesystemResponse;
5689
5690 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
5691
5692 pub use crate::natural::NodeSetExtendedAttributeRequest;
5693
5694 pub use crate::natural::NodeSetFlagsRequest;
5695
5696 pub use crate::natural::NodeGetFlagsResponse;
5697
5698 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
5699
5700 pub use crate::natural::NodeSetExtendedAttributeResponse;
5701
5702 pub use crate::natural::NodeSetFlagsResponse;
5703
5704 pub use crate::natural::NodeSyncResponse;
5705
5706 pub use crate::natural::NodeUpdateAttributesResponse;
5707
5708 pub use crate::natural::Representation;
5709
5710 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
5711
5712 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
5713
5714 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
5715 }
5716
5717 pub struct Clone;
5718
5719 impl ::fidl_next::Method for Clone {
5720 const ORDINAL: u64 = 2366825959783828089;
5721 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5722 ::fidl_next::protocol::Flexibility::Strict;
5723
5724 type Protocol = crate::Node;
5725
5726 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
5727 }
5728
5729 pub struct Close;
5730
5731 impl ::fidl_next::Method for Close {
5732 const ORDINAL: u64 = 6540867515453498750;
5733 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5734 ::fidl_next::protocol::Flexibility::Strict;
5735
5736 type Protocol = crate::Node;
5737
5738 type Request = ();
5739 }
5740
5741 impl ::fidl_next::TwoWayMethod for Close {
5742 type Response = ::fidl_next::wire::Result<
5743 'static,
5744 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
5745 ::fidl_next::wire::Int32,
5746 >;
5747 }
5748
5749 impl<___R> ::fidl_next::Respond<___R> for Close {
5750 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
5751
5752 fn respond(response: ___R) -> Self::Output {
5753 ::core::result::Result::Ok(response)
5754 }
5755 }
5756
5757 impl<___R> ::fidl_next::RespondErr<___R> for Close {
5758 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
5759
5760 fn respond_err(response: ___R) -> Self::Output {
5761 ::core::result::Result::Err(response)
5762 }
5763 }
5764
5765 pub struct Query;
5766
5767 impl ::fidl_next::Method for Query {
5768 const ORDINAL: u64 = 2763219980499352582;
5769 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5770 ::fidl_next::protocol::Flexibility::Strict;
5771
5772 type Protocol = crate::Node;
5773
5774 type Request = ();
5775 }
5776
5777 impl ::fidl_next::TwoWayMethod for Query {
5778 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
5779 }
5780
5781 impl<___R> ::fidl_next::Respond<___R> for Query {
5782 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
5783
5784 fn respond(response: ___R) -> Self::Output {
5785 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
5786 }
5787 }
5788
5789 pub struct DeprecatedClone;
5790
5791 impl ::fidl_next::Method for DeprecatedClone {
5792 const ORDINAL: u64 = 6512600400724287855;
5793 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5794 ::fidl_next::protocol::Flexibility::Flexible;
5795
5796 type Protocol = crate::Node;
5797
5798 type Request = crate::wire::NodeDeprecatedCloneRequest;
5799 }
5800
5801 pub struct OnOpen;
5802
5803 impl ::fidl_next::Method for OnOpen {
5804 const ORDINAL: u64 = 9207534335756671346;
5805 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5806 ::fidl_next::protocol::Flexibility::Flexible;
5807
5808 type Protocol = crate::Node;
5809
5810 type Request = crate::wire::NodeOnOpenRequest<'static>;
5811 }
5812
5813 pub struct DeprecatedGetAttr;
5814
5815 impl ::fidl_next::Method for DeprecatedGetAttr {
5816 const ORDINAL: u64 = 8689798978500614909;
5817 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5818 ::fidl_next::protocol::Flexibility::Strict;
5819
5820 type Protocol = crate::Node;
5821
5822 type Request = ();
5823 }
5824
5825 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
5826 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
5827 }
5828
5829 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
5830 type Output = ___R;
5831
5832 fn respond(response: ___R) -> Self::Output {
5833 response
5834 }
5835 }
5836
5837 pub struct DeprecatedSetAttr;
5838
5839 impl ::fidl_next::Method for DeprecatedSetAttr {
5840 const ORDINAL: u64 = 4721673413776871238;
5841 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5842 ::fidl_next::protocol::Flexibility::Strict;
5843
5844 type Protocol = crate::Node;
5845
5846 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
5847 }
5848
5849 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
5850 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
5851 }
5852
5853 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
5854 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
5855
5856 fn respond(response: ___R) -> Self::Output {
5857 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
5858 }
5859 }
5860
5861 pub struct DeprecatedGetFlags;
5862
5863 impl ::fidl_next::Method for DeprecatedGetFlags {
5864 const ORDINAL: u64 = 6595803110182632097;
5865 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5866 ::fidl_next::protocol::Flexibility::Strict;
5867
5868 type Protocol = crate::Node;
5869
5870 type Request = ();
5871 }
5872
5873 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
5874 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
5875 }
5876
5877 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
5878 type Output = ___R;
5879
5880 fn respond(response: ___R) -> Self::Output {
5881 response
5882 }
5883 }
5884
5885 pub struct DeprecatedSetFlags;
5886
5887 impl ::fidl_next::Method for DeprecatedSetFlags {
5888 const ORDINAL: u64 = 5950864159036794675;
5889 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5890 ::fidl_next::protocol::Flexibility::Strict;
5891
5892 type Protocol = crate::Node;
5893
5894 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
5895 }
5896
5897 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
5898 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
5899 }
5900
5901 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
5902 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
5903
5904 fn respond(response: ___R) -> Self::Output {
5905 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
5906 }
5907 }
5908
5909 pub struct GetFlags;
5910
5911 impl ::fidl_next::Method for GetFlags {
5912 const ORDINAL: u64 = 105530239381466147;
5913 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5914 ::fidl_next::protocol::Flexibility::Flexible;
5915
5916 type Protocol = crate::Node;
5917
5918 type Request = ();
5919 }
5920
5921 impl ::fidl_next::TwoWayMethod for GetFlags {
5922 type Response = ::fidl_next::wire::FlexibleResult<
5923 'static,
5924 crate::wire::NodeGetFlagsResponse,
5925 ::fidl_next::wire::Int32,
5926 >;
5927 }
5928
5929 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
5930 type Output = ::fidl_next::FlexibleResult<
5931 crate::generic::NodeGetFlagsResponse<___R>,
5932 ::fidl_next::util::Never,
5933 >;
5934
5935 fn respond(response: ___R) -> Self::Output {
5936 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
5937 flags: response,
5938 })
5939 }
5940 }
5941
5942 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
5943 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
5944
5945 fn respond_err(response: ___R) -> Self::Output {
5946 ::fidl_next::FlexibleResult::Err(response)
5947 }
5948 }
5949
5950 pub struct SetFlags;
5951
5952 impl ::fidl_next::Method for SetFlags {
5953 const ORDINAL: u64 = 6172186066099445416;
5954 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5955 ::fidl_next::protocol::Flexibility::Flexible;
5956
5957 type Protocol = crate::Node;
5958
5959 type Request = crate::wire::NodeSetFlagsRequest;
5960 }
5961
5962 impl ::fidl_next::TwoWayMethod for SetFlags {
5963 type Response = ::fidl_next::wire::FlexibleResult<
5964 'static,
5965 crate::wire::NodeSetFlagsResponse,
5966 ::fidl_next::wire::Int32,
5967 >;
5968 }
5969
5970 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
5971 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
5972
5973 fn respond(response: ___R) -> Self::Output {
5974 ::fidl_next::FlexibleResult::Ok(response)
5975 }
5976 }
5977
5978 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
5979 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
5980
5981 fn respond_err(response: ___R) -> Self::Output {
5982 ::fidl_next::FlexibleResult::Err(response)
5983 }
5984 }
5985
5986 pub struct QueryFilesystem;
5987
5988 impl ::fidl_next::Method for QueryFilesystem {
5989 const ORDINAL: u64 = 8013111122914313744;
5990 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5991 ::fidl_next::protocol::Flexibility::Strict;
5992
5993 type Protocol = crate::Node;
5994
5995 type Request = ();
5996 }
5997
5998 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
5999 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
6000 }
6001
6002 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
6003 type Output = ___R;
6004
6005 fn respond(response: ___R) -> Self::Output {
6006 response
6007 }
6008 }
6009
6010 pub struct OnRepresentation;
6011
6012 impl ::fidl_next::Method for OnRepresentation {
6013 const ORDINAL: u64 = 6679970090861613324;
6014 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6015 ::fidl_next::protocol::Flexibility::Strict;
6016
6017 type Protocol = crate::Node;
6018
6019 type Request = crate::wire::Representation<'static>;
6020 }
6021
6022 pub struct GetAttributes;
6023
6024 impl ::fidl_next::Method for GetAttributes {
6025 const ORDINAL: u64 = 4414537700416816443;
6026 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6027 ::fidl_next::protocol::Flexibility::Strict;
6028
6029 type Protocol = crate::Node;
6030
6031 type Request = crate::wire::NodeGetAttributesRequest;
6032 }
6033
6034 impl ::fidl_next::TwoWayMethod for GetAttributes {
6035 type Response = ::fidl_next::wire::Result<
6036 'static,
6037 crate::wire::NodeAttributes2<'static>,
6038 ::fidl_next::wire::Int32,
6039 >;
6040 }
6041
6042 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
6043 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6044
6045 fn respond(response: ___R) -> Self::Output {
6046 ::core::result::Result::Ok(response)
6047 }
6048 }
6049
6050 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
6051 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6052
6053 fn respond_err(response: ___R) -> Self::Output {
6054 ::core::result::Result::Err(response)
6055 }
6056 }
6057
6058 pub struct UpdateAttributes;
6059
6060 impl ::fidl_next::Method for UpdateAttributes {
6061 const ORDINAL: u64 = 3677402239314018056;
6062 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6063 ::fidl_next::protocol::Flexibility::Strict;
6064
6065 type Protocol = crate::Node;
6066
6067 type Request = crate::wire::MutableNodeAttributes<'static>;
6068 }
6069
6070 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
6071 type Response = ::fidl_next::wire::Result<
6072 'static,
6073 crate::wire::NodeUpdateAttributesResponse,
6074 ::fidl_next::wire::Int32,
6075 >;
6076 }
6077
6078 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
6079 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6080
6081 fn respond(response: ___R) -> Self::Output {
6082 ::core::result::Result::Ok(response)
6083 }
6084 }
6085
6086 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
6087 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6088
6089 fn respond_err(response: ___R) -> Self::Output {
6090 ::core::result::Result::Err(response)
6091 }
6092 }
6093
6094 pub struct Sync;
6095
6096 impl ::fidl_next::Method for Sync {
6097 const ORDINAL: u64 = 3196473584242777161;
6098 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6099 ::fidl_next::protocol::Flexibility::Strict;
6100
6101 type Protocol = crate::Node;
6102
6103 type Request = ();
6104 }
6105
6106 impl ::fidl_next::TwoWayMethod for Sync {
6107 type Response = ::fidl_next::wire::Result<
6108 'static,
6109 crate::wire::NodeSyncResponse,
6110 ::fidl_next::wire::Int32,
6111 >;
6112 }
6113
6114 impl<___R> ::fidl_next::Respond<___R> for Sync {
6115 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6116
6117 fn respond(response: ___R) -> Self::Output {
6118 ::core::result::Result::Ok(response)
6119 }
6120 }
6121
6122 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
6123 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6124
6125 fn respond_err(response: ___R) -> Self::Output {
6126 ::core::result::Result::Err(response)
6127 }
6128 }
6129
6130 pub struct ListExtendedAttributes;
6131
6132 impl ::fidl_next::Method for ListExtendedAttributes {
6133 const ORDINAL: u64 = 5431626189872037072;
6134 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6135 ::fidl_next::protocol::Flexibility::Strict;
6136
6137 type Protocol = crate::Node;
6138
6139 type Request = crate::wire::NodeListExtendedAttributesRequest;
6140 }
6141
6142 pub struct GetExtendedAttribute;
6143
6144 impl ::fidl_next::Method for GetExtendedAttribute {
6145 const ORDINAL: u64 = 5043930208506967771;
6146 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6147 ::fidl_next::protocol::Flexibility::Strict;
6148
6149 type Protocol = crate::Node;
6150
6151 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
6152 }
6153
6154 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
6155 type Response = ::fidl_next::wire::Result<
6156 'static,
6157 crate::wire::ExtendedAttributeValue<'static>,
6158 ::fidl_next::wire::Int32,
6159 >;
6160 }
6161
6162 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
6163 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6164
6165 fn respond(response: ___R) -> Self::Output {
6166 ::core::result::Result::Ok(response)
6167 }
6168 }
6169
6170 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
6171 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6172
6173 fn respond_err(response: ___R) -> Self::Output {
6174 ::core::result::Result::Err(response)
6175 }
6176 }
6177
6178 pub struct SetExtendedAttribute;
6179
6180 impl ::fidl_next::Method for SetExtendedAttribute {
6181 const ORDINAL: u64 = 5374223046099989052;
6182 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6183 ::fidl_next::protocol::Flexibility::Strict;
6184
6185 type Protocol = crate::Node;
6186
6187 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
6188 }
6189
6190 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
6191 type Response = ::fidl_next::wire::Result<
6192 'static,
6193 crate::wire::NodeSetExtendedAttributeResponse,
6194 ::fidl_next::wire::Int32,
6195 >;
6196 }
6197
6198 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
6199 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6200
6201 fn respond(response: ___R) -> Self::Output {
6202 ::core::result::Result::Ok(response)
6203 }
6204 }
6205
6206 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
6207 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6208
6209 fn respond_err(response: ___R) -> Self::Output {
6210 ::core::result::Result::Err(response)
6211 }
6212 }
6213
6214 pub struct RemoveExtendedAttribute;
6215
6216 impl ::fidl_next::Method for RemoveExtendedAttribute {
6217 const ORDINAL: u64 = 8794297771444732717;
6218 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6219 ::fidl_next::protocol::Flexibility::Strict;
6220
6221 type Protocol = crate::Node;
6222
6223 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
6224 }
6225
6226 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
6227 type Response = ::fidl_next::wire::Result<
6228 'static,
6229 crate::wire::NodeRemoveExtendedAttributeResponse,
6230 ::fidl_next::wire::Int32,
6231 >;
6232 }
6233
6234 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
6235 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6236
6237 fn respond(response: ___R) -> Self::Output {
6238 ::core::result::Result::Ok(response)
6239 }
6240 }
6241
6242 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
6243 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6244
6245 fn respond_err(response: ___R) -> Self::Output {
6246 ::core::result::Result::Err(response)
6247 }
6248 }
6249
6250 mod ___detail {
6251 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
6252 where
6253 ___T: ::fidl_next::Transport,
6254 {
6255 type Client = NodeClient<___T>;
6256 type Server = NodeServer<___T>;
6257 }
6258
6259 #[repr(transparent)]
6261 pub struct NodeClient<___T: ::fidl_next::Transport> {
6262 #[allow(dead_code)]
6263 client: ::fidl_next::protocol::Client<___T>,
6264 }
6265
6266 impl<___T> NodeClient<___T>
6267 where
6268 ___T: ::fidl_next::Transport,
6269 {
6270 pub fn clone(
6271 &self,
6272
6273 request: impl ::fidl_next::Encode<
6274 ::fidl_next::ServerEnd<
6275 ::fidl_next_fuchsia_unknown::Cloneable,
6276 ::fidl_next::wire::fuchsia::Channel,
6277 >,
6278 <___T as ::fidl_next::Transport>::SendBuffer,
6279 >,
6280 ) -> ::fidl_next::SendFuture<'_, ___T>
6281 where
6282 <___T as ::fidl_next::Transport>::SendBuffer:
6283 ::fidl_next::encoder::InternalHandleEncoder,
6284 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6285 {
6286 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
6287 request,
6288 })
6289 }
6290
6291 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6292 where
6293 ___R: ::fidl_next::Encode<
6294 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
6295 <___T as ::fidl_next::Transport>::SendBuffer,
6296 >,
6297 {
6298 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6299 2366825959783828089,
6300 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
6301 request,
6302 ))
6303 }
6304
6305 #[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"]
6306 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
6307 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6308 6540867515453498750,
6309 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
6310 (),
6311 ))
6312 }
6313
6314 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
6315 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6316 2763219980499352582,
6317 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
6318 (),
6319 ))
6320 }
6321
6322 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6323 pub fn deprecated_clone(
6324 &self,
6325
6326 flags: impl ::fidl_next::Encode<
6327 crate::wire::OpenFlags,
6328 <___T as ::fidl_next::Transport>::SendBuffer,
6329 >,
6330
6331 object: impl ::fidl_next::Encode<
6332 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
6333 <___T as ::fidl_next::Transport>::SendBuffer,
6334 >,
6335 ) -> ::fidl_next::SendFuture<'_, ___T>
6336 where
6337 <___T as ::fidl_next::Transport>::SendBuffer:
6338 ::fidl_next::encoder::InternalHandleEncoder,
6339 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6340 {
6341 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
6342 flags,
6343
6344 object,
6345 })
6346 }
6347
6348 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6349 pub fn deprecated_clone_with<___R>(
6350 &self,
6351 request: ___R,
6352 ) -> ::fidl_next::SendFuture<'_, ___T>
6353 where
6354 ___R: ::fidl_next::Encode<
6355 crate::wire::NodeDeprecatedCloneRequest,
6356 <___T as ::fidl_next::Transport>::SendBuffer,
6357 >,
6358 {
6359 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6360 6512600400724287855,
6361 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
6362 request,
6363 ))
6364 }
6365
6366 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6367 pub fn deprecated_get_attr(
6368 &self,
6369 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
6370 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6371 8689798978500614909,
6372 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
6373 (),
6374 ))
6375 }
6376
6377 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6378 pub fn deprecated_set_attr(
6379 &self,
6380
6381 flags: impl ::fidl_next::Encode<
6382 crate::wire::NodeAttributeFlags,
6383 <___T as ::fidl_next::Transport>::SendBuffer,
6384 >,
6385
6386 attributes: impl ::fidl_next::Encode<
6387 crate::wire::NodeAttributes,
6388 <___T as ::fidl_next::Transport>::SendBuffer,
6389 >,
6390 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6391 where
6392 <___T as ::fidl_next::Transport>::SendBuffer:
6393 ::fidl_next::encoder::InternalHandleEncoder,
6394 {
6395 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
6396 flags,
6397
6398 attributes,
6399 })
6400 }
6401
6402 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6403 pub fn deprecated_set_attr_with<___R>(
6404 &self,
6405 request: ___R,
6406 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6407 where
6408 ___R: ::fidl_next::Encode<
6409 crate::wire::NodeDeprecatedSetAttrRequest,
6410 <___T as ::fidl_next::Transport>::SendBuffer,
6411 >,
6412 {
6413 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6414 4721673413776871238,
6415 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
6416 request,
6417 ))
6418 }
6419
6420 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6421 pub fn deprecated_get_flags(
6422 &self,
6423 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
6424 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6425 6595803110182632097,
6426 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
6427 (),
6428 ))
6429 }
6430
6431 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6432 pub fn deprecated_set_flags(
6433 &self,
6434
6435 flags: impl ::fidl_next::Encode<
6436 crate::wire::OpenFlags,
6437 <___T as ::fidl_next::Transport>::SendBuffer,
6438 >,
6439 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6440 where
6441 <___T as ::fidl_next::Transport>::SendBuffer:
6442 ::fidl_next::encoder::InternalHandleEncoder,
6443 {
6444 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
6445 flags,
6446 })
6447 }
6448
6449 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6450 pub fn deprecated_set_flags_with<___R>(
6451 &self,
6452 request: ___R,
6453 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6454 where
6455 ___R: ::fidl_next::Encode<
6456 crate::wire::NodeDeprecatedSetFlagsRequest,
6457 <___T as ::fidl_next::Transport>::SendBuffer,
6458 >,
6459 {
6460 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6461 5950864159036794675,
6462 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
6463 request,
6464 ))
6465 }
6466
6467 #[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"]
6468 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
6469 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6470 105530239381466147,
6471 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
6472 (),
6473 ))
6474 }
6475
6476 #[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"]
6477 pub fn set_flags(
6478 &self,
6479
6480 flags: impl ::fidl_next::Encode<
6481 crate::wire::Flags,
6482 <___T as ::fidl_next::Transport>::SendBuffer,
6483 >,
6484 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6485 where
6486 <___T as ::fidl_next::Transport>::SendBuffer:
6487 ::fidl_next::encoder::InternalHandleEncoder,
6488 {
6489 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
6490 }
6491
6492 #[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"]
6493 pub fn set_flags_with<___R>(
6494 &self,
6495 request: ___R,
6496 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6497 where
6498 ___R: ::fidl_next::Encode<
6499 crate::wire::NodeSetFlagsRequest,
6500 <___T as ::fidl_next::Transport>::SendBuffer,
6501 >,
6502 {
6503 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6504 6172186066099445416,
6505 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
6506 request,
6507 ))
6508 }
6509
6510 #[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"]
6511 pub fn query_filesystem(
6512 &self,
6513 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
6514 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6515 8013111122914313744,
6516 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
6517 (),
6518 ))
6519 }
6520
6521 #[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"]
6522 pub fn get_attributes(
6523 &self,
6524
6525 query: impl ::fidl_next::Encode<
6526 crate::wire::NodeAttributesQuery,
6527 <___T as ::fidl_next::Transport>::SendBuffer,
6528 >,
6529 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6530 where
6531 <___T as ::fidl_next::Transport>::SendBuffer:
6532 ::fidl_next::encoder::InternalHandleEncoder,
6533 {
6534 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
6535 }
6536
6537 #[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"]
6538 pub fn get_attributes_with<___R>(
6539 &self,
6540 request: ___R,
6541 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6542 where
6543 ___R: ::fidl_next::Encode<
6544 crate::wire::NodeGetAttributesRequest,
6545 <___T as ::fidl_next::Transport>::SendBuffer,
6546 >,
6547 {
6548 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6549 4414537700416816443,
6550 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
6551 request,
6552 ))
6553 }
6554
6555 #[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"]
6556 pub fn update_attributes_with<___R>(
6557 &self,
6558 request: ___R,
6559 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
6560 where
6561 ___R: ::fidl_next::Encode<
6562 crate::wire::MutableNodeAttributes<'static>,
6563 <___T as ::fidl_next::Transport>::SendBuffer,
6564 >,
6565 {
6566 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6567 3677402239314018056,
6568 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
6569 request,
6570 ))
6571 }
6572
6573 #[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"]
6574 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
6575 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6576 3196473584242777161,
6577 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
6578 (),
6579 ))
6580 }
6581
6582 #[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"]
6583 pub fn list_extended_attributes(
6584 &self,
6585
6586 iterator: impl ::fidl_next::Encode<
6587 ::fidl_next::ServerEnd<
6588 crate::ExtendedAttributeIterator,
6589 ::fidl_next::wire::fuchsia::Channel,
6590 >,
6591 <___T as ::fidl_next::Transport>::SendBuffer,
6592 >,
6593 ) -> ::fidl_next::SendFuture<'_, ___T>
6594 where
6595 <___T as ::fidl_next::Transport>::SendBuffer:
6596 ::fidl_next::encoder::InternalHandleEncoder,
6597 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6598 {
6599 self.list_extended_attributes_with(
6600 crate::generic::NodeListExtendedAttributesRequest { iterator },
6601 )
6602 }
6603
6604 #[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"]
6605 pub fn list_extended_attributes_with<___R>(
6606 &self,
6607 request: ___R,
6608 ) -> ::fidl_next::SendFuture<'_, ___T>
6609 where
6610 ___R: ::fidl_next::Encode<
6611 crate::wire::NodeListExtendedAttributesRequest,
6612 <___T as ::fidl_next::Transport>::SendBuffer,
6613 >,
6614 {
6615 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6616 5431626189872037072,
6617 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
6618 request,
6619 ))
6620 }
6621
6622 #[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"]
6623 pub fn get_extended_attribute(
6624 &self,
6625
6626 name: impl ::fidl_next::Encode<
6627 ::fidl_next::wire::Vector<'static, u8>,
6628 <___T as ::fidl_next::Transport>::SendBuffer,
6629 >,
6630 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
6631 where
6632 <___T as ::fidl_next::Transport>::SendBuffer:
6633 ::fidl_next::encoder::InternalHandleEncoder,
6634 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6635 {
6636 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
6637 name,
6638 })
6639 }
6640
6641 #[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"]
6642 pub fn get_extended_attribute_with<___R>(
6643 &self,
6644 request: ___R,
6645 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
6646 where
6647 ___R: ::fidl_next::Encode<
6648 crate::wire::NodeGetExtendedAttributeRequest<'static>,
6649 <___T as ::fidl_next::Transport>::SendBuffer,
6650 >,
6651 {
6652 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6653 5043930208506967771,
6654 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6655 request,
6656 ))
6657 }
6658
6659 #[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"]
6660 pub fn set_extended_attribute(
6661 &self,
6662
6663 name: impl ::fidl_next::Encode<
6664 ::fidl_next::wire::Vector<'static, u8>,
6665 <___T as ::fidl_next::Transport>::SendBuffer,
6666 >,
6667
6668 value: impl ::fidl_next::Encode<
6669 crate::wire::ExtendedAttributeValue<'static>,
6670 <___T as ::fidl_next::Transport>::SendBuffer,
6671 >,
6672
6673 mode: impl ::fidl_next::Encode<
6674 crate::wire::SetExtendedAttributeMode,
6675 <___T as ::fidl_next::Transport>::SendBuffer,
6676 >,
6677 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
6678 where
6679 <___T as ::fidl_next::Transport>::SendBuffer:
6680 ::fidl_next::encoder::InternalHandleEncoder,
6681 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6682 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6683 {
6684 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
6685 name,
6686
6687 value,
6688
6689 mode,
6690 })
6691 }
6692
6693 #[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"]
6694 pub fn set_extended_attribute_with<___R>(
6695 &self,
6696 request: ___R,
6697 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
6698 where
6699 ___R: ::fidl_next::Encode<
6700 crate::wire::NodeSetExtendedAttributeRequest<'static>,
6701 <___T as ::fidl_next::Transport>::SendBuffer,
6702 >,
6703 {
6704 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6705 5374223046099989052,
6706 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6707 request,
6708 ))
6709 }
6710
6711 #[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"]
6712 pub fn remove_extended_attribute(
6713 &self,
6714
6715 name: impl ::fidl_next::Encode<
6716 ::fidl_next::wire::Vector<'static, u8>,
6717 <___T as ::fidl_next::Transport>::SendBuffer,
6718 >,
6719 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
6720 where
6721 <___T as ::fidl_next::Transport>::SendBuffer:
6722 ::fidl_next::encoder::InternalHandleEncoder,
6723 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6724 {
6725 self.remove_extended_attribute_with(
6726 crate::generic::NodeRemoveExtendedAttributeRequest { name },
6727 )
6728 }
6729
6730 #[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"]
6731 pub fn remove_extended_attribute_with<___R>(
6732 &self,
6733 request: ___R,
6734 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
6735 where
6736 ___R: ::fidl_next::Encode<
6737 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
6738 <___T as ::fidl_next::Transport>::SendBuffer,
6739 >,
6740 {
6741 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6742 8794297771444732717,
6743 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6744 request,
6745 ))
6746 }
6747 }
6748
6749 #[repr(transparent)]
6751 pub struct NodeServer<___T: ::fidl_next::Transport> {
6752 server: ::fidl_next::protocol::Server<___T>,
6753 }
6754
6755 impl<___T> NodeServer<___T>
6756 where
6757 ___T: ::fidl_next::Transport,
6758 {
6759 #[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"]
6760 pub fn on_open(
6761 &self,
6762
6763 s: impl ::fidl_next::Encode<
6764 ::fidl_next::wire::Int32,
6765 <___T as ::fidl_next::Transport>::SendBuffer,
6766 >,
6767
6768 info: impl ::fidl_next::Encode<
6769 crate::wire_optional::NodeInfoDeprecated<'static>,
6770 <___T as ::fidl_next::Transport>::SendBuffer,
6771 >,
6772 ) -> ::fidl_next::SendFuture<'_, ___T>
6773 where
6774 <___T as ::fidl_next::Transport>::SendBuffer:
6775 ::fidl_next::encoder::InternalHandleEncoder,
6776 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6777 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6778 {
6779 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
6780 }
6781
6782 #[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"]
6783
6784 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6785 where
6786 ___R: ::fidl_next::Encode<
6787 <super::OnOpen as ::fidl_next::Method>::Request,
6788 <___T as ::fidl_next::Transport>::SendBuffer,
6789 >,
6790 {
6791 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6792 9207534335756671346,
6793 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
6794 request,
6795 ))
6796 }
6797
6798 #[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"]
6799
6800 pub fn on_representation_with<___R>(
6801 &self,
6802 request: ___R,
6803 ) -> ::fidl_next::SendFuture<'_, ___T>
6804 where
6805 ___R: ::fidl_next::Encode<
6806 <super::OnRepresentation as ::fidl_next::Method>::Request,
6807 <___T as ::fidl_next::Transport>::SendBuffer,
6808 >,
6809 {
6810 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6811 6679970090861613324,
6812 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
6813 request,
6814 ))
6815 }
6816 }
6817 }
6818}
6819
6820pub trait NodeClientHandler<
6824 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6825 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6826>
6827{
6828 #[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"]
6829 fn on_open(
6830 &mut self,
6831
6832 request: ::fidl_next::Request<node::OnOpen, ___T>,
6833 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6834
6835 #[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"]
6836 fn on_representation(
6837 &mut self,
6838
6839 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
6840 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6841
6842 fn on_unknown_interaction(
6843 &mut self,
6844 ordinal: u64,
6845 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6846 ::core::future::ready(())
6847 }
6848}
6849
6850impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
6851where
6852 ___T: ::fidl_next::Transport,
6853{
6854 async fn on_open(&mut self, _: ::fidl_next::Request<node::OnOpen, ___T>) {}
6855
6856 async fn on_representation(&mut self, _: ::fidl_next::Request<node::OnRepresentation, ___T>) {}
6857
6858 async fn on_unknown_interaction(&mut self, _: u64) {}
6859}
6860
6861impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
6862where
6863 ___H: NodeClientHandler<___T> + ::core::marker::Send,
6864 ___T: ::fidl_next::Transport,
6865 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
6866 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6867 Constraint = (),
6868 >,
6869 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
6870 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6871 Constraint = (),
6872 >,
6873{
6874 async fn on_event(
6875 handler: &mut ___H,
6876 ordinal: u64,
6877 flexibility: ::fidl_next::protocol::Flexibility,
6878 body: ::fidl_next::Body<___T>,
6879 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6880 match ordinal {
6881 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
6882 Ok(decoded) => {
6883 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
6884 Ok(())
6885 }
6886 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6887 ordinal: 9207534335756671346,
6888 error,
6889 }),
6890 },
6891
6892 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
6893 Ok(decoded) => {
6894 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
6895 Ok(())
6896 }
6897 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6898 ordinal: 6679970090861613324,
6899 error,
6900 }),
6901 },
6902
6903 ordinal => {
6904 handler.on_unknown_interaction(ordinal).await;
6905 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
6906 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6907 } else {
6908 Ok(())
6909 }
6910 }
6911 }
6912 }
6913}
6914
6915pub trait NodeServerHandler<
6919 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6920 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6921>
6922{
6923 fn clone(
6924 &mut self,
6925
6926 request: ::fidl_next::Request<node::Clone, ___T>,
6927 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6928
6929 #[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"]
6930 fn close(
6931 &mut self,
6932
6933 responder: ::fidl_next::Responder<node::Close, ___T>,
6934 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6935
6936 fn query(
6937 &mut self,
6938
6939 responder: ::fidl_next::Responder<node::Query, ___T>,
6940 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6941
6942 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6943 fn deprecated_clone(
6944 &mut self,
6945
6946 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
6947 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6948
6949 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6950 fn deprecated_get_attr(
6951 &mut self,
6952
6953 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
6954 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6955
6956 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6957 fn deprecated_set_attr(
6958 &mut self,
6959
6960 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
6961
6962 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
6963 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6964
6965 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6966 fn deprecated_get_flags(
6967 &mut self,
6968
6969 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
6970 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6971
6972 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6973 fn deprecated_set_flags(
6974 &mut self,
6975
6976 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
6977
6978 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
6979 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6980
6981 #[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"]
6982 fn get_flags(
6983 &mut self,
6984
6985 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
6986 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6987
6988 #[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"]
6989 fn set_flags(
6990 &mut self,
6991
6992 request: ::fidl_next::Request<node::SetFlags, ___T>,
6993
6994 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
6995 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6996
6997 #[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"]
6998 fn query_filesystem(
6999 &mut self,
7000
7001 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
7002 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7003
7004 #[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"]
7005 fn get_attributes(
7006 &mut self,
7007
7008 request: ::fidl_next::Request<node::GetAttributes, ___T>,
7009
7010 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
7011 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7012
7013 #[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"]
7014 fn update_attributes(
7015 &mut self,
7016
7017 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
7018
7019 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
7020 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7021
7022 #[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"]
7023 fn sync(
7024 &mut self,
7025
7026 responder: ::fidl_next::Responder<node::Sync, ___T>,
7027 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7028
7029 #[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"]
7030 fn list_extended_attributes(
7031 &mut self,
7032
7033 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
7034 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7035
7036 #[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"]
7037 fn get_extended_attribute(
7038 &mut self,
7039
7040 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
7041
7042 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
7043 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7044
7045 #[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"]
7046 fn set_extended_attribute(
7047 &mut self,
7048
7049 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
7050
7051 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
7052 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7053
7054 #[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"]
7055 fn remove_extended_attribute(
7056 &mut self,
7057
7058 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
7059
7060 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
7061 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7062
7063 fn on_unknown_interaction(
7064 &mut self,
7065 ordinal: u64,
7066 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7067 ::core::future::ready(())
7068 }
7069}
7070
7071impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
7072where
7073 ___H: NodeServerHandler<___T> + ::core::marker::Send,
7074 ___T: ::fidl_next::Transport,
7075 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
7076 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7077 Constraint = (),
7078 >,
7079 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
7080 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7081 Constraint = (),
7082 >,
7083 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
7084 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7085 Constraint = (),
7086 >,
7087 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
7088 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7089 Constraint = (),
7090 >,
7091 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
7092 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7093 Constraint = (),
7094 >,
7095 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
7096 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7097 Constraint = (),
7098 >,
7099 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
7100 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7101 Constraint = (),
7102 >,
7103 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
7104 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7105 Constraint = (),
7106 >,
7107 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7108 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7109 Constraint = (),
7110 >,
7111 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7112 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7113 Constraint = (),
7114 >,
7115 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7116 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7117 Constraint = (),
7118 >,
7119{
7120 async fn on_one_way(
7121 handler: &mut ___H,
7122 ordinal: u64,
7123 flexibility: ::fidl_next::protocol::Flexibility,
7124 body: ::fidl_next::Body<___T>,
7125 ) -> ::core::result::Result<
7126 (),
7127 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7128 > {
7129 match ordinal {
7130 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7131 Ok(decoded) => {
7132 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
7133 Ok(())
7134 }
7135 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7136 ordinal: 2366825959783828089,
7137 error,
7138 }),
7139 },
7140
7141 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7142 Ok(decoded) => {
7143 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
7144 Ok(())
7145 }
7146 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7147 ordinal: 6512600400724287855,
7148 error,
7149 }),
7150 },
7151
7152 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7153 Ok(decoded) => {
7154 handler
7155 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
7156 .await;
7157 Ok(())
7158 }
7159 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7160 ordinal: 5431626189872037072,
7161 error,
7162 }),
7163 },
7164
7165 ordinal => {
7166 handler.on_unknown_interaction(ordinal).await;
7167 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7168 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7169 } else {
7170 Ok(())
7171 }
7172 }
7173 }
7174 }
7175
7176 async fn on_two_way(
7177 handler: &mut ___H,
7178 ordinal: u64,
7179 flexibility: ::fidl_next::protocol::Flexibility,
7180 body: ::fidl_next::Body<___T>,
7181 responder: ::fidl_next::protocol::Responder<___T>,
7182 ) -> ::core::result::Result<
7183 (),
7184 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7185 > {
7186 match ordinal {
7187 6540867515453498750 => {
7188 let responder = ::fidl_next::Responder::from_untyped(responder);
7189
7190 handler.close(responder).await;
7191 Ok(())
7192 }
7193
7194 2763219980499352582 => {
7195 let responder = ::fidl_next::Responder::from_untyped(responder);
7196
7197 handler.query(responder).await;
7198 Ok(())
7199 }
7200
7201 8689798978500614909 => {
7202 let responder = ::fidl_next::Responder::from_untyped(responder);
7203
7204 handler.deprecated_get_attr(responder).await;
7205 Ok(())
7206 }
7207
7208 4721673413776871238 => {
7209 let responder = ::fidl_next::Responder::from_untyped(responder);
7210
7211 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7212 Ok(decoded) => {
7213 handler
7214 .deprecated_set_attr(
7215 ::fidl_next::Request::from_decoded(decoded),
7216 responder,
7217 )
7218 .await;
7219 Ok(())
7220 }
7221 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7222 ordinal: 4721673413776871238,
7223 error,
7224 }),
7225 }
7226 }
7227
7228 6595803110182632097 => {
7229 let responder = ::fidl_next::Responder::from_untyped(responder);
7230
7231 handler.deprecated_get_flags(responder).await;
7232 Ok(())
7233 }
7234
7235 5950864159036794675 => {
7236 let responder = ::fidl_next::Responder::from_untyped(responder);
7237
7238 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7239 Ok(decoded) => {
7240 handler
7241 .deprecated_set_flags(
7242 ::fidl_next::Request::from_decoded(decoded),
7243 responder,
7244 )
7245 .await;
7246 Ok(())
7247 }
7248 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7249 ordinal: 5950864159036794675,
7250 error,
7251 }),
7252 }
7253 }
7254
7255 105530239381466147 => {
7256 let responder = ::fidl_next::Responder::from_untyped(responder);
7257
7258 handler.get_flags(responder).await;
7259 Ok(())
7260 }
7261
7262 6172186066099445416 => {
7263 let responder = ::fidl_next::Responder::from_untyped(responder);
7264
7265 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7266 Ok(decoded) => {
7267 handler
7268 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
7269 .await;
7270 Ok(())
7271 }
7272 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7273 ordinal: 6172186066099445416,
7274 error,
7275 }),
7276 }
7277 }
7278
7279 8013111122914313744 => {
7280 let responder = ::fidl_next::Responder::from_untyped(responder);
7281
7282 handler.query_filesystem(responder).await;
7283 Ok(())
7284 }
7285
7286 4414537700416816443 => {
7287 let responder = ::fidl_next::Responder::from_untyped(responder);
7288
7289 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7290 Ok(decoded) => {
7291 handler
7292 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
7293 .await;
7294 Ok(())
7295 }
7296 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7297 ordinal: 4414537700416816443,
7298 error,
7299 }),
7300 }
7301 }
7302
7303 3677402239314018056 => {
7304 let responder = ::fidl_next::Responder::from_untyped(responder);
7305
7306 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7307 Ok(decoded) => {
7308 handler
7309 .update_attributes(
7310 ::fidl_next::Request::from_decoded(decoded),
7311 responder,
7312 )
7313 .await;
7314 Ok(())
7315 }
7316 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7317 ordinal: 3677402239314018056,
7318 error,
7319 }),
7320 }
7321 }
7322
7323 3196473584242777161 => {
7324 let responder = ::fidl_next::Responder::from_untyped(responder);
7325
7326 handler.sync(responder).await;
7327 Ok(())
7328 }
7329
7330 5043930208506967771 => {
7331 let responder = ::fidl_next::Responder::from_untyped(responder);
7332
7333 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7334 Ok(decoded) => {
7335 handler
7336 .get_extended_attribute(
7337 ::fidl_next::Request::from_decoded(decoded),
7338 responder,
7339 )
7340 .await;
7341 Ok(())
7342 }
7343 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7344 ordinal: 5043930208506967771,
7345 error,
7346 }),
7347 }
7348 }
7349
7350 5374223046099989052 => {
7351 let responder = ::fidl_next::Responder::from_untyped(responder);
7352
7353 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7354 Ok(decoded) => {
7355 handler
7356 .set_extended_attribute(
7357 ::fidl_next::Request::from_decoded(decoded),
7358 responder,
7359 )
7360 .await;
7361 Ok(())
7362 }
7363 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7364 ordinal: 5374223046099989052,
7365 error,
7366 }),
7367 }
7368 }
7369
7370 8794297771444732717 => {
7371 let responder = ::fidl_next::Responder::from_untyped(responder);
7372
7373 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7374 Ok(decoded) => {
7375 handler
7376 .remove_extended_attribute(
7377 ::fidl_next::Request::from_decoded(decoded),
7378 responder,
7379 )
7380 .await;
7381 Ok(())
7382 }
7383 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7384 ordinal: 8794297771444732717,
7385 error,
7386 }),
7387 }
7388 }
7389
7390 ordinal => {
7391 handler.on_unknown_interaction(ordinal).await;
7392 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7393 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7394 } else {
7395 responder
7396 .respond(
7397 ordinal,
7398 flexibility,
7399 ::fidl_next::Flexible::<()>::FrameworkErr(
7400 ::fidl_next::FrameworkError::UnknownMethod,
7401 ),
7402 )
7403 .expect("encoding a framework error should never fail")
7404 .await?;
7405 Ok(())
7406 }
7407 }
7408 }
7409 }
7410}
7411
7412#[doc = " Directory defines a node which is capable of containing other Objects.\n"]
7414#[derive(PartialEq, Debug)]
7415pub struct Directory;
7416
7417impl ::fidl_next::Discoverable for Directory {
7418 const PROTOCOL_NAME: &'static str = "fuchsia.io.Directory";
7419}
7420
7421#[cfg(target_os = "fuchsia")]
7422impl ::fidl_next::HasTransport for Directory {
7423 type Transport = ::fidl_next::fuchsia::zx::Channel;
7424}
7425
7426pub mod directory {
7427 pub mod prelude {
7428 pub use crate::{Directory, DirectoryClientHandler, DirectoryServerHandler, directory};
7429
7430 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
7431
7432 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
7433
7434 pub use crate::natural::DirectoryCreateSymlinkRequest;
7435
7436 pub use crate::natural::DirectoryDeprecatedOpenRequest;
7437
7438 pub use crate::natural::DirectoryGetTokenResponse;
7439
7440 pub use crate::natural::DirectoryLinkRequest;
7441
7442 pub use crate::natural::DirectoryLinkResponse;
7443
7444 pub use crate::natural::DirectoryOpenRequest;
7445
7446 pub use crate::natural::DirectoryReadDirentsRequest;
7447
7448 pub use crate::natural::DirectoryReadDirentsResponse;
7449
7450 pub use crate::natural::DirectoryRenameRequest;
7451
7452 pub use crate::natural::DirectoryRewindResponse;
7453
7454 pub use crate::natural::DirectoryUnlinkRequest;
7455
7456 pub use crate::natural::DirectoryWatchRequest;
7457
7458 pub use crate::natural::DirectoryWatchResponse;
7459
7460 pub use crate::natural::DirectoryCreateSymlinkResponse;
7461
7462 pub use crate::natural::DirectoryRenameResponse;
7463
7464 pub use crate::natural::DirectoryUnlinkResponse;
7465
7466 pub use crate::natural::ExtendedAttributeValue;
7467
7468 pub use crate::natural::MutableNodeAttributes;
7469
7470 pub use crate::natural::NodeAttributes2;
7471
7472 pub use crate::natural::NodeDeprecatedCloneRequest;
7473
7474 pub use crate::natural::NodeDeprecatedGetAttrResponse;
7475
7476 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
7477
7478 pub use crate::natural::NodeDeprecatedSetAttrRequest;
7479
7480 pub use crate::natural::NodeDeprecatedSetAttrResponse;
7481
7482 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
7483
7484 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
7485
7486 pub use crate::natural::NodeGetAttributesRequest;
7487
7488 pub use crate::natural::NodeGetExtendedAttributeRequest;
7489
7490 pub use crate::natural::NodeListExtendedAttributesRequest;
7491
7492 pub use crate::natural::NodeOnOpenRequest;
7493
7494 pub use crate::natural::NodeQueryFilesystemResponse;
7495
7496 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
7497
7498 pub use crate::natural::NodeSetExtendedAttributeRequest;
7499
7500 pub use crate::natural::NodeSetFlagsRequest;
7501
7502 pub use crate::natural::NodeGetFlagsResponse;
7503
7504 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
7505
7506 pub use crate::natural::NodeSetExtendedAttributeResponse;
7507
7508 pub use crate::natural::NodeSetFlagsResponse;
7509
7510 pub use crate::natural::NodeSyncResponse;
7511
7512 pub use crate::natural::NodeUpdateAttributesResponse;
7513
7514 pub use crate::natural::Representation;
7515
7516 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
7517
7518 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
7519
7520 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
7521 }
7522
7523 pub struct AdvisoryLock;
7524
7525 impl ::fidl_next::Method for AdvisoryLock {
7526 const ORDINAL: u64 = 7992130864415541162;
7527 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7528 ::fidl_next::protocol::Flexibility::Strict;
7529
7530 type Protocol = crate::Directory;
7531
7532 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
7533 }
7534
7535 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
7536 type Response = ::fidl_next::wire::Result<
7537 'static,
7538 crate::wire::AdvisoryLockingAdvisoryLockResponse,
7539 ::fidl_next::wire::Int32,
7540 >;
7541 }
7542
7543 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
7544 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7545
7546 fn respond(response: ___R) -> Self::Output {
7547 ::core::result::Result::Ok(response)
7548 }
7549 }
7550
7551 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
7552 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7553
7554 fn respond_err(response: ___R) -> Self::Output {
7555 ::core::result::Result::Err(response)
7556 }
7557 }
7558
7559 pub struct Clone;
7560
7561 impl ::fidl_next::Method for Clone {
7562 const ORDINAL: u64 = 2366825959783828089;
7563 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7564 ::fidl_next::protocol::Flexibility::Strict;
7565
7566 type Protocol = crate::Directory;
7567
7568 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
7569 }
7570
7571 pub struct Close;
7572
7573 impl ::fidl_next::Method for Close {
7574 const ORDINAL: u64 = 6540867515453498750;
7575 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7576 ::fidl_next::protocol::Flexibility::Strict;
7577
7578 type Protocol = crate::Directory;
7579
7580 type Request = ();
7581 }
7582
7583 impl ::fidl_next::TwoWayMethod for Close {
7584 type Response = ::fidl_next::wire::Result<
7585 'static,
7586 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
7587 ::fidl_next::wire::Int32,
7588 >;
7589 }
7590
7591 impl<___R> ::fidl_next::Respond<___R> for Close {
7592 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7593
7594 fn respond(response: ___R) -> Self::Output {
7595 ::core::result::Result::Ok(response)
7596 }
7597 }
7598
7599 impl<___R> ::fidl_next::RespondErr<___R> for Close {
7600 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7601
7602 fn respond_err(response: ___R) -> Self::Output {
7603 ::core::result::Result::Err(response)
7604 }
7605 }
7606
7607 pub struct Query;
7608
7609 impl ::fidl_next::Method for Query {
7610 const ORDINAL: u64 = 2763219980499352582;
7611 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7612 ::fidl_next::protocol::Flexibility::Strict;
7613
7614 type Protocol = crate::Directory;
7615
7616 type Request = ();
7617 }
7618
7619 impl ::fidl_next::TwoWayMethod for Query {
7620 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
7621 }
7622
7623 impl<___R> ::fidl_next::Respond<___R> for Query {
7624 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
7625
7626 fn respond(response: ___R) -> Self::Output {
7627 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
7628 }
7629 }
7630
7631 pub struct DeprecatedClone;
7632
7633 impl ::fidl_next::Method for DeprecatedClone {
7634 const ORDINAL: u64 = 6512600400724287855;
7635 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7636 ::fidl_next::protocol::Flexibility::Flexible;
7637
7638 type Protocol = crate::Directory;
7639
7640 type Request = crate::wire::NodeDeprecatedCloneRequest;
7641 }
7642
7643 pub struct OnOpen;
7644
7645 impl ::fidl_next::Method for OnOpen {
7646 const ORDINAL: u64 = 9207534335756671346;
7647 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7648 ::fidl_next::protocol::Flexibility::Flexible;
7649
7650 type Protocol = crate::Directory;
7651
7652 type Request = crate::wire::NodeOnOpenRequest<'static>;
7653 }
7654
7655 pub struct DeprecatedGetAttr;
7656
7657 impl ::fidl_next::Method for DeprecatedGetAttr {
7658 const ORDINAL: u64 = 8689798978500614909;
7659 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7660 ::fidl_next::protocol::Flexibility::Strict;
7661
7662 type Protocol = crate::Directory;
7663
7664 type Request = ();
7665 }
7666
7667 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
7668 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
7669 }
7670
7671 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
7672 type Output = ___R;
7673
7674 fn respond(response: ___R) -> Self::Output {
7675 response
7676 }
7677 }
7678
7679 pub struct DeprecatedSetAttr;
7680
7681 impl ::fidl_next::Method for DeprecatedSetAttr {
7682 const ORDINAL: u64 = 4721673413776871238;
7683 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7684 ::fidl_next::protocol::Flexibility::Strict;
7685
7686 type Protocol = crate::Directory;
7687
7688 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
7689 }
7690
7691 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
7692 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
7693 }
7694
7695 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
7696 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
7697
7698 fn respond(response: ___R) -> Self::Output {
7699 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
7700 }
7701 }
7702
7703 pub struct DeprecatedGetFlags;
7704
7705 impl ::fidl_next::Method for DeprecatedGetFlags {
7706 const ORDINAL: u64 = 6595803110182632097;
7707 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7708 ::fidl_next::protocol::Flexibility::Strict;
7709
7710 type Protocol = crate::Directory;
7711
7712 type Request = ();
7713 }
7714
7715 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
7716 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
7717 }
7718
7719 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
7720 type Output = ___R;
7721
7722 fn respond(response: ___R) -> Self::Output {
7723 response
7724 }
7725 }
7726
7727 pub struct DeprecatedSetFlags;
7728
7729 impl ::fidl_next::Method for DeprecatedSetFlags {
7730 const ORDINAL: u64 = 5950864159036794675;
7731 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7732 ::fidl_next::protocol::Flexibility::Strict;
7733
7734 type Protocol = crate::Directory;
7735
7736 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
7737 }
7738
7739 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
7740 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
7741 }
7742
7743 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
7744 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
7745
7746 fn respond(response: ___R) -> Self::Output {
7747 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
7748 }
7749 }
7750
7751 pub struct GetFlags;
7752
7753 impl ::fidl_next::Method for GetFlags {
7754 const ORDINAL: u64 = 105530239381466147;
7755 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7756 ::fidl_next::protocol::Flexibility::Flexible;
7757
7758 type Protocol = crate::Directory;
7759
7760 type Request = ();
7761 }
7762
7763 impl ::fidl_next::TwoWayMethod for GetFlags {
7764 type Response = ::fidl_next::wire::FlexibleResult<
7765 'static,
7766 crate::wire::NodeGetFlagsResponse,
7767 ::fidl_next::wire::Int32,
7768 >;
7769 }
7770
7771 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
7772 type Output = ::fidl_next::FlexibleResult<
7773 crate::generic::NodeGetFlagsResponse<___R>,
7774 ::fidl_next::util::Never,
7775 >;
7776
7777 fn respond(response: ___R) -> Self::Output {
7778 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
7779 flags: response,
7780 })
7781 }
7782 }
7783
7784 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
7785 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
7786
7787 fn respond_err(response: ___R) -> Self::Output {
7788 ::fidl_next::FlexibleResult::Err(response)
7789 }
7790 }
7791
7792 pub struct SetFlags;
7793
7794 impl ::fidl_next::Method for SetFlags {
7795 const ORDINAL: u64 = 6172186066099445416;
7796 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7797 ::fidl_next::protocol::Flexibility::Flexible;
7798
7799 type Protocol = crate::Directory;
7800
7801 type Request = crate::wire::NodeSetFlagsRequest;
7802 }
7803
7804 impl ::fidl_next::TwoWayMethod for SetFlags {
7805 type Response = ::fidl_next::wire::FlexibleResult<
7806 'static,
7807 crate::wire::NodeSetFlagsResponse,
7808 ::fidl_next::wire::Int32,
7809 >;
7810 }
7811
7812 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
7813 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
7814
7815 fn respond(response: ___R) -> Self::Output {
7816 ::fidl_next::FlexibleResult::Ok(response)
7817 }
7818 }
7819
7820 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
7821 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
7822
7823 fn respond_err(response: ___R) -> Self::Output {
7824 ::fidl_next::FlexibleResult::Err(response)
7825 }
7826 }
7827
7828 pub struct QueryFilesystem;
7829
7830 impl ::fidl_next::Method for QueryFilesystem {
7831 const ORDINAL: u64 = 8013111122914313744;
7832 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7833 ::fidl_next::protocol::Flexibility::Strict;
7834
7835 type Protocol = crate::Directory;
7836
7837 type Request = ();
7838 }
7839
7840 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
7841 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
7842 }
7843
7844 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
7845 type Output = ___R;
7846
7847 fn respond(response: ___R) -> Self::Output {
7848 response
7849 }
7850 }
7851
7852 pub struct OnRepresentation;
7853
7854 impl ::fidl_next::Method for OnRepresentation {
7855 const ORDINAL: u64 = 6679970090861613324;
7856 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7857 ::fidl_next::protocol::Flexibility::Strict;
7858
7859 type Protocol = crate::Directory;
7860
7861 type Request = crate::wire::Representation<'static>;
7862 }
7863
7864 pub struct GetAttributes;
7865
7866 impl ::fidl_next::Method for GetAttributes {
7867 const ORDINAL: u64 = 4414537700416816443;
7868 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7869 ::fidl_next::protocol::Flexibility::Strict;
7870
7871 type Protocol = crate::Directory;
7872
7873 type Request = crate::wire::NodeGetAttributesRequest;
7874 }
7875
7876 impl ::fidl_next::TwoWayMethod for GetAttributes {
7877 type Response = ::fidl_next::wire::Result<
7878 'static,
7879 crate::wire::NodeAttributes2<'static>,
7880 ::fidl_next::wire::Int32,
7881 >;
7882 }
7883
7884 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
7885 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7886
7887 fn respond(response: ___R) -> Self::Output {
7888 ::core::result::Result::Ok(response)
7889 }
7890 }
7891
7892 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
7893 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7894
7895 fn respond_err(response: ___R) -> Self::Output {
7896 ::core::result::Result::Err(response)
7897 }
7898 }
7899
7900 pub struct UpdateAttributes;
7901
7902 impl ::fidl_next::Method for UpdateAttributes {
7903 const ORDINAL: u64 = 3677402239314018056;
7904 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7905 ::fidl_next::protocol::Flexibility::Strict;
7906
7907 type Protocol = crate::Directory;
7908
7909 type Request = crate::wire::MutableNodeAttributes<'static>;
7910 }
7911
7912 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
7913 type Response = ::fidl_next::wire::Result<
7914 'static,
7915 crate::wire::NodeUpdateAttributesResponse,
7916 ::fidl_next::wire::Int32,
7917 >;
7918 }
7919
7920 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
7921 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7922
7923 fn respond(response: ___R) -> Self::Output {
7924 ::core::result::Result::Ok(response)
7925 }
7926 }
7927
7928 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
7929 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7930
7931 fn respond_err(response: ___R) -> Self::Output {
7932 ::core::result::Result::Err(response)
7933 }
7934 }
7935
7936 pub struct Sync;
7937
7938 impl ::fidl_next::Method for Sync {
7939 const ORDINAL: u64 = 3196473584242777161;
7940 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7941 ::fidl_next::protocol::Flexibility::Strict;
7942
7943 type Protocol = crate::Directory;
7944
7945 type Request = ();
7946 }
7947
7948 impl ::fidl_next::TwoWayMethod for Sync {
7949 type Response = ::fidl_next::wire::Result<
7950 'static,
7951 crate::wire::NodeSyncResponse,
7952 ::fidl_next::wire::Int32,
7953 >;
7954 }
7955
7956 impl<___R> ::fidl_next::Respond<___R> for Sync {
7957 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7958
7959 fn respond(response: ___R) -> Self::Output {
7960 ::core::result::Result::Ok(response)
7961 }
7962 }
7963
7964 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
7965 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7966
7967 fn respond_err(response: ___R) -> Self::Output {
7968 ::core::result::Result::Err(response)
7969 }
7970 }
7971
7972 pub struct ListExtendedAttributes;
7973
7974 impl ::fidl_next::Method for ListExtendedAttributes {
7975 const ORDINAL: u64 = 5431626189872037072;
7976 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7977 ::fidl_next::protocol::Flexibility::Strict;
7978
7979 type Protocol = crate::Directory;
7980
7981 type Request = crate::wire::NodeListExtendedAttributesRequest;
7982 }
7983
7984 pub struct GetExtendedAttribute;
7985
7986 impl ::fidl_next::Method for GetExtendedAttribute {
7987 const ORDINAL: u64 = 5043930208506967771;
7988 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7989 ::fidl_next::protocol::Flexibility::Strict;
7990
7991 type Protocol = crate::Directory;
7992
7993 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
7994 }
7995
7996 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
7997 type Response = ::fidl_next::wire::Result<
7998 'static,
7999 crate::wire::ExtendedAttributeValue<'static>,
8000 ::fidl_next::wire::Int32,
8001 >;
8002 }
8003
8004 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
8005 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8006
8007 fn respond(response: ___R) -> Self::Output {
8008 ::core::result::Result::Ok(response)
8009 }
8010 }
8011
8012 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
8013 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8014
8015 fn respond_err(response: ___R) -> Self::Output {
8016 ::core::result::Result::Err(response)
8017 }
8018 }
8019
8020 pub struct SetExtendedAttribute;
8021
8022 impl ::fidl_next::Method for SetExtendedAttribute {
8023 const ORDINAL: u64 = 5374223046099989052;
8024 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8025 ::fidl_next::protocol::Flexibility::Strict;
8026
8027 type Protocol = crate::Directory;
8028
8029 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
8030 }
8031
8032 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
8033 type Response = ::fidl_next::wire::Result<
8034 'static,
8035 crate::wire::NodeSetExtendedAttributeResponse,
8036 ::fidl_next::wire::Int32,
8037 >;
8038 }
8039
8040 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
8041 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8042
8043 fn respond(response: ___R) -> Self::Output {
8044 ::core::result::Result::Ok(response)
8045 }
8046 }
8047
8048 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
8049 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8050
8051 fn respond_err(response: ___R) -> Self::Output {
8052 ::core::result::Result::Err(response)
8053 }
8054 }
8055
8056 pub struct RemoveExtendedAttribute;
8057
8058 impl ::fidl_next::Method for RemoveExtendedAttribute {
8059 const ORDINAL: u64 = 8794297771444732717;
8060 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8061 ::fidl_next::protocol::Flexibility::Strict;
8062
8063 type Protocol = crate::Directory;
8064
8065 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
8066 }
8067
8068 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
8069 type Response = ::fidl_next::wire::Result<
8070 'static,
8071 crate::wire::NodeRemoveExtendedAttributeResponse,
8072 ::fidl_next::wire::Int32,
8073 >;
8074 }
8075
8076 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
8077 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8078
8079 fn respond(response: ___R) -> Self::Output {
8080 ::core::result::Result::Ok(response)
8081 }
8082 }
8083
8084 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
8085 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8086
8087 fn respond_err(response: ___R) -> Self::Output {
8088 ::core::result::Result::Err(response)
8089 }
8090 }
8091
8092 pub struct DeprecatedOpen;
8093
8094 impl ::fidl_next::Method for DeprecatedOpen {
8095 const ORDINAL: u64 = 3193127272456937152;
8096 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8097 ::fidl_next::protocol::Flexibility::Flexible;
8098
8099 type Protocol = crate::Directory;
8100
8101 type Request = crate::wire::DirectoryDeprecatedOpenRequest<'static>;
8102 }
8103
8104 pub struct Open;
8105
8106 impl ::fidl_next::Method for Open {
8107 const ORDINAL: u64 = 6236883748953765593;
8108 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8109 ::fidl_next::protocol::Flexibility::Strict;
8110
8111 type Protocol = crate::Directory;
8112
8113 type Request = crate::wire::DirectoryOpenRequest<'static>;
8114 }
8115
8116 pub struct ReadDirents;
8117
8118 impl ::fidl_next::Method for ReadDirents {
8119 const ORDINAL: u64 = 3855785432100874762;
8120 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8121 ::fidl_next::protocol::Flexibility::Strict;
8122
8123 type Protocol = crate::Directory;
8124
8125 type Request = crate::wire::DirectoryReadDirentsRequest;
8126 }
8127
8128 impl ::fidl_next::TwoWayMethod for ReadDirents {
8129 type Response = crate::wire::DirectoryReadDirentsResponse<'static>;
8130 }
8131
8132 impl<___R> ::fidl_next::Respond<___R> for ReadDirents {
8133 type Output = ___R;
8134
8135 fn respond(response: ___R) -> Self::Output {
8136 response
8137 }
8138 }
8139
8140 pub struct Rewind;
8141
8142 impl ::fidl_next::Method for Rewind {
8143 const ORDINAL: u64 = 1635123508515392625;
8144 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8145 ::fidl_next::protocol::Flexibility::Strict;
8146
8147 type Protocol = crate::Directory;
8148
8149 type Request = ();
8150 }
8151
8152 impl ::fidl_next::TwoWayMethod for Rewind {
8153 type Response = crate::wire::DirectoryRewindResponse;
8154 }
8155
8156 impl<___R> ::fidl_next::Respond<___R> for Rewind {
8157 type Output = crate::generic::DirectoryRewindResponse<___R>;
8158
8159 fn respond(response: ___R) -> Self::Output {
8160 crate::generic::DirectoryRewindResponse { s: response }
8161 }
8162 }
8163
8164 pub struct GetToken;
8165
8166 impl ::fidl_next::Method for GetToken {
8167 const ORDINAL: u64 = 2787337947777369685;
8168 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8169 ::fidl_next::protocol::Flexibility::Strict;
8170
8171 type Protocol = crate::Directory;
8172
8173 type Request = ();
8174 }
8175
8176 impl ::fidl_next::TwoWayMethod for GetToken {
8177 type Response = crate::wire::DirectoryGetTokenResponse;
8178 }
8179
8180 impl<___R> ::fidl_next::Respond<___R> for GetToken {
8181 type Output = ___R;
8182
8183 fn respond(response: ___R) -> Self::Output {
8184 response
8185 }
8186 }
8187
8188 pub struct Link;
8189
8190 impl ::fidl_next::Method for Link {
8191 const ORDINAL: u64 = 8360374984291987687;
8192 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8193 ::fidl_next::protocol::Flexibility::Strict;
8194
8195 type Protocol = crate::Directory;
8196
8197 type Request = crate::wire::DirectoryLinkRequest<'static>;
8198 }
8199
8200 impl ::fidl_next::TwoWayMethod for Link {
8201 type Response = crate::wire::DirectoryLinkResponse;
8202 }
8203
8204 impl<___R> ::fidl_next::Respond<___R> for Link {
8205 type Output = crate::generic::DirectoryLinkResponse<___R>;
8206
8207 fn respond(response: ___R) -> Self::Output {
8208 crate::generic::DirectoryLinkResponse { s: response }
8209 }
8210 }
8211
8212 pub struct Unlink;
8213
8214 impl ::fidl_next::Method for Unlink {
8215 const ORDINAL: u64 = 8433556716759383021;
8216 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8217 ::fidl_next::protocol::Flexibility::Strict;
8218
8219 type Protocol = crate::Directory;
8220
8221 type Request = crate::wire::DirectoryUnlinkRequest<'static>;
8222 }
8223
8224 impl ::fidl_next::TwoWayMethod for Unlink {
8225 type Response = ::fidl_next::wire::Result<
8226 'static,
8227 crate::wire::DirectoryUnlinkResponse,
8228 ::fidl_next::wire::Int32,
8229 >;
8230 }
8231
8232 impl<___R> ::fidl_next::Respond<___R> for Unlink {
8233 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8234
8235 fn respond(response: ___R) -> Self::Output {
8236 ::core::result::Result::Ok(response)
8237 }
8238 }
8239
8240 impl<___R> ::fidl_next::RespondErr<___R> for Unlink {
8241 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8242
8243 fn respond_err(response: ___R) -> Self::Output {
8244 ::core::result::Result::Err(response)
8245 }
8246 }
8247
8248 pub struct Rename;
8249
8250 impl ::fidl_next::Method for Rename {
8251 const ORDINAL: u64 = 8097726607824333022;
8252 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8253 ::fidl_next::protocol::Flexibility::Strict;
8254
8255 type Protocol = crate::Directory;
8256
8257 type Request = crate::wire::DirectoryRenameRequest<'static>;
8258 }
8259
8260 impl ::fidl_next::TwoWayMethod for Rename {
8261 type Response = ::fidl_next::wire::Result<
8262 'static,
8263 crate::wire::DirectoryRenameResponse,
8264 ::fidl_next::wire::Int32,
8265 >;
8266 }
8267
8268 impl<___R> ::fidl_next::Respond<___R> for Rename {
8269 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8270
8271 fn respond(response: ___R) -> Self::Output {
8272 ::core::result::Result::Ok(response)
8273 }
8274 }
8275
8276 impl<___R> ::fidl_next::RespondErr<___R> for Rename {
8277 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8278
8279 fn respond_err(response: ___R) -> Self::Output {
8280 ::core::result::Result::Err(response)
8281 }
8282 }
8283
8284 pub struct CreateSymlink;
8285
8286 impl ::fidl_next::Method for CreateSymlink {
8287 const ORDINAL: u64 = 2435901052462315657;
8288 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8289 ::fidl_next::protocol::Flexibility::Strict;
8290
8291 type Protocol = crate::Directory;
8292
8293 type Request = crate::wire::DirectoryCreateSymlinkRequest<'static>;
8294 }
8295
8296 impl ::fidl_next::TwoWayMethod for CreateSymlink {
8297 type Response = ::fidl_next::wire::Result<
8298 'static,
8299 crate::wire::DirectoryCreateSymlinkResponse,
8300 ::fidl_next::wire::Int32,
8301 >;
8302 }
8303
8304 impl<___R> ::fidl_next::Respond<___R> for CreateSymlink {
8305 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8306
8307 fn respond(response: ___R) -> Self::Output {
8308 ::core::result::Result::Ok(response)
8309 }
8310 }
8311
8312 impl<___R> ::fidl_next::RespondErr<___R> for CreateSymlink {
8313 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8314
8315 fn respond_err(response: ___R) -> Self::Output {
8316 ::core::result::Result::Err(response)
8317 }
8318 }
8319
8320 pub struct Watch;
8321
8322 impl ::fidl_next::Method for Watch {
8323 const ORDINAL: u64 = 6275512344170098065;
8324 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8325 ::fidl_next::protocol::Flexibility::Strict;
8326
8327 type Protocol = crate::Directory;
8328
8329 type Request = crate::wire::DirectoryWatchRequest;
8330 }
8331
8332 impl ::fidl_next::TwoWayMethod for Watch {
8333 type Response = crate::wire::DirectoryWatchResponse;
8334 }
8335
8336 impl<___R> ::fidl_next::Respond<___R> for Watch {
8337 type Output = crate::generic::DirectoryWatchResponse<___R>;
8338
8339 fn respond(response: ___R) -> Self::Output {
8340 crate::generic::DirectoryWatchResponse { s: response }
8341 }
8342 }
8343
8344 mod ___detail {
8345 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Directory
8346 where
8347 ___T: ::fidl_next::Transport,
8348 {
8349 type Client = DirectoryClient<___T>;
8350 type Server = DirectoryServer<___T>;
8351 }
8352
8353 #[repr(transparent)]
8355 pub struct DirectoryClient<___T: ::fidl_next::Transport> {
8356 #[allow(dead_code)]
8357 client: ::fidl_next::protocol::Client<___T>,
8358 }
8359
8360 impl<___T> DirectoryClient<___T>
8361 where
8362 ___T: ::fidl_next::Transport,
8363 {
8364 #[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"]
8365 pub fn advisory_lock(
8366 &self,
8367
8368 request: impl ::fidl_next::Encode<
8369 crate::wire::AdvisoryLockRequest<'static>,
8370 <___T as ::fidl_next::Transport>::SendBuffer,
8371 >,
8372 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
8373 where
8374 <___T as ::fidl_next::Transport>::SendBuffer:
8375 ::fidl_next::encoder::InternalHandleEncoder,
8376 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8377 {
8378 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
8379 request,
8380 })
8381 }
8382
8383 #[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"]
8384 pub fn advisory_lock_with<___R>(
8385 &self,
8386 request: ___R,
8387 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
8388 where
8389 ___R: ::fidl_next::Encode<
8390 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
8391 <___T as ::fidl_next::Transport>::SendBuffer,
8392 >,
8393 {
8394 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8395 7992130864415541162,
8396 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
8397 request,
8398 ))
8399 }
8400
8401 pub fn clone(
8402 &self,
8403
8404 request: impl ::fidl_next::Encode<
8405 ::fidl_next::ServerEnd<
8406 ::fidl_next_fuchsia_unknown::Cloneable,
8407 ::fidl_next::wire::fuchsia::Channel,
8408 >,
8409 <___T as ::fidl_next::Transport>::SendBuffer,
8410 >,
8411 ) -> ::fidl_next::SendFuture<'_, ___T>
8412 where
8413 <___T as ::fidl_next::Transport>::SendBuffer:
8414 ::fidl_next::encoder::InternalHandleEncoder,
8415 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8416 {
8417 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
8418 request,
8419 })
8420 }
8421
8422 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
8423 where
8424 ___R: ::fidl_next::Encode<
8425 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
8426 <___T as ::fidl_next::Transport>::SendBuffer,
8427 >,
8428 {
8429 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8430 2366825959783828089,
8431 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
8432 request,
8433 ))
8434 }
8435
8436 #[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"]
8437 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
8438 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8439 6540867515453498750,
8440 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
8441 (),
8442 ))
8443 }
8444
8445 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
8446 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8447 2763219980499352582,
8448 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
8449 (),
8450 ))
8451 }
8452
8453 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
8454 pub fn deprecated_clone(
8455 &self,
8456
8457 flags: impl ::fidl_next::Encode<
8458 crate::wire::OpenFlags,
8459 <___T as ::fidl_next::Transport>::SendBuffer,
8460 >,
8461
8462 object: impl ::fidl_next::Encode<
8463 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
8464 <___T as ::fidl_next::Transport>::SendBuffer,
8465 >,
8466 ) -> ::fidl_next::SendFuture<'_, ___T>
8467 where
8468 <___T as ::fidl_next::Transport>::SendBuffer:
8469 ::fidl_next::encoder::InternalHandleEncoder,
8470 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8471 {
8472 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
8473 flags,
8474
8475 object,
8476 })
8477 }
8478
8479 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
8480 pub fn deprecated_clone_with<___R>(
8481 &self,
8482 request: ___R,
8483 ) -> ::fidl_next::SendFuture<'_, ___T>
8484 where
8485 ___R: ::fidl_next::Encode<
8486 crate::wire::NodeDeprecatedCloneRequest,
8487 <___T as ::fidl_next::Transport>::SendBuffer,
8488 >,
8489 {
8490 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8491 6512600400724287855,
8492 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
8493 request,
8494 ))
8495 }
8496
8497 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
8498 pub fn deprecated_get_attr(
8499 &self,
8500 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
8501 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8502 8689798978500614909,
8503 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
8504 (),
8505 ))
8506 }
8507
8508 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
8509 pub fn deprecated_set_attr(
8510 &self,
8511
8512 flags: impl ::fidl_next::Encode<
8513 crate::wire::NodeAttributeFlags,
8514 <___T as ::fidl_next::Transport>::SendBuffer,
8515 >,
8516
8517 attributes: impl ::fidl_next::Encode<
8518 crate::wire::NodeAttributes,
8519 <___T as ::fidl_next::Transport>::SendBuffer,
8520 >,
8521 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
8522 where
8523 <___T as ::fidl_next::Transport>::SendBuffer:
8524 ::fidl_next::encoder::InternalHandleEncoder,
8525 {
8526 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
8527 flags,
8528
8529 attributes,
8530 })
8531 }
8532
8533 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
8534 pub fn deprecated_set_attr_with<___R>(
8535 &self,
8536 request: ___R,
8537 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
8538 where
8539 ___R: ::fidl_next::Encode<
8540 crate::wire::NodeDeprecatedSetAttrRequest,
8541 <___T as ::fidl_next::Transport>::SendBuffer,
8542 >,
8543 {
8544 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8545 4721673413776871238,
8546 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
8547 request,
8548 ))
8549 }
8550
8551 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
8552 pub fn deprecated_get_flags(
8553 &self,
8554 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
8555 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8556 6595803110182632097,
8557 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
8558 (),
8559 ))
8560 }
8561
8562 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
8563 pub fn deprecated_set_flags(
8564 &self,
8565
8566 flags: impl ::fidl_next::Encode<
8567 crate::wire::OpenFlags,
8568 <___T as ::fidl_next::Transport>::SendBuffer,
8569 >,
8570 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
8571 where
8572 <___T as ::fidl_next::Transport>::SendBuffer:
8573 ::fidl_next::encoder::InternalHandleEncoder,
8574 {
8575 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
8576 flags,
8577 })
8578 }
8579
8580 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
8581 pub fn deprecated_set_flags_with<___R>(
8582 &self,
8583 request: ___R,
8584 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
8585 where
8586 ___R: ::fidl_next::Encode<
8587 crate::wire::NodeDeprecatedSetFlagsRequest,
8588 <___T as ::fidl_next::Transport>::SendBuffer,
8589 >,
8590 {
8591 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8592 5950864159036794675,
8593 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
8594 request,
8595 ))
8596 }
8597
8598 #[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"]
8599 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
8600 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8601 105530239381466147,
8602 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
8603 (),
8604 ))
8605 }
8606
8607 #[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"]
8608 pub fn set_flags(
8609 &self,
8610
8611 flags: impl ::fidl_next::Encode<
8612 crate::wire::Flags,
8613 <___T as ::fidl_next::Transport>::SendBuffer,
8614 >,
8615 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
8616 where
8617 <___T as ::fidl_next::Transport>::SendBuffer:
8618 ::fidl_next::encoder::InternalHandleEncoder,
8619 {
8620 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
8621 }
8622
8623 #[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"]
8624 pub fn set_flags_with<___R>(
8625 &self,
8626 request: ___R,
8627 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
8628 where
8629 ___R: ::fidl_next::Encode<
8630 crate::wire::NodeSetFlagsRequest,
8631 <___T as ::fidl_next::Transport>::SendBuffer,
8632 >,
8633 {
8634 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8635 6172186066099445416,
8636 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
8637 request,
8638 ))
8639 }
8640
8641 #[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"]
8642 pub fn query_filesystem(
8643 &self,
8644 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
8645 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8646 8013111122914313744,
8647 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
8648 (),
8649 ))
8650 }
8651
8652 #[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"]
8653 pub fn get_attributes(
8654 &self,
8655
8656 query: impl ::fidl_next::Encode<
8657 crate::wire::NodeAttributesQuery,
8658 <___T as ::fidl_next::Transport>::SendBuffer,
8659 >,
8660 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
8661 where
8662 <___T as ::fidl_next::Transport>::SendBuffer:
8663 ::fidl_next::encoder::InternalHandleEncoder,
8664 {
8665 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
8666 }
8667
8668 #[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"]
8669 pub fn get_attributes_with<___R>(
8670 &self,
8671 request: ___R,
8672 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
8673 where
8674 ___R: ::fidl_next::Encode<
8675 crate::wire::NodeGetAttributesRequest,
8676 <___T as ::fidl_next::Transport>::SendBuffer,
8677 >,
8678 {
8679 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8680 4414537700416816443,
8681 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
8682 request,
8683 ))
8684 }
8685
8686 #[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"]
8687 pub fn update_attributes_with<___R>(
8688 &self,
8689 request: ___R,
8690 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
8691 where
8692 ___R: ::fidl_next::Encode<
8693 crate::wire::MutableNodeAttributes<'static>,
8694 <___T as ::fidl_next::Transport>::SendBuffer,
8695 >,
8696 {
8697 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8698 3677402239314018056,
8699 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
8700 request,
8701 ))
8702 }
8703
8704 #[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"]
8705 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
8706 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8707 3196473584242777161,
8708 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
8709 (),
8710 ))
8711 }
8712
8713 #[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"]
8714 pub fn list_extended_attributes(
8715 &self,
8716
8717 iterator: impl ::fidl_next::Encode<
8718 ::fidl_next::ServerEnd<
8719 crate::ExtendedAttributeIterator,
8720 ::fidl_next::wire::fuchsia::Channel,
8721 >,
8722 <___T as ::fidl_next::Transport>::SendBuffer,
8723 >,
8724 ) -> ::fidl_next::SendFuture<'_, ___T>
8725 where
8726 <___T as ::fidl_next::Transport>::SendBuffer:
8727 ::fidl_next::encoder::InternalHandleEncoder,
8728 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8729 {
8730 self.list_extended_attributes_with(
8731 crate::generic::NodeListExtendedAttributesRequest { iterator },
8732 )
8733 }
8734
8735 #[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"]
8736 pub fn list_extended_attributes_with<___R>(
8737 &self,
8738 request: ___R,
8739 ) -> ::fidl_next::SendFuture<'_, ___T>
8740 where
8741 ___R: ::fidl_next::Encode<
8742 crate::wire::NodeListExtendedAttributesRequest,
8743 <___T as ::fidl_next::Transport>::SendBuffer,
8744 >,
8745 {
8746 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8747 5431626189872037072,
8748 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
8749 request,
8750 ))
8751 }
8752
8753 #[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"]
8754 pub fn get_extended_attribute(
8755 &self,
8756
8757 name: impl ::fidl_next::Encode<
8758 ::fidl_next::wire::Vector<'static, u8>,
8759 <___T as ::fidl_next::Transport>::SendBuffer,
8760 >,
8761 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
8762 where
8763 <___T as ::fidl_next::Transport>::SendBuffer:
8764 ::fidl_next::encoder::InternalHandleEncoder,
8765 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8766 {
8767 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
8768 name,
8769 })
8770 }
8771
8772 #[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"]
8773 pub fn get_extended_attribute_with<___R>(
8774 &self,
8775 request: ___R,
8776 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
8777 where
8778 ___R: ::fidl_next::Encode<
8779 crate::wire::NodeGetExtendedAttributeRequest<'static>,
8780 <___T as ::fidl_next::Transport>::SendBuffer,
8781 >,
8782 {
8783 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8784 5043930208506967771,
8785 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8786 request,
8787 ))
8788 }
8789
8790 #[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"]
8791 pub fn set_extended_attribute(
8792 &self,
8793
8794 name: impl ::fidl_next::Encode<
8795 ::fidl_next::wire::Vector<'static, u8>,
8796 <___T as ::fidl_next::Transport>::SendBuffer,
8797 >,
8798
8799 value: impl ::fidl_next::Encode<
8800 crate::wire::ExtendedAttributeValue<'static>,
8801 <___T as ::fidl_next::Transport>::SendBuffer,
8802 >,
8803
8804 mode: impl ::fidl_next::Encode<
8805 crate::wire::SetExtendedAttributeMode,
8806 <___T as ::fidl_next::Transport>::SendBuffer,
8807 >,
8808 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
8809 where
8810 <___T as ::fidl_next::Transport>::SendBuffer:
8811 ::fidl_next::encoder::InternalHandleEncoder,
8812 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8813 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8814 {
8815 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
8816 name,
8817
8818 value,
8819
8820 mode,
8821 })
8822 }
8823
8824 #[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"]
8825 pub fn set_extended_attribute_with<___R>(
8826 &self,
8827 request: ___R,
8828 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
8829 where
8830 ___R: ::fidl_next::Encode<
8831 crate::wire::NodeSetExtendedAttributeRequest<'static>,
8832 <___T as ::fidl_next::Transport>::SendBuffer,
8833 >,
8834 {
8835 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8836 5374223046099989052,
8837 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8838 request,
8839 ))
8840 }
8841
8842 #[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"]
8843 pub fn remove_extended_attribute(
8844 &self,
8845
8846 name: impl ::fidl_next::Encode<
8847 ::fidl_next::wire::Vector<'static, u8>,
8848 <___T as ::fidl_next::Transport>::SendBuffer,
8849 >,
8850 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
8851 where
8852 <___T as ::fidl_next::Transport>::SendBuffer:
8853 ::fidl_next::encoder::InternalHandleEncoder,
8854 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8855 {
8856 self.remove_extended_attribute_with(
8857 crate::generic::NodeRemoveExtendedAttributeRequest { name },
8858 )
8859 }
8860
8861 #[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"]
8862 pub fn remove_extended_attribute_with<___R>(
8863 &self,
8864 request: ___R,
8865 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
8866 where
8867 ___R: ::fidl_next::Encode<
8868 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
8869 <___T as ::fidl_next::Transport>::SendBuffer,
8870 >,
8871 {
8872 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8873 8794297771444732717,
8874 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8875 request,
8876 ))
8877 }
8878
8879 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
8880 pub fn deprecated_open(
8881 &self,
8882
8883 flags: impl ::fidl_next::Encode<
8884 crate::wire::OpenFlags,
8885 <___T as ::fidl_next::Transport>::SendBuffer,
8886 >,
8887
8888 mode: impl ::fidl_next::Encode<
8889 crate::wire::ModeType,
8890 <___T as ::fidl_next::Transport>::SendBuffer,
8891 >,
8892
8893 path: impl ::fidl_next::Encode<
8894 ::fidl_next::wire::String<'static>,
8895 <___T as ::fidl_next::Transport>::SendBuffer,
8896 >,
8897
8898 object: impl ::fidl_next::Encode<
8899 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
8900 <___T as ::fidl_next::Transport>::SendBuffer,
8901 >,
8902 ) -> ::fidl_next::SendFuture<'_, ___T>
8903 where
8904 <___T as ::fidl_next::Transport>::SendBuffer:
8905 ::fidl_next::encoder::InternalHandleEncoder,
8906 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8907 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8908 {
8909 self.deprecated_open_with(crate::generic::DirectoryDeprecatedOpenRequest {
8910 flags,
8911
8912 mode,
8913
8914 path,
8915
8916 object,
8917 })
8918 }
8919
8920 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
8921 pub fn deprecated_open_with<___R>(
8922 &self,
8923 request: ___R,
8924 ) -> ::fidl_next::SendFuture<'_, ___T>
8925 where
8926 ___R: ::fidl_next::Encode<
8927 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
8928 <___T as ::fidl_next::Transport>::SendBuffer,
8929 >,
8930 {
8931 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8932 3193127272456937152,
8933 <super::DeprecatedOpen as ::fidl_next::Method>::FLEXIBILITY,
8934 request,
8935 ))
8936 }
8937
8938 #[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"]
8939 pub fn open(
8940 &self,
8941
8942 path: impl ::fidl_next::Encode<
8943 ::fidl_next::wire::String<'static>,
8944 <___T as ::fidl_next::Transport>::SendBuffer,
8945 >,
8946
8947 flags: impl ::fidl_next::Encode<
8948 crate::wire::Flags,
8949 <___T as ::fidl_next::Transport>::SendBuffer,
8950 >,
8951
8952 options: impl ::fidl_next::Encode<
8953 crate::wire::Options<'static>,
8954 <___T as ::fidl_next::Transport>::SendBuffer,
8955 >,
8956
8957 object: impl ::fidl_next::Encode<
8958 ::fidl_next::wire::fuchsia::Channel,
8959 <___T as ::fidl_next::Transport>::SendBuffer,
8960 >,
8961 ) -> ::fidl_next::SendFuture<'_, ___T>
8962 where
8963 <___T as ::fidl_next::Transport>::SendBuffer:
8964 ::fidl_next::encoder::InternalHandleEncoder,
8965 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8966 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8967 {
8968 self.open_with(crate::generic::DirectoryOpenRequest {
8969 path,
8970
8971 flags,
8972
8973 options,
8974
8975 object,
8976 })
8977 }
8978
8979 #[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"]
8980 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
8981 where
8982 ___R: ::fidl_next::Encode<
8983 crate::wire::DirectoryOpenRequest<'static>,
8984 <___T as ::fidl_next::Transport>::SendBuffer,
8985 >,
8986 {
8987 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8988 6236883748953765593,
8989 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
8990 request,
8991 ))
8992 }
8993
8994 #[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"]
8995 pub fn read_dirents(
8996 &self,
8997
8998 max_bytes: impl ::fidl_next::Encode<
8999 ::fidl_next::wire::Uint64,
9000 <___T as ::fidl_next::Transport>::SendBuffer,
9001 >,
9002 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
9003 where
9004 <___T as ::fidl_next::Transport>::SendBuffer:
9005 ::fidl_next::encoder::InternalHandleEncoder,
9006 {
9007 self.read_dirents_with(crate::generic::DirectoryReadDirentsRequest { max_bytes })
9008 }
9009
9010 #[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"]
9011 pub fn read_dirents_with<___R>(
9012 &self,
9013 request: ___R,
9014 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
9015 where
9016 ___R: ::fidl_next::Encode<
9017 crate::wire::DirectoryReadDirentsRequest,
9018 <___T as ::fidl_next::Transport>::SendBuffer,
9019 >,
9020 {
9021 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9022 3855785432100874762,
9023 <super::ReadDirents as ::fidl_next::Method>::FLEXIBILITY,
9024 request,
9025 ))
9026 }
9027
9028 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
9029 pub fn rewind(&self) -> ::fidl_next::TwoWayFuture<'_, super::Rewind, ___T> {
9030 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9031 1635123508515392625,
9032 <super::Rewind as ::fidl_next::Method>::FLEXIBILITY,
9033 (),
9034 ))
9035 }
9036
9037 #[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"]
9038 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
9039 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9040 2787337947777369685,
9041 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
9042 (),
9043 ))
9044 }
9045
9046 #[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"]
9047 pub fn link(
9048 &self,
9049
9050 src: impl ::fidl_next::Encode<
9051 ::fidl_next::wire::String<'static>,
9052 <___T as ::fidl_next::Transport>::SendBuffer,
9053 >,
9054
9055 dst_parent_token: impl ::fidl_next::Encode<
9056 ::fidl_next::wire::fuchsia::NullableHandle,
9057 <___T as ::fidl_next::Transport>::SendBuffer,
9058 >,
9059
9060 dst: impl ::fidl_next::Encode<
9061 ::fidl_next::wire::String<'static>,
9062 <___T as ::fidl_next::Transport>::SendBuffer,
9063 >,
9064 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
9065 where
9066 <___T as ::fidl_next::Transport>::SendBuffer:
9067 ::fidl_next::encoder::InternalHandleEncoder,
9068 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9069 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9070 {
9071 self.link_with(crate::generic::DirectoryLinkRequest { src, dst_parent_token, dst })
9072 }
9073
9074 #[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"]
9075 pub fn link_with<___R>(
9076 &self,
9077 request: ___R,
9078 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
9079 where
9080 ___R: ::fidl_next::Encode<
9081 crate::wire::DirectoryLinkRequest<'static>,
9082 <___T as ::fidl_next::Transport>::SendBuffer,
9083 >,
9084 {
9085 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9086 8360374984291987687,
9087 <super::Link as ::fidl_next::Method>::FLEXIBILITY,
9088 request,
9089 ))
9090 }
9091
9092 #[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"]
9093 pub fn unlink(
9094 &self,
9095
9096 name: impl ::fidl_next::Encode<
9097 ::fidl_next::wire::String<'static>,
9098 <___T as ::fidl_next::Transport>::SendBuffer,
9099 >,
9100
9101 options: impl ::fidl_next::Encode<
9102 crate::wire::UnlinkOptions<'static>,
9103 <___T as ::fidl_next::Transport>::SendBuffer,
9104 >,
9105 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
9106 where
9107 <___T as ::fidl_next::Transport>::SendBuffer:
9108 ::fidl_next::encoder::InternalHandleEncoder,
9109 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9110 {
9111 self.unlink_with(crate::generic::DirectoryUnlinkRequest { name, options })
9112 }
9113
9114 #[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"]
9115 pub fn unlink_with<___R>(
9116 &self,
9117 request: ___R,
9118 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
9119 where
9120 ___R: ::fidl_next::Encode<
9121 crate::wire::DirectoryUnlinkRequest<'static>,
9122 <___T as ::fidl_next::Transport>::SendBuffer,
9123 >,
9124 {
9125 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9126 8433556716759383021,
9127 <super::Unlink as ::fidl_next::Method>::FLEXIBILITY,
9128 request,
9129 ))
9130 }
9131
9132 #[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"]
9133 pub fn rename(
9134 &self,
9135
9136 src: impl ::fidl_next::Encode<
9137 ::fidl_next::wire::String<'static>,
9138 <___T as ::fidl_next::Transport>::SendBuffer,
9139 >,
9140
9141 dst_parent_token: impl ::fidl_next::Encode<
9142 ::fidl_next::wire::fuchsia::Event,
9143 <___T as ::fidl_next::Transport>::SendBuffer,
9144 >,
9145
9146 dst: impl ::fidl_next::Encode<
9147 ::fidl_next::wire::String<'static>,
9148 <___T as ::fidl_next::Transport>::SendBuffer,
9149 >,
9150 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
9151 where
9152 <___T as ::fidl_next::Transport>::SendBuffer:
9153 ::fidl_next::encoder::InternalHandleEncoder,
9154 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9155 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9156 {
9157 self.rename_with(crate::generic::DirectoryRenameRequest {
9158 src,
9159
9160 dst_parent_token,
9161
9162 dst,
9163 })
9164 }
9165
9166 #[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"]
9167 pub fn rename_with<___R>(
9168 &self,
9169 request: ___R,
9170 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
9171 where
9172 ___R: ::fidl_next::Encode<
9173 crate::wire::DirectoryRenameRequest<'static>,
9174 <___T as ::fidl_next::Transport>::SendBuffer,
9175 >,
9176 {
9177 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9178 8097726607824333022,
9179 <super::Rename as ::fidl_next::Method>::FLEXIBILITY,
9180 request,
9181 ))
9182 }
9183
9184 #[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"]
9185 pub fn create_symlink(
9186 &self,
9187
9188 name: impl ::fidl_next::Encode<
9189 ::fidl_next::wire::String<'static>,
9190 <___T as ::fidl_next::Transport>::SendBuffer,
9191 >,
9192
9193 target: impl ::fidl_next::Encode<
9194 ::fidl_next::wire::Vector<'static, u8>,
9195 <___T as ::fidl_next::Transport>::SendBuffer,
9196 >,
9197
9198 connection: impl ::fidl_next::Encode<
9199 ::fidl_next::ServerEnd<
9200 crate::Symlink,
9201 ::fidl_next::wire::fuchsia::OptionalChannel,
9202 >,
9203 <___T as ::fidl_next::Transport>::SendBuffer,
9204 >,
9205 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
9206 where
9207 <___T as ::fidl_next::Transport>::SendBuffer:
9208 ::fidl_next::encoder::InternalHandleEncoder,
9209 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9210 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9211 {
9212 self.create_symlink_with(crate::generic::DirectoryCreateSymlinkRequest {
9213 name,
9214
9215 target,
9216
9217 connection,
9218 })
9219 }
9220
9221 #[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"]
9222 pub fn create_symlink_with<___R>(
9223 &self,
9224 request: ___R,
9225 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
9226 where
9227 ___R: ::fidl_next::Encode<
9228 crate::wire::DirectoryCreateSymlinkRequest<'static>,
9229 <___T as ::fidl_next::Transport>::SendBuffer,
9230 >,
9231 {
9232 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9233 2435901052462315657,
9234 <super::CreateSymlink as ::fidl_next::Method>::FLEXIBILITY,
9235 request,
9236 ))
9237 }
9238
9239 #[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"]
9240 pub fn watch(
9241 &self,
9242
9243 mask: impl ::fidl_next::Encode<
9244 crate::wire::WatchMask,
9245 <___T as ::fidl_next::Transport>::SendBuffer,
9246 >,
9247
9248 options: impl ::fidl_next::Encode<
9249 ::fidl_next::wire::Uint32,
9250 <___T as ::fidl_next::Transport>::SendBuffer,
9251 >,
9252
9253 watcher: impl ::fidl_next::Encode<
9254 ::fidl_next::ServerEnd<
9255 crate::DirectoryWatcher,
9256 ::fidl_next::wire::fuchsia::Channel,
9257 >,
9258 <___T as ::fidl_next::Transport>::SendBuffer,
9259 >,
9260 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
9261 where
9262 <___T as ::fidl_next::Transport>::SendBuffer:
9263 ::fidl_next::encoder::InternalHandleEncoder,
9264 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9265 {
9266 self.watch_with(crate::generic::DirectoryWatchRequest { mask, options, watcher })
9267 }
9268
9269 #[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"]
9270 pub fn watch_with<___R>(
9271 &self,
9272 request: ___R,
9273 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
9274 where
9275 ___R: ::fidl_next::Encode<
9276 crate::wire::DirectoryWatchRequest,
9277 <___T as ::fidl_next::Transport>::SendBuffer,
9278 >,
9279 {
9280 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9281 6275512344170098065,
9282 <super::Watch as ::fidl_next::Method>::FLEXIBILITY,
9283 request,
9284 ))
9285 }
9286 }
9287
9288 #[repr(transparent)]
9290 pub struct DirectoryServer<___T: ::fidl_next::Transport> {
9291 server: ::fidl_next::protocol::Server<___T>,
9292 }
9293
9294 impl<___T> DirectoryServer<___T>
9295 where
9296 ___T: ::fidl_next::Transport,
9297 {
9298 #[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"]
9299 pub fn on_open(
9300 &self,
9301
9302 s: impl ::fidl_next::Encode<
9303 ::fidl_next::wire::Int32,
9304 <___T as ::fidl_next::Transport>::SendBuffer,
9305 >,
9306
9307 info: impl ::fidl_next::Encode<
9308 crate::wire_optional::NodeInfoDeprecated<'static>,
9309 <___T as ::fidl_next::Transport>::SendBuffer,
9310 >,
9311 ) -> ::fidl_next::SendFuture<'_, ___T>
9312 where
9313 <___T as ::fidl_next::Transport>::SendBuffer:
9314 ::fidl_next::encoder::InternalHandleEncoder,
9315 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9316 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9317 {
9318 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
9319 }
9320
9321 #[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"]
9322
9323 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
9324 where
9325 ___R: ::fidl_next::Encode<
9326 <super::OnOpen as ::fidl_next::Method>::Request,
9327 <___T as ::fidl_next::Transport>::SendBuffer,
9328 >,
9329 {
9330 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
9331 9207534335756671346,
9332 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
9333 request,
9334 ))
9335 }
9336
9337 #[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"]
9338
9339 pub fn on_representation_with<___R>(
9340 &self,
9341 request: ___R,
9342 ) -> ::fidl_next::SendFuture<'_, ___T>
9343 where
9344 ___R: ::fidl_next::Encode<
9345 <super::OnRepresentation as ::fidl_next::Method>::Request,
9346 <___T as ::fidl_next::Transport>::SendBuffer,
9347 >,
9348 {
9349 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
9350 6679970090861613324,
9351 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
9352 request,
9353 ))
9354 }
9355 }
9356 }
9357}
9358
9359pub trait DirectoryClientHandler<
9363 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9364 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9365>
9366{
9367 #[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"]
9368 fn on_open(
9369 &mut self,
9370
9371 request: ::fidl_next::Request<directory::OnOpen, ___T>,
9372 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9373
9374 #[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"]
9375 fn on_representation(
9376 &mut self,
9377
9378 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
9379 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9380
9381 fn on_unknown_interaction(
9382 &mut self,
9383 ordinal: u64,
9384 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9385 ::core::future::ready(())
9386 }
9387}
9388
9389impl<___T> DirectoryClientHandler<___T> for ::fidl_next::IgnoreEvents
9390where
9391 ___T: ::fidl_next::Transport,
9392{
9393 async fn on_open(&mut self, _: ::fidl_next::Request<directory::OnOpen, ___T>) {}
9394
9395 async fn on_representation(
9396 &mut self,
9397
9398 _: ::fidl_next::Request<directory::OnRepresentation, ___T>,
9399 ) {
9400 }
9401
9402 async fn on_unknown_interaction(&mut self, _: u64) {}
9403}
9404
9405impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Directory
9406where
9407 ___H: DirectoryClientHandler<___T> + ::core::marker::Send,
9408 ___T: ::fidl_next::Transport,
9409 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
9410 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9411 Constraint = (),
9412 >,
9413 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
9414 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9415 Constraint = (),
9416 >,
9417{
9418 async fn on_event(
9419 handler: &mut ___H,
9420 ordinal: u64,
9421 flexibility: ::fidl_next::protocol::Flexibility,
9422 body: ::fidl_next::Body<___T>,
9423 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9424 match ordinal {
9425 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9426 Ok(decoded) => {
9427 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
9428 Ok(())
9429 }
9430 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9431 ordinal: 9207534335756671346,
9432 error,
9433 }),
9434 },
9435
9436 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9437 Ok(decoded) => {
9438 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
9439 Ok(())
9440 }
9441 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9442 ordinal: 6679970090861613324,
9443 error,
9444 }),
9445 },
9446
9447 ordinal => {
9448 handler.on_unknown_interaction(ordinal).await;
9449 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
9450 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9451 } else {
9452 Ok(())
9453 }
9454 }
9455 }
9456 }
9457}
9458
9459pub trait DirectoryServerHandler<
9463 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9464 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9465>
9466{
9467 #[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"]
9468 fn advisory_lock(
9469 &mut self,
9470
9471 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
9472
9473 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
9474 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9475
9476 fn clone(
9477 &mut self,
9478
9479 request: ::fidl_next::Request<directory::Clone, ___T>,
9480 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9481
9482 #[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"]
9483 fn close(
9484 &mut self,
9485
9486 responder: ::fidl_next::Responder<directory::Close, ___T>,
9487 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9488
9489 fn query(
9490 &mut self,
9491
9492 responder: ::fidl_next::Responder<directory::Query, ___T>,
9493 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9494
9495 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9496 fn deprecated_clone(
9497 &mut self,
9498
9499 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
9500 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9501
9502 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
9503 fn deprecated_get_attr(
9504 &mut self,
9505
9506 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
9507 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9508
9509 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9510 fn deprecated_set_attr(
9511 &mut self,
9512
9513 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
9514
9515 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
9516 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9517
9518 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
9519 fn deprecated_get_flags(
9520 &mut self,
9521
9522 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
9523 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9524
9525 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9526 fn deprecated_set_flags(
9527 &mut self,
9528
9529 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
9530
9531 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
9532 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9533
9534 #[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"]
9535 fn get_flags(
9536 &mut self,
9537
9538 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
9539 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9540
9541 #[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"]
9542 fn set_flags(
9543 &mut self,
9544
9545 request: ::fidl_next::Request<directory::SetFlags, ___T>,
9546
9547 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
9548 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9549
9550 #[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"]
9551 fn query_filesystem(
9552 &mut self,
9553
9554 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
9555 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9556
9557 #[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"]
9558 fn get_attributes(
9559 &mut self,
9560
9561 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
9562
9563 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
9564 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9565
9566 #[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"]
9567 fn update_attributes(
9568 &mut self,
9569
9570 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
9571
9572 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
9573 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9574
9575 #[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"]
9576 fn sync(
9577 &mut self,
9578
9579 responder: ::fidl_next::Responder<directory::Sync, ___T>,
9580 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9581
9582 #[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"]
9583 fn list_extended_attributes(
9584 &mut self,
9585
9586 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
9587 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9588
9589 #[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"]
9590 fn get_extended_attribute(
9591 &mut self,
9592
9593 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
9594
9595 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
9596 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9597
9598 #[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"]
9599 fn set_extended_attribute(
9600 &mut self,
9601
9602 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
9603
9604 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
9605 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9606
9607 #[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"]
9608 fn remove_extended_attribute(
9609 &mut self,
9610
9611 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
9612
9613 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
9614 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9615
9616 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
9617 fn deprecated_open(
9618 &mut self,
9619
9620 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
9621 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9622
9623 #[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"]
9624 fn open(
9625 &mut self,
9626
9627 request: ::fidl_next::Request<directory::Open, ___T>,
9628 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9629
9630 #[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"]
9631 fn read_dirents(
9632 &mut self,
9633
9634 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
9635
9636 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
9637 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9638
9639 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
9640 fn rewind(
9641 &mut self,
9642
9643 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
9644 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9645
9646 #[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"]
9647 fn get_token(
9648 &mut self,
9649
9650 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
9651 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9652
9653 #[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"]
9654 fn link(
9655 &mut self,
9656
9657 request: ::fidl_next::Request<directory::Link, ___T>,
9658
9659 responder: ::fidl_next::Responder<directory::Link, ___T>,
9660 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9661
9662 #[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"]
9663 fn unlink(
9664 &mut self,
9665
9666 request: ::fidl_next::Request<directory::Unlink, ___T>,
9667
9668 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
9669 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9670
9671 #[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"]
9672 fn rename(
9673 &mut self,
9674
9675 request: ::fidl_next::Request<directory::Rename, ___T>,
9676
9677 responder: ::fidl_next::Responder<directory::Rename, ___T>,
9678 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9679
9680 #[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"]
9681 fn create_symlink(
9682 &mut self,
9683
9684 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
9685
9686 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
9687 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9688
9689 #[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"]
9690 fn watch(
9691 &mut self,
9692
9693 request: ::fidl_next::Request<directory::Watch, ___T>,
9694
9695 responder: ::fidl_next::Responder<directory::Watch, ___T>,
9696 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9697
9698 fn on_unknown_interaction(
9699 &mut self,
9700 ordinal: u64,
9701 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9702 ::core::future::ready(())
9703 }
9704}
9705
9706impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Directory
9707where
9708 ___H: DirectoryServerHandler<___T> + ::core::marker::Send,
9709 ___T: ::fidl_next::Transport,
9710 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
9711 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9712 Constraint = (),
9713 >,
9714 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
9715 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9716 Constraint = (),
9717 >,
9718 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
9719 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9720 Constraint = (),
9721 >,
9722 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
9723 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9724 Constraint = (),
9725 >,
9726 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
9727 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9728 Constraint = (),
9729 >,
9730 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
9731 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9732 Constraint = (),
9733 >,
9734 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
9735 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9736 Constraint = (),
9737 >,
9738 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
9739 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9740 Constraint = (),
9741 >,
9742 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
9743 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9744 Constraint = (),
9745 >,
9746 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9747 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9748 Constraint = (),
9749 >,
9750 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9751 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9752 Constraint = (),
9753 >,
9754 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9755 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9756 Constraint = (),
9757 >,
9758 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
9759 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9760 Constraint = (),
9761 >,
9762 for<'de> crate::wire::DirectoryOpenRequest<'de>: ::fidl_next::Decode<
9763 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9764 Constraint = (),
9765 >,
9766 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
9767 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9768 Constraint = (),
9769 >,
9770 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
9771 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9772 Constraint = (),
9773 >,
9774 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
9775 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9776 Constraint = (),
9777 >,
9778 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
9779 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9780 Constraint = (),
9781 >,
9782 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
9783 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9784 Constraint = (),
9785 >,
9786 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
9787 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9788 Constraint = (),
9789 >,
9790{
9791 async fn on_one_way(
9792 handler: &mut ___H,
9793 ordinal: u64,
9794 flexibility: ::fidl_next::protocol::Flexibility,
9795 body: ::fidl_next::Body<___T>,
9796 ) -> ::core::result::Result<
9797 (),
9798 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9799 > {
9800 match ordinal {
9801 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9802 Ok(decoded) => {
9803 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
9804 Ok(())
9805 }
9806 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9807 ordinal: 2366825959783828089,
9808 error,
9809 }),
9810 },
9811
9812 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9813 Ok(decoded) => {
9814 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
9815 Ok(())
9816 }
9817 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9818 ordinal: 6512600400724287855,
9819 error,
9820 }),
9821 },
9822
9823 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9824 Ok(decoded) => {
9825 handler
9826 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
9827 .await;
9828 Ok(())
9829 }
9830 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9831 ordinal: 5431626189872037072,
9832 error,
9833 }),
9834 },
9835
9836 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9837 Ok(decoded) => {
9838 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
9839 Ok(())
9840 }
9841 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9842 ordinal: 3193127272456937152,
9843 error,
9844 }),
9845 },
9846
9847 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9848 Ok(decoded) => {
9849 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
9850 Ok(())
9851 }
9852 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9853 ordinal: 6236883748953765593,
9854 error,
9855 }),
9856 },
9857
9858 ordinal => {
9859 handler.on_unknown_interaction(ordinal).await;
9860 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
9861 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9862 } else {
9863 Ok(())
9864 }
9865 }
9866 }
9867 }
9868
9869 async fn on_two_way(
9870 handler: &mut ___H,
9871 ordinal: u64,
9872 flexibility: ::fidl_next::protocol::Flexibility,
9873 body: ::fidl_next::Body<___T>,
9874 responder: ::fidl_next::protocol::Responder<___T>,
9875 ) -> ::core::result::Result<
9876 (),
9877 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9878 > {
9879 match ordinal {
9880 7992130864415541162 => {
9881 let responder = ::fidl_next::Responder::from_untyped(responder);
9882
9883 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9884 Ok(decoded) => {
9885 handler
9886 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
9887 .await;
9888 Ok(())
9889 }
9890 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9891 ordinal: 7992130864415541162,
9892 error,
9893 }),
9894 }
9895 }
9896
9897 6540867515453498750 => {
9898 let responder = ::fidl_next::Responder::from_untyped(responder);
9899
9900 handler.close(responder).await;
9901 Ok(())
9902 }
9903
9904 2763219980499352582 => {
9905 let responder = ::fidl_next::Responder::from_untyped(responder);
9906
9907 handler.query(responder).await;
9908 Ok(())
9909 }
9910
9911 8689798978500614909 => {
9912 let responder = ::fidl_next::Responder::from_untyped(responder);
9913
9914 handler.deprecated_get_attr(responder).await;
9915 Ok(())
9916 }
9917
9918 4721673413776871238 => {
9919 let responder = ::fidl_next::Responder::from_untyped(responder);
9920
9921 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9922 Ok(decoded) => {
9923 handler
9924 .deprecated_set_attr(
9925 ::fidl_next::Request::from_decoded(decoded),
9926 responder,
9927 )
9928 .await;
9929 Ok(())
9930 }
9931 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9932 ordinal: 4721673413776871238,
9933 error,
9934 }),
9935 }
9936 }
9937
9938 6595803110182632097 => {
9939 let responder = ::fidl_next::Responder::from_untyped(responder);
9940
9941 handler.deprecated_get_flags(responder).await;
9942 Ok(())
9943 }
9944
9945 5950864159036794675 => {
9946 let responder = ::fidl_next::Responder::from_untyped(responder);
9947
9948 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9949 Ok(decoded) => {
9950 handler
9951 .deprecated_set_flags(
9952 ::fidl_next::Request::from_decoded(decoded),
9953 responder,
9954 )
9955 .await;
9956 Ok(())
9957 }
9958 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9959 ordinal: 5950864159036794675,
9960 error,
9961 }),
9962 }
9963 }
9964
9965 105530239381466147 => {
9966 let responder = ::fidl_next::Responder::from_untyped(responder);
9967
9968 handler.get_flags(responder).await;
9969 Ok(())
9970 }
9971
9972 6172186066099445416 => {
9973 let responder = ::fidl_next::Responder::from_untyped(responder);
9974
9975 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9976 Ok(decoded) => {
9977 handler
9978 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
9979 .await;
9980 Ok(())
9981 }
9982 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9983 ordinal: 6172186066099445416,
9984 error,
9985 }),
9986 }
9987 }
9988
9989 8013111122914313744 => {
9990 let responder = ::fidl_next::Responder::from_untyped(responder);
9991
9992 handler.query_filesystem(responder).await;
9993 Ok(())
9994 }
9995
9996 4414537700416816443 => {
9997 let responder = ::fidl_next::Responder::from_untyped(responder);
9998
9999 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10000 Ok(decoded) => {
10001 handler
10002 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
10003 .await;
10004 Ok(())
10005 }
10006 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10007 ordinal: 4414537700416816443,
10008 error,
10009 }),
10010 }
10011 }
10012
10013 3677402239314018056 => {
10014 let responder = ::fidl_next::Responder::from_untyped(responder);
10015
10016 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10017 Ok(decoded) => {
10018 handler
10019 .update_attributes(
10020 ::fidl_next::Request::from_decoded(decoded),
10021 responder,
10022 )
10023 .await;
10024 Ok(())
10025 }
10026 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10027 ordinal: 3677402239314018056,
10028 error,
10029 }),
10030 }
10031 }
10032
10033 3196473584242777161 => {
10034 let responder = ::fidl_next::Responder::from_untyped(responder);
10035
10036 handler.sync(responder).await;
10037 Ok(())
10038 }
10039
10040 5043930208506967771 => {
10041 let responder = ::fidl_next::Responder::from_untyped(responder);
10042
10043 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10044 Ok(decoded) => {
10045 handler
10046 .get_extended_attribute(
10047 ::fidl_next::Request::from_decoded(decoded),
10048 responder,
10049 )
10050 .await;
10051 Ok(())
10052 }
10053 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10054 ordinal: 5043930208506967771,
10055 error,
10056 }),
10057 }
10058 }
10059
10060 5374223046099989052 => {
10061 let responder = ::fidl_next::Responder::from_untyped(responder);
10062
10063 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10064 Ok(decoded) => {
10065 handler
10066 .set_extended_attribute(
10067 ::fidl_next::Request::from_decoded(decoded),
10068 responder,
10069 )
10070 .await;
10071 Ok(())
10072 }
10073 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10074 ordinal: 5374223046099989052,
10075 error,
10076 }),
10077 }
10078 }
10079
10080 8794297771444732717 => {
10081 let responder = ::fidl_next::Responder::from_untyped(responder);
10082
10083 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10084 Ok(decoded) => {
10085 handler
10086 .remove_extended_attribute(
10087 ::fidl_next::Request::from_decoded(decoded),
10088 responder,
10089 )
10090 .await;
10091 Ok(())
10092 }
10093 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10094 ordinal: 8794297771444732717,
10095 error,
10096 }),
10097 }
10098 }
10099
10100 3855785432100874762 => {
10101 let responder = ::fidl_next::Responder::from_untyped(responder);
10102
10103 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10104 Ok(decoded) => {
10105 handler
10106 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
10107 .await;
10108 Ok(())
10109 }
10110 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10111 ordinal: 3855785432100874762,
10112 error,
10113 }),
10114 }
10115 }
10116
10117 1635123508515392625 => {
10118 let responder = ::fidl_next::Responder::from_untyped(responder);
10119
10120 handler.rewind(responder).await;
10121 Ok(())
10122 }
10123
10124 2787337947777369685 => {
10125 let responder = ::fidl_next::Responder::from_untyped(responder);
10126
10127 handler.get_token(responder).await;
10128 Ok(())
10129 }
10130
10131 8360374984291987687 => {
10132 let responder = ::fidl_next::Responder::from_untyped(responder);
10133
10134 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10135 Ok(decoded) => {
10136 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
10137 Ok(())
10138 }
10139 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10140 ordinal: 8360374984291987687,
10141 error,
10142 }),
10143 }
10144 }
10145
10146 8433556716759383021 => {
10147 let responder = ::fidl_next::Responder::from_untyped(responder);
10148
10149 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10150 Ok(decoded) => {
10151 handler
10152 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
10153 .await;
10154 Ok(())
10155 }
10156 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10157 ordinal: 8433556716759383021,
10158 error,
10159 }),
10160 }
10161 }
10162
10163 8097726607824333022 => {
10164 let responder = ::fidl_next::Responder::from_untyped(responder);
10165
10166 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10167 Ok(decoded) => {
10168 handler
10169 .rename(::fidl_next::Request::from_decoded(decoded), responder)
10170 .await;
10171 Ok(())
10172 }
10173 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10174 ordinal: 8097726607824333022,
10175 error,
10176 }),
10177 }
10178 }
10179
10180 2435901052462315657 => {
10181 let responder = ::fidl_next::Responder::from_untyped(responder);
10182
10183 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10184 Ok(decoded) => {
10185 handler
10186 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
10187 .await;
10188 Ok(())
10189 }
10190 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10191 ordinal: 2435901052462315657,
10192 error,
10193 }),
10194 }
10195 }
10196
10197 6275512344170098065 => {
10198 let responder = ::fidl_next::Responder::from_untyped(responder);
10199
10200 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10201 Ok(decoded) => {
10202 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
10203 Ok(())
10204 }
10205 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10206 ordinal: 6275512344170098065,
10207 error,
10208 }),
10209 }
10210 }
10211
10212 ordinal => {
10213 handler.on_unknown_interaction(ordinal).await;
10214 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10215 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10216 } else {
10217 responder
10218 .respond(
10219 ordinal,
10220 flexibility,
10221 ::fidl_next::Flexible::<()>::FrameworkErr(
10222 ::fidl_next::FrameworkError::UnknownMethod,
10223 ),
10224 )
10225 .expect("encoding a framework error should never fail")
10226 .await?;
10227 Ok(())
10228 }
10229 }
10230 }
10231 }
10232}
10233
10234#[derive(PartialEq, Debug)]
10236pub struct Linkable;
10237
10238#[cfg(target_os = "fuchsia")]
10239impl ::fidl_next::HasTransport for Linkable {
10240 type Transport = ::fidl_next::fuchsia::zx::Channel;
10241}
10242
10243pub mod linkable {
10244 pub mod prelude {
10245 pub use crate::{Linkable, LinkableClientHandler, LinkableServerHandler, linkable};
10246
10247 pub use crate::natural::LinkableLinkIntoRequest;
10248
10249 pub use crate::natural::LinkableLinkIntoResponse;
10250 }
10251
10252 pub struct LinkInto;
10253
10254 impl ::fidl_next::Method for LinkInto {
10255 const ORDINAL: u64 = 6121399674497678964;
10256 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10257 ::fidl_next::protocol::Flexibility::Strict;
10258
10259 type Protocol = crate::Linkable;
10260
10261 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
10262 }
10263
10264 impl ::fidl_next::TwoWayMethod for LinkInto {
10265 type Response = ::fidl_next::wire::Result<
10266 'static,
10267 crate::wire::LinkableLinkIntoResponse,
10268 ::fidl_next::wire::Int32,
10269 >;
10270 }
10271
10272 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
10273 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10274
10275 fn respond(response: ___R) -> Self::Output {
10276 ::core::result::Result::Ok(response)
10277 }
10278 }
10279
10280 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
10281 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10282
10283 fn respond_err(response: ___R) -> Self::Output {
10284 ::core::result::Result::Err(response)
10285 }
10286 }
10287
10288 mod ___detail {
10289 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Linkable
10290 where
10291 ___T: ::fidl_next::Transport,
10292 {
10293 type Client = LinkableClient<___T>;
10294 type Server = LinkableServer<___T>;
10295 }
10296
10297 #[repr(transparent)]
10299 pub struct LinkableClient<___T: ::fidl_next::Transport> {
10300 #[allow(dead_code)]
10301 client: ::fidl_next::protocol::Client<___T>,
10302 }
10303
10304 impl<___T> LinkableClient<___T>
10305 where
10306 ___T: ::fidl_next::Transport,
10307 {
10308 #[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"]
10309 pub fn link_into(
10310 &self,
10311
10312 dst_parent_token: impl ::fidl_next::Encode<
10313 ::fidl_next::wire::fuchsia::Event,
10314 <___T as ::fidl_next::Transport>::SendBuffer,
10315 >,
10316
10317 dst: impl ::fidl_next::Encode<
10318 ::fidl_next::wire::String<'static>,
10319 <___T as ::fidl_next::Transport>::SendBuffer,
10320 >,
10321 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
10322 where
10323 <___T as ::fidl_next::Transport>::SendBuffer:
10324 ::fidl_next::encoder::InternalHandleEncoder,
10325 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10326 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10327 {
10328 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
10329 dst_parent_token,
10330
10331 dst,
10332 })
10333 }
10334
10335 #[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"]
10336 pub fn link_into_with<___R>(
10337 &self,
10338 request: ___R,
10339 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
10340 where
10341 ___R: ::fidl_next::Encode<
10342 crate::wire::LinkableLinkIntoRequest<'static>,
10343 <___T as ::fidl_next::Transport>::SendBuffer,
10344 >,
10345 {
10346 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10347 6121399674497678964,
10348 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
10349 request,
10350 ))
10351 }
10352 }
10353
10354 #[repr(transparent)]
10356 pub struct LinkableServer<___T: ::fidl_next::Transport> {
10357 server: ::fidl_next::protocol::Server<___T>,
10358 }
10359
10360 impl<___T> LinkableServer<___T> where ___T: ::fidl_next::Transport {}
10361 }
10362}
10363
10364pub trait LinkableClientHandler<
10368 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10369 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10370>
10371{
10372}
10373
10374impl<___T> LinkableClientHandler<___T> for ::fidl_next::IgnoreEvents where
10375 ___T: ::fidl_next::Transport
10376{
10377}
10378
10379impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Linkable
10380where
10381 ___H: LinkableClientHandler<___T> + ::core::marker::Send,
10382 ___T: ::fidl_next::Transport,
10383{
10384 async fn on_event(
10385 handler: &mut ___H,
10386 ordinal: u64,
10387 flexibility: ::fidl_next::protocol::Flexibility,
10388 body: ::fidl_next::Body<___T>,
10389 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10390 match ordinal {
10391 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
10392 }
10393 }
10394}
10395
10396pub trait LinkableServerHandler<
10400 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10401 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10402>
10403{
10404 #[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"]
10405 fn link_into(
10406 &mut self,
10407
10408 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
10409
10410 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
10411 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10412}
10413
10414impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Linkable
10415where
10416 ___H: LinkableServerHandler<___T> + ::core::marker::Send,
10417 ___T: ::fidl_next::Transport,
10418 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
10419 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10420 Constraint = (),
10421 >,
10422{
10423 async fn on_one_way(
10424 handler: &mut ___H,
10425 ordinal: u64,
10426 flexibility: ::fidl_next::protocol::Flexibility,
10427 body: ::fidl_next::Body<___T>,
10428 ) -> ::core::result::Result<
10429 (),
10430 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10431 > {
10432 match ordinal {
10433 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
10434 }
10435 }
10436
10437 async fn on_two_way(
10438 handler: &mut ___H,
10439 ordinal: u64,
10440 flexibility: ::fidl_next::protocol::Flexibility,
10441 body: ::fidl_next::Body<___T>,
10442 responder: ::fidl_next::protocol::Responder<___T>,
10443 ) -> ::core::result::Result<
10444 (),
10445 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10446 > {
10447 match ordinal {
10448 6121399674497678964 => {
10449 let responder = ::fidl_next::Responder::from_untyped(responder);
10450
10451 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10452 Ok(decoded) => {
10453 handler
10454 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
10455 .await;
10456 Ok(())
10457 }
10458 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10459 ordinal: 6121399674497678964,
10460 error,
10461 }),
10462 }
10463 }
10464
10465 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
10466 }
10467 }
10468}
10469
10470#[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"]
10472#[derive(PartialEq, Debug)]
10473pub struct File;
10474
10475impl ::fidl_next::Discoverable for File {
10476 const PROTOCOL_NAME: &'static str = "fuchsia.io.File";
10477}
10478
10479#[cfg(target_os = "fuchsia")]
10480impl ::fidl_next::HasTransport for File {
10481 type Transport = ::fidl_next::fuchsia::zx::Channel;
10482}
10483
10484pub mod file {
10485 pub mod prelude {
10486 pub use crate::{File, FileClientHandler, FileServerHandler, file};
10487
10488 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
10489
10490 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
10491
10492 pub use crate::natural::ExtendedAttributeValue;
10493
10494 pub use crate::natural::FileAllocateRequest;
10495
10496 pub use crate::natural::FileEnableVerityRequest;
10497
10498 pub use crate::natural::FileGetBackingMemoryRequest;
10499
10500 pub use crate::natural::FileInfo;
10501
10502 pub use crate::natural::FileReadAtRequest;
10503
10504 pub use crate::natural::FileResizeRequest;
10505
10506 pub use crate::natural::FileSeekRequest;
10507
10508 pub use crate::natural::FileWriteAtRequest;
10509
10510 pub use crate::natural::FileAllocateResponse;
10511
10512 pub use crate::natural::FileEnableVerityResponse;
10513
10514 pub use crate::natural::FileGetBackingMemoryResponse;
10515
10516 pub use crate::natural::FileReadAtResponse;
10517
10518 pub use crate::natural::FileResizeResponse;
10519
10520 pub use crate::natural::FileSeekResponse;
10521
10522 pub use crate::natural::FileWriteAtResponse;
10523
10524 pub use crate::natural::LinkableLinkIntoRequest;
10525
10526 pub use crate::natural::LinkableLinkIntoResponse;
10527
10528 pub use crate::natural::MutableNodeAttributes;
10529
10530 pub use crate::natural::NodeAttributes2;
10531
10532 pub use crate::natural::NodeDeprecatedCloneRequest;
10533
10534 pub use crate::natural::NodeDeprecatedGetAttrResponse;
10535
10536 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
10537
10538 pub use crate::natural::NodeDeprecatedSetAttrRequest;
10539
10540 pub use crate::natural::NodeDeprecatedSetAttrResponse;
10541
10542 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
10543
10544 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
10545
10546 pub use crate::natural::NodeGetAttributesRequest;
10547
10548 pub use crate::natural::NodeGetExtendedAttributeRequest;
10549
10550 pub use crate::natural::NodeListExtendedAttributesRequest;
10551
10552 pub use crate::natural::NodeOnOpenRequest;
10553
10554 pub use crate::natural::NodeQueryFilesystemResponse;
10555
10556 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
10557
10558 pub use crate::natural::NodeSetExtendedAttributeRequest;
10559
10560 pub use crate::natural::NodeSetFlagsRequest;
10561
10562 pub use crate::natural::NodeGetFlagsResponse;
10563
10564 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
10565
10566 pub use crate::natural::NodeSetExtendedAttributeResponse;
10567
10568 pub use crate::natural::NodeSetFlagsResponse;
10569
10570 pub use crate::natural::NodeSyncResponse;
10571
10572 pub use crate::natural::NodeUpdateAttributesResponse;
10573
10574 pub use crate::natural::ReadableReadRequest;
10575
10576 pub use crate::natural::ReadableReadResponse;
10577
10578 pub use crate::natural::Representation;
10579
10580 pub use crate::natural::WritableWriteRequest;
10581
10582 pub use crate::natural::WritableWriteResponse;
10583
10584 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
10585
10586 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
10587
10588 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
10589 }
10590
10591 pub struct AdvisoryLock;
10592
10593 impl ::fidl_next::Method for AdvisoryLock {
10594 const ORDINAL: u64 = 7992130864415541162;
10595 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10596 ::fidl_next::protocol::Flexibility::Strict;
10597
10598 type Protocol = crate::File;
10599
10600 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
10601 }
10602
10603 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
10604 type Response = ::fidl_next::wire::Result<
10605 'static,
10606 crate::wire::AdvisoryLockingAdvisoryLockResponse,
10607 ::fidl_next::wire::Int32,
10608 >;
10609 }
10610
10611 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
10612 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10613
10614 fn respond(response: ___R) -> Self::Output {
10615 ::core::result::Result::Ok(response)
10616 }
10617 }
10618
10619 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
10620 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10621
10622 fn respond_err(response: ___R) -> Self::Output {
10623 ::core::result::Result::Err(response)
10624 }
10625 }
10626
10627 pub struct LinkInto;
10628
10629 impl ::fidl_next::Method for LinkInto {
10630 const ORDINAL: u64 = 6121399674497678964;
10631 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10632 ::fidl_next::protocol::Flexibility::Strict;
10633
10634 type Protocol = crate::File;
10635
10636 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
10637 }
10638
10639 impl ::fidl_next::TwoWayMethod for LinkInto {
10640 type Response = ::fidl_next::wire::Result<
10641 'static,
10642 crate::wire::LinkableLinkIntoResponse,
10643 ::fidl_next::wire::Int32,
10644 >;
10645 }
10646
10647 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
10648 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10649
10650 fn respond(response: ___R) -> Self::Output {
10651 ::core::result::Result::Ok(response)
10652 }
10653 }
10654
10655 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
10656 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10657
10658 fn respond_err(response: ___R) -> Self::Output {
10659 ::core::result::Result::Err(response)
10660 }
10661 }
10662
10663 pub struct Clone;
10664
10665 impl ::fidl_next::Method for Clone {
10666 const ORDINAL: u64 = 2366825959783828089;
10667 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10668 ::fidl_next::protocol::Flexibility::Strict;
10669
10670 type Protocol = crate::File;
10671
10672 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
10673 }
10674
10675 pub struct Close;
10676
10677 impl ::fidl_next::Method for Close {
10678 const ORDINAL: u64 = 6540867515453498750;
10679 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10680 ::fidl_next::protocol::Flexibility::Strict;
10681
10682 type Protocol = crate::File;
10683
10684 type Request = ();
10685 }
10686
10687 impl ::fidl_next::TwoWayMethod for Close {
10688 type Response = ::fidl_next::wire::Result<
10689 'static,
10690 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
10691 ::fidl_next::wire::Int32,
10692 >;
10693 }
10694
10695 impl<___R> ::fidl_next::Respond<___R> for Close {
10696 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10697
10698 fn respond(response: ___R) -> Self::Output {
10699 ::core::result::Result::Ok(response)
10700 }
10701 }
10702
10703 impl<___R> ::fidl_next::RespondErr<___R> for Close {
10704 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10705
10706 fn respond_err(response: ___R) -> Self::Output {
10707 ::core::result::Result::Err(response)
10708 }
10709 }
10710
10711 pub struct Query;
10712
10713 impl ::fidl_next::Method for Query {
10714 const ORDINAL: u64 = 2763219980499352582;
10715 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10716 ::fidl_next::protocol::Flexibility::Strict;
10717
10718 type Protocol = crate::File;
10719
10720 type Request = ();
10721 }
10722
10723 impl ::fidl_next::TwoWayMethod for Query {
10724 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
10725 }
10726
10727 impl<___R> ::fidl_next::Respond<___R> for Query {
10728 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
10729
10730 fn respond(response: ___R) -> Self::Output {
10731 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
10732 }
10733 }
10734
10735 pub struct DeprecatedClone;
10736
10737 impl ::fidl_next::Method for DeprecatedClone {
10738 const ORDINAL: u64 = 6512600400724287855;
10739 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10740 ::fidl_next::protocol::Flexibility::Flexible;
10741
10742 type Protocol = crate::File;
10743
10744 type Request = crate::wire::NodeDeprecatedCloneRequest;
10745 }
10746
10747 pub struct OnOpen;
10748
10749 impl ::fidl_next::Method for OnOpen {
10750 const ORDINAL: u64 = 9207534335756671346;
10751 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10752 ::fidl_next::protocol::Flexibility::Flexible;
10753
10754 type Protocol = crate::File;
10755
10756 type Request = crate::wire::NodeOnOpenRequest<'static>;
10757 }
10758
10759 pub struct DeprecatedGetAttr;
10760
10761 impl ::fidl_next::Method for DeprecatedGetAttr {
10762 const ORDINAL: u64 = 8689798978500614909;
10763 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10764 ::fidl_next::protocol::Flexibility::Strict;
10765
10766 type Protocol = crate::File;
10767
10768 type Request = ();
10769 }
10770
10771 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
10772 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
10773 }
10774
10775 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
10776 type Output = ___R;
10777
10778 fn respond(response: ___R) -> Self::Output {
10779 response
10780 }
10781 }
10782
10783 pub struct DeprecatedSetAttr;
10784
10785 impl ::fidl_next::Method for DeprecatedSetAttr {
10786 const ORDINAL: u64 = 4721673413776871238;
10787 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10788 ::fidl_next::protocol::Flexibility::Strict;
10789
10790 type Protocol = crate::File;
10791
10792 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
10793 }
10794
10795 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
10796 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
10797 }
10798
10799 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
10800 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
10801
10802 fn respond(response: ___R) -> Self::Output {
10803 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
10804 }
10805 }
10806
10807 pub struct DeprecatedGetFlags;
10808
10809 impl ::fidl_next::Method for DeprecatedGetFlags {
10810 const ORDINAL: u64 = 6595803110182632097;
10811 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10812 ::fidl_next::protocol::Flexibility::Strict;
10813
10814 type Protocol = crate::File;
10815
10816 type Request = ();
10817 }
10818
10819 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
10820 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
10821 }
10822
10823 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
10824 type Output = ___R;
10825
10826 fn respond(response: ___R) -> Self::Output {
10827 response
10828 }
10829 }
10830
10831 pub struct DeprecatedSetFlags;
10832
10833 impl ::fidl_next::Method for DeprecatedSetFlags {
10834 const ORDINAL: u64 = 5950864159036794675;
10835 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10836 ::fidl_next::protocol::Flexibility::Strict;
10837
10838 type Protocol = crate::File;
10839
10840 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
10841 }
10842
10843 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
10844 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
10845 }
10846
10847 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
10848 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
10849
10850 fn respond(response: ___R) -> Self::Output {
10851 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
10852 }
10853 }
10854
10855 pub struct GetFlags;
10856
10857 impl ::fidl_next::Method for GetFlags {
10858 const ORDINAL: u64 = 105530239381466147;
10859 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10860 ::fidl_next::protocol::Flexibility::Flexible;
10861
10862 type Protocol = crate::File;
10863
10864 type Request = ();
10865 }
10866
10867 impl ::fidl_next::TwoWayMethod for GetFlags {
10868 type Response = ::fidl_next::wire::FlexibleResult<
10869 'static,
10870 crate::wire::NodeGetFlagsResponse,
10871 ::fidl_next::wire::Int32,
10872 >;
10873 }
10874
10875 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
10876 type Output = ::fidl_next::FlexibleResult<
10877 crate::generic::NodeGetFlagsResponse<___R>,
10878 ::fidl_next::util::Never,
10879 >;
10880
10881 fn respond(response: ___R) -> Self::Output {
10882 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
10883 flags: response,
10884 })
10885 }
10886 }
10887
10888 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
10889 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
10890
10891 fn respond_err(response: ___R) -> Self::Output {
10892 ::fidl_next::FlexibleResult::Err(response)
10893 }
10894 }
10895
10896 pub struct SetFlags;
10897
10898 impl ::fidl_next::Method for SetFlags {
10899 const ORDINAL: u64 = 6172186066099445416;
10900 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10901 ::fidl_next::protocol::Flexibility::Flexible;
10902
10903 type Protocol = crate::File;
10904
10905 type Request = crate::wire::NodeSetFlagsRequest;
10906 }
10907
10908 impl ::fidl_next::TwoWayMethod for SetFlags {
10909 type Response = ::fidl_next::wire::FlexibleResult<
10910 'static,
10911 crate::wire::NodeSetFlagsResponse,
10912 ::fidl_next::wire::Int32,
10913 >;
10914 }
10915
10916 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
10917 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
10918
10919 fn respond(response: ___R) -> Self::Output {
10920 ::fidl_next::FlexibleResult::Ok(response)
10921 }
10922 }
10923
10924 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
10925 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
10926
10927 fn respond_err(response: ___R) -> Self::Output {
10928 ::fidl_next::FlexibleResult::Err(response)
10929 }
10930 }
10931
10932 pub struct QueryFilesystem;
10933
10934 impl ::fidl_next::Method for QueryFilesystem {
10935 const ORDINAL: u64 = 8013111122914313744;
10936 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10937 ::fidl_next::protocol::Flexibility::Strict;
10938
10939 type Protocol = crate::File;
10940
10941 type Request = ();
10942 }
10943
10944 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
10945 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
10946 }
10947
10948 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
10949 type Output = ___R;
10950
10951 fn respond(response: ___R) -> Self::Output {
10952 response
10953 }
10954 }
10955
10956 pub struct OnRepresentation;
10957
10958 impl ::fidl_next::Method for OnRepresentation {
10959 const ORDINAL: u64 = 6679970090861613324;
10960 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10961 ::fidl_next::protocol::Flexibility::Strict;
10962
10963 type Protocol = crate::File;
10964
10965 type Request = crate::wire::Representation<'static>;
10966 }
10967
10968 pub struct GetAttributes;
10969
10970 impl ::fidl_next::Method for GetAttributes {
10971 const ORDINAL: u64 = 4414537700416816443;
10972 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10973 ::fidl_next::protocol::Flexibility::Strict;
10974
10975 type Protocol = crate::File;
10976
10977 type Request = crate::wire::NodeGetAttributesRequest;
10978 }
10979
10980 impl ::fidl_next::TwoWayMethod for GetAttributes {
10981 type Response = ::fidl_next::wire::Result<
10982 'static,
10983 crate::wire::NodeAttributes2<'static>,
10984 ::fidl_next::wire::Int32,
10985 >;
10986 }
10987
10988 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
10989 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10990
10991 fn respond(response: ___R) -> Self::Output {
10992 ::core::result::Result::Ok(response)
10993 }
10994 }
10995
10996 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
10997 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10998
10999 fn respond_err(response: ___R) -> Self::Output {
11000 ::core::result::Result::Err(response)
11001 }
11002 }
11003
11004 pub struct UpdateAttributes;
11005
11006 impl ::fidl_next::Method for UpdateAttributes {
11007 const ORDINAL: u64 = 3677402239314018056;
11008 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11009 ::fidl_next::protocol::Flexibility::Strict;
11010
11011 type Protocol = crate::File;
11012
11013 type Request = crate::wire::MutableNodeAttributes<'static>;
11014 }
11015
11016 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
11017 type Response = ::fidl_next::wire::Result<
11018 'static,
11019 crate::wire::NodeUpdateAttributesResponse,
11020 ::fidl_next::wire::Int32,
11021 >;
11022 }
11023
11024 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
11025 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11026
11027 fn respond(response: ___R) -> Self::Output {
11028 ::core::result::Result::Ok(response)
11029 }
11030 }
11031
11032 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
11033 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11034
11035 fn respond_err(response: ___R) -> Self::Output {
11036 ::core::result::Result::Err(response)
11037 }
11038 }
11039
11040 pub struct Sync;
11041
11042 impl ::fidl_next::Method for Sync {
11043 const ORDINAL: u64 = 3196473584242777161;
11044 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11045 ::fidl_next::protocol::Flexibility::Strict;
11046
11047 type Protocol = crate::File;
11048
11049 type Request = ();
11050 }
11051
11052 impl ::fidl_next::TwoWayMethod for Sync {
11053 type Response = ::fidl_next::wire::Result<
11054 'static,
11055 crate::wire::NodeSyncResponse,
11056 ::fidl_next::wire::Int32,
11057 >;
11058 }
11059
11060 impl<___R> ::fidl_next::Respond<___R> for Sync {
11061 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11062
11063 fn respond(response: ___R) -> Self::Output {
11064 ::core::result::Result::Ok(response)
11065 }
11066 }
11067
11068 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
11069 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11070
11071 fn respond_err(response: ___R) -> Self::Output {
11072 ::core::result::Result::Err(response)
11073 }
11074 }
11075
11076 pub struct ListExtendedAttributes;
11077
11078 impl ::fidl_next::Method for ListExtendedAttributes {
11079 const ORDINAL: u64 = 5431626189872037072;
11080 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11081 ::fidl_next::protocol::Flexibility::Strict;
11082
11083 type Protocol = crate::File;
11084
11085 type Request = crate::wire::NodeListExtendedAttributesRequest;
11086 }
11087
11088 pub struct GetExtendedAttribute;
11089
11090 impl ::fidl_next::Method for GetExtendedAttribute {
11091 const ORDINAL: u64 = 5043930208506967771;
11092 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11093 ::fidl_next::protocol::Flexibility::Strict;
11094
11095 type Protocol = crate::File;
11096
11097 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
11098 }
11099
11100 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
11101 type Response = ::fidl_next::wire::Result<
11102 'static,
11103 crate::wire::ExtendedAttributeValue<'static>,
11104 ::fidl_next::wire::Int32,
11105 >;
11106 }
11107
11108 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
11109 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11110
11111 fn respond(response: ___R) -> Self::Output {
11112 ::core::result::Result::Ok(response)
11113 }
11114 }
11115
11116 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
11117 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11118
11119 fn respond_err(response: ___R) -> Self::Output {
11120 ::core::result::Result::Err(response)
11121 }
11122 }
11123
11124 pub struct SetExtendedAttribute;
11125
11126 impl ::fidl_next::Method for SetExtendedAttribute {
11127 const ORDINAL: u64 = 5374223046099989052;
11128 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11129 ::fidl_next::protocol::Flexibility::Strict;
11130
11131 type Protocol = crate::File;
11132
11133 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
11134 }
11135
11136 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
11137 type Response = ::fidl_next::wire::Result<
11138 'static,
11139 crate::wire::NodeSetExtendedAttributeResponse,
11140 ::fidl_next::wire::Int32,
11141 >;
11142 }
11143
11144 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
11145 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11146
11147 fn respond(response: ___R) -> Self::Output {
11148 ::core::result::Result::Ok(response)
11149 }
11150 }
11151
11152 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
11153 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11154
11155 fn respond_err(response: ___R) -> Self::Output {
11156 ::core::result::Result::Err(response)
11157 }
11158 }
11159
11160 pub struct RemoveExtendedAttribute;
11161
11162 impl ::fidl_next::Method for RemoveExtendedAttribute {
11163 const ORDINAL: u64 = 8794297771444732717;
11164 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11165 ::fidl_next::protocol::Flexibility::Strict;
11166
11167 type Protocol = crate::File;
11168
11169 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
11170 }
11171
11172 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
11173 type Response = ::fidl_next::wire::Result<
11174 'static,
11175 crate::wire::NodeRemoveExtendedAttributeResponse,
11176 ::fidl_next::wire::Int32,
11177 >;
11178 }
11179
11180 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
11181 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11182
11183 fn respond(response: ___R) -> Self::Output {
11184 ::core::result::Result::Ok(response)
11185 }
11186 }
11187
11188 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
11189 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11190
11191 fn respond_err(response: ___R) -> Self::Output {
11192 ::core::result::Result::Err(response)
11193 }
11194 }
11195
11196 pub struct Read;
11197
11198 impl ::fidl_next::Method for Read {
11199 const ORDINAL: u64 = 395825947633028830;
11200 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11201 ::fidl_next::protocol::Flexibility::Strict;
11202
11203 type Protocol = crate::File;
11204
11205 type Request = crate::wire::ReadableReadRequest;
11206 }
11207
11208 impl ::fidl_next::TwoWayMethod for Read {
11209 type Response = ::fidl_next::wire::Result<
11210 'static,
11211 crate::wire::ReadableReadResponse<'static>,
11212 ::fidl_next::wire::Int32,
11213 >;
11214 }
11215
11216 impl<___R> ::fidl_next::Respond<___R> for Read {
11217 type Output = ::core::result::Result<
11218 crate::generic::ReadableReadResponse<___R>,
11219 ::fidl_next::util::Never,
11220 >;
11221
11222 fn respond(response: ___R) -> Self::Output {
11223 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
11224 }
11225 }
11226
11227 impl<___R> ::fidl_next::RespondErr<___R> for Read {
11228 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11229
11230 fn respond_err(response: ___R) -> Self::Output {
11231 ::core::result::Result::Err(response)
11232 }
11233 }
11234
11235 pub struct Write;
11236
11237 impl ::fidl_next::Method for Write {
11238 const ORDINAL: u64 = 7651971425397809026;
11239 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11240 ::fidl_next::protocol::Flexibility::Strict;
11241
11242 type Protocol = crate::File;
11243
11244 type Request = crate::wire::WritableWriteRequest<'static>;
11245 }
11246
11247 impl ::fidl_next::TwoWayMethod for Write {
11248 type Response = ::fidl_next::wire::Result<
11249 'static,
11250 crate::wire::WritableWriteResponse,
11251 ::fidl_next::wire::Int32,
11252 >;
11253 }
11254
11255 impl<___R> ::fidl_next::Respond<___R> for Write {
11256 type Output = ::core::result::Result<
11257 crate::generic::WritableWriteResponse<___R>,
11258 ::fidl_next::util::Never,
11259 >;
11260
11261 fn respond(response: ___R) -> Self::Output {
11262 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
11263 actual_count: response,
11264 })
11265 }
11266 }
11267
11268 impl<___R> ::fidl_next::RespondErr<___R> for Write {
11269 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11270
11271 fn respond_err(response: ___R) -> Self::Output {
11272 ::core::result::Result::Err(response)
11273 }
11274 }
11275
11276 pub struct Describe;
11277
11278 impl ::fidl_next::Method for Describe {
11279 const ORDINAL: u64 = 7545125870053689020;
11280 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11281 ::fidl_next::protocol::Flexibility::Strict;
11282
11283 type Protocol = crate::File;
11284
11285 type Request = ();
11286 }
11287
11288 impl ::fidl_next::TwoWayMethod for Describe {
11289 type Response = crate::wire::FileInfo<'static>;
11290 }
11291
11292 impl<___R> ::fidl_next::Respond<___R> for Describe {
11293 type Output = ___R;
11294
11295 fn respond(response: ___R) -> Self::Output {
11296 response
11297 }
11298 }
11299
11300 pub struct Seek;
11301
11302 impl ::fidl_next::Method for Seek {
11303 const ORDINAL: u64 = 8649041485622956551;
11304 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11305 ::fidl_next::protocol::Flexibility::Strict;
11306
11307 type Protocol = crate::File;
11308
11309 type Request = crate::wire::FileSeekRequest;
11310 }
11311
11312 impl ::fidl_next::TwoWayMethod for Seek {
11313 type Response = ::fidl_next::wire::Result<
11314 'static,
11315 crate::wire::FileSeekResponse,
11316 ::fidl_next::wire::Int32,
11317 >;
11318 }
11319
11320 impl<___R> ::fidl_next::Respond<___R> for Seek {
11321 type Output = ::core::result::Result<
11322 crate::generic::FileSeekResponse<___R>,
11323 ::fidl_next::util::Never,
11324 >;
11325
11326 fn respond(response: ___R) -> Self::Output {
11327 ::core::result::Result::Ok(crate::generic::FileSeekResponse {
11328 offset_from_start: response,
11329 })
11330 }
11331 }
11332
11333 impl<___R> ::fidl_next::RespondErr<___R> for Seek {
11334 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11335
11336 fn respond_err(response: ___R) -> Self::Output {
11337 ::core::result::Result::Err(response)
11338 }
11339 }
11340
11341 pub struct ReadAt;
11342
11343 impl ::fidl_next::Method for ReadAt {
11344 const ORDINAL: u64 = 1587416148701180478;
11345 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11346 ::fidl_next::protocol::Flexibility::Strict;
11347
11348 type Protocol = crate::File;
11349
11350 type Request = crate::wire::FileReadAtRequest;
11351 }
11352
11353 impl ::fidl_next::TwoWayMethod for ReadAt {
11354 type Response = ::fidl_next::wire::Result<
11355 'static,
11356 crate::wire::FileReadAtResponse<'static>,
11357 ::fidl_next::wire::Int32,
11358 >;
11359 }
11360
11361 impl<___R> ::fidl_next::Respond<___R> for ReadAt {
11362 type Output = ::core::result::Result<
11363 crate::generic::FileReadAtResponse<___R>,
11364 ::fidl_next::util::Never,
11365 >;
11366
11367 fn respond(response: ___R) -> Self::Output {
11368 ::core::result::Result::Ok(crate::generic::FileReadAtResponse { data: response })
11369 }
11370 }
11371
11372 impl<___R> ::fidl_next::RespondErr<___R> for ReadAt {
11373 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11374
11375 fn respond_err(response: ___R) -> Self::Output {
11376 ::core::result::Result::Err(response)
11377 }
11378 }
11379
11380 pub struct WriteAt;
11381
11382 impl ::fidl_next::Method for WriteAt {
11383 const ORDINAL: u64 = 8736683935131400491;
11384 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11385 ::fidl_next::protocol::Flexibility::Strict;
11386
11387 type Protocol = crate::File;
11388
11389 type Request = crate::wire::FileWriteAtRequest<'static>;
11390 }
11391
11392 impl ::fidl_next::TwoWayMethod for WriteAt {
11393 type Response = ::fidl_next::wire::Result<
11394 'static,
11395 crate::wire::FileWriteAtResponse,
11396 ::fidl_next::wire::Int32,
11397 >;
11398 }
11399
11400 impl<___R> ::fidl_next::Respond<___R> for WriteAt {
11401 type Output = ::core::result::Result<
11402 crate::generic::FileWriteAtResponse<___R>,
11403 ::fidl_next::util::Never,
11404 >;
11405
11406 fn respond(response: ___R) -> Self::Output {
11407 ::core::result::Result::Ok(crate::generic::FileWriteAtResponse {
11408 actual_count: response,
11409 })
11410 }
11411 }
11412
11413 impl<___R> ::fidl_next::RespondErr<___R> for WriteAt {
11414 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11415
11416 fn respond_err(response: ___R) -> Self::Output {
11417 ::core::result::Result::Err(response)
11418 }
11419 }
11420
11421 pub struct Resize;
11422
11423 impl ::fidl_next::Method for Resize {
11424 const ORDINAL: u64 = 3134648685270758458;
11425 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11426 ::fidl_next::protocol::Flexibility::Strict;
11427
11428 type Protocol = crate::File;
11429
11430 type Request = crate::wire::FileResizeRequest;
11431 }
11432
11433 impl ::fidl_next::TwoWayMethod for Resize {
11434 type Response = ::fidl_next::wire::Result<
11435 'static,
11436 crate::wire::FileResizeResponse,
11437 ::fidl_next::wire::Int32,
11438 >;
11439 }
11440
11441 impl<___R> ::fidl_next::Respond<___R> for Resize {
11442 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11443
11444 fn respond(response: ___R) -> Self::Output {
11445 ::core::result::Result::Ok(response)
11446 }
11447 }
11448
11449 impl<___R> ::fidl_next::RespondErr<___R> for Resize {
11450 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11451
11452 fn respond_err(response: ___R) -> Self::Output {
11453 ::core::result::Result::Err(response)
11454 }
11455 }
11456
11457 pub struct GetBackingMemory;
11458
11459 impl ::fidl_next::Method for GetBackingMemory {
11460 const ORDINAL: u64 = 46911652864194091;
11461 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11462 ::fidl_next::protocol::Flexibility::Strict;
11463
11464 type Protocol = crate::File;
11465
11466 type Request = crate::wire::FileGetBackingMemoryRequest;
11467 }
11468
11469 impl ::fidl_next::TwoWayMethod for GetBackingMemory {
11470 type Response = ::fidl_next::wire::Result<
11471 'static,
11472 crate::wire::FileGetBackingMemoryResponse,
11473 ::fidl_next::wire::Int32,
11474 >;
11475 }
11476
11477 impl<___R> ::fidl_next::Respond<___R> for GetBackingMemory {
11478 type Output = ::core::result::Result<
11479 crate::generic::FileGetBackingMemoryResponse<___R>,
11480 ::fidl_next::util::Never,
11481 >;
11482
11483 fn respond(response: ___R) -> Self::Output {
11484 ::core::result::Result::Ok(crate::generic::FileGetBackingMemoryResponse {
11485 vmo: response,
11486 })
11487 }
11488 }
11489
11490 impl<___R> ::fidl_next::RespondErr<___R> for GetBackingMemory {
11491 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11492
11493 fn respond_err(response: ___R) -> Self::Output {
11494 ::core::result::Result::Err(response)
11495 }
11496 }
11497
11498 pub struct Allocate;
11499
11500 impl ::fidl_next::Method for Allocate {
11501 const ORDINAL: u64 = 8645235848064269614;
11502 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11503 ::fidl_next::protocol::Flexibility::Flexible;
11504
11505 type Protocol = crate::File;
11506
11507 type Request = crate::wire::FileAllocateRequest;
11508 }
11509
11510 impl ::fidl_next::TwoWayMethod for Allocate {
11511 type Response = ::fidl_next::wire::FlexibleResult<
11512 'static,
11513 crate::wire::FileAllocateResponse,
11514 ::fidl_next::wire::Int32,
11515 >;
11516 }
11517
11518 impl<___R> ::fidl_next::Respond<___R> for Allocate {
11519 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
11520
11521 fn respond(response: ___R) -> Self::Output {
11522 ::fidl_next::FlexibleResult::Ok(response)
11523 }
11524 }
11525
11526 impl<___R> ::fidl_next::RespondErr<___R> for Allocate {
11527 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
11528
11529 fn respond_err(response: ___R) -> Self::Output {
11530 ::fidl_next::FlexibleResult::Err(response)
11531 }
11532 }
11533
11534 pub struct EnableVerity;
11535
11536 impl ::fidl_next::Method for EnableVerity {
11537 const ORDINAL: u64 = 3189145313204943035;
11538 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11539 ::fidl_next::protocol::Flexibility::Flexible;
11540
11541 type Protocol = crate::File;
11542
11543 type Request = crate::wire::FileEnableVerityRequest<'static>;
11544 }
11545
11546 impl ::fidl_next::TwoWayMethod for EnableVerity {
11547 type Response = ::fidl_next::wire::FlexibleResult<
11548 'static,
11549 crate::wire::FileEnableVerityResponse,
11550 ::fidl_next::wire::Int32,
11551 >;
11552 }
11553
11554 impl<___R> ::fidl_next::Respond<___R> for EnableVerity {
11555 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
11556
11557 fn respond(response: ___R) -> Self::Output {
11558 ::fidl_next::FlexibleResult::Ok(response)
11559 }
11560 }
11561
11562 impl<___R> ::fidl_next::RespondErr<___R> for EnableVerity {
11563 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
11564
11565 fn respond_err(response: ___R) -> Self::Output {
11566 ::fidl_next::FlexibleResult::Err(response)
11567 }
11568 }
11569
11570 mod ___detail {
11571 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::File
11572 where
11573 ___T: ::fidl_next::Transport,
11574 {
11575 type Client = FileClient<___T>;
11576 type Server = FileServer<___T>;
11577 }
11578
11579 #[repr(transparent)]
11581 pub struct FileClient<___T: ::fidl_next::Transport> {
11582 #[allow(dead_code)]
11583 client: ::fidl_next::protocol::Client<___T>,
11584 }
11585
11586 impl<___T> FileClient<___T>
11587 where
11588 ___T: ::fidl_next::Transport,
11589 {
11590 #[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"]
11591 pub fn advisory_lock(
11592 &self,
11593
11594 request: impl ::fidl_next::Encode<
11595 crate::wire::AdvisoryLockRequest<'static>,
11596 <___T as ::fidl_next::Transport>::SendBuffer,
11597 >,
11598 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
11599 where
11600 <___T as ::fidl_next::Transport>::SendBuffer:
11601 ::fidl_next::encoder::InternalHandleEncoder,
11602 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11603 {
11604 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
11605 request,
11606 })
11607 }
11608
11609 #[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"]
11610 pub fn advisory_lock_with<___R>(
11611 &self,
11612 request: ___R,
11613 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
11614 where
11615 ___R: ::fidl_next::Encode<
11616 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
11617 <___T as ::fidl_next::Transport>::SendBuffer,
11618 >,
11619 {
11620 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11621 7992130864415541162,
11622 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
11623 request,
11624 ))
11625 }
11626
11627 #[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"]
11628 pub fn link_into(
11629 &self,
11630
11631 dst_parent_token: impl ::fidl_next::Encode<
11632 ::fidl_next::wire::fuchsia::Event,
11633 <___T as ::fidl_next::Transport>::SendBuffer,
11634 >,
11635
11636 dst: impl ::fidl_next::Encode<
11637 ::fidl_next::wire::String<'static>,
11638 <___T as ::fidl_next::Transport>::SendBuffer,
11639 >,
11640 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
11641 where
11642 <___T as ::fidl_next::Transport>::SendBuffer:
11643 ::fidl_next::encoder::InternalHandleEncoder,
11644 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11645 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11646 {
11647 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
11648 dst_parent_token,
11649
11650 dst,
11651 })
11652 }
11653
11654 #[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"]
11655 pub fn link_into_with<___R>(
11656 &self,
11657 request: ___R,
11658 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
11659 where
11660 ___R: ::fidl_next::Encode<
11661 crate::wire::LinkableLinkIntoRequest<'static>,
11662 <___T as ::fidl_next::Transport>::SendBuffer,
11663 >,
11664 {
11665 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11666 6121399674497678964,
11667 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
11668 request,
11669 ))
11670 }
11671
11672 pub fn clone(
11673 &self,
11674
11675 request: impl ::fidl_next::Encode<
11676 ::fidl_next::ServerEnd<
11677 ::fidl_next_fuchsia_unknown::Cloneable,
11678 ::fidl_next::wire::fuchsia::Channel,
11679 >,
11680 <___T as ::fidl_next::Transport>::SendBuffer,
11681 >,
11682 ) -> ::fidl_next::SendFuture<'_, ___T>
11683 where
11684 <___T as ::fidl_next::Transport>::SendBuffer:
11685 ::fidl_next::encoder::InternalHandleEncoder,
11686 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11687 {
11688 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
11689 request,
11690 })
11691 }
11692
11693 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
11694 where
11695 ___R: ::fidl_next::Encode<
11696 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
11697 <___T as ::fidl_next::Transport>::SendBuffer,
11698 >,
11699 {
11700 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
11701 2366825959783828089,
11702 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
11703 request,
11704 ))
11705 }
11706
11707 #[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"]
11708 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
11709 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11710 6540867515453498750,
11711 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
11712 (),
11713 ))
11714 }
11715
11716 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
11717 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11718 2763219980499352582,
11719 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
11720 (),
11721 ))
11722 }
11723
11724 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11725 pub fn deprecated_clone(
11726 &self,
11727
11728 flags: impl ::fidl_next::Encode<
11729 crate::wire::OpenFlags,
11730 <___T as ::fidl_next::Transport>::SendBuffer,
11731 >,
11732
11733 object: impl ::fidl_next::Encode<
11734 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
11735 <___T as ::fidl_next::Transport>::SendBuffer,
11736 >,
11737 ) -> ::fidl_next::SendFuture<'_, ___T>
11738 where
11739 <___T as ::fidl_next::Transport>::SendBuffer:
11740 ::fidl_next::encoder::InternalHandleEncoder,
11741 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11742 {
11743 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
11744 flags,
11745
11746 object,
11747 })
11748 }
11749
11750 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11751 pub fn deprecated_clone_with<___R>(
11752 &self,
11753 request: ___R,
11754 ) -> ::fidl_next::SendFuture<'_, ___T>
11755 where
11756 ___R: ::fidl_next::Encode<
11757 crate::wire::NodeDeprecatedCloneRequest,
11758 <___T as ::fidl_next::Transport>::SendBuffer,
11759 >,
11760 {
11761 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
11762 6512600400724287855,
11763 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
11764 request,
11765 ))
11766 }
11767
11768 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
11769 pub fn deprecated_get_attr(
11770 &self,
11771 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
11772 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11773 8689798978500614909,
11774 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
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(self.client.send_two_way(
11827 6595803110182632097,
11828 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
11829 (),
11830 ))
11831 }
11832
11833 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11834 pub fn deprecated_set_flags(
11835 &self,
11836
11837 flags: impl ::fidl_next::Encode<
11838 crate::wire::OpenFlags,
11839 <___T as ::fidl_next::Transport>::SendBuffer,
11840 >,
11841 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
11842 where
11843 <___T as ::fidl_next::Transport>::SendBuffer:
11844 ::fidl_next::encoder::InternalHandleEncoder,
11845 {
11846 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
11847 flags,
11848 })
11849 }
11850
11851 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11852 pub fn deprecated_set_flags_with<___R>(
11853 &self,
11854 request: ___R,
11855 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
11856 where
11857 ___R: ::fidl_next::Encode<
11858 crate::wire::NodeDeprecatedSetFlagsRequest,
11859 <___T as ::fidl_next::Transport>::SendBuffer,
11860 >,
11861 {
11862 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11863 5950864159036794675,
11864 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
11865 request,
11866 ))
11867 }
11868
11869 #[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"]
11870 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
11871 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11872 105530239381466147,
11873 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
11874 (),
11875 ))
11876 }
11877
11878 #[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"]
11879 pub fn set_flags(
11880 &self,
11881
11882 flags: impl ::fidl_next::Encode<
11883 crate::wire::Flags,
11884 <___T as ::fidl_next::Transport>::SendBuffer,
11885 >,
11886 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
11887 where
11888 <___T as ::fidl_next::Transport>::SendBuffer:
11889 ::fidl_next::encoder::InternalHandleEncoder,
11890 {
11891 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
11892 }
11893
11894 #[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"]
11895 pub fn set_flags_with<___R>(
11896 &self,
11897 request: ___R,
11898 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
11899 where
11900 ___R: ::fidl_next::Encode<
11901 crate::wire::NodeSetFlagsRequest,
11902 <___T as ::fidl_next::Transport>::SendBuffer,
11903 >,
11904 {
11905 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11906 6172186066099445416,
11907 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
11908 request,
11909 ))
11910 }
11911
11912 #[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"]
11913 pub fn query_filesystem(
11914 &self,
11915 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
11916 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11917 8013111122914313744,
11918 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
11919 (),
11920 ))
11921 }
11922
11923 #[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"]
11924 pub fn get_attributes(
11925 &self,
11926
11927 query: impl ::fidl_next::Encode<
11928 crate::wire::NodeAttributesQuery,
11929 <___T as ::fidl_next::Transport>::SendBuffer,
11930 >,
11931 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
11932 where
11933 <___T as ::fidl_next::Transport>::SendBuffer:
11934 ::fidl_next::encoder::InternalHandleEncoder,
11935 {
11936 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
11937 }
11938
11939 #[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"]
11940 pub fn get_attributes_with<___R>(
11941 &self,
11942 request: ___R,
11943 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
11944 where
11945 ___R: ::fidl_next::Encode<
11946 crate::wire::NodeGetAttributesRequest,
11947 <___T as ::fidl_next::Transport>::SendBuffer,
11948 >,
11949 {
11950 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11951 4414537700416816443,
11952 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
11953 request,
11954 ))
11955 }
11956
11957 #[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"]
11958 pub fn update_attributes_with<___R>(
11959 &self,
11960 request: ___R,
11961 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
11962 where
11963 ___R: ::fidl_next::Encode<
11964 crate::wire::MutableNodeAttributes<'static>,
11965 <___T as ::fidl_next::Transport>::SendBuffer,
11966 >,
11967 {
11968 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11969 3677402239314018056,
11970 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
11971 request,
11972 ))
11973 }
11974
11975 #[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"]
11976 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
11977 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11978 3196473584242777161,
11979 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
11980 (),
11981 ))
11982 }
11983
11984 #[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"]
11985 pub fn list_extended_attributes(
11986 &self,
11987
11988 iterator: impl ::fidl_next::Encode<
11989 ::fidl_next::ServerEnd<
11990 crate::ExtendedAttributeIterator,
11991 ::fidl_next::wire::fuchsia::Channel,
11992 >,
11993 <___T as ::fidl_next::Transport>::SendBuffer,
11994 >,
11995 ) -> ::fidl_next::SendFuture<'_, ___T>
11996 where
11997 <___T as ::fidl_next::Transport>::SendBuffer:
11998 ::fidl_next::encoder::InternalHandleEncoder,
11999 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12000 {
12001 self.list_extended_attributes_with(
12002 crate::generic::NodeListExtendedAttributesRequest { iterator },
12003 )
12004 }
12005
12006 #[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"]
12007 pub fn list_extended_attributes_with<___R>(
12008 &self,
12009 request: ___R,
12010 ) -> ::fidl_next::SendFuture<'_, ___T>
12011 where
12012 ___R: ::fidl_next::Encode<
12013 crate::wire::NodeListExtendedAttributesRequest,
12014 <___T as ::fidl_next::Transport>::SendBuffer,
12015 >,
12016 {
12017 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
12018 5431626189872037072,
12019 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
12020 request,
12021 ))
12022 }
12023
12024 #[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"]
12025 pub fn get_extended_attribute(
12026 &self,
12027
12028 name: impl ::fidl_next::Encode<
12029 ::fidl_next::wire::Vector<'static, u8>,
12030 <___T as ::fidl_next::Transport>::SendBuffer,
12031 >,
12032 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
12033 where
12034 <___T as ::fidl_next::Transport>::SendBuffer:
12035 ::fidl_next::encoder::InternalHandleEncoder,
12036 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12037 {
12038 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
12039 name,
12040 })
12041 }
12042
12043 #[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"]
12044 pub fn get_extended_attribute_with<___R>(
12045 &self,
12046 request: ___R,
12047 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
12048 where
12049 ___R: ::fidl_next::Encode<
12050 crate::wire::NodeGetExtendedAttributeRequest<'static>,
12051 <___T as ::fidl_next::Transport>::SendBuffer,
12052 >,
12053 {
12054 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12055 5043930208506967771,
12056 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
12057 request,
12058 ))
12059 }
12060
12061 #[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"]
12062 pub fn set_extended_attribute(
12063 &self,
12064
12065 name: impl ::fidl_next::Encode<
12066 ::fidl_next::wire::Vector<'static, u8>,
12067 <___T as ::fidl_next::Transport>::SendBuffer,
12068 >,
12069
12070 value: impl ::fidl_next::Encode<
12071 crate::wire::ExtendedAttributeValue<'static>,
12072 <___T as ::fidl_next::Transport>::SendBuffer,
12073 >,
12074
12075 mode: impl ::fidl_next::Encode<
12076 crate::wire::SetExtendedAttributeMode,
12077 <___T as ::fidl_next::Transport>::SendBuffer,
12078 >,
12079 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
12080 where
12081 <___T as ::fidl_next::Transport>::SendBuffer:
12082 ::fidl_next::encoder::InternalHandleEncoder,
12083 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12084 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12085 {
12086 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
12087 name,
12088
12089 value,
12090
12091 mode,
12092 })
12093 }
12094
12095 #[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"]
12096 pub fn set_extended_attribute_with<___R>(
12097 &self,
12098 request: ___R,
12099 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
12100 where
12101 ___R: ::fidl_next::Encode<
12102 crate::wire::NodeSetExtendedAttributeRequest<'static>,
12103 <___T as ::fidl_next::Transport>::SendBuffer,
12104 >,
12105 {
12106 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12107 5374223046099989052,
12108 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
12109 request,
12110 ))
12111 }
12112
12113 #[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"]
12114 pub fn remove_extended_attribute(
12115 &self,
12116
12117 name: impl ::fidl_next::Encode<
12118 ::fidl_next::wire::Vector<'static, u8>,
12119 <___T as ::fidl_next::Transport>::SendBuffer,
12120 >,
12121 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
12122 where
12123 <___T as ::fidl_next::Transport>::SendBuffer:
12124 ::fidl_next::encoder::InternalHandleEncoder,
12125 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12126 {
12127 self.remove_extended_attribute_with(
12128 crate::generic::NodeRemoveExtendedAttributeRequest { name },
12129 )
12130 }
12131
12132 #[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"]
12133 pub fn remove_extended_attribute_with<___R>(
12134 &self,
12135 request: ___R,
12136 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
12137 where
12138 ___R: ::fidl_next::Encode<
12139 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
12140 <___T as ::fidl_next::Transport>::SendBuffer,
12141 >,
12142 {
12143 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12144 8794297771444732717,
12145 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
12146 request,
12147 ))
12148 }
12149
12150 #[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"]
12151 pub fn read(
12152 &self,
12153
12154 count: impl ::fidl_next::Encode<
12155 ::fidl_next::wire::Uint64,
12156 <___T as ::fidl_next::Transport>::SendBuffer,
12157 >,
12158 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
12159 where
12160 <___T as ::fidl_next::Transport>::SendBuffer:
12161 ::fidl_next::encoder::InternalHandleEncoder,
12162 {
12163 self.read_with(crate::generic::ReadableReadRequest { count })
12164 }
12165
12166 #[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"]
12167 pub fn read_with<___R>(
12168 &self,
12169 request: ___R,
12170 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
12171 where
12172 ___R: ::fidl_next::Encode<
12173 crate::wire::ReadableReadRequest,
12174 <___T as ::fidl_next::Transport>::SendBuffer,
12175 >,
12176 {
12177 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12178 395825947633028830,
12179 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
12180 request,
12181 ))
12182 }
12183
12184 #[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"]
12185 pub fn write(
12186 &self,
12187
12188 data: impl ::fidl_next::Encode<
12189 ::fidl_next::wire::Vector<'static, u8>,
12190 <___T as ::fidl_next::Transport>::SendBuffer,
12191 >,
12192 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
12193 where
12194 <___T as ::fidl_next::Transport>::SendBuffer:
12195 ::fidl_next::encoder::InternalHandleEncoder,
12196 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12197 {
12198 self.write_with(crate::generic::WritableWriteRequest { data })
12199 }
12200
12201 #[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"]
12202 pub fn write_with<___R>(
12203 &self,
12204 request: ___R,
12205 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
12206 where
12207 ___R: ::fidl_next::Encode<
12208 crate::wire::WritableWriteRequest<'static>,
12209 <___T as ::fidl_next::Transport>::SendBuffer,
12210 >,
12211 {
12212 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12213 7651971425397809026,
12214 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
12215 request,
12216 ))
12217 }
12218
12219 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
12220 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12221 7545125870053689020,
12222 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
12223 (),
12224 ))
12225 }
12226
12227 #[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"]
12228 pub fn seek(
12229 &self,
12230
12231 origin: impl ::fidl_next::Encode<
12232 crate::wire::SeekOrigin,
12233 <___T as ::fidl_next::Transport>::SendBuffer,
12234 >,
12235
12236 offset: impl ::fidl_next::Encode<
12237 ::fidl_next::wire::Int64,
12238 <___T as ::fidl_next::Transport>::SendBuffer,
12239 >,
12240 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
12241 where
12242 <___T as ::fidl_next::Transport>::SendBuffer:
12243 ::fidl_next::encoder::InternalHandleEncoder,
12244 {
12245 self.seek_with(crate::generic::FileSeekRequest { origin, offset })
12246 }
12247
12248 #[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"]
12249 pub fn seek_with<___R>(
12250 &self,
12251 request: ___R,
12252 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
12253 where
12254 ___R: ::fidl_next::Encode<
12255 crate::wire::FileSeekRequest,
12256 <___T as ::fidl_next::Transport>::SendBuffer,
12257 >,
12258 {
12259 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12260 8649041485622956551,
12261 <super::Seek as ::fidl_next::Method>::FLEXIBILITY,
12262 request,
12263 ))
12264 }
12265
12266 #[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"]
12267 pub fn read_at(
12268 &self,
12269
12270 count: impl ::fidl_next::Encode<
12271 ::fidl_next::wire::Uint64,
12272 <___T as ::fidl_next::Transport>::SendBuffer,
12273 >,
12274
12275 offset: impl ::fidl_next::Encode<
12276 ::fidl_next::wire::Uint64,
12277 <___T as ::fidl_next::Transport>::SendBuffer,
12278 >,
12279 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
12280 where
12281 <___T as ::fidl_next::Transport>::SendBuffer:
12282 ::fidl_next::encoder::InternalHandleEncoder,
12283 {
12284 self.read_at_with(crate::generic::FileReadAtRequest { count, offset })
12285 }
12286
12287 #[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"]
12288 pub fn read_at_with<___R>(
12289 &self,
12290 request: ___R,
12291 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
12292 where
12293 ___R: ::fidl_next::Encode<
12294 crate::wire::FileReadAtRequest,
12295 <___T as ::fidl_next::Transport>::SendBuffer,
12296 >,
12297 {
12298 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12299 1587416148701180478,
12300 <super::ReadAt as ::fidl_next::Method>::FLEXIBILITY,
12301 request,
12302 ))
12303 }
12304
12305 #[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"]
12306 pub fn write_at(
12307 &self,
12308
12309 data: impl ::fidl_next::Encode<
12310 ::fidl_next::wire::Vector<'static, u8>,
12311 <___T as ::fidl_next::Transport>::SendBuffer,
12312 >,
12313
12314 offset: impl ::fidl_next::Encode<
12315 ::fidl_next::wire::Uint64,
12316 <___T as ::fidl_next::Transport>::SendBuffer,
12317 >,
12318 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
12319 where
12320 <___T as ::fidl_next::Transport>::SendBuffer:
12321 ::fidl_next::encoder::InternalHandleEncoder,
12322 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12323 {
12324 self.write_at_with(crate::generic::FileWriteAtRequest { data, offset })
12325 }
12326
12327 #[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"]
12328 pub fn write_at_with<___R>(
12329 &self,
12330 request: ___R,
12331 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
12332 where
12333 ___R: ::fidl_next::Encode<
12334 crate::wire::FileWriteAtRequest<'static>,
12335 <___T as ::fidl_next::Transport>::SendBuffer,
12336 >,
12337 {
12338 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12339 8736683935131400491,
12340 <super::WriteAt as ::fidl_next::Method>::FLEXIBILITY,
12341 request,
12342 ))
12343 }
12344
12345 #[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"]
12346 pub fn resize(
12347 &self,
12348
12349 length: impl ::fidl_next::Encode<
12350 ::fidl_next::wire::Uint64,
12351 <___T as ::fidl_next::Transport>::SendBuffer,
12352 >,
12353 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
12354 where
12355 <___T as ::fidl_next::Transport>::SendBuffer:
12356 ::fidl_next::encoder::InternalHandleEncoder,
12357 {
12358 self.resize_with(crate::generic::FileResizeRequest { length })
12359 }
12360
12361 #[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"]
12362 pub fn resize_with<___R>(
12363 &self,
12364 request: ___R,
12365 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
12366 where
12367 ___R: ::fidl_next::Encode<
12368 crate::wire::FileResizeRequest,
12369 <___T as ::fidl_next::Transport>::SendBuffer,
12370 >,
12371 {
12372 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12373 3134648685270758458,
12374 <super::Resize as ::fidl_next::Method>::FLEXIBILITY,
12375 request,
12376 ))
12377 }
12378
12379 #[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"]
12380 pub fn get_backing_memory(
12381 &self,
12382
12383 flags: impl ::fidl_next::Encode<
12384 crate::wire::VmoFlags,
12385 <___T as ::fidl_next::Transport>::SendBuffer,
12386 >,
12387 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
12388 where
12389 <___T as ::fidl_next::Transport>::SendBuffer:
12390 ::fidl_next::encoder::InternalHandleEncoder,
12391 {
12392 self.get_backing_memory_with(crate::generic::FileGetBackingMemoryRequest { flags })
12393 }
12394
12395 #[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"]
12396 pub fn get_backing_memory_with<___R>(
12397 &self,
12398 request: ___R,
12399 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
12400 where
12401 ___R: ::fidl_next::Encode<
12402 crate::wire::FileGetBackingMemoryRequest,
12403 <___T as ::fidl_next::Transport>::SendBuffer,
12404 >,
12405 {
12406 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12407 46911652864194091,
12408 <super::GetBackingMemory as ::fidl_next::Method>::FLEXIBILITY,
12409 request,
12410 ))
12411 }
12412
12413 #[doc = " Pre-allocate on-disk space for this file.\n"]
12414 pub fn allocate(
12415 &self,
12416
12417 offset: impl ::fidl_next::Encode<
12418 ::fidl_next::wire::Uint64,
12419 <___T as ::fidl_next::Transport>::SendBuffer,
12420 >,
12421
12422 length: impl ::fidl_next::Encode<
12423 ::fidl_next::wire::Uint64,
12424 <___T as ::fidl_next::Transport>::SendBuffer,
12425 >,
12426
12427 mode: impl ::fidl_next::Encode<
12428 crate::wire::AllocateMode,
12429 <___T as ::fidl_next::Transport>::SendBuffer,
12430 >,
12431 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
12432 where
12433 <___T as ::fidl_next::Transport>::SendBuffer:
12434 ::fidl_next::encoder::InternalHandleEncoder,
12435 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12436 {
12437 self.allocate_with(crate::generic::FileAllocateRequest { offset, length, mode })
12438 }
12439
12440 #[doc = " Pre-allocate on-disk space for this file.\n"]
12441 pub fn allocate_with<___R>(
12442 &self,
12443 request: ___R,
12444 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
12445 where
12446 ___R: ::fidl_next::Encode<
12447 crate::wire::FileAllocateRequest,
12448 <___T as ::fidl_next::Transport>::SendBuffer,
12449 >,
12450 {
12451 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12452 8645235848064269614,
12453 <super::Allocate as ::fidl_next::Method>::FLEXIBILITY,
12454 request,
12455 ))
12456 }
12457
12458 #[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"]
12459 pub fn enable_verity(
12460 &self,
12461
12462 options: impl ::fidl_next::Encode<
12463 crate::wire::VerificationOptions<'static>,
12464 <___T as ::fidl_next::Transport>::SendBuffer,
12465 >,
12466 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
12467 where
12468 <___T as ::fidl_next::Transport>::SendBuffer:
12469 ::fidl_next::encoder::InternalHandleEncoder,
12470 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12471 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12472 {
12473 self.enable_verity_with(crate::generic::FileEnableVerityRequest { options })
12474 }
12475
12476 #[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"]
12477 pub fn enable_verity_with<___R>(
12478 &self,
12479 request: ___R,
12480 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
12481 where
12482 ___R: ::fidl_next::Encode<
12483 crate::wire::FileEnableVerityRequest<'static>,
12484 <___T as ::fidl_next::Transport>::SendBuffer,
12485 >,
12486 {
12487 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12488 3189145313204943035,
12489 <super::EnableVerity as ::fidl_next::Method>::FLEXIBILITY,
12490 request,
12491 ))
12492 }
12493 }
12494
12495 #[repr(transparent)]
12497 pub struct FileServer<___T: ::fidl_next::Transport> {
12498 server: ::fidl_next::protocol::Server<___T>,
12499 }
12500
12501 impl<___T> FileServer<___T>
12502 where
12503 ___T: ::fidl_next::Transport,
12504 {
12505 #[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"]
12506 pub fn on_open(
12507 &self,
12508
12509 s: impl ::fidl_next::Encode<
12510 ::fidl_next::wire::Int32,
12511 <___T as ::fidl_next::Transport>::SendBuffer,
12512 >,
12513
12514 info: impl ::fidl_next::Encode<
12515 crate::wire_optional::NodeInfoDeprecated<'static>,
12516 <___T as ::fidl_next::Transport>::SendBuffer,
12517 >,
12518 ) -> ::fidl_next::SendFuture<'_, ___T>
12519 where
12520 <___T as ::fidl_next::Transport>::SendBuffer:
12521 ::fidl_next::encoder::InternalHandleEncoder,
12522 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12523 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12524 {
12525 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
12526 }
12527
12528 #[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"]
12529
12530 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
12531 where
12532 ___R: ::fidl_next::Encode<
12533 <super::OnOpen as ::fidl_next::Method>::Request,
12534 <___T as ::fidl_next::Transport>::SendBuffer,
12535 >,
12536 {
12537 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
12538 9207534335756671346,
12539 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
12540 request,
12541 ))
12542 }
12543
12544 #[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"]
12545
12546 pub fn on_representation_with<___R>(
12547 &self,
12548 request: ___R,
12549 ) -> ::fidl_next::SendFuture<'_, ___T>
12550 where
12551 ___R: ::fidl_next::Encode<
12552 <super::OnRepresentation as ::fidl_next::Method>::Request,
12553 <___T as ::fidl_next::Transport>::SendBuffer,
12554 >,
12555 {
12556 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
12557 6679970090861613324,
12558 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
12559 request,
12560 ))
12561 }
12562 }
12563 }
12564}
12565
12566pub trait FileClientHandler<
12570 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12571 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12572>
12573{
12574 #[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"]
12575 fn on_open(
12576 &mut self,
12577
12578 request: ::fidl_next::Request<file::OnOpen, ___T>,
12579 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12580
12581 #[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"]
12582 fn on_representation(
12583 &mut self,
12584
12585 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
12586 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12587
12588 fn on_unknown_interaction(
12589 &mut self,
12590 ordinal: u64,
12591 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12592 ::core::future::ready(())
12593 }
12594}
12595
12596impl<___T> FileClientHandler<___T> for ::fidl_next::IgnoreEvents
12597where
12598 ___T: ::fidl_next::Transport,
12599{
12600 async fn on_open(&mut self, _: ::fidl_next::Request<file::OnOpen, ___T>) {}
12601
12602 async fn on_representation(&mut self, _: ::fidl_next::Request<file::OnRepresentation, ___T>) {}
12603
12604 async fn on_unknown_interaction(&mut self, _: u64) {}
12605}
12606
12607impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for File
12608where
12609 ___H: FileClientHandler<___T> + ::core::marker::Send,
12610 ___T: ::fidl_next::Transport,
12611 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
12612 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12613 Constraint = (),
12614 >,
12615 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
12616 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12617 Constraint = (),
12618 >,
12619{
12620 async fn on_event(
12621 handler: &mut ___H,
12622 ordinal: u64,
12623 flexibility: ::fidl_next::protocol::Flexibility,
12624 body: ::fidl_next::Body<___T>,
12625 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12626 match ordinal {
12627 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
12628 Ok(decoded) => {
12629 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
12630 Ok(())
12631 }
12632 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12633 ordinal: 9207534335756671346,
12634 error,
12635 }),
12636 },
12637
12638 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
12639 Ok(decoded) => {
12640 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
12641 Ok(())
12642 }
12643 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12644 ordinal: 6679970090861613324,
12645 error,
12646 }),
12647 },
12648
12649 ordinal => {
12650 handler.on_unknown_interaction(ordinal).await;
12651 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12652 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12653 } else {
12654 Ok(())
12655 }
12656 }
12657 }
12658 }
12659}
12660
12661pub trait FileServerHandler<
12665 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12666 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12667>
12668{
12669 #[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"]
12670 fn advisory_lock(
12671 &mut self,
12672
12673 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
12674
12675 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
12676 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12677
12678 #[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"]
12679 fn link_into(
12680 &mut self,
12681
12682 request: ::fidl_next::Request<file::LinkInto, ___T>,
12683
12684 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
12685 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12686
12687 fn clone(
12688 &mut self,
12689
12690 request: ::fidl_next::Request<file::Clone, ___T>,
12691 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12692
12693 #[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"]
12694 fn close(
12695 &mut self,
12696
12697 responder: ::fidl_next::Responder<file::Close, ___T>,
12698 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12699
12700 fn query(
12701 &mut self,
12702
12703 responder: ::fidl_next::Responder<file::Query, ___T>,
12704 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12705
12706 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
12707 fn deprecated_clone(
12708 &mut self,
12709
12710 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
12711 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12712
12713 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
12714 fn deprecated_get_attr(
12715 &mut self,
12716
12717 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
12718 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12719
12720 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
12721 fn deprecated_set_attr(
12722 &mut self,
12723
12724 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
12725
12726 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
12727 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12728
12729 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
12730 fn deprecated_get_flags(
12731 &mut self,
12732
12733 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
12734 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12735
12736 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
12737 fn deprecated_set_flags(
12738 &mut self,
12739
12740 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
12741
12742 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
12743 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12744
12745 #[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"]
12746 fn get_flags(
12747 &mut self,
12748
12749 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
12750 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12751
12752 #[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"]
12753 fn set_flags(
12754 &mut self,
12755
12756 request: ::fidl_next::Request<file::SetFlags, ___T>,
12757
12758 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
12759 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12760
12761 #[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"]
12762 fn query_filesystem(
12763 &mut self,
12764
12765 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
12766 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12767
12768 #[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"]
12769 fn get_attributes(
12770 &mut self,
12771
12772 request: ::fidl_next::Request<file::GetAttributes, ___T>,
12773
12774 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
12775 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12776
12777 #[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"]
12778 fn update_attributes(
12779 &mut self,
12780
12781 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
12782
12783 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
12784 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12785
12786 #[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"]
12787 fn sync(
12788 &mut self,
12789
12790 responder: ::fidl_next::Responder<file::Sync, ___T>,
12791 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12792
12793 #[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"]
12794 fn list_extended_attributes(
12795 &mut self,
12796
12797 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
12798 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12799
12800 #[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"]
12801 fn get_extended_attribute(
12802 &mut self,
12803
12804 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
12805
12806 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
12807 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12808
12809 #[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"]
12810 fn set_extended_attribute(
12811 &mut self,
12812
12813 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
12814
12815 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
12816 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12817
12818 #[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"]
12819 fn remove_extended_attribute(
12820 &mut self,
12821
12822 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
12823
12824 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
12825 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12826
12827 #[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"]
12828 fn read(
12829 &mut self,
12830
12831 request: ::fidl_next::Request<file::Read, ___T>,
12832
12833 responder: ::fidl_next::Responder<file::Read, ___T>,
12834 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12835
12836 #[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"]
12837 fn write(
12838 &mut self,
12839
12840 request: ::fidl_next::Request<file::Write, ___T>,
12841
12842 responder: ::fidl_next::Responder<file::Write, ___T>,
12843 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12844
12845 fn describe(
12846 &mut self,
12847
12848 responder: ::fidl_next::Responder<file::Describe, ___T>,
12849 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12850
12851 #[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"]
12852 fn seek(
12853 &mut self,
12854
12855 request: ::fidl_next::Request<file::Seek, ___T>,
12856
12857 responder: ::fidl_next::Responder<file::Seek, ___T>,
12858 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12859
12860 #[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"]
12861 fn read_at(
12862 &mut self,
12863
12864 request: ::fidl_next::Request<file::ReadAt, ___T>,
12865
12866 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
12867 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12868
12869 #[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"]
12870 fn write_at(
12871 &mut self,
12872
12873 request: ::fidl_next::Request<file::WriteAt, ___T>,
12874
12875 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
12876 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12877
12878 #[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"]
12879 fn resize(
12880 &mut self,
12881
12882 request: ::fidl_next::Request<file::Resize, ___T>,
12883
12884 responder: ::fidl_next::Responder<file::Resize, ___T>,
12885 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12886
12887 #[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"]
12888 fn get_backing_memory(
12889 &mut self,
12890
12891 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
12892
12893 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
12894 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12895
12896 #[doc = " Pre-allocate on-disk space for this file.\n"]
12897 fn allocate(
12898 &mut self,
12899
12900 request: ::fidl_next::Request<file::Allocate, ___T>,
12901
12902 responder: ::fidl_next::Responder<file::Allocate, ___T>,
12903 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12904
12905 #[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"]
12906 fn enable_verity(
12907 &mut self,
12908
12909 request: ::fidl_next::Request<file::EnableVerity, ___T>,
12910
12911 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
12912 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12913
12914 fn on_unknown_interaction(
12915 &mut self,
12916 ordinal: u64,
12917 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12918 ::core::future::ready(())
12919 }
12920}
12921
12922impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for File
12923where
12924 ___H: FileServerHandler<___T> + ::core::marker::Send,
12925 ___T: ::fidl_next::Transport,
12926 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
12927 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12928 Constraint = (),
12929 >,
12930 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12931 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12932 Constraint = (),
12933 >,
12934 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
12935 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12936 Constraint = (),
12937 >,
12938 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
12939 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12940 Constraint = (),
12941 >,
12942 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
12943 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12944 Constraint = (),
12945 >,
12946 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
12947 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12948 Constraint = (),
12949 >,
12950 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
12951 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12952 Constraint = (),
12953 >,
12954 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
12955 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12956 Constraint = (),
12957 >,
12958 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
12959 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12960 Constraint = (),
12961 >,
12962 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
12963 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12964 Constraint = (),
12965 >,
12966 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
12967 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12968 Constraint = (),
12969 >,
12970 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
12971 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12972 Constraint = (),
12973 >,
12974 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
12975 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12976 Constraint = (),
12977 >,
12978 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
12979 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12980 Constraint = (),
12981 >,
12982 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
12983 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12984 Constraint = (),
12985 >,
12986 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
12987 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12988 Constraint = (),
12989 >,
12990 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
12991 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12992 Constraint = (),
12993 >,
12994 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
12995 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12996 Constraint = (),
12997 >,
12998 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
12999 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13000 Constraint = (),
13001 >,
13002 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
13003 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13004 Constraint = (),
13005 >,
13006 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
13007 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13008 Constraint = (),
13009 >,
13010 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
13011 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13012 Constraint = (),
13013 >,
13014{
13015 async fn on_one_way(
13016 handler: &mut ___H,
13017 ordinal: u64,
13018 flexibility: ::fidl_next::protocol::Flexibility,
13019 body: ::fidl_next::Body<___T>,
13020 ) -> ::core::result::Result<
13021 (),
13022 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13023 > {
13024 match ordinal {
13025 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
13026 Ok(decoded) => {
13027 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
13028 Ok(())
13029 }
13030 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13031 ordinal: 2366825959783828089,
13032 error,
13033 }),
13034 },
13035
13036 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
13037 Ok(decoded) => {
13038 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
13039 Ok(())
13040 }
13041 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13042 ordinal: 6512600400724287855,
13043 error,
13044 }),
13045 },
13046
13047 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
13048 Ok(decoded) => {
13049 handler
13050 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
13051 .await;
13052 Ok(())
13053 }
13054 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13055 ordinal: 5431626189872037072,
13056 error,
13057 }),
13058 },
13059
13060 ordinal => {
13061 handler.on_unknown_interaction(ordinal).await;
13062 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13063 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13064 } else {
13065 Ok(())
13066 }
13067 }
13068 }
13069 }
13070
13071 async fn on_two_way(
13072 handler: &mut ___H,
13073 ordinal: u64,
13074 flexibility: ::fidl_next::protocol::Flexibility,
13075 body: ::fidl_next::Body<___T>,
13076 responder: ::fidl_next::protocol::Responder<___T>,
13077 ) -> ::core::result::Result<
13078 (),
13079 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13080 > {
13081 match ordinal {
13082 7992130864415541162 => {
13083 let responder = ::fidl_next::Responder::from_untyped(responder);
13084
13085 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13086 Ok(decoded) => {
13087 handler
13088 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
13089 .await;
13090 Ok(())
13091 }
13092 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13093 ordinal: 7992130864415541162,
13094 error,
13095 }),
13096 }
13097 }
13098
13099 6121399674497678964 => {
13100 let responder = ::fidl_next::Responder::from_untyped(responder);
13101
13102 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13103 Ok(decoded) => {
13104 handler
13105 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
13106 .await;
13107 Ok(())
13108 }
13109 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13110 ordinal: 6121399674497678964,
13111 error,
13112 }),
13113 }
13114 }
13115
13116 6540867515453498750 => {
13117 let responder = ::fidl_next::Responder::from_untyped(responder);
13118
13119 handler.close(responder).await;
13120 Ok(())
13121 }
13122
13123 2763219980499352582 => {
13124 let responder = ::fidl_next::Responder::from_untyped(responder);
13125
13126 handler.query(responder).await;
13127 Ok(())
13128 }
13129
13130 8689798978500614909 => {
13131 let responder = ::fidl_next::Responder::from_untyped(responder);
13132
13133 handler.deprecated_get_attr(responder).await;
13134 Ok(())
13135 }
13136
13137 4721673413776871238 => {
13138 let responder = ::fidl_next::Responder::from_untyped(responder);
13139
13140 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13141 Ok(decoded) => {
13142 handler
13143 .deprecated_set_attr(
13144 ::fidl_next::Request::from_decoded(decoded),
13145 responder,
13146 )
13147 .await;
13148 Ok(())
13149 }
13150 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13151 ordinal: 4721673413776871238,
13152 error,
13153 }),
13154 }
13155 }
13156
13157 6595803110182632097 => {
13158 let responder = ::fidl_next::Responder::from_untyped(responder);
13159
13160 handler.deprecated_get_flags(responder).await;
13161 Ok(())
13162 }
13163
13164 5950864159036794675 => {
13165 let responder = ::fidl_next::Responder::from_untyped(responder);
13166
13167 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13168 Ok(decoded) => {
13169 handler
13170 .deprecated_set_flags(
13171 ::fidl_next::Request::from_decoded(decoded),
13172 responder,
13173 )
13174 .await;
13175 Ok(())
13176 }
13177 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13178 ordinal: 5950864159036794675,
13179 error,
13180 }),
13181 }
13182 }
13183
13184 105530239381466147 => {
13185 let responder = ::fidl_next::Responder::from_untyped(responder);
13186
13187 handler.get_flags(responder).await;
13188 Ok(())
13189 }
13190
13191 6172186066099445416 => {
13192 let responder = ::fidl_next::Responder::from_untyped(responder);
13193
13194 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13195 Ok(decoded) => {
13196 handler
13197 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
13198 .await;
13199 Ok(())
13200 }
13201 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13202 ordinal: 6172186066099445416,
13203 error,
13204 }),
13205 }
13206 }
13207
13208 8013111122914313744 => {
13209 let responder = ::fidl_next::Responder::from_untyped(responder);
13210
13211 handler.query_filesystem(responder).await;
13212 Ok(())
13213 }
13214
13215 4414537700416816443 => {
13216 let responder = ::fidl_next::Responder::from_untyped(responder);
13217
13218 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13219 Ok(decoded) => {
13220 handler
13221 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
13222 .await;
13223 Ok(())
13224 }
13225 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13226 ordinal: 4414537700416816443,
13227 error,
13228 }),
13229 }
13230 }
13231
13232 3677402239314018056 => {
13233 let responder = ::fidl_next::Responder::from_untyped(responder);
13234
13235 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13236 Ok(decoded) => {
13237 handler
13238 .update_attributes(
13239 ::fidl_next::Request::from_decoded(decoded),
13240 responder,
13241 )
13242 .await;
13243 Ok(())
13244 }
13245 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13246 ordinal: 3677402239314018056,
13247 error,
13248 }),
13249 }
13250 }
13251
13252 3196473584242777161 => {
13253 let responder = ::fidl_next::Responder::from_untyped(responder);
13254
13255 handler.sync(responder).await;
13256 Ok(())
13257 }
13258
13259 5043930208506967771 => {
13260 let responder = ::fidl_next::Responder::from_untyped(responder);
13261
13262 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13263 Ok(decoded) => {
13264 handler
13265 .get_extended_attribute(
13266 ::fidl_next::Request::from_decoded(decoded),
13267 responder,
13268 )
13269 .await;
13270 Ok(())
13271 }
13272 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13273 ordinal: 5043930208506967771,
13274 error,
13275 }),
13276 }
13277 }
13278
13279 5374223046099989052 => {
13280 let responder = ::fidl_next::Responder::from_untyped(responder);
13281
13282 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13283 Ok(decoded) => {
13284 handler
13285 .set_extended_attribute(
13286 ::fidl_next::Request::from_decoded(decoded),
13287 responder,
13288 )
13289 .await;
13290 Ok(())
13291 }
13292 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13293 ordinal: 5374223046099989052,
13294 error,
13295 }),
13296 }
13297 }
13298
13299 8794297771444732717 => {
13300 let responder = ::fidl_next::Responder::from_untyped(responder);
13301
13302 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13303 Ok(decoded) => {
13304 handler
13305 .remove_extended_attribute(
13306 ::fidl_next::Request::from_decoded(decoded),
13307 responder,
13308 )
13309 .await;
13310 Ok(())
13311 }
13312 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13313 ordinal: 8794297771444732717,
13314 error,
13315 }),
13316 }
13317 }
13318
13319 395825947633028830 => {
13320 let responder = ::fidl_next::Responder::from_untyped(responder);
13321
13322 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13323 Ok(decoded) => {
13324 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
13325 Ok(())
13326 }
13327 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13328 ordinal: 395825947633028830,
13329 error,
13330 }),
13331 }
13332 }
13333
13334 7651971425397809026 => {
13335 let responder = ::fidl_next::Responder::from_untyped(responder);
13336
13337 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13338 Ok(decoded) => {
13339 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
13340 Ok(())
13341 }
13342 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13343 ordinal: 7651971425397809026,
13344 error,
13345 }),
13346 }
13347 }
13348
13349 7545125870053689020 => {
13350 let responder = ::fidl_next::Responder::from_untyped(responder);
13351
13352 handler.describe(responder).await;
13353 Ok(())
13354 }
13355
13356 8649041485622956551 => {
13357 let responder = ::fidl_next::Responder::from_untyped(responder);
13358
13359 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13360 Ok(decoded) => {
13361 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
13362 Ok(())
13363 }
13364 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13365 ordinal: 8649041485622956551,
13366 error,
13367 }),
13368 }
13369 }
13370
13371 1587416148701180478 => {
13372 let responder = ::fidl_next::Responder::from_untyped(responder);
13373
13374 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13375 Ok(decoded) => {
13376 handler
13377 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
13378 .await;
13379 Ok(())
13380 }
13381 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13382 ordinal: 1587416148701180478,
13383 error,
13384 }),
13385 }
13386 }
13387
13388 8736683935131400491 => {
13389 let responder = ::fidl_next::Responder::from_untyped(responder);
13390
13391 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13392 Ok(decoded) => {
13393 handler
13394 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
13395 .await;
13396 Ok(())
13397 }
13398 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13399 ordinal: 8736683935131400491,
13400 error,
13401 }),
13402 }
13403 }
13404
13405 3134648685270758458 => {
13406 let responder = ::fidl_next::Responder::from_untyped(responder);
13407
13408 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13409 Ok(decoded) => {
13410 handler
13411 .resize(::fidl_next::Request::from_decoded(decoded), responder)
13412 .await;
13413 Ok(())
13414 }
13415 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13416 ordinal: 3134648685270758458,
13417 error,
13418 }),
13419 }
13420 }
13421
13422 46911652864194091 => {
13423 let responder = ::fidl_next::Responder::from_untyped(responder);
13424
13425 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13426 Ok(decoded) => {
13427 handler
13428 .get_backing_memory(
13429 ::fidl_next::Request::from_decoded(decoded),
13430 responder,
13431 )
13432 .await;
13433 Ok(())
13434 }
13435 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13436 ordinal: 46911652864194091,
13437 error,
13438 }),
13439 }
13440 }
13441
13442 8645235848064269614 => {
13443 let responder = ::fidl_next::Responder::from_untyped(responder);
13444
13445 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13446 Ok(decoded) => {
13447 handler
13448 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
13449 .await;
13450 Ok(())
13451 }
13452 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13453 ordinal: 8645235848064269614,
13454 error,
13455 }),
13456 }
13457 }
13458
13459 3189145313204943035 => {
13460 let responder = ::fidl_next::Responder::from_untyped(responder);
13461
13462 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13463 Ok(decoded) => {
13464 handler
13465 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
13466 .await;
13467 Ok(())
13468 }
13469 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13470 ordinal: 3189145313204943035,
13471 error,
13472 }),
13473 }
13474 }
13475
13476 ordinal => {
13477 handler.on_unknown_interaction(ordinal).await;
13478 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13479 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13480 } else {
13481 responder
13482 .respond(
13483 ordinal,
13484 flexibility,
13485 ::fidl_next::Flexible::<()>::FrameworkErr(
13486 ::fidl_next::FrameworkError::UnknownMethod,
13487 ),
13488 )
13489 .expect("encoding a framework error should never fail")
13490 .await?;
13491 Ok(())
13492 }
13493 }
13494 }
13495 }
13496}
13497
13498#[doc = " A [\'Node\'] which contains a symbolic link.\n"]
13500#[derive(PartialEq, Debug)]
13501pub struct Symlink;
13502
13503impl ::fidl_next::Discoverable for Symlink {
13504 const PROTOCOL_NAME: &'static str = "fuchsia.io.Symlink";
13505}
13506
13507#[cfg(target_os = "fuchsia")]
13508impl ::fidl_next::HasTransport for Symlink {
13509 type Transport = ::fidl_next::fuchsia::zx::Channel;
13510}
13511
13512pub mod symlink {
13513 pub mod prelude {
13514 pub use crate::{Symlink, SymlinkClientHandler, SymlinkServerHandler, symlink};
13515
13516 pub use crate::natural::ExtendedAttributeValue;
13517
13518 pub use crate::natural::LinkableLinkIntoRequest;
13519
13520 pub use crate::natural::LinkableLinkIntoResponse;
13521
13522 pub use crate::natural::MutableNodeAttributes;
13523
13524 pub use crate::natural::NodeAttributes2;
13525
13526 pub use crate::natural::NodeDeprecatedCloneRequest;
13527
13528 pub use crate::natural::NodeDeprecatedGetAttrResponse;
13529
13530 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
13531
13532 pub use crate::natural::NodeDeprecatedSetAttrRequest;
13533
13534 pub use crate::natural::NodeDeprecatedSetAttrResponse;
13535
13536 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
13537
13538 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
13539
13540 pub use crate::natural::NodeGetAttributesRequest;
13541
13542 pub use crate::natural::NodeGetExtendedAttributeRequest;
13543
13544 pub use crate::natural::NodeListExtendedAttributesRequest;
13545
13546 pub use crate::natural::NodeOnOpenRequest;
13547
13548 pub use crate::natural::NodeQueryFilesystemResponse;
13549
13550 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
13551
13552 pub use crate::natural::NodeSetExtendedAttributeRequest;
13553
13554 pub use crate::natural::NodeSetFlagsRequest;
13555
13556 pub use crate::natural::NodeGetFlagsResponse;
13557
13558 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
13559
13560 pub use crate::natural::NodeSetExtendedAttributeResponse;
13561
13562 pub use crate::natural::NodeSetFlagsResponse;
13563
13564 pub use crate::natural::NodeSyncResponse;
13565
13566 pub use crate::natural::NodeUpdateAttributesResponse;
13567
13568 pub use crate::natural::Representation;
13569
13570 pub use crate::natural::SymlinkInfo;
13571
13572 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
13573
13574 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
13575
13576 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
13577 }
13578
13579 pub struct LinkInto;
13580
13581 impl ::fidl_next::Method for LinkInto {
13582 const ORDINAL: u64 = 6121399674497678964;
13583 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13584 ::fidl_next::protocol::Flexibility::Strict;
13585
13586 type Protocol = crate::Symlink;
13587
13588 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
13589 }
13590
13591 impl ::fidl_next::TwoWayMethod for LinkInto {
13592 type Response = ::fidl_next::wire::Result<
13593 'static,
13594 crate::wire::LinkableLinkIntoResponse,
13595 ::fidl_next::wire::Int32,
13596 >;
13597 }
13598
13599 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
13600 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13601
13602 fn respond(response: ___R) -> Self::Output {
13603 ::core::result::Result::Ok(response)
13604 }
13605 }
13606
13607 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
13608 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13609
13610 fn respond_err(response: ___R) -> Self::Output {
13611 ::core::result::Result::Err(response)
13612 }
13613 }
13614
13615 pub struct Clone;
13616
13617 impl ::fidl_next::Method for Clone {
13618 const ORDINAL: u64 = 2366825959783828089;
13619 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13620 ::fidl_next::protocol::Flexibility::Strict;
13621
13622 type Protocol = crate::Symlink;
13623
13624 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
13625 }
13626
13627 pub struct Close;
13628
13629 impl ::fidl_next::Method for Close {
13630 const ORDINAL: u64 = 6540867515453498750;
13631 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13632 ::fidl_next::protocol::Flexibility::Strict;
13633
13634 type Protocol = crate::Symlink;
13635
13636 type Request = ();
13637 }
13638
13639 impl ::fidl_next::TwoWayMethod for Close {
13640 type Response = ::fidl_next::wire::Result<
13641 'static,
13642 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
13643 ::fidl_next::wire::Int32,
13644 >;
13645 }
13646
13647 impl<___R> ::fidl_next::Respond<___R> for Close {
13648 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13649
13650 fn respond(response: ___R) -> Self::Output {
13651 ::core::result::Result::Ok(response)
13652 }
13653 }
13654
13655 impl<___R> ::fidl_next::RespondErr<___R> for Close {
13656 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13657
13658 fn respond_err(response: ___R) -> Self::Output {
13659 ::core::result::Result::Err(response)
13660 }
13661 }
13662
13663 pub struct Query;
13664
13665 impl ::fidl_next::Method for Query {
13666 const ORDINAL: u64 = 2763219980499352582;
13667 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13668 ::fidl_next::protocol::Flexibility::Strict;
13669
13670 type Protocol = crate::Symlink;
13671
13672 type Request = ();
13673 }
13674
13675 impl ::fidl_next::TwoWayMethod for Query {
13676 type Response = ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
13677 }
13678
13679 impl<___R> ::fidl_next::Respond<___R> for Query {
13680 type Output = ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
13681
13682 fn respond(response: ___R) -> Self::Output {
13683 ::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
13684 }
13685 }
13686
13687 pub struct DeprecatedClone;
13688
13689 impl ::fidl_next::Method for DeprecatedClone {
13690 const ORDINAL: u64 = 6512600400724287855;
13691 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13692 ::fidl_next::protocol::Flexibility::Flexible;
13693
13694 type Protocol = crate::Symlink;
13695
13696 type Request = crate::wire::NodeDeprecatedCloneRequest;
13697 }
13698
13699 pub struct OnOpen;
13700
13701 impl ::fidl_next::Method for OnOpen {
13702 const ORDINAL: u64 = 9207534335756671346;
13703 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13704 ::fidl_next::protocol::Flexibility::Flexible;
13705
13706 type Protocol = crate::Symlink;
13707
13708 type Request = crate::wire::NodeOnOpenRequest<'static>;
13709 }
13710
13711 pub struct DeprecatedGetAttr;
13712
13713 impl ::fidl_next::Method for DeprecatedGetAttr {
13714 const ORDINAL: u64 = 8689798978500614909;
13715 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13716 ::fidl_next::protocol::Flexibility::Strict;
13717
13718 type Protocol = crate::Symlink;
13719
13720 type Request = ();
13721 }
13722
13723 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
13724 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
13725 }
13726
13727 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
13728 type Output = ___R;
13729
13730 fn respond(response: ___R) -> Self::Output {
13731 response
13732 }
13733 }
13734
13735 pub struct DeprecatedSetAttr;
13736
13737 impl ::fidl_next::Method for DeprecatedSetAttr {
13738 const ORDINAL: u64 = 4721673413776871238;
13739 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13740 ::fidl_next::protocol::Flexibility::Strict;
13741
13742 type Protocol = crate::Symlink;
13743
13744 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
13745 }
13746
13747 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
13748 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
13749 }
13750
13751 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
13752 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
13753
13754 fn respond(response: ___R) -> Self::Output {
13755 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
13756 }
13757 }
13758
13759 pub struct DeprecatedGetFlags;
13760
13761 impl ::fidl_next::Method for DeprecatedGetFlags {
13762 const ORDINAL: u64 = 6595803110182632097;
13763 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13764 ::fidl_next::protocol::Flexibility::Strict;
13765
13766 type Protocol = crate::Symlink;
13767
13768 type Request = ();
13769 }
13770
13771 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
13772 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
13773 }
13774
13775 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
13776 type Output = ___R;
13777
13778 fn respond(response: ___R) -> Self::Output {
13779 response
13780 }
13781 }
13782
13783 pub struct DeprecatedSetFlags;
13784
13785 impl ::fidl_next::Method for DeprecatedSetFlags {
13786 const ORDINAL: u64 = 5950864159036794675;
13787 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13788 ::fidl_next::protocol::Flexibility::Strict;
13789
13790 type Protocol = crate::Symlink;
13791
13792 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
13793 }
13794
13795 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
13796 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
13797 }
13798
13799 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
13800 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
13801
13802 fn respond(response: ___R) -> Self::Output {
13803 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
13804 }
13805 }
13806
13807 pub struct GetFlags;
13808
13809 impl ::fidl_next::Method for GetFlags {
13810 const ORDINAL: u64 = 105530239381466147;
13811 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13812 ::fidl_next::protocol::Flexibility::Flexible;
13813
13814 type Protocol = crate::Symlink;
13815
13816 type Request = ();
13817 }
13818
13819 impl ::fidl_next::TwoWayMethod for GetFlags {
13820 type Response = ::fidl_next::wire::FlexibleResult<
13821 'static,
13822 crate::wire::NodeGetFlagsResponse,
13823 ::fidl_next::wire::Int32,
13824 >;
13825 }
13826
13827 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
13828 type Output = ::fidl_next::FlexibleResult<
13829 crate::generic::NodeGetFlagsResponse<___R>,
13830 ::fidl_next::util::Never,
13831 >;
13832
13833 fn respond(response: ___R) -> Self::Output {
13834 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
13835 flags: response,
13836 })
13837 }
13838 }
13839
13840 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
13841 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13842
13843 fn respond_err(response: ___R) -> Self::Output {
13844 ::fidl_next::FlexibleResult::Err(response)
13845 }
13846 }
13847
13848 pub struct SetFlags;
13849
13850 impl ::fidl_next::Method for SetFlags {
13851 const ORDINAL: u64 = 6172186066099445416;
13852 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13853 ::fidl_next::protocol::Flexibility::Flexible;
13854
13855 type Protocol = crate::Symlink;
13856
13857 type Request = crate::wire::NodeSetFlagsRequest;
13858 }
13859
13860 impl ::fidl_next::TwoWayMethod for SetFlags {
13861 type Response = ::fidl_next::wire::FlexibleResult<
13862 'static,
13863 crate::wire::NodeSetFlagsResponse,
13864 ::fidl_next::wire::Int32,
13865 >;
13866 }
13867
13868 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
13869 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13870
13871 fn respond(response: ___R) -> Self::Output {
13872 ::fidl_next::FlexibleResult::Ok(response)
13873 }
13874 }
13875
13876 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
13877 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13878
13879 fn respond_err(response: ___R) -> Self::Output {
13880 ::fidl_next::FlexibleResult::Err(response)
13881 }
13882 }
13883
13884 pub struct QueryFilesystem;
13885
13886 impl ::fidl_next::Method for QueryFilesystem {
13887 const ORDINAL: u64 = 8013111122914313744;
13888 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13889 ::fidl_next::protocol::Flexibility::Strict;
13890
13891 type Protocol = crate::Symlink;
13892
13893 type Request = ();
13894 }
13895
13896 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
13897 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
13898 }
13899
13900 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
13901 type Output = ___R;
13902
13903 fn respond(response: ___R) -> Self::Output {
13904 response
13905 }
13906 }
13907
13908 pub struct OnRepresentation;
13909
13910 impl ::fidl_next::Method for OnRepresentation {
13911 const ORDINAL: u64 = 6679970090861613324;
13912 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13913 ::fidl_next::protocol::Flexibility::Strict;
13914
13915 type Protocol = crate::Symlink;
13916
13917 type Request = crate::wire::Representation<'static>;
13918 }
13919
13920 pub struct GetAttributes;
13921
13922 impl ::fidl_next::Method for GetAttributes {
13923 const ORDINAL: u64 = 4414537700416816443;
13924 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13925 ::fidl_next::protocol::Flexibility::Strict;
13926
13927 type Protocol = crate::Symlink;
13928
13929 type Request = crate::wire::NodeGetAttributesRequest;
13930 }
13931
13932 impl ::fidl_next::TwoWayMethod for GetAttributes {
13933 type Response = ::fidl_next::wire::Result<
13934 'static,
13935 crate::wire::NodeAttributes2<'static>,
13936 ::fidl_next::wire::Int32,
13937 >;
13938 }
13939
13940 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
13941 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13942
13943 fn respond(response: ___R) -> Self::Output {
13944 ::core::result::Result::Ok(response)
13945 }
13946 }
13947
13948 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
13949 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13950
13951 fn respond_err(response: ___R) -> Self::Output {
13952 ::core::result::Result::Err(response)
13953 }
13954 }
13955
13956 pub struct UpdateAttributes;
13957
13958 impl ::fidl_next::Method for UpdateAttributes {
13959 const ORDINAL: u64 = 3677402239314018056;
13960 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13961 ::fidl_next::protocol::Flexibility::Strict;
13962
13963 type Protocol = crate::Symlink;
13964
13965 type Request = crate::wire::MutableNodeAttributes<'static>;
13966 }
13967
13968 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
13969 type Response = ::fidl_next::wire::Result<
13970 'static,
13971 crate::wire::NodeUpdateAttributesResponse,
13972 ::fidl_next::wire::Int32,
13973 >;
13974 }
13975
13976 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
13977 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13978
13979 fn respond(response: ___R) -> Self::Output {
13980 ::core::result::Result::Ok(response)
13981 }
13982 }
13983
13984 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
13985 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13986
13987 fn respond_err(response: ___R) -> Self::Output {
13988 ::core::result::Result::Err(response)
13989 }
13990 }
13991
13992 pub struct Sync;
13993
13994 impl ::fidl_next::Method for Sync {
13995 const ORDINAL: u64 = 3196473584242777161;
13996 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13997 ::fidl_next::protocol::Flexibility::Strict;
13998
13999 type Protocol = crate::Symlink;
14000
14001 type Request = ();
14002 }
14003
14004 impl ::fidl_next::TwoWayMethod for Sync {
14005 type Response = ::fidl_next::wire::Result<
14006 'static,
14007 crate::wire::NodeSyncResponse,
14008 ::fidl_next::wire::Int32,
14009 >;
14010 }
14011
14012 impl<___R> ::fidl_next::Respond<___R> for Sync {
14013 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14014
14015 fn respond(response: ___R) -> Self::Output {
14016 ::core::result::Result::Ok(response)
14017 }
14018 }
14019
14020 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
14021 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14022
14023 fn respond_err(response: ___R) -> Self::Output {
14024 ::core::result::Result::Err(response)
14025 }
14026 }
14027
14028 pub struct ListExtendedAttributes;
14029
14030 impl ::fidl_next::Method for ListExtendedAttributes {
14031 const ORDINAL: u64 = 5431626189872037072;
14032 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14033 ::fidl_next::protocol::Flexibility::Strict;
14034
14035 type Protocol = crate::Symlink;
14036
14037 type Request = crate::wire::NodeListExtendedAttributesRequest;
14038 }
14039
14040 pub struct GetExtendedAttribute;
14041
14042 impl ::fidl_next::Method for GetExtendedAttribute {
14043 const ORDINAL: u64 = 5043930208506967771;
14044 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14045 ::fidl_next::protocol::Flexibility::Strict;
14046
14047 type Protocol = crate::Symlink;
14048
14049 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
14050 }
14051
14052 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
14053 type Response = ::fidl_next::wire::Result<
14054 'static,
14055 crate::wire::ExtendedAttributeValue<'static>,
14056 ::fidl_next::wire::Int32,
14057 >;
14058 }
14059
14060 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
14061 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14062
14063 fn respond(response: ___R) -> Self::Output {
14064 ::core::result::Result::Ok(response)
14065 }
14066 }
14067
14068 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
14069 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14070
14071 fn respond_err(response: ___R) -> Self::Output {
14072 ::core::result::Result::Err(response)
14073 }
14074 }
14075
14076 pub struct SetExtendedAttribute;
14077
14078 impl ::fidl_next::Method for SetExtendedAttribute {
14079 const ORDINAL: u64 = 5374223046099989052;
14080 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14081 ::fidl_next::protocol::Flexibility::Strict;
14082
14083 type Protocol = crate::Symlink;
14084
14085 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
14086 }
14087
14088 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
14089 type Response = ::fidl_next::wire::Result<
14090 'static,
14091 crate::wire::NodeSetExtendedAttributeResponse,
14092 ::fidl_next::wire::Int32,
14093 >;
14094 }
14095
14096 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
14097 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14098
14099 fn respond(response: ___R) -> Self::Output {
14100 ::core::result::Result::Ok(response)
14101 }
14102 }
14103
14104 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
14105 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14106
14107 fn respond_err(response: ___R) -> Self::Output {
14108 ::core::result::Result::Err(response)
14109 }
14110 }
14111
14112 pub struct RemoveExtendedAttribute;
14113
14114 impl ::fidl_next::Method for RemoveExtendedAttribute {
14115 const ORDINAL: u64 = 8794297771444732717;
14116 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14117 ::fidl_next::protocol::Flexibility::Strict;
14118
14119 type Protocol = crate::Symlink;
14120
14121 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
14122 }
14123
14124 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
14125 type Response = ::fidl_next::wire::Result<
14126 'static,
14127 crate::wire::NodeRemoveExtendedAttributeResponse,
14128 ::fidl_next::wire::Int32,
14129 >;
14130 }
14131
14132 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
14133 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14134
14135 fn respond(response: ___R) -> Self::Output {
14136 ::core::result::Result::Ok(response)
14137 }
14138 }
14139
14140 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
14141 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14142
14143 fn respond_err(response: ___R) -> Self::Output {
14144 ::core::result::Result::Err(response)
14145 }
14146 }
14147
14148 pub struct Describe;
14149
14150 impl ::fidl_next::Method for Describe {
14151 const ORDINAL: u64 = 8371117097481679347;
14152 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14153 ::fidl_next::protocol::Flexibility::Flexible;
14154
14155 type Protocol = crate::Symlink;
14156
14157 type Request = ();
14158 }
14159
14160 impl ::fidl_next::TwoWayMethod for Describe {
14161 type Response = ::fidl_next::wire::Flexible<'static, crate::wire::SymlinkInfo<'static>>;
14162 }
14163
14164 impl<___R> ::fidl_next::Respond<___R> for Describe {
14165 type Output = ___R;
14166
14167 fn respond(response: ___R) -> Self::Output {
14168 response
14169 }
14170 }
14171
14172 mod ___detail {
14173 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Symlink
14174 where
14175 ___T: ::fidl_next::Transport,
14176 {
14177 type Client = SymlinkClient<___T>;
14178 type Server = SymlinkServer<___T>;
14179 }
14180
14181 #[repr(transparent)]
14183 pub struct SymlinkClient<___T: ::fidl_next::Transport> {
14184 #[allow(dead_code)]
14185 client: ::fidl_next::protocol::Client<___T>,
14186 }
14187
14188 impl<___T> SymlinkClient<___T>
14189 where
14190 ___T: ::fidl_next::Transport,
14191 {
14192 #[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"]
14193 pub fn link_into(
14194 &self,
14195
14196 dst_parent_token: impl ::fidl_next::Encode<
14197 ::fidl_next::wire::fuchsia::Event,
14198 <___T as ::fidl_next::Transport>::SendBuffer,
14199 >,
14200
14201 dst: impl ::fidl_next::Encode<
14202 ::fidl_next::wire::String<'static>,
14203 <___T as ::fidl_next::Transport>::SendBuffer,
14204 >,
14205 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14206 where
14207 <___T as ::fidl_next::Transport>::SendBuffer:
14208 ::fidl_next::encoder::InternalHandleEncoder,
14209 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14210 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14211 {
14212 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
14213 dst_parent_token,
14214
14215 dst,
14216 })
14217 }
14218
14219 #[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"]
14220 pub fn link_into_with<___R>(
14221 &self,
14222 request: ___R,
14223 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14224 where
14225 ___R: ::fidl_next::Encode<
14226 crate::wire::LinkableLinkIntoRequest<'static>,
14227 <___T as ::fidl_next::Transport>::SendBuffer,
14228 >,
14229 {
14230 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14231 6121399674497678964,
14232 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
14233 request,
14234 ))
14235 }
14236
14237 pub fn clone(
14238 &self,
14239
14240 request: impl ::fidl_next::Encode<
14241 ::fidl_next::ServerEnd<
14242 ::fidl_next_fuchsia_unknown::Cloneable,
14243 ::fidl_next::wire::fuchsia::Channel,
14244 >,
14245 <___T as ::fidl_next::Transport>::SendBuffer,
14246 >,
14247 ) -> ::fidl_next::SendFuture<'_, ___T>
14248 where
14249 <___T as ::fidl_next::Transport>::SendBuffer:
14250 ::fidl_next::encoder::InternalHandleEncoder,
14251 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14252 {
14253 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
14254 request,
14255 })
14256 }
14257
14258 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14259 where
14260 ___R: ::fidl_next::Encode<
14261 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
14262 <___T as ::fidl_next::Transport>::SendBuffer,
14263 >,
14264 {
14265 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14266 2366825959783828089,
14267 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
14268 request,
14269 ))
14270 }
14271
14272 #[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"]
14273 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
14274 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14275 6540867515453498750,
14276 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
14277 (),
14278 ))
14279 }
14280
14281 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
14282 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14283 2763219980499352582,
14284 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
14285 (),
14286 ))
14287 }
14288
14289 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14290 pub fn deprecated_clone(
14291 &self,
14292
14293 flags: impl ::fidl_next::Encode<
14294 crate::wire::OpenFlags,
14295 <___T as ::fidl_next::Transport>::SendBuffer,
14296 >,
14297
14298 object: impl ::fidl_next::Encode<
14299 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
14300 <___T as ::fidl_next::Transport>::SendBuffer,
14301 >,
14302 ) -> ::fidl_next::SendFuture<'_, ___T>
14303 where
14304 <___T as ::fidl_next::Transport>::SendBuffer:
14305 ::fidl_next::encoder::InternalHandleEncoder,
14306 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14307 {
14308 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
14309 flags,
14310
14311 object,
14312 })
14313 }
14314
14315 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14316 pub fn deprecated_clone_with<___R>(
14317 &self,
14318 request: ___R,
14319 ) -> ::fidl_next::SendFuture<'_, ___T>
14320 where
14321 ___R: ::fidl_next::Encode<
14322 crate::wire::NodeDeprecatedCloneRequest,
14323 <___T as ::fidl_next::Transport>::SendBuffer,
14324 >,
14325 {
14326 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14327 6512600400724287855,
14328 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
14329 request,
14330 ))
14331 }
14332
14333 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14334 pub fn deprecated_get_attr(
14335 &self,
14336 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
14337 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14338 8689798978500614909,
14339 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
14340 (),
14341 ))
14342 }
14343
14344 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14345 pub fn deprecated_set_attr(
14346 &self,
14347
14348 flags: impl ::fidl_next::Encode<
14349 crate::wire::NodeAttributeFlags,
14350 <___T as ::fidl_next::Transport>::SendBuffer,
14351 >,
14352
14353 attributes: impl ::fidl_next::Encode<
14354 crate::wire::NodeAttributes,
14355 <___T as ::fidl_next::Transport>::SendBuffer,
14356 >,
14357 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14358 where
14359 <___T as ::fidl_next::Transport>::SendBuffer:
14360 ::fidl_next::encoder::InternalHandleEncoder,
14361 {
14362 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
14363 flags,
14364
14365 attributes,
14366 })
14367 }
14368
14369 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14370 pub fn deprecated_set_attr_with<___R>(
14371 &self,
14372 request: ___R,
14373 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14374 where
14375 ___R: ::fidl_next::Encode<
14376 crate::wire::NodeDeprecatedSetAttrRequest,
14377 <___T as ::fidl_next::Transport>::SendBuffer,
14378 >,
14379 {
14380 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14381 4721673413776871238,
14382 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
14383 request,
14384 ))
14385 }
14386
14387 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14388 pub fn deprecated_get_flags(
14389 &self,
14390 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
14391 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14392 6595803110182632097,
14393 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
14394 (),
14395 ))
14396 }
14397
14398 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14399 pub fn deprecated_set_flags(
14400 &self,
14401
14402 flags: impl ::fidl_next::Encode<
14403 crate::wire::OpenFlags,
14404 <___T as ::fidl_next::Transport>::SendBuffer,
14405 >,
14406 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14407 where
14408 <___T as ::fidl_next::Transport>::SendBuffer:
14409 ::fidl_next::encoder::InternalHandleEncoder,
14410 {
14411 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
14412 flags,
14413 })
14414 }
14415
14416 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14417 pub fn deprecated_set_flags_with<___R>(
14418 &self,
14419 request: ___R,
14420 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14421 where
14422 ___R: ::fidl_next::Encode<
14423 crate::wire::NodeDeprecatedSetFlagsRequest,
14424 <___T as ::fidl_next::Transport>::SendBuffer,
14425 >,
14426 {
14427 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14428 5950864159036794675,
14429 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
14430 request,
14431 ))
14432 }
14433
14434 #[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"]
14435 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
14436 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14437 105530239381466147,
14438 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
14439 (),
14440 ))
14441 }
14442
14443 #[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"]
14444 pub fn set_flags(
14445 &self,
14446
14447 flags: impl ::fidl_next::Encode<
14448 crate::wire::Flags,
14449 <___T as ::fidl_next::Transport>::SendBuffer,
14450 >,
14451 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14452 where
14453 <___T as ::fidl_next::Transport>::SendBuffer:
14454 ::fidl_next::encoder::InternalHandleEncoder,
14455 {
14456 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
14457 }
14458
14459 #[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"]
14460 pub fn set_flags_with<___R>(
14461 &self,
14462 request: ___R,
14463 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14464 where
14465 ___R: ::fidl_next::Encode<
14466 crate::wire::NodeSetFlagsRequest,
14467 <___T as ::fidl_next::Transport>::SendBuffer,
14468 >,
14469 {
14470 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14471 6172186066099445416,
14472 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
14473 request,
14474 ))
14475 }
14476
14477 #[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"]
14478 pub fn query_filesystem(
14479 &self,
14480 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
14481 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14482 8013111122914313744,
14483 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
14484 (),
14485 ))
14486 }
14487
14488 #[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"]
14489 pub fn get_attributes(
14490 &self,
14491
14492 query: impl ::fidl_next::Encode<
14493 crate::wire::NodeAttributesQuery,
14494 <___T as ::fidl_next::Transport>::SendBuffer,
14495 >,
14496 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14497 where
14498 <___T as ::fidl_next::Transport>::SendBuffer:
14499 ::fidl_next::encoder::InternalHandleEncoder,
14500 {
14501 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
14502 }
14503
14504 #[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"]
14505 pub fn get_attributes_with<___R>(
14506 &self,
14507 request: ___R,
14508 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14509 where
14510 ___R: ::fidl_next::Encode<
14511 crate::wire::NodeGetAttributesRequest,
14512 <___T as ::fidl_next::Transport>::SendBuffer,
14513 >,
14514 {
14515 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14516 4414537700416816443,
14517 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
14518 request,
14519 ))
14520 }
14521
14522 #[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"]
14523 pub fn update_attributes_with<___R>(
14524 &self,
14525 request: ___R,
14526 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
14527 where
14528 ___R: ::fidl_next::Encode<
14529 crate::wire::MutableNodeAttributes<'static>,
14530 <___T as ::fidl_next::Transport>::SendBuffer,
14531 >,
14532 {
14533 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14534 3677402239314018056,
14535 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
14536 request,
14537 ))
14538 }
14539
14540 #[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"]
14541 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
14542 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14543 3196473584242777161,
14544 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
14545 (),
14546 ))
14547 }
14548
14549 #[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"]
14550 pub fn list_extended_attributes(
14551 &self,
14552
14553 iterator: impl ::fidl_next::Encode<
14554 ::fidl_next::ServerEnd<
14555 crate::ExtendedAttributeIterator,
14556 ::fidl_next::wire::fuchsia::Channel,
14557 >,
14558 <___T as ::fidl_next::Transport>::SendBuffer,
14559 >,
14560 ) -> ::fidl_next::SendFuture<'_, ___T>
14561 where
14562 <___T as ::fidl_next::Transport>::SendBuffer:
14563 ::fidl_next::encoder::InternalHandleEncoder,
14564 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14565 {
14566 self.list_extended_attributes_with(
14567 crate::generic::NodeListExtendedAttributesRequest { iterator },
14568 )
14569 }
14570
14571 #[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"]
14572 pub fn list_extended_attributes_with<___R>(
14573 &self,
14574 request: ___R,
14575 ) -> ::fidl_next::SendFuture<'_, ___T>
14576 where
14577 ___R: ::fidl_next::Encode<
14578 crate::wire::NodeListExtendedAttributesRequest,
14579 <___T as ::fidl_next::Transport>::SendBuffer,
14580 >,
14581 {
14582 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14583 5431626189872037072,
14584 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
14585 request,
14586 ))
14587 }
14588
14589 #[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"]
14590 pub fn get_extended_attribute(
14591 &self,
14592
14593 name: impl ::fidl_next::Encode<
14594 ::fidl_next::wire::Vector<'static, u8>,
14595 <___T as ::fidl_next::Transport>::SendBuffer,
14596 >,
14597 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14598 where
14599 <___T as ::fidl_next::Transport>::SendBuffer:
14600 ::fidl_next::encoder::InternalHandleEncoder,
14601 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14602 {
14603 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
14604 name,
14605 })
14606 }
14607
14608 #[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"]
14609 pub fn get_extended_attribute_with<___R>(
14610 &self,
14611 request: ___R,
14612 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14613 where
14614 ___R: ::fidl_next::Encode<
14615 crate::wire::NodeGetExtendedAttributeRequest<'static>,
14616 <___T as ::fidl_next::Transport>::SendBuffer,
14617 >,
14618 {
14619 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14620 5043930208506967771,
14621 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14622 request,
14623 ))
14624 }
14625
14626 #[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"]
14627 pub fn set_extended_attribute(
14628 &self,
14629
14630 name: impl ::fidl_next::Encode<
14631 ::fidl_next::wire::Vector<'static, u8>,
14632 <___T as ::fidl_next::Transport>::SendBuffer,
14633 >,
14634
14635 value: impl ::fidl_next::Encode<
14636 crate::wire::ExtendedAttributeValue<'static>,
14637 <___T as ::fidl_next::Transport>::SendBuffer,
14638 >,
14639
14640 mode: impl ::fidl_next::Encode<
14641 crate::wire::SetExtendedAttributeMode,
14642 <___T as ::fidl_next::Transport>::SendBuffer,
14643 >,
14644 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14645 where
14646 <___T as ::fidl_next::Transport>::SendBuffer:
14647 ::fidl_next::encoder::InternalHandleEncoder,
14648 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14649 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14650 {
14651 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
14652 name,
14653
14654 value,
14655
14656 mode,
14657 })
14658 }
14659
14660 #[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"]
14661 pub fn set_extended_attribute_with<___R>(
14662 &self,
14663 request: ___R,
14664 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14665 where
14666 ___R: ::fidl_next::Encode<
14667 crate::wire::NodeSetExtendedAttributeRequest<'static>,
14668 <___T as ::fidl_next::Transport>::SendBuffer,
14669 >,
14670 {
14671 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14672 5374223046099989052,
14673 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14674 request,
14675 ))
14676 }
14677
14678 #[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"]
14679 pub fn remove_extended_attribute(
14680 &self,
14681
14682 name: impl ::fidl_next::Encode<
14683 ::fidl_next::wire::Vector<'static, u8>,
14684 <___T as ::fidl_next::Transport>::SendBuffer,
14685 >,
14686 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14687 where
14688 <___T as ::fidl_next::Transport>::SendBuffer:
14689 ::fidl_next::encoder::InternalHandleEncoder,
14690 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14691 {
14692 self.remove_extended_attribute_with(
14693 crate::generic::NodeRemoveExtendedAttributeRequest { name },
14694 )
14695 }
14696
14697 #[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"]
14698 pub fn remove_extended_attribute_with<___R>(
14699 &self,
14700 request: ___R,
14701 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14702 where
14703 ___R: ::fidl_next::Encode<
14704 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
14705 <___T as ::fidl_next::Transport>::SendBuffer,
14706 >,
14707 {
14708 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14709 8794297771444732717,
14710 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14711 request,
14712 ))
14713 }
14714
14715 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
14716 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14717 8371117097481679347,
14718 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
14719 (),
14720 ))
14721 }
14722 }
14723
14724 #[repr(transparent)]
14726 pub struct SymlinkServer<___T: ::fidl_next::Transport> {
14727 server: ::fidl_next::protocol::Server<___T>,
14728 }
14729
14730 impl<___T> SymlinkServer<___T>
14731 where
14732 ___T: ::fidl_next::Transport,
14733 {
14734 #[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"]
14735 pub fn on_open(
14736 &self,
14737
14738 s: impl ::fidl_next::Encode<
14739 ::fidl_next::wire::Int32,
14740 <___T as ::fidl_next::Transport>::SendBuffer,
14741 >,
14742
14743 info: impl ::fidl_next::Encode<
14744 crate::wire_optional::NodeInfoDeprecated<'static>,
14745 <___T as ::fidl_next::Transport>::SendBuffer,
14746 >,
14747 ) -> ::fidl_next::SendFuture<'_, ___T>
14748 where
14749 <___T as ::fidl_next::Transport>::SendBuffer:
14750 ::fidl_next::encoder::InternalHandleEncoder,
14751 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14752 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14753 {
14754 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
14755 }
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
14759 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14760 where
14761 ___R: ::fidl_next::Encode<
14762 <super::OnOpen as ::fidl_next::Method>::Request,
14763 <___T as ::fidl_next::Transport>::SendBuffer,
14764 >,
14765 {
14766 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14767 9207534335756671346,
14768 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
14769 request,
14770 ))
14771 }
14772
14773 #[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"]
14774
14775 pub fn on_representation_with<___R>(
14776 &self,
14777 request: ___R,
14778 ) -> ::fidl_next::SendFuture<'_, ___T>
14779 where
14780 ___R: ::fidl_next::Encode<
14781 <super::OnRepresentation as ::fidl_next::Method>::Request,
14782 <___T as ::fidl_next::Transport>::SendBuffer,
14783 >,
14784 {
14785 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14786 6679970090861613324,
14787 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
14788 request,
14789 ))
14790 }
14791 }
14792 }
14793}
14794
14795pub trait SymlinkClientHandler<
14799 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14800 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14801>
14802{
14803 #[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"]
14804 fn on_open(
14805 &mut self,
14806
14807 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
14808 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14809
14810 #[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"]
14811 fn on_representation(
14812 &mut self,
14813
14814 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
14815 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14816
14817 fn on_unknown_interaction(
14818 &mut self,
14819 ordinal: u64,
14820 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14821 ::core::future::ready(())
14822 }
14823}
14824
14825impl<___T> SymlinkClientHandler<___T> for ::fidl_next::IgnoreEvents
14826where
14827 ___T: ::fidl_next::Transport,
14828{
14829 async fn on_open(&mut self, _: ::fidl_next::Request<symlink::OnOpen, ___T>) {}
14830
14831 async fn on_representation(
14832 &mut self,
14833
14834 _: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
14835 ) {
14836 }
14837
14838 async fn on_unknown_interaction(&mut self, _: u64) {}
14839}
14840
14841impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Symlink
14842where
14843 ___H: SymlinkClientHandler<___T> + ::core::marker::Send,
14844 ___T: ::fidl_next::Transport,
14845 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
14846 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14847 Constraint = (),
14848 >,
14849 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
14850 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14851 Constraint = (),
14852 >,
14853{
14854 async fn on_event(
14855 handler: &mut ___H,
14856 ordinal: u64,
14857 flexibility: ::fidl_next::protocol::Flexibility,
14858 body: ::fidl_next::Body<___T>,
14859 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14860 match ordinal {
14861 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
14862 Ok(decoded) => {
14863 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
14864 Ok(())
14865 }
14866 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14867 ordinal: 9207534335756671346,
14868 error,
14869 }),
14870 },
14871
14872 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
14873 Ok(decoded) => {
14874 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
14875 Ok(())
14876 }
14877 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14878 ordinal: 6679970090861613324,
14879 error,
14880 }),
14881 },
14882
14883 ordinal => {
14884 handler.on_unknown_interaction(ordinal).await;
14885 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14886 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14887 } else {
14888 Ok(())
14889 }
14890 }
14891 }
14892 }
14893}
14894
14895pub trait SymlinkServerHandler<
14899 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14900 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14901>
14902{
14903 #[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"]
14904 fn link_into(
14905 &mut self,
14906
14907 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
14908
14909 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
14910 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14911
14912 fn clone(
14913 &mut self,
14914
14915 request: ::fidl_next::Request<symlink::Clone, ___T>,
14916 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14917
14918 #[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"]
14919 fn close(
14920 &mut self,
14921
14922 responder: ::fidl_next::Responder<symlink::Close, ___T>,
14923 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14924
14925 fn query(
14926 &mut self,
14927
14928 responder: ::fidl_next::Responder<symlink::Query, ___T>,
14929 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14930
14931 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14932 fn deprecated_clone(
14933 &mut self,
14934
14935 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
14936 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14937
14938 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14939 fn deprecated_get_attr(
14940 &mut self,
14941
14942 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
14943 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14944
14945 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14946 fn deprecated_set_attr(
14947 &mut self,
14948
14949 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
14950
14951 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
14952 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14953
14954 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14955 fn deprecated_get_flags(
14956 &mut self,
14957
14958 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
14959 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14960
14961 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14962 fn deprecated_set_flags(
14963 &mut self,
14964
14965 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
14966
14967 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
14968 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14969
14970 #[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"]
14971 fn get_flags(
14972 &mut self,
14973
14974 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
14975 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14976
14977 #[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"]
14978 fn set_flags(
14979 &mut self,
14980
14981 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
14982
14983 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
14984 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14985
14986 #[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"]
14987 fn query_filesystem(
14988 &mut self,
14989
14990 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
14991 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14992
14993 #[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"]
14994 fn get_attributes(
14995 &mut self,
14996
14997 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
14998
14999 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
15000 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15001
15002 #[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"]
15003 fn update_attributes(
15004 &mut self,
15005
15006 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
15007
15008 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
15009 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15010
15011 #[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"]
15012 fn sync(
15013 &mut self,
15014
15015 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
15016 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15017
15018 #[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"]
15019 fn list_extended_attributes(
15020 &mut self,
15021
15022 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
15023 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15024
15025 #[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"]
15026 fn get_extended_attribute(
15027 &mut self,
15028
15029 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
15030
15031 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
15032 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15033
15034 #[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"]
15035 fn set_extended_attribute(
15036 &mut self,
15037
15038 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
15039
15040 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
15041 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15042
15043 #[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"]
15044 fn remove_extended_attribute(
15045 &mut self,
15046
15047 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
15048
15049 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
15050 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15051
15052 fn describe(
15053 &mut self,
15054
15055 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
15056 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15057
15058 fn on_unknown_interaction(
15059 &mut self,
15060 ordinal: u64,
15061 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15062 ::core::future::ready(())
15063 }
15064}
15065
15066impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Symlink
15067where
15068 ___H: SymlinkServerHandler<___T> + ::core::marker::Send,
15069 ___T: ::fidl_next::Transport,
15070 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
15071 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15072 Constraint = (),
15073 >,
15074 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
15075 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15076 Constraint = (),
15077 >,
15078 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
15079 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15080 Constraint = (),
15081 >,
15082 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
15083 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15084 Constraint = (),
15085 >,
15086 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
15087 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15088 Constraint = (),
15089 >,
15090 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
15091 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15092 Constraint = (),
15093 >,
15094 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
15095 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15096 Constraint = (),
15097 >,
15098 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
15099 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15100 Constraint = (),
15101 >,
15102 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
15103 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15104 Constraint = (),
15105 >,
15106 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15107 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15108 Constraint = (),
15109 >,
15110 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15111 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15112 Constraint = (),
15113 >,
15114 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15115 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15116 Constraint = (),
15117 >,
15118{
15119 async fn on_one_way(
15120 handler: &mut ___H,
15121 ordinal: u64,
15122 flexibility: ::fidl_next::protocol::Flexibility,
15123 body: ::fidl_next::Body<___T>,
15124 ) -> ::core::result::Result<
15125 (),
15126 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15127 > {
15128 match ordinal {
15129 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15130 Ok(decoded) => {
15131 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
15132 Ok(())
15133 }
15134 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15135 ordinal: 2366825959783828089,
15136 error,
15137 }),
15138 },
15139
15140 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15141 Ok(decoded) => {
15142 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
15143 Ok(())
15144 }
15145 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15146 ordinal: 6512600400724287855,
15147 error,
15148 }),
15149 },
15150
15151 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15152 Ok(decoded) => {
15153 handler
15154 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
15155 .await;
15156 Ok(())
15157 }
15158 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15159 ordinal: 5431626189872037072,
15160 error,
15161 }),
15162 },
15163
15164 ordinal => {
15165 handler.on_unknown_interaction(ordinal).await;
15166 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15167 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15168 } else {
15169 Ok(())
15170 }
15171 }
15172 }
15173 }
15174
15175 async fn on_two_way(
15176 handler: &mut ___H,
15177 ordinal: u64,
15178 flexibility: ::fidl_next::protocol::Flexibility,
15179 body: ::fidl_next::Body<___T>,
15180 responder: ::fidl_next::protocol::Responder<___T>,
15181 ) -> ::core::result::Result<
15182 (),
15183 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15184 > {
15185 match ordinal {
15186 6121399674497678964 => {
15187 let responder = ::fidl_next::Responder::from_untyped(responder);
15188
15189 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15190 Ok(decoded) => {
15191 handler
15192 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
15193 .await;
15194 Ok(())
15195 }
15196 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15197 ordinal: 6121399674497678964,
15198 error,
15199 }),
15200 }
15201 }
15202
15203 6540867515453498750 => {
15204 let responder = ::fidl_next::Responder::from_untyped(responder);
15205
15206 handler.close(responder).await;
15207 Ok(())
15208 }
15209
15210 2763219980499352582 => {
15211 let responder = ::fidl_next::Responder::from_untyped(responder);
15212
15213 handler.query(responder).await;
15214 Ok(())
15215 }
15216
15217 8689798978500614909 => {
15218 let responder = ::fidl_next::Responder::from_untyped(responder);
15219
15220 handler.deprecated_get_attr(responder).await;
15221 Ok(())
15222 }
15223
15224 4721673413776871238 => {
15225 let responder = ::fidl_next::Responder::from_untyped(responder);
15226
15227 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15228 Ok(decoded) => {
15229 handler
15230 .deprecated_set_attr(
15231 ::fidl_next::Request::from_decoded(decoded),
15232 responder,
15233 )
15234 .await;
15235 Ok(())
15236 }
15237 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15238 ordinal: 4721673413776871238,
15239 error,
15240 }),
15241 }
15242 }
15243
15244 6595803110182632097 => {
15245 let responder = ::fidl_next::Responder::from_untyped(responder);
15246
15247 handler.deprecated_get_flags(responder).await;
15248 Ok(())
15249 }
15250
15251 5950864159036794675 => {
15252 let responder = ::fidl_next::Responder::from_untyped(responder);
15253
15254 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15255 Ok(decoded) => {
15256 handler
15257 .deprecated_set_flags(
15258 ::fidl_next::Request::from_decoded(decoded),
15259 responder,
15260 )
15261 .await;
15262 Ok(())
15263 }
15264 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15265 ordinal: 5950864159036794675,
15266 error,
15267 }),
15268 }
15269 }
15270
15271 105530239381466147 => {
15272 let responder = ::fidl_next::Responder::from_untyped(responder);
15273
15274 handler.get_flags(responder).await;
15275 Ok(())
15276 }
15277
15278 6172186066099445416 => {
15279 let responder = ::fidl_next::Responder::from_untyped(responder);
15280
15281 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15282 Ok(decoded) => {
15283 handler
15284 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
15285 .await;
15286 Ok(())
15287 }
15288 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15289 ordinal: 6172186066099445416,
15290 error,
15291 }),
15292 }
15293 }
15294
15295 8013111122914313744 => {
15296 let responder = ::fidl_next::Responder::from_untyped(responder);
15297
15298 handler.query_filesystem(responder).await;
15299 Ok(())
15300 }
15301
15302 4414537700416816443 => {
15303 let responder = ::fidl_next::Responder::from_untyped(responder);
15304
15305 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15306 Ok(decoded) => {
15307 handler
15308 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
15309 .await;
15310 Ok(())
15311 }
15312 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15313 ordinal: 4414537700416816443,
15314 error,
15315 }),
15316 }
15317 }
15318
15319 3677402239314018056 => {
15320 let responder = ::fidl_next::Responder::from_untyped(responder);
15321
15322 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15323 Ok(decoded) => {
15324 handler
15325 .update_attributes(
15326 ::fidl_next::Request::from_decoded(decoded),
15327 responder,
15328 )
15329 .await;
15330 Ok(())
15331 }
15332 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15333 ordinal: 3677402239314018056,
15334 error,
15335 }),
15336 }
15337 }
15338
15339 3196473584242777161 => {
15340 let responder = ::fidl_next::Responder::from_untyped(responder);
15341
15342 handler.sync(responder).await;
15343 Ok(())
15344 }
15345
15346 5043930208506967771 => {
15347 let responder = ::fidl_next::Responder::from_untyped(responder);
15348
15349 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15350 Ok(decoded) => {
15351 handler
15352 .get_extended_attribute(
15353 ::fidl_next::Request::from_decoded(decoded),
15354 responder,
15355 )
15356 .await;
15357 Ok(())
15358 }
15359 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15360 ordinal: 5043930208506967771,
15361 error,
15362 }),
15363 }
15364 }
15365
15366 5374223046099989052 => {
15367 let responder = ::fidl_next::Responder::from_untyped(responder);
15368
15369 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15370 Ok(decoded) => {
15371 handler
15372 .set_extended_attribute(
15373 ::fidl_next::Request::from_decoded(decoded),
15374 responder,
15375 )
15376 .await;
15377 Ok(())
15378 }
15379 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15380 ordinal: 5374223046099989052,
15381 error,
15382 }),
15383 }
15384 }
15385
15386 8794297771444732717 => {
15387 let responder = ::fidl_next::Responder::from_untyped(responder);
15388
15389 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15390 Ok(decoded) => {
15391 handler
15392 .remove_extended_attribute(
15393 ::fidl_next::Request::from_decoded(decoded),
15394 responder,
15395 )
15396 .await;
15397 Ok(())
15398 }
15399 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15400 ordinal: 8794297771444732717,
15401 error,
15402 }),
15403 }
15404 }
15405
15406 8371117097481679347 => {
15407 let responder = ::fidl_next::Responder::from_untyped(responder);
15408
15409 handler.describe(responder).await;
15410 Ok(())
15411 }
15412
15413 ordinal => {
15414 handler.on_unknown_interaction(ordinal).await;
15415 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15416 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15417 } else {
15418 responder
15419 .respond(
15420 ordinal,
15421 flexibility,
15422 ::fidl_next::Flexible::<()>::FrameworkErr(
15423 ::fidl_next::FrameworkError::UnknownMethod,
15424 ),
15425 )
15426 .expect("encoding a framework error should never fail")
15427 .await?;
15428 Ok(())
15429 }
15430 }
15431 }
15432 }
15433}
15434
15435pub use fidl_next_common_fuchsia_io::*;
15436
15437pub mod compat {
15439
15440 pub use fidl_next_common_fuchsia_io::compat::*;
15441
15442 impl ::fidl_next::CompatFrom<crate::ConnectionInfo> for ::fidl_fuchsia_io::ConnectionInfo {
15443 fn compat_from(value: crate::ConnectionInfo) -> Self {
15444 Self {
15445 rights: ::fidl_next::CompatFrom::compat_from(value.rights),
15446
15447 __source_breaking: ::fidl::marker::SourceBreaking,
15448 }
15449 }
15450 }
15451
15452 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ConnectionInfo> for crate::ConnectionInfo {
15453 fn compat_from(value: ::fidl_fuchsia_io::ConnectionInfo) -> Self {
15454 Self { rights: ::fidl_next::CompatFrom::compat_from(value.rights) }
15455 }
15456 }
15457
15458 impl ::fidl_next::CompatFrom<crate::DirectoryGetTokenResponse>
15459 for ::fidl_fuchsia_io::DirectoryGetTokenResponse
15460 {
15461 #[inline]
15462 fn compat_from(value: crate::DirectoryGetTokenResponse) -> Self {
15463 Self {
15464 s: ::fidl_next::CompatFrom::compat_from(value.s),
15465
15466 token: ::fidl_next::CompatFrom::compat_from(value.token),
15467 }
15468 }
15469 }
15470
15471 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryGetTokenResponse>
15472 for crate::DirectoryGetTokenResponse
15473 {
15474 #[inline]
15475 fn compat_from(value: ::fidl_fuchsia_io::DirectoryGetTokenResponse) -> Self {
15476 Self {
15477 s: ::fidl_next::CompatFrom::compat_from(value.s),
15478
15479 token: ::fidl_next::CompatFrom::compat_from(value.token),
15480 }
15481 }
15482 }
15483
15484 impl ::fidl_next::CompatFrom<crate::DirectoryLinkRequest>
15485 for ::fidl_fuchsia_io::DirectoryLinkRequest
15486 {
15487 #[inline]
15488 fn compat_from(value: crate::DirectoryLinkRequest) -> Self {
15489 Self {
15490 src: ::fidl_next::CompatFrom::compat_from(value.src),
15491
15492 dst_parent_token: ::fidl_next::CompatFrom::compat_from(value.dst_parent_token),
15493
15494 dst: ::fidl_next::CompatFrom::compat_from(value.dst),
15495 }
15496 }
15497 }
15498
15499 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryLinkRequest>
15500 for crate::DirectoryLinkRequest
15501 {
15502 #[inline]
15503 fn compat_from(value: ::fidl_fuchsia_io::DirectoryLinkRequest) -> Self {
15504 Self {
15505 src: ::fidl_next::CompatFrom::compat_from(value.src),
15506
15507 dst_parent_token: ::fidl_next::CompatFrom::compat_from(value.dst_parent_token),
15508
15509 dst: ::fidl_next::CompatFrom::compat_from(value.dst),
15510 }
15511 }
15512 }
15513
15514 impl ::fidl_next::CompatFrom<crate::DirectoryRenameRequest>
15515 for ::fidl_fuchsia_io::DirectoryRenameRequest
15516 {
15517 #[inline]
15518 fn compat_from(value: crate::DirectoryRenameRequest) -> Self {
15519 Self {
15520 src: ::fidl_next::CompatFrom::compat_from(value.src),
15521
15522 dst_parent_token: ::fidl_next::CompatFrom::compat_from(value.dst_parent_token),
15523
15524 dst: ::fidl_next::CompatFrom::compat_from(value.dst),
15525 }
15526 }
15527 }
15528
15529 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryRenameRequest>
15530 for crate::DirectoryRenameRequest
15531 {
15532 #[inline]
15533 fn compat_from(value: ::fidl_fuchsia_io::DirectoryRenameRequest) -> Self {
15534 Self {
15535 src: ::fidl_next::CompatFrom::compat_from(value.src),
15536
15537 dst_parent_token: ::fidl_next::CompatFrom::compat_from(value.dst_parent_token),
15538
15539 dst: ::fidl_next::CompatFrom::compat_from(value.dst),
15540 }
15541 }
15542 }
15543
15544 impl ::fidl_next::CompatFrom<crate::DirectoryWatchRequest>
15545 for ::fidl_fuchsia_io::DirectoryWatchRequest
15546 {
15547 #[inline]
15548 fn compat_from(value: crate::DirectoryWatchRequest) -> Self {
15549 Self {
15550 mask: ::fidl_next::CompatFrom::compat_from(value.mask),
15551
15552 options: ::fidl_next::CompatFrom::compat_from(value.options),
15553
15554 watcher: ::fidl_next::CompatFrom::compat_from(value.watcher),
15555 }
15556 }
15557 }
15558
15559 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryWatchRequest>
15560 for crate::DirectoryWatchRequest
15561 {
15562 #[inline]
15563 fn compat_from(value: ::fidl_fuchsia_io::DirectoryWatchRequest) -> Self {
15564 Self {
15565 mask: ::fidl_next::CompatFrom::compat_from(value.mask),
15566
15567 options: ::fidl_next::CompatFrom::compat_from(value.options),
15568
15569 watcher: ::fidl_next::CompatFrom::compat_from(value.watcher),
15570 }
15571 }
15572 }
15573
15574 impl ::fidl_next::CompatFrom<crate::NodeOnOpenRequest> for ::fidl_fuchsia_io::NodeOnOpenRequest {
15575 #[inline]
15576 fn compat_from(value: crate::NodeOnOpenRequest) -> Self {
15577 Self {
15578 s: ::fidl_next::CompatFrom::compat_from(value.s),
15579
15580 info: ::fidl_next::CompatFrom::compat_from(value.info),
15581 }
15582 }
15583 }
15584
15585 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeOnOpenRequest> for crate::NodeOnOpenRequest {
15586 #[inline]
15587 fn compat_from(value: ::fidl_fuchsia_io::NodeOnOpenRequest) -> Self {
15588 Self {
15589 s: ::fidl_next::CompatFrom::compat_from(value.s),
15590
15591 info: ::fidl_next::CompatFrom::compat_from(value.info),
15592 }
15593 }
15594 }
15595
15596 impl ::fidl_next::CompatFrom<crate::NodeListExtendedAttributesRequest>
15597 for ::fidl_fuchsia_io::NodeListExtendedAttributesRequest
15598 {
15599 #[inline]
15600 fn compat_from(value: crate::NodeListExtendedAttributesRequest) -> Self {
15601 Self { iterator: ::fidl_next::CompatFrom::compat_from(value.iterator) }
15602 }
15603 }
15604
15605 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeListExtendedAttributesRequest>
15606 for crate::NodeListExtendedAttributesRequest
15607 {
15608 #[inline]
15609 fn compat_from(value: ::fidl_fuchsia_io::NodeListExtendedAttributesRequest) -> Self {
15610 Self { iterator: ::fidl_next::CompatFrom::compat_from(value.iterator) }
15611 }
15612 }
15613
15614 impl ::fidl_next::CompatFrom<crate::ExtendedAttributeValue>
15615 for ::fidl_fuchsia_io::ExtendedAttributeValue
15616 {
15617 fn compat_from(value: crate::ExtendedAttributeValue) -> Self {
15618 match value {
15619 crate::ExtendedAttributeValue::Bytes(value) => {
15620 Self::Bytes(::fidl_next::CompatFrom::compat_from(value))
15621 }
15622
15623 crate::ExtendedAttributeValue::Buffer(value) => {
15624 Self::Buffer(::fidl_next::CompatFrom::compat_from(value))
15625 }
15626
15627 crate::ExtendedAttributeValue::UnknownOrdinal_(unknown_ordinal) => {
15628 Self::__SourceBreaking { unknown_ordinal }
15629 }
15630 }
15631 }
15632 }
15633
15634 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::ExtendedAttributeValue>
15635 for crate::ExtendedAttributeValue
15636 {
15637 fn compat_from(value: ::fidl_fuchsia_io::ExtendedAttributeValue) -> Self {
15638 match value {
15639 ::fidl_fuchsia_io::ExtendedAttributeValue::Bytes(value) => {
15640 Self::Bytes(::fidl_next::CompatFrom::compat_from(value))
15641 }
15642
15643 ::fidl_fuchsia_io::ExtendedAttributeValue::Buffer(value) => {
15644 Self::Buffer(::fidl_next::CompatFrom::compat_from(value))
15645 }
15646
15647 ::fidl_fuchsia_io::ExtendedAttributeValue::__SourceBreaking { unknown_ordinal } => {
15648 Self::UnknownOrdinal_(unknown_ordinal)
15649 }
15650 }
15651 }
15652 }
15653
15654 impl ::fidl_next::CompatFrom<crate::NodeSetExtendedAttributeRequest>
15655 for ::fidl_fuchsia_io::NodeSetExtendedAttributeRequest
15656 {
15657 #[inline]
15658 fn compat_from(value: crate::NodeSetExtendedAttributeRequest) -> Self {
15659 Self {
15660 name: ::fidl_next::CompatFrom::compat_from(value.name),
15661
15662 value: ::fidl_next::CompatFrom::compat_from(value.value),
15663
15664 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
15665 }
15666 }
15667 }
15668
15669 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeSetExtendedAttributeRequest>
15670 for crate::NodeSetExtendedAttributeRequest
15671 {
15672 #[inline]
15673 fn compat_from(value: ::fidl_fuchsia_io::NodeSetExtendedAttributeRequest) -> Self {
15674 Self {
15675 name: ::fidl_next::CompatFrom::compat_from(value.name),
15676
15677 value: ::fidl_next::CompatFrom::compat_from(value.value),
15678
15679 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
15680 }
15681 }
15682 }
15683
15684 impl ::fidl_next::CompatFrom<crate::FileInfo> for ::fidl_fuchsia_io::FileInfo {
15685 fn compat_from(value: crate::FileInfo) -> Self {
15686 Self {
15687 is_append: ::fidl_next::CompatFrom::compat_from(value.is_append),
15688
15689 observer: ::fidl_next::CompatFrom::compat_from(value.observer),
15690
15691 stream: ::fidl_next::CompatFrom::compat_from(value.stream),
15692
15693 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
15694
15695 __source_breaking: ::fidl::marker::SourceBreaking,
15696 }
15697 }
15698 }
15699
15700 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileInfo> for crate::FileInfo {
15701 fn compat_from(value: ::fidl_fuchsia_io::FileInfo) -> Self {
15702 Self {
15703 is_append: ::fidl_next::CompatFrom::compat_from(value.is_append),
15704
15705 observer: ::fidl_next::CompatFrom::compat_from(value.observer),
15706
15707 stream: ::fidl_next::CompatFrom::compat_from(value.stream),
15708
15709 attributes: ::fidl_next::CompatFrom::compat_from(value.attributes),
15710 }
15711 }
15712 }
15713
15714 impl ::fidl_next::CompatFrom<crate::Representation> for ::fidl_fuchsia_io::Representation {
15715 fn compat_from(value: crate::Representation) -> Self {
15716 match value {
15717 crate::Representation::Node(value) => {
15718 Self::Node(::fidl_next::CompatFrom::compat_from(value))
15719 }
15720
15721 crate::Representation::Directory(value) => {
15722 Self::Directory(::fidl_next::CompatFrom::compat_from(value))
15723 }
15724
15725 crate::Representation::File(value) => {
15726 Self::File(::fidl_next::CompatFrom::compat_from(value))
15727 }
15728
15729 crate::Representation::Symlink(value) => {
15730 Self::Symlink(::fidl_next::CompatFrom::compat_from(value))
15731 }
15732
15733 crate::Representation::UnknownOrdinal_(unknown_ordinal) => {
15734 Self::__SourceBreaking { unknown_ordinal }
15735 }
15736 }
15737 }
15738 }
15739
15740 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::Representation> for crate::Representation {
15741 fn compat_from(value: ::fidl_fuchsia_io::Representation) -> Self {
15742 match value {
15743 ::fidl_fuchsia_io::Representation::Node(value) => {
15744 Self::Node(::fidl_next::CompatFrom::compat_from(value))
15745 }
15746
15747 ::fidl_fuchsia_io::Representation::Directory(value) => {
15748 Self::Directory(::fidl_next::CompatFrom::compat_from(value))
15749 }
15750
15751 ::fidl_fuchsia_io::Representation::File(value) => {
15752 Self::File(::fidl_next::CompatFrom::compat_from(value))
15753 }
15754
15755 ::fidl_fuchsia_io::Representation::Symlink(value) => {
15756 Self::Symlink(::fidl_next::CompatFrom::compat_from(value))
15757 }
15758
15759 ::fidl_fuchsia_io::Representation::__SourceBreaking { unknown_ordinal } => {
15760 Self::UnknownOrdinal_(unknown_ordinal)
15761 }
15762 }
15763 }
15764 }
15765
15766 impl ::fidl_next::CompatFrom<crate::DirectoryOpenRequest>
15767 for ::fidl_fuchsia_io::DirectoryOpenRequest
15768 {
15769 #[inline]
15770 fn compat_from(value: crate::DirectoryOpenRequest) -> Self {
15771 Self {
15772 path: ::fidl_next::CompatFrom::compat_from(value.path),
15773
15774 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
15775
15776 options: ::fidl_next::CompatFrom::compat_from(value.options),
15777
15778 object: ::fidl_next::CompatFrom::compat_from(value.object),
15779 }
15780 }
15781 }
15782
15783 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryOpenRequest>
15784 for crate::DirectoryOpenRequest
15785 {
15786 #[inline]
15787 fn compat_from(value: ::fidl_fuchsia_io::DirectoryOpenRequest) -> Self {
15788 Self {
15789 path: ::fidl_next::CompatFrom::compat_from(value.path),
15790
15791 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
15792
15793 options: ::fidl_next::CompatFrom::compat_from(value.options),
15794
15795 object: ::fidl_next::CompatFrom::compat_from(value.object),
15796 }
15797 }
15798 }
15799
15800 impl ::fidl_next::CompatFrom<crate::NodeDeprecatedCloneRequest>
15801 for ::fidl_fuchsia_io::NodeDeprecatedCloneRequest
15802 {
15803 #[inline]
15804 fn compat_from(value: crate::NodeDeprecatedCloneRequest) -> Self {
15805 Self {
15806 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
15807
15808 object: ::fidl_next::CompatFrom::compat_from(value.object),
15809 }
15810 }
15811 }
15812
15813 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeDeprecatedCloneRequest>
15814 for crate::NodeDeprecatedCloneRequest
15815 {
15816 #[inline]
15817 fn compat_from(value: ::fidl_fuchsia_io::NodeDeprecatedCloneRequest) -> Self {
15818 Self {
15819 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
15820
15821 object: ::fidl_next::CompatFrom::compat_from(value.object),
15822 }
15823 }
15824 }
15825
15826 #[cfg(target_os = "fuchsia")]
15827 pub type NodeProxy = ::fidl_next::Client<crate::Node>;
15830
15831 impl ::fidl_next::CompatFrom<crate::Node> for ::fidl_fuchsia_io::NodeMarker {
15832 fn compat_from(_: crate::Node) -> Self {
15833 Self
15834 }
15835 }
15836
15837 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeMarker> for crate::Node {
15838 fn compat_from(_: ::fidl_fuchsia_io::NodeMarker) -> Self {
15839 Self
15840 }
15841 }
15842
15843 #[cfg(target_os = "fuchsia")]
15844
15845 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::NodeProxy> for crate::Node {
15846 fn client_compat_from(
15847 proxy: ::fidl_fuchsia_io::NodeProxy,
15848 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
15849 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15850 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15851 ::fidl_next::ClientDispatcher::new(client_end)
15852 }
15853 }
15854
15855 impl ::fidl_next::CompatFrom<crate::DirectoryDeprecatedOpenRequest>
15856 for ::fidl_fuchsia_io::DirectoryDeprecatedOpenRequest
15857 {
15858 #[inline]
15859 fn compat_from(value: crate::DirectoryDeprecatedOpenRequest) -> Self {
15860 Self {
15861 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
15862
15863 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
15864
15865 path: ::fidl_next::CompatFrom::compat_from(value.path),
15866
15867 object: ::fidl_next::CompatFrom::compat_from(value.object),
15868 }
15869 }
15870 }
15871
15872 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryDeprecatedOpenRequest>
15873 for crate::DirectoryDeprecatedOpenRequest
15874 {
15875 #[inline]
15876 fn compat_from(value: ::fidl_fuchsia_io::DirectoryDeprecatedOpenRequest) -> Self {
15877 Self {
15878 flags: ::fidl_next::CompatFrom::compat_from(value.flags),
15879
15880 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
15881
15882 path: ::fidl_next::CompatFrom::compat_from(value.path),
15883
15884 object: ::fidl_next::CompatFrom::compat_from(value.object),
15885 }
15886 }
15887 }
15888
15889 impl ::fidl_next::CompatFrom<crate::DirectoryCreateSymlinkRequest>
15890 for ::fidl_fuchsia_io::DirectoryCreateSymlinkRequest
15891 {
15892 #[inline]
15893 fn compat_from(value: crate::DirectoryCreateSymlinkRequest) -> Self {
15894 Self {
15895 name: ::fidl_next::CompatFrom::compat_from(value.name),
15896
15897 target: ::fidl_next::CompatFrom::compat_from(value.target),
15898
15899 connection: ::fidl_next::CompatFrom::compat_from(value.connection),
15900 }
15901 }
15902 }
15903
15904 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryCreateSymlinkRequest>
15905 for crate::DirectoryCreateSymlinkRequest
15906 {
15907 #[inline]
15908 fn compat_from(value: ::fidl_fuchsia_io::DirectoryCreateSymlinkRequest) -> Self {
15909 Self {
15910 name: ::fidl_next::CompatFrom::compat_from(value.name),
15911
15912 target: ::fidl_next::CompatFrom::compat_from(value.target),
15913
15914 connection: ::fidl_next::CompatFrom::compat_from(value.connection),
15915 }
15916 }
15917 }
15918
15919 #[cfg(target_os = "fuchsia")]
15920 pub type DirectoryProxy = ::fidl_next::Client<crate::Directory>;
15923
15924 impl ::fidl_next::CompatFrom<crate::Directory> for ::fidl_fuchsia_io::DirectoryMarker {
15925 fn compat_from(_: crate::Directory) -> Self {
15926 Self
15927 }
15928 }
15929
15930 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::DirectoryMarker> for crate::Directory {
15931 fn compat_from(_: ::fidl_fuchsia_io::DirectoryMarker) -> Self {
15932 Self
15933 }
15934 }
15935
15936 #[cfg(target_os = "fuchsia")]
15937
15938 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::DirectoryProxy> for crate::Directory {
15939 fn client_compat_from(
15940 proxy: ::fidl_fuchsia_io::DirectoryProxy,
15941 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
15942 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15943 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15944 ::fidl_next::ClientDispatcher::new(client_end)
15945 }
15946 }
15947
15948 impl ::fidl_next::CompatFrom<crate::FileGetBackingMemoryResponse>
15949 for ::fidl_fuchsia_io::FileGetBackingMemoryResponse
15950 {
15951 #[inline]
15952 fn compat_from(value: crate::FileGetBackingMemoryResponse) -> Self {
15953 Self { vmo: ::fidl_next::CompatFrom::compat_from(value.vmo) }
15954 }
15955 }
15956
15957 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileGetBackingMemoryResponse>
15958 for crate::FileGetBackingMemoryResponse
15959 {
15960 #[inline]
15961 fn compat_from(value: ::fidl_fuchsia_io::FileGetBackingMemoryResponse) -> Self {
15962 Self { vmo: ::fidl_next::CompatFrom::compat_from(value.vmo) }
15963 }
15964 }
15965
15966 impl ::fidl_next::CompatFrom<crate::LinkableLinkIntoRequest>
15967 for ::fidl_fuchsia_io::LinkableLinkIntoRequest
15968 {
15969 #[inline]
15970 fn compat_from(value: crate::LinkableLinkIntoRequest) -> Self {
15971 Self {
15972 dst_parent_token: ::fidl_next::CompatFrom::compat_from(value.dst_parent_token),
15973
15974 dst: ::fidl_next::CompatFrom::compat_from(value.dst),
15975 }
15976 }
15977 }
15978
15979 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::LinkableLinkIntoRequest>
15980 for crate::LinkableLinkIntoRequest
15981 {
15982 #[inline]
15983 fn compat_from(value: ::fidl_fuchsia_io::LinkableLinkIntoRequest) -> Self {
15984 Self {
15985 dst_parent_token: ::fidl_next::CompatFrom::compat_from(value.dst_parent_token),
15986
15987 dst: ::fidl_next::CompatFrom::compat_from(value.dst),
15988 }
15989 }
15990 }
15991
15992 #[cfg(target_os = "fuchsia")]
15993 pub type LinkableProxy = ::fidl_next::Client<crate::Linkable>;
15996
15997 impl ::fidl_next::CompatFrom<crate::Linkable> for ::fidl_fuchsia_io::LinkableMarker {
15998 fn compat_from(_: crate::Linkable) -> Self {
15999 Self
16000 }
16001 }
16002
16003 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::LinkableMarker> for crate::Linkable {
16004 fn compat_from(_: ::fidl_fuchsia_io::LinkableMarker) -> Self {
16005 Self
16006 }
16007 }
16008
16009 #[cfg(target_os = "fuchsia")]
16010
16011 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::LinkableProxy> for crate::Linkable {
16012 fn client_compat_from(
16013 proxy: ::fidl_fuchsia_io::LinkableProxy,
16014 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
16015 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
16016 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
16017 ::fidl_next::ClientDispatcher::new(client_end)
16018 }
16019 }
16020
16021 impl ::fidl_next::CompatFrom<crate::FileAllocateRequest>
16022 for ::fidl_fuchsia_io::FileAllocateRequest
16023 {
16024 #[inline]
16025 fn compat_from(value: crate::FileAllocateRequest) -> Self {
16026 Self {
16027 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
16028
16029 length: ::fidl_next::CompatFrom::compat_from(value.length),
16030
16031 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
16032 }
16033 }
16034 }
16035
16036 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileAllocateRequest>
16037 for crate::FileAllocateRequest
16038 {
16039 #[inline]
16040 fn compat_from(value: ::fidl_fuchsia_io::FileAllocateRequest) -> Self {
16041 Self {
16042 offset: ::fidl_next::CompatFrom::compat_from(value.offset),
16043
16044 length: ::fidl_next::CompatFrom::compat_from(value.length),
16045
16046 mode: ::fidl_next::CompatFrom::compat_from(value.mode),
16047 }
16048 }
16049 }
16050
16051 impl ::fidl_next::CompatFrom<crate::FileEnableVerityRequest>
16052 for ::fidl_fuchsia_io::FileEnableVerityRequest
16053 {
16054 #[inline]
16055 fn compat_from(value: crate::FileEnableVerityRequest) -> Self {
16056 Self { options: ::fidl_next::CompatFrom::compat_from(value.options) }
16057 }
16058 }
16059
16060 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileEnableVerityRequest>
16061 for crate::FileEnableVerityRequest
16062 {
16063 #[inline]
16064 fn compat_from(value: ::fidl_fuchsia_io::FileEnableVerityRequest) -> Self {
16065 Self { options: ::fidl_next::CompatFrom::compat_from(value.options) }
16066 }
16067 }
16068
16069 #[cfg(target_os = "fuchsia")]
16070 pub type FileProxy = ::fidl_next::Client<crate::File>;
16073
16074 impl ::fidl_next::CompatFrom<crate::File> for ::fidl_fuchsia_io::FileMarker {
16075 fn compat_from(_: crate::File) -> Self {
16076 Self
16077 }
16078 }
16079
16080 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileMarker> for crate::File {
16081 fn compat_from(_: ::fidl_fuchsia_io::FileMarker) -> Self {
16082 Self
16083 }
16084 }
16085
16086 #[cfg(target_os = "fuchsia")]
16087
16088 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::FileProxy> for crate::File {
16089 fn client_compat_from(
16090 proxy: ::fidl_fuchsia_io::FileProxy,
16091 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
16092 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
16093 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
16094 ::fidl_next::ClientDispatcher::new(client_end)
16095 }
16096 }
16097
16098 impl ::fidl_next::CompatFrom<crate::FileObject> for ::fidl_fuchsia_io::FileObject {
16099 #[inline]
16100 fn compat_from(value: crate::FileObject) -> Self {
16101 Self {
16102 event: ::fidl_next::CompatFrom::compat_from(value.event),
16103
16104 stream: ::fidl_next::CompatFrom::compat_from(value.stream),
16105 }
16106 }
16107 }
16108
16109 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::FileObject> for crate::FileObject {
16110 #[inline]
16111 fn compat_from(value: ::fidl_fuchsia_io::FileObject) -> Self {
16112 Self {
16113 event: ::fidl_next::CompatFrom::compat_from(value.event),
16114
16115 stream: ::fidl_next::CompatFrom::compat_from(value.stream),
16116 }
16117 }
16118 }
16119
16120 impl ::fidl_next::CompatFrom<crate::NodeInfoDeprecated> for ::fidl_fuchsia_io::NodeInfoDeprecated {
16121 fn compat_from(value: crate::NodeInfoDeprecated) -> Self {
16122 match value {
16123 crate::NodeInfoDeprecated::Service(value) => {
16124 Self::Service(::fidl_next::CompatFrom::compat_from(value))
16125 }
16126
16127 crate::NodeInfoDeprecated::File(value) => {
16128 Self::File(::fidl_next::CompatFrom::compat_from(value))
16129 }
16130
16131 crate::NodeInfoDeprecated::Directory(value) => {
16132 Self::Directory(::fidl_next::CompatFrom::compat_from(value))
16133 }
16134
16135 crate::NodeInfoDeprecated::Symlink(value) => {
16136 Self::Symlink(::fidl_next::CompatFrom::compat_from(value))
16137 }
16138 }
16139 }
16140 }
16141
16142 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::NodeInfoDeprecated> for crate::NodeInfoDeprecated {
16143 fn compat_from(value: ::fidl_fuchsia_io::NodeInfoDeprecated) -> Self {
16144 match value {
16145 ::fidl_fuchsia_io::NodeInfoDeprecated::Service(value) => {
16146 Self::Service(::fidl_next::CompatFrom::compat_from(value))
16147 }
16148
16149 ::fidl_fuchsia_io::NodeInfoDeprecated::File(value) => {
16150 Self::File(::fidl_next::CompatFrom::compat_from(value))
16151 }
16152
16153 ::fidl_fuchsia_io::NodeInfoDeprecated::Directory(value) => {
16154 Self::Directory(::fidl_next::CompatFrom::compat_from(value))
16155 }
16156
16157 ::fidl_fuchsia_io::NodeInfoDeprecated::Symlink(value) => {
16158 Self::Symlink(::fidl_next::CompatFrom::compat_from(value))
16159 }
16160 }
16161 }
16162 }
16163
16164 #[cfg(target_os = "fuchsia")]
16165 pub type SymlinkProxy = ::fidl_next::Client<crate::Symlink>;
16168
16169 impl ::fidl_next::CompatFrom<crate::Symlink> for ::fidl_fuchsia_io::SymlinkMarker {
16170 fn compat_from(_: crate::Symlink) -> Self {
16171 Self
16172 }
16173 }
16174
16175 impl ::fidl_next::CompatFrom<::fidl_fuchsia_io::SymlinkMarker> for crate::Symlink {
16176 fn compat_from(_: ::fidl_fuchsia_io::SymlinkMarker) -> Self {
16177 Self
16178 }
16179 }
16180
16181 #[cfg(target_os = "fuchsia")]
16182
16183 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_io::SymlinkProxy> for crate::Symlink {
16184 fn client_compat_from(
16185 proxy: ::fidl_fuchsia_io::SymlinkProxy,
16186 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
16187 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
16188 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
16189 ::fidl_next::ClientDispatcher::new(client_end)
16190 }
16191 }
16192}