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: ::fidl_next::fuchsia::zx::Status,
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 ::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___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 ::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::Status>
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 #[repr(C)]
541 pub struct NodeListExtendedAttributesRequest {
542 pub iterator: ::fidl_next::ServerEnd<
543 crate::ExtendedAttributeIterator,
544 ::fidl_next::fuchsia::zx::Channel,
545 >,
546 }
547
548 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
549 for NodeListExtendedAttributesRequest
550 where
551 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
552 ___E: ::fidl_next::fuchsia::HandleEncoder,
553 {
554 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
555 Self,
556 crate::wire::NodeListExtendedAttributesRequest,
557 > = unsafe {
558 ::fidl_next::CopyOptimization::enable_if(
559 true && <::fidl_next::ServerEnd<
560 crate::ExtendedAttributeIterator,
561 ::fidl_next::fuchsia::zx::Channel,
562 > as ::fidl_next::Encode<
563 ::fidl_next::ServerEnd<
564 crate::ExtendedAttributeIterator,
565 ::fidl_next::wire::fuchsia::Channel,
566 >,
567 ___E,
568 >>::COPY_OPTIMIZATION
569 .is_enabled(),
570 )
571 };
572
573 #[inline]
574 fn encode(
575 self,
576 encoder_: &mut ___E,
577 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
578 _: (),
579 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
580 ::fidl_next::munge! {
581 let crate::wire::NodeListExtendedAttributesRequest {
582 iterator,
583
584 } = out_;
585 }
586
587 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
588
589 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
590
591 Ok(())
592 }
593 }
594
595 unsafe impl<___E>
596 ::fidl_next::EncodeOption<
597 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
598 ___E,
599 > for NodeListExtendedAttributesRequest
600 where
601 ___E: ::fidl_next::Encoder + ?Sized,
602 NodeListExtendedAttributesRequest:
603 ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>,
604 {
605 #[inline]
606 fn encode_option(
607 this: ::core::option::Option<Self>,
608 encoder: &mut ___E,
609 out: &mut ::core::mem::MaybeUninit<
610 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
611 >,
612 _: (),
613 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
614 if let Some(inner) = this {
615 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
616 ::fidl_next::wire::Box::encode_present(out);
617 } else {
618 ::fidl_next::wire::Box::encode_absent(out);
619 }
620
621 Ok(())
622 }
623 }
624
625 impl ::fidl_next::FromWire<crate::wire::NodeListExtendedAttributesRequest>
626 for NodeListExtendedAttributesRequest
627 {
628 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
629 crate::wire::NodeListExtendedAttributesRequest,
630 Self,
631 > = unsafe {
632 ::fidl_next::CopyOptimization::enable_if(
633 true && <::fidl_next::ServerEnd<
634 crate::ExtendedAttributeIterator,
635 ::fidl_next::fuchsia::zx::Channel,
636 > as ::fidl_next::FromWire<
637 ::fidl_next::ServerEnd<
638 crate::ExtendedAttributeIterator,
639 ::fidl_next::wire::fuchsia::Channel,
640 >,
641 >>::COPY_OPTIMIZATION
642 .is_enabled(),
643 )
644 };
645
646 #[inline]
647 fn from_wire(wire: crate::wire::NodeListExtendedAttributesRequest) -> Self {
648 Self { iterator: ::fidl_next::FromWire::from_wire(wire.iterator) }
649 }
650 }
651
652 #[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"]
653 #[derive(Debug, PartialEq)]
654 pub enum ExtendedAttributeValue {
655 Bytes(::std::vec::Vec<u8>),
656
657 Buffer(::fidl_next::fuchsia::zx::Vmo),
658
659 UnknownOrdinal_(u64),
660 }
661
662 impl ExtendedAttributeValue {
663 pub fn is_unknown(&self) -> bool {
664 #[allow(unreachable_patterns)]
665 match self {
666 Self::UnknownOrdinal_(_) => true,
667 _ => false,
668 }
669 }
670 }
671
672 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>
673 for ExtendedAttributeValue
674 where
675 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
676 ___E: ::fidl_next::Encoder,
677 ___E: ::fidl_next::fuchsia::HandleEncoder,
678 {
679 #[inline]
680 fn encode(
681 self,
682 encoder: &mut ___E,
683 out: &mut ::core::mem::MaybeUninit<crate::wire::ExtendedAttributeValue<'static>>,
684 _: (),
685 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
686 ::fidl_next::munge!(let crate::wire::ExtendedAttributeValue { raw, _phantom: _ } = out);
687
688 match self {
689 Self::Bytes(value) => ::fidl_next::wire::Union::encode_as::<
690 ___E,
691 ::fidl_next::wire::Vector<'static, u8>,
692 >(value, 1, encoder, raw, (32768, ()))?,
693
694 Self::Buffer(value) => ::fidl_next::wire::Union::encode_as::<
695 ___E,
696 ::fidl_next::wire::fuchsia::Vmo,
697 >(value, 2, encoder, raw, ())?,
698
699 Self::UnknownOrdinal_(ordinal) => {
700 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
701 }
702 }
703
704 Ok(())
705 }
706 }
707
708 unsafe impl<___E>
709 ::fidl_next::EncodeOption<crate::wire_optional::ExtendedAttributeValue<'static>, ___E>
710 for ExtendedAttributeValue
711 where
712 ___E: ?Sized,
713 ExtendedAttributeValue:
714 ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
715 {
716 #[inline]
717 fn encode_option(
718 this: ::core::option::Option<Self>,
719 encoder: &mut ___E,
720 out: &mut ::core::mem::MaybeUninit<
721 crate::wire_optional::ExtendedAttributeValue<'static>,
722 >,
723 _: (),
724 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
725 ::fidl_next::munge!(let crate::wire_optional::ExtendedAttributeValue { raw, _phantom: _ } = &mut *out);
726
727 if let Some(inner) = this {
728 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
729 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
730 } else {
731 ::fidl_next::wire::Union::encode_absent(raw);
732 }
733
734 Ok(())
735 }
736 }
737
738 impl<'de> ::fidl_next::FromWire<crate::wire::ExtendedAttributeValue<'de>>
739 for ExtendedAttributeValue
740 {
741 #[inline]
742 fn from_wire(wire: crate::wire::ExtendedAttributeValue<'de>) -> Self {
743 let wire = ::core::mem::ManuallyDrop::new(wire);
744 match wire.raw.ordinal() {
745 1 => Self::Bytes(::fidl_next::FromWire::from_wire(unsafe {
746 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
747 })),
748
749 2 => Self::Buffer(::fidl_next::FromWire::from_wire(unsafe {
750 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
751 })),
752
753 ord => return Self::UnknownOrdinal_(ord as u64),
754 }
755 }
756 }
757
758 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
759 for ExtendedAttributeValue
760 {
761 #[inline]
762 fn from_wire_option(
763 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
764 ) -> ::core::option::Option<Self> {
765 if let Some(inner) = wire.into_option() {
766 Some(::fidl_next::FromWire::from_wire(inner))
767 } else {
768 None
769 }
770 }
771 }
772
773 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
774 for Box<ExtendedAttributeValue>
775 {
776 #[inline]
777 fn from_wire_option(
778 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
779 ) -> ::core::option::Option<Self> {
780 <ExtendedAttributeValue as ::fidl_next::FromWireOption<
781 crate::wire_optional::ExtendedAttributeValue<'de>,
782 >>::from_wire_option(wire)
783 .map(Box::new)
784 }
785 }
786
787 #[derive(Debug, PartialEq)]
788 pub struct NodeSetExtendedAttributeRequest {
789 pub name: ::std::vec::Vec<u8>,
790
791 pub value: crate::natural::ExtendedAttributeValue,
792
793 pub mode: crate::natural::SetExtendedAttributeMode,
794 }
795
796 unsafe impl<___E>
797 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
798 for NodeSetExtendedAttributeRequest
799 where
800 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
801 ___E: ::fidl_next::Encoder,
802 ___E: ::fidl_next::fuchsia::HandleEncoder,
803 {
804 #[inline]
805 fn encode(
806 self,
807 encoder_: &mut ___E,
808 out_: &mut ::core::mem::MaybeUninit<
809 crate::wire::NodeSetExtendedAttributeRequest<'static>,
810 >,
811 _: (),
812 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
813 ::fidl_next::munge! {
814 let crate::wire::NodeSetExtendedAttributeRequest {
815 name,
816 value,
817 mode,
818
819 } = out_;
820 }
821
822 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
823
824 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
825 ::fidl_next::Constrained::validate(_field, (255, ()))?;
826
827 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
828
829 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
830
831 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
832
833 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
834
835 Ok(())
836 }
837 }
838
839 unsafe impl<___E>
840 ::fidl_next::EncodeOption<
841 ::fidl_next::wire::Box<'static, crate::wire::NodeSetExtendedAttributeRequest<'static>>,
842 ___E,
843 > for NodeSetExtendedAttributeRequest
844 where
845 ___E: ::fidl_next::Encoder + ?Sized,
846 NodeSetExtendedAttributeRequest:
847 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>,
848 {
849 #[inline]
850 fn encode_option(
851 this: ::core::option::Option<Self>,
852 encoder: &mut ___E,
853 out: &mut ::core::mem::MaybeUninit<
854 ::fidl_next::wire::Box<
855 'static,
856 crate::wire::NodeSetExtendedAttributeRequest<'static>,
857 >,
858 >,
859 _: (),
860 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
861 if let Some(inner) = this {
862 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
863 ::fidl_next::wire::Box::encode_present(out);
864 } else {
865 ::fidl_next::wire::Box::encode_absent(out);
866 }
867
868 Ok(())
869 }
870 }
871
872 impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetExtendedAttributeRequest<'de>>
873 for NodeSetExtendedAttributeRequest
874 {
875 #[inline]
876 fn from_wire(wire: crate::wire::NodeSetExtendedAttributeRequest<'de>) -> Self {
877 Self {
878 name: ::fidl_next::FromWire::from_wire(wire.name),
879
880 value: ::fidl_next::FromWire::from_wire(wire.value),
881
882 mode: ::fidl_next::FromWire::from_wire(wire.mode),
883 }
884 }
885 }
886
887 #[doc = " Auxiliary data for the file representation of a node.\n"]
888 #[derive(Debug, Default, PartialEq)]
889 pub struct FileInfo {
890 pub is_append: ::core::option::Option<bool>,
891
892 pub observer: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
893
894 pub stream: ::core::option::Option<::fidl_next::fuchsia::zx::Stream>,
895
896 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
897 }
898
899 impl FileInfo {
900 fn __max_ordinal(&self) -> usize {
901 if self.attributes.is_some() {
902 return 4;
903 }
904
905 if self.stream.is_some() {
906 return 3;
907 }
908
909 if self.observer.is_some() {
910 return 2;
911 }
912
913 if self.is_append.is_some() {
914 return 1;
915 }
916
917 0
918 }
919 }
920
921 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileInfo<'static>, ___E> for FileInfo
922 where
923 ___E: ::fidl_next::Encoder + ?Sized,
924 ___E: ::fidl_next::fuchsia::HandleEncoder,
925 {
926 #[inline]
927 fn encode(
928 mut self,
929 encoder: &mut ___E,
930 out: &mut ::core::mem::MaybeUninit<crate::wire::FileInfo<'static>>,
931 _: (),
932 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
933 ::fidl_next::munge!(let crate::wire::FileInfo { table } = out);
934
935 let max_ord = self.__max_ordinal();
936
937 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
938 ::fidl_next::Wire::zero_padding(&mut out);
939
940 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
941 ::fidl_next::wire::Envelope,
942 >(encoder, max_ord);
943
944 for i in 1..=max_ord {
945 match i {
946 4 => {
947 if let Some(value) = self.attributes.take() {
948 ::fidl_next::wire::Envelope::encode_value::<
949 crate::wire::NodeAttributes2<'static>,
950 ___E,
951 >(
952 value, preallocated.encoder, &mut out, ()
953 )?;
954 } else {
955 ::fidl_next::wire::Envelope::encode_zero(&mut out)
956 }
957 }
958
959 3 => {
960 if let Some(value) = self.stream.take() {
961 ::fidl_next::wire::Envelope::encode_value::<
962 ::fidl_next::wire::fuchsia::Stream,
963 ___E,
964 >(
965 value, preallocated.encoder, &mut out, ()
966 )?;
967 } else {
968 ::fidl_next::wire::Envelope::encode_zero(&mut out)
969 }
970 }
971
972 2 => {
973 if let Some(value) = self.observer.take() {
974 ::fidl_next::wire::Envelope::encode_value::<
975 ::fidl_next::wire::fuchsia::Event,
976 ___E,
977 >(
978 value, preallocated.encoder, &mut out, ()
979 )?;
980 } else {
981 ::fidl_next::wire::Envelope::encode_zero(&mut out)
982 }
983 }
984
985 1 => {
986 if let Some(value) = self.is_append.take() {
987 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
988 value,
989 preallocated.encoder,
990 &mut out,
991 (),
992 )?;
993 } else {
994 ::fidl_next::wire::Envelope::encode_zero(&mut out)
995 }
996 }
997
998 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
999 }
1000 unsafe {
1001 preallocated.write_next(out.assume_init_ref());
1002 }
1003 }
1004
1005 ::fidl_next::wire::Table::encode_len(table, max_ord);
1006
1007 Ok(())
1008 }
1009 }
1010
1011 impl<'de> ::fidl_next::FromWire<crate::wire::FileInfo<'de>> for FileInfo {
1012 #[inline]
1013 fn from_wire(wire_: crate::wire::FileInfo<'de>) -> Self {
1014 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1015
1016 let is_append = wire_.table.get(1);
1017
1018 let observer = wire_.table.get(2);
1019
1020 let stream = wire_.table.get(3);
1021
1022 let attributes = wire_.table.get(4);
1023
1024 Self {
1025 is_append: is_append.map(|envelope| {
1026 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1027 }),
1028
1029 observer: observer.map(|envelope| {
1030 ::fidl_next::FromWire::from_wire(unsafe {
1031 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
1032 })
1033 }),
1034
1035 stream: stream.map(|envelope| {
1036 ::fidl_next::FromWire::from_wire(unsafe {
1037 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Stream>()
1038 })
1039 }),
1040
1041 attributes: attributes.map(|envelope| {
1042 ::fidl_next::FromWire::from_wire(unsafe {
1043 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
1044 })
1045 }),
1046 }
1047 }
1048 }
1049
1050 #[derive(Debug, PartialEq)]
1051 pub enum Representation {
1052 Node(crate::natural::NodeInfo),
1053
1054 Directory(crate::natural::DirectoryInfo),
1055
1056 File(crate::natural::FileInfo),
1057
1058 Symlink(crate::natural::SymlinkInfo),
1059
1060 UnknownOrdinal_(u64),
1061 }
1062
1063 impl Representation {
1064 pub fn is_unknown(&self) -> bool {
1065 #[allow(unreachable_patterns)]
1066 match self {
1067 Self::UnknownOrdinal_(_) => true,
1068 _ => false,
1069 }
1070 }
1071 }
1072
1073 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Representation<'static>, ___E> for Representation
1074 where
1075 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1076 ___E: ::fidl_next::Encoder,
1077 ___E: ::fidl_next::fuchsia::HandleEncoder,
1078 {
1079 #[inline]
1080 fn encode(
1081 self,
1082 encoder: &mut ___E,
1083 out: &mut ::core::mem::MaybeUninit<crate::wire::Representation<'static>>,
1084 _: (),
1085 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1086 ::fidl_next::munge!(let crate::wire::Representation { raw, _phantom: _ } = out);
1087
1088 match self {
1089 Self::Node(value) => ::fidl_next::wire::Union::encode_as::<
1090 ___E,
1091 crate::wire::NodeInfo<'static>,
1092 >(value, 1, encoder, raw, ())?,
1093
1094 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
1095 ___E,
1096 crate::wire::DirectoryInfo<'static>,
1097 >(value, 2, encoder, raw, ())?,
1098
1099 Self::File(value) => ::fidl_next::wire::Union::encode_as::<
1100 ___E,
1101 crate::wire::FileInfo<'static>,
1102 >(value, 3, encoder, raw, ())?,
1103
1104 Self::Symlink(value) => ::fidl_next::wire::Union::encode_as::<
1105 ___E,
1106 crate::wire::SymlinkInfo<'static>,
1107 >(value, 4, encoder, raw, ())?,
1108
1109 Self::UnknownOrdinal_(ordinal) => {
1110 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1111 }
1112 }
1113
1114 Ok(())
1115 }
1116 }
1117
1118 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Representation<'static>, ___E>
1119 for Representation
1120 where
1121 ___E: ?Sized,
1122 Representation: ::fidl_next::Encode<crate::wire::Representation<'static>, ___E>,
1123 {
1124 #[inline]
1125 fn encode_option(
1126 this: ::core::option::Option<Self>,
1127 encoder: &mut ___E,
1128 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Representation<'static>>,
1129 _: (),
1130 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1131 ::fidl_next::munge!(let crate::wire_optional::Representation { raw, _phantom: _ } = &mut *out);
1132
1133 if let Some(inner) = this {
1134 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1135 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1136 } else {
1137 ::fidl_next::wire::Union::encode_absent(raw);
1138 }
1139
1140 Ok(())
1141 }
1142 }
1143
1144 impl<'de> ::fidl_next::FromWire<crate::wire::Representation<'de>> for Representation {
1145 #[inline]
1146 fn from_wire(wire: crate::wire::Representation<'de>) -> Self {
1147 let wire = ::core::mem::ManuallyDrop::new(wire);
1148 match wire.raw.ordinal() {
1149 1 => Self::Node(::fidl_next::FromWire::from_wire(unsafe {
1150 wire.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>()
1151 })),
1152
1153 2 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
1154 wire.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
1155 })),
1156
1157 3 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
1158 wire.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>()
1159 })),
1160
1161 4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
1162 wire.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>()
1163 })),
1164
1165 ord => return Self::UnknownOrdinal_(ord as u64),
1166 }
1167 }
1168 }
1169
1170 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1171 for Representation
1172 {
1173 #[inline]
1174 fn from_wire_option(
1175 wire: crate::wire_optional::Representation<'de>,
1176 ) -> ::core::option::Option<Self> {
1177 if let Some(inner) = wire.into_option() {
1178 Some(::fidl_next::FromWire::from_wire(inner))
1179 } else {
1180 None
1181 }
1182 }
1183 }
1184
1185 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1186 for Box<Representation>
1187 {
1188 #[inline]
1189 fn from_wire_option(
1190 wire: crate::wire_optional::Representation<'de>,
1191 ) -> ::core::option::Option<Self> {
1192 <Representation as ::fidl_next::FromWireOption<
1193 crate::wire_optional::Representation<'de>,
1194 >>::from_wire_option(wire)
1195 .map(Box::new)
1196 }
1197 }
1198
1199 #[derive(Debug, PartialEq)]
1200 pub struct OpenableOpenRequest {
1201 pub path: ::std::string::String,
1202
1203 pub flags: crate::natural::Flags,
1204
1205 pub options: crate::natural::Options,
1206
1207 pub object: ::fidl_next::fuchsia::zx::Channel,
1208 }
1209
1210 unsafe impl<___E> ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'static>, ___E>
1211 for OpenableOpenRequest
1212 where
1213 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1214 ___E: ::fidl_next::Encoder,
1215 ___E: ::fidl_next::fuchsia::HandleEncoder,
1216 {
1217 #[inline]
1218 fn encode(
1219 self,
1220 encoder_: &mut ___E,
1221 out_: &mut ::core::mem::MaybeUninit<crate::wire::OpenableOpenRequest<'static>>,
1222 _: (),
1223 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1224 ::fidl_next::munge! {
1225 let crate::wire::OpenableOpenRequest {
1226 path,
1227 flags,
1228 options,
1229 object,
1230
1231 } = out_;
1232 }
1233
1234 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
1235
1236 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
1237 ::fidl_next::Constrained::validate(_field, 4095)?;
1238
1239 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1240
1241 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1242
1243 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
1244
1245 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
1246
1247 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1248
1249 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1250
1251 Ok(())
1252 }
1253 }
1254
1255 unsafe impl<___E>
1256 ::fidl_next::EncodeOption<
1257 ::fidl_next::wire::Box<'static, crate::wire::OpenableOpenRequest<'static>>,
1258 ___E,
1259 > for OpenableOpenRequest
1260 where
1261 ___E: ::fidl_next::Encoder + ?Sized,
1262 OpenableOpenRequest: ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'static>, ___E>,
1263 {
1264 #[inline]
1265 fn encode_option(
1266 this: ::core::option::Option<Self>,
1267 encoder: &mut ___E,
1268 out: &mut ::core::mem::MaybeUninit<
1269 ::fidl_next::wire::Box<'static, crate::wire::OpenableOpenRequest<'static>>,
1270 >,
1271 _: (),
1272 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1273 if let Some(inner) = this {
1274 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1275 ::fidl_next::wire::Box::encode_present(out);
1276 } else {
1277 ::fidl_next::wire::Box::encode_absent(out);
1278 }
1279
1280 Ok(())
1281 }
1282 }
1283
1284 impl<'de> ::fidl_next::FromWire<crate::wire::OpenableOpenRequest<'de>> for OpenableOpenRequest {
1285 #[inline]
1286 fn from_wire(wire: crate::wire::OpenableOpenRequest<'de>) -> Self {
1287 Self {
1288 path: ::fidl_next::FromWire::from_wire(wire.path),
1289
1290 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1291
1292 options: ::fidl_next::FromWire::from_wire(wire.options),
1293
1294 object: ::fidl_next::FromWire::from_wire(wire.object),
1295 }
1296 }
1297 }
1298
1299 #[derive(Debug, PartialEq)]
1300 #[repr(C)]
1301 pub struct NodeDeprecatedCloneRequest {
1302 pub flags: crate::natural::OpenFlags,
1303
1304 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1305 }
1306
1307 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
1308 for NodeDeprecatedCloneRequest
1309 where
1310 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1311 ___E: ::fidl_next::fuchsia::HandleEncoder,
1312 {
1313 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1314 Self,
1315 crate::wire::NodeDeprecatedCloneRequest,
1316 > = unsafe {
1317 ::fidl_next::CopyOptimization::enable_if(
1318 true
1319
1320 && <
1321 crate::natural::OpenFlags as ::fidl_next::Encode<crate::wire::OpenFlags, ___E>
1322 >::COPY_OPTIMIZATION.is_enabled()
1323
1324 && <
1325 ::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>
1326 >::COPY_OPTIMIZATION.is_enabled()
1327
1328 )
1329 };
1330
1331 #[inline]
1332 fn encode(
1333 self,
1334 encoder_: &mut ___E,
1335 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
1336 _: (),
1337 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1338 ::fidl_next::munge! {
1339 let crate::wire::NodeDeprecatedCloneRequest {
1340 flags,
1341 object,
1342
1343 } = out_;
1344 }
1345
1346 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1347
1348 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1349
1350 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1351
1352 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1353
1354 Ok(())
1355 }
1356 }
1357
1358 unsafe impl<___E>
1359 ::fidl_next::EncodeOption<
1360 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1361 ___E,
1362 > for NodeDeprecatedCloneRequest
1363 where
1364 ___E: ::fidl_next::Encoder + ?Sized,
1365 NodeDeprecatedCloneRequest:
1366 ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>,
1367 {
1368 #[inline]
1369 fn encode_option(
1370 this: ::core::option::Option<Self>,
1371 encoder: &mut ___E,
1372 out: &mut ::core::mem::MaybeUninit<
1373 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1374 >,
1375 _: (),
1376 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1377 if let Some(inner) = this {
1378 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1379 ::fidl_next::wire::Box::encode_present(out);
1380 } else {
1381 ::fidl_next::wire::Box::encode_absent(out);
1382 }
1383
1384 Ok(())
1385 }
1386 }
1387
1388 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedCloneRequest> for NodeDeprecatedCloneRequest {
1389 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1390 crate::wire::NodeDeprecatedCloneRequest,
1391 Self,
1392 > = unsafe {
1393 ::fidl_next::CopyOptimization::enable_if(
1394 true
1395
1396 && <
1397 crate::natural::OpenFlags as ::fidl_next::FromWire<crate::wire::OpenFlags>
1398 >::COPY_OPTIMIZATION.is_enabled()
1399
1400 && <
1401 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>>
1402 >::COPY_OPTIMIZATION.is_enabled()
1403
1404 )
1405 };
1406
1407 #[inline]
1408 fn from_wire(wire: crate::wire::NodeDeprecatedCloneRequest) -> Self {
1409 Self {
1410 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1411
1412 object: ::fidl_next::FromWire::from_wire(wire.object),
1413 }
1414 }
1415 }
1416
1417 #[derive(Debug, PartialEq)]
1418 pub struct NodeOnOpenRequest {
1419 pub s: ::fidl_next::fuchsia::zx::Status,
1420
1421 pub info: ::core::option::Option<::std::boxed::Box<crate::natural::NodeInfoDeprecated>>,
1422 }
1423
1424 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
1425 for NodeOnOpenRequest
1426 where
1427 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1428 ___E: ::fidl_next::Encoder,
1429 ___E: ::fidl_next::fuchsia::HandleEncoder,
1430 {
1431 #[inline]
1432 fn encode(
1433 self,
1434 encoder_: &mut ___E,
1435 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
1436 _: (),
1437 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1438 ::fidl_next::munge! {
1439 let crate::wire::NodeOnOpenRequest {
1440 s,
1441 info,
1442
1443 } = out_;
1444 }
1445
1446 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1447
1448 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1449
1450 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
1451
1452 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
1453
1454 Ok(())
1455 }
1456 }
1457
1458 unsafe impl<___E>
1459 ::fidl_next::EncodeOption<
1460 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
1461 ___E,
1462 > for NodeOnOpenRequest
1463 where
1464 ___E: ::fidl_next::Encoder + ?Sized,
1465 NodeOnOpenRequest: ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>,
1466 {
1467 #[inline]
1468 fn encode_option(
1469 this: ::core::option::Option<Self>,
1470 encoder: &mut ___E,
1471 out: &mut ::core::mem::MaybeUninit<
1472 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
1473 >,
1474 _: (),
1475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1476 if let Some(inner) = this {
1477 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1478 ::fidl_next::wire::Box::encode_present(out);
1479 } else {
1480 ::fidl_next::wire::Box::encode_absent(out);
1481 }
1482
1483 Ok(())
1484 }
1485 }
1486
1487 impl<'de> ::fidl_next::FromWire<crate::wire::NodeOnOpenRequest<'de>> for NodeOnOpenRequest {
1488 #[inline]
1489 fn from_wire(wire: crate::wire::NodeOnOpenRequest<'de>) -> Self {
1490 Self {
1491 s: ::fidl_next::FromWire::from_wire(wire.s),
1492
1493 info: ::fidl_next::FromWire::from_wire(wire.info),
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 pub fn take_rights(&mut self) -> ::core::option::Option<crate::wire::Operations> {
2377 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2378 }
2379 }
2380
2381 impl<'de> ::core::fmt::Debug for ConnectionInfo<'de> {
2382 fn fmt(
2383 &self,
2384 f: &mut ::core::fmt::Formatter<'_>,
2385 ) -> ::core::result::Result<(), ::core::fmt::Error> {
2386 f.debug_struct("ConnectionInfo").field("rights", &self.rights()).finish()
2387 }
2388 }
2389
2390 impl<'de> ::fidl_next::IntoNatural for ConnectionInfo<'de> {
2391 type Natural = crate::natural::ConnectionInfo;
2392 }
2393
2394 #[derive(Debug)]
2396 #[repr(C)]
2397 pub struct DirectoryGetTokenResponse {
2398 pub s: ::fidl_next::wire::fuchsia::Status,
2399
2400 pub token: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
2401 }
2402
2403 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryGetTokenResponse>(), 8);
2404 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryGetTokenResponse>(), 4);
2405
2406 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryGetTokenResponse, s), 0);
2407
2408 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryGetTokenResponse, token), 4);
2409
2410 impl ::fidl_next::Constrained for DirectoryGetTokenResponse {
2411 type Constraint = ();
2412
2413 fn validate(
2414 _: ::fidl_next::Slot<'_, Self>,
2415 _: Self::Constraint,
2416 ) -> Result<(), ::fidl_next::ValidationError> {
2417 Ok(())
2418 }
2419 }
2420
2421 unsafe impl ::fidl_next::Wire for DirectoryGetTokenResponse {
2422 type Narrowed<'de> = DirectoryGetTokenResponse;
2423
2424 #[inline]
2425 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2426 ::fidl_next::munge! {
2427 let Self {
2428 s,
2429 token,
2430
2431 } = &mut *out_;
2432 }
2433
2434 ::fidl_next::Wire::zero_padding(s);
2435
2436 ::fidl_next::Wire::zero_padding(token);
2437 }
2438 }
2439
2440 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryGetTokenResponse
2441 where
2442 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2443 ___D: ::fidl_next::fuchsia::HandleDecoder,
2444 {
2445 fn decode(
2446 slot_: ::fidl_next::Slot<'_, Self>,
2447 decoder_: &mut ___D,
2448 _: (),
2449 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2450 ::fidl_next::munge! {
2451 let Self {
2452 mut s,
2453 mut token,
2454
2455 } = slot_;
2456 }
2457
2458 let _field = s.as_mut();
2459
2460 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2461
2462 let _field = token.as_mut();
2463
2464 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
2465
2466 Ok(())
2467 }
2468 }
2469
2470 impl ::fidl_next::IntoNatural for DirectoryGetTokenResponse {
2471 type Natural = crate::natural::DirectoryGetTokenResponse;
2472 }
2473
2474 #[derive(Debug)]
2476 #[repr(C)]
2477 pub struct DirectoryLinkRequest<'de> {
2478 pub src: ::fidl_next::wire::String<'de>,
2479
2480 pub dst_parent_token: ::fidl_next::wire::fuchsia::NullableHandle,
2481
2482 pub dst: ::fidl_next::wire::String<'de>,
2483 }
2484
2485 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkRequest<'_>>(), 40);
2486 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkRequest<'_>>(), 8);
2487
2488 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, src), 0);
2489
2490 static_assertions::const_assert_eq!(
2491 std::mem::offset_of!(DirectoryLinkRequest<'_>, dst_parent_token),
2492 16
2493 );
2494
2495 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, dst), 24);
2496
2497 impl ::fidl_next::Constrained for DirectoryLinkRequest<'_> {
2498 type Constraint = ();
2499
2500 fn validate(
2501 _: ::fidl_next::Slot<'_, Self>,
2502 _: Self::Constraint,
2503 ) -> Result<(), ::fidl_next::ValidationError> {
2504 Ok(())
2505 }
2506 }
2507
2508 unsafe impl ::fidl_next::Wire for DirectoryLinkRequest<'static> {
2509 type Narrowed<'de> = DirectoryLinkRequest<'de>;
2510
2511 #[inline]
2512 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2513 ::fidl_next::munge! {
2514 let Self {
2515 src,
2516 dst_parent_token,
2517 dst,
2518
2519 } = &mut *out_;
2520 }
2521
2522 ::fidl_next::Wire::zero_padding(src);
2523
2524 ::fidl_next::Wire::zero_padding(dst_parent_token);
2525
2526 ::fidl_next::Wire::zero_padding(dst);
2527
2528 unsafe {
2529 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2530 }
2531 }
2532 }
2533
2534 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryLinkRequest<'de>
2535 where
2536 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2537 ___D: ::fidl_next::Decoder<'de>,
2538 ___D: ::fidl_next::fuchsia::HandleDecoder,
2539 {
2540 fn decode(
2541 slot_: ::fidl_next::Slot<'_, Self>,
2542 decoder_: &mut ___D,
2543 _: (),
2544 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2545 if slot_.as_bytes()[20..24] != [0u8; 4] {
2546 return Err(::fidl_next::DecodeError::InvalidPadding);
2547 }
2548
2549 ::fidl_next::munge! {
2550 let Self {
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 src,
2641 dst_parent_token,
2642 dst,
2643
2644 } = &mut *out_;
2645 }
2646
2647 ::fidl_next::Wire::zero_padding(src);
2648
2649 ::fidl_next::Wire::zero_padding(dst_parent_token);
2650
2651 ::fidl_next::Wire::zero_padding(dst);
2652
2653 unsafe {
2654 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2655 }
2656 }
2657 }
2658
2659 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryRenameRequest<'de>
2660 where
2661 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2662 ___D: ::fidl_next::Decoder<'de>,
2663 ___D: ::fidl_next::fuchsia::HandleDecoder,
2664 {
2665 fn decode(
2666 slot_: ::fidl_next::Slot<'_, Self>,
2667 decoder_: &mut ___D,
2668 _: (),
2669 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2670 if slot_.as_bytes()[20..24] != [0u8; 4] {
2671 return Err(::fidl_next::DecodeError::InvalidPadding);
2672 }
2673
2674 ::fidl_next::munge! {
2675 let Self {
2676 mut src,
2677 mut dst_parent_token,
2678 mut dst,
2679
2680 } = slot_;
2681 }
2682
2683 let _field = src.as_mut();
2684 ::fidl_next::Constrained::validate(_field, 255)?;
2685 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2686
2687 let src = unsafe { src.deref_unchecked() };
2688
2689 if src.len() > 255 {
2690 return Err(::fidl_next::DecodeError::VectorTooLong {
2691 size: src.len() as u64,
2692 limit: 255,
2693 });
2694 }
2695
2696 let _field = dst_parent_token.as_mut();
2697
2698 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2699
2700 let _field = dst.as_mut();
2701 ::fidl_next::Constrained::validate(_field, 255)?;
2702 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2703
2704 let dst = unsafe { dst.deref_unchecked() };
2705
2706 if dst.len() > 255 {
2707 return Err(::fidl_next::DecodeError::VectorTooLong {
2708 size: dst.len() as u64,
2709 limit: 255,
2710 });
2711 }
2712
2713 Ok(())
2714 }
2715 }
2716
2717 impl<'de> ::fidl_next::IntoNatural for DirectoryRenameRequest<'de> {
2718 type Natural = crate::natural::DirectoryRenameRequest;
2719 }
2720
2721 #[derive(Debug)]
2723 #[repr(C)]
2724 pub struct DirectoryWatchRequest {
2725 pub mask: crate::wire::WatchMask,
2726
2727 pub options: ::fidl_next::wire::Uint32,
2728
2729 pub watcher:
2730 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::wire::fuchsia::Channel>,
2731 }
2732
2733 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchRequest>(), 12);
2734 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchRequest>(), 4);
2735
2736 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, mask), 0);
2737
2738 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, options), 4);
2739
2740 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, watcher), 8);
2741
2742 impl ::fidl_next::Constrained for DirectoryWatchRequest {
2743 type Constraint = ();
2744
2745 fn validate(
2746 _: ::fidl_next::Slot<'_, Self>,
2747 _: Self::Constraint,
2748 ) -> Result<(), ::fidl_next::ValidationError> {
2749 Ok(())
2750 }
2751 }
2752
2753 unsafe impl ::fidl_next::Wire for DirectoryWatchRequest {
2754 type Narrowed<'de> = DirectoryWatchRequest;
2755
2756 #[inline]
2757 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2758 ::fidl_next::munge! {
2759 let Self {
2760 mask,
2761 options,
2762 watcher,
2763
2764 } = &mut *out_;
2765 }
2766
2767 ::fidl_next::Wire::zero_padding(mask);
2768
2769 ::fidl_next::Wire::zero_padding(options);
2770
2771 ::fidl_next::Wire::zero_padding(watcher);
2772 }
2773 }
2774
2775 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchRequest
2776 where
2777 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2778 ___D: ::fidl_next::fuchsia::HandleDecoder,
2779 {
2780 fn decode(
2781 slot_: ::fidl_next::Slot<'_, Self>,
2782 decoder_: &mut ___D,
2783 _: (),
2784 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2785 ::fidl_next::munge! {
2786 let Self {
2787 mut mask,
2788 mut options,
2789 mut watcher,
2790
2791 } = slot_;
2792 }
2793
2794 let _field = mask.as_mut();
2795
2796 ::fidl_next::Decode::decode(mask.as_mut(), decoder_, ())?;
2797
2798 let _field = options.as_mut();
2799
2800 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
2801
2802 let _field = watcher.as_mut();
2803
2804 ::fidl_next::Decode::decode(watcher.as_mut(), decoder_, ())?;
2805
2806 Ok(())
2807 }
2808 }
2809
2810 impl ::fidl_next::IntoNatural for DirectoryWatchRequest {
2811 type Natural = crate::natural::DirectoryWatchRequest;
2812 }
2813
2814 #[derive(Debug)]
2816 #[repr(C)]
2817 pub struct NodeListExtendedAttributesRequest {
2818 pub iterator: ::fidl_next::ServerEnd<
2819 crate::ExtendedAttributeIterator,
2820 ::fidl_next::wire::fuchsia::Channel,
2821 >,
2822 }
2823
2824 static_assertions::const_assert_eq!(
2825 std::mem::size_of::<NodeListExtendedAttributesRequest>(),
2826 4
2827 );
2828 static_assertions::const_assert_eq!(
2829 std::mem::align_of::<NodeListExtendedAttributesRequest>(),
2830 4
2831 );
2832
2833 static_assertions::const_assert_eq!(
2834 std::mem::offset_of!(NodeListExtendedAttributesRequest, iterator),
2835 0
2836 );
2837
2838 impl ::fidl_next::Constrained for NodeListExtendedAttributesRequest {
2839 type Constraint = ();
2840
2841 fn validate(
2842 _: ::fidl_next::Slot<'_, Self>,
2843 _: Self::Constraint,
2844 ) -> Result<(), ::fidl_next::ValidationError> {
2845 Ok(())
2846 }
2847 }
2848
2849 unsafe impl ::fidl_next::Wire for NodeListExtendedAttributesRequest {
2850 type Narrowed<'de> = NodeListExtendedAttributesRequest;
2851
2852 #[inline]
2853 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2854 ::fidl_next::munge! {
2855 let Self {
2856 iterator,
2857
2858 } = &mut *out_;
2859 }
2860
2861 ::fidl_next::Wire::zero_padding(iterator);
2862 }
2863 }
2864
2865 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeListExtendedAttributesRequest
2866 where
2867 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2868 ___D: ::fidl_next::fuchsia::HandleDecoder,
2869 {
2870 fn decode(
2871 slot_: ::fidl_next::Slot<'_, Self>,
2872 decoder_: &mut ___D,
2873 _: (),
2874 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2875 ::fidl_next::munge! {
2876 let Self {
2877 mut iterator,
2878
2879 } = slot_;
2880 }
2881
2882 let _field = iterator.as_mut();
2883
2884 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
2885
2886 Ok(())
2887 }
2888 }
2889
2890 impl ::fidl_next::IntoNatural for NodeListExtendedAttributesRequest {
2891 type Natural = crate::natural::NodeListExtendedAttributesRequest;
2892 }
2893
2894 #[repr(transparent)]
2896 pub struct ExtendedAttributeValue<'de> {
2897 pub(crate) raw: ::fidl_next::wire::Union,
2898 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2899 }
2900
2901 impl<'de> Drop for ExtendedAttributeValue<'de> {
2902 fn drop(&mut self) {
2903 match self.raw.ordinal() {
2904 1 => {
2905 let _ = unsafe {
2906 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2907 };
2908 }
2909
2910 2 => {
2911 let _ = unsafe {
2912 self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2913 };
2914 }
2915
2916 _ => (),
2917 }
2918 }
2919 }
2920
2921 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
2922 type Constraint = ();
2923
2924 fn validate(
2925 _: ::fidl_next::Slot<'_, Self>,
2926 _: Self::Constraint,
2927 ) -> Result<(), ::fidl_next::ValidationError> {
2928 Ok(())
2929 }
2930 }
2931
2932 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
2933 type Narrowed<'de> = ExtendedAttributeValue<'de>;
2934
2935 #[inline]
2936 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2937 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2938 ::fidl_next::wire::Union::zero_padding(raw);
2939 }
2940 }
2941
2942 pub mod extended_attribute_value {
2943 pub enum Ref<'de> {
2944 Bytes(&'de ::fidl_next::wire::Vector<'de, u8>),
2945
2946 Buffer(&'de ::fidl_next::wire::fuchsia::Vmo),
2947
2948 UnknownOrdinal_(u64),
2949 }
2950
2951 pub enum Value<'de> {
2952 Bytes(::fidl_next::wire::Vector<'de, u8>),
2953
2954 Buffer(::fidl_next::wire::fuchsia::Vmo),
2955
2956 UnknownOrdinal_(u64),
2957 }
2958 }
2959
2960 impl<'de> ExtendedAttributeValue<'de> {
2961 pub fn as_ref(&self) -> crate::wire::extended_attribute_value::Ref<'_> {
2962 match self.raw.ordinal() {
2963 1 => crate::wire::extended_attribute_value::Ref::Bytes(unsafe {
2964 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
2965 }),
2966
2967 2 => crate::wire::extended_attribute_value::Ref::Buffer(unsafe {
2968 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2969 }),
2970
2971 unknown => crate::wire::extended_attribute_value::Ref::UnknownOrdinal_(unknown),
2972 }
2973 }
2974
2975 pub fn into_inner(self) -> crate::wire::extended_attribute_value::Value<'de> {
2976 let this = ::core::mem::ManuallyDrop::new(self);
2977
2978 match this.raw.ordinal() {
2979 1 => crate::wire::extended_attribute_value::Value::Bytes(unsafe {
2980 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2981 }),
2982
2983 2 => crate::wire::extended_attribute_value::Value::Buffer(unsafe {
2984 this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2985 }),
2986
2987 unknown => crate::wire::extended_attribute_value::Value::UnknownOrdinal_(unknown),
2988 }
2989 }
2990 }
2991
2992 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
2993 where
2994 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2995 ___D: ::fidl_next::Decoder<'de>,
2996 ___D: ::fidl_next::fuchsia::HandleDecoder,
2997 {
2998 fn decode(
2999 mut slot: ::fidl_next::Slot<'_, Self>,
3000 decoder: &mut ___D,
3001 _: (),
3002 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3003 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3004 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3005 1 => {
3006 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3007 raw,
3008 decoder,
3009 (32768, ()),
3010 )?
3011 }
3012
3013 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Vmo>(
3014 raw,
3015 decoder,
3016 (),
3017 )?,
3018
3019 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3020 }
3021
3022 Ok(())
3023 }
3024 }
3025
3026 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
3027 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3028 match self.raw.ordinal() {
3029 1 => unsafe {
3030 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
3031 },
3032 2 => unsafe {
3033 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>().fmt(f)
3034 },
3035 _ => unsafe { ::core::hint::unreachable_unchecked() },
3036 }
3037 }
3038 }
3039
3040 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
3041 type Natural = crate::natural::ExtendedAttributeValue;
3042 }
3043
3044 #[derive(Debug)]
3046 #[repr(C)]
3047 pub struct NodeSetExtendedAttributeRequest<'de> {
3048 pub name: ::fidl_next::wire::Vector<'de, u8>,
3049
3050 pub value: crate::wire::ExtendedAttributeValue<'de>,
3051
3052 pub mode: crate::wire::SetExtendedAttributeMode,
3053 }
3054
3055 static_assertions::const_assert_eq!(
3056 std::mem::size_of::<NodeSetExtendedAttributeRequest<'_>>(),
3057 40
3058 );
3059 static_assertions::const_assert_eq!(
3060 std::mem::align_of::<NodeSetExtendedAttributeRequest<'_>>(),
3061 8
3062 );
3063
3064 static_assertions::const_assert_eq!(
3065 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, name),
3066 0
3067 );
3068
3069 static_assertions::const_assert_eq!(
3070 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, value),
3071 16
3072 );
3073
3074 static_assertions::const_assert_eq!(
3075 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, mode),
3076 32
3077 );
3078
3079 impl ::fidl_next::Constrained for NodeSetExtendedAttributeRequest<'_> {
3080 type Constraint = ();
3081
3082 fn validate(
3083 _: ::fidl_next::Slot<'_, Self>,
3084 _: Self::Constraint,
3085 ) -> Result<(), ::fidl_next::ValidationError> {
3086 Ok(())
3087 }
3088 }
3089
3090 unsafe impl ::fidl_next::Wire for NodeSetExtendedAttributeRequest<'static> {
3091 type Narrowed<'de> = NodeSetExtendedAttributeRequest<'de>;
3092
3093 #[inline]
3094 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3095 ::fidl_next::munge! {
3096 let Self {
3097 name,
3098 value,
3099 mode,
3100
3101 } = &mut *out_;
3102 }
3103
3104 ::fidl_next::Wire::zero_padding(name);
3105
3106 ::fidl_next::Wire::zero_padding(value);
3107
3108 ::fidl_next::Wire::zero_padding(mode);
3109
3110 unsafe {
3111 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3112 }
3113 }
3114 }
3115
3116 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetExtendedAttributeRequest<'de>
3117 where
3118 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3119 ___D: ::fidl_next::Decoder<'de>,
3120 ___D: ::fidl_next::fuchsia::HandleDecoder,
3121 {
3122 fn decode(
3123 slot_: ::fidl_next::Slot<'_, Self>,
3124 decoder_: &mut ___D,
3125 _: (),
3126 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3127 if slot_.as_bytes()[36..40] != [0u8; 4] {
3128 return Err(::fidl_next::DecodeError::InvalidPadding);
3129 }
3130
3131 ::fidl_next::munge! {
3132 let Self {
3133 mut name,
3134 mut value,
3135 mut mode,
3136
3137 } = slot_;
3138 }
3139
3140 let _field = name.as_mut();
3141 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3142 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
3143
3144 let name = unsafe { name.deref_unchecked() };
3145
3146 if name.len() > 255 {
3147 return Err(::fidl_next::DecodeError::VectorTooLong {
3148 size: name.len() as u64,
3149 limit: 255,
3150 });
3151 }
3152
3153 let _field = value.as_mut();
3154
3155 ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
3156
3157 let _field = mode.as_mut();
3158
3159 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3160
3161 Ok(())
3162 }
3163 }
3164
3165 impl<'de> ::fidl_next::IntoNatural for NodeSetExtendedAttributeRequest<'de> {
3166 type Natural = crate::natural::NodeSetExtendedAttributeRequest;
3167 }
3168
3169 #[repr(C)]
3171 pub struct FileInfo<'de> {
3172 pub(crate) table: ::fidl_next::wire::Table<'de>,
3173 }
3174
3175 impl<'de> Drop for FileInfo<'de> {
3176 fn drop(&mut self) {
3177 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3178
3179 let _ = self.table.get(2).map(|envelope| unsafe {
3180 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
3181 });
3182
3183 let _ = self.table.get(3).map(|envelope| unsafe {
3184 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Stream>()
3185 });
3186
3187 let _ = self.table.get(4).map(|envelope| unsafe {
3188 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
3189 });
3190 }
3191 }
3192
3193 impl ::fidl_next::Constrained for FileInfo<'_> {
3194 type Constraint = ();
3195
3196 fn validate(
3197 _: ::fidl_next::Slot<'_, Self>,
3198 _: Self::Constraint,
3199 ) -> Result<(), ::fidl_next::ValidationError> {
3200 Ok(())
3201 }
3202 }
3203
3204 unsafe impl ::fidl_next::Wire for FileInfo<'static> {
3205 type Narrowed<'de> = FileInfo<'de>;
3206
3207 #[inline]
3208 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3209 ::fidl_next::munge!(let Self { table } = out);
3210 ::fidl_next::wire::Table::zero_padding(table);
3211 }
3212 }
3213
3214 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileInfo<'de>
3215 where
3216 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3217 ___D: ::fidl_next::fuchsia::HandleDecoder,
3218 {
3219 fn decode(
3220 slot: ::fidl_next::Slot<'_, Self>,
3221 decoder: &mut ___D,
3222 _: (),
3223 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3224 ::fidl_next::munge!(let Self { table } = slot);
3225
3226 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3227 match ordinal {
3228 0 => unsafe { ::core::hint::unreachable_unchecked() },
3229
3230 1 => {
3231 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3232 slot.as_mut(),
3233 decoder,
3234 (),
3235 )?;
3236
3237 Ok(())
3238 }
3239
3240 2 => {
3241 ::fidl_next::wire::Envelope::decode_as::<
3242 ___D,
3243 ::fidl_next::wire::fuchsia::Event,
3244 >(slot.as_mut(), decoder, ())?;
3245
3246 Ok(())
3247 }
3248
3249 3 => {
3250 ::fidl_next::wire::Envelope::decode_as::<
3251 ___D,
3252 ::fidl_next::wire::fuchsia::Stream,
3253 >(slot.as_mut(), decoder, ())?;
3254
3255 Ok(())
3256 }
3257
3258 4 => {
3259 ::fidl_next::wire::Envelope::decode_as::<
3260 ___D,
3261 crate::wire::NodeAttributes2<'de>,
3262 >(slot.as_mut(), decoder, ())?;
3263
3264 Ok(())
3265 }
3266
3267 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3268 }
3269 })
3270 }
3271 }
3272
3273 impl<'de> FileInfo<'de> {
3274 pub fn is_append(&self) -> ::core::option::Option<&bool> {
3275 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3276 }
3277
3278 pub fn take_is_append(&mut self) -> ::core::option::Option<bool> {
3279 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3280 }
3281
3282 pub fn observer(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
3283 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3284 }
3285
3286 pub fn take_observer(
3287 &mut self,
3288 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
3289 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3290 }
3291
3292 pub fn stream(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Stream> {
3293 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3294 }
3295
3296 pub fn take_stream(
3297 &mut self,
3298 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Stream> {
3299 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3300 }
3301
3302 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
3303 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3304 }
3305
3306 pub fn take_attributes(
3307 &mut self,
3308 ) -> ::core::option::Option<crate::wire::NodeAttributes2<'de>> {
3309 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
3310 }
3311 }
3312
3313 impl<'de> ::core::fmt::Debug for FileInfo<'de> {
3314 fn fmt(
3315 &self,
3316 f: &mut ::core::fmt::Formatter<'_>,
3317 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3318 f.debug_struct("FileInfo")
3319 .field("is_append", &self.is_append())
3320 .field("observer", &self.observer())
3321 .field("stream", &self.stream())
3322 .field("attributes", &self.attributes())
3323 .finish()
3324 }
3325 }
3326
3327 impl<'de> ::fidl_next::IntoNatural for FileInfo<'de> {
3328 type Natural = crate::natural::FileInfo;
3329 }
3330
3331 #[repr(transparent)]
3333 pub struct Representation<'de> {
3334 pub(crate) raw: ::fidl_next::wire::Union,
3335 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3336 }
3337
3338 impl<'de> Drop for Representation<'de> {
3339 fn drop(&mut self) {
3340 match self.raw.ordinal() {
3341 1 => {
3342 let _ =
3343 unsafe { self.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>() };
3344 }
3345
3346 2 => {
3347 let _ = unsafe {
3348 self.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
3349 };
3350 }
3351
3352 3 => {
3353 let _ =
3354 unsafe { self.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>() };
3355 }
3356
3357 4 => {
3358 let _ =
3359 unsafe { self.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>() };
3360 }
3361
3362 _ => (),
3363 }
3364 }
3365 }
3366
3367 impl ::fidl_next::Constrained for Representation<'_> {
3368 type Constraint = ();
3369
3370 fn validate(
3371 _: ::fidl_next::Slot<'_, Self>,
3372 _: Self::Constraint,
3373 ) -> Result<(), ::fidl_next::ValidationError> {
3374 Ok(())
3375 }
3376 }
3377
3378 unsafe impl ::fidl_next::Wire for Representation<'static> {
3379 type Narrowed<'de> = Representation<'de>;
3380
3381 #[inline]
3382 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3383 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3384 ::fidl_next::wire::Union::zero_padding(raw);
3385 }
3386 }
3387
3388 pub mod representation {
3389 pub enum Ref<'de> {
3390 Node(&'de crate::wire::NodeInfo<'de>),
3391
3392 Directory(&'de crate::wire::DirectoryInfo<'de>),
3393
3394 File(&'de crate::wire::FileInfo<'de>),
3395
3396 Symlink(&'de crate::wire::SymlinkInfo<'de>),
3397
3398 UnknownOrdinal_(u64),
3399 }
3400
3401 pub enum Value<'de> {
3402 Node(crate::wire::NodeInfo<'de>),
3403
3404 Directory(crate::wire::DirectoryInfo<'de>),
3405
3406 File(crate::wire::FileInfo<'de>),
3407
3408 Symlink(crate::wire::SymlinkInfo<'de>),
3409
3410 UnknownOrdinal_(u64),
3411 }
3412 }
3413
3414 impl<'de> Representation<'de> {
3415 pub fn as_ref(&self) -> crate::wire::representation::Ref<'_> {
3416 match self.raw.ordinal() {
3417 1 => crate::wire::representation::Ref::Node(unsafe {
3418 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>()
3419 }),
3420
3421 2 => crate::wire::representation::Ref::Directory(unsafe {
3422 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>()
3423 }),
3424
3425 3 => crate::wire::representation::Ref::File(unsafe {
3426 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>()
3427 }),
3428
3429 4 => crate::wire::representation::Ref::Symlink(unsafe {
3430 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>()
3431 }),
3432
3433 unknown => crate::wire::representation::Ref::UnknownOrdinal_(unknown),
3434 }
3435 }
3436
3437 pub fn into_inner(self) -> crate::wire::representation::Value<'de> {
3438 let this = ::core::mem::ManuallyDrop::new(self);
3439
3440 match this.raw.ordinal() {
3441 1 => crate::wire::representation::Value::Node(unsafe {
3442 this.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>()
3443 }),
3444
3445 2 => crate::wire::representation::Value::Directory(unsafe {
3446 this.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
3447 }),
3448
3449 3 => crate::wire::representation::Value::File(unsafe {
3450 this.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>()
3451 }),
3452
3453 4 => crate::wire::representation::Value::Symlink(unsafe {
3454 this.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>()
3455 }),
3456
3457 unknown => crate::wire::representation::Value::UnknownOrdinal_(unknown),
3458 }
3459 }
3460 }
3461
3462 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
3463 where
3464 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3465 ___D: ::fidl_next::Decoder<'de>,
3466 ___D: ::fidl_next::fuchsia::HandleDecoder,
3467 {
3468 fn decode(
3469 mut slot: ::fidl_next::Slot<'_, Self>,
3470 decoder: &mut ___D,
3471 _: (),
3472 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3473 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3474 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3475 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
3476 raw,
3477 decoder,
3478 (),
3479 )?,
3480
3481 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
3482 raw,
3483 decoder,
3484 (),
3485 )?,
3486
3487 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
3488 raw,
3489 decoder,
3490 (),
3491 )?,
3492
3493 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
3494 raw,
3495 decoder,
3496 (),
3497 )?,
3498
3499 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3500 }
3501
3502 Ok(())
3503 }
3504 }
3505
3506 impl<'de> ::core::fmt::Debug for Representation<'de> {
3507 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3508 match self.raw.ordinal() {
3509 1 => unsafe {
3510 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>().fmt(f)
3511 },
3512 2 => unsafe {
3513 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>().fmt(f)
3514 },
3515 3 => unsafe {
3516 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>().fmt(f)
3517 },
3518 4 => unsafe {
3519 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>().fmt(f)
3520 },
3521 _ => unsafe { ::core::hint::unreachable_unchecked() },
3522 }
3523 }
3524 }
3525
3526 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
3527 type Natural = crate::natural::Representation;
3528 }
3529
3530 #[derive(Debug)]
3532 #[repr(C)]
3533 pub struct OpenableOpenRequest<'de> {
3534 pub path: ::fidl_next::wire::String<'de>,
3535
3536 pub flags: crate::wire::Flags,
3537
3538 pub options: crate::wire::Options<'de>,
3539
3540 pub object: ::fidl_next::wire::fuchsia::Channel,
3541 }
3542
3543 static_assertions::const_assert_eq!(std::mem::size_of::<OpenableOpenRequest<'_>>(), 48);
3544 static_assertions::const_assert_eq!(std::mem::align_of::<OpenableOpenRequest<'_>>(), 8);
3545
3546 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, path), 0);
3547
3548 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, flags), 16);
3549
3550 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, options), 24);
3551
3552 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, object), 40);
3553
3554 impl ::fidl_next::Constrained for OpenableOpenRequest<'_> {
3555 type Constraint = ();
3556
3557 fn validate(
3558 _: ::fidl_next::Slot<'_, Self>,
3559 _: Self::Constraint,
3560 ) -> Result<(), ::fidl_next::ValidationError> {
3561 Ok(())
3562 }
3563 }
3564
3565 unsafe impl ::fidl_next::Wire for OpenableOpenRequest<'static> {
3566 type Narrowed<'de> = OpenableOpenRequest<'de>;
3567
3568 #[inline]
3569 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3570 ::fidl_next::munge! {
3571 let Self {
3572 path,
3573 flags,
3574 options,
3575 object,
3576
3577 } = &mut *out_;
3578 }
3579
3580 ::fidl_next::Wire::zero_padding(path);
3581
3582 ::fidl_next::Wire::zero_padding(flags);
3583
3584 ::fidl_next::Wire::zero_padding(options);
3585
3586 ::fidl_next::Wire::zero_padding(object);
3587
3588 unsafe {
3589 out_.as_mut_ptr().cast::<u8>().add(44).write_bytes(0, 4);
3590 }
3591 }
3592 }
3593
3594 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OpenableOpenRequest<'de>
3595 where
3596 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3597 ___D: ::fidl_next::Decoder<'de>,
3598 ___D: ::fidl_next::fuchsia::HandleDecoder,
3599 {
3600 fn decode(
3601 slot_: ::fidl_next::Slot<'_, Self>,
3602 decoder_: &mut ___D,
3603 _: (),
3604 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3605 if slot_.as_bytes()[44..48] != [0u8; 4] {
3606 return Err(::fidl_next::DecodeError::InvalidPadding);
3607 }
3608
3609 ::fidl_next::munge! {
3610 let Self {
3611 mut path,
3612 mut flags,
3613 mut options,
3614 mut object,
3615
3616 } = slot_;
3617 }
3618
3619 let _field = path.as_mut();
3620 ::fidl_next::Constrained::validate(_field, 4095)?;
3621 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3622
3623 let path = unsafe { path.deref_unchecked() };
3624
3625 if path.len() > 4095 {
3626 return Err(::fidl_next::DecodeError::VectorTooLong {
3627 size: path.len() as u64,
3628 limit: 4095,
3629 });
3630 }
3631
3632 let _field = flags.as_mut();
3633
3634 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3635
3636 let _field = options.as_mut();
3637
3638 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
3639
3640 let _field = object.as_mut();
3641
3642 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3643
3644 Ok(())
3645 }
3646 }
3647
3648 impl<'de> ::fidl_next::IntoNatural for OpenableOpenRequest<'de> {
3649 type Natural = crate::natural::OpenableOpenRequest;
3650 }
3651
3652 #[derive(Debug)]
3654 #[repr(C)]
3655 pub struct NodeDeprecatedCloneRequest {
3656 pub flags: crate::wire::OpenFlags,
3657
3658 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
3659 }
3660
3661 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedCloneRequest>(), 8);
3662 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedCloneRequest>(), 4);
3663
3664 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedCloneRequest, flags), 0);
3665
3666 static_assertions::const_assert_eq!(
3667 std::mem::offset_of!(NodeDeprecatedCloneRequest, object),
3668 4
3669 );
3670
3671 impl ::fidl_next::Constrained for NodeDeprecatedCloneRequest {
3672 type Constraint = ();
3673
3674 fn validate(
3675 _: ::fidl_next::Slot<'_, Self>,
3676 _: Self::Constraint,
3677 ) -> Result<(), ::fidl_next::ValidationError> {
3678 Ok(())
3679 }
3680 }
3681
3682 unsafe impl ::fidl_next::Wire for NodeDeprecatedCloneRequest {
3683 type Narrowed<'de> = NodeDeprecatedCloneRequest;
3684
3685 #[inline]
3686 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3687 ::fidl_next::munge! {
3688 let Self {
3689 flags,
3690 object,
3691
3692 } = &mut *out_;
3693 }
3694
3695 ::fidl_next::Wire::zero_padding(flags);
3696
3697 ::fidl_next::Wire::zero_padding(object);
3698 }
3699 }
3700
3701 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedCloneRequest
3702 where
3703 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3704 ___D: ::fidl_next::fuchsia::HandleDecoder,
3705 {
3706 fn decode(
3707 slot_: ::fidl_next::Slot<'_, Self>,
3708 decoder_: &mut ___D,
3709 _: (),
3710 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3711 ::fidl_next::munge! {
3712 let Self {
3713 mut flags,
3714 mut object,
3715
3716 } = slot_;
3717 }
3718
3719 let _field = flags.as_mut();
3720
3721 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3722
3723 let _field = object.as_mut();
3724
3725 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3726
3727 Ok(())
3728 }
3729 }
3730
3731 impl ::fidl_next::IntoNatural for NodeDeprecatedCloneRequest {
3732 type Natural = crate::natural::NodeDeprecatedCloneRequest;
3733 }
3734
3735 #[derive(Debug)]
3737 #[repr(C)]
3738 pub struct NodeOnOpenRequest<'de> {
3739 pub s: ::fidl_next::wire::fuchsia::Status,
3740
3741 pub info: crate::wire_optional::NodeInfoDeprecated<'de>,
3742 }
3743
3744 static_assertions::const_assert_eq!(std::mem::size_of::<NodeOnOpenRequest<'_>>(), 24);
3745 static_assertions::const_assert_eq!(std::mem::align_of::<NodeOnOpenRequest<'_>>(), 8);
3746
3747 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, s), 0);
3748
3749 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, info), 8);
3750
3751 impl ::fidl_next::Constrained for NodeOnOpenRequest<'_> {
3752 type Constraint = ();
3753
3754 fn validate(
3755 _: ::fidl_next::Slot<'_, Self>,
3756 _: Self::Constraint,
3757 ) -> Result<(), ::fidl_next::ValidationError> {
3758 Ok(())
3759 }
3760 }
3761
3762 unsafe impl ::fidl_next::Wire for NodeOnOpenRequest<'static> {
3763 type Narrowed<'de> = NodeOnOpenRequest<'de>;
3764
3765 #[inline]
3766 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3767 ::fidl_next::munge! {
3768 let Self {
3769 s,
3770 info,
3771
3772 } = &mut *out_;
3773 }
3774
3775 ::fidl_next::Wire::zero_padding(s);
3776
3777 ::fidl_next::Wire::zero_padding(info);
3778
3779 unsafe {
3780 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
3781 }
3782 }
3783 }
3784
3785 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeOnOpenRequest<'de>
3786 where
3787 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3788 ___D: ::fidl_next::Decoder<'de>,
3789 ___D: ::fidl_next::fuchsia::HandleDecoder,
3790 {
3791 fn decode(
3792 slot_: ::fidl_next::Slot<'_, Self>,
3793 decoder_: &mut ___D,
3794 _: (),
3795 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3796 if slot_.as_bytes()[4..8] != [0u8; 4] {
3797 return Err(::fidl_next::DecodeError::InvalidPadding);
3798 }
3799
3800 ::fidl_next::munge! {
3801 let Self {
3802 mut s,
3803 mut info,
3804
3805 } = slot_;
3806 }
3807
3808 let _field = s.as_mut();
3809
3810 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
3811
3812 let _field = info.as_mut();
3813
3814 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
3815
3816 Ok(())
3817 }
3818 }
3819
3820 impl<'de> ::fidl_next::IntoNatural for NodeOnOpenRequest<'de> {
3821 type Natural = crate::natural::NodeOnOpenRequest;
3822 }
3823
3824 #[derive(Debug)]
3826 #[repr(C)]
3827 pub struct DirectoryDeprecatedOpenRequest<'de> {
3828 pub flags: crate::wire::OpenFlags,
3829
3830 pub mode: crate::wire::ModeType,
3831
3832 pub path: ::fidl_next::wire::String<'de>,
3833
3834 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
3835 }
3836
3837 static_assertions::const_assert_eq!(
3838 std::mem::size_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3839 32
3840 );
3841 static_assertions::const_assert_eq!(
3842 std::mem::align_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3843 8
3844 );
3845
3846 static_assertions::const_assert_eq!(
3847 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, flags),
3848 0
3849 );
3850
3851 static_assertions::const_assert_eq!(
3852 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, mode),
3853 4
3854 );
3855
3856 static_assertions::const_assert_eq!(
3857 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, path),
3858 8
3859 );
3860
3861 static_assertions::const_assert_eq!(
3862 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, object),
3863 24
3864 );
3865
3866 impl ::fidl_next::Constrained for DirectoryDeprecatedOpenRequest<'_> {
3867 type Constraint = ();
3868
3869 fn validate(
3870 _: ::fidl_next::Slot<'_, Self>,
3871 _: Self::Constraint,
3872 ) -> Result<(), ::fidl_next::ValidationError> {
3873 Ok(())
3874 }
3875 }
3876
3877 unsafe impl ::fidl_next::Wire for DirectoryDeprecatedOpenRequest<'static> {
3878 type Narrowed<'de> = DirectoryDeprecatedOpenRequest<'de>;
3879
3880 #[inline]
3881 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3882 ::fidl_next::munge! {
3883 let Self {
3884 flags,
3885 mode,
3886 path,
3887 object,
3888
3889 } = &mut *out_;
3890 }
3891
3892 ::fidl_next::Wire::zero_padding(flags);
3893
3894 ::fidl_next::Wire::zero_padding(mode);
3895
3896 ::fidl_next::Wire::zero_padding(path);
3897
3898 ::fidl_next::Wire::zero_padding(object);
3899
3900 unsafe {
3901 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
3902 }
3903 }
3904 }
3905
3906 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryDeprecatedOpenRequest<'de>
3907 where
3908 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3909 ___D: ::fidl_next::Decoder<'de>,
3910 ___D: ::fidl_next::fuchsia::HandleDecoder,
3911 {
3912 fn decode(
3913 slot_: ::fidl_next::Slot<'_, Self>,
3914 decoder_: &mut ___D,
3915 _: (),
3916 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3917 if slot_.as_bytes()[28..32] != [0u8; 4] {
3918 return Err(::fidl_next::DecodeError::InvalidPadding);
3919 }
3920
3921 ::fidl_next::munge! {
3922 let Self {
3923 mut flags,
3924 mut mode,
3925 mut path,
3926 mut object,
3927
3928 } = slot_;
3929 }
3930
3931 let _field = flags.as_mut();
3932
3933 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3934
3935 let _field = mode.as_mut();
3936
3937 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3938
3939 let _field = path.as_mut();
3940 ::fidl_next::Constrained::validate(_field, 4095)?;
3941 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3942
3943 let path = unsafe { path.deref_unchecked() };
3944
3945 if path.len() > 4095 {
3946 return Err(::fidl_next::DecodeError::VectorTooLong {
3947 size: path.len() as u64,
3948 limit: 4095,
3949 });
3950 }
3951
3952 let _field = object.as_mut();
3953
3954 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3955
3956 Ok(())
3957 }
3958 }
3959
3960 impl<'de> ::fidl_next::IntoNatural for DirectoryDeprecatedOpenRequest<'de> {
3961 type Natural = crate::natural::DirectoryDeprecatedOpenRequest;
3962 }
3963
3964 #[derive(Debug)]
3966 #[repr(C)]
3967 pub struct DirectoryCreateSymlinkRequest<'de> {
3968 pub name: ::fidl_next::wire::String<'de>,
3969
3970 pub target: ::fidl_next::wire::Vector<'de, u8>,
3971
3972 pub connection:
3973 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
3974 }
3975
3976 static_assertions::const_assert_eq!(
3977 std::mem::size_of::<DirectoryCreateSymlinkRequest<'_>>(),
3978 40
3979 );
3980 static_assertions::const_assert_eq!(
3981 std::mem::align_of::<DirectoryCreateSymlinkRequest<'_>>(),
3982 8
3983 );
3984
3985 static_assertions::const_assert_eq!(
3986 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, name),
3987 0
3988 );
3989
3990 static_assertions::const_assert_eq!(
3991 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, target),
3992 16
3993 );
3994
3995 static_assertions::const_assert_eq!(
3996 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, connection),
3997 32
3998 );
3999
4000 impl ::fidl_next::Constrained for DirectoryCreateSymlinkRequest<'_> {
4001 type Constraint = ();
4002
4003 fn validate(
4004 _: ::fidl_next::Slot<'_, Self>,
4005 _: Self::Constraint,
4006 ) -> Result<(), ::fidl_next::ValidationError> {
4007 Ok(())
4008 }
4009 }
4010
4011 unsafe impl ::fidl_next::Wire for DirectoryCreateSymlinkRequest<'static> {
4012 type Narrowed<'de> = DirectoryCreateSymlinkRequest<'de>;
4013
4014 #[inline]
4015 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4016 ::fidl_next::munge! {
4017 let Self {
4018 name,
4019 target,
4020 connection,
4021
4022 } = &mut *out_;
4023 }
4024
4025 ::fidl_next::Wire::zero_padding(name);
4026
4027 ::fidl_next::Wire::zero_padding(target);
4028
4029 ::fidl_next::Wire::zero_padding(connection);
4030
4031 unsafe {
4032 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
4033 }
4034 }
4035 }
4036
4037 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryCreateSymlinkRequest<'de>
4038 where
4039 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4040 ___D: ::fidl_next::Decoder<'de>,
4041 ___D: ::fidl_next::fuchsia::HandleDecoder,
4042 {
4043 fn decode(
4044 slot_: ::fidl_next::Slot<'_, Self>,
4045 decoder_: &mut ___D,
4046 _: (),
4047 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4048 if slot_.as_bytes()[36..40] != [0u8; 4] {
4049 return Err(::fidl_next::DecodeError::InvalidPadding);
4050 }
4051
4052 ::fidl_next::munge! {
4053 let Self {
4054 mut name,
4055 mut target,
4056 mut connection,
4057
4058 } = slot_;
4059 }
4060
4061 let _field = name.as_mut();
4062 ::fidl_next::Constrained::validate(_field, 255)?;
4063 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
4064
4065 let name = unsafe { name.deref_unchecked() };
4066
4067 if name.len() > 255 {
4068 return Err(::fidl_next::DecodeError::VectorTooLong {
4069 size: name.len() as u64,
4070 limit: 255,
4071 });
4072 }
4073
4074 let _field = target.as_mut();
4075 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
4076 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
4077
4078 let target = unsafe { target.deref_unchecked() };
4079
4080 if target.len() > 4095 {
4081 return Err(::fidl_next::DecodeError::VectorTooLong {
4082 size: target.len() as u64,
4083 limit: 4095,
4084 });
4085 }
4086
4087 let _field = connection.as_mut();
4088
4089 ::fidl_next::Decode::decode(connection.as_mut(), decoder_, ())?;
4090
4091 Ok(())
4092 }
4093 }
4094
4095 impl<'de> ::fidl_next::IntoNatural for DirectoryCreateSymlinkRequest<'de> {
4096 type Natural = crate::natural::DirectoryCreateSymlinkRequest;
4097 }
4098
4099 #[derive(Debug)]
4101 #[repr(C)]
4102 pub struct FileGetBackingMemoryResponse {
4103 pub vmo: ::fidl_next::wire::fuchsia::Vmo,
4104 }
4105
4106 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryResponse>(), 4);
4107 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryResponse>(), 4);
4108
4109 static_assertions::const_assert_eq!(std::mem::offset_of!(FileGetBackingMemoryResponse, vmo), 0);
4110
4111 impl ::fidl_next::Constrained for FileGetBackingMemoryResponse {
4112 type Constraint = ();
4113
4114 fn validate(
4115 _: ::fidl_next::Slot<'_, Self>,
4116 _: Self::Constraint,
4117 ) -> Result<(), ::fidl_next::ValidationError> {
4118 Ok(())
4119 }
4120 }
4121
4122 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryResponse {
4123 type Narrowed<'de> = FileGetBackingMemoryResponse;
4124
4125 #[inline]
4126 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4127 ::fidl_next::munge! {
4128 let Self {
4129 vmo,
4130
4131 } = &mut *out_;
4132 }
4133
4134 ::fidl_next::Wire::zero_padding(vmo);
4135 }
4136 }
4137
4138 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryResponse
4139 where
4140 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4141 ___D: ::fidl_next::fuchsia::HandleDecoder,
4142 {
4143 fn decode(
4144 slot_: ::fidl_next::Slot<'_, Self>,
4145 decoder_: &mut ___D,
4146 _: (),
4147 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4148 ::fidl_next::munge! {
4149 let Self {
4150 mut vmo,
4151
4152 } = slot_;
4153 }
4154
4155 let _field = vmo.as_mut();
4156
4157 ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
4158
4159 Ok(())
4160 }
4161 }
4162
4163 impl ::fidl_next::IntoNatural for FileGetBackingMemoryResponse {
4164 type Natural = crate::natural::FileGetBackingMemoryResponse;
4165 }
4166
4167 #[derive(Debug)]
4169 #[repr(C)]
4170 pub struct LinkableLinkIntoRequest<'de> {
4171 pub dst_parent_token: ::fidl_next::wire::fuchsia::Event,
4172
4173 pub dst: ::fidl_next::wire::String<'de>,
4174 }
4175
4176 static_assertions::const_assert_eq!(std::mem::size_of::<LinkableLinkIntoRequest<'_>>(), 24);
4177 static_assertions::const_assert_eq!(std::mem::align_of::<LinkableLinkIntoRequest<'_>>(), 8);
4178
4179 static_assertions::const_assert_eq!(
4180 std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst_parent_token),
4181 0
4182 );
4183
4184 static_assertions::const_assert_eq!(std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst), 8);
4185
4186 impl ::fidl_next::Constrained for LinkableLinkIntoRequest<'_> {
4187 type Constraint = ();
4188
4189 fn validate(
4190 _: ::fidl_next::Slot<'_, Self>,
4191 _: Self::Constraint,
4192 ) -> Result<(), ::fidl_next::ValidationError> {
4193 Ok(())
4194 }
4195 }
4196
4197 unsafe impl ::fidl_next::Wire for LinkableLinkIntoRequest<'static> {
4198 type Narrowed<'de> = LinkableLinkIntoRequest<'de>;
4199
4200 #[inline]
4201 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4202 ::fidl_next::munge! {
4203 let Self {
4204 dst_parent_token,
4205 dst,
4206
4207 } = &mut *out_;
4208 }
4209
4210 ::fidl_next::Wire::zero_padding(dst_parent_token);
4211
4212 ::fidl_next::Wire::zero_padding(dst);
4213
4214 unsafe {
4215 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
4216 }
4217 }
4218 }
4219
4220 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LinkableLinkIntoRequest<'de>
4221 where
4222 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4223 ___D: ::fidl_next::Decoder<'de>,
4224 ___D: ::fidl_next::fuchsia::HandleDecoder,
4225 {
4226 fn decode(
4227 slot_: ::fidl_next::Slot<'_, Self>,
4228 decoder_: &mut ___D,
4229 _: (),
4230 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4231 if slot_.as_bytes()[4..8] != [0u8; 4] {
4232 return Err(::fidl_next::DecodeError::InvalidPadding);
4233 }
4234
4235 ::fidl_next::munge! {
4236 let Self {
4237 mut dst_parent_token,
4238 mut dst,
4239
4240 } = slot_;
4241 }
4242
4243 let _field = dst_parent_token.as_mut();
4244
4245 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
4246
4247 let _field = dst.as_mut();
4248 ::fidl_next::Constrained::validate(_field, 255)?;
4249 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
4250
4251 let dst = unsafe { dst.deref_unchecked() };
4252
4253 if dst.len() > 255 {
4254 return Err(::fidl_next::DecodeError::VectorTooLong {
4255 size: dst.len() as u64,
4256 limit: 255,
4257 });
4258 }
4259
4260 Ok(())
4261 }
4262 }
4263
4264 impl<'de> ::fidl_next::IntoNatural for LinkableLinkIntoRequest<'de> {
4265 type Natural = crate::natural::LinkableLinkIntoRequest;
4266 }
4267
4268 #[derive(Debug)]
4270 #[repr(C)]
4271 pub struct FileAllocateRequest {
4272 pub offset: ::fidl_next::wire::Uint64,
4273
4274 pub length: ::fidl_next::wire::Uint64,
4275
4276 pub mode: crate::wire::AllocateMode,
4277 }
4278
4279 static_assertions::const_assert_eq!(std::mem::size_of::<FileAllocateRequest>(), 24);
4280 static_assertions::const_assert_eq!(std::mem::align_of::<FileAllocateRequest>(), 8);
4281
4282 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, offset), 0);
4283
4284 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, length), 8);
4285
4286 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, mode), 16);
4287
4288 impl ::fidl_next::Constrained for FileAllocateRequest {
4289 type Constraint = ();
4290
4291 fn validate(
4292 _: ::fidl_next::Slot<'_, Self>,
4293 _: Self::Constraint,
4294 ) -> Result<(), ::fidl_next::ValidationError> {
4295 Ok(())
4296 }
4297 }
4298
4299 unsafe impl ::fidl_next::Wire for FileAllocateRequest {
4300 type Narrowed<'de> = FileAllocateRequest;
4301
4302 #[inline]
4303 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4304 ::fidl_next::munge! {
4305 let Self {
4306 offset,
4307 length,
4308 mode,
4309
4310 } = &mut *out_;
4311 }
4312
4313 ::fidl_next::Wire::zero_padding(offset);
4314
4315 ::fidl_next::Wire::zero_padding(length);
4316
4317 ::fidl_next::Wire::zero_padding(mode);
4318
4319 unsafe {
4320 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4321 }
4322 }
4323 }
4324
4325 unsafe impl<___D> ::fidl_next::Decode<___D> for FileAllocateRequest
4326 where
4327 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4328 ___D: ::fidl_next::fuchsia::HandleDecoder,
4329 {
4330 fn decode(
4331 slot_: ::fidl_next::Slot<'_, Self>,
4332 decoder_: &mut ___D,
4333 _: (),
4334 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4335 if slot_.as_bytes()[20..24] != [0u8; 4] {
4336 return Err(::fidl_next::DecodeError::InvalidPadding);
4337 }
4338
4339 ::fidl_next::munge! {
4340 let Self {
4341 mut offset,
4342 mut length,
4343 mut mode,
4344
4345 } = slot_;
4346 }
4347
4348 let _field = offset.as_mut();
4349
4350 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
4351
4352 let _field = length.as_mut();
4353
4354 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
4355
4356 let _field = mode.as_mut();
4357
4358 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
4359
4360 Ok(())
4361 }
4362 }
4363
4364 impl ::fidl_next::IntoNatural for FileAllocateRequest {
4365 type Natural = crate::natural::FileAllocateRequest;
4366 }
4367
4368 #[derive(Debug)]
4370 #[repr(C)]
4371 pub struct FileEnableVerityRequest<'de> {
4372 pub options: crate::wire::VerificationOptions<'de>,
4373 }
4374
4375 static_assertions::const_assert_eq!(std::mem::size_of::<FileEnableVerityRequest<'_>>(), 16);
4376 static_assertions::const_assert_eq!(std::mem::align_of::<FileEnableVerityRequest<'_>>(), 8);
4377
4378 static_assertions::const_assert_eq!(
4379 std::mem::offset_of!(FileEnableVerityRequest<'_>, options),
4380 0
4381 );
4382
4383 impl ::fidl_next::Constrained for FileEnableVerityRequest<'_> {
4384 type Constraint = ();
4385
4386 fn validate(
4387 _: ::fidl_next::Slot<'_, Self>,
4388 _: Self::Constraint,
4389 ) -> Result<(), ::fidl_next::ValidationError> {
4390 Ok(())
4391 }
4392 }
4393
4394 unsafe impl ::fidl_next::Wire for FileEnableVerityRequest<'static> {
4395 type Narrowed<'de> = FileEnableVerityRequest<'de>;
4396
4397 #[inline]
4398 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4399 ::fidl_next::munge! {
4400 let Self {
4401 options,
4402
4403 } = &mut *out_;
4404 }
4405
4406 ::fidl_next::Wire::zero_padding(options);
4407 }
4408 }
4409
4410 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileEnableVerityRequest<'de>
4411 where
4412 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4413 ___D: ::fidl_next::Decoder<'de>,
4414 ___D: ::fidl_next::fuchsia::HandleDecoder,
4415 {
4416 fn decode(
4417 slot_: ::fidl_next::Slot<'_, Self>,
4418 decoder_: &mut ___D,
4419 _: (),
4420 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4421 ::fidl_next::munge! {
4422 let Self {
4423 mut options,
4424
4425 } = slot_;
4426 }
4427
4428 let _field = options.as_mut();
4429
4430 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
4431
4432 Ok(())
4433 }
4434 }
4435
4436 impl<'de> ::fidl_next::IntoNatural for FileEnableVerityRequest<'de> {
4437 type Natural = crate::natural::FileEnableVerityRequest;
4438 }
4439
4440 #[derive(Debug)]
4442 #[repr(C)]
4443 pub struct FileObject {
4444 pub event: ::fidl_next::wire::fuchsia::OptionalEvent,
4445
4446 pub stream: ::fidl_next::wire::fuchsia::OptionalStream,
4447 }
4448
4449 static_assertions::const_assert_eq!(std::mem::size_of::<FileObject>(), 8);
4450 static_assertions::const_assert_eq!(std::mem::align_of::<FileObject>(), 4);
4451
4452 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, event), 0);
4453
4454 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, stream), 4);
4455
4456 impl ::fidl_next::Constrained for FileObject {
4457 type Constraint = ();
4458
4459 fn validate(
4460 _: ::fidl_next::Slot<'_, Self>,
4461 _: Self::Constraint,
4462 ) -> Result<(), ::fidl_next::ValidationError> {
4463 Ok(())
4464 }
4465 }
4466
4467 unsafe impl ::fidl_next::Wire for FileObject {
4468 type Narrowed<'de> = FileObject;
4469
4470 #[inline]
4471 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4472 ::fidl_next::munge! {
4473 let Self {
4474 event,
4475 stream,
4476
4477 } = &mut *out_;
4478 }
4479
4480 ::fidl_next::Wire::zero_padding(event);
4481
4482 ::fidl_next::Wire::zero_padding(stream);
4483 }
4484 }
4485
4486 unsafe impl<___D> ::fidl_next::Decode<___D> for FileObject
4487 where
4488 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4489 ___D: ::fidl_next::fuchsia::HandleDecoder,
4490 {
4491 fn decode(
4492 slot_: ::fidl_next::Slot<'_, Self>,
4493 decoder_: &mut ___D,
4494 _: (),
4495 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4496 ::fidl_next::munge! {
4497 let Self {
4498 mut event,
4499 mut stream,
4500
4501 } = slot_;
4502 }
4503
4504 let _field = event.as_mut();
4505
4506 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
4507
4508 let _field = stream.as_mut();
4509
4510 ::fidl_next::Decode::decode(stream.as_mut(), decoder_, ())?;
4511
4512 Ok(())
4513 }
4514 }
4515
4516 impl ::fidl_next::IntoNatural for FileObject {
4517 type Natural = crate::natural::FileObject;
4518 }
4519
4520 #[repr(transparent)]
4522 pub struct NodeInfoDeprecated<'de> {
4523 pub(crate) raw: ::fidl_next::wire::Union,
4524 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4525 }
4526
4527 impl<'de> Drop for NodeInfoDeprecated<'de> {
4528 fn drop(&mut self) {
4529 match self.raw.ordinal() {
4530 1 => {
4531 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Service>() };
4532 }
4533
4534 2 => {
4535 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::FileObject>() };
4536 }
4537
4538 3 => {
4539 let _ =
4540 unsafe { self.raw.get().read_unchecked::<crate::wire::DirectoryObject>() };
4541 }
4542
4543 4 => {
4544 let _ = unsafe {
4545 self.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4546 };
4547 }
4548
4549 _ => unsafe { ::core::hint::unreachable_unchecked() },
4550 }
4551 }
4552 }
4553
4554 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4555 type Constraint = ();
4556
4557 fn validate(
4558 _: ::fidl_next::Slot<'_, Self>,
4559 _: Self::Constraint,
4560 ) -> Result<(), ::fidl_next::ValidationError> {
4561 Ok(())
4562 }
4563 }
4564
4565 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4566 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4567
4568 #[inline]
4569 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4570 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4571 ::fidl_next::wire::Union::zero_padding(raw);
4572 }
4573 }
4574
4575 pub mod node_info_deprecated {
4576 pub enum Ref<'de> {
4577 Service(&'de crate::wire::Service),
4578
4579 File(&'de crate::wire::FileObject),
4580
4581 Directory(&'de crate::wire::DirectoryObject),
4582
4583 Symlink(&'de crate::wire::SymlinkObject<'de>),
4584 }
4585
4586 pub enum Value<'de> {
4587 Service(crate::wire::Service),
4588
4589 File(crate::wire::FileObject),
4590
4591 Directory(crate::wire::DirectoryObject),
4592
4593 Symlink(crate::wire::SymlinkObject<'de>),
4594 }
4595 }
4596
4597 impl<'de> NodeInfoDeprecated<'de> {
4598 pub fn as_ref(&self) -> crate::wire::node_info_deprecated::Ref<'_> {
4599 match self.raw.ordinal() {
4600 1 => crate::wire::node_info_deprecated::Ref::Service(unsafe {
4601 self.raw.get().deref_unchecked::<crate::wire::Service>()
4602 }),
4603
4604 2 => crate::wire::node_info_deprecated::Ref::File(unsafe {
4605 self.raw.get().deref_unchecked::<crate::wire::FileObject>()
4606 }),
4607
4608 3 => crate::wire::node_info_deprecated::Ref::Directory(unsafe {
4609 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>()
4610 }),
4611
4612 4 => crate::wire::node_info_deprecated::Ref::Symlink(unsafe {
4613 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>()
4614 }),
4615
4616 _ => unsafe { ::core::hint::unreachable_unchecked() },
4617 }
4618 }
4619
4620 pub fn into_inner(self) -> crate::wire::node_info_deprecated::Value<'de> {
4621 let this = ::core::mem::ManuallyDrop::new(self);
4622
4623 match this.raw.ordinal() {
4624 1 => crate::wire::node_info_deprecated::Value::Service(unsafe {
4625 this.raw.get().read_unchecked::<crate::wire::Service>()
4626 }),
4627
4628 2 => crate::wire::node_info_deprecated::Value::File(unsafe {
4629 this.raw.get().read_unchecked::<crate::wire::FileObject>()
4630 }),
4631
4632 3 => crate::wire::node_info_deprecated::Value::Directory(unsafe {
4633 this.raw.get().read_unchecked::<crate::wire::DirectoryObject>()
4634 }),
4635
4636 4 => crate::wire::node_info_deprecated::Value::Symlink(unsafe {
4637 this.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4638 }),
4639
4640 _ => unsafe { ::core::hint::unreachable_unchecked() },
4641 }
4642 }
4643 }
4644
4645 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4646 where
4647 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4648 ___D: ::fidl_next::Decoder<'de>,
4649 ___D: ::fidl_next::fuchsia::HandleDecoder,
4650 {
4651 fn decode(
4652 mut slot: ::fidl_next::Slot<'_, Self>,
4653 decoder: &mut ___D,
4654 _: (),
4655 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4656 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4657 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4658 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4659 raw,
4660 decoder,
4661 (),
4662 )?,
4663
4664 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4665 raw,
4666 decoder,
4667 (),
4668 )?,
4669
4670 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4671 raw,
4672 decoder,
4673 (),
4674 )?,
4675
4676 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4677 raw,
4678 decoder,
4679 (),
4680 )?,
4681
4682 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
4683 }
4684
4685 Ok(())
4686 }
4687 }
4688
4689 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4690 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4691 match self.raw.ordinal() {
4692 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Service>().fmt(f) },
4693 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::FileObject>().fmt(f) },
4694 3 => unsafe {
4695 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>().fmt(f)
4696 },
4697 4 => unsafe {
4698 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>().fmt(f)
4699 },
4700 _ => unsafe { ::core::hint::unreachable_unchecked() },
4701 }
4702 }
4703 }
4704
4705 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4706 type Natural = crate::natural::NodeInfoDeprecated;
4707 }
4708}
4709
4710pub mod wire_optional {
4711
4712 pub use fidl_next_common_fuchsia_io::wire_optional::*;
4713
4714 #[repr(transparent)]
4715 pub struct ExtendedAttributeValue<'de> {
4716 pub(crate) raw: ::fidl_next::wire::Union,
4717 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4718 }
4719
4720 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
4721 type Constraint = ();
4722
4723 fn validate(
4724 _: ::fidl_next::Slot<'_, Self>,
4725 _: Self::Constraint,
4726 ) -> Result<(), ::fidl_next::ValidationError> {
4727 Ok(())
4728 }
4729 }
4730
4731 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
4732 type Narrowed<'de> = ExtendedAttributeValue<'de>;
4733
4734 #[inline]
4735 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4736 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4737 ::fidl_next::wire::Union::zero_padding(raw);
4738 }
4739 }
4740
4741 impl<'de> ExtendedAttributeValue<'de> {
4742 pub fn is_some(&self) -> bool {
4743 self.raw.is_some()
4744 }
4745
4746 pub fn is_none(&self) -> bool {
4747 self.raw.is_none()
4748 }
4749
4750 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ExtendedAttributeValue<'de>> {
4751 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4752 }
4753
4754 pub fn into_option(
4755 self,
4756 ) -> ::core::option::Option<crate::wire::ExtendedAttributeValue<'de>> {
4757 if self.is_some() {
4758 Some(crate::wire::ExtendedAttributeValue {
4759 raw: self.raw,
4760 _phantom: ::core::marker::PhantomData,
4761 })
4762 } else {
4763 None
4764 }
4765 }
4766 }
4767
4768 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
4769 where
4770 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4771 ___D: ::fidl_next::Decoder<'de>,
4772 ___D: ::fidl_next::fuchsia::HandleDecoder,
4773 {
4774 fn decode(
4775 mut slot: ::fidl_next::Slot<'_, Self>,
4776 decoder: &mut ___D,
4777 _: (),
4778 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4779 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4780 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4781 1 => {
4782 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
4783 raw,
4784 decoder,
4785 (32768, ()),
4786 )?
4787 }
4788
4789 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Vmo>(
4790 raw,
4791 decoder,
4792 (),
4793 )?,
4794
4795 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4796 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4797 }
4798
4799 Ok(())
4800 }
4801 }
4802
4803 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
4804 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4805 self.as_ref().fmt(f)
4806 }
4807 }
4808
4809 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
4810 type Natural = ::core::option::Option<crate::natural::ExtendedAttributeValue>;
4811 }
4812
4813 #[repr(transparent)]
4814 pub struct Representation<'de> {
4815 pub(crate) raw: ::fidl_next::wire::Union,
4816 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4817 }
4818
4819 impl ::fidl_next::Constrained for Representation<'_> {
4820 type Constraint = ();
4821
4822 fn validate(
4823 _: ::fidl_next::Slot<'_, Self>,
4824 _: Self::Constraint,
4825 ) -> Result<(), ::fidl_next::ValidationError> {
4826 Ok(())
4827 }
4828 }
4829
4830 unsafe impl ::fidl_next::Wire for Representation<'static> {
4831 type Narrowed<'de> = Representation<'de>;
4832
4833 #[inline]
4834 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4835 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4836 ::fidl_next::wire::Union::zero_padding(raw);
4837 }
4838 }
4839
4840 impl<'de> Representation<'de> {
4841 pub fn is_some(&self) -> bool {
4842 self.raw.is_some()
4843 }
4844
4845 pub fn is_none(&self) -> bool {
4846 self.raw.is_none()
4847 }
4848
4849 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Representation<'de>> {
4850 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4851 }
4852
4853 pub fn into_option(self) -> ::core::option::Option<crate::wire::Representation<'de>> {
4854 if self.is_some() {
4855 Some(crate::wire::Representation {
4856 raw: self.raw,
4857 _phantom: ::core::marker::PhantomData,
4858 })
4859 } else {
4860 None
4861 }
4862 }
4863 }
4864
4865 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
4866 where
4867 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4868 ___D: ::fidl_next::Decoder<'de>,
4869 ___D: ::fidl_next::fuchsia::HandleDecoder,
4870 {
4871 fn decode(
4872 mut slot: ::fidl_next::Slot<'_, Self>,
4873 decoder: &mut ___D,
4874 _: (),
4875 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4876 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4877 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4878 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
4879 raw,
4880 decoder,
4881 (),
4882 )?,
4883
4884 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
4885 raw,
4886 decoder,
4887 (),
4888 )?,
4889
4890 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
4891 raw,
4892 decoder,
4893 (),
4894 )?,
4895
4896 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
4897 raw,
4898 decoder,
4899 (),
4900 )?,
4901
4902 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4903 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4904 }
4905
4906 Ok(())
4907 }
4908 }
4909
4910 impl<'de> ::core::fmt::Debug for Representation<'de> {
4911 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4912 self.as_ref().fmt(f)
4913 }
4914 }
4915
4916 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
4917 type Natural = ::core::option::Option<crate::natural::Representation>;
4918 }
4919
4920 #[repr(transparent)]
4921 pub struct NodeInfoDeprecated<'de> {
4922 pub(crate) raw: ::fidl_next::wire::Union,
4923 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4924 }
4925
4926 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4927 type Constraint = ();
4928
4929 fn validate(
4930 _: ::fidl_next::Slot<'_, Self>,
4931 _: Self::Constraint,
4932 ) -> Result<(), ::fidl_next::ValidationError> {
4933 Ok(())
4934 }
4935 }
4936
4937 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4938 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4939
4940 #[inline]
4941 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4942 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4943 ::fidl_next::wire::Union::zero_padding(raw);
4944 }
4945 }
4946
4947 impl<'de> NodeInfoDeprecated<'de> {
4948 pub fn is_some(&self) -> bool {
4949 self.raw.is_some()
4950 }
4951
4952 pub fn is_none(&self) -> bool {
4953 self.raw.is_none()
4954 }
4955
4956 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::NodeInfoDeprecated<'de>> {
4957 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4958 }
4959
4960 pub fn into_option(self) -> ::core::option::Option<crate::wire::NodeInfoDeprecated<'de>> {
4961 if self.is_some() {
4962 Some(crate::wire::NodeInfoDeprecated {
4963 raw: self.raw,
4964 _phantom: ::core::marker::PhantomData,
4965 })
4966 } else {
4967 None
4968 }
4969 }
4970 }
4971
4972 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4973 where
4974 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4975 ___D: ::fidl_next::Decoder<'de>,
4976 ___D: ::fidl_next::fuchsia::HandleDecoder,
4977 {
4978 fn decode(
4979 mut slot: ::fidl_next::Slot<'_, Self>,
4980 decoder: &mut ___D,
4981 _: (),
4982 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4983 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4984 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4985 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4986 raw,
4987 decoder,
4988 (),
4989 )?,
4990
4991 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4992 raw,
4993 decoder,
4994 (),
4995 )?,
4996
4997 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4998 raw,
4999 decoder,
5000 (),
5001 )?,
5002
5003 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
5004 raw,
5005 decoder,
5006 (),
5007 )?,
5008
5009 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
5010 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
5011 }
5012
5013 Ok(())
5014 }
5015 }
5016
5017 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
5018 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5019 self.as_ref().fmt(f)
5020 }
5021 }
5022
5023 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
5024 type Natural = ::core::option::Option<crate::natural::NodeInfoDeprecated>;
5025 }
5026}
5027
5028pub mod generic {
5029
5030 pub use fidl_next_common_fuchsia_io::generic::*;
5031
5032 pub struct DirectoryGetTokenResponse<T0, T1> {
5034 pub s: T0,
5035
5036 pub token: T1,
5037 }
5038
5039 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>
5040 for DirectoryGetTokenResponse<T0, T1>
5041 where
5042 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5043 ___E: ::fidl_next::fuchsia::HandleEncoder,
5044 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
5045 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
5046 {
5047 #[inline]
5048 fn encode(
5049 self,
5050 encoder_: &mut ___E,
5051 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryGetTokenResponse>,
5052 _: (),
5053 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5054 ::fidl_next::munge! {
5055 let crate::wire::DirectoryGetTokenResponse {
5056 s,
5057 token,
5058
5059 } = out_;
5060 }
5061
5062 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5063
5064 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
5065
5066 Ok(())
5067 }
5068 }
5069
5070 pub struct DirectoryLinkRequest<T0, T1, T2> {
5072 pub src: T0,
5073
5074 pub dst_parent_token: T1,
5075
5076 pub dst: T2,
5077 }
5078
5079 unsafe impl<___E, T0, T1, T2>
5080 ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
5081 for DirectoryLinkRequest<T0, T1, T2>
5082 where
5083 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5084 ___E: ::fidl_next::Encoder,
5085 ___E: ::fidl_next::fuchsia::HandleEncoder,
5086 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5087 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
5088 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5089 {
5090 #[inline]
5091 fn encode(
5092 self,
5093 encoder_: &mut ___E,
5094 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
5095 _: (),
5096 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5097 ::fidl_next::munge! {
5098 let crate::wire::DirectoryLinkRequest {
5099 src,
5100 dst_parent_token,
5101 dst,
5102
5103 } = out_;
5104 }
5105
5106 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5107
5108 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5109
5110 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5111
5112 Ok(())
5113 }
5114 }
5115
5116 pub struct DirectoryRenameRequest<T0, T1, T2> {
5118 pub src: T0,
5119
5120 pub dst_parent_token: T1,
5121
5122 pub dst: T2,
5123 }
5124
5125 unsafe impl<___E, T0, T1, T2>
5126 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
5127 for DirectoryRenameRequest<T0, T1, T2>
5128 where
5129 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5130 ___E: ::fidl_next::Encoder,
5131 ___E: ::fidl_next::fuchsia::HandleEncoder,
5132 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5133 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5134 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5135 {
5136 #[inline]
5137 fn encode(
5138 self,
5139 encoder_: &mut ___E,
5140 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
5141 _: (),
5142 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5143 ::fidl_next::munge! {
5144 let crate::wire::DirectoryRenameRequest {
5145 src,
5146 dst_parent_token,
5147 dst,
5148
5149 } = out_;
5150 }
5151
5152 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5153
5154 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5155
5156 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5157
5158 Ok(())
5159 }
5160 }
5161
5162 pub struct DirectoryWatchRequest<T0, T1, T2> {
5164 pub mask: T0,
5165
5166 pub options: T1,
5167
5168 pub watcher: T2,
5169 }
5170
5171 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
5172 for DirectoryWatchRequest<T0, T1, T2>
5173 where
5174 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5175 ___E: ::fidl_next::fuchsia::HandleEncoder,
5176 T0: ::fidl_next::Encode<crate::wire::WatchMask, ___E>,
5177 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5178 T2: ::fidl_next::Encode<
5179 ::fidl_next::ServerEnd<
5180 crate::DirectoryWatcher,
5181 ::fidl_next::wire::fuchsia::Channel,
5182 >,
5183 ___E,
5184 >,
5185 {
5186 #[inline]
5187 fn encode(
5188 self,
5189 encoder_: &mut ___E,
5190 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
5191 _: (),
5192 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5193 ::fidl_next::munge! {
5194 let crate::wire::DirectoryWatchRequest {
5195 mask,
5196 options,
5197 watcher,
5198
5199 } = out_;
5200 }
5201
5202 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
5203
5204 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5205
5206 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
5207
5208 Ok(())
5209 }
5210 }
5211
5212 pub struct NodeListExtendedAttributesRequest<T0> {
5214 pub iterator: T0,
5215 }
5216
5217 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
5218 for NodeListExtendedAttributesRequest<T0>
5219 where
5220 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5221 ___E: ::fidl_next::fuchsia::HandleEncoder,
5222 T0: ::fidl_next::Encode<
5223 ::fidl_next::ServerEnd<
5224 crate::ExtendedAttributeIterator,
5225 ::fidl_next::wire::fuchsia::Channel,
5226 >,
5227 ___E,
5228 >,
5229 {
5230 #[inline]
5231 fn encode(
5232 self,
5233 encoder_: &mut ___E,
5234 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
5235 _: (),
5236 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5237 ::fidl_next::munge! {
5238 let crate::wire::NodeListExtendedAttributesRequest {
5239 iterator,
5240
5241 } = out_;
5242 }
5243
5244 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
5245
5246 Ok(())
5247 }
5248 }
5249
5250 pub struct NodeSetExtendedAttributeRequest<T0, T1, T2> {
5252 pub name: T0,
5253
5254 pub value: T1,
5255
5256 pub mode: T2,
5257 }
5258
5259 unsafe impl<___E, T0, T1, T2>
5260 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
5261 for NodeSetExtendedAttributeRequest<T0, T1, T2>
5262 where
5263 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5264 ___E: ::fidl_next::Encoder,
5265 ___E: ::fidl_next::fuchsia::HandleEncoder,
5266 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5267 T1: ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
5268 T2: ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>,
5269 {
5270 #[inline]
5271 fn encode(
5272 self,
5273 encoder_: &mut ___E,
5274 out_: &mut ::core::mem::MaybeUninit<
5275 crate::wire::NodeSetExtendedAttributeRequest<'static>,
5276 >,
5277 _: (),
5278 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5279 ::fidl_next::munge! {
5280 let crate::wire::NodeSetExtendedAttributeRequest {
5281 name,
5282 value,
5283 mode,
5284
5285 } = out_;
5286 }
5287
5288 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
5289
5290 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
5291
5292 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5293
5294 Ok(())
5295 }
5296 }
5297
5298 pub struct OpenableOpenRequest<T0, T1, T2, T3> {
5300 pub path: T0,
5301
5302 pub flags: T1,
5303
5304 pub options: T2,
5305
5306 pub object: T3,
5307 }
5308
5309 unsafe impl<___E, T0, T1, T2, T3>
5310 ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'static>, ___E>
5311 for OpenableOpenRequest<T0, T1, T2, T3>
5312 where
5313 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5314 ___E: ::fidl_next::Encoder,
5315 ___E: ::fidl_next::fuchsia::HandleEncoder,
5316 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5317 T1: ::fidl_next::Encode<crate::wire::Flags, ___E>,
5318 T2: ::fidl_next::Encode<crate::wire::Options<'static>, ___E>,
5319 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
5320 {
5321 #[inline]
5322 fn encode(
5323 self,
5324 encoder_: &mut ___E,
5325 out_: &mut ::core::mem::MaybeUninit<crate::wire::OpenableOpenRequest<'static>>,
5326 _: (),
5327 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5328 ::fidl_next::munge! {
5329 let crate::wire::OpenableOpenRequest {
5330 path,
5331 flags,
5332 options,
5333 object,
5334
5335 } = out_;
5336 }
5337
5338 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5339
5340 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5341
5342 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5343
5344 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5345
5346 Ok(())
5347 }
5348 }
5349
5350 pub struct NodeDeprecatedCloneRequest<T0, T1> {
5352 pub flags: T0,
5353
5354 pub object: T1,
5355 }
5356
5357 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
5358 for NodeDeprecatedCloneRequest<T0, T1>
5359 where
5360 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5361 ___E: ::fidl_next::fuchsia::HandleEncoder,
5362 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5363 T1: ::fidl_next::Encode<
5364 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5365 ___E,
5366 >,
5367 {
5368 #[inline]
5369 fn encode(
5370 self,
5371 encoder_: &mut ___E,
5372 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
5373 _: (),
5374 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5375 ::fidl_next::munge! {
5376 let crate::wire::NodeDeprecatedCloneRequest {
5377 flags,
5378 object,
5379
5380 } = out_;
5381 }
5382
5383 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5384
5385 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5386
5387 Ok(())
5388 }
5389 }
5390
5391 pub struct NodeOnOpenRequest<T0, T1> {
5393 pub s: T0,
5394
5395 pub info: T1,
5396 }
5397
5398 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
5399 for NodeOnOpenRequest<T0, T1>
5400 where
5401 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5402 ___E: ::fidl_next::Encoder,
5403 ___E: ::fidl_next::fuchsia::HandleEncoder,
5404 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
5405 T1: ::fidl_next::Encode<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>,
5406 {
5407 #[inline]
5408 fn encode(
5409 self,
5410 encoder_: &mut ___E,
5411 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
5412 _: (),
5413 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5414 ::fidl_next::munge! {
5415 let crate::wire::NodeOnOpenRequest {
5416 s,
5417 info,
5418
5419 } = out_;
5420 }
5421
5422 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5423
5424 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
5425
5426 Ok(())
5427 }
5428 }
5429
5430 pub struct DirectoryDeprecatedOpenRequest<T0, T1, T2, T3> {
5432 pub flags: T0,
5433
5434 pub mode: T1,
5435
5436 pub path: T2,
5437
5438 pub object: T3,
5439 }
5440
5441 unsafe impl<___E, T0, T1, T2, T3>
5442 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
5443 for DirectoryDeprecatedOpenRequest<T0, T1, T2, T3>
5444 where
5445 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5446 ___E: ::fidl_next::Encoder,
5447 ___E: ::fidl_next::fuchsia::HandleEncoder,
5448 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5449 T1: ::fidl_next::Encode<crate::wire::ModeType, ___E>,
5450 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5451 T3: ::fidl_next::Encode<
5452 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5453 ___E,
5454 >,
5455 {
5456 #[inline]
5457 fn encode(
5458 self,
5459 encoder_: &mut ___E,
5460 out_: &mut ::core::mem::MaybeUninit<
5461 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
5462 >,
5463 _: (),
5464 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5465 ::fidl_next::munge! {
5466 let crate::wire::DirectoryDeprecatedOpenRequest {
5467 flags,
5468 mode,
5469 path,
5470 object,
5471
5472 } = out_;
5473 }
5474
5475 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5476
5477 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5478
5479 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5480
5481 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5482
5483 Ok(())
5484 }
5485 }
5486
5487 pub struct DirectoryCreateSymlinkRequest<T0, T1, T2> {
5489 pub name: T0,
5490
5491 pub target: T1,
5492
5493 pub connection: T2,
5494 }
5495
5496 unsafe impl<___E, T0, T1, T2>
5497 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
5498 for DirectoryCreateSymlinkRequest<T0, T1, T2>
5499 where
5500 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5501 ___E: ::fidl_next::Encoder,
5502 ___E: ::fidl_next::fuchsia::HandleEncoder,
5503 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5504 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5505 T2: ::fidl_next::Encode<
5506 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
5507 ___E,
5508 >,
5509 {
5510 #[inline]
5511 fn encode(
5512 self,
5513 encoder_: &mut ___E,
5514 out_: &mut ::core::mem::MaybeUninit<
5515 crate::wire::DirectoryCreateSymlinkRequest<'static>,
5516 >,
5517 _: (),
5518 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5519 ::fidl_next::munge! {
5520 let crate::wire::DirectoryCreateSymlinkRequest {
5521 name,
5522 target,
5523 connection,
5524
5525 } = out_;
5526 }
5527
5528 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
5529
5530 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
5531
5532 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
5533
5534 Ok(())
5535 }
5536 }
5537
5538 pub struct FileGetBackingMemoryResponse<T0> {
5540 pub vmo: T0,
5541 }
5542
5543 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
5544 for FileGetBackingMemoryResponse<T0>
5545 where
5546 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5547 ___E: ::fidl_next::fuchsia::HandleEncoder,
5548 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
5549 {
5550 #[inline]
5551 fn encode(
5552 self,
5553 encoder_: &mut ___E,
5554 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
5555 _: (),
5556 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5557 ::fidl_next::munge! {
5558 let crate::wire::FileGetBackingMemoryResponse {
5559 vmo,
5560
5561 } = out_;
5562 }
5563
5564 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
5565
5566 Ok(())
5567 }
5568 }
5569
5570 pub struct LinkableLinkIntoRequest<T0, T1> {
5572 pub dst_parent_token: T0,
5573
5574 pub dst: T1,
5575 }
5576
5577 unsafe impl<___E, T0, T1>
5578 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
5579 for LinkableLinkIntoRequest<T0, T1>
5580 where
5581 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5582 ___E: ::fidl_next::Encoder,
5583 ___E: ::fidl_next::fuchsia::HandleEncoder,
5584 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5585 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5586 {
5587 #[inline]
5588 fn encode(
5589 self,
5590 encoder_: &mut ___E,
5591 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
5592 _: (),
5593 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5594 ::fidl_next::munge! {
5595 let crate::wire::LinkableLinkIntoRequest {
5596 dst_parent_token,
5597 dst,
5598
5599 } = out_;
5600 }
5601
5602 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5603
5604 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5605
5606 Ok(())
5607 }
5608 }
5609
5610 pub struct FileAllocateRequest<T0, T1, T2> {
5612 pub offset: T0,
5613
5614 pub length: T1,
5615
5616 pub mode: T2,
5617 }
5618
5619 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
5620 for FileAllocateRequest<T0, T1, T2>
5621 where
5622 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5623 ___E: ::fidl_next::fuchsia::HandleEncoder,
5624 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5625 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5626 T2: ::fidl_next::Encode<crate::wire::AllocateMode, ___E>,
5627 {
5628 #[inline]
5629 fn encode(
5630 self,
5631 encoder_: &mut ___E,
5632 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
5633 _: (),
5634 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5635 ::fidl_next::munge! {
5636 let crate::wire::FileAllocateRequest {
5637 offset,
5638 length,
5639 mode,
5640
5641 } = out_;
5642 }
5643
5644 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
5645
5646 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
5647
5648 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5649
5650 Ok(())
5651 }
5652 }
5653
5654 pub struct FileEnableVerityRequest<T0> {
5656 pub options: T0,
5657 }
5658
5659 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
5660 for FileEnableVerityRequest<T0>
5661 where
5662 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5663 ___E: ::fidl_next::Encoder,
5664 ___E: ::fidl_next::fuchsia::HandleEncoder,
5665 T0: ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>,
5666 {
5667 #[inline]
5668 fn encode(
5669 self,
5670 encoder_: &mut ___E,
5671 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
5672 _: (),
5673 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5674 ::fidl_next::munge! {
5675 let crate::wire::FileEnableVerityRequest {
5676 options,
5677
5678 } = out_;
5679 }
5680
5681 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5682
5683 Ok(())
5684 }
5685 }
5686
5687 pub struct FileObject<T0, T1> {
5689 pub event: T0,
5690
5691 pub stream: T1,
5692 }
5693
5694 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject<T0, T1>
5695 where
5696 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5697 ___E: ::fidl_next::fuchsia::HandleEncoder,
5698 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
5699 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalStream, ___E>,
5700 {
5701 #[inline]
5702 fn encode(
5703 self,
5704 encoder_: &mut ___E,
5705 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
5706 _: (),
5707 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5708 ::fidl_next::munge! {
5709 let crate::wire::FileObject {
5710 event,
5711 stream,
5712
5713 } = out_;
5714 }
5715
5716 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
5717
5718 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
5719
5720 Ok(())
5721 }
5722 }
5723}
5724
5725pub use self::natural::*;
5726
5727#[doc = " Openable defines a node which is capable of opening other objects.\n"]
5729#[derive(PartialEq, Debug)]
5730pub struct Openable;
5731
5732#[cfg(target_os = "fuchsia")]
5733impl ::fidl_next::HasTransport for Openable {
5734 type Transport = ::fidl_next::fuchsia::zx::Channel;
5735}
5736
5737pub mod openable {
5738 pub mod prelude {
5739 pub use crate::{
5740 Openable, OpenableClientHandler, OpenableLocalClientHandler,
5741 OpenableLocalServerHandler, OpenableServerHandler, openable,
5742 };
5743
5744 pub use crate::natural::OpenableOpenRequest;
5745 }
5746
5747 pub struct Open;
5748
5749 impl ::fidl_next::Method for Open {
5750 const ORDINAL: u64 = 6236883748953765593;
5751 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5752 ::fidl_next::protocol::Flexibility::Flexible;
5753
5754 type Protocol = crate::Openable;
5755
5756 type Request = crate::wire::OpenableOpenRequest<'static>;
5757 }
5758
5759 mod ___detail {
5760 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Openable
5761 where
5762 ___T: ::fidl_next::Transport,
5763 {
5764 type Client = OpenableClient<___T>;
5765 type Server = OpenableServer<___T>;
5766 }
5767
5768 #[repr(transparent)]
5770 pub struct OpenableClient<___T: ::fidl_next::Transport> {
5771 #[allow(dead_code)]
5772 client: ::fidl_next::protocol::Client<___T>,
5773 }
5774
5775 impl<___T> OpenableClient<___T>
5776 where
5777 ___T: ::fidl_next::Transport,
5778 {
5779 #[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"]
5780 pub fn open(
5781 &self,
5782
5783 path: impl ::fidl_next::Encode<
5784 ::fidl_next::wire::String<'static>,
5785 <___T as ::fidl_next::Transport>::SendBuffer,
5786 >,
5787
5788 flags: impl ::fidl_next::Encode<
5789 crate::wire::Flags,
5790 <___T as ::fidl_next::Transport>::SendBuffer,
5791 >,
5792
5793 options: impl ::fidl_next::Encode<
5794 crate::wire::Options<'static>,
5795 <___T as ::fidl_next::Transport>::SendBuffer,
5796 >,
5797
5798 object: impl ::fidl_next::Encode<
5799 ::fidl_next::wire::fuchsia::Channel,
5800 <___T as ::fidl_next::Transport>::SendBuffer,
5801 >,
5802 ) -> ::fidl_next::SendFuture<'_, ___T>
5803 where
5804 <___T as ::fidl_next::Transport>::SendBuffer:
5805 ::fidl_next::encoder::InternalHandleEncoder,
5806 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5807 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5808 {
5809 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
5810 }
5811
5812 #[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"]
5813 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
5814 where
5815 ___R: ::fidl_next::Encode<
5816 crate::wire::OpenableOpenRequest<'static>,
5817 <___T as ::fidl_next::Transport>::SendBuffer,
5818 >,
5819 {
5820 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5821 6236883748953765593,
5822 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
5823 request,
5824 ))
5825 }
5826 }
5827
5828 #[repr(transparent)]
5830 pub struct OpenableServer<___T: ::fidl_next::Transport> {
5831 server: ::fidl_next::protocol::Server<___T>,
5832 }
5833
5834 impl<___T> OpenableServer<___T> where ___T: ::fidl_next::Transport {}
5835 }
5836}
5837
5838#[diagnostic::on_unimplemented(
5839 note = "If {Self} implements the non-local OpenableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5840)]
5841
5842pub trait OpenableLocalClientHandler<
5846 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5847 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5848>
5849{
5850 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5851 ::core::future::ready(())
5852 }
5853}
5854
5855impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Openable
5856where
5857 ___H: OpenableLocalClientHandler<___T>,
5858 ___T: ::fidl_next::Transport,
5859{
5860 async fn on_event(
5861 handler: &mut ___H,
5862 mut message: ::fidl_next::Message<___T>,
5863 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5864 match *message.header().ordinal {
5865 ordinal => {
5866 handler.on_unknown_interaction(ordinal).await;
5867 if ::core::matches!(
5868 message.header().flexibility(),
5869 ::fidl_next::protocol::Flexibility::Strict
5870 ) {
5871 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5872 } else {
5873 Ok(())
5874 }
5875 }
5876 }
5877 }
5878}
5879
5880#[diagnostic::on_unimplemented(
5881 note = "If {Self} implements the non-local OpenableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5882)]
5883
5884pub trait OpenableLocalServerHandler<
5888 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5889 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5890>
5891{
5892 #[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"]
5893 fn open(
5894 &mut self,
5895
5896 request: ::fidl_next::Request<openable::Open, ___T>,
5897 ) -> impl ::core::future::Future<Output = ()>;
5898
5899 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5900 ::core::future::ready(())
5901 }
5902}
5903
5904impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Openable
5905where
5906 ___H: OpenableLocalServerHandler<___T>,
5907 ___T: ::fidl_next::Transport,
5908 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
5909 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5910 Constraint = (),
5911 >,
5912{
5913 async fn on_one_way(
5914 handler: &mut ___H,
5915 mut message: ::fidl_next::Message<___T>,
5916 ) -> ::core::result::Result<
5917 (),
5918 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5919 > {
5920 match *message.header().ordinal {
5921 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5922 Ok(decoded) => {
5923 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
5924 Ok(())
5925 }
5926 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5927 ordinal: 6236883748953765593,
5928 error,
5929 }),
5930 },
5931
5932 ordinal => {
5933 handler.on_unknown_interaction(ordinal).await;
5934 if ::core::matches!(
5935 message.header().flexibility(),
5936 ::fidl_next::protocol::Flexibility::Strict
5937 ) {
5938 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5939 } else {
5940 Ok(())
5941 }
5942 }
5943 }
5944 }
5945
5946 async fn on_two_way(
5947 handler: &mut ___H,
5948 mut message: ::fidl_next::Message<___T>,
5949 responder: ::fidl_next::protocol::Responder<___T>,
5950 ) -> ::core::result::Result<
5951 (),
5952 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5953 > {
5954 match *message.header().ordinal {
5955 ordinal => {
5956 handler.on_unknown_interaction(ordinal).await;
5957 if ::core::matches!(
5958 message.header().flexibility(),
5959 ::fidl_next::protocol::Flexibility::Strict
5960 ) {
5961 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5962 } else {
5963 responder
5964 .respond_framework_error(
5965 ordinal,
5966 ::fidl_next::FrameworkError::UnknownMethod,
5967 )
5968 .expect("encoding a framework error should never fail")
5969 .await?;
5970 Ok(())
5971 }
5972 }
5973 }
5974 }
5975}
5976
5977pub trait OpenableClientHandler<
5981 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5982 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5983>
5984{
5985 fn on_unknown_interaction(
5986 &mut self,
5987 ordinal: u64,
5988 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5989 ::core::future::ready(())
5990 }
5991}
5992
5993impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Openable
5994where
5995 ___H: OpenableClientHandler<___T> + ::core::marker::Send,
5996 ___T: ::fidl_next::Transport,
5997{
5998 async fn on_event(
5999 handler: &mut ___H,
6000 mut message: ::fidl_next::Message<___T>,
6001 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6002 match *message.header().ordinal {
6003 ordinal => {
6004 handler.on_unknown_interaction(ordinal).await;
6005 if ::core::matches!(
6006 message.header().flexibility(),
6007 ::fidl_next::protocol::Flexibility::Strict
6008 ) {
6009 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6010 } else {
6011 Ok(())
6012 }
6013 }
6014 }
6015 }
6016}
6017
6018pub trait OpenableServerHandler<
6022 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6023 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6024>
6025{
6026 #[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"]
6027 fn open(
6028 &mut self,
6029
6030 request: ::fidl_next::Request<openable::Open, ___T>,
6031 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6032
6033 fn on_unknown_interaction(
6034 &mut self,
6035 ordinal: u64,
6036 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6037 ::core::future::ready(())
6038 }
6039}
6040
6041impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Openable
6042where
6043 ___H: OpenableServerHandler<___T> + ::core::marker::Send,
6044 ___T: ::fidl_next::Transport,
6045 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
6046 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6047 Constraint = (),
6048 >,
6049{
6050 async fn on_one_way(
6051 handler: &mut ___H,
6052 mut message: ::fidl_next::Message<___T>,
6053 ) -> ::core::result::Result<
6054 (),
6055 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6056 > {
6057 match *message.header().ordinal {
6058 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6059 Ok(decoded) => {
6060 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
6061 Ok(())
6062 }
6063 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6064 ordinal: 6236883748953765593,
6065 error,
6066 }),
6067 },
6068
6069 ordinal => {
6070 handler.on_unknown_interaction(ordinal).await;
6071 if ::core::matches!(
6072 message.header().flexibility(),
6073 ::fidl_next::protocol::Flexibility::Strict
6074 ) {
6075 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6076 } else {
6077 Ok(())
6078 }
6079 }
6080 }
6081 }
6082
6083 async fn on_two_way(
6084 handler: &mut ___H,
6085 mut message: ::fidl_next::Message<___T>,
6086 responder: ::fidl_next::protocol::Responder<___T>,
6087 ) -> ::core::result::Result<
6088 (),
6089 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6090 > {
6091 match *message.header().ordinal {
6092 ordinal => {
6093 handler.on_unknown_interaction(ordinal).await;
6094 if ::core::matches!(
6095 message.header().flexibility(),
6096 ::fidl_next::protocol::Flexibility::Strict
6097 ) {
6098 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6099 } else {
6100 responder
6101 .respond_framework_error(
6102 ordinal,
6103 ::fidl_next::FrameworkError::UnknownMethod,
6104 )
6105 .expect("encoding a framework error should never fail")
6106 .await?;
6107 Ok(())
6108 }
6109 }
6110 }
6111 }
6112}
6113
6114impl<___T> OpenableClientHandler<___T> for ::fidl_next::IgnoreEvents
6115where
6116 ___T: ::fidl_next::Transport,
6117{
6118 async fn on_unknown_interaction(&mut self, _: u64) {}
6119}
6120
6121impl<___H, ___T> OpenableLocalClientHandler<___T> for ::fidl_next::Local<___H>
6122where
6123 ___H: OpenableClientHandler<___T>,
6124 ___T: ::fidl_next::Transport,
6125{
6126 async fn on_unknown_interaction(&mut self, ordinal: u64) {
6127 ___H::on_unknown_interaction(&mut self.0, ordinal).await
6128 }
6129}
6130
6131impl<___H, ___T> OpenableLocalServerHandler<___T> for ::fidl_next::Local<___H>
6132where
6133 ___H: OpenableServerHandler<___T>,
6134 ___T: ::fidl_next::Transport,
6135{
6136 async fn open(&mut self, request: ::fidl_next::Request<openable::Open, ___T>) {
6137 ___H::open(&mut self.0, request).await
6138 }
6139
6140 async fn on_unknown_interaction(&mut self, ordinal: u64) {
6141 ___H::on_unknown_interaction(&mut self.0, ordinal).await
6142 }
6143}
6144
6145#[doc = " Node defines the minimal interface for entities which can be accessed in a filesystem.\n"]
6147#[derive(PartialEq, Debug)]
6148pub struct Node;
6149
6150impl ::fidl_next::Discoverable for Node {
6151 const PROTOCOL_NAME: &'static str = "fuchsia.io.Node";
6152}
6153
6154#[cfg(target_os = "fuchsia")]
6155impl ::fidl_next::HasTransport for Node {
6156 type Transport = ::fidl_next::fuchsia::zx::Channel;
6157}
6158
6159pub mod node {
6160 pub mod prelude {
6161 pub use crate::{
6162 Node, NodeClientHandler, NodeLocalClientHandler, NodeLocalServerHandler,
6163 NodeServerHandler, node,
6164 };
6165
6166 pub use crate::natural::ExtendedAttributeValue;
6167
6168 pub use crate::natural::MutableNodeAttributes;
6169
6170 pub use crate::natural::NodeAttributes2;
6171
6172 pub use crate::natural::NodeDeprecatedCloneRequest;
6173
6174 pub use crate::natural::NodeDeprecatedGetAttrResponse;
6175
6176 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
6177
6178 pub use crate::natural::NodeDeprecatedSetAttrRequest;
6179
6180 pub use crate::natural::NodeDeprecatedSetAttrResponse;
6181
6182 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
6183
6184 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
6185
6186 pub use crate::natural::NodeGetAttributesRequest;
6187
6188 pub use crate::natural::NodeGetExtendedAttributeRequest;
6189
6190 pub use crate::natural::NodeListExtendedAttributesRequest;
6191
6192 pub use crate::natural::NodeOnOpenRequest;
6193
6194 pub use crate::natural::NodeQueryFilesystemResponse;
6195
6196 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
6197
6198 pub use crate::natural::NodeSetExtendedAttributeRequest;
6199
6200 pub use crate::natural::NodeSetFlagsRequest;
6201
6202 pub use crate::natural::NodeGetFlagsResponse;
6203
6204 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
6205
6206 pub use crate::natural::NodeSetExtendedAttributeResponse;
6207
6208 pub use crate::natural::NodeSetFlagsResponse;
6209
6210 pub use crate::natural::NodeSyncResponse;
6211
6212 pub use crate::natural::NodeUpdateAttributesResponse;
6213
6214 pub use crate::natural::Representation;
6215
6216 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
6217
6218 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
6219
6220 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
6221 }
6222
6223 pub struct Clone;
6224
6225 impl ::fidl_next::Method for Clone {
6226 const ORDINAL: u64 = 2366825959783828089;
6227 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6228 ::fidl_next::protocol::Flexibility::Strict;
6229
6230 type Protocol = crate::Node;
6231
6232 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
6233 }
6234
6235 pub struct Close;
6236
6237 impl ::fidl_next::Method for Close {
6238 const ORDINAL: u64 = 6540867515453498750;
6239 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6240 ::fidl_next::protocol::Flexibility::Strict;
6241
6242 type Protocol = crate::Node;
6243
6244 type Request = ::fidl_next::wire::EmptyMessageBody;
6245 }
6246
6247 impl ::fidl_next::TwoWayMethod for Close {
6248 type Response = ::fidl_next::wire::Result<
6249 'static,
6250 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
6251 ::fidl_next::wire::Int32,
6252 >;
6253 }
6254
6255 impl<___R> ::fidl_next::Respond<___R> for Close {
6256 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6257
6258 fn respond(response: ___R) -> Self::Output {
6259 ::core::result::Result::Ok(response)
6260 }
6261 }
6262
6263 impl<___R> ::fidl_next::RespondErr<___R> for Close {
6264 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6265
6266 fn respond_err(response: ___R) -> Self::Output {
6267 ::core::result::Result::Err(response)
6268 }
6269 }
6270
6271 pub struct Query;
6272
6273 impl ::fidl_next::Method for Query {
6274 const ORDINAL: u64 = 2763219980499352582;
6275 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6276 ::fidl_next::protocol::Flexibility::Strict;
6277
6278 type Protocol = crate::Node;
6279
6280 type Request = ::fidl_next::wire::EmptyMessageBody;
6281 }
6282
6283 impl ::fidl_next::TwoWayMethod for Query {
6284 type Response = ::fidl_next::wire::Strict<
6285 ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
6286 >;
6287 }
6288
6289 impl<___R> ::fidl_next::Respond<___R> for Query {
6290 type Output =
6291 ::fidl_next::Strict<::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>>;
6292
6293 fn respond(response: ___R) -> Self::Output {
6294 ::fidl_next::Strict(::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse {
6295 protocol: response,
6296 })
6297 }
6298 }
6299
6300 pub struct DeprecatedClone;
6301
6302 impl ::fidl_next::Method for DeprecatedClone {
6303 const ORDINAL: u64 = 6512600400724287855;
6304 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6305 ::fidl_next::protocol::Flexibility::Flexible;
6306
6307 type Protocol = crate::Node;
6308
6309 type Request = crate::wire::NodeDeprecatedCloneRequest;
6310 }
6311
6312 pub struct OnOpen;
6313
6314 impl ::fidl_next::Method for OnOpen {
6315 const ORDINAL: u64 = 9207534335756671346;
6316 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6317 ::fidl_next::protocol::Flexibility::Flexible;
6318
6319 type Protocol = crate::Node;
6320
6321 type Request = crate::wire::NodeOnOpenRequest<'static>;
6322 }
6323
6324 pub struct DeprecatedGetAttr;
6325
6326 impl ::fidl_next::Method for DeprecatedGetAttr {
6327 const ORDINAL: u64 = 8689798978500614909;
6328 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6329 ::fidl_next::protocol::Flexibility::Strict;
6330
6331 type Protocol = crate::Node;
6332
6333 type Request = ::fidl_next::wire::EmptyMessageBody;
6334 }
6335
6336 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
6337 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
6338 }
6339
6340 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
6341 type Output = ::fidl_next::Strict<___R>;
6342
6343 fn respond(response: ___R) -> Self::Output {
6344 ::fidl_next::Strict(response)
6345 }
6346 }
6347
6348 pub struct DeprecatedSetAttr;
6349
6350 impl ::fidl_next::Method for DeprecatedSetAttr {
6351 const ORDINAL: u64 = 4721673413776871238;
6352 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6353 ::fidl_next::protocol::Flexibility::Strict;
6354
6355 type Protocol = crate::Node;
6356
6357 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
6358 }
6359
6360 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
6361 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
6362 }
6363
6364 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
6365 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
6366
6367 fn respond(response: ___R) -> Self::Output {
6368 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
6369 }
6370 }
6371
6372 pub struct DeprecatedGetFlags;
6373
6374 impl ::fidl_next::Method for DeprecatedGetFlags {
6375 const ORDINAL: u64 = 6595803110182632097;
6376 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6377 ::fidl_next::protocol::Flexibility::Strict;
6378
6379 type Protocol = crate::Node;
6380
6381 type Request = ::fidl_next::wire::EmptyMessageBody;
6382 }
6383
6384 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
6385 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
6386 }
6387
6388 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
6389 type Output = ::fidl_next::Strict<___R>;
6390
6391 fn respond(response: ___R) -> Self::Output {
6392 ::fidl_next::Strict(response)
6393 }
6394 }
6395
6396 pub struct DeprecatedSetFlags;
6397
6398 impl ::fidl_next::Method for DeprecatedSetFlags {
6399 const ORDINAL: u64 = 5950864159036794675;
6400 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6401 ::fidl_next::protocol::Flexibility::Strict;
6402
6403 type Protocol = crate::Node;
6404
6405 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
6406 }
6407
6408 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
6409 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
6410 }
6411
6412 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
6413 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
6414
6415 fn respond(response: ___R) -> Self::Output {
6416 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
6417 }
6418 }
6419
6420 pub struct GetFlags;
6421
6422 impl ::fidl_next::Method for GetFlags {
6423 const ORDINAL: u64 = 105530239381466147;
6424 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6425 ::fidl_next::protocol::Flexibility::Flexible;
6426
6427 type Protocol = crate::Node;
6428
6429 type Request = ::fidl_next::wire::EmptyMessageBody;
6430 }
6431
6432 impl ::fidl_next::TwoWayMethod for GetFlags {
6433 type Response = ::fidl_next::wire::Result<
6434 'static,
6435 crate::wire::NodeGetFlagsResponse,
6436 ::fidl_next::wire::fuchsia::Status,
6437 >;
6438 }
6439
6440 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
6441 type Output = ::core::result::Result<
6442 crate::generic::NodeGetFlagsResponse<___R>,
6443 ::fidl_next::never::Never,
6444 >;
6445
6446 fn respond(response: ___R) -> Self::Output {
6447 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
6448 }
6449 }
6450
6451 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
6452 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6453
6454 fn respond_err(response: ___R) -> Self::Output {
6455 ::core::result::Result::Err(response)
6456 }
6457 }
6458
6459 pub struct SetFlags;
6460
6461 impl ::fidl_next::Method for SetFlags {
6462 const ORDINAL: u64 = 6172186066099445416;
6463 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6464 ::fidl_next::protocol::Flexibility::Flexible;
6465
6466 type Protocol = crate::Node;
6467
6468 type Request = crate::wire::NodeSetFlagsRequest;
6469 }
6470
6471 impl ::fidl_next::TwoWayMethod for SetFlags {
6472 type Response = ::fidl_next::wire::Result<
6473 'static,
6474 crate::wire::NodeSetFlagsResponse,
6475 ::fidl_next::wire::fuchsia::Status,
6476 >;
6477 }
6478
6479 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
6480 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6481
6482 fn respond(response: ___R) -> Self::Output {
6483 ::core::result::Result::Ok(response)
6484 }
6485 }
6486
6487 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
6488 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6489
6490 fn respond_err(response: ___R) -> Self::Output {
6491 ::core::result::Result::Err(response)
6492 }
6493 }
6494
6495 pub struct QueryFilesystem;
6496
6497 impl ::fidl_next::Method for QueryFilesystem {
6498 const ORDINAL: u64 = 8013111122914313744;
6499 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6500 ::fidl_next::protocol::Flexibility::Strict;
6501
6502 type Protocol = crate::Node;
6503
6504 type Request = ::fidl_next::wire::EmptyMessageBody;
6505 }
6506
6507 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
6508 type Response =
6509 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
6510 }
6511
6512 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
6513 type Output = ::fidl_next::Strict<___R>;
6514
6515 fn respond(response: ___R) -> Self::Output {
6516 ::fidl_next::Strict(response)
6517 }
6518 }
6519
6520 pub struct OnRepresentation;
6521
6522 impl ::fidl_next::Method for OnRepresentation {
6523 const ORDINAL: u64 = 6679970090861613324;
6524 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6525 ::fidl_next::protocol::Flexibility::Strict;
6526
6527 type Protocol = crate::Node;
6528
6529 type Request = crate::wire::Representation<'static>;
6530 }
6531
6532 pub struct GetAttributes;
6533
6534 impl ::fidl_next::Method for GetAttributes {
6535 const ORDINAL: u64 = 4414537700416816443;
6536 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6537 ::fidl_next::protocol::Flexibility::Strict;
6538
6539 type Protocol = crate::Node;
6540
6541 type Request = crate::wire::NodeGetAttributesRequest;
6542 }
6543
6544 impl ::fidl_next::TwoWayMethod for GetAttributes {
6545 type Response = ::fidl_next::wire::Result<
6546 'static,
6547 crate::wire::NodeAttributes2<'static>,
6548 ::fidl_next::wire::fuchsia::Status,
6549 >;
6550 }
6551
6552 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
6553 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6554
6555 fn respond(response: ___R) -> Self::Output {
6556 ::core::result::Result::Ok(response)
6557 }
6558 }
6559
6560 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
6561 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6562
6563 fn respond_err(response: ___R) -> Self::Output {
6564 ::core::result::Result::Err(response)
6565 }
6566 }
6567
6568 pub struct UpdateAttributes;
6569
6570 impl ::fidl_next::Method for UpdateAttributes {
6571 const ORDINAL: u64 = 3677402239314018056;
6572 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6573 ::fidl_next::protocol::Flexibility::Strict;
6574
6575 type Protocol = crate::Node;
6576
6577 type Request = crate::wire::MutableNodeAttributes<'static>;
6578 }
6579
6580 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
6581 type Response = ::fidl_next::wire::Result<
6582 'static,
6583 crate::wire::NodeUpdateAttributesResponse,
6584 ::fidl_next::wire::fuchsia::Status,
6585 >;
6586 }
6587
6588 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
6589 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6590
6591 fn respond(response: ___R) -> Self::Output {
6592 ::core::result::Result::Ok(response)
6593 }
6594 }
6595
6596 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
6597 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6598
6599 fn respond_err(response: ___R) -> Self::Output {
6600 ::core::result::Result::Err(response)
6601 }
6602 }
6603
6604 pub struct Sync;
6605
6606 impl ::fidl_next::Method for Sync {
6607 const ORDINAL: u64 = 3196473584242777161;
6608 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6609 ::fidl_next::protocol::Flexibility::Strict;
6610
6611 type Protocol = crate::Node;
6612
6613 type Request = ::fidl_next::wire::EmptyMessageBody;
6614 }
6615
6616 impl ::fidl_next::TwoWayMethod for Sync {
6617 type Response = ::fidl_next::wire::Result<
6618 'static,
6619 crate::wire::NodeSyncResponse,
6620 ::fidl_next::wire::fuchsia::Status,
6621 >;
6622 }
6623
6624 impl<___R> ::fidl_next::Respond<___R> for Sync {
6625 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6626
6627 fn respond(response: ___R) -> Self::Output {
6628 ::core::result::Result::Ok(response)
6629 }
6630 }
6631
6632 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
6633 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6634
6635 fn respond_err(response: ___R) -> Self::Output {
6636 ::core::result::Result::Err(response)
6637 }
6638 }
6639
6640 pub struct ListExtendedAttributes;
6641
6642 impl ::fidl_next::Method for ListExtendedAttributes {
6643 const ORDINAL: u64 = 5431626189872037072;
6644 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6645 ::fidl_next::protocol::Flexibility::Strict;
6646
6647 type Protocol = crate::Node;
6648
6649 type Request = crate::wire::NodeListExtendedAttributesRequest;
6650 }
6651
6652 pub struct GetExtendedAttribute;
6653
6654 impl ::fidl_next::Method for GetExtendedAttribute {
6655 const ORDINAL: u64 = 5043930208506967771;
6656 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6657 ::fidl_next::protocol::Flexibility::Strict;
6658
6659 type Protocol = crate::Node;
6660
6661 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
6662 }
6663
6664 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
6665 type Response = ::fidl_next::wire::Result<
6666 'static,
6667 crate::wire::ExtendedAttributeValue<'static>,
6668 ::fidl_next::wire::fuchsia::Status,
6669 >;
6670 }
6671
6672 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
6673 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6674
6675 fn respond(response: ___R) -> Self::Output {
6676 ::core::result::Result::Ok(response)
6677 }
6678 }
6679
6680 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
6681 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6682
6683 fn respond_err(response: ___R) -> Self::Output {
6684 ::core::result::Result::Err(response)
6685 }
6686 }
6687
6688 pub struct SetExtendedAttribute;
6689
6690 impl ::fidl_next::Method for SetExtendedAttribute {
6691 const ORDINAL: u64 = 5374223046099989052;
6692 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6693 ::fidl_next::protocol::Flexibility::Strict;
6694
6695 type Protocol = crate::Node;
6696
6697 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
6698 }
6699
6700 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
6701 type Response = ::fidl_next::wire::Result<
6702 'static,
6703 crate::wire::NodeSetExtendedAttributeResponse,
6704 ::fidl_next::wire::fuchsia::Status,
6705 >;
6706 }
6707
6708 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
6709 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6710
6711 fn respond(response: ___R) -> Self::Output {
6712 ::core::result::Result::Ok(response)
6713 }
6714 }
6715
6716 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
6717 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6718
6719 fn respond_err(response: ___R) -> Self::Output {
6720 ::core::result::Result::Err(response)
6721 }
6722 }
6723
6724 pub struct RemoveExtendedAttribute;
6725
6726 impl ::fidl_next::Method for RemoveExtendedAttribute {
6727 const ORDINAL: u64 = 8794297771444732717;
6728 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6729 ::fidl_next::protocol::Flexibility::Strict;
6730
6731 type Protocol = crate::Node;
6732
6733 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
6734 }
6735
6736 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
6737 type Response = ::fidl_next::wire::Result<
6738 'static,
6739 crate::wire::NodeRemoveExtendedAttributeResponse,
6740 ::fidl_next::wire::fuchsia::Status,
6741 >;
6742 }
6743
6744 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
6745 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6746
6747 fn respond(response: ___R) -> Self::Output {
6748 ::core::result::Result::Ok(response)
6749 }
6750 }
6751
6752 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
6753 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6754
6755 fn respond_err(response: ___R) -> Self::Output {
6756 ::core::result::Result::Err(response)
6757 }
6758 }
6759
6760 mod ___detail {
6761 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
6762 where
6763 ___T: ::fidl_next::Transport,
6764 {
6765 type Client = NodeClient<___T>;
6766 type Server = NodeServer<___T>;
6767 }
6768
6769 #[repr(transparent)]
6771 pub struct NodeClient<___T: ::fidl_next::Transport> {
6772 #[allow(dead_code)]
6773 client: ::fidl_next::protocol::Client<___T>,
6774 }
6775
6776 impl<___T> NodeClient<___T>
6777 where
6778 ___T: ::fidl_next::Transport,
6779 {
6780 pub fn clone(
6781 &self,
6782
6783 request: impl ::fidl_next::Encode<
6784 ::fidl_next::ServerEnd<
6785 ::fidl_next_fuchsia_unknown::Cloneable,
6786 ::fidl_next::wire::fuchsia::Channel,
6787 >,
6788 <___T as ::fidl_next::Transport>::SendBuffer,
6789 >,
6790 ) -> ::fidl_next::SendFuture<'_, ___T>
6791 where
6792 <___T as ::fidl_next::Transport>::SendBuffer:
6793 ::fidl_next::encoder::InternalHandleEncoder,
6794 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6795 {
6796 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
6797 request,
6798 })
6799 }
6800
6801 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6802 where
6803 ___R: ::fidl_next::Encode<
6804 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
6805 <___T as ::fidl_next::Transport>::SendBuffer,
6806 >,
6807 {
6808 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6809 2366825959783828089,
6810 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
6811 request,
6812 ))
6813 }
6814
6815 #[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"]
6816 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
6817 ::fidl_next::TwoWayFuture::from_untyped(
6818 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6819 6540867515453498750,
6820 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
6821 (),
6822 ),
6823 )
6824 }
6825
6826 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
6827 ::fidl_next::TwoWayFuture::from_untyped(
6828 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6829 2763219980499352582,
6830 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
6831 (),
6832 ),
6833 )
6834 }
6835
6836 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6837 pub fn deprecated_clone(
6838 &self,
6839
6840 flags: impl ::fidl_next::Encode<
6841 crate::wire::OpenFlags,
6842 <___T as ::fidl_next::Transport>::SendBuffer,
6843 >,
6844
6845 object: impl ::fidl_next::Encode<
6846 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
6847 <___T as ::fidl_next::Transport>::SendBuffer,
6848 >,
6849 ) -> ::fidl_next::SendFuture<'_, ___T>
6850 where
6851 <___T as ::fidl_next::Transport>::SendBuffer:
6852 ::fidl_next::encoder::InternalHandleEncoder,
6853 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6854 {
6855 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
6856 flags,
6857
6858 object,
6859 })
6860 }
6861
6862 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6863 pub fn deprecated_clone_with<___R>(
6864 &self,
6865 request: ___R,
6866 ) -> ::fidl_next::SendFuture<'_, ___T>
6867 where
6868 ___R: ::fidl_next::Encode<
6869 crate::wire::NodeDeprecatedCloneRequest,
6870 <___T as ::fidl_next::Transport>::SendBuffer,
6871 >,
6872 {
6873 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6874 6512600400724287855,
6875 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
6876 request,
6877 ))
6878 }
6879
6880 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6881 pub fn deprecated_get_attr(
6882 &self,
6883 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
6884 ::fidl_next::TwoWayFuture::from_untyped(
6885 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6886 8689798978500614909,
6887 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
6888 (),
6889 ),
6890 )
6891 }
6892
6893 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6894 pub fn deprecated_set_attr(
6895 &self,
6896
6897 flags: impl ::fidl_next::Encode<
6898 crate::wire::NodeAttributeFlags,
6899 <___T as ::fidl_next::Transport>::SendBuffer,
6900 >,
6901
6902 attributes: impl ::fidl_next::Encode<
6903 crate::wire::NodeAttributes,
6904 <___T as ::fidl_next::Transport>::SendBuffer,
6905 >,
6906 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6907 where
6908 <___T as ::fidl_next::Transport>::SendBuffer:
6909 ::fidl_next::encoder::InternalHandleEncoder,
6910 {
6911 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
6912 flags,
6913
6914 attributes,
6915 })
6916 }
6917
6918 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6919 pub fn deprecated_set_attr_with<___R>(
6920 &self,
6921 request: ___R,
6922 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6923 where
6924 ___R: ::fidl_next::Encode<
6925 crate::wire::NodeDeprecatedSetAttrRequest,
6926 <___T as ::fidl_next::Transport>::SendBuffer,
6927 >,
6928 {
6929 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6930 4721673413776871238,
6931 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
6932 request,
6933 ))
6934 }
6935
6936 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6937 pub fn deprecated_get_flags(
6938 &self,
6939 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
6940 ::fidl_next::TwoWayFuture::from_untyped(
6941 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6942 6595803110182632097,
6943 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
6944 (),
6945 ),
6946 )
6947 }
6948
6949 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6950 pub fn deprecated_set_flags(
6951 &self,
6952
6953 flags: impl ::fidl_next::Encode<
6954 crate::wire::OpenFlags,
6955 <___T as ::fidl_next::Transport>::SendBuffer,
6956 >,
6957 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6958 where
6959 <___T as ::fidl_next::Transport>::SendBuffer:
6960 ::fidl_next::encoder::InternalHandleEncoder,
6961 {
6962 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
6963 flags,
6964 })
6965 }
6966
6967 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6968 pub fn deprecated_set_flags_with<___R>(
6969 &self,
6970 request: ___R,
6971 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6972 where
6973 ___R: ::fidl_next::Encode<
6974 crate::wire::NodeDeprecatedSetFlagsRequest,
6975 <___T as ::fidl_next::Transport>::SendBuffer,
6976 >,
6977 {
6978 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6979 5950864159036794675,
6980 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
6981 request,
6982 ))
6983 }
6984
6985 #[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"]
6986 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
6987 ::fidl_next::TwoWayFuture::from_untyped(
6988 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6989 105530239381466147,
6990 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
6991 (),
6992 ),
6993 )
6994 }
6995
6996 #[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"]
6997 pub fn set_flags(
6998 &self,
6999
7000 flags: impl ::fidl_next::Encode<
7001 crate::wire::Flags,
7002 <___T as ::fidl_next::Transport>::SendBuffer,
7003 >,
7004 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
7005 where
7006 <___T as ::fidl_next::Transport>::SendBuffer:
7007 ::fidl_next::encoder::InternalHandleEncoder,
7008 {
7009 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
7010 }
7011
7012 #[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"]
7013 pub fn set_flags_with<___R>(
7014 &self,
7015 request: ___R,
7016 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
7017 where
7018 ___R: ::fidl_next::Encode<
7019 crate::wire::NodeSetFlagsRequest,
7020 <___T as ::fidl_next::Transport>::SendBuffer,
7021 >,
7022 {
7023 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7024 6172186066099445416,
7025 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
7026 request,
7027 ))
7028 }
7029
7030 #[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"]
7031 pub fn query_filesystem(
7032 &self,
7033 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
7034 ::fidl_next::TwoWayFuture::from_untyped(
7035 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7036 8013111122914313744,
7037 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
7038 (),
7039 ),
7040 )
7041 }
7042
7043 #[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"]
7044 pub fn get_attributes(
7045 &self,
7046
7047 query: impl ::fidl_next::Encode<
7048 crate::wire::NodeAttributesQuery,
7049 <___T as ::fidl_next::Transport>::SendBuffer,
7050 >,
7051 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
7052 where
7053 <___T as ::fidl_next::Transport>::SendBuffer:
7054 ::fidl_next::encoder::InternalHandleEncoder,
7055 {
7056 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
7057 }
7058
7059 #[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"]
7060 pub fn get_attributes_with<___R>(
7061 &self,
7062 request: ___R,
7063 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
7064 where
7065 ___R: ::fidl_next::Encode<
7066 crate::wire::NodeGetAttributesRequest,
7067 <___T as ::fidl_next::Transport>::SendBuffer,
7068 >,
7069 {
7070 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7071 4414537700416816443,
7072 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
7073 request,
7074 ))
7075 }
7076
7077 #[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"]
7078 pub fn update_attributes_with<___R>(
7079 &self,
7080 request: ___R,
7081 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
7082 where
7083 ___R: ::fidl_next::Encode<
7084 crate::wire::MutableNodeAttributes<'static>,
7085 <___T as ::fidl_next::Transport>::SendBuffer,
7086 >,
7087 {
7088 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7089 3677402239314018056,
7090 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
7091 request,
7092 ))
7093 }
7094
7095 #[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"]
7096 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
7097 ::fidl_next::TwoWayFuture::from_untyped(
7098 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7099 3196473584242777161,
7100 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
7101 (),
7102 ),
7103 )
7104 }
7105
7106 #[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.READ_BYTES`] right.\n"]
7107 pub fn list_extended_attributes(
7108 &self,
7109
7110 iterator: impl ::fidl_next::Encode<
7111 ::fidl_next::ServerEnd<
7112 crate::ExtendedAttributeIterator,
7113 ::fidl_next::wire::fuchsia::Channel,
7114 >,
7115 <___T as ::fidl_next::Transport>::SendBuffer,
7116 >,
7117 ) -> ::fidl_next::SendFuture<'_, ___T>
7118 where
7119 <___T as ::fidl_next::Transport>::SendBuffer:
7120 ::fidl_next::encoder::InternalHandleEncoder,
7121 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7122 {
7123 self.list_extended_attributes_with(
7124 crate::generic::NodeListExtendedAttributesRequest { iterator },
7125 )
7126 }
7127
7128 #[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.READ_BYTES`] right.\n"]
7129 pub fn list_extended_attributes_with<___R>(
7130 &self,
7131 request: ___R,
7132 ) -> ::fidl_next::SendFuture<'_, ___T>
7133 where
7134 ___R: ::fidl_next::Encode<
7135 crate::wire::NodeListExtendedAttributesRequest,
7136 <___T as ::fidl_next::Transport>::SendBuffer,
7137 >,
7138 {
7139 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7140 5431626189872037072,
7141 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
7142 request,
7143 ))
7144 }
7145
7146 #[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.READ_BYTES`] right.\n"]
7147 pub fn get_extended_attribute(
7148 &self,
7149
7150 name: impl ::fidl_next::Encode<
7151 ::fidl_next::wire::Vector<'static, u8>,
7152 <___T as ::fidl_next::Transport>::SendBuffer,
7153 >,
7154 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
7155 where
7156 <___T as ::fidl_next::Transport>::SendBuffer:
7157 ::fidl_next::encoder::InternalHandleEncoder,
7158 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7159 {
7160 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
7161 name,
7162 })
7163 }
7164
7165 #[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.READ_BYTES`] right.\n"]
7166 pub fn get_extended_attribute_with<___R>(
7167 &self,
7168 request: ___R,
7169 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
7170 where
7171 ___R: ::fidl_next::Encode<
7172 crate::wire::NodeGetExtendedAttributeRequest<'static>,
7173 <___T as ::fidl_next::Transport>::SendBuffer,
7174 >,
7175 {
7176 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7177 5043930208506967771,
7178 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
7179 request,
7180 ))
7181 }
7182
7183 #[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.WRITE_BYTES`] right.\n"]
7184 pub fn set_extended_attribute(
7185 &self,
7186
7187 name: impl ::fidl_next::Encode<
7188 ::fidl_next::wire::Vector<'static, u8>,
7189 <___T as ::fidl_next::Transport>::SendBuffer,
7190 >,
7191
7192 value: impl ::fidl_next::Encode<
7193 crate::wire::ExtendedAttributeValue<'static>,
7194 <___T as ::fidl_next::Transport>::SendBuffer,
7195 >,
7196
7197 mode: impl ::fidl_next::Encode<
7198 crate::wire::SetExtendedAttributeMode,
7199 <___T as ::fidl_next::Transport>::SendBuffer,
7200 >,
7201 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
7202 where
7203 <___T as ::fidl_next::Transport>::SendBuffer:
7204 ::fidl_next::encoder::InternalHandleEncoder,
7205 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7206 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7207 {
7208 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
7209 name,
7210
7211 value,
7212
7213 mode,
7214 })
7215 }
7216
7217 #[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.WRITE_BYTES`] right.\n"]
7218 pub fn set_extended_attribute_with<___R>(
7219 &self,
7220 request: ___R,
7221 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
7222 where
7223 ___R: ::fidl_next::Encode<
7224 crate::wire::NodeSetExtendedAttributeRequest<'static>,
7225 <___T as ::fidl_next::Transport>::SendBuffer,
7226 >,
7227 {
7228 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7229 5374223046099989052,
7230 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
7231 request,
7232 ))
7233 }
7234
7235 #[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.WRITE_BYTES`] right.\n"]
7236 pub fn remove_extended_attribute(
7237 &self,
7238
7239 name: impl ::fidl_next::Encode<
7240 ::fidl_next::wire::Vector<'static, u8>,
7241 <___T as ::fidl_next::Transport>::SendBuffer,
7242 >,
7243 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
7244 where
7245 <___T as ::fidl_next::Transport>::SendBuffer:
7246 ::fidl_next::encoder::InternalHandleEncoder,
7247 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7248 {
7249 self.remove_extended_attribute_with(
7250 crate::generic::NodeRemoveExtendedAttributeRequest { name },
7251 )
7252 }
7253
7254 #[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.WRITE_BYTES`] right.\n"]
7255 pub fn remove_extended_attribute_with<___R>(
7256 &self,
7257 request: ___R,
7258 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
7259 where
7260 ___R: ::fidl_next::Encode<
7261 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
7262 <___T as ::fidl_next::Transport>::SendBuffer,
7263 >,
7264 {
7265 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7266 8794297771444732717,
7267 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
7268 request,
7269 ))
7270 }
7271 }
7272
7273 #[repr(transparent)]
7275 pub struct NodeServer<___T: ::fidl_next::Transport> {
7276 server: ::fidl_next::protocol::Server<___T>,
7277 }
7278
7279 impl<___T> NodeServer<___T>
7280 where
7281 ___T: ::fidl_next::Transport,
7282 {
7283 #[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"]
7284 pub fn on_open(
7285 &self,
7286
7287 s: impl ::fidl_next::Encode<
7288 ::fidl_next::wire::fuchsia::Status,
7289 <___T as ::fidl_next::Transport>::SendBuffer,
7290 >,
7291
7292 info: impl ::fidl_next::Encode<
7293 crate::wire_optional::NodeInfoDeprecated<'static>,
7294 <___T as ::fidl_next::Transport>::SendBuffer,
7295 >,
7296 ) -> ::fidl_next::SendFuture<'_, ___T>
7297 where
7298 <___T as ::fidl_next::Transport>::SendBuffer:
7299 ::fidl_next::encoder::InternalHandleEncoder,
7300 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7301 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7302 {
7303 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
7304 }
7305
7306 #[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"]
7307
7308 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
7309 where
7310 ___R: ::fidl_next::Encode<
7311 <super::OnOpen as ::fidl_next::Method>::Request,
7312 <___T as ::fidl_next::Transport>::SendBuffer,
7313 >,
7314 {
7315 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
7316 9207534335756671346,
7317 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
7318 request,
7319 ))
7320 }
7321
7322 #[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"]
7323
7324 pub fn on_representation_with<___R>(
7325 &self,
7326 request: ___R,
7327 ) -> ::fidl_next::SendFuture<'_, ___T>
7328 where
7329 ___R: ::fidl_next::Encode<
7330 <super::OnRepresentation as ::fidl_next::Method>::Request,
7331 <___T as ::fidl_next::Transport>::SendBuffer,
7332 >,
7333 {
7334 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
7335 6679970090861613324,
7336 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
7337 request,
7338 ))
7339 }
7340 }
7341 }
7342}
7343
7344#[diagnostic::on_unimplemented(
7345 note = "If {Self} implements the non-local NodeClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
7346)]
7347
7348pub trait NodeLocalClientHandler<
7352 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7353 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7354>
7355{
7356 #[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"]
7357 fn on_open(
7358 &mut self,
7359
7360 request: ::fidl_next::Request<node::OnOpen, ___T>,
7361 ) -> impl ::core::future::Future<Output = ()>;
7362
7363 #[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"]
7364 fn on_representation(
7365 &mut self,
7366
7367 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
7368 ) -> impl ::core::future::Future<Output = ()>;
7369
7370 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7371 ::core::future::ready(())
7372 }
7373}
7374
7375impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Node
7376where
7377 ___H: NodeLocalClientHandler<___T>,
7378 ___T: ::fidl_next::Transport,
7379 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
7380 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7381 Constraint = (),
7382 >,
7383 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
7384 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7385 Constraint = (),
7386 >,
7387{
7388 async fn on_event(
7389 handler: &mut ___H,
7390 mut message: ::fidl_next::Message<___T>,
7391 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7392 match *message.header().ordinal {
7393 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7394 Ok(decoded) => {
7395 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
7396 Ok(())
7397 }
7398 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7399 ordinal: 9207534335756671346,
7400 error,
7401 }),
7402 },
7403
7404 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7405 Ok(decoded) => {
7406 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
7407 Ok(())
7408 }
7409 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7410 ordinal: 6679970090861613324,
7411 error,
7412 }),
7413 },
7414
7415 ordinal => {
7416 handler.on_unknown_interaction(ordinal).await;
7417 if ::core::matches!(
7418 message.header().flexibility(),
7419 ::fidl_next::protocol::Flexibility::Strict
7420 ) {
7421 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7422 } else {
7423 Ok(())
7424 }
7425 }
7426 }
7427 }
7428}
7429
7430#[diagnostic::on_unimplemented(
7431 note = "If {Self} implements the non-local NodeServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
7432)]
7433
7434pub trait NodeLocalServerHandler<
7438 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7439 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7440>
7441{
7442 fn clone(
7443 &mut self,
7444
7445 request: ::fidl_next::Request<node::Clone, ___T>,
7446 ) -> impl ::core::future::Future<Output = ()>;
7447
7448 #[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"]
7449 fn close(
7450 &mut self,
7451
7452 responder: ::fidl_next::Responder<node::Close, ___T>,
7453 ) -> impl ::core::future::Future<Output = ()>;
7454
7455 fn query(
7456 &mut self,
7457
7458 responder: ::fidl_next::Responder<node::Query, ___T>,
7459 ) -> impl ::core::future::Future<Output = ()>;
7460
7461 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
7462 fn deprecated_clone(
7463 &mut self,
7464
7465 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
7466 ) -> impl ::core::future::Future<Output = ()>;
7467
7468 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
7469 fn deprecated_get_attr(
7470 &mut self,
7471
7472 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
7473 ) -> impl ::core::future::Future<Output = ()>;
7474
7475 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
7476 fn deprecated_set_attr(
7477 &mut self,
7478
7479 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
7480
7481 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
7482 ) -> impl ::core::future::Future<Output = ()>;
7483
7484 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
7485 fn deprecated_get_flags(
7486 &mut self,
7487
7488 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
7489 ) -> impl ::core::future::Future<Output = ()>;
7490
7491 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
7492 fn deprecated_set_flags(
7493 &mut self,
7494
7495 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
7496
7497 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
7498 ) -> impl ::core::future::Future<Output = ()>;
7499
7500 #[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"]
7501 fn get_flags(
7502 &mut self,
7503
7504 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
7505 ) -> impl ::core::future::Future<Output = ()>;
7506
7507 #[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"]
7508 fn set_flags(
7509 &mut self,
7510
7511 request: ::fidl_next::Request<node::SetFlags, ___T>,
7512
7513 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
7514 ) -> impl ::core::future::Future<Output = ()>;
7515
7516 #[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"]
7517 fn query_filesystem(
7518 &mut self,
7519
7520 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
7521 ) -> impl ::core::future::Future<Output = ()>;
7522
7523 #[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"]
7524 fn get_attributes(
7525 &mut self,
7526
7527 request: ::fidl_next::Request<node::GetAttributes, ___T>,
7528
7529 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
7530 ) -> impl ::core::future::Future<Output = ()>;
7531
7532 #[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"]
7533 fn update_attributes(
7534 &mut self,
7535
7536 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
7537
7538 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
7539 ) -> impl ::core::future::Future<Output = ()>;
7540
7541 #[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"]
7542 fn sync(
7543 &mut self,
7544
7545 responder: ::fidl_next::Responder<node::Sync, ___T>,
7546 ) -> impl ::core::future::Future<Output = ()>;
7547
7548 #[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.READ_BYTES`] right.\n"]
7549 fn list_extended_attributes(
7550 &mut self,
7551
7552 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
7553 ) -> impl ::core::future::Future<Output = ()>;
7554
7555 #[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.READ_BYTES`] right.\n"]
7556 fn get_extended_attribute(
7557 &mut self,
7558
7559 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
7560
7561 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
7562 ) -> impl ::core::future::Future<Output = ()>;
7563
7564 #[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.WRITE_BYTES`] right.\n"]
7565 fn set_extended_attribute(
7566 &mut self,
7567
7568 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
7569
7570 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
7571 ) -> impl ::core::future::Future<Output = ()>;
7572
7573 #[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.WRITE_BYTES`] right.\n"]
7574 fn remove_extended_attribute(
7575 &mut self,
7576
7577 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
7578
7579 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
7580 ) -> impl ::core::future::Future<Output = ()>;
7581
7582 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7583 ::core::future::ready(())
7584 }
7585}
7586
7587impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Node
7588where
7589 ___H: NodeLocalServerHandler<___T>,
7590 ___T: ::fidl_next::Transport,
7591 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
7592 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7593 Constraint = (),
7594 >,
7595 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
7596 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7597 Constraint = (),
7598 >,
7599 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
7600 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7601 Constraint = (),
7602 >,
7603 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
7604 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7605 Constraint = (),
7606 >,
7607 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
7608 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7609 Constraint = (),
7610 >,
7611 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
7612 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7613 Constraint = (),
7614 >,
7615 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
7616 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7617 Constraint = (),
7618 >,
7619 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
7620 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7621 Constraint = (),
7622 >,
7623 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7624 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7625 Constraint = (),
7626 >,
7627 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7628 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7629 Constraint = (),
7630 >,
7631 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7632 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7633 Constraint = (),
7634 >,
7635{
7636 async fn on_one_way(
7637 handler: &mut ___H,
7638 mut message: ::fidl_next::Message<___T>,
7639 ) -> ::core::result::Result<
7640 (),
7641 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7642 > {
7643 match *message.header().ordinal {
7644 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7645 Ok(decoded) => {
7646 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
7647 Ok(())
7648 }
7649 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7650 ordinal: 2366825959783828089,
7651 error,
7652 }),
7653 },
7654
7655 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7656 Ok(decoded) => {
7657 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
7658 Ok(())
7659 }
7660 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7661 ordinal: 6512600400724287855,
7662 error,
7663 }),
7664 },
7665
7666 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7667 Ok(decoded) => {
7668 handler
7669 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
7670 .await;
7671 Ok(())
7672 }
7673 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7674 ordinal: 5431626189872037072,
7675 error,
7676 }),
7677 },
7678
7679 ordinal => {
7680 handler.on_unknown_interaction(ordinal).await;
7681 if ::core::matches!(
7682 message.header().flexibility(),
7683 ::fidl_next::protocol::Flexibility::Strict
7684 ) {
7685 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7686 } else {
7687 Ok(())
7688 }
7689 }
7690 }
7691 }
7692
7693 async fn on_two_way(
7694 handler: &mut ___H,
7695 mut message: ::fidl_next::Message<___T>,
7696 responder: ::fidl_next::protocol::Responder<___T>,
7697 ) -> ::core::result::Result<
7698 (),
7699 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7700 > {
7701 match *message.header().ordinal {
7702 6540867515453498750 => {
7703 let responder = ::fidl_next::Responder::from_untyped(responder);
7704
7705 handler.close(responder).await;
7706 Ok(())
7707 }
7708
7709 2763219980499352582 => {
7710 let responder = ::fidl_next::Responder::from_untyped(responder);
7711
7712 handler.query(responder).await;
7713 Ok(())
7714 }
7715
7716 8689798978500614909 => {
7717 let responder = ::fidl_next::Responder::from_untyped(responder);
7718
7719 handler.deprecated_get_attr(responder).await;
7720 Ok(())
7721 }
7722
7723 4721673413776871238 => {
7724 let responder = ::fidl_next::Responder::from_untyped(responder);
7725
7726 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7727 Ok(decoded) => {
7728 handler
7729 .deprecated_set_attr(
7730 ::fidl_next::Request::from_decoded(decoded),
7731 responder,
7732 )
7733 .await;
7734 Ok(())
7735 }
7736 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7737 ordinal: 4721673413776871238,
7738 error,
7739 }),
7740 }
7741 }
7742
7743 6595803110182632097 => {
7744 let responder = ::fidl_next::Responder::from_untyped(responder);
7745
7746 handler.deprecated_get_flags(responder).await;
7747 Ok(())
7748 }
7749
7750 5950864159036794675 => {
7751 let responder = ::fidl_next::Responder::from_untyped(responder);
7752
7753 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7754 Ok(decoded) => {
7755 handler
7756 .deprecated_set_flags(
7757 ::fidl_next::Request::from_decoded(decoded),
7758 responder,
7759 )
7760 .await;
7761 Ok(())
7762 }
7763 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7764 ordinal: 5950864159036794675,
7765 error,
7766 }),
7767 }
7768 }
7769
7770 105530239381466147 => {
7771 let responder = ::fidl_next::Responder::from_untyped(responder);
7772
7773 handler.get_flags(responder).await;
7774 Ok(())
7775 }
7776
7777 6172186066099445416 => {
7778 let responder = ::fidl_next::Responder::from_untyped(responder);
7779
7780 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7781 Ok(decoded) => {
7782 handler
7783 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
7784 .await;
7785 Ok(())
7786 }
7787 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7788 ordinal: 6172186066099445416,
7789 error,
7790 }),
7791 }
7792 }
7793
7794 8013111122914313744 => {
7795 let responder = ::fidl_next::Responder::from_untyped(responder);
7796
7797 handler.query_filesystem(responder).await;
7798 Ok(())
7799 }
7800
7801 4414537700416816443 => {
7802 let responder = ::fidl_next::Responder::from_untyped(responder);
7803
7804 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7805 Ok(decoded) => {
7806 handler
7807 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
7808 .await;
7809 Ok(())
7810 }
7811 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7812 ordinal: 4414537700416816443,
7813 error,
7814 }),
7815 }
7816 }
7817
7818 3677402239314018056 => {
7819 let responder = ::fidl_next::Responder::from_untyped(responder);
7820
7821 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7822 Ok(decoded) => {
7823 handler
7824 .update_attributes(
7825 ::fidl_next::Request::from_decoded(decoded),
7826 responder,
7827 )
7828 .await;
7829 Ok(())
7830 }
7831 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7832 ordinal: 3677402239314018056,
7833 error,
7834 }),
7835 }
7836 }
7837
7838 3196473584242777161 => {
7839 let responder = ::fidl_next::Responder::from_untyped(responder);
7840
7841 handler.sync(responder).await;
7842 Ok(())
7843 }
7844
7845 5043930208506967771 => {
7846 let responder = ::fidl_next::Responder::from_untyped(responder);
7847
7848 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7849 Ok(decoded) => {
7850 handler
7851 .get_extended_attribute(
7852 ::fidl_next::Request::from_decoded(decoded),
7853 responder,
7854 )
7855 .await;
7856 Ok(())
7857 }
7858 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7859 ordinal: 5043930208506967771,
7860 error,
7861 }),
7862 }
7863 }
7864
7865 5374223046099989052 => {
7866 let responder = ::fidl_next::Responder::from_untyped(responder);
7867
7868 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7869 Ok(decoded) => {
7870 handler
7871 .set_extended_attribute(
7872 ::fidl_next::Request::from_decoded(decoded),
7873 responder,
7874 )
7875 .await;
7876 Ok(())
7877 }
7878 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7879 ordinal: 5374223046099989052,
7880 error,
7881 }),
7882 }
7883 }
7884
7885 8794297771444732717 => {
7886 let responder = ::fidl_next::Responder::from_untyped(responder);
7887
7888 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7889 Ok(decoded) => {
7890 handler
7891 .remove_extended_attribute(
7892 ::fidl_next::Request::from_decoded(decoded),
7893 responder,
7894 )
7895 .await;
7896 Ok(())
7897 }
7898 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7899 ordinal: 8794297771444732717,
7900 error,
7901 }),
7902 }
7903 }
7904
7905 ordinal => {
7906 handler.on_unknown_interaction(ordinal).await;
7907 if ::core::matches!(
7908 message.header().flexibility(),
7909 ::fidl_next::protocol::Flexibility::Strict
7910 ) {
7911 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7912 } else {
7913 responder
7914 .respond_framework_error(
7915 ordinal,
7916 ::fidl_next::FrameworkError::UnknownMethod,
7917 )
7918 .expect("encoding a framework error should never fail")
7919 .await?;
7920 Ok(())
7921 }
7922 }
7923 }
7924 }
7925}
7926
7927pub trait NodeClientHandler<
7931 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7932 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7933>
7934{
7935 #[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"]
7936 fn on_open(
7937 &mut self,
7938
7939 request: ::fidl_next::Request<node::OnOpen, ___T>,
7940 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7941
7942 #[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"]
7943 fn on_representation(
7944 &mut self,
7945
7946 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
7947 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7948
7949 fn on_unknown_interaction(
7950 &mut self,
7951 ordinal: u64,
7952 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7953 ::core::future::ready(())
7954 }
7955}
7956
7957impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
7958where
7959 ___H: NodeClientHandler<___T> + ::core::marker::Send,
7960 ___T: ::fidl_next::Transport,
7961 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
7962 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7963 Constraint = (),
7964 >,
7965 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
7966 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7967 Constraint = (),
7968 >,
7969{
7970 async fn on_event(
7971 handler: &mut ___H,
7972 mut message: ::fidl_next::Message<___T>,
7973 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7974 match *message.header().ordinal {
7975 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7976 Ok(decoded) => {
7977 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
7978 Ok(())
7979 }
7980 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7981 ordinal: 9207534335756671346,
7982 error,
7983 }),
7984 },
7985
7986 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7987 Ok(decoded) => {
7988 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
7989 Ok(())
7990 }
7991 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7992 ordinal: 6679970090861613324,
7993 error,
7994 }),
7995 },
7996
7997 ordinal => {
7998 handler.on_unknown_interaction(ordinal).await;
7999 if ::core::matches!(
8000 message.header().flexibility(),
8001 ::fidl_next::protocol::Flexibility::Strict
8002 ) {
8003 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8004 } else {
8005 Ok(())
8006 }
8007 }
8008 }
8009 }
8010}
8011
8012pub trait NodeServerHandler<
8016 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8017 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8018>
8019{
8020 fn clone(
8021 &mut self,
8022
8023 request: ::fidl_next::Request<node::Clone, ___T>,
8024 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8025
8026 #[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"]
8027 fn close(
8028 &mut self,
8029
8030 responder: ::fidl_next::Responder<node::Close, ___T>,
8031 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8032
8033 fn query(
8034 &mut self,
8035
8036 responder: ::fidl_next::Responder<node::Query, ___T>,
8037 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8038
8039 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
8040 fn deprecated_clone(
8041 &mut self,
8042
8043 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
8044 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8045
8046 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
8047 fn deprecated_get_attr(
8048 &mut self,
8049
8050 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
8051 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8052
8053 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
8054 fn deprecated_set_attr(
8055 &mut self,
8056
8057 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
8058
8059 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
8060 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8061
8062 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
8063 fn deprecated_get_flags(
8064 &mut self,
8065
8066 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
8067 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8068
8069 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
8070 fn deprecated_set_flags(
8071 &mut self,
8072
8073 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
8074
8075 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
8076 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8077
8078 #[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"]
8079 fn get_flags(
8080 &mut self,
8081
8082 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
8083 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8084
8085 #[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"]
8086 fn set_flags(
8087 &mut self,
8088
8089 request: ::fidl_next::Request<node::SetFlags, ___T>,
8090
8091 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
8092 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8093
8094 #[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"]
8095 fn query_filesystem(
8096 &mut self,
8097
8098 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
8099 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8100
8101 #[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"]
8102 fn get_attributes(
8103 &mut self,
8104
8105 request: ::fidl_next::Request<node::GetAttributes, ___T>,
8106
8107 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
8108 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8109
8110 #[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"]
8111 fn update_attributes(
8112 &mut self,
8113
8114 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
8115
8116 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
8117 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8118
8119 #[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"]
8120 fn sync(
8121 &mut self,
8122
8123 responder: ::fidl_next::Responder<node::Sync, ___T>,
8124 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8125
8126 #[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.READ_BYTES`] right.\n"]
8127 fn list_extended_attributes(
8128 &mut self,
8129
8130 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
8131 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8132
8133 #[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.READ_BYTES`] right.\n"]
8134 fn get_extended_attribute(
8135 &mut self,
8136
8137 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
8138
8139 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
8140 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8141
8142 #[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.WRITE_BYTES`] right.\n"]
8143 fn set_extended_attribute(
8144 &mut self,
8145
8146 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
8147
8148 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
8149 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8150
8151 #[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.WRITE_BYTES`] right.\n"]
8152 fn remove_extended_attribute(
8153 &mut self,
8154
8155 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
8156
8157 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
8158 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8159
8160 fn on_unknown_interaction(
8161 &mut self,
8162 ordinal: u64,
8163 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
8164 ::core::future::ready(())
8165 }
8166}
8167
8168impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
8169where
8170 ___H: NodeServerHandler<___T> + ::core::marker::Send,
8171 ___T: ::fidl_next::Transport,
8172 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
8173 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8174 Constraint = (),
8175 >,
8176 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
8177 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8178 Constraint = (),
8179 >,
8180 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
8181 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8182 Constraint = (),
8183 >,
8184 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
8185 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8186 Constraint = (),
8187 >,
8188 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
8189 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8190 Constraint = (),
8191 >,
8192 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
8193 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8194 Constraint = (),
8195 >,
8196 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
8197 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8198 Constraint = (),
8199 >,
8200 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
8201 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8202 Constraint = (),
8203 >,
8204 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8205 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8206 Constraint = (),
8207 >,
8208 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8209 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8210 Constraint = (),
8211 >,
8212 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8213 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8214 Constraint = (),
8215 >,
8216{
8217 async fn on_one_way(
8218 handler: &mut ___H,
8219 mut message: ::fidl_next::Message<___T>,
8220 ) -> ::core::result::Result<
8221 (),
8222 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8223 > {
8224 match *message.header().ordinal {
8225 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8226 Ok(decoded) => {
8227 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
8228 Ok(())
8229 }
8230 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8231 ordinal: 2366825959783828089,
8232 error,
8233 }),
8234 },
8235
8236 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8237 Ok(decoded) => {
8238 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
8239 Ok(())
8240 }
8241 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8242 ordinal: 6512600400724287855,
8243 error,
8244 }),
8245 },
8246
8247 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8248 Ok(decoded) => {
8249 handler
8250 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
8251 .await;
8252 Ok(())
8253 }
8254 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8255 ordinal: 5431626189872037072,
8256 error,
8257 }),
8258 },
8259
8260 ordinal => {
8261 handler.on_unknown_interaction(ordinal).await;
8262 if ::core::matches!(
8263 message.header().flexibility(),
8264 ::fidl_next::protocol::Flexibility::Strict
8265 ) {
8266 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8267 } else {
8268 Ok(())
8269 }
8270 }
8271 }
8272 }
8273
8274 async fn on_two_way(
8275 handler: &mut ___H,
8276 mut message: ::fidl_next::Message<___T>,
8277 responder: ::fidl_next::protocol::Responder<___T>,
8278 ) -> ::core::result::Result<
8279 (),
8280 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8281 > {
8282 match *message.header().ordinal {
8283 6540867515453498750 => {
8284 let responder = ::fidl_next::Responder::from_untyped(responder);
8285
8286 handler.close(responder).await;
8287 Ok(())
8288 }
8289
8290 2763219980499352582 => {
8291 let responder = ::fidl_next::Responder::from_untyped(responder);
8292
8293 handler.query(responder).await;
8294 Ok(())
8295 }
8296
8297 8689798978500614909 => {
8298 let responder = ::fidl_next::Responder::from_untyped(responder);
8299
8300 handler.deprecated_get_attr(responder).await;
8301 Ok(())
8302 }
8303
8304 4721673413776871238 => {
8305 let responder = ::fidl_next::Responder::from_untyped(responder);
8306
8307 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8308 Ok(decoded) => {
8309 handler
8310 .deprecated_set_attr(
8311 ::fidl_next::Request::from_decoded(decoded),
8312 responder,
8313 )
8314 .await;
8315 Ok(())
8316 }
8317 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8318 ordinal: 4721673413776871238,
8319 error,
8320 }),
8321 }
8322 }
8323
8324 6595803110182632097 => {
8325 let responder = ::fidl_next::Responder::from_untyped(responder);
8326
8327 handler.deprecated_get_flags(responder).await;
8328 Ok(())
8329 }
8330
8331 5950864159036794675 => {
8332 let responder = ::fidl_next::Responder::from_untyped(responder);
8333
8334 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8335 Ok(decoded) => {
8336 handler
8337 .deprecated_set_flags(
8338 ::fidl_next::Request::from_decoded(decoded),
8339 responder,
8340 )
8341 .await;
8342 Ok(())
8343 }
8344 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8345 ordinal: 5950864159036794675,
8346 error,
8347 }),
8348 }
8349 }
8350
8351 105530239381466147 => {
8352 let responder = ::fidl_next::Responder::from_untyped(responder);
8353
8354 handler.get_flags(responder).await;
8355 Ok(())
8356 }
8357
8358 6172186066099445416 => {
8359 let responder = ::fidl_next::Responder::from_untyped(responder);
8360
8361 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8362 Ok(decoded) => {
8363 handler
8364 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
8365 .await;
8366 Ok(())
8367 }
8368 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8369 ordinal: 6172186066099445416,
8370 error,
8371 }),
8372 }
8373 }
8374
8375 8013111122914313744 => {
8376 let responder = ::fidl_next::Responder::from_untyped(responder);
8377
8378 handler.query_filesystem(responder).await;
8379 Ok(())
8380 }
8381
8382 4414537700416816443 => {
8383 let responder = ::fidl_next::Responder::from_untyped(responder);
8384
8385 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8386 Ok(decoded) => {
8387 handler
8388 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
8389 .await;
8390 Ok(())
8391 }
8392 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8393 ordinal: 4414537700416816443,
8394 error,
8395 }),
8396 }
8397 }
8398
8399 3677402239314018056 => {
8400 let responder = ::fidl_next::Responder::from_untyped(responder);
8401
8402 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8403 Ok(decoded) => {
8404 handler
8405 .update_attributes(
8406 ::fidl_next::Request::from_decoded(decoded),
8407 responder,
8408 )
8409 .await;
8410 Ok(())
8411 }
8412 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8413 ordinal: 3677402239314018056,
8414 error,
8415 }),
8416 }
8417 }
8418
8419 3196473584242777161 => {
8420 let responder = ::fidl_next::Responder::from_untyped(responder);
8421
8422 handler.sync(responder).await;
8423 Ok(())
8424 }
8425
8426 5043930208506967771 => {
8427 let responder = ::fidl_next::Responder::from_untyped(responder);
8428
8429 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8430 Ok(decoded) => {
8431 handler
8432 .get_extended_attribute(
8433 ::fidl_next::Request::from_decoded(decoded),
8434 responder,
8435 )
8436 .await;
8437 Ok(())
8438 }
8439 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8440 ordinal: 5043930208506967771,
8441 error,
8442 }),
8443 }
8444 }
8445
8446 5374223046099989052 => {
8447 let responder = ::fidl_next::Responder::from_untyped(responder);
8448
8449 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8450 Ok(decoded) => {
8451 handler
8452 .set_extended_attribute(
8453 ::fidl_next::Request::from_decoded(decoded),
8454 responder,
8455 )
8456 .await;
8457 Ok(())
8458 }
8459 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8460 ordinal: 5374223046099989052,
8461 error,
8462 }),
8463 }
8464 }
8465
8466 8794297771444732717 => {
8467 let responder = ::fidl_next::Responder::from_untyped(responder);
8468
8469 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8470 Ok(decoded) => {
8471 handler
8472 .remove_extended_attribute(
8473 ::fidl_next::Request::from_decoded(decoded),
8474 responder,
8475 )
8476 .await;
8477 Ok(())
8478 }
8479 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8480 ordinal: 8794297771444732717,
8481 error,
8482 }),
8483 }
8484 }
8485
8486 ordinal => {
8487 handler.on_unknown_interaction(ordinal).await;
8488 if ::core::matches!(
8489 message.header().flexibility(),
8490 ::fidl_next::protocol::Flexibility::Strict
8491 ) {
8492 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8493 } else {
8494 responder
8495 .respond_framework_error(
8496 ordinal,
8497 ::fidl_next::FrameworkError::UnknownMethod,
8498 )
8499 .expect("encoding a framework error should never fail")
8500 .await?;
8501 Ok(())
8502 }
8503 }
8504 }
8505 }
8506}
8507
8508impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
8509where
8510 ___T: ::fidl_next::Transport,
8511{
8512 async fn on_open(&mut self, _: ::fidl_next::Request<node::OnOpen, ___T>) {}
8513
8514 async fn on_representation(&mut self, _: ::fidl_next::Request<node::OnRepresentation, ___T>) {}
8515
8516 async fn on_unknown_interaction(&mut self, _: u64) {}
8517}
8518
8519impl<___H, ___T> NodeLocalClientHandler<___T> for ::fidl_next::Local<___H>
8520where
8521 ___H: NodeClientHandler<___T>,
8522 ___T: ::fidl_next::Transport,
8523{
8524 async fn on_open(&mut self, request: ::fidl_next::Request<node::OnOpen, ___T>) {
8525 ___H::on_open(&mut self.0, request).await
8526 }
8527
8528 async fn on_representation(
8529 &mut self,
8530
8531 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
8532 ) {
8533 ___H::on_representation(&mut self.0, request).await
8534 }
8535
8536 async fn on_unknown_interaction(&mut self, ordinal: u64) {
8537 ___H::on_unknown_interaction(&mut self.0, ordinal).await
8538 }
8539}
8540
8541impl<___H, ___T> NodeLocalServerHandler<___T> for ::fidl_next::Local<___H>
8542where
8543 ___H: NodeServerHandler<___T>,
8544 ___T: ::fidl_next::Transport,
8545{
8546 async fn clone(&mut self, request: ::fidl_next::Request<node::Clone, ___T>) {
8547 ___H::clone(&mut self.0, request).await
8548 }
8549
8550 async fn close(&mut self, responder: ::fidl_next::Responder<node::Close, ___T>) {
8551 ___H::close(&mut self.0, responder).await
8552 }
8553
8554 async fn query(&mut self, responder: ::fidl_next::Responder<node::Query, ___T>) {
8555 ___H::query(&mut self.0, responder).await
8556 }
8557
8558 async fn deprecated_clone(
8559 &mut self,
8560
8561 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
8562 ) {
8563 ___H::deprecated_clone(&mut self.0, request).await
8564 }
8565
8566 async fn deprecated_get_attr(
8567 &mut self,
8568
8569 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
8570 ) {
8571 ___H::deprecated_get_attr(&mut self.0, responder).await
8572 }
8573
8574 async fn deprecated_set_attr(
8575 &mut self,
8576
8577 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
8578
8579 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
8580 ) {
8581 ___H::deprecated_set_attr(&mut self.0, request, responder).await
8582 }
8583
8584 async fn deprecated_get_flags(
8585 &mut self,
8586
8587 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
8588 ) {
8589 ___H::deprecated_get_flags(&mut self.0, responder).await
8590 }
8591
8592 async fn deprecated_set_flags(
8593 &mut self,
8594
8595 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
8596
8597 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
8598 ) {
8599 ___H::deprecated_set_flags(&mut self.0, request, responder).await
8600 }
8601
8602 async fn get_flags(&mut self, responder: ::fidl_next::Responder<node::GetFlags, ___T>) {
8603 ___H::get_flags(&mut self.0, responder).await
8604 }
8605
8606 async fn set_flags(
8607 &mut self,
8608
8609 request: ::fidl_next::Request<node::SetFlags, ___T>,
8610
8611 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
8612 ) {
8613 ___H::set_flags(&mut self.0, request, responder).await
8614 }
8615
8616 async fn query_filesystem(
8617 &mut self,
8618
8619 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
8620 ) {
8621 ___H::query_filesystem(&mut self.0, responder).await
8622 }
8623
8624 async fn get_attributes(
8625 &mut self,
8626
8627 request: ::fidl_next::Request<node::GetAttributes, ___T>,
8628
8629 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
8630 ) {
8631 ___H::get_attributes(&mut self.0, request, responder).await
8632 }
8633
8634 async fn update_attributes(
8635 &mut self,
8636
8637 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
8638
8639 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
8640 ) {
8641 ___H::update_attributes(&mut self.0, request, responder).await
8642 }
8643
8644 async fn sync(&mut self, responder: ::fidl_next::Responder<node::Sync, ___T>) {
8645 ___H::sync(&mut self.0, responder).await
8646 }
8647
8648 async fn list_extended_attributes(
8649 &mut self,
8650
8651 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
8652 ) {
8653 ___H::list_extended_attributes(&mut self.0, request).await
8654 }
8655
8656 async fn get_extended_attribute(
8657 &mut self,
8658
8659 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
8660
8661 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
8662 ) {
8663 ___H::get_extended_attribute(&mut self.0, request, responder).await
8664 }
8665
8666 async fn set_extended_attribute(
8667 &mut self,
8668
8669 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
8670
8671 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
8672 ) {
8673 ___H::set_extended_attribute(&mut self.0, request, responder).await
8674 }
8675
8676 async fn remove_extended_attribute(
8677 &mut self,
8678
8679 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
8680
8681 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
8682 ) {
8683 ___H::remove_extended_attribute(&mut self.0, request, responder).await
8684 }
8685
8686 async fn on_unknown_interaction(&mut self, ordinal: u64) {
8687 ___H::on_unknown_interaction(&mut self.0, ordinal).await
8688 }
8689}
8690
8691#[doc = " Directory defines a node which is capable of containing other Objects.\n"]
8693#[derive(PartialEq, Debug)]
8694pub struct Directory;
8695
8696impl ::fidl_next::Discoverable for Directory {
8697 const PROTOCOL_NAME: &'static str = "fuchsia.io.Directory";
8698}
8699
8700#[cfg(target_os = "fuchsia")]
8701impl ::fidl_next::HasTransport for Directory {
8702 type Transport = ::fidl_next::fuchsia::zx::Channel;
8703}
8704
8705pub mod directory {
8706 pub mod prelude {
8707 pub use crate::{
8708 Directory, DirectoryClientHandler, DirectoryLocalClientHandler,
8709 DirectoryLocalServerHandler, DirectoryServerHandler, directory,
8710 };
8711
8712 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
8713
8714 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
8715
8716 pub use crate::natural::DirectoryCreateSymlinkRequest;
8717
8718 pub use crate::natural::DirectoryDeprecatedOpenRequest;
8719
8720 pub use crate::natural::DirectoryGetTokenResponse;
8721
8722 pub use crate::natural::DirectoryLinkRequest;
8723
8724 pub use crate::natural::DirectoryLinkResponse;
8725
8726 pub use crate::natural::DirectoryReadDirentsRequest;
8727
8728 pub use crate::natural::DirectoryReadDirentsResponse;
8729
8730 pub use crate::natural::DirectoryRenameRequest;
8731
8732 pub use crate::natural::DirectoryRewindResponse;
8733
8734 pub use crate::natural::DirectoryUnlinkRequest;
8735
8736 pub use crate::natural::DirectoryWatchRequest;
8737
8738 pub use crate::natural::DirectoryWatchResponse;
8739
8740 pub use crate::natural::DirectoryCreateSymlinkResponse;
8741
8742 pub use crate::natural::DirectoryRenameResponse;
8743
8744 pub use crate::natural::DirectoryUnlinkResponse;
8745
8746 pub use crate::natural::ExtendedAttributeValue;
8747
8748 pub use crate::natural::MutableNodeAttributes;
8749
8750 pub use crate::natural::NodeAttributes2;
8751
8752 pub use crate::natural::NodeDeprecatedCloneRequest;
8753
8754 pub use crate::natural::NodeDeprecatedGetAttrResponse;
8755
8756 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
8757
8758 pub use crate::natural::NodeDeprecatedSetAttrRequest;
8759
8760 pub use crate::natural::NodeDeprecatedSetAttrResponse;
8761
8762 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
8763
8764 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
8765
8766 pub use crate::natural::NodeGetAttributesRequest;
8767
8768 pub use crate::natural::NodeGetExtendedAttributeRequest;
8769
8770 pub use crate::natural::NodeListExtendedAttributesRequest;
8771
8772 pub use crate::natural::NodeOnOpenRequest;
8773
8774 pub use crate::natural::NodeQueryFilesystemResponse;
8775
8776 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
8777
8778 pub use crate::natural::NodeSetExtendedAttributeRequest;
8779
8780 pub use crate::natural::NodeSetFlagsRequest;
8781
8782 pub use crate::natural::NodeGetFlagsResponse;
8783
8784 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
8785
8786 pub use crate::natural::NodeSetExtendedAttributeResponse;
8787
8788 pub use crate::natural::NodeSetFlagsResponse;
8789
8790 pub use crate::natural::NodeSyncResponse;
8791
8792 pub use crate::natural::NodeUpdateAttributesResponse;
8793
8794 pub use crate::natural::OpenableOpenRequest;
8795
8796 pub use crate::natural::Representation;
8797
8798 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
8799
8800 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
8801
8802 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
8803 }
8804
8805 pub struct AdvisoryLock;
8806
8807 impl ::fidl_next::Method for AdvisoryLock {
8808 const ORDINAL: u64 = 7992130864415541162;
8809 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8810 ::fidl_next::protocol::Flexibility::Strict;
8811
8812 type Protocol = crate::Directory;
8813
8814 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
8815 }
8816
8817 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
8818 type Response = ::fidl_next::wire::Result<
8819 'static,
8820 crate::wire::AdvisoryLockingAdvisoryLockResponse,
8821 ::fidl_next::wire::fuchsia::Status,
8822 >;
8823 }
8824
8825 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
8826 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
8827
8828 fn respond(response: ___R) -> Self::Output {
8829 ::core::result::Result::Ok(response)
8830 }
8831 }
8832
8833 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
8834 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
8835
8836 fn respond_err(response: ___R) -> Self::Output {
8837 ::core::result::Result::Err(response)
8838 }
8839 }
8840
8841 pub struct Clone;
8842
8843 impl ::fidl_next::Method for Clone {
8844 const ORDINAL: u64 = 2366825959783828089;
8845 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8846 ::fidl_next::protocol::Flexibility::Strict;
8847
8848 type Protocol = crate::Directory;
8849
8850 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
8851 }
8852
8853 pub struct Close;
8854
8855 impl ::fidl_next::Method for Close {
8856 const ORDINAL: u64 = 6540867515453498750;
8857 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8858 ::fidl_next::protocol::Flexibility::Strict;
8859
8860 type Protocol = crate::Directory;
8861
8862 type Request = ::fidl_next::wire::EmptyMessageBody;
8863 }
8864
8865 impl ::fidl_next::TwoWayMethod for Close {
8866 type Response = ::fidl_next::wire::Result<
8867 'static,
8868 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
8869 ::fidl_next::wire::Int32,
8870 >;
8871 }
8872
8873 impl<___R> ::fidl_next::Respond<___R> for Close {
8874 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
8875
8876 fn respond(response: ___R) -> Self::Output {
8877 ::core::result::Result::Ok(response)
8878 }
8879 }
8880
8881 impl<___R> ::fidl_next::RespondErr<___R> for Close {
8882 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
8883
8884 fn respond_err(response: ___R) -> Self::Output {
8885 ::core::result::Result::Err(response)
8886 }
8887 }
8888
8889 pub struct Query;
8890
8891 impl ::fidl_next::Method for Query {
8892 const ORDINAL: u64 = 2763219980499352582;
8893 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8894 ::fidl_next::protocol::Flexibility::Strict;
8895
8896 type Protocol = crate::Directory;
8897
8898 type Request = ::fidl_next::wire::EmptyMessageBody;
8899 }
8900
8901 impl ::fidl_next::TwoWayMethod for Query {
8902 type Response = ::fidl_next::wire::Strict<
8903 ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
8904 >;
8905 }
8906
8907 impl<___R> ::fidl_next::Respond<___R> for Query {
8908 type Output =
8909 ::fidl_next::Strict<::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>>;
8910
8911 fn respond(response: ___R) -> Self::Output {
8912 ::fidl_next::Strict(::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse {
8913 protocol: response,
8914 })
8915 }
8916 }
8917
8918 pub struct DeprecatedClone;
8919
8920 impl ::fidl_next::Method for DeprecatedClone {
8921 const ORDINAL: u64 = 6512600400724287855;
8922 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8923 ::fidl_next::protocol::Flexibility::Flexible;
8924
8925 type Protocol = crate::Directory;
8926
8927 type Request = crate::wire::NodeDeprecatedCloneRequest;
8928 }
8929
8930 pub struct OnOpen;
8931
8932 impl ::fidl_next::Method for OnOpen {
8933 const ORDINAL: u64 = 9207534335756671346;
8934 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8935 ::fidl_next::protocol::Flexibility::Flexible;
8936
8937 type Protocol = crate::Directory;
8938
8939 type Request = crate::wire::NodeOnOpenRequest<'static>;
8940 }
8941
8942 pub struct DeprecatedGetAttr;
8943
8944 impl ::fidl_next::Method for DeprecatedGetAttr {
8945 const ORDINAL: u64 = 8689798978500614909;
8946 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8947 ::fidl_next::protocol::Flexibility::Strict;
8948
8949 type Protocol = crate::Directory;
8950
8951 type Request = ::fidl_next::wire::EmptyMessageBody;
8952 }
8953
8954 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
8955 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
8956 }
8957
8958 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
8959 type Output = ::fidl_next::Strict<___R>;
8960
8961 fn respond(response: ___R) -> Self::Output {
8962 ::fidl_next::Strict(response)
8963 }
8964 }
8965
8966 pub struct DeprecatedSetAttr;
8967
8968 impl ::fidl_next::Method for DeprecatedSetAttr {
8969 const ORDINAL: u64 = 4721673413776871238;
8970 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8971 ::fidl_next::protocol::Flexibility::Strict;
8972
8973 type Protocol = crate::Directory;
8974
8975 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
8976 }
8977
8978 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
8979 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
8980 }
8981
8982 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
8983 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
8984
8985 fn respond(response: ___R) -> Self::Output {
8986 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
8987 }
8988 }
8989
8990 pub struct DeprecatedGetFlags;
8991
8992 impl ::fidl_next::Method for DeprecatedGetFlags {
8993 const ORDINAL: u64 = 6595803110182632097;
8994 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8995 ::fidl_next::protocol::Flexibility::Strict;
8996
8997 type Protocol = crate::Directory;
8998
8999 type Request = ::fidl_next::wire::EmptyMessageBody;
9000 }
9001
9002 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
9003 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
9004 }
9005
9006 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
9007 type Output = ::fidl_next::Strict<___R>;
9008
9009 fn respond(response: ___R) -> Self::Output {
9010 ::fidl_next::Strict(response)
9011 }
9012 }
9013
9014 pub struct DeprecatedSetFlags;
9015
9016 impl ::fidl_next::Method for DeprecatedSetFlags {
9017 const ORDINAL: u64 = 5950864159036794675;
9018 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9019 ::fidl_next::protocol::Flexibility::Strict;
9020
9021 type Protocol = crate::Directory;
9022
9023 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
9024 }
9025
9026 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
9027 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
9028 }
9029
9030 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
9031 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
9032
9033 fn respond(response: ___R) -> Self::Output {
9034 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
9035 }
9036 }
9037
9038 pub struct GetFlags;
9039
9040 impl ::fidl_next::Method for GetFlags {
9041 const ORDINAL: u64 = 105530239381466147;
9042 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9043 ::fidl_next::protocol::Flexibility::Flexible;
9044
9045 type Protocol = crate::Directory;
9046
9047 type Request = ::fidl_next::wire::EmptyMessageBody;
9048 }
9049
9050 impl ::fidl_next::TwoWayMethod for GetFlags {
9051 type Response = ::fidl_next::wire::Result<
9052 'static,
9053 crate::wire::NodeGetFlagsResponse,
9054 ::fidl_next::wire::fuchsia::Status,
9055 >;
9056 }
9057
9058 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
9059 type Output = ::core::result::Result<
9060 crate::generic::NodeGetFlagsResponse<___R>,
9061 ::fidl_next::never::Never,
9062 >;
9063
9064 fn respond(response: ___R) -> Self::Output {
9065 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
9066 }
9067 }
9068
9069 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
9070 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9071
9072 fn respond_err(response: ___R) -> Self::Output {
9073 ::core::result::Result::Err(response)
9074 }
9075 }
9076
9077 pub struct SetFlags;
9078
9079 impl ::fidl_next::Method for SetFlags {
9080 const ORDINAL: u64 = 6172186066099445416;
9081 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9082 ::fidl_next::protocol::Flexibility::Flexible;
9083
9084 type Protocol = crate::Directory;
9085
9086 type Request = crate::wire::NodeSetFlagsRequest;
9087 }
9088
9089 impl ::fidl_next::TwoWayMethod for SetFlags {
9090 type Response = ::fidl_next::wire::Result<
9091 'static,
9092 crate::wire::NodeSetFlagsResponse,
9093 ::fidl_next::wire::fuchsia::Status,
9094 >;
9095 }
9096
9097 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
9098 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9099
9100 fn respond(response: ___R) -> Self::Output {
9101 ::core::result::Result::Ok(response)
9102 }
9103 }
9104
9105 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
9106 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9107
9108 fn respond_err(response: ___R) -> Self::Output {
9109 ::core::result::Result::Err(response)
9110 }
9111 }
9112
9113 pub struct QueryFilesystem;
9114
9115 impl ::fidl_next::Method for QueryFilesystem {
9116 const ORDINAL: u64 = 8013111122914313744;
9117 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9118 ::fidl_next::protocol::Flexibility::Strict;
9119
9120 type Protocol = crate::Directory;
9121
9122 type Request = ::fidl_next::wire::EmptyMessageBody;
9123 }
9124
9125 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
9126 type Response =
9127 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
9128 }
9129
9130 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
9131 type Output = ::fidl_next::Strict<___R>;
9132
9133 fn respond(response: ___R) -> Self::Output {
9134 ::fidl_next::Strict(response)
9135 }
9136 }
9137
9138 pub struct OnRepresentation;
9139
9140 impl ::fidl_next::Method for OnRepresentation {
9141 const ORDINAL: u64 = 6679970090861613324;
9142 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9143 ::fidl_next::protocol::Flexibility::Strict;
9144
9145 type Protocol = crate::Directory;
9146
9147 type Request = crate::wire::Representation<'static>;
9148 }
9149
9150 pub struct GetAttributes;
9151
9152 impl ::fidl_next::Method for GetAttributes {
9153 const ORDINAL: u64 = 4414537700416816443;
9154 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9155 ::fidl_next::protocol::Flexibility::Strict;
9156
9157 type Protocol = crate::Directory;
9158
9159 type Request = crate::wire::NodeGetAttributesRequest;
9160 }
9161
9162 impl ::fidl_next::TwoWayMethod for GetAttributes {
9163 type Response = ::fidl_next::wire::Result<
9164 'static,
9165 crate::wire::NodeAttributes2<'static>,
9166 ::fidl_next::wire::fuchsia::Status,
9167 >;
9168 }
9169
9170 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
9171 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9172
9173 fn respond(response: ___R) -> Self::Output {
9174 ::core::result::Result::Ok(response)
9175 }
9176 }
9177
9178 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
9179 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9180
9181 fn respond_err(response: ___R) -> Self::Output {
9182 ::core::result::Result::Err(response)
9183 }
9184 }
9185
9186 pub struct UpdateAttributes;
9187
9188 impl ::fidl_next::Method for UpdateAttributes {
9189 const ORDINAL: u64 = 3677402239314018056;
9190 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9191 ::fidl_next::protocol::Flexibility::Strict;
9192
9193 type Protocol = crate::Directory;
9194
9195 type Request = crate::wire::MutableNodeAttributes<'static>;
9196 }
9197
9198 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
9199 type Response = ::fidl_next::wire::Result<
9200 'static,
9201 crate::wire::NodeUpdateAttributesResponse,
9202 ::fidl_next::wire::fuchsia::Status,
9203 >;
9204 }
9205
9206 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
9207 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9208
9209 fn respond(response: ___R) -> Self::Output {
9210 ::core::result::Result::Ok(response)
9211 }
9212 }
9213
9214 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
9215 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9216
9217 fn respond_err(response: ___R) -> Self::Output {
9218 ::core::result::Result::Err(response)
9219 }
9220 }
9221
9222 pub struct Sync;
9223
9224 impl ::fidl_next::Method for Sync {
9225 const ORDINAL: u64 = 3196473584242777161;
9226 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9227 ::fidl_next::protocol::Flexibility::Strict;
9228
9229 type Protocol = crate::Directory;
9230
9231 type Request = ::fidl_next::wire::EmptyMessageBody;
9232 }
9233
9234 impl ::fidl_next::TwoWayMethod for Sync {
9235 type Response = ::fidl_next::wire::Result<
9236 'static,
9237 crate::wire::NodeSyncResponse,
9238 ::fidl_next::wire::fuchsia::Status,
9239 >;
9240 }
9241
9242 impl<___R> ::fidl_next::Respond<___R> for Sync {
9243 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9244
9245 fn respond(response: ___R) -> Self::Output {
9246 ::core::result::Result::Ok(response)
9247 }
9248 }
9249
9250 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
9251 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9252
9253 fn respond_err(response: ___R) -> Self::Output {
9254 ::core::result::Result::Err(response)
9255 }
9256 }
9257
9258 pub struct ListExtendedAttributes;
9259
9260 impl ::fidl_next::Method for ListExtendedAttributes {
9261 const ORDINAL: u64 = 5431626189872037072;
9262 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9263 ::fidl_next::protocol::Flexibility::Strict;
9264
9265 type Protocol = crate::Directory;
9266
9267 type Request = crate::wire::NodeListExtendedAttributesRequest;
9268 }
9269
9270 pub struct GetExtendedAttribute;
9271
9272 impl ::fidl_next::Method for GetExtendedAttribute {
9273 const ORDINAL: u64 = 5043930208506967771;
9274 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9275 ::fidl_next::protocol::Flexibility::Strict;
9276
9277 type Protocol = crate::Directory;
9278
9279 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
9280 }
9281
9282 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
9283 type Response = ::fidl_next::wire::Result<
9284 'static,
9285 crate::wire::ExtendedAttributeValue<'static>,
9286 ::fidl_next::wire::fuchsia::Status,
9287 >;
9288 }
9289
9290 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
9291 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9292
9293 fn respond(response: ___R) -> Self::Output {
9294 ::core::result::Result::Ok(response)
9295 }
9296 }
9297
9298 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
9299 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9300
9301 fn respond_err(response: ___R) -> Self::Output {
9302 ::core::result::Result::Err(response)
9303 }
9304 }
9305
9306 pub struct SetExtendedAttribute;
9307
9308 impl ::fidl_next::Method for SetExtendedAttribute {
9309 const ORDINAL: u64 = 5374223046099989052;
9310 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9311 ::fidl_next::protocol::Flexibility::Strict;
9312
9313 type Protocol = crate::Directory;
9314
9315 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
9316 }
9317
9318 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
9319 type Response = ::fidl_next::wire::Result<
9320 'static,
9321 crate::wire::NodeSetExtendedAttributeResponse,
9322 ::fidl_next::wire::fuchsia::Status,
9323 >;
9324 }
9325
9326 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
9327 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9328
9329 fn respond(response: ___R) -> Self::Output {
9330 ::core::result::Result::Ok(response)
9331 }
9332 }
9333
9334 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
9335 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9336
9337 fn respond_err(response: ___R) -> Self::Output {
9338 ::core::result::Result::Err(response)
9339 }
9340 }
9341
9342 pub struct RemoveExtendedAttribute;
9343
9344 impl ::fidl_next::Method for RemoveExtendedAttribute {
9345 const ORDINAL: u64 = 8794297771444732717;
9346 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9347 ::fidl_next::protocol::Flexibility::Strict;
9348
9349 type Protocol = crate::Directory;
9350
9351 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
9352 }
9353
9354 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
9355 type Response = ::fidl_next::wire::Result<
9356 'static,
9357 crate::wire::NodeRemoveExtendedAttributeResponse,
9358 ::fidl_next::wire::fuchsia::Status,
9359 >;
9360 }
9361
9362 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
9363 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9364
9365 fn respond(response: ___R) -> Self::Output {
9366 ::core::result::Result::Ok(response)
9367 }
9368 }
9369
9370 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
9371 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9372
9373 fn respond_err(response: ___R) -> Self::Output {
9374 ::core::result::Result::Err(response)
9375 }
9376 }
9377
9378 pub struct Open;
9379
9380 impl ::fidl_next::Method for Open {
9381 const ORDINAL: u64 = 6236883748953765593;
9382 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9383 ::fidl_next::protocol::Flexibility::Flexible;
9384
9385 type Protocol = crate::Directory;
9386
9387 type Request = crate::wire::OpenableOpenRequest<'static>;
9388 }
9389
9390 pub struct DeprecatedOpen;
9391
9392 impl ::fidl_next::Method for DeprecatedOpen {
9393 const ORDINAL: u64 = 3193127272456937152;
9394 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9395 ::fidl_next::protocol::Flexibility::Flexible;
9396
9397 type Protocol = crate::Directory;
9398
9399 type Request = crate::wire::DirectoryDeprecatedOpenRequest<'static>;
9400 }
9401
9402 pub struct ReadDirents;
9403
9404 impl ::fidl_next::Method for ReadDirents {
9405 const ORDINAL: u64 = 3855785432100874762;
9406 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9407 ::fidl_next::protocol::Flexibility::Strict;
9408
9409 type Protocol = crate::Directory;
9410
9411 type Request = crate::wire::DirectoryReadDirentsRequest;
9412 }
9413
9414 impl ::fidl_next::TwoWayMethod for ReadDirents {
9415 type Response =
9416 ::fidl_next::wire::Strict<crate::wire::DirectoryReadDirentsResponse<'static>>;
9417 }
9418
9419 impl<___R> ::fidl_next::Respond<___R> for ReadDirents {
9420 type Output = ::fidl_next::Strict<___R>;
9421
9422 fn respond(response: ___R) -> Self::Output {
9423 ::fidl_next::Strict(response)
9424 }
9425 }
9426
9427 pub struct Rewind;
9428
9429 impl ::fidl_next::Method for Rewind {
9430 const ORDINAL: u64 = 1635123508515392625;
9431 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9432 ::fidl_next::protocol::Flexibility::Strict;
9433
9434 type Protocol = crate::Directory;
9435
9436 type Request = ::fidl_next::wire::EmptyMessageBody;
9437 }
9438
9439 impl ::fidl_next::TwoWayMethod for Rewind {
9440 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryRewindResponse>;
9441 }
9442
9443 impl<___R> ::fidl_next::Respond<___R> for Rewind {
9444 type Output = ::fidl_next::Strict<crate::generic::DirectoryRewindResponse<___R>>;
9445
9446 fn respond(response: ___R) -> Self::Output {
9447 ::fidl_next::Strict(crate::generic::DirectoryRewindResponse { s: response })
9448 }
9449 }
9450
9451 pub struct GetToken;
9452
9453 impl ::fidl_next::Method for GetToken {
9454 const ORDINAL: u64 = 2787337947777369685;
9455 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9456 ::fidl_next::protocol::Flexibility::Strict;
9457
9458 type Protocol = crate::Directory;
9459
9460 type Request = ::fidl_next::wire::EmptyMessageBody;
9461 }
9462
9463 impl ::fidl_next::TwoWayMethod for GetToken {
9464 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryGetTokenResponse>;
9465 }
9466
9467 impl<___R> ::fidl_next::Respond<___R> for GetToken {
9468 type Output = ::fidl_next::Strict<___R>;
9469
9470 fn respond(response: ___R) -> Self::Output {
9471 ::fidl_next::Strict(response)
9472 }
9473 }
9474
9475 pub struct Link;
9476
9477 impl ::fidl_next::Method for Link {
9478 const ORDINAL: u64 = 8360374984291987687;
9479 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9480 ::fidl_next::protocol::Flexibility::Strict;
9481
9482 type Protocol = crate::Directory;
9483
9484 type Request = crate::wire::DirectoryLinkRequest<'static>;
9485 }
9486
9487 impl ::fidl_next::TwoWayMethod for Link {
9488 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryLinkResponse>;
9489 }
9490
9491 impl<___R> ::fidl_next::Respond<___R> for Link {
9492 type Output = ::fidl_next::Strict<crate::generic::DirectoryLinkResponse<___R>>;
9493
9494 fn respond(response: ___R) -> Self::Output {
9495 ::fidl_next::Strict(crate::generic::DirectoryLinkResponse { s: response })
9496 }
9497 }
9498
9499 pub struct Unlink;
9500
9501 impl ::fidl_next::Method for Unlink {
9502 const ORDINAL: u64 = 8433556716759383021;
9503 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9504 ::fidl_next::protocol::Flexibility::Strict;
9505
9506 type Protocol = crate::Directory;
9507
9508 type Request = crate::wire::DirectoryUnlinkRequest<'static>;
9509 }
9510
9511 impl ::fidl_next::TwoWayMethod for Unlink {
9512 type Response = ::fidl_next::wire::Result<
9513 'static,
9514 crate::wire::DirectoryUnlinkResponse,
9515 ::fidl_next::wire::fuchsia::Status,
9516 >;
9517 }
9518
9519 impl<___R> ::fidl_next::Respond<___R> for Unlink {
9520 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9521
9522 fn respond(response: ___R) -> Self::Output {
9523 ::core::result::Result::Ok(response)
9524 }
9525 }
9526
9527 impl<___R> ::fidl_next::RespondErr<___R> for Unlink {
9528 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9529
9530 fn respond_err(response: ___R) -> Self::Output {
9531 ::core::result::Result::Err(response)
9532 }
9533 }
9534
9535 pub struct Rename;
9536
9537 impl ::fidl_next::Method for Rename {
9538 const ORDINAL: u64 = 8097726607824333022;
9539 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9540 ::fidl_next::protocol::Flexibility::Strict;
9541
9542 type Protocol = crate::Directory;
9543
9544 type Request = crate::wire::DirectoryRenameRequest<'static>;
9545 }
9546
9547 impl ::fidl_next::TwoWayMethod for Rename {
9548 type Response = ::fidl_next::wire::Result<
9549 'static,
9550 crate::wire::DirectoryRenameResponse,
9551 ::fidl_next::wire::fuchsia::Status,
9552 >;
9553 }
9554
9555 impl<___R> ::fidl_next::Respond<___R> for Rename {
9556 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9557
9558 fn respond(response: ___R) -> Self::Output {
9559 ::core::result::Result::Ok(response)
9560 }
9561 }
9562
9563 impl<___R> ::fidl_next::RespondErr<___R> for Rename {
9564 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9565
9566 fn respond_err(response: ___R) -> Self::Output {
9567 ::core::result::Result::Err(response)
9568 }
9569 }
9570
9571 pub struct CreateSymlink;
9572
9573 impl ::fidl_next::Method for CreateSymlink {
9574 const ORDINAL: u64 = 2435901052462315657;
9575 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9576 ::fidl_next::protocol::Flexibility::Strict;
9577
9578 type Protocol = crate::Directory;
9579
9580 type Request = crate::wire::DirectoryCreateSymlinkRequest<'static>;
9581 }
9582
9583 impl ::fidl_next::TwoWayMethod for CreateSymlink {
9584 type Response = ::fidl_next::wire::Result<
9585 'static,
9586 crate::wire::DirectoryCreateSymlinkResponse,
9587 ::fidl_next::wire::fuchsia::Status,
9588 >;
9589 }
9590
9591 impl<___R> ::fidl_next::Respond<___R> for CreateSymlink {
9592 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9593
9594 fn respond(response: ___R) -> Self::Output {
9595 ::core::result::Result::Ok(response)
9596 }
9597 }
9598
9599 impl<___R> ::fidl_next::RespondErr<___R> for CreateSymlink {
9600 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9601
9602 fn respond_err(response: ___R) -> Self::Output {
9603 ::core::result::Result::Err(response)
9604 }
9605 }
9606
9607 pub struct Watch;
9608
9609 impl ::fidl_next::Method for Watch {
9610 const ORDINAL: u64 = 6275512344170098065;
9611 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9612 ::fidl_next::protocol::Flexibility::Strict;
9613
9614 type Protocol = crate::Directory;
9615
9616 type Request = crate::wire::DirectoryWatchRequest;
9617 }
9618
9619 impl ::fidl_next::TwoWayMethod for Watch {
9620 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryWatchResponse>;
9621 }
9622
9623 impl<___R> ::fidl_next::Respond<___R> for Watch {
9624 type Output = ::fidl_next::Strict<crate::generic::DirectoryWatchResponse<___R>>;
9625
9626 fn respond(response: ___R) -> Self::Output {
9627 ::fidl_next::Strict(crate::generic::DirectoryWatchResponse { s: response })
9628 }
9629 }
9630
9631 mod ___detail {
9632 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Directory
9633 where
9634 ___T: ::fidl_next::Transport,
9635 {
9636 type Client = DirectoryClient<___T>;
9637 type Server = DirectoryServer<___T>;
9638 }
9639
9640 #[repr(transparent)]
9642 pub struct DirectoryClient<___T: ::fidl_next::Transport> {
9643 #[allow(dead_code)]
9644 client: ::fidl_next::protocol::Client<___T>,
9645 }
9646
9647 impl<___T> DirectoryClient<___T>
9648 where
9649 ___T: ::fidl_next::Transport,
9650 {
9651 #[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"]
9652 pub fn advisory_lock(
9653 &self,
9654
9655 request: impl ::fidl_next::Encode<
9656 crate::wire::AdvisoryLockRequest<'static>,
9657 <___T as ::fidl_next::Transport>::SendBuffer,
9658 >,
9659 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
9660 where
9661 <___T as ::fidl_next::Transport>::SendBuffer:
9662 ::fidl_next::encoder::InternalHandleEncoder,
9663 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9664 {
9665 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
9666 request,
9667 })
9668 }
9669
9670 #[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"]
9671 pub fn advisory_lock_with<___R>(
9672 &self,
9673 request: ___R,
9674 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
9675 where
9676 ___R: ::fidl_next::Encode<
9677 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
9678 <___T as ::fidl_next::Transport>::SendBuffer,
9679 >,
9680 {
9681 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9682 7992130864415541162,
9683 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
9684 request,
9685 ))
9686 }
9687
9688 pub fn clone(
9689 &self,
9690
9691 request: impl ::fidl_next::Encode<
9692 ::fidl_next::ServerEnd<
9693 ::fidl_next_fuchsia_unknown::Cloneable,
9694 ::fidl_next::wire::fuchsia::Channel,
9695 >,
9696 <___T as ::fidl_next::Transport>::SendBuffer,
9697 >,
9698 ) -> ::fidl_next::SendFuture<'_, ___T>
9699 where
9700 <___T as ::fidl_next::Transport>::SendBuffer:
9701 ::fidl_next::encoder::InternalHandleEncoder,
9702 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9703 {
9704 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
9705 request,
9706 })
9707 }
9708
9709 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
9710 where
9711 ___R: ::fidl_next::Encode<
9712 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
9713 <___T as ::fidl_next::Transport>::SendBuffer,
9714 >,
9715 {
9716 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9717 2366825959783828089,
9718 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
9719 request,
9720 ))
9721 }
9722
9723 #[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"]
9724 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
9725 ::fidl_next::TwoWayFuture::from_untyped(
9726 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9727 6540867515453498750,
9728 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
9729 (),
9730 ),
9731 )
9732 }
9733
9734 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
9735 ::fidl_next::TwoWayFuture::from_untyped(
9736 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9737 2763219980499352582,
9738 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
9739 (),
9740 ),
9741 )
9742 }
9743
9744 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9745 pub fn deprecated_clone(
9746 &self,
9747
9748 flags: impl ::fidl_next::Encode<
9749 crate::wire::OpenFlags,
9750 <___T as ::fidl_next::Transport>::SendBuffer,
9751 >,
9752
9753 object: impl ::fidl_next::Encode<
9754 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
9755 <___T as ::fidl_next::Transport>::SendBuffer,
9756 >,
9757 ) -> ::fidl_next::SendFuture<'_, ___T>
9758 where
9759 <___T as ::fidl_next::Transport>::SendBuffer:
9760 ::fidl_next::encoder::InternalHandleEncoder,
9761 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9762 {
9763 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
9764 flags,
9765
9766 object,
9767 })
9768 }
9769
9770 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9771 pub fn deprecated_clone_with<___R>(
9772 &self,
9773 request: ___R,
9774 ) -> ::fidl_next::SendFuture<'_, ___T>
9775 where
9776 ___R: ::fidl_next::Encode<
9777 crate::wire::NodeDeprecatedCloneRequest,
9778 <___T as ::fidl_next::Transport>::SendBuffer,
9779 >,
9780 {
9781 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9782 6512600400724287855,
9783 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
9784 request,
9785 ))
9786 }
9787
9788 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
9789 pub fn deprecated_get_attr(
9790 &self,
9791 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
9792 ::fidl_next::TwoWayFuture::from_untyped(
9793 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9794 8689798978500614909,
9795 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
9796 (),
9797 ),
9798 )
9799 }
9800
9801 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9802 pub fn deprecated_set_attr(
9803 &self,
9804
9805 flags: impl ::fidl_next::Encode<
9806 crate::wire::NodeAttributeFlags,
9807 <___T as ::fidl_next::Transport>::SendBuffer,
9808 >,
9809
9810 attributes: impl ::fidl_next::Encode<
9811 crate::wire::NodeAttributes,
9812 <___T as ::fidl_next::Transport>::SendBuffer,
9813 >,
9814 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
9815 where
9816 <___T as ::fidl_next::Transport>::SendBuffer:
9817 ::fidl_next::encoder::InternalHandleEncoder,
9818 {
9819 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
9820 flags,
9821
9822 attributes,
9823 })
9824 }
9825
9826 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9827 pub fn deprecated_set_attr_with<___R>(
9828 &self,
9829 request: ___R,
9830 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
9831 where
9832 ___R: ::fidl_next::Encode<
9833 crate::wire::NodeDeprecatedSetAttrRequest,
9834 <___T as ::fidl_next::Transport>::SendBuffer,
9835 >,
9836 {
9837 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9838 4721673413776871238,
9839 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
9840 request,
9841 ))
9842 }
9843
9844 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
9845 pub fn deprecated_get_flags(
9846 &self,
9847 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
9848 ::fidl_next::TwoWayFuture::from_untyped(
9849 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9850 6595803110182632097,
9851 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
9852 (),
9853 ),
9854 )
9855 }
9856
9857 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9858 pub fn deprecated_set_flags(
9859 &self,
9860
9861 flags: impl ::fidl_next::Encode<
9862 crate::wire::OpenFlags,
9863 <___T as ::fidl_next::Transport>::SendBuffer,
9864 >,
9865 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
9866 where
9867 <___T as ::fidl_next::Transport>::SendBuffer:
9868 ::fidl_next::encoder::InternalHandleEncoder,
9869 {
9870 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
9871 flags,
9872 })
9873 }
9874
9875 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9876 pub fn deprecated_set_flags_with<___R>(
9877 &self,
9878 request: ___R,
9879 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
9880 where
9881 ___R: ::fidl_next::Encode<
9882 crate::wire::NodeDeprecatedSetFlagsRequest,
9883 <___T as ::fidl_next::Transport>::SendBuffer,
9884 >,
9885 {
9886 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9887 5950864159036794675,
9888 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
9889 request,
9890 ))
9891 }
9892
9893 #[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"]
9894 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
9895 ::fidl_next::TwoWayFuture::from_untyped(
9896 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9897 105530239381466147,
9898 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
9899 (),
9900 ),
9901 )
9902 }
9903
9904 #[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"]
9905 pub fn set_flags(
9906 &self,
9907
9908 flags: impl ::fidl_next::Encode<
9909 crate::wire::Flags,
9910 <___T as ::fidl_next::Transport>::SendBuffer,
9911 >,
9912 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
9913 where
9914 <___T as ::fidl_next::Transport>::SendBuffer:
9915 ::fidl_next::encoder::InternalHandleEncoder,
9916 {
9917 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
9918 }
9919
9920 #[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"]
9921 pub fn set_flags_with<___R>(
9922 &self,
9923 request: ___R,
9924 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
9925 where
9926 ___R: ::fidl_next::Encode<
9927 crate::wire::NodeSetFlagsRequest,
9928 <___T as ::fidl_next::Transport>::SendBuffer,
9929 >,
9930 {
9931 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9932 6172186066099445416,
9933 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
9934 request,
9935 ))
9936 }
9937
9938 #[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"]
9939 pub fn query_filesystem(
9940 &self,
9941 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
9942 ::fidl_next::TwoWayFuture::from_untyped(
9943 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9944 8013111122914313744,
9945 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
9946 (),
9947 ),
9948 )
9949 }
9950
9951 #[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"]
9952 pub fn get_attributes(
9953 &self,
9954
9955 query: impl ::fidl_next::Encode<
9956 crate::wire::NodeAttributesQuery,
9957 <___T as ::fidl_next::Transport>::SendBuffer,
9958 >,
9959 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
9960 where
9961 <___T as ::fidl_next::Transport>::SendBuffer:
9962 ::fidl_next::encoder::InternalHandleEncoder,
9963 {
9964 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
9965 }
9966
9967 #[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"]
9968 pub fn get_attributes_with<___R>(
9969 &self,
9970 request: ___R,
9971 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
9972 where
9973 ___R: ::fidl_next::Encode<
9974 crate::wire::NodeGetAttributesRequest,
9975 <___T as ::fidl_next::Transport>::SendBuffer,
9976 >,
9977 {
9978 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9979 4414537700416816443,
9980 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
9981 request,
9982 ))
9983 }
9984
9985 #[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"]
9986 pub fn update_attributes_with<___R>(
9987 &self,
9988 request: ___R,
9989 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
9990 where
9991 ___R: ::fidl_next::Encode<
9992 crate::wire::MutableNodeAttributes<'static>,
9993 <___T as ::fidl_next::Transport>::SendBuffer,
9994 >,
9995 {
9996 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9997 3677402239314018056,
9998 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
9999 request,
10000 ))
10001 }
10002
10003 #[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"]
10004 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
10005 ::fidl_next::TwoWayFuture::from_untyped(
10006 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10007 3196473584242777161,
10008 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
10009 (),
10010 ),
10011 )
10012 }
10013
10014 #[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.READ_BYTES`] right.\n"]
10015 pub fn list_extended_attributes(
10016 &self,
10017
10018 iterator: impl ::fidl_next::Encode<
10019 ::fidl_next::ServerEnd<
10020 crate::ExtendedAttributeIterator,
10021 ::fidl_next::wire::fuchsia::Channel,
10022 >,
10023 <___T as ::fidl_next::Transport>::SendBuffer,
10024 >,
10025 ) -> ::fidl_next::SendFuture<'_, ___T>
10026 where
10027 <___T as ::fidl_next::Transport>::SendBuffer:
10028 ::fidl_next::encoder::InternalHandleEncoder,
10029 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10030 {
10031 self.list_extended_attributes_with(
10032 crate::generic::NodeListExtendedAttributesRequest { iterator },
10033 )
10034 }
10035
10036 #[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.READ_BYTES`] right.\n"]
10037 pub fn list_extended_attributes_with<___R>(
10038 &self,
10039 request: ___R,
10040 ) -> ::fidl_next::SendFuture<'_, ___T>
10041 where
10042 ___R: ::fidl_next::Encode<
10043 crate::wire::NodeListExtendedAttributesRequest,
10044 <___T as ::fidl_next::Transport>::SendBuffer,
10045 >,
10046 {
10047 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
10048 5431626189872037072,
10049 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
10050 request,
10051 ))
10052 }
10053
10054 #[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.READ_BYTES`] right.\n"]
10055 pub fn get_extended_attribute(
10056 &self,
10057
10058 name: impl ::fidl_next::Encode<
10059 ::fidl_next::wire::Vector<'static, u8>,
10060 <___T as ::fidl_next::Transport>::SendBuffer,
10061 >,
10062 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
10063 where
10064 <___T as ::fidl_next::Transport>::SendBuffer:
10065 ::fidl_next::encoder::InternalHandleEncoder,
10066 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10067 {
10068 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
10069 name,
10070 })
10071 }
10072
10073 #[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.READ_BYTES`] right.\n"]
10074 pub fn get_extended_attribute_with<___R>(
10075 &self,
10076 request: ___R,
10077 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
10078 where
10079 ___R: ::fidl_next::Encode<
10080 crate::wire::NodeGetExtendedAttributeRequest<'static>,
10081 <___T as ::fidl_next::Transport>::SendBuffer,
10082 >,
10083 {
10084 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10085 5043930208506967771,
10086 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
10087 request,
10088 ))
10089 }
10090
10091 #[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.WRITE_BYTES`] right.\n"]
10092 pub fn set_extended_attribute(
10093 &self,
10094
10095 name: impl ::fidl_next::Encode<
10096 ::fidl_next::wire::Vector<'static, u8>,
10097 <___T as ::fidl_next::Transport>::SendBuffer,
10098 >,
10099
10100 value: impl ::fidl_next::Encode<
10101 crate::wire::ExtendedAttributeValue<'static>,
10102 <___T as ::fidl_next::Transport>::SendBuffer,
10103 >,
10104
10105 mode: impl ::fidl_next::Encode<
10106 crate::wire::SetExtendedAttributeMode,
10107 <___T as ::fidl_next::Transport>::SendBuffer,
10108 >,
10109 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
10110 where
10111 <___T as ::fidl_next::Transport>::SendBuffer:
10112 ::fidl_next::encoder::InternalHandleEncoder,
10113 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10114 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10115 {
10116 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
10117 name,
10118
10119 value,
10120
10121 mode,
10122 })
10123 }
10124
10125 #[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.WRITE_BYTES`] right.\n"]
10126 pub fn set_extended_attribute_with<___R>(
10127 &self,
10128 request: ___R,
10129 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
10130 where
10131 ___R: ::fidl_next::Encode<
10132 crate::wire::NodeSetExtendedAttributeRequest<'static>,
10133 <___T as ::fidl_next::Transport>::SendBuffer,
10134 >,
10135 {
10136 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10137 5374223046099989052,
10138 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
10139 request,
10140 ))
10141 }
10142
10143 #[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.WRITE_BYTES`] right.\n"]
10144 pub fn remove_extended_attribute(
10145 &self,
10146
10147 name: impl ::fidl_next::Encode<
10148 ::fidl_next::wire::Vector<'static, u8>,
10149 <___T as ::fidl_next::Transport>::SendBuffer,
10150 >,
10151 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
10152 where
10153 <___T as ::fidl_next::Transport>::SendBuffer:
10154 ::fidl_next::encoder::InternalHandleEncoder,
10155 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10156 {
10157 self.remove_extended_attribute_with(
10158 crate::generic::NodeRemoveExtendedAttributeRequest { name },
10159 )
10160 }
10161
10162 #[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.WRITE_BYTES`] right.\n"]
10163 pub fn remove_extended_attribute_with<___R>(
10164 &self,
10165 request: ___R,
10166 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
10167 where
10168 ___R: ::fidl_next::Encode<
10169 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
10170 <___T as ::fidl_next::Transport>::SendBuffer,
10171 >,
10172 {
10173 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10174 8794297771444732717,
10175 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
10176 request,
10177 ))
10178 }
10179
10180 #[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"]
10181 pub fn open(
10182 &self,
10183
10184 path: impl ::fidl_next::Encode<
10185 ::fidl_next::wire::String<'static>,
10186 <___T as ::fidl_next::Transport>::SendBuffer,
10187 >,
10188
10189 flags: impl ::fidl_next::Encode<
10190 crate::wire::Flags,
10191 <___T as ::fidl_next::Transport>::SendBuffer,
10192 >,
10193
10194 options: impl ::fidl_next::Encode<
10195 crate::wire::Options<'static>,
10196 <___T as ::fidl_next::Transport>::SendBuffer,
10197 >,
10198
10199 object: impl ::fidl_next::Encode<
10200 ::fidl_next::wire::fuchsia::Channel,
10201 <___T as ::fidl_next::Transport>::SendBuffer,
10202 >,
10203 ) -> ::fidl_next::SendFuture<'_, ___T>
10204 where
10205 <___T as ::fidl_next::Transport>::SendBuffer:
10206 ::fidl_next::encoder::InternalHandleEncoder,
10207 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10208 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10209 {
10210 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
10211 }
10212
10213 #[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"]
10214 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
10215 where
10216 ___R: ::fidl_next::Encode<
10217 crate::wire::OpenableOpenRequest<'static>,
10218 <___T as ::fidl_next::Transport>::SendBuffer,
10219 >,
10220 {
10221 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
10222 6236883748953765593,
10223 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
10224 request,
10225 ))
10226 }
10227
10228 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
10229 pub fn deprecated_open(
10230 &self,
10231
10232 flags: impl ::fidl_next::Encode<
10233 crate::wire::OpenFlags,
10234 <___T as ::fidl_next::Transport>::SendBuffer,
10235 >,
10236
10237 mode: impl ::fidl_next::Encode<
10238 crate::wire::ModeType,
10239 <___T as ::fidl_next::Transport>::SendBuffer,
10240 >,
10241
10242 path: impl ::fidl_next::Encode<
10243 ::fidl_next::wire::String<'static>,
10244 <___T as ::fidl_next::Transport>::SendBuffer,
10245 >,
10246
10247 object: impl ::fidl_next::Encode<
10248 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
10249 <___T as ::fidl_next::Transport>::SendBuffer,
10250 >,
10251 ) -> ::fidl_next::SendFuture<'_, ___T>
10252 where
10253 <___T as ::fidl_next::Transport>::SendBuffer:
10254 ::fidl_next::encoder::InternalHandleEncoder,
10255 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10256 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10257 {
10258 self.deprecated_open_with(crate::generic::DirectoryDeprecatedOpenRequest {
10259 flags,
10260
10261 mode,
10262
10263 path,
10264
10265 object,
10266 })
10267 }
10268
10269 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
10270 pub fn deprecated_open_with<___R>(
10271 &self,
10272 request: ___R,
10273 ) -> ::fidl_next::SendFuture<'_, ___T>
10274 where
10275 ___R: ::fidl_next::Encode<
10276 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
10277 <___T as ::fidl_next::Transport>::SendBuffer,
10278 >,
10279 {
10280 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
10281 3193127272456937152,
10282 <super::DeprecatedOpen as ::fidl_next::Method>::FLEXIBILITY,
10283 request,
10284 ))
10285 }
10286
10287 #[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"]
10288 pub fn read_dirents(
10289 &self,
10290
10291 max_bytes: impl ::fidl_next::Encode<
10292 ::fidl_next::wire::Uint64,
10293 <___T as ::fidl_next::Transport>::SendBuffer,
10294 >,
10295 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
10296 where
10297 <___T as ::fidl_next::Transport>::SendBuffer:
10298 ::fidl_next::encoder::InternalHandleEncoder,
10299 {
10300 self.read_dirents_with(crate::generic::DirectoryReadDirentsRequest { max_bytes })
10301 }
10302
10303 #[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"]
10304 pub fn read_dirents_with<___R>(
10305 &self,
10306 request: ___R,
10307 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
10308 where
10309 ___R: ::fidl_next::Encode<
10310 crate::wire::DirectoryReadDirentsRequest,
10311 <___T as ::fidl_next::Transport>::SendBuffer,
10312 >,
10313 {
10314 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10315 3855785432100874762,
10316 <super::ReadDirents as ::fidl_next::Method>::FLEXIBILITY,
10317 request,
10318 ))
10319 }
10320
10321 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
10322 pub fn rewind(&self) -> ::fidl_next::TwoWayFuture<'_, super::Rewind, ___T> {
10323 ::fidl_next::TwoWayFuture::from_untyped(
10324 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10325 1635123508515392625,
10326 <super::Rewind as ::fidl_next::Method>::FLEXIBILITY,
10327 (),
10328 ),
10329 )
10330 }
10331
10332 #[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"]
10333 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
10334 ::fidl_next::TwoWayFuture::from_untyped(
10335 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10336 2787337947777369685,
10337 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
10338 (),
10339 ),
10340 )
10341 }
10342
10343 #[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"]
10344 pub fn link(
10345 &self,
10346
10347 src: impl ::fidl_next::Encode<
10348 ::fidl_next::wire::String<'static>,
10349 <___T as ::fidl_next::Transport>::SendBuffer,
10350 >,
10351
10352 dst_parent_token: impl ::fidl_next::Encode<
10353 ::fidl_next::wire::fuchsia::NullableHandle,
10354 <___T as ::fidl_next::Transport>::SendBuffer,
10355 >,
10356
10357 dst: impl ::fidl_next::Encode<
10358 ::fidl_next::wire::String<'static>,
10359 <___T as ::fidl_next::Transport>::SendBuffer,
10360 >,
10361 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
10362 where
10363 <___T as ::fidl_next::Transport>::SendBuffer:
10364 ::fidl_next::encoder::InternalHandleEncoder,
10365 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10366 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10367 {
10368 self.link_with(crate::generic::DirectoryLinkRequest { src, dst_parent_token, dst })
10369 }
10370
10371 #[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"]
10372 pub fn link_with<___R>(
10373 &self,
10374 request: ___R,
10375 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
10376 where
10377 ___R: ::fidl_next::Encode<
10378 crate::wire::DirectoryLinkRequest<'static>,
10379 <___T as ::fidl_next::Transport>::SendBuffer,
10380 >,
10381 {
10382 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10383 8360374984291987687,
10384 <super::Link as ::fidl_next::Method>::FLEXIBILITY,
10385 request,
10386 ))
10387 }
10388
10389 #[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"]
10390 pub fn unlink(
10391 &self,
10392
10393 name: impl ::fidl_next::Encode<
10394 ::fidl_next::wire::String<'static>,
10395 <___T as ::fidl_next::Transport>::SendBuffer,
10396 >,
10397
10398 options: impl ::fidl_next::Encode<
10399 crate::wire::UnlinkOptions<'static>,
10400 <___T as ::fidl_next::Transport>::SendBuffer,
10401 >,
10402 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
10403 where
10404 <___T as ::fidl_next::Transport>::SendBuffer:
10405 ::fidl_next::encoder::InternalHandleEncoder,
10406 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10407 {
10408 self.unlink_with(crate::generic::DirectoryUnlinkRequest { name, options })
10409 }
10410
10411 #[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"]
10412 pub fn unlink_with<___R>(
10413 &self,
10414 request: ___R,
10415 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
10416 where
10417 ___R: ::fidl_next::Encode<
10418 crate::wire::DirectoryUnlinkRequest<'static>,
10419 <___T as ::fidl_next::Transport>::SendBuffer,
10420 >,
10421 {
10422 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10423 8433556716759383021,
10424 <super::Unlink as ::fidl_next::Method>::FLEXIBILITY,
10425 request,
10426 ))
10427 }
10428
10429 #[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"]
10430 pub fn rename(
10431 &self,
10432
10433 src: impl ::fidl_next::Encode<
10434 ::fidl_next::wire::String<'static>,
10435 <___T as ::fidl_next::Transport>::SendBuffer,
10436 >,
10437
10438 dst_parent_token: impl ::fidl_next::Encode<
10439 ::fidl_next::wire::fuchsia::Event,
10440 <___T as ::fidl_next::Transport>::SendBuffer,
10441 >,
10442
10443 dst: impl ::fidl_next::Encode<
10444 ::fidl_next::wire::String<'static>,
10445 <___T as ::fidl_next::Transport>::SendBuffer,
10446 >,
10447 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
10448 where
10449 <___T as ::fidl_next::Transport>::SendBuffer:
10450 ::fidl_next::encoder::InternalHandleEncoder,
10451 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10452 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10453 {
10454 self.rename_with(crate::generic::DirectoryRenameRequest {
10455 src,
10456
10457 dst_parent_token,
10458
10459 dst,
10460 })
10461 }
10462
10463 #[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"]
10464 pub fn rename_with<___R>(
10465 &self,
10466 request: ___R,
10467 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
10468 where
10469 ___R: ::fidl_next::Encode<
10470 crate::wire::DirectoryRenameRequest<'static>,
10471 <___T as ::fidl_next::Transport>::SendBuffer,
10472 >,
10473 {
10474 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10475 8097726607824333022,
10476 <super::Rename as ::fidl_next::Method>::FLEXIBILITY,
10477 request,
10478 ))
10479 }
10480
10481 #[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"]
10482 pub fn create_symlink(
10483 &self,
10484
10485 name: impl ::fidl_next::Encode<
10486 ::fidl_next::wire::String<'static>,
10487 <___T as ::fidl_next::Transport>::SendBuffer,
10488 >,
10489
10490 target: impl ::fidl_next::Encode<
10491 ::fidl_next::wire::Vector<'static, u8>,
10492 <___T as ::fidl_next::Transport>::SendBuffer,
10493 >,
10494
10495 connection: impl ::fidl_next::Encode<
10496 ::fidl_next::ServerEnd<
10497 crate::Symlink,
10498 ::fidl_next::wire::fuchsia::OptionalChannel,
10499 >,
10500 <___T as ::fidl_next::Transport>::SendBuffer,
10501 >,
10502 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
10503 where
10504 <___T as ::fidl_next::Transport>::SendBuffer:
10505 ::fidl_next::encoder::InternalHandleEncoder,
10506 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10507 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10508 {
10509 self.create_symlink_with(crate::generic::DirectoryCreateSymlinkRequest {
10510 name,
10511
10512 target,
10513
10514 connection,
10515 })
10516 }
10517
10518 #[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"]
10519 pub fn create_symlink_with<___R>(
10520 &self,
10521 request: ___R,
10522 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
10523 where
10524 ___R: ::fidl_next::Encode<
10525 crate::wire::DirectoryCreateSymlinkRequest<'static>,
10526 <___T as ::fidl_next::Transport>::SendBuffer,
10527 >,
10528 {
10529 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10530 2435901052462315657,
10531 <super::CreateSymlink as ::fidl_next::Method>::FLEXIBILITY,
10532 request,
10533 ))
10534 }
10535
10536 #[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"]
10537 pub fn watch(
10538 &self,
10539
10540 mask: impl ::fidl_next::Encode<
10541 crate::wire::WatchMask,
10542 <___T as ::fidl_next::Transport>::SendBuffer,
10543 >,
10544
10545 options: impl ::fidl_next::Encode<
10546 ::fidl_next::wire::Uint32,
10547 <___T as ::fidl_next::Transport>::SendBuffer,
10548 >,
10549
10550 watcher: impl ::fidl_next::Encode<
10551 ::fidl_next::ServerEnd<
10552 crate::DirectoryWatcher,
10553 ::fidl_next::wire::fuchsia::Channel,
10554 >,
10555 <___T as ::fidl_next::Transport>::SendBuffer,
10556 >,
10557 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
10558 where
10559 <___T as ::fidl_next::Transport>::SendBuffer:
10560 ::fidl_next::encoder::InternalHandleEncoder,
10561 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10562 {
10563 self.watch_with(crate::generic::DirectoryWatchRequest { mask, options, watcher })
10564 }
10565
10566 #[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"]
10567 pub fn watch_with<___R>(
10568 &self,
10569 request: ___R,
10570 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
10571 where
10572 ___R: ::fidl_next::Encode<
10573 crate::wire::DirectoryWatchRequest,
10574 <___T as ::fidl_next::Transport>::SendBuffer,
10575 >,
10576 {
10577 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10578 6275512344170098065,
10579 <super::Watch as ::fidl_next::Method>::FLEXIBILITY,
10580 request,
10581 ))
10582 }
10583 }
10584
10585 #[repr(transparent)]
10587 pub struct DirectoryServer<___T: ::fidl_next::Transport> {
10588 server: ::fidl_next::protocol::Server<___T>,
10589 }
10590
10591 impl<___T> DirectoryServer<___T>
10592 where
10593 ___T: ::fidl_next::Transport,
10594 {
10595 #[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"]
10596 pub fn on_open(
10597 &self,
10598
10599 s: impl ::fidl_next::Encode<
10600 ::fidl_next::wire::fuchsia::Status,
10601 <___T as ::fidl_next::Transport>::SendBuffer,
10602 >,
10603
10604 info: impl ::fidl_next::Encode<
10605 crate::wire_optional::NodeInfoDeprecated<'static>,
10606 <___T as ::fidl_next::Transport>::SendBuffer,
10607 >,
10608 ) -> ::fidl_next::SendFuture<'_, ___T>
10609 where
10610 <___T as ::fidl_next::Transport>::SendBuffer:
10611 ::fidl_next::encoder::InternalHandleEncoder,
10612 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10613 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10614 {
10615 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
10616 }
10617
10618 #[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"]
10619
10620 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
10621 where
10622 ___R: ::fidl_next::Encode<
10623 <super::OnOpen as ::fidl_next::Method>::Request,
10624 <___T as ::fidl_next::Transport>::SendBuffer,
10625 >,
10626 {
10627 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
10628 9207534335756671346,
10629 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
10630 request,
10631 ))
10632 }
10633
10634 #[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"]
10635
10636 pub fn on_representation_with<___R>(
10637 &self,
10638 request: ___R,
10639 ) -> ::fidl_next::SendFuture<'_, ___T>
10640 where
10641 ___R: ::fidl_next::Encode<
10642 <super::OnRepresentation as ::fidl_next::Method>::Request,
10643 <___T as ::fidl_next::Transport>::SendBuffer,
10644 >,
10645 {
10646 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
10647 6679970090861613324,
10648 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
10649 request,
10650 ))
10651 }
10652 }
10653 }
10654}
10655
10656#[diagnostic::on_unimplemented(
10657 note = "If {Self} implements the non-local DirectoryClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
10658)]
10659
10660pub trait DirectoryLocalClientHandler<
10664 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10665 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10666>
10667{
10668 #[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"]
10669 fn on_open(
10670 &mut self,
10671
10672 request: ::fidl_next::Request<directory::OnOpen, ___T>,
10673 ) -> impl ::core::future::Future<Output = ()>;
10674
10675 #[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"]
10676 fn on_representation(
10677 &mut self,
10678
10679 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
10680 ) -> impl ::core::future::Future<Output = ()>;
10681
10682 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10683 ::core::future::ready(())
10684 }
10685}
10686
10687impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Directory
10688where
10689 ___H: DirectoryLocalClientHandler<___T>,
10690 ___T: ::fidl_next::Transport,
10691 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
10692 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10693 Constraint = (),
10694 >,
10695 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
10696 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10697 Constraint = (),
10698 >,
10699{
10700 async fn on_event(
10701 handler: &mut ___H,
10702 mut message: ::fidl_next::Message<___T>,
10703 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10704 match *message.header().ordinal {
10705 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
10706 Ok(decoded) => {
10707 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
10708 Ok(())
10709 }
10710 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10711 ordinal: 9207534335756671346,
10712 error,
10713 }),
10714 },
10715
10716 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
10717 Ok(decoded) => {
10718 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
10719 Ok(())
10720 }
10721 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10722 ordinal: 6679970090861613324,
10723 error,
10724 }),
10725 },
10726
10727 ordinal => {
10728 handler.on_unknown_interaction(ordinal).await;
10729 if ::core::matches!(
10730 message.header().flexibility(),
10731 ::fidl_next::protocol::Flexibility::Strict
10732 ) {
10733 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10734 } else {
10735 Ok(())
10736 }
10737 }
10738 }
10739 }
10740}
10741
10742#[diagnostic::on_unimplemented(
10743 note = "If {Self} implements the non-local DirectoryServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
10744)]
10745
10746pub trait DirectoryLocalServerHandler<
10750 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10751 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10752>
10753{
10754 #[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"]
10755 fn advisory_lock(
10756 &mut self,
10757
10758 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
10759
10760 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
10761 ) -> impl ::core::future::Future<Output = ()>;
10762
10763 fn clone(
10764 &mut self,
10765
10766 request: ::fidl_next::Request<directory::Clone, ___T>,
10767 ) -> impl ::core::future::Future<Output = ()>;
10768
10769 #[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"]
10770 fn close(
10771 &mut self,
10772
10773 responder: ::fidl_next::Responder<directory::Close, ___T>,
10774 ) -> impl ::core::future::Future<Output = ()>;
10775
10776 fn query(
10777 &mut self,
10778
10779 responder: ::fidl_next::Responder<directory::Query, ___T>,
10780 ) -> impl ::core::future::Future<Output = ()>;
10781
10782 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
10783 fn deprecated_clone(
10784 &mut self,
10785
10786 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
10787 ) -> impl ::core::future::Future<Output = ()>;
10788
10789 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
10790 fn deprecated_get_attr(
10791 &mut self,
10792
10793 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
10794 ) -> impl ::core::future::Future<Output = ()>;
10795
10796 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
10797 fn deprecated_set_attr(
10798 &mut self,
10799
10800 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
10801
10802 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
10803 ) -> impl ::core::future::Future<Output = ()>;
10804
10805 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
10806 fn deprecated_get_flags(
10807 &mut self,
10808
10809 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
10810 ) -> impl ::core::future::Future<Output = ()>;
10811
10812 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
10813 fn deprecated_set_flags(
10814 &mut self,
10815
10816 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
10817
10818 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
10819 ) -> impl ::core::future::Future<Output = ()>;
10820
10821 #[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"]
10822 fn get_flags(
10823 &mut self,
10824
10825 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
10826 ) -> impl ::core::future::Future<Output = ()>;
10827
10828 #[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"]
10829 fn set_flags(
10830 &mut self,
10831
10832 request: ::fidl_next::Request<directory::SetFlags, ___T>,
10833
10834 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
10835 ) -> impl ::core::future::Future<Output = ()>;
10836
10837 #[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"]
10838 fn query_filesystem(
10839 &mut self,
10840
10841 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
10842 ) -> impl ::core::future::Future<Output = ()>;
10843
10844 #[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"]
10845 fn get_attributes(
10846 &mut self,
10847
10848 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
10849
10850 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
10851 ) -> impl ::core::future::Future<Output = ()>;
10852
10853 #[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"]
10854 fn update_attributes(
10855 &mut self,
10856
10857 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
10858
10859 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
10860 ) -> impl ::core::future::Future<Output = ()>;
10861
10862 #[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"]
10863 fn sync(
10864 &mut self,
10865
10866 responder: ::fidl_next::Responder<directory::Sync, ___T>,
10867 ) -> impl ::core::future::Future<Output = ()>;
10868
10869 #[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.READ_BYTES`] right.\n"]
10870 fn list_extended_attributes(
10871 &mut self,
10872
10873 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
10874 ) -> impl ::core::future::Future<Output = ()>;
10875
10876 #[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.READ_BYTES`] right.\n"]
10877 fn get_extended_attribute(
10878 &mut self,
10879
10880 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
10881
10882 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
10883 ) -> impl ::core::future::Future<Output = ()>;
10884
10885 #[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.WRITE_BYTES`] right.\n"]
10886 fn set_extended_attribute(
10887 &mut self,
10888
10889 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
10890
10891 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
10892 ) -> impl ::core::future::Future<Output = ()>;
10893
10894 #[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.WRITE_BYTES`] right.\n"]
10895 fn remove_extended_attribute(
10896 &mut self,
10897
10898 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
10899
10900 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
10901 ) -> impl ::core::future::Future<Output = ()>;
10902
10903 #[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"]
10904 fn open(
10905 &mut self,
10906
10907 request: ::fidl_next::Request<directory::Open, ___T>,
10908 ) -> impl ::core::future::Future<Output = ()>;
10909
10910 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
10911 fn deprecated_open(
10912 &mut self,
10913
10914 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
10915 ) -> impl ::core::future::Future<Output = ()>;
10916
10917 #[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"]
10918 fn read_dirents(
10919 &mut self,
10920
10921 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
10922
10923 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
10924 ) -> impl ::core::future::Future<Output = ()>;
10925
10926 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
10927 fn rewind(
10928 &mut self,
10929
10930 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
10931 ) -> impl ::core::future::Future<Output = ()>;
10932
10933 #[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"]
10934 fn get_token(
10935 &mut self,
10936
10937 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
10938 ) -> impl ::core::future::Future<Output = ()>;
10939
10940 #[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"]
10941 fn link(
10942 &mut self,
10943
10944 request: ::fidl_next::Request<directory::Link, ___T>,
10945
10946 responder: ::fidl_next::Responder<directory::Link, ___T>,
10947 ) -> impl ::core::future::Future<Output = ()>;
10948
10949 #[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"]
10950 fn unlink(
10951 &mut self,
10952
10953 request: ::fidl_next::Request<directory::Unlink, ___T>,
10954
10955 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
10956 ) -> impl ::core::future::Future<Output = ()>;
10957
10958 #[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"]
10959 fn rename(
10960 &mut self,
10961
10962 request: ::fidl_next::Request<directory::Rename, ___T>,
10963
10964 responder: ::fidl_next::Responder<directory::Rename, ___T>,
10965 ) -> impl ::core::future::Future<Output = ()>;
10966
10967 #[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"]
10968 fn create_symlink(
10969 &mut self,
10970
10971 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
10972
10973 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
10974 ) -> impl ::core::future::Future<Output = ()>;
10975
10976 #[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"]
10977 fn watch(
10978 &mut self,
10979
10980 request: ::fidl_next::Request<directory::Watch, ___T>,
10981
10982 responder: ::fidl_next::Responder<directory::Watch, ___T>,
10983 ) -> impl ::core::future::Future<Output = ()>;
10984
10985 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10986 ::core::future::ready(())
10987 }
10988}
10989
10990impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Directory
10991where
10992 ___H: DirectoryLocalServerHandler<___T>,
10993 ___T: ::fidl_next::Transport,
10994 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
10995 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10996 Constraint = (),
10997 >,
10998 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
10999 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11000 Constraint = (),
11001 >,
11002 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
11003 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11004 Constraint = (),
11005 >,
11006 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
11007 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11008 Constraint = (),
11009 >,
11010 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
11011 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11012 Constraint = (),
11013 >,
11014 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
11015 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11016 Constraint = (),
11017 >,
11018 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
11019 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11020 Constraint = (),
11021 >,
11022 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
11023 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11024 Constraint = (),
11025 >,
11026 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
11027 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11028 Constraint = (),
11029 >,
11030 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11031 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11032 Constraint = (),
11033 >,
11034 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11035 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11036 Constraint = (),
11037 >,
11038 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11039 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11040 Constraint = (),
11041 >,
11042 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
11043 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11044 Constraint = (),
11045 >,
11046 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
11047 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11048 Constraint = (),
11049 >,
11050 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
11051 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11052 Constraint = (),
11053 >,
11054 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
11055 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11056 Constraint = (),
11057 >,
11058 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
11059 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11060 Constraint = (),
11061 >,
11062 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
11063 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11064 Constraint = (),
11065 >,
11066 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
11067 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11068 Constraint = (),
11069 >,
11070 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
11071 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11072 Constraint = (),
11073 >,
11074{
11075 async fn on_one_way(
11076 handler: &mut ___H,
11077 mut message: ::fidl_next::Message<___T>,
11078 ) -> ::core::result::Result<
11079 (),
11080 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11081 > {
11082 match *message.header().ordinal {
11083 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11084 Ok(decoded) => {
11085 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
11086 Ok(())
11087 }
11088 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11089 ordinal: 2366825959783828089,
11090 error,
11091 }),
11092 },
11093
11094 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11095 Ok(decoded) => {
11096 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
11097 Ok(())
11098 }
11099 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11100 ordinal: 6512600400724287855,
11101 error,
11102 }),
11103 },
11104
11105 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11106 Ok(decoded) => {
11107 handler
11108 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
11109 .await;
11110 Ok(())
11111 }
11112 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11113 ordinal: 5431626189872037072,
11114 error,
11115 }),
11116 },
11117
11118 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11119 Ok(decoded) => {
11120 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
11121 Ok(())
11122 }
11123 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11124 ordinal: 6236883748953765593,
11125 error,
11126 }),
11127 },
11128
11129 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11130 Ok(decoded) => {
11131 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
11132 Ok(())
11133 }
11134 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11135 ordinal: 3193127272456937152,
11136 error,
11137 }),
11138 },
11139
11140 ordinal => {
11141 handler.on_unknown_interaction(ordinal).await;
11142 if ::core::matches!(
11143 message.header().flexibility(),
11144 ::fidl_next::protocol::Flexibility::Strict
11145 ) {
11146 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11147 } else {
11148 Ok(())
11149 }
11150 }
11151 }
11152 }
11153
11154 async fn on_two_way(
11155 handler: &mut ___H,
11156 mut message: ::fidl_next::Message<___T>,
11157 responder: ::fidl_next::protocol::Responder<___T>,
11158 ) -> ::core::result::Result<
11159 (),
11160 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11161 > {
11162 match *message.header().ordinal {
11163 7992130864415541162 => {
11164 let responder = ::fidl_next::Responder::from_untyped(responder);
11165
11166 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11167 Ok(decoded) => {
11168 handler
11169 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
11170 .await;
11171 Ok(())
11172 }
11173 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11174 ordinal: 7992130864415541162,
11175 error,
11176 }),
11177 }
11178 }
11179
11180 6540867515453498750 => {
11181 let responder = ::fidl_next::Responder::from_untyped(responder);
11182
11183 handler.close(responder).await;
11184 Ok(())
11185 }
11186
11187 2763219980499352582 => {
11188 let responder = ::fidl_next::Responder::from_untyped(responder);
11189
11190 handler.query(responder).await;
11191 Ok(())
11192 }
11193
11194 8689798978500614909 => {
11195 let responder = ::fidl_next::Responder::from_untyped(responder);
11196
11197 handler.deprecated_get_attr(responder).await;
11198 Ok(())
11199 }
11200
11201 4721673413776871238 => {
11202 let responder = ::fidl_next::Responder::from_untyped(responder);
11203
11204 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11205 Ok(decoded) => {
11206 handler
11207 .deprecated_set_attr(
11208 ::fidl_next::Request::from_decoded(decoded),
11209 responder,
11210 )
11211 .await;
11212 Ok(())
11213 }
11214 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11215 ordinal: 4721673413776871238,
11216 error,
11217 }),
11218 }
11219 }
11220
11221 6595803110182632097 => {
11222 let responder = ::fidl_next::Responder::from_untyped(responder);
11223
11224 handler.deprecated_get_flags(responder).await;
11225 Ok(())
11226 }
11227
11228 5950864159036794675 => {
11229 let responder = ::fidl_next::Responder::from_untyped(responder);
11230
11231 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11232 Ok(decoded) => {
11233 handler
11234 .deprecated_set_flags(
11235 ::fidl_next::Request::from_decoded(decoded),
11236 responder,
11237 )
11238 .await;
11239 Ok(())
11240 }
11241 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11242 ordinal: 5950864159036794675,
11243 error,
11244 }),
11245 }
11246 }
11247
11248 105530239381466147 => {
11249 let responder = ::fidl_next::Responder::from_untyped(responder);
11250
11251 handler.get_flags(responder).await;
11252 Ok(())
11253 }
11254
11255 6172186066099445416 => {
11256 let responder = ::fidl_next::Responder::from_untyped(responder);
11257
11258 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11259 Ok(decoded) => {
11260 handler
11261 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
11262 .await;
11263 Ok(())
11264 }
11265 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11266 ordinal: 6172186066099445416,
11267 error,
11268 }),
11269 }
11270 }
11271
11272 8013111122914313744 => {
11273 let responder = ::fidl_next::Responder::from_untyped(responder);
11274
11275 handler.query_filesystem(responder).await;
11276 Ok(())
11277 }
11278
11279 4414537700416816443 => {
11280 let responder = ::fidl_next::Responder::from_untyped(responder);
11281
11282 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11283 Ok(decoded) => {
11284 handler
11285 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
11286 .await;
11287 Ok(())
11288 }
11289 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11290 ordinal: 4414537700416816443,
11291 error,
11292 }),
11293 }
11294 }
11295
11296 3677402239314018056 => {
11297 let responder = ::fidl_next::Responder::from_untyped(responder);
11298
11299 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11300 Ok(decoded) => {
11301 handler
11302 .update_attributes(
11303 ::fidl_next::Request::from_decoded(decoded),
11304 responder,
11305 )
11306 .await;
11307 Ok(())
11308 }
11309 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11310 ordinal: 3677402239314018056,
11311 error,
11312 }),
11313 }
11314 }
11315
11316 3196473584242777161 => {
11317 let responder = ::fidl_next::Responder::from_untyped(responder);
11318
11319 handler.sync(responder).await;
11320 Ok(())
11321 }
11322
11323 5043930208506967771 => {
11324 let responder = ::fidl_next::Responder::from_untyped(responder);
11325
11326 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11327 Ok(decoded) => {
11328 handler
11329 .get_extended_attribute(
11330 ::fidl_next::Request::from_decoded(decoded),
11331 responder,
11332 )
11333 .await;
11334 Ok(())
11335 }
11336 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11337 ordinal: 5043930208506967771,
11338 error,
11339 }),
11340 }
11341 }
11342
11343 5374223046099989052 => {
11344 let responder = ::fidl_next::Responder::from_untyped(responder);
11345
11346 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11347 Ok(decoded) => {
11348 handler
11349 .set_extended_attribute(
11350 ::fidl_next::Request::from_decoded(decoded),
11351 responder,
11352 )
11353 .await;
11354 Ok(())
11355 }
11356 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11357 ordinal: 5374223046099989052,
11358 error,
11359 }),
11360 }
11361 }
11362
11363 8794297771444732717 => {
11364 let responder = ::fidl_next::Responder::from_untyped(responder);
11365
11366 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11367 Ok(decoded) => {
11368 handler
11369 .remove_extended_attribute(
11370 ::fidl_next::Request::from_decoded(decoded),
11371 responder,
11372 )
11373 .await;
11374 Ok(())
11375 }
11376 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11377 ordinal: 8794297771444732717,
11378 error,
11379 }),
11380 }
11381 }
11382
11383 3855785432100874762 => {
11384 let responder = ::fidl_next::Responder::from_untyped(responder);
11385
11386 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11387 Ok(decoded) => {
11388 handler
11389 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
11390 .await;
11391 Ok(())
11392 }
11393 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11394 ordinal: 3855785432100874762,
11395 error,
11396 }),
11397 }
11398 }
11399
11400 1635123508515392625 => {
11401 let responder = ::fidl_next::Responder::from_untyped(responder);
11402
11403 handler.rewind(responder).await;
11404 Ok(())
11405 }
11406
11407 2787337947777369685 => {
11408 let responder = ::fidl_next::Responder::from_untyped(responder);
11409
11410 handler.get_token(responder).await;
11411 Ok(())
11412 }
11413
11414 8360374984291987687 => {
11415 let responder = ::fidl_next::Responder::from_untyped(responder);
11416
11417 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11418 Ok(decoded) => {
11419 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
11420 Ok(())
11421 }
11422 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11423 ordinal: 8360374984291987687,
11424 error,
11425 }),
11426 }
11427 }
11428
11429 8433556716759383021 => {
11430 let responder = ::fidl_next::Responder::from_untyped(responder);
11431
11432 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11433 Ok(decoded) => {
11434 handler
11435 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
11436 .await;
11437 Ok(())
11438 }
11439 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11440 ordinal: 8433556716759383021,
11441 error,
11442 }),
11443 }
11444 }
11445
11446 8097726607824333022 => {
11447 let responder = ::fidl_next::Responder::from_untyped(responder);
11448
11449 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11450 Ok(decoded) => {
11451 handler
11452 .rename(::fidl_next::Request::from_decoded(decoded), responder)
11453 .await;
11454 Ok(())
11455 }
11456 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11457 ordinal: 8097726607824333022,
11458 error,
11459 }),
11460 }
11461 }
11462
11463 2435901052462315657 => {
11464 let responder = ::fidl_next::Responder::from_untyped(responder);
11465
11466 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11467 Ok(decoded) => {
11468 handler
11469 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
11470 .await;
11471 Ok(())
11472 }
11473 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11474 ordinal: 2435901052462315657,
11475 error,
11476 }),
11477 }
11478 }
11479
11480 6275512344170098065 => {
11481 let responder = ::fidl_next::Responder::from_untyped(responder);
11482
11483 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11484 Ok(decoded) => {
11485 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
11486 Ok(())
11487 }
11488 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11489 ordinal: 6275512344170098065,
11490 error,
11491 }),
11492 }
11493 }
11494
11495 ordinal => {
11496 handler.on_unknown_interaction(ordinal).await;
11497 if ::core::matches!(
11498 message.header().flexibility(),
11499 ::fidl_next::protocol::Flexibility::Strict
11500 ) {
11501 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11502 } else {
11503 responder
11504 .respond_framework_error(
11505 ordinal,
11506 ::fidl_next::FrameworkError::UnknownMethod,
11507 )
11508 .expect("encoding a framework error should never fail")
11509 .await?;
11510 Ok(())
11511 }
11512 }
11513 }
11514 }
11515}
11516
11517pub trait DirectoryClientHandler<
11521 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11522 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11523>
11524{
11525 #[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"]
11526 fn on_open(
11527 &mut self,
11528
11529 request: ::fidl_next::Request<directory::OnOpen, ___T>,
11530 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11531
11532 #[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"]
11533 fn on_representation(
11534 &mut self,
11535
11536 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
11537 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11538
11539 fn on_unknown_interaction(
11540 &mut self,
11541 ordinal: u64,
11542 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11543 ::core::future::ready(())
11544 }
11545}
11546
11547impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Directory
11548where
11549 ___H: DirectoryClientHandler<___T> + ::core::marker::Send,
11550 ___T: ::fidl_next::Transport,
11551 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
11552 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11553 Constraint = (),
11554 >,
11555 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
11556 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11557 Constraint = (),
11558 >,
11559{
11560 async fn on_event(
11561 handler: &mut ___H,
11562 mut message: ::fidl_next::Message<___T>,
11563 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11564 match *message.header().ordinal {
11565 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11566 Ok(decoded) => {
11567 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
11568 Ok(())
11569 }
11570 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11571 ordinal: 9207534335756671346,
11572 error,
11573 }),
11574 },
11575
11576 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11577 Ok(decoded) => {
11578 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
11579 Ok(())
11580 }
11581 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11582 ordinal: 6679970090861613324,
11583 error,
11584 }),
11585 },
11586
11587 ordinal => {
11588 handler.on_unknown_interaction(ordinal).await;
11589 if ::core::matches!(
11590 message.header().flexibility(),
11591 ::fidl_next::protocol::Flexibility::Strict
11592 ) {
11593 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11594 } else {
11595 Ok(())
11596 }
11597 }
11598 }
11599 }
11600}
11601
11602pub trait DirectoryServerHandler<
11606 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11607 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11608>
11609{
11610 #[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"]
11611 fn advisory_lock(
11612 &mut self,
11613
11614 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
11615
11616 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
11617 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11618
11619 fn clone(
11620 &mut self,
11621
11622 request: ::fidl_next::Request<directory::Clone, ___T>,
11623 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11624
11625 #[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"]
11626 fn close(
11627 &mut self,
11628
11629 responder: ::fidl_next::Responder<directory::Close, ___T>,
11630 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11631
11632 fn query(
11633 &mut self,
11634
11635 responder: ::fidl_next::Responder<directory::Query, ___T>,
11636 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11637
11638 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11639 fn deprecated_clone(
11640 &mut self,
11641
11642 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
11643 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11644
11645 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
11646 fn deprecated_get_attr(
11647 &mut self,
11648
11649 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
11650 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11651
11652 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
11653 fn deprecated_set_attr(
11654 &mut self,
11655
11656 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
11657
11658 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
11659 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11660
11661 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
11662 fn deprecated_get_flags(
11663 &mut self,
11664
11665 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
11666 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11667
11668 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11669 fn deprecated_set_flags(
11670 &mut self,
11671
11672 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
11673
11674 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
11675 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11676
11677 #[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"]
11678 fn get_flags(
11679 &mut self,
11680
11681 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
11682 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11683
11684 #[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"]
11685 fn set_flags(
11686 &mut self,
11687
11688 request: ::fidl_next::Request<directory::SetFlags, ___T>,
11689
11690 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
11691 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11692
11693 #[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"]
11694 fn query_filesystem(
11695 &mut self,
11696
11697 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
11698 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11699
11700 #[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"]
11701 fn get_attributes(
11702 &mut self,
11703
11704 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
11705
11706 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
11707 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11708
11709 #[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"]
11710 fn update_attributes(
11711 &mut self,
11712
11713 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
11714
11715 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
11716 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11717
11718 #[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"]
11719 fn sync(
11720 &mut self,
11721
11722 responder: ::fidl_next::Responder<directory::Sync, ___T>,
11723 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11724
11725 #[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.READ_BYTES`] right.\n"]
11726 fn list_extended_attributes(
11727 &mut self,
11728
11729 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
11730 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11731
11732 #[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.READ_BYTES`] right.\n"]
11733 fn get_extended_attribute(
11734 &mut self,
11735
11736 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
11737
11738 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
11739 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11740
11741 #[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.WRITE_BYTES`] right.\n"]
11742 fn set_extended_attribute(
11743 &mut self,
11744
11745 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
11746
11747 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
11748 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11749
11750 #[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.WRITE_BYTES`] right.\n"]
11751 fn remove_extended_attribute(
11752 &mut self,
11753
11754 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
11755
11756 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
11757 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11758
11759 #[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"]
11760 fn open(
11761 &mut self,
11762
11763 request: ::fidl_next::Request<directory::Open, ___T>,
11764 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11765
11766 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
11767 fn deprecated_open(
11768 &mut self,
11769
11770 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
11771 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11772
11773 #[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"]
11774 fn read_dirents(
11775 &mut self,
11776
11777 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
11778
11779 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
11780 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11781
11782 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
11783 fn rewind(
11784 &mut self,
11785
11786 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
11787 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11788
11789 #[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"]
11790 fn get_token(
11791 &mut self,
11792
11793 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
11794 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11795
11796 #[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"]
11797 fn link(
11798 &mut self,
11799
11800 request: ::fidl_next::Request<directory::Link, ___T>,
11801
11802 responder: ::fidl_next::Responder<directory::Link, ___T>,
11803 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11804
11805 #[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"]
11806 fn unlink(
11807 &mut self,
11808
11809 request: ::fidl_next::Request<directory::Unlink, ___T>,
11810
11811 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
11812 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11813
11814 #[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"]
11815 fn rename(
11816 &mut self,
11817
11818 request: ::fidl_next::Request<directory::Rename, ___T>,
11819
11820 responder: ::fidl_next::Responder<directory::Rename, ___T>,
11821 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11822
11823 #[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"]
11824 fn create_symlink(
11825 &mut self,
11826
11827 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
11828
11829 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
11830 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11831
11832 #[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"]
11833 fn watch(
11834 &mut self,
11835
11836 request: ::fidl_next::Request<directory::Watch, ___T>,
11837
11838 responder: ::fidl_next::Responder<directory::Watch, ___T>,
11839 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11840
11841 fn on_unknown_interaction(
11842 &mut self,
11843 ordinal: u64,
11844 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11845 ::core::future::ready(())
11846 }
11847}
11848
11849impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Directory
11850where
11851 ___H: DirectoryServerHandler<___T> + ::core::marker::Send,
11852 ___T: ::fidl_next::Transport,
11853 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
11854 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11855 Constraint = (),
11856 >,
11857 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
11858 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11859 Constraint = (),
11860 >,
11861 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
11862 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11863 Constraint = (),
11864 >,
11865 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
11866 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11867 Constraint = (),
11868 >,
11869 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
11870 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11871 Constraint = (),
11872 >,
11873 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
11874 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11875 Constraint = (),
11876 >,
11877 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
11878 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11879 Constraint = (),
11880 >,
11881 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
11882 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11883 Constraint = (),
11884 >,
11885 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
11886 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11887 Constraint = (),
11888 >,
11889 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11890 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11891 Constraint = (),
11892 >,
11893 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11894 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11895 Constraint = (),
11896 >,
11897 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11898 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11899 Constraint = (),
11900 >,
11901 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
11902 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11903 Constraint = (),
11904 >,
11905 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
11906 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11907 Constraint = (),
11908 >,
11909 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
11910 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11911 Constraint = (),
11912 >,
11913 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
11914 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11915 Constraint = (),
11916 >,
11917 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
11918 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11919 Constraint = (),
11920 >,
11921 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
11922 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11923 Constraint = (),
11924 >,
11925 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
11926 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11927 Constraint = (),
11928 >,
11929 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
11930 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11931 Constraint = (),
11932 >,
11933{
11934 async fn on_one_way(
11935 handler: &mut ___H,
11936 mut message: ::fidl_next::Message<___T>,
11937 ) -> ::core::result::Result<
11938 (),
11939 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11940 > {
11941 match *message.header().ordinal {
11942 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11943 Ok(decoded) => {
11944 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
11945 Ok(())
11946 }
11947 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11948 ordinal: 2366825959783828089,
11949 error,
11950 }),
11951 },
11952
11953 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11954 Ok(decoded) => {
11955 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
11956 Ok(())
11957 }
11958 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11959 ordinal: 6512600400724287855,
11960 error,
11961 }),
11962 },
11963
11964 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11965 Ok(decoded) => {
11966 handler
11967 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
11968 .await;
11969 Ok(())
11970 }
11971 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11972 ordinal: 5431626189872037072,
11973 error,
11974 }),
11975 },
11976
11977 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11978 Ok(decoded) => {
11979 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
11980 Ok(())
11981 }
11982 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11983 ordinal: 6236883748953765593,
11984 error,
11985 }),
11986 },
11987
11988 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11989 Ok(decoded) => {
11990 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
11991 Ok(())
11992 }
11993 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11994 ordinal: 3193127272456937152,
11995 error,
11996 }),
11997 },
11998
11999 ordinal => {
12000 handler.on_unknown_interaction(ordinal).await;
12001 if ::core::matches!(
12002 message.header().flexibility(),
12003 ::fidl_next::protocol::Flexibility::Strict
12004 ) {
12005 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12006 } else {
12007 Ok(())
12008 }
12009 }
12010 }
12011 }
12012
12013 async fn on_two_way(
12014 handler: &mut ___H,
12015 mut message: ::fidl_next::Message<___T>,
12016 responder: ::fidl_next::protocol::Responder<___T>,
12017 ) -> ::core::result::Result<
12018 (),
12019 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12020 > {
12021 match *message.header().ordinal {
12022 7992130864415541162 => {
12023 let responder = ::fidl_next::Responder::from_untyped(responder);
12024
12025 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12026 Ok(decoded) => {
12027 handler
12028 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
12029 .await;
12030 Ok(())
12031 }
12032 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12033 ordinal: 7992130864415541162,
12034 error,
12035 }),
12036 }
12037 }
12038
12039 6540867515453498750 => {
12040 let responder = ::fidl_next::Responder::from_untyped(responder);
12041
12042 handler.close(responder).await;
12043 Ok(())
12044 }
12045
12046 2763219980499352582 => {
12047 let responder = ::fidl_next::Responder::from_untyped(responder);
12048
12049 handler.query(responder).await;
12050 Ok(())
12051 }
12052
12053 8689798978500614909 => {
12054 let responder = ::fidl_next::Responder::from_untyped(responder);
12055
12056 handler.deprecated_get_attr(responder).await;
12057 Ok(())
12058 }
12059
12060 4721673413776871238 => {
12061 let responder = ::fidl_next::Responder::from_untyped(responder);
12062
12063 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12064 Ok(decoded) => {
12065 handler
12066 .deprecated_set_attr(
12067 ::fidl_next::Request::from_decoded(decoded),
12068 responder,
12069 )
12070 .await;
12071 Ok(())
12072 }
12073 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12074 ordinal: 4721673413776871238,
12075 error,
12076 }),
12077 }
12078 }
12079
12080 6595803110182632097 => {
12081 let responder = ::fidl_next::Responder::from_untyped(responder);
12082
12083 handler.deprecated_get_flags(responder).await;
12084 Ok(())
12085 }
12086
12087 5950864159036794675 => {
12088 let responder = ::fidl_next::Responder::from_untyped(responder);
12089
12090 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12091 Ok(decoded) => {
12092 handler
12093 .deprecated_set_flags(
12094 ::fidl_next::Request::from_decoded(decoded),
12095 responder,
12096 )
12097 .await;
12098 Ok(())
12099 }
12100 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12101 ordinal: 5950864159036794675,
12102 error,
12103 }),
12104 }
12105 }
12106
12107 105530239381466147 => {
12108 let responder = ::fidl_next::Responder::from_untyped(responder);
12109
12110 handler.get_flags(responder).await;
12111 Ok(())
12112 }
12113
12114 6172186066099445416 => {
12115 let responder = ::fidl_next::Responder::from_untyped(responder);
12116
12117 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12118 Ok(decoded) => {
12119 handler
12120 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
12121 .await;
12122 Ok(())
12123 }
12124 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12125 ordinal: 6172186066099445416,
12126 error,
12127 }),
12128 }
12129 }
12130
12131 8013111122914313744 => {
12132 let responder = ::fidl_next::Responder::from_untyped(responder);
12133
12134 handler.query_filesystem(responder).await;
12135 Ok(())
12136 }
12137
12138 4414537700416816443 => {
12139 let responder = ::fidl_next::Responder::from_untyped(responder);
12140
12141 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12142 Ok(decoded) => {
12143 handler
12144 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
12145 .await;
12146 Ok(())
12147 }
12148 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12149 ordinal: 4414537700416816443,
12150 error,
12151 }),
12152 }
12153 }
12154
12155 3677402239314018056 => {
12156 let responder = ::fidl_next::Responder::from_untyped(responder);
12157
12158 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12159 Ok(decoded) => {
12160 handler
12161 .update_attributes(
12162 ::fidl_next::Request::from_decoded(decoded),
12163 responder,
12164 )
12165 .await;
12166 Ok(())
12167 }
12168 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12169 ordinal: 3677402239314018056,
12170 error,
12171 }),
12172 }
12173 }
12174
12175 3196473584242777161 => {
12176 let responder = ::fidl_next::Responder::from_untyped(responder);
12177
12178 handler.sync(responder).await;
12179 Ok(())
12180 }
12181
12182 5043930208506967771 => {
12183 let responder = ::fidl_next::Responder::from_untyped(responder);
12184
12185 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12186 Ok(decoded) => {
12187 handler
12188 .get_extended_attribute(
12189 ::fidl_next::Request::from_decoded(decoded),
12190 responder,
12191 )
12192 .await;
12193 Ok(())
12194 }
12195 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12196 ordinal: 5043930208506967771,
12197 error,
12198 }),
12199 }
12200 }
12201
12202 5374223046099989052 => {
12203 let responder = ::fidl_next::Responder::from_untyped(responder);
12204
12205 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12206 Ok(decoded) => {
12207 handler
12208 .set_extended_attribute(
12209 ::fidl_next::Request::from_decoded(decoded),
12210 responder,
12211 )
12212 .await;
12213 Ok(())
12214 }
12215 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12216 ordinal: 5374223046099989052,
12217 error,
12218 }),
12219 }
12220 }
12221
12222 8794297771444732717 => {
12223 let responder = ::fidl_next::Responder::from_untyped(responder);
12224
12225 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12226 Ok(decoded) => {
12227 handler
12228 .remove_extended_attribute(
12229 ::fidl_next::Request::from_decoded(decoded),
12230 responder,
12231 )
12232 .await;
12233 Ok(())
12234 }
12235 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12236 ordinal: 8794297771444732717,
12237 error,
12238 }),
12239 }
12240 }
12241
12242 3855785432100874762 => {
12243 let responder = ::fidl_next::Responder::from_untyped(responder);
12244
12245 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12246 Ok(decoded) => {
12247 handler
12248 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
12249 .await;
12250 Ok(())
12251 }
12252 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12253 ordinal: 3855785432100874762,
12254 error,
12255 }),
12256 }
12257 }
12258
12259 1635123508515392625 => {
12260 let responder = ::fidl_next::Responder::from_untyped(responder);
12261
12262 handler.rewind(responder).await;
12263 Ok(())
12264 }
12265
12266 2787337947777369685 => {
12267 let responder = ::fidl_next::Responder::from_untyped(responder);
12268
12269 handler.get_token(responder).await;
12270 Ok(())
12271 }
12272
12273 8360374984291987687 => {
12274 let responder = ::fidl_next::Responder::from_untyped(responder);
12275
12276 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12277 Ok(decoded) => {
12278 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
12279 Ok(())
12280 }
12281 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12282 ordinal: 8360374984291987687,
12283 error,
12284 }),
12285 }
12286 }
12287
12288 8433556716759383021 => {
12289 let responder = ::fidl_next::Responder::from_untyped(responder);
12290
12291 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12292 Ok(decoded) => {
12293 handler
12294 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
12295 .await;
12296 Ok(())
12297 }
12298 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12299 ordinal: 8433556716759383021,
12300 error,
12301 }),
12302 }
12303 }
12304
12305 8097726607824333022 => {
12306 let responder = ::fidl_next::Responder::from_untyped(responder);
12307
12308 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12309 Ok(decoded) => {
12310 handler
12311 .rename(::fidl_next::Request::from_decoded(decoded), responder)
12312 .await;
12313 Ok(())
12314 }
12315 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12316 ordinal: 8097726607824333022,
12317 error,
12318 }),
12319 }
12320 }
12321
12322 2435901052462315657 => {
12323 let responder = ::fidl_next::Responder::from_untyped(responder);
12324
12325 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12326 Ok(decoded) => {
12327 handler
12328 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
12329 .await;
12330 Ok(())
12331 }
12332 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12333 ordinal: 2435901052462315657,
12334 error,
12335 }),
12336 }
12337 }
12338
12339 6275512344170098065 => {
12340 let responder = ::fidl_next::Responder::from_untyped(responder);
12341
12342 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12343 Ok(decoded) => {
12344 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
12345 Ok(())
12346 }
12347 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12348 ordinal: 6275512344170098065,
12349 error,
12350 }),
12351 }
12352 }
12353
12354 ordinal => {
12355 handler.on_unknown_interaction(ordinal).await;
12356 if ::core::matches!(
12357 message.header().flexibility(),
12358 ::fidl_next::protocol::Flexibility::Strict
12359 ) {
12360 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12361 } else {
12362 responder
12363 .respond_framework_error(
12364 ordinal,
12365 ::fidl_next::FrameworkError::UnknownMethod,
12366 )
12367 .expect("encoding a framework error should never fail")
12368 .await?;
12369 Ok(())
12370 }
12371 }
12372 }
12373 }
12374}
12375
12376impl<___T> DirectoryClientHandler<___T> for ::fidl_next::IgnoreEvents
12377where
12378 ___T: ::fidl_next::Transport,
12379{
12380 async fn on_open(&mut self, _: ::fidl_next::Request<directory::OnOpen, ___T>) {}
12381
12382 async fn on_representation(
12383 &mut self,
12384
12385 _: ::fidl_next::Request<directory::OnRepresentation, ___T>,
12386 ) {
12387 }
12388
12389 async fn on_unknown_interaction(&mut self, _: u64) {}
12390}
12391
12392impl<___H, ___T> DirectoryLocalClientHandler<___T> for ::fidl_next::Local<___H>
12393where
12394 ___H: DirectoryClientHandler<___T>,
12395 ___T: ::fidl_next::Transport,
12396{
12397 async fn on_open(&mut self, request: ::fidl_next::Request<directory::OnOpen, ___T>) {
12398 ___H::on_open(&mut self.0, request).await
12399 }
12400
12401 async fn on_representation(
12402 &mut self,
12403
12404 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
12405 ) {
12406 ___H::on_representation(&mut self.0, request).await
12407 }
12408
12409 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12410 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12411 }
12412}
12413
12414impl<___H, ___T> DirectoryLocalServerHandler<___T> for ::fidl_next::Local<___H>
12415where
12416 ___H: DirectoryServerHandler<___T>,
12417 ___T: ::fidl_next::Transport,
12418{
12419 async fn advisory_lock(
12420 &mut self,
12421
12422 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
12423
12424 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
12425 ) {
12426 ___H::advisory_lock(&mut self.0, request, responder).await
12427 }
12428
12429 async fn clone(&mut self, request: ::fidl_next::Request<directory::Clone, ___T>) {
12430 ___H::clone(&mut self.0, request).await
12431 }
12432
12433 async fn close(&mut self, responder: ::fidl_next::Responder<directory::Close, ___T>) {
12434 ___H::close(&mut self.0, responder).await
12435 }
12436
12437 async fn query(&mut self, responder: ::fidl_next::Responder<directory::Query, ___T>) {
12438 ___H::query(&mut self.0, responder).await
12439 }
12440
12441 async fn deprecated_clone(
12442 &mut self,
12443
12444 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
12445 ) {
12446 ___H::deprecated_clone(&mut self.0, request).await
12447 }
12448
12449 async fn deprecated_get_attr(
12450 &mut self,
12451
12452 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
12453 ) {
12454 ___H::deprecated_get_attr(&mut self.0, responder).await
12455 }
12456
12457 async fn deprecated_set_attr(
12458 &mut self,
12459
12460 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
12461
12462 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
12463 ) {
12464 ___H::deprecated_set_attr(&mut self.0, request, responder).await
12465 }
12466
12467 async fn deprecated_get_flags(
12468 &mut self,
12469
12470 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
12471 ) {
12472 ___H::deprecated_get_flags(&mut self.0, responder).await
12473 }
12474
12475 async fn deprecated_set_flags(
12476 &mut self,
12477
12478 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
12479
12480 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
12481 ) {
12482 ___H::deprecated_set_flags(&mut self.0, request, responder).await
12483 }
12484
12485 async fn get_flags(&mut self, responder: ::fidl_next::Responder<directory::GetFlags, ___T>) {
12486 ___H::get_flags(&mut self.0, responder).await
12487 }
12488
12489 async fn set_flags(
12490 &mut self,
12491
12492 request: ::fidl_next::Request<directory::SetFlags, ___T>,
12493
12494 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
12495 ) {
12496 ___H::set_flags(&mut self.0, request, responder).await
12497 }
12498
12499 async fn query_filesystem(
12500 &mut self,
12501
12502 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
12503 ) {
12504 ___H::query_filesystem(&mut self.0, responder).await
12505 }
12506
12507 async fn get_attributes(
12508 &mut self,
12509
12510 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
12511
12512 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
12513 ) {
12514 ___H::get_attributes(&mut self.0, request, responder).await
12515 }
12516
12517 async fn update_attributes(
12518 &mut self,
12519
12520 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
12521
12522 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
12523 ) {
12524 ___H::update_attributes(&mut self.0, request, responder).await
12525 }
12526
12527 async fn sync(&mut self, responder: ::fidl_next::Responder<directory::Sync, ___T>) {
12528 ___H::sync(&mut self.0, responder).await
12529 }
12530
12531 async fn list_extended_attributes(
12532 &mut self,
12533
12534 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
12535 ) {
12536 ___H::list_extended_attributes(&mut self.0, request).await
12537 }
12538
12539 async fn get_extended_attribute(
12540 &mut self,
12541
12542 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
12543
12544 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
12545 ) {
12546 ___H::get_extended_attribute(&mut self.0, request, responder).await
12547 }
12548
12549 async fn set_extended_attribute(
12550 &mut self,
12551
12552 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
12553
12554 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
12555 ) {
12556 ___H::set_extended_attribute(&mut self.0, request, responder).await
12557 }
12558
12559 async fn remove_extended_attribute(
12560 &mut self,
12561
12562 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
12563
12564 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
12565 ) {
12566 ___H::remove_extended_attribute(&mut self.0, request, responder).await
12567 }
12568
12569 async fn open(&mut self, request: ::fidl_next::Request<directory::Open, ___T>) {
12570 ___H::open(&mut self.0, request).await
12571 }
12572
12573 async fn deprecated_open(
12574 &mut self,
12575
12576 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
12577 ) {
12578 ___H::deprecated_open(&mut self.0, request).await
12579 }
12580
12581 async fn read_dirents(
12582 &mut self,
12583
12584 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
12585
12586 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
12587 ) {
12588 ___H::read_dirents(&mut self.0, request, responder).await
12589 }
12590
12591 async fn rewind(&mut self, responder: ::fidl_next::Responder<directory::Rewind, ___T>) {
12592 ___H::rewind(&mut self.0, responder).await
12593 }
12594
12595 async fn get_token(&mut self, responder: ::fidl_next::Responder<directory::GetToken, ___T>) {
12596 ___H::get_token(&mut self.0, responder).await
12597 }
12598
12599 async fn link(
12600 &mut self,
12601
12602 request: ::fidl_next::Request<directory::Link, ___T>,
12603
12604 responder: ::fidl_next::Responder<directory::Link, ___T>,
12605 ) {
12606 ___H::link(&mut self.0, request, responder).await
12607 }
12608
12609 async fn unlink(
12610 &mut self,
12611
12612 request: ::fidl_next::Request<directory::Unlink, ___T>,
12613
12614 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
12615 ) {
12616 ___H::unlink(&mut self.0, request, responder).await
12617 }
12618
12619 async fn rename(
12620 &mut self,
12621
12622 request: ::fidl_next::Request<directory::Rename, ___T>,
12623
12624 responder: ::fidl_next::Responder<directory::Rename, ___T>,
12625 ) {
12626 ___H::rename(&mut self.0, request, responder).await
12627 }
12628
12629 async fn create_symlink(
12630 &mut self,
12631
12632 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
12633
12634 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
12635 ) {
12636 ___H::create_symlink(&mut self.0, request, responder).await
12637 }
12638
12639 async fn watch(
12640 &mut self,
12641
12642 request: ::fidl_next::Request<directory::Watch, ___T>,
12643
12644 responder: ::fidl_next::Responder<directory::Watch, ___T>,
12645 ) {
12646 ___H::watch(&mut self.0, request, responder).await
12647 }
12648
12649 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12650 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12651 }
12652}
12653
12654#[derive(PartialEq, Debug)]
12656pub struct Linkable;
12657
12658#[cfg(target_os = "fuchsia")]
12659impl ::fidl_next::HasTransport for Linkable {
12660 type Transport = ::fidl_next::fuchsia::zx::Channel;
12661}
12662
12663pub mod linkable {
12664 pub mod prelude {
12665 pub use crate::{
12666 Linkable, LinkableClientHandler, LinkableLocalClientHandler,
12667 LinkableLocalServerHandler, LinkableServerHandler, linkable,
12668 };
12669
12670 pub use crate::natural::LinkableLinkIntoRequest;
12671
12672 pub use crate::natural::LinkableLinkIntoResponse;
12673 }
12674
12675 pub struct LinkInto;
12676
12677 impl ::fidl_next::Method for LinkInto {
12678 const ORDINAL: u64 = 6121399674497678964;
12679 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12680 ::fidl_next::protocol::Flexibility::Strict;
12681
12682 type Protocol = crate::Linkable;
12683
12684 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
12685 }
12686
12687 impl ::fidl_next::TwoWayMethod for LinkInto {
12688 type Response = ::fidl_next::wire::Result<
12689 'static,
12690 crate::wire::LinkableLinkIntoResponse,
12691 ::fidl_next::wire::fuchsia::Status,
12692 >;
12693 }
12694
12695 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
12696 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
12697
12698 fn respond(response: ___R) -> Self::Output {
12699 ::core::result::Result::Ok(response)
12700 }
12701 }
12702
12703 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
12704 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
12705
12706 fn respond_err(response: ___R) -> Self::Output {
12707 ::core::result::Result::Err(response)
12708 }
12709 }
12710
12711 mod ___detail {
12712 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Linkable
12713 where
12714 ___T: ::fidl_next::Transport,
12715 {
12716 type Client = LinkableClient<___T>;
12717 type Server = LinkableServer<___T>;
12718 }
12719
12720 #[repr(transparent)]
12722 pub struct LinkableClient<___T: ::fidl_next::Transport> {
12723 #[allow(dead_code)]
12724 client: ::fidl_next::protocol::Client<___T>,
12725 }
12726
12727 impl<___T> LinkableClient<___T>
12728 where
12729 ___T: ::fidl_next::Transport,
12730 {
12731 #[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"]
12732 pub fn link_into(
12733 &self,
12734
12735 dst_parent_token: impl ::fidl_next::Encode<
12736 ::fidl_next::wire::fuchsia::Event,
12737 <___T as ::fidl_next::Transport>::SendBuffer,
12738 >,
12739
12740 dst: impl ::fidl_next::Encode<
12741 ::fidl_next::wire::String<'static>,
12742 <___T as ::fidl_next::Transport>::SendBuffer,
12743 >,
12744 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
12745 where
12746 <___T as ::fidl_next::Transport>::SendBuffer:
12747 ::fidl_next::encoder::InternalHandleEncoder,
12748 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12749 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12750 {
12751 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
12752 dst_parent_token,
12753
12754 dst,
12755 })
12756 }
12757
12758 #[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"]
12759 pub fn link_into_with<___R>(
12760 &self,
12761 request: ___R,
12762 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
12763 where
12764 ___R: ::fidl_next::Encode<
12765 crate::wire::LinkableLinkIntoRequest<'static>,
12766 <___T as ::fidl_next::Transport>::SendBuffer,
12767 >,
12768 {
12769 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12770 6121399674497678964,
12771 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
12772 request,
12773 ))
12774 }
12775 }
12776
12777 #[repr(transparent)]
12779 pub struct LinkableServer<___T: ::fidl_next::Transport> {
12780 server: ::fidl_next::protocol::Server<___T>,
12781 }
12782
12783 impl<___T> LinkableServer<___T> where ___T: ::fidl_next::Transport {}
12784 }
12785}
12786
12787#[diagnostic::on_unimplemented(
12788 note = "If {Self} implements the non-local LinkableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
12789)]
12790
12791pub trait LinkableLocalClientHandler<
12795 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12796 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12797>
12798{
12799}
12800
12801impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Linkable
12802where
12803 ___H: LinkableLocalClientHandler<___T>,
12804 ___T: ::fidl_next::Transport,
12805{
12806 async fn on_event(
12807 handler: &mut ___H,
12808 mut message: ::fidl_next::Message<___T>,
12809 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12810 match *message.header().ordinal {
12811 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12812 }
12813 }
12814}
12815
12816#[diagnostic::on_unimplemented(
12817 note = "If {Self} implements the non-local LinkableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
12818)]
12819
12820pub trait LinkableLocalServerHandler<
12824 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12825 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12826>
12827{
12828 #[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"]
12829 fn link_into(
12830 &mut self,
12831
12832 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12833
12834 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12835 ) -> impl ::core::future::Future<Output = ()>;
12836}
12837
12838impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Linkable
12839where
12840 ___H: LinkableLocalServerHandler<___T>,
12841 ___T: ::fidl_next::Transport,
12842 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12843 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12844 Constraint = (),
12845 >,
12846{
12847 async fn on_one_way(
12848 handler: &mut ___H,
12849 mut message: ::fidl_next::Message<___T>,
12850 ) -> ::core::result::Result<
12851 (),
12852 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12853 > {
12854 match *message.header().ordinal {
12855 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12856 }
12857 }
12858
12859 async fn on_two_way(
12860 handler: &mut ___H,
12861 mut message: ::fidl_next::Message<___T>,
12862 responder: ::fidl_next::protocol::Responder<___T>,
12863 ) -> ::core::result::Result<
12864 (),
12865 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12866 > {
12867 match *message.header().ordinal {
12868 6121399674497678964 => {
12869 let responder = ::fidl_next::Responder::from_untyped(responder);
12870
12871 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12872 Ok(decoded) => {
12873 handler
12874 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
12875 .await;
12876 Ok(())
12877 }
12878 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12879 ordinal: 6121399674497678964,
12880 error,
12881 }),
12882 }
12883 }
12884
12885 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12886 }
12887 }
12888}
12889
12890pub trait LinkableClientHandler<
12894 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12895 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12896>
12897{
12898}
12899
12900impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Linkable
12901where
12902 ___H: LinkableClientHandler<___T> + ::core::marker::Send,
12903 ___T: ::fidl_next::Transport,
12904{
12905 async fn on_event(
12906 handler: &mut ___H,
12907 mut message: ::fidl_next::Message<___T>,
12908 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12909 match *message.header().ordinal {
12910 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12911 }
12912 }
12913}
12914
12915pub trait LinkableServerHandler<
12919 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12920 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12921>
12922{
12923 #[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"]
12924 fn link_into(
12925 &mut self,
12926
12927 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12928
12929 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12930 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12931}
12932
12933impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Linkable
12934where
12935 ___H: LinkableServerHandler<___T> + ::core::marker::Send,
12936 ___T: ::fidl_next::Transport,
12937 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12938 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12939 Constraint = (),
12940 >,
12941{
12942 async fn on_one_way(
12943 handler: &mut ___H,
12944 mut message: ::fidl_next::Message<___T>,
12945 ) -> ::core::result::Result<
12946 (),
12947 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12948 > {
12949 match *message.header().ordinal {
12950 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12951 }
12952 }
12953
12954 async fn on_two_way(
12955 handler: &mut ___H,
12956 mut message: ::fidl_next::Message<___T>,
12957 responder: ::fidl_next::protocol::Responder<___T>,
12958 ) -> ::core::result::Result<
12959 (),
12960 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12961 > {
12962 match *message.header().ordinal {
12963 6121399674497678964 => {
12964 let responder = ::fidl_next::Responder::from_untyped(responder);
12965
12966 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12967 Ok(decoded) => {
12968 handler
12969 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
12970 .await;
12971 Ok(())
12972 }
12973 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12974 ordinal: 6121399674497678964,
12975 error,
12976 }),
12977 }
12978 }
12979
12980 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12981 }
12982 }
12983}
12984
12985impl<___T> LinkableClientHandler<___T> for ::fidl_next::IgnoreEvents where
12986 ___T: ::fidl_next::Transport
12987{
12988}
12989
12990impl<___H, ___T> LinkableLocalClientHandler<___T> for ::fidl_next::Local<___H>
12991where
12992 ___H: LinkableClientHandler<___T>,
12993 ___T: ::fidl_next::Transport,
12994{
12995}
12996
12997impl<___H, ___T> LinkableLocalServerHandler<___T> for ::fidl_next::Local<___H>
12998where
12999 ___H: LinkableServerHandler<___T>,
13000 ___T: ::fidl_next::Transport,
13001{
13002 async fn link_into(
13003 &mut self,
13004
13005 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
13006
13007 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
13008 ) {
13009 ___H::link_into(&mut self.0, request, responder).await
13010 }
13011}
13012
13013#[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"]
13015#[derive(PartialEq, Debug)]
13016pub struct File;
13017
13018impl ::fidl_next::Discoverable for File {
13019 const PROTOCOL_NAME: &'static str = "fuchsia.io.File";
13020}
13021
13022#[cfg(target_os = "fuchsia")]
13023impl ::fidl_next::HasTransport for File {
13024 type Transport = ::fidl_next::fuchsia::zx::Channel;
13025}
13026
13027pub mod file {
13028 pub mod prelude {
13029 pub use crate::{
13030 File, FileClientHandler, FileLocalClientHandler, FileLocalServerHandler,
13031 FileServerHandler, file,
13032 };
13033
13034 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
13035
13036 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
13037
13038 pub use crate::natural::ExtendedAttributeValue;
13039
13040 pub use crate::natural::FileAllocateRequest;
13041
13042 pub use crate::natural::FileEnableVerityRequest;
13043
13044 pub use crate::natural::FileGetBackingMemoryRequest;
13045
13046 pub use crate::natural::FileInfo;
13047
13048 pub use crate::natural::FileReadAtRequest;
13049
13050 pub use crate::natural::FileResizeRequest;
13051
13052 pub use crate::natural::FileSeekRequest;
13053
13054 pub use crate::natural::FileWriteAtRequest;
13055
13056 pub use crate::natural::FileAllocateResponse;
13057
13058 pub use crate::natural::FileEnableVerityResponse;
13059
13060 pub use crate::natural::FileGetBackingMemoryResponse;
13061
13062 pub use crate::natural::FileReadAtResponse;
13063
13064 pub use crate::natural::FileResizeResponse;
13065
13066 pub use crate::natural::FileSeekResponse;
13067
13068 pub use crate::natural::FileWriteAtResponse;
13069
13070 pub use crate::natural::LinkableLinkIntoRequest;
13071
13072 pub use crate::natural::LinkableLinkIntoResponse;
13073
13074 pub use crate::natural::MutableNodeAttributes;
13075
13076 pub use crate::natural::NodeAttributes2;
13077
13078 pub use crate::natural::NodeDeprecatedCloneRequest;
13079
13080 pub use crate::natural::NodeDeprecatedGetAttrResponse;
13081
13082 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
13083
13084 pub use crate::natural::NodeDeprecatedSetAttrRequest;
13085
13086 pub use crate::natural::NodeDeprecatedSetAttrResponse;
13087
13088 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
13089
13090 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
13091
13092 pub use crate::natural::NodeGetAttributesRequest;
13093
13094 pub use crate::natural::NodeGetExtendedAttributeRequest;
13095
13096 pub use crate::natural::NodeListExtendedAttributesRequest;
13097
13098 pub use crate::natural::NodeOnOpenRequest;
13099
13100 pub use crate::natural::NodeQueryFilesystemResponse;
13101
13102 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
13103
13104 pub use crate::natural::NodeSetExtendedAttributeRequest;
13105
13106 pub use crate::natural::NodeSetFlagsRequest;
13107
13108 pub use crate::natural::NodeGetFlagsResponse;
13109
13110 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
13111
13112 pub use crate::natural::NodeSetExtendedAttributeResponse;
13113
13114 pub use crate::natural::NodeSetFlagsResponse;
13115
13116 pub use crate::natural::NodeSyncResponse;
13117
13118 pub use crate::natural::NodeUpdateAttributesResponse;
13119
13120 pub use crate::natural::ReadableReadRequest;
13121
13122 pub use crate::natural::ReadableReadResponse;
13123
13124 pub use crate::natural::Representation;
13125
13126 pub use crate::natural::WritableWriteRequest;
13127
13128 pub use crate::natural::WritableWriteResponse;
13129
13130 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
13131
13132 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
13133
13134 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
13135 }
13136
13137 pub struct AdvisoryLock;
13138
13139 impl ::fidl_next::Method for AdvisoryLock {
13140 const ORDINAL: u64 = 7992130864415541162;
13141 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13142 ::fidl_next::protocol::Flexibility::Strict;
13143
13144 type Protocol = crate::File;
13145
13146 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
13147 }
13148
13149 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
13150 type Response = ::fidl_next::wire::Result<
13151 'static,
13152 crate::wire::AdvisoryLockingAdvisoryLockResponse,
13153 ::fidl_next::wire::fuchsia::Status,
13154 >;
13155 }
13156
13157 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
13158 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13159
13160 fn respond(response: ___R) -> Self::Output {
13161 ::core::result::Result::Ok(response)
13162 }
13163 }
13164
13165 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
13166 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13167
13168 fn respond_err(response: ___R) -> Self::Output {
13169 ::core::result::Result::Err(response)
13170 }
13171 }
13172
13173 pub struct LinkInto;
13174
13175 impl ::fidl_next::Method for LinkInto {
13176 const ORDINAL: u64 = 6121399674497678964;
13177 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13178 ::fidl_next::protocol::Flexibility::Strict;
13179
13180 type Protocol = crate::File;
13181
13182 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
13183 }
13184
13185 impl ::fidl_next::TwoWayMethod for LinkInto {
13186 type Response = ::fidl_next::wire::Result<
13187 'static,
13188 crate::wire::LinkableLinkIntoResponse,
13189 ::fidl_next::wire::fuchsia::Status,
13190 >;
13191 }
13192
13193 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
13194 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13195
13196 fn respond(response: ___R) -> Self::Output {
13197 ::core::result::Result::Ok(response)
13198 }
13199 }
13200
13201 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
13202 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13203
13204 fn respond_err(response: ___R) -> Self::Output {
13205 ::core::result::Result::Err(response)
13206 }
13207 }
13208
13209 pub struct Clone;
13210
13211 impl ::fidl_next::Method for Clone {
13212 const ORDINAL: u64 = 2366825959783828089;
13213 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13214 ::fidl_next::protocol::Flexibility::Strict;
13215
13216 type Protocol = crate::File;
13217
13218 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
13219 }
13220
13221 pub struct Close;
13222
13223 impl ::fidl_next::Method for Close {
13224 const ORDINAL: u64 = 6540867515453498750;
13225 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13226 ::fidl_next::protocol::Flexibility::Strict;
13227
13228 type Protocol = crate::File;
13229
13230 type Request = ::fidl_next::wire::EmptyMessageBody;
13231 }
13232
13233 impl ::fidl_next::TwoWayMethod for Close {
13234 type Response = ::fidl_next::wire::Result<
13235 'static,
13236 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
13237 ::fidl_next::wire::Int32,
13238 >;
13239 }
13240
13241 impl<___R> ::fidl_next::Respond<___R> for Close {
13242 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13243
13244 fn respond(response: ___R) -> Self::Output {
13245 ::core::result::Result::Ok(response)
13246 }
13247 }
13248
13249 impl<___R> ::fidl_next::RespondErr<___R> for Close {
13250 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13251
13252 fn respond_err(response: ___R) -> Self::Output {
13253 ::core::result::Result::Err(response)
13254 }
13255 }
13256
13257 pub struct Query;
13258
13259 impl ::fidl_next::Method for Query {
13260 const ORDINAL: u64 = 2763219980499352582;
13261 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13262 ::fidl_next::protocol::Flexibility::Strict;
13263
13264 type Protocol = crate::File;
13265
13266 type Request = ::fidl_next::wire::EmptyMessageBody;
13267 }
13268
13269 impl ::fidl_next::TwoWayMethod for Query {
13270 type Response = ::fidl_next::wire::Strict<
13271 ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
13272 >;
13273 }
13274
13275 impl<___R> ::fidl_next::Respond<___R> for Query {
13276 type Output =
13277 ::fidl_next::Strict<::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>>;
13278
13279 fn respond(response: ___R) -> Self::Output {
13280 ::fidl_next::Strict(::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse {
13281 protocol: response,
13282 })
13283 }
13284 }
13285
13286 pub struct DeprecatedClone;
13287
13288 impl ::fidl_next::Method for DeprecatedClone {
13289 const ORDINAL: u64 = 6512600400724287855;
13290 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13291 ::fidl_next::protocol::Flexibility::Flexible;
13292
13293 type Protocol = crate::File;
13294
13295 type Request = crate::wire::NodeDeprecatedCloneRequest;
13296 }
13297
13298 pub struct OnOpen;
13299
13300 impl ::fidl_next::Method for OnOpen {
13301 const ORDINAL: u64 = 9207534335756671346;
13302 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13303 ::fidl_next::protocol::Flexibility::Flexible;
13304
13305 type Protocol = crate::File;
13306
13307 type Request = crate::wire::NodeOnOpenRequest<'static>;
13308 }
13309
13310 pub struct DeprecatedGetAttr;
13311
13312 impl ::fidl_next::Method for DeprecatedGetAttr {
13313 const ORDINAL: u64 = 8689798978500614909;
13314 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13315 ::fidl_next::protocol::Flexibility::Strict;
13316
13317 type Protocol = crate::File;
13318
13319 type Request = ::fidl_next::wire::EmptyMessageBody;
13320 }
13321
13322 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
13323 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
13324 }
13325
13326 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
13327 type Output = ::fidl_next::Strict<___R>;
13328
13329 fn respond(response: ___R) -> Self::Output {
13330 ::fidl_next::Strict(response)
13331 }
13332 }
13333
13334 pub struct DeprecatedSetAttr;
13335
13336 impl ::fidl_next::Method for DeprecatedSetAttr {
13337 const ORDINAL: u64 = 4721673413776871238;
13338 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13339 ::fidl_next::protocol::Flexibility::Strict;
13340
13341 type Protocol = crate::File;
13342
13343 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
13344 }
13345
13346 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
13347 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
13348 }
13349
13350 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
13351 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
13352
13353 fn respond(response: ___R) -> Self::Output {
13354 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
13355 }
13356 }
13357
13358 pub struct DeprecatedGetFlags;
13359
13360 impl ::fidl_next::Method for DeprecatedGetFlags {
13361 const ORDINAL: u64 = 6595803110182632097;
13362 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13363 ::fidl_next::protocol::Flexibility::Strict;
13364
13365 type Protocol = crate::File;
13366
13367 type Request = ::fidl_next::wire::EmptyMessageBody;
13368 }
13369
13370 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
13371 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
13372 }
13373
13374 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
13375 type Output = ::fidl_next::Strict<___R>;
13376
13377 fn respond(response: ___R) -> Self::Output {
13378 ::fidl_next::Strict(response)
13379 }
13380 }
13381
13382 pub struct DeprecatedSetFlags;
13383
13384 impl ::fidl_next::Method for DeprecatedSetFlags {
13385 const ORDINAL: u64 = 5950864159036794675;
13386 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13387 ::fidl_next::protocol::Flexibility::Strict;
13388
13389 type Protocol = crate::File;
13390
13391 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
13392 }
13393
13394 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
13395 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
13396 }
13397
13398 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
13399 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
13400
13401 fn respond(response: ___R) -> Self::Output {
13402 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
13403 }
13404 }
13405
13406 pub struct GetFlags;
13407
13408 impl ::fidl_next::Method for GetFlags {
13409 const ORDINAL: u64 = 105530239381466147;
13410 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13411 ::fidl_next::protocol::Flexibility::Flexible;
13412
13413 type Protocol = crate::File;
13414
13415 type Request = ::fidl_next::wire::EmptyMessageBody;
13416 }
13417
13418 impl ::fidl_next::TwoWayMethod for GetFlags {
13419 type Response = ::fidl_next::wire::Result<
13420 'static,
13421 crate::wire::NodeGetFlagsResponse,
13422 ::fidl_next::wire::fuchsia::Status,
13423 >;
13424 }
13425
13426 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
13427 type Output = ::core::result::Result<
13428 crate::generic::NodeGetFlagsResponse<___R>,
13429 ::fidl_next::never::Never,
13430 >;
13431
13432 fn respond(response: ___R) -> Self::Output {
13433 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
13434 }
13435 }
13436
13437 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
13438 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13439
13440 fn respond_err(response: ___R) -> Self::Output {
13441 ::core::result::Result::Err(response)
13442 }
13443 }
13444
13445 pub struct SetFlags;
13446
13447 impl ::fidl_next::Method for SetFlags {
13448 const ORDINAL: u64 = 6172186066099445416;
13449 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13450 ::fidl_next::protocol::Flexibility::Flexible;
13451
13452 type Protocol = crate::File;
13453
13454 type Request = crate::wire::NodeSetFlagsRequest;
13455 }
13456
13457 impl ::fidl_next::TwoWayMethod for SetFlags {
13458 type Response = ::fidl_next::wire::Result<
13459 'static,
13460 crate::wire::NodeSetFlagsResponse,
13461 ::fidl_next::wire::fuchsia::Status,
13462 >;
13463 }
13464
13465 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
13466 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13467
13468 fn respond(response: ___R) -> Self::Output {
13469 ::core::result::Result::Ok(response)
13470 }
13471 }
13472
13473 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
13474 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13475
13476 fn respond_err(response: ___R) -> Self::Output {
13477 ::core::result::Result::Err(response)
13478 }
13479 }
13480
13481 pub struct QueryFilesystem;
13482
13483 impl ::fidl_next::Method for QueryFilesystem {
13484 const ORDINAL: u64 = 8013111122914313744;
13485 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13486 ::fidl_next::protocol::Flexibility::Strict;
13487
13488 type Protocol = crate::File;
13489
13490 type Request = ::fidl_next::wire::EmptyMessageBody;
13491 }
13492
13493 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
13494 type Response =
13495 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
13496 }
13497
13498 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
13499 type Output = ::fidl_next::Strict<___R>;
13500
13501 fn respond(response: ___R) -> Self::Output {
13502 ::fidl_next::Strict(response)
13503 }
13504 }
13505
13506 pub struct OnRepresentation;
13507
13508 impl ::fidl_next::Method for OnRepresentation {
13509 const ORDINAL: u64 = 6679970090861613324;
13510 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13511 ::fidl_next::protocol::Flexibility::Strict;
13512
13513 type Protocol = crate::File;
13514
13515 type Request = crate::wire::Representation<'static>;
13516 }
13517
13518 pub struct GetAttributes;
13519
13520 impl ::fidl_next::Method for GetAttributes {
13521 const ORDINAL: u64 = 4414537700416816443;
13522 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13523 ::fidl_next::protocol::Flexibility::Strict;
13524
13525 type Protocol = crate::File;
13526
13527 type Request = crate::wire::NodeGetAttributesRequest;
13528 }
13529
13530 impl ::fidl_next::TwoWayMethod for GetAttributes {
13531 type Response = ::fidl_next::wire::Result<
13532 'static,
13533 crate::wire::NodeAttributes2<'static>,
13534 ::fidl_next::wire::fuchsia::Status,
13535 >;
13536 }
13537
13538 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
13539 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13540
13541 fn respond(response: ___R) -> Self::Output {
13542 ::core::result::Result::Ok(response)
13543 }
13544 }
13545
13546 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
13547 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13548
13549 fn respond_err(response: ___R) -> Self::Output {
13550 ::core::result::Result::Err(response)
13551 }
13552 }
13553
13554 pub struct UpdateAttributes;
13555
13556 impl ::fidl_next::Method for UpdateAttributes {
13557 const ORDINAL: u64 = 3677402239314018056;
13558 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13559 ::fidl_next::protocol::Flexibility::Strict;
13560
13561 type Protocol = crate::File;
13562
13563 type Request = crate::wire::MutableNodeAttributes<'static>;
13564 }
13565
13566 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
13567 type Response = ::fidl_next::wire::Result<
13568 'static,
13569 crate::wire::NodeUpdateAttributesResponse,
13570 ::fidl_next::wire::fuchsia::Status,
13571 >;
13572 }
13573
13574 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
13575 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13576
13577 fn respond(response: ___R) -> Self::Output {
13578 ::core::result::Result::Ok(response)
13579 }
13580 }
13581
13582 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
13583 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13584
13585 fn respond_err(response: ___R) -> Self::Output {
13586 ::core::result::Result::Err(response)
13587 }
13588 }
13589
13590 pub struct Sync;
13591
13592 impl ::fidl_next::Method for Sync {
13593 const ORDINAL: u64 = 3196473584242777161;
13594 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13595 ::fidl_next::protocol::Flexibility::Strict;
13596
13597 type Protocol = crate::File;
13598
13599 type Request = ::fidl_next::wire::EmptyMessageBody;
13600 }
13601
13602 impl ::fidl_next::TwoWayMethod for Sync {
13603 type Response = ::fidl_next::wire::Result<
13604 'static,
13605 crate::wire::NodeSyncResponse,
13606 ::fidl_next::wire::fuchsia::Status,
13607 >;
13608 }
13609
13610 impl<___R> ::fidl_next::Respond<___R> for Sync {
13611 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13612
13613 fn respond(response: ___R) -> Self::Output {
13614 ::core::result::Result::Ok(response)
13615 }
13616 }
13617
13618 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
13619 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13620
13621 fn respond_err(response: ___R) -> Self::Output {
13622 ::core::result::Result::Err(response)
13623 }
13624 }
13625
13626 pub struct ListExtendedAttributes;
13627
13628 impl ::fidl_next::Method for ListExtendedAttributes {
13629 const ORDINAL: u64 = 5431626189872037072;
13630 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13631 ::fidl_next::protocol::Flexibility::Strict;
13632
13633 type Protocol = crate::File;
13634
13635 type Request = crate::wire::NodeListExtendedAttributesRequest;
13636 }
13637
13638 pub struct GetExtendedAttribute;
13639
13640 impl ::fidl_next::Method for GetExtendedAttribute {
13641 const ORDINAL: u64 = 5043930208506967771;
13642 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13643 ::fidl_next::protocol::Flexibility::Strict;
13644
13645 type Protocol = crate::File;
13646
13647 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
13648 }
13649
13650 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
13651 type Response = ::fidl_next::wire::Result<
13652 'static,
13653 crate::wire::ExtendedAttributeValue<'static>,
13654 ::fidl_next::wire::fuchsia::Status,
13655 >;
13656 }
13657
13658 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
13659 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13660
13661 fn respond(response: ___R) -> Self::Output {
13662 ::core::result::Result::Ok(response)
13663 }
13664 }
13665
13666 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
13667 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13668
13669 fn respond_err(response: ___R) -> Self::Output {
13670 ::core::result::Result::Err(response)
13671 }
13672 }
13673
13674 pub struct SetExtendedAttribute;
13675
13676 impl ::fidl_next::Method for SetExtendedAttribute {
13677 const ORDINAL: u64 = 5374223046099989052;
13678 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13679 ::fidl_next::protocol::Flexibility::Strict;
13680
13681 type Protocol = crate::File;
13682
13683 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
13684 }
13685
13686 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
13687 type Response = ::fidl_next::wire::Result<
13688 'static,
13689 crate::wire::NodeSetExtendedAttributeResponse,
13690 ::fidl_next::wire::fuchsia::Status,
13691 >;
13692 }
13693
13694 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
13695 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13696
13697 fn respond(response: ___R) -> Self::Output {
13698 ::core::result::Result::Ok(response)
13699 }
13700 }
13701
13702 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
13703 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13704
13705 fn respond_err(response: ___R) -> Self::Output {
13706 ::core::result::Result::Err(response)
13707 }
13708 }
13709
13710 pub struct RemoveExtendedAttribute;
13711
13712 impl ::fidl_next::Method for RemoveExtendedAttribute {
13713 const ORDINAL: u64 = 8794297771444732717;
13714 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13715 ::fidl_next::protocol::Flexibility::Strict;
13716
13717 type Protocol = crate::File;
13718
13719 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
13720 }
13721
13722 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
13723 type Response = ::fidl_next::wire::Result<
13724 'static,
13725 crate::wire::NodeRemoveExtendedAttributeResponse,
13726 ::fidl_next::wire::fuchsia::Status,
13727 >;
13728 }
13729
13730 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
13731 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13732
13733 fn respond(response: ___R) -> Self::Output {
13734 ::core::result::Result::Ok(response)
13735 }
13736 }
13737
13738 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
13739 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13740
13741 fn respond_err(response: ___R) -> Self::Output {
13742 ::core::result::Result::Err(response)
13743 }
13744 }
13745
13746 pub struct Read;
13747
13748 impl ::fidl_next::Method for Read {
13749 const ORDINAL: u64 = 395825947633028830;
13750 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13751 ::fidl_next::protocol::Flexibility::Strict;
13752
13753 type Protocol = crate::File;
13754
13755 type Request = crate::wire::ReadableReadRequest;
13756 }
13757
13758 impl ::fidl_next::TwoWayMethod for Read {
13759 type Response = ::fidl_next::wire::Result<
13760 'static,
13761 crate::wire::ReadableReadResponse<'static>,
13762 ::fidl_next::wire::fuchsia::Status,
13763 >;
13764 }
13765
13766 impl<___R> ::fidl_next::Respond<___R> for Read {
13767 type Output = ::core::result::Result<
13768 crate::generic::ReadableReadResponse<___R>,
13769 ::fidl_next::never::Never,
13770 >;
13771
13772 fn respond(response: ___R) -> Self::Output {
13773 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
13774 }
13775 }
13776
13777 impl<___R> ::fidl_next::RespondErr<___R> for Read {
13778 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13779
13780 fn respond_err(response: ___R) -> Self::Output {
13781 ::core::result::Result::Err(response)
13782 }
13783 }
13784
13785 pub struct Write;
13786
13787 impl ::fidl_next::Method for Write {
13788 const ORDINAL: u64 = 7651971425397809026;
13789 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13790 ::fidl_next::protocol::Flexibility::Strict;
13791
13792 type Protocol = crate::File;
13793
13794 type Request = crate::wire::WritableWriteRequest<'static>;
13795 }
13796
13797 impl ::fidl_next::TwoWayMethod for Write {
13798 type Response = ::fidl_next::wire::Result<
13799 'static,
13800 crate::wire::WritableWriteResponse,
13801 ::fidl_next::wire::fuchsia::Status,
13802 >;
13803 }
13804
13805 impl<___R> ::fidl_next::Respond<___R> for Write {
13806 type Output = ::core::result::Result<
13807 crate::generic::WritableWriteResponse<___R>,
13808 ::fidl_next::never::Never,
13809 >;
13810
13811 fn respond(response: ___R) -> Self::Output {
13812 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
13813 actual_count: response,
13814 })
13815 }
13816 }
13817
13818 impl<___R> ::fidl_next::RespondErr<___R> for Write {
13819 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13820
13821 fn respond_err(response: ___R) -> Self::Output {
13822 ::core::result::Result::Err(response)
13823 }
13824 }
13825
13826 pub struct Describe;
13827
13828 impl ::fidl_next::Method for Describe {
13829 const ORDINAL: u64 = 7545125870053689020;
13830 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13831 ::fidl_next::protocol::Flexibility::Strict;
13832
13833 type Protocol = crate::File;
13834
13835 type Request = ::fidl_next::wire::EmptyMessageBody;
13836 }
13837
13838 impl ::fidl_next::TwoWayMethod for Describe {
13839 type Response = ::fidl_next::wire::Strict<crate::wire::FileInfo<'static>>;
13840 }
13841
13842 impl<___R> ::fidl_next::Respond<___R> for Describe {
13843 type Output = ::fidl_next::Strict<___R>;
13844
13845 fn respond(response: ___R) -> Self::Output {
13846 ::fidl_next::Strict(response)
13847 }
13848 }
13849
13850 pub struct Seek;
13851
13852 impl ::fidl_next::Method for Seek {
13853 const ORDINAL: u64 = 8649041485622956551;
13854 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13855 ::fidl_next::protocol::Flexibility::Strict;
13856
13857 type Protocol = crate::File;
13858
13859 type Request = crate::wire::FileSeekRequest;
13860 }
13861
13862 impl ::fidl_next::TwoWayMethod for Seek {
13863 type Response = ::fidl_next::wire::Result<
13864 'static,
13865 crate::wire::FileSeekResponse,
13866 ::fidl_next::wire::fuchsia::Status,
13867 >;
13868 }
13869
13870 impl<___R> ::fidl_next::Respond<___R> for Seek {
13871 type Output = ::core::result::Result<
13872 crate::generic::FileSeekResponse<___R>,
13873 ::fidl_next::never::Never,
13874 >;
13875
13876 fn respond(response: ___R) -> Self::Output {
13877 ::core::result::Result::Ok(crate::generic::FileSeekResponse {
13878 offset_from_start: response,
13879 })
13880 }
13881 }
13882
13883 impl<___R> ::fidl_next::RespondErr<___R> for Seek {
13884 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13885
13886 fn respond_err(response: ___R) -> Self::Output {
13887 ::core::result::Result::Err(response)
13888 }
13889 }
13890
13891 pub struct ReadAt;
13892
13893 impl ::fidl_next::Method for ReadAt {
13894 const ORDINAL: u64 = 1587416148701180478;
13895 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13896 ::fidl_next::protocol::Flexibility::Strict;
13897
13898 type Protocol = crate::File;
13899
13900 type Request = crate::wire::FileReadAtRequest;
13901 }
13902
13903 impl ::fidl_next::TwoWayMethod for ReadAt {
13904 type Response = ::fidl_next::wire::Result<
13905 'static,
13906 crate::wire::FileReadAtResponse<'static>,
13907 ::fidl_next::wire::fuchsia::Status,
13908 >;
13909 }
13910
13911 impl<___R> ::fidl_next::Respond<___R> for ReadAt {
13912 type Output = ::core::result::Result<
13913 crate::generic::FileReadAtResponse<___R>,
13914 ::fidl_next::never::Never,
13915 >;
13916
13917 fn respond(response: ___R) -> Self::Output {
13918 ::core::result::Result::Ok(crate::generic::FileReadAtResponse { data: response })
13919 }
13920 }
13921
13922 impl<___R> ::fidl_next::RespondErr<___R> for ReadAt {
13923 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13924
13925 fn respond_err(response: ___R) -> Self::Output {
13926 ::core::result::Result::Err(response)
13927 }
13928 }
13929
13930 pub struct WriteAt;
13931
13932 impl ::fidl_next::Method for WriteAt {
13933 const ORDINAL: u64 = 8736683935131400491;
13934 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13935 ::fidl_next::protocol::Flexibility::Strict;
13936
13937 type Protocol = crate::File;
13938
13939 type Request = crate::wire::FileWriteAtRequest<'static>;
13940 }
13941
13942 impl ::fidl_next::TwoWayMethod for WriteAt {
13943 type Response = ::fidl_next::wire::Result<
13944 'static,
13945 crate::wire::FileWriteAtResponse,
13946 ::fidl_next::wire::fuchsia::Status,
13947 >;
13948 }
13949
13950 impl<___R> ::fidl_next::Respond<___R> for WriteAt {
13951 type Output = ::core::result::Result<
13952 crate::generic::FileWriteAtResponse<___R>,
13953 ::fidl_next::never::Never,
13954 >;
13955
13956 fn respond(response: ___R) -> Self::Output {
13957 ::core::result::Result::Ok(crate::generic::FileWriteAtResponse {
13958 actual_count: response,
13959 })
13960 }
13961 }
13962
13963 impl<___R> ::fidl_next::RespondErr<___R> for WriteAt {
13964 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13965
13966 fn respond_err(response: ___R) -> Self::Output {
13967 ::core::result::Result::Err(response)
13968 }
13969 }
13970
13971 pub struct Resize;
13972
13973 impl ::fidl_next::Method for Resize {
13974 const ORDINAL: u64 = 3134648685270758458;
13975 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13976 ::fidl_next::protocol::Flexibility::Strict;
13977
13978 type Protocol = crate::File;
13979
13980 type Request = crate::wire::FileResizeRequest;
13981 }
13982
13983 impl ::fidl_next::TwoWayMethod for Resize {
13984 type Response = ::fidl_next::wire::Result<
13985 'static,
13986 crate::wire::FileResizeResponse,
13987 ::fidl_next::wire::fuchsia::Status,
13988 >;
13989 }
13990
13991 impl<___R> ::fidl_next::Respond<___R> for Resize {
13992 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13993
13994 fn respond(response: ___R) -> Self::Output {
13995 ::core::result::Result::Ok(response)
13996 }
13997 }
13998
13999 impl<___R> ::fidl_next::RespondErr<___R> for Resize {
14000 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14001
14002 fn respond_err(response: ___R) -> Self::Output {
14003 ::core::result::Result::Err(response)
14004 }
14005 }
14006
14007 pub struct GetBackingMemory;
14008
14009 impl ::fidl_next::Method for GetBackingMemory {
14010 const ORDINAL: u64 = 46911652864194091;
14011 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14012 ::fidl_next::protocol::Flexibility::Strict;
14013
14014 type Protocol = crate::File;
14015
14016 type Request = crate::wire::FileGetBackingMemoryRequest;
14017 }
14018
14019 impl ::fidl_next::TwoWayMethod for GetBackingMemory {
14020 type Response = ::fidl_next::wire::Result<
14021 'static,
14022 crate::wire::FileGetBackingMemoryResponse,
14023 ::fidl_next::wire::fuchsia::Status,
14024 >;
14025 }
14026
14027 impl<___R> ::fidl_next::Respond<___R> for GetBackingMemory {
14028 type Output = ::core::result::Result<
14029 crate::generic::FileGetBackingMemoryResponse<___R>,
14030 ::fidl_next::never::Never,
14031 >;
14032
14033 fn respond(response: ___R) -> Self::Output {
14034 ::core::result::Result::Ok(crate::generic::FileGetBackingMemoryResponse {
14035 vmo: response,
14036 })
14037 }
14038 }
14039
14040 impl<___R> ::fidl_next::RespondErr<___R> for GetBackingMemory {
14041 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14042
14043 fn respond_err(response: ___R) -> Self::Output {
14044 ::core::result::Result::Err(response)
14045 }
14046 }
14047
14048 pub struct Allocate;
14049
14050 impl ::fidl_next::Method for Allocate {
14051 const ORDINAL: u64 = 8645235848064269614;
14052 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14053 ::fidl_next::protocol::Flexibility::Flexible;
14054
14055 type Protocol = crate::File;
14056
14057 type Request = crate::wire::FileAllocateRequest;
14058 }
14059
14060 impl ::fidl_next::TwoWayMethod for Allocate {
14061 type Response = ::fidl_next::wire::Result<
14062 'static,
14063 crate::wire::FileAllocateResponse,
14064 ::fidl_next::wire::fuchsia::Status,
14065 >;
14066 }
14067
14068 impl<___R> ::fidl_next::Respond<___R> for Allocate {
14069 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14070
14071 fn respond(response: ___R) -> Self::Output {
14072 ::core::result::Result::Ok(response)
14073 }
14074 }
14075
14076 impl<___R> ::fidl_next::RespondErr<___R> for Allocate {
14077 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14078
14079 fn respond_err(response: ___R) -> Self::Output {
14080 ::core::result::Result::Err(response)
14081 }
14082 }
14083
14084 pub struct EnableVerity;
14085
14086 impl ::fidl_next::Method for EnableVerity {
14087 const ORDINAL: u64 = 3189145313204943035;
14088 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14089 ::fidl_next::protocol::Flexibility::Flexible;
14090
14091 type Protocol = crate::File;
14092
14093 type Request = crate::wire::FileEnableVerityRequest<'static>;
14094 }
14095
14096 impl ::fidl_next::TwoWayMethod for EnableVerity {
14097 type Response = ::fidl_next::wire::Result<
14098 'static,
14099 crate::wire::FileEnableVerityResponse,
14100 ::fidl_next::wire::fuchsia::Status,
14101 >;
14102 }
14103
14104 impl<___R> ::fidl_next::Respond<___R> for EnableVerity {
14105 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14106
14107 fn respond(response: ___R) -> Self::Output {
14108 ::core::result::Result::Ok(response)
14109 }
14110 }
14111
14112 impl<___R> ::fidl_next::RespondErr<___R> for EnableVerity {
14113 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14114
14115 fn respond_err(response: ___R) -> Self::Output {
14116 ::core::result::Result::Err(response)
14117 }
14118 }
14119
14120 mod ___detail {
14121 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::File
14122 where
14123 ___T: ::fidl_next::Transport,
14124 {
14125 type Client = FileClient<___T>;
14126 type Server = FileServer<___T>;
14127 }
14128
14129 #[repr(transparent)]
14131 pub struct FileClient<___T: ::fidl_next::Transport> {
14132 #[allow(dead_code)]
14133 client: ::fidl_next::protocol::Client<___T>,
14134 }
14135
14136 impl<___T> FileClient<___T>
14137 where
14138 ___T: ::fidl_next::Transport,
14139 {
14140 #[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"]
14141 pub fn advisory_lock(
14142 &self,
14143
14144 request: impl ::fidl_next::Encode<
14145 crate::wire::AdvisoryLockRequest<'static>,
14146 <___T as ::fidl_next::Transport>::SendBuffer,
14147 >,
14148 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
14149 where
14150 <___T as ::fidl_next::Transport>::SendBuffer:
14151 ::fidl_next::encoder::InternalHandleEncoder,
14152 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14153 {
14154 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
14155 request,
14156 })
14157 }
14158
14159 #[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"]
14160 pub fn advisory_lock_with<___R>(
14161 &self,
14162 request: ___R,
14163 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
14164 where
14165 ___R: ::fidl_next::Encode<
14166 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
14167 <___T as ::fidl_next::Transport>::SendBuffer,
14168 >,
14169 {
14170 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14171 7992130864415541162,
14172 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
14173 request,
14174 ))
14175 }
14176
14177 #[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"]
14178 pub fn link_into(
14179 &self,
14180
14181 dst_parent_token: impl ::fidl_next::Encode<
14182 ::fidl_next::wire::fuchsia::Event,
14183 <___T as ::fidl_next::Transport>::SendBuffer,
14184 >,
14185
14186 dst: impl ::fidl_next::Encode<
14187 ::fidl_next::wire::String<'static>,
14188 <___T as ::fidl_next::Transport>::SendBuffer,
14189 >,
14190 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14191 where
14192 <___T as ::fidl_next::Transport>::SendBuffer:
14193 ::fidl_next::encoder::InternalHandleEncoder,
14194 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14195 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14196 {
14197 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
14198 dst_parent_token,
14199
14200 dst,
14201 })
14202 }
14203
14204 #[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"]
14205 pub fn link_into_with<___R>(
14206 &self,
14207 request: ___R,
14208 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14209 where
14210 ___R: ::fidl_next::Encode<
14211 crate::wire::LinkableLinkIntoRequest<'static>,
14212 <___T as ::fidl_next::Transport>::SendBuffer,
14213 >,
14214 {
14215 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14216 6121399674497678964,
14217 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
14218 request,
14219 ))
14220 }
14221
14222 pub fn clone(
14223 &self,
14224
14225 request: impl ::fidl_next::Encode<
14226 ::fidl_next::ServerEnd<
14227 ::fidl_next_fuchsia_unknown::Cloneable,
14228 ::fidl_next::wire::fuchsia::Channel,
14229 >,
14230 <___T as ::fidl_next::Transport>::SendBuffer,
14231 >,
14232 ) -> ::fidl_next::SendFuture<'_, ___T>
14233 where
14234 <___T as ::fidl_next::Transport>::SendBuffer:
14235 ::fidl_next::encoder::InternalHandleEncoder,
14236 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14237 {
14238 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
14239 request,
14240 })
14241 }
14242
14243 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14244 where
14245 ___R: ::fidl_next::Encode<
14246 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
14247 <___T as ::fidl_next::Transport>::SendBuffer,
14248 >,
14249 {
14250 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14251 2366825959783828089,
14252 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
14253 request,
14254 ))
14255 }
14256
14257 #[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"]
14258 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
14259 ::fidl_next::TwoWayFuture::from_untyped(
14260 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14261 6540867515453498750,
14262 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
14263 (),
14264 ),
14265 )
14266 }
14267
14268 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
14269 ::fidl_next::TwoWayFuture::from_untyped(
14270 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14271 2763219980499352582,
14272 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
14273 (),
14274 ),
14275 )
14276 }
14277
14278 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14279 pub fn deprecated_clone(
14280 &self,
14281
14282 flags: impl ::fidl_next::Encode<
14283 crate::wire::OpenFlags,
14284 <___T as ::fidl_next::Transport>::SendBuffer,
14285 >,
14286
14287 object: impl ::fidl_next::Encode<
14288 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
14289 <___T as ::fidl_next::Transport>::SendBuffer,
14290 >,
14291 ) -> ::fidl_next::SendFuture<'_, ___T>
14292 where
14293 <___T as ::fidl_next::Transport>::SendBuffer:
14294 ::fidl_next::encoder::InternalHandleEncoder,
14295 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14296 {
14297 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
14298 flags,
14299
14300 object,
14301 })
14302 }
14303
14304 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14305 pub fn deprecated_clone_with<___R>(
14306 &self,
14307 request: ___R,
14308 ) -> ::fidl_next::SendFuture<'_, ___T>
14309 where
14310 ___R: ::fidl_next::Encode<
14311 crate::wire::NodeDeprecatedCloneRequest,
14312 <___T as ::fidl_next::Transport>::SendBuffer,
14313 >,
14314 {
14315 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14316 6512600400724287855,
14317 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
14318 request,
14319 ))
14320 }
14321
14322 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14323 pub fn deprecated_get_attr(
14324 &self,
14325 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
14326 ::fidl_next::TwoWayFuture::from_untyped(
14327 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14328 8689798978500614909,
14329 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
14330 (),
14331 ),
14332 )
14333 }
14334
14335 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14336 pub fn deprecated_set_attr(
14337 &self,
14338
14339 flags: impl ::fidl_next::Encode<
14340 crate::wire::NodeAttributeFlags,
14341 <___T as ::fidl_next::Transport>::SendBuffer,
14342 >,
14343
14344 attributes: impl ::fidl_next::Encode<
14345 crate::wire::NodeAttributes,
14346 <___T as ::fidl_next::Transport>::SendBuffer,
14347 >,
14348 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14349 where
14350 <___T as ::fidl_next::Transport>::SendBuffer:
14351 ::fidl_next::encoder::InternalHandleEncoder,
14352 {
14353 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
14354 flags,
14355
14356 attributes,
14357 })
14358 }
14359
14360 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14361 pub fn deprecated_set_attr_with<___R>(
14362 &self,
14363 request: ___R,
14364 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14365 where
14366 ___R: ::fidl_next::Encode<
14367 crate::wire::NodeDeprecatedSetAttrRequest,
14368 <___T as ::fidl_next::Transport>::SendBuffer,
14369 >,
14370 {
14371 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14372 4721673413776871238,
14373 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
14374 request,
14375 ))
14376 }
14377
14378 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14379 pub fn deprecated_get_flags(
14380 &self,
14381 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
14382 ::fidl_next::TwoWayFuture::from_untyped(
14383 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14384 6595803110182632097,
14385 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
14386 (),
14387 ),
14388 )
14389 }
14390
14391 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14392 pub fn deprecated_set_flags(
14393 &self,
14394
14395 flags: impl ::fidl_next::Encode<
14396 crate::wire::OpenFlags,
14397 <___T as ::fidl_next::Transport>::SendBuffer,
14398 >,
14399 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14400 where
14401 <___T as ::fidl_next::Transport>::SendBuffer:
14402 ::fidl_next::encoder::InternalHandleEncoder,
14403 {
14404 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
14405 flags,
14406 })
14407 }
14408
14409 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14410 pub fn deprecated_set_flags_with<___R>(
14411 &self,
14412 request: ___R,
14413 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14414 where
14415 ___R: ::fidl_next::Encode<
14416 crate::wire::NodeDeprecatedSetFlagsRequest,
14417 <___T as ::fidl_next::Transport>::SendBuffer,
14418 >,
14419 {
14420 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14421 5950864159036794675,
14422 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
14423 request,
14424 ))
14425 }
14426
14427 #[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"]
14428 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
14429 ::fidl_next::TwoWayFuture::from_untyped(
14430 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14431 105530239381466147,
14432 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
14433 (),
14434 ),
14435 )
14436 }
14437
14438 #[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"]
14439 pub fn set_flags(
14440 &self,
14441
14442 flags: impl ::fidl_next::Encode<
14443 crate::wire::Flags,
14444 <___T as ::fidl_next::Transport>::SendBuffer,
14445 >,
14446 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14447 where
14448 <___T as ::fidl_next::Transport>::SendBuffer:
14449 ::fidl_next::encoder::InternalHandleEncoder,
14450 {
14451 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
14452 }
14453
14454 #[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"]
14455 pub fn set_flags_with<___R>(
14456 &self,
14457 request: ___R,
14458 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14459 where
14460 ___R: ::fidl_next::Encode<
14461 crate::wire::NodeSetFlagsRequest,
14462 <___T as ::fidl_next::Transport>::SendBuffer,
14463 >,
14464 {
14465 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14466 6172186066099445416,
14467 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
14468 request,
14469 ))
14470 }
14471
14472 #[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"]
14473 pub fn query_filesystem(
14474 &self,
14475 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
14476 ::fidl_next::TwoWayFuture::from_untyped(
14477 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14478 8013111122914313744,
14479 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
14480 (),
14481 ),
14482 )
14483 }
14484
14485 #[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"]
14486 pub fn get_attributes(
14487 &self,
14488
14489 query: impl ::fidl_next::Encode<
14490 crate::wire::NodeAttributesQuery,
14491 <___T as ::fidl_next::Transport>::SendBuffer,
14492 >,
14493 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14494 where
14495 <___T as ::fidl_next::Transport>::SendBuffer:
14496 ::fidl_next::encoder::InternalHandleEncoder,
14497 {
14498 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
14499 }
14500
14501 #[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"]
14502 pub fn get_attributes_with<___R>(
14503 &self,
14504 request: ___R,
14505 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14506 where
14507 ___R: ::fidl_next::Encode<
14508 crate::wire::NodeGetAttributesRequest,
14509 <___T as ::fidl_next::Transport>::SendBuffer,
14510 >,
14511 {
14512 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14513 4414537700416816443,
14514 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
14515 request,
14516 ))
14517 }
14518
14519 #[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"]
14520 pub fn update_attributes_with<___R>(
14521 &self,
14522 request: ___R,
14523 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
14524 where
14525 ___R: ::fidl_next::Encode<
14526 crate::wire::MutableNodeAttributes<'static>,
14527 <___T as ::fidl_next::Transport>::SendBuffer,
14528 >,
14529 {
14530 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14531 3677402239314018056,
14532 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
14533 request,
14534 ))
14535 }
14536
14537 #[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"]
14538 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
14539 ::fidl_next::TwoWayFuture::from_untyped(
14540 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14541 3196473584242777161,
14542 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
14543 (),
14544 ),
14545 )
14546 }
14547
14548 #[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.READ_BYTES`] right.\n"]
14549 pub fn list_extended_attributes(
14550 &self,
14551
14552 iterator: impl ::fidl_next::Encode<
14553 ::fidl_next::ServerEnd<
14554 crate::ExtendedAttributeIterator,
14555 ::fidl_next::wire::fuchsia::Channel,
14556 >,
14557 <___T as ::fidl_next::Transport>::SendBuffer,
14558 >,
14559 ) -> ::fidl_next::SendFuture<'_, ___T>
14560 where
14561 <___T as ::fidl_next::Transport>::SendBuffer:
14562 ::fidl_next::encoder::InternalHandleEncoder,
14563 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14564 {
14565 self.list_extended_attributes_with(
14566 crate::generic::NodeListExtendedAttributesRequest { iterator },
14567 )
14568 }
14569
14570 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
14571 pub fn list_extended_attributes_with<___R>(
14572 &self,
14573 request: ___R,
14574 ) -> ::fidl_next::SendFuture<'_, ___T>
14575 where
14576 ___R: ::fidl_next::Encode<
14577 crate::wire::NodeListExtendedAttributesRequest,
14578 <___T as ::fidl_next::Transport>::SendBuffer,
14579 >,
14580 {
14581 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14582 5431626189872037072,
14583 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
14584 request,
14585 ))
14586 }
14587
14588 #[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.READ_BYTES`] right.\n"]
14589 pub fn get_extended_attribute(
14590 &self,
14591
14592 name: impl ::fidl_next::Encode<
14593 ::fidl_next::wire::Vector<'static, u8>,
14594 <___T as ::fidl_next::Transport>::SendBuffer,
14595 >,
14596 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14597 where
14598 <___T as ::fidl_next::Transport>::SendBuffer:
14599 ::fidl_next::encoder::InternalHandleEncoder,
14600 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14601 {
14602 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
14603 name,
14604 })
14605 }
14606
14607 #[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.READ_BYTES`] right.\n"]
14608 pub fn get_extended_attribute_with<___R>(
14609 &self,
14610 request: ___R,
14611 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14612 where
14613 ___R: ::fidl_next::Encode<
14614 crate::wire::NodeGetExtendedAttributeRequest<'static>,
14615 <___T as ::fidl_next::Transport>::SendBuffer,
14616 >,
14617 {
14618 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14619 5043930208506967771,
14620 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14621 request,
14622 ))
14623 }
14624
14625 #[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.WRITE_BYTES`] right.\n"]
14626 pub fn set_extended_attribute(
14627 &self,
14628
14629 name: impl ::fidl_next::Encode<
14630 ::fidl_next::wire::Vector<'static, u8>,
14631 <___T as ::fidl_next::Transport>::SendBuffer,
14632 >,
14633
14634 value: impl ::fidl_next::Encode<
14635 crate::wire::ExtendedAttributeValue<'static>,
14636 <___T as ::fidl_next::Transport>::SendBuffer,
14637 >,
14638
14639 mode: impl ::fidl_next::Encode<
14640 crate::wire::SetExtendedAttributeMode,
14641 <___T as ::fidl_next::Transport>::SendBuffer,
14642 >,
14643 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14644 where
14645 <___T as ::fidl_next::Transport>::SendBuffer:
14646 ::fidl_next::encoder::InternalHandleEncoder,
14647 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14648 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
14649 {
14650 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
14651 name,
14652
14653 value,
14654
14655 mode,
14656 })
14657 }
14658
14659 #[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.WRITE_BYTES`] right.\n"]
14660 pub fn set_extended_attribute_with<___R>(
14661 &self,
14662 request: ___R,
14663 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14664 where
14665 ___R: ::fidl_next::Encode<
14666 crate::wire::NodeSetExtendedAttributeRequest<'static>,
14667 <___T as ::fidl_next::Transport>::SendBuffer,
14668 >,
14669 {
14670 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14671 5374223046099989052,
14672 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14673 request,
14674 ))
14675 }
14676
14677 #[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.WRITE_BYTES`] right.\n"]
14678 pub fn remove_extended_attribute(
14679 &self,
14680
14681 name: impl ::fidl_next::Encode<
14682 ::fidl_next::wire::Vector<'static, u8>,
14683 <___T as ::fidl_next::Transport>::SendBuffer,
14684 >,
14685 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14686 where
14687 <___T as ::fidl_next::Transport>::SendBuffer:
14688 ::fidl_next::encoder::InternalHandleEncoder,
14689 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14690 {
14691 self.remove_extended_attribute_with(
14692 crate::generic::NodeRemoveExtendedAttributeRequest { name },
14693 )
14694 }
14695
14696 #[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.WRITE_BYTES`] right.\n"]
14697 pub fn remove_extended_attribute_with<___R>(
14698 &self,
14699 request: ___R,
14700 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14701 where
14702 ___R: ::fidl_next::Encode<
14703 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
14704 <___T as ::fidl_next::Transport>::SendBuffer,
14705 >,
14706 {
14707 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14708 8794297771444732717,
14709 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14710 request,
14711 ))
14712 }
14713
14714 #[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"]
14715 pub fn read(
14716 &self,
14717
14718 count: impl ::fidl_next::Encode<
14719 ::fidl_next::wire::Uint64,
14720 <___T as ::fidl_next::Transport>::SendBuffer,
14721 >,
14722 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
14723 where
14724 <___T as ::fidl_next::Transport>::SendBuffer:
14725 ::fidl_next::encoder::InternalHandleEncoder,
14726 {
14727 self.read_with(crate::generic::ReadableReadRequest { count })
14728 }
14729
14730 #[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"]
14731 pub fn read_with<___R>(
14732 &self,
14733 request: ___R,
14734 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
14735 where
14736 ___R: ::fidl_next::Encode<
14737 crate::wire::ReadableReadRequest,
14738 <___T as ::fidl_next::Transport>::SendBuffer,
14739 >,
14740 {
14741 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14742 395825947633028830,
14743 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
14744 request,
14745 ))
14746 }
14747
14748 #[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"]
14749 pub fn write(
14750 &self,
14751
14752 data: impl ::fidl_next::Encode<
14753 ::fidl_next::wire::Vector<'static, u8>,
14754 <___T as ::fidl_next::Transport>::SendBuffer,
14755 >,
14756 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
14757 where
14758 <___T as ::fidl_next::Transport>::SendBuffer:
14759 ::fidl_next::encoder::InternalHandleEncoder,
14760 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14761 {
14762 self.write_with(crate::generic::WritableWriteRequest { data })
14763 }
14764
14765 #[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"]
14766 pub fn write_with<___R>(
14767 &self,
14768 request: ___R,
14769 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
14770 where
14771 ___R: ::fidl_next::Encode<
14772 crate::wire::WritableWriteRequest<'static>,
14773 <___T as ::fidl_next::Transport>::SendBuffer,
14774 >,
14775 {
14776 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14777 7651971425397809026,
14778 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
14779 request,
14780 ))
14781 }
14782
14783 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
14784 ::fidl_next::TwoWayFuture::from_untyped(
14785 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14786 7545125870053689020,
14787 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
14788 (),
14789 ),
14790 )
14791 }
14792
14793 #[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"]
14794 pub fn seek(
14795 &self,
14796
14797 origin: impl ::fidl_next::Encode<
14798 crate::wire::SeekOrigin,
14799 <___T as ::fidl_next::Transport>::SendBuffer,
14800 >,
14801
14802 offset: impl ::fidl_next::Encode<
14803 ::fidl_next::wire::Int64,
14804 <___T as ::fidl_next::Transport>::SendBuffer,
14805 >,
14806 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
14807 where
14808 <___T as ::fidl_next::Transport>::SendBuffer:
14809 ::fidl_next::encoder::InternalHandleEncoder,
14810 {
14811 self.seek_with(crate::generic::FileSeekRequest { origin, offset })
14812 }
14813
14814 #[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"]
14815 pub fn seek_with<___R>(
14816 &self,
14817 request: ___R,
14818 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
14819 where
14820 ___R: ::fidl_next::Encode<
14821 crate::wire::FileSeekRequest,
14822 <___T as ::fidl_next::Transport>::SendBuffer,
14823 >,
14824 {
14825 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14826 8649041485622956551,
14827 <super::Seek as ::fidl_next::Method>::FLEXIBILITY,
14828 request,
14829 ))
14830 }
14831
14832 #[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"]
14833 pub fn read_at(
14834 &self,
14835
14836 count: impl ::fidl_next::Encode<
14837 ::fidl_next::wire::Uint64,
14838 <___T as ::fidl_next::Transport>::SendBuffer,
14839 >,
14840
14841 offset: impl ::fidl_next::Encode<
14842 ::fidl_next::wire::Uint64,
14843 <___T as ::fidl_next::Transport>::SendBuffer,
14844 >,
14845 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
14846 where
14847 <___T as ::fidl_next::Transport>::SendBuffer:
14848 ::fidl_next::encoder::InternalHandleEncoder,
14849 {
14850 self.read_at_with(crate::generic::FileReadAtRequest { count, offset })
14851 }
14852
14853 #[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"]
14854 pub fn read_at_with<___R>(
14855 &self,
14856 request: ___R,
14857 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
14858 where
14859 ___R: ::fidl_next::Encode<
14860 crate::wire::FileReadAtRequest,
14861 <___T as ::fidl_next::Transport>::SendBuffer,
14862 >,
14863 {
14864 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14865 1587416148701180478,
14866 <super::ReadAt as ::fidl_next::Method>::FLEXIBILITY,
14867 request,
14868 ))
14869 }
14870
14871 #[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"]
14872 pub fn write_at(
14873 &self,
14874
14875 data: impl ::fidl_next::Encode<
14876 ::fidl_next::wire::Vector<'static, u8>,
14877 <___T as ::fidl_next::Transport>::SendBuffer,
14878 >,
14879
14880 offset: impl ::fidl_next::Encode<
14881 ::fidl_next::wire::Uint64,
14882 <___T as ::fidl_next::Transport>::SendBuffer,
14883 >,
14884 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
14885 where
14886 <___T as ::fidl_next::Transport>::SendBuffer:
14887 ::fidl_next::encoder::InternalHandleEncoder,
14888 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14889 {
14890 self.write_at_with(crate::generic::FileWriteAtRequest { data, offset })
14891 }
14892
14893 #[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"]
14894 pub fn write_at_with<___R>(
14895 &self,
14896 request: ___R,
14897 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
14898 where
14899 ___R: ::fidl_next::Encode<
14900 crate::wire::FileWriteAtRequest<'static>,
14901 <___T as ::fidl_next::Transport>::SendBuffer,
14902 >,
14903 {
14904 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14905 8736683935131400491,
14906 <super::WriteAt as ::fidl_next::Method>::FLEXIBILITY,
14907 request,
14908 ))
14909 }
14910
14911 #[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"]
14912 pub fn resize(
14913 &self,
14914
14915 length: impl ::fidl_next::Encode<
14916 ::fidl_next::wire::Uint64,
14917 <___T as ::fidl_next::Transport>::SendBuffer,
14918 >,
14919 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
14920 where
14921 <___T as ::fidl_next::Transport>::SendBuffer:
14922 ::fidl_next::encoder::InternalHandleEncoder,
14923 {
14924 self.resize_with(crate::generic::FileResizeRequest { length })
14925 }
14926
14927 #[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"]
14928 pub fn resize_with<___R>(
14929 &self,
14930 request: ___R,
14931 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
14932 where
14933 ___R: ::fidl_next::Encode<
14934 crate::wire::FileResizeRequest,
14935 <___T as ::fidl_next::Transport>::SendBuffer,
14936 >,
14937 {
14938 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14939 3134648685270758458,
14940 <super::Resize as ::fidl_next::Method>::FLEXIBILITY,
14941 request,
14942 ))
14943 }
14944
14945 #[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"]
14946 pub fn get_backing_memory(
14947 &self,
14948
14949 flags: impl ::fidl_next::Encode<
14950 crate::wire::VmoFlags,
14951 <___T as ::fidl_next::Transport>::SendBuffer,
14952 >,
14953 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
14954 where
14955 <___T as ::fidl_next::Transport>::SendBuffer:
14956 ::fidl_next::encoder::InternalHandleEncoder,
14957 {
14958 self.get_backing_memory_with(crate::generic::FileGetBackingMemoryRequest { flags })
14959 }
14960
14961 #[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"]
14962 pub fn get_backing_memory_with<___R>(
14963 &self,
14964 request: ___R,
14965 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
14966 where
14967 ___R: ::fidl_next::Encode<
14968 crate::wire::FileGetBackingMemoryRequest,
14969 <___T as ::fidl_next::Transport>::SendBuffer,
14970 >,
14971 {
14972 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14973 46911652864194091,
14974 <super::GetBackingMemory as ::fidl_next::Method>::FLEXIBILITY,
14975 request,
14976 ))
14977 }
14978
14979 #[doc = " Pre-allocate on-disk space for this file.\n"]
14980 pub fn allocate(
14981 &self,
14982
14983 offset: impl ::fidl_next::Encode<
14984 ::fidl_next::wire::Uint64,
14985 <___T as ::fidl_next::Transport>::SendBuffer,
14986 >,
14987
14988 length: impl ::fidl_next::Encode<
14989 ::fidl_next::wire::Uint64,
14990 <___T as ::fidl_next::Transport>::SendBuffer,
14991 >,
14992
14993 mode: impl ::fidl_next::Encode<
14994 crate::wire::AllocateMode,
14995 <___T as ::fidl_next::Transport>::SendBuffer,
14996 >,
14997 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
14998 where
14999 <___T as ::fidl_next::Transport>::SendBuffer:
15000 ::fidl_next::encoder::InternalHandleEncoder,
15001 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
15002 {
15003 self.allocate_with(crate::generic::FileAllocateRequest { offset, length, mode })
15004 }
15005
15006 #[doc = " Pre-allocate on-disk space for this file.\n"]
15007 pub fn allocate_with<___R>(
15008 &self,
15009 request: ___R,
15010 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
15011 where
15012 ___R: ::fidl_next::Encode<
15013 crate::wire::FileAllocateRequest,
15014 <___T as ::fidl_next::Transport>::SendBuffer,
15015 >,
15016 {
15017 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15018 8645235848064269614,
15019 <super::Allocate as ::fidl_next::Method>::FLEXIBILITY,
15020 request,
15021 ))
15022 }
15023
15024 #[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"]
15025 pub fn enable_verity(
15026 &self,
15027
15028 options: impl ::fidl_next::Encode<
15029 crate::wire::VerificationOptions<'static>,
15030 <___T as ::fidl_next::Transport>::SendBuffer,
15031 >,
15032 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
15033 where
15034 <___T as ::fidl_next::Transport>::SendBuffer:
15035 ::fidl_next::encoder::InternalHandleEncoder,
15036 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
15037 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
15038 {
15039 self.enable_verity_with(crate::generic::FileEnableVerityRequest { options })
15040 }
15041
15042 #[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"]
15043 pub fn enable_verity_with<___R>(
15044 &self,
15045 request: ___R,
15046 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
15047 where
15048 ___R: ::fidl_next::Encode<
15049 crate::wire::FileEnableVerityRequest<'static>,
15050 <___T as ::fidl_next::Transport>::SendBuffer,
15051 >,
15052 {
15053 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15054 3189145313204943035,
15055 <super::EnableVerity as ::fidl_next::Method>::FLEXIBILITY,
15056 request,
15057 ))
15058 }
15059 }
15060
15061 #[repr(transparent)]
15063 pub struct FileServer<___T: ::fidl_next::Transport> {
15064 server: ::fidl_next::protocol::Server<___T>,
15065 }
15066
15067 impl<___T> FileServer<___T>
15068 where
15069 ___T: ::fidl_next::Transport,
15070 {
15071 #[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"]
15072 pub fn on_open(
15073 &self,
15074
15075 s: impl ::fidl_next::Encode<
15076 ::fidl_next::wire::fuchsia::Status,
15077 <___T as ::fidl_next::Transport>::SendBuffer,
15078 >,
15079
15080 info: impl ::fidl_next::Encode<
15081 crate::wire_optional::NodeInfoDeprecated<'static>,
15082 <___T as ::fidl_next::Transport>::SendBuffer,
15083 >,
15084 ) -> ::fidl_next::SendFuture<'_, ___T>
15085 where
15086 <___T as ::fidl_next::Transport>::SendBuffer:
15087 ::fidl_next::encoder::InternalHandleEncoder,
15088 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
15089 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
15090 {
15091 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
15092 }
15093
15094 #[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"]
15095
15096 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
15097 where
15098 ___R: ::fidl_next::Encode<
15099 <super::OnOpen as ::fidl_next::Method>::Request,
15100 <___T as ::fidl_next::Transport>::SendBuffer,
15101 >,
15102 {
15103 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
15104 9207534335756671346,
15105 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
15106 request,
15107 ))
15108 }
15109
15110 #[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"]
15111
15112 pub fn on_representation_with<___R>(
15113 &self,
15114 request: ___R,
15115 ) -> ::fidl_next::SendFuture<'_, ___T>
15116 where
15117 ___R: ::fidl_next::Encode<
15118 <super::OnRepresentation as ::fidl_next::Method>::Request,
15119 <___T as ::fidl_next::Transport>::SendBuffer,
15120 >,
15121 {
15122 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
15123 6679970090861613324,
15124 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
15125 request,
15126 ))
15127 }
15128 }
15129 }
15130}
15131
15132#[diagnostic::on_unimplemented(
15133 note = "If {Self} implements the non-local FileClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
15134)]
15135
15136pub trait FileLocalClientHandler<
15140 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15141 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15142>
15143{
15144 #[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"]
15145 fn on_open(
15146 &mut self,
15147
15148 request: ::fidl_next::Request<file::OnOpen, ___T>,
15149 ) -> impl ::core::future::Future<Output = ()>;
15150
15151 #[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"]
15152 fn on_representation(
15153 &mut self,
15154
15155 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
15156 ) -> impl ::core::future::Future<Output = ()>;
15157
15158 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15159 ::core::future::ready(())
15160 }
15161}
15162
15163impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for File
15164where
15165 ___H: FileLocalClientHandler<___T>,
15166 ___T: ::fidl_next::Transport,
15167 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
15168 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15169 Constraint = (),
15170 >,
15171 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
15172 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15173 Constraint = (),
15174 >,
15175{
15176 async fn on_event(
15177 handler: &mut ___H,
15178 mut message: ::fidl_next::Message<___T>,
15179 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15180 match *message.header().ordinal {
15181 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
15182 Ok(decoded) => {
15183 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
15184 Ok(())
15185 }
15186 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15187 ordinal: 9207534335756671346,
15188 error,
15189 }),
15190 },
15191
15192 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
15193 Ok(decoded) => {
15194 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
15195 Ok(())
15196 }
15197 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15198 ordinal: 6679970090861613324,
15199 error,
15200 }),
15201 },
15202
15203 ordinal => {
15204 handler.on_unknown_interaction(ordinal).await;
15205 if ::core::matches!(
15206 message.header().flexibility(),
15207 ::fidl_next::protocol::Flexibility::Strict
15208 ) {
15209 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15210 } else {
15211 Ok(())
15212 }
15213 }
15214 }
15215 }
15216}
15217
15218#[diagnostic::on_unimplemented(
15219 note = "If {Self} implements the non-local FileServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
15220)]
15221
15222pub trait FileLocalServerHandler<
15226 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
15227 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15228>
15229{
15230 #[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"]
15231 fn advisory_lock(
15232 &mut self,
15233
15234 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
15235
15236 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
15237 ) -> impl ::core::future::Future<Output = ()>;
15238
15239 #[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"]
15240 fn link_into(
15241 &mut self,
15242
15243 request: ::fidl_next::Request<file::LinkInto, ___T>,
15244
15245 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
15246 ) -> impl ::core::future::Future<Output = ()>;
15247
15248 fn clone(
15249 &mut self,
15250
15251 request: ::fidl_next::Request<file::Clone, ___T>,
15252 ) -> impl ::core::future::Future<Output = ()>;
15253
15254 #[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"]
15255 fn close(
15256 &mut self,
15257
15258 responder: ::fidl_next::Responder<file::Close, ___T>,
15259 ) -> impl ::core::future::Future<Output = ()>;
15260
15261 fn query(
15262 &mut self,
15263
15264 responder: ::fidl_next::Responder<file::Query, ___T>,
15265 ) -> impl ::core::future::Future<Output = ()>;
15266
15267 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
15268 fn deprecated_clone(
15269 &mut self,
15270
15271 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
15272 ) -> impl ::core::future::Future<Output = ()>;
15273
15274 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
15275 fn deprecated_get_attr(
15276 &mut self,
15277
15278 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
15279 ) -> impl ::core::future::Future<Output = ()>;
15280
15281 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
15282 fn deprecated_set_attr(
15283 &mut self,
15284
15285 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
15286
15287 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
15288 ) -> impl ::core::future::Future<Output = ()>;
15289
15290 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
15291 fn deprecated_get_flags(
15292 &mut self,
15293
15294 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
15295 ) -> impl ::core::future::Future<Output = ()>;
15296
15297 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
15298 fn deprecated_set_flags(
15299 &mut self,
15300
15301 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
15302
15303 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
15304 ) -> impl ::core::future::Future<Output = ()>;
15305
15306 #[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"]
15307 fn get_flags(
15308 &mut self,
15309
15310 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
15311 ) -> impl ::core::future::Future<Output = ()>;
15312
15313 #[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"]
15314 fn set_flags(
15315 &mut self,
15316
15317 request: ::fidl_next::Request<file::SetFlags, ___T>,
15318
15319 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
15320 ) -> impl ::core::future::Future<Output = ()>;
15321
15322 #[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"]
15323 fn query_filesystem(
15324 &mut self,
15325
15326 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
15327 ) -> impl ::core::future::Future<Output = ()>;
15328
15329 #[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"]
15330 fn get_attributes(
15331 &mut self,
15332
15333 request: ::fidl_next::Request<file::GetAttributes, ___T>,
15334
15335 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
15336 ) -> impl ::core::future::Future<Output = ()>;
15337
15338 #[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"]
15339 fn update_attributes(
15340 &mut self,
15341
15342 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
15343
15344 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
15345 ) -> impl ::core::future::Future<Output = ()>;
15346
15347 #[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"]
15348 fn sync(
15349 &mut self,
15350
15351 responder: ::fidl_next::Responder<file::Sync, ___T>,
15352 ) -> impl ::core::future::Future<Output = ()>;
15353
15354 #[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.READ_BYTES`] right.\n"]
15355 fn list_extended_attributes(
15356 &mut self,
15357
15358 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
15359 ) -> impl ::core::future::Future<Output = ()>;
15360
15361 #[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.READ_BYTES`] right.\n"]
15362 fn get_extended_attribute(
15363 &mut self,
15364
15365 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
15366
15367 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
15368 ) -> impl ::core::future::Future<Output = ()>;
15369
15370 #[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.WRITE_BYTES`] right.\n"]
15371 fn set_extended_attribute(
15372 &mut self,
15373
15374 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
15375
15376 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
15377 ) -> impl ::core::future::Future<Output = ()>;
15378
15379 #[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.WRITE_BYTES`] right.\n"]
15380 fn remove_extended_attribute(
15381 &mut self,
15382
15383 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
15384
15385 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
15386 ) -> impl ::core::future::Future<Output = ()>;
15387
15388 #[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"]
15389 fn read(
15390 &mut self,
15391
15392 request: ::fidl_next::Request<file::Read, ___T>,
15393
15394 responder: ::fidl_next::Responder<file::Read, ___T>,
15395 ) -> impl ::core::future::Future<Output = ()>;
15396
15397 #[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"]
15398 fn write(
15399 &mut self,
15400
15401 request: ::fidl_next::Request<file::Write, ___T>,
15402
15403 responder: ::fidl_next::Responder<file::Write, ___T>,
15404 ) -> impl ::core::future::Future<Output = ()>;
15405
15406 fn describe(
15407 &mut self,
15408
15409 responder: ::fidl_next::Responder<file::Describe, ___T>,
15410 ) -> impl ::core::future::Future<Output = ()>;
15411
15412 #[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"]
15413 fn seek(
15414 &mut self,
15415
15416 request: ::fidl_next::Request<file::Seek, ___T>,
15417
15418 responder: ::fidl_next::Responder<file::Seek, ___T>,
15419 ) -> impl ::core::future::Future<Output = ()>;
15420
15421 #[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"]
15422 fn read_at(
15423 &mut self,
15424
15425 request: ::fidl_next::Request<file::ReadAt, ___T>,
15426
15427 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
15428 ) -> impl ::core::future::Future<Output = ()>;
15429
15430 #[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"]
15431 fn write_at(
15432 &mut self,
15433
15434 request: ::fidl_next::Request<file::WriteAt, ___T>,
15435
15436 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
15437 ) -> impl ::core::future::Future<Output = ()>;
15438
15439 #[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"]
15440 fn resize(
15441 &mut self,
15442
15443 request: ::fidl_next::Request<file::Resize, ___T>,
15444
15445 responder: ::fidl_next::Responder<file::Resize, ___T>,
15446 ) -> impl ::core::future::Future<Output = ()>;
15447
15448 #[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"]
15449 fn get_backing_memory(
15450 &mut self,
15451
15452 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
15453
15454 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
15455 ) -> impl ::core::future::Future<Output = ()>;
15456
15457 #[doc = " Pre-allocate on-disk space for this file.\n"]
15458 fn allocate(
15459 &mut self,
15460
15461 request: ::fidl_next::Request<file::Allocate, ___T>,
15462
15463 responder: ::fidl_next::Responder<file::Allocate, ___T>,
15464 ) -> impl ::core::future::Future<Output = ()>;
15465
15466 #[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"]
15467 fn enable_verity(
15468 &mut self,
15469
15470 request: ::fidl_next::Request<file::EnableVerity, ___T>,
15471
15472 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
15473 ) -> impl ::core::future::Future<Output = ()>;
15474
15475 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15476 ::core::future::ready(())
15477 }
15478}
15479
15480impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for File
15481where
15482 ___H: FileLocalServerHandler<___T>,
15483 ___T: ::fidl_next::Transport,
15484 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
15485 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15486 Constraint = (),
15487 >,
15488 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
15489 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15490 Constraint = (),
15491 >,
15492 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
15493 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15494 Constraint = (),
15495 >,
15496 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
15497 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15498 Constraint = (),
15499 >,
15500 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
15501 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15502 Constraint = (),
15503 >,
15504 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
15505 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15506 Constraint = (),
15507 >,
15508 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
15509 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15510 Constraint = (),
15511 >,
15512 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
15513 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15514 Constraint = (),
15515 >,
15516 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
15517 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15518 Constraint = (),
15519 >,
15520 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
15521 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15522 Constraint = (),
15523 >,
15524 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15525 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15526 Constraint = (),
15527 >,
15528 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15529 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15530 Constraint = (),
15531 >,
15532 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15533 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15534 Constraint = (),
15535 >,
15536 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
15537 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15538 Constraint = (),
15539 >,
15540 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
15541 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15542 Constraint = (),
15543 >,
15544 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
15545 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15546 Constraint = (),
15547 >,
15548 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
15549 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15550 Constraint = (),
15551 >,
15552 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
15553 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15554 Constraint = (),
15555 >,
15556 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
15557 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15558 Constraint = (),
15559 >,
15560 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
15561 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15562 Constraint = (),
15563 >,
15564 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
15565 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15566 Constraint = (),
15567 >,
15568 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
15569 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15570 Constraint = (),
15571 >,
15572{
15573 async fn on_one_way(
15574 handler: &mut ___H,
15575 mut message: ::fidl_next::Message<___T>,
15576 ) -> ::core::result::Result<
15577 (),
15578 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15579 > {
15580 match *message.header().ordinal {
15581 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
15582 Ok(decoded) => {
15583 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
15584 Ok(())
15585 }
15586 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15587 ordinal: 2366825959783828089,
15588 error,
15589 }),
15590 },
15591
15592 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
15593 Ok(decoded) => {
15594 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
15595 Ok(())
15596 }
15597 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15598 ordinal: 6512600400724287855,
15599 error,
15600 }),
15601 },
15602
15603 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
15604 Ok(decoded) => {
15605 handler
15606 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
15607 .await;
15608 Ok(())
15609 }
15610 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15611 ordinal: 5431626189872037072,
15612 error,
15613 }),
15614 },
15615
15616 ordinal => {
15617 handler.on_unknown_interaction(ordinal).await;
15618 if ::core::matches!(
15619 message.header().flexibility(),
15620 ::fidl_next::protocol::Flexibility::Strict
15621 ) {
15622 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15623 } else {
15624 Ok(())
15625 }
15626 }
15627 }
15628 }
15629
15630 async fn on_two_way(
15631 handler: &mut ___H,
15632 mut message: ::fidl_next::Message<___T>,
15633 responder: ::fidl_next::protocol::Responder<___T>,
15634 ) -> ::core::result::Result<
15635 (),
15636 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15637 > {
15638 match *message.header().ordinal {
15639 7992130864415541162 => {
15640 let responder = ::fidl_next::Responder::from_untyped(responder);
15641
15642 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15643 Ok(decoded) => {
15644 handler
15645 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
15646 .await;
15647 Ok(())
15648 }
15649 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15650 ordinal: 7992130864415541162,
15651 error,
15652 }),
15653 }
15654 }
15655
15656 6121399674497678964 => {
15657 let responder = ::fidl_next::Responder::from_untyped(responder);
15658
15659 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15660 Ok(decoded) => {
15661 handler
15662 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
15663 .await;
15664 Ok(())
15665 }
15666 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15667 ordinal: 6121399674497678964,
15668 error,
15669 }),
15670 }
15671 }
15672
15673 6540867515453498750 => {
15674 let responder = ::fidl_next::Responder::from_untyped(responder);
15675
15676 handler.close(responder).await;
15677 Ok(())
15678 }
15679
15680 2763219980499352582 => {
15681 let responder = ::fidl_next::Responder::from_untyped(responder);
15682
15683 handler.query(responder).await;
15684 Ok(())
15685 }
15686
15687 8689798978500614909 => {
15688 let responder = ::fidl_next::Responder::from_untyped(responder);
15689
15690 handler.deprecated_get_attr(responder).await;
15691 Ok(())
15692 }
15693
15694 4721673413776871238 => {
15695 let responder = ::fidl_next::Responder::from_untyped(responder);
15696
15697 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15698 Ok(decoded) => {
15699 handler
15700 .deprecated_set_attr(
15701 ::fidl_next::Request::from_decoded(decoded),
15702 responder,
15703 )
15704 .await;
15705 Ok(())
15706 }
15707 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15708 ordinal: 4721673413776871238,
15709 error,
15710 }),
15711 }
15712 }
15713
15714 6595803110182632097 => {
15715 let responder = ::fidl_next::Responder::from_untyped(responder);
15716
15717 handler.deprecated_get_flags(responder).await;
15718 Ok(())
15719 }
15720
15721 5950864159036794675 => {
15722 let responder = ::fidl_next::Responder::from_untyped(responder);
15723
15724 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15725 Ok(decoded) => {
15726 handler
15727 .deprecated_set_flags(
15728 ::fidl_next::Request::from_decoded(decoded),
15729 responder,
15730 )
15731 .await;
15732 Ok(())
15733 }
15734 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15735 ordinal: 5950864159036794675,
15736 error,
15737 }),
15738 }
15739 }
15740
15741 105530239381466147 => {
15742 let responder = ::fidl_next::Responder::from_untyped(responder);
15743
15744 handler.get_flags(responder).await;
15745 Ok(())
15746 }
15747
15748 6172186066099445416 => {
15749 let responder = ::fidl_next::Responder::from_untyped(responder);
15750
15751 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15752 Ok(decoded) => {
15753 handler
15754 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
15755 .await;
15756 Ok(())
15757 }
15758 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15759 ordinal: 6172186066099445416,
15760 error,
15761 }),
15762 }
15763 }
15764
15765 8013111122914313744 => {
15766 let responder = ::fidl_next::Responder::from_untyped(responder);
15767
15768 handler.query_filesystem(responder).await;
15769 Ok(())
15770 }
15771
15772 4414537700416816443 => {
15773 let responder = ::fidl_next::Responder::from_untyped(responder);
15774
15775 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15776 Ok(decoded) => {
15777 handler
15778 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
15779 .await;
15780 Ok(())
15781 }
15782 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15783 ordinal: 4414537700416816443,
15784 error,
15785 }),
15786 }
15787 }
15788
15789 3677402239314018056 => {
15790 let responder = ::fidl_next::Responder::from_untyped(responder);
15791
15792 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15793 Ok(decoded) => {
15794 handler
15795 .update_attributes(
15796 ::fidl_next::Request::from_decoded(decoded),
15797 responder,
15798 )
15799 .await;
15800 Ok(())
15801 }
15802 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15803 ordinal: 3677402239314018056,
15804 error,
15805 }),
15806 }
15807 }
15808
15809 3196473584242777161 => {
15810 let responder = ::fidl_next::Responder::from_untyped(responder);
15811
15812 handler.sync(responder).await;
15813 Ok(())
15814 }
15815
15816 5043930208506967771 => {
15817 let responder = ::fidl_next::Responder::from_untyped(responder);
15818
15819 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15820 Ok(decoded) => {
15821 handler
15822 .get_extended_attribute(
15823 ::fidl_next::Request::from_decoded(decoded),
15824 responder,
15825 )
15826 .await;
15827 Ok(())
15828 }
15829 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15830 ordinal: 5043930208506967771,
15831 error,
15832 }),
15833 }
15834 }
15835
15836 5374223046099989052 => {
15837 let responder = ::fidl_next::Responder::from_untyped(responder);
15838
15839 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15840 Ok(decoded) => {
15841 handler
15842 .set_extended_attribute(
15843 ::fidl_next::Request::from_decoded(decoded),
15844 responder,
15845 )
15846 .await;
15847 Ok(())
15848 }
15849 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15850 ordinal: 5374223046099989052,
15851 error,
15852 }),
15853 }
15854 }
15855
15856 8794297771444732717 => {
15857 let responder = ::fidl_next::Responder::from_untyped(responder);
15858
15859 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15860 Ok(decoded) => {
15861 handler
15862 .remove_extended_attribute(
15863 ::fidl_next::Request::from_decoded(decoded),
15864 responder,
15865 )
15866 .await;
15867 Ok(())
15868 }
15869 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15870 ordinal: 8794297771444732717,
15871 error,
15872 }),
15873 }
15874 }
15875
15876 395825947633028830 => {
15877 let responder = ::fidl_next::Responder::from_untyped(responder);
15878
15879 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15880 Ok(decoded) => {
15881 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
15882 Ok(())
15883 }
15884 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15885 ordinal: 395825947633028830,
15886 error,
15887 }),
15888 }
15889 }
15890
15891 7651971425397809026 => {
15892 let responder = ::fidl_next::Responder::from_untyped(responder);
15893
15894 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15895 Ok(decoded) => {
15896 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
15897 Ok(())
15898 }
15899 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15900 ordinal: 7651971425397809026,
15901 error,
15902 }),
15903 }
15904 }
15905
15906 7545125870053689020 => {
15907 let responder = ::fidl_next::Responder::from_untyped(responder);
15908
15909 handler.describe(responder).await;
15910 Ok(())
15911 }
15912
15913 8649041485622956551 => {
15914 let responder = ::fidl_next::Responder::from_untyped(responder);
15915
15916 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15917 Ok(decoded) => {
15918 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
15919 Ok(())
15920 }
15921 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15922 ordinal: 8649041485622956551,
15923 error,
15924 }),
15925 }
15926 }
15927
15928 1587416148701180478 => {
15929 let responder = ::fidl_next::Responder::from_untyped(responder);
15930
15931 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15932 Ok(decoded) => {
15933 handler
15934 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
15935 .await;
15936 Ok(())
15937 }
15938 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15939 ordinal: 1587416148701180478,
15940 error,
15941 }),
15942 }
15943 }
15944
15945 8736683935131400491 => {
15946 let responder = ::fidl_next::Responder::from_untyped(responder);
15947
15948 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15949 Ok(decoded) => {
15950 handler
15951 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
15952 .await;
15953 Ok(())
15954 }
15955 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15956 ordinal: 8736683935131400491,
15957 error,
15958 }),
15959 }
15960 }
15961
15962 3134648685270758458 => {
15963 let responder = ::fidl_next::Responder::from_untyped(responder);
15964
15965 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15966 Ok(decoded) => {
15967 handler
15968 .resize(::fidl_next::Request::from_decoded(decoded), responder)
15969 .await;
15970 Ok(())
15971 }
15972 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15973 ordinal: 3134648685270758458,
15974 error,
15975 }),
15976 }
15977 }
15978
15979 46911652864194091 => {
15980 let responder = ::fidl_next::Responder::from_untyped(responder);
15981
15982 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15983 Ok(decoded) => {
15984 handler
15985 .get_backing_memory(
15986 ::fidl_next::Request::from_decoded(decoded),
15987 responder,
15988 )
15989 .await;
15990 Ok(())
15991 }
15992 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15993 ordinal: 46911652864194091,
15994 error,
15995 }),
15996 }
15997 }
15998
15999 8645235848064269614 => {
16000 let responder = ::fidl_next::Responder::from_untyped(responder);
16001
16002 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16003 Ok(decoded) => {
16004 handler
16005 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
16006 .await;
16007 Ok(())
16008 }
16009 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16010 ordinal: 8645235848064269614,
16011 error,
16012 }),
16013 }
16014 }
16015
16016 3189145313204943035 => {
16017 let responder = ::fidl_next::Responder::from_untyped(responder);
16018
16019 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16020 Ok(decoded) => {
16021 handler
16022 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
16023 .await;
16024 Ok(())
16025 }
16026 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16027 ordinal: 3189145313204943035,
16028 error,
16029 }),
16030 }
16031 }
16032
16033 ordinal => {
16034 handler.on_unknown_interaction(ordinal).await;
16035 if ::core::matches!(
16036 message.header().flexibility(),
16037 ::fidl_next::protocol::Flexibility::Strict
16038 ) {
16039 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16040 } else {
16041 responder
16042 .respond_framework_error(
16043 ordinal,
16044 ::fidl_next::FrameworkError::UnknownMethod,
16045 )
16046 .expect("encoding a framework error should never fail")
16047 .await?;
16048 Ok(())
16049 }
16050 }
16051 }
16052 }
16053}
16054
16055pub trait FileClientHandler<
16059 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16060 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16061>
16062{
16063 #[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"]
16064 fn on_open(
16065 &mut self,
16066
16067 request: ::fidl_next::Request<file::OnOpen, ___T>,
16068 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16069
16070 #[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"]
16071 fn on_representation(
16072 &mut self,
16073
16074 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
16075 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16076
16077 fn on_unknown_interaction(
16078 &mut self,
16079 ordinal: u64,
16080 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16081 ::core::future::ready(())
16082 }
16083}
16084
16085impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for File
16086where
16087 ___H: FileClientHandler<___T> + ::core::marker::Send,
16088 ___T: ::fidl_next::Transport,
16089 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
16090 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16091 Constraint = (),
16092 >,
16093 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
16094 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16095 Constraint = (),
16096 >,
16097{
16098 async fn on_event(
16099 handler: &mut ___H,
16100 mut message: ::fidl_next::Message<___T>,
16101 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
16102 match *message.header().ordinal {
16103 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16104 Ok(decoded) => {
16105 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
16106 Ok(())
16107 }
16108 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16109 ordinal: 9207534335756671346,
16110 error,
16111 }),
16112 },
16113
16114 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16115 Ok(decoded) => {
16116 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
16117 Ok(())
16118 }
16119 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16120 ordinal: 6679970090861613324,
16121 error,
16122 }),
16123 },
16124
16125 ordinal => {
16126 handler.on_unknown_interaction(ordinal).await;
16127 if ::core::matches!(
16128 message.header().flexibility(),
16129 ::fidl_next::protocol::Flexibility::Strict
16130 ) {
16131 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16132 } else {
16133 Ok(())
16134 }
16135 }
16136 }
16137 }
16138}
16139
16140pub trait FileServerHandler<
16144 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16145 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16146>
16147{
16148 #[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"]
16149 fn advisory_lock(
16150 &mut self,
16151
16152 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
16153
16154 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
16155 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16156
16157 #[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"]
16158 fn link_into(
16159 &mut self,
16160
16161 request: ::fidl_next::Request<file::LinkInto, ___T>,
16162
16163 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
16164 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16165
16166 fn clone(
16167 &mut self,
16168
16169 request: ::fidl_next::Request<file::Clone, ___T>,
16170 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16171
16172 #[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"]
16173 fn close(
16174 &mut self,
16175
16176 responder: ::fidl_next::Responder<file::Close, ___T>,
16177 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16178
16179 fn query(
16180 &mut self,
16181
16182 responder: ::fidl_next::Responder<file::Query, ___T>,
16183 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16184
16185 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
16186 fn deprecated_clone(
16187 &mut self,
16188
16189 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
16190 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16191
16192 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
16193 fn deprecated_get_attr(
16194 &mut self,
16195
16196 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
16197 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16198
16199 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
16200 fn deprecated_set_attr(
16201 &mut self,
16202
16203 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
16204
16205 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
16206 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16207
16208 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
16209 fn deprecated_get_flags(
16210 &mut self,
16211
16212 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
16213 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16214
16215 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
16216 fn deprecated_set_flags(
16217 &mut self,
16218
16219 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
16220
16221 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
16222 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16223
16224 #[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"]
16225 fn get_flags(
16226 &mut self,
16227
16228 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
16229 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16230
16231 #[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"]
16232 fn set_flags(
16233 &mut self,
16234
16235 request: ::fidl_next::Request<file::SetFlags, ___T>,
16236
16237 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
16238 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16239
16240 #[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"]
16241 fn query_filesystem(
16242 &mut self,
16243
16244 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
16245 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16246
16247 #[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"]
16248 fn get_attributes(
16249 &mut self,
16250
16251 request: ::fidl_next::Request<file::GetAttributes, ___T>,
16252
16253 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
16254 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16255
16256 #[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"]
16257 fn update_attributes(
16258 &mut self,
16259
16260 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
16261
16262 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
16263 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16264
16265 #[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"]
16266 fn sync(
16267 &mut self,
16268
16269 responder: ::fidl_next::Responder<file::Sync, ___T>,
16270 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16271
16272 #[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.READ_BYTES`] right.\n"]
16273 fn list_extended_attributes(
16274 &mut self,
16275
16276 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
16277 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16278
16279 #[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.READ_BYTES`] right.\n"]
16280 fn get_extended_attribute(
16281 &mut self,
16282
16283 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
16284
16285 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
16286 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16287
16288 #[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.WRITE_BYTES`] right.\n"]
16289 fn set_extended_attribute(
16290 &mut self,
16291
16292 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
16293
16294 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
16295 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16296
16297 #[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.WRITE_BYTES`] right.\n"]
16298 fn remove_extended_attribute(
16299 &mut self,
16300
16301 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
16302
16303 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
16304 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16305
16306 #[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"]
16307 fn read(
16308 &mut self,
16309
16310 request: ::fidl_next::Request<file::Read, ___T>,
16311
16312 responder: ::fidl_next::Responder<file::Read, ___T>,
16313 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16314
16315 #[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"]
16316 fn write(
16317 &mut self,
16318
16319 request: ::fidl_next::Request<file::Write, ___T>,
16320
16321 responder: ::fidl_next::Responder<file::Write, ___T>,
16322 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16323
16324 fn describe(
16325 &mut self,
16326
16327 responder: ::fidl_next::Responder<file::Describe, ___T>,
16328 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16329
16330 #[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"]
16331 fn seek(
16332 &mut self,
16333
16334 request: ::fidl_next::Request<file::Seek, ___T>,
16335
16336 responder: ::fidl_next::Responder<file::Seek, ___T>,
16337 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16338
16339 #[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"]
16340 fn read_at(
16341 &mut self,
16342
16343 request: ::fidl_next::Request<file::ReadAt, ___T>,
16344
16345 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
16346 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16347
16348 #[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"]
16349 fn write_at(
16350 &mut self,
16351
16352 request: ::fidl_next::Request<file::WriteAt, ___T>,
16353
16354 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
16355 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16356
16357 #[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"]
16358 fn resize(
16359 &mut self,
16360
16361 request: ::fidl_next::Request<file::Resize, ___T>,
16362
16363 responder: ::fidl_next::Responder<file::Resize, ___T>,
16364 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16365
16366 #[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"]
16367 fn get_backing_memory(
16368 &mut self,
16369
16370 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
16371
16372 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
16373 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16374
16375 #[doc = " Pre-allocate on-disk space for this file.\n"]
16376 fn allocate(
16377 &mut self,
16378
16379 request: ::fidl_next::Request<file::Allocate, ___T>,
16380
16381 responder: ::fidl_next::Responder<file::Allocate, ___T>,
16382 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16383
16384 #[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"]
16385 fn enable_verity(
16386 &mut self,
16387
16388 request: ::fidl_next::Request<file::EnableVerity, ___T>,
16389
16390 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
16391 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16392
16393 fn on_unknown_interaction(
16394 &mut self,
16395 ordinal: u64,
16396 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16397 ::core::future::ready(())
16398 }
16399}
16400
16401impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for File
16402where
16403 ___H: FileServerHandler<___T> + ::core::marker::Send,
16404 ___T: ::fidl_next::Transport,
16405 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
16406 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16407 Constraint = (),
16408 >,
16409 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
16410 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16411 Constraint = (),
16412 >,
16413 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
16414 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16415 Constraint = (),
16416 >,
16417 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
16418 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16419 Constraint = (),
16420 >,
16421 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
16422 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16423 Constraint = (),
16424 >,
16425 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
16426 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16427 Constraint = (),
16428 >,
16429 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
16430 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16431 Constraint = (),
16432 >,
16433 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
16434 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16435 Constraint = (),
16436 >,
16437 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
16438 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16439 Constraint = (),
16440 >,
16441 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
16442 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16443 Constraint = (),
16444 >,
16445 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16446 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16447 Constraint = (),
16448 >,
16449 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16450 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16451 Constraint = (),
16452 >,
16453 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16454 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16455 Constraint = (),
16456 >,
16457 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
16458 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16459 Constraint = (),
16460 >,
16461 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
16462 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16463 Constraint = (),
16464 >,
16465 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
16466 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16467 Constraint = (),
16468 >,
16469 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
16470 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16471 Constraint = (),
16472 >,
16473 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
16474 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16475 Constraint = (),
16476 >,
16477 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
16478 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16479 Constraint = (),
16480 >,
16481 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
16482 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16483 Constraint = (),
16484 >,
16485 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
16486 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16487 Constraint = (),
16488 >,
16489 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
16490 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16491 Constraint = (),
16492 >,
16493{
16494 async fn on_one_way(
16495 handler: &mut ___H,
16496 mut message: ::fidl_next::Message<___T>,
16497 ) -> ::core::result::Result<
16498 (),
16499 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16500 > {
16501 match *message.header().ordinal {
16502 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16503 Ok(decoded) => {
16504 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
16505 Ok(())
16506 }
16507 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16508 ordinal: 2366825959783828089,
16509 error,
16510 }),
16511 },
16512
16513 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16514 Ok(decoded) => {
16515 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
16516 Ok(())
16517 }
16518 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16519 ordinal: 6512600400724287855,
16520 error,
16521 }),
16522 },
16523
16524 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16525 Ok(decoded) => {
16526 handler
16527 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
16528 .await;
16529 Ok(())
16530 }
16531 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16532 ordinal: 5431626189872037072,
16533 error,
16534 }),
16535 },
16536
16537 ordinal => {
16538 handler.on_unknown_interaction(ordinal).await;
16539 if ::core::matches!(
16540 message.header().flexibility(),
16541 ::fidl_next::protocol::Flexibility::Strict
16542 ) {
16543 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16544 } else {
16545 Ok(())
16546 }
16547 }
16548 }
16549 }
16550
16551 async fn on_two_way(
16552 handler: &mut ___H,
16553 mut message: ::fidl_next::Message<___T>,
16554 responder: ::fidl_next::protocol::Responder<___T>,
16555 ) -> ::core::result::Result<
16556 (),
16557 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16558 > {
16559 match *message.header().ordinal {
16560 7992130864415541162 => {
16561 let responder = ::fidl_next::Responder::from_untyped(responder);
16562
16563 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16564 Ok(decoded) => {
16565 handler
16566 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
16567 .await;
16568 Ok(())
16569 }
16570 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16571 ordinal: 7992130864415541162,
16572 error,
16573 }),
16574 }
16575 }
16576
16577 6121399674497678964 => {
16578 let responder = ::fidl_next::Responder::from_untyped(responder);
16579
16580 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16581 Ok(decoded) => {
16582 handler
16583 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
16584 .await;
16585 Ok(())
16586 }
16587 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16588 ordinal: 6121399674497678964,
16589 error,
16590 }),
16591 }
16592 }
16593
16594 6540867515453498750 => {
16595 let responder = ::fidl_next::Responder::from_untyped(responder);
16596
16597 handler.close(responder).await;
16598 Ok(())
16599 }
16600
16601 2763219980499352582 => {
16602 let responder = ::fidl_next::Responder::from_untyped(responder);
16603
16604 handler.query(responder).await;
16605 Ok(())
16606 }
16607
16608 8689798978500614909 => {
16609 let responder = ::fidl_next::Responder::from_untyped(responder);
16610
16611 handler.deprecated_get_attr(responder).await;
16612 Ok(())
16613 }
16614
16615 4721673413776871238 => {
16616 let responder = ::fidl_next::Responder::from_untyped(responder);
16617
16618 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16619 Ok(decoded) => {
16620 handler
16621 .deprecated_set_attr(
16622 ::fidl_next::Request::from_decoded(decoded),
16623 responder,
16624 )
16625 .await;
16626 Ok(())
16627 }
16628 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16629 ordinal: 4721673413776871238,
16630 error,
16631 }),
16632 }
16633 }
16634
16635 6595803110182632097 => {
16636 let responder = ::fidl_next::Responder::from_untyped(responder);
16637
16638 handler.deprecated_get_flags(responder).await;
16639 Ok(())
16640 }
16641
16642 5950864159036794675 => {
16643 let responder = ::fidl_next::Responder::from_untyped(responder);
16644
16645 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16646 Ok(decoded) => {
16647 handler
16648 .deprecated_set_flags(
16649 ::fidl_next::Request::from_decoded(decoded),
16650 responder,
16651 )
16652 .await;
16653 Ok(())
16654 }
16655 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16656 ordinal: 5950864159036794675,
16657 error,
16658 }),
16659 }
16660 }
16661
16662 105530239381466147 => {
16663 let responder = ::fidl_next::Responder::from_untyped(responder);
16664
16665 handler.get_flags(responder).await;
16666 Ok(())
16667 }
16668
16669 6172186066099445416 => {
16670 let responder = ::fidl_next::Responder::from_untyped(responder);
16671
16672 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16673 Ok(decoded) => {
16674 handler
16675 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
16676 .await;
16677 Ok(())
16678 }
16679 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16680 ordinal: 6172186066099445416,
16681 error,
16682 }),
16683 }
16684 }
16685
16686 8013111122914313744 => {
16687 let responder = ::fidl_next::Responder::from_untyped(responder);
16688
16689 handler.query_filesystem(responder).await;
16690 Ok(())
16691 }
16692
16693 4414537700416816443 => {
16694 let responder = ::fidl_next::Responder::from_untyped(responder);
16695
16696 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16697 Ok(decoded) => {
16698 handler
16699 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
16700 .await;
16701 Ok(())
16702 }
16703 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16704 ordinal: 4414537700416816443,
16705 error,
16706 }),
16707 }
16708 }
16709
16710 3677402239314018056 => {
16711 let responder = ::fidl_next::Responder::from_untyped(responder);
16712
16713 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16714 Ok(decoded) => {
16715 handler
16716 .update_attributes(
16717 ::fidl_next::Request::from_decoded(decoded),
16718 responder,
16719 )
16720 .await;
16721 Ok(())
16722 }
16723 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16724 ordinal: 3677402239314018056,
16725 error,
16726 }),
16727 }
16728 }
16729
16730 3196473584242777161 => {
16731 let responder = ::fidl_next::Responder::from_untyped(responder);
16732
16733 handler.sync(responder).await;
16734 Ok(())
16735 }
16736
16737 5043930208506967771 => {
16738 let responder = ::fidl_next::Responder::from_untyped(responder);
16739
16740 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16741 Ok(decoded) => {
16742 handler
16743 .get_extended_attribute(
16744 ::fidl_next::Request::from_decoded(decoded),
16745 responder,
16746 )
16747 .await;
16748 Ok(())
16749 }
16750 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16751 ordinal: 5043930208506967771,
16752 error,
16753 }),
16754 }
16755 }
16756
16757 5374223046099989052 => {
16758 let responder = ::fidl_next::Responder::from_untyped(responder);
16759
16760 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16761 Ok(decoded) => {
16762 handler
16763 .set_extended_attribute(
16764 ::fidl_next::Request::from_decoded(decoded),
16765 responder,
16766 )
16767 .await;
16768 Ok(())
16769 }
16770 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16771 ordinal: 5374223046099989052,
16772 error,
16773 }),
16774 }
16775 }
16776
16777 8794297771444732717 => {
16778 let responder = ::fidl_next::Responder::from_untyped(responder);
16779
16780 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16781 Ok(decoded) => {
16782 handler
16783 .remove_extended_attribute(
16784 ::fidl_next::Request::from_decoded(decoded),
16785 responder,
16786 )
16787 .await;
16788 Ok(())
16789 }
16790 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16791 ordinal: 8794297771444732717,
16792 error,
16793 }),
16794 }
16795 }
16796
16797 395825947633028830 => {
16798 let responder = ::fidl_next::Responder::from_untyped(responder);
16799
16800 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16801 Ok(decoded) => {
16802 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
16803 Ok(())
16804 }
16805 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16806 ordinal: 395825947633028830,
16807 error,
16808 }),
16809 }
16810 }
16811
16812 7651971425397809026 => {
16813 let responder = ::fidl_next::Responder::from_untyped(responder);
16814
16815 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16816 Ok(decoded) => {
16817 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
16818 Ok(())
16819 }
16820 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16821 ordinal: 7651971425397809026,
16822 error,
16823 }),
16824 }
16825 }
16826
16827 7545125870053689020 => {
16828 let responder = ::fidl_next::Responder::from_untyped(responder);
16829
16830 handler.describe(responder).await;
16831 Ok(())
16832 }
16833
16834 8649041485622956551 => {
16835 let responder = ::fidl_next::Responder::from_untyped(responder);
16836
16837 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16838 Ok(decoded) => {
16839 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
16840 Ok(())
16841 }
16842 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16843 ordinal: 8649041485622956551,
16844 error,
16845 }),
16846 }
16847 }
16848
16849 1587416148701180478 => {
16850 let responder = ::fidl_next::Responder::from_untyped(responder);
16851
16852 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16853 Ok(decoded) => {
16854 handler
16855 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
16856 .await;
16857 Ok(())
16858 }
16859 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16860 ordinal: 1587416148701180478,
16861 error,
16862 }),
16863 }
16864 }
16865
16866 8736683935131400491 => {
16867 let responder = ::fidl_next::Responder::from_untyped(responder);
16868
16869 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16870 Ok(decoded) => {
16871 handler
16872 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
16873 .await;
16874 Ok(())
16875 }
16876 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16877 ordinal: 8736683935131400491,
16878 error,
16879 }),
16880 }
16881 }
16882
16883 3134648685270758458 => {
16884 let responder = ::fidl_next::Responder::from_untyped(responder);
16885
16886 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16887 Ok(decoded) => {
16888 handler
16889 .resize(::fidl_next::Request::from_decoded(decoded), responder)
16890 .await;
16891 Ok(())
16892 }
16893 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16894 ordinal: 3134648685270758458,
16895 error,
16896 }),
16897 }
16898 }
16899
16900 46911652864194091 => {
16901 let responder = ::fidl_next::Responder::from_untyped(responder);
16902
16903 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16904 Ok(decoded) => {
16905 handler
16906 .get_backing_memory(
16907 ::fidl_next::Request::from_decoded(decoded),
16908 responder,
16909 )
16910 .await;
16911 Ok(())
16912 }
16913 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16914 ordinal: 46911652864194091,
16915 error,
16916 }),
16917 }
16918 }
16919
16920 8645235848064269614 => {
16921 let responder = ::fidl_next::Responder::from_untyped(responder);
16922
16923 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16924 Ok(decoded) => {
16925 handler
16926 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
16927 .await;
16928 Ok(())
16929 }
16930 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16931 ordinal: 8645235848064269614,
16932 error,
16933 }),
16934 }
16935 }
16936
16937 3189145313204943035 => {
16938 let responder = ::fidl_next::Responder::from_untyped(responder);
16939
16940 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16941 Ok(decoded) => {
16942 handler
16943 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
16944 .await;
16945 Ok(())
16946 }
16947 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16948 ordinal: 3189145313204943035,
16949 error,
16950 }),
16951 }
16952 }
16953
16954 ordinal => {
16955 handler.on_unknown_interaction(ordinal).await;
16956 if ::core::matches!(
16957 message.header().flexibility(),
16958 ::fidl_next::protocol::Flexibility::Strict
16959 ) {
16960 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16961 } else {
16962 responder
16963 .respond_framework_error(
16964 ordinal,
16965 ::fidl_next::FrameworkError::UnknownMethod,
16966 )
16967 .expect("encoding a framework error should never fail")
16968 .await?;
16969 Ok(())
16970 }
16971 }
16972 }
16973 }
16974}
16975
16976impl<___T> FileClientHandler<___T> for ::fidl_next::IgnoreEvents
16977where
16978 ___T: ::fidl_next::Transport,
16979{
16980 async fn on_open(&mut self, _: ::fidl_next::Request<file::OnOpen, ___T>) {}
16981
16982 async fn on_representation(&mut self, _: ::fidl_next::Request<file::OnRepresentation, ___T>) {}
16983
16984 async fn on_unknown_interaction(&mut self, _: u64) {}
16985}
16986
16987impl<___H, ___T> FileLocalClientHandler<___T> for ::fidl_next::Local<___H>
16988where
16989 ___H: FileClientHandler<___T>,
16990 ___T: ::fidl_next::Transport,
16991{
16992 async fn on_open(&mut self, request: ::fidl_next::Request<file::OnOpen, ___T>) {
16993 ___H::on_open(&mut self.0, request).await
16994 }
16995
16996 async fn on_representation(
16997 &mut self,
16998
16999 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
17000 ) {
17001 ___H::on_representation(&mut self.0, request).await
17002 }
17003
17004 async fn on_unknown_interaction(&mut self, ordinal: u64) {
17005 ___H::on_unknown_interaction(&mut self.0, ordinal).await
17006 }
17007}
17008
17009impl<___H, ___T> FileLocalServerHandler<___T> for ::fidl_next::Local<___H>
17010where
17011 ___H: FileServerHandler<___T>,
17012 ___T: ::fidl_next::Transport,
17013{
17014 async fn advisory_lock(
17015 &mut self,
17016
17017 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
17018
17019 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
17020 ) {
17021 ___H::advisory_lock(&mut self.0, request, responder).await
17022 }
17023
17024 async fn link_into(
17025 &mut self,
17026
17027 request: ::fidl_next::Request<file::LinkInto, ___T>,
17028
17029 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
17030 ) {
17031 ___H::link_into(&mut self.0, request, responder).await
17032 }
17033
17034 async fn clone(&mut self, request: ::fidl_next::Request<file::Clone, ___T>) {
17035 ___H::clone(&mut self.0, request).await
17036 }
17037
17038 async fn close(&mut self, responder: ::fidl_next::Responder<file::Close, ___T>) {
17039 ___H::close(&mut self.0, responder).await
17040 }
17041
17042 async fn query(&mut self, responder: ::fidl_next::Responder<file::Query, ___T>) {
17043 ___H::query(&mut self.0, responder).await
17044 }
17045
17046 async fn deprecated_clone(
17047 &mut self,
17048
17049 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
17050 ) {
17051 ___H::deprecated_clone(&mut self.0, request).await
17052 }
17053
17054 async fn deprecated_get_attr(
17055 &mut self,
17056
17057 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
17058 ) {
17059 ___H::deprecated_get_attr(&mut self.0, responder).await
17060 }
17061
17062 async fn deprecated_set_attr(
17063 &mut self,
17064
17065 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
17066
17067 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
17068 ) {
17069 ___H::deprecated_set_attr(&mut self.0, request, responder).await
17070 }
17071
17072 async fn deprecated_get_flags(
17073 &mut self,
17074
17075 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
17076 ) {
17077 ___H::deprecated_get_flags(&mut self.0, responder).await
17078 }
17079
17080 async fn deprecated_set_flags(
17081 &mut self,
17082
17083 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
17084
17085 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
17086 ) {
17087 ___H::deprecated_set_flags(&mut self.0, request, responder).await
17088 }
17089
17090 async fn get_flags(&mut self, responder: ::fidl_next::Responder<file::GetFlags, ___T>) {
17091 ___H::get_flags(&mut self.0, responder).await
17092 }
17093
17094 async fn set_flags(
17095 &mut self,
17096
17097 request: ::fidl_next::Request<file::SetFlags, ___T>,
17098
17099 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
17100 ) {
17101 ___H::set_flags(&mut self.0, request, responder).await
17102 }
17103
17104 async fn query_filesystem(
17105 &mut self,
17106
17107 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
17108 ) {
17109 ___H::query_filesystem(&mut self.0, responder).await
17110 }
17111
17112 async fn get_attributes(
17113 &mut self,
17114
17115 request: ::fidl_next::Request<file::GetAttributes, ___T>,
17116
17117 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
17118 ) {
17119 ___H::get_attributes(&mut self.0, request, responder).await
17120 }
17121
17122 async fn update_attributes(
17123 &mut self,
17124
17125 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
17126
17127 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
17128 ) {
17129 ___H::update_attributes(&mut self.0, request, responder).await
17130 }
17131
17132 async fn sync(&mut self, responder: ::fidl_next::Responder<file::Sync, ___T>) {
17133 ___H::sync(&mut self.0, responder).await
17134 }
17135
17136 async fn list_extended_attributes(
17137 &mut self,
17138
17139 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
17140 ) {
17141 ___H::list_extended_attributes(&mut self.0, request).await
17142 }
17143
17144 async fn get_extended_attribute(
17145 &mut self,
17146
17147 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
17148
17149 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
17150 ) {
17151 ___H::get_extended_attribute(&mut self.0, request, responder).await
17152 }
17153
17154 async fn set_extended_attribute(
17155 &mut self,
17156
17157 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
17158
17159 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
17160 ) {
17161 ___H::set_extended_attribute(&mut self.0, request, responder).await
17162 }
17163
17164 async fn remove_extended_attribute(
17165 &mut self,
17166
17167 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
17168
17169 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
17170 ) {
17171 ___H::remove_extended_attribute(&mut self.0, request, responder).await
17172 }
17173
17174 async fn read(
17175 &mut self,
17176
17177 request: ::fidl_next::Request<file::Read, ___T>,
17178
17179 responder: ::fidl_next::Responder<file::Read, ___T>,
17180 ) {
17181 ___H::read(&mut self.0, request, responder).await
17182 }
17183
17184 async fn write(
17185 &mut self,
17186
17187 request: ::fidl_next::Request<file::Write, ___T>,
17188
17189 responder: ::fidl_next::Responder<file::Write, ___T>,
17190 ) {
17191 ___H::write(&mut self.0, request, responder).await
17192 }
17193
17194 async fn describe(&mut self, responder: ::fidl_next::Responder<file::Describe, ___T>) {
17195 ___H::describe(&mut self.0, responder).await
17196 }
17197
17198 async fn seek(
17199 &mut self,
17200
17201 request: ::fidl_next::Request<file::Seek, ___T>,
17202
17203 responder: ::fidl_next::Responder<file::Seek, ___T>,
17204 ) {
17205 ___H::seek(&mut self.0, request, responder).await
17206 }
17207
17208 async fn read_at(
17209 &mut self,
17210
17211 request: ::fidl_next::Request<file::ReadAt, ___T>,
17212
17213 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
17214 ) {
17215 ___H::read_at(&mut self.0, request, responder).await
17216 }
17217
17218 async fn write_at(
17219 &mut self,
17220
17221 request: ::fidl_next::Request<file::WriteAt, ___T>,
17222
17223 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
17224 ) {
17225 ___H::write_at(&mut self.0, request, responder).await
17226 }
17227
17228 async fn resize(
17229 &mut self,
17230
17231 request: ::fidl_next::Request<file::Resize, ___T>,
17232
17233 responder: ::fidl_next::Responder<file::Resize, ___T>,
17234 ) {
17235 ___H::resize(&mut self.0, request, responder).await
17236 }
17237
17238 async fn get_backing_memory(
17239 &mut self,
17240
17241 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
17242
17243 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
17244 ) {
17245 ___H::get_backing_memory(&mut self.0, request, responder).await
17246 }
17247
17248 async fn allocate(
17249 &mut self,
17250
17251 request: ::fidl_next::Request<file::Allocate, ___T>,
17252
17253 responder: ::fidl_next::Responder<file::Allocate, ___T>,
17254 ) {
17255 ___H::allocate(&mut self.0, request, responder).await
17256 }
17257
17258 async fn enable_verity(
17259 &mut self,
17260
17261 request: ::fidl_next::Request<file::EnableVerity, ___T>,
17262
17263 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
17264 ) {
17265 ___H::enable_verity(&mut self.0, request, responder).await
17266 }
17267
17268 async fn on_unknown_interaction(&mut self, ordinal: u64) {
17269 ___H::on_unknown_interaction(&mut self.0, ordinal).await
17270 }
17271}
17272
17273#[doc = " A [\'Node\'] which contains a symbolic link.\n"]
17275#[derive(PartialEq, Debug)]
17276pub struct Symlink;
17277
17278impl ::fidl_next::Discoverable for Symlink {
17279 const PROTOCOL_NAME: &'static str = "fuchsia.io.Symlink";
17280}
17281
17282#[cfg(target_os = "fuchsia")]
17283impl ::fidl_next::HasTransport for Symlink {
17284 type Transport = ::fidl_next::fuchsia::zx::Channel;
17285}
17286
17287pub mod symlink {
17288 pub mod prelude {
17289 pub use crate::{
17290 Symlink, SymlinkClientHandler, SymlinkLocalClientHandler, SymlinkLocalServerHandler,
17291 SymlinkServerHandler, symlink,
17292 };
17293
17294 pub use crate::natural::ExtendedAttributeValue;
17295
17296 pub use crate::natural::LinkableLinkIntoRequest;
17297
17298 pub use crate::natural::LinkableLinkIntoResponse;
17299
17300 pub use crate::natural::MutableNodeAttributes;
17301
17302 pub use crate::natural::NodeAttributes2;
17303
17304 pub use crate::natural::NodeDeprecatedCloneRequest;
17305
17306 pub use crate::natural::NodeDeprecatedGetAttrResponse;
17307
17308 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
17309
17310 pub use crate::natural::NodeDeprecatedSetAttrRequest;
17311
17312 pub use crate::natural::NodeDeprecatedSetAttrResponse;
17313
17314 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
17315
17316 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
17317
17318 pub use crate::natural::NodeGetAttributesRequest;
17319
17320 pub use crate::natural::NodeGetExtendedAttributeRequest;
17321
17322 pub use crate::natural::NodeListExtendedAttributesRequest;
17323
17324 pub use crate::natural::NodeOnOpenRequest;
17325
17326 pub use crate::natural::NodeQueryFilesystemResponse;
17327
17328 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
17329
17330 pub use crate::natural::NodeSetExtendedAttributeRequest;
17331
17332 pub use crate::natural::NodeSetFlagsRequest;
17333
17334 pub use crate::natural::NodeGetFlagsResponse;
17335
17336 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
17337
17338 pub use crate::natural::NodeSetExtendedAttributeResponse;
17339
17340 pub use crate::natural::NodeSetFlagsResponse;
17341
17342 pub use crate::natural::NodeSyncResponse;
17343
17344 pub use crate::natural::NodeUpdateAttributesResponse;
17345
17346 pub use crate::natural::OpenableOpenRequest;
17347
17348 pub use crate::natural::Representation;
17349
17350 pub use crate::natural::SymlinkInfo;
17351
17352 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
17353
17354 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
17355
17356 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
17357 }
17358
17359 pub struct LinkInto;
17360
17361 impl ::fidl_next::Method for LinkInto {
17362 const ORDINAL: u64 = 6121399674497678964;
17363 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17364 ::fidl_next::protocol::Flexibility::Strict;
17365
17366 type Protocol = crate::Symlink;
17367
17368 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
17369 }
17370
17371 impl ::fidl_next::TwoWayMethod for LinkInto {
17372 type Response = ::fidl_next::wire::Result<
17373 'static,
17374 crate::wire::LinkableLinkIntoResponse,
17375 ::fidl_next::wire::fuchsia::Status,
17376 >;
17377 }
17378
17379 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
17380 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17381
17382 fn respond(response: ___R) -> Self::Output {
17383 ::core::result::Result::Ok(response)
17384 }
17385 }
17386
17387 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
17388 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17389
17390 fn respond_err(response: ___R) -> Self::Output {
17391 ::core::result::Result::Err(response)
17392 }
17393 }
17394
17395 pub struct Clone;
17396
17397 impl ::fidl_next::Method for Clone {
17398 const ORDINAL: u64 = 2366825959783828089;
17399 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17400 ::fidl_next::protocol::Flexibility::Strict;
17401
17402 type Protocol = crate::Symlink;
17403
17404 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
17405 }
17406
17407 pub struct Close;
17408
17409 impl ::fidl_next::Method for Close {
17410 const ORDINAL: u64 = 6540867515453498750;
17411 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17412 ::fidl_next::protocol::Flexibility::Strict;
17413
17414 type Protocol = crate::Symlink;
17415
17416 type Request = ::fidl_next::wire::EmptyMessageBody;
17417 }
17418
17419 impl ::fidl_next::TwoWayMethod for Close {
17420 type Response = ::fidl_next::wire::Result<
17421 'static,
17422 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
17423 ::fidl_next::wire::Int32,
17424 >;
17425 }
17426
17427 impl<___R> ::fidl_next::Respond<___R> for Close {
17428 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17429
17430 fn respond(response: ___R) -> Self::Output {
17431 ::core::result::Result::Ok(response)
17432 }
17433 }
17434
17435 impl<___R> ::fidl_next::RespondErr<___R> for Close {
17436 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17437
17438 fn respond_err(response: ___R) -> Self::Output {
17439 ::core::result::Result::Err(response)
17440 }
17441 }
17442
17443 pub struct Query;
17444
17445 impl ::fidl_next::Method for Query {
17446 const ORDINAL: u64 = 2763219980499352582;
17447 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17448 ::fidl_next::protocol::Flexibility::Strict;
17449
17450 type Protocol = crate::Symlink;
17451
17452 type Request = ::fidl_next::wire::EmptyMessageBody;
17453 }
17454
17455 impl ::fidl_next::TwoWayMethod for Query {
17456 type Response = ::fidl_next::wire::Strict<
17457 ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
17458 >;
17459 }
17460
17461 impl<___R> ::fidl_next::Respond<___R> for Query {
17462 type Output =
17463 ::fidl_next::Strict<::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>>;
17464
17465 fn respond(response: ___R) -> Self::Output {
17466 ::fidl_next::Strict(::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse {
17467 protocol: response,
17468 })
17469 }
17470 }
17471
17472 pub struct DeprecatedClone;
17473
17474 impl ::fidl_next::Method for DeprecatedClone {
17475 const ORDINAL: u64 = 6512600400724287855;
17476 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17477 ::fidl_next::protocol::Flexibility::Flexible;
17478
17479 type Protocol = crate::Symlink;
17480
17481 type Request = crate::wire::NodeDeprecatedCloneRequest;
17482 }
17483
17484 pub struct OnOpen;
17485
17486 impl ::fidl_next::Method for OnOpen {
17487 const ORDINAL: u64 = 9207534335756671346;
17488 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17489 ::fidl_next::protocol::Flexibility::Flexible;
17490
17491 type Protocol = crate::Symlink;
17492
17493 type Request = crate::wire::NodeOnOpenRequest<'static>;
17494 }
17495
17496 pub struct DeprecatedGetAttr;
17497
17498 impl ::fidl_next::Method for DeprecatedGetAttr {
17499 const ORDINAL: u64 = 8689798978500614909;
17500 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17501 ::fidl_next::protocol::Flexibility::Strict;
17502
17503 type Protocol = crate::Symlink;
17504
17505 type Request = ::fidl_next::wire::EmptyMessageBody;
17506 }
17507
17508 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
17509 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
17510 }
17511
17512 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
17513 type Output = ::fidl_next::Strict<___R>;
17514
17515 fn respond(response: ___R) -> Self::Output {
17516 ::fidl_next::Strict(response)
17517 }
17518 }
17519
17520 pub struct DeprecatedSetAttr;
17521
17522 impl ::fidl_next::Method for DeprecatedSetAttr {
17523 const ORDINAL: u64 = 4721673413776871238;
17524 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17525 ::fidl_next::protocol::Flexibility::Strict;
17526
17527 type Protocol = crate::Symlink;
17528
17529 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
17530 }
17531
17532 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
17533 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
17534 }
17535
17536 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
17537 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
17538
17539 fn respond(response: ___R) -> Self::Output {
17540 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
17541 }
17542 }
17543
17544 pub struct DeprecatedGetFlags;
17545
17546 impl ::fidl_next::Method for DeprecatedGetFlags {
17547 const ORDINAL: u64 = 6595803110182632097;
17548 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17549 ::fidl_next::protocol::Flexibility::Strict;
17550
17551 type Protocol = crate::Symlink;
17552
17553 type Request = ::fidl_next::wire::EmptyMessageBody;
17554 }
17555
17556 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
17557 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
17558 }
17559
17560 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
17561 type Output = ::fidl_next::Strict<___R>;
17562
17563 fn respond(response: ___R) -> Self::Output {
17564 ::fidl_next::Strict(response)
17565 }
17566 }
17567
17568 pub struct DeprecatedSetFlags;
17569
17570 impl ::fidl_next::Method for DeprecatedSetFlags {
17571 const ORDINAL: u64 = 5950864159036794675;
17572 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17573 ::fidl_next::protocol::Flexibility::Strict;
17574
17575 type Protocol = crate::Symlink;
17576
17577 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
17578 }
17579
17580 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
17581 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
17582 }
17583
17584 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
17585 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
17586
17587 fn respond(response: ___R) -> Self::Output {
17588 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
17589 }
17590 }
17591
17592 pub struct GetFlags;
17593
17594 impl ::fidl_next::Method for GetFlags {
17595 const ORDINAL: u64 = 105530239381466147;
17596 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17597 ::fidl_next::protocol::Flexibility::Flexible;
17598
17599 type Protocol = crate::Symlink;
17600
17601 type Request = ::fidl_next::wire::EmptyMessageBody;
17602 }
17603
17604 impl ::fidl_next::TwoWayMethod for GetFlags {
17605 type Response = ::fidl_next::wire::Result<
17606 'static,
17607 crate::wire::NodeGetFlagsResponse,
17608 ::fidl_next::wire::fuchsia::Status,
17609 >;
17610 }
17611
17612 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
17613 type Output = ::core::result::Result<
17614 crate::generic::NodeGetFlagsResponse<___R>,
17615 ::fidl_next::never::Never,
17616 >;
17617
17618 fn respond(response: ___R) -> Self::Output {
17619 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
17620 }
17621 }
17622
17623 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
17624 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17625
17626 fn respond_err(response: ___R) -> Self::Output {
17627 ::core::result::Result::Err(response)
17628 }
17629 }
17630
17631 pub struct SetFlags;
17632
17633 impl ::fidl_next::Method for SetFlags {
17634 const ORDINAL: u64 = 6172186066099445416;
17635 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17636 ::fidl_next::protocol::Flexibility::Flexible;
17637
17638 type Protocol = crate::Symlink;
17639
17640 type Request = crate::wire::NodeSetFlagsRequest;
17641 }
17642
17643 impl ::fidl_next::TwoWayMethod for SetFlags {
17644 type Response = ::fidl_next::wire::Result<
17645 'static,
17646 crate::wire::NodeSetFlagsResponse,
17647 ::fidl_next::wire::fuchsia::Status,
17648 >;
17649 }
17650
17651 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
17652 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17653
17654 fn respond(response: ___R) -> Self::Output {
17655 ::core::result::Result::Ok(response)
17656 }
17657 }
17658
17659 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
17660 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17661
17662 fn respond_err(response: ___R) -> Self::Output {
17663 ::core::result::Result::Err(response)
17664 }
17665 }
17666
17667 pub struct QueryFilesystem;
17668
17669 impl ::fidl_next::Method for QueryFilesystem {
17670 const ORDINAL: u64 = 8013111122914313744;
17671 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17672 ::fidl_next::protocol::Flexibility::Strict;
17673
17674 type Protocol = crate::Symlink;
17675
17676 type Request = ::fidl_next::wire::EmptyMessageBody;
17677 }
17678
17679 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
17680 type Response =
17681 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
17682 }
17683
17684 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
17685 type Output = ::fidl_next::Strict<___R>;
17686
17687 fn respond(response: ___R) -> Self::Output {
17688 ::fidl_next::Strict(response)
17689 }
17690 }
17691
17692 pub struct OnRepresentation;
17693
17694 impl ::fidl_next::Method for OnRepresentation {
17695 const ORDINAL: u64 = 6679970090861613324;
17696 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17697 ::fidl_next::protocol::Flexibility::Strict;
17698
17699 type Protocol = crate::Symlink;
17700
17701 type Request = crate::wire::Representation<'static>;
17702 }
17703
17704 pub struct GetAttributes;
17705
17706 impl ::fidl_next::Method for GetAttributes {
17707 const ORDINAL: u64 = 4414537700416816443;
17708 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17709 ::fidl_next::protocol::Flexibility::Strict;
17710
17711 type Protocol = crate::Symlink;
17712
17713 type Request = crate::wire::NodeGetAttributesRequest;
17714 }
17715
17716 impl ::fidl_next::TwoWayMethod for GetAttributes {
17717 type Response = ::fidl_next::wire::Result<
17718 'static,
17719 crate::wire::NodeAttributes2<'static>,
17720 ::fidl_next::wire::fuchsia::Status,
17721 >;
17722 }
17723
17724 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
17725 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17726
17727 fn respond(response: ___R) -> Self::Output {
17728 ::core::result::Result::Ok(response)
17729 }
17730 }
17731
17732 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
17733 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17734
17735 fn respond_err(response: ___R) -> Self::Output {
17736 ::core::result::Result::Err(response)
17737 }
17738 }
17739
17740 pub struct UpdateAttributes;
17741
17742 impl ::fidl_next::Method for UpdateAttributes {
17743 const ORDINAL: u64 = 3677402239314018056;
17744 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17745 ::fidl_next::protocol::Flexibility::Strict;
17746
17747 type Protocol = crate::Symlink;
17748
17749 type Request = crate::wire::MutableNodeAttributes<'static>;
17750 }
17751
17752 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
17753 type Response = ::fidl_next::wire::Result<
17754 'static,
17755 crate::wire::NodeUpdateAttributesResponse,
17756 ::fidl_next::wire::fuchsia::Status,
17757 >;
17758 }
17759
17760 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
17761 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17762
17763 fn respond(response: ___R) -> Self::Output {
17764 ::core::result::Result::Ok(response)
17765 }
17766 }
17767
17768 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
17769 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17770
17771 fn respond_err(response: ___R) -> Self::Output {
17772 ::core::result::Result::Err(response)
17773 }
17774 }
17775
17776 pub struct Sync;
17777
17778 impl ::fidl_next::Method for Sync {
17779 const ORDINAL: u64 = 3196473584242777161;
17780 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17781 ::fidl_next::protocol::Flexibility::Strict;
17782
17783 type Protocol = crate::Symlink;
17784
17785 type Request = ::fidl_next::wire::EmptyMessageBody;
17786 }
17787
17788 impl ::fidl_next::TwoWayMethod for Sync {
17789 type Response = ::fidl_next::wire::Result<
17790 'static,
17791 crate::wire::NodeSyncResponse,
17792 ::fidl_next::wire::fuchsia::Status,
17793 >;
17794 }
17795
17796 impl<___R> ::fidl_next::Respond<___R> for Sync {
17797 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17798
17799 fn respond(response: ___R) -> Self::Output {
17800 ::core::result::Result::Ok(response)
17801 }
17802 }
17803
17804 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
17805 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17806
17807 fn respond_err(response: ___R) -> Self::Output {
17808 ::core::result::Result::Err(response)
17809 }
17810 }
17811
17812 pub struct ListExtendedAttributes;
17813
17814 impl ::fidl_next::Method for ListExtendedAttributes {
17815 const ORDINAL: u64 = 5431626189872037072;
17816 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17817 ::fidl_next::protocol::Flexibility::Strict;
17818
17819 type Protocol = crate::Symlink;
17820
17821 type Request = crate::wire::NodeListExtendedAttributesRequest;
17822 }
17823
17824 pub struct GetExtendedAttribute;
17825
17826 impl ::fidl_next::Method for GetExtendedAttribute {
17827 const ORDINAL: u64 = 5043930208506967771;
17828 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17829 ::fidl_next::protocol::Flexibility::Strict;
17830
17831 type Protocol = crate::Symlink;
17832
17833 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
17834 }
17835
17836 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
17837 type Response = ::fidl_next::wire::Result<
17838 'static,
17839 crate::wire::ExtendedAttributeValue<'static>,
17840 ::fidl_next::wire::fuchsia::Status,
17841 >;
17842 }
17843
17844 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
17845 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17846
17847 fn respond(response: ___R) -> Self::Output {
17848 ::core::result::Result::Ok(response)
17849 }
17850 }
17851
17852 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
17853 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17854
17855 fn respond_err(response: ___R) -> Self::Output {
17856 ::core::result::Result::Err(response)
17857 }
17858 }
17859
17860 pub struct SetExtendedAttribute;
17861
17862 impl ::fidl_next::Method for SetExtendedAttribute {
17863 const ORDINAL: u64 = 5374223046099989052;
17864 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17865 ::fidl_next::protocol::Flexibility::Strict;
17866
17867 type Protocol = crate::Symlink;
17868
17869 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
17870 }
17871
17872 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
17873 type Response = ::fidl_next::wire::Result<
17874 'static,
17875 crate::wire::NodeSetExtendedAttributeResponse,
17876 ::fidl_next::wire::fuchsia::Status,
17877 >;
17878 }
17879
17880 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
17881 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17882
17883 fn respond(response: ___R) -> Self::Output {
17884 ::core::result::Result::Ok(response)
17885 }
17886 }
17887
17888 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
17889 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17890
17891 fn respond_err(response: ___R) -> Self::Output {
17892 ::core::result::Result::Err(response)
17893 }
17894 }
17895
17896 pub struct RemoveExtendedAttribute;
17897
17898 impl ::fidl_next::Method for RemoveExtendedAttribute {
17899 const ORDINAL: u64 = 8794297771444732717;
17900 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17901 ::fidl_next::protocol::Flexibility::Strict;
17902
17903 type Protocol = crate::Symlink;
17904
17905 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
17906 }
17907
17908 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
17909 type Response = ::fidl_next::wire::Result<
17910 'static,
17911 crate::wire::NodeRemoveExtendedAttributeResponse,
17912 ::fidl_next::wire::fuchsia::Status,
17913 >;
17914 }
17915
17916 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
17917 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17918
17919 fn respond(response: ___R) -> Self::Output {
17920 ::core::result::Result::Ok(response)
17921 }
17922 }
17923
17924 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
17925 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17926
17927 fn respond_err(response: ___R) -> Self::Output {
17928 ::core::result::Result::Err(response)
17929 }
17930 }
17931
17932 pub struct Open;
17933
17934 impl ::fidl_next::Method for Open {
17935 const ORDINAL: u64 = 6236883748953765593;
17936 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17937 ::fidl_next::protocol::Flexibility::Flexible;
17938
17939 type Protocol = crate::Symlink;
17940
17941 type Request = crate::wire::OpenableOpenRequest<'static>;
17942 }
17943
17944 pub struct Describe;
17945
17946 impl ::fidl_next::Method for Describe {
17947 const ORDINAL: u64 = 8371117097481679347;
17948 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17949 ::fidl_next::protocol::Flexibility::Flexible;
17950
17951 type Protocol = crate::Symlink;
17952
17953 type Request = ::fidl_next::wire::EmptyMessageBody;
17954 }
17955
17956 impl ::fidl_next::TwoWayMethod for Describe {
17957 type Response = ::fidl_next::wire::Flexible<'static, crate::wire::SymlinkInfo<'static>>;
17958 }
17959
17960 impl<___R> ::fidl_next::Respond<___R> for Describe {
17961 type Output = ::fidl_next::Flexible<___R>;
17962
17963 fn respond(response: ___R) -> Self::Output {
17964 ::fidl_next::Flexible(response)
17965 }
17966 }
17967
17968 mod ___detail {
17969 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Symlink
17970 where
17971 ___T: ::fidl_next::Transport,
17972 {
17973 type Client = SymlinkClient<___T>;
17974 type Server = SymlinkServer<___T>;
17975 }
17976
17977 #[repr(transparent)]
17979 pub struct SymlinkClient<___T: ::fidl_next::Transport> {
17980 #[allow(dead_code)]
17981 client: ::fidl_next::protocol::Client<___T>,
17982 }
17983
17984 impl<___T> SymlinkClient<___T>
17985 where
17986 ___T: ::fidl_next::Transport,
17987 {
17988 #[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"]
17989 pub fn link_into(
17990 &self,
17991
17992 dst_parent_token: impl ::fidl_next::Encode<
17993 ::fidl_next::wire::fuchsia::Event,
17994 <___T as ::fidl_next::Transport>::SendBuffer,
17995 >,
17996
17997 dst: impl ::fidl_next::Encode<
17998 ::fidl_next::wire::String<'static>,
17999 <___T as ::fidl_next::Transport>::SendBuffer,
18000 >,
18001 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
18002 where
18003 <___T as ::fidl_next::Transport>::SendBuffer:
18004 ::fidl_next::encoder::InternalHandleEncoder,
18005 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18006 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18007 {
18008 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
18009 dst_parent_token,
18010
18011 dst,
18012 })
18013 }
18014
18015 #[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"]
18016 pub fn link_into_with<___R>(
18017 &self,
18018 request: ___R,
18019 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
18020 where
18021 ___R: ::fidl_next::Encode<
18022 crate::wire::LinkableLinkIntoRequest<'static>,
18023 <___T as ::fidl_next::Transport>::SendBuffer,
18024 >,
18025 {
18026 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18027 6121399674497678964,
18028 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
18029 request,
18030 ))
18031 }
18032
18033 pub fn clone(
18034 &self,
18035
18036 request: impl ::fidl_next::Encode<
18037 ::fidl_next::ServerEnd<
18038 ::fidl_next_fuchsia_unknown::Cloneable,
18039 ::fidl_next::wire::fuchsia::Channel,
18040 >,
18041 <___T as ::fidl_next::Transport>::SendBuffer,
18042 >,
18043 ) -> ::fidl_next::SendFuture<'_, ___T>
18044 where
18045 <___T as ::fidl_next::Transport>::SendBuffer:
18046 ::fidl_next::encoder::InternalHandleEncoder,
18047 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18048 {
18049 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
18050 request,
18051 })
18052 }
18053
18054 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
18055 where
18056 ___R: ::fidl_next::Encode<
18057 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
18058 <___T as ::fidl_next::Transport>::SendBuffer,
18059 >,
18060 {
18061 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
18062 2366825959783828089,
18063 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
18064 request,
18065 ))
18066 }
18067
18068 #[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"]
18069 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
18070 ::fidl_next::TwoWayFuture::from_untyped(
18071 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18072 6540867515453498750,
18073 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
18074 (),
18075 ),
18076 )
18077 }
18078
18079 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
18080 ::fidl_next::TwoWayFuture::from_untyped(
18081 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18082 2763219980499352582,
18083 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
18084 (),
18085 ),
18086 )
18087 }
18088
18089 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
18090 pub fn deprecated_clone(
18091 &self,
18092
18093 flags: impl ::fidl_next::Encode<
18094 crate::wire::OpenFlags,
18095 <___T as ::fidl_next::Transport>::SendBuffer,
18096 >,
18097
18098 object: impl ::fidl_next::Encode<
18099 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
18100 <___T as ::fidl_next::Transport>::SendBuffer,
18101 >,
18102 ) -> ::fidl_next::SendFuture<'_, ___T>
18103 where
18104 <___T as ::fidl_next::Transport>::SendBuffer:
18105 ::fidl_next::encoder::InternalHandleEncoder,
18106 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18107 {
18108 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
18109 flags,
18110
18111 object,
18112 })
18113 }
18114
18115 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
18116 pub fn deprecated_clone_with<___R>(
18117 &self,
18118 request: ___R,
18119 ) -> ::fidl_next::SendFuture<'_, ___T>
18120 where
18121 ___R: ::fidl_next::Encode<
18122 crate::wire::NodeDeprecatedCloneRequest,
18123 <___T as ::fidl_next::Transport>::SendBuffer,
18124 >,
18125 {
18126 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
18127 6512600400724287855,
18128 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
18129 request,
18130 ))
18131 }
18132
18133 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
18134 pub fn deprecated_get_attr(
18135 &self,
18136 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
18137 ::fidl_next::TwoWayFuture::from_untyped(
18138 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18139 8689798978500614909,
18140 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
18141 (),
18142 ),
18143 )
18144 }
18145
18146 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18147 pub fn deprecated_set_attr(
18148 &self,
18149
18150 flags: impl ::fidl_next::Encode<
18151 crate::wire::NodeAttributeFlags,
18152 <___T as ::fidl_next::Transport>::SendBuffer,
18153 >,
18154
18155 attributes: impl ::fidl_next::Encode<
18156 crate::wire::NodeAttributes,
18157 <___T as ::fidl_next::Transport>::SendBuffer,
18158 >,
18159 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
18160 where
18161 <___T as ::fidl_next::Transport>::SendBuffer:
18162 ::fidl_next::encoder::InternalHandleEncoder,
18163 {
18164 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
18165 flags,
18166
18167 attributes,
18168 })
18169 }
18170
18171 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18172 pub fn deprecated_set_attr_with<___R>(
18173 &self,
18174 request: ___R,
18175 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
18176 where
18177 ___R: ::fidl_next::Encode<
18178 crate::wire::NodeDeprecatedSetAttrRequest,
18179 <___T as ::fidl_next::Transport>::SendBuffer,
18180 >,
18181 {
18182 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18183 4721673413776871238,
18184 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
18185 request,
18186 ))
18187 }
18188
18189 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
18190 pub fn deprecated_get_flags(
18191 &self,
18192 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
18193 ::fidl_next::TwoWayFuture::from_untyped(
18194 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18195 6595803110182632097,
18196 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
18197 (),
18198 ),
18199 )
18200 }
18201
18202 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18203 pub fn deprecated_set_flags(
18204 &self,
18205
18206 flags: impl ::fidl_next::Encode<
18207 crate::wire::OpenFlags,
18208 <___T as ::fidl_next::Transport>::SendBuffer,
18209 >,
18210 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
18211 where
18212 <___T as ::fidl_next::Transport>::SendBuffer:
18213 ::fidl_next::encoder::InternalHandleEncoder,
18214 {
18215 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
18216 flags,
18217 })
18218 }
18219
18220 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18221 pub fn deprecated_set_flags_with<___R>(
18222 &self,
18223 request: ___R,
18224 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
18225 where
18226 ___R: ::fidl_next::Encode<
18227 crate::wire::NodeDeprecatedSetFlagsRequest,
18228 <___T as ::fidl_next::Transport>::SendBuffer,
18229 >,
18230 {
18231 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18232 5950864159036794675,
18233 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
18234 request,
18235 ))
18236 }
18237
18238 #[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"]
18239 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
18240 ::fidl_next::TwoWayFuture::from_untyped(
18241 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18242 105530239381466147,
18243 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
18244 (),
18245 ),
18246 )
18247 }
18248
18249 #[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"]
18250 pub fn set_flags(
18251 &self,
18252
18253 flags: impl ::fidl_next::Encode<
18254 crate::wire::Flags,
18255 <___T as ::fidl_next::Transport>::SendBuffer,
18256 >,
18257 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
18258 where
18259 <___T as ::fidl_next::Transport>::SendBuffer:
18260 ::fidl_next::encoder::InternalHandleEncoder,
18261 {
18262 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
18263 }
18264
18265 #[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"]
18266 pub fn set_flags_with<___R>(
18267 &self,
18268 request: ___R,
18269 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
18270 where
18271 ___R: ::fidl_next::Encode<
18272 crate::wire::NodeSetFlagsRequest,
18273 <___T as ::fidl_next::Transport>::SendBuffer,
18274 >,
18275 {
18276 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18277 6172186066099445416,
18278 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
18279 request,
18280 ))
18281 }
18282
18283 #[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"]
18284 pub fn query_filesystem(
18285 &self,
18286 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
18287 ::fidl_next::TwoWayFuture::from_untyped(
18288 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18289 8013111122914313744,
18290 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
18291 (),
18292 ),
18293 )
18294 }
18295
18296 #[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"]
18297 pub fn get_attributes(
18298 &self,
18299
18300 query: impl ::fidl_next::Encode<
18301 crate::wire::NodeAttributesQuery,
18302 <___T as ::fidl_next::Transport>::SendBuffer,
18303 >,
18304 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
18305 where
18306 <___T as ::fidl_next::Transport>::SendBuffer:
18307 ::fidl_next::encoder::InternalHandleEncoder,
18308 {
18309 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
18310 }
18311
18312 #[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"]
18313 pub fn get_attributes_with<___R>(
18314 &self,
18315 request: ___R,
18316 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
18317 where
18318 ___R: ::fidl_next::Encode<
18319 crate::wire::NodeGetAttributesRequest,
18320 <___T as ::fidl_next::Transport>::SendBuffer,
18321 >,
18322 {
18323 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18324 4414537700416816443,
18325 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
18326 request,
18327 ))
18328 }
18329
18330 #[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"]
18331 pub fn update_attributes_with<___R>(
18332 &self,
18333 request: ___R,
18334 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
18335 where
18336 ___R: ::fidl_next::Encode<
18337 crate::wire::MutableNodeAttributes<'static>,
18338 <___T as ::fidl_next::Transport>::SendBuffer,
18339 >,
18340 {
18341 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18342 3677402239314018056,
18343 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
18344 request,
18345 ))
18346 }
18347
18348 #[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"]
18349 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
18350 ::fidl_next::TwoWayFuture::from_untyped(
18351 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18352 3196473584242777161,
18353 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
18354 (),
18355 ),
18356 )
18357 }
18358
18359 #[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.READ_BYTES`] right.\n"]
18360 pub fn list_extended_attributes(
18361 &self,
18362
18363 iterator: impl ::fidl_next::Encode<
18364 ::fidl_next::ServerEnd<
18365 crate::ExtendedAttributeIterator,
18366 ::fidl_next::wire::fuchsia::Channel,
18367 >,
18368 <___T as ::fidl_next::Transport>::SendBuffer,
18369 >,
18370 ) -> ::fidl_next::SendFuture<'_, ___T>
18371 where
18372 <___T as ::fidl_next::Transport>::SendBuffer:
18373 ::fidl_next::encoder::InternalHandleEncoder,
18374 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18375 {
18376 self.list_extended_attributes_with(
18377 crate::generic::NodeListExtendedAttributesRequest { iterator },
18378 )
18379 }
18380
18381 #[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.READ_BYTES`] right.\n"]
18382 pub fn list_extended_attributes_with<___R>(
18383 &self,
18384 request: ___R,
18385 ) -> ::fidl_next::SendFuture<'_, ___T>
18386 where
18387 ___R: ::fidl_next::Encode<
18388 crate::wire::NodeListExtendedAttributesRequest,
18389 <___T as ::fidl_next::Transport>::SendBuffer,
18390 >,
18391 {
18392 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
18393 5431626189872037072,
18394 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
18395 request,
18396 ))
18397 }
18398
18399 #[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.READ_BYTES`] right.\n"]
18400 pub fn get_extended_attribute(
18401 &self,
18402
18403 name: impl ::fidl_next::Encode<
18404 ::fidl_next::wire::Vector<'static, u8>,
18405 <___T as ::fidl_next::Transport>::SendBuffer,
18406 >,
18407 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
18408 where
18409 <___T as ::fidl_next::Transport>::SendBuffer:
18410 ::fidl_next::encoder::InternalHandleEncoder,
18411 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18412 {
18413 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
18414 name,
18415 })
18416 }
18417
18418 #[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.READ_BYTES`] right.\n"]
18419 pub fn get_extended_attribute_with<___R>(
18420 &self,
18421 request: ___R,
18422 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
18423 where
18424 ___R: ::fidl_next::Encode<
18425 crate::wire::NodeGetExtendedAttributeRequest<'static>,
18426 <___T as ::fidl_next::Transport>::SendBuffer,
18427 >,
18428 {
18429 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18430 5043930208506967771,
18431 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
18432 request,
18433 ))
18434 }
18435
18436 #[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.WRITE_BYTES`] right.\n"]
18437 pub fn set_extended_attribute(
18438 &self,
18439
18440 name: impl ::fidl_next::Encode<
18441 ::fidl_next::wire::Vector<'static, u8>,
18442 <___T as ::fidl_next::Transport>::SendBuffer,
18443 >,
18444
18445 value: impl ::fidl_next::Encode<
18446 crate::wire::ExtendedAttributeValue<'static>,
18447 <___T as ::fidl_next::Transport>::SendBuffer,
18448 >,
18449
18450 mode: impl ::fidl_next::Encode<
18451 crate::wire::SetExtendedAttributeMode,
18452 <___T as ::fidl_next::Transport>::SendBuffer,
18453 >,
18454 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
18455 where
18456 <___T as ::fidl_next::Transport>::SendBuffer:
18457 ::fidl_next::encoder::InternalHandleEncoder,
18458 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18459 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18460 {
18461 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
18462 name,
18463
18464 value,
18465
18466 mode,
18467 })
18468 }
18469
18470 #[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.WRITE_BYTES`] right.\n"]
18471 pub fn set_extended_attribute_with<___R>(
18472 &self,
18473 request: ___R,
18474 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
18475 where
18476 ___R: ::fidl_next::Encode<
18477 crate::wire::NodeSetExtendedAttributeRequest<'static>,
18478 <___T as ::fidl_next::Transport>::SendBuffer,
18479 >,
18480 {
18481 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18482 5374223046099989052,
18483 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
18484 request,
18485 ))
18486 }
18487
18488 #[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.WRITE_BYTES`] right.\n"]
18489 pub fn remove_extended_attribute(
18490 &self,
18491
18492 name: impl ::fidl_next::Encode<
18493 ::fidl_next::wire::Vector<'static, u8>,
18494 <___T as ::fidl_next::Transport>::SendBuffer,
18495 >,
18496 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
18497 where
18498 <___T as ::fidl_next::Transport>::SendBuffer:
18499 ::fidl_next::encoder::InternalHandleEncoder,
18500 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18501 {
18502 self.remove_extended_attribute_with(
18503 crate::generic::NodeRemoveExtendedAttributeRequest { name },
18504 )
18505 }
18506
18507 #[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.WRITE_BYTES`] right.\n"]
18508 pub fn remove_extended_attribute_with<___R>(
18509 &self,
18510 request: ___R,
18511 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
18512 where
18513 ___R: ::fidl_next::Encode<
18514 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
18515 <___T as ::fidl_next::Transport>::SendBuffer,
18516 >,
18517 {
18518 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18519 8794297771444732717,
18520 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
18521 request,
18522 ))
18523 }
18524
18525 #[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"]
18526 pub fn open(
18527 &self,
18528
18529 path: impl ::fidl_next::Encode<
18530 ::fidl_next::wire::String<'static>,
18531 <___T as ::fidl_next::Transport>::SendBuffer,
18532 >,
18533
18534 flags: impl ::fidl_next::Encode<
18535 crate::wire::Flags,
18536 <___T as ::fidl_next::Transport>::SendBuffer,
18537 >,
18538
18539 options: impl ::fidl_next::Encode<
18540 crate::wire::Options<'static>,
18541 <___T as ::fidl_next::Transport>::SendBuffer,
18542 >,
18543
18544 object: impl ::fidl_next::Encode<
18545 ::fidl_next::wire::fuchsia::Channel,
18546 <___T as ::fidl_next::Transport>::SendBuffer,
18547 >,
18548 ) -> ::fidl_next::SendFuture<'_, ___T>
18549 where
18550 <___T as ::fidl_next::Transport>::SendBuffer:
18551 ::fidl_next::encoder::InternalHandleEncoder,
18552 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18553 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18554 {
18555 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
18556 }
18557
18558 #[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"]
18559 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
18560 where
18561 ___R: ::fidl_next::Encode<
18562 crate::wire::OpenableOpenRequest<'static>,
18563 <___T as ::fidl_next::Transport>::SendBuffer,
18564 >,
18565 {
18566 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
18567 6236883748953765593,
18568 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
18569 request,
18570 ))
18571 }
18572
18573 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
18574 ::fidl_next::TwoWayFuture::from_untyped(
18575 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18576 8371117097481679347,
18577 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
18578 (),
18579 ),
18580 )
18581 }
18582 }
18583
18584 #[repr(transparent)]
18586 pub struct SymlinkServer<___T: ::fidl_next::Transport> {
18587 server: ::fidl_next::protocol::Server<___T>,
18588 }
18589
18590 impl<___T> SymlinkServer<___T>
18591 where
18592 ___T: ::fidl_next::Transport,
18593 {
18594 #[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"]
18595 pub fn on_open(
18596 &self,
18597
18598 s: impl ::fidl_next::Encode<
18599 ::fidl_next::wire::fuchsia::Status,
18600 <___T as ::fidl_next::Transport>::SendBuffer,
18601 >,
18602
18603 info: impl ::fidl_next::Encode<
18604 crate::wire_optional::NodeInfoDeprecated<'static>,
18605 <___T as ::fidl_next::Transport>::SendBuffer,
18606 >,
18607 ) -> ::fidl_next::SendFuture<'_, ___T>
18608 where
18609 <___T as ::fidl_next::Transport>::SendBuffer:
18610 ::fidl_next::encoder::InternalHandleEncoder,
18611 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18612 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
18613 {
18614 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
18615 }
18616
18617 #[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"]
18618
18619 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
18620 where
18621 ___R: ::fidl_next::Encode<
18622 <super::OnOpen as ::fidl_next::Method>::Request,
18623 <___T as ::fidl_next::Transport>::SendBuffer,
18624 >,
18625 {
18626 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
18627 9207534335756671346,
18628 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
18629 request,
18630 ))
18631 }
18632
18633 #[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"]
18634
18635 pub fn on_representation_with<___R>(
18636 &self,
18637 request: ___R,
18638 ) -> ::fidl_next::SendFuture<'_, ___T>
18639 where
18640 ___R: ::fidl_next::Encode<
18641 <super::OnRepresentation as ::fidl_next::Method>::Request,
18642 <___T as ::fidl_next::Transport>::SendBuffer,
18643 >,
18644 {
18645 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
18646 6679970090861613324,
18647 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
18648 request,
18649 ))
18650 }
18651 }
18652 }
18653}
18654
18655#[diagnostic::on_unimplemented(
18656 note = "If {Self} implements the non-local SymlinkClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18657)]
18658
18659pub trait SymlinkLocalClientHandler<
18663 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18664 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18665>
18666{
18667 #[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"]
18668 fn on_open(
18669 &mut self,
18670
18671 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
18672 ) -> impl ::core::future::Future<Output = ()>;
18673
18674 #[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"]
18675 fn on_representation(
18676 &mut self,
18677
18678 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
18679 ) -> impl ::core::future::Future<Output = ()>;
18680
18681 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
18682 ::core::future::ready(())
18683 }
18684}
18685
18686impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Symlink
18687where
18688 ___H: SymlinkLocalClientHandler<___T>,
18689 ___T: ::fidl_next::Transport,
18690 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
18691 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18692 Constraint = (),
18693 >,
18694 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
18695 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18696 Constraint = (),
18697 >,
18698{
18699 async fn on_event(
18700 handler: &mut ___H,
18701 mut message: ::fidl_next::Message<___T>,
18702 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18703 match *message.header().ordinal {
18704 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
18705 Ok(decoded) => {
18706 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
18707 Ok(())
18708 }
18709 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18710 ordinal: 9207534335756671346,
18711 error,
18712 }),
18713 },
18714
18715 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
18716 Ok(decoded) => {
18717 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
18718 Ok(())
18719 }
18720 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18721 ordinal: 6679970090861613324,
18722 error,
18723 }),
18724 },
18725
18726 ordinal => {
18727 handler.on_unknown_interaction(ordinal).await;
18728 if ::core::matches!(
18729 message.header().flexibility(),
18730 ::fidl_next::protocol::Flexibility::Strict
18731 ) {
18732 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18733 } else {
18734 Ok(())
18735 }
18736 }
18737 }
18738 }
18739}
18740
18741#[diagnostic::on_unimplemented(
18742 note = "If {Self} implements the non-local SymlinkServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18743)]
18744
18745pub trait SymlinkLocalServerHandler<
18749 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
18750 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18751>
18752{
18753 #[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"]
18754 fn link_into(
18755 &mut self,
18756
18757 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
18758
18759 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
18760 ) -> impl ::core::future::Future<Output = ()>;
18761
18762 fn clone(
18763 &mut self,
18764
18765 request: ::fidl_next::Request<symlink::Clone, ___T>,
18766 ) -> impl ::core::future::Future<Output = ()>;
18767
18768 #[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"]
18769 fn close(
18770 &mut self,
18771
18772 responder: ::fidl_next::Responder<symlink::Close, ___T>,
18773 ) -> impl ::core::future::Future<Output = ()>;
18774
18775 fn query(
18776 &mut self,
18777
18778 responder: ::fidl_next::Responder<symlink::Query, ___T>,
18779 ) -> impl ::core::future::Future<Output = ()>;
18780
18781 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
18782 fn deprecated_clone(
18783 &mut self,
18784
18785 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
18786 ) -> impl ::core::future::Future<Output = ()>;
18787
18788 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
18789 fn deprecated_get_attr(
18790 &mut self,
18791
18792 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
18793 ) -> impl ::core::future::Future<Output = ()>;
18794
18795 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18796 fn deprecated_set_attr(
18797 &mut self,
18798
18799 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
18800
18801 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
18802 ) -> impl ::core::future::Future<Output = ()>;
18803
18804 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
18805 fn deprecated_get_flags(
18806 &mut self,
18807
18808 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
18809 ) -> impl ::core::future::Future<Output = ()>;
18810
18811 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18812 fn deprecated_set_flags(
18813 &mut self,
18814
18815 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
18816
18817 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
18818 ) -> impl ::core::future::Future<Output = ()>;
18819
18820 #[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"]
18821 fn get_flags(
18822 &mut self,
18823
18824 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
18825 ) -> impl ::core::future::Future<Output = ()>;
18826
18827 #[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"]
18828 fn set_flags(
18829 &mut self,
18830
18831 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
18832
18833 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
18834 ) -> impl ::core::future::Future<Output = ()>;
18835
18836 #[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"]
18837 fn query_filesystem(
18838 &mut self,
18839
18840 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
18841 ) -> impl ::core::future::Future<Output = ()>;
18842
18843 #[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"]
18844 fn get_attributes(
18845 &mut self,
18846
18847 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
18848
18849 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
18850 ) -> impl ::core::future::Future<Output = ()>;
18851
18852 #[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"]
18853 fn update_attributes(
18854 &mut self,
18855
18856 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
18857
18858 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
18859 ) -> impl ::core::future::Future<Output = ()>;
18860
18861 #[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"]
18862 fn sync(
18863 &mut self,
18864
18865 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
18866 ) -> impl ::core::future::Future<Output = ()>;
18867
18868 #[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.READ_BYTES`] right.\n"]
18869 fn list_extended_attributes(
18870 &mut self,
18871
18872 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
18873 ) -> impl ::core::future::Future<Output = ()>;
18874
18875 #[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.READ_BYTES`] right.\n"]
18876 fn get_extended_attribute(
18877 &mut self,
18878
18879 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
18880
18881 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
18882 ) -> impl ::core::future::Future<Output = ()>;
18883
18884 #[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.WRITE_BYTES`] right.\n"]
18885 fn set_extended_attribute(
18886 &mut self,
18887
18888 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
18889
18890 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
18891 ) -> impl ::core::future::Future<Output = ()>;
18892
18893 #[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.WRITE_BYTES`] right.\n"]
18894 fn remove_extended_attribute(
18895 &mut self,
18896
18897 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
18898
18899 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
18900 ) -> impl ::core::future::Future<Output = ()>;
18901
18902 #[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"]
18903 fn open(
18904 &mut self,
18905
18906 request: ::fidl_next::Request<symlink::Open, ___T>,
18907 ) -> impl ::core::future::Future<Output = ()>;
18908
18909 fn describe(
18910 &mut self,
18911
18912 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
18913 ) -> impl ::core::future::Future<Output = ()>;
18914
18915 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
18916 ::core::future::ready(())
18917 }
18918}
18919
18920impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Symlink
18921where
18922 ___H: SymlinkLocalServerHandler<___T>,
18923 ___T: ::fidl_next::Transport,
18924 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
18925 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18926 Constraint = (),
18927 >,
18928 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
18929 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18930 Constraint = (),
18931 >,
18932 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
18933 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18934 Constraint = (),
18935 >,
18936 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
18937 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18938 Constraint = (),
18939 >,
18940 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
18941 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18942 Constraint = (),
18943 >,
18944 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
18945 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18946 Constraint = (),
18947 >,
18948 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
18949 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18950 Constraint = (),
18951 >,
18952 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
18953 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18954 Constraint = (),
18955 >,
18956 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
18957 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18958 Constraint = (),
18959 >,
18960 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18961 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18962 Constraint = (),
18963 >,
18964 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18965 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18966 Constraint = (),
18967 >,
18968 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18969 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18970 Constraint = (),
18971 >,
18972 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
18973 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18974 Constraint = (),
18975 >,
18976{
18977 async fn on_one_way(
18978 handler: &mut ___H,
18979 mut message: ::fidl_next::Message<___T>,
18980 ) -> ::core::result::Result<
18981 (),
18982 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18983 > {
18984 match *message.header().ordinal {
18985 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
18986 Ok(decoded) => {
18987 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
18988 Ok(())
18989 }
18990 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18991 ordinal: 2366825959783828089,
18992 error,
18993 }),
18994 },
18995
18996 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
18997 Ok(decoded) => {
18998 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
18999 Ok(())
19000 }
19001 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19002 ordinal: 6512600400724287855,
19003 error,
19004 }),
19005 },
19006
19007 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19008 Ok(decoded) => {
19009 handler
19010 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
19011 .await;
19012 Ok(())
19013 }
19014 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19015 ordinal: 5431626189872037072,
19016 error,
19017 }),
19018 },
19019
19020 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19021 Ok(decoded) => {
19022 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
19023 Ok(())
19024 }
19025 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19026 ordinal: 6236883748953765593,
19027 error,
19028 }),
19029 },
19030
19031 ordinal => {
19032 handler.on_unknown_interaction(ordinal).await;
19033 if ::core::matches!(
19034 message.header().flexibility(),
19035 ::fidl_next::protocol::Flexibility::Strict
19036 ) {
19037 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19038 } else {
19039 Ok(())
19040 }
19041 }
19042 }
19043 }
19044
19045 async fn on_two_way(
19046 handler: &mut ___H,
19047 mut message: ::fidl_next::Message<___T>,
19048 responder: ::fidl_next::protocol::Responder<___T>,
19049 ) -> ::core::result::Result<
19050 (),
19051 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19052 > {
19053 match *message.header().ordinal {
19054 6121399674497678964 => {
19055 let responder = ::fidl_next::Responder::from_untyped(responder);
19056
19057 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19058 Ok(decoded) => {
19059 handler
19060 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
19061 .await;
19062 Ok(())
19063 }
19064 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19065 ordinal: 6121399674497678964,
19066 error,
19067 }),
19068 }
19069 }
19070
19071 6540867515453498750 => {
19072 let responder = ::fidl_next::Responder::from_untyped(responder);
19073
19074 handler.close(responder).await;
19075 Ok(())
19076 }
19077
19078 2763219980499352582 => {
19079 let responder = ::fidl_next::Responder::from_untyped(responder);
19080
19081 handler.query(responder).await;
19082 Ok(())
19083 }
19084
19085 8689798978500614909 => {
19086 let responder = ::fidl_next::Responder::from_untyped(responder);
19087
19088 handler.deprecated_get_attr(responder).await;
19089 Ok(())
19090 }
19091
19092 4721673413776871238 => {
19093 let responder = ::fidl_next::Responder::from_untyped(responder);
19094
19095 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19096 Ok(decoded) => {
19097 handler
19098 .deprecated_set_attr(
19099 ::fidl_next::Request::from_decoded(decoded),
19100 responder,
19101 )
19102 .await;
19103 Ok(())
19104 }
19105 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19106 ordinal: 4721673413776871238,
19107 error,
19108 }),
19109 }
19110 }
19111
19112 6595803110182632097 => {
19113 let responder = ::fidl_next::Responder::from_untyped(responder);
19114
19115 handler.deprecated_get_flags(responder).await;
19116 Ok(())
19117 }
19118
19119 5950864159036794675 => {
19120 let responder = ::fidl_next::Responder::from_untyped(responder);
19121
19122 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19123 Ok(decoded) => {
19124 handler
19125 .deprecated_set_flags(
19126 ::fidl_next::Request::from_decoded(decoded),
19127 responder,
19128 )
19129 .await;
19130 Ok(())
19131 }
19132 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19133 ordinal: 5950864159036794675,
19134 error,
19135 }),
19136 }
19137 }
19138
19139 105530239381466147 => {
19140 let responder = ::fidl_next::Responder::from_untyped(responder);
19141
19142 handler.get_flags(responder).await;
19143 Ok(())
19144 }
19145
19146 6172186066099445416 => {
19147 let responder = ::fidl_next::Responder::from_untyped(responder);
19148
19149 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19150 Ok(decoded) => {
19151 handler
19152 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
19153 .await;
19154 Ok(())
19155 }
19156 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19157 ordinal: 6172186066099445416,
19158 error,
19159 }),
19160 }
19161 }
19162
19163 8013111122914313744 => {
19164 let responder = ::fidl_next::Responder::from_untyped(responder);
19165
19166 handler.query_filesystem(responder).await;
19167 Ok(())
19168 }
19169
19170 4414537700416816443 => {
19171 let responder = ::fidl_next::Responder::from_untyped(responder);
19172
19173 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19174 Ok(decoded) => {
19175 handler
19176 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
19177 .await;
19178 Ok(())
19179 }
19180 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19181 ordinal: 4414537700416816443,
19182 error,
19183 }),
19184 }
19185 }
19186
19187 3677402239314018056 => {
19188 let responder = ::fidl_next::Responder::from_untyped(responder);
19189
19190 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19191 Ok(decoded) => {
19192 handler
19193 .update_attributes(
19194 ::fidl_next::Request::from_decoded(decoded),
19195 responder,
19196 )
19197 .await;
19198 Ok(())
19199 }
19200 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19201 ordinal: 3677402239314018056,
19202 error,
19203 }),
19204 }
19205 }
19206
19207 3196473584242777161 => {
19208 let responder = ::fidl_next::Responder::from_untyped(responder);
19209
19210 handler.sync(responder).await;
19211 Ok(())
19212 }
19213
19214 5043930208506967771 => {
19215 let responder = ::fidl_next::Responder::from_untyped(responder);
19216
19217 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19218 Ok(decoded) => {
19219 handler
19220 .get_extended_attribute(
19221 ::fidl_next::Request::from_decoded(decoded),
19222 responder,
19223 )
19224 .await;
19225 Ok(())
19226 }
19227 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19228 ordinal: 5043930208506967771,
19229 error,
19230 }),
19231 }
19232 }
19233
19234 5374223046099989052 => {
19235 let responder = ::fidl_next::Responder::from_untyped(responder);
19236
19237 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19238 Ok(decoded) => {
19239 handler
19240 .set_extended_attribute(
19241 ::fidl_next::Request::from_decoded(decoded),
19242 responder,
19243 )
19244 .await;
19245 Ok(())
19246 }
19247 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19248 ordinal: 5374223046099989052,
19249 error,
19250 }),
19251 }
19252 }
19253
19254 8794297771444732717 => {
19255 let responder = ::fidl_next::Responder::from_untyped(responder);
19256
19257 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19258 Ok(decoded) => {
19259 handler
19260 .remove_extended_attribute(
19261 ::fidl_next::Request::from_decoded(decoded),
19262 responder,
19263 )
19264 .await;
19265 Ok(())
19266 }
19267 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19268 ordinal: 8794297771444732717,
19269 error,
19270 }),
19271 }
19272 }
19273
19274 8371117097481679347 => {
19275 let responder = ::fidl_next::Responder::from_untyped(responder);
19276
19277 handler.describe(responder).await;
19278 Ok(())
19279 }
19280
19281 ordinal => {
19282 handler.on_unknown_interaction(ordinal).await;
19283 if ::core::matches!(
19284 message.header().flexibility(),
19285 ::fidl_next::protocol::Flexibility::Strict
19286 ) {
19287 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19288 } else {
19289 responder
19290 .respond_framework_error(
19291 ordinal,
19292 ::fidl_next::FrameworkError::UnknownMethod,
19293 )
19294 .expect("encoding a framework error should never fail")
19295 .await?;
19296 Ok(())
19297 }
19298 }
19299 }
19300 }
19301}
19302
19303pub trait SymlinkClientHandler<
19307 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19308 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19309>
19310{
19311 #[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"]
19312 fn on_open(
19313 &mut self,
19314
19315 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
19316 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19317
19318 #[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"]
19319 fn on_representation(
19320 &mut self,
19321
19322 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19323 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19324
19325 fn on_unknown_interaction(
19326 &mut self,
19327 ordinal: u64,
19328 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
19329 ::core::future::ready(())
19330 }
19331}
19332
19333impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Symlink
19334where
19335 ___H: SymlinkClientHandler<___T> + ::core::marker::Send,
19336 ___T: ::fidl_next::Transport,
19337 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
19338 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19339 Constraint = (),
19340 >,
19341 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
19342 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19343 Constraint = (),
19344 >,
19345{
19346 async fn on_event(
19347 handler: &mut ___H,
19348 mut message: ::fidl_next::Message<___T>,
19349 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
19350 match *message.header().ordinal {
19351 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19352 Ok(decoded) => {
19353 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
19354 Ok(())
19355 }
19356 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19357 ordinal: 9207534335756671346,
19358 error,
19359 }),
19360 },
19361
19362 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19363 Ok(decoded) => {
19364 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
19365 Ok(())
19366 }
19367 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19368 ordinal: 6679970090861613324,
19369 error,
19370 }),
19371 },
19372
19373 ordinal => {
19374 handler.on_unknown_interaction(ordinal).await;
19375 if ::core::matches!(
19376 message.header().flexibility(),
19377 ::fidl_next::protocol::Flexibility::Strict
19378 ) {
19379 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19380 } else {
19381 Ok(())
19382 }
19383 }
19384 }
19385 }
19386}
19387
19388pub trait SymlinkServerHandler<
19392 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19393 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19394>
19395{
19396 #[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"]
19397 fn link_into(
19398 &mut self,
19399
19400 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
19401
19402 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
19403 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19404
19405 fn clone(
19406 &mut self,
19407
19408 request: ::fidl_next::Request<symlink::Clone, ___T>,
19409 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19410
19411 #[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"]
19412 fn close(
19413 &mut self,
19414
19415 responder: ::fidl_next::Responder<symlink::Close, ___T>,
19416 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19417
19418 fn query(
19419 &mut self,
19420
19421 responder: ::fidl_next::Responder<symlink::Query, ___T>,
19422 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19423
19424 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
19425 fn deprecated_clone(
19426 &mut self,
19427
19428 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
19429 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19430
19431 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
19432 fn deprecated_get_attr(
19433 &mut self,
19434
19435 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
19436 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19437
19438 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
19439 fn deprecated_set_attr(
19440 &mut self,
19441
19442 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
19443
19444 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
19445 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19446
19447 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
19448 fn deprecated_get_flags(
19449 &mut self,
19450
19451 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
19452 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19453
19454 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
19455 fn deprecated_set_flags(
19456 &mut self,
19457
19458 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
19459
19460 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
19461 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19462
19463 #[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"]
19464 fn get_flags(
19465 &mut self,
19466
19467 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
19468 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19469
19470 #[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"]
19471 fn set_flags(
19472 &mut self,
19473
19474 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
19475
19476 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
19477 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19478
19479 #[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"]
19480 fn query_filesystem(
19481 &mut self,
19482
19483 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
19484 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19485
19486 #[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"]
19487 fn get_attributes(
19488 &mut self,
19489
19490 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
19491
19492 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
19493 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19494
19495 #[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"]
19496 fn update_attributes(
19497 &mut self,
19498
19499 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
19500
19501 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
19502 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19503
19504 #[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"]
19505 fn sync(
19506 &mut self,
19507
19508 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
19509 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19510
19511 #[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.READ_BYTES`] right.\n"]
19512 fn list_extended_attributes(
19513 &mut self,
19514
19515 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
19516 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19517
19518 #[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.READ_BYTES`] right.\n"]
19519 fn get_extended_attribute(
19520 &mut self,
19521
19522 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
19523
19524 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
19525 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19526
19527 #[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.WRITE_BYTES`] right.\n"]
19528 fn set_extended_attribute(
19529 &mut self,
19530
19531 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
19532
19533 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
19534 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19535
19536 #[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.WRITE_BYTES`] right.\n"]
19537 fn remove_extended_attribute(
19538 &mut self,
19539
19540 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
19541
19542 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
19543 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19544
19545 #[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"]
19546 fn open(
19547 &mut self,
19548
19549 request: ::fidl_next::Request<symlink::Open, ___T>,
19550 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19551
19552 fn describe(
19553 &mut self,
19554
19555 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
19556 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19557
19558 fn on_unknown_interaction(
19559 &mut self,
19560 ordinal: u64,
19561 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
19562 ::core::future::ready(())
19563 }
19564}
19565
19566impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Symlink
19567where
19568 ___H: SymlinkServerHandler<___T> + ::core::marker::Send,
19569 ___T: ::fidl_next::Transport,
19570 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
19571 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19572 Constraint = (),
19573 >,
19574 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
19575 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19576 Constraint = (),
19577 >,
19578 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
19579 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19580 Constraint = (),
19581 >,
19582 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
19583 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19584 Constraint = (),
19585 >,
19586 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
19587 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19588 Constraint = (),
19589 >,
19590 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
19591 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19592 Constraint = (),
19593 >,
19594 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
19595 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19596 Constraint = (),
19597 >,
19598 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
19599 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19600 Constraint = (),
19601 >,
19602 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
19603 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19604 Constraint = (),
19605 >,
19606 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19607 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19608 Constraint = (),
19609 >,
19610 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19611 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19612 Constraint = (),
19613 >,
19614 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19615 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19616 Constraint = (),
19617 >,
19618 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
19619 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19620 Constraint = (),
19621 >,
19622{
19623 async fn on_one_way(
19624 handler: &mut ___H,
19625 mut message: ::fidl_next::Message<___T>,
19626 ) -> ::core::result::Result<
19627 (),
19628 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19629 > {
19630 match *message.header().ordinal {
19631 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19632 Ok(decoded) => {
19633 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
19634 Ok(())
19635 }
19636 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19637 ordinal: 2366825959783828089,
19638 error,
19639 }),
19640 },
19641
19642 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19643 Ok(decoded) => {
19644 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
19645 Ok(())
19646 }
19647 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19648 ordinal: 6512600400724287855,
19649 error,
19650 }),
19651 },
19652
19653 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19654 Ok(decoded) => {
19655 handler
19656 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
19657 .await;
19658 Ok(())
19659 }
19660 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19661 ordinal: 5431626189872037072,
19662 error,
19663 }),
19664 },
19665
19666 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19667 Ok(decoded) => {
19668 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
19669 Ok(())
19670 }
19671 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19672 ordinal: 6236883748953765593,
19673 error,
19674 }),
19675 },
19676
19677 ordinal => {
19678 handler.on_unknown_interaction(ordinal).await;
19679 if ::core::matches!(
19680 message.header().flexibility(),
19681 ::fidl_next::protocol::Flexibility::Strict
19682 ) {
19683 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19684 } else {
19685 Ok(())
19686 }
19687 }
19688 }
19689 }
19690
19691 async fn on_two_way(
19692 handler: &mut ___H,
19693 mut message: ::fidl_next::Message<___T>,
19694 responder: ::fidl_next::protocol::Responder<___T>,
19695 ) -> ::core::result::Result<
19696 (),
19697 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19698 > {
19699 match *message.header().ordinal {
19700 6121399674497678964 => {
19701 let responder = ::fidl_next::Responder::from_untyped(responder);
19702
19703 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19704 Ok(decoded) => {
19705 handler
19706 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
19707 .await;
19708 Ok(())
19709 }
19710 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19711 ordinal: 6121399674497678964,
19712 error,
19713 }),
19714 }
19715 }
19716
19717 6540867515453498750 => {
19718 let responder = ::fidl_next::Responder::from_untyped(responder);
19719
19720 handler.close(responder).await;
19721 Ok(())
19722 }
19723
19724 2763219980499352582 => {
19725 let responder = ::fidl_next::Responder::from_untyped(responder);
19726
19727 handler.query(responder).await;
19728 Ok(())
19729 }
19730
19731 8689798978500614909 => {
19732 let responder = ::fidl_next::Responder::from_untyped(responder);
19733
19734 handler.deprecated_get_attr(responder).await;
19735 Ok(())
19736 }
19737
19738 4721673413776871238 => {
19739 let responder = ::fidl_next::Responder::from_untyped(responder);
19740
19741 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19742 Ok(decoded) => {
19743 handler
19744 .deprecated_set_attr(
19745 ::fidl_next::Request::from_decoded(decoded),
19746 responder,
19747 )
19748 .await;
19749 Ok(())
19750 }
19751 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19752 ordinal: 4721673413776871238,
19753 error,
19754 }),
19755 }
19756 }
19757
19758 6595803110182632097 => {
19759 let responder = ::fidl_next::Responder::from_untyped(responder);
19760
19761 handler.deprecated_get_flags(responder).await;
19762 Ok(())
19763 }
19764
19765 5950864159036794675 => {
19766 let responder = ::fidl_next::Responder::from_untyped(responder);
19767
19768 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19769 Ok(decoded) => {
19770 handler
19771 .deprecated_set_flags(
19772 ::fidl_next::Request::from_decoded(decoded),
19773 responder,
19774 )
19775 .await;
19776 Ok(())
19777 }
19778 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19779 ordinal: 5950864159036794675,
19780 error,
19781 }),
19782 }
19783 }
19784
19785 105530239381466147 => {
19786 let responder = ::fidl_next::Responder::from_untyped(responder);
19787
19788 handler.get_flags(responder).await;
19789 Ok(())
19790 }
19791
19792 6172186066099445416 => {
19793 let responder = ::fidl_next::Responder::from_untyped(responder);
19794
19795 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19796 Ok(decoded) => {
19797 handler
19798 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
19799 .await;
19800 Ok(())
19801 }
19802 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19803 ordinal: 6172186066099445416,
19804 error,
19805 }),
19806 }
19807 }
19808
19809 8013111122914313744 => {
19810 let responder = ::fidl_next::Responder::from_untyped(responder);
19811
19812 handler.query_filesystem(responder).await;
19813 Ok(())
19814 }
19815
19816 4414537700416816443 => {
19817 let responder = ::fidl_next::Responder::from_untyped(responder);
19818
19819 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19820 Ok(decoded) => {
19821 handler
19822 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
19823 .await;
19824 Ok(())
19825 }
19826 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19827 ordinal: 4414537700416816443,
19828 error,
19829 }),
19830 }
19831 }
19832
19833 3677402239314018056 => {
19834 let responder = ::fidl_next::Responder::from_untyped(responder);
19835
19836 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19837 Ok(decoded) => {
19838 handler
19839 .update_attributes(
19840 ::fidl_next::Request::from_decoded(decoded),
19841 responder,
19842 )
19843 .await;
19844 Ok(())
19845 }
19846 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19847 ordinal: 3677402239314018056,
19848 error,
19849 }),
19850 }
19851 }
19852
19853 3196473584242777161 => {
19854 let responder = ::fidl_next::Responder::from_untyped(responder);
19855
19856 handler.sync(responder).await;
19857 Ok(())
19858 }
19859
19860 5043930208506967771 => {
19861 let responder = ::fidl_next::Responder::from_untyped(responder);
19862
19863 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19864 Ok(decoded) => {
19865 handler
19866 .get_extended_attribute(
19867 ::fidl_next::Request::from_decoded(decoded),
19868 responder,
19869 )
19870 .await;
19871 Ok(())
19872 }
19873 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19874 ordinal: 5043930208506967771,
19875 error,
19876 }),
19877 }
19878 }
19879
19880 5374223046099989052 => {
19881 let responder = ::fidl_next::Responder::from_untyped(responder);
19882
19883 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19884 Ok(decoded) => {
19885 handler
19886 .set_extended_attribute(
19887 ::fidl_next::Request::from_decoded(decoded),
19888 responder,
19889 )
19890 .await;
19891 Ok(())
19892 }
19893 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19894 ordinal: 5374223046099989052,
19895 error,
19896 }),
19897 }
19898 }
19899
19900 8794297771444732717 => {
19901 let responder = ::fidl_next::Responder::from_untyped(responder);
19902
19903 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19904 Ok(decoded) => {
19905 handler
19906 .remove_extended_attribute(
19907 ::fidl_next::Request::from_decoded(decoded),
19908 responder,
19909 )
19910 .await;
19911 Ok(())
19912 }
19913 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19914 ordinal: 8794297771444732717,
19915 error,
19916 }),
19917 }
19918 }
19919
19920 8371117097481679347 => {
19921 let responder = ::fidl_next::Responder::from_untyped(responder);
19922
19923 handler.describe(responder).await;
19924 Ok(())
19925 }
19926
19927 ordinal => {
19928 handler.on_unknown_interaction(ordinal).await;
19929 if ::core::matches!(
19930 message.header().flexibility(),
19931 ::fidl_next::protocol::Flexibility::Strict
19932 ) {
19933 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19934 } else {
19935 responder
19936 .respond_framework_error(
19937 ordinal,
19938 ::fidl_next::FrameworkError::UnknownMethod,
19939 )
19940 .expect("encoding a framework error should never fail")
19941 .await?;
19942 Ok(())
19943 }
19944 }
19945 }
19946 }
19947}
19948
19949impl<___T> SymlinkClientHandler<___T> for ::fidl_next::IgnoreEvents
19950where
19951 ___T: ::fidl_next::Transport,
19952{
19953 async fn on_open(&mut self, _: ::fidl_next::Request<symlink::OnOpen, ___T>) {}
19954
19955 async fn on_representation(
19956 &mut self,
19957
19958 _: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19959 ) {
19960 }
19961
19962 async fn on_unknown_interaction(&mut self, _: u64) {}
19963}
19964
19965impl<___H, ___T> SymlinkLocalClientHandler<___T> for ::fidl_next::Local<___H>
19966where
19967 ___H: SymlinkClientHandler<___T>,
19968 ___T: ::fidl_next::Transport,
19969{
19970 async fn on_open(&mut self, request: ::fidl_next::Request<symlink::OnOpen, ___T>) {
19971 ___H::on_open(&mut self.0, request).await
19972 }
19973
19974 async fn on_representation(
19975 &mut self,
19976
19977 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19978 ) {
19979 ___H::on_representation(&mut self.0, request).await
19980 }
19981
19982 async fn on_unknown_interaction(&mut self, ordinal: u64) {
19983 ___H::on_unknown_interaction(&mut self.0, ordinal).await
19984 }
19985}
19986
19987impl<___H, ___T> SymlinkLocalServerHandler<___T> for ::fidl_next::Local<___H>
19988where
19989 ___H: SymlinkServerHandler<___T>,
19990 ___T: ::fidl_next::Transport,
19991{
19992 async fn link_into(
19993 &mut self,
19994
19995 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
19996
19997 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
19998 ) {
19999 ___H::link_into(&mut self.0, request, responder).await
20000 }
20001
20002 async fn clone(&mut self, request: ::fidl_next::Request<symlink::Clone, ___T>) {
20003 ___H::clone(&mut self.0, request).await
20004 }
20005
20006 async fn close(&mut self, responder: ::fidl_next::Responder<symlink::Close, ___T>) {
20007 ___H::close(&mut self.0, responder).await
20008 }
20009
20010 async fn query(&mut self, responder: ::fidl_next::Responder<symlink::Query, ___T>) {
20011 ___H::query(&mut self.0, responder).await
20012 }
20013
20014 async fn deprecated_clone(
20015 &mut self,
20016
20017 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
20018 ) {
20019 ___H::deprecated_clone(&mut self.0, request).await
20020 }
20021
20022 async fn deprecated_get_attr(
20023 &mut self,
20024
20025 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
20026 ) {
20027 ___H::deprecated_get_attr(&mut self.0, responder).await
20028 }
20029
20030 async fn deprecated_set_attr(
20031 &mut self,
20032
20033 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
20034
20035 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
20036 ) {
20037 ___H::deprecated_set_attr(&mut self.0, request, responder).await
20038 }
20039
20040 async fn deprecated_get_flags(
20041 &mut self,
20042
20043 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
20044 ) {
20045 ___H::deprecated_get_flags(&mut self.0, responder).await
20046 }
20047
20048 async fn deprecated_set_flags(
20049 &mut self,
20050
20051 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
20052
20053 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
20054 ) {
20055 ___H::deprecated_set_flags(&mut self.0, request, responder).await
20056 }
20057
20058 async fn get_flags(&mut self, responder: ::fidl_next::Responder<symlink::GetFlags, ___T>) {
20059 ___H::get_flags(&mut self.0, responder).await
20060 }
20061
20062 async fn set_flags(
20063 &mut self,
20064
20065 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
20066
20067 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
20068 ) {
20069 ___H::set_flags(&mut self.0, request, responder).await
20070 }
20071
20072 async fn query_filesystem(
20073 &mut self,
20074
20075 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
20076 ) {
20077 ___H::query_filesystem(&mut self.0, responder).await
20078 }
20079
20080 async fn get_attributes(
20081 &mut self,
20082
20083 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
20084
20085 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
20086 ) {
20087 ___H::get_attributes(&mut self.0, request, responder).await
20088 }
20089
20090 async fn update_attributes(
20091 &mut self,
20092
20093 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
20094
20095 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
20096 ) {
20097 ___H::update_attributes(&mut self.0, request, responder).await
20098 }
20099
20100 async fn sync(&mut self, responder: ::fidl_next::Responder<symlink::Sync, ___T>) {
20101 ___H::sync(&mut self.0, responder).await
20102 }
20103
20104 async fn list_extended_attributes(
20105 &mut self,
20106
20107 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
20108 ) {
20109 ___H::list_extended_attributes(&mut self.0, request).await
20110 }
20111
20112 async fn get_extended_attribute(
20113 &mut self,
20114
20115 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
20116
20117 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
20118 ) {
20119 ___H::get_extended_attribute(&mut self.0, request, responder).await
20120 }
20121
20122 async fn set_extended_attribute(
20123 &mut self,
20124
20125 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
20126
20127 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
20128 ) {
20129 ___H::set_extended_attribute(&mut self.0, request, responder).await
20130 }
20131
20132 async fn remove_extended_attribute(
20133 &mut self,
20134
20135 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
20136
20137 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
20138 ) {
20139 ___H::remove_extended_attribute(&mut self.0, request, responder).await
20140 }
20141
20142 async fn open(&mut self, request: ::fidl_next::Request<symlink::Open, ___T>) {
20143 ___H::open(&mut self.0, request).await
20144 }
20145
20146 async fn describe(&mut self, responder: ::fidl_next::Responder<symlink::Describe, ___T>) {
20147 ___H::describe(&mut self.0, responder).await
20148 }
20149
20150 async fn on_unknown_interaction(&mut self, ordinal: u64) {
20151 ___H::on_unknown_interaction(&mut self.0, ordinal).await
20152 }
20153}
20154
20155pub use fidl_next_common_fuchsia_io::*;