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: ::fdomain_client::fidl_next::HandleEncoder,
28 {
29 #[inline]
30 fn encode(
31 mut self,
32 encoder: &mut ___E,
33 out: &mut ::core::mem::MaybeUninit<crate::wire::ConnectionInfo<'static>>,
34 _: (),
35 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
36 ::fidl_next::munge!(let crate::wire::ConnectionInfo { table } = out);
37
38 let max_ord = self.__max_ordinal();
39
40 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
41 ::fidl_next::Wire::zero_padding(&mut out);
42
43 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
44 ::fidl_next::wire::Envelope,
45 >(encoder, max_ord);
46
47 for i in 1..=max_ord {
48 match i {
49 1 => {
50 if let Some(value) = self.rights.take() {
51 ::fidl_next::wire::Envelope::encode_value::<
52 crate::wire::Operations,
53 ___E,
54 >(
55 value, preallocated.encoder, &mut out, ()
56 )?;
57 } else {
58 ::fidl_next::wire::Envelope::encode_zero(&mut out)
59 }
60 }
61
62 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
63 }
64 unsafe {
65 preallocated.write_next(out.assume_init_ref());
66 }
67 }
68
69 ::fidl_next::wire::Table::encode_len(table, max_ord);
70
71 Ok(())
72 }
73 }
74
75 impl<'de> ::fidl_next::FromWire<crate::wire::ConnectionInfo<'de>> for ConnectionInfo {
76 #[inline]
77 fn from_wire(wire_: crate::wire::ConnectionInfo<'de>) -> Self {
78 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
79
80 let rights = wire_.table.get(1);
81
82 Self {
83 rights: rights.map(|envelope| {
84 ::fidl_next::FromWire::from_wire(unsafe {
85 envelope.read_unchecked::<crate::wire::Operations>()
86 })
87 }),
88 }
89 }
90 }
91
92 #[derive(Debug, PartialEq)]
93 #[repr(C)]
94 pub struct DirectoryGetTokenResponse {
95 pub s: i32,
96
97 pub token: ::core::option::Option<::fdomain_client::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: ::fdomain_client::fidl_next::HandleEncoder,
105 {
106 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
107 Self,
108 crate::wire::DirectoryGetTokenResponse,
109 > = unsafe {
110 ::fidl_next::CopyOptimization::enable_if(
111 true
112
113 && <
114 i32 as ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>
115 >::COPY_OPTIMIZATION.is_enabled()
116
117 && <
118 ::core::option::Option<::fdomain_client::NullableHandle> as ::fidl_next::Encode<::fdomain_client::fidl_next::wire::OptionalHandle, ___E>
119 >::COPY_OPTIMIZATION.is_enabled()
120
121 )
122 };
123
124 #[inline]
125 fn encode(
126 self,
127 encoder_: &mut ___E,
128 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryGetTokenResponse>,
129 _: (),
130 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
131 ::fidl_next::munge! {
132 let crate::wire::DirectoryGetTokenResponse {
133 s,
134 token,
135
136 } = out_;
137 }
138
139 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
140
141 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
142
143 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
144
145 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
146
147 Ok(())
148 }
149 }
150
151 unsafe impl<___E>
152 ::fidl_next::EncodeOption<
153 ::fidl_next::wire::Box<'static, crate::wire::DirectoryGetTokenResponse>,
154 ___E,
155 > for DirectoryGetTokenResponse
156 where
157 ___E: ::fidl_next::Encoder + ?Sized,
158 DirectoryGetTokenResponse:
159 ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>,
160 {
161 #[inline]
162 fn encode_option(
163 this: ::core::option::Option<Self>,
164 encoder: &mut ___E,
165 out: &mut ::core::mem::MaybeUninit<
166 ::fidl_next::wire::Box<'static, crate::wire::DirectoryGetTokenResponse>,
167 >,
168 _: (),
169 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
170 if let Some(inner) = this {
171 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
172 ::fidl_next::wire::Box::encode_present(out);
173 } else {
174 ::fidl_next::wire::Box::encode_absent(out);
175 }
176
177 Ok(())
178 }
179 }
180
181 impl ::fidl_next::FromWire<crate::wire::DirectoryGetTokenResponse> for DirectoryGetTokenResponse {
182 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
183 crate::wire::DirectoryGetTokenResponse,
184 Self,
185 > = unsafe {
186 ::fidl_next::CopyOptimization::enable_if(
187 true
188
189 && <
190 i32 as ::fidl_next::FromWire<::fidl_next::wire::Int32>
191 >::COPY_OPTIMIZATION.is_enabled()
192
193 && <
194 ::core::option::Option<::fdomain_client::NullableHandle> as ::fidl_next::FromWire<::fdomain_client::fidl_next::wire::OptionalHandle>
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: ::fdomain_client::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: ::fdomain_client::fidl_next::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 = ::fdomain_client::Event;
305
306 #[derive(Debug, PartialEq)]
307 pub struct DirectoryRenameRequest {
308 pub src: ::std::string::String,
309
310 pub dst_parent_token: ::fdomain_client::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: ::fdomain_client::fidl_next::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: ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fdomain_client::Channel>,
410 }
411
412 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
413 for DirectoryWatchRequest
414 where
415 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
416 ___E: ::fdomain_client::fidl_next::HandleEncoder,
417 {
418 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
419 Self,
420 crate::wire::DirectoryWatchRequest,
421 > = unsafe {
422 ::fidl_next::CopyOptimization::enable_if(
423 true
424
425 && <
426 crate::natural::WatchMask as ::fidl_next::Encode<crate::wire::WatchMask, ___E>
427 >::COPY_OPTIMIZATION.is_enabled()
428
429 && <
430 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
431 >::COPY_OPTIMIZATION.is_enabled()
432
433 && <
434 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fdomain_client::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fdomain_client::fidl_next::wire::Handle>, ___E>
435 >::COPY_OPTIMIZATION.is_enabled()
436
437 )
438 };
439
440 #[inline]
441 fn encode(
442 self,
443 encoder_: &mut ___E,
444 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
445 _: (),
446 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
447 ::fidl_next::munge! {
448 let crate::wire::DirectoryWatchRequest {
449 mask,
450 options,
451 watcher,
452
453 } = out_;
454 }
455
456 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
457
458 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mask.as_mut_ptr()) };
459
460 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
461
462 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
463
464 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
465
466 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(watcher.as_mut_ptr()) };
467
468 Ok(())
469 }
470 }
471
472 unsafe impl<___E>
473 ::fidl_next::EncodeOption<
474 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchRequest>,
475 ___E,
476 > for DirectoryWatchRequest
477 where
478 ___E: ::fidl_next::Encoder + ?Sized,
479 DirectoryWatchRequest: ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>,
480 {
481 #[inline]
482 fn encode_option(
483 this: ::core::option::Option<Self>,
484 encoder: &mut ___E,
485 out: &mut ::core::mem::MaybeUninit<
486 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchRequest>,
487 >,
488 _: (),
489 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
490 if let Some(inner) = this {
491 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
492 ::fidl_next::wire::Box::encode_present(out);
493 } else {
494 ::fidl_next::wire::Box::encode_absent(out);
495 }
496
497 Ok(())
498 }
499 }
500
501 impl ::fidl_next::FromWire<crate::wire::DirectoryWatchRequest> for DirectoryWatchRequest {
502 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
503 crate::wire::DirectoryWatchRequest,
504 Self,
505 > = unsafe {
506 ::fidl_next::CopyOptimization::enable_if(
507 true
508
509 && <
510 crate::natural::WatchMask as ::fidl_next::FromWire<crate::wire::WatchMask>
511 >::COPY_OPTIMIZATION.is_enabled()
512
513 && <
514 u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>
515 >::COPY_OPTIMIZATION.is_enabled()
516
517 && <
518 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fdomain_client::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fdomain_client::fidl_next::wire::Handle>>
519 >::COPY_OPTIMIZATION.is_enabled()
520
521 )
522 };
523
524 #[inline]
525 fn from_wire(wire: crate::wire::DirectoryWatchRequest) -> Self {
526 Self {
527 mask: ::fidl_next::FromWire::from_wire(wire.mask),
528
529 options: ::fidl_next::FromWire::from_wire(wire.options),
530
531 watcher: ::fidl_next::FromWire::from_wire(wire.watcher),
532 }
533 }
534 }
535
536 #[derive(Debug, PartialEq)]
537 pub struct NodeOnOpenRequest {
538 pub s: i32,
539
540 pub info: ::core::option::Option<::std::boxed::Box<crate::natural::NodeInfoDeprecated>>,
541 }
542
543 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
544 for NodeOnOpenRequest
545 where
546 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
547 ___E: ::fidl_next::Encoder,
548 ___E: ::fdomain_client::fidl_next::HandleEncoder,
549 {
550 #[inline]
551 fn encode(
552 self,
553 encoder_: &mut ___E,
554 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
555 _: (),
556 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
557 ::fidl_next::munge! {
558 let crate::wire::NodeOnOpenRequest {
559 s,
560 info,
561
562 } = out_;
563 }
564
565 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
566
567 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
568
569 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
570
571 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
572
573 Ok(())
574 }
575 }
576
577 unsafe impl<___E>
578 ::fidl_next::EncodeOption<
579 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
580 ___E,
581 > for NodeOnOpenRequest
582 where
583 ___E: ::fidl_next::Encoder + ?Sized,
584 NodeOnOpenRequest: ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>,
585 {
586 #[inline]
587 fn encode_option(
588 this: ::core::option::Option<Self>,
589 encoder: &mut ___E,
590 out: &mut ::core::mem::MaybeUninit<
591 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
592 >,
593 _: (),
594 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
595 if let Some(inner) = this {
596 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
597 ::fidl_next::wire::Box::encode_present(out);
598 } else {
599 ::fidl_next::wire::Box::encode_absent(out);
600 }
601
602 Ok(())
603 }
604 }
605
606 impl<'de> ::fidl_next::FromWire<crate::wire::NodeOnOpenRequest<'de>> for NodeOnOpenRequest {
607 #[inline]
608 fn from_wire(wire: crate::wire::NodeOnOpenRequest<'de>) -> Self {
609 Self {
610 s: ::fidl_next::FromWire::from_wire(wire.s),
611
612 info: ::fidl_next::FromWire::from_wire(wire.info),
613 }
614 }
615 }
616
617 #[derive(Debug, PartialEq)]
618 #[repr(C)]
619 pub struct NodeListExtendedAttributesRequest {
620 pub iterator:
621 ::fidl_next::ServerEnd<crate::ExtendedAttributeIterator, ::fdomain_client::Channel>,
622 }
623
624 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
625 for NodeListExtendedAttributesRequest
626 where
627 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
628 ___E: ::fdomain_client::fidl_next::HandleEncoder,
629 {
630 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
631 Self,
632 crate::wire::NodeListExtendedAttributesRequest,
633 > = unsafe {
634 ::fidl_next::CopyOptimization::enable_if(
635 true && <::fidl_next::ServerEnd<
636 crate::ExtendedAttributeIterator,
637 ::fdomain_client::Channel,
638 > as ::fidl_next::Encode<
639 ::fidl_next::ServerEnd<
640 crate::ExtendedAttributeIterator,
641 ::fdomain_client::fidl_next::wire::Handle,
642 >,
643 ___E,
644 >>::COPY_OPTIMIZATION
645 .is_enabled(),
646 )
647 };
648
649 #[inline]
650 fn encode(
651 self,
652 encoder_: &mut ___E,
653 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
654 _: (),
655 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
656 ::fidl_next::munge! {
657 let crate::wire::NodeListExtendedAttributesRequest {
658 iterator,
659
660 } = out_;
661 }
662
663 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
664
665 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
666
667 Ok(())
668 }
669 }
670
671 unsafe impl<___E>
672 ::fidl_next::EncodeOption<
673 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
674 ___E,
675 > for NodeListExtendedAttributesRequest
676 where
677 ___E: ::fidl_next::Encoder + ?Sized,
678 NodeListExtendedAttributesRequest:
679 ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>,
680 {
681 #[inline]
682 fn encode_option(
683 this: ::core::option::Option<Self>,
684 encoder: &mut ___E,
685 out: &mut ::core::mem::MaybeUninit<
686 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
687 >,
688 _: (),
689 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
690 if let Some(inner) = this {
691 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
692 ::fidl_next::wire::Box::encode_present(out);
693 } else {
694 ::fidl_next::wire::Box::encode_absent(out);
695 }
696
697 Ok(())
698 }
699 }
700
701 impl ::fidl_next::FromWire<crate::wire::NodeListExtendedAttributesRequest>
702 for NodeListExtendedAttributesRequest
703 {
704 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
705 crate::wire::NodeListExtendedAttributesRequest,
706 Self,
707 > = unsafe {
708 ::fidl_next::CopyOptimization::enable_if(
709 true && <::fidl_next::ServerEnd<
710 crate::ExtendedAttributeIterator,
711 ::fdomain_client::Channel,
712 > as ::fidl_next::FromWire<
713 ::fidl_next::ServerEnd<
714 crate::ExtendedAttributeIterator,
715 ::fdomain_client::fidl_next::wire::Handle,
716 >,
717 >>::COPY_OPTIMIZATION
718 .is_enabled(),
719 )
720 };
721
722 #[inline]
723 fn from_wire(wire: crate::wire::NodeListExtendedAttributesRequest) -> Self {
724 Self { iterator: ::fidl_next::FromWire::from_wire(wire.iterator) }
725 }
726 }
727
728 #[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"]
729 #[derive(Debug, PartialEq)]
730 pub enum ExtendedAttributeValue {
731 Bytes(::std::vec::Vec<u8>),
732
733 Buffer(::fdomain_client::Vmo),
734
735 UnknownOrdinal_(u64),
736 }
737
738 impl ExtendedAttributeValue {
739 pub fn is_unknown(&self) -> bool {
740 #[allow(unreachable_patterns)]
741 match self {
742 Self::UnknownOrdinal_(_) => true,
743 _ => false,
744 }
745 }
746 }
747
748 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>
749 for ExtendedAttributeValue
750 where
751 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
752 ___E: ::fidl_next::Encoder,
753 ___E: ::fdomain_client::fidl_next::HandleEncoder,
754 {
755 #[inline]
756 fn encode(
757 self,
758 encoder: &mut ___E,
759 out: &mut ::core::mem::MaybeUninit<crate::wire::ExtendedAttributeValue<'static>>,
760 _: (),
761 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
762 ::fidl_next::munge!(let crate::wire::ExtendedAttributeValue { raw, _phantom: _ } = out);
763
764 match self {
765 Self::Bytes(value) => ::fidl_next::wire::Union::encode_as::<
766 ___E,
767 ::fidl_next::wire::Vector<'static, u8>,
768 >(value, 1, encoder, raw, (32768, ()))?,
769
770 Self::Buffer(value) => ::fidl_next::wire::Union::encode_as::<
771 ___E,
772 ::fdomain_client::fidl_next::wire::Handle,
773 >(value, 2, encoder, raw, ())?,
774
775 Self::UnknownOrdinal_(ordinal) => {
776 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
777 }
778 }
779
780 Ok(())
781 }
782 }
783
784 unsafe impl<___E>
785 ::fidl_next::EncodeOption<crate::wire_optional::ExtendedAttributeValue<'static>, ___E>
786 for ExtendedAttributeValue
787 where
788 ___E: ?Sized,
789 ExtendedAttributeValue:
790 ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
791 {
792 #[inline]
793 fn encode_option(
794 this: ::core::option::Option<Self>,
795 encoder: &mut ___E,
796 out: &mut ::core::mem::MaybeUninit<
797 crate::wire_optional::ExtendedAttributeValue<'static>,
798 >,
799 _: (),
800 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
801 ::fidl_next::munge!(let crate::wire_optional::ExtendedAttributeValue { raw, _phantom: _ } = &mut *out);
802
803 if let Some(inner) = this {
804 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
805 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
806 } else {
807 ::fidl_next::wire::Union::encode_absent(raw);
808 }
809
810 Ok(())
811 }
812 }
813
814 impl<'de> ::fidl_next::FromWire<crate::wire::ExtendedAttributeValue<'de>>
815 for ExtendedAttributeValue
816 {
817 #[inline]
818 fn from_wire(wire: crate::wire::ExtendedAttributeValue<'de>) -> Self {
819 let wire = ::core::mem::ManuallyDrop::new(wire);
820 match wire.raw.ordinal() {
821 1 => Self::Bytes(::fidl_next::FromWire::from_wire(unsafe {
822 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
823 })),
824
825 2 => Self::Buffer(::fidl_next::FromWire::from_wire(unsafe {
826 wire.raw.get().read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
827 })),
828
829 ord => return Self::UnknownOrdinal_(ord as u64),
830 }
831 }
832 }
833
834 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
835 for ExtendedAttributeValue
836 {
837 #[inline]
838 fn from_wire_option(
839 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
840 ) -> ::core::option::Option<Self> {
841 if let Some(inner) = wire.into_option() {
842 Some(::fidl_next::FromWire::from_wire(inner))
843 } else {
844 None
845 }
846 }
847 }
848
849 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
850 for Box<ExtendedAttributeValue>
851 {
852 #[inline]
853 fn from_wire_option(
854 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
855 ) -> ::core::option::Option<Self> {
856 <ExtendedAttributeValue as ::fidl_next::FromWireOption<
857 crate::wire_optional::ExtendedAttributeValue<'de>,
858 >>::from_wire_option(wire)
859 .map(Box::new)
860 }
861 }
862
863 #[derive(Debug, PartialEq)]
864 pub struct NodeSetExtendedAttributeRequest {
865 pub name: ::std::vec::Vec<u8>,
866
867 pub value: crate::natural::ExtendedAttributeValue,
868
869 pub mode: crate::natural::SetExtendedAttributeMode,
870 }
871
872 unsafe impl<___E>
873 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
874 for NodeSetExtendedAttributeRequest
875 where
876 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
877 ___E: ::fidl_next::Encoder,
878 ___E: ::fdomain_client::fidl_next::HandleEncoder,
879 {
880 #[inline]
881 fn encode(
882 self,
883 encoder_: &mut ___E,
884 out_: &mut ::core::mem::MaybeUninit<
885 crate::wire::NodeSetExtendedAttributeRequest<'static>,
886 >,
887 _: (),
888 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
889 ::fidl_next::munge! {
890 let crate::wire::NodeSetExtendedAttributeRequest {
891 name,
892 value,
893 mode,
894
895 } = out_;
896 }
897
898 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
899
900 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
901 ::fidl_next::Constrained::validate(_field, (255, ()))?;
902
903 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
904
905 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
906
907 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
908
909 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
910
911 Ok(())
912 }
913 }
914
915 unsafe impl<___E>
916 ::fidl_next::EncodeOption<
917 ::fidl_next::wire::Box<'static, crate::wire::NodeSetExtendedAttributeRequest<'static>>,
918 ___E,
919 > for NodeSetExtendedAttributeRequest
920 where
921 ___E: ::fidl_next::Encoder + ?Sized,
922 NodeSetExtendedAttributeRequest:
923 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>,
924 {
925 #[inline]
926 fn encode_option(
927 this: ::core::option::Option<Self>,
928 encoder: &mut ___E,
929 out: &mut ::core::mem::MaybeUninit<
930 ::fidl_next::wire::Box<
931 'static,
932 crate::wire::NodeSetExtendedAttributeRequest<'static>,
933 >,
934 >,
935 _: (),
936 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
937 if let Some(inner) = this {
938 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
939 ::fidl_next::wire::Box::encode_present(out);
940 } else {
941 ::fidl_next::wire::Box::encode_absent(out);
942 }
943
944 Ok(())
945 }
946 }
947
948 impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetExtendedAttributeRequest<'de>>
949 for NodeSetExtendedAttributeRequest
950 {
951 #[inline]
952 fn from_wire(wire: crate::wire::NodeSetExtendedAttributeRequest<'de>) -> Self {
953 Self {
954 name: ::fidl_next::FromWire::from_wire(wire.name),
955
956 value: ::fidl_next::FromWire::from_wire(wire.value),
957
958 mode: ::fidl_next::FromWire::from_wire(wire.mode),
959 }
960 }
961 }
962
963 #[doc = " Auxiliary data for the file representation of a node.\n"]
964 #[derive(Debug, Default, PartialEq)]
965 pub struct FileInfo {
966 pub is_append: ::core::option::Option<bool>,
967
968 pub observer: ::core::option::Option<::fdomain_client::Event>,
969
970 pub stream: ::core::option::Option<::fdomain_client::Stream>,
971
972 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
973 }
974
975 impl FileInfo {
976 fn __max_ordinal(&self) -> usize {
977 if self.attributes.is_some() {
978 return 4;
979 }
980
981 if self.stream.is_some() {
982 return 3;
983 }
984
985 if self.observer.is_some() {
986 return 2;
987 }
988
989 if self.is_append.is_some() {
990 return 1;
991 }
992
993 0
994 }
995 }
996
997 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileInfo<'static>, ___E> for FileInfo
998 where
999 ___E: ::fidl_next::Encoder + ?Sized,
1000 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1001 {
1002 #[inline]
1003 fn encode(
1004 mut self,
1005 encoder: &mut ___E,
1006 out: &mut ::core::mem::MaybeUninit<crate::wire::FileInfo<'static>>,
1007 _: (),
1008 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1009 ::fidl_next::munge!(let crate::wire::FileInfo { table } = out);
1010
1011 let max_ord = self.__max_ordinal();
1012
1013 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1014 ::fidl_next::Wire::zero_padding(&mut out);
1015
1016 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1017 ::fidl_next::wire::Envelope,
1018 >(encoder, max_ord);
1019
1020 for i in 1..=max_ord {
1021 match i {
1022 4 => {
1023 if let Some(value) = self.attributes.take() {
1024 ::fidl_next::wire::Envelope::encode_value::<
1025 crate::wire::NodeAttributes2<'static>,
1026 ___E,
1027 >(
1028 value, preallocated.encoder, &mut out, ()
1029 )?;
1030 } else {
1031 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1032 }
1033 }
1034
1035 3 => {
1036 if let Some(value) = self.stream.take() {
1037 ::fidl_next::wire::Envelope::encode_value::<
1038 ::fdomain_client::fidl_next::wire::Handle,
1039 ___E,
1040 >(
1041 value, preallocated.encoder, &mut out, ()
1042 )?;
1043 } else {
1044 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1045 }
1046 }
1047
1048 2 => {
1049 if let Some(value) = self.observer.take() {
1050 ::fidl_next::wire::Envelope::encode_value::<
1051 ::fdomain_client::fidl_next::wire::Handle,
1052 ___E,
1053 >(
1054 value, preallocated.encoder, &mut out, ()
1055 )?;
1056 } else {
1057 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1058 }
1059 }
1060
1061 1 => {
1062 if let Some(value) = self.is_append.take() {
1063 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1064 value,
1065 preallocated.encoder,
1066 &mut out,
1067 (),
1068 )?;
1069 } else {
1070 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1071 }
1072 }
1073
1074 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1075 }
1076 unsafe {
1077 preallocated.write_next(out.assume_init_ref());
1078 }
1079 }
1080
1081 ::fidl_next::wire::Table::encode_len(table, max_ord);
1082
1083 Ok(())
1084 }
1085 }
1086
1087 impl<'de> ::fidl_next::FromWire<crate::wire::FileInfo<'de>> for FileInfo {
1088 #[inline]
1089 fn from_wire(wire_: crate::wire::FileInfo<'de>) -> Self {
1090 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1091
1092 let is_append = wire_.table.get(1);
1093
1094 let observer = wire_.table.get(2);
1095
1096 let stream = wire_.table.get(3);
1097
1098 let attributes = wire_.table.get(4);
1099
1100 Self {
1101 is_append: is_append.map(|envelope| {
1102 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1103 }),
1104
1105 observer: observer.map(|envelope| {
1106 ::fidl_next::FromWire::from_wire(unsafe {
1107 envelope.read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
1108 })
1109 }),
1110
1111 stream: stream.map(|envelope| {
1112 ::fidl_next::FromWire::from_wire(unsafe {
1113 envelope.read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
1114 })
1115 }),
1116
1117 attributes: attributes.map(|envelope| {
1118 ::fidl_next::FromWire::from_wire(unsafe {
1119 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
1120 })
1121 }),
1122 }
1123 }
1124 }
1125
1126 #[derive(Debug, PartialEq)]
1127 pub enum Representation {
1128 Node(crate::natural::NodeInfo),
1129
1130 Directory(crate::natural::DirectoryInfo),
1131
1132 File(crate::natural::FileInfo),
1133
1134 Symlink(crate::natural::SymlinkInfo),
1135
1136 UnknownOrdinal_(u64),
1137 }
1138
1139 impl Representation {
1140 pub fn is_unknown(&self) -> bool {
1141 #[allow(unreachable_patterns)]
1142 match self {
1143 Self::UnknownOrdinal_(_) => true,
1144 _ => false,
1145 }
1146 }
1147 }
1148
1149 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Representation<'static>, ___E> for Representation
1150 where
1151 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1152 ___E: ::fidl_next::Encoder,
1153 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1154 {
1155 #[inline]
1156 fn encode(
1157 self,
1158 encoder: &mut ___E,
1159 out: &mut ::core::mem::MaybeUninit<crate::wire::Representation<'static>>,
1160 _: (),
1161 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1162 ::fidl_next::munge!(let crate::wire::Representation { raw, _phantom: _ } = out);
1163
1164 match self {
1165 Self::Node(value) => ::fidl_next::wire::Union::encode_as::<
1166 ___E,
1167 crate::wire::NodeInfo<'static>,
1168 >(value, 1, encoder, raw, ())?,
1169
1170 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
1171 ___E,
1172 crate::wire::DirectoryInfo<'static>,
1173 >(value, 2, encoder, raw, ())?,
1174
1175 Self::File(value) => ::fidl_next::wire::Union::encode_as::<
1176 ___E,
1177 crate::wire::FileInfo<'static>,
1178 >(value, 3, encoder, raw, ())?,
1179
1180 Self::Symlink(value) => ::fidl_next::wire::Union::encode_as::<
1181 ___E,
1182 crate::wire::SymlinkInfo<'static>,
1183 >(value, 4, encoder, raw, ())?,
1184
1185 Self::UnknownOrdinal_(ordinal) => {
1186 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1187 }
1188 }
1189
1190 Ok(())
1191 }
1192 }
1193
1194 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Representation<'static>, ___E>
1195 for Representation
1196 where
1197 ___E: ?Sized,
1198 Representation: ::fidl_next::Encode<crate::wire::Representation<'static>, ___E>,
1199 {
1200 #[inline]
1201 fn encode_option(
1202 this: ::core::option::Option<Self>,
1203 encoder: &mut ___E,
1204 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Representation<'static>>,
1205 _: (),
1206 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1207 ::fidl_next::munge!(let crate::wire_optional::Representation { raw, _phantom: _ } = &mut *out);
1208
1209 if let Some(inner) = this {
1210 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1211 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1212 } else {
1213 ::fidl_next::wire::Union::encode_absent(raw);
1214 }
1215
1216 Ok(())
1217 }
1218 }
1219
1220 impl<'de> ::fidl_next::FromWire<crate::wire::Representation<'de>> for Representation {
1221 #[inline]
1222 fn from_wire(wire: crate::wire::Representation<'de>) -> Self {
1223 let wire = ::core::mem::ManuallyDrop::new(wire);
1224 match wire.raw.ordinal() {
1225 1 => Self::Node(::fidl_next::FromWire::from_wire(unsafe {
1226 wire.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>()
1227 })),
1228
1229 2 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
1230 wire.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
1231 })),
1232
1233 3 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
1234 wire.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>()
1235 })),
1236
1237 4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
1238 wire.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>()
1239 })),
1240
1241 ord => return Self::UnknownOrdinal_(ord as u64),
1242 }
1243 }
1244 }
1245
1246 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1247 for Representation
1248 {
1249 #[inline]
1250 fn from_wire_option(
1251 wire: crate::wire_optional::Representation<'de>,
1252 ) -> ::core::option::Option<Self> {
1253 if let Some(inner) = wire.into_option() {
1254 Some(::fidl_next::FromWire::from_wire(inner))
1255 } else {
1256 None
1257 }
1258 }
1259 }
1260
1261 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1262 for Box<Representation>
1263 {
1264 #[inline]
1265 fn from_wire_option(
1266 wire: crate::wire_optional::Representation<'de>,
1267 ) -> ::core::option::Option<Self> {
1268 <Representation as ::fidl_next::FromWireOption<
1269 crate::wire_optional::Representation<'de>,
1270 >>::from_wire_option(wire)
1271 .map(Box::new)
1272 }
1273 }
1274
1275 #[derive(Debug, PartialEq)]
1276 pub struct DirectoryOpenRequest {
1277 pub path: ::std::string::String,
1278
1279 pub flags: crate::natural::Flags,
1280
1281 pub options: crate::natural::Options,
1282
1283 pub object: ::fdomain_client::Channel,
1284 }
1285
1286 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryOpenRequest<'static>, ___E>
1287 for DirectoryOpenRequest
1288 where
1289 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1290 ___E: ::fidl_next::Encoder,
1291 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1292 {
1293 #[inline]
1294 fn encode(
1295 self,
1296 encoder_: &mut ___E,
1297 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryOpenRequest<'static>>,
1298 _: (),
1299 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1300 ::fidl_next::munge! {
1301 let crate::wire::DirectoryOpenRequest {
1302 path,
1303 flags,
1304 options,
1305 object,
1306
1307 } = out_;
1308 }
1309
1310 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
1311
1312 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
1313 ::fidl_next::Constrained::validate(_field, 4095)?;
1314
1315 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1316
1317 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1318
1319 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
1320
1321 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
1322
1323 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1324
1325 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1326
1327 Ok(())
1328 }
1329 }
1330
1331 unsafe impl<___E>
1332 ::fidl_next::EncodeOption<
1333 ::fidl_next::wire::Box<'static, crate::wire::DirectoryOpenRequest<'static>>,
1334 ___E,
1335 > for DirectoryOpenRequest
1336 where
1337 ___E: ::fidl_next::Encoder + ?Sized,
1338 DirectoryOpenRequest: ::fidl_next::Encode<crate::wire::DirectoryOpenRequest<'static>, ___E>,
1339 {
1340 #[inline]
1341 fn encode_option(
1342 this: ::core::option::Option<Self>,
1343 encoder: &mut ___E,
1344 out: &mut ::core::mem::MaybeUninit<
1345 ::fidl_next::wire::Box<'static, crate::wire::DirectoryOpenRequest<'static>>,
1346 >,
1347 _: (),
1348 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1349 if let Some(inner) = this {
1350 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1351 ::fidl_next::wire::Box::encode_present(out);
1352 } else {
1353 ::fidl_next::wire::Box::encode_absent(out);
1354 }
1355
1356 Ok(())
1357 }
1358 }
1359
1360 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryOpenRequest<'de>> for DirectoryOpenRequest {
1361 #[inline]
1362 fn from_wire(wire: crate::wire::DirectoryOpenRequest<'de>) -> Self {
1363 Self {
1364 path: ::fidl_next::FromWire::from_wire(wire.path),
1365
1366 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1367
1368 options: ::fidl_next::FromWire::from_wire(wire.options),
1369
1370 object: ::fidl_next::FromWire::from_wire(wire.object),
1371 }
1372 }
1373 }
1374
1375 #[derive(Debug, PartialEq)]
1376 #[repr(C)]
1377 pub struct NodeDeprecatedCloneRequest {
1378 pub flags: crate::natural::OpenFlags,
1379
1380 pub object: ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::Channel>,
1381 }
1382
1383 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
1384 for NodeDeprecatedCloneRequest
1385 where
1386 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1387 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1388 {
1389 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1390 Self,
1391 crate::wire::NodeDeprecatedCloneRequest,
1392 > = unsafe {
1393 ::fidl_next::CopyOptimization::enable_if(
1394 true
1395
1396 && <
1397 crate::natural::OpenFlags as ::fidl_next::Encode<crate::wire::OpenFlags, ___E>
1398 >::COPY_OPTIMIZATION.is_enabled()
1399
1400 && <
1401 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>, ___E>
1402 >::COPY_OPTIMIZATION.is_enabled()
1403
1404 )
1405 };
1406
1407 #[inline]
1408 fn encode(
1409 self,
1410 encoder_: &mut ___E,
1411 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
1412 _: (),
1413 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1414 ::fidl_next::munge! {
1415 let crate::wire::NodeDeprecatedCloneRequest {
1416 flags,
1417 object,
1418
1419 } = out_;
1420 }
1421
1422 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1423
1424 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1425
1426 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1427
1428 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1429
1430 Ok(())
1431 }
1432 }
1433
1434 unsafe impl<___E>
1435 ::fidl_next::EncodeOption<
1436 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1437 ___E,
1438 > for NodeDeprecatedCloneRequest
1439 where
1440 ___E: ::fidl_next::Encoder + ?Sized,
1441 NodeDeprecatedCloneRequest:
1442 ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>,
1443 {
1444 #[inline]
1445 fn encode_option(
1446 this: ::core::option::Option<Self>,
1447 encoder: &mut ___E,
1448 out: &mut ::core::mem::MaybeUninit<
1449 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1450 >,
1451 _: (),
1452 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1453 if let Some(inner) = this {
1454 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1455 ::fidl_next::wire::Box::encode_present(out);
1456 } else {
1457 ::fidl_next::wire::Box::encode_absent(out);
1458 }
1459
1460 Ok(())
1461 }
1462 }
1463
1464 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedCloneRequest> for NodeDeprecatedCloneRequest {
1465 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1466 crate::wire::NodeDeprecatedCloneRequest,
1467 Self,
1468 > = unsafe {
1469 ::fidl_next::CopyOptimization::enable_if(
1470 true
1471
1472 && <
1473 crate::natural::OpenFlags as ::fidl_next::FromWire<crate::wire::OpenFlags>
1474 >::COPY_OPTIMIZATION.is_enabled()
1475
1476 && <
1477 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>>
1478 >::COPY_OPTIMIZATION.is_enabled()
1479
1480 )
1481 };
1482
1483 #[inline]
1484 fn from_wire(wire: crate::wire::NodeDeprecatedCloneRequest) -> Self {
1485 Self {
1486 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1487
1488 object: ::fidl_next::FromWire::from_wire(wire.object),
1489 }
1490 }
1491 }
1492
1493 #[derive(Debug, PartialEq)]
1494 pub struct DirectoryDeprecatedOpenRequest {
1495 pub flags: crate::natural::OpenFlags,
1496
1497 pub mode: crate::natural::ModeType,
1498
1499 pub path: ::std::string::String,
1500
1501 pub object: ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::Channel>,
1502 }
1503
1504 unsafe impl<___E>
1505 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
1506 for DirectoryDeprecatedOpenRequest
1507 where
1508 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1509 ___E: ::fidl_next::Encoder,
1510 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1511 {
1512 #[inline]
1513 fn encode(
1514 self,
1515 encoder_: &mut ___E,
1516 out_: &mut ::core::mem::MaybeUninit<
1517 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
1518 >,
1519 _: (),
1520 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1521 ::fidl_next::munge! {
1522 let crate::wire::DirectoryDeprecatedOpenRequest {
1523 flags,
1524 mode,
1525 path,
1526 object,
1527
1528 } = out_;
1529 }
1530
1531 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1532
1533 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1534
1535 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
1536
1537 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1538
1539 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
1540
1541 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
1542 ::fidl_next::Constrained::validate(_field, 4095)?;
1543
1544 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1545
1546 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1547
1548 Ok(())
1549 }
1550 }
1551
1552 unsafe impl<___E>
1553 ::fidl_next::EncodeOption<
1554 ::fidl_next::wire::Box<'static, crate::wire::DirectoryDeprecatedOpenRequest<'static>>,
1555 ___E,
1556 > for DirectoryDeprecatedOpenRequest
1557 where
1558 ___E: ::fidl_next::Encoder + ?Sized,
1559 DirectoryDeprecatedOpenRequest:
1560 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>,
1561 {
1562 #[inline]
1563 fn encode_option(
1564 this: ::core::option::Option<Self>,
1565 encoder: &mut ___E,
1566 out: &mut ::core::mem::MaybeUninit<
1567 ::fidl_next::wire::Box<
1568 'static,
1569 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
1570 >,
1571 >,
1572 _: (),
1573 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1574 if let Some(inner) = this {
1575 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1576 ::fidl_next::wire::Box::encode_present(out);
1577 } else {
1578 ::fidl_next::wire::Box::encode_absent(out);
1579 }
1580
1581 Ok(())
1582 }
1583 }
1584
1585 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryDeprecatedOpenRequest<'de>>
1586 for DirectoryDeprecatedOpenRequest
1587 {
1588 #[inline]
1589 fn from_wire(wire: crate::wire::DirectoryDeprecatedOpenRequest<'de>) -> Self {
1590 Self {
1591 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1592
1593 mode: ::fidl_next::FromWire::from_wire(wire.mode),
1594
1595 path: ::fidl_next::FromWire::from_wire(wire.path),
1596
1597 object: ::fidl_next::FromWire::from_wire(wire.object),
1598 }
1599 }
1600 }
1601
1602 #[derive(Debug, PartialEq)]
1603 pub struct DirectoryCreateSymlinkRequest {
1604 pub name: ::std::string::String,
1605
1606 pub target: ::std::vec::Vec<u8>,
1607
1608 pub connection: ::core::option::Option<
1609 ::fidl_next::ServerEnd<crate::Symlink, ::fdomain_client::Channel>,
1610 >,
1611 }
1612
1613 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
1614 for DirectoryCreateSymlinkRequest
1615 where
1616 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1617 ___E: ::fidl_next::Encoder,
1618 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1619 {
1620 #[inline]
1621 fn encode(
1622 self,
1623 encoder_: &mut ___E,
1624 out_: &mut ::core::mem::MaybeUninit<
1625 crate::wire::DirectoryCreateSymlinkRequest<'static>,
1626 >,
1627 _: (),
1628 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1629 ::fidl_next::munge! {
1630 let crate::wire::DirectoryCreateSymlinkRequest {
1631 name,
1632 target,
1633 connection,
1634
1635 } = out_;
1636 }
1637
1638 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
1639
1640 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
1641 ::fidl_next::Constrained::validate(_field, 255)?;
1642
1643 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
1644
1645 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
1646 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
1647
1648 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
1649
1650 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(connection.as_mut_ptr()) };
1651
1652 Ok(())
1653 }
1654 }
1655
1656 unsafe impl<___E>
1657 ::fidl_next::EncodeOption<
1658 ::fidl_next::wire::Box<'static, crate::wire::DirectoryCreateSymlinkRequest<'static>>,
1659 ___E,
1660 > for DirectoryCreateSymlinkRequest
1661 where
1662 ___E: ::fidl_next::Encoder + ?Sized,
1663 DirectoryCreateSymlinkRequest:
1664 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>,
1665 {
1666 #[inline]
1667 fn encode_option(
1668 this: ::core::option::Option<Self>,
1669 encoder: &mut ___E,
1670 out: &mut ::core::mem::MaybeUninit<
1671 ::fidl_next::wire::Box<
1672 'static,
1673 crate::wire::DirectoryCreateSymlinkRequest<'static>,
1674 >,
1675 >,
1676 _: (),
1677 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1678 if let Some(inner) = this {
1679 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1680 ::fidl_next::wire::Box::encode_present(out);
1681 } else {
1682 ::fidl_next::wire::Box::encode_absent(out);
1683 }
1684
1685 Ok(())
1686 }
1687 }
1688
1689 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryCreateSymlinkRequest<'de>>
1690 for DirectoryCreateSymlinkRequest
1691 {
1692 #[inline]
1693 fn from_wire(wire: crate::wire::DirectoryCreateSymlinkRequest<'de>) -> Self {
1694 Self {
1695 name: ::fidl_next::FromWire::from_wire(wire.name),
1696
1697 target: ::fidl_next::FromWire::from_wire(wire.target),
1698
1699 connection: ::fidl_next::FromWire::from_wire(wire.connection),
1700 }
1701 }
1702 }
1703
1704 #[derive(Debug, PartialEq)]
1705 #[repr(C)]
1706 pub struct FileGetBackingMemoryResponse {
1707 pub vmo: ::fdomain_client::Vmo,
1708 }
1709
1710 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
1711 for FileGetBackingMemoryResponse
1712 where
1713 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1714 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1715 {
1716 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1717 Self,
1718 crate::wire::FileGetBackingMemoryResponse,
1719 > = unsafe {
1720 ::fidl_next::CopyOptimization::enable_if(
1721 true && <::fdomain_client::Vmo as ::fidl_next::Encode<
1722 ::fdomain_client::fidl_next::wire::Handle,
1723 ___E,
1724 >>::COPY_OPTIMIZATION
1725 .is_enabled(),
1726 )
1727 };
1728
1729 #[inline]
1730 fn encode(
1731 self,
1732 encoder_: &mut ___E,
1733 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
1734 _: (),
1735 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1736 ::fidl_next::munge! {
1737 let crate::wire::FileGetBackingMemoryResponse {
1738 vmo,
1739
1740 } = out_;
1741 }
1742
1743 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
1744
1745 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo.as_mut_ptr()) };
1746
1747 Ok(())
1748 }
1749 }
1750
1751 unsafe impl<___E>
1752 ::fidl_next::EncodeOption<
1753 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryResponse>,
1754 ___E,
1755 > for FileGetBackingMemoryResponse
1756 where
1757 ___E: ::fidl_next::Encoder + ?Sized,
1758 FileGetBackingMemoryResponse:
1759 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>,
1760 {
1761 #[inline]
1762 fn encode_option(
1763 this: ::core::option::Option<Self>,
1764 encoder: &mut ___E,
1765 out: &mut ::core::mem::MaybeUninit<
1766 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryResponse>,
1767 >,
1768 _: (),
1769 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1770 if let Some(inner) = this {
1771 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1772 ::fidl_next::wire::Box::encode_present(out);
1773 } else {
1774 ::fidl_next::wire::Box::encode_absent(out);
1775 }
1776
1777 Ok(())
1778 }
1779 }
1780
1781 impl ::fidl_next::FromWire<crate::wire::FileGetBackingMemoryResponse>
1782 for FileGetBackingMemoryResponse
1783 {
1784 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1785 crate::wire::FileGetBackingMemoryResponse,
1786 Self,
1787 > = unsafe {
1788 ::fidl_next::CopyOptimization::enable_if(
1789 true && <::fdomain_client::Vmo as ::fidl_next::FromWire<
1790 ::fdomain_client::fidl_next::wire::Handle,
1791 >>::COPY_OPTIMIZATION
1792 .is_enabled(),
1793 )
1794 };
1795
1796 #[inline]
1797 fn from_wire(wire: crate::wire::FileGetBackingMemoryResponse) -> Self {
1798 Self { vmo: ::fidl_next::FromWire::from_wire(wire.vmo) }
1799 }
1800 }
1801
1802 #[derive(Debug, PartialEq)]
1803 pub struct LinkableLinkIntoRequest {
1804 pub dst_parent_token: ::fdomain_client::Event,
1805
1806 pub dst: ::std::string::String,
1807 }
1808
1809 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
1810 for LinkableLinkIntoRequest
1811 where
1812 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1813 ___E: ::fidl_next::Encoder,
1814 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1815 {
1816 #[inline]
1817 fn encode(
1818 self,
1819 encoder_: &mut ___E,
1820 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
1821 _: (),
1822 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1823 ::fidl_next::munge! {
1824 let crate::wire::LinkableLinkIntoRequest {
1825 dst_parent_token,
1826 dst,
1827
1828 } = out_;
1829 }
1830
1831 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
1832
1833 let mut _field =
1834 unsafe { ::fidl_next::Slot::new_unchecked(dst_parent_token.as_mut_ptr()) };
1835
1836 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
1837
1838 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dst.as_mut_ptr()) };
1839 ::fidl_next::Constrained::validate(_field, 255)?;
1840
1841 Ok(())
1842 }
1843 }
1844
1845 unsafe impl<___E>
1846 ::fidl_next::EncodeOption<
1847 ::fidl_next::wire::Box<'static, crate::wire::LinkableLinkIntoRequest<'static>>,
1848 ___E,
1849 > for LinkableLinkIntoRequest
1850 where
1851 ___E: ::fidl_next::Encoder + ?Sized,
1852 LinkableLinkIntoRequest:
1853 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>,
1854 {
1855 #[inline]
1856 fn encode_option(
1857 this: ::core::option::Option<Self>,
1858 encoder: &mut ___E,
1859 out: &mut ::core::mem::MaybeUninit<
1860 ::fidl_next::wire::Box<'static, crate::wire::LinkableLinkIntoRequest<'static>>,
1861 >,
1862 _: (),
1863 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1864 if let Some(inner) = this {
1865 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1866 ::fidl_next::wire::Box::encode_present(out);
1867 } else {
1868 ::fidl_next::wire::Box::encode_absent(out);
1869 }
1870
1871 Ok(())
1872 }
1873 }
1874
1875 impl<'de> ::fidl_next::FromWire<crate::wire::LinkableLinkIntoRequest<'de>>
1876 for LinkableLinkIntoRequest
1877 {
1878 #[inline]
1879 fn from_wire(wire: crate::wire::LinkableLinkIntoRequest<'de>) -> Self {
1880 Self {
1881 dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
1882
1883 dst: ::fidl_next::FromWire::from_wire(wire.dst),
1884 }
1885 }
1886 }
1887
1888 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1889 pub struct FileAllocateRequest {
1890 pub offset: u64,
1891
1892 pub length: u64,
1893
1894 pub mode: crate::natural::AllocateMode,
1895 }
1896
1897 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
1898 for FileAllocateRequest
1899 where
1900 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1901 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1902 {
1903 #[inline]
1904 fn encode(
1905 self,
1906 encoder_: &mut ___E,
1907 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
1908 _: (),
1909 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1910 ::fidl_next::munge! {
1911 let crate::wire::FileAllocateRequest {
1912 offset,
1913 length,
1914 mode,
1915
1916 } = out_;
1917 }
1918
1919 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
1920
1921 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
1922
1923 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
1924
1925 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
1926
1927 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
1928
1929 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1930
1931 Ok(())
1932 }
1933 }
1934
1935 unsafe impl<___E>
1936 ::fidl_next::EncodeOption<
1937 ::fidl_next::wire::Box<'static, crate::wire::FileAllocateRequest>,
1938 ___E,
1939 > for FileAllocateRequest
1940 where
1941 ___E: ::fidl_next::Encoder + ?Sized,
1942 FileAllocateRequest: ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>,
1943 {
1944 #[inline]
1945 fn encode_option(
1946 this: ::core::option::Option<Self>,
1947 encoder: &mut ___E,
1948 out: &mut ::core::mem::MaybeUninit<
1949 ::fidl_next::wire::Box<'static, crate::wire::FileAllocateRequest>,
1950 >,
1951 _: (),
1952 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1953 if let Some(inner) = this {
1954 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1955 ::fidl_next::wire::Box::encode_present(out);
1956 } else {
1957 ::fidl_next::wire::Box::encode_absent(out);
1958 }
1959
1960 Ok(())
1961 }
1962 }
1963
1964 impl ::fidl_next::FromWire<crate::wire::FileAllocateRequest> for FileAllocateRequest {
1965 #[inline]
1966 fn from_wire(wire: crate::wire::FileAllocateRequest) -> Self {
1967 Self {
1968 offset: ::fidl_next::FromWire::from_wire(wire.offset),
1969
1970 length: ::fidl_next::FromWire::from_wire(wire.length),
1971
1972 mode: ::fidl_next::FromWire::from_wire(wire.mode),
1973 }
1974 }
1975 }
1976
1977 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1978 pub struct FileEnableVerityRequest {
1979 pub options: crate::natural::VerificationOptions,
1980 }
1981
1982 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
1983 for FileEnableVerityRequest
1984 where
1985 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1986 ___E: ::fidl_next::Encoder,
1987 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1988 {
1989 #[inline]
1990 fn encode(
1991 self,
1992 encoder_: &mut ___E,
1993 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
1994 _: (),
1995 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1996 ::fidl_next::munge! {
1997 let crate::wire::FileEnableVerityRequest {
1998 options,
1999
2000 } = out_;
2001 }
2002
2003 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
2004
2005 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2006
2007 Ok(())
2008 }
2009 }
2010
2011 unsafe impl<___E>
2012 ::fidl_next::EncodeOption<
2013 ::fidl_next::wire::Box<'static, crate::wire::FileEnableVerityRequest<'static>>,
2014 ___E,
2015 > for FileEnableVerityRequest
2016 where
2017 ___E: ::fidl_next::Encoder + ?Sized,
2018 FileEnableVerityRequest:
2019 ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>,
2020 {
2021 #[inline]
2022 fn encode_option(
2023 this: ::core::option::Option<Self>,
2024 encoder: &mut ___E,
2025 out: &mut ::core::mem::MaybeUninit<
2026 ::fidl_next::wire::Box<'static, crate::wire::FileEnableVerityRequest<'static>>,
2027 >,
2028 _: (),
2029 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2030 if let Some(inner) = this {
2031 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2032 ::fidl_next::wire::Box::encode_present(out);
2033 } else {
2034 ::fidl_next::wire::Box::encode_absent(out);
2035 }
2036
2037 Ok(())
2038 }
2039 }
2040
2041 impl<'de> ::fidl_next::FromWire<crate::wire::FileEnableVerityRequest<'de>>
2042 for FileEnableVerityRequest
2043 {
2044 #[inline]
2045 fn from_wire(wire: crate::wire::FileEnableVerityRequest<'de>) -> Self {
2046 Self { options: ::fidl_next::FromWire::from_wire(wire.options) }
2047 }
2048 }
2049
2050 #[derive(Debug, PartialEq)]
2051 #[repr(C)]
2052 pub struct FileObject {
2053 pub event: ::core::option::Option<::fdomain_client::Event>,
2054
2055 pub stream: ::core::option::Option<::fdomain_client::Stream>,
2056 }
2057
2058 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject
2059 where
2060 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2061 ___E: ::fdomain_client::fidl_next::HandleEncoder,
2062 {
2063 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::FileObject> = unsafe {
2064 ::fidl_next::CopyOptimization::enable_if(
2065 true && <::core::option::Option<::fdomain_client::Event> as ::fidl_next::Encode<
2066 ::fdomain_client::fidl_next::wire::OptionalHandle,
2067 ___E,
2068 >>::COPY_OPTIMIZATION
2069 .is_enabled()
2070 && <::core::option::Option<::fdomain_client::Stream> as ::fidl_next::Encode<
2071 ::fdomain_client::fidl_next::wire::OptionalHandle,
2072 ___E,
2073 >>::COPY_OPTIMIZATION
2074 .is_enabled(),
2075 )
2076 };
2077
2078 #[inline]
2079 fn encode(
2080 self,
2081 encoder_: &mut ___E,
2082 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
2083 _: (),
2084 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2085 ::fidl_next::munge! {
2086 let crate::wire::FileObject {
2087 event,
2088 stream,
2089
2090 } = out_;
2091 }
2092
2093 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
2094
2095 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
2096
2097 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
2098
2099 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(stream.as_mut_ptr()) };
2100
2101 Ok(())
2102 }
2103 }
2104
2105 unsafe impl<___E>
2106 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::FileObject>, ___E>
2107 for FileObject
2108 where
2109 ___E: ::fidl_next::Encoder + ?Sized,
2110 FileObject: ::fidl_next::Encode<crate::wire::FileObject, ___E>,
2111 {
2112 #[inline]
2113 fn encode_option(
2114 this: ::core::option::Option<Self>,
2115 encoder: &mut ___E,
2116 out: &mut ::core::mem::MaybeUninit<
2117 ::fidl_next::wire::Box<'static, crate::wire::FileObject>,
2118 >,
2119 _: (),
2120 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2121 if let Some(inner) = this {
2122 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2123 ::fidl_next::wire::Box::encode_present(out);
2124 } else {
2125 ::fidl_next::wire::Box::encode_absent(out);
2126 }
2127
2128 Ok(())
2129 }
2130 }
2131
2132 impl ::fidl_next::FromWire<crate::wire::FileObject> for FileObject {
2133 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::FileObject, Self> = unsafe {
2134 ::fidl_next::CopyOptimization::enable_if(
2135 true
2136
2137 && <
2138 ::core::option::Option<::fdomain_client::Event> as ::fidl_next::FromWire<::fdomain_client::fidl_next::wire::OptionalHandle>
2139 >::COPY_OPTIMIZATION.is_enabled()
2140
2141 && <
2142 ::core::option::Option<::fdomain_client::Stream> as ::fidl_next::FromWire<::fdomain_client::fidl_next::wire::OptionalHandle>
2143 >::COPY_OPTIMIZATION.is_enabled()
2144
2145 )
2146 };
2147
2148 #[inline]
2149 fn from_wire(wire: crate::wire::FileObject) -> Self {
2150 Self {
2151 event: ::fidl_next::FromWire::from_wire(wire.event),
2152
2153 stream: ::fidl_next::FromWire::from_wire(wire.stream),
2154 }
2155 }
2156 }
2157
2158 #[derive(Debug, PartialEq)]
2159 pub enum NodeInfoDeprecated {
2160 Service(crate::natural::Service),
2161
2162 File(crate::natural::FileObject),
2163
2164 Directory(crate::natural::DirectoryObject),
2165
2166 Symlink(crate::natural::SymlinkObject),
2167 }
2168
2169 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeInfoDeprecated<'static>, ___E>
2170 for NodeInfoDeprecated
2171 where
2172 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2173 ___E: ::fidl_next::Encoder,
2174 ___E: ::fdomain_client::fidl_next::HandleEncoder,
2175 {
2176 #[inline]
2177 fn encode(
2178 self,
2179 encoder: &mut ___E,
2180 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfoDeprecated<'static>>,
2181 _: (),
2182 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2183 ::fidl_next::munge!(let crate::wire::NodeInfoDeprecated { raw, _phantom: _ } = out);
2184
2185 match self {
2186 Self::Service(value) => ::fidl_next::wire::Union::encode_as::<
2187 ___E,
2188 crate::wire::Service,
2189 >(value, 1, encoder, raw, ())?,
2190
2191 Self::File(value) => ::fidl_next::wire::Union::encode_as::<
2192 ___E,
2193 crate::wire::FileObject,
2194 >(value, 2, encoder, raw, ())?,
2195
2196 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
2197 ___E,
2198 crate::wire::DirectoryObject,
2199 >(value, 3, encoder, raw, ())?,
2200
2201 Self::Symlink(value) => ::fidl_next::wire::Union::encode_as::<
2202 ___E,
2203 crate::wire::SymlinkObject<'static>,
2204 >(value, 4, encoder, raw, ())?,
2205 }
2206
2207 Ok(())
2208 }
2209 }
2210
2211 unsafe impl<___E>
2212 ::fidl_next::EncodeOption<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>
2213 for NodeInfoDeprecated
2214 where
2215 ___E: ?Sized,
2216 NodeInfoDeprecated: ::fidl_next::Encode<crate::wire::NodeInfoDeprecated<'static>, ___E>,
2217 {
2218 #[inline]
2219 fn encode_option(
2220 this: ::core::option::Option<Self>,
2221 encoder: &mut ___E,
2222 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::NodeInfoDeprecated<'static>>,
2223 _: (),
2224 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2225 ::fidl_next::munge!(let crate::wire_optional::NodeInfoDeprecated { raw, _phantom: _ } = &mut *out);
2226
2227 if let Some(inner) = this {
2228 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2229 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2230 } else {
2231 ::fidl_next::wire::Union::encode_absent(raw);
2232 }
2233
2234 Ok(())
2235 }
2236 }
2237
2238 impl<'de> ::fidl_next::FromWire<crate::wire::NodeInfoDeprecated<'de>> for NodeInfoDeprecated {
2239 #[inline]
2240 fn from_wire(wire: crate::wire::NodeInfoDeprecated<'de>) -> Self {
2241 let wire = ::core::mem::ManuallyDrop::new(wire);
2242 match wire.raw.ordinal() {
2243 1 => Self::Service(::fidl_next::FromWire::from_wire(unsafe {
2244 wire.raw.get().read_unchecked::<crate::wire::Service>()
2245 })),
2246
2247 2 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
2248 wire.raw.get().read_unchecked::<crate::wire::FileObject>()
2249 })),
2250
2251 3 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
2252 wire.raw.get().read_unchecked::<crate::wire::DirectoryObject>()
2253 })),
2254
2255 4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
2256 wire.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
2257 })),
2258
2259 _ => unsafe { ::core::hint::unreachable_unchecked() },
2260 }
2261 }
2262 }
2263
2264 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::NodeInfoDeprecated<'de>>
2265 for NodeInfoDeprecated
2266 {
2267 #[inline]
2268 fn from_wire_option(
2269 wire: crate::wire_optional::NodeInfoDeprecated<'de>,
2270 ) -> ::core::option::Option<Self> {
2271 if let Some(inner) = wire.into_option() {
2272 Some(::fidl_next::FromWire::from_wire(inner))
2273 } else {
2274 None
2275 }
2276 }
2277 }
2278
2279 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::NodeInfoDeprecated<'de>>
2280 for Box<NodeInfoDeprecated>
2281 {
2282 #[inline]
2283 fn from_wire_option(
2284 wire: crate::wire_optional::NodeInfoDeprecated<'de>,
2285 ) -> ::core::option::Option<Self> {
2286 <NodeInfoDeprecated as ::fidl_next::FromWireOption<
2287 crate::wire_optional::NodeInfoDeprecated<'de>,
2288 >>::from_wire_option(wire)
2289 .map(Box::new)
2290 }
2291 }
2292}
2293
2294pub mod wire {
2295
2296 pub use fidl_next_common_fuchsia_io::wire::*;
2297
2298 #[repr(C)]
2300 pub struct ConnectionInfo<'de> {
2301 pub(crate) table: ::fidl_next::wire::Table<'de>,
2302 }
2303
2304 impl<'de> Drop for ConnectionInfo<'de> {
2305 fn drop(&mut self) {
2306 let _ = self
2307 .table
2308 .get(1)
2309 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Operations>() });
2310 }
2311 }
2312
2313 impl ::fidl_next::Constrained for ConnectionInfo<'_> {
2314 type Constraint = ();
2315
2316 fn validate(
2317 _: ::fidl_next::Slot<'_, Self>,
2318 _: Self::Constraint,
2319 ) -> Result<(), ::fidl_next::ValidationError> {
2320 Ok(())
2321 }
2322 }
2323
2324 unsafe impl ::fidl_next::Wire for ConnectionInfo<'static> {
2325 type Narrowed<'de> = ConnectionInfo<'de>;
2326
2327 #[inline]
2328 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2329 ::fidl_next::munge!(let Self { table } = out);
2330 ::fidl_next::wire::Table::zero_padding(table);
2331 }
2332 }
2333
2334 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ConnectionInfo<'de>
2335 where
2336 ___D: ::fidl_next::Decoder<'de> + ?Sized,
2337 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2338 {
2339 fn decode(
2340 slot: ::fidl_next::Slot<'_, Self>,
2341 decoder: &mut ___D,
2342 _: (),
2343 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2344 ::fidl_next::munge!(let Self { table } = slot);
2345
2346 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2347 match ordinal {
2348 0 => unsafe { ::core::hint::unreachable_unchecked() },
2349
2350 1 => {
2351 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Operations>(
2352 slot.as_mut(),
2353 decoder,
2354 (),
2355 )?;
2356
2357 Ok(())
2358 }
2359
2360 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2361 }
2362 })
2363 }
2364 }
2365
2366 impl<'de> ConnectionInfo<'de> {
2367 pub fn rights(&self) -> ::core::option::Option<&crate::wire::Operations> {
2368 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2369 }
2370 }
2371
2372 impl<'de> ::core::fmt::Debug for ConnectionInfo<'de> {
2373 fn fmt(
2374 &self,
2375 f: &mut ::core::fmt::Formatter<'_>,
2376 ) -> ::core::result::Result<(), ::core::fmt::Error> {
2377 f.debug_struct("ConnectionInfo").field("rights", &self.rights()).finish()
2378 }
2379 }
2380
2381 impl<'de> ::fidl_next::IntoNatural for ConnectionInfo<'de> {
2382 type Natural = crate::natural::ConnectionInfo;
2383 }
2384
2385 #[derive(Debug)]
2387 #[repr(C)]
2388 pub struct DirectoryGetTokenResponse {
2389 pub s: ::fidl_next::wire::Int32,
2390
2391 pub token: ::fdomain_client::fidl_next::wire::OptionalHandle,
2392 }
2393
2394 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryGetTokenResponse>(), 8);
2395 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryGetTokenResponse>(), 4);
2396
2397 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryGetTokenResponse, s), 0);
2398
2399 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryGetTokenResponse, token), 4);
2400
2401 impl ::fidl_next::Constrained for DirectoryGetTokenResponse {
2402 type Constraint = ();
2403
2404 fn validate(
2405 _: ::fidl_next::Slot<'_, Self>,
2406 _: Self::Constraint,
2407 ) -> Result<(), ::fidl_next::ValidationError> {
2408 Ok(())
2409 }
2410 }
2411
2412 unsafe impl ::fidl_next::Wire for DirectoryGetTokenResponse {
2413 type Narrowed<'de> = DirectoryGetTokenResponse;
2414
2415 #[inline]
2416 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2417 ::fidl_next::munge! {
2418 let Self {
2419 s,
2420 token,
2421
2422 } = &mut *out_;
2423 }
2424
2425 ::fidl_next::Wire::zero_padding(s);
2426
2427 ::fidl_next::Wire::zero_padding(token);
2428 }
2429 }
2430
2431 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryGetTokenResponse
2432 where
2433 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2434 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2435 {
2436 fn decode(
2437 slot_: ::fidl_next::Slot<'_, Self>,
2438 decoder_: &mut ___D,
2439 _: (),
2440 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2441 ::fidl_next::munge! {
2442 let Self {
2443 mut s,
2444 mut token,
2445
2446 } = slot_;
2447 }
2448
2449 let _field = s.as_mut();
2450
2451 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2452
2453 let _field = token.as_mut();
2454
2455 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
2456
2457 Ok(())
2458 }
2459 }
2460
2461 impl ::fidl_next::IntoNatural for DirectoryGetTokenResponse {
2462 type Natural = crate::natural::DirectoryGetTokenResponse;
2463 }
2464
2465 #[derive(Debug)]
2467 #[repr(C)]
2468 pub struct DirectoryLinkRequest<'de> {
2469 pub src: ::fidl_next::wire::String<'de>,
2470
2471 pub dst_parent_token: ::fdomain_client::fidl_next::wire::Handle,
2472
2473 pub dst: ::fidl_next::wire::String<'de>,
2474 }
2475
2476 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkRequest<'_>>(), 40);
2477 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkRequest<'_>>(), 8);
2478
2479 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, src), 0);
2480
2481 static_assertions::const_assert_eq!(
2482 std::mem::offset_of!(DirectoryLinkRequest<'_>, dst_parent_token),
2483 16
2484 );
2485
2486 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, dst), 24);
2487
2488 impl ::fidl_next::Constrained for DirectoryLinkRequest<'_> {
2489 type Constraint = ();
2490
2491 fn validate(
2492 _: ::fidl_next::Slot<'_, Self>,
2493 _: Self::Constraint,
2494 ) -> Result<(), ::fidl_next::ValidationError> {
2495 Ok(())
2496 }
2497 }
2498
2499 unsafe impl ::fidl_next::Wire for DirectoryLinkRequest<'static> {
2500 type Narrowed<'de> = DirectoryLinkRequest<'de>;
2501
2502 #[inline]
2503 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2504 ::fidl_next::munge! {
2505 let Self {
2506 src,
2507 dst_parent_token,
2508 dst,
2509
2510 } = &mut *out_;
2511 }
2512
2513 ::fidl_next::Wire::zero_padding(src);
2514
2515 ::fidl_next::Wire::zero_padding(dst_parent_token);
2516
2517 ::fidl_next::Wire::zero_padding(dst);
2518
2519 unsafe {
2520 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2521 }
2522 }
2523 }
2524
2525 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryLinkRequest<'de>
2526 where
2527 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2528 ___D: ::fidl_next::Decoder<'de>,
2529 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2530 {
2531 fn decode(
2532 slot_: ::fidl_next::Slot<'_, Self>,
2533 decoder_: &mut ___D,
2534 _: (),
2535 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2536 if slot_.as_bytes()[20..24] != [0u8; 4] {
2537 return Err(::fidl_next::DecodeError::InvalidPadding);
2538 }
2539
2540 ::fidl_next::munge! {
2541 let Self {
2542 mut src,
2543 mut dst_parent_token,
2544 mut dst,
2545
2546 } = slot_;
2547 }
2548
2549 let _field = src.as_mut();
2550 ::fidl_next::Constrained::validate(_field, 255)?;
2551 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2552
2553 let src = unsafe { src.deref_unchecked() };
2554
2555 if src.len() > 255 {
2556 return Err(::fidl_next::DecodeError::VectorTooLong {
2557 size: src.len() as u64,
2558 limit: 255,
2559 });
2560 }
2561
2562 let _field = dst_parent_token.as_mut();
2563
2564 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2565
2566 let _field = dst.as_mut();
2567 ::fidl_next::Constrained::validate(_field, 255)?;
2568 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2569
2570 let dst = unsafe { dst.deref_unchecked() };
2571
2572 if dst.len() > 255 {
2573 return Err(::fidl_next::DecodeError::VectorTooLong {
2574 size: dst.len() as u64,
2575 limit: 255,
2576 });
2577 }
2578
2579 Ok(())
2580 }
2581 }
2582
2583 impl<'de> ::fidl_next::IntoNatural for DirectoryLinkRequest<'de> {
2584 type Natural = crate::natural::DirectoryLinkRequest;
2585 }
2586
2587 pub type Token = ::fdomain_client::fidl_next::wire::Handle;
2589
2590 #[derive(Debug)]
2592 #[repr(C)]
2593 pub struct DirectoryRenameRequest<'de> {
2594 pub src: ::fidl_next::wire::String<'de>,
2595
2596 pub dst_parent_token: ::fdomain_client::fidl_next::wire::Handle,
2597
2598 pub dst: ::fidl_next::wire::String<'de>,
2599 }
2600
2601 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRenameRequest<'_>>(), 40);
2602 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRenameRequest<'_>>(), 8);
2603
2604 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, src), 0);
2605
2606 static_assertions::const_assert_eq!(
2607 std::mem::offset_of!(DirectoryRenameRequest<'_>, dst_parent_token),
2608 16
2609 );
2610
2611 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, dst), 24);
2612
2613 impl ::fidl_next::Constrained for DirectoryRenameRequest<'_> {
2614 type Constraint = ();
2615
2616 fn validate(
2617 _: ::fidl_next::Slot<'_, Self>,
2618 _: Self::Constraint,
2619 ) -> Result<(), ::fidl_next::ValidationError> {
2620 Ok(())
2621 }
2622 }
2623
2624 unsafe impl ::fidl_next::Wire for DirectoryRenameRequest<'static> {
2625 type Narrowed<'de> = DirectoryRenameRequest<'de>;
2626
2627 #[inline]
2628 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2629 ::fidl_next::munge! {
2630 let Self {
2631 src,
2632 dst_parent_token,
2633 dst,
2634
2635 } = &mut *out_;
2636 }
2637
2638 ::fidl_next::Wire::zero_padding(src);
2639
2640 ::fidl_next::Wire::zero_padding(dst_parent_token);
2641
2642 ::fidl_next::Wire::zero_padding(dst);
2643
2644 unsafe {
2645 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2646 }
2647 }
2648 }
2649
2650 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryRenameRequest<'de>
2651 where
2652 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2653 ___D: ::fidl_next::Decoder<'de>,
2654 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2655 {
2656 fn decode(
2657 slot_: ::fidl_next::Slot<'_, Self>,
2658 decoder_: &mut ___D,
2659 _: (),
2660 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2661 if slot_.as_bytes()[20..24] != [0u8; 4] {
2662 return Err(::fidl_next::DecodeError::InvalidPadding);
2663 }
2664
2665 ::fidl_next::munge! {
2666 let Self {
2667 mut src,
2668 mut dst_parent_token,
2669 mut dst,
2670
2671 } = slot_;
2672 }
2673
2674 let _field = src.as_mut();
2675 ::fidl_next::Constrained::validate(_field, 255)?;
2676 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2677
2678 let src = unsafe { src.deref_unchecked() };
2679
2680 if src.len() > 255 {
2681 return Err(::fidl_next::DecodeError::VectorTooLong {
2682 size: src.len() as u64,
2683 limit: 255,
2684 });
2685 }
2686
2687 let _field = dst_parent_token.as_mut();
2688
2689 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2690
2691 let _field = dst.as_mut();
2692 ::fidl_next::Constrained::validate(_field, 255)?;
2693 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2694
2695 let dst = unsafe { dst.deref_unchecked() };
2696
2697 if dst.len() > 255 {
2698 return Err(::fidl_next::DecodeError::VectorTooLong {
2699 size: dst.len() as u64,
2700 limit: 255,
2701 });
2702 }
2703
2704 Ok(())
2705 }
2706 }
2707
2708 impl<'de> ::fidl_next::IntoNatural for DirectoryRenameRequest<'de> {
2709 type Natural = crate::natural::DirectoryRenameRequest;
2710 }
2711
2712 #[derive(Debug)]
2714 #[repr(C)]
2715 pub struct DirectoryWatchRequest {
2716 pub mask: crate::wire::WatchMask,
2717
2718 pub options: ::fidl_next::wire::Uint32,
2719
2720 pub watcher: ::fidl_next::ServerEnd<
2721 crate::DirectoryWatcher,
2722 ::fdomain_client::fidl_next::wire::Handle,
2723 >,
2724 }
2725
2726 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchRequest>(), 12);
2727 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchRequest>(), 4);
2728
2729 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, mask), 0);
2730
2731 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, options), 4);
2732
2733 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, watcher), 8);
2734
2735 impl ::fidl_next::Constrained for DirectoryWatchRequest {
2736 type Constraint = ();
2737
2738 fn validate(
2739 _: ::fidl_next::Slot<'_, Self>,
2740 _: Self::Constraint,
2741 ) -> Result<(), ::fidl_next::ValidationError> {
2742 Ok(())
2743 }
2744 }
2745
2746 unsafe impl ::fidl_next::Wire for DirectoryWatchRequest {
2747 type Narrowed<'de> = DirectoryWatchRequest;
2748
2749 #[inline]
2750 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2751 ::fidl_next::munge! {
2752 let Self {
2753 mask,
2754 options,
2755 watcher,
2756
2757 } = &mut *out_;
2758 }
2759
2760 ::fidl_next::Wire::zero_padding(mask);
2761
2762 ::fidl_next::Wire::zero_padding(options);
2763
2764 ::fidl_next::Wire::zero_padding(watcher);
2765 }
2766 }
2767
2768 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchRequest
2769 where
2770 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2771 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2772 {
2773 fn decode(
2774 slot_: ::fidl_next::Slot<'_, Self>,
2775 decoder_: &mut ___D,
2776 _: (),
2777 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2778 ::fidl_next::munge! {
2779 let Self {
2780 mut mask,
2781 mut options,
2782 mut watcher,
2783
2784 } = slot_;
2785 }
2786
2787 let _field = mask.as_mut();
2788
2789 ::fidl_next::Decode::decode(mask.as_mut(), decoder_, ())?;
2790
2791 let _field = options.as_mut();
2792
2793 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
2794
2795 let _field = watcher.as_mut();
2796
2797 ::fidl_next::Decode::decode(watcher.as_mut(), decoder_, ())?;
2798
2799 Ok(())
2800 }
2801 }
2802
2803 impl ::fidl_next::IntoNatural for DirectoryWatchRequest {
2804 type Natural = crate::natural::DirectoryWatchRequest;
2805 }
2806
2807 #[derive(Debug)]
2809 #[repr(C)]
2810 pub struct NodeOnOpenRequest<'de> {
2811 pub s: ::fidl_next::wire::Int32,
2812
2813 pub info: crate::wire_optional::NodeInfoDeprecated<'de>,
2814 }
2815
2816 static_assertions::const_assert_eq!(std::mem::size_of::<NodeOnOpenRequest<'_>>(), 24);
2817 static_assertions::const_assert_eq!(std::mem::align_of::<NodeOnOpenRequest<'_>>(), 8);
2818
2819 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, s), 0);
2820
2821 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, info), 8);
2822
2823 impl ::fidl_next::Constrained for NodeOnOpenRequest<'_> {
2824 type Constraint = ();
2825
2826 fn validate(
2827 _: ::fidl_next::Slot<'_, Self>,
2828 _: Self::Constraint,
2829 ) -> Result<(), ::fidl_next::ValidationError> {
2830 Ok(())
2831 }
2832 }
2833
2834 unsafe impl ::fidl_next::Wire for NodeOnOpenRequest<'static> {
2835 type Narrowed<'de> = NodeOnOpenRequest<'de>;
2836
2837 #[inline]
2838 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2839 ::fidl_next::munge! {
2840 let Self {
2841 s,
2842 info,
2843
2844 } = &mut *out_;
2845 }
2846
2847 ::fidl_next::Wire::zero_padding(s);
2848
2849 ::fidl_next::Wire::zero_padding(info);
2850
2851 unsafe {
2852 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2853 }
2854 }
2855 }
2856
2857 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeOnOpenRequest<'de>
2858 where
2859 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2860 ___D: ::fidl_next::Decoder<'de>,
2861 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2862 {
2863 fn decode(
2864 slot_: ::fidl_next::Slot<'_, Self>,
2865 decoder_: &mut ___D,
2866 _: (),
2867 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2868 if slot_.as_bytes()[4..8] != [0u8; 4] {
2869 return Err(::fidl_next::DecodeError::InvalidPadding);
2870 }
2871
2872 ::fidl_next::munge! {
2873 let Self {
2874 mut s,
2875 mut info,
2876
2877 } = slot_;
2878 }
2879
2880 let _field = s.as_mut();
2881
2882 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2883
2884 let _field = info.as_mut();
2885
2886 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
2887
2888 Ok(())
2889 }
2890 }
2891
2892 impl<'de> ::fidl_next::IntoNatural for NodeOnOpenRequest<'de> {
2893 type Natural = crate::natural::NodeOnOpenRequest;
2894 }
2895
2896 #[derive(Debug)]
2898 #[repr(C)]
2899 pub struct NodeListExtendedAttributesRequest {
2900 pub iterator: ::fidl_next::ServerEnd<
2901 crate::ExtendedAttributeIterator,
2902 ::fdomain_client::fidl_next::wire::Handle,
2903 >,
2904 }
2905
2906 static_assertions::const_assert_eq!(
2907 std::mem::size_of::<NodeListExtendedAttributesRequest>(),
2908 4
2909 );
2910 static_assertions::const_assert_eq!(
2911 std::mem::align_of::<NodeListExtendedAttributesRequest>(),
2912 4
2913 );
2914
2915 static_assertions::const_assert_eq!(
2916 std::mem::offset_of!(NodeListExtendedAttributesRequest, iterator),
2917 0
2918 );
2919
2920 impl ::fidl_next::Constrained for NodeListExtendedAttributesRequest {
2921 type Constraint = ();
2922
2923 fn validate(
2924 _: ::fidl_next::Slot<'_, Self>,
2925 _: Self::Constraint,
2926 ) -> Result<(), ::fidl_next::ValidationError> {
2927 Ok(())
2928 }
2929 }
2930
2931 unsafe impl ::fidl_next::Wire for NodeListExtendedAttributesRequest {
2932 type Narrowed<'de> = NodeListExtendedAttributesRequest;
2933
2934 #[inline]
2935 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2936 ::fidl_next::munge! {
2937 let Self {
2938 iterator,
2939
2940 } = &mut *out_;
2941 }
2942
2943 ::fidl_next::Wire::zero_padding(iterator);
2944 }
2945 }
2946
2947 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeListExtendedAttributesRequest
2948 where
2949 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2950 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2951 {
2952 fn decode(
2953 slot_: ::fidl_next::Slot<'_, Self>,
2954 decoder_: &mut ___D,
2955 _: (),
2956 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2957 ::fidl_next::munge! {
2958 let Self {
2959 mut iterator,
2960
2961 } = slot_;
2962 }
2963
2964 let _field = iterator.as_mut();
2965
2966 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
2967
2968 Ok(())
2969 }
2970 }
2971
2972 impl ::fidl_next::IntoNatural for NodeListExtendedAttributesRequest {
2973 type Natural = crate::natural::NodeListExtendedAttributesRequest;
2974 }
2975
2976 #[repr(transparent)]
2978 pub struct ExtendedAttributeValue<'de> {
2979 pub(crate) raw: ::fidl_next::wire::Union,
2980 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2981 }
2982
2983 impl<'de> Drop for ExtendedAttributeValue<'de> {
2984 fn drop(&mut self) {
2985 match self.raw.ordinal() {
2986 1 => {
2987 let _ = unsafe {
2988 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2989 };
2990 }
2991
2992 2 => {
2993 let _ = unsafe {
2994 self.raw.get().read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
2995 };
2996 }
2997
2998 _ => (),
2999 }
3000 }
3001 }
3002
3003 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
3004 type Constraint = ();
3005
3006 fn validate(
3007 _: ::fidl_next::Slot<'_, Self>,
3008 _: Self::Constraint,
3009 ) -> Result<(), ::fidl_next::ValidationError> {
3010 Ok(())
3011 }
3012 }
3013
3014 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
3015 type Narrowed<'de> = ExtendedAttributeValue<'de>;
3016
3017 #[inline]
3018 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3019 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3020 ::fidl_next::wire::Union::zero_padding(raw);
3021 }
3022 }
3023
3024 pub mod extended_attribute_value {
3025 pub enum Ref<'de> {
3026 Bytes(&'de ::fidl_next::wire::Vector<'de, u8>),
3027
3028 Buffer(&'de ::fdomain_client::fidl_next::wire::Handle),
3029
3030 UnknownOrdinal_(u64),
3031 }
3032 }
3033
3034 impl<'de> ExtendedAttributeValue<'de> {
3035 pub fn as_ref(&self) -> crate::wire::extended_attribute_value::Ref<'_> {
3036 match self.raw.ordinal() {
3037 1 => crate::wire::extended_attribute_value::Ref::Bytes(unsafe {
3038 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
3039 }),
3040
3041 2 => crate::wire::extended_attribute_value::Ref::Buffer(unsafe {
3042 self.raw.get().deref_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3043 }),
3044
3045 unknown => crate::wire::extended_attribute_value::Ref::UnknownOrdinal_(unknown),
3046 }
3047 }
3048 }
3049
3050 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
3051 where
3052 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3053 ___D: ::fidl_next::Decoder<'de>,
3054 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3055 {
3056 fn decode(
3057 mut slot: ::fidl_next::Slot<'_, Self>,
3058 decoder: &mut ___D,
3059 _: (),
3060 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3061 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3062 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3063 1 => {
3064 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3065 raw,
3066 decoder,
3067 (32768, ()),
3068 )?
3069 }
3070
3071 2 => ::fidl_next::wire::Union::decode_as::<
3072 ___D,
3073 ::fdomain_client::fidl_next::wire::Handle,
3074 >(raw, decoder, ())?,
3075
3076 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3077 }
3078
3079 Ok(())
3080 }
3081 }
3082
3083 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
3084 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3085 match self.raw.ordinal() {
3086 1 => unsafe {
3087 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
3088 },
3089 2 => unsafe {
3090 self.raw
3091 .get()
3092 .deref_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3093 .fmt(f)
3094 },
3095 _ => unsafe { ::core::hint::unreachable_unchecked() },
3096 }
3097 }
3098 }
3099
3100 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
3101 type Natural = crate::natural::ExtendedAttributeValue;
3102 }
3103
3104 #[derive(Debug)]
3106 #[repr(C)]
3107 pub struct NodeSetExtendedAttributeRequest<'de> {
3108 pub name: ::fidl_next::wire::Vector<'de, u8>,
3109
3110 pub value: crate::wire::ExtendedAttributeValue<'de>,
3111
3112 pub mode: crate::wire::SetExtendedAttributeMode,
3113 }
3114
3115 static_assertions::const_assert_eq!(
3116 std::mem::size_of::<NodeSetExtendedAttributeRequest<'_>>(),
3117 40
3118 );
3119 static_assertions::const_assert_eq!(
3120 std::mem::align_of::<NodeSetExtendedAttributeRequest<'_>>(),
3121 8
3122 );
3123
3124 static_assertions::const_assert_eq!(
3125 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, name),
3126 0
3127 );
3128
3129 static_assertions::const_assert_eq!(
3130 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, value),
3131 16
3132 );
3133
3134 static_assertions::const_assert_eq!(
3135 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, mode),
3136 32
3137 );
3138
3139 impl ::fidl_next::Constrained for NodeSetExtendedAttributeRequest<'_> {
3140 type Constraint = ();
3141
3142 fn validate(
3143 _: ::fidl_next::Slot<'_, Self>,
3144 _: Self::Constraint,
3145 ) -> Result<(), ::fidl_next::ValidationError> {
3146 Ok(())
3147 }
3148 }
3149
3150 unsafe impl ::fidl_next::Wire for NodeSetExtendedAttributeRequest<'static> {
3151 type Narrowed<'de> = NodeSetExtendedAttributeRequest<'de>;
3152
3153 #[inline]
3154 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3155 ::fidl_next::munge! {
3156 let Self {
3157 name,
3158 value,
3159 mode,
3160
3161 } = &mut *out_;
3162 }
3163
3164 ::fidl_next::Wire::zero_padding(name);
3165
3166 ::fidl_next::Wire::zero_padding(value);
3167
3168 ::fidl_next::Wire::zero_padding(mode);
3169
3170 unsafe {
3171 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3172 }
3173 }
3174 }
3175
3176 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetExtendedAttributeRequest<'de>
3177 where
3178 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3179 ___D: ::fidl_next::Decoder<'de>,
3180 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3181 {
3182 fn decode(
3183 slot_: ::fidl_next::Slot<'_, Self>,
3184 decoder_: &mut ___D,
3185 _: (),
3186 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3187 if slot_.as_bytes()[36..40] != [0u8; 4] {
3188 return Err(::fidl_next::DecodeError::InvalidPadding);
3189 }
3190
3191 ::fidl_next::munge! {
3192 let Self {
3193 mut name,
3194 mut value,
3195 mut mode,
3196
3197 } = slot_;
3198 }
3199
3200 let _field = name.as_mut();
3201 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3202 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
3203
3204 let name = unsafe { name.deref_unchecked() };
3205
3206 if name.len() > 255 {
3207 return Err(::fidl_next::DecodeError::VectorTooLong {
3208 size: name.len() as u64,
3209 limit: 255,
3210 });
3211 }
3212
3213 let _field = value.as_mut();
3214
3215 ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
3216
3217 let _field = mode.as_mut();
3218
3219 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3220
3221 Ok(())
3222 }
3223 }
3224
3225 impl<'de> ::fidl_next::IntoNatural for NodeSetExtendedAttributeRequest<'de> {
3226 type Natural = crate::natural::NodeSetExtendedAttributeRequest;
3227 }
3228
3229 #[repr(C)]
3231 pub struct FileInfo<'de> {
3232 pub(crate) table: ::fidl_next::wire::Table<'de>,
3233 }
3234
3235 impl<'de> Drop for FileInfo<'de> {
3236 fn drop(&mut self) {
3237 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3238
3239 let _ = self.table.get(2).map(|envelope| unsafe {
3240 envelope.read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3241 });
3242
3243 let _ = self.table.get(3).map(|envelope| unsafe {
3244 envelope.read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3245 });
3246
3247 let _ = self.table.get(4).map(|envelope| unsafe {
3248 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
3249 });
3250 }
3251 }
3252
3253 impl ::fidl_next::Constrained for FileInfo<'_> {
3254 type Constraint = ();
3255
3256 fn validate(
3257 _: ::fidl_next::Slot<'_, Self>,
3258 _: Self::Constraint,
3259 ) -> Result<(), ::fidl_next::ValidationError> {
3260 Ok(())
3261 }
3262 }
3263
3264 unsafe impl ::fidl_next::Wire for FileInfo<'static> {
3265 type Narrowed<'de> = FileInfo<'de>;
3266
3267 #[inline]
3268 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3269 ::fidl_next::munge!(let Self { table } = out);
3270 ::fidl_next::wire::Table::zero_padding(table);
3271 }
3272 }
3273
3274 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileInfo<'de>
3275 where
3276 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3277 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3278 {
3279 fn decode(
3280 slot: ::fidl_next::Slot<'_, Self>,
3281 decoder: &mut ___D,
3282 _: (),
3283 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3284 ::fidl_next::munge!(let Self { table } = slot);
3285
3286 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3287 match ordinal {
3288 0 => unsafe { ::core::hint::unreachable_unchecked() },
3289
3290 1 => {
3291 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3292 slot.as_mut(),
3293 decoder,
3294 (),
3295 )?;
3296
3297 Ok(())
3298 }
3299
3300 2 => {
3301 ::fidl_next::wire::Envelope::decode_as::<
3302 ___D,
3303 ::fdomain_client::fidl_next::wire::Handle,
3304 >(slot.as_mut(), decoder, ())?;
3305
3306 Ok(())
3307 }
3308
3309 3 => {
3310 ::fidl_next::wire::Envelope::decode_as::<
3311 ___D,
3312 ::fdomain_client::fidl_next::wire::Handle,
3313 >(slot.as_mut(), decoder, ())?;
3314
3315 Ok(())
3316 }
3317
3318 4 => {
3319 ::fidl_next::wire::Envelope::decode_as::<
3320 ___D,
3321 crate::wire::NodeAttributes2<'de>,
3322 >(slot.as_mut(), decoder, ())?;
3323
3324 Ok(())
3325 }
3326
3327 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3328 }
3329 })
3330 }
3331 }
3332
3333 impl<'de> FileInfo<'de> {
3334 pub fn is_append(&self) -> ::core::option::Option<&bool> {
3335 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3336 }
3337
3338 pub fn observer(
3339 &self,
3340 ) -> ::core::option::Option<&::fdomain_client::fidl_next::wire::Handle> {
3341 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3342 }
3343
3344 pub fn stream(&self) -> ::core::option::Option<&::fdomain_client::fidl_next::wire::Handle> {
3345 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3346 }
3347
3348 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
3349 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3350 }
3351 }
3352
3353 impl<'de> ::core::fmt::Debug for FileInfo<'de> {
3354 fn fmt(
3355 &self,
3356 f: &mut ::core::fmt::Formatter<'_>,
3357 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3358 f.debug_struct("FileInfo")
3359 .field("is_append", &self.is_append())
3360 .field("observer", &self.observer())
3361 .field("stream", &self.stream())
3362 .field("attributes", &self.attributes())
3363 .finish()
3364 }
3365 }
3366
3367 impl<'de> ::fidl_next::IntoNatural for FileInfo<'de> {
3368 type Natural = crate::natural::FileInfo;
3369 }
3370
3371 #[repr(transparent)]
3373 pub struct Representation<'de> {
3374 pub(crate) raw: ::fidl_next::wire::Union,
3375 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3376 }
3377
3378 impl<'de> Drop for Representation<'de> {
3379 fn drop(&mut self) {
3380 match self.raw.ordinal() {
3381 1 => {
3382 let _ =
3383 unsafe { self.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>() };
3384 }
3385
3386 2 => {
3387 let _ = unsafe {
3388 self.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
3389 };
3390 }
3391
3392 3 => {
3393 let _ =
3394 unsafe { self.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>() };
3395 }
3396
3397 4 => {
3398 let _ =
3399 unsafe { self.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>() };
3400 }
3401
3402 _ => (),
3403 }
3404 }
3405 }
3406
3407 impl ::fidl_next::Constrained for Representation<'_> {
3408 type Constraint = ();
3409
3410 fn validate(
3411 _: ::fidl_next::Slot<'_, Self>,
3412 _: Self::Constraint,
3413 ) -> Result<(), ::fidl_next::ValidationError> {
3414 Ok(())
3415 }
3416 }
3417
3418 unsafe impl ::fidl_next::Wire for Representation<'static> {
3419 type Narrowed<'de> = Representation<'de>;
3420
3421 #[inline]
3422 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3423 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3424 ::fidl_next::wire::Union::zero_padding(raw);
3425 }
3426 }
3427
3428 pub mod representation {
3429 pub enum Ref<'de> {
3430 Node(&'de crate::wire::NodeInfo<'de>),
3431
3432 Directory(&'de crate::wire::DirectoryInfo<'de>),
3433
3434 File(&'de crate::wire::FileInfo<'de>),
3435
3436 Symlink(&'de crate::wire::SymlinkInfo<'de>),
3437
3438 UnknownOrdinal_(u64),
3439 }
3440 }
3441
3442 impl<'de> Representation<'de> {
3443 pub fn as_ref(&self) -> crate::wire::representation::Ref<'_> {
3444 match self.raw.ordinal() {
3445 1 => crate::wire::representation::Ref::Node(unsafe {
3446 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>()
3447 }),
3448
3449 2 => crate::wire::representation::Ref::Directory(unsafe {
3450 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>()
3451 }),
3452
3453 3 => crate::wire::representation::Ref::File(unsafe {
3454 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>()
3455 }),
3456
3457 4 => crate::wire::representation::Ref::Symlink(unsafe {
3458 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>()
3459 }),
3460
3461 unknown => crate::wire::representation::Ref::UnknownOrdinal_(unknown),
3462 }
3463 }
3464 }
3465
3466 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
3467 where
3468 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3469 ___D: ::fidl_next::Decoder<'de>,
3470 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3471 {
3472 fn decode(
3473 mut slot: ::fidl_next::Slot<'_, Self>,
3474 decoder: &mut ___D,
3475 _: (),
3476 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3477 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3478 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3479 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
3480 raw,
3481 decoder,
3482 (),
3483 )?,
3484
3485 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
3486 raw,
3487 decoder,
3488 (),
3489 )?,
3490
3491 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
3492 raw,
3493 decoder,
3494 (),
3495 )?,
3496
3497 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
3498 raw,
3499 decoder,
3500 (),
3501 )?,
3502
3503 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3504 }
3505
3506 Ok(())
3507 }
3508 }
3509
3510 impl<'de> ::core::fmt::Debug for Representation<'de> {
3511 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3512 match self.raw.ordinal() {
3513 1 => unsafe {
3514 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>().fmt(f)
3515 },
3516 2 => unsafe {
3517 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>().fmt(f)
3518 },
3519 3 => unsafe {
3520 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>().fmt(f)
3521 },
3522 4 => unsafe {
3523 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>().fmt(f)
3524 },
3525 _ => unsafe { ::core::hint::unreachable_unchecked() },
3526 }
3527 }
3528 }
3529
3530 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
3531 type Natural = crate::natural::Representation;
3532 }
3533
3534 #[derive(Debug)]
3536 #[repr(C)]
3537 pub struct DirectoryOpenRequest<'de> {
3538 pub path: ::fidl_next::wire::String<'de>,
3539
3540 pub flags: crate::wire::Flags,
3541
3542 pub options: crate::wire::Options<'de>,
3543
3544 pub object: ::fdomain_client::fidl_next::wire::Handle,
3545 }
3546
3547 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryOpenRequest<'_>>(), 48);
3548 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryOpenRequest<'_>>(), 8);
3549
3550 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, path), 0);
3551
3552 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, flags), 16);
3553
3554 static_assertions::const_assert_eq!(
3555 std::mem::offset_of!(DirectoryOpenRequest<'_>, options),
3556 24
3557 );
3558
3559 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, object), 40);
3560
3561 impl ::fidl_next::Constrained for DirectoryOpenRequest<'_> {
3562 type Constraint = ();
3563
3564 fn validate(
3565 _: ::fidl_next::Slot<'_, Self>,
3566 _: Self::Constraint,
3567 ) -> Result<(), ::fidl_next::ValidationError> {
3568 Ok(())
3569 }
3570 }
3571
3572 unsafe impl ::fidl_next::Wire for DirectoryOpenRequest<'static> {
3573 type Narrowed<'de> = DirectoryOpenRequest<'de>;
3574
3575 #[inline]
3576 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3577 ::fidl_next::munge! {
3578 let Self {
3579 path,
3580 flags,
3581 options,
3582 object,
3583
3584 } = &mut *out_;
3585 }
3586
3587 ::fidl_next::Wire::zero_padding(path);
3588
3589 ::fidl_next::Wire::zero_padding(flags);
3590
3591 ::fidl_next::Wire::zero_padding(options);
3592
3593 ::fidl_next::Wire::zero_padding(object);
3594
3595 unsafe {
3596 out_.as_mut_ptr().cast::<u8>().add(44).write_bytes(0, 4);
3597 }
3598 }
3599 }
3600
3601 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryOpenRequest<'de>
3602 where
3603 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3604 ___D: ::fidl_next::Decoder<'de>,
3605 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3606 {
3607 fn decode(
3608 slot_: ::fidl_next::Slot<'_, Self>,
3609 decoder_: &mut ___D,
3610 _: (),
3611 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3612 if slot_.as_bytes()[44..48] != [0u8; 4] {
3613 return Err(::fidl_next::DecodeError::InvalidPadding);
3614 }
3615
3616 ::fidl_next::munge! {
3617 let Self {
3618 mut path,
3619 mut flags,
3620 mut options,
3621 mut object,
3622
3623 } = slot_;
3624 }
3625
3626 let _field = path.as_mut();
3627 ::fidl_next::Constrained::validate(_field, 4095)?;
3628 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3629
3630 let path = unsafe { path.deref_unchecked() };
3631
3632 if path.len() > 4095 {
3633 return Err(::fidl_next::DecodeError::VectorTooLong {
3634 size: path.len() as u64,
3635 limit: 4095,
3636 });
3637 }
3638
3639 let _field = flags.as_mut();
3640
3641 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3642
3643 let _field = options.as_mut();
3644
3645 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
3646
3647 let _field = object.as_mut();
3648
3649 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3650
3651 Ok(())
3652 }
3653 }
3654
3655 impl<'de> ::fidl_next::IntoNatural for DirectoryOpenRequest<'de> {
3656 type Natural = crate::natural::DirectoryOpenRequest;
3657 }
3658
3659 #[derive(Debug)]
3661 #[repr(C)]
3662 pub struct NodeDeprecatedCloneRequest {
3663 pub flags: crate::wire::OpenFlags,
3664
3665 pub object: ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
3666 }
3667
3668 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedCloneRequest>(), 8);
3669 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedCloneRequest>(), 4);
3670
3671 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedCloneRequest, flags), 0);
3672
3673 static_assertions::const_assert_eq!(
3674 std::mem::offset_of!(NodeDeprecatedCloneRequest, object),
3675 4
3676 );
3677
3678 impl ::fidl_next::Constrained for NodeDeprecatedCloneRequest {
3679 type Constraint = ();
3680
3681 fn validate(
3682 _: ::fidl_next::Slot<'_, Self>,
3683 _: Self::Constraint,
3684 ) -> Result<(), ::fidl_next::ValidationError> {
3685 Ok(())
3686 }
3687 }
3688
3689 unsafe impl ::fidl_next::Wire for NodeDeprecatedCloneRequest {
3690 type Narrowed<'de> = NodeDeprecatedCloneRequest;
3691
3692 #[inline]
3693 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3694 ::fidl_next::munge! {
3695 let Self {
3696 flags,
3697 object,
3698
3699 } = &mut *out_;
3700 }
3701
3702 ::fidl_next::Wire::zero_padding(flags);
3703
3704 ::fidl_next::Wire::zero_padding(object);
3705 }
3706 }
3707
3708 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedCloneRequest
3709 where
3710 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3711 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3712 {
3713 fn decode(
3714 slot_: ::fidl_next::Slot<'_, Self>,
3715 decoder_: &mut ___D,
3716 _: (),
3717 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3718 ::fidl_next::munge! {
3719 let Self {
3720 mut flags,
3721 mut object,
3722
3723 } = slot_;
3724 }
3725
3726 let _field = flags.as_mut();
3727
3728 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3729
3730 let _field = object.as_mut();
3731
3732 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3733
3734 Ok(())
3735 }
3736 }
3737
3738 impl ::fidl_next::IntoNatural for NodeDeprecatedCloneRequest {
3739 type Natural = crate::natural::NodeDeprecatedCloneRequest;
3740 }
3741
3742 #[derive(Debug)]
3744 #[repr(C)]
3745 pub struct DirectoryDeprecatedOpenRequest<'de> {
3746 pub flags: crate::wire::OpenFlags,
3747
3748 pub mode: crate::wire::ModeType,
3749
3750 pub path: ::fidl_next::wire::String<'de>,
3751
3752 pub object: ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
3753 }
3754
3755 static_assertions::const_assert_eq!(
3756 std::mem::size_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3757 32
3758 );
3759 static_assertions::const_assert_eq!(
3760 std::mem::align_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3761 8
3762 );
3763
3764 static_assertions::const_assert_eq!(
3765 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, flags),
3766 0
3767 );
3768
3769 static_assertions::const_assert_eq!(
3770 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, mode),
3771 4
3772 );
3773
3774 static_assertions::const_assert_eq!(
3775 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, path),
3776 8
3777 );
3778
3779 static_assertions::const_assert_eq!(
3780 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, object),
3781 24
3782 );
3783
3784 impl ::fidl_next::Constrained for DirectoryDeprecatedOpenRequest<'_> {
3785 type Constraint = ();
3786
3787 fn validate(
3788 _: ::fidl_next::Slot<'_, Self>,
3789 _: Self::Constraint,
3790 ) -> Result<(), ::fidl_next::ValidationError> {
3791 Ok(())
3792 }
3793 }
3794
3795 unsafe impl ::fidl_next::Wire for DirectoryDeprecatedOpenRequest<'static> {
3796 type Narrowed<'de> = DirectoryDeprecatedOpenRequest<'de>;
3797
3798 #[inline]
3799 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3800 ::fidl_next::munge! {
3801 let Self {
3802 flags,
3803 mode,
3804 path,
3805 object,
3806
3807 } = &mut *out_;
3808 }
3809
3810 ::fidl_next::Wire::zero_padding(flags);
3811
3812 ::fidl_next::Wire::zero_padding(mode);
3813
3814 ::fidl_next::Wire::zero_padding(path);
3815
3816 ::fidl_next::Wire::zero_padding(object);
3817
3818 unsafe {
3819 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
3820 }
3821 }
3822 }
3823
3824 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryDeprecatedOpenRequest<'de>
3825 where
3826 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3827 ___D: ::fidl_next::Decoder<'de>,
3828 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3829 {
3830 fn decode(
3831 slot_: ::fidl_next::Slot<'_, Self>,
3832 decoder_: &mut ___D,
3833 _: (),
3834 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3835 if slot_.as_bytes()[28..32] != [0u8; 4] {
3836 return Err(::fidl_next::DecodeError::InvalidPadding);
3837 }
3838
3839 ::fidl_next::munge! {
3840 let Self {
3841 mut flags,
3842 mut mode,
3843 mut path,
3844 mut object,
3845
3846 } = slot_;
3847 }
3848
3849 let _field = flags.as_mut();
3850
3851 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3852
3853 let _field = mode.as_mut();
3854
3855 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3856
3857 let _field = path.as_mut();
3858 ::fidl_next::Constrained::validate(_field, 4095)?;
3859 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3860
3861 let path = unsafe { path.deref_unchecked() };
3862
3863 if path.len() > 4095 {
3864 return Err(::fidl_next::DecodeError::VectorTooLong {
3865 size: path.len() as u64,
3866 limit: 4095,
3867 });
3868 }
3869
3870 let _field = object.as_mut();
3871
3872 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3873
3874 Ok(())
3875 }
3876 }
3877
3878 impl<'de> ::fidl_next::IntoNatural for DirectoryDeprecatedOpenRequest<'de> {
3879 type Natural = crate::natural::DirectoryDeprecatedOpenRequest;
3880 }
3881
3882 #[derive(Debug)]
3884 #[repr(C)]
3885 pub struct DirectoryCreateSymlinkRequest<'de> {
3886 pub name: ::fidl_next::wire::String<'de>,
3887
3888 pub target: ::fidl_next::wire::Vector<'de, u8>,
3889
3890 pub connection: ::fidl_next::ServerEnd<
3891 crate::Symlink,
3892 ::fdomain_client::fidl_next::wire::OptionalHandle,
3893 >,
3894 }
3895
3896 static_assertions::const_assert_eq!(
3897 std::mem::size_of::<DirectoryCreateSymlinkRequest<'_>>(),
3898 40
3899 );
3900 static_assertions::const_assert_eq!(
3901 std::mem::align_of::<DirectoryCreateSymlinkRequest<'_>>(),
3902 8
3903 );
3904
3905 static_assertions::const_assert_eq!(
3906 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, name),
3907 0
3908 );
3909
3910 static_assertions::const_assert_eq!(
3911 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, target),
3912 16
3913 );
3914
3915 static_assertions::const_assert_eq!(
3916 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, connection),
3917 32
3918 );
3919
3920 impl ::fidl_next::Constrained for DirectoryCreateSymlinkRequest<'_> {
3921 type Constraint = ();
3922
3923 fn validate(
3924 _: ::fidl_next::Slot<'_, Self>,
3925 _: Self::Constraint,
3926 ) -> Result<(), ::fidl_next::ValidationError> {
3927 Ok(())
3928 }
3929 }
3930
3931 unsafe impl ::fidl_next::Wire for DirectoryCreateSymlinkRequest<'static> {
3932 type Narrowed<'de> = DirectoryCreateSymlinkRequest<'de>;
3933
3934 #[inline]
3935 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3936 ::fidl_next::munge! {
3937 let Self {
3938 name,
3939 target,
3940 connection,
3941
3942 } = &mut *out_;
3943 }
3944
3945 ::fidl_next::Wire::zero_padding(name);
3946
3947 ::fidl_next::Wire::zero_padding(target);
3948
3949 ::fidl_next::Wire::zero_padding(connection);
3950
3951 unsafe {
3952 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3953 }
3954 }
3955 }
3956
3957 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryCreateSymlinkRequest<'de>
3958 where
3959 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3960 ___D: ::fidl_next::Decoder<'de>,
3961 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3962 {
3963 fn decode(
3964 slot_: ::fidl_next::Slot<'_, Self>,
3965 decoder_: &mut ___D,
3966 _: (),
3967 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3968 if slot_.as_bytes()[36..40] != [0u8; 4] {
3969 return Err(::fidl_next::DecodeError::InvalidPadding);
3970 }
3971
3972 ::fidl_next::munge! {
3973 let Self {
3974 mut name,
3975 mut target,
3976 mut connection,
3977
3978 } = slot_;
3979 }
3980
3981 let _field = name.as_mut();
3982 ::fidl_next::Constrained::validate(_field, 255)?;
3983 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
3984
3985 let name = unsafe { name.deref_unchecked() };
3986
3987 if name.len() > 255 {
3988 return Err(::fidl_next::DecodeError::VectorTooLong {
3989 size: name.len() as u64,
3990 limit: 255,
3991 });
3992 }
3993
3994 let _field = target.as_mut();
3995 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
3996 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
3997
3998 let target = unsafe { target.deref_unchecked() };
3999
4000 if target.len() > 4095 {
4001 return Err(::fidl_next::DecodeError::VectorTooLong {
4002 size: target.len() as u64,
4003 limit: 4095,
4004 });
4005 }
4006
4007 let _field = connection.as_mut();
4008
4009 ::fidl_next::Decode::decode(connection.as_mut(), decoder_, ())?;
4010
4011 Ok(())
4012 }
4013 }
4014
4015 impl<'de> ::fidl_next::IntoNatural for DirectoryCreateSymlinkRequest<'de> {
4016 type Natural = crate::natural::DirectoryCreateSymlinkRequest;
4017 }
4018
4019 #[derive(Debug)]
4021 #[repr(C)]
4022 pub struct FileGetBackingMemoryResponse {
4023 pub vmo: ::fdomain_client::fidl_next::wire::Handle,
4024 }
4025
4026 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryResponse>(), 4);
4027 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryResponse>(), 4);
4028
4029 static_assertions::const_assert_eq!(std::mem::offset_of!(FileGetBackingMemoryResponse, vmo), 0);
4030
4031 impl ::fidl_next::Constrained for FileGetBackingMemoryResponse {
4032 type Constraint = ();
4033
4034 fn validate(
4035 _: ::fidl_next::Slot<'_, Self>,
4036 _: Self::Constraint,
4037 ) -> Result<(), ::fidl_next::ValidationError> {
4038 Ok(())
4039 }
4040 }
4041
4042 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryResponse {
4043 type Narrowed<'de> = FileGetBackingMemoryResponse;
4044
4045 #[inline]
4046 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4047 ::fidl_next::munge! {
4048 let Self {
4049 vmo,
4050
4051 } = &mut *out_;
4052 }
4053
4054 ::fidl_next::Wire::zero_padding(vmo);
4055 }
4056 }
4057
4058 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryResponse
4059 where
4060 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4061 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4062 {
4063 fn decode(
4064 slot_: ::fidl_next::Slot<'_, Self>,
4065 decoder_: &mut ___D,
4066 _: (),
4067 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4068 ::fidl_next::munge! {
4069 let Self {
4070 mut vmo,
4071
4072 } = slot_;
4073 }
4074
4075 let _field = vmo.as_mut();
4076
4077 ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
4078
4079 Ok(())
4080 }
4081 }
4082
4083 impl ::fidl_next::IntoNatural for FileGetBackingMemoryResponse {
4084 type Natural = crate::natural::FileGetBackingMemoryResponse;
4085 }
4086
4087 #[derive(Debug)]
4089 #[repr(C)]
4090 pub struct LinkableLinkIntoRequest<'de> {
4091 pub dst_parent_token: ::fdomain_client::fidl_next::wire::Handle,
4092
4093 pub dst: ::fidl_next::wire::String<'de>,
4094 }
4095
4096 static_assertions::const_assert_eq!(std::mem::size_of::<LinkableLinkIntoRequest<'_>>(), 24);
4097 static_assertions::const_assert_eq!(std::mem::align_of::<LinkableLinkIntoRequest<'_>>(), 8);
4098
4099 static_assertions::const_assert_eq!(
4100 std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst_parent_token),
4101 0
4102 );
4103
4104 static_assertions::const_assert_eq!(std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst), 8);
4105
4106 impl ::fidl_next::Constrained for LinkableLinkIntoRequest<'_> {
4107 type Constraint = ();
4108
4109 fn validate(
4110 _: ::fidl_next::Slot<'_, Self>,
4111 _: Self::Constraint,
4112 ) -> Result<(), ::fidl_next::ValidationError> {
4113 Ok(())
4114 }
4115 }
4116
4117 unsafe impl ::fidl_next::Wire for LinkableLinkIntoRequest<'static> {
4118 type Narrowed<'de> = LinkableLinkIntoRequest<'de>;
4119
4120 #[inline]
4121 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4122 ::fidl_next::munge! {
4123 let Self {
4124 dst_parent_token,
4125 dst,
4126
4127 } = &mut *out_;
4128 }
4129
4130 ::fidl_next::Wire::zero_padding(dst_parent_token);
4131
4132 ::fidl_next::Wire::zero_padding(dst);
4133
4134 unsafe {
4135 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
4136 }
4137 }
4138 }
4139
4140 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LinkableLinkIntoRequest<'de>
4141 where
4142 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4143 ___D: ::fidl_next::Decoder<'de>,
4144 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4145 {
4146 fn decode(
4147 slot_: ::fidl_next::Slot<'_, Self>,
4148 decoder_: &mut ___D,
4149 _: (),
4150 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4151 if slot_.as_bytes()[4..8] != [0u8; 4] {
4152 return Err(::fidl_next::DecodeError::InvalidPadding);
4153 }
4154
4155 ::fidl_next::munge! {
4156 let Self {
4157 mut dst_parent_token,
4158 mut dst,
4159
4160 } = slot_;
4161 }
4162
4163 let _field = dst_parent_token.as_mut();
4164
4165 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
4166
4167 let _field = dst.as_mut();
4168 ::fidl_next::Constrained::validate(_field, 255)?;
4169 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
4170
4171 let dst = unsafe { dst.deref_unchecked() };
4172
4173 if dst.len() > 255 {
4174 return Err(::fidl_next::DecodeError::VectorTooLong {
4175 size: dst.len() as u64,
4176 limit: 255,
4177 });
4178 }
4179
4180 Ok(())
4181 }
4182 }
4183
4184 impl<'de> ::fidl_next::IntoNatural for LinkableLinkIntoRequest<'de> {
4185 type Natural = crate::natural::LinkableLinkIntoRequest;
4186 }
4187
4188 #[derive(Debug)]
4190 #[repr(C)]
4191 pub struct FileAllocateRequest {
4192 pub offset: ::fidl_next::wire::Uint64,
4193
4194 pub length: ::fidl_next::wire::Uint64,
4195
4196 pub mode: crate::wire::AllocateMode,
4197 }
4198
4199 static_assertions::const_assert_eq!(std::mem::size_of::<FileAllocateRequest>(), 24);
4200 static_assertions::const_assert_eq!(std::mem::align_of::<FileAllocateRequest>(), 8);
4201
4202 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, offset), 0);
4203
4204 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, length), 8);
4205
4206 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, mode), 16);
4207
4208 impl ::fidl_next::Constrained for FileAllocateRequest {
4209 type Constraint = ();
4210
4211 fn validate(
4212 _: ::fidl_next::Slot<'_, Self>,
4213 _: Self::Constraint,
4214 ) -> Result<(), ::fidl_next::ValidationError> {
4215 Ok(())
4216 }
4217 }
4218
4219 unsafe impl ::fidl_next::Wire for FileAllocateRequest {
4220 type Narrowed<'de> = FileAllocateRequest;
4221
4222 #[inline]
4223 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4224 ::fidl_next::munge! {
4225 let Self {
4226 offset,
4227 length,
4228 mode,
4229
4230 } = &mut *out_;
4231 }
4232
4233 ::fidl_next::Wire::zero_padding(offset);
4234
4235 ::fidl_next::Wire::zero_padding(length);
4236
4237 ::fidl_next::Wire::zero_padding(mode);
4238
4239 unsafe {
4240 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4241 }
4242 }
4243 }
4244
4245 unsafe impl<___D> ::fidl_next::Decode<___D> for FileAllocateRequest
4246 where
4247 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4248 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4249 {
4250 fn decode(
4251 slot_: ::fidl_next::Slot<'_, Self>,
4252 decoder_: &mut ___D,
4253 _: (),
4254 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4255 if slot_.as_bytes()[20..24] != [0u8; 4] {
4256 return Err(::fidl_next::DecodeError::InvalidPadding);
4257 }
4258
4259 ::fidl_next::munge! {
4260 let Self {
4261 mut offset,
4262 mut length,
4263 mut mode,
4264
4265 } = slot_;
4266 }
4267
4268 let _field = offset.as_mut();
4269
4270 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
4271
4272 let _field = length.as_mut();
4273
4274 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
4275
4276 let _field = mode.as_mut();
4277
4278 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
4279
4280 Ok(())
4281 }
4282 }
4283
4284 impl ::fidl_next::IntoNatural for FileAllocateRequest {
4285 type Natural = crate::natural::FileAllocateRequest;
4286 }
4287
4288 #[derive(Debug)]
4290 #[repr(C)]
4291 pub struct FileEnableVerityRequest<'de> {
4292 pub options: crate::wire::VerificationOptions<'de>,
4293 }
4294
4295 static_assertions::const_assert_eq!(std::mem::size_of::<FileEnableVerityRequest<'_>>(), 16);
4296 static_assertions::const_assert_eq!(std::mem::align_of::<FileEnableVerityRequest<'_>>(), 8);
4297
4298 static_assertions::const_assert_eq!(
4299 std::mem::offset_of!(FileEnableVerityRequest<'_>, options),
4300 0
4301 );
4302
4303 impl ::fidl_next::Constrained for FileEnableVerityRequest<'_> {
4304 type Constraint = ();
4305
4306 fn validate(
4307 _: ::fidl_next::Slot<'_, Self>,
4308 _: Self::Constraint,
4309 ) -> Result<(), ::fidl_next::ValidationError> {
4310 Ok(())
4311 }
4312 }
4313
4314 unsafe impl ::fidl_next::Wire for FileEnableVerityRequest<'static> {
4315 type Narrowed<'de> = FileEnableVerityRequest<'de>;
4316
4317 #[inline]
4318 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4319 ::fidl_next::munge! {
4320 let Self {
4321 options,
4322
4323 } = &mut *out_;
4324 }
4325
4326 ::fidl_next::Wire::zero_padding(options);
4327 }
4328 }
4329
4330 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileEnableVerityRequest<'de>
4331 where
4332 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4333 ___D: ::fidl_next::Decoder<'de>,
4334 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4335 {
4336 fn decode(
4337 slot_: ::fidl_next::Slot<'_, Self>,
4338 decoder_: &mut ___D,
4339 _: (),
4340 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4341 ::fidl_next::munge! {
4342 let Self {
4343 mut options,
4344
4345 } = slot_;
4346 }
4347
4348 let _field = options.as_mut();
4349
4350 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
4351
4352 Ok(())
4353 }
4354 }
4355
4356 impl<'de> ::fidl_next::IntoNatural for FileEnableVerityRequest<'de> {
4357 type Natural = crate::natural::FileEnableVerityRequest;
4358 }
4359
4360 #[derive(Debug)]
4362 #[repr(C)]
4363 pub struct FileObject {
4364 pub event: ::fdomain_client::fidl_next::wire::OptionalHandle,
4365
4366 pub stream: ::fdomain_client::fidl_next::wire::OptionalHandle,
4367 }
4368
4369 static_assertions::const_assert_eq!(std::mem::size_of::<FileObject>(), 8);
4370 static_assertions::const_assert_eq!(std::mem::align_of::<FileObject>(), 4);
4371
4372 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, event), 0);
4373
4374 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, stream), 4);
4375
4376 impl ::fidl_next::Constrained for FileObject {
4377 type Constraint = ();
4378
4379 fn validate(
4380 _: ::fidl_next::Slot<'_, Self>,
4381 _: Self::Constraint,
4382 ) -> Result<(), ::fidl_next::ValidationError> {
4383 Ok(())
4384 }
4385 }
4386
4387 unsafe impl ::fidl_next::Wire for FileObject {
4388 type Narrowed<'de> = FileObject;
4389
4390 #[inline]
4391 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4392 ::fidl_next::munge! {
4393 let Self {
4394 event,
4395 stream,
4396
4397 } = &mut *out_;
4398 }
4399
4400 ::fidl_next::Wire::zero_padding(event);
4401
4402 ::fidl_next::Wire::zero_padding(stream);
4403 }
4404 }
4405
4406 unsafe impl<___D> ::fidl_next::Decode<___D> for FileObject
4407 where
4408 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4409 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4410 {
4411 fn decode(
4412 slot_: ::fidl_next::Slot<'_, Self>,
4413 decoder_: &mut ___D,
4414 _: (),
4415 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4416 ::fidl_next::munge! {
4417 let Self {
4418 mut event,
4419 mut stream,
4420
4421 } = slot_;
4422 }
4423
4424 let _field = event.as_mut();
4425
4426 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
4427
4428 let _field = stream.as_mut();
4429
4430 ::fidl_next::Decode::decode(stream.as_mut(), decoder_, ())?;
4431
4432 Ok(())
4433 }
4434 }
4435
4436 impl ::fidl_next::IntoNatural for FileObject {
4437 type Natural = crate::natural::FileObject;
4438 }
4439
4440 #[repr(transparent)]
4442 pub struct NodeInfoDeprecated<'de> {
4443 pub(crate) raw: ::fidl_next::wire::Union,
4444 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4445 }
4446
4447 impl<'de> Drop for NodeInfoDeprecated<'de> {
4448 fn drop(&mut self) {
4449 match self.raw.ordinal() {
4450 1 => {
4451 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Service>() };
4452 }
4453
4454 2 => {
4455 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::FileObject>() };
4456 }
4457
4458 3 => {
4459 let _ =
4460 unsafe { self.raw.get().read_unchecked::<crate::wire::DirectoryObject>() };
4461 }
4462
4463 4 => {
4464 let _ = unsafe {
4465 self.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4466 };
4467 }
4468
4469 _ => unsafe { ::core::hint::unreachable_unchecked() },
4470 }
4471 }
4472 }
4473
4474 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4475 type Constraint = ();
4476
4477 fn validate(
4478 _: ::fidl_next::Slot<'_, Self>,
4479 _: Self::Constraint,
4480 ) -> Result<(), ::fidl_next::ValidationError> {
4481 Ok(())
4482 }
4483 }
4484
4485 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4486 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4487
4488 #[inline]
4489 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4490 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4491 ::fidl_next::wire::Union::zero_padding(raw);
4492 }
4493 }
4494
4495 pub mod node_info_deprecated {
4496 pub enum Ref<'de> {
4497 Service(&'de crate::wire::Service),
4498
4499 File(&'de crate::wire::FileObject),
4500
4501 Directory(&'de crate::wire::DirectoryObject),
4502
4503 Symlink(&'de crate::wire::SymlinkObject<'de>),
4504 }
4505 }
4506
4507 impl<'de> NodeInfoDeprecated<'de> {
4508 pub fn as_ref(&self) -> crate::wire::node_info_deprecated::Ref<'_> {
4509 match self.raw.ordinal() {
4510 1 => crate::wire::node_info_deprecated::Ref::Service(unsafe {
4511 self.raw.get().deref_unchecked::<crate::wire::Service>()
4512 }),
4513
4514 2 => crate::wire::node_info_deprecated::Ref::File(unsafe {
4515 self.raw.get().deref_unchecked::<crate::wire::FileObject>()
4516 }),
4517
4518 3 => crate::wire::node_info_deprecated::Ref::Directory(unsafe {
4519 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>()
4520 }),
4521
4522 4 => crate::wire::node_info_deprecated::Ref::Symlink(unsafe {
4523 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>()
4524 }),
4525
4526 _ => unsafe { ::core::hint::unreachable_unchecked() },
4527 }
4528 }
4529 }
4530
4531 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4532 where
4533 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4534 ___D: ::fidl_next::Decoder<'de>,
4535 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4536 {
4537 fn decode(
4538 mut slot: ::fidl_next::Slot<'_, Self>,
4539 decoder: &mut ___D,
4540 _: (),
4541 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4542 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4543 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4544 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4545 raw,
4546 decoder,
4547 (),
4548 )?,
4549
4550 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4551 raw,
4552 decoder,
4553 (),
4554 )?,
4555
4556 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4557 raw,
4558 decoder,
4559 (),
4560 )?,
4561
4562 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4563 raw,
4564 decoder,
4565 (),
4566 )?,
4567
4568 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
4569 }
4570
4571 Ok(())
4572 }
4573 }
4574
4575 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4576 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4577 match self.raw.ordinal() {
4578 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Service>().fmt(f) },
4579 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::FileObject>().fmt(f) },
4580 3 => unsafe {
4581 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>().fmt(f)
4582 },
4583 4 => unsafe {
4584 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>().fmt(f)
4585 },
4586 _ => unsafe { ::core::hint::unreachable_unchecked() },
4587 }
4588 }
4589 }
4590
4591 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4592 type Natural = crate::natural::NodeInfoDeprecated;
4593 }
4594}
4595
4596pub mod wire_optional {
4597
4598 pub use fidl_next_common_fuchsia_io::wire_optional::*;
4599
4600 #[repr(transparent)]
4601 pub struct ExtendedAttributeValue<'de> {
4602 pub(crate) raw: ::fidl_next::wire::Union,
4603 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4604 }
4605
4606 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
4607 type Constraint = ();
4608
4609 fn validate(
4610 _: ::fidl_next::Slot<'_, Self>,
4611 _: Self::Constraint,
4612 ) -> Result<(), ::fidl_next::ValidationError> {
4613 Ok(())
4614 }
4615 }
4616
4617 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
4618 type Narrowed<'de> = ExtendedAttributeValue<'de>;
4619
4620 #[inline]
4621 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4622 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4623 ::fidl_next::wire::Union::zero_padding(raw);
4624 }
4625 }
4626
4627 impl<'de> ExtendedAttributeValue<'de> {
4628 pub fn is_some(&self) -> bool {
4629 self.raw.is_some()
4630 }
4631
4632 pub fn is_none(&self) -> bool {
4633 self.raw.is_none()
4634 }
4635
4636 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ExtendedAttributeValue<'de>> {
4637 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4638 }
4639
4640 pub fn into_option(
4641 self,
4642 ) -> ::core::option::Option<crate::wire::ExtendedAttributeValue<'de>> {
4643 if self.is_some() {
4644 Some(crate::wire::ExtendedAttributeValue {
4645 raw: self.raw,
4646 _phantom: ::core::marker::PhantomData,
4647 })
4648 } else {
4649 None
4650 }
4651 }
4652 }
4653
4654 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
4655 where
4656 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4657 ___D: ::fidl_next::Decoder<'de>,
4658 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4659 {
4660 fn decode(
4661 mut slot: ::fidl_next::Slot<'_, Self>,
4662 decoder: &mut ___D,
4663 _: (),
4664 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4665 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4666 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4667 1 => {
4668 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
4669 raw,
4670 decoder,
4671 (32768, ()),
4672 )?
4673 }
4674
4675 2 => ::fidl_next::wire::Union::decode_as::<
4676 ___D,
4677 ::fdomain_client::fidl_next::wire::Handle,
4678 >(raw, decoder, ())?,
4679
4680 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4681 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4682 }
4683
4684 Ok(())
4685 }
4686 }
4687
4688 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
4689 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4690 self.as_ref().fmt(f)
4691 }
4692 }
4693
4694 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
4695 type Natural = ::core::option::Option<crate::natural::ExtendedAttributeValue>;
4696 }
4697
4698 #[repr(transparent)]
4699 pub struct Representation<'de> {
4700 pub(crate) raw: ::fidl_next::wire::Union,
4701 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4702 }
4703
4704 impl ::fidl_next::Constrained for Representation<'_> {
4705 type Constraint = ();
4706
4707 fn validate(
4708 _: ::fidl_next::Slot<'_, Self>,
4709 _: Self::Constraint,
4710 ) -> Result<(), ::fidl_next::ValidationError> {
4711 Ok(())
4712 }
4713 }
4714
4715 unsafe impl ::fidl_next::Wire for Representation<'static> {
4716 type Narrowed<'de> = Representation<'de>;
4717
4718 #[inline]
4719 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4720 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4721 ::fidl_next::wire::Union::zero_padding(raw);
4722 }
4723 }
4724
4725 impl<'de> Representation<'de> {
4726 pub fn is_some(&self) -> bool {
4727 self.raw.is_some()
4728 }
4729
4730 pub fn is_none(&self) -> bool {
4731 self.raw.is_none()
4732 }
4733
4734 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Representation<'de>> {
4735 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4736 }
4737
4738 pub fn into_option(self) -> ::core::option::Option<crate::wire::Representation<'de>> {
4739 if self.is_some() {
4740 Some(crate::wire::Representation {
4741 raw: self.raw,
4742 _phantom: ::core::marker::PhantomData,
4743 })
4744 } else {
4745 None
4746 }
4747 }
4748 }
4749
4750 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
4751 where
4752 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4753 ___D: ::fidl_next::Decoder<'de>,
4754 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4755 {
4756 fn decode(
4757 mut slot: ::fidl_next::Slot<'_, Self>,
4758 decoder: &mut ___D,
4759 _: (),
4760 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4761 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4762 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4763 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
4764 raw,
4765 decoder,
4766 (),
4767 )?,
4768
4769 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
4770 raw,
4771 decoder,
4772 (),
4773 )?,
4774
4775 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
4776 raw,
4777 decoder,
4778 (),
4779 )?,
4780
4781 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
4782 raw,
4783 decoder,
4784 (),
4785 )?,
4786
4787 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4788 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4789 }
4790
4791 Ok(())
4792 }
4793 }
4794
4795 impl<'de> ::core::fmt::Debug for Representation<'de> {
4796 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4797 self.as_ref().fmt(f)
4798 }
4799 }
4800
4801 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
4802 type Natural = ::core::option::Option<crate::natural::Representation>;
4803 }
4804
4805 #[repr(transparent)]
4806 pub struct NodeInfoDeprecated<'de> {
4807 pub(crate) raw: ::fidl_next::wire::Union,
4808 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4809 }
4810
4811 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4812 type Constraint = ();
4813
4814 fn validate(
4815 _: ::fidl_next::Slot<'_, Self>,
4816 _: Self::Constraint,
4817 ) -> Result<(), ::fidl_next::ValidationError> {
4818 Ok(())
4819 }
4820 }
4821
4822 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4823 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4824
4825 #[inline]
4826 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4827 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4828 ::fidl_next::wire::Union::zero_padding(raw);
4829 }
4830 }
4831
4832 impl<'de> NodeInfoDeprecated<'de> {
4833 pub fn is_some(&self) -> bool {
4834 self.raw.is_some()
4835 }
4836
4837 pub fn is_none(&self) -> bool {
4838 self.raw.is_none()
4839 }
4840
4841 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::NodeInfoDeprecated<'de>> {
4842 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4843 }
4844
4845 pub fn into_option(self) -> ::core::option::Option<crate::wire::NodeInfoDeprecated<'de>> {
4846 if self.is_some() {
4847 Some(crate::wire::NodeInfoDeprecated {
4848 raw: self.raw,
4849 _phantom: ::core::marker::PhantomData,
4850 })
4851 } else {
4852 None
4853 }
4854 }
4855 }
4856
4857 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4858 where
4859 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4860 ___D: ::fidl_next::Decoder<'de>,
4861 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4862 {
4863 fn decode(
4864 mut slot: ::fidl_next::Slot<'_, Self>,
4865 decoder: &mut ___D,
4866 _: (),
4867 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4868 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4869 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4870 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4871 raw,
4872 decoder,
4873 (),
4874 )?,
4875
4876 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4877 raw,
4878 decoder,
4879 (),
4880 )?,
4881
4882 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4883 raw,
4884 decoder,
4885 (),
4886 )?,
4887
4888 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4889 raw,
4890 decoder,
4891 (),
4892 )?,
4893
4894 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4895 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4896 }
4897
4898 Ok(())
4899 }
4900 }
4901
4902 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4903 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4904 self.as_ref().fmt(f)
4905 }
4906 }
4907
4908 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4909 type Natural = ::core::option::Option<crate::natural::NodeInfoDeprecated>;
4910 }
4911}
4912
4913pub mod generic {
4914
4915 pub use fidl_next_common_fuchsia_io::generic::*;
4916
4917 pub struct DirectoryGetTokenResponse<T0, T1> {
4919 pub s: T0,
4920
4921 pub token: T1,
4922 }
4923
4924 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>
4925 for DirectoryGetTokenResponse<T0, T1>
4926 where
4927 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4928 ___E: ::fdomain_client::fidl_next::HandleEncoder,
4929 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
4930 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::OptionalHandle, ___E>,
4931 {
4932 #[inline]
4933 fn encode(
4934 self,
4935 encoder_: &mut ___E,
4936 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryGetTokenResponse>,
4937 _: (),
4938 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4939 ::fidl_next::munge! {
4940 let crate::wire::DirectoryGetTokenResponse {
4941 s,
4942 token,
4943
4944 } = out_;
4945 }
4946
4947 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4948
4949 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
4950
4951 Ok(())
4952 }
4953 }
4954
4955 pub struct DirectoryLinkRequest<T0, T1, T2> {
4957 pub src: T0,
4958
4959 pub dst_parent_token: T1,
4960
4961 pub dst: T2,
4962 }
4963
4964 unsafe impl<___E, T0, T1, T2>
4965 ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
4966 for DirectoryLinkRequest<T0, T1, T2>
4967 where
4968 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4969 ___E: ::fidl_next::Encoder,
4970 ___E: ::fdomain_client::fidl_next::HandleEncoder,
4971 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4972 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
4973 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4974 {
4975 #[inline]
4976 fn encode(
4977 self,
4978 encoder_: &mut ___E,
4979 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
4980 _: (),
4981 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4982 ::fidl_next::munge! {
4983 let crate::wire::DirectoryLinkRequest {
4984 src,
4985 dst_parent_token,
4986 dst,
4987
4988 } = out_;
4989 }
4990
4991 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
4992
4993 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
4994
4995 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
4996
4997 Ok(())
4998 }
4999 }
5000
5001 pub struct DirectoryRenameRequest<T0, T1, T2> {
5003 pub src: T0,
5004
5005 pub dst_parent_token: T1,
5006
5007 pub dst: T2,
5008 }
5009
5010 unsafe impl<___E, T0, T1, T2>
5011 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
5012 for DirectoryRenameRequest<T0, T1, T2>
5013 where
5014 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5015 ___E: ::fidl_next::Encoder,
5016 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5017 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5018 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5019 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5020 {
5021 #[inline]
5022 fn encode(
5023 self,
5024 encoder_: &mut ___E,
5025 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
5026 _: (),
5027 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5028 ::fidl_next::munge! {
5029 let crate::wire::DirectoryRenameRequest {
5030 src,
5031 dst_parent_token,
5032 dst,
5033
5034 } = out_;
5035 }
5036
5037 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5038
5039 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5040
5041 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5042
5043 Ok(())
5044 }
5045 }
5046
5047 pub struct DirectoryWatchRequest<T0, T1, T2> {
5049 pub mask: T0,
5050
5051 pub options: T1,
5052
5053 pub watcher: T2,
5054 }
5055
5056 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
5057 for DirectoryWatchRequest<T0, T1, T2>
5058 where
5059 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5060 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5061 T0: ::fidl_next::Encode<crate::wire::WatchMask, ___E>,
5062 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5063 T2: ::fidl_next::Encode<
5064 ::fidl_next::ServerEnd<
5065 crate::DirectoryWatcher,
5066 ::fdomain_client::fidl_next::wire::Handle,
5067 >,
5068 ___E,
5069 >,
5070 {
5071 #[inline]
5072 fn encode(
5073 self,
5074 encoder_: &mut ___E,
5075 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
5076 _: (),
5077 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5078 ::fidl_next::munge! {
5079 let crate::wire::DirectoryWatchRequest {
5080 mask,
5081 options,
5082 watcher,
5083
5084 } = out_;
5085 }
5086
5087 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
5088
5089 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5090
5091 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
5092
5093 Ok(())
5094 }
5095 }
5096
5097 pub struct NodeOnOpenRequest<T0, T1> {
5099 pub s: T0,
5100
5101 pub info: T1,
5102 }
5103
5104 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
5105 for NodeOnOpenRequest<T0, T1>
5106 where
5107 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5108 ___E: ::fidl_next::Encoder,
5109 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5110 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5111 T1: ::fidl_next::Encode<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>,
5112 {
5113 #[inline]
5114 fn encode(
5115 self,
5116 encoder_: &mut ___E,
5117 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
5118 _: (),
5119 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5120 ::fidl_next::munge! {
5121 let crate::wire::NodeOnOpenRequest {
5122 s,
5123 info,
5124
5125 } = out_;
5126 }
5127
5128 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5129
5130 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
5131
5132 Ok(())
5133 }
5134 }
5135
5136 pub struct NodeListExtendedAttributesRequest<T0> {
5138 pub iterator: T0,
5139 }
5140
5141 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
5142 for NodeListExtendedAttributesRequest<T0>
5143 where
5144 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5145 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5146 T0: ::fidl_next::Encode<
5147 ::fidl_next::ServerEnd<
5148 crate::ExtendedAttributeIterator,
5149 ::fdomain_client::fidl_next::wire::Handle,
5150 >,
5151 ___E,
5152 >,
5153 {
5154 #[inline]
5155 fn encode(
5156 self,
5157 encoder_: &mut ___E,
5158 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
5159 _: (),
5160 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5161 ::fidl_next::munge! {
5162 let crate::wire::NodeListExtendedAttributesRequest {
5163 iterator,
5164
5165 } = out_;
5166 }
5167
5168 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
5169
5170 Ok(())
5171 }
5172 }
5173
5174 pub struct NodeSetExtendedAttributeRequest<T0, T1, T2> {
5176 pub name: T0,
5177
5178 pub value: T1,
5179
5180 pub mode: T2,
5181 }
5182
5183 unsafe impl<___E, T0, T1, T2>
5184 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
5185 for NodeSetExtendedAttributeRequest<T0, T1, T2>
5186 where
5187 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5188 ___E: ::fidl_next::Encoder,
5189 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5190 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5191 T1: ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
5192 T2: ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>,
5193 {
5194 #[inline]
5195 fn encode(
5196 self,
5197 encoder_: &mut ___E,
5198 out_: &mut ::core::mem::MaybeUninit<
5199 crate::wire::NodeSetExtendedAttributeRequest<'static>,
5200 >,
5201 _: (),
5202 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5203 ::fidl_next::munge! {
5204 let crate::wire::NodeSetExtendedAttributeRequest {
5205 name,
5206 value,
5207 mode,
5208
5209 } = out_;
5210 }
5211
5212 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
5213
5214 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
5215
5216 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5217
5218 Ok(())
5219 }
5220 }
5221
5222 pub struct DirectoryOpenRequest<T0, T1, T2, T3> {
5224 pub path: T0,
5225
5226 pub flags: T1,
5227
5228 pub options: T2,
5229
5230 pub object: T3,
5231 }
5232
5233 unsafe impl<___E, T0, T1, T2, T3>
5234 ::fidl_next::Encode<crate::wire::DirectoryOpenRequest<'static>, ___E>
5235 for DirectoryOpenRequest<T0, T1, T2, T3>
5236 where
5237 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5238 ___E: ::fidl_next::Encoder,
5239 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5240 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5241 T1: ::fidl_next::Encode<crate::wire::Flags, ___E>,
5242 T2: ::fidl_next::Encode<crate::wire::Options<'static>, ___E>,
5243 T3: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5244 {
5245 #[inline]
5246 fn encode(
5247 self,
5248 encoder_: &mut ___E,
5249 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryOpenRequest<'static>>,
5250 _: (),
5251 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5252 ::fidl_next::munge! {
5253 let crate::wire::DirectoryOpenRequest {
5254 path,
5255 flags,
5256 options,
5257 object,
5258
5259 } = out_;
5260 }
5261
5262 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5263
5264 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5265
5266 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5267
5268 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5269
5270 Ok(())
5271 }
5272 }
5273
5274 pub struct NodeDeprecatedCloneRequest<T0, T1> {
5276 pub flags: T0,
5277
5278 pub object: T1,
5279 }
5280
5281 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
5282 for NodeDeprecatedCloneRequest<T0, T1>
5283 where
5284 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5285 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5286 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5287 T1: ::fidl_next::Encode<
5288 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
5289 ___E,
5290 >,
5291 {
5292 #[inline]
5293 fn encode(
5294 self,
5295 encoder_: &mut ___E,
5296 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
5297 _: (),
5298 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5299 ::fidl_next::munge! {
5300 let crate::wire::NodeDeprecatedCloneRequest {
5301 flags,
5302 object,
5303
5304 } = out_;
5305 }
5306
5307 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5308
5309 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5310
5311 Ok(())
5312 }
5313 }
5314
5315 pub struct DirectoryDeprecatedOpenRequest<T0, T1, T2, T3> {
5317 pub flags: T0,
5318
5319 pub mode: T1,
5320
5321 pub path: T2,
5322
5323 pub object: T3,
5324 }
5325
5326 unsafe impl<___E, T0, T1, T2, T3>
5327 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
5328 for DirectoryDeprecatedOpenRequest<T0, T1, T2, T3>
5329 where
5330 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5331 ___E: ::fidl_next::Encoder,
5332 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5333 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5334 T1: ::fidl_next::Encode<crate::wire::ModeType, ___E>,
5335 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5336 T3: ::fidl_next::Encode<
5337 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
5338 ___E,
5339 >,
5340 {
5341 #[inline]
5342 fn encode(
5343 self,
5344 encoder_: &mut ___E,
5345 out_: &mut ::core::mem::MaybeUninit<
5346 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
5347 >,
5348 _: (),
5349 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5350 ::fidl_next::munge! {
5351 let crate::wire::DirectoryDeprecatedOpenRequest {
5352 flags,
5353 mode,
5354 path,
5355 object,
5356
5357 } = out_;
5358 }
5359
5360 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5361
5362 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5363
5364 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5365
5366 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5367
5368 Ok(())
5369 }
5370 }
5371
5372 pub struct DirectoryCreateSymlinkRequest<T0, T1, T2> {
5374 pub name: T0,
5375
5376 pub target: T1,
5377
5378 pub connection: T2,
5379 }
5380
5381 unsafe impl<___E, T0, T1, T2>
5382 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
5383 for DirectoryCreateSymlinkRequest<T0, T1, T2>
5384 where
5385 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5386 ___E: ::fidl_next::Encoder,
5387 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5388 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5389 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5390 T2: ::fidl_next::Encode<
5391 ::fidl_next::ServerEnd<
5392 crate::Symlink,
5393 ::fdomain_client::fidl_next::wire::OptionalHandle,
5394 >,
5395 ___E,
5396 >,
5397 {
5398 #[inline]
5399 fn encode(
5400 self,
5401 encoder_: &mut ___E,
5402 out_: &mut ::core::mem::MaybeUninit<
5403 crate::wire::DirectoryCreateSymlinkRequest<'static>,
5404 >,
5405 _: (),
5406 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5407 ::fidl_next::munge! {
5408 let crate::wire::DirectoryCreateSymlinkRequest {
5409 name,
5410 target,
5411 connection,
5412
5413 } = out_;
5414 }
5415
5416 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
5417
5418 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
5419
5420 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
5421
5422 Ok(())
5423 }
5424 }
5425
5426 pub struct FileGetBackingMemoryResponse<T0> {
5428 pub vmo: T0,
5429 }
5430
5431 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
5432 for FileGetBackingMemoryResponse<T0>
5433 where
5434 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5435 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5436 T0: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5437 {
5438 #[inline]
5439 fn encode(
5440 self,
5441 encoder_: &mut ___E,
5442 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
5443 _: (),
5444 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5445 ::fidl_next::munge! {
5446 let crate::wire::FileGetBackingMemoryResponse {
5447 vmo,
5448
5449 } = out_;
5450 }
5451
5452 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
5453
5454 Ok(())
5455 }
5456 }
5457
5458 pub struct LinkableLinkIntoRequest<T0, T1> {
5460 pub dst_parent_token: T0,
5461
5462 pub dst: T1,
5463 }
5464
5465 unsafe impl<___E, T0, T1>
5466 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
5467 for LinkableLinkIntoRequest<T0, T1>
5468 where
5469 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5470 ___E: ::fidl_next::Encoder,
5471 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5472 T0: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5473 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5474 {
5475 #[inline]
5476 fn encode(
5477 self,
5478 encoder_: &mut ___E,
5479 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
5480 _: (),
5481 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5482 ::fidl_next::munge! {
5483 let crate::wire::LinkableLinkIntoRequest {
5484 dst_parent_token,
5485 dst,
5486
5487 } = out_;
5488 }
5489
5490 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5491
5492 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5493
5494 Ok(())
5495 }
5496 }
5497
5498 pub struct FileAllocateRequest<T0, T1, T2> {
5500 pub offset: T0,
5501
5502 pub length: T1,
5503
5504 pub mode: T2,
5505 }
5506
5507 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
5508 for FileAllocateRequest<T0, T1, T2>
5509 where
5510 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5511 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5512 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5513 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5514 T2: ::fidl_next::Encode<crate::wire::AllocateMode, ___E>,
5515 {
5516 #[inline]
5517 fn encode(
5518 self,
5519 encoder_: &mut ___E,
5520 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
5521 _: (),
5522 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5523 ::fidl_next::munge! {
5524 let crate::wire::FileAllocateRequest {
5525 offset,
5526 length,
5527 mode,
5528
5529 } = out_;
5530 }
5531
5532 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
5533
5534 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
5535
5536 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5537
5538 Ok(())
5539 }
5540 }
5541
5542 pub struct FileEnableVerityRequest<T0> {
5544 pub options: T0,
5545 }
5546
5547 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
5548 for FileEnableVerityRequest<T0>
5549 where
5550 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5551 ___E: ::fidl_next::Encoder,
5552 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5553 T0: ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>,
5554 {
5555 #[inline]
5556 fn encode(
5557 self,
5558 encoder_: &mut ___E,
5559 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
5560 _: (),
5561 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5562 ::fidl_next::munge! {
5563 let crate::wire::FileEnableVerityRequest {
5564 options,
5565
5566 } = out_;
5567 }
5568
5569 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5570
5571 Ok(())
5572 }
5573 }
5574
5575 pub struct FileObject<T0, T1> {
5577 pub event: T0,
5578
5579 pub stream: T1,
5580 }
5581
5582 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject<T0, T1>
5583 where
5584 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5585 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5586 T0: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::OptionalHandle, ___E>,
5587 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::OptionalHandle, ___E>,
5588 {
5589 #[inline]
5590 fn encode(
5591 self,
5592 encoder_: &mut ___E,
5593 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
5594 _: (),
5595 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5596 ::fidl_next::munge! {
5597 let crate::wire::FileObject {
5598 event,
5599 stream,
5600
5601 } = out_;
5602 }
5603
5604 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
5605
5606 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
5607
5608 Ok(())
5609 }
5610 }
5611}
5612
5613pub use self::natural::*;
5614
5615#[doc = " Node defines the minimal interface for entities which can be accessed in a filesystem.\n"]
5617#[derive(PartialEq, Debug)]
5618pub struct Node;
5619
5620impl ::fidl_next::Discoverable for Node {
5621 const PROTOCOL_NAME: &'static str = "fuchsia.io.Node";
5622}
5623
5624#[cfg(target_os = "fuchsia")]
5625impl ::fidl_next::HasTransport for Node {
5626 type Transport = ::fdomain_client::Channel;
5627}
5628
5629pub mod node {
5630 pub mod prelude {
5631 pub use crate::{
5632 Node, NodeClientHandler, NodeLocalClientHandler, NodeLocalServerHandler,
5633 NodeServerHandler, node,
5634 };
5635
5636 pub use crate::natural::ExtendedAttributeValue;
5637
5638 pub use crate::natural::MutableNodeAttributes;
5639
5640 pub use crate::natural::NodeAttributes2;
5641
5642 pub use crate::natural::NodeDeprecatedCloneRequest;
5643
5644 pub use crate::natural::NodeDeprecatedGetAttrResponse;
5645
5646 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
5647
5648 pub use crate::natural::NodeDeprecatedSetAttrRequest;
5649
5650 pub use crate::natural::NodeDeprecatedSetAttrResponse;
5651
5652 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
5653
5654 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
5655
5656 pub use crate::natural::NodeGetAttributesRequest;
5657
5658 pub use crate::natural::NodeGetExtendedAttributeRequest;
5659
5660 pub use crate::natural::NodeListExtendedAttributesRequest;
5661
5662 pub use crate::natural::NodeOnOpenRequest;
5663
5664 pub use crate::natural::NodeQueryFilesystemResponse;
5665
5666 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
5667
5668 pub use crate::natural::NodeSetExtendedAttributeRequest;
5669
5670 pub use crate::natural::NodeSetFlagsRequest;
5671
5672 pub use crate::natural::NodeGetFlagsResponse;
5673
5674 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
5675
5676 pub use crate::natural::NodeSetExtendedAttributeResponse;
5677
5678 pub use crate::natural::NodeSetFlagsResponse;
5679
5680 pub use crate::natural::NodeSyncResponse;
5681
5682 pub use crate::natural::NodeUpdateAttributesResponse;
5683
5684 pub use crate::natural::Representation;
5685
5686 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
5687
5688 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
5689
5690 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
5691 }
5692
5693 pub struct Clone;
5694
5695 impl ::fidl_next::Method for Clone {
5696 const ORDINAL: u64 = 2366825959783828089;
5697 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5698 ::fidl_next::protocol::Flexibility::Strict;
5699
5700 type Protocol = crate::Node;
5701
5702 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
5703 }
5704
5705 pub struct Close;
5706
5707 impl ::fidl_next::Method for Close {
5708 const ORDINAL: u64 = 6540867515453498750;
5709 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5710 ::fidl_next::protocol::Flexibility::Strict;
5711
5712 type Protocol = crate::Node;
5713
5714 type Request = ::fidl_next::wire::EmptyMessageBody;
5715 }
5716
5717 impl ::fidl_next::TwoWayMethod for Close {
5718 type Response = ::fidl_next::wire::Result<
5719 'static,
5720 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
5721 ::fidl_next::wire::Int32,
5722 >;
5723 }
5724
5725 impl<___R> ::fidl_next::Respond<___R> for Close {
5726 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
5727
5728 fn respond(response: ___R) -> Self::Output {
5729 ::core::result::Result::Ok(response)
5730 }
5731 }
5732
5733 impl<___R> ::fidl_next::RespondErr<___R> for Close {
5734 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
5735
5736 fn respond_err(response: ___R) -> Self::Output {
5737 ::core::result::Result::Err(response)
5738 }
5739 }
5740
5741 pub struct Query;
5742
5743 impl ::fidl_next::Method for Query {
5744 const ORDINAL: u64 = 2763219980499352582;
5745 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5746 ::fidl_next::protocol::Flexibility::Strict;
5747
5748 type Protocol = crate::Node;
5749
5750 type Request = ::fidl_next::wire::EmptyMessageBody;
5751 }
5752
5753 impl ::fidl_next::TwoWayMethod for Query {
5754 type Response = ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
5755 }
5756
5757 impl<___R> ::fidl_next::Respond<___R> for Query {
5758 type Output = ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
5759
5760 fn respond(response: ___R) -> Self::Output {
5761 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
5762 }
5763 }
5764
5765 pub struct DeprecatedClone;
5766
5767 impl ::fidl_next::Method for DeprecatedClone {
5768 const ORDINAL: u64 = 6512600400724287855;
5769 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5770 ::fidl_next::protocol::Flexibility::Flexible;
5771
5772 type Protocol = crate::Node;
5773
5774 type Request = crate::wire::NodeDeprecatedCloneRequest;
5775 }
5776
5777 pub struct OnOpen;
5778
5779 impl ::fidl_next::Method for OnOpen {
5780 const ORDINAL: u64 = 9207534335756671346;
5781 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5782 ::fidl_next::protocol::Flexibility::Flexible;
5783
5784 type Protocol = crate::Node;
5785
5786 type Request = crate::wire::NodeOnOpenRequest<'static>;
5787 }
5788
5789 pub struct DeprecatedGetAttr;
5790
5791 impl ::fidl_next::Method for DeprecatedGetAttr {
5792 const ORDINAL: u64 = 8689798978500614909;
5793 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5794 ::fidl_next::protocol::Flexibility::Strict;
5795
5796 type Protocol = crate::Node;
5797
5798 type Request = ::fidl_next::wire::EmptyMessageBody;
5799 }
5800
5801 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
5802 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
5803 }
5804
5805 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
5806 type Output = ___R;
5807
5808 fn respond(response: ___R) -> Self::Output {
5809 response
5810 }
5811 }
5812
5813 pub struct DeprecatedSetAttr;
5814
5815 impl ::fidl_next::Method for DeprecatedSetAttr {
5816 const ORDINAL: u64 = 4721673413776871238;
5817 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5818 ::fidl_next::protocol::Flexibility::Strict;
5819
5820 type Protocol = crate::Node;
5821
5822 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
5823 }
5824
5825 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
5826 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
5827 }
5828
5829 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
5830 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
5831
5832 fn respond(response: ___R) -> Self::Output {
5833 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
5834 }
5835 }
5836
5837 pub struct DeprecatedGetFlags;
5838
5839 impl ::fidl_next::Method for DeprecatedGetFlags {
5840 const ORDINAL: u64 = 6595803110182632097;
5841 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5842 ::fidl_next::protocol::Flexibility::Strict;
5843
5844 type Protocol = crate::Node;
5845
5846 type Request = ::fidl_next::wire::EmptyMessageBody;
5847 }
5848
5849 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
5850 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
5851 }
5852
5853 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
5854 type Output = ___R;
5855
5856 fn respond(response: ___R) -> Self::Output {
5857 response
5858 }
5859 }
5860
5861 pub struct DeprecatedSetFlags;
5862
5863 impl ::fidl_next::Method for DeprecatedSetFlags {
5864 const ORDINAL: u64 = 5950864159036794675;
5865 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5866 ::fidl_next::protocol::Flexibility::Strict;
5867
5868 type Protocol = crate::Node;
5869
5870 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
5871 }
5872
5873 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
5874 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
5875 }
5876
5877 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
5878 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
5879
5880 fn respond(response: ___R) -> Self::Output {
5881 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
5882 }
5883 }
5884
5885 pub struct GetFlags;
5886
5887 impl ::fidl_next::Method for GetFlags {
5888 const ORDINAL: u64 = 105530239381466147;
5889 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5890 ::fidl_next::protocol::Flexibility::Flexible;
5891
5892 type Protocol = crate::Node;
5893
5894 type Request = ::fidl_next::wire::EmptyMessageBody;
5895 }
5896
5897 impl ::fidl_next::TwoWayMethod for GetFlags {
5898 type Response = ::fidl_next::wire::FlexibleResult<
5899 'static,
5900 crate::wire::NodeGetFlagsResponse,
5901 ::fidl_next::wire::Int32,
5902 >;
5903 }
5904
5905 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
5906 type Output = ::fidl_next::FlexibleResult<
5907 crate::generic::NodeGetFlagsResponse<___R>,
5908 ::fidl_next::util::Never,
5909 >;
5910
5911 fn respond(response: ___R) -> Self::Output {
5912 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
5913 flags: response,
5914 })
5915 }
5916 }
5917
5918 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
5919 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
5920
5921 fn respond_err(response: ___R) -> Self::Output {
5922 ::fidl_next::FlexibleResult::Err(response)
5923 }
5924 }
5925
5926 pub struct SetFlags;
5927
5928 impl ::fidl_next::Method for SetFlags {
5929 const ORDINAL: u64 = 6172186066099445416;
5930 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5931 ::fidl_next::protocol::Flexibility::Flexible;
5932
5933 type Protocol = crate::Node;
5934
5935 type Request = crate::wire::NodeSetFlagsRequest;
5936 }
5937
5938 impl ::fidl_next::TwoWayMethod for SetFlags {
5939 type Response = ::fidl_next::wire::FlexibleResult<
5940 'static,
5941 crate::wire::NodeSetFlagsResponse,
5942 ::fidl_next::wire::Int32,
5943 >;
5944 }
5945
5946 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
5947 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
5948
5949 fn respond(response: ___R) -> Self::Output {
5950 ::fidl_next::FlexibleResult::Ok(response)
5951 }
5952 }
5953
5954 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
5955 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
5956
5957 fn respond_err(response: ___R) -> Self::Output {
5958 ::fidl_next::FlexibleResult::Err(response)
5959 }
5960 }
5961
5962 pub struct QueryFilesystem;
5963
5964 impl ::fidl_next::Method for QueryFilesystem {
5965 const ORDINAL: u64 = 8013111122914313744;
5966 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5967 ::fidl_next::protocol::Flexibility::Strict;
5968
5969 type Protocol = crate::Node;
5970
5971 type Request = ::fidl_next::wire::EmptyMessageBody;
5972 }
5973
5974 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
5975 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
5976 }
5977
5978 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
5979 type Output = ___R;
5980
5981 fn respond(response: ___R) -> Self::Output {
5982 response
5983 }
5984 }
5985
5986 pub struct OnRepresentation;
5987
5988 impl ::fidl_next::Method for OnRepresentation {
5989 const ORDINAL: u64 = 6679970090861613324;
5990 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5991 ::fidl_next::protocol::Flexibility::Strict;
5992
5993 type Protocol = crate::Node;
5994
5995 type Request = crate::wire::Representation<'static>;
5996 }
5997
5998 pub struct GetAttributes;
5999
6000 impl ::fidl_next::Method for GetAttributes {
6001 const ORDINAL: u64 = 4414537700416816443;
6002 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6003 ::fidl_next::protocol::Flexibility::Strict;
6004
6005 type Protocol = crate::Node;
6006
6007 type Request = crate::wire::NodeGetAttributesRequest;
6008 }
6009
6010 impl ::fidl_next::TwoWayMethod for GetAttributes {
6011 type Response = ::fidl_next::wire::Result<
6012 'static,
6013 crate::wire::NodeAttributes2<'static>,
6014 ::fidl_next::wire::Int32,
6015 >;
6016 }
6017
6018 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
6019 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6020
6021 fn respond(response: ___R) -> Self::Output {
6022 ::core::result::Result::Ok(response)
6023 }
6024 }
6025
6026 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
6027 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6028
6029 fn respond_err(response: ___R) -> Self::Output {
6030 ::core::result::Result::Err(response)
6031 }
6032 }
6033
6034 pub struct UpdateAttributes;
6035
6036 impl ::fidl_next::Method for UpdateAttributes {
6037 const ORDINAL: u64 = 3677402239314018056;
6038 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6039 ::fidl_next::protocol::Flexibility::Strict;
6040
6041 type Protocol = crate::Node;
6042
6043 type Request = crate::wire::MutableNodeAttributes<'static>;
6044 }
6045
6046 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
6047 type Response = ::fidl_next::wire::Result<
6048 'static,
6049 crate::wire::NodeUpdateAttributesResponse,
6050 ::fidl_next::wire::Int32,
6051 >;
6052 }
6053
6054 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
6055 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6056
6057 fn respond(response: ___R) -> Self::Output {
6058 ::core::result::Result::Ok(response)
6059 }
6060 }
6061
6062 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
6063 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6064
6065 fn respond_err(response: ___R) -> Self::Output {
6066 ::core::result::Result::Err(response)
6067 }
6068 }
6069
6070 pub struct Sync;
6071
6072 impl ::fidl_next::Method for Sync {
6073 const ORDINAL: u64 = 3196473584242777161;
6074 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6075 ::fidl_next::protocol::Flexibility::Strict;
6076
6077 type Protocol = crate::Node;
6078
6079 type Request = ::fidl_next::wire::EmptyMessageBody;
6080 }
6081
6082 impl ::fidl_next::TwoWayMethod for Sync {
6083 type Response = ::fidl_next::wire::Result<
6084 'static,
6085 crate::wire::NodeSyncResponse,
6086 ::fidl_next::wire::Int32,
6087 >;
6088 }
6089
6090 impl<___R> ::fidl_next::Respond<___R> for Sync {
6091 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6092
6093 fn respond(response: ___R) -> Self::Output {
6094 ::core::result::Result::Ok(response)
6095 }
6096 }
6097
6098 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
6099 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6100
6101 fn respond_err(response: ___R) -> Self::Output {
6102 ::core::result::Result::Err(response)
6103 }
6104 }
6105
6106 pub struct ListExtendedAttributes;
6107
6108 impl ::fidl_next::Method for ListExtendedAttributes {
6109 const ORDINAL: u64 = 5431626189872037072;
6110 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6111 ::fidl_next::protocol::Flexibility::Strict;
6112
6113 type Protocol = crate::Node;
6114
6115 type Request = crate::wire::NodeListExtendedAttributesRequest;
6116 }
6117
6118 pub struct GetExtendedAttribute;
6119
6120 impl ::fidl_next::Method for GetExtendedAttribute {
6121 const ORDINAL: u64 = 5043930208506967771;
6122 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6123 ::fidl_next::protocol::Flexibility::Strict;
6124
6125 type Protocol = crate::Node;
6126
6127 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
6128 }
6129
6130 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
6131 type Response = ::fidl_next::wire::Result<
6132 'static,
6133 crate::wire::ExtendedAttributeValue<'static>,
6134 ::fidl_next::wire::Int32,
6135 >;
6136 }
6137
6138 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
6139 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6140
6141 fn respond(response: ___R) -> Self::Output {
6142 ::core::result::Result::Ok(response)
6143 }
6144 }
6145
6146 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
6147 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6148
6149 fn respond_err(response: ___R) -> Self::Output {
6150 ::core::result::Result::Err(response)
6151 }
6152 }
6153
6154 pub struct SetExtendedAttribute;
6155
6156 impl ::fidl_next::Method for SetExtendedAttribute {
6157 const ORDINAL: u64 = 5374223046099989052;
6158 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6159 ::fidl_next::protocol::Flexibility::Strict;
6160
6161 type Protocol = crate::Node;
6162
6163 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
6164 }
6165
6166 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
6167 type Response = ::fidl_next::wire::Result<
6168 'static,
6169 crate::wire::NodeSetExtendedAttributeResponse,
6170 ::fidl_next::wire::Int32,
6171 >;
6172 }
6173
6174 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
6175 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6176
6177 fn respond(response: ___R) -> Self::Output {
6178 ::core::result::Result::Ok(response)
6179 }
6180 }
6181
6182 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
6183 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6184
6185 fn respond_err(response: ___R) -> Self::Output {
6186 ::core::result::Result::Err(response)
6187 }
6188 }
6189
6190 pub struct RemoveExtendedAttribute;
6191
6192 impl ::fidl_next::Method for RemoveExtendedAttribute {
6193 const ORDINAL: u64 = 8794297771444732717;
6194 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6195 ::fidl_next::protocol::Flexibility::Strict;
6196
6197 type Protocol = crate::Node;
6198
6199 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
6200 }
6201
6202 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
6203 type Response = ::fidl_next::wire::Result<
6204 'static,
6205 crate::wire::NodeRemoveExtendedAttributeResponse,
6206 ::fidl_next::wire::Int32,
6207 >;
6208 }
6209
6210 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
6211 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6212
6213 fn respond(response: ___R) -> Self::Output {
6214 ::core::result::Result::Ok(response)
6215 }
6216 }
6217
6218 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
6219 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6220
6221 fn respond_err(response: ___R) -> Self::Output {
6222 ::core::result::Result::Err(response)
6223 }
6224 }
6225
6226 mod ___detail {
6227 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
6228 where
6229 ___T: ::fidl_next::Transport,
6230 {
6231 type Client = NodeClient<___T>;
6232 type Server = NodeServer<___T>;
6233 }
6234
6235 #[repr(transparent)]
6237 pub struct NodeClient<___T: ::fidl_next::Transport> {
6238 #[allow(dead_code)]
6239 client: ::fidl_next::protocol::Client<___T>,
6240 }
6241
6242 impl<___T> NodeClient<___T>
6243 where
6244 ___T: ::fidl_next::Transport,
6245 {
6246 pub fn clone(
6247 &self,
6248
6249 request: impl ::fidl_next::Encode<
6250 ::fidl_next::ServerEnd<
6251 ::fdomain_next_fuchsia_unknown::Cloneable,
6252 ::fdomain_client::fidl_next::wire::Handle,
6253 >,
6254 <___T as ::fidl_next::Transport>::SendBuffer,
6255 >,
6256 ) -> ::fidl_next::SendFuture<'_, ___T>
6257 where
6258 <___T as ::fidl_next::Transport>::SendBuffer:
6259 ::fidl_next::encoder::InternalHandleEncoder,
6260 <___T as ::fidl_next::Transport>::SendBuffer:
6261 ::fdomain_client::fidl_next::HandleEncoder,
6262 {
6263 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
6264 request,
6265 })
6266 }
6267
6268 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6269 where
6270 ___R: ::fidl_next::Encode<
6271 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
6272 <___T as ::fidl_next::Transport>::SendBuffer,
6273 >,
6274 {
6275 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6276 2366825959783828089,
6277 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
6278 request,
6279 ))
6280 }
6281
6282 #[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"]
6283 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
6284 ::fidl_next::TwoWayFuture::from_untyped(
6285 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6286 6540867515453498750,
6287 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
6288 (),
6289 ),
6290 )
6291 }
6292
6293 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
6294 ::fidl_next::TwoWayFuture::from_untyped(
6295 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6296 2763219980499352582,
6297 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
6298 (),
6299 ),
6300 )
6301 }
6302
6303 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6304 pub fn deprecated_clone(
6305 &self,
6306
6307 flags: impl ::fidl_next::Encode<
6308 crate::wire::OpenFlags,
6309 <___T as ::fidl_next::Transport>::SendBuffer,
6310 >,
6311
6312 object: impl ::fidl_next::Encode<
6313 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
6314 <___T as ::fidl_next::Transport>::SendBuffer,
6315 >,
6316 ) -> ::fidl_next::SendFuture<'_, ___T>
6317 where
6318 <___T as ::fidl_next::Transport>::SendBuffer:
6319 ::fidl_next::encoder::InternalHandleEncoder,
6320 <___T as ::fidl_next::Transport>::SendBuffer:
6321 ::fdomain_client::fidl_next::HandleEncoder,
6322 {
6323 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
6324 flags,
6325
6326 object,
6327 })
6328 }
6329
6330 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6331 pub fn deprecated_clone_with<___R>(
6332 &self,
6333 request: ___R,
6334 ) -> ::fidl_next::SendFuture<'_, ___T>
6335 where
6336 ___R: ::fidl_next::Encode<
6337 crate::wire::NodeDeprecatedCloneRequest,
6338 <___T as ::fidl_next::Transport>::SendBuffer,
6339 >,
6340 {
6341 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6342 6512600400724287855,
6343 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
6344 request,
6345 ))
6346 }
6347
6348 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6349 pub fn deprecated_get_attr(
6350 &self,
6351 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
6352 ::fidl_next::TwoWayFuture::from_untyped(
6353 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6354 8689798978500614909,
6355 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
6356 (),
6357 ),
6358 )
6359 }
6360
6361 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6362 pub fn deprecated_set_attr(
6363 &self,
6364
6365 flags: impl ::fidl_next::Encode<
6366 crate::wire::NodeAttributeFlags,
6367 <___T as ::fidl_next::Transport>::SendBuffer,
6368 >,
6369
6370 attributes: impl ::fidl_next::Encode<
6371 crate::wire::NodeAttributes,
6372 <___T as ::fidl_next::Transport>::SendBuffer,
6373 >,
6374 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6375 where
6376 <___T as ::fidl_next::Transport>::SendBuffer:
6377 ::fidl_next::encoder::InternalHandleEncoder,
6378 {
6379 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
6380 flags,
6381
6382 attributes,
6383 })
6384 }
6385
6386 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6387 pub fn deprecated_set_attr_with<___R>(
6388 &self,
6389 request: ___R,
6390 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6391 where
6392 ___R: ::fidl_next::Encode<
6393 crate::wire::NodeDeprecatedSetAttrRequest,
6394 <___T as ::fidl_next::Transport>::SendBuffer,
6395 >,
6396 {
6397 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6398 4721673413776871238,
6399 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
6400 request,
6401 ))
6402 }
6403
6404 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6405 pub fn deprecated_get_flags(
6406 &self,
6407 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
6408 ::fidl_next::TwoWayFuture::from_untyped(
6409 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6410 6595803110182632097,
6411 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
6412 (),
6413 ),
6414 )
6415 }
6416
6417 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6418 pub fn deprecated_set_flags(
6419 &self,
6420
6421 flags: impl ::fidl_next::Encode<
6422 crate::wire::OpenFlags,
6423 <___T as ::fidl_next::Transport>::SendBuffer,
6424 >,
6425 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6426 where
6427 <___T as ::fidl_next::Transport>::SendBuffer:
6428 ::fidl_next::encoder::InternalHandleEncoder,
6429 {
6430 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
6431 flags,
6432 })
6433 }
6434
6435 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6436 pub fn deprecated_set_flags_with<___R>(
6437 &self,
6438 request: ___R,
6439 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6440 where
6441 ___R: ::fidl_next::Encode<
6442 crate::wire::NodeDeprecatedSetFlagsRequest,
6443 <___T as ::fidl_next::Transport>::SendBuffer,
6444 >,
6445 {
6446 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6447 5950864159036794675,
6448 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
6449 request,
6450 ))
6451 }
6452
6453 #[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"]
6454 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
6455 ::fidl_next::TwoWayFuture::from_untyped(
6456 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6457 105530239381466147,
6458 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
6459 (),
6460 ),
6461 )
6462 }
6463
6464 #[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"]
6465 pub fn set_flags(
6466 &self,
6467
6468 flags: impl ::fidl_next::Encode<
6469 crate::wire::Flags,
6470 <___T as ::fidl_next::Transport>::SendBuffer,
6471 >,
6472 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6473 where
6474 <___T as ::fidl_next::Transport>::SendBuffer:
6475 ::fidl_next::encoder::InternalHandleEncoder,
6476 {
6477 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
6478 }
6479
6480 #[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"]
6481 pub fn set_flags_with<___R>(
6482 &self,
6483 request: ___R,
6484 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6485 where
6486 ___R: ::fidl_next::Encode<
6487 crate::wire::NodeSetFlagsRequest,
6488 <___T as ::fidl_next::Transport>::SendBuffer,
6489 >,
6490 {
6491 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6492 6172186066099445416,
6493 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
6494 request,
6495 ))
6496 }
6497
6498 #[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"]
6499 pub fn query_filesystem(
6500 &self,
6501 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
6502 ::fidl_next::TwoWayFuture::from_untyped(
6503 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6504 8013111122914313744,
6505 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
6506 (),
6507 ),
6508 )
6509 }
6510
6511 #[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"]
6512 pub fn get_attributes(
6513 &self,
6514
6515 query: impl ::fidl_next::Encode<
6516 crate::wire::NodeAttributesQuery,
6517 <___T as ::fidl_next::Transport>::SendBuffer,
6518 >,
6519 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6520 where
6521 <___T as ::fidl_next::Transport>::SendBuffer:
6522 ::fidl_next::encoder::InternalHandleEncoder,
6523 {
6524 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
6525 }
6526
6527 #[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"]
6528 pub fn get_attributes_with<___R>(
6529 &self,
6530 request: ___R,
6531 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6532 where
6533 ___R: ::fidl_next::Encode<
6534 crate::wire::NodeGetAttributesRequest,
6535 <___T as ::fidl_next::Transport>::SendBuffer,
6536 >,
6537 {
6538 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6539 4414537700416816443,
6540 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
6541 request,
6542 ))
6543 }
6544
6545 #[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"]
6546 pub fn update_attributes_with<___R>(
6547 &self,
6548 request: ___R,
6549 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
6550 where
6551 ___R: ::fidl_next::Encode<
6552 crate::wire::MutableNodeAttributes<'static>,
6553 <___T as ::fidl_next::Transport>::SendBuffer,
6554 >,
6555 {
6556 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6557 3677402239314018056,
6558 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
6559 request,
6560 ))
6561 }
6562
6563 #[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"]
6564 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
6565 ::fidl_next::TwoWayFuture::from_untyped(
6566 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6567 3196473584242777161,
6568 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
6569 (),
6570 ),
6571 )
6572 }
6573
6574 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
6575 pub fn list_extended_attributes(
6576 &self,
6577
6578 iterator: impl ::fidl_next::Encode<
6579 ::fidl_next::ServerEnd<
6580 crate::ExtendedAttributeIterator,
6581 ::fdomain_client::fidl_next::wire::Handle,
6582 >,
6583 <___T as ::fidl_next::Transport>::SendBuffer,
6584 >,
6585 ) -> ::fidl_next::SendFuture<'_, ___T>
6586 where
6587 <___T as ::fidl_next::Transport>::SendBuffer:
6588 ::fidl_next::encoder::InternalHandleEncoder,
6589 <___T as ::fidl_next::Transport>::SendBuffer:
6590 ::fdomain_client::fidl_next::HandleEncoder,
6591 {
6592 self.list_extended_attributes_with(
6593 crate::generic::NodeListExtendedAttributesRequest { iterator },
6594 )
6595 }
6596
6597 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
6598 pub fn list_extended_attributes_with<___R>(
6599 &self,
6600 request: ___R,
6601 ) -> ::fidl_next::SendFuture<'_, ___T>
6602 where
6603 ___R: ::fidl_next::Encode<
6604 crate::wire::NodeListExtendedAttributesRequest,
6605 <___T as ::fidl_next::Transport>::SendBuffer,
6606 >,
6607 {
6608 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6609 5431626189872037072,
6610 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
6611 request,
6612 ))
6613 }
6614
6615 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
6616 pub fn get_extended_attribute(
6617 &self,
6618
6619 name: impl ::fidl_next::Encode<
6620 ::fidl_next::wire::Vector<'static, u8>,
6621 <___T as ::fidl_next::Transport>::SendBuffer,
6622 >,
6623 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
6624 where
6625 <___T as ::fidl_next::Transport>::SendBuffer:
6626 ::fidl_next::encoder::InternalHandleEncoder,
6627 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6628 {
6629 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
6630 name,
6631 })
6632 }
6633
6634 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
6635 pub fn get_extended_attribute_with<___R>(
6636 &self,
6637 request: ___R,
6638 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
6639 where
6640 ___R: ::fidl_next::Encode<
6641 crate::wire::NodeGetExtendedAttributeRequest<'static>,
6642 <___T as ::fidl_next::Transport>::SendBuffer,
6643 >,
6644 {
6645 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6646 5043930208506967771,
6647 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6648 request,
6649 ))
6650 }
6651
6652 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
6653 pub fn set_extended_attribute(
6654 &self,
6655
6656 name: impl ::fidl_next::Encode<
6657 ::fidl_next::wire::Vector<'static, u8>,
6658 <___T as ::fidl_next::Transport>::SendBuffer,
6659 >,
6660
6661 value: impl ::fidl_next::Encode<
6662 crate::wire::ExtendedAttributeValue<'static>,
6663 <___T as ::fidl_next::Transport>::SendBuffer,
6664 >,
6665
6666 mode: impl ::fidl_next::Encode<
6667 crate::wire::SetExtendedAttributeMode,
6668 <___T as ::fidl_next::Transport>::SendBuffer,
6669 >,
6670 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
6671 where
6672 <___T as ::fidl_next::Transport>::SendBuffer:
6673 ::fidl_next::encoder::InternalHandleEncoder,
6674 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6675 <___T as ::fidl_next::Transport>::SendBuffer:
6676 ::fdomain_client::fidl_next::HandleEncoder,
6677 {
6678 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
6679 name,
6680
6681 value,
6682
6683 mode,
6684 })
6685 }
6686
6687 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
6688 pub fn set_extended_attribute_with<___R>(
6689 &self,
6690 request: ___R,
6691 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
6692 where
6693 ___R: ::fidl_next::Encode<
6694 crate::wire::NodeSetExtendedAttributeRequest<'static>,
6695 <___T as ::fidl_next::Transport>::SendBuffer,
6696 >,
6697 {
6698 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6699 5374223046099989052,
6700 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6701 request,
6702 ))
6703 }
6704
6705 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
6706 pub fn remove_extended_attribute(
6707 &self,
6708
6709 name: impl ::fidl_next::Encode<
6710 ::fidl_next::wire::Vector<'static, u8>,
6711 <___T as ::fidl_next::Transport>::SendBuffer,
6712 >,
6713 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
6714 where
6715 <___T as ::fidl_next::Transport>::SendBuffer:
6716 ::fidl_next::encoder::InternalHandleEncoder,
6717 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6718 {
6719 self.remove_extended_attribute_with(
6720 crate::generic::NodeRemoveExtendedAttributeRequest { name },
6721 )
6722 }
6723
6724 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
6725 pub fn remove_extended_attribute_with<___R>(
6726 &self,
6727 request: ___R,
6728 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
6729 where
6730 ___R: ::fidl_next::Encode<
6731 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
6732 <___T as ::fidl_next::Transport>::SendBuffer,
6733 >,
6734 {
6735 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6736 8794297771444732717,
6737 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6738 request,
6739 ))
6740 }
6741 }
6742
6743 #[repr(transparent)]
6745 pub struct NodeServer<___T: ::fidl_next::Transport> {
6746 server: ::fidl_next::protocol::Server<___T>,
6747 }
6748
6749 impl<___T> NodeServer<___T>
6750 where
6751 ___T: ::fidl_next::Transport,
6752 {
6753 #[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"]
6754 pub fn on_open(
6755 &self,
6756
6757 s: impl ::fidl_next::Encode<
6758 ::fidl_next::wire::Int32,
6759 <___T as ::fidl_next::Transport>::SendBuffer,
6760 >,
6761
6762 info: impl ::fidl_next::Encode<
6763 crate::wire_optional::NodeInfoDeprecated<'static>,
6764 <___T as ::fidl_next::Transport>::SendBuffer,
6765 >,
6766 ) -> ::fidl_next::SendFuture<'_, ___T>
6767 where
6768 <___T as ::fidl_next::Transport>::SendBuffer:
6769 ::fidl_next::encoder::InternalHandleEncoder,
6770 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6771 <___T as ::fidl_next::Transport>::SendBuffer:
6772 ::fdomain_client::fidl_next::HandleEncoder,
6773 {
6774 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
6775 }
6776
6777 #[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"]
6778
6779 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6780 where
6781 ___R: ::fidl_next::Encode<
6782 <super::OnOpen as ::fidl_next::Method>::Request,
6783 <___T as ::fidl_next::Transport>::SendBuffer,
6784 >,
6785 {
6786 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6787 9207534335756671346,
6788 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
6789 request,
6790 ))
6791 }
6792
6793 #[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"]
6794
6795 pub fn on_representation_with<___R>(
6796 &self,
6797 request: ___R,
6798 ) -> ::fidl_next::SendFuture<'_, ___T>
6799 where
6800 ___R: ::fidl_next::Encode<
6801 <super::OnRepresentation as ::fidl_next::Method>::Request,
6802 <___T as ::fidl_next::Transport>::SendBuffer,
6803 >,
6804 {
6805 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6806 6679970090861613324,
6807 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
6808 request,
6809 ))
6810 }
6811 }
6812 }
6813}
6814
6815#[diagnostic::on_unimplemented(
6816 note = "If {Self} implements the non-local NodeClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
6817)]
6818
6819pub trait NodeLocalClientHandler<
6823 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
6824 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6825>
6826{
6827 #[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"]
6828 fn on_open(
6829 &mut self,
6830
6831 request: ::fidl_next::Request<node::OnOpen, ___T>,
6832 ) -> impl ::core::future::Future<Output = ()>;
6833
6834 #[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"]
6835 fn on_representation(
6836 &mut self,
6837
6838 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
6839 ) -> impl ::core::future::Future<Output = ()>;
6840
6841 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6842 ::core::future::ready(())
6843 }
6844}
6845
6846impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Node
6847where
6848 ___H: NodeLocalClientHandler<___T>,
6849 ___T: ::fidl_next::Transport,
6850 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
6851 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6852 Constraint = (),
6853 >,
6854 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
6855 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6856 Constraint = (),
6857 >,
6858{
6859 async fn on_event(
6860 handler: &mut ___H,
6861 ordinal: u64,
6862 flexibility: ::fidl_next::protocol::Flexibility,
6863 body: ::fidl_next::Body<___T>,
6864 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6865 match ordinal {
6866 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
6867 Ok(decoded) => {
6868 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
6869 Ok(())
6870 }
6871 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6872 ordinal: 9207534335756671346,
6873 error,
6874 }),
6875 },
6876
6877 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
6878 Ok(decoded) => {
6879 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
6880 Ok(())
6881 }
6882 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6883 ordinal: 6679970090861613324,
6884 error,
6885 }),
6886 },
6887
6888 ordinal => {
6889 handler.on_unknown_interaction(ordinal).await;
6890 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
6891 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6892 } else {
6893 Ok(())
6894 }
6895 }
6896 }
6897 }
6898}
6899
6900#[diagnostic::on_unimplemented(
6901 note = "If {Self} implements the non-local NodeServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
6902)]
6903
6904pub trait NodeLocalServerHandler<
6908 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
6909 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6910>
6911{
6912 fn clone(
6913 &mut self,
6914
6915 request: ::fidl_next::Request<node::Clone, ___T>,
6916 ) -> impl ::core::future::Future<Output = ()>;
6917
6918 #[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"]
6919 fn close(
6920 &mut self,
6921
6922 responder: ::fidl_next::Responder<node::Close, ___T>,
6923 ) -> impl ::core::future::Future<Output = ()>;
6924
6925 fn query(
6926 &mut self,
6927
6928 responder: ::fidl_next::Responder<node::Query, ___T>,
6929 ) -> impl ::core::future::Future<Output = ()>;
6930
6931 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6932 fn deprecated_clone(
6933 &mut self,
6934
6935 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
6936 ) -> impl ::core::future::Future<Output = ()>;
6937
6938 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6939 fn deprecated_get_attr(
6940 &mut self,
6941
6942 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
6943 ) -> impl ::core::future::Future<Output = ()>;
6944
6945 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6946 fn deprecated_set_attr(
6947 &mut self,
6948
6949 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
6950
6951 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
6952 ) -> impl ::core::future::Future<Output = ()>;
6953
6954 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6955 fn deprecated_get_flags(
6956 &mut self,
6957
6958 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
6959 ) -> impl ::core::future::Future<Output = ()>;
6960
6961 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6962 fn deprecated_set_flags(
6963 &mut self,
6964
6965 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
6966
6967 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
6968 ) -> impl ::core::future::Future<Output = ()>;
6969
6970 #[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"]
6971 fn get_flags(
6972 &mut self,
6973
6974 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
6975 ) -> impl ::core::future::Future<Output = ()>;
6976
6977 #[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"]
6978 fn set_flags(
6979 &mut self,
6980
6981 request: ::fidl_next::Request<node::SetFlags, ___T>,
6982
6983 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
6984 ) -> impl ::core::future::Future<Output = ()>;
6985
6986 #[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"]
6987 fn query_filesystem(
6988 &mut self,
6989
6990 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
6991 ) -> impl ::core::future::Future<Output = ()>;
6992
6993 #[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"]
6994 fn get_attributes(
6995 &mut self,
6996
6997 request: ::fidl_next::Request<node::GetAttributes, ___T>,
6998
6999 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
7000 ) -> impl ::core::future::Future<Output = ()>;
7001
7002 #[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"]
7003 fn update_attributes(
7004 &mut self,
7005
7006 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
7007
7008 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
7009 ) -> impl ::core::future::Future<Output = ()>;
7010
7011 #[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"]
7012 fn sync(
7013 &mut self,
7014
7015 responder: ::fidl_next::Responder<node::Sync, ___T>,
7016 ) -> impl ::core::future::Future<Output = ()>;
7017
7018 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
7019 fn list_extended_attributes(
7020 &mut self,
7021
7022 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
7023 ) -> impl ::core::future::Future<Output = ()>;
7024
7025 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
7026 fn get_extended_attribute(
7027 &mut self,
7028
7029 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
7030
7031 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
7032 ) -> impl ::core::future::Future<Output = ()>;
7033
7034 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
7035 fn set_extended_attribute(
7036 &mut self,
7037
7038 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
7039
7040 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
7041 ) -> impl ::core::future::Future<Output = ()>;
7042
7043 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
7044 fn remove_extended_attribute(
7045 &mut self,
7046
7047 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
7048
7049 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
7050 ) -> impl ::core::future::Future<Output = ()>;
7051
7052 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7053 ::core::future::ready(())
7054 }
7055}
7056
7057impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Node
7058where
7059 ___H: NodeLocalServerHandler<___T>,
7060 ___T: ::fidl_next::Transport,
7061 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
7062 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7063 Constraint = (),
7064 >,
7065 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
7066 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7067 Constraint = (),
7068 >,
7069 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
7070 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7071 Constraint = (),
7072 >,
7073 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
7074 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7075 Constraint = (),
7076 >,
7077 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
7078 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7079 Constraint = (),
7080 >,
7081 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
7082 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7083 Constraint = (),
7084 >,
7085 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
7086 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7087 Constraint = (),
7088 >,
7089 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
7090 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7091 Constraint = (),
7092 >,
7093 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7094 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7095 Constraint = (),
7096 >,
7097 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7098 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7099 Constraint = (),
7100 >,
7101 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7102 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7103 Constraint = (),
7104 >,
7105{
7106 async fn on_one_way(
7107 handler: &mut ___H,
7108 ordinal: u64,
7109 flexibility: ::fidl_next::protocol::Flexibility,
7110 body: ::fidl_next::Body<___T>,
7111 ) -> ::core::result::Result<
7112 (),
7113 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7114 > {
7115 match ordinal {
7116 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7117 Ok(decoded) => {
7118 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
7119 Ok(())
7120 }
7121 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7122 ordinal: 2366825959783828089,
7123 error,
7124 }),
7125 },
7126
7127 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7128 Ok(decoded) => {
7129 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
7130 Ok(())
7131 }
7132 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7133 ordinal: 6512600400724287855,
7134 error,
7135 }),
7136 },
7137
7138 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7139 Ok(decoded) => {
7140 handler
7141 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
7142 .await;
7143 Ok(())
7144 }
7145 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7146 ordinal: 5431626189872037072,
7147 error,
7148 }),
7149 },
7150
7151 ordinal => {
7152 handler.on_unknown_interaction(ordinal).await;
7153 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7154 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7155 } else {
7156 Ok(())
7157 }
7158 }
7159 }
7160 }
7161
7162 async fn on_two_way(
7163 handler: &mut ___H,
7164 ordinal: u64,
7165 flexibility: ::fidl_next::protocol::Flexibility,
7166 body: ::fidl_next::Body<___T>,
7167 responder: ::fidl_next::protocol::Responder<___T>,
7168 ) -> ::core::result::Result<
7169 (),
7170 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7171 > {
7172 match ordinal {
7173 6540867515453498750 => {
7174 let responder = ::fidl_next::Responder::from_untyped(responder);
7175
7176 handler.close(responder).await;
7177 Ok(())
7178 }
7179
7180 2763219980499352582 => {
7181 let responder = ::fidl_next::Responder::from_untyped(responder);
7182
7183 handler.query(responder).await;
7184 Ok(())
7185 }
7186
7187 8689798978500614909 => {
7188 let responder = ::fidl_next::Responder::from_untyped(responder);
7189
7190 handler.deprecated_get_attr(responder).await;
7191 Ok(())
7192 }
7193
7194 4721673413776871238 => {
7195 let responder = ::fidl_next::Responder::from_untyped(responder);
7196
7197 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7198 Ok(decoded) => {
7199 handler
7200 .deprecated_set_attr(
7201 ::fidl_next::Request::from_decoded(decoded),
7202 responder,
7203 )
7204 .await;
7205 Ok(())
7206 }
7207 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7208 ordinal: 4721673413776871238,
7209 error,
7210 }),
7211 }
7212 }
7213
7214 6595803110182632097 => {
7215 let responder = ::fidl_next::Responder::from_untyped(responder);
7216
7217 handler.deprecated_get_flags(responder).await;
7218 Ok(())
7219 }
7220
7221 5950864159036794675 => {
7222 let responder = ::fidl_next::Responder::from_untyped(responder);
7223
7224 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7225 Ok(decoded) => {
7226 handler
7227 .deprecated_set_flags(
7228 ::fidl_next::Request::from_decoded(decoded),
7229 responder,
7230 )
7231 .await;
7232 Ok(())
7233 }
7234 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7235 ordinal: 5950864159036794675,
7236 error,
7237 }),
7238 }
7239 }
7240
7241 105530239381466147 => {
7242 let responder = ::fidl_next::Responder::from_untyped(responder);
7243
7244 handler.get_flags(responder).await;
7245 Ok(())
7246 }
7247
7248 6172186066099445416 => {
7249 let responder = ::fidl_next::Responder::from_untyped(responder);
7250
7251 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7252 Ok(decoded) => {
7253 handler
7254 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
7255 .await;
7256 Ok(())
7257 }
7258 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7259 ordinal: 6172186066099445416,
7260 error,
7261 }),
7262 }
7263 }
7264
7265 8013111122914313744 => {
7266 let responder = ::fidl_next::Responder::from_untyped(responder);
7267
7268 handler.query_filesystem(responder).await;
7269 Ok(())
7270 }
7271
7272 4414537700416816443 => {
7273 let responder = ::fidl_next::Responder::from_untyped(responder);
7274
7275 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7276 Ok(decoded) => {
7277 handler
7278 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
7279 .await;
7280 Ok(())
7281 }
7282 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7283 ordinal: 4414537700416816443,
7284 error,
7285 }),
7286 }
7287 }
7288
7289 3677402239314018056 => {
7290 let responder = ::fidl_next::Responder::from_untyped(responder);
7291
7292 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7293 Ok(decoded) => {
7294 handler
7295 .update_attributes(
7296 ::fidl_next::Request::from_decoded(decoded),
7297 responder,
7298 )
7299 .await;
7300 Ok(())
7301 }
7302 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7303 ordinal: 3677402239314018056,
7304 error,
7305 }),
7306 }
7307 }
7308
7309 3196473584242777161 => {
7310 let responder = ::fidl_next::Responder::from_untyped(responder);
7311
7312 handler.sync(responder).await;
7313 Ok(())
7314 }
7315
7316 5043930208506967771 => {
7317 let responder = ::fidl_next::Responder::from_untyped(responder);
7318
7319 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7320 Ok(decoded) => {
7321 handler
7322 .get_extended_attribute(
7323 ::fidl_next::Request::from_decoded(decoded),
7324 responder,
7325 )
7326 .await;
7327 Ok(())
7328 }
7329 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7330 ordinal: 5043930208506967771,
7331 error,
7332 }),
7333 }
7334 }
7335
7336 5374223046099989052 => {
7337 let responder = ::fidl_next::Responder::from_untyped(responder);
7338
7339 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7340 Ok(decoded) => {
7341 handler
7342 .set_extended_attribute(
7343 ::fidl_next::Request::from_decoded(decoded),
7344 responder,
7345 )
7346 .await;
7347 Ok(())
7348 }
7349 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7350 ordinal: 5374223046099989052,
7351 error,
7352 }),
7353 }
7354 }
7355
7356 8794297771444732717 => {
7357 let responder = ::fidl_next::Responder::from_untyped(responder);
7358
7359 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7360 Ok(decoded) => {
7361 handler
7362 .remove_extended_attribute(
7363 ::fidl_next::Request::from_decoded(decoded),
7364 responder,
7365 )
7366 .await;
7367 Ok(())
7368 }
7369 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7370 ordinal: 8794297771444732717,
7371 error,
7372 }),
7373 }
7374 }
7375
7376 ordinal => {
7377 handler.on_unknown_interaction(ordinal).await;
7378 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7379 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7380 } else {
7381 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
7382 ordinal,
7383 flexibility,
7384 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
7385 )
7386 .expect("encoding a framework error should never fail")
7387 .await?;
7388 Ok(())
7389 }
7390 }
7391 }
7392 }
7393}
7394
7395pub trait NodeClientHandler<
7399 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
7400 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7401>
7402{
7403 #[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"]
7404 fn on_open(
7405 &mut self,
7406
7407 request: ::fidl_next::Request<node::OnOpen, ___T>,
7408 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7409
7410 #[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"]
7411 fn on_representation(
7412 &mut self,
7413
7414 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
7415 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7416
7417 fn on_unknown_interaction(
7418 &mut self,
7419 ordinal: u64,
7420 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7421 ::core::future::ready(())
7422 }
7423}
7424
7425impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
7426where
7427 ___H: NodeClientHandler<___T> + ::core::marker::Send,
7428 ___T: ::fidl_next::Transport,
7429 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
7430 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7431 Constraint = (),
7432 >,
7433 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
7434 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7435 Constraint = (),
7436 >,
7437{
7438 async fn on_event(
7439 handler: &mut ___H,
7440 ordinal: u64,
7441 flexibility: ::fidl_next::protocol::Flexibility,
7442 body: ::fidl_next::Body<___T>,
7443 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7444 match ordinal {
7445 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7446 Ok(decoded) => {
7447 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
7448 Ok(())
7449 }
7450 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7451 ordinal: 9207534335756671346,
7452 error,
7453 }),
7454 },
7455
7456 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7457 Ok(decoded) => {
7458 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
7459 Ok(())
7460 }
7461 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7462 ordinal: 6679970090861613324,
7463 error,
7464 }),
7465 },
7466
7467 ordinal => {
7468 handler.on_unknown_interaction(ordinal).await;
7469 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7470 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7471 } else {
7472 Ok(())
7473 }
7474 }
7475 }
7476 }
7477}
7478
7479pub trait NodeServerHandler<
7483 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
7484 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7485>
7486{
7487 fn clone(
7488 &mut self,
7489
7490 request: ::fidl_next::Request<node::Clone, ___T>,
7491 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7492
7493 #[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"]
7494 fn close(
7495 &mut self,
7496
7497 responder: ::fidl_next::Responder<node::Close, ___T>,
7498 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7499
7500 fn query(
7501 &mut self,
7502
7503 responder: ::fidl_next::Responder<node::Query, ___T>,
7504 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7505
7506 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
7507 fn deprecated_clone(
7508 &mut self,
7509
7510 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
7511 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7512
7513 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
7514 fn deprecated_get_attr(
7515 &mut self,
7516
7517 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
7518 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7519
7520 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
7521 fn deprecated_set_attr(
7522 &mut self,
7523
7524 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
7525
7526 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
7527 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7528
7529 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
7530 fn deprecated_get_flags(
7531 &mut self,
7532
7533 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
7534 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7535
7536 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
7537 fn deprecated_set_flags(
7538 &mut self,
7539
7540 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
7541
7542 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
7543 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7544
7545 #[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"]
7546 fn get_flags(
7547 &mut self,
7548
7549 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
7550 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7551
7552 #[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"]
7553 fn set_flags(
7554 &mut self,
7555
7556 request: ::fidl_next::Request<node::SetFlags, ___T>,
7557
7558 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
7559 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7560
7561 #[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"]
7562 fn query_filesystem(
7563 &mut self,
7564
7565 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
7566 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7567
7568 #[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"]
7569 fn get_attributes(
7570 &mut self,
7571
7572 request: ::fidl_next::Request<node::GetAttributes, ___T>,
7573
7574 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
7575 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7576
7577 #[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"]
7578 fn update_attributes(
7579 &mut self,
7580
7581 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
7582
7583 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
7584 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7585
7586 #[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"]
7587 fn sync(
7588 &mut self,
7589
7590 responder: ::fidl_next::Responder<node::Sync, ___T>,
7591 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7592
7593 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
7594 fn list_extended_attributes(
7595 &mut self,
7596
7597 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
7598 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7599
7600 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
7601 fn get_extended_attribute(
7602 &mut self,
7603
7604 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
7605
7606 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
7607 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7608
7609 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
7610 fn set_extended_attribute(
7611 &mut self,
7612
7613 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
7614
7615 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
7616 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7617
7618 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
7619 fn remove_extended_attribute(
7620 &mut self,
7621
7622 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
7623
7624 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
7625 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7626
7627 fn on_unknown_interaction(
7628 &mut self,
7629 ordinal: u64,
7630 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7631 ::core::future::ready(())
7632 }
7633}
7634
7635impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
7636where
7637 ___H: NodeServerHandler<___T> + ::core::marker::Send,
7638 ___T: ::fidl_next::Transport,
7639 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
7640 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7641 Constraint = (),
7642 >,
7643 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
7644 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7645 Constraint = (),
7646 >,
7647 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
7648 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7649 Constraint = (),
7650 >,
7651 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
7652 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7653 Constraint = (),
7654 >,
7655 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
7656 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7657 Constraint = (),
7658 >,
7659 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
7660 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7661 Constraint = (),
7662 >,
7663 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
7664 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7665 Constraint = (),
7666 >,
7667 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
7668 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7669 Constraint = (),
7670 >,
7671 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7672 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7673 Constraint = (),
7674 >,
7675 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7676 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7677 Constraint = (),
7678 >,
7679 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7680 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7681 Constraint = (),
7682 >,
7683{
7684 async fn on_one_way(
7685 handler: &mut ___H,
7686 ordinal: u64,
7687 flexibility: ::fidl_next::protocol::Flexibility,
7688 body: ::fidl_next::Body<___T>,
7689 ) -> ::core::result::Result<
7690 (),
7691 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7692 > {
7693 match ordinal {
7694 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7695 Ok(decoded) => {
7696 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
7697 Ok(())
7698 }
7699 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7700 ordinal: 2366825959783828089,
7701 error,
7702 }),
7703 },
7704
7705 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7706 Ok(decoded) => {
7707 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
7708 Ok(())
7709 }
7710 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7711 ordinal: 6512600400724287855,
7712 error,
7713 }),
7714 },
7715
7716 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7717 Ok(decoded) => {
7718 handler
7719 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
7720 .await;
7721 Ok(())
7722 }
7723 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7724 ordinal: 5431626189872037072,
7725 error,
7726 }),
7727 },
7728
7729 ordinal => {
7730 handler.on_unknown_interaction(ordinal).await;
7731 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7732 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7733 } else {
7734 Ok(())
7735 }
7736 }
7737 }
7738 }
7739
7740 async fn on_two_way(
7741 handler: &mut ___H,
7742 ordinal: u64,
7743 flexibility: ::fidl_next::protocol::Flexibility,
7744 body: ::fidl_next::Body<___T>,
7745 responder: ::fidl_next::protocol::Responder<___T>,
7746 ) -> ::core::result::Result<
7747 (),
7748 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7749 > {
7750 match ordinal {
7751 6540867515453498750 => {
7752 let responder = ::fidl_next::Responder::from_untyped(responder);
7753
7754 handler.close(responder).await;
7755 Ok(())
7756 }
7757
7758 2763219980499352582 => {
7759 let responder = ::fidl_next::Responder::from_untyped(responder);
7760
7761 handler.query(responder).await;
7762 Ok(())
7763 }
7764
7765 8689798978500614909 => {
7766 let responder = ::fidl_next::Responder::from_untyped(responder);
7767
7768 handler.deprecated_get_attr(responder).await;
7769 Ok(())
7770 }
7771
7772 4721673413776871238 => {
7773 let responder = ::fidl_next::Responder::from_untyped(responder);
7774
7775 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7776 Ok(decoded) => {
7777 handler
7778 .deprecated_set_attr(
7779 ::fidl_next::Request::from_decoded(decoded),
7780 responder,
7781 )
7782 .await;
7783 Ok(())
7784 }
7785 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7786 ordinal: 4721673413776871238,
7787 error,
7788 }),
7789 }
7790 }
7791
7792 6595803110182632097 => {
7793 let responder = ::fidl_next::Responder::from_untyped(responder);
7794
7795 handler.deprecated_get_flags(responder).await;
7796 Ok(())
7797 }
7798
7799 5950864159036794675 => {
7800 let responder = ::fidl_next::Responder::from_untyped(responder);
7801
7802 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7803 Ok(decoded) => {
7804 handler
7805 .deprecated_set_flags(
7806 ::fidl_next::Request::from_decoded(decoded),
7807 responder,
7808 )
7809 .await;
7810 Ok(())
7811 }
7812 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7813 ordinal: 5950864159036794675,
7814 error,
7815 }),
7816 }
7817 }
7818
7819 105530239381466147 => {
7820 let responder = ::fidl_next::Responder::from_untyped(responder);
7821
7822 handler.get_flags(responder).await;
7823 Ok(())
7824 }
7825
7826 6172186066099445416 => {
7827 let responder = ::fidl_next::Responder::from_untyped(responder);
7828
7829 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7830 Ok(decoded) => {
7831 handler
7832 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
7833 .await;
7834 Ok(())
7835 }
7836 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7837 ordinal: 6172186066099445416,
7838 error,
7839 }),
7840 }
7841 }
7842
7843 8013111122914313744 => {
7844 let responder = ::fidl_next::Responder::from_untyped(responder);
7845
7846 handler.query_filesystem(responder).await;
7847 Ok(())
7848 }
7849
7850 4414537700416816443 => {
7851 let responder = ::fidl_next::Responder::from_untyped(responder);
7852
7853 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7854 Ok(decoded) => {
7855 handler
7856 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
7857 .await;
7858 Ok(())
7859 }
7860 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7861 ordinal: 4414537700416816443,
7862 error,
7863 }),
7864 }
7865 }
7866
7867 3677402239314018056 => {
7868 let responder = ::fidl_next::Responder::from_untyped(responder);
7869
7870 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7871 Ok(decoded) => {
7872 handler
7873 .update_attributes(
7874 ::fidl_next::Request::from_decoded(decoded),
7875 responder,
7876 )
7877 .await;
7878 Ok(())
7879 }
7880 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7881 ordinal: 3677402239314018056,
7882 error,
7883 }),
7884 }
7885 }
7886
7887 3196473584242777161 => {
7888 let responder = ::fidl_next::Responder::from_untyped(responder);
7889
7890 handler.sync(responder).await;
7891 Ok(())
7892 }
7893
7894 5043930208506967771 => {
7895 let responder = ::fidl_next::Responder::from_untyped(responder);
7896
7897 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7898 Ok(decoded) => {
7899 handler
7900 .get_extended_attribute(
7901 ::fidl_next::Request::from_decoded(decoded),
7902 responder,
7903 )
7904 .await;
7905 Ok(())
7906 }
7907 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7908 ordinal: 5043930208506967771,
7909 error,
7910 }),
7911 }
7912 }
7913
7914 5374223046099989052 => {
7915 let responder = ::fidl_next::Responder::from_untyped(responder);
7916
7917 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7918 Ok(decoded) => {
7919 handler
7920 .set_extended_attribute(
7921 ::fidl_next::Request::from_decoded(decoded),
7922 responder,
7923 )
7924 .await;
7925 Ok(())
7926 }
7927 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7928 ordinal: 5374223046099989052,
7929 error,
7930 }),
7931 }
7932 }
7933
7934 8794297771444732717 => {
7935 let responder = ::fidl_next::Responder::from_untyped(responder);
7936
7937 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7938 Ok(decoded) => {
7939 handler
7940 .remove_extended_attribute(
7941 ::fidl_next::Request::from_decoded(decoded),
7942 responder,
7943 )
7944 .await;
7945 Ok(())
7946 }
7947 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7948 ordinal: 8794297771444732717,
7949 error,
7950 }),
7951 }
7952 }
7953
7954 ordinal => {
7955 handler.on_unknown_interaction(ordinal).await;
7956 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7957 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7958 } else {
7959 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
7960 ordinal,
7961 flexibility,
7962 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
7963 )
7964 .expect("encoding a framework error should never fail")
7965 .await?;
7966 Ok(())
7967 }
7968 }
7969 }
7970 }
7971}
7972
7973impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
7974where
7975 ___T: ::fidl_next::Transport,
7976{
7977 async fn on_open(&mut self, _: ::fidl_next::Request<node::OnOpen, ___T>) {}
7978
7979 async fn on_representation(&mut self, _: ::fidl_next::Request<node::OnRepresentation, ___T>) {}
7980
7981 async fn on_unknown_interaction(&mut self, _: u64) {}
7982}
7983
7984impl<___H, ___T> NodeLocalClientHandler<___T> for ::fidl_next::Local<___H>
7985where
7986 ___H: NodeClientHandler<___T>,
7987 ___T: ::fidl_next::Transport,
7988{
7989 async fn on_open(&mut self, request: ::fidl_next::Request<node::OnOpen, ___T>) {
7990 ___H::on_open(&mut self.0, request).await
7991 }
7992
7993 async fn on_representation(
7994 &mut self,
7995
7996 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
7997 ) {
7998 ___H::on_representation(&mut self.0, request).await
7999 }
8000
8001 async fn on_unknown_interaction(&mut self, ordinal: u64) {
8002 ___H::on_unknown_interaction(&mut self.0, ordinal).await
8003 }
8004}
8005
8006impl<___H, ___T> NodeLocalServerHandler<___T> for ::fidl_next::Local<___H>
8007where
8008 ___H: NodeServerHandler<___T>,
8009 ___T: ::fidl_next::Transport,
8010{
8011 async fn clone(&mut self, request: ::fidl_next::Request<node::Clone, ___T>) {
8012 ___H::clone(&mut self.0, request).await
8013 }
8014
8015 async fn close(&mut self, responder: ::fidl_next::Responder<node::Close, ___T>) {
8016 ___H::close(&mut self.0, responder).await
8017 }
8018
8019 async fn query(&mut self, responder: ::fidl_next::Responder<node::Query, ___T>) {
8020 ___H::query(&mut self.0, responder).await
8021 }
8022
8023 async fn deprecated_clone(
8024 &mut self,
8025
8026 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
8027 ) {
8028 ___H::deprecated_clone(&mut self.0, request).await
8029 }
8030
8031 async fn deprecated_get_attr(
8032 &mut self,
8033
8034 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
8035 ) {
8036 ___H::deprecated_get_attr(&mut self.0, responder).await
8037 }
8038
8039 async fn deprecated_set_attr(
8040 &mut self,
8041
8042 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
8043
8044 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
8045 ) {
8046 ___H::deprecated_set_attr(&mut self.0, request, responder).await
8047 }
8048
8049 async fn deprecated_get_flags(
8050 &mut self,
8051
8052 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
8053 ) {
8054 ___H::deprecated_get_flags(&mut self.0, responder).await
8055 }
8056
8057 async fn deprecated_set_flags(
8058 &mut self,
8059
8060 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
8061
8062 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
8063 ) {
8064 ___H::deprecated_set_flags(&mut self.0, request, responder).await
8065 }
8066
8067 async fn get_flags(&mut self, responder: ::fidl_next::Responder<node::GetFlags, ___T>) {
8068 ___H::get_flags(&mut self.0, responder).await
8069 }
8070
8071 async fn set_flags(
8072 &mut self,
8073
8074 request: ::fidl_next::Request<node::SetFlags, ___T>,
8075
8076 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
8077 ) {
8078 ___H::set_flags(&mut self.0, request, responder).await
8079 }
8080
8081 async fn query_filesystem(
8082 &mut self,
8083
8084 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
8085 ) {
8086 ___H::query_filesystem(&mut self.0, responder).await
8087 }
8088
8089 async fn get_attributes(
8090 &mut self,
8091
8092 request: ::fidl_next::Request<node::GetAttributes, ___T>,
8093
8094 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
8095 ) {
8096 ___H::get_attributes(&mut self.0, request, responder).await
8097 }
8098
8099 async fn update_attributes(
8100 &mut self,
8101
8102 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
8103
8104 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
8105 ) {
8106 ___H::update_attributes(&mut self.0, request, responder).await
8107 }
8108
8109 async fn sync(&mut self, responder: ::fidl_next::Responder<node::Sync, ___T>) {
8110 ___H::sync(&mut self.0, responder).await
8111 }
8112
8113 async fn list_extended_attributes(
8114 &mut self,
8115
8116 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
8117 ) {
8118 ___H::list_extended_attributes(&mut self.0, request).await
8119 }
8120
8121 async fn get_extended_attribute(
8122 &mut self,
8123
8124 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
8125
8126 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
8127 ) {
8128 ___H::get_extended_attribute(&mut self.0, request, responder).await
8129 }
8130
8131 async fn set_extended_attribute(
8132 &mut self,
8133
8134 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
8135
8136 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
8137 ) {
8138 ___H::set_extended_attribute(&mut self.0, request, responder).await
8139 }
8140
8141 async fn remove_extended_attribute(
8142 &mut self,
8143
8144 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
8145
8146 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
8147 ) {
8148 ___H::remove_extended_attribute(&mut self.0, request, responder).await
8149 }
8150
8151 async fn on_unknown_interaction(&mut self, ordinal: u64) {
8152 ___H::on_unknown_interaction(&mut self.0, ordinal).await
8153 }
8154}
8155
8156#[doc = " Directory defines a node which is capable of containing other Objects.\n"]
8158#[derive(PartialEq, Debug)]
8159pub struct Directory;
8160
8161impl ::fidl_next::Discoverable for Directory {
8162 const PROTOCOL_NAME: &'static str = "fuchsia.io.Directory";
8163}
8164
8165#[cfg(target_os = "fuchsia")]
8166impl ::fidl_next::HasTransport for Directory {
8167 type Transport = ::fdomain_client::Channel;
8168}
8169
8170pub mod directory {
8171 pub mod prelude {
8172 pub use crate::{
8173 Directory, DirectoryClientHandler, DirectoryLocalClientHandler,
8174 DirectoryLocalServerHandler, DirectoryServerHandler, directory,
8175 };
8176
8177 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
8178
8179 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
8180
8181 pub use crate::natural::DirectoryCreateSymlinkRequest;
8182
8183 pub use crate::natural::DirectoryDeprecatedOpenRequest;
8184
8185 pub use crate::natural::DirectoryGetTokenResponse;
8186
8187 pub use crate::natural::DirectoryLinkRequest;
8188
8189 pub use crate::natural::DirectoryLinkResponse;
8190
8191 pub use crate::natural::DirectoryOpenRequest;
8192
8193 pub use crate::natural::DirectoryReadDirentsRequest;
8194
8195 pub use crate::natural::DirectoryReadDirentsResponse;
8196
8197 pub use crate::natural::DirectoryRenameRequest;
8198
8199 pub use crate::natural::DirectoryRewindResponse;
8200
8201 pub use crate::natural::DirectoryUnlinkRequest;
8202
8203 pub use crate::natural::DirectoryWatchRequest;
8204
8205 pub use crate::natural::DirectoryWatchResponse;
8206
8207 pub use crate::natural::DirectoryCreateSymlinkResponse;
8208
8209 pub use crate::natural::DirectoryRenameResponse;
8210
8211 pub use crate::natural::DirectoryUnlinkResponse;
8212
8213 pub use crate::natural::ExtendedAttributeValue;
8214
8215 pub use crate::natural::MutableNodeAttributes;
8216
8217 pub use crate::natural::NodeAttributes2;
8218
8219 pub use crate::natural::NodeDeprecatedCloneRequest;
8220
8221 pub use crate::natural::NodeDeprecatedGetAttrResponse;
8222
8223 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
8224
8225 pub use crate::natural::NodeDeprecatedSetAttrRequest;
8226
8227 pub use crate::natural::NodeDeprecatedSetAttrResponse;
8228
8229 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
8230
8231 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
8232
8233 pub use crate::natural::NodeGetAttributesRequest;
8234
8235 pub use crate::natural::NodeGetExtendedAttributeRequest;
8236
8237 pub use crate::natural::NodeListExtendedAttributesRequest;
8238
8239 pub use crate::natural::NodeOnOpenRequest;
8240
8241 pub use crate::natural::NodeQueryFilesystemResponse;
8242
8243 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
8244
8245 pub use crate::natural::NodeSetExtendedAttributeRequest;
8246
8247 pub use crate::natural::NodeSetFlagsRequest;
8248
8249 pub use crate::natural::NodeGetFlagsResponse;
8250
8251 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
8252
8253 pub use crate::natural::NodeSetExtendedAttributeResponse;
8254
8255 pub use crate::natural::NodeSetFlagsResponse;
8256
8257 pub use crate::natural::NodeSyncResponse;
8258
8259 pub use crate::natural::NodeUpdateAttributesResponse;
8260
8261 pub use crate::natural::Representation;
8262
8263 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
8264
8265 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
8266
8267 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
8268 }
8269
8270 pub struct AdvisoryLock;
8271
8272 impl ::fidl_next::Method for AdvisoryLock {
8273 const ORDINAL: u64 = 7992130864415541162;
8274 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8275 ::fidl_next::protocol::Flexibility::Strict;
8276
8277 type Protocol = crate::Directory;
8278
8279 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
8280 }
8281
8282 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
8283 type Response = ::fidl_next::wire::Result<
8284 'static,
8285 crate::wire::AdvisoryLockingAdvisoryLockResponse,
8286 ::fidl_next::wire::Int32,
8287 >;
8288 }
8289
8290 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
8291 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8292
8293 fn respond(response: ___R) -> Self::Output {
8294 ::core::result::Result::Ok(response)
8295 }
8296 }
8297
8298 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
8299 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8300
8301 fn respond_err(response: ___R) -> Self::Output {
8302 ::core::result::Result::Err(response)
8303 }
8304 }
8305
8306 pub struct Clone;
8307
8308 impl ::fidl_next::Method for Clone {
8309 const ORDINAL: u64 = 2366825959783828089;
8310 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8311 ::fidl_next::protocol::Flexibility::Strict;
8312
8313 type Protocol = crate::Directory;
8314
8315 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
8316 }
8317
8318 pub struct Close;
8319
8320 impl ::fidl_next::Method for Close {
8321 const ORDINAL: u64 = 6540867515453498750;
8322 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8323 ::fidl_next::protocol::Flexibility::Strict;
8324
8325 type Protocol = crate::Directory;
8326
8327 type Request = ::fidl_next::wire::EmptyMessageBody;
8328 }
8329
8330 impl ::fidl_next::TwoWayMethod for Close {
8331 type Response = ::fidl_next::wire::Result<
8332 'static,
8333 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
8334 ::fidl_next::wire::Int32,
8335 >;
8336 }
8337
8338 impl<___R> ::fidl_next::Respond<___R> for Close {
8339 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8340
8341 fn respond(response: ___R) -> Self::Output {
8342 ::core::result::Result::Ok(response)
8343 }
8344 }
8345
8346 impl<___R> ::fidl_next::RespondErr<___R> for Close {
8347 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8348
8349 fn respond_err(response: ___R) -> Self::Output {
8350 ::core::result::Result::Err(response)
8351 }
8352 }
8353
8354 pub struct Query;
8355
8356 impl ::fidl_next::Method for Query {
8357 const ORDINAL: u64 = 2763219980499352582;
8358 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8359 ::fidl_next::protocol::Flexibility::Strict;
8360
8361 type Protocol = crate::Directory;
8362
8363 type Request = ::fidl_next::wire::EmptyMessageBody;
8364 }
8365
8366 impl ::fidl_next::TwoWayMethod for Query {
8367 type Response = ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
8368 }
8369
8370 impl<___R> ::fidl_next::Respond<___R> for Query {
8371 type Output = ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
8372
8373 fn respond(response: ___R) -> Self::Output {
8374 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
8375 }
8376 }
8377
8378 pub struct DeprecatedClone;
8379
8380 impl ::fidl_next::Method for DeprecatedClone {
8381 const ORDINAL: u64 = 6512600400724287855;
8382 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8383 ::fidl_next::protocol::Flexibility::Flexible;
8384
8385 type Protocol = crate::Directory;
8386
8387 type Request = crate::wire::NodeDeprecatedCloneRequest;
8388 }
8389
8390 pub struct OnOpen;
8391
8392 impl ::fidl_next::Method for OnOpen {
8393 const ORDINAL: u64 = 9207534335756671346;
8394 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8395 ::fidl_next::protocol::Flexibility::Flexible;
8396
8397 type Protocol = crate::Directory;
8398
8399 type Request = crate::wire::NodeOnOpenRequest<'static>;
8400 }
8401
8402 pub struct DeprecatedGetAttr;
8403
8404 impl ::fidl_next::Method for DeprecatedGetAttr {
8405 const ORDINAL: u64 = 8689798978500614909;
8406 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8407 ::fidl_next::protocol::Flexibility::Strict;
8408
8409 type Protocol = crate::Directory;
8410
8411 type Request = ::fidl_next::wire::EmptyMessageBody;
8412 }
8413
8414 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
8415 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
8416 }
8417
8418 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
8419 type Output = ___R;
8420
8421 fn respond(response: ___R) -> Self::Output {
8422 response
8423 }
8424 }
8425
8426 pub struct DeprecatedSetAttr;
8427
8428 impl ::fidl_next::Method for DeprecatedSetAttr {
8429 const ORDINAL: u64 = 4721673413776871238;
8430 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8431 ::fidl_next::protocol::Flexibility::Strict;
8432
8433 type Protocol = crate::Directory;
8434
8435 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
8436 }
8437
8438 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
8439 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
8440 }
8441
8442 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
8443 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
8444
8445 fn respond(response: ___R) -> Self::Output {
8446 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
8447 }
8448 }
8449
8450 pub struct DeprecatedGetFlags;
8451
8452 impl ::fidl_next::Method for DeprecatedGetFlags {
8453 const ORDINAL: u64 = 6595803110182632097;
8454 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8455 ::fidl_next::protocol::Flexibility::Strict;
8456
8457 type Protocol = crate::Directory;
8458
8459 type Request = ::fidl_next::wire::EmptyMessageBody;
8460 }
8461
8462 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
8463 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
8464 }
8465
8466 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
8467 type Output = ___R;
8468
8469 fn respond(response: ___R) -> Self::Output {
8470 response
8471 }
8472 }
8473
8474 pub struct DeprecatedSetFlags;
8475
8476 impl ::fidl_next::Method for DeprecatedSetFlags {
8477 const ORDINAL: u64 = 5950864159036794675;
8478 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8479 ::fidl_next::protocol::Flexibility::Strict;
8480
8481 type Protocol = crate::Directory;
8482
8483 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
8484 }
8485
8486 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
8487 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
8488 }
8489
8490 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
8491 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
8492
8493 fn respond(response: ___R) -> Self::Output {
8494 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
8495 }
8496 }
8497
8498 pub struct GetFlags;
8499
8500 impl ::fidl_next::Method for GetFlags {
8501 const ORDINAL: u64 = 105530239381466147;
8502 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8503 ::fidl_next::protocol::Flexibility::Flexible;
8504
8505 type Protocol = crate::Directory;
8506
8507 type Request = ::fidl_next::wire::EmptyMessageBody;
8508 }
8509
8510 impl ::fidl_next::TwoWayMethod for GetFlags {
8511 type Response = ::fidl_next::wire::FlexibleResult<
8512 'static,
8513 crate::wire::NodeGetFlagsResponse,
8514 ::fidl_next::wire::Int32,
8515 >;
8516 }
8517
8518 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
8519 type Output = ::fidl_next::FlexibleResult<
8520 crate::generic::NodeGetFlagsResponse<___R>,
8521 ::fidl_next::util::Never,
8522 >;
8523
8524 fn respond(response: ___R) -> Self::Output {
8525 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
8526 flags: response,
8527 })
8528 }
8529 }
8530
8531 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
8532 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8533
8534 fn respond_err(response: ___R) -> Self::Output {
8535 ::fidl_next::FlexibleResult::Err(response)
8536 }
8537 }
8538
8539 pub struct SetFlags;
8540
8541 impl ::fidl_next::Method for SetFlags {
8542 const ORDINAL: u64 = 6172186066099445416;
8543 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8544 ::fidl_next::protocol::Flexibility::Flexible;
8545
8546 type Protocol = crate::Directory;
8547
8548 type Request = crate::wire::NodeSetFlagsRequest;
8549 }
8550
8551 impl ::fidl_next::TwoWayMethod for SetFlags {
8552 type Response = ::fidl_next::wire::FlexibleResult<
8553 'static,
8554 crate::wire::NodeSetFlagsResponse,
8555 ::fidl_next::wire::Int32,
8556 >;
8557 }
8558
8559 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
8560 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
8561
8562 fn respond(response: ___R) -> Self::Output {
8563 ::fidl_next::FlexibleResult::Ok(response)
8564 }
8565 }
8566
8567 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
8568 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
8569
8570 fn respond_err(response: ___R) -> Self::Output {
8571 ::fidl_next::FlexibleResult::Err(response)
8572 }
8573 }
8574
8575 pub struct QueryFilesystem;
8576
8577 impl ::fidl_next::Method for QueryFilesystem {
8578 const ORDINAL: u64 = 8013111122914313744;
8579 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8580 ::fidl_next::protocol::Flexibility::Strict;
8581
8582 type Protocol = crate::Directory;
8583
8584 type Request = ::fidl_next::wire::EmptyMessageBody;
8585 }
8586
8587 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
8588 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
8589 }
8590
8591 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
8592 type Output = ___R;
8593
8594 fn respond(response: ___R) -> Self::Output {
8595 response
8596 }
8597 }
8598
8599 pub struct OnRepresentation;
8600
8601 impl ::fidl_next::Method for OnRepresentation {
8602 const ORDINAL: u64 = 6679970090861613324;
8603 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8604 ::fidl_next::protocol::Flexibility::Strict;
8605
8606 type Protocol = crate::Directory;
8607
8608 type Request = crate::wire::Representation<'static>;
8609 }
8610
8611 pub struct GetAttributes;
8612
8613 impl ::fidl_next::Method for GetAttributes {
8614 const ORDINAL: u64 = 4414537700416816443;
8615 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8616 ::fidl_next::protocol::Flexibility::Strict;
8617
8618 type Protocol = crate::Directory;
8619
8620 type Request = crate::wire::NodeGetAttributesRequest;
8621 }
8622
8623 impl ::fidl_next::TwoWayMethod for GetAttributes {
8624 type Response = ::fidl_next::wire::Result<
8625 'static,
8626 crate::wire::NodeAttributes2<'static>,
8627 ::fidl_next::wire::Int32,
8628 >;
8629 }
8630
8631 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
8632 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8633
8634 fn respond(response: ___R) -> Self::Output {
8635 ::core::result::Result::Ok(response)
8636 }
8637 }
8638
8639 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
8640 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8641
8642 fn respond_err(response: ___R) -> Self::Output {
8643 ::core::result::Result::Err(response)
8644 }
8645 }
8646
8647 pub struct UpdateAttributes;
8648
8649 impl ::fidl_next::Method for UpdateAttributes {
8650 const ORDINAL: u64 = 3677402239314018056;
8651 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8652 ::fidl_next::protocol::Flexibility::Strict;
8653
8654 type Protocol = crate::Directory;
8655
8656 type Request = crate::wire::MutableNodeAttributes<'static>;
8657 }
8658
8659 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
8660 type Response = ::fidl_next::wire::Result<
8661 'static,
8662 crate::wire::NodeUpdateAttributesResponse,
8663 ::fidl_next::wire::Int32,
8664 >;
8665 }
8666
8667 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
8668 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8669
8670 fn respond(response: ___R) -> Self::Output {
8671 ::core::result::Result::Ok(response)
8672 }
8673 }
8674
8675 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
8676 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8677
8678 fn respond_err(response: ___R) -> Self::Output {
8679 ::core::result::Result::Err(response)
8680 }
8681 }
8682
8683 pub struct Sync;
8684
8685 impl ::fidl_next::Method for Sync {
8686 const ORDINAL: u64 = 3196473584242777161;
8687 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8688 ::fidl_next::protocol::Flexibility::Strict;
8689
8690 type Protocol = crate::Directory;
8691
8692 type Request = ::fidl_next::wire::EmptyMessageBody;
8693 }
8694
8695 impl ::fidl_next::TwoWayMethod for Sync {
8696 type Response = ::fidl_next::wire::Result<
8697 'static,
8698 crate::wire::NodeSyncResponse,
8699 ::fidl_next::wire::Int32,
8700 >;
8701 }
8702
8703 impl<___R> ::fidl_next::Respond<___R> for Sync {
8704 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8705
8706 fn respond(response: ___R) -> Self::Output {
8707 ::core::result::Result::Ok(response)
8708 }
8709 }
8710
8711 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
8712 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8713
8714 fn respond_err(response: ___R) -> Self::Output {
8715 ::core::result::Result::Err(response)
8716 }
8717 }
8718
8719 pub struct ListExtendedAttributes;
8720
8721 impl ::fidl_next::Method for ListExtendedAttributes {
8722 const ORDINAL: u64 = 5431626189872037072;
8723 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8724 ::fidl_next::protocol::Flexibility::Strict;
8725
8726 type Protocol = crate::Directory;
8727
8728 type Request = crate::wire::NodeListExtendedAttributesRequest;
8729 }
8730
8731 pub struct GetExtendedAttribute;
8732
8733 impl ::fidl_next::Method for GetExtendedAttribute {
8734 const ORDINAL: u64 = 5043930208506967771;
8735 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8736 ::fidl_next::protocol::Flexibility::Strict;
8737
8738 type Protocol = crate::Directory;
8739
8740 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
8741 }
8742
8743 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
8744 type Response = ::fidl_next::wire::Result<
8745 'static,
8746 crate::wire::ExtendedAttributeValue<'static>,
8747 ::fidl_next::wire::Int32,
8748 >;
8749 }
8750
8751 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
8752 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8753
8754 fn respond(response: ___R) -> Self::Output {
8755 ::core::result::Result::Ok(response)
8756 }
8757 }
8758
8759 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
8760 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8761
8762 fn respond_err(response: ___R) -> Self::Output {
8763 ::core::result::Result::Err(response)
8764 }
8765 }
8766
8767 pub struct SetExtendedAttribute;
8768
8769 impl ::fidl_next::Method for SetExtendedAttribute {
8770 const ORDINAL: u64 = 5374223046099989052;
8771 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8772 ::fidl_next::protocol::Flexibility::Strict;
8773
8774 type Protocol = crate::Directory;
8775
8776 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
8777 }
8778
8779 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
8780 type Response = ::fidl_next::wire::Result<
8781 'static,
8782 crate::wire::NodeSetExtendedAttributeResponse,
8783 ::fidl_next::wire::Int32,
8784 >;
8785 }
8786
8787 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
8788 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8789
8790 fn respond(response: ___R) -> Self::Output {
8791 ::core::result::Result::Ok(response)
8792 }
8793 }
8794
8795 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
8796 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8797
8798 fn respond_err(response: ___R) -> Self::Output {
8799 ::core::result::Result::Err(response)
8800 }
8801 }
8802
8803 pub struct RemoveExtendedAttribute;
8804
8805 impl ::fidl_next::Method for RemoveExtendedAttribute {
8806 const ORDINAL: u64 = 8794297771444732717;
8807 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8808 ::fidl_next::protocol::Flexibility::Strict;
8809
8810 type Protocol = crate::Directory;
8811
8812 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
8813 }
8814
8815 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
8816 type Response = ::fidl_next::wire::Result<
8817 'static,
8818 crate::wire::NodeRemoveExtendedAttributeResponse,
8819 ::fidl_next::wire::Int32,
8820 >;
8821 }
8822
8823 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
8824 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8825
8826 fn respond(response: ___R) -> Self::Output {
8827 ::core::result::Result::Ok(response)
8828 }
8829 }
8830
8831 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
8832 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8833
8834 fn respond_err(response: ___R) -> Self::Output {
8835 ::core::result::Result::Err(response)
8836 }
8837 }
8838
8839 pub struct DeprecatedOpen;
8840
8841 impl ::fidl_next::Method for DeprecatedOpen {
8842 const ORDINAL: u64 = 3193127272456937152;
8843 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8844 ::fidl_next::protocol::Flexibility::Flexible;
8845
8846 type Protocol = crate::Directory;
8847
8848 type Request = crate::wire::DirectoryDeprecatedOpenRequest<'static>;
8849 }
8850
8851 pub struct Open;
8852
8853 impl ::fidl_next::Method for Open {
8854 const ORDINAL: u64 = 6236883748953765593;
8855 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8856 ::fidl_next::protocol::Flexibility::Strict;
8857
8858 type Protocol = crate::Directory;
8859
8860 type Request = crate::wire::DirectoryOpenRequest<'static>;
8861 }
8862
8863 pub struct ReadDirents;
8864
8865 impl ::fidl_next::Method for ReadDirents {
8866 const ORDINAL: u64 = 3855785432100874762;
8867 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8868 ::fidl_next::protocol::Flexibility::Strict;
8869
8870 type Protocol = crate::Directory;
8871
8872 type Request = crate::wire::DirectoryReadDirentsRequest;
8873 }
8874
8875 impl ::fidl_next::TwoWayMethod for ReadDirents {
8876 type Response = crate::wire::DirectoryReadDirentsResponse<'static>;
8877 }
8878
8879 impl<___R> ::fidl_next::Respond<___R> for ReadDirents {
8880 type Output = ___R;
8881
8882 fn respond(response: ___R) -> Self::Output {
8883 response
8884 }
8885 }
8886
8887 pub struct Rewind;
8888
8889 impl ::fidl_next::Method for Rewind {
8890 const ORDINAL: u64 = 1635123508515392625;
8891 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8892 ::fidl_next::protocol::Flexibility::Strict;
8893
8894 type Protocol = crate::Directory;
8895
8896 type Request = ::fidl_next::wire::EmptyMessageBody;
8897 }
8898
8899 impl ::fidl_next::TwoWayMethod for Rewind {
8900 type Response = crate::wire::DirectoryRewindResponse;
8901 }
8902
8903 impl<___R> ::fidl_next::Respond<___R> for Rewind {
8904 type Output = crate::generic::DirectoryRewindResponse<___R>;
8905
8906 fn respond(response: ___R) -> Self::Output {
8907 crate::generic::DirectoryRewindResponse { s: response }
8908 }
8909 }
8910
8911 pub struct GetToken;
8912
8913 impl ::fidl_next::Method for GetToken {
8914 const ORDINAL: u64 = 2787337947777369685;
8915 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8916 ::fidl_next::protocol::Flexibility::Strict;
8917
8918 type Protocol = crate::Directory;
8919
8920 type Request = ::fidl_next::wire::EmptyMessageBody;
8921 }
8922
8923 impl ::fidl_next::TwoWayMethod for GetToken {
8924 type Response = crate::wire::DirectoryGetTokenResponse;
8925 }
8926
8927 impl<___R> ::fidl_next::Respond<___R> for GetToken {
8928 type Output = ___R;
8929
8930 fn respond(response: ___R) -> Self::Output {
8931 response
8932 }
8933 }
8934
8935 pub struct Link;
8936
8937 impl ::fidl_next::Method for Link {
8938 const ORDINAL: u64 = 8360374984291987687;
8939 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8940 ::fidl_next::protocol::Flexibility::Strict;
8941
8942 type Protocol = crate::Directory;
8943
8944 type Request = crate::wire::DirectoryLinkRequest<'static>;
8945 }
8946
8947 impl ::fidl_next::TwoWayMethod for Link {
8948 type Response = crate::wire::DirectoryLinkResponse;
8949 }
8950
8951 impl<___R> ::fidl_next::Respond<___R> for Link {
8952 type Output = crate::generic::DirectoryLinkResponse<___R>;
8953
8954 fn respond(response: ___R) -> Self::Output {
8955 crate::generic::DirectoryLinkResponse { s: response }
8956 }
8957 }
8958
8959 pub struct Unlink;
8960
8961 impl ::fidl_next::Method for Unlink {
8962 const ORDINAL: u64 = 8433556716759383021;
8963 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8964 ::fidl_next::protocol::Flexibility::Strict;
8965
8966 type Protocol = crate::Directory;
8967
8968 type Request = crate::wire::DirectoryUnlinkRequest<'static>;
8969 }
8970
8971 impl ::fidl_next::TwoWayMethod for Unlink {
8972 type Response = ::fidl_next::wire::Result<
8973 'static,
8974 crate::wire::DirectoryUnlinkResponse,
8975 ::fidl_next::wire::Int32,
8976 >;
8977 }
8978
8979 impl<___R> ::fidl_next::Respond<___R> for Unlink {
8980 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8981
8982 fn respond(response: ___R) -> Self::Output {
8983 ::core::result::Result::Ok(response)
8984 }
8985 }
8986
8987 impl<___R> ::fidl_next::RespondErr<___R> for Unlink {
8988 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8989
8990 fn respond_err(response: ___R) -> Self::Output {
8991 ::core::result::Result::Err(response)
8992 }
8993 }
8994
8995 pub struct Rename;
8996
8997 impl ::fidl_next::Method for Rename {
8998 const ORDINAL: u64 = 8097726607824333022;
8999 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9000 ::fidl_next::protocol::Flexibility::Strict;
9001
9002 type Protocol = crate::Directory;
9003
9004 type Request = crate::wire::DirectoryRenameRequest<'static>;
9005 }
9006
9007 impl ::fidl_next::TwoWayMethod for Rename {
9008 type Response = ::fidl_next::wire::Result<
9009 'static,
9010 crate::wire::DirectoryRenameResponse,
9011 ::fidl_next::wire::Int32,
9012 >;
9013 }
9014
9015 impl<___R> ::fidl_next::Respond<___R> for Rename {
9016 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9017
9018 fn respond(response: ___R) -> Self::Output {
9019 ::core::result::Result::Ok(response)
9020 }
9021 }
9022
9023 impl<___R> ::fidl_next::RespondErr<___R> for Rename {
9024 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9025
9026 fn respond_err(response: ___R) -> Self::Output {
9027 ::core::result::Result::Err(response)
9028 }
9029 }
9030
9031 pub struct CreateSymlink;
9032
9033 impl ::fidl_next::Method for CreateSymlink {
9034 const ORDINAL: u64 = 2435901052462315657;
9035 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9036 ::fidl_next::protocol::Flexibility::Strict;
9037
9038 type Protocol = crate::Directory;
9039
9040 type Request = crate::wire::DirectoryCreateSymlinkRequest<'static>;
9041 }
9042
9043 impl ::fidl_next::TwoWayMethod for CreateSymlink {
9044 type Response = ::fidl_next::wire::Result<
9045 'static,
9046 crate::wire::DirectoryCreateSymlinkResponse,
9047 ::fidl_next::wire::Int32,
9048 >;
9049 }
9050
9051 impl<___R> ::fidl_next::Respond<___R> for CreateSymlink {
9052 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
9053
9054 fn respond(response: ___R) -> Self::Output {
9055 ::core::result::Result::Ok(response)
9056 }
9057 }
9058
9059 impl<___R> ::fidl_next::RespondErr<___R> for CreateSymlink {
9060 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
9061
9062 fn respond_err(response: ___R) -> Self::Output {
9063 ::core::result::Result::Err(response)
9064 }
9065 }
9066
9067 pub struct Watch;
9068
9069 impl ::fidl_next::Method for Watch {
9070 const ORDINAL: u64 = 6275512344170098065;
9071 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9072 ::fidl_next::protocol::Flexibility::Strict;
9073
9074 type Protocol = crate::Directory;
9075
9076 type Request = crate::wire::DirectoryWatchRequest;
9077 }
9078
9079 impl ::fidl_next::TwoWayMethod for Watch {
9080 type Response = crate::wire::DirectoryWatchResponse;
9081 }
9082
9083 impl<___R> ::fidl_next::Respond<___R> for Watch {
9084 type Output = crate::generic::DirectoryWatchResponse<___R>;
9085
9086 fn respond(response: ___R) -> Self::Output {
9087 crate::generic::DirectoryWatchResponse { s: response }
9088 }
9089 }
9090
9091 mod ___detail {
9092 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Directory
9093 where
9094 ___T: ::fidl_next::Transport,
9095 {
9096 type Client = DirectoryClient<___T>;
9097 type Server = DirectoryServer<___T>;
9098 }
9099
9100 #[repr(transparent)]
9102 pub struct DirectoryClient<___T: ::fidl_next::Transport> {
9103 #[allow(dead_code)]
9104 client: ::fidl_next::protocol::Client<___T>,
9105 }
9106
9107 impl<___T> DirectoryClient<___T>
9108 where
9109 ___T: ::fidl_next::Transport,
9110 {
9111 #[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"]
9112 pub fn advisory_lock(
9113 &self,
9114
9115 request: impl ::fidl_next::Encode<
9116 crate::wire::AdvisoryLockRequest<'static>,
9117 <___T as ::fidl_next::Transport>::SendBuffer,
9118 >,
9119 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
9120 where
9121 <___T as ::fidl_next::Transport>::SendBuffer:
9122 ::fidl_next::encoder::InternalHandleEncoder,
9123 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9124 {
9125 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
9126 request,
9127 })
9128 }
9129
9130 #[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"]
9131 pub fn advisory_lock_with<___R>(
9132 &self,
9133 request: ___R,
9134 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
9135 where
9136 ___R: ::fidl_next::Encode<
9137 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
9138 <___T as ::fidl_next::Transport>::SendBuffer,
9139 >,
9140 {
9141 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9142 7992130864415541162,
9143 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
9144 request,
9145 ))
9146 }
9147
9148 pub fn clone(
9149 &self,
9150
9151 request: impl ::fidl_next::Encode<
9152 ::fidl_next::ServerEnd<
9153 ::fdomain_next_fuchsia_unknown::Cloneable,
9154 ::fdomain_client::fidl_next::wire::Handle,
9155 >,
9156 <___T as ::fidl_next::Transport>::SendBuffer,
9157 >,
9158 ) -> ::fidl_next::SendFuture<'_, ___T>
9159 where
9160 <___T as ::fidl_next::Transport>::SendBuffer:
9161 ::fidl_next::encoder::InternalHandleEncoder,
9162 <___T as ::fidl_next::Transport>::SendBuffer:
9163 ::fdomain_client::fidl_next::HandleEncoder,
9164 {
9165 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
9166 request,
9167 })
9168 }
9169
9170 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
9171 where
9172 ___R: ::fidl_next::Encode<
9173 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
9174 <___T as ::fidl_next::Transport>::SendBuffer,
9175 >,
9176 {
9177 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9178 2366825959783828089,
9179 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
9180 request,
9181 ))
9182 }
9183
9184 #[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"]
9185 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
9186 ::fidl_next::TwoWayFuture::from_untyped(
9187 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9188 6540867515453498750,
9189 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
9190 (),
9191 ),
9192 )
9193 }
9194
9195 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
9196 ::fidl_next::TwoWayFuture::from_untyped(
9197 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9198 2763219980499352582,
9199 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
9200 (),
9201 ),
9202 )
9203 }
9204
9205 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9206 pub fn deprecated_clone(
9207 &self,
9208
9209 flags: impl ::fidl_next::Encode<
9210 crate::wire::OpenFlags,
9211 <___T as ::fidl_next::Transport>::SendBuffer,
9212 >,
9213
9214 object: impl ::fidl_next::Encode<
9215 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
9216 <___T as ::fidl_next::Transport>::SendBuffer,
9217 >,
9218 ) -> ::fidl_next::SendFuture<'_, ___T>
9219 where
9220 <___T as ::fidl_next::Transport>::SendBuffer:
9221 ::fidl_next::encoder::InternalHandleEncoder,
9222 <___T as ::fidl_next::Transport>::SendBuffer:
9223 ::fdomain_client::fidl_next::HandleEncoder,
9224 {
9225 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
9226 flags,
9227
9228 object,
9229 })
9230 }
9231
9232 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9233 pub fn deprecated_clone_with<___R>(
9234 &self,
9235 request: ___R,
9236 ) -> ::fidl_next::SendFuture<'_, ___T>
9237 where
9238 ___R: ::fidl_next::Encode<
9239 crate::wire::NodeDeprecatedCloneRequest,
9240 <___T as ::fidl_next::Transport>::SendBuffer,
9241 >,
9242 {
9243 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9244 6512600400724287855,
9245 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
9246 request,
9247 ))
9248 }
9249
9250 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
9251 pub fn deprecated_get_attr(
9252 &self,
9253 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
9254 ::fidl_next::TwoWayFuture::from_untyped(
9255 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9256 8689798978500614909,
9257 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
9258 (),
9259 ),
9260 )
9261 }
9262
9263 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9264 pub fn deprecated_set_attr(
9265 &self,
9266
9267 flags: impl ::fidl_next::Encode<
9268 crate::wire::NodeAttributeFlags,
9269 <___T as ::fidl_next::Transport>::SendBuffer,
9270 >,
9271
9272 attributes: impl ::fidl_next::Encode<
9273 crate::wire::NodeAttributes,
9274 <___T as ::fidl_next::Transport>::SendBuffer,
9275 >,
9276 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
9277 where
9278 <___T as ::fidl_next::Transport>::SendBuffer:
9279 ::fidl_next::encoder::InternalHandleEncoder,
9280 {
9281 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
9282 flags,
9283
9284 attributes,
9285 })
9286 }
9287
9288 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9289 pub fn deprecated_set_attr_with<___R>(
9290 &self,
9291 request: ___R,
9292 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
9293 where
9294 ___R: ::fidl_next::Encode<
9295 crate::wire::NodeDeprecatedSetAttrRequest,
9296 <___T as ::fidl_next::Transport>::SendBuffer,
9297 >,
9298 {
9299 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9300 4721673413776871238,
9301 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
9302 request,
9303 ))
9304 }
9305
9306 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
9307 pub fn deprecated_get_flags(
9308 &self,
9309 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
9310 ::fidl_next::TwoWayFuture::from_untyped(
9311 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9312 6595803110182632097,
9313 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
9314 (),
9315 ),
9316 )
9317 }
9318
9319 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9320 pub fn deprecated_set_flags(
9321 &self,
9322
9323 flags: impl ::fidl_next::Encode<
9324 crate::wire::OpenFlags,
9325 <___T as ::fidl_next::Transport>::SendBuffer,
9326 >,
9327 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
9328 where
9329 <___T as ::fidl_next::Transport>::SendBuffer:
9330 ::fidl_next::encoder::InternalHandleEncoder,
9331 {
9332 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
9333 flags,
9334 })
9335 }
9336
9337 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9338 pub fn deprecated_set_flags_with<___R>(
9339 &self,
9340 request: ___R,
9341 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
9342 where
9343 ___R: ::fidl_next::Encode<
9344 crate::wire::NodeDeprecatedSetFlagsRequest,
9345 <___T as ::fidl_next::Transport>::SendBuffer,
9346 >,
9347 {
9348 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9349 5950864159036794675,
9350 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
9351 request,
9352 ))
9353 }
9354
9355 #[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"]
9356 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
9357 ::fidl_next::TwoWayFuture::from_untyped(
9358 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9359 105530239381466147,
9360 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
9361 (),
9362 ),
9363 )
9364 }
9365
9366 #[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"]
9367 pub fn set_flags(
9368 &self,
9369
9370 flags: impl ::fidl_next::Encode<
9371 crate::wire::Flags,
9372 <___T as ::fidl_next::Transport>::SendBuffer,
9373 >,
9374 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
9375 where
9376 <___T as ::fidl_next::Transport>::SendBuffer:
9377 ::fidl_next::encoder::InternalHandleEncoder,
9378 {
9379 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
9380 }
9381
9382 #[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"]
9383 pub fn set_flags_with<___R>(
9384 &self,
9385 request: ___R,
9386 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
9387 where
9388 ___R: ::fidl_next::Encode<
9389 crate::wire::NodeSetFlagsRequest,
9390 <___T as ::fidl_next::Transport>::SendBuffer,
9391 >,
9392 {
9393 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9394 6172186066099445416,
9395 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
9396 request,
9397 ))
9398 }
9399
9400 #[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"]
9401 pub fn query_filesystem(
9402 &self,
9403 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
9404 ::fidl_next::TwoWayFuture::from_untyped(
9405 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9406 8013111122914313744,
9407 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
9408 (),
9409 ),
9410 )
9411 }
9412
9413 #[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"]
9414 pub fn get_attributes(
9415 &self,
9416
9417 query: impl ::fidl_next::Encode<
9418 crate::wire::NodeAttributesQuery,
9419 <___T as ::fidl_next::Transport>::SendBuffer,
9420 >,
9421 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
9422 where
9423 <___T as ::fidl_next::Transport>::SendBuffer:
9424 ::fidl_next::encoder::InternalHandleEncoder,
9425 {
9426 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
9427 }
9428
9429 #[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"]
9430 pub fn get_attributes_with<___R>(
9431 &self,
9432 request: ___R,
9433 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
9434 where
9435 ___R: ::fidl_next::Encode<
9436 crate::wire::NodeGetAttributesRequest,
9437 <___T as ::fidl_next::Transport>::SendBuffer,
9438 >,
9439 {
9440 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9441 4414537700416816443,
9442 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
9443 request,
9444 ))
9445 }
9446
9447 #[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"]
9448 pub fn update_attributes_with<___R>(
9449 &self,
9450 request: ___R,
9451 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
9452 where
9453 ___R: ::fidl_next::Encode<
9454 crate::wire::MutableNodeAttributes<'static>,
9455 <___T as ::fidl_next::Transport>::SendBuffer,
9456 >,
9457 {
9458 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9459 3677402239314018056,
9460 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
9461 request,
9462 ))
9463 }
9464
9465 #[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"]
9466 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
9467 ::fidl_next::TwoWayFuture::from_untyped(
9468 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9469 3196473584242777161,
9470 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
9471 (),
9472 ),
9473 )
9474 }
9475
9476 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
9477 pub fn list_extended_attributes(
9478 &self,
9479
9480 iterator: impl ::fidl_next::Encode<
9481 ::fidl_next::ServerEnd<
9482 crate::ExtendedAttributeIterator,
9483 ::fdomain_client::fidl_next::wire::Handle,
9484 >,
9485 <___T as ::fidl_next::Transport>::SendBuffer,
9486 >,
9487 ) -> ::fidl_next::SendFuture<'_, ___T>
9488 where
9489 <___T as ::fidl_next::Transport>::SendBuffer:
9490 ::fidl_next::encoder::InternalHandleEncoder,
9491 <___T as ::fidl_next::Transport>::SendBuffer:
9492 ::fdomain_client::fidl_next::HandleEncoder,
9493 {
9494 self.list_extended_attributes_with(
9495 crate::generic::NodeListExtendedAttributesRequest { iterator },
9496 )
9497 }
9498
9499 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
9500 pub fn list_extended_attributes_with<___R>(
9501 &self,
9502 request: ___R,
9503 ) -> ::fidl_next::SendFuture<'_, ___T>
9504 where
9505 ___R: ::fidl_next::Encode<
9506 crate::wire::NodeListExtendedAttributesRequest,
9507 <___T as ::fidl_next::Transport>::SendBuffer,
9508 >,
9509 {
9510 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9511 5431626189872037072,
9512 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
9513 request,
9514 ))
9515 }
9516
9517 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
9518 pub fn get_extended_attribute(
9519 &self,
9520
9521 name: impl ::fidl_next::Encode<
9522 ::fidl_next::wire::Vector<'static, u8>,
9523 <___T as ::fidl_next::Transport>::SendBuffer,
9524 >,
9525 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
9526 where
9527 <___T as ::fidl_next::Transport>::SendBuffer:
9528 ::fidl_next::encoder::InternalHandleEncoder,
9529 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9530 {
9531 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
9532 name,
9533 })
9534 }
9535
9536 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
9537 pub fn get_extended_attribute_with<___R>(
9538 &self,
9539 request: ___R,
9540 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
9541 where
9542 ___R: ::fidl_next::Encode<
9543 crate::wire::NodeGetExtendedAttributeRequest<'static>,
9544 <___T as ::fidl_next::Transport>::SendBuffer,
9545 >,
9546 {
9547 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9548 5043930208506967771,
9549 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
9550 request,
9551 ))
9552 }
9553
9554 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
9555 pub fn set_extended_attribute(
9556 &self,
9557
9558 name: impl ::fidl_next::Encode<
9559 ::fidl_next::wire::Vector<'static, u8>,
9560 <___T as ::fidl_next::Transport>::SendBuffer,
9561 >,
9562
9563 value: impl ::fidl_next::Encode<
9564 crate::wire::ExtendedAttributeValue<'static>,
9565 <___T as ::fidl_next::Transport>::SendBuffer,
9566 >,
9567
9568 mode: impl ::fidl_next::Encode<
9569 crate::wire::SetExtendedAttributeMode,
9570 <___T as ::fidl_next::Transport>::SendBuffer,
9571 >,
9572 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
9573 where
9574 <___T as ::fidl_next::Transport>::SendBuffer:
9575 ::fidl_next::encoder::InternalHandleEncoder,
9576 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9577 <___T as ::fidl_next::Transport>::SendBuffer:
9578 ::fdomain_client::fidl_next::HandleEncoder,
9579 {
9580 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
9581 name,
9582
9583 value,
9584
9585 mode,
9586 })
9587 }
9588
9589 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
9590 pub fn set_extended_attribute_with<___R>(
9591 &self,
9592 request: ___R,
9593 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
9594 where
9595 ___R: ::fidl_next::Encode<
9596 crate::wire::NodeSetExtendedAttributeRequest<'static>,
9597 <___T as ::fidl_next::Transport>::SendBuffer,
9598 >,
9599 {
9600 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9601 5374223046099989052,
9602 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
9603 request,
9604 ))
9605 }
9606
9607 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
9608 pub fn remove_extended_attribute(
9609 &self,
9610
9611 name: impl ::fidl_next::Encode<
9612 ::fidl_next::wire::Vector<'static, u8>,
9613 <___T as ::fidl_next::Transport>::SendBuffer,
9614 >,
9615 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
9616 where
9617 <___T as ::fidl_next::Transport>::SendBuffer:
9618 ::fidl_next::encoder::InternalHandleEncoder,
9619 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9620 {
9621 self.remove_extended_attribute_with(
9622 crate::generic::NodeRemoveExtendedAttributeRequest { name },
9623 )
9624 }
9625
9626 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
9627 pub fn remove_extended_attribute_with<___R>(
9628 &self,
9629 request: ___R,
9630 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
9631 where
9632 ___R: ::fidl_next::Encode<
9633 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
9634 <___T as ::fidl_next::Transport>::SendBuffer,
9635 >,
9636 {
9637 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9638 8794297771444732717,
9639 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
9640 request,
9641 ))
9642 }
9643
9644 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
9645 pub fn deprecated_open(
9646 &self,
9647
9648 flags: impl ::fidl_next::Encode<
9649 crate::wire::OpenFlags,
9650 <___T as ::fidl_next::Transport>::SendBuffer,
9651 >,
9652
9653 mode: impl ::fidl_next::Encode<
9654 crate::wire::ModeType,
9655 <___T as ::fidl_next::Transport>::SendBuffer,
9656 >,
9657
9658 path: impl ::fidl_next::Encode<
9659 ::fidl_next::wire::String<'static>,
9660 <___T as ::fidl_next::Transport>::SendBuffer,
9661 >,
9662
9663 object: impl ::fidl_next::Encode<
9664 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
9665 <___T as ::fidl_next::Transport>::SendBuffer,
9666 >,
9667 ) -> ::fidl_next::SendFuture<'_, ___T>
9668 where
9669 <___T as ::fidl_next::Transport>::SendBuffer:
9670 ::fidl_next::encoder::InternalHandleEncoder,
9671 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9672 <___T as ::fidl_next::Transport>::SendBuffer:
9673 ::fdomain_client::fidl_next::HandleEncoder,
9674 {
9675 self.deprecated_open_with(crate::generic::DirectoryDeprecatedOpenRequest {
9676 flags,
9677
9678 mode,
9679
9680 path,
9681
9682 object,
9683 })
9684 }
9685
9686 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
9687 pub fn deprecated_open_with<___R>(
9688 &self,
9689 request: ___R,
9690 ) -> ::fidl_next::SendFuture<'_, ___T>
9691 where
9692 ___R: ::fidl_next::Encode<
9693 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
9694 <___T as ::fidl_next::Transport>::SendBuffer,
9695 >,
9696 {
9697 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9698 3193127272456937152,
9699 <super::DeprecatedOpen as ::fidl_next::Method>::FLEXIBILITY,
9700 request,
9701 ))
9702 }
9703
9704 #[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"]
9705 pub fn open(
9706 &self,
9707
9708 path: impl ::fidl_next::Encode<
9709 ::fidl_next::wire::String<'static>,
9710 <___T as ::fidl_next::Transport>::SendBuffer,
9711 >,
9712
9713 flags: impl ::fidl_next::Encode<
9714 crate::wire::Flags,
9715 <___T as ::fidl_next::Transport>::SendBuffer,
9716 >,
9717
9718 options: impl ::fidl_next::Encode<
9719 crate::wire::Options<'static>,
9720 <___T as ::fidl_next::Transport>::SendBuffer,
9721 >,
9722
9723 object: impl ::fidl_next::Encode<
9724 ::fdomain_client::fidl_next::wire::Handle,
9725 <___T as ::fidl_next::Transport>::SendBuffer,
9726 >,
9727 ) -> ::fidl_next::SendFuture<'_, ___T>
9728 where
9729 <___T as ::fidl_next::Transport>::SendBuffer:
9730 ::fidl_next::encoder::InternalHandleEncoder,
9731 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9732 <___T as ::fidl_next::Transport>::SendBuffer:
9733 ::fdomain_client::fidl_next::HandleEncoder,
9734 {
9735 self.open_with(crate::generic::DirectoryOpenRequest {
9736 path,
9737
9738 flags,
9739
9740 options,
9741
9742 object,
9743 })
9744 }
9745
9746 #[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"]
9747 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
9748 where
9749 ___R: ::fidl_next::Encode<
9750 crate::wire::DirectoryOpenRequest<'static>,
9751 <___T as ::fidl_next::Transport>::SendBuffer,
9752 >,
9753 {
9754 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9755 6236883748953765593,
9756 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
9757 request,
9758 ))
9759 }
9760
9761 #[doc = " Reads a collection of variably sized dirents into a buffer.\n The number of dirents in a directory may be very large: akin to\n calling read multiple times on a file, directories have a seek\n offset which is updated on subsequent calls to ReadDirents.\n Each call to ReadDirents will only return whole dirent structures,\n they will not get split across ReadDirent calls. When the seek\n offset reaches the end, `dirents` will be empty.\n\n These dirents are of the form:\n ```\n struct dirent {\n // Describes the inode of the entry.\n uint64 ino;\n // Describes the length of the dirent name in bytes.\n uint8 size;\n // Describes the type of the entry. Aligned with the\n // POSIX d_type values. Use `DirentType` constants.\n uint8 type;\n // Unterminated name of entry.\n char name[0];\n }\n ```\n\n This method does not require any rights, since one could always probe for\n directory contents by triggering name conflicts during file creation.\n"]
9762 pub fn read_dirents(
9763 &self,
9764
9765 max_bytes: impl ::fidl_next::Encode<
9766 ::fidl_next::wire::Uint64,
9767 <___T as ::fidl_next::Transport>::SendBuffer,
9768 >,
9769 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
9770 where
9771 <___T as ::fidl_next::Transport>::SendBuffer:
9772 ::fidl_next::encoder::InternalHandleEncoder,
9773 {
9774 self.read_dirents_with(crate::generic::DirectoryReadDirentsRequest { max_bytes })
9775 }
9776
9777 #[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"]
9778 pub fn read_dirents_with<___R>(
9779 &self,
9780 request: ___R,
9781 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
9782 where
9783 ___R: ::fidl_next::Encode<
9784 crate::wire::DirectoryReadDirentsRequest,
9785 <___T as ::fidl_next::Transport>::SendBuffer,
9786 >,
9787 {
9788 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9789 3855785432100874762,
9790 <super::ReadDirents as ::fidl_next::Method>::FLEXIBILITY,
9791 request,
9792 ))
9793 }
9794
9795 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
9796 pub fn rewind(&self) -> ::fidl_next::TwoWayFuture<'_, super::Rewind, ___T> {
9797 ::fidl_next::TwoWayFuture::from_untyped(
9798 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9799 1635123508515392625,
9800 <super::Rewind as ::fidl_next::Method>::FLEXIBILITY,
9801 (),
9802 ),
9803 )
9804 }
9805
9806 #[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"]
9807 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
9808 ::fidl_next::TwoWayFuture::from_untyped(
9809 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9810 2787337947777369685,
9811 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
9812 (),
9813 ),
9814 )
9815 }
9816
9817 #[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"]
9818 pub fn link(
9819 &self,
9820
9821 src: impl ::fidl_next::Encode<
9822 ::fidl_next::wire::String<'static>,
9823 <___T as ::fidl_next::Transport>::SendBuffer,
9824 >,
9825
9826 dst_parent_token: impl ::fidl_next::Encode<
9827 ::fdomain_client::fidl_next::wire::Handle,
9828 <___T as ::fidl_next::Transport>::SendBuffer,
9829 >,
9830
9831 dst: impl ::fidl_next::Encode<
9832 ::fidl_next::wire::String<'static>,
9833 <___T as ::fidl_next::Transport>::SendBuffer,
9834 >,
9835 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
9836 where
9837 <___T as ::fidl_next::Transport>::SendBuffer:
9838 ::fidl_next::encoder::InternalHandleEncoder,
9839 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9840 <___T as ::fidl_next::Transport>::SendBuffer:
9841 ::fdomain_client::fidl_next::HandleEncoder,
9842 {
9843 self.link_with(crate::generic::DirectoryLinkRequest { src, dst_parent_token, dst })
9844 }
9845
9846 #[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"]
9847 pub fn link_with<___R>(
9848 &self,
9849 request: ___R,
9850 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
9851 where
9852 ___R: ::fidl_next::Encode<
9853 crate::wire::DirectoryLinkRequest<'static>,
9854 <___T as ::fidl_next::Transport>::SendBuffer,
9855 >,
9856 {
9857 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9858 8360374984291987687,
9859 <super::Link as ::fidl_next::Method>::FLEXIBILITY,
9860 request,
9861 ))
9862 }
9863
9864 #[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"]
9865 pub fn unlink(
9866 &self,
9867
9868 name: impl ::fidl_next::Encode<
9869 ::fidl_next::wire::String<'static>,
9870 <___T as ::fidl_next::Transport>::SendBuffer,
9871 >,
9872
9873 options: impl ::fidl_next::Encode<
9874 crate::wire::UnlinkOptions<'static>,
9875 <___T as ::fidl_next::Transport>::SendBuffer,
9876 >,
9877 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
9878 where
9879 <___T as ::fidl_next::Transport>::SendBuffer:
9880 ::fidl_next::encoder::InternalHandleEncoder,
9881 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9882 {
9883 self.unlink_with(crate::generic::DirectoryUnlinkRequest { name, options })
9884 }
9885
9886 #[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"]
9887 pub fn unlink_with<___R>(
9888 &self,
9889 request: ___R,
9890 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
9891 where
9892 ___R: ::fidl_next::Encode<
9893 crate::wire::DirectoryUnlinkRequest<'static>,
9894 <___T as ::fidl_next::Transport>::SendBuffer,
9895 >,
9896 {
9897 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9898 8433556716759383021,
9899 <super::Unlink as ::fidl_next::Method>::FLEXIBILITY,
9900 request,
9901 ))
9902 }
9903
9904 #[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"]
9905 pub fn rename(
9906 &self,
9907
9908 src: impl ::fidl_next::Encode<
9909 ::fidl_next::wire::String<'static>,
9910 <___T as ::fidl_next::Transport>::SendBuffer,
9911 >,
9912
9913 dst_parent_token: impl ::fidl_next::Encode<
9914 ::fdomain_client::fidl_next::wire::Handle,
9915 <___T as ::fidl_next::Transport>::SendBuffer,
9916 >,
9917
9918 dst: impl ::fidl_next::Encode<
9919 ::fidl_next::wire::String<'static>,
9920 <___T as ::fidl_next::Transport>::SendBuffer,
9921 >,
9922 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
9923 where
9924 <___T as ::fidl_next::Transport>::SendBuffer:
9925 ::fidl_next::encoder::InternalHandleEncoder,
9926 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9927 <___T as ::fidl_next::Transport>::SendBuffer:
9928 ::fdomain_client::fidl_next::HandleEncoder,
9929 {
9930 self.rename_with(crate::generic::DirectoryRenameRequest {
9931 src,
9932
9933 dst_parent_token,
9934
9935 dst,
9936 })
9937 }
9938
9939 #[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"]
9940 pub fn rename_with<___R>(
9941 &self,
9942 request: ___R,
9943 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
9944 where
9945 ___R: ::fidl_next::Encode<
9946 crate::wire::DirectoryRenameRequest<'static>,
9947 <___T as ::fidl_next::Transport>::SendBuffer,
9948 >,
9949 {
9950 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9951 8097726607824333022,
9952 <super::Rename as ::fidl_next::Method>::FLEXIBILITY,
9953 request,
9954 ))
9955 }
9956
9957 #[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"]
9958 pub fn create_symlink(
9959 &self,
9960
9961 name: impl ::fidl_next::Encode<
9962 ::fidl_next::wire::String<'static>,
9963 <___T as ::fidl_next::Transport>::SendBuffer,
9964 >,
9965
9966 target: impl ::fidl_next::Encode<
9967 ::fidl_next::wire::Vector<'static, u8>,
9968 <___T as ::fidl_next::Transport>::SendBuffer,
9969 >,
9970
9971 connection: impl ::fidl_next::Encode<
9972 ::fidl_next::ServerEnd<
9973 crate::Symlink,
9974 ::fdomain_client::fidl_next::wire::OptionalHandle,
9975 >,
9976 <___T as ::fidl_next::Transport>::SendBuffer,
9977 >,
9978 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
9979 where
9980 <___T as ::fidl_next::Transport>::SendBuffer:
9981 ::fidl_next::encoder::InternalHandleEncoder,
9982 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9983 <___T as ::fidl_next::Transport>::SendBuffer:
9984 ::fdomain_client::fidl_next::HandleEncoder,
9985 {
9986 self.create_symlink_with(crate::generic::DirectoryCreateSymlinkRequest {
9987 name,
9988
9989 target,
9990
9991 connection,
9992 })
9993 }
9994
9995 #[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"]
9996 pub fn create_symlink_with<___R>(
9997 &self,
9998 request: ___R,
9999 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
10000 where
10001 ___R: ::fidl_next::Encode<
10002 crate::wire::DirectoryCreateSymlinkRequest<'static>,
10003 <___T as ::fidl_next::Transport>::SendBuffer,
10004 >,
10005 {
10006 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10007 2435901052462315657,
10008 <super::CreateSymlink as ::fidl_next::Method>::FLEXIBILITY,
10009 request,
10010 ))
10011 }
10012
10013 #[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"]
10014 pub fn watch(
10015 &self,
10016
10017 mask: impl ::fidl_next::Encode<
10018 crate::wire::WatchMask,
10019 <___T as ::fidl_next::Transport>::SendBuffer,
10020 >,
10021
10022 options: impl ::fidl_next::Encode<
10023 ::fidl_next::wire::Uint32,
10024 <___T as ::fidl_next::Transport>::SendBuffer,
10025 >,
10026
10027 watcher: impl ::fidl_next::Encode<
10028 ::fidl_next::ServerEnd<
10029 crate::DirectoryWatcher,
10030 ::fdomain_client::fidl_next::wire::Handle,
10031 >,
10032 <___T as ::fidl_next::Transport>::SendBuffer,
10033 >,
10034 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
10035 where
10036 <___T as ::fidl_next::Transport>::SendBuffer:
10037 ::fidl_next::encoder::InternalHandleEncoder,
10038 <___T as ::fidl_next::Transport>::SendBuffer:
10039 ::fdomain_client::fidl_next::HandleEncoder,
10040 {
10041 self.watch_with(crate::generic::DirectoryWatchRequest { mask, options, watcher })
10042 }
10043
10044 #[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"]
10045 pub fn watch_with<___R>(
10046 &self,
10047 request: ___R,
10048 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
10049 where
10050 ___R: ::fidl_next::Encode<
10051 crate::wire::DirectoryWatchRequest,
10052 <___T as ::fidl_next::Transport>::SendBuffer,
10053 >,
10054 {
10055 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10056 6275512344170098065,
10057 <super::Watch as ::fidl_next::Method>::FLEXIBILITY,
10058 request,
10059 ))
10060 }
10061 }
10062
10063 #[repr(transparent)]
10065 pub struct DirectoryServer<___T: ::fidl_next::Transport> {
10066 server: ::fidl_next::protocol::Server<___T>,
10067 }
10068
10069 impl<___T> DirectoryServer<___T>
10070 where
10071 ___T: ::fidl_next::Transport,
10072 {
10073 #[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"]
10074 pub fn on_open(
10075 &self,
10076
10077 s: impl ::fidl_next::Encode<
10078 ::fidl_next::wire::Int32,
10079 <___T as ::fidl_next::Transport>::SendBuffer,
10080 >,
10081
10082 info: impl ::fidl_next::Encode<
10083 crate::wire_optional::NodeInfoDeprecated<'static>,
10084 <___T as ::fidl_next::Transport>::SendBuffer,
10085 >,
10086 ) -> ::fidl_next::SendFuture<'_, ___T>
10087 where
10088 <___T as ::fidl_next::Transport>::SendBuffer:
10089 ::fidl_next::encoder::InternalHandleEncoder,
10090 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10091 <___T as ::fidl_next::Transport>::SendBuffer:
10092 ::fdomain_client::fidl_next::HandleEncoder,
10093 {
10094 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
10095 }
10096
10097 #[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"]
10098
10099 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
10100 where
10101 ___R: ::fidl_next::Encode<
10102 <super::OnOpen as ::fidl_next::Method>::Request,
10103 <___T as ::fidl_next::Transport>::SendBuffer,
10104 >,
10105 {
10106 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
10107 9207534335756671346,
10108 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
10109 request,
10110 ))
10111 }
10112
10113 #[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"]
10114
10115 pub fn on_representation_with<___R>(
10116 &self,
10117 request: ___R,
10118 ) -> ::fidl_next::SendFuture<'_, ___T>
10119 where
10120 ___R: ::fidl_next::Encode<
10121 <super::OnRepresentation as ::fidl_next::Method>::Request,
10122 <___T as ::fidl_next::Transport>::SendBuffer,
10123 >,
10124 {
10125 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
10126 6679970090861613324,
10127 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
10128 request,
10129 ))
10130 }
10131 }
10132 }
10133}
10134
10135#[diagnostic::on_unimplemented(
10136 note = "If {Self} implements the non-local DirectoryClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
10137)]
10138
10139pub trait DirectoryLocalClientHandler<
10143 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
10144 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10145>
10146{
10147 #[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"]
10148 fn on_open(
10149 &mut self,
10150
10151 request: ::fidl_next::Request<directory::OnOpen, ___T>,
10152 ) -> impl ::core::future::Future<Output = ()>;
10153
10154 #[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"]
10155 fn on_representation(
10156 &mut self,
10157
10158 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
10159 ) -> impl ::core::future::Future<Output = ()>;
10160
10161 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10162 ::core::future::ready(())
10163 }
10164}
10165
10166impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Directory
10167where
10168 ___H: DirectoryLocalClientHandler<___T>,
10169 ___T: ::fidl_next::Transport,
10170 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
10171 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10172 Constraint = (),
10173 >,
10174 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
10175 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10176 Constraint = (),
10177 >,
10178{
10179 async fn on_event(
10180 handler: &mut ___H,
10181 ordinal: u64,
10182 flexibility: ::fidl_next::protocol::Flexibility,
10183 body: ::fidl_next::Body<___T>,
10184 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10185 match ordinal {
10186 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10187 Ok(decoded) => {
10188 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
10189 Ok(())
10190 }
10191 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10192 ordinal: 9207534335756671346,
10193 error,
10194 }),
10195 },
10196
10197 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10198 Ok(decoded) => {
10199 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
10200 Ok(())
10201 }
10202 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10203 ordinal: 6679970090861613324,
10204 error,
10205 }),
10206 },
10207
10208 ordinal => {
10209 handler.on_unknown_interaction(ordinal).await;
10210 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10211 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10212 } else {
10213 Ok(())
10214 }
10215 }
10216 }
10217 }
10218}
10219
10220#[diagnostic::on_unimplemented(
10221 note = "If {Self} implements the non-local DirectoryServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
10222)]
10223
10224pub trait DirectoryLocalServerHandler<
10228 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
10229 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10230>
10231{
10232 #[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"]
10233 fn advisory_lock(
10234 &mut self,
10235
10236 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
10237
10238 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
10239 ) -> impl ::core::future::Future<Output = ()>;
10240
10241 fn clone(
10242 &mut self,
10243
10244 request: ::fidl_next::Request<directory::Clone, ___T>,
10245 ) -> impl ::core::future::Future<Output = ()>;
10246
10247 #[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"]
10248 fn close(
10249 &mut self,
10250
10251 responder: ::fidl_next::Responder<directory::Close, ___T>,
10252 ) -> impl ::core::future::Future<Output = ()>;
10253
10254 fn query(
10255 &mut self,
10256
10257 responder: ::fidl_next::Responder<directory::Query, ___T>,
10258 ) -> impl ::core::future::Future<Output = ()>;
10259
10260 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
10261 fn deprecated_clone(
10262 &mut self,
10263
10264 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
10265 ) -> impl ::core::future::Future<Output = ()>;
10266
10267 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
10268 fn deprecated_get_attr(
10269 &mut self,
10270
10271 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
10272 ) -> impl ::core::future::Future<Output = ()>;
10273
10274 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
10275 fn deprecated_set_attr(
10276 &mut self,
10277
10278 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
10279
10280 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
10281 ) -> impl ::core::future::Future<Output = ()>;
10282
10283 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
10284 fn deprecated_get_flags(
10285 &mut self,
10286
10287 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
10288 ) -> impl ::core::future::Future<Output = ()>;
10289
10290 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
10291 fn deprecated_set_flags(
10292 &mut self,
10293
10294 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
10295
10296 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
10297 ) -> impl ::core::future::Future<Output = ()>;
10298
10299 #[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"]
10300 fn get_flags(
10301 &mut self,
10302
10303 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
10304 ) -> impl ::core::future::Future<Output = ()>;
10305
10306 #[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"]
10307 fn set_flags(
10308 &mut self,
10309
10310 request: ::fidl_next::Request<directory::SetFlags, ___T>,
10311
10312 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
10313 ) -> impl ::core::future::Future<Output = ()>;
10314
10315 #[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"]
10316 fn query_filesystem(
10317 &mut self,
10318
10319 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
10320 ) -> impl ::core::future::Future<Output = ()>;
10321
10322 #[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"]
10323 fn get_attributes(
10324 &mut self,
10325
10326 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
10327
10328 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
10329 ) -> impl ::core::future::Future<Output = ()>;
10330
10331 #[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"]
10332 fn update_attributes(
10333 &mut self,
10334
10335 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
10336
10337 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
10338 ) -> impl ::core::future::Future<Output = ()>;
10339
10340 #[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"]
10341 fn sync(
10342 &mut self,
10343
10344 responder: ::fidl_next::Responder<directory::Sync, ___T>,
10345 ) -> impl ::core::future::Future<Output = ()>;
10346
10347 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
10348 fn list_extended_attributes(
10349 &mut self,
10350
10351 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
10352 ) -> impl ::core::future::Future<Output = ()>;
10353
10354 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
10355 fn get_extended_attribute(
10356 &mut self,
10357
10358 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
10359
10360 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
10361 ) -> impl ::core::future::Future<Output = ()>;
10362
10363 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
10364 fn set_extended_attribute(
10365 &mut self,
10366
10367 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
10368
10369 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
10370 ) -> impl ::core::future::Future<Output = ()>;
10371
10372 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
10373 fn remove_extended_attribute(
10374 &mut self,
10375
10376 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
10377
10378 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
10379 ) -> impl ::core::future::Future<Output = ()>;
10380
10381 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
10382 fn deprecated_open(
10383 &mut self,
10384
10385 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
10386 ) -> impl ::core::future::Future<Output = ()>;
10387
10388 #[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"]
10389 fn open(
10390 &mut self,
10391
10392 request: ::fidl_next::Request<directory::Open, ___T>,
10393 ) -> impl ::core::future::Future<Output = ()>;
10394
10395 #[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"]
10396 fn read_dirents(
10397 &mut self,
10398
10399 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
10400
10401 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
10402 ) -> impl ::core::future::Future<Output = ()>;
10403
10404 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
10405 fn rewind(
10406 &mut self,
10407
10408 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
10409 ) -> impl ::core::future::Future<Output = ()>;
10410
10411 #[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"]
10412 fn get_token(
10413 &mut self,
10414
10415 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
10416 ) -> impl ::core::future::Future<Output = ()>;
10417
10418 #[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"]
10419 fn link(
10420 &mut self,
10421
10422 request: ::fidl_next::Request<directory::Link, ___T>,
10423
10424 responder: ::fidl_next::Responder<directory::Link, ___T>,
10425 ) -> impl ::core::future::Future<Output = ()>;
10426
10427 #[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"]
10428 fn unlink(
10429 &mut self,
10430
10431 request: ::fidl_next::Request<directory::Unlink, ___T>,
10432
10433 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
10434 ) -> impl ::core::future::Future<Output = ()>;
10435
10436 #[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"]
10437 fn rename(
10438 &mut self,
10439
10440 request: ::fidl_next::Request<directory::Rename, ___T>,
10441
10442 responder: ::fidl_next::Responder<directory::Rename, ___T>,
10443 ) -> impl ::core::future::Future<Output = ()>;
10444
10445 #[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"]
10446 fn create_symlink(
10447 &mut self,
10448
10449 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
10450
10451 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
10452 ) -> impl ::core::future::Future<Output = ()>;
10453
10454 #[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"]
10455 fn watch(
10456 &mut self,
10457
10458 request: ::fidl_next::Request<directory::Watch, ___T>,
10459
10460 responder: ::fidl_next::Responder<directory::Watch, ___T>,
10461 ) -> impl ::core::future::Future<Output = ()>;
10462
10463 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10464 ::core::future::ready(())
10465 }
10466}
10467
10468impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Directory
10469where
10470 ___H: DirectoryLocalServerHandler<___T>,
10471 ___T: ::fidl_next::Transport,
10472 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
10473 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10474 Constraint = (),
10475 >,
10476 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
10477 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10478 Constraint = (),
10479 >,
10480 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
10481 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10482 Constraint = (),
10483 >,
10484 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
10485 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10486 Constraint = (),
10487 >,
10488 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
10489 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10490 Constraint = (),
10491 >,
10492 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
10493 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10494 Constraint = (),
10495 >,
10496 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
10497 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10498 Constraint = (),
10499 >,
10500 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
10501 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10502 Constraint = (),
10503 >,
10504 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
10505 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10506 Constraint = (),
10507 >,
10508 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
10509 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10510 Constraint = (),
10511 >,
10512 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
10513 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10514 Constraint = (),
10515 >,
10516 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
10517 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10518 Constraint = (),
10519 >,
10520 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
10521 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10522 Constraint = (),
10523 >,
10524 for<'de> crate::wire::DirectoryOpenRequest<'de>: ::fidl_next::Decode<
10525 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10526 Constraint = (),
10527 >,
10528 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
10529 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10530 Constraint = (),
10531 >,
10532 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
10533 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10534 Constraint = (),
10535 >,
10536 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
10537 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10538 Constraint = (),
10539 >,
10540 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
10541 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10542 Constraint = (),
10543 >,
10544 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
10545 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10546 Constraint = (),
10547 >,
10548 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
10549 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10550 Constraint = (),
10551 >,
10552{
10553 async fn on_one_way(
10554 handler: &mut ___H,
10555 ordinal: u64,
10556 flexibility: ::fidl_next::protocol::Flexibility,
10557 body: ::fidl_next::Body<___T>,
10558 ) -> ::core::result::Result<
10559 (),
10560 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10561 > {
10562 match ordinal {
10563 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10564 Ok(decoded) => {
10565 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
10566 Ok(())
10567 }
10568 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10569 ordinal: 2366825959783828089,
10570 error,
10571 }),
10572 },
10573
10574 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10575 Ok(decoded) => {
10576 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
10577 Ok(())
10578 }
10579 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10580 ordinal: 6512600400724287855,
10581 error,
10582 }),
10583 },
10584
10585 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10586 Ok(decoded) => {
10587 handler
10588 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
10589 .await;
10590 Ok(())
10591 }
10592 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10593 ordinal: 5431626189872037072,
10594 error,
10595 }),
10596 },
10597
10598 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10599 Ok(decoded) => {
10600 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
10601 Ok(())
10602 }
10603 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10604 ordinal: 3193127272456937152,
10605 error,
10606 }),
10607 },
10608
10609 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
10610 Ok(decoded) => {
10611 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
10612 Ok(())
10613 }
10614 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10615 ordinal: 6236883748953765593,
10616 error,
10617 }),
10618 },
10619
10620 ordinal => {
10621 handler.on_unknown_interaction(ordinal).await;
10622 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10623 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10624 } else {
10625 Ok(())
10626 }
10627 }
10628 }
10629 }
10630
10631 async fn on_two_way(
10632 handler: &mut ___H,
10633 ordinal: u64,
10634 flexibility: ::fidl_next::protocol::Flexibility,
10635 body: ::fidl_next::Body<___T>,
10636 responder: ::fidl_next::protocol::Responder<___T>,
10637 ) -> ::core::result::Result<
10638 (),
10639 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10640 > {
10641 match ordinal {
10642 7992130864415541162 => {
10643 let responder = ::fidl_next::Responder::from_untyped(responder);
10644
10645 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10646 Ok(decoded) => {
10647 handler
10648 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
10649 .await;
10650 Ok(())
10651 }
10652 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10653 ordinal: 7992130864415541162,
10654 error,
10655 }),
10656 }
10657 }
10658
10659 6540867515453498750 => {
10660 let responder = ::fidl_next::Responder::from_untyped(responder);
10661
10662 handler.close(responder).await;
10663 Ok(())
10664 }
10665
10666 2763219980499352582 => {
10667 let responder = ::fidl_next::Responder::from_untyped(responder);
10668
10669 handler.query(responder).await;
10670 Ok(())
10671 }
10672
10673 8689798978500614909 => {
10674 let responder = ::fidl_next::Responder::from_untyped(responder);
10675
10676 handler.deprecated_get_attr(responder).await;
10677 Ok(())
10678 }
10679
10680 4721673413776871238 => {
10681 let responder = ::fidl_next::Responder::from_untyped(responder);
10682
10683 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10684 Ok(decoded) => {
10685 handler
10686 .deprecated_set_attr(
10687 ::fidl_next::Request::from_decoded(decoded),
10688 responder,
10689 )
10690 .await;
10691 Ok(())
10692 }
10693 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10694 ordinal: 4721673413776871238,
10695 error,
10696 }),
10697 }
10698 }
10699
10700 6595803110182632097 => {
10701 let responder = ::fidl_next::Responder::from_untyped(responder);
10702
10703 handler.deprecated_get_flags(responder).await;
10704 Ok(())
10705 }
10706
10707 5950864159036794675 => {
10708 let responder = ::fidl_next::Responder::from_untyped(responder);
10709
10710 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10711 Ok(decoded) => {
10712 handler
10713 .deprecated_set_flags(
10714 ::fidl_next::Request::from_decoded(decoded),
10715 responder,
10716 )
10717 .await;
10718 Ok(())
10719 }
10720 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10721 ordinal: 5950864159036794675,
10722 error,
10723 }),
10724 }
10725 }
10726
10727 105530239381466147 => {
10728 let responder = ::fidl_next::Responder::from_untyped(responder);
10729
10730 handler.get_flags(responder).await;
10731 Ok(())
10732 }
10733
10734 6172186066099445416 => {
10735 let responder = ::fidl_next::Responder::from_untyped(responder);
10736
10737 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10738 Ok(decoded) => {
10739 handler
10740 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
10741 .await;
10742 Ok(())
10743 }
10744 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10745 ordinal: 6172186066099445416,
10746 error,
10747 }),
10748 }
10749 }
10750
10751 8013111122914313744 => {
10752 let responder = ::fidl_next::Responder::from_untyped(responder);
10753
10754 handler.query_filesystem(responder).await;
10755 Ok(())
10756 }
10757
10758 4414537700416816443 => {
10759 let responder = ::fidl_next::Responder::from_untyped(responder);
10760
10761 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10762 Ok(decoded) => {
10763 handler
10764 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
10765 .await;
10766 Ok(())
10767 }
10768 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10769 ordinal: 4414537700416816443,
10770 error,
10771 }),
10772 }
10773 }
10774
10775 3677402239314018056 => {
10776 let responder = ::fidl_next::Responder::from_untyped(responder);
10777
10778 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10779 Ok(decoded) => {
10780 handler
10781 .update_attributes(
10782 ::fidl_next::Request::from_decoded(decoded),
10783 responder,
10784 )
10785 .await;
10786 Ok(())
10787 }
10788 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10789 ordinal: 3677402239314018056,
10790 error,
10791 }),
10792 }
10793 }
10794
10795 3196473584242777161 => {
10796 let responder = ::fidl_next::Responder::from_untyped(responder);
10797
10798 handler.sync(responder).await;
10799 Ok(())
10800 }
10801
10802 5043930208506967771 => {
10803 let responder = ::fidl_next::Responder::from_untyped(responder);
10804
10805 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10806 Ok(decoded) => {
10807 handler
10808 .get_extended_attribute(
10809 ::fidl_next::Request::from_decoded(decoded),
10810 responder,
10811 )
10812 .await;
10813 Ok(())
10814 }
10815 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10816 ordinal: 5043930208506967771,
10817 error,
10818 }),
10819 }
10820 }
10821
10822 5374223046099989052 => {
10823 let responder = ::fidl_next::Responder::from_untyped(responder);
10824
10825 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10826 Ok(decoded) => {
10827 handler
10828 .set_extended_attribute(
10829 ::fidl_next::Request::from_decoded(decoded),
10830 responder,
10831 )
10832 .await;
10833 Ok(())
10834 }
10835 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10836 ordinal: 5374223046099989052,
10837 error,
10838 }),
10839 }
10840 }
10841
10842 8794297771444732717 => {
10843 let responder = ::fidl_next::Responder::from_untyped(responder);
10844
10845 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10846 Ok(decoded) => {
10847 handler
10848 .remove_extended_attribute(
10849 ::fidl_next::Request::from_decoded(decoded),
10850 responder,
10851 )
10852 .await;
10853 Ok(())
10854 }
10855 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10856 ordinal: 8794297771444732717,
10857 error,
10858 }),
10859 }
10860 }
10861
10862 3855785432100874762 => {
10863 let responder = ::fidl_next::Responder::from_untyped(responder);
10864
10865 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10866 Ok(decoded) => {
10867 handler
10868 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
10869 .await;
10870 Ok(())
10871 }
10872 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10873 ordinal: 3855785432100874762,
10874 error,
10875 }),
10876 }
10877 }
10878
10879 1635123508515392625 => {
10880 let responder = ::fidl_next::Responder::from_untyped(responder);
10881
10882 handler.rewind(responder).await;
10883 Ok(())
10884 }
10885
10886 2787337947777369685 => {
10887 let responder = ::fidl_next::Responder::from_untyped(responder);
10888
10889 handler.get_token(responder).await;
10890 Ok(())
10891 }
10892
10893 8360374984291987687 => {
10894 let responder = ::fidl_next::Responder::from_untyped(responder);
10895
10896 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10897 Ok(decoded) => {
10898 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
10899 Ok(())
10900 }
10901 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10902 ordinal: 8360374984291987687,
10903 error,
10904 }),
10905 }
10906 }
10907
10908 8433556716759383021 => {
10909 let responder = ::fidl_next::Responder::from_untyped(responder);
10910
10911 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10912 Ok(decoded) => {
10913 handler
10914 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
10915 .await;
10916 Ok(())
10917 }
10918 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10919 ordinal: 8433556716759383021,
10920 error,
10921 }),
10922 }
10923 }
10924
10925 8097726607824333022 => {
10926 let responder = ::fidl_next::Responder::from_untyped(responder);
10927
10928 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10929 Ok(decoded) => {
10930 handler
10931 .rename(::fidl_next::Request::from_decoded(decoded), responder)
10932 .await;
10933 Ok(())
10934 }
10935 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10936 ordinal: 8097726607824333022,
10937 error,
10938 }),
10939 }
10940 }
10941
10942 2435901052462315657 => {
10943 let responder = ::fidl_next::Responder::from_untyped(responder);
10944
10945 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10946 Ok(decoded) => {
10947 handler
10948 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
10949 .await;
10950 Ok(())
10951 }
10952 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10953 ordinal: 2435901052462315657,
10954 error,
10955 }),
10956 }
10957 }
10958
10959 6275512344170098065 => {
10960 let responder = ::fidl_next::Responder::from_untyped(responder);
10961
10962 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10963 Ok(decoded) => {
10964 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
10965 Ok(())
10966 }
10967 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10968 ordinal: 6275512344170098065,
10969 error,
10970 }),
10971 }
10972 }
10973
10974 ordinal => {
10975 handler.on_unknown_interaction(ordinal).await;
10976 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10977 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10978 } else {
10979 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
10980 ordinal,
10981 flexibility,
10982 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
10983 )
10984 .expect("encoding a framework error should never fail")
10985 .await?;
10986 Ok(())
10987 }
10988 }
10989 }
10990 }
10991}
10992
10993pub trait DirectoryClientHandler<
10997 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
10998 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10999>
11000{
11001 #[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"]
11002 fn on_open(
11003 &mut self,
11004
11005 request: ::fidl_next::Request<directory::OnOpen, ___T>,
11006 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11007
11008 #[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"]
11009 fn on_representation(
11010 &mut self,
11011
11012 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
11013 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11014
11015 fn on_unknown_interaction(
11016 &mut self,
11017 ordinal: u64,
11018 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11019 ::core::future::ready(())
11020 }
11021}
11022
11023impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Directory
11024where
11025 ___H: DirectoryClientHandler<___T> + ::core::marker::Send,
11026 ___T: ::fidl_next::Transport,
11027 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
11028 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11029 Constraint = (),
11030 >,
11031 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
11032 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11033 Constraint = (),
11034 >,
11035{
11036 async fn on_event(
11037 handler: &mut ___H,
11038 ordinal: u64,
11039 flexibility: ::fidl_next::protocol::Flexibility,
11040 body: ::fidl_next::Body<___T>,
11041 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11042 match ordinal {
11043 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11044 Ok(decoded) => {
11045 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
11046 Ok(())
11047 }
11048 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11049 ordinal: 9207534335756671346,
11050 error,
11051 }),
11052 },
11053
11054 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11055 Ok(decoded) => {
11056 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
11057 Ok(())
11058 }
11059 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11060 ordinal: 6679970090861613324,
11061 error,
11062 }),
11063 },
11064
11065 ordinal => {
11066 handler.on_unknown_interaction(ordinal).await;
11067 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11068 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11069 } else {
11070 Ok(())
11071 }
11072 }
11073 }
11074 }
11075}
11076
11077pub trait DirectoryServerHandler<
11081 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
11082 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11083>
11084{
11085 #[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"]
11086 fn advisory_lock(
11087 &mut self,
11088
11089 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
11090
11091 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
11092 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11093
11094 fn clone(
11095 &mut self,
11096
11097 request: ::fidl_next::Request<directory::Clone, ___T>,
11098 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11099
11100 #[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"]
11101 fn close(
11102 &mut self,
11103
11104 responder: ::fidl_next::Responder<directory::Close, ___T>,
11105 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11106
11107 fn query(
11108 &mut self,
11109
11110 responder: ::fidl_next::Responder<directory::Query, ___T>,
11111 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11112
11113 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11114 fn deprecated_clone(
11115 &mut self,
11116
11117 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
11118 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11119
11120 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
11121 fn deprecated_get_attr(
11122 &mut self,
11123
11124 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
11125 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11126
11127 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
11128 fn deprecated_set_attr(
11129 &mut self,
11130
11131 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
11132
11133 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
11134 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11135
11136 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
11137 fn deprecated_get_flags(
11138 &mut self,
11139
11140 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
11141 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11142
11143 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11144 fn deprecated_set_flags(
11145 &mut self,
11146
11147 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
11148
11149 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
11150 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11151
11152 #[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"]
11153 fn get_flags(
11154 &mut self,
11155
11156 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
11157 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11158
11159 #[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"]
11160 fn set_flags(
11161 &mut self,
11162
11163 request: ::fidl_next::Request<directory::SetFlags, ___T>,
11164
11165 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
11166 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11167
11168 #[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"]
11169 fn query_filesystem(
11170 &mut self,
11171
11172 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
11173 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11174
11175 #[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"]
11176 fn get_attributes(
11177 &mut self,
11178
11179 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
11180
11181 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
11182 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11183
11184 #[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"]
11185 fn update_attributes(
11186 &mut self,
11187
11188 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
11189
11190 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
11191 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11192
11193 #[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"]
11194 fn sync(
11195 &mut self,
11196
11197 responder: ::fidl_next::Responder<directory::Sync, ___T>,
11198 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11199
11200 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
11201 fn list_extended_attributes(
11202 &mut self,
11203
11204 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
11205 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11206
11207 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
11208 fn get_extended_attribute(
11209 &mut self,
11210
11211 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
11212
11213 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
11214 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11215
11216 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
11217 fn set_extended_attribute(
11218 &mut self,
11219
11220 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
11221
11222 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
11223 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11224
11225 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
11226 fn remove_extended_attribute(
11227 &mut self,
11228
11229 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
11230
11231 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
11232 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11233
11234 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
11235 fn deprecated_open(
11236 &mut self,
11237
11238 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
11239 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11240
11241 #[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"]
11242 fn open(
11243 &mut self,
11244
11245 request: ::fidl_next::Request<directory::Open, ___T>,
11246 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11247
11248 #[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"]
11249 fn read_dirents(
11250 &mut self,
11251
11252 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
11253
11254 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
11255 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11256
11257 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
11258 fn rewind(
11259 &mut self,
11260
11261 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
11262 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11263
11264 #[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"]
11265 fn get_token(
11266 &mut self,
11267
11268 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
11269 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11270
11271 #[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"]
11272 fn link(
11273 &mut self,
11274
11275 request: ::fidl_next::Request<directory::Link, ___T>,
11276
11277 responder: ::fidl_next::Responder<directory::Link, ___T>,
11278 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11279
11280 #[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"]
11281 fn unlink(
11282 &mut self,
11283
11284 request: ::fidl_next::Request<directory::Unlink, ___T>,
11285
11286 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
11287 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11288
11289 #[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"]
11290 fn rename(
11291 &mut self,
11292
11293 request: ::fidl_next::Request<directory::Rename, ___T>,
11294
11295 responder: ::fidl_next::Responder<directory::Rename, ___T>,
11296 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11297
11298 #[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"]
11299 fn create_symlink(
11300 &mut self,
11301
11302 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
11303
11304 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
11305 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11306
11307 #[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"]
11308 fn watch(
11309 &mut self,
11310
11311 request: ::fidl_next::Request<directory::Watch, ___T>,
11312
11313 responder: ::fidl_next::Responder<directory::Watch, ___T>,
11314 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11315
11316 fn on_unknown_interaction(
11317 &mut self,
11318 ordinal: u64,
11319 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11320 ::core::future::ready(())
11321 }
11322}
11323
11324impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Directory
11325where
11326 ___H: DirectoryServerHandler<___T> + ::core::marker::Send,
11327 ___T: ::fidl_next::Transport,
11328 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
11329 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11330 Constraint = (),
11331 >,
11332 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
11333 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11334 Constraint = (),
11335 >,
11336 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
11337 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11338 Constraint = (),
11339 >,
11340 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
11341 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11342 Constraint = (),
11343 >,
11344 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
11345 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11346 Constraint = (),
11347 >,
11348 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
11349 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11350 Constraint = (),
11351 >,
11352 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
11353 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11354 Constraint = (),
11355 >,
11356 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
11357 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11358 Constraint = (),
11359 >,
11360 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
11361 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11362 Constraint = (),
11363 >,
11364 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11365 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11366 Constraint = (),
11367 >,
11368 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11369 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11370 Constraint = (),
11371 >,
11372 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11373 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11374 Constraint = (),
11375 >,
11376 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
11377 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11378 Constraint = (),
11379 >,
11380 for<'de> crate::wire::DirectoryOpenRequest<'de>: ::fidl_next::Decode<
11381 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11382 Constraint = (),
11383 >,
11384 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
11385 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11386 Constraint = (),
11387 >,
11388 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
11389 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11390 Constraint = (),
11391 >,
11392 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
11393 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11394 Constraint = (),
11395 >,
11396 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
11397 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11398 Constraint = (),
11399 >,
11400 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
11401 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11402 Constraint = (),
11403 >,
11404 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
11405 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11406 Constraint = (),
11407 >,
11408{
11409 async fn on_one_way(
11410 handler: &mut ___H,
11411 ordinal: u64,
11412 flexibility: ::fidl_next::protocol::Flexibility,
11413 body: ::fidl_next::Body<___T>,
11414 ) -> ::core::result::Result<
11415 (),
11416 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11417 > {
11418 match ordinal {
11419 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11420 Ok(decoded) => {
11421 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
11422 Ok(())
11423 }
11424 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11425 ordinal: 2366825959783828089,
11426 error,
11427 }),
11428 },
11429
11430 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11431 Ok(decoded) => {
11432 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
11433 Ok(())
11434 }
11435 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11436 ordinal: 6512600400724287855,
11437 error,
11438 }),
11439 },
11440
11441 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11442 Ok(decoded) => {
11443 handler
11444 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
11445 .await;
11446 Ok(())
11447 }
11448 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11449 ordinal: 5431626189872037072,
11450 error,
11451 }),
11452 },
11453
11454 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11455 Ok(decoded) => {
11456 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
11457 Ok(())
11458 }
11459 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11460 ordinal: 3193127272456937152,
11461 error,
11462 }),
11463 },
11464
11465 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
11466 Ok(decoded) => {
11467 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
11468 Ok(())
11469 }
11470 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11471 ordinal: 6236883748953765593,
11472 error,
11473 }),
11474 },
11475
11476 ordinal => {
11477 handler.on_unknown_interaction(ordinal).await;
11478 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11479 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11480 } else {
11481 Ok(())
11482 }
11483 }
11484 }
11485 }
11486
11487 async fn on_two_way(
11488 handler: &mut ___H,
11489 ordinal: u64,
11490 flexibility: ::fidl_next::protocol::Flexibility,
11491 body: ::fidl_next::Body<___T>,
11492 responder: ::fidl_next::protocol::Responder<___T>,
11493 ) -> ::core::result::Result<
11494 (),
11495 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11496 > {
11497 match ordinal {
11498 7992130864415541162 => {
11499 let responder = ::fidl_next::Responder::from_untyped(responder);
11500
11501 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11502 Ok(decoded) => {
11503 handler
11504 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
11505 .await;
11506 Ok(())
11507 }
11508 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11509 ordinal: 7992130864415541162,
11510 error,
11511 }),
11512 }
11513 }
11514
11515 6540867515453498750 => {
11516 let responder = ::fidl_next::Responder::from_untyped(responder);
11517
11518 handler.close(responder).await;
11519 Ok(())
11520 }
11521
11522 2763219980499352582 => {
11523 let responder = ::fidl_next::Responder::from_untyped(responder);
11524
11525 handler.query(responder).await;
11526 Ok(())
11527 }
11528
11529 8689798978500614909 => {
11530 let responder = ::fidl_next::Responder::from_untyped(responder);
11531
11532 handler.deprecated_get_attr(responder).await;
11533 Ok(())
11534 }
11535
11536 4721673413776871238 => {
11537 let responder = ::fidl_next::Responder::from_untyped(responder);
11538
11539 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11540 Ok(decoded) => {
11541 handler
11542 .deprecated_set_attr(
11543 ::fidl_next::Request::from_decoded(decoded),
11544 responder,
11545 )
11546 .await;
11547 Ok(())
11548 }
11549 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11550 ordinal: 4721673413776871238,
11551 error,
11552 }),
11553 }
11554 }
11555
11556 6595803110182632097 => {
11557 let responder = ::fidl_next::Responder::from_untyped(responder);
11558
11559 handler.deprecated_get_flags(responder).await;
11560 Ok(())
11561 }
11562
11563 5950864159036794675 => {
11564 let responder = ::fidl_next::Responder::from_untyped(responder);
11565
11566 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11567 Ok(decoded) => {
11568 handler
11569 .deprecated_set_flags(
11570 ::fidl_next::Request::from_decoded(decoded),
11571 responder,
11572 )
11573 .await;
11574 Ok(())
11575 }
11576 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11577 ordinal: 5950864159036794675,
11578 error,
11579 }),
11580 }
11581 }
11582
11583 105530239381466147 => {
11584 let responder = ::fidl_next::Responder::from_untyped(responder);
11585
11586 handler.get_flags(responder).await;
11587 Ok(())
11588 }
11589
11590 6172186066099445416 => {
11591 let responder = ::fidl_next::Responder::from_untyped(responder);
11592
11593 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11594 Ok(decoded) => {
11595 handler
11596 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
11597 .await;
11598 Ok(())
11599 }
11600 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11601 ordinal: 6172186066099445416,
11602 error,
11603 }),
11604 }
11605 }
11606
11607 8013111122914313744 => {
11608 let responder = ::fidl_next::Responder::from_untyped(responder);
11609
11610 handler.query_filesystem(responder).await;
11611 Ok(())
11612 }
11613
11614 4414537700416816443 => {
11615 let responder = ::fidl_next::Responder::from_untyped(responder);
11616
11617 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11618 Ok(decoded) => {
11619 handler
11620 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
11621 .await;
11622 Ok(())
11623 }
11624 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11625 ordinal: 4414537700416816443,
11626 error,
11627 }),
11628 }
11629 }
11630
11631 3677402239314018056 => {
11632 let responder = ::fidl_next::Responder::from_untyped(responder);
11633
11634 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11635 Ok(decoded) => {
11636 handler
11637 .update_attributes(
11638 ::fidl_next::Request::from_decoded(decoded),
11639 responder,
11640 )
11641 .await;
11642 Ok(())
11643 }
11644 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11645 ordinal: 3677402239314018056,
11646 error,
11647 }),
11648 }
11649 }
11650
11651 3196473584242777161 => {
11652 let responder = ::fidl_next::Responder::from_untyped(responder);
11653
11654 handler.sync(responder).await;
11655 Ok(())
11656 }
11657
11658 5043930208506967771 => {
11659 let responder = ::fidl_next::Responder::from_untyped(responder);
11660
11661 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11662 Ok(decoded) => {
11663 handler
11664 .get_extended_attribute(
11665 ::fidl_next::Request::from_decoded(decoded),
11666 responder,
11667 )
11668 .await;
11669 Ok(())
11670 }
11671 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11672 ordinal: 5043930208506967771,
11673 error,
11674 }),
11675 }
11676 }
11677
11678 5374223046099989052 => {
11679 let responder = ::fidl_next::Responder::from_untyped(responder);
11680
11681 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11682 Ok(decoded) => {
11683 handler
11684 .set_extended_attribute(
11685 ::fidl_next::Request::from_decoded(decoded),
11686 responder,
11687 )
11688 .await;
11689 Ok(())
11690 }
11691 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11692 ordinal: 5374223046099989052,
11693 error,
11694 }),
11695 }
11696 }
11697
11698 8794297771444732717 => {
11699 let responder = ::fidl_next::Responder::from_untyped(responder);
11700
11701 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11702 Ok(decoded) => {
11703 handler
11704 .remove_extended_attribute(
11705 ::fidl_next::Request::from_decoded(decoded),
11706 responder,
11707 )
11708 .await;
11709 Ok(())
11710 }
11711 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11712 ordinal: 8794297771444732717,
11713 error,
11714 }),
11715 }
11716 }
11717
11718 3855785432100874762 => {
11719 let responder = ::fidl_next::Responder::from_untyped(responder);
11720
11721 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11722 Ok(decoded) => {
11723 handler
11724 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
11725 .await;
11726 Ok(())
11727 }
11728 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11729 ordinal: 3855785432100874762,
11730 error,
11731 }),
11732 }
11733 }
11734
11735 1635123508515392625 => {
11736 let responder = ::fidl_next::Responder::from_untyped(responder);
11737
11738 handler.rewind(responder).await;
11739 Ok(())
11740 }
11741
11742 2787337947777369685 => {
11743 let responder = ::fidl_next::Responder::from_untyped(responder);
11744
11745 handler.get_token(responder).await;
11746 Ok(())
11747 }
11748
11749 8360374984291987687 => {
11750 let responder = ::fidl_next::Responder::from_untyped(responder);
11751
11752 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11753 Ok(decoded) => {
11754 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
11755 Ok(())
11756 }
11757 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11758 ordinal: 8360374984291987687,
11759 error,
11760 }),
11761 }
11762 }
11763
11764 8433556716759383021 => {
11765 let responder = ::fidl_next::Responder::from_untyped(responder);
11766
11767 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11768 Ok(decoded) => {
11769 handler
11770 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
11771 .await;
11772 Ok(())
11773 }
11774 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11775 ordinal: 8433556716759383021,
11776 error,
11777 }),
11778 }
11779 }
11780
11781 8097726607824333022 => {
11782 let responder = ::fidl_next::Responder::from_untyped(responder);
11783
11784 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11785 Ok(decoded) => {
11786 handler
11787 .rename(::fidl_next::Request::from_decoded(decoded), responder)
11788 .await;
11789 Ok(())
11790 }
11791 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11792 ordinal: 8097726607824333022,
11793 error,
11794 }),
11795 }
11796 }
11797
11798 2435901052462315657 => {
11799 let responder = ::fidl_next::Responder::from_untyped(responder);
11800
11801 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11802 Ok(decoded) => {
11803 handler
11804 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
11805 .await;
11806 Ok(())
11807 }
11808 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11809 ordinal: 2435901052462315657,
11810 error,
11811 }),
11812 }
11813 }
11814
11815 6275512344170098065 => {
11816 let responder = ::fidl_next::Responder::from_untyped(responder);
11817
11818 match ::fidl_next::AsDecoderExt::into_decoded(body) {
11819 Ok(decoded) => {
11820 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
11821 Ok(())
11822 }
11823 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11824 ordinal: 6275512344170098065,
11825 error,
11826 }),
11827 }
11828 }
11829
11830 ordinal => {
11831 handler.on_unknown_interaction(ordinal).await;
11832 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
11833 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11834 } else {
11835 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
11836 ordinal,
11837 flexibility,
11838 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
11839 )
11840 .expect("encoding a framework error should never fail")
11841 .await?;
11842 Ok(())
11843 }
11844 }
11845 }
11846 }
11847}
11848
11849impl<___T> DirectoryClientHandler<___T> for ::fidl_next::IgnoreEvents
11850where
11851 ___T: ::fidl_next::Transport,
11852{
11853 async fn on_open(&mut self, _: ::fidl_next::Request<directory::OnOpen, ___T>) {}
11854
11855 async fn on_representation(
11856 &mut self,
11857
11858 _: ::fidl_next::Request<directory::OnRepresentation, ___T>,
11859 ) {
11860 }
11861
11862 async fn on_unknown_interaction(&mut self, _: u64) {}
11863}
11864
11865impl<___H, ___T> DirectoryLocalClientHandler<___T> for ::fidl_next::Local<___H>
11866where
11867 ___H: DirectoryClientHandler<___T>,
11868 ___T: ::fidl_next::Transport,
11869{
11870 async fn on_open(&mut self, request: ::fidl_next::Request<directory::OnOpen, ___T>) {
11871 ___H::on_open(&mut self.0, request).await
11872 }
11873
11874 async fn on_representation(
11875 &mut self,
11876
11877 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
11878 ) {
11879 ___H::on_representation(&mut self.0, request).await
11880 }
11881
11882 async fn on_unknown_interaction(&mut self, ordinal: u64) {
11883 ___H::on_unknown_interaction(&mut self.0, ordinal).await
11884 }
11885}
11886
11887impl<___H, ___T> DirectoryLocalServerHandler<___T> for ::fidl_next::Local<___H>
11888where
11889 ___H: DirectoryServerHandler<___T>,
11890 ___T: ::fidl_next::Transport,
11891{
11892 async fn advisory_lock(
11893 &mut self,
11894
11895 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
11896
11897 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
11898 ) {
11899 ___H::advisory_lock(&mut self.0, request, responder).await
11900 }
11901
11902 async fn clone(&mut self, request: ::fidl_next::Request<directory::Clone, ___T>) {
11903 ___H::clone(&mut self.0, request).await
11904 }
11905
11906 async fn close(&mut self, responder: ::fidl_next::Responder<directory::Close, ___T>) {
11907 ___H::close(&mut self.0, responder).await
11908 }
11909
11910 async fn query(&mut self, responder: ::fidl_next::Responder<directory::Query, ___T>) {
11911 ___H::query(&mut self.0, responder).await
11912 }
11913
11914 async fn deprecated_clone(
11915 &mut self,
11916
11917 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
11918 ) {
11919 ___H::deprecated_clone(&mut self.0, request).await
11920 }
11921
11922 async fn deprecated_get_attr(
11923 &mut self,
11924
11925 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
11926 ) {
11927 ___H::deprecated_get_attr(&mut self.0, responder).await
11928 }
11929
11930 async fn deprecated_set_attr(
11931 &mut self,
11932
11933 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
11934
11935 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
11936 ) {
11937 ___H::deprecated_set_attr(&mut self.0, request, responder).await
11938 }
11939
11940 async fn deprecated_get_flags(
11941 &mut self,
11942
11943 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
11944 ) {
11945 ___H::deprecated_get_flags(&mut self.0, responder).await
11946 }
11947
11948 async fn deprecated_set_flags(
11949 &mut self,
11950
11951 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
11952
11953 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
11954 ) {
11955 ___H::deprecated_set_flags(&mut self.0, request, responder).await
11956 }
11957
11958 async fn get_flags(&mut self, responder: ::fidl_next::Responder<directory::GetFlags, ___T>) {
11959 ___H::get_flags(&mut self.0, responder).await
11960 }
11961
11962 async fn set_flags(
11963 &mut self,
11964
11965 request: ::fidl_next::Request<directory::SetFlags, ___T>,
11966
11967 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
11968 ) {
11969 ___H::set_flags(&mut self.0, request, responder).await
11970 }
11971
11972 async fn query_filesystem(
11973 &mut self,
11974
11975 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
11976 ) {
11977 ___H::query_filesystem(&mut self.0, responder).await
11978 }
11979
11980 async fn get_attributes(
11981 &mut self,
11982
11983 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
11984
11985 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
11986 ) {
11987 ___H::get_attributes(&mut self.0, request, responder).await
11988 }
11989
11990 async fn update_attributes(
11991 &mut self,
11992
11993 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
11994
11995 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
11996 ) {
11997 ___H::update_attributes(&mut self.0, request, responder).await
11998 }
11999
12000 async fn sync(&mut self, responder: ::fidl_next::Responder<directory::Sync, ___T>) {
12001 ___H::sync(&mut self.0, responder).await
12002 }
12003
12004 async fn list_extended_attributes(
12005 &mut self,
12006
12007 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
12008 ) {
12009 ___H::list_extended_attributes(&mut self.0, request).await
12010 }
12011
12012 async fn get_extended_attribute(
12013 &mut self,
12014
12015 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
12016
12017 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
12018 ) {
12019 ___H::get_extended_attribute(&mut self.0, request, responder).await
12020 }
12021
12022 async fn set_extended_attribute(
12023 &mut self,
12024
12025 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
12026
12027 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
12028 ) {
12029 ___H::set_extended_attribute(&mut self.0, request, responder).await
12030 }
12031
12032 async fn remove_extended_attribute(
12033 &mut self,
12034
12035 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
12036
12037 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
12038 ) {
12039 ___H::remove_extended_attribute(&mut self.0, request, responder).await
12040 }
12041
12042 async fn deprecated_open(
12043 &mut self,
12044
12045 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
12046 ) {
12047 ___H::deprecated_open(&mut self.0, request).await
12048 }
12049
12050 async fn open(&mut self, request: ::fidl_next::Request<directory::Open, ___T>) {
12051 ___H::open(&mut self.0, request).await
12052 }
12053
12054 async fn read_dirents(
12055 &mut self,
12056
12057 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
12058
12059 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
12060 ) {
12061 ___H::read_dirents(&mut self.0, request, responder).await
12062 }
12063
12064 async fn rewind(&mut self, responder: ::fidl_next::Responder<directory::Rewind, ___T>) {
12065 ___H::rewind(&mut self.0, responder).await
12066 }
12067
12068 async fn get_token(&mut self, responder: ::fidl_next::Responder<directory::GetToken, ___T>) {
12069 ___H::get_token(&mut self.0, responder).await
12070 }
12071
12072 async fn link(
12073 &mut self,
12074
12075 request: ::fidl_next::Request<directory::Link, ___T>,
12076
12077 responder: ::fidl_next::Responder<directory::Link, ___T>,
12078 ) {
12079 ___H::link(&mut self.0, request, responder).await
12080 }
12081
12082 async fn unlink(
12083 &mut self,
12084
12085 request: ::fidl_next::Request<directory::Unlink, ___T>,
12086
12087 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
12088 ) {
12089 ___H::unlink(&mut self.0, request, responder).await
12090 }
12091
12092 async fn rename(
12093 &mut self,
12094
12095 request: ::fidl_next::Request<directory::Rename, ___T>,
12096
12097 responder: ::fidl_next::Responder<directory::Rename, ___T>,
12098 ) {
12099 ___H::rename(&mut self.0, request, responder).await
12100 }
12101
12102 async fn create_symlink(
12103 &mut self,
12104
12105 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
12106
12107 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
12108 ) {
12109 ___H::create_symlink(&mut self.0, request, responder).await
12110 }
12111
12112 async fn watch(
12113 &mut self,
12114
12115 request: ::fidl_next::Request<directory::Watch, ___T>,
12116
12117 responder: ::fidl_next::Responder<directory::Watch, ___T>,
12118 ) {
12119 ___H::watch(&mut self.0, request, responder).await
12120 }
12121
12122 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12123 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12124 }
12125}
12126
12127#[derive(PartialEq, Debug)]
12129pub struct Linkable;
12130
12131#[cfg(target_os = "fuchsia")]
12132impl ::fidl_next::HasTransport for Linkable {
12133 type Transport = ::fdomain_client::Channel;
12134}
12135
12136pub mod linkable {
12137 pub mod prelude {
12138 pub use crate::{
12139 Linkable, LinkableClientHandler, LinkableLocalClientHandler,
12140 LinkableLocalServerHandler, LinkableServerHandler, linkable,
12141 };
12142
12143 pub use crate::natural::LinkableLinkIntoRequest;
12144
12145 pub use crate::natural::LinkableLinkIntoResponse;
12146 }
12147
12148 pub struct LinkInto;
12149
12150 impl ::fidl_next::Method for LinkInto {
12151 const ORDINAL: u64 = 6121399674497678964;
12152 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12153 ::fidl_next::protocol::Flexibility::Strict;
12154
12155 type Protocol = crate::Linkable;
12156
12157 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
12158 }
12159
12160 impl ::fidl_next::TwoWayMethod for LinkInto {
12161 type Response = ::fidl_next::wire::Result<
12162 'static,
12163 crate::wire::LinkableLinkIntoResponse,
12164 ::fidl_next::wire::Int32,
12165 >;
12166 }
12167
12168 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
12169 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
12170
12171 fn respond(response: ___R) -> Self::Output {
12172 ::core::result::Result::Ok(response)
12173 }
12174 }
12175
12176 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
12177 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
12178
12179 fn respond_err(response: ___R) -> Self::Output {
12180 ::core::result::Result::Err(response)
12181 }
12182 }
12183
12184 mod ___detail {
12185 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Linkable
12186 where
12187 ___T: ::fidl_next::Transport,
12188 {
12189 type Client = LinkableClient<___T>;
12190 type Server = LinkableServer<___T>;
12191 }
12192
12193 #[repr(transparent)]
12195 pub struct LinkableClient<___T: ::fidl_next::Transport> {
12196 #[allow(dead_code)]
12197 client: ::fidl_next::protocol::Client<___T>,
12198 }
12199
12200 impl<___T> LinkableClient<___T>
12201 where
12202 ___T: ::fidl_next::Transport,
12203 {
12204 #[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"]
12205 pub fn link_into(
12206 &self,
12207
12208 dst_parent_token: impl ::fidl_next::Encode<
12209 ::fdomain_client::fidl_next::wire::Handle,
12210 <___T as ::fidl_next::Transport>::SendBuffer,
12211 >,
12212
12213 dst: impl ::fidl_next::Encode<
12214 ::fidl_next::wire::String<'static>,
12215 <___T as ::fidl_next::Transport>::SendBuffer,
12216 >,
12217 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
12218 where
12219 <___T as ::fidl_next::Transport>::SendBuffer:
12220 ::fidl_next::encoder::InternalHandleEncoder,
12221 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12222 <___T as ::fidl_next::Transport>::SendBuffer:
12223 ::fdomain_client::fidl_next::HandleEncoder,
12224 {
12225 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
12226 dst_parent_token,
12227
12228 dst,
12229 })
12230 }
12231
12232 #[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"]
12233 pub fn link_into_with<___R>(
12234 &self,
12235 request: ___R,
12236 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
12237 where
12238 ___R: ::fidl_next::Encode<
12239 crate::wire::LinkableLinkIntoRequest<'static>,
12240 <___T as ::fidl_next::Transport>::SendBuffer,
12241 >,
12242 {
12243 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12244 6121399674497678964,
12245 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
12246 request,
12247 ))
12248 }
12249 }
12250
12251 #[repr(transparent)]
12253 pub struct LinkableServer<___T: ::fidl_next::Transport> {
12254 server: ::fidl_next::protocol::Server<___T>,
12255 }
12256
12257 impl<___T> LinkableServer<___T> where ___T: ::fidl_next::Transport {}
12258 }
12259}
12260
12261#[diagnostic::on_unimplemented(
12262 note = "If {Self} implements the non-local LinkableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
12263)]
12264
12265pub trait LinkableLocalClientHandler<
12269 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
12270 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12271>
12272{
12273}
12274
12275impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Linkable
12276where
12277 ___H: LinkableLocalClientHandler<___T>,
12278 ___T: ::fidl_next::Transport,
12279{
12280 async fn on_event(
12281 handler: &mut ___H,
12282 ordinal: u64,
12283 flexibility: ::fidl_next::protocol::Flexibility,
12284 body: ::fidl_next::Body<___T>,
12285 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12286 match ordinal {
12287 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12288 }
12289 }
12290}
12291
12292#[diagnostic::on_unimplemented(
12293 note = "If {Self} implements the non-local LinkableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
12294)]
12295
12296pub trait LinkableLocalServerHandler<
12300 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
12301 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12302>
12303{
12304 #[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"]
12305 fn link_into(
12306 &mut self,
12307
12308 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12309
12310 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12311 ) -> impl ::core::future::Future<Output = ()>;
12312}
12313
12314impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Linkable
12315where
12316 ___H: LinkableLocalServerHandler<___T>,
12317 ___T: ::fidl_next::Transport,
12318 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12319 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12320 Constraint = (),
12321 >,
12322{
12323 async fn on_one_way(
12324 handler: &mut ___H,
12325 ordinal: u64,
12326 flexibility: ::fidl_next::protocol::Flexibility,
12327 body: ::fidl_next::Body<___T>,
12328 ) -> ::core::result::Result<
12329 (),
12330 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12331 > {
12332 match ordinal {
12333 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12334 }
12335 }
12336
12337 async fn on_two_way(
12338 handler: &mut ___H,
12339 ordinal: u64,
12340 flexibility: ::fidl_next::protocol::Flexibility,
12341 body: ::fidl_next::Body<___T>,
12342 responder: ::fidl_next::protocol::Responder<___T>,
12343 ) -> ::core::result::Result<
12344 (),
12345 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12346 > {
12347 match ordinal {
12348 6121399674497678964 => {
12349 let responder = ::fidl_next::Responder::from_untyped(responder);
12350
12351 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12352 Ok(decoded) => {
12353 handler
12354 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
12355 .await;
12356 Ok(())
12357 }
12358 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12359 ordinal: 6121399674497678964,
12360 error,
12361 }),
12362 }
12363 }
12364
12365 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12366 }
12367 }
12368}
12369
12370pub trait LinkableClientHandler<
12374 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
12375 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12376>
12377{
12378}
12379
12380impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Linkable
12381where
12382 ___H: LinkableClientHandler<___T> + ::core::marker::Send,
12383 ___T: ::fidl_next::Transport,
12384{
12385 async fn on_event(
12386 handler: &mut ___H,
12387 ordinal: u64,
12388 flexibility: ::fidl_next::protocol::Flexibility,
12389 body: ::fidl_next::Body<___T>,
12390 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12391 match ordinal {
12392 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12393 }
12394 }
12395}
12396
12397pub trait LinkableServerHandler<
12401 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
12402 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12403>
12404{
12405 #[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"]
12406 fn link_into(
12407 &mut self,
12408
12409 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12410
12411 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12412 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12413}
12414
12415impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Linkable
12416where
12417 ___H: LinkableServerHandler<___T> + ::core::marker::Send,
12418 ___T: ::fidl_next::Transport,
12419 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12420 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12421 Constraint = (),
12422 >,
12423{
12424 async fn on_one_way(
12425 handler: &mut ___H,
12426 ordinal: u64,
12427 flexibility: ::fidl_next::protocol::Flexibility,
12428 body: ::fidl_next::Body<___T>,
12429 ) -> ::core::result::Result<
12430 (),
12431 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12432 > {
12433 match ordinal {
12434 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12435 }
12436 }
12437
12438 async fn on_two_way(
12439 handler: &mut ___H,
12440 ordinal: u64,
12441 flexibility: ::fidl_next::protocol::Flexibility,
12442 body: ::fidl_next::Body<___T>,
12443 responder: ::fidl_next::protocol::Responder<___T>,
12444 ) -> ::core::result::Result<
12445 (),
12446 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12447 > {
12448 match ordinal {
12449 6121399674497678964 => {
12450 let responder = ::fidl_next::Responder::from_untyped(responder);
12451
12452 match ::fidl_next::AsDecoderExt::into_decoded(body) {
12453 Ok(decoded) => {
12454 handler
12455 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
12456 .await;
12457 Ok(())
12458 }
12459 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12460 ordinal: 6121399674497678964,
12461 error,
12462 }),
12463 }
12464 }
12465
12466 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12467 }
12468 }
12469}
12470
12471impl<___T> LinkableClientHandler<___T> for ::fidl_next::IgnoreEvents where
12472 ___T: ::fidl_next::Transport
12473{
12474}
12475
12476impl<___H, ___T> LinkableLocalClientHandler<___T> for ::fidl_next::Local<___H>
12477where
12478 ___H: LinkableClientHandler<___T>,
12479 ___T: ::fidl_next::Transport,
12480{
12481}
12482
12483impl<___H, ___T> LinkableLocalServerHandler<___T> for ::fidl_next::Local<___H>
12484where
12485 ___H: LinkableServerHandler<___T>,
12486 ___T: ::fidl_next::Transport,
12487{
12488 async fn link_into(
12489 &mut self,
12490
12491 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12492
12493 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12494 ) {
12495 ___H::link_into(&mut self.0, request, responder).await
12496 }
12497}
12498
12499#[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"]
12501#[derive(PartialEq, Debug)]
12502pub struct File;
12503
12504impl ::fidl_next::Discoverable for File {
12505 const PROTOCOL_NAME: &'static str = "fuchsia.io.File";
12506}
12507
12508#[cfg(target_os = "fuchsia")]
12509impl ::fidl_next::HasTransport for File {
12510 type Transport = ::fdomain_client::Channel;
12511}
12512
12513pub mod file {
12514 pub mod prelude {
12515 pub use crate::{
12516 File, FileClientHandler, FileLocalClientHandler, FileLocalServerHandler,
12517 FileServerHandler, file,
12518 };
12519
12520 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
12521
12522 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
12523
12524 pub use crate::natural::ExtendedAttributeValue;
12525
12526 pub use crate::natural::FileAllocateRequest;
12527
12528 pub use crate::natural::FileEnableVerityRequest;
12529
12530 pub use crate::natural::FileGetBackingMemoryRequest;
12531
12532 pub use crate::natural::FileInfo;
12533
12534 pub use crate::natural::FileReadAtRequest;
12535
12536 pub use crate::natural::FileResizeRequest;
12537
12538 pub use crate::natural::FileSeekRequest;
12539
12540 pub use crate::natural::FileWriteAtRequest;
12541
12542 pub use crate::natural::FileAllocateResponse;
12543
12544 pub use crate::natural::FileEnableVerityResponse;
12545
12546 pub use crate::natural::FileGetBackingMemoryResponse;
12547
12548 pub use crate::natural::FileReadAtResponse;
12549
12550 pub use crate::natural::FileResizeResponse;
12551
12552 pub use crate::natural::FileSeekResponse;
12553
12554 pub use crate::natural::FileWriteAtResponse;
12555
12556 pub use crate::natural::LinkableLinkIntoRequest;
12557
12558 pub use crate::natural::LinkableLinkIntoResponse;
12559
12560 pub use crate::natural::MutableNodeAttributes;
12561
12562 pub use crate::natural::NodeAttributes2;
12563
12564 pub use crate::natural::NodeDeprecatedCloneRequest;
12565
12566 pub use crate::natural::NodeDeprecatedGetAttrResponse;
12567
12568 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
12569
12570 pub use crate::natural::NodeDeprecatedSetAttrRequest;
12571
12572 pub use crate::natural::NodeDeprecatedSetAttrResponse;
12573
12574 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
12575
12576 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
12577
12578 pub use crate::natural::NodeGetAttributesRequest;
12579
12580 pub use crate::natural::NodeGetExtendedAttributeRequest;
12581
12582 pub use crate::natural::NodeListExtendedAttributesRequest;
12583
12584 pub use crate::natural::NodeOnOpenRequest;
12585
12586 pub use crate::natural::NodeQueryFilesystemResponse;
12587
12588 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
12589
12590 pub use crate::natural::NodeSetExtendedAttributeRequest;
12591
12592 pub use crate::natural::NodeSetFlagsRequest;
12593
12594 pub use crate::natural::NodeGetFlagsResponse;
12595
12596 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
12597
12598 pub use crate::natural::NodeSetExtendedAttributeResponse;
12599
12600 pub use crate::natural::NodeSetFlagsResponse;
12601
12602 pub use crate::natural::NodeSyncResponse;
12603
12604 pub use crate::natural::NodeUpdateAttributesResponse;
12605
12606 pub use crate::natural::ReadableReadRequest;
12607
12608 pub use crate::natural::ReadableReadResponse;
12609
12610 pub use crate::natural::Representation;
12611
12612 pub use crate::natural::WritableWriteRequest;
12613
12614 pub use crate::natural::WritableWriteResponse;
12615
12616 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
12617
12618 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
12619
12620 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
12621 }
12622
12623 pub struct AdvisoryLock;
12624
12625 impl ::fidl_next::Method for AdvisoryLock {
12626 const ORDINAL: u64 = 7992130864415541162;
12627 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12628 ::fidl_next::protocol::Flexibility::Strict;
12629
12630 type Protocol = crate::File;
12631
12632 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
12633 }
12634
12635 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
12636 type Response = ::fidl_next::wire::Result<
12637 'static,
12638 crate::wire::AdvisoryLockingAdvisoryLockResponse,
12639 ::fidl_next::wire::Int32,
12640 >;
12641 }
12642
12643 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
12644 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
12645
12646 fn respond(response: ___R) -> Self::Output {
12647 ::core::result::Result::Ok(response)
12648 }
12649 }
12650
12651 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
12652 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
12653
12654 fn respond_err(response: ___R) -> Self::Output {
12655 ::core::result::Result::Err(response)
12656 }
12657 }
12658
12659 pub struct LinkInto;
12660
12661 impl ::fidl_next::Method for LinkInto {
12662 const ORDINAL: u64 = 6121399674497678964;
12663 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12664 ::fidl_next::protocol::Flexibility::Strict;
12665
12666 type Protocol = crate::File;
12667
12668 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
12669 }
12670
12671 impl ::fidl_next::TwoWayMethod for LinkInto {
12672 type Response = ::fidl_next::wire::Result<
12673 'static,
12674 crate::wire::LinkableLinkIntoResponse,
12675 ::fidl_next::wire::Int32,
12676 >;
12677 }
12678
12679 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
12680 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
12681
12682 fn respond(response: ___R) -> Self::Output {
12683 ::core::result::Result::Ok(response)
12684 }
12685 }
12686
12687 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
12688 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
12689
12690 fn respond_err(response: ___R) -> Self::Output {
12691 ::core::result::Result::Err(response)
12692 }
12693 }
12694
12695 pub struct Clone;
12696
12697 impl ::fidl_next::Method for Clone {
12698 const ORDINAL: u64 = 2366825959783828089;
12699 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12700 ::fidl_next::protocol::Flexibility::Strict;
12701
12702 type Protocol = crate::File;
12703
12704 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
12705 }
12706
12707 pub struct Close;
12708
12709 impl ::fidl_next::Method for Close {
12710 const ORDINAL: u64 = 6540867515453498750;
12711 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12712 ::fidl_next::protocol::Flexibility::Strict;
12713
12714 type Protocol = crate::File;
12715
12716 type Request = ::fidl_next::wire::EmptyMessageBody;
12717 }
12718
12719 impl ::fidl_next::TwoWayMethod for Close {
12720 type Response = ::fidl_next::wire::Result<
12721 'static,
12722 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
12723 ::fidl_next::wire::Int32,
12724 >;
12725 }
12726
12727 impl<___R> ::fidl_next::Respond<___R> for Close {
12728 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
12729
12730 fn respond(response: ___R) -> Self::Output {
12731 ::core::result::Result::Ok(response)
12732 }
12733 }
12734
12735 impl<___R> ::fidl_next::RespondErr<___R> for Close {
12736 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
12737
12738 fn respond_err(response: ___R) -> Self::Output {
12739 ::core::result::Result::Err(response)
12740 }
12741 }
12742
12743 pub struct Query;
12744
12745 impl ::fidl_next::Method for Query {
12746 const ORDINAL: u64 = 2763219980499352582;
12747 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12748 ::fidl_next::protocol::Flexibility::Strict;
12749
12750 type Protocol = crate::File;
12751
12752 type Request = ::fidl_next::wire::EmptyMessageBody;
12753 }
12754
12755 impl ::fidl_next::TwoWayMethod for Query {
12756 type Response = ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
12757 }
12758
12759 impl<___R> ::fidl_next::Respond<___R> for Query {
12760 type Output = ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
12761
12762 fn respond(response: ___R) -> Self::Output {
12763 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
12764 }
12765 }
12766
12767 pub struct DeprecatedClone;
12768
12769 impl ::fidl_next::Method for DeprecatedClone {
12770 const ORDINAL: u64 = 6512600400724287855;
12771 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12772 ::fidl_next::protocol::Flexibility::Flexible;
12773
12774 type Protocol = crate::File;
12775
12776 type Request = crate::wire::NodeDeprecatedCloneRequest;
12777 }
12778
12779 pub struct OnOpen;
12780
12781 impl ::fidl_next::Method for OnOpen {
12782 const ORDINAL: u64 = 9207534335756671346;
12783 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12784 ::fidl_next::protocol::Flexibility::Flexible;
12785
12786 type Protocol = crate::File;
12787
12788 type Request = crate::wire::NodeOnOpenRequest<'static>;
12789 }
12790
12791 pub struct DeprecatedGetAttr;
12792
12793 impl ::fidl_next::Method for DeprecatedGetAttr {
12794 const ORDINAL: u64 = 8689798978500614909;
12795 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12796 ::fidl_next::protocol::Flexibility::Strict;
12797
12798 type Protocol = crate::File;
12799
12800 type Request = ::fidl_next::wire::EmptyMessageBody;
12801 }
12802
12803 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
12804 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
12805 }
12806
12807 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
12808 type Output = ___R;
12809
12810 fn respond(response: ___R) -> Self::Output {
12811 response
12812 }
12813 }
12814
12815 pub struct DeprecatedSetAttr;
12816
12817 impl ::fidl_next::Method for DeprecatedSetAttr {
12818 const ORDINAL: u64 = 4721673413776871238;
12819 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12820 ::fidl_next::protocol::Flexibility::Strict;
12821
12822 type Protocol = crate::File;
12823
12824 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
12825 }
12826
12827 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
12828 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
12829 }
12830
12831 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
12832 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
12833
12834 fn respond(response: ___R) -> Self::Output {
12835 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
12836 }
12837 }
12838
12839 pub struct DeprecatedGetFlags;
12840
12841 impl ::fidl_next::Method for DeprecatedGetFlags {
12842 const ORDINAL: u64 = 6595803110182632097;
12843 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12844 ::fidl_next::protocol::Flexibility::Strict;
12845
12846 type Protocol = crate::File;
12847
12848 type Request = ::fidl_next::wire::EmptyMessageBody;
12849 }
12850
12851 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
12852 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
12853 }
12854
12855 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
12856 type Output = ___R;
12857
12858 fn respond(response: ___R) -> Self::Output {
12859 response
12860 }
12861 }
12862
12863 pub struct DeprecatedSetFlags;
12864
12865 impl ::fidl_next::Method for DeprecatedSetFlags {
12866 const ORDINAL: u64 = 5950864159036794675;
12867 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12868 ::fidl_next::protocol::Flexibility::Strict;
12869
12870 type Protocol = crate::File;
12871
12872 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
12873 }
12874
12875 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
12876 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
12877 }
12878
12879 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
12880 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
12881
12882 fn respond(response: ___R) -> Self::Output {
12883 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
12884 }
12885 }
12886
12887 pub struct GetFlags;
12888
12889 impl ::fidl_next::Method for GetFlags {
12890 const ORDINAL: u64 = 105530239381466147;
12891 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12892 ::fidl_next::protocol::Flexibility::Flexible;
12893
12894 type Protocol = crate::File;
12895
12896 type Request = ::fidl_next::wire::EmptyMessageBody;
12897 }
12898
12899 impl ::fidl_next::TwoWayMethod for GetFlags {
12900 type Response = ::fidl_next::wire::FlexibleResult<
12901 'static,
12902 crate::wire::NodeGetFlagsResponse,
12903 ::fidl_next::wire::Int32,
12904 >;
12905 }
12906
12907 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
12908 type Output = ::fidl_next::FlexibleResult<
12909 crate::generic::NodeGetFlagsResponse<___R>,
12910 ::fidl_next::util::Never,
12911 >;
12912
12913 fn respond(response: ___R) -> Self::Output {
12914 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
12915 flags: response,
12916 })
12917 }
12918 }
12919
12920 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
12921 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
12922
12923 fn respond_err(response: ___R) -> Self::Output {
12924 ::fidl_next::FlexibleResult::Err(response)
12925 }
12926 }
12927
12928 pub struct SetFlags;
12929
12930 impl ::fidl_next::Method for SetFlags {
12931 const ORDINAL: u64 = 6172186066099445416;
12932 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12933 ::fidl_next::protocol::Flexibility::Flexible;
12934
12935 type Protocol = crate::File;
12936
12937 type Request = crate::wire::NodeSetFlagsRequest;
12938 }
12939
12940 impl ::fidl_next::TwoWayMethod for SetFlags {
12941 type Response = ::fidl_next::wire::FlexibleResult<
12942 'static,
12943 crate::wire::NodeSetFlagsResponse,
12944 ::fidl_next::wire::Int32,
12945 >;
12946 }
12947
12948 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
12949 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
12950
12951 fn respond(response: ___R) -> Self::Output {
12952 ::fidl_next::FlexibleResult::Ok(response)
12953 }
12954 }
12955
12956 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
12957 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
12958
12959 fn respond_err(response: ___R) -> Self::Output {
12960 ::fidl_next::FlexibleResult::Err(response)
12961 }
12962 }
12963
12964 pub struct QueryFilesystem;
12965
12966 impl ::fidl_next::Method for QueryFilesystem {
12967 const ORDINAL: u64 = 8013111122914313744;
12968 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12969 ::fidl_next::protocol::Flexibility::Strict;
12970
12971 type Protocol = crate::File;
12972
12973 type Request = ::fidl_next::wire::EmptyMessageBody;
12974 }
12975
12976 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
12977 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
12978 }
12979
12980 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
12981 type Output = ___R;
12982
12983 fn respond(response: ___R) -> Self::Output {
12984 response
12985 }
12986 }
12987
12988 pub struct OnRepresentation;
12989
12990 impl ::fidl_next::Method for OnRepresentation {
12991 const ORDINAL: u64 = 6679970090861613324;
12992 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12993 ::fidl_next::protocol::Flexibility::Strict;
12994
12995 type Protocol = crate::File;
12996
12997 type Request = crate::wire::Representation<'static>;
12998 }
12999
13000 pub struct GetAttributes;
13001
13002 impl ::fidl_next::Method for GetAttributes {
13003 const ORDINAL: u64 = 4414537700416816443;
13004 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13005 ::fidl_next::protocol::Flexibility::Strict;
13006
13007 type Protocol = crate::File;
13008
13009 type Request = crate::wire::NodeGetAttributesRequest;
13010 }
13011
13012 impl ::fidl_next::TwoWayMethod for GetAttributes {
13013 type Response = ::fidl_next::wire::Result<
13014 'static,
13015 crate::wire::NodeAttributes2<'static>,
13016 ::fidl_next::wire::Int32,
13017 >;
13018 }
13019
13020 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
13021 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13022
13023 fn respond(response: ___R) -> Self::Output {
13024 ::core::result::Result::Ok(response)
13025 }
13026 }
13027
13028 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
13029 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13030
13031 fn respond_err(response: ___R) -> Self::Output {
13032 ::core::result::Result::Err(response)
13033 }
13034 }
13035
13036 pub struct UpdateAttributes;
13037
13038 impl ::fidl_next::Method for UpdateAttributes {
13039 const ORDINAL: u64 = 3677402239314018056;
13040 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13041 ::fidl_next::protocol::Flexibility::Strict;
13042
13043 type Protocol = crate::File;
13044
13045 type Request = crate::wire::MutableNodeAttributes<'static>;
13046 }
13047
13048 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
13049 type Response = ::fidl_next::wire::Result<
13050 'static,
13051 crate::wire::NodeUpdateAttributesResponse,
13052 ::fidl_next::wire::Int32,
13053 >;
13054 }
13055
13056 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
13057 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13058
13059 fn respond(response: ___R) -> Self::Output {
13060 ::core::result::Result::Ok(response)
13061 }
13062 }
13063
13064 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
13065 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13066
13067 fn respond_err(response: ___R) -> Self::Output {
13068 ::core::result::Result::Err(response)
13069 }
13070 }
13071
13072 pub struct Sync;
13073
13074 impl ::fidl_next::Method for Sync {
13075 const ORDINAL: u64 = 3196473584242777161;
13076 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13077 ::fidl_next::protocol::Flexibility::Strict;
13078
13079 type Protocol = crate::File;
13080
13081 type Request = ::fidl_next::wire::EmptyMessageBody;
13082 }
13083
13084 impl ::fidl_next::TwoWayMethod for Sync {
13085 type Response = ::fidl_next::wire::Result<
13086 'static,
13087 crate::wire::NodeSyncResponse,
13088 ::fidl_next::wire::Int32,
13089 >;
13090 }
13091
13092 impl<___R> ::fidl_next::Respond<___R> for Sync {
13093 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13094
13095 fn respond(response: ___R) -> Self::Output {
13096 ::core::result::Result::Ok(response)
13097 }
13098 }
13099
13100 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
13101 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13102
13103 fn respond_err(response: ___R) -> Self::Output {
13104 ::core::result::Result::Err(response)
13105 }
13106 }
13107
13108 pub struct ListExtendedAttributes;
13109
13110 impl ::fidl_next::Method for ListExtendedAttributes {
13111 const ORDINAL: u64 = 5431626189872037072;
13112 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13113 ::fidl_next::protocol::Flexibility::Strict;
13114
13115 type Protocol = crate::File;
13116
13117 type Request = crate::wire::NodeListExtendedAttributesRequest;
13118 }
13119
13120 pub struct GetExtendedAttribute;
13121
13122 impl ::fidl_next::Method for GetExtendedAttribute {
13123 const ORDINAL: u64 = 5043930208506967771;
13124 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13125 ::fidl_next::protocol::Flexibility::Strict;
13126
13127 type Protocol = crate::File;
13128
13129 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
13130 }
13131
13132 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
13133 type Response = ::fidl_next::wire::Result<
13134 'static,
13135 crate::wire::ExtendedAttributeValue<'static>,
13136 ::fidl_next::wire::Int32,
13137 >;
13138 }
13139
13140 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
13141 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13142
13143 fn respond(response: ___R) -> Self::Output {
13144 ::core::result::Result::Ok(response)
13145 }
13146 }
13147
13148 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
13149 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13150
13151 fn respond_err(response: ___R) -> Self::Output {
13152 ::core::result::Result::Err(response)
13153 }
13154 }
13155
13156 pub struct SetExtendedAttribute;
13157
13158 impl ::fidl_next::Method for SetExtendedAttribute {
13159 const ORDINAL: u64 = 5374223046099989052;
13160 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13161 ::fidl_next::protocol::Flexibility::Strict;
13162
13163 type Protocol = crate::File;
13164
13165 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
13166 }
13167
13168 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
13169 type Response = ::fidl_next::wire::Result<
13170 'static,
13171 crate::wire::NodeSetExtendedAttributeResponse,
13172 ::fidl_next::wire::Int32,
13173 >;
13174 }
13175
13176 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
13177 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13178
13179 fn respond(response: ___R) -> Self::Output {
13180 ::core::result::Result::Ok(response)
13181 }
13182 }
13183
13184 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
13185 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13186
13187 fn respond_err(response: ___R) -> Self::Output {
13188 ::core::result::Result::Err(response)
13189 }
13190 }
13191
13192 pub struct RemoveExtendedAttribute;
13193
13194 impl ::fidl_next::Method for RemoveExtendedAttribute {
13195 const ORDINAL: u64 = 8794297771444732717;
13196 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13197 ::fidl_next::protocol::Flexibility::Strict;
13198
13199 type Protocol = crate::File;
13200
13201 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
13202 }
13203
13204 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
13205 type Response = ::fidl_next::wire::Result<
13206 'static,
13207 crate::wire::NodeRemoveExtendedAttributeResponse,
13208 ::fidl_next::wire::Int32,
13209 >;
13210 }
13211
13212 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
13213 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13214
13215 fn respond(response: ___R) -> Self::Output {
13216 ::core::result::Result::Ok(response)
13217 }
13218 }
13219
13220 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
13221 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13222
13223 fn respond_err(response: ___R) -> Self::Output {
13224 ::core::result::Result::Err(response)
13225 }
13226 }
13227
13228 pub struct Read;
13229
13230 impl ::fidl_next::Method for Read {
13231 const ORDINAL: u64 = 395825947633028830;
13232 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13233 ::fidl_next::protocol::Flexibility::Strict;
13234
13235 type Protocol = crate::File;
13236
13237 type Request = crate::wire::ReadableReadRequest;
13238 }
13239
13240 impl ::fidl_next::TwoWayMethod for Read {
13241 type Response = ::fidl_next::wire::Result<
13242 'static,
13243 crate::wire::ReadableReadResponse<'static>,
13244 ::fidl_next::wire::Int32,
13245 >;
13246 }
13247
13248 impl<___R> ::fidl_next::Respond<___R> for Read {
13249 type Output = ::core::result::Result<
13250 crate::generic::ReadableReadResponse<___R>,
13251 ::fidl_next::util::Never,
13252 >;
13253
13254 fn respond(response: ___R) -> Self::Output {
13255 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
13256 }
13257 }
13258
13259 impl<___R> ::fidl_next::RespondErr<___R> for Read {
13260 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13261
13262 fn respond_err(response: ___R) -> Self::Output {
13263 ::core::result::Result::Err(response)
13264 }
13265 }
13266
13267 pub struct Write;
13268
13269 impl ::fidl_next::Method for Write {
13270 const ORDINAL: u64 = 7651971425397809026;
13271 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13272 ::fidl_next::protocol::Flexibility::Strict;
13273
13274 type Protocol = crate::File;
13275
13276 type Request = crate::wire::WritableWriteRequest<'static>;
13277 }
13278
13279 impl ::fidl_next::TwoWayMethod for Write {
13280 type Response = ::fidl_next::wire::Result<
13281 'static,
13282 crate::wire::WritableWriteResponse,
13283 ::fidl_next::wire::Int32,
13284 >;
13285 }
13286
13287 impl<___R> ::fidl_next::Respond<___R> for Write {
13288 type Output = ::core::result::Result<
13289 crate::generic::WritableWriteResponse<___R>,
13290 ::fidl_next::util::Never,
13291 >;
13292
13293 fn respond(response: ___R) -> Self::Output {
13294 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
13295 actual_count: response,
13296 })
13297 }
13298 }
13299
13300 impl<___R> ::fidl_next::RespondErr<___R> for Write {
13301 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13302
13303 fn respond_err(response: ___R) -> Self::Output {
13304 ::core::result::Result::Err(response)
13305 }
13306 }
13307
13308 pub struct Describe;
13309
13310 impl ::fidl_next::Method for Describe {
13311 const ORDINAL: u64 = 7545125870053689020;
13312 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13313 ::fidl_next::protocol::Flexibility::Strict;
13314
13315 type Protocol = crate::File;
13316
13317 type Request = ::fidl_next::wire::EmptyMessageBody;
13318 }
13319
13320 impl ::fidl_next::TwoWayMethod for Describe {
13321 type Response = crate::wire::FileInfo<'static>;
13322 }
13323
13324 impl<___R> ::fidl_next::Respond<___R> for Describe {
13325 type Output = ___R;
13326
13327 fn respond(response: ___R) -> Self::Output {
13328 response
13329 }
13330 }
13331
13332 pub struct Seek;
13333
13334 impl ::fidl_next::Method for Seek {
13335 const ORDINAL: u64 = 8649041485622956551;
13336 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13337 ::fidl_next::protocol::Flexibility::Strict;
13338
13339 type Protocol = crate::File;
13340
13341 type Request = crate::wire::FileSeekRequest;
13342 }
13343
13344 impl ::fidl_next::TwoWayMethod for Seek {
13345 type Response = ::fidl_next::wire::Result<
13346 'static,
13347 crate::wire::FileSeekResponse,
13348 ::fidl_next::wire::Int32,
13349 >;
13350 }
13351
13352 impl<___R> ::fidl_next::Respond<___R> for Seek {
13353 type Output = ::core::result::Result<
13354 crate::generic::FileSeekResponse<___R>,
13355 ::fidl_next::util::Never,
13356 >;
13357
13358 fn respond(response: ___R) -> Self::Output {
13359 ::core::result::Result::Ok(crate::generic::FileSeekResponse {
13360 offset_from_start: response,
13361 })
13362 }
13363 }
13364
13365 impl<___R> ::fidl_next::RespondErr<___R> for Seek {
13366 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13367
13368 fn respond_err(response: ___R) -> Self::Output {
13369 ::core::result::Result::Err(response)
13370 }
13371 }
13372
13373 pub struct ReadAt;
13374
13375 impl ::fidl_next::Method for ReadAt {
13376 const ORDINAL: u64 = 1587416148701180478;
13377 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13378 ::fidl_next::protocol::Flexibility::Strict;
13379
13380 type Protocol = crate::File;
13381
13382 type Request = crate::wire::FileReadAtRequest;
13383 }
13384
13385 impl ::fidl_next::TwoWayMethod for ReadAt {
13386 type Response = ::fidl_next::wire::Result<
13387 'static,
13388 crate::wire::FileReadAtResponse<'static>,
13389 ::fidl_next::wire::Int32,
13390 >;
13391 }
13392
13393 impl<___R> ::fidl_next::Respond<___R> for ReadAt {
13394 type Output = ::core::result::Result<
13395 crate::generic::FileReadAtResponse<___R>,
13396 ::fidl_next::util::Never,
13397 >;
13398
13399 fn respond(response: ___R) -> Self::Output {
13400 ::core::result::Result::Ok(crate::generic::FileReadAtResponse { data: response })
13401 }
13402 }
13403
13404 impl<___R> ::fidl_next::RespondErr<___R> for ReadAt {
13405 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13406
13407 fn respond_err(response: ___R) -> Self::Output {
13408 ::core::result::Result::Err(response)
13409 }
13410 }
13411
13412 pub struct WriteAt;
13413
13414 impl ::fidl_next::Method for WriteAt {
13415 const ORDINAL: u64 = 8736683935131400491;
13416 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13417 ::fidl_next::protocol::Flexibility::Strict;
13418
13419 type Protocol = crate::File;
13420
13421 type Request = crate::wire::FileWriteAtRequest<'static>;
13422 }
13423
13424 impl ::fidl_next::TwoWayMethod for WriteAt {
13425 type Response = ::fidl_next::wire::Result<
13426 'static,
13427 crate::wire::FileWriteAtResponse,
13428 ::fidl_next::wire::Int32,
13429 >;
13430 }
13431
13432 impl<___R> ::fidl_next::Respond<___R> for WriteAt {
13433 type Output = ::core::result::Result<
13434 crate::generic::FileWriteAtResponse<___R>,
13435 ::fidl_next::util::Never,
13436 >;
13437
13438 fn respond(response: ___R) -> Self::Output {
13439 ::core::result::Result::Ok(crate::generic::FileWriteAtResponse {
13440 actual_count: response,
13441 })
13442 }
13443 }
13444
13445 impl<___R> ::fidl_next::RespondErr<___R> for WriteAt {
13446 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13447
13448 fn respond_err(response: ___R) -> Self::Output {
13449 ::core::result::Result::Err(response)
13450 }
13451 }
13452
13453 pub struct Resize;
13454
13455 impl ::fidl_next::Method for Resize {
13456 const ORDINAL: u64 = 3134648685270758458;
13457 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13458 ::fidl_next::protocol::Flexibility::Strict;
13459
13460 type Protocol = crate::File;
13461
13462 type Request = crate::wire::FileResizeRequest;
13463 }
13464
13465 impl ::fidl_next::TwoWayMethod for Resize {
13466 type Response = ::fidl_next::wire::Result<
13467 'static,
13468 crate::wire::FileResizeResponse,
13469 ::fidl_next::wire::Int32,
13470 >;
13471 }
13472
13473 impl<___R> ::fidl_next::Respond<___R> for Resize {
13474 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13475
13476 fn respond(response: ___R) -> Self::Output {
13477 ::core::result::Result::Ok(response)
13478 }
13479 }
13480
13481 impl<___R> ::fidl_next::RespondErr<___R> for Resize {
13482 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13483
13484 fn respond_err(response: ___R) -> Self::Output {
13485 ::core::result::Result::Err(response)
13486 }
13487 }
13488
13489 pub struct GetBackingMemory;
13490
13491 impl ::fidl_next::Method for GetBackingMemory {
13492 const ORDINAL: u64 = 46911652864194091;
13493 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13494 ::fidl_next::protocol::Flexibility::Strict;
13495
13496 type Protocol = crate::File;
13497
13498 type Request = crate::wire::FileGetBackingMemoryRequest;
13499 }
13500
13501 impl ::fidl_next::TwoWayMethod for GetBackingMemory {
13502 type Response = ::fidl_next::wire::Result<
13503 'static,
13504 crate::wire::FileGetBackingMemoryResponse,
13505 ::fidl_next::wire::Int32,
13506 >;
13507 }
13508
13509 impl<___R> ::fidl_next::Respond<___R> for GetBackingMemory {
13510 type Output = ::core::result::Result<
13511 crate::generic::FileGetBackingMemoryResponse<___R>,
13512 ::fidl_next::util::Never,
13513 >;
13514
13515 fn respond(response: ___R) -> Self::Output {
13516 ::core::result::Result::Ok(crate::generic::FileGetBackingMemoryResponse {
13517 vmo: response,
13518 })
13519 }
13520 }
13521
13522 impl<___R> ::fidl_next::RespondErr<___R> for GetBackingMemory {
13523 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13524
13525 fn respond_err(response: ___R) -> Self::Output {
13526 ::core::result::Result::Err(response)
13527 }
13528 }
13529
13530 pub struct Allocate;
13531
13532 impl ::fidl_next::Method for Allocate {
13533 const ORDINAL: u64 = 8645235848064269614;
13534 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13535 ::fidl_next::protocol::Flexibility::Flexible;
13536
13537 type Protocol = crate::File;
13538
13539 type Request = crate::wire::FileAllocateRequest;
13540 }
13541
13542 impl ::fidl_next::TwoWayMethod for Allocate {
13543 type Response = ::fidl_next::wire::FlexibleResult<
13544 'static,
13545 crate::wire::FileAllocateResponse,
13546 ::fidl_next::wire::Int32,
13547 >;
13548 }
13549
13550 impl<___R> ::fidl_next::Respond<___R> for Allocate {
13551 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13552
13553 fn respond(response: ___R) -> Self::Output {
13554 ::fidl_next::FlexibleResult::Ok(response)
13555 }
13556 }
13557
13558 impl<___R> ::fidl_next::RespondErr<___R> for Allocate {
13559 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13560
13561 fn respond_err(response: ___R) -> Self::Output {
13562 ::fidl_next::FlexibleResult::Err(response)
13563 }
13564 }
13565
13566 pub struct EnableVerity;
13567
13568 impl ::fidl_next::Method for EnableVerity {
13569 const ORDINAL: u64 = 3189145313204943035;
13570 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13571 ::fidl_next::protocol::Flexibility::Flexible;
13572
13573 type Protocol = crate::File;
13574
13575 type Request = crate::wire::FileEnableVerityRequest<'static>;
13576 }
13577
13578 impl ::fidl_next::TwoWayMethod for EnableVerity {
13579 type Response = ::fidl_next::wire::FlexibleResult<
13580 'static,
13581 crate::wire::FileEnableVerityResponse,
13582 ::fidl_next::wire::Int32,
13583 >;
13584 }
13585
13586 impl<___R> ::fidl_next::Respond<___R> for EnableVerity {
13587 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13588
13589 fn respond(response: ___R) -> Self::Output {
13590 ::fidl_next::FlexibleResult::Ok(response)
13591 }
13592 }
13593
13594 impl<___R> ::fidl_next::RespondErr<___R> for EnableVerity {
13595 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13596
13597 fn respond_err(response: ___R) -> Self::Output {
13598 ::fidl_next::FlexibleResult::Err(response)
13599 }
13600 }
13601
13602 mod ___detail {
13603 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::File
13604 where
13605 ___T: ::fidl_next::Transport,
13606 {
13607 type Client = FileClient<___T>;
13608 type Server = FileServer<___T>;
13609 }
13610
13611 #[repr(transparent)]
13613 pub struct FileClient<___T: ::fidl_next::Transport> {
13614 #[allow(dead_code)]
13615 client: ::fidl_next::protocol::Client<___T>,
13616 }
13617
13618 impl<___T> FileClient<___T>
13619 where
13620 ___T: ::fidl_next::Transport,
13621 {
13622 #[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"]
13623 pub fn advisory_lock(
13624 &self,
13625
13626 request: impl ::fidl_next::Encode<
13627 crate::wire::AdvisoryLockRequest<'static>,
13628 <___T as ::fidl_next::Transport>::SendBuffer,
13629 >,
13630 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
13631 where
13632 <___T as ::fidl_next::Transport>::SendBuffer:
13633 ::fidl_next::encoder::InternalHandleEncoder,
13634 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
13635 {
13636 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
13637 request,
13638 })
13639 }
13640
13641 #[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"]
13642 pub fn advisory_lock_with<___R>(
13643 &self,
13644 request: ___R,
13645 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
13646 where
13647 ___R: ::fidl_next::Encode<
13648 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
13649 <___T as ::fidl_next::Transport>::SendBuffer,
13650 >,
13651 {
13652 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13653 7992130864415541162,
13654 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
13655 request,
13656 ))
13657 }
13658
13659 #[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"]
13660 pub fn link_into(
13661 &self,
13662
13663 dst_parent_token: impl ::fidl_next::Encode<
13664 ::fdomain_client::fidl_next::wire::Handle,
13665 <___T as ::fidl_next::Transport>::SendBuffer,
13666 >,
13667
13668 dst: impl ::fidl_next::Encode<
13669 ::fidl_next::wire::String<'static>,
13670 <___T as ::fidl_next::Transport>::SendBuffer,
13671 >,
13672 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
13673 where
13674 <___T as ::fidl_next::Transport>::SendBuffer:
13675 ::fidl_next::encoder::InternalHandleEncoder,
13676 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
13677 <___T as ::fidl_next::Transport>::SendBuffer:
13678 ::fdomain_client::fidl_next::HandleEncoder,
13679 {
13680 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
13681 dst_parent_token,
13682
13683 dst,
13684 })
13685 }
13686
13687 #[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"]
13688 pub fn link_into_with<___R>(
13689 &self,
13690 request: ___R,
13691 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
13692 where
13693 ___R: ::fidl_next::Encode<
13694 crate::wire::LinkableLinkIntoRequest<'static>,
13695 <___T as ::fidl_next::Transport>::SendBuffer,
13696 >,
13697 {
13698 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13699 6121399674497678964,
13700 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
13701 request,
13702 ))
13703 }
13704
13705 pub fn clone(
13706 &self,
13707
13708 request: impl ::fidl_next::Encode<
13709 ::fidl_next::ServerEnd<
13710 ::fdomain_next_fuchsia_unknown::Cloneable,
13711 ::fdomain_client::fidl_next::wire::Handle,
13712 >,
13713 <___T as ::fidl_next::Transport>::SendBuffer,
13714 >,
13715 ) -> ::fidl_next::SendFuture<'_, ___T>
13716 where
13717 <___T as ::fidl_next::Transport>::SendBuffer:
13718 ::fidl_next::encoder::InternalHandleEncoder,
13719 <___T as ::fidl_next::Transport>::SendBuffer:
13720 ::fdomain_client::fidl_next::HandleEncoder,
13721 {
13722 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
13723 request,
13724 })
13725 }
13726
13727 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
13728 where
13729 ___R: ::fidl_next::Encode<
13730 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
13731 <___T as ::fidl_next::Transport>::SendBuffer,
13732 >,
13733 {
13734 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
13735 2366825959783828089,
13736 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
13737 request,
13738 ))
13739 }
13740
13741 #[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"]
13742 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
13743 ::fidl_next::TwoWayFuture::from_untyped(
13744 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13745 6540867515453498750,
13746 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
13747 (),
13748 ),
13749 )
13750 }
13751
13752 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
13753 ::fidl_next::TwoWayFuture::from_untyped(
13754 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13755 2763219980499352582,
13756 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
13757 (),
13758 ),
13759 )
13760 }
13761
13762 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
13763 pub fn deprecated_clone(
13764 &self,
13765
13766 flags: impl ::fidl_next::Encode<
13767 crate::wire::OpenFlags,
13768 <___T as ::fidl_next::Transport>::SendBuffer,
13769 >,
13770
13771 object: impl ::fidl_next::Encode<
13772 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
13773 <___T as ::fidl_next::Transport>::SendBuffer,
13774 >,
13775 ) -> ::fidl_next::SendFuture<'_, ___T>
13776 where
13777 <___T as ::fidl_next::Transport>::SendBuffer:
13778 ::fidl_next::encoder::InternalHandleEncoder,
13779 <___T as ::fidl_next::Transport>::SendBuffer:
13780 ::fdomain_client::fidl_next::HandleEncoder,
13781 {
13782 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
13783 flags,
13784
13785 object,
13786 })
13787 }
13788
13789 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
13790 pub fn deprecated_clone_with<___R>(
13791 &self,
13792 request: ___R,
13793 ) -> ::fidl_next::SendFuture<'_, ___T>
13794 where
13795 ___R: ::fidl_next::Encode<
13796 crate::wire::NodeDeprecatedCloneRequest,
13797 <___T as ::fidl_next::Transport>::SendBuffer,
13798 >,
13799 {
13800 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
13801 6512600400724287855,
13802 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
13803 request,
13804 ))
13805 }
13806
13807 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
13808 pub fn deprecated_get_attr(
13809 &self,
13810 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
13811 ::fidl_next::TwoWayFuture::from_untyped(
13812 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13813 8689798978500614909,
13814 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
13815 (),
13816 ),
13817 )
13818 }
13819
13820 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
13821 pub fn deprecated_set_attr(
13822 &self,
13823
13824 flags: impl ::fidl_next::Encode<
13825 crate::wire::NodeAttributeFlags,
13826 <___T as ::fidl_next::Transport>::SendBuffer,
13827 >,
13828
13829 attributes: impl ::fidl_next::Encode<
13830 crate::wire::NodeAttributes,
13831 <___T as ::fidl_next::Transport>::SendBuffer,
13832 >,
13833 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
13834 where
13835 <___T as ::fidl_next::Transport>::SendBuffer:
13836 ::fidl_next::encoder::InternalHandleEncoder,
13837 {
13838 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
13839 flags,
13840
13841 attributes,
13842 })
13843 }
13844
13845 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
13846 pub fn deprecated_set_attr_with<___R>(
13847 &self,
13848 request: ___R,
13849 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
13850 where
13851 ___R: ::fidl_next::Encode<
13852 crate::wire::NodeDeprecatedSetAttrRequest,
13853 <___T as ::fidl_next::Transport>::SendBuffer,
13854 >,
13855 {
13856 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13857 4721673413776871238,
13858 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
13859 request,
13860 ))
13861 }
13862
13863 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
13864 pub fn deprecated_get_flags(
13865 &self,
13866 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
13867 ::fidl_next::TwoWayFuture::from_untyped(
13868 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13869 6595803110182632097,
13870 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
13871 (),
13872 ),
13873 )
13874 }
13875
13876 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
13877 pub fn deprecated_set_flags(
13878 &self,
13879
13880 flags: impl ::fidl_next::Encode<
13881 crate::wire::OpenFlags,
13882 <___T as ::fidl_next::Transport>::SendBuffer,
13883 >,
13884 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
13885 where
13886 <___T as ::fidl_next::Transport>::SendBuffer:
13887 ::fidl_next::encoder::InternalHandleEncoder,
13888 {
13889 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
13890 flags,
13891 })
13892 }
13893
13894 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
13895 pub fn deprecated_set_flags_with<___R>(
13896 &self,
13897 request: ___R,
13898 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
13899 where
13900 ___R: ::fidl_next::Encode<
13901 crate::wire::NodeDeprecatedSetFlagsRequest,
13902 <___T as ::fidl_next::Transport>::SendBuffer,
13903 >,
13904 {
13905 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13906 5950864159036794675,
13907 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
13908 request,
13909 ))
13910 }
13911
13912 #[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"]
13913 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
13914 ::fidl_next::TwoWayFuture::from_untyped(
13915 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13916 105530239381466147,
13917 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
13918 (),
13919 ),
13920 )
13921 }
13922
13923 #[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"]
13924 pub fn set_flags(
13925 &self,
13926
13927 flags: impl ::fidl_next::Encode<
13928 crate::wire::Flags,
13929 <___T as ::fidl_next::Transport>::SendBuffer,
13930 >,
13931 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
13932 where
13933 <___T as ::fidl_next::Transport>::SendBuffer:
13934 ::fidl_next::encoder::InternalHandleEncoder,
13935 {
13936 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
13937 }
13938
13939 #[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"]
13940 pub fn set_flags_with<___R>(
13941 &self,
13942 request: ___R,
13943 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
13944 where
13945 ___R: ::fidl_next::Encode<
13946 crate::wire::NodeSetFlagsRequest,
13947 <___T as ::fidl_next::Transport>::SendBuffer,
13948 >,
13949 {
13950 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13951 6172186066099445416,
13952 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
13953 request,
13954 ))
13955 }
13956
13957 #[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"]
13958 pub fn query_filesystem(
13959 &self,
13960 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
13961 ::fidl_next::TwoWayFuture::from_untyped(
13962 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
13963 8013111122914313744,
13964 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
13965 (),
13966 ),
13967 )
13968 }
13969
13970 #[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"]
13971 pub fn get_attributes(
13972 &self,
13973
13974 query: impl ::fidl_next::Encode<
13975 crate::wire::NodeAttributesQuery,
13976 <___T as ::fidl_next::Transport>::SendBuffer,
13977 >,
13978 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
13979 where
13980 <___T as ::fidl_next::Transport>::SendBuffer:
13981 ::fidl_next::encoder::InternalHandleEncoder,
13982 {
13983 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
13984 }
13985
13986 #[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"]
13987 pub fn get_attributes_with<___R>(
13988 &self,
13989 request: ___R,
13990 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
13991 where
13992 ___R: ::fidl_next::Encode<
13993 crate::wire::NodeGetAttributesRequest,
13994 <___T as ::fidl_next::Transport>::SendBuffer,
13995 >,
13996 {
13997 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13998 4414537700416816443,
13999 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
14000 request,
14001 ))
14002 }
14003
14004 #[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"]
14005 pub fn update_attributes_with<___R>(
14006 &self,
14007 request: ___R,
14008 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
14009 where
14010 ___R: ::fidl_next::Encode<
14011 crate::wire::MutableNodeAttributes<'static>,
14012 <___T as ::fidl_next::Transport>::SendBuffer,
14013 >,
14014 {
14015 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14016 3677402239314018056,
14017 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
14018 request,
14019 ))
14020 }
14021
14022 #[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"]
14023 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
14024 ::fidl_next::TwoWayFuture::from_untyped(
14025 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14026 3196473584242777161,
14027 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
14028 (),
14029 ),
14030 )
14031 }
14032
14033 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14034 pub fn list_extended_attributes(
14035 &self,
14036
14037 iterator: impl ::fidl_next::Encode<
14038 ::fidl_next::ServerEnd<
14039 crate::ExtendedAttributeIterator,
14040 ::fdomain_client::fidl_next::wire::Handle,
14041 >,
14042 <___T as ::fidl_next::Transport>::SendBuffer,
14043 >,
14044 ) -> ::fidl_next::SendFuture<'_, ___T>
14045 where
14046 <___T as ::fidl_next::Transport>::SendBuffer:
14047 ::fidl_next::encoder::InternalHandleEncoder,
14048 <___T as ::fidl_next::Transport>::SendBuffer:
14049 ::fdomain_client::fidl_next::HandleEncoder,
14050 {
14051 self.list_extended_attributes_with(
14052 crate::generic::NodeListExtendedAttributesRequest { iterator },
14053 )
14054 }
14055
14056 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14057 pub fn list_extended_attributes_with<___R>(
14058 &self,
14059 request: ___R,
14060 ) -> ::fidl_next::SendFuture<'_, ___T>
14061 where
14062 ___R: ::fidl_next::Encode<
14063 crate::wire::NodeListExtendedAttributesRequest,
14064 <___T as ::fidl_next::Transport>::SendBuffer,
14065 >,
14066 {
14067 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14068 5431626189872037072,
14069 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
14070 request,
14071 ))
14072 }
14073
14074 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14075 pub fn get_extended_attribute(
14076 &self,
14077
14078 name: impl ::fidl_next::Encode<
14079 ::fidl_next::wire::Vector<'static, u8>,
14080 <___T as ::fidl_next::Transport>::SendBuffer,
14081 >,
14082 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14083 where
14084 <___T as ::fidl_next::Transport>::SendBuffer:
14085 ::fidl_next::encoder::InternalHandleEncoder,
14086 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14087 {
14088 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
14089 name,
14090 })
14091 }
14092
14093 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14094 pub fn get_extended_attribute_with<___R>(
14095 &self,
14096 request: ___R,
14097 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14098 where
14099 ___R: ::fidl_next::Encode<
14100 crate::wire::NodeGetExtendedAttributeRequest<'static>,
14101 <___T as ::fidl_next::Transport>::SendBuffer,
14102 >,
14103 {
14104 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14105 5043930208506967771,
14106 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14107 request,
14108 ))
14109 }
14110
14111 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14112 pub fn set_extended_attribute(
14113 &self,
14114
14115 name: impl ::fidl_next::Encode<
14116 ::fidl_next::wire::Vector<'static, u8>,
14117 <___T as ::fidl_next::Transport>::SendBuffer,
14118 >,
14119
14120 value: impl ::fidl_next::Encode<
14121 crate::wire::ExtendedAttributeValue<'static>,
14122 <___T as ::fidl_next::Transport>::SendBuffer,
14123 >,
14124
14125 mode: impl ::fidl_next::Encode<
14126 crate::wire::SetExtendedAttributeMode,
14127 <___T as ::fidl_next::Transport>::SendBuffer,
14128 >,
14129 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14130 where
14131 <___T as ::fidl_next::Transport>::SendBuffer:
14132 ::fidl_next::encoder::InternalHandleEncoder,
14133 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14134 <___T as ::fidl_next::Transport>::SendBuffer:
14135 ::fdomain_client::fidl_next::HandleEncoder,
14136 {
14137 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
14138 name,
14139
14140 value,
14141
14142 mode,
14143 })
14144 }
14145
14146 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14147 pub fn set_extended_attribute_with<___R>(
14148 &self,
14149 request: ___R,
14150 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14151 where
14152 ___R: ::fidl_next::Encode<
14153 crate::wire::NodeSetExtendedAttributeRequest<'static>,
14154 <___T as ::fidl_next::Transport>::SendBuffer,
14155 >,
14156 {
14157 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14158 5374223046099989052,
14159 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14160 request,
14161 ))
14162 }
14163
14164 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14165 pub fn remove_extended_attribute(
14166 &self,
14167
14168 name: impl ::fidl_next::Encode<
14169 ::fidl_next::wire::Vector<'static, u8>,
14170 <___T as ::fidl_next::Transport>::SendBuffer,
14171 >,
14172 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14173 where
14174 <___T as ::fidl_next::Transport>::SendBuffer:
14175 ::fidl_next::encoder::InternalHandleEncoder,
14176 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14177 {
14178 self.remove_extended_attribute_with(
14179 crate::generic::NodeRemoveExtendedAttributeRequest { name },
14180 )
14181 }
14182
14183 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14184 pub fn remove_extended_attribute_with<___R>(
14185 &self,
14186 request: ___R,
14187 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14188 where
14189 ___R: ::fidl_next::Encode<
14190 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
14191 <___T as ::fidl_next::Transport>::SendBuffer,
14192 >,
14193 {
14194 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14195 8794297771444732717,
14196 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14197 request,
14198 ))
14199 }
14200
14201 #[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"]
14202 pub fn read(
14203 &self,
14204
14205 count: impl ::fidl_next::Encode<
14206 ::fidl_next::wire::Uint64,
14207 <___T as ::fidl_next::Transport>::SendBuffer,
14208 >,
14209 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
14210 where
14211 <___T as ::fidl_next::Transport>::SendBuffer:
14212 ::fidl_next::encoder::InternalHandleEncoder,
14213 {
14214 self.read_with(crate::generic::ReadableReadRequest { count })
14215 }
14216
14217 #[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"]
14218 pub fn read_with<___R>(
14219 &self,
14220 request: ___R,
14221 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
14222 where
14223 ___R: ::fidl_next::Encode<
14224 crate::wire::ReadableReadRequest,
14225 <___T as ::fidl_next::Transport>::SendBuffer,
14226 >,
14227 {
14228 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14229 395825947633028830,
14230 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
14231 request,
14232 ))
14233 }
14234
14235 #[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"]
14236 pub fn write(
14237 &self,
14238
14239 data: impl ::fidl_next::Encode<
14240 ::fidl_next::wire::Vector<'static, u8>,
14241 <___T as ::fidl_next::Transport>::SendBuffer,
14242 >,
14243 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
14244 where
14245 <___T as ::fidl_next::Transport>::SendBuffer:
14246 ::fidl_next::encoder::InternalHandleEncoder,
14247 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14248 {
14249 self.write_with(crate::generic::WritableWriteRequest { data })
14250 }
14251
14252 #[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"]
14253 pub fn write_with<___R>(
14254 &self,
14255 request: ___R,
14256 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
14257 where
14258 ___R: ::fidl_next::Encode<
14259 crate::wire::WritableWriteRequest<'static>,
14260 <___T as ::fidl_next::Transport>::SendBuffer,
14261 >,
14262 {
14263 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14264 7651971425397809026,
14265 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
14266 request,
14267 ))
14268 }
14269
14270 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
14271 ::fidl_next::TwoWayFuture::from_untyped(
14272 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14273 7545125870053689020,
14274 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
14275 (),
14276 ),
14277 )
14278 }
14279
14280 #[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"]
14281 pub fn seek(
14282 &self,
14283
14284 origin: impl ::fidl_next::Encode<
14285 crate::wire::SeekOrigin,
14286 <___T as ::fidl_next::Transport>::SendBuffer,
14287 >,
14288
14289 offset: impl ::fidl_next::Encode<
14290 ::fidl_next::wire::Int64,
14291 <___T as ::fidl_next::Transport>::SendBuffer,
14292 >,
14293 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
14294 where
14295 <___T as ::fidl_next::Transport>::SendBuffer:
14296 ::fidl_next::encoder::InternalHandleEncoder,
14297 {
14298 self.seek_with(crate::generic::FileSeekRequest { origin, offset })
14299 }
14300
14301 #[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"]
14302 pub fn seek_with<___R>(
14303 &self,
14304 request: ___R,
14305 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
14306 where
14307 ___R: ::fidl_next::Encode<
14308 crate::wire::FileSeekRequest,
14309 <___T as ::fidl_next::Transport>::SendBuffer,
14310 >,
14311 {
14312 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14313 8649041485622956551,
14314 <super::Seek as ::fidl_next::Method>::FLEXIBILITY,
14315 request,
14316 ))
14317 }
14318
14319 #[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"]
14320 pub fn read_at(
14321 &self,
14322
14323 count: impl ::fidl_next::Encode<
14324 ::fidl_next::wire::Uint64,
14325 <___T as ::fidl_next::Transport>::SendBuffer,
14326 >,
14327
14328 offset: impl ::fidl_next::Encode<
14329 ::fidl_next::wire::Uint64,
14330 <___T as ::fidl_next::Transport>::SendBuffer,
14331 >,
14332 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
14333 where
14334 <___T as ::fidl_next::Transport>::SendBuffer:
14335 ::fidl_next::encoder::InternalHandleEncoder,
14336 {
14337 self.read_at_with(crate::generic::FileReadAtRequest { count, offset })
14338 }
14339
14340 #[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"]
14341 pub fn read_at_with<___R>(
14342 &self,
14343 request: ___R,
14344 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
14345 where
14346 ___R: ::fidl_next::Encode<
14347 crate::wire::FileReadAtRequest,
14348 <___T as ::fidl_next::Transport>::SendBuffer,
14349 >,
14350 {
14351 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14352 1587416148701180478,
14353 <super::ReadAt as ::fidl_next::Method>::FLEXIBILITY,
14354 request,
14355 ))
14356 }
14357
14358 #[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"]
14359 pub fn write_at(
14360 &self,
14361
14362 data: impl ::fidl_next::Encode<
14363 ::fidl_next::wire::Vector<'static, u8>,
14364 <___T as ::fidl_next::Transport>::SendBuffer,
14365 >,
14366
14367 offset: impl ::fidl_next::Encode<
14368 ::fidl_next::wire::Uint64,
14369 <___T as ::fidl_next::Transport>::SendBuffer,
14370 >,
14371 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
14372 where
14373 <___T as ::fidl_next::Transport>::SendBuffer:
14374 ::fidl_next::encoder::InternalHandleEncoder,
14375 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14376 {
14377 self.write_at_with(crate::generic::FileWriteAtRequest { data, offset })
14378 }
14379
14380 #[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"]
14381 pub fn write_at_with<___R>(
14382 &self,
14383 request: ___R,
14384 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
14385 where
14386 ___R: ::fidl_next::Encode<
14387 crate::wire::FileWriteAtRequest<'static>,
14388 <___T as ::fidl_next::Transport>::SendBuffer,
14389 >,
14390 {
14391 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14392 8736683935131400491,
14393 <super::WriteAt as ::fidl_next::Method>::FLEXIBILITY,
14394 request,
14395 ))
14396 }
14397
14398 #[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"]
14399 pub fn resize(
14400 &self,
14401
14402 length: impl ::fidl_next::Encode<
14403 ::fidl_next::wire::Uint64,
14404 <___T as ::fidl_next::Transport>::SendBuffer,
14405 >,
14406 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
14407 where
14408 <___T as ::fidl_next::Transport>::SendBuffer:
14409 ::fidl_next::encoder::InternalHandleEncoder,
14410 {
14411 self.resize_with(crate::generic::FileResizeRequest { length })
14412 }
14413
14414 #[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"]
14415 pub fn resize_with<___R>(
14416 &self,
14417 request: ___R,
14418 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
14419 where
14420 ___R: ::fidl_next::Encode<
14421 crate::wire::FileResizeRequest,
14422 <___T as ::fidl_next::Transport>::SendBuffer,
14423 >,
14424 {
14425 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14426 3134648685270758458,
14427 <super::Resize as ::fidl_next::Method>::FLEXIBILITY,
14428 request,
14429 ))
14430 }
14431
14432 #[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"]
14433 pub fn get_backing_memory(
14434 &self,
14435
14436 flags: impl ::fidl_next::Encode<
14437 crate::wire::VmoFlags,
14438 <___T as ::fidl_next::Transport>::SendBuffer,
14439 >,
14440 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
14441 where
14442 <___T as ::fidl_next::Transport>::SendBuffer:
14443 ::fidl_next::encoder::InternalHandleEncoder,
14444 {
14445 self.get_backing_memory_with(crate::generic::FileGetBackingMemoryRequest { flags })
14446 }
14447
14448 #[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"]
14449 pub fn get_backing_memory_with<___R>(
14450 &self,
14451 request: ___R,
14452 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
14453 where
14454 ___R: ::fidl_next::Encode<
14455 crate::wire::FileGetBackingMemoryRequest,
14456 <___T as ::fidl_next::Transport>::SendBuffer,
14457 >,
14458 {
14459 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14460 46911652864194091,
14461 <super::GetBackingMemory as ::fidl_next::Method>::FLEXIBILITY,
14462 request,
14463 ))
14464 }
14465
14466 #[doc = " Pre-allocate on-disk space for this file.\n"]
14467 pub fn allocate(
14468 &self,
14469
14470 offset: impl ::fidl_next::Encode<
14471 ::fidl_next::wire::Uint64,
14472 <___T as ::fidl_next::Transport>::SendBuffer,
14473 >,
14474
14475 length: impl ::fidl_next::Encode<
14476 ::fidl_next::wire::Uint64,
14477 <___T as ::fidl_next::Transport>::SendBuffer,
14478 >,
14479
14480 mode: impl ::fidl_next::Encode<
14481 crate::wire::AllocateMode,
14482 <___T as ::fidl_next::Transport>::SendBuffer,
14483 >,
14484 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
14485 where
14486 <___T as ::fidl_next::Transport>::SendBuffer:
14487 ::fidl_next::encoder::InternalHandleEncoder,
14488 <___T as ::fidl_next::Transport>::SendBuffer:
14489 ::fdomain_client::fidl_next::HandleEncoder,
14490 {
14491 self.allocate_with(crate::generic::FileAllocateRequest { offset, length, mode })
14492 }
14493
14494 #[doc = " Pre-allocate on-disk space for this file.\n"]
14495 pub fn allocate_with<___R>(
14496 &self,
14497 request: ___R,
14498 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
14499 where
14500 ___R: ::fidl_next::Encode<
14501 crate::wire::FileAllocateRequest,
14502 <___T as ::fidl_next::Transport>::SendBuffer,
14503 >,
14504 {
14505 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14506 8645235848064269614,
14507 <super::Allocate as ::fidl_next::Method>::FLEXIBILITY,
14508 request,
14509 ))
14510 }
14511
14512 #[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"]
14513 pub fn enable_verity(
14514 &self,
14515
14516 options: impl ::fidl_next::Encode<
14517 crate::wire::VerificationOptions<'static>,
14518 <___T as ::fidl_next::Transport>::SendBuffer,
14519 >,
14520 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
14521 where
14522 <___T as ::fidl_next::Transport>::SendBuffer:
14523 ::fidl_next::encoder::InternalHandleEncoder,
14524 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14525 <___T as ::fidl_next::Transport>::SendBuffer:
14526 ::fdomain_client::fidl_next::HandleEncoder,
14527 {
14528 self.enable_verity_with(crate::generic::FileEnableVerityRequest { options })
14529 }
14530
14531 #[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"]
14532 pub fn enable_verity_with<___R>(
14533 &self,
14534 request: ___R,
14535 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
14536 where
14537 ___R: ::fidl_next::Encode<
14538 crate::wire::FileEnableVerityRequest<'static>,
14539 <___T as ::fidl_next::Transport>::SendBuffer,
14540 >,
14541 {
14542 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14543 3189145313204943035,
14544 <super::EnableVerity as ::fidl_next::Method>::FLEXIBILITY,
14545 request,
14546 ))
14547 }
14548 }
14549
14550 #[repr(transparent)]
14552 pub struct FileServer<___T: ::fidl_next::Transport> {
14553 server: ::fidl_next::protocol::Server<___T>,
14554 }
14555
14556 impl<___T> FileServer<___T>
14557 where
14558 ___T: ::fidl_next::Transport,
14559 {
14560 #[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"]
14561 pub fn on_open(
14562 &self,
14563
14564 s: impl ::fidl_next::Encode<
14565 ::fidl_next::wire::Int32,
14566 <___T as ::fidl_next::Transport>::SendBuffer,
14567 >,
14568
14569 info: impl ::fidl_next::Encode<
14570 crate::wire_optional::NodeInfoDeprecated<'static>,
14571 <___T as ::fidl_next::Transport>::SendBuffer,
14572 >,
14573 ) -> ::fidl_next::SendFuture<'_, ___T>
14574 where
14575 <___T as ::fidl_next::Transport>::SendBuffer:
14576 ::fidl_next::encoder::InternalHandleEncoder,
14577 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14578 <___T as ::fidl_next::Transport>::SendBuffer:
14579 ::fdomain_client::fidl_next::HandleEncoder,
14580 {
14581 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
14582 }
14583
14584 #[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"]
14585
14586 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14587 where
14588 ___R: ::fidl_next::Encode<
14589 <super::OnOpen as ::fidl_next::Method>::Request,
14590 <___T as ::fidl_next::Transport>::SendBuffer,
14591 >,
14592 {
14593 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14594 9207534335756671346,
14595 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
14596 request,
14597 ))
14598 }
14599
14600 #[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"]
14601
14602 pub fn on_representation_with<___R>(
14603 &self,
14604 request: ___R,
14605 ) -> ::fidl_next::SendFuture<'_, ___T>
14606 where
14607 ___R: ::fidl_next::Encode<
14608 <super::OnRepresentation as ::fidl_next::Method>::Request,
14609 <___T as ::fidl_next::Transport>::SendBuffer,
14610 >,
14611 {
14612 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14613 6679970090861613324,
14614 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
14615 request,
14616 ))
14617 }
14618 }
14619 }
14620}
14621
14622#[diagnostic::on_unimplemented(
14623 note = "If {Self} implements the non-local FileClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
14624)]
14625
14626pub trait FileLocalClientHandler<
14630 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
14631 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14632>
14633{
14634 #[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"]
14635 fn on_open(
14636 &mut self,
14637
14638 request: ::fidl_next::Request<file::OnOpen, ___T>,
14639 ) -> impl ::core::future::Future<Output = ()>;
14640
14641 #[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"]
14642 fn on_representation(
14643 &mut self,
14644
14645 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
14646 ) -> impl ::core::future::Future<Output = ()>;
14647
14648 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14649 ::core::future::ready(())
14650 }
14651}
14652
14653impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for File
14654where
14655 ___H: FileLocalClientHandler<___T>,
14656 ___T: ::fidl_next::Transport,
14657 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
14658 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14659 Constraint = (),
14660 >,
14661 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
14662 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14663 Constraint = (),
14664 >,
14665{
14666 async fn on_event(
14667 handler: &mut ___H,
14668 ordinal: u64,
14669 flexibility: ::fidl_next::protocol::Flexibility,
14670 body: ::fidl_next::Body<___T>,
14671 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14672 match ordinal {
14673 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
14674 Ok(decoded) => {
14675 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
14676 Ok(())
14677 }
14678 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14679 ordinal: 9207534335756671346,
14680 error,
14681 }),
14682 },
14683
14684 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
14685 Ok(decoded) => {
14686 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
14687 Ok(())
14688 }
14689 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14690 ordinal: 6679970090861613324,
14691 error,
14692 }),
14693 },
14694
14695 ordinal => {
14696 handler.on_unknown_interaction(ordinal).await;
14697 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14698 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14699 } else {
14700 Ok(())
14701 }
14702 }
14703 }
14704 }
14705}
14706
14707#[diagnostic::on_unimplemented(
14708 note = "If {Self} implements the non-local FileServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
14709)]
14710
14711pub trait FileLocalServerHandler<
14715 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
14716 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14717>
14718{
14719 #[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"]
14720 fn advisory_lock(
14721 &mut self,
14722
14723 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
14724
14725 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
14726 ) -> impl ::core::future::Future<Output = ()>;
14727
14728 #[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"]
14729 fn link_into(
14730 &mut self,
14731
14732 request: ::fidl_next::Request<file::LinkInto, ___T>,
14733
14734 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
14735 ) -> impl ::core::future::Future<Output = ()>;
14736
14737 fn clone(
14738 &mut self,
14739
14740 request: ::fidl_next::Request<file::Clone, ___T>,
14741 ) -> impl ::core::future::Future<Output = ()>;
14742
14743 #[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"]
14744 fn close(
14745 &mut self,
14746
14747 responder: ::fidl_next::Responder<file::Close, ___T>,
14748 ) -> impl ::core::future::Future<Output = ()>;
14749
14750 fn query(
14751 &mut self,
14752
14753 responder: ::fidl_next::Responder<file::Query, ___T>,
14754 ) -> impl ::core::future::Future<Output = ()>;
14755
14756 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14757 fn deprecated_clone(
14758 &mut self,
14759
14760 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
14761 ) -> impl ::core::future::Future<Output = ()>;
14762
14763 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14764 fn deprecated_get_attr(
14765 &mut self,
14766
14767 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
14768 ) -> impl ::core::future::Future<Output = ()>;
14769
14770 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14771 fn deprecated_set_attr(
14772 &mut self,
14773
14774 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
14775
14776 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
14777 ) -> impl ::core::future::Future<Output = ()>;
14778
14779 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14780 fn deprecated_get_flags(
14781 &mut self,
14782
14783 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
14784 ) -> impl ::core::future::Future<Output = ()>;
14785
14786 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14787 fn deprecated_set_flags(
14788 &mut self,
14789
14790 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
14791
14792 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
14793 ) -> impl ::core::future::Future<Output = ()>;
14794
14795 #[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"]
14796 fn get_flags(
14797 &mut self,
14798
14799 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
14800 ) -> impl ::core::future::Future<Output = ()>;
14801
14802 #[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"]
14803 fn set_flags(
14804 &mut self,
14805
14806 request: ::fidl_next::Request<file::SetFlags, ___T>,
14807
14808 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
14809 ) -> impl ::core::future::Future<Output = ()>;
14810
14811 #[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"]
14812 fn query_filesystem(
14813 &mut self,
14814
14815 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
14816 ) -> impl ::core::future::Future<Output = ()>;
14817
14818 #[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"]
14819 fn get_attributes(
14820 &mut self,
14821
14822 request: ::fidl_next::Request<file::GetAttributes, ___T>,
14823
14824 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
14825 ) -> impl ::core::future::Future<Output = ()>;
14826
14827 #[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"]
14828 fn update_attributes(
14829 &mut self,
14830
14831 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
14832
14833 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
14834 ) -> impl ::core::future::Future<Output = ()>;
14835
14836 #[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"]
14837 fn sync(
14838 &mut self,
14839
14840 responder: ::fidl_next::Responder<file::Sync, ___T>,
14841 ) -> impl ::core::future::Future<Output = ()>;
14842
14843 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14844 fn list_extended_attributes(
14845 &mut self,
14846
14847 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
14848 ) -> impl ::core::future::Future<Output = ()>;
14849
14850 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
14851 fn get_extended_attribute(
14852 &mut self,
14853
14854 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
14855
14856 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
14857 ) -> impl ::core::future::Future<Output = ()>;
14858
14859 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14860 fn set_extended_attribute(
14861 &mut self,
14862
14863 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
14864
14865 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
14866 ) -> impl ::core::future::Future<Output = ()>;
14867
14868 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14869 fn remove_extended_attribute(
14870 &mut self,
14871
14872 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
14873
14874 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
14875 ) -> impl ::core::future::Future<Output = ()>;
14876
14877 #[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"]
14878 fn read(
14879 &mut self,
14880
14881 request: ::fidl_next::Request<file::Read, ___T>,
14882
14883 responder: ::fidl_next::Responder<file::Read, ___T>,
14884 ) -> impl ::core::future::Future<Output = ()>;
14885
14886 #[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"]
14887 fn write(
14888 &mut self,
14889
14890 request: ::fidl_next::Request<file::Write, ___T>,
14891
14892 responder: ::fidl_next::Responder<file::Write, ___T>,
14893 ) -> impl ::core::future::Future<Output = ()>;
14894
14895 fn describe(
14896 &mut self,
14897
14898 responder: ::fidl_next::Responder<file::Describe, ___T>,
14899 ) -> impl ::core::future::Future<Output = ()>;
14900
14901 #[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"]
14902 fn seek(
14903 &mut self,
14904
14905 request: ::fidl_next::Request<file::Seek, ___T>,
14906
14907 responder: ::fidl_next::Responder<file::Seek, ___T>,
14908 ) -> impl ::core::future::Future<Output = ()>;
14909
14910 #[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"]
14911 fn read_at(
14912 &mut self,
14913
14914 request: ::fidl_next::Request<file::ReadAt, ___T>,
14915
14916 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
14917 ) -> impl ::core::future::Future<Output = ()>;
14918
14919 #[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"]
14920 fn write_at(
14921 &mut self,
14922
14923 request: ::fidl_next::Request<file::WriteAt, ___T>,
14924
14925 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
14926 ) -> impl ::core::future::Future<Output = ()>;
14927
14928 #[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"]
14929 fn resize(
14930 &mut self,
14931
14932 request: ::fidl_next::Request<file::Resize, ___T>,
14933
14934 responder: ::fidl_next::Responder<file::Resize, ___T>,
14935 ) -> impl ::core::future::Future<Output = ()>;
14936
14937 #[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"]
14938 fn get_backing_memory(
14939 &mut self,
14940
14941 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
14942
14943 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
14944 ) -> impl ::core::future::Future<Output = ()>;
14945
14946 #[doc = " Pre-allocate on-disk space for this file.\n"]
14947 fn allocate(
14948 &mut self,
14949
14950 request: ::fidl_next::Request<file::Allocate, ___T>,
14951
14952 responder: ::fidl_next::Responder<file::Allocate, ___T>,
14953 ) -> impl ::core::future::Future<Output = ()>;
14954
14955 #[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"]
14956 fn enable_verity(
14957 &mut self,
14958
14959 request: ::fidl_next::Request<file::EnableVerity, ___T>,
14960
14961 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
14962 ) -> impl ::core::future::Future<Output = ()>;
14963
14964 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14965 ::core::future::ready(())
14966 }
14967}
14968
14969impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for File
14970where
14971 ___H: FileLocalServerHandler<___T>,
14972 ___T: ::fidl_next::Transport,
14973 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
14974 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14975 Constraint = (),
14976 >,
14977 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
14978 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14979 Constraint = (),
14980 >,
14981 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
14982 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14983 Constraint = (),
14984 >,
14985 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
14986 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14987 Constraint = (),
14988 >,
14989 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
14990 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14991 Constraint = (),
14992 >,
14993 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
14994 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14995 Constraint = (),
14996 >,
14997 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
14998 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14999 Constraint = (),
15000 >,
15001 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
15002 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15003 Constraint = (),
15004 >,
15005 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
15006 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15007 Constraint = (),
15008 >,
15009 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
15010 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15011 Constraint = (),
15012 >,
15013 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15014 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15015 Constraint = (),
15016 >,
15017 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15018 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15019 Constraint = (),
15020 >,
15021 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15022 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15023 Constraint = (),
15024 >,
15025 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
15026 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15027 Constraint = (),
15028 >,
15029 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
15030 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15031 Constraint = (),
15032 >,
15033 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
15034 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15035 Constraint = (),
15036 >,
15037 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
15038 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15039 Constraint = (),
15040 >,
15041 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
15042 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15043 Constraint = (),
15044 >,
15045 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
15046 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15047 Constraint = (),
15048 >,
15049 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
15050 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15051 Constraint = (),
15052 >,
15053 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
15054 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15055 Constraint = (),
15056 >,
15057 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
15058 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15059 Constraint = (),
15060 >,
15061{
15062 async fn on_one_way(
15063 handler: &mut ___H,
15064 ordinal: u64,
15065 flexibility: ::fidl_next::protocol::Flexibility,
15066 body: ::fidl_next::Body<___T>,
15067 ) -> ::core::result::Result<
15068 (),
15069 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15070 > {
15071 match ordinal {
15072 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15073 Ok(decoded) => {
15074 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
15075 Ok(())
15076 }
15077 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15078 ordinal: 2366825959783828089,
15079 error,
15080 }),
15081 },
15082
15083 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15084 Ok(decoded) => {
15085 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
15086 Ok(())
15087 }
15088 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15089 ordinal: 6512600400724287855,
15090 error,
15091 }),
15092 },
15093
15094 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15095 Ok(decoded) => {
15096 handler
15097 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
15098 .await;
15099 Ok(())
15100 }
15101 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15102 ordinal: 5431626189872037072,
15103 error,
15104 }),
15105 },
15106
15107 ordinal => {
15108 handler.on_unknown_interaction(ordinal).await;
15109 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15110 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15111 } else {
15112 Ok(())
15113 }
15114 }
15115 }
15116 }
15117
15118 async fn on_two_way(
15119 handler: &mut ___H,
15120 ordinal: u64,
15121 flexibility: ::fidl_next::protocol::Flexibility,
15122 body: ::fidl_next::Body<___T>,
15123 responder: ::fidl_next::protocol::Responder<___T>,
15124 ) -> ::core::result::Result<
15125 (),
15126 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15127 > {
15128 match ordinal {
15129 7992130864415541162 => {
15130 let responder = ::fidl_next::Responder::from_untyped(responder);
15131
15132 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15133 Ok(decoded) => {
15134 handler
15135 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
15136 .await;
15137 Ok(())
15138 }
15139 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15140 ordinal: 7992130864415541162,
15141 error,
15142 }),
15143 }
15144 }
15145
15146 6121399674497678964 => {
15147 let responder = ::fidl_next::Responder::from_untyped(responder);
15148
15149 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15150 Ok(decoded) => {
15151 handler
15152 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
15153 .await;
15154 Ok(())
15155 }
15156 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15157 ordinal: 6121399674497678964,
15158 error,
15159 }),
15160 }
15161 }
15162
15163 6540867515453498750 => {
15164 let responder = ::fidl_next::Responder::from_untyped(responder);
15165
15166 handler.close(responder).await;
15167 Ok(())
15168 }
15169
15170 2763219980499352582 => {
15171 let responder = ::fidl_next::Responder::from_untyped(responder);
15172
15173 handler.query(responder).await;
15174 Ok(())
15175 }
15176
15177 8689798978500614909 => {
15178 let responder = ::fidl_next::Responder::from_untyped(responder);
15179
15180 handler.deprecated_get_attr(responder).await;
15181 Ok(())
15182 }
15183
15184 4721673413776871238 => {
15185 let responder = ::fidl_next::Responder::from_untyped(responder);
15186
15187 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15188 Ok(decoded) => {
15189 handler
15190 .deprecated_set_attr(
15191 ::fidl_next::Request::from_decoded(decoded),
15192 responder,
15193 )
15194 .await;
15195 Ok(())
15196 }
15197 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15198 ordinal: 4721673413776871238,
15199 error,
15200 }),
15201 }
15202 }
15203
15204 6595803110182632097 => {
15205 let responder = ::fidl_next::Responder::from_untyped(responder);
15206
15207 handler.deprecated_get_flags(responder).await;
15208 Ok(())
15209 }
15210
15211 5950864159036794675 => {
15212 let responder = ::fidl_next::Responder::from_untyped(responder);
15213
15214 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15215 Ok(decoded) => {
15216 handler
15217 .deprecated_set_flags(
15218 ::fidl_next::Request::from_decoded(decoded),
15219 responder,
15220 )
15221 .await;
15222 Ok(())
15223 }
15224 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15225 ordinal: 5950864159036794675,
15226 error,
15227 }),
15228 }
15229 }
15230
15231 105530239381466147 => {
15232 let responder = ::fidl_next::Responder::from_untyped(responder);
15233
15234 handler.get_flags(responder).await;
15235 Ok(())
15236 }
15237
15238 6172186066099445416 => {
15239 let responder = ::fidl_next::Responder::from_untyped(responder);
15240
15241 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15242 Ok(decoded) => {
15243 handler
15244 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
15245 .await;
15246 Ok(())
15247 }
15248 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15249 ordinal: 6172186066099445416,
15250 error,
15251 }),
15252 }
15253 }
15254
15255 8013111122914313744 => {
15256 let responder = ::fidl_next::Responder::from_untyped(responder);
15257
15258 handler.query_filesystem(responder).await;
15259 Ok(())
15260 }
15261
15262 4414537700416816443 => {
15263 let responder = ::fidl_next::Responder::from_untyped(responder);
15264
15265 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15266 Ok(decoded) => {
15267 handler
15268 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
15269 .await;
15270 Ok(())
15271 }
15272 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15273 ordinal: 4414537700416816443,
15274 error,
15275 }),
15276 }
15277 }
15278
15279 3677402239314018056 => {
15280 let responder = ::fidl_next::Responder::from_untyped(responder);
15281
15282 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15283 Ok(decoded) => {
15284 handler
15285 .update_attributes(
15286 ::fidl_next::Request::from_decoded(decoded),
15287 responder,
15288 )
15289 .await;
15290 Ok(())
15291 }
15292 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15293 ordinal: 3677402239314018056,
15294 error,
15295 }),
15296 }
15297 }
15298
15299 3196473584242777161 => {
15300 let responder = ::fidl_next::Responder::from_untyped(responder);
15301
15302 handler.sync(responder).await;
15303 Ok(())
15304 }
15305
15306 5043930208506967771 => {
15307 let responder = ::fidl_next::Responder::from_untyped(responder);
15308
15309 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15310 Ok(decoded) => {
15311 handler
15312 .get_extended_attribute(
15313 ::fidl_next::Request::from_decoded(decoded),
15314 responder,
15315 )
15316 .await;
15317 Ok(())
15318 }
15319 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15320 ordinal: 5043930208506967771,
15321 error,
15322 }),
15323 }
15324 }
15325
15326 5374223046099989052 => {
15327 let responder = ::fidl_next::Responder::from_untyped(responder);
15328
15329 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15330 Ok(decoded) => {
15331 handler
15332 .set_extended_attribute(
15333 ::fidl_next::Request::from_decoded(decoded),
15334 responder,
15335 )
15336 .await;
15337 Ok(())
15338 }
15339 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15340 ordinal: 5374223046099989052,
15341 error,
15342 }),
15343 }
15344 }
15345
15346 8794297771444732717 => {
15347 let responder = ::fidl_next::Responder::from_untyped(responder);
15348
15349 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15350 Ok(decoded) => {
15351 handler
15352 .remove_extended_attribute(
15353 ::fidl_next::Request::from_decoded(decoded),
15354 responder,
15355 )
15356 .await;
15357 Ok(())
15358 }
15359 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15360 ordinal: 8794297771444732717,
15361 error,
15362 }),
15363 }
15364 }
15365
15366 395825947633028830 => {
15367 let responder = ::fidl_next::Responder::from_untyped(responder);
15368
15369 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15370 Ok(decoded) => {
15371 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
15372 Ok(())
15373 }
15374 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15375 ordinal: 395825947633028830,
15376 error,
15377 }),
15378 }
15379 }
15380
15381 7651971425397809026 => {
15382 let responder = ::fidl_next::Responder::from_untyped(responder);
15383
15384 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15385 Ok(decoded) => {
15386 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
15387 Ok(())
15388 }
15389 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15390 ordinal: 7651971425397809026,
15391 error,
15392 }),
15393 }
15394 }
15395
15396 7545125870053689020 => {
15397 let responder = ::fidl_next::Responder::from_untyped(responder);
15398
15399 handler.describe(responder).await;
15400 Ok(())
15401 }
15402
15403 8649041485622956551 => {
15404 let responder = ::fidl_next::Responder::from_untyped(responder);
15405
15406 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15407 Ok(decoded) => {
15408 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
15409 Ok(())
15410 }
15411 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15412 ordinal: 8649041485622956551,
15413 error,
15414 }),
15415 }
15416 }
15417
15418 1587416148701180478 => {
15419 let responder = ::fidl_next::Responder::from_untyped(responder);
15420
15421 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15422 Ok(decoded) => {
15423 handler
15424 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
15425 .await;
15426 Ok(())
15427 }
15428 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15429 ordinal: 1587416148701180478,
15430 error,
15431 }),
15432 }
15433 }
15434
15435 8736683935131400491 => {
15436 let responder = ::fidl_next::Responder::from_untyped(responder);
15437
15438 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15439 Ok(decoded) => {
15440 handler
15441 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
15442 .await;
15443 Ok(())
15444 }
15445 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15446 ordinal: 8736683935131400491,
15447 error,
15448 }),
15449 }
15450 }
15451
15452 3134648685270758458 => {
15453 let responder = ::fidl_next::Responder::from_untyped(responder);
15454
15455 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15456 Ok(decoded) => {
15457 handler
15458 .resize(::fidl_next::Request::from_decoded(decoded), responder)
15459 .await;
15460 Ok(())
15461 }
15462 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15463 ordinal: 3134648685270758458,
15464 error,
15465 }),
15466 }
15467 }
15468
15469 46911652864194091 => {
15470 let responder = ::fidl_next::Responder::from_untyped(responder);
15471
15472 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15473 Ok(decoded) => {
15474 handler
15475 .get_backing_memory(
15476 ::fidl_next::Request::from_decoded(decoded),
15477 responder,
15478 )
15479 .await;
15480 Ok(())
15481 }
15482 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15483 ordinal: 46911652864194091,
15484 error,
15485 }),
15486 }
15487 }
15488
15489 8645235848064269614 => {
15490 let responder = ::fidl_next::Responder::from_untyped(responder);
15491
15492 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15493 Ok(decoded) => {
15494 handler
15495 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
15496 .await;
15497 Ok(())
15498 }
15499 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15500 ordinal: 8645235848064269614,
15501 error,
15502 }),
15503 }
15504 }
15505
15506 3189145313204943035 => {
15507 let responder = ::fidl_next::Responder::from_untyped(responder);
15508
15509 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15510 Ok(decoded) => {
15511 handler
15512 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
15513 .await;
15514 Ok(())
15515 }
15516 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15517 ordinal: 3189145313204943035,
15518 error,
15519 }),
15520 }
15521 }
15522
15523 ordinal => {
15524 handler.on_unknown_interaction(ordinal).await;
15525 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15526 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15527 } else {
15528 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
15529 ordinal,
15530 flexibility,
15531 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
15532 )
15533 .expect("encoding a framework error should never fail")
15534 .await?;
15535 Ok(())
15536 }
15537 }
15538 }
15539 }
15540}
15541
15542pub trait FileClientHandler<
15546 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
15547 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15548>
15549{
15550 #[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"]
15551 fn on_open(
15552 &mut self,
15553
15554 request: ::fidl_next::Request<file::OnOpen, ___T>,
15555 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15556
15557 #[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"]
15558 fn on_representation(
15559 &mut self,
15560
15561 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
15562 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15563
15564 fn on_unknown_interaction(
15565 &mut self,
15566 ordinal: u64,
15567 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15568 ::core::future::ready(())
15569 }
15570}
15571
15572impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for File
15573where
15574 ___H: FileClientHandler<___T> + ::core::marker::Send,
15575 ___T: ::fidl_next::Transport,
15576 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
15577 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15578 Constraint = (),
15579 >,
15580 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
15581 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15582 Constraint = (),
15583 >,
15584{
15585 async fn on_event(
15586 handler: &mut ___H,
15587 ordinal: u64,
15588 flexibility: ::fidl_next::protocol::Flexibility,
15589 body: ::fidl_next::Body<___T>,
15590 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15591 match ordinal {
15592 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15593 Ok(decoded) => {
15594 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
15595 Ok(())
15596 }
15597 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15598 ordinal: 9207534335756671346,
15599 error,
15600 }),
15601 },
15602
15603 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15604 Ok(decoded) => {
15605 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
15606 Ok(())
15607 }
15608 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15609 ordinal: 6679970090861613324,
15610 error,
15611 }),
15612 },
15613
15614 ordinal => {
15615 handler.on_unknown_interaction(ordinal).await;
15616 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15617 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15618 } else {
15619 Ok(())
15620 }
15621 }
15622 }
15623 }
15624}
15625
15626pub trait FileServerHandler<
15630 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
15631 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15632>
15633{
15634 #[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"]
15635 fn advisory_lock(
15636 &mut self,
15637
15638 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
15639
15640 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
15641 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15642
15643 #[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"]
15644 fn link_into(
15645 &mut self,
15646
15647 request: ::fidl_next::Request<file::LinkInto, ___T>,
15648
15649 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
15650 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15651
15652 fn clone(
15653 &mut self,
15654
15655 request: ::fidl_next::Request<file::Clone, ___T>,
15656 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15657
15658 #[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"]
15659 fn close(
15660 &mut self,
15661
15662 responder: ::fidl_next::Responder<file::Close, ___T>,
15663 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15664
15665 fn query(
15666 &mut self,
15667
15668 responder: ::fidl_next::Responder<file::Query, ___T>,
15669 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15670
15671 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
15672 fn deprecated_clone(
15673 &mut self,
15674
15675 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
15676 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15677
15678 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
15679 fn deprecated_get_attr(
15680 &mut self,
15681
15682 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
15683 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15684
15685 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
15686 fn deprecated_set_attr(
15687 &mut self,
15688
15689 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
15690
15691 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
15692 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15693
15694 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
15695 fn deprecated_get_flags(
15696 &mut self,
15697
15698 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
15699 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15700
15701 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
15702 fn deprecated_set_flags(
15703 &mut self,
15704
15705 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
15706
15707 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
15708 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15709
15710 #[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"]
15711 fn get_flags(
15712 &mut self,
15713
15714 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
15715 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15716
15717 #[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"]
15718 fn set_flags(
15719 &mut self,
15720
15721 request: ::fidl_next::Request<file::SetFlags, ___T>,
15722
15723 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
15724 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15725
15726 #[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"]
15727 fn query_filesystem(
15728 &mut self,
15729
15730 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
15731 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15732
15733 #[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"]
15734 fn get_attributes(
15735 &mut self,
15736
15737 request: ::fidl_next::Request<file::GetAttributes, ___T>,
15738
15739 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
15740 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15741
15742 #[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"]
15743 fn update_attributes(
15744 &mut self,
15745
15746 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
15747
15748 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
15749 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15750
15751 #[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"]
15752 fn sync(
15753 &mut self,
15754
15755 responder: ::fidl_next::Responder<file::Sync, ___T>,
15756 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15757
15758 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15759 fn list_extended_attributes(
15760 &mut self,
15761
15762 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
15763 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15764
15765 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15766 fn get_extended_attribute(
15767 &mut self,
15768
15769 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
15770
15771 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
15772 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15773
15774 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
15775 fn set_extended_attribute(
15776 &mut self,
15777
15778 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
15779
15780 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
15781 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15782
15783 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
15784 fn remove_extended_attribute(
15785 &mut self,
15786
15787 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
15788
15789 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
15790 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15791
15792 #[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"]
15793 fn read(
15794 &mut self,
15795
15796 request: ::fidl_next::Request<file::Read, ___T>,
15797
15798 responder: ::fidl_next::Responder<file::Read, ___T>,
15799 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15800
15801 #[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"]
15802 fn write(
15803 &mut self,
15804
15805 request: ::fidl_next::Request<file::Write, ___T>,
15806
15807 responder: ::fidl_next::Responder<file::Write, ___T>,
15808 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15809
15810 fn describe(
15811 &mut self,
15812
15813 responder: ::fidl_next::Responder<file::Describe, ___T>,
15814 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15815
15816 #[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"]
15817 fn seek(
15818 &mut self,
15819
15820 request: ::fidl_next::Request<file::Seek, ___T>,
15821
15822 responder: ::fidl_next::Responder<file::Seek, ___T>,
15823 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15824
15825 #[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"]
15826 fn read_at(
15827 &mut self,
15828
15829 request: ::fidl_next::Request<file::ReadAt, ___T>,
15830
15831 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
15832 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15833
15834 #[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"]
15835 fn write_at(
15836 &mut self,
15837
15838 request: ::fidl_next::Request<file::WriteAt, ___T>,
15839
15840 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
15841 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15842
15843 #[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"]
15844 fn resize(
15845 &mut self,
15846
15847 request: ::fidl_next::Request<file::Resize, ___T>,
15848
15849 responder: ::fidl_next::Responder<file::Resize, ___T>,
15850 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15851
15852 #[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"]
15853 fn get_backing_memory(
15854 &mut self,
15855
15856 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
15857
15858 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
15859 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15860
15861 #[doc = " Pre-allocate on-disk space for this file.\n"]
15862 fn allocate(
15863 &mut self,
15864
15865 request: ::fidl_next::Request<file::Allocate, ___T>,
15866
15867 responder: ::fidl_next::Responder<file::Allocate, ___T>,
15868 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15869
15870 #[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"]
15871 fn enable_verity(
15872 &mut self,
15873
15874 request: ::fidl_next::Request<file::EnableVerity, ___T>,
15875
15876 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
15877 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15878
15879 fn on_unknown_interaction(
15880 &mut self,
15881 ordinal: u64,
15882 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15883 ::core::future::ready(())
15884 }
15885}
15886
15887impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for File
15888where
15889 ___H: FileServerHandler<___T> + ::core::marker::Send,
15890 ___T: ::fidl_next::Transport,
15891 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
15892 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15893 Constraint = (),
15894 >,
15895 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
15896 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15897 Constraint = (),
15898 >,
15899 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
15900 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15901 Constraint = (),
15902 >,
15903 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
15904 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15905 Constraint = (),
15906 >,
15907 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
15908 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15909 Constraint = (),
15910 >,
15911 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
15912 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15913 Constraint = (),
15914 >,
15915 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
15916 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15917 Constraint = (),
15918 >,
15919 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
15920 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15921 Constraint = (),
15922 >,
15923 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
15924 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15925 Constraint = (),
15926 >,
15927 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
15928 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15929 Constraint = (),
15930 >,
15931 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15932 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15933 Constraint = (),
15934 >,
15935 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15936 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15937 Constraint = (),
15938 >,
15939 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15940 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15941 Constraint = (),
15942 >,
15943 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
15944 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15945 Constraint = (),
15946 >,
15947 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
15948 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15949 Constraint = (),
15950 >,
15951 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
15952 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15953 Constraint = (),
15954 >,
15955 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
15956 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15957 Constraint = (),
15958 >,
15959 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
15960 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15961 Constraint = (),
15962 >,
15963 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
15964 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15965 Constraint = (),
15966 >,
15967 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
15968 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15969 Constraint = (),
15970 >,
15971 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
15972 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15973 Constraint = (),
15974 >,
15975 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
15976 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15977 Constraint = (),
15978 >,
15979{
15980 async fn on_one_way(
15981 handler: &mut ___H,
15982 ordinal: u64,
15983 flexibility: ::fidl_next::protocol::Flexibility,
15984 body: ::fidl_next::Body<___T>,
15985 ) -> ::core::result::Result<
15986 (),
15987 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15988 > {
15989 match ordinal {
15990 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15991 Ok(decoded) => {
15992 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
15993 Ok(())
15994 }
15995 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15996 ordinal: 2366825959783828089,
15997 error,
15998 }),
15999 },
16000
16001 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
16002 Ok(decoded) => {
16003 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
16004 Ok(())
16005 }
16006 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16007 ordinal: 6512600400724287855,
16008 error,
16009 }),
16010 },
16011
16012 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
16013 Ok(decoded) => {
16014 handler
16015 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
16016 .await;
16017 Ok(())
16018 }
16019 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16020 ordinal: 5431626189872037072,
16021 error,
16022 }),
16023 },
16024
16025 ordinal => {
16026 handler.on_unknown_interaction(ordinal).await;
16027 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16028 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16029 } else {
16030 Ok(())
16031 }
16032 }
16033 }
16034 }
16035
16036 async fn on_two_way(
16037 handler: &mut ___H,
16038 ordinal: u64,
16039 flexibility: ::fidl_next::protocol::Flexibility,
16040 body: ::fidl_next::Body<___T>,
16041 responder: ::fidl_next::protocol::Responder<___T>,
16042 ) -> ::core::result::Result<
16043 (),
16044 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16045 > {
16046 match ordinal {
16047 7992130864415541162 => {
16048 let responder = ::fidl_next::Responder::from_untyped(responder);
16049
16050 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16051 Ok(decoded) => {
16052 handler
16053 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
16054 .await;
16055 Ok(())
16056 }
16057 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16058 ordinal: 7992130864415541162,
16059 error,
16060 }),
16061 }
16062 }
16063
16064 6121399674497678964 => {
16065 let responder = ::fidl_next::Responder::from_untyped(responder);
16066
16067 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16068 Ok(decoded) => {
16069 handler
16070 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
16071 .await;
16072 Ok(())
16073 }
16074 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16075 ordinal: 6121399674497678964,
16076 error,
16077 }),
16078 }
16079 }
16080
16081 6540867515453498750 => {
16082 let responder = ::fidl_next::Responder::from_untyped(responder);
16083
16084 handler.close(responder).await;
16085 Ok(())
16086 }
16087
16088 2763219980499352582 => {
16089 let responder = ::fidl_next::Responder::from_untyped(responder);
16090
16091 handler.query(responder).await;
16092 Ok(())
16093 }
16094
16095 8689798978500614909 => {
16096 let responder = ::fidl_next::Responder::from_untyped(responder);
16097
16098 handler.deprecated_get_attr(responder).await;
16099 Ok(())
16100 }
16101
16102 4721673413776871238 => {
16103 let responder = ::fidl_next::Responder::from_untyped(responder);
16104
16105 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16106 Ok(decoded) => {
16107 handler
16108 .deprecated_set_attr(
16109 ::fidl_next::Request::from_decoded(decoded),
16110 responder,
16111 )
16112 .await;
16113 Ok(())
16114 }
16115 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16116 ordinal: 4721673413776871238,
16117 error,
16118 }),
16119 }
16120 }
16121
16122 6595803110182632097 => {
16123 let responder = ::fidl_next::Responder::from_untyped(responder);
16124
16125 handler.deprecated_get_flags(responder).await;
16126 Ok(())
16127 }
16128
16129 5950864159036794675 => {
16130 let responder = ::fidl_next::Responder::from_untyped(responder);
16131
16132 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16133 Ok(decoded) => {
16134 handler
16135 .deprecated_set_flags(
16136 ::fidl_next::Request::from_decoded(decoded),
16137 responder,
16138 )
16139 .await;
16140 Ok(())
16141 }
16142 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16143 ordinal: 5950864159036794675,
16144 error,
16145 }),
16146 }
16147 }
16148
16149 105530239381466147 => {
16150 let responder = ::fidl_next::Responder::from_untyped(responder);
16151
16152 handler.get_flags(responder).await;
16153 Ok(())
16154 }
16155
16156 6172186066099445416 => {
16157 let responder = ::fidl_next::Responder::from_untyped(responder);
16158
16159 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16160 Ok(decoded) => {
16161 handler
16162 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
16163 .await;
16164 Ok(())
16165 }
16166 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16167 ordinal: 6172186066099445416,
16168 error,
16169 }),
16170 }
16171 }
16172
16173 8013111122914313744 => {
16174 let responder = ::fidl_next::Responder::from_untyped(responder);
16175
16176 handler.query_filesystem(responder).await;
16177 Ok(())
16178 }
16179
16180 4414537700416816443 => {
16181 let responder = ::fidl_next::Responder::from_untyped(responder);
16182
16183 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16184 Ok(decoded) => {
16185 handler
16186 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
16187 .await;
16188 Ok(())
16189 }
16190 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16191 ordinal: 4414537700416816443,
16192 error,
16193 }),
16194 }
16195 }
16196
16197 3677402239314018056 => {
16198 let responder = ::fidl_next::Responder::from_untyped(responder);
16199
16200 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16201 Ok(decoded) => {
16202 handler
16203 .update_attributes(
16204 ::fidl_next::Request::from_decoded(decoded),
16205 responder,
16206 )
16207 .await;
16208 Ok(())
16209 }
16210 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16211 ordinal: 3677402239314018056,
16212 error,
16213 }),
16214 }
16215 }
16216
16217 3196473584242777161 => {
16218 let responder = ::fidl_next::Responder::from_untyped(responder);
16219
16220 handler.sync(responder).await;
16221 Ok(())
16222 }
16223
16224 5043930208506967771 => {
16225 let responder = ::fidl_next::Responder::from_untyped(responder);
16226
16227 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16228 Ok(decoded) => {
16229 handler
16230 .get_extended_attribute(
16231 ::fidl_next::Request::from_decoded(decoded),
16232 responder,
16233 )
16234 .await;
16235 Ok(())
16236 }
16237 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16238 ordinal: 5043930208506967771,
16239 error,
16240 }),
16241 }
16242 }
16243
16244 5374223046099989052 => {
16245 let responder = ::fidl_next::Responder::from_untyped(responder);
16246
16247 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16248 Ok(decoded) => {
16249 handler
16250 .set_extended_attribute(
16251 ::fidl_next::Request::from_decoded(decoded),
16252 responder,
16253 )
16254 .await;
16255 Ok(())
16256 }
16257 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16258 ordinal: 5374223046099989052,
16259 error,
16260 }),
16261 }
16262 }
16263
16264 8794297771444732717 => {
16265 let responder = ::fidl_next::Responder::from_untyped(responder);
16266
16267 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16268 Ok(decoded) => {
16269 handler
16270 .remove_extended_attribute(
16271 ::fidl_next::Request::from_decoded(decoded),
16272 responder,
16273 )
16274 .await;
16275 Ok(())
16276 }
16277 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16278 ordinal: 8794297771444732717,
16279 error,
16280 }),
16281 }
16282 }
16283
16284 395825947633028830 => {
16285 let responder = ::fidl_next::Responder::from_untyped(responder);
16286
16287 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16288 Ok(decoded) => {
16289 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
16290 Ok(())
16291 }
16292 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16293 ordinal: 395825947633028830,
16294 error,
16295 }),
16296 }
16297 }
16298
16299 7651971425397809026 => {
16300 let responder = ::fidl_next::Responder::from_untyped(responder);
16301
16302 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16303 Ok(decoded) => {
16304 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
16305 Ok(())
16306 }
16307 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16308 ordinal: 7651971425397809026,
16309 error,
16310 }),
16311 }
16312 }
16313
16314 7545125870053689020 => {
16315 let responder = ::fidl_next::Responder::from_untyped(responder);
16316
16317 handler.describe(responder).await;
16318 Ok(())
16319 }
16320
16321 8649041485622956551 => {
16322 let responder = ::fidl_next::Responder::from_untyped(responder);
16323
16324 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16325 Ok(decoded) => {
16326 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
16327 Ok(())
16328 }
16329 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16330 ordinal: 8649041485622956551,
16331 error,
16332 }),
16333 }
16334 }
16335
16336 1587416148701180478 => {
16337 let responder = ::fidl_next::Responder::from_untyped(responder);
16338
16339 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16340 Ok(decoded) => {
16341 handler
16342 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
16343 .await;
16344 Ok(())
16345 }
16346 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16347 ordinal: 1587416148701180478,
16348 error,
16349 }),
16350 }
16351 }
16352
16353 8736683935131400491 => {
16354 let responder = ::fidl_next::Responder::from_untyped(responder);
16355
16356 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16357 Ok(decoded) => {
16358 handler
16359 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
16360 .await;
16361 Ok(())
16362 }
16363 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16364 ordinal: 8736683935131400491,
16365 error,
16366 }),
16367 }
16368 }
16369
16370 3134648685270758458 => {
16371 let responder = ::fidl_next::Responder::from_untyped(responder);
16372
16373 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16374 Ok(decoded) => {
16375 handler
16376 .resize(::fidl_next::Request::from_decoded(decoded), responder)
16377 .await;
16378 Ok(())
16379 }
16380 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16381 ordinal: 3134648685270758458,
16382 error,
16383 }),
16384 }
16385 }
16386
16387 46911652864194091 => {
16388 let responder = ::fidl_next::Responder::from_untyped(responder);
16389
16390 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16391 Ok(decoded) => {
16392 handler
16393 .get_backing_memory(
16394 ::fidl_next::Request::from_decoded(decoded),
16395 responder,
16396 )
16397 .await;
16398 Ok(())
16399 }
16400 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16401 ordinal: 46911652864194091,
16402 error,
16403 }),
16404 }
16405 }
16406
16407 8645235848064269614 => {
16408 let responder = ::fidl_next::Responder::from_untyped(responder);
16409
16410 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16411 Ok(decoded) => {
16412 handler
16413 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
16414 .await;
16415 Ok(())
16416 }
16417 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16418 ordinal: 8645235848064269614,
16419 error,
16420 }),
16421 }
16422 }
16423
16424 3189145313204943035 => {
16425 let responder = ::fidl_next::Responder::from_untyped(responder);
16426
16427 match ::fidl_next::AsDecoderExt::into_decoded(body) {
16428 Ok(decoded) => {
16429 handler
16430 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
16431 .await;
16432 Ok(())
16433 }
16434 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16435 ordinal: 3189145313204943035,
16436 error,
16437 }),
16438 }
16439 }
16440
16441 ordinal => {
16442 handler.on_unknown_interaction(ordinal).await;
16443 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
16444 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16445 } else {
16446 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
16447 ordinal,
16448 flexibility,
16449 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
16450 )
16451 .expect("encoding a framework error should never fail")
16452 .await?;
16453 Ok(())
16454 }
16455 }
16456 }
16457 }
16458}
16459
16460impl<___T> FileClientHandler<___T> for ::fidl_next::IgnoreEvents
16461where
16462 ___T: ::fidl_next::Transport,
16463{
16464 async fn on_open(&mut self, _: ::fidl_next::Request<file::OnOpen, ___T>) {}
16465
16466 async fn on_representation(&mut self, _: ::fidl_next::Request<file::OnRepresentation, ___T>) {}
16467
16468 async fn on_unknown_interaction(&mut self, _: u64) {}
16469}
16470
16471impl<___H, ___T> FileLocalClientHandler<___T> for ::fidl_next::Local<___H>
16472where
16473 ___H: FileClientHandler<___T>,
16474 ___T: ::fidl_next::Transport,
16475{
16476 async fn on_open(&mut self, request: ::fidl_next::Request<file::OnOpen, ___T>) {
16477 ___H::on_open(&mut self.0, request).await
16478 }
16479
16480 async fn on_representation(
16481 &mut self,
16482
16483 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
16484 ) {
16485 ___H::on_representation(&mut self.0, request).await
16486 }
16487
16488 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16489 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16490 }
16491}
16492
16493impl<___H, ___T> FileLocalServerHandler<___T> for ::fidl_next::Local<___H>
16494where
16495 ___H: FileServerHandler<___T>,
16496 ___T: ::fidl_next::Transport,
16497{
16498 async fn advisory_lock(
16499 &mut self,
16500
16501 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
16502
16503 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
16504 ) {
16505 ___H::advisory_lock(&mut self.0, request, responder).await
16506 }
16507
16508 async fn link_into(
16509 &mut self,
16510
16511 request: ::fidl_next::Request<file::LinkInto, ___T>,
16512
16513 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
16514 ) {
16515 ___H::link_into(&mut self.0, request, responder).await
16516 }
16517
16518 async fn clone(&mut self, request: ::fidl_next::Request<file::Clone, ___T>) {
16519 ___H::clone(&mut self.0, request).await
16520 }
16521
16522 async fn close(&mut self, responder: ::fidl_next::Responder<file::Close, ___T>) {
16523 ___H::close(&mut self.0, responder).await
16524 }
16525
16526 async fn query(&mut self, responder: ::fidl_next::Responder<file::Query, ___T>) {
16527 ___H::query(&mut self.0, responder).await
16528 }
16529
16530 async fn deprecated_clone(
16531 &mut self,
16532
16533 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
16534 ) {
16535 ___H::deprecated_clone(&mut self.0, request).await
16536 }
16537
16538 async fn deprecated_get_attr(
16539 &mut self,
16540
16541 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
16542 ) {
16543 ___H::deprecated_get_attr(&mut self.0, responder).await
16544 }
16545
16546 async fn deprecated_set_attr(
16547 &mut self,
16548
16549 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
16550
16551 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
16552 ) {
16553 ___H::deprecated_set_attr(&mut self.0, request, responder).await
16554 }
16555
16556 async fn deprecated_get_flags(
16557 &mut self,
16558
16559 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
16560 ) {
16561 ___H::deprecated_get_flags(&mut self.0, responder).await
16562 }
16563
16564 async fn deprecated_set_flags(
16565 &mut self,
16566
16567 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
16568
16569 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
16570 ) {
16571 ___H::deprecated_set_flags(&mut self.0, request, responder).await
16572 }
16573
16574 async fn get_flags(&mut self, responder: ::fidl_next::Responder<file::GetFlags, ___T>) {
16575 ___H::get_flags(&mut self.0, responder).await
16576 }
16577
16578 async fn set_flags(
16579 &mut self,
16580
16581 request: ::fidl_next::Request<file::SetFlags, ___T>,
16582
16583 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
16584 ) {
16585 ___H::set_flags(&mut self.0, request, responder).await
16586 }
16587
16588 async fn query_filesystem(
16589 &mut self,
16590
16591 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
16592 ) {
16593 ___H::query_filesystem(&mut self.0, responder).await
16594 }
16595
16596 async fn get_attributes(
16597 &mut self,
16598
16599 request: ::fidl_next::Request<file::GetAttributes, ___T>,
16600
16601 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
16602 ) {
16603 ___H::get_attributes(&mut self.0, request, responder).await
16604 }
16605
16606 async fn update_attributes(
16607 &mut self,
16608
16609 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
16610
16611 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
16612 ) {
16613 ___H::update_attributes(&mut self.0, request, responder).await
16614 }
16615
16616 async fn sync(&mut self, responder: ::fidl_next::Responder<file::Sync, ___T>) {
16617 ___H::sync(&mut self.0, responder).await
16618 }
16619
16620 async fn list_extended_attributes(
16621 &mut self,
16622
16623 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
16624 ) {
16625 ___H::list_extended_attributes(&mut self.0, request).await
16626 }
16627
16628 async fn get_extended_attribute(
16629 &mut self,
16630
16631 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
16632
16633 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
16634 ) {
16635 ___H::get_extended_attribute(&mut self.0, request, responder).await
16636 }
16637
16638 async fn set_extended_attribute(
16639 &mut self,
16640
16641 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
16642
16643 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
16644 ) {
16645 ___H::set_extended_attribute(&mut self.0, request, responder).await
16646 }
16647
16648 async fn remove_extended_attribute(
16649 &mut self,
16650
16651 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
16652
16653 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
16654 ) {
16655 ___H::remove_extended_attribute(&mut self.0, request, responder).await
16656 }
16657
16658 async fn read(
16659 &mut self,
16660
16661 request: ::fidl_next::Request<file::Read, ___T>,
16662
16663 responder: ::fidl_next::Responder<file::Read, ___T>,
16664 ) {
16665 ___H::read(&mut self.0, request, responder).await
16666 }
16667
16668 async fn write(
16669 &mut self,
16670
16671 request: ::fidl_next::Request<file::Write, ___T>,
16672
16673 responder: ::fidl_next::Responder<file::Write, ___T>,
16674 ) {
16675 ___H::write(&mut self.0, request, responder).await
16676 }
16677
16678 async fn describe(&mut self, responder: ::fidl_next::Responder<file::Describe, ___T>) {
16679 ___H::describe(&mut self.0, responder).await
16680 }
16681
16682 async fn seek(
16683 &mut self,
16684
16685 request: ::fidl_next::Request<file::Seek, ___T>,
16686
16687 responder: ::fidl_next::Responder<file::Seek, ___T>,
16688 ) {
16689 ___H::seek(&mut self.0, request, responder).await
16690 }
16691
16692 async fn read_at(
16693 &mut self,
16694
16695 request: ::fidl_next::Request<file::ReadAt, ___T>,
16696
16697 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
16698 ) {
16699 ___H::read_at(&mut self.0, request, responder).await
16700 }
16701
16702 async fn write_at(
16703 &mut self,
16704
16705 request: ::fidl_next::Request<file::WriteAt, ___T>,
16706
16707 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
16708 ) {
16709 ___H::write_at(&mut self.0, request, responder).await
16710 }
16711
16712 async fn resize(
16713 &mut self,
16714
16715 request: ::fidl_next::Request<file::Resize, ___T>,
16716
16717 responder: ::fidl_next::Responder<file::Resize, ___T>,
16718 ) {
16719 ___H::resize(&mut self.0, request, responder).await
16720 }
16721
16722 async fn get_backing_memory(
16723 &mut self,
16724
16725 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
16726
16727 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
16728 ) {
16729 ___H::get_backing_memory(&mut self.0, request, responder).await
16730 }
16731
16732 async fn allocate(
16733 &mut self,
16734
16735 request: ::fidl_next::Request<file::Allocate, ___T>,
16736
16737 responder: ::fidl_next::Responder<file::Allocate, ___T>,
16738 ) {
16739 ___H::allocate(&mut self.0, request, responder).await
16740 }
16741
16742 async fn enable_verity(
16743 &mut self,
16744
16745 request: ::fidl_next::Request<file::EnableVerity, ___T>,
16746
16747 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
16748 ) {
16749 ___H::enable_verity(&mut self.0, request, responder).await
16750 }
16751
16752 async fn on_unknown_interaction(&mut self, ordinal: u64) {
16753 ___H::on_unknown_interaction(&mut self.0, ordinal).await
16754 }
16755}
16756
16757#[doc = " A [\'Node\'] which contains a symbolic link.\n"]
16759#[derive(PartialEq, Debug)]
16760pub struct Symlink;
16761
16762impl ::fidl_next::Discoverable for Symlink {
16763 const PROTOCOL_NAME: &'static str = "fuchsia.io.Symlink";
16764}
16765
16766#[cfg(target_os = "fuchsia")]
16767impl ::fidl_next::HasTransport for Symlink {
16768 type Transport = ::fdomain_client::Channel;
16769}
16770
16771pub mod symlink {
16772 pub mod prelude {
16773 pub use crate::{
16774 Symlink, SymlinkClientHandler, SymlinkLocalClientHandler, SymlinkLocalServerHandler,
16775 SymlinkServerHandler, symlink,
16776 };
16777
16778 pub use crate::natural::ExtendedAttributeValue;
16779
16780 pub use crate::natural::LinkableLinkIntoRequest;
16781
16782 pub use crate::natural::LinkableLinkIntoResponse;
16783
16784 pub use crate::natural::MutableNodeAttributes;
16785
16786 pub use crate::natural::NodeAttributes2;
16787
16788 pub use crate::natural::NodeDeprecatedCloneRequest;
16789
16790 pub use crate::natural::NodeDeprecatedGetAttrResponse;
16791
16792 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
16793
16794 pub use crate::natural::NodeDeprecatedSetAttrRequest;
16795
16796 pub use crate::natural::NodeDeprecatedSetAttrResponse;
16797
16798 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
16799
16800 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
16801
16802 pub use crate::natural::NodeGetAttributesRequest;
16803
16804 pub use crate::natural::NodeGetExtendedAttributeRequest;
16805
16806 pub use crate::natural::NodeListExtendedAttributesRequest;
16807
16808 pub use crate::natural::NodeOnOpenRequest;
16809
16810 pub use crate::natural::NodeQueryFilesystemResponse;
16811
16812 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
16813
16814 pub use crate::natural::NodeSetExtendedAttributeRequest;
16815
16816 pub use crate::natural::NodeSetFlagsRequest;
16817
16818 pub use crate::natural::NodeGetFlagsResponse;
16819
16820 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
16821
16822 pub use crate::natural::NodeSetExtendedAttributeResponse;
16823
16824 pub use crate::natural::NodeSetFlagsResponse;
16825
16826 pub use crate::natural::NodeSyncResponse;
16827
16828 pub use crate::natural::NodeUpdateAttributesResponse;
16829
16830 pub use crate::natural::Representation;
16831
16832 pub use crate::natural::SymlinkInfo;
16833
16834 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
16835
16836 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
16837
16838 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
16839 }
16840
16841 pub struct LinkInto;
16842
16843 impl ::fidl_next::Method for LinkInto {
16844 const ORDINAL: u64 = 6121399674497678964;
16845 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16846 ::fidl_next::protocol::Flexibility::Strict;
16847
16848 type Protocol = crate::Symlink;
16849
16850 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
16851 }
16852
16853 impl ::fidl_next::TwoWayMethod for LinkInto {
16854 type Response = ::fidl_next::wire::Result<
16855 'static,
16856 crate::wire::LinkableLinkIntoResponse,
16857 ::fidl_next::wire::Int32,
16858 >;
16859 }
16860
16861 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
16862 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
16863
16864 fn respond(response: ___R) -> Self::Output {
16865 ::core::result::Result::Ok(response)
16866 }
16867 }
16868
16869 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
16870 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
16871
16872 fn respond_err(response: ___R) -> Self::Output {
16873 ::core::result::Result::Err(response)
16874 }
16875 }
16876
16877 pub struct Clone;
16878
16879 impl ::fidl_next::Method for Clone {
16880 const ORDINAL: u64 = 2366825959783828089;
16881 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16882 ::fidl_next::protocol::Flexibility::Strict;
16883
16884 type Protocol = crate::Symlink;
16885
16886 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
16887 }
16888
16889 pub struct Close;
16890
16891 impl ::fidl_next::Method for Close {
16892 const ORDINAL: u64 = 6540867515453498750;
16893 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16894 ::fidl_next::protocol::Flexibility::Strict;
16895
16896 type Protocol = crate::Symlink;
16897
16898 type Request = ::fidl_next::wire::EmptyMessageBody;
16899 }
16900
16901 impl ::fidl_next::TwoWayMethod for Close {
16902 type Response = ::fidl_next::wire::Result<
16903 'static,
16904 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
16905 ::fidl_next::wire::Int32,
16906 >;
16907 }
16908
16909 impl<___R> ::fidl_next::Respond<___R> for Close {
16910 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
16911
16912 fn respond(response: ___R) -> Self::Output {
16913 ::core::result::Result::Ok(response)
16914 }
16915 }
16916
16917 impl<___R> ::fidl_next::RespondErr<___R> for Close {
16918 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
16919
16920 fn respond_err(response: ___R) -> Self::Output {
16921 ::core::result::Result::Err(response)
16922 }
16923 }
16924
16925 pub struct Query;
16926
16927 impl ::fidl_next::Method for Query {
16928 const ORDINAL: u64 = 2763219980499352582;
16929 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16930 ::fidl_next::protocol::Flexibility::Strict;
16931
16932 type Protocol = crate::Symlink;
16933
16934 type Request = ::fidl_next::wire::EmptyMessageBody;
16935 }
16936
16937 impl ::fidl_next::TwoWayMethod for Query {
16938 type Response = ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
16939 }
16940
16941 impl<___R> ::fidl_next::Respond<___R> for Query {
16942 type Output = ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
16943
16944 fn respond(response: ___R) -> Self::Output {
16945 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
16946 }
16947 }
16948
16949 pub struct DeprecatedClone;
16950
16951 impl ::fidl_next::Method for DeprecatedClone {
16952 const ORDINAL: u64 = 6512600400724287855;
16953 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16954 ::fidl_next::protocol::Flexibility::Flexible;
16955
16956 type Protocol = crate::Symlink;
16957
16958 type Request = crate::wire::NodeDeprecatedCloneRequest;
16959 }
16960
16961 pub struct OnOpen;
16962
16963 impl ::fidl_next::Method for OnOpen {
16964 const ORDINAL: u64 = 9207534335756671346;
16965 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16966 ::fidl_next::protocol::Flexibility::Flexible;
16967
16968 type Protocol = crate::Symlink;
16969
16970 type Request = crate::wire::NodeOnOpenRequest<'static>;
16971 }
16972
16973 pub struct DeprecatedGetAttr;
16974
16975 impl ::fidl_next::Method for DeprecatedGetAttr {
16976 const ORDINAL: u64 = 8689798978500614909;
16977 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
16978 ::fidl_next::protocol::Flexibility::Strict;
16979
16980 type Protocol = crate::Symlink;
16981
16982 type Request = ::fidl_next::wire::EmptyMessageBody;
16983 }
16984
16985 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
16986 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
16987 }
16988
16989 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
16990 type Output = ___R;
16991
16992 fn respond(response: ___R) -> Self::Output {
16993 response
16994 }
16995 }
16996
16997 pub struct DeprecatedSetAttr;
16998
16999 impl ::fidl_next::Method for DeprecatedSetAttr {
17000 const ORDINAL: u64 = 4721673413776871238;
17001 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17002 ::fidl_next::protocol::Flexibility::Strict;
17003
17004 type Protocol = crate::Symlink;
17005
17006 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
17007 }
17008
17009 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
17010 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
17011 }
17012
17013 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
17014 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
17015
17016 fn respond(response: ___R) -> Self::Output {
17017 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
17018 }
17019 }
17020
17021 pub struct DeprecatedGetFlags;
17022
17023 impl ::fidl_next::Method for DeprecatedGetFlags {
17024 const ORDINAL: u64 = 6595803110182632097;
17025 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17026 ::fidl_next::protocol::Flexibility::Strict;
17027
17028 type Protocol = crate::Symlink;
17029
17030 type Request = ::fidl_next::wire::EmptyMessageBody;
17031 }
17032
17033 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
17034 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
17035 }
17036
17037 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
17038 type Output = ___R;
17039
17040 fn respond(response: ___R) -> Self::Output {
17041 response
17042 }
17043 }
17044
17045 pub struct DeprecatedSetFlags;
17046
17047 impl ::fidl_next::Method for DeprecatedSetFlags {
17048 const ORDINAL: u64 = 5950864159036794675;
17049 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17050 ::fidl_next::protocol::Flexibility::Strict;
17051
17052 type Protocol = crate::Symlink;
17053
17054 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
17055 }
17056
17057 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
17058 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
17059 }
17060
17061 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
17062 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
17063
17064 fn respond(response: ___R) -> Self::Output {
17065 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
17066 }
17067 }
17068
17069 pub struct GetFlags;
17070
17071 impl ::fidl_next::Method for GetFlags {
17072 const ORDINAL: u64 = 105530239381466147;
17073 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17074 ::fidl_next::protocol::Flexibility::Flexible;
17075
17076 type Protocol = crate::Symlink;
17077
17078 type Request = ::fidl_next::wire::EmptyMessageBody;
17079 }
17080
17081 impl ::fidl_next::TwoWayMethod for GetFlags {
17082 type Response = ::fidl_next::wire::FlexibleResult<
17083 'static,
17084 crate::wire::NodeGetFlagsResponse,
17085 ::fidl_next::wire::Int32,
17086 >;
17087 }
17088
17089 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
17090 type Output = ::fidl_next::FlexibleResult<
17091 crate::generic::NodeGetFlagsResponse<___R>,
17092 ::fidl_next::util::Never,
17093 >;
17094
17095 fn respond(response: ___R) -> Self::Output {
17096 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
17097 flags: response,
17098 })
17099 }
17100 }
17101
17102 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
17103 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
17104
17105 fn respond_err(response: ___R) -> Self::Output {
17106 ::fidl_next::FlexibleResult::Err(response)
17107 }
17108 }
17109
17110 pub struct SetFlags;
17111
17112 impl ::fidl_next::Method for SetFlags {
17113 const ORDINAL: u64 = 6172186066099445416;
17114 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17115 ::fidl_next::protocol::Flexibility::Flexible;
17116
17117 type Protocol = crate::Symlink;
17118
17119 type Request = crate::wire::NodeSetFlagsRequest;
17120 }
17121
17122 impl ::fidl_next::TwoWayMethod for SetFlags {
17123 type Response = ::fidl_next::wire::FlexibleResult<
17124 'static,
17125 crate::wire::NodeSetFlagsResponse,
17126 ::fidl_next::wire::Int32,
17127 >;
17128 }
17129
17130 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
17131 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
17132
17133 fn respond(response: ___R) -> Self::Output {
17134 ::fidl_next::FlexibleResult::Ok(response)
17135 }
17136 }
17137
17138 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
17139 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
17140
17141 fn respond_err(response: ___R) -> Self::Output {
17142 ::fidl_next::FlexibleResult::Err(response)
17143 }
17144 }
17145
17146 pub struct QueryFilesystem;
17147
17148 impl ::fidl_next::Method for QueryFilesystem {
17149 const ORDINAL: u64 = 8013111122914313744;
17150 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17151 ::fidl_next::protocol::Flexibility::Strict;
17152
17153 type Protocol = crate::Symlink;
17154
17155 type Request = ::fidl_next::wire::EmptyMessageBody;
17156 }
17157
17158 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
17159 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
17160 }
17161
17162 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
17163 type Output = ___R;
17164
17165 fn respond(response: ___R) -> Self::Output {
17166 response
17167 }
17168 }
17169
17170 pub struct OnRepresentation;
17171
17172 impl ::fidl_next::Method for OnRepresentation {
17173 const ORDINAL: u64 = 6679970090861613324;
17174 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17175 ::fidl_next::protocol::Flexibility::Strict;
17176
17177 type Protocol = crate::Symlink;
17178
17179 type Request = crate::wire::Representation<'static>;
17180 }
17181
17182 pub struct GetAttributes;
17183
17184 impl ::fidl_next::Method for GetAttributes {
17185 const ORDINAL: u64 = 4414537700416816443;
17186 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17187 ::fidl_next::protocol::Flexibility::Strict;
17188
17189 type Protocol = crate::Symlink;
17190
17191 type Request = crate::wire::NodeGetAttributesRequest;
17192 }
17193
17194 impl ::fidl_next::TwoWayMethod for GetAttributes {
17195 type Response = ::fidl_next::wire::Result<
17196 'static,
17197 crate::wire::NodeAttributes2<'static>,
17198 ::fidl_next::wire::Int32,
17199 >;
17200 }
17201
17202 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
17203 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17204
17205 fn respond(response: ___R) -> Self::Output {
17206 ::core::result::Result::Ok(response)
17207 }
17208 }
17209
17210 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
17211 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17212
17213 fn respond_err(response: ___R) -> Self::Output {
17214 ::core::result::Result::Err(response)
17215 }
17216 }
17217
17218 pub struct UpdateAttributes;
17219
17220 impl ::fidl_next::Method for UpdateAttributes {
17221 const ORDINAL: u64 = 3677402239314018056;
17222 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17223 ::fidl_next::protocol::Flexibility::Strict;
17224
17225 type Protocol = crate::Symlink;
17226
17227 type Request = crate::wire::MutableNodeAttributes<'static>;
17228 }
17229
17230 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
17231 type Response = ::fidl_next::wire::Result<
17232 'static,
17233 crate::wire::NodeUpdateAttributesResponse,
17234 ::fidl_next::wire::Int32,
17235 >;
17236 }
17237
17238 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
17239 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17240
17241 fn respond(response: ___R) -> Self::Output {
17242 ::core::result::Result::Ok(response)
17243 }
17244 }
17245
17246 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
17247 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17248
17249 fn respond_err(response: ___R) -> Self::Output {
17250 ::core::result::Result::Err(response)
17251 }
17252 }
17253
17254 pub struct Sync;
17255
17256 impl ::fidl_next::Method for Sync {
17257 const ORDINAL: u64 = 3196473584242777161;
17258 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17259 ::fidl_next::protocol::Flexibility::Strict;
17260
17261 type Protocol = crate::Symlink;
17262
17263 type Request = ::fidl_next::wire::EmptyMessageBody;
17264 }
17265
17266 impl ::fidl_next::TwoWayMethod for Sync {
17267 type Response = ::fidl_next::wire::Result<
17268 'static,
17269 crate::wire::NodeSyncResponse,
17270 ::fidl_next::wire::Int32,
17271 >;
17272 }
17273
17274 impl<___R> ::fidl_next::Respond<___R> for Sync {
17275 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17276
17277 fn respond(response: ___R) -> Self::Output {
17278 ::core::result::Result::Ok(response)
17279 }
17280 }
17281
17282 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
17283 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17284
17285 fn respond_err(response: ___R) -> Self::Output {
17286 ::core::result::Result::Err(response)
17287 }
17288 }
17289
17290 pub struct ListExtendedAttributes;
17291
17292 impl ::fidl_next::Method for ListExtendedAttributes {
17293 const ORDINAL: u64 = 5431626189872037072;
17294 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17295 ::fidl_next::protocol::Flexibility::Strict;
17296
17297 type Protocol = crate::Symlink;
17298
17299 type Request = crate::wire::NodeListExtendedAttributesRequest;
17300 }
17301
17302 pub struct GetExtendedAttribute;
17303
17304 impl ::fidl_next::Method for GetExtendedAttribute {
17305 const ORDINAL: u64 = 5043930208506967771;
17306 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17307 ::fidl_next::protocol::Flexibility::Strict;
17308
17309 type Protocol = crate::Symlink;
17310
17311 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
17312 }
17313
17314 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
17315 type Response = ::fidl_next::wire::Result<
17316 'static,
17317 crate::wire::ExtendedAttributeValue<'static>,
17318 ::fidl_next::wire::Int32,
17319 >;
17320 }
17321
17322 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
17323 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17324
17325 fn respond(response: ___R) -> Self::Output {
17326 ::core::result::Result::Ok(response)
17327 }
17328 }
17329
17330 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
17331 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17332
17333 fn respond_err(response: ___R) -> Self::Output {
17334 ::core::result::Result::Err(response)
17335 }
17336 }
17337
17338 pub struct SetExtendedAttribute;
17339
17340 impl ::fidl_next::Method for SetExtendedAttribute {
17341 const ORDINAL: u64 = 5374223046099989052;
17342 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17343 ::fidl_next::protocol::Flexibility::Strict;
17344
17345 type Protocol = crate::Symlink;
17346
17347 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
17348 }
17349
17350 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
17351 type Response = ::fidl_next::wire::Result<
17352 'static,
17353 crate::wire::NodeSetExtendedAttributeResponse,
17354 ::fidl_next::wire::Int32,
17355 >;
17356 }
17357
17358 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
17359 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17360
17361 fn respond(response: ___R) -> Self::Output {
17362 ::core::result::Result::Ok(response)
17363 }
17364 }
17365
17366 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
17367 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17368
17369 fn respond_err(response: ___R) -> Self::Output {
17370 ::core::result::Result::Err(response)
17371 }
17372 }
17373
17374 pub struct RemoveExtendedAttribute;
17375
17376 impl ::fidl_next::Method for RemoveExtendedAttribute {
17377 const ORDINAL: u64 = 8794297771444732717;
17378 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17379 ::fidl_next::protocol::Flexibility::Strict;
17380
17381 type Protocol = crate::Symlink;
17382
17383 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
17384 }
17385
17386 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
17387 type Response = ::fidl_next::wire::Result<
17388 'static,
17389 crate::wire::NodeRemoveExtendedAttributeResponse,
17390 ::fidl_next::wire::Int32,
17391 >;
17392 }
17393
17394 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
17395 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
17396
17397 fn respond(response: ___R) -> Self::Output {
17398 ::core::result::Result::Ok(response)
17399 }
17400 }
17401
17402 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
17403 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
17404
17405 fn respond_err(response: ___R) -> Self::Output {
17406 ::core::result::Result::Err(response)
17407 }
17408 }
17409
17410 pub struct Describe;
17411
17412 impl ::fidl_next::Method for Describe {
17413 const ORDINAL: u64 = 8371117097481679347;
17414 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17415 ::fidl_next::protocol::Flexibility::Flexible;
17416
17417 type Protocol = crate::Symlink;
17418
17419 type Request = ::fidl_next::wire::EmptyMessageBody;
17420 }
17421
17422 impl ::fidl_next::TwoWayMethod for Describe {
17423 type Response = ::fidl_next::wire::Flexible<'static, crate::wire::SymlinkInfo<'static>>;
17424 }
17425
17426 impl<___R> ::fidl_next::Respond<___R> for Describe {
17427 type Output = ::fidl_next::Flexible<___R>;
17428
17429 fn respond(response: ___R) -> Self::Output {
17430 ::fidl_next::Flexible::Ok(response)
17431 }
17432 }
17433
17434 mod ___detail {
17435 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Symlink
17436 where
17437 ___T: ::fidl_next::Transport,
17438 {
17439 type Client = SymlinkClient<___T>;
17440 type Server = SymlinkServer<___T>;
17441 }
17442
17443 #[repr(transparent)]
17445 pub struct SymlinkClient<___T: ::fidl_next::Transport> {
17446 #[allow(dead_code)]
17447 client: ::fidl_next::protocol::Client<___T>,
17448 }
17449
17450 impl<___T> SymlinkClient<___T>
17451 where
17452 ___T: ::fidl_next::Transport,
17453 {
17454 #[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"]
17455 pub fn link_into(
17456 &self,
17457
17458 dst_parent_token: impl ::fidl_next::Encode<
17459 ::fdomain_client::fidl_next::wire::Handle,
17460 <___T as ::fidl_next::Transport>::SendBuffer,
17461 >,
17462
17463 dst: impl ::fidl_next::Encode<
17464 ::fidl_next::wire::String<'static>,
17465 <___T as ::fidl_next::Transport>::SendBuffer,
17466 >,
17467 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
17468 where
17469 <___T as ::fidl_next::Transport>::SendBuffer:
17470 ::fidl_next::encoder::InternalHandleEncoder,
17471 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17472 <___T as ::fidl_next::Transport>::SendBuffer:
17473 ::fdomain_client::fidl_next::HandleEncoder,
17474 {
17475 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
17476 dst_parent_token,
17477
17478 dst,
17479 })
17480 }
17481
17482 #[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"]
17483 pub fn link_into_with<___R>(
17484 &self,
17485 request: ___R,
17486 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
17487 where
17488 ___R: ::fidl_next::Encode<
17489 crate::wire::LinkableLinkIntoRequest<'static>,
17490 <___T as ::fidl_next::Transport>::SendBuffer,
17491 >,
17492 {
17493 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17494 6121399674497678964,
17495 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
17496 request,
17497 ))
17498 }
17499
17500 pub fn clone(
17501 &self,
17502
17503 request: impl ::fidl_next::Encode<
17504 ::fidl_next::ServerEnd<
17505 ::fdomain_next_fuchsia_unknown::Cloneable,
17506 ::fdomain_client::fidl_next::wire::Handle,
17507 >,
17508 <___T as ::fidl_next::Transport>::SendBuffer,
17509 >,
17510 ) -> ::fidl_next::SendFuture<'_, ___T>
17511 where
17512 <___T as ::fidl_next::Transport>::SendBuffer:
17513 ::fidl_next::encoder::InternalHandleEncoder,
17514 <___T as ::fidl_next::Transport>::SendBuffer:
17515 ::fdomain_client::fidl_next::HandleEncoder,
17516 {
17517 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
17518 request,
17519 })
17520 }
17521
17522 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
17523 where
17524 ___R: ::fidl_next::Encode<
17525 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
17526 <___T as ::fidl_next::Transport>::SendBuffer,
17527 >,
17528 {
17529 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
17530 2366825959783828089,
17531 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
17532 request,
17533 ))
17534 }
17535
17536 #[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"]
17537 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
17538 ::fidl_next::TwoWayFuture::from_untyped(
17539 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17540 6540867515453498750,
17541 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
17542 (),
17543 ),
17544 )
17545 }
17546
17547 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
17548 ::fidl_next::TwoWayFuture::from_untyped(
17549 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17550 2763219980499352582,
17551 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
17552 (),
17553 ),
17554 )
17555 }
17556
17557 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
17558 pub fn deprecated_clone(
17559 &self,
17560
17561 flags: impl ::fidl_next::Encode<
17562 crate::wire::OpenFlags,
17563 <___T as ::fidl_next::Transport>::SendBuffer,
17564 >,
17565
17566 object: impl ::fidl_next::Encode<
17567 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
17568 <___T as ::fidl_next::Transport>::SendBuffer,
17569 >,
17570 ) -> ::fidl_next::SendFuture<'_, ___T>
17571 where
17572 <___T as ::fidl_next::Transport>::SendBuffer:
17573 ::fidl_next::encoder::InternalHandleEncoder,
17574 <___T as ::fidl_next::Transport>::SendBuffer:
17575 ::fdomain_client::fidl_next::HandleEncoder,
17576 {
17577 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
17578 flags,
17579
17580 object,
17581 })
17582 }
17583
17584 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
17585 pub fn deprecated_clone_with<___R>(
17586 &self,
17587 request: ___R,
17588 ) -> ::fidl_next::SendFuture<'_, ___T>
17589 where
17590 ___R: ::fidl_next::Encode<
17591 crate::wire::NodeDeprecatedCloneRequest,
17592 <___T as ::fidl_next::Transport>::SendBuffer,
17593 >,
17594 {
17595 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
17596 6512600400724287855,
17597 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
17598 request,
17599 ))
17600 }
17601
17602 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
17603 pub fn deprecated_get_attr(
17604 &self,
17605 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
17606 ::fidl_next::TwoWayFuture::from_untyped(
17607 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17608 8689798978500614909,
17609 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
17610 (),
17611 ),
17612 )
17613 }
17614
17615 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
17616 pub fn deprecated_set_attr(
17617 &self,
17618
17619 flags: impl ::fidl_next::Encode<
17620 crate::wire::NodeAttributeFlags,
17621 <___T as ::fidl_next::Transport>::SendBuffer,
17622 >,
17623
17624 attributes: impl ::fidl_next::Encode<
17625 crate::wire::NodeAttributes,
17626 <___T as ::fidl_next::Transport>::SendBuffer,
17627 >,
17628 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
17629 where
17630 <___T as ::fidl_next::Transport>::SendBuffer:
17631 ::fidl_next::encoder::InternalHandleEncoder,
17632 {
17633 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
17634 flags,
17635
17636 attributes,
17637 })
17638 }
17639
17640 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
17641 pub fn deprecated_set_attr_with<___R>(
17642 &self,
17643 request: ___R,
17644 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
17645 where
17646 ___R: ::fidl_next::Encode<
17647 crate::wire::NodeDeprecatedSetAttrRequest,
17648 <___T as ::fidl_next::Transport>::SendBuffer,
17649 >,
17650 {
17651 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17652 4721673413776871238,
17653 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
17654 request,
17655 ))
17656 }
17657
17658 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
17659 pub fn deprecated_get_flags(
17660 &self,
17661 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
17662 ::fidl_next::TwoWayFuture::from_untyped(
17663 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17664 6595803110182632097,
17665 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
17666 (),
17667 ),
17668 )
17669 }
17670
17671 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
17672 pub fn deprecated_set_flags(
17673 &self,
17674
17675 flags: impl ::fidl_next::Encode<
17676 crate::wire::OpenFlags,
17677 <___T as ::fidl_next::Transport>::SendBuffer,
17678 >,
17679 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
17680 where
17681 <___T as ::fidl_next::Transport>::SendBuffer:
17682 ::fidl_next::encoder::InternalHandleEncoder,
17683 {
17684 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
17685 flags,
17686 })
17687 }
17688
17689 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
17690 pub fn deprecated_set_flags_with<___R>(
17691 &self,
17692 request: ___R,
17693 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
17694 where
17695 ___R: ::fidl_next::Encode<
17696 crate::wire::NodeDeprecatedSetFlagsRequest,
17697 <___T as ::fidl_next::Transport>::SendBuffer,
17698 >,
17699 {
17700 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17701 5950864159036794675,
17702 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
17703 request,
17704 ))
17705 }
17706
17707 #[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"]
17708 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
17709 ::fidl_next::TwoWayFuture::from_untyped(
17710 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17711 105530239381466147,
17712 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
17713 (),
17714 ),
17715 )
17716 }
17717
17718 #[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"]
17719 pub fn set_flags(
17720 &self,
17721
17722 flags: impl ::fidl_next::Encode<
17723 crate::wire::Flags,
17724 <___T as ::fidl_next::Transport>::SendBuffer,
17725 >,
17726 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
17727 where
17728 <___T as ::fidl_next::Transport>::SendBuffer:
17729 ::fidl_next::encoder::InternalHandleEncoder,
17730 {
17731 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
17732 }
17733
17734 #[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"]
17735 pub fn set_flags_with<___R>(
17736 &self,
17737 request: ___R,
17738 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
17739 where
17740 ___R: ::fidl_next::Encode<
17741 crate::wire::NodeSetFlagsRequest,
17742 <___T as ::fidl_next::Transport>::SendBuffer,
17743 >,
17744 {
17745 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17746 6172186066099445416,
17747 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
17748 request,
17749 ))
17750 }
17751
17752 #[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"]
17753 pub fn query_filesystem(
17754 &self,
17755 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
17756 ::fidl_next::TwoWayFuture::from_untyped(
17757 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17758 8013111122914313744,
17759 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
17760 (),
17761 ),
17762 )
17763 }
17764
17765 #[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"]
17766 pub fn get_attributes(
17767 &self,
17768
17769 query: impl ::fidl_next::Encode<
17770 crate::wire::NodeAttributesQuery,
17771 <___T as ::fidl_next::Transport>::SendBuffer,
17772 >,
17773 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
17774 where
17775 <___T as ::fidl_next::Transport>::SendBuffer:
17776 ::fidl_next::encoder::InternalHandleEncoder,
17777 {
17778 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
17779 }
17780
17781 #[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"]
17782 pub fn get_attributes_with<___R>(
17783 &self,
17784 request: ___R,
17785 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
17786 where
17787 ___R: ::fidl_next::Encode<
17788 crate::wire::NodeGetAttributesRequest,
17789 <___T as ::fidl_next::Transport>::SendBuffer,
17790 >,
17791 {
17792 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17793 4414537700416816443,
17794 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
17795 request,
17796 ))
17797 }
17798
17799 #[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"]
17800 pub fn update_attributes_with<___R>(
17801 &self,
17802 request: ___R,
17803 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
17804 where
17805 ___R: ::fidl_next::Encode<
17806 crate::wire::MutableNodeAttributes<'static>,
17807 <___T as ::fidl_next::Transport>::SendBuffer,
17808 >,
17809 {
17810 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17811 3677402239314018056,
17812 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
17813 request,
17814 ))
17815 }
17816
17817 #[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"]
17818 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
17819 ::fidl_next::TwoWayFuture::from_untyped(
17820 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17821 3196473584242777161,
17822 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
17823 (),
17824 ),
17825 )
17826 }
17827
17828 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
17829 pub fn list_extended_attributes(
17830 &self,
17831
17832 iterator: impl ::fidl_next::Encode<
17833 ::fidl_next::ServerEnd<
17834 crate::ExtendedAttributeIterator,
17835 ::fdomain_client::fidl_next::wire::Handle,
17836 >,
17837 <___T as ::fidl_next::Transport>::SendBuffer,
17838 >,
17839 ) -> ::fidl_next::SendFuture<'_, ___T>
17840 where
17841 <___T as ::fidl_next::Transport>::SendBuffer:
17842 ::fidl_next::encoder::InternalHandleEncoder,
17843 <___T as ::fidl_next::Transport>::SendBuffer:
17844 ::fdomain_client::fidl_next::HandleEncoder,
17845 {
17846 self.list_extended_attributes_with(
17847 crate::generic::NodeListExtendedAttributesRequest { iterator },
17848 )
17849 }
17850
17851 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
17852 pub fn list_extended_attributes_with<___R>(
17853 &self,
17854 request: ___R,
17855 ) -> ::fidl_next::SendFuture<'_, ___T>
17856 where
17857 ___R: ::fidl_next::Encode<
17858 crate::wire::NodeListExtendedAttributesRequest,
17859 <___T as ::fidl_next::Transport>::SendBuffer,
17860 >,
17861 {
17862 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
17863 5431626189872037072,
17864 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
17865 request,
17866 ))
17867 }
17868
17869 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
17870 pub fn get_extended_attribute(
17871 &self,
17872
17873 name: impl ::fidl_next::Encode<
17874 ::fidl_next::wire::Vector<'static, u8>,
17875 <___T as ::fidl_next::Transport>::SendBuffer,
17876 >,
17877 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
17878 where
17879 <___T as ::fidl_next::Transport>::SendBuffer:
17880 ::fidl_next::encoder::InternalHandleEncoder,
17881 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17882 {
17883 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
17884 name,
17885 })
17886 }
17887
17888 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
17889 pub fn get_extended_attribute_with<___R>(
17890 &self,
17891 request: ___R,
17892 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
17893 where
17894 ___R: ::fidl_next::Encode<
17895 crate::wire::NodeGetExtendedAttributeRequest<'static>,
17896 <___T as ::fidl_next::Transport>::SendBuffer,
17897 >,
17898 {
17899 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17900 5043930208506967771,
17901 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
17902 request,
17903 ))
17904 }
17905
17906 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
17907 pub fn set_extended_attribute(
17908 &self,
17909
17910 name: impl ::fidl_next::Encode<
17911 ::fidl_next::wire::Vector<'static, u8>,
17912 <___T as ::fidl_next::Transport>::SendBuffer,
17913 >,
17914
17915 value: impl ::fidl_next::Encode<
17916 crate::wire::ExtendedAttributeValue<'static>,
17917 <___T as ::fidl_next::Transport>::SendBuffer,
17918 >,
17919
17920 mode: impl ::fidl_next::Encode<
17921 crate::wire::SetExtendedAttributeMode,
17922 <___T as ::fidl_next::Transport>::SendBuffer,
17923 >,
17924 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
17925 where
17926 <___T as ::fidl_next::Transport>::SendBuffer:
17927 ::fidl_next::encoder::InternalHandleEncoder,
17928 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17929 <___T as ::fidl_next::Transport>::SendBuffer:
17930 ::fdomain_client::fidl_next::HandleEncoder,
17931 {
17932 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
17933 name,
17934
17935 value,
17936
17937 mode,
17938 })
17939 }
17940
17941 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
17942 pub fn set_extended_attribute_with<___R>(
17943 &self,
17944 request: ___R,
17945 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
17946 where
17947 ___R: ::fidl_next::Encode<
17948 crate::wire::NodeSetExtendedAttributeRequest<'static>,
17949 <___T as ::fidl_next::Transport>::SendBuffer,
17950 >,
17951 {
17952 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17953 5374223046099989052,
17954 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
17955 request,
17956 ))
17957 }
17958
17959 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
17960 pub fn remove_extended_attribute(
17961 &self,
17962
17963 name: impl ::fidl_next::Encode<
17964 ::fidl_next::wire::Vector<'static, u8>,
17965 <___T as ::fidl_next::Transport>::SendBuffer,
17966 >,
17967 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
17968 where
17969 <___T as ::fidl_next::Transport>::SendBuffer:
17970 ::fidl_next::encoder::InternalHandleEncoder,
17971 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
17972 {
17973 self.remove_extended_attribute_with(
17974 crate::generic::NodeRemoveExtendedAttributeRequest { name },
17975 )
17976 }
17977
17978 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
17979 pub fn remove_extended_attribute_with<___R>(
17980 &self,
17981 request: ___R,
17982 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
17983 where
17984 ___R: ::fidl_next::Encode<
17985 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
17986 <___T as ::fidl_next::Transport>::SendBuffer,
17987 >,
17988 {
17989 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
17990 8794297771444732717,
17991 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
17992 request,
17993 ))
17994 }
17995
17996 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
17997 ::fidl_next::TwoWayFuture::from_untyped(
17998 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
17999 8371117097481679347,
18000 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
18001 (),
18002 ),
18003 )
18004 }
18005 }
18006
18007 #[repr(transparent)]
18009 pub struct SymlinkServer<___T: ::fidl_next::Transport> {
18010 server: ::fidl_next::protocol::Server<___T>,
18011 }
18012
18013 impl<___T> SymlinkServer<___T>
18014 where
18015 ___T: ::fidl_next::Transport,
18016 {
18017 #[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"]
18018 pub fn on_open(
18019 &self,
18020
18021 s: impl ::fidl_next::Encode<
18022 ::fidl_next::wire::Int32,
18023 <___T as ::fidl_next::Transport>::SendBuffer,
18024 >,
18025
18026 info: impl ::fidl_next::Encode<
18027 crate::wire_optional::NodeInfoDeprecated<'static>,
18028 <___T as ::fidl_next::Transport>::SendBuffer,
18029 >,
18030 ) -> ::fidl_next::SendFuture<'_, ___T>
18031 where
18032 <___T as ::fidl_next::Transport>::SendBuffer:
18033 ::fidl_next::encoder::InternalHandleEncoder,
18034 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18035 <___T as ::fidl_next::Transport>::SendBuffer:
18036 ::fdomain_client::fidl_next::HandleEncoder,
18037 {
18038 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
18039 }
18040
18041 #[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"]
18042
18043 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
18044 where
18045 ___R: ::fidl_next::Encode<
18046 <super::OnOpen as ::fidl_next::Method>::Request,
18047 <___T as ::fidl_next::Transport>::SendBuffer,
18048 >,
18049 {
18050 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
18051 9207534335756671346,
18052 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
18053 request,
18054 ))
18055 }
18056
18057 #[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"]
18058
18059 pub fn on_representation_with<___R>(
18060 &self,
18061 request: ___R,
18062 ) -> ::fidl_next::SendFuture<'_, ___T>
18063 where
18064 ___R: ::fidl_next::Encode<
18065 <super::OnRepresentation as ::fidl_next::Method>::Request,
18066 <___T as ::fidl_next::Transport>::SendBuffer,
18067 >,
18068 {
18069 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
18070 6679970090861613324,
18071 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
18072 request,
18073 ))
18074 }
18075 }
18076 }
18077}
18078
18079#[diagnostic::on_unimplemented(
18080 note = "If {Self} implements the non-local SymlinkClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18081)]
18082
18083pub trait SymlinkLocalClientHandler<
18087 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
18088 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18089>
18090{
18091 #[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"]
18092 fn on_open(
18093 &mut self,
18094
18095 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
18096 ) -> impl ::core::future::Future<Output = ()>;
18097
18098 #[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"]
18099 fn on_representation(
18100 &mut self,
18101
18102 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
18103 ) -> impl ::core::future::Future<Output = ()>;
18104
18105 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
18106 ::core::future::ready(())
18107 }
18108}
18109
18110impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Symlink
18111where
18112 ___H: SymlinkLocalClientHandler<___T>,
18113 ___T: ::fidl_next::Transport,
18114 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
18115 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18116 Constraint = (),
18117 >,
18118 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
18119 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18120 Constraint = (),
18121 >,
18122{
18123 async fn on_event(
18124 handler: &mut ___H,
18125 ordinal: u64,
18126 flexibility: ::fidl_next::protocol::Flexibility,
18127 body: ::fidl_next::Body<___T>,
18128 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18129 match ordinal {
18130 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18131 Ok(decoded) => {
18132 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
18133 Ok(())
18134 }
18135 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18136 ordinal: 9207534335756671346,
18137 error,
18138 }),
18139 },
18140
18141 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18142 Ok(decoded) => {
18143 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
18144 Ok(())
18145 }
18146 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18147 ordinal: 6679970090861613324,
18148 error,
18149 }),
18150 },
18151
18152 ordinal => {
18153 handler.on_unknown_interaction(ordinal).await;
18154 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
18155 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18156 } else {
18157 Ok(())
18158 }
18159 }
18160 }
18161 }
18162}
18163
18164#[diagnostic::on_unimplemented(
18165 note = "If {Self} implements the non-local SymlinkServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18166)]
18167
18168pub trait SymlinkLocalServerHandler<
18172 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
18173 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18174>
18175{
18176 #[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"]
18177 fn link_into(
18178 &mut self,
18179
18180 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
18181
18182 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
18183 ) -> impl ::core::future::Future<Output = ()>;
18184
18185 fn clone(
18186 &mut self,
18187
18188 request: ::fidl_next::Request<symlink::Clone, ___T>,
18189 ) -> impl ::core::future::Future<Output = ()>;
18190
18191 #[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"]
18192 fn close(
18193 &mut self,
18194
18195 responder: ::fidl_next::Responder<symlink::Close, ___T>,
18196 ) -> impl ::core::future::Future<Output = ()>;
18197
18198 fn query(
18199 &mut self,
18200
18201 responder: ::fidl_next::Responder<symlink::Query, ___T>,
18202 ) -> impl ::core::future::Future<Output = ()>;
18203
18204 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
18205 fn deprecated_clone(
18206 &mut self,
18207
18208 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
18209 ) -> impl ::core::future::Future<Output = ()>;
18210
18211 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
18212 fn deprecated_get_attr(
18213 &mut self,
18214
18215 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
18216 ) -> impl ::core::future::Future<Output = ()>;
18217
18218 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18219 fn deprecated_set_attr(
18220 &mut self,
18221
18222 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
18223
18224 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
18225 ) -> impl ::core::future::Future<Output = ()>;
18226
18227 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
18228 fn deprecated_get_flags(
18229 &mut self,
18230
18231 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
18232 ) -> impl ::core::future::Future<Output = ()>;
18233
18234 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18235 fn deprecated_set_flags(
18236 &mut self,
18237
18238 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
18239
18240 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
18241 ) -> impl ::core::future::Future<Output = ()>;
18242
18243 #[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"]
18244 fn get_flags(
18245 &mut self,
18246
18247 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
18248 ) -> impl ::core::future::Future<Output = ()>;
18249
18250 #[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"]
18251 fn set_flags(
18252 &mut self,
18253
18254 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
18255
18256 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
18257 ) -> impl ::core::future::Future<Output = ()>;
18258
18259 #[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"]
18260 fn query_filesystem(
18261 &mut self,
18262
18263 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
18264 ) -> impl ::core::future::Future<Output = ()>;
18265
18266 #[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"]
18267 fn get_attributes(
18268 &mut self,
18269
18270 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
18271
18272 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
18273 ) -> impl ::core::future::Future<Output = ()>;
18274
18275 #[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"]
18276 fn update_attributes(
18277 &mut self,
18278
18279 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
18280
18281 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
18282 ) -> impl ::core::future::Future<Output = ()>;
18283
18284 #[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"]
18285 fn sync(
18286 &mut self,
18287
18288 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
18289 ) -> impl ::core::future::Future<Output = ()>;
18290
18291 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
18292 fn list_extended_attributes(
18293 &mut self,
18294
18295 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
18296 ) -> impl ::core::future::Future<Output = ()>;
18297
18298 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
18299 fn get_extended_attribute(
18300 &mut self,
18301
18302 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
18303
18304 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
18305 ) -> impl ::core::future::Future<Output = ()>;
18306
18307 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
18308 fn set_extended_attribute(
18309 &mut self,
18310
18311 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
18312
18313 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
18314 ) -> impl ::core::future::Future<Output = ()>;
18315
18316 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
18317 fn remove_extended_attribute(
18318 &mut self,
18319
18320 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
18321
18322 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
18323 ) -> impl ::core::future::Future<Output = ()>;
18324
18325 fn describe(
18326 &mut self,
18327
18328 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
18329 ) -> impl ::core::future::Future<Output = ()>;
18330
18331 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
18332 ::core::future::ready(())
18333 }
18334}
18335
18336impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Symlink
18337where
18338 ___H: SymlinkLocalServerHandler<___T>,
18339 ___T: ::fidl_next::Transport,
18340 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
18341 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18342 Constraint = (),
18343 >,
18344 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
18345 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18346 Constraint = (),
18347 >,
18348 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
18349 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18350 Constraint = (),
18351 >,
18352 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
18353 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18354 Constraint = (),
18355 >,
18356 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
18357 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18358 Constraint = (),
18359 >,
18360 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
18361 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18362 Constraint = (),
18363 >,
18364 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
18365 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18366 Constraint = (),
18367 >,
18368 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
18369 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18370 Constraint = (),
18371 >,
18372 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
18373 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18374 Constraint = (),
18375 >,
18376 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18377 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18378 Constraint = (),
18379 >,
18380 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18381 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18382 Constraint = (),
18383 >,
18384 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18385 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18386 Constraint = (),
18387 >,
18388{
18389 async fn on_one_way(
18390 handler: &mut ___H,
18391 ordinal: u64,
18392 flexibility: ::fidl_next::protocol::Flexibility,
18393 body: ::fidl_next::Body<___T>,
18394 ) -> ::core::result::Result<
18395 (),
18396 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18397 > {
18398 match ordinal {
18399 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18400 Ok(decoded) => {
18401 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
18402 Ok(())
18403 }
18404 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18405 ordinal: 2366825959783828089,
18406 error,
18407 }),
18408 },
18409
18410 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18411 Ok(decoded) => {
18412 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
18413 Ok(())
18414 }
18415 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18416 ordinal: 6512600400724287855,
18417 error,
18418 }),
18419 },
18420
18421 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18422 Ok(decoded) => {
18423 handler
18424 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
18425 .await;
18426 Ok(())
18427 }
18428 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18429 ordinal: 5431626189872037072,
18430 error,
18431 }),
18432 },
18433
18434 ordinal => {
18435 handler.on_unknown_interaction(ordinal).await;
18436 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
18437 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18438 } else {
18439 Ok(())
18440 }
18441 }
18442 }
18443 }
18444
18445 async fn on_two_way(
18446 handler: &mut ___H,
18447 ordinal: u64,
18448 flexibility: ::fidl_next::protocol::Flexibility,
18449 body: ::fidl_next::Body<___T>,
18450 responder: ::fidl_next::protocol::Responder<___T>,
18451 ) -> ::core::result::Result<
18452 (),
18453 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
18454 > {
18455 match ordinal {
18456 6121399674497678964 => {
18457 let responder = ::fidl_next::Responder::from_untyped(responder);
18458
18459 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18460 Ok(decoded) => {
18461 handler
18462 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
18463 .await;
18464 Ok(())
18465 }
18466 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18467 ordinal: 6121399674497678964,
18468 error,
18469 }),
18470 }
18471 }
18472
18473 6540867515453498750 => {
18474 let responder = ::fidl_next::Responder::from_untyped(responder);
18475
18476 handler.close(responder).await;
18477 Ok(())
18478 }
18479
18480 2763219980499352582 => {
18481 let responder = ::fidl_next::Responder::from_untyped(responder);
18482
18483 handler.query(responder).await;
18484 Ok(())
18485 }
18486
18487 8689798978500614909 => {
18488 let responder = ::fidl_next::Responder::from_untyped(responder);
18489
18490 handler.deprecated_get_attr(responder).await;
18491 Ok(())
18492 }
18493
18494 4721673413776871238 => {
18495 let responder = ::fidl_next::Responder::from_untyped(responder);
18496
18497 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18498 Ok(decoded) => {
18499 handler
18500 .deprecated_set_attr(
18501 ::fidl_next::Request::from_decoded(decoded),
18502 responder,
18503 )
18504 .await;
18505 Ok(())
18506 }
18507 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18508 ordinal: 4721673413776871238,
18509 error,
18510 }),
18511 }
18512 }
18513
18514 6595803110182632097 => {
18515 let responder = ::fidl_next::Responder::from_untyped(responder);
18516
18517 handler.deprecated_get_flags(responder).await;
18518 Ok(())
18519 }
18520
18521 5950864159036794675 => {
18522 let responder = ::fidl_next::Responder::from_untyped(responder);
18523
18524 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18525 Ok(decoded) => {
18526 handler
18527 .deprecated_set_flags(
18528 ::fidl_next::Request::from_decoded(decoded),
18529 responder,
18530 )
18531 .await;
18532 Ok(())
18533 }
18534 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18535 ordinal: 5950864159036794675,
18536 error,
18537 }),
18538 }
18539 }
18540
18541 105530239381466147 => {
18542 let responder = ::fidl_next::Responder::from_untyped(responder);
18543
18544 handler.get_flags(responder).await;
18545 Ok(())
18546 }
18547
18548 6172186066099445416 => {
18549 let responder = ::fidl_next::Responder::from_untyped(responder);
18550
18551 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18552 Ok(decoded) => {
18553 handler
18554 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
18555 .await;
18556 Ok(())
18557 }
18558 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18559 ordinal: 6172186066099445416,
18560 error,
18561 }),
18562 }
18563 }
18564
18565 8013111122914313744 => {
18566 let responder = ::fidl_next::Responder::from_untyped(responder);
18567
18568 handler.query_filesystem(responder).await;
18569 Ok(())
18570 }
18571
18572 4414537700416816443 => {
18573 let responder = ::fidl_next::Responder::from_untyped(responder);
18574
18575 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18576 Ok(decoded) => {
18577 handler
18578 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
18579 .await;
18580 Ok(())
18581 }
18582 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18583 ordinal: 4414537700416816443,
18584 error,
18585 }),
18586 }
18587 }
18588
18589 3677402239314018056 => {
18590 let responder = ::fidl_next::Responder::from_untyped(responder);
18591
18592 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18593 Ok(decoded) => {
18594 handler
18595 .update_attributes(
18596 ::fidl_next::Request::from_decoded(decoded),
18597 responder,
18598 )
18599 .await;
18600 Ok(())
18601 }
18602 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18603 ordinal: 3677402239314018056,
18604 error,
18605 }),
18606 }
18607 }
18608
18609 3196473584242777161 => {
18610 let responder = ::fidl_next::Responder::from_untyped(responder);
18611
18612 handler.sync(responder).await;
18613 Ok(())
18614 }
18615
18616 5043930208506967771 => {
18617 let responder = ::fidl_next::Responder::from_untyped(responder);
18618
18619 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18620 Ok(decoded) => {
18621 handler
18622 .get_extended_attribute(
18623 ::fidl_next::Request::from_decoded(decoded),
18624 responder,
18625 )
18626 .await;
18627 Ok(())
18628 }
18629 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18630 ordinal: 5043930208506967771,
18631 error,
18632 }),
18633 }
18634 }
18635
18636 5374223046099989052 => {
18637 let responder = ::fidl_next::Responder::from_untyped(responder);
18638
18639 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18640 Ok(decoded) => {
18641 handler
18642 .set_extended_attribute(
18643 ::fidl_next::Request::from_decoded(decoded),
18644 responder,
18645 )
18646 .await;
18647 Ok(())
18648 }
18649 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18650 ordinal: 5374223046099989052,
18651 error,
18652 }),
18653 }
18654 }
18655
18656 8794297771444732717 => {
18657 let responder = ::fidl_next::Responder::from_untyped(responder);
18658
18659 match ::fidl_next::AsDecoderExt::into_decoded(body) {
18660 Ok(decoded) => {
18661 handler
18662 .remove_extended_attribute(
18663 ::fidl_next::Request::from_decoded(decoded),
18664 responder,
18665 )
18666 .await;
18667 Ok(())
18668 }
18669 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18670 ordinal: 8794297771444732717,
18671 error,
18672 }),
18673 }
18674 }
18675
18676 8371117097481679347 => {
18677 let responder = ::fidl_next::Responder::from_untyped(responder);
18678
18679 handler.describe(responder).await;
18680 Ok(())
18681 }
18682
18683 ordinal => {
18684 handler.on_unknown_interaction(ordinal).await;
18685 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
18686 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18687 } else {
18688 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
18689 ordinal,
18690 flexibility,
18691 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
18692 )
18693 .expect("encoding a framework error should never fail")
18694 .await?;
18695 Ok(())
18696 }
18697 }
18698 }
18699 }
18700}
18701
18702pub trait SymlinkClientHandler<
18706 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
18707 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18708>
18709{
18710 #[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"]
18711 fn on_open(
18712 &mut self,
18713
18714 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
18715 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18716
18717 #[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"]
18718 fn on_representation(
18719 &mut self,
18720
18721 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
18722 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18723
18724 fn on_unknown_interaction(
18725 &mut self,
18726 ordinal: u64,
18727 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
18728 ::core::future::ready(())
18729 }
18730}
18731
18732impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Symlink
18733where
18734 ___H: SymlinkClientHandler<___T> + ::core::marker::Send,
18735 ___T: ::fidl_next::Transport,
18736 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
18737 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18738 Constraint = (),
18739 >,
18740 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
18741 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18742 Constraint = (),
18743 >,
18744{
18745 async fn on_event(
18746 handler: &mut ___H,
18747 ordinal: u64,
18748 flexibility: ::fidl_next::protocol::Flexibility,
18749 body: ::fidl_next::Body<___T>,
18750 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18751 match ordinal {
18752 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18753 Ok(decoded) => {
18754 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
18755 Ok(())
18756 }
18757 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18758 ordinal: 9207534335756671346,
18759 error,
18760 }),
18761 },
18762
18763 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
18764 Ok(decoded) => {
18765 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
18766 Ok(())
18767 }
18768 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18769 ordinal: 6679970090861613324,
18770 error,
18771 }),
18772 },
18773
18774 ordinal => {
18775 handler.on_unknown_interaction(ordinal).await;
18776 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
18777 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18778 } else {
18779 Ok(())
18780 }
18781 }
18782 }
18783 }
18784}
18785
18786pub trait SymlinkServerHandler<
18790 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
18791 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18792>
18793{
18794 #[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"]
18795 fn link_into(
18796 &mut self,
18797
18798 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
18799
18800 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
18801 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18802
18803 fn clone(
18804 &mut self,
18805
18806 request: ::fidl_next::Request<symlink::Clone, ___T>,
18807 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18808
18809 #[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"]
18810 fn close(
18811 &mut self,
18812
18813 responder: ::fidl_next::Responder<symlink::Close, ___T>,
18814 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18815
18816 fn query(
18817 &mut self,
18818
18819 responder: ::fidl_next::Responder<symlink::Query, ___T>,
18820 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18821
18822 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
18823 fn deprecated_clone(
18824 &mut self,
18825
18826 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
18827 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18828
18829 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
18830 fn deprecated_get_attr(
18831 &mut self,
18832
18833 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
18834 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18835
18836 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18837 fn deprecated_set_attr(
18838 &mut self,
18839
18840 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
18841
18842 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
18843 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18844
18845 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
18846 fn deprecated_get_flags(
18847 &mut self,
18848
18849 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
18850 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18851
18852 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18853 fn deprecated_set_flags(
18854 &mut self,
18855
18856 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
18857
18858 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
18859 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18860
18861 #[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"]
18862 fn get_flags(
18863 &mut self,
18864
18865 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
18866 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18867
18868 #[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"]
18869 fn set_flags(
18870 &mut self,
18871
18872 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
18873
18874 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
18875 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18876
18877 #[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"]
18878 fn query_filesystem(
18879 &mut self,
18880
18881 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
18882 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18883
18884 #[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"]
18885 fn get_attributes(
18886 &mut self,
18887
18888 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
18889
18890 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
18891 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18892
18893 #[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"]
18894 fn update_attributes(
18895 &mut self,
18896
18897 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
18898
18899 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
18900 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18901
18902 #[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"]
18903 fn sync(
18904 &mut self,
18905
18906 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
18907 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18908
18909 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
18910 fn list_extended_attributes(
18911 &mut self,
18912
18913 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
18914 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18915
18916 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
18917 fn get_extended_attribute(
18918 &mut self,
18919
18920 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
18921
18922 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
18923 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18924
18925 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
18926 fn set_extended_attribute(
18927 &mut self,
18928
18929 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
18930
18931 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
18932 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18933
18934 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
18935 fn remove_extended_attribute(
18936 &mut self,
18937
18938 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
18939
18940 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
18941 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18942
18943 fn describe(
18944 &mut self,
18945
18946 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
18947 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
18948
18949 fn on_unknown_interaction(
18950 &mut self,
18951 ordinal: u64,
18952 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
18953 ::core::future::ready(())
18954 }
18955}
18956
18957impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Symlink
18958where
18959 ___H: SymlinkServerHandler<___T> + ::core::marker::Send,
18960 ___T: ::fidl_next::Transport,
18961 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
18962 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18963 Constraint = (),
18964 >,
18965 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
18966 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18967 Constraint = (),
18968 >,
18969 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
18970 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18971 Constraint = (),
18972 >,
18973 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
18974 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18975 Constraint = (),
18976 >,
18977 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
18978 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18979 Constraint = (),
18980 >,
18981 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
18982 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18983 Constraint = (),
18984 >,
18985 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
18986 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18987 Constraint = (),
18988 >,
18989 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
18990 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18991 Constraint = (),
18992 >,
18993 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
18994 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18995 Constraint = (),
18996 >,
18997 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
18998 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18999 Constraint = (),
19000 >,
19001 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19002 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19003 Constraint = (),
19004 >,
19005 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19006 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19007 Constraint = (),
19008 >,
19009{
19010 async fn on_one_way(
19011 handler: &mut ___H,
19012 ordinal: u64,
19013 flexibility: ::fidl_next::protocol::Flexibility,
19014 body: ::fidl_next::Body<___T>,
19015 ) -> ::core::result::Result<
19016 (),
19017 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19018 > {
19019 match ordinal {
19020 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
19021 Ok(decoded) => {
19022 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
19023 Ok(())
19024 }
19025 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19026 ordinal: 2366825959783828089,
19027 error,
19028 }),
19029 },
19030
19031 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
19032 Ok(decoded) => {
19033 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
19034 Ok(())
19035 }
19036 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19037 ordinal: 6512600400724287855,
19038 error,
19039 }),
19040 },
19041
19042 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
19043 Ok(decoded) => {
19044 handler
19045 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
19046 .await;
19047 Ok(())
19048 }
19049 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19050 ordinal: 5431626189872037072,
19051 error,
19052 }),
19053 },
19054
19055 ordinal => {
19056 handler.on_unknown_interaction(ordinal).await;
19057 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
19058 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19059 } else {
19060 Ok(())
19061 }
19062 }
19063 }
19064 }
19065
19066 async fn on_two_way(
19067 handler: &mut ___H,
19068 ordinal: u64,
19069 flexibility: ::fidl_next::protocol::Flexibility,
19070 body: ::fidl_next::Body<___T>,
19071 responder: ::fidl_next::protocol::Responder<___T>,
19072 ) -> ::core::result::Result<
19073 (),
19074 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19075 > {
19076 match ordinal {
19077 6121399674497678964 => {
19078 let responder = ::fidl_next::Responder::from_untyped(responder);
19079
19080 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19081 Ok(decoded) => {
19082 handler
19083 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
19084 .await;
19085 Ok(())
19086 }
19087 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19088 ordinal: 6121399674497678964,
19089 error,
19090 }),
19091 }
19092 }
19093
19094 6540867515453498750 => {
19095 let responder = ::fidl_next::Responder::from_untyped(responder);
19096
19097 handler.close(responder).await;
19098 Ok(())
19099 }
19100
19101 2763219980499352582 => {
19102 let responder = ::fidl_next::Responder::from_untyped(responder);
19103
19104 handler.query(responder).await;
19105 Ok(())
19106 }
19107
19108 8689798978500614909 => {
19109 let responder = ::fidl_next::Responder::from_untyped(responder);
19110
19111 handler.deprecated_get_attr(responder).await;
19112 Ok(())
19113 }
19114
19115 4721673413776871238 => {
19116 let responder = ::fidl_next::Responder::from_untyped(responder);
19117
19118 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19119 Ok(decoded) => {
19120 handler
19121 .deprecated_set_attr(
19122 ::fidl_next::Request::from_decoded(decoded),
19123 responder,
19124 )
19125 .await;
19126 Ok(())
19127 }
19128 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19129 ordinal: 4721673413776871238,
19130 error,
19131 }),
19132 }
19133 }
19134
19135 6595803110182632097 => {
19136 let responder = ::fidl_next::Responder::from_untyped(responder);
19137
19138 handler.deprecated_get_flags(responder).await;
19139 Ok(())
19140 }
19141
19142 5950864159036794675 => {
19143 let responder = ::fidl_next::Responder::from_untyped(responder);
19144
19145 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19146 Ok(decoded) => {
19147 handler
19148 .deprecated_set_flags(
19149 ::fidl_next::Request::from_decoded(decoded),
19150 responder,
19151 )
19152 .await;
19153 Ok(())
19154 }
19155 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19156 ordinal: 5950864159036794675,
19157 error,
19158 }),
19159 }
19160 }
19161
19162 105530239381466147 => {
19163 let responder = ::fidl_next::Responder::from_untyped(responder);
19164
19165 handler.get_flags(responder).await;
19166 Ok(())
19167 }
19168
19169 6172186066099445416 => {
19170 let responder = ::fidl_next::Responder::from_untyped(responder);
19171
19172 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19173 Ok(decoded) => {
19174 handler
19175 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
19176 .await;
19177 Ok(())
19178 }
19179 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19180 ordinal: 6172186066099445416,
19181 error,
19182 }),
19183 }
19184 }
19185
19186 8013111122914313744 => {
19187 let responder = ::fidl_next::Responder::from_untyped(responder);
19188
19189 handler.query_filesystem(responder).await;
19190 Ok(())
19191 }
19192
19193 4414537700416816443 => {
19194 let responder = ::fidl_next::Responder::from_untyped(responder);
19195
19196 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19197 Ok(decoded) => {
19198 handler
19199 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
19200 .await;
19201 Ok(())
19202 }
19203 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19204 ordinal: 4414537700416816443,
19205 error,
19206 }),
19207 }
19208 }
19209
19210 3677402239314018056 => {
19211 let responder = ::fidl_next::Responder::from_untyped(responder);
19212
19213 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19214 Ok(decoded) => {
19215 handler
19216 .update_attributes(
19217 ::fidl_next::Request::from_decoded(decoded),
19218 responder,
19219 )
19220 .await;
19221 Ok(())
19222 }
19223 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19224 ordinal: 3677402239314018056,
19225 error,
19226 }),
19227 }
19228 }
19229
19230 3196473584242777161 => {
19231 let responder = ::fidl_next::Responder::from_untyped(responder);
19232
19233 handler.sync(responder).await;
19234 Ok(())
19235 }
19236
19237 5043930208506967771 => {
19238 let responder = ::fidl_next::Responder::from_untyped(responder);
19239
19240 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19241 Ok(decoded) => {
19242 handler
19243 .get_extended_attribute(
19244 ::fidl_next::Request::from_decoded(decoded),
19245 responder,
19246 )
19247 .await;
19248 Ok(())
19249 }
19250 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19251 ordinal: 5043930208506967771,
19252 error,
19253 }),
19254 }
19255 }
19256
19257 5374223046099989052 => {
19258 let responder = ::fidl_next::Responder::from_untyped(responder);
19259
19260 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19261 Ok(decoded) => {
19262 handler
19263 .set_extended_attribute(
19264 ::fidl_next::Request::from_decoded(decoded),
19265 responder,
19266 )
19267 .await;
19268 Ok(())
19269 }
19270 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19271 ordinal: 5374223046099989052,
19272 error,
19273 }),
19274 }
19275 }
19276
19277 8794297771444732717 => {
19278 let responder = ::fidl_next::Responder::from_untyped(responder);
19279
19280 match ::fidl_next::AsDecoderExt::into_decoded(body) {
19281 Ok(decoded) => {
19282 handler
19283 .remove_extended_attribute(
19284 ::fidl_next::Request::from_decoded(decoded),
19285 responder,
19286 )
19287 .await;
19288 Ok(())
19289 }
19290 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19291 ordinal: 8794297771444732717,
19292 error,
19293 }),
19294 }
19295 }
19296
19297 8371117097481679347 => {
19298 let responder = ::fidl_next::Responder::from_untyped(responder);
19299
19300 handler.describe(responder).await;
19301 Ok(())
19302 }
19303
19304 ordinal => {
19305 handler.on_unknown_interaction(ordinal).await;
19306 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
19307 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19308 } else {
19309 responder.respond::<::fidl_next::wire::Flexible<'_, ::fidl_next::wire::EmptyMessageBody>>(
19310 ordinal,
19311 flexibility,
19312 ::fidl_next::Flexible::<::fidl_next::util::Never>::FrameworkErr(::fidl_next::FrameworkError::UnknownMethod),
19313 )
19314 .expect("encoding a framework error should never fail")
19315 .await?;
19316 Ok(())
19317 }
19318 }
19319 }
19320 }
19321}
19322
19323impl<___T> SymlinkClientHandler<___T> for ::fidl_next::IgnoreEvents
19324where
19325 ___T: ::fidl_next::Transport,
19326{
19327 async fn on_open(&mut self, _: ::fidl_next::Request<symlink::OnOpen, ___T>) {}
19328
19329 async fn on_representation(
19330 &mut self,
19331
19332 _: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19333 ) {
19334 }
19335
19336 async fn on_unknown_interaction(&mut self, _: u64) {}
19337}
19338
19339impl<___H, ___T> SymlinkLocalClientHandler<___T> for ::fidl_next::Local<___H>
19340where
19341 ___H: SymlinkClientHandler<___T>,
19342 ___T: ::fidl_next::Transport,
19343{
19344 async fn on_open(&mut self, request: ::fidl_next::Request<symlink::OnOpen, ___T>) {
19345 ___H::on_open(&mut self.0, request).await
19346 }
19347
19348 async fn on_representation(
19349 &mut self,
19350
19351 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19352 ) {
19353 ___H::on_representation(&mut self.0, request).await
19354 }
19355
19356 async fn on_unknown_interaction(&mut self, ordinal: u64) {
19357 ___H::on_unknown_interaction(&mut self.0, ordinal).await
19358 }
19359}
19360
19361impl<___H, ___T> SymlinkLocalServerHandler<___T> for ::fidl_next::Local<___H>
19362where
19363 ___H: SymlinkServerHandler<___T>,
19364 ___T: ::fidl_next::Transport,
19365{
19366 async fn link_into(
19367 &mut self,
19368
19369 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
19370
19371 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
19372 ) {
19373 ___H::link_into(&mut self.0, request, responder).await
19374 }
19375
19376 async fn clone(&mut self, request: ::fidl_next::Request<symlink::Clone, ___T>) {
19377 ___H::clone(&mut self.0, request).await
19378 }
19379
19380 async fn close(&mut self, responder: ::fidl_next::Responder<symlink::Close, ___T>) {
19381 ___H::close(&mut self.0, responder).await
19382 }
19383
19384 async fn query(&mut self, responder: ::fidl_next::Responder<symlink::Query, ___T>) {
19385 ___H::query(&mut self.0, responder).await
19386 }
19387
19388 async fn deprecated_clone(
19389 &mut self,
19390
19391 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
19392 ) {
19393 ___H::deprecated_clone(&mut self.0, request).await
19394 }
19395
19396 async fn deprecated_get_attr(
19397 &mut self,
19398
19399 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
19400 ) {
19401 ___H::deprecated_get_attr(&mut self.0, responder).await
19402 }
19403
19404 async fn deprecated_set_attr(
19405 &mut self,
19406
19407 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
19408
19409 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
19410 ) {
19411 ___H::deprecated_set_attr(&mut self.0, request, responder).await
19412 }
19413
19414 async fn deprecated_get_flags(
19415 &mut self,
19416
19417 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
19418 ) {
19419 ___H::deprecated_get_flags(&mut self.0, responder).await
19420 }
19421
19422 async fn deprecated_set_flags(
19423 &mut self,
19424
19425 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
19426
19427 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
19428 ) {
19429 ___H::deprecated_set_flags(&mut self.0, request, responder).await
19430 }
19431
19432 async fn get_flags(&mut self, responder: ::fidl_next::Responder<symlink::GetFlags, ___T>) {
19433 ___H::get_flags(&mut self.0, responder).await
19434 }
19435
19436 async fn set_flags(
19437 &mut self,
19438
19439 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
19440
19441 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
19442 ) {
19443 ___H::set_flags(&mut self.0, request, responder).await
19444 }
19445
19446 async fn query_filesystem(
19447 &mut self,
19448
19449 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
19450 ) {
19451 ___H::query_filesystem(&mut self.0, responder).await
19452 }
19453
19454 async fn get_attributes(
19455 &mut self,
19456
19457 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
19458
19459 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
19460 ) {
19461 ___H::get_attributes(&mut self.0, request, responder).await
19462 }
19463
19464 async fn update_attributes(
19465 &mut self,
19466
19467 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
19468
19469 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
19470 ) {
19471 ___H::update_attributes(&mut self.0, request, responder).await
19472 }
19473
19474 async fn sync(&mut self, responder: ::fidl_next::Responder<symlink::Sync, ___T>) {
19475 ___H::sync(&mut self.0, responder).await
19476 }
19477
19478 async fn list_extended_attributes(
19479 &mut self,
19480
19481 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
19482 ) {
19483 ___H::list_extended_attributes(&mut self.0, request).await
19484 }
19485
19486 async fn get_extended_attribute(
19487 &mut self,
19488
19489 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
19490
19491 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
19492 ) {
19493 ___H::get_extended_attribute(&mut self.0, request, responder).await
19494 }
19495
19496 async fn set_extended_attribute(
19497 &mut self,
19498
19499 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
19500
19501 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
19502 ) {
19503 ___H::set_extended_attribute(&mut self.0, request, responder).await
19504 }
19505
19506 async fn remove_extended_attribute(
19507 &mut self,
19508
19509 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
19510
19511 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
19512 ) {
19513 ___H::remove_extended_attribute(&mut self.0, request, responder).await
19514 }
19515
19516 async fn describe(&mut self, responder: ::fidl_next::Responder<symlink::Describe, ___T>) {
19517 ___H::describe(&mut self.0, responder).await
19518 }
19519
19520 async fn on_unknown_interaction(&mut self, ordinal: u64) {
19521 ___H::on_unknown_interaction(&mut self.0, ordinal).await
19522 }
19523}
19524
19525pub use fidl_next_common_fuchsia_io::*;