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
2420 s,
2421 token,
2422
2423 } = &mut *out_;
2424 }
2425
2426 ::fidl_next::Wire::zero_padding(s);
2427
2428 ::fidl_next::Wire::zero_padding(token);
2429 }
2430 }
2431
2432 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryGetTokenResponse
2433 where
2434 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2435 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2436 {
2437 fn decode(
2438 slot_: ::fidl_next::Slot<'_, Self>,
2439 decoder_: &mut ___D,
2440 _: (),
2441 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2442 ::fidl_next::munge! {
2443 let Self {
2444
2445 mut s,
2446 mut token,
2447
2448 } = slot_;
2449 }
2450
2451 let _field = s.as_mut();
2452
2453 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2454
2455 let _field = token.as_mut();
2456
2457 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
2458
2459 Ok(())
2460 }
2461 }
2462
2463 impl ::fidl_next::IntoNatural for DirectoryGetTokenResponse {
2464 type Natural = crate::natural::DirectoryGetTokenResponse;
2465 }
2466
2467 #[derive(Debug)]
2469 #[repr(C)]
2470 pub struct DirectoryLinkRequest<'de> {
2471 pub src: ::fidl_next::wire::String<'de>,
2472
2473 pub dst_parent_token: ::fdomain_client::fidl_next::wire::Handle,
2474
2475 pub dst: ::fidl_next::wire::String<'de>,
2476 }
2477
2478 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkRequest<'_>>(), 40);
2479 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkRequest<'_>>(), 8);
2480
2481 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, src), 0);
2482
2483 static_assertions::const_assert_eq!(
2484 std::mem::offset_of!(DirectoryLinkRequest<'_>, dst_parent_token),
2485 16
2486 );
2487
2488 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, dst), 24);
2489
2490 impl ::fidl_next::Constrained for DirectoryLinkRequest<'_> {
2491 type Constraint = ();
2492
2493 fn validate(
2494 _: ::fidl_next::Slot<'_, Self>,
2495 _: Self::Constraint,
2496 ) -> Result<(), ::fidl_next::ValidationError> {
2497 Ok(())
2498 }
2499 }
2500
2501 unsafe impl ::fidl_next::Wire for DirectoryLinkRequest<'static> {
2502 type Narrowed<'de> = DirectoryLinkRequest<'de>;
2503
2504 #[inline]
2505 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2506 ::fidl_next::munge! {
2507 let Self {
2508
2509 src,
2510 dst_parent_token,
2511 dst,
2512
2513 } = &mut *out_;
2514 }
2515
2516 ::fidl_next::Wire::zero_padding(src);
2517
2518 ::fidl_next::Wire::zero_padding(dst_parent_token);
2519
2520 ::fidl_next::Wire::zero_padding(dst);
2521
2522 unsafe {
2523 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2524 }
2525 }
2526 }
2527
2528 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryLinkRequest<'de>
2529 where
2530 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2531 ___D: ::fidl_next::Decoder<'de>,
2532 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2533 {
2534 fn decode(
2535 slot_: ::fidl_next::Slot<'_, Self>,
2536 decoder_: &mut ___D,
2537 _: (),
2538 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2539 if slot_.as_bytes()[20..24] != [0u8; 4] {
2540 return Err(::fidl_next::DecodeError::InvalidPadding);
2541 }
2542
2543 ::fidl_next::munge! {
2544 let Self {
2545
2546 mut src,
2547 mut dst_parent_token,
2548 mut dst,
2549
2550 } = slot_;
2551 }
2552
2553 let _field = src.as_mut();
2554 ::fidl_next::Constrained::validate(_field, 255)?;
2555 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2556
2557 let src = unsafe { src.deref_unchecked() };
2558
2559 if src.len() > 255 {
2560 return Err(::fidl_next::DecodeError::VectorTooLong {
2561 size: src.len() as u64,
2562 limit: 255,
2563 });
2564 }
2565
2566 let _field = dst_parent_token.as_mut();
2567
2568 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2569
2570 let _field = dst.as_mut();
2571 ::fidl_next::Constrained::validate(_field, 255)?;
2572 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2573
2574 let dst = unsafe { dst.deref_unchecked() };
2575
2576 if dst.len() > 255 {
2577 return Err(::fidl_next::DecodeError::VectorTooLong {
2578 size: dst.len() as u64,
2579 limit: 255,
2580 });
2581 }
2582
2583 Ok(())
2584 }
2585 }
2586
2587 impl<'de> ::fidl_next::IntoNatural for DirectoryLinkRequest<'de> {
2588 type Natural = crate::natural::DirectoryLinkRequest;
2589 }
2590
2591 pub type Token = ::fdomain_client::fidl_next::wire::Handle;
2593
2594 #[derive(Debug)]
2596 #[repr(C)]
2597 pub struct DirectoryRenameRequest<'de> {
2598 pub src: ::fidl_next::wire::String<'de>,
2599
2600 pub dst_parent_token: ::fdomain_client::fidl_next::wire::Handle,
2601
2602 pub dst: ::fidl_next::wire::String<'de>,
2603 }
2604
2605 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRenameRequest<'_>>(), 40);
2606 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRenameRequest<'_>>(), 8);
2607
2608 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, src), 0);
2609
2610 static_assertions::const_assert_eq!(
2611 std::mem::offset_of!(DirectoryRenameRequest<'_>, dst_parent_token),
2612 16
2613 );
2614
2615 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, dst), 24);
2616
2617 impl ::fidl_next::Constrained for DirectoryRenameRequest<'_> {
2618 type Constraint = ();
2619
2620 fn validate(
2621 _: ::fidl_next::Slot<'_, Self>,
2622 _: Self::Constraint,
2623 ) -> Result<(), ::fidl_next::ValidationError> {
2624 Ok(())
2625 }
2626 }
2627
2628 unsafe impl ::fidl_next::Wire for DirectoryRenameRequest<'static> {
2629 type Narrowed<'de> = DirectoryRenameRequest<'de>;
2630
2631 #[inline]
2632 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2633 ::fidl_next::munge! {
2634 let Self {
2635
2636 src,
2637 dst_parent_token,
2638 dst,
2639
2640 } = &mut *out_;
2641 }
2642
2643 ::fidl_next::Wire::zero_padding(src);
2644
2645 ::fidl_next::Wire::zero_padding(dst_parent_token);
2646
2647 ::fidl_next::Wire::zero_padding(dst);
2648
2649 unsafe {
2650 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2651 }
2652 }
2653 }
2654
2655 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryRenameRequest<'de>
2656 where
2657 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2658 ___D: ::fidl_next::Decoder<'de>,
2659 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2660 {
2661 fn decode(
2662 slot_: ::fidl_next::Slot<'_, Self>,
2663 decoder_: &mut ___D,
2664 _: (),
2665 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2666 if slot_.as_bytes()[20..24] != [0u8; 4] {
2667 return Err(::fidl_next::DecodeError::InvalidPadding);
2668 }
2669
2670 ::fidl_next::munge! {
2671 let Self {
2672
2673 mut src,
2674 mut dst_parent_token,
2675 mut dst,
2676
2677 } = slot_;
2678 }
2679
2680 let _field = src.as_mut();
2681 ::fidl_next::Constrained::validate(_field, 255)?;
2682 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2683
2684 let src = unsafe { src.deref_unchecked() };
2685
2686 if src.len() > 255 {
2687 return Err(::fidl_next::DecodeError::VectorTooLong {
2688 size: src.len() as u64,
2689 limit: 255,
2690 });
2691 }
2692
2693 let _field = dst_parent_token.as_mut();
2694
2695 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2696
2697 let _field = dst.as_mut();
2698 ::fidl_next::Constrained::validate(_field, 255)?;
2699 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2700
2701 let dst = unsafe { dst.deref_unchecked() };
2702
2703 if dst.len() > 255 {
2704 return Err(::fidl_next::DecodeError::VectorTooLong {
2705 size: dst.len() as u64,
2706 limit: 255,
2707 });
2708 }
2709
2710 Ok(())
2711 }
2712 }
2713
2714 impl<'de> ::fidl_next::IntoNatural for DirectoryRenameRequest<'de> {
2715 type Natural = crate::natural::DirectoryRenameRequest;
2716 }
2717
2718 #[derive(Debug)]
2720 #[repr(C)]
2721 pub struct DirectoryWatchRequest {
2722 pub mask: crate::wire::WatchMask,
2723
2724 pub options: ::fidl_next::wire::Uint32,
2725
2726 pub watcher: ::fidl_next::ServerEnd<
2727 crate::DirectoryWatcher,
2728 ::fdomain_client::fidl_next::wire::Handle,
2729 >,
2730 }
2731
2732 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchRequest>(), 12);
2733 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchRequest>(), 4);
2734
2735 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, mask), 0);
2736
2737 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, options), 4);
2738
2739 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, watcher), 8);
2740
2741 impl ::fidl_next::Constrained for DirectoryWatchRequest {
2742 type Constraint = ();
2743
2744 fn validate(
2745 _: ::fidl_next::Slot<'_, Self>,
2746 _: Self::Constraint,
2747 ) -> Result<(), ::fidl_next::ValidationError> {
2748 Ok(())
2749 }
2750 }
2751
2752 unsafe impl ::fidl_next::Wire for DirectoryWatchRequest {
2753 type Narrowed<'de> = DirectoryWatchRequest;
2754
2755 #[inline]
2756 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2757 ::fidl_next::munge! {
2758 let Self {
2759
2760 mask,
2761 options,
2762 watcher,
2763
2764 } = &mut *out_;
2765 }
2766
2767 ::fidl_next::Wire::zero_padding(mask);
2768
2769 ::fidl_next::Wire::zero_padding(options);
2770
2771 ::fidl_next::Wire::zero_padding(watcher);
2772 }
2773 }
2774
2775 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchRequest
2776 where
2777 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2778 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2779 {
2780 fn decode(
2781 slot_: ::fidl_next::Slot<'_, Self>,
2782 decoder_: &mut ___D,
2783 _: (),
2784 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2785 ::fidl_next::munge! {
2786 let Self {
2787
2788 mut mask,
2789 mut options,
2790 mut watcher,
2791
2792 } = slot_;
2793 }
2794
2795 let _field = mask.as_mut();
2796
2797 ::fidl_next::Decode::decode(mask.as_mut(), decoder_, ())?;
2798
2799 let _field = options.as_mut();
2800
2801 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
2802
2803 let _field = watcher.as_mut();
2804
2805 ::fidl_next::Decode::decode(watcher.as_mut(), decoder_, ())?;
2806
2807 Ok(())
2808 }
2809 }
2810
2811 impl ::fidl_next::IntoNatural for DirectoryWatchRequest {
2812 type Natural = crate::natural::DirectoryWatchRequest;
2813 }
2814
2815 #[derive(Debug)]
2817 #[repr(C)]
2818 pub struct NodeOnOpenRequest<'de> {
2819 pub s: ::fidl_next::wire::Int32,
2820
2821 pub info: crate::wire_optional::NodeInfoDeprecated<'de>,
2822 }
2823
2824 static_assertions::const_assert_eq!(std::mem::size_of::<NodeOnOpenRequest<'_>>(), 24);
2825 static_assertions::const_assert_eq!(std::mem::align_of::<NodeOnOpenRequest<'_>>(), 8);
2826
2827 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, s), 0);
2828
2829 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, info), 8);
2830
2831 impl ::fidl_next::Constrained for NodeOnOpenRequest<'_> {
2832 type Constraint = ();
2833
2834 fn validate(
2835 _: ::fidl_next::Slot<'_, Self>,
2836 _: Self::Constraint,
2837 ) -> Result<(), ::fidl_next::ValidationError> {
2838 Ok(())
2839 }
2840 }
2841
2842 unsafe impl ::fidl_next::Wire for NodeOnOpenRequest<'static> {
2843 type Narrowed<'de> = NodeOnOpenRequest<'de>;
2844
2845 #[inline]
2846 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2847 ::fidl_next::munge! {
2848 let Self {
2849
2850 s,
2851 info,
2852
2853 } = &mut *out_;
2854 }
2855
2856 ::fidl_next::Wire::zero_padding(s);
2857
2858 ::fidl_next::Wire::zero_padding(info);
2859
2860 unsafe {
2861 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
2862 }
2863 }
2864 }
2865
2866 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeOnOpenRequest<'de>
2867 where
2868 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2869 ___D: ::fidl_next::Decoder<'de>,
2870 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2871 {
2872 fn decode(
2873 slot_: ::fidl_next::Slot<'_, Self>,
2874 decoder_: &mut ___D,
2875 _: (),
2876 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2877 if slot_.as_bytes()[4..8] != [0u8; 4] {
2878 return Err(::fidl_next::DecodeError::InvalidPadding);
2879 }
2880
2881 ::fidl_next::munge! {
2882 let Self {
2883
2884 mut s,
2885 mut info,
2886
2887 } = slot_;
2888 }
2889
2890 let _field = s.as_mut();
2891
2892 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2893
2894 let _field = info.as_mut();
2895
2896 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
2897
2898 Ok(())
2899 }
2900 }
2901
2902 impl<'de> ::fidl_next::IntoNatural for NodeOnOpenRequest<'de> {
2903 type Natural = crate::natural::NodeOnOpenRequest;
2904 }
2905
2906 #[derive(Debug)]
2908 #[repr(C)]
2909 pub struct NodeListExtendedAttributesRequest {
2910 pub iterator: ::fidl_next::ServerEnd<
2911 crate::ExtendedAttributeIterator,
2912 ::fdomain_client::fidl_next::wire::Handle,
2913 >,
2914 }
2915
2916 static_assertions::const_assert_eq!(
2917 std::mem::size_of::<NodeListExtendedAttributesRequest>(),
2918 4
2919 );
2920 static_assertions::const_assert_eq!(
2921 std::mem::align_of::<NodeListExtendedAttributesRequest>(),
2922 4
2923 );
2924
2925 static_assertions::const_assert_eq!(
2926 std::mem::offset_of!(NodeListExtendedAttributesRequest, iterator),
2927 0
2928 );
2929
2930 impl ::fidl_next::Constrained for NodeListExtendedAttributesRequest {
2931 type Constraint = ();
2932
2933 fn validate(
2934 _: ::fidl_next::Slot<'_, Self>,
2935 _: Self::Constraint,
2936 ) -> Result<(), ::fidl_next::ValidationError> {
2937 Ok(())
2938 }
2939 }
2940
2941 unsafe impl ::fidl_next::Wire for NodeListExtendedAttributesRequest {
2942 type Narrowed<'de> = NodeListExtendedAttributesRequest;
2943
2944 #[inline]
2945 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2946 ::fidl_next::munge! {
2947 let Self {
2948
2949 iterator,
2950
2951 } = &mut *out_;
2952 }
2953
2954 ::fidl_next::Wire::zero_padding(iterator);
2955 }
2956 }
2957
2958 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeListExtendedAttributesRequest
2959 where
2960 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2961 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2962 {
2963 fn decode(
2964 slot_: ::fidl_next::Slot<'_, Self>,
2965 decoder_: &mut ___D,
2966 _: (),
2967 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2968 ::fidl_next::munge! {
2969 let Self {
2970
2971 mut iterator,
2972
2973 } = slot_;
2974 }
2975
2976 let _field = iterator.as_mut();
2977
2978 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
2979
2980 Ok(())
2981 }
2982 }
2983
2984 impl ::fidl_next::IntoNatural for NodeListExtendedAttributesRequest {
2985 type Natural = crate::natural::NodeListExtendedAttributesRequest;
2986 }
2987
2988 #[repr(transparent)]
2990 pub struct ExtendedAttributeValue<'de> {
2991 pub(crate) raw: ::fidl_next::wire::Union,
2992 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2993 }
2994
2995 impl<'de> Drop for ExtendedAttributeValue<'de> {
2996 fn drop(&mut self) {
2997 match self.raw.ordinal() {
2998 1 => {
2999 let _ = unsafe {
3000 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
3001 };
3002 }
3003
3004 2 => {
3005 let _ = unsafe {
3006 self.raw.get().read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3007 };
3008 }
3009
3010 _ => (),
3011 }
3012 }
3013 }
3014
3015 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
3016 type Constraint = ();
3017
3018 fn validate(
3019 _: ::fidl_next::Slot<'_, Self>,
3020 _: Self::Constraint,
3021 ) -> Result<(), ::fidl_next::ValidationError> {
3022 Ok(())
3023 }
3024 }
3025
3026 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
3027 type Narrowed<'de> = ExtendedAttributeValue<'de>;
3028
3029 #[inline]
3030 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3031 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3032 ::fidl_next::wire::Union::zero_padding(raw);
3033 }
3034 }
3035
3036 pub mod extended_attribute_value {
3037 pub enum Ref<'de> {
3038 Bytes(&'de ::fidl_next::wire::Vector<'de, u8>),
3039
3040 Buffer(&'de ::fdomain_client::fidl_next::wire::Handle),
3041
3042 UnknownOrdinal_(u64),
3043 }
3044 }
3045
3046 impl<'de> ExtendedAttributeValue<'de> {
3047 pub fn as_ref(&self) -> crate::wire::extended_attribute_value::Ref<'_> {
3048 match self.raw.ordinal() {
3049 1 => crate::wire::extended_attribute_value::Ref::Bytes(unsafe {
3050 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
3051 }),
3052
3053 2 => crate::wire::extended_attribute_value::Ref::Buffer(unsafe {
3054 self.raw.get().deref_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3055 }),
3056
3057 unknown => crate::wire::extended_attribute_value::Ref::UnknownOrdinal_(unknown),
3058 }
3059 }
3060 }
3061
3062 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
3063 where
3064 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3065 ___D: ::fidl_next::Decoder<'de>,
3066 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3067 {
3068 fn decode(
3069 mut slot: ::fidl_next::Slot<'_, Self>,
3070 decoder: &mut ___D,
3071 _: (),
3072 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3073 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3074 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3075 1 => {
3076 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3077 raw,
3078 decoder,
3079 (32768, ()),
3080 )?
3081 }
3082
3083 2 => ::fidl_next::wire::Union::decode_as::<
3084 ___D,
3085 ::fdomain_client::fidl_next::wire::Handle,
3086 >(raw, decoder, ())?,
3087
3088 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3089 }
3090
3091 Ok(())
3092 }
3093 }
3094
3095 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
3096 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3097 match self.raw.ordinal() {
3098 1 => unsafe {
3099 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
3100 },
3101 2 => unsafe {
3102 self.raw
3103 .get()
3104 .deref_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3105 .fmt(f)
3106 },
3107 _ => unsafe { ::core::hint::unreachable_unchecked() },
3108 }
3109 }
3110 }
3111
3112 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
3113 type Natural = crate::natural::ExtendedAttributeValue;
3114 }
3115
3116 #[derive(Debug)]
3118 #[repr(C)]
3119 pub struct NodeSetExtendedAttributeRequest<'de> {
3120 pub name: ::fidl_next::wire::Vector<'de, u8>,
3121
3122 pub value: crate::wire::ExtendedAttributeValue<'de>,
3123
3124 pub mode: crate::wire::SetExtendedAttributeMode,
3125 }
3126
3127 static_assertions::const_assert_eq!(
3128 std::mem::size_of::<NodeSetExtendedAttributeRequest<'_>>(),
3129 40
3130 );
3131 static_assertions::const_assert_eq!(
3132 std::mem::align_of::<NodeSetExtendedAttributeRequest<'_>>(),
3133 8
3134 );
3135
3136 static_assertions::const_assert_eq!(
3137 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, name),
3138 0
3139 );
3140
3141 static_assertions::const_assert_eq!(
3142 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, value),
3143 16
3144 );
3145
3146 static_assertions::const_assert_eq!(
3147 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, mode),
3148 32
3149 );
3150
3151 impl ::fidl_next::Constrained for NodeSetExtendedAttributeRequest<'_> {
3152 type Constraint = ();
3153
3154 fn validate(
3155 _: ::fidl_next::Slot<'_, Self>,
3156 _: Self::Constraint,
3157 ) -> Result<(), ::fidl_next::ValidationError> {
3158 Ok(())
3159 }
3160 }
3161
3162 unsafe impl ::fidl_next::Wire for NodeSetExtendedAttributeRequest<'static> {
3163 type Narrowed<'de> = NodeSetExtendedAttributeRequest<'de>;
3164
3165 #[inline]
3166 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3167 ::fidl_next::munge! {
3168 let Self {
3169
3170 name,
3171 value,
3172 mode,
3173
3174 } = &mut *out_;
3175 }
3176
3177 ::fidl_next::Wire::zero_padding(name);
3178
3179 ::fidl_next::Wire::zero_padding(value);
3180
3181 ::fidl_next::Wire::zero_padding(mode);
3182
3183 unsafe {
3184 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3185 }
3186 }
3187 }
3188
3189 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetExtendedAttributeRequest<'de>
3190 where
3191 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3192 ___D: ::fidl_next::Decoder<'de>,
3193 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3194 {
3195 fn decode(
3196 slot_: ::fidl_next::Slot<'_, Self>,
3197 decoder_: &mut ___D,
3198 _: (),
3199 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3200 if slot_.as_bytes()[36..40] != [0u8; 4] {
3201 return Err(::fidl_next::DecodeError::InvalidPadding);
3202 }
3203
3204 ::fidl_next::munge! {
3205 let Self {
3206
3207 mut name,
3208 mut value,
3209 mut mode,
3210
3211 } = slot_;
3212 }
3213
3214 let _field = name.as_mut();
3215 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3216 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
3217
3218 let name = unsafe { name.deref_unchecked() };
3219
3220 if name.len() > 255 {
3221 return Err(::fidl_next::DecodeError::VectorTooLong {
3222 size: name.len() as u64,
3223 limit: 255,
3224 });
3225 }
3226
3227 let _field = value.as_mut();
3228
3229 ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
3230
3231 let _field = mode.as_mut();
3232
3233 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3234
3235 Ok(())
3236 }
3237 }
3238
3239 impl<'de> ::fidl_next::IntoNatural for NodeSetExtendedAttributeRequest<'de> {
3240 type Natural = crate::natural::NodeSetExtendedAttributeRequest;
3241 }
3242
3243 #[repr(C)]
3245 pub struct FileInfo<'de> {
3246 pub(crate) table: ::fidl_next::wire::Table<'de>,
3247 }
3248
3249 impl<'de> Drop for FileInfo<'de> {
3250 fn drop(&mut self) {
3251 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3252
3253 let _ = self.table.get(2).map(|envelope| unsafe {
3254 envelope.read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3255 });
3256
3257 let _ = self.table.get(3).map(|envelope| unsafe {
3258 envelope.read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3259 });
3260
3261 let _ = self.table.get(4).map(|envelope| unsafe {
3262 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
3263 });
3264 }
3265 }
3266
3267 impl ::fidl_next::Constrained for FileInfo<'_> {
3268 type Constraint = ();
3269
3270 fn validate(
3271 _: ::fidl_next::Slot<'_, Self>,
3272 _: Self::Constraint,
3273 ) -> Result<(), ::fidl_next::ValidationError> {
3274 Ok(())
3275 }
3276 }
3277
3278 unsafe impl ::fidl_next::Wire for FileInfo<'static> {
3279 type Narrowed<'de> = FileInfo<'de>;
3280
3281 #[inline]
3282 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3283 ::fidl_next::munge!(let Self { table } = out);
3284 ::fidl_next::wire::Table::zero_padding(table);
3285 }
3286 }
3287
3288 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileInfo<'de>
3289 where
3290 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3291 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3292 {
3293 fn decode(
3294 slot: ::fidl_next::Slot<'_, Self>,
3295 decoder: &mut ___D,
3296 _: (),
3297 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3298 ::fidl_next::munge!(let Self { table } = slot);
3299
3300 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3301 match ordinal {
3302 0 => unsafe { ::core::hint::unreachable_unchecked() },
3303
3304 1 => {
3305 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3306 slot.as_mut(),
3307 decoder,
3308 (),
3309 )?;
3310
3311 Ok(())
3312 }
3313
3314 2 => {
3315 ::fidl_next::wire::Envelope::decode_as::<
3316 ___D,
3317 ::fdomain_client::fidl_next::wire::Handle,
3318 >(slot.as_mut(), decoder, ())?;
3319
3320 Ok(())
3321 }
3322
3323 3 => {
3324 ::fidl_next::wire::Envelope::decode_as::<
3325 ___D,
3326 ::fdomain_client::fidl_next::wire::Handle,
3327 >(slot.as_mut(), decoder, ())?;
3328
3329 Ok(())
3330 }
3331
3332 4 => {
3333 ::fidl_next::wire::Envelope::decode_as::<
3334 ___D,
3335 crate::wire::NodeAttributes2<'de>,
3336 >(slot.as_mut(), decoder, ())?;
3337
3338 Ok(())
3339 }
3340
3341 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3342 }
3343 })
3344 }
3345 }
3346
3347 impl<'de> FileInfo<'de> {
3348 pub fn is_append(&self) -> ::core::option::Option<&bool> {
3349 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3350 }
3351
3352 pub fn observer(
3353 &self,
3354 ) -> ::core::option::Option<&::fdomain_client::fidl_next::wire::Handle> {
3355 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3356 }
3357
3358 pub fn stream(&self) -> ::core::option::Option<&::fdomain_client::fidl_next::wire::Handle> {
3359 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3360 }
3361
3362 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
3363 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3364 }
3365 }
3366
3367 impl<'de> ::core::fmt::Debug for FileInfo<'de> {
3368 fn fmt(
3369 &self,
3370 f: &mut ::core::fmt::Formatter<'_>,
3371 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3372 f.debug_struct("FileInfo")
3373 .field("is_append", &self.is_append())
3374 .field("observer", &self.observer())
3375 .field("stream", &self.stream())
3376 .field("attributes", &self.attributes())
3377 .finish()
3378 }
3379 }
3380
3381 impl<'de> ::fidl_next::IntoNatural for FileInfo<'de> {
3382 type Natural = crate::natural::FileInfo;
3383 }
3384
3385 #[repr(transparent)]
3387 pub struct Representation<'de> {
3388 pub(crate) raw: ::fidl_next::wire::Union,
3389 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3390 }
3391
3392 impl<'de> Drop for Representation<'de> {
3393 fn drop(&mut self) {
3394 match self.raw.ordinal() {
3395 1 => {
3396 let _ =
3397 unsafe { self.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>() };
3398 }
3399
3400 2 => {
3401 let _ = unsafe {
3402 self.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
3403 };
3404 }
3405
3406 3 => {
3407 let _ =
3408 unsafe { self.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>() };
3409 }
3410
3411 4 => {
3412 let _ =
3413 unsafe { self.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>() };
3414 }
3415
3416 _ => (),
3417 }
3418 }
3419 }
3420
3421 impl ::fidl_next::Constrained for Representation<'_> {
3422 type Constraint = ();
3423
3424 fn validate(
3425 _: ::fidl_next::Slot<'_, Self>,
3426 _: Self::Constraint,
3427 ) -> Result<(), ::fidl_next::ValidationError> {
3428 Ok(())
3429 }
3430 }
3431
3432 unsafe impl ::fidl_next::Wire for Representation<'static> {
3433 type Narrowed<'de> = Representation<'de>;
3434
3435 #[inline]
3436 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3437 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3438 ::fidl_next::wire::Union::zero_padding(raw);
3439 }
3440 }
3441
3442 pub mod representation {
3443 pub enum Ref<'de> {
3444 Node(&'de crate::wire::NodeInfo<'de>),
3445
3446 Directory(&'de crate::wire::DirectoryInfo<'de>),
3447
3448 File(&'de crate::wire::FileInfo<'de>),
3449
3450 Symlink(&'de crate::wire::SymlinkInfo<'de>),
3451
3452 UnknownOrdinal_(u64),
3453 }
3454 }
3455
3456 impl<'de> Representation<'de> {
3457 pub fn as_ref(&self) -> crate::wire::representation::Ref<'_> {
3458 match self.raw.ordinal() {
3459 1 => crate::wire::representation::Ref::Node(unsafe {
3460 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>()
3461 }),
3462
3463 2 => crate::wire::representation::Ref::Directory(unsafe {
3464 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>()
3465 }),
3466
3467 3 => crate::wire::representation::Ref::File(unsafe {
3468 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>()
3469 }),
3470
3471 4 => crate::wire::representation::Ref::Symlink(unsafe {
3472 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>()
3473 }),
3474
3475 unknown => crate::wire::representation::Ref::UnknownOrdinal_(unknown),
3476 }
3477 }
3478 }
3479
3480 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
3481 where
3482 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3483 ___D: ::fidl_next::Decoder<'de>,
3484 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3485 {
3486 fn decode(
3487 mut slot: ::fidl_next::Slot<'_, Self>,
3488 decoder: &mut ___D,
3489 _: (),
3490 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3491 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3492 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3493 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
3494 raw,
3495 decoder,
3496 (),
3497 )?,
3498
3499 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
3500 raw,
3501 decoder,
3502 (),
3503 )?,
3504
3505 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
3506 raw,
3507 decoder,
3508 (),
3509 )?,
3510
3511 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
3512 raw,
3513 decoder,
3514 (),
3515 )?,
3516
3517 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3518 }
3519
3520 Ok(())
3521 }
3522 }
3523
3524 impl<'de> ::core::fmt::Debug for Representation<'de> {
3525 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3526 match self.raw.ordinal() {
3527 1 => unsafe {
3528 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>().fmt(f)
3529 },
3530 2 => unsafe {
3531 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>().fmt(f)
3532 },
3533 3 => unsafe {
3534 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>().fmt(f)
3535 },
3536 4 => unsafe {
3537 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>().fmt(f)
3538 },
3539 _ => unsafe { ::core::hint::unreachable_unchecked() },
3540 }
3541 }
3542 }
3543
3544 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
3545 type Natural = crate::natural::Representation;
3546 }
3547
3548 #[derive(Debug)]
3550 #[repr(C)]
3551 pub struct DirectoryOpenRequest<'de> {
3552 pub path: ::fidl_next::wire::String<'de>,
3553
3554 pub flags: crate::wire::Flags,
3555
3556 pub options: crate::wire::Options<'de>,
3557
3558 pub object: ::fdomain_client::fidl_next::wire::Handle,
3559 }
3560
3561 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryOpenRequest<'_>>(), 48);
3562 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryOpenRequest<'_>>(), 8);
3563
3564 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, path), 0);
3565
3566 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, flags), 16);
3567
3568 static_assertions::const_assert_eq!(
3569 std::mem::offset_of!(DirectoryOpenRequest<'_>, options),
3570 24
3571 );
3572
3573 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryOpenRequest<'_>, object), 40);
3574
3575 impl ::fidl_next::Constrained for DirectoryOpenRequest<'_> {
3576 type Constraint = ();
3577
3578 fn validate(
3579 _: ::fidl_next::Slot<'_, Self>,
3580 _: Self::Constraint,
3581 ) -> Result<(), ::fidl_next::ValidationError> {
3582 Ok(())
3583 }
3584 }
3585
3586 unsafe impl ::fidl_next::Wire for DirectoryOpenRequest<'static> {
3587 type Narrowed<'de> = DirectoryOpenRequest<'de>;
3588
3589 #[inline]
3590 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3591 ::fidl_next::munge! {
3592 let Self {
3593
3594 path,
3595 flags,
3596 options,
3597 object,
3598
3599 } = &mut *out_;
3600 }
3601
3602 ::fidl_next::Wire::zero_padding(path);
3603
3604 ::fidl_next::Wire::zero_padding(flags);
3605
3606 ::fidl_next::Wire::zero_padding(options);
3607
3608 ::fidl_next::Wire::zero_padding(object);
3609
3610 unsafe {
3611 out_.as_mut_ptr().cast::<u8>().add(44).write_bytes(0, 4);
3612 }
3613 }
3614 }
3615
3616 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryOpenRequest<'de>
3617 where
3618 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3619 ___D: ::fidl_next::Decoder<'de>,
3620 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3621 {
3622 fn decode(
3623 slot_: ::fidl_next::Slot<'_, Self>,
3624 decoder_: &mut ___D,
3625 _: (),
3626 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3627 if slot_.as_bytes()[44..48] != [0u8; 4] {
3628 return Err(::fidl_next::DecodeError::InvalidPadding);
3629 }
3630
3631 ::fidl_next::munge! {
3632 let Self {
3633
3634 mut path,
3635 mut flags,
3636 mut options,
3637 mut object,
3638
3639 } = slot_;
3640 }
3641
3642 let _field = path.as_mut();
3643 ::fidl_next::Constrained::validate(_field, 4095)?;
3644 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3645
3646 let path = unsafe { path.deref_unchecked() };
3647
3648 if path.len() > 4095 {
3649 return Err(::fidl_next::DecodeError::VectorTooLong {
3650 size: path.len() as u64,
3651 limit: 4095,
3652 });
3653 }
3654
3655 let _field = flags.as_mut();
3656
3657 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3658
3659 let _field = options.as_mut();
3660
3661 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
3662
3663 let _field = object.as_mut();
3664
3665 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3666
3667 Ok(())
3668 }
3669 }
3670
3671 impl<'de> ::fidl_next::IntoNatural for DirectoryOpenRequest<'de> {
3672 type Natural = crate::natural::DirectoryOpenRequest;
3673 }
3674
3675 #[derive(Debug)]
3677 #[repr(C)]
3678 pub struct NodeDeprecatedCloneRequest {
3679 pub flags: crate::wire::OpenFlags,
3680
3681 pub object: ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
3682 }
3683
3684 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedCloneRequest>(), 8);
3685 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedCloneRequest>(), 4);
3686
3687 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedCloneRequest, flags), 0);
3688
3689 static_assertions::const_assert_eq!(
3690 std::mem::offset_of!(NodeDeprecatedCloneRequest, object),
3691 4
3692 );
3693
3694 impl ::fidl_next::Constrained for NodeDeprecatedCloneRequest {
3695 type Constraint = ();
3696
3697 fn validate(
3698 _: ::fidl_next::Slot<'_, Self>,
3699 _: Self::Constraint,
3700 ) -> Result<(), ::fidl_next::ValidationError> {
3701 Ok(())
3702 }
3703 }
3704
3705 unsafe impl ::fidl_next::Wire for NodeDeprecatedCloneRequest {
3706 type Narrowed<'de> = NodeDeprecatedCloneRequest;
3707
3708 #[inline]
3709 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3710 ::fidl_next::munge! {
3711 let Self {
3712
3713 flags,
3714 object,
3715
3716 } = &mut *out_;
3717 }
3718
3719 ::fidl_next::Wire::zero_padding(flags);
3720
3721 ::fidl_next::Wire::zero_padding(object);
3722 }
3723 }
3724
3725 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedCloneRequest
3726 where
3727 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3728 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3729 {
3730 fn decode(
3731 slot_: ::fidl_next::Slot<'_, Self>,
3732 decoder_: &mut ___D,
3733 _: (),
3734 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3735 ::fidl_next::munge! {
3736 let Self {
3737
3738 mut flags,
3739 mut object,
3740
3741 } = slot_;
3742 }
3743
3744 let _field = flags.as_mut();
3745
3746 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3747
3748 let _field = object.as_mut();
3749
3750 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3751
3752 Ok(())
3753 }
3754 }
3755
3756 impl ::fidl_next::IntoNatural for NodeDeprecatedCloneRequest {
3757 type Natural = crate::natural::NodeDeprecatedCloneRequest;
3758 }
3759
3760 #[derive(Debug)]
3762 #[repr(C)]
3763 pub struct DirectoryDeprecatedOpenRequest<'de> {
3764 pub flags: crate::wire::OpenFlags,
3765
3766 pub mode: crate::wire::ModeType,
3767
3768 pub path: ::fidl_next::wire::String<'de>,
3769
3770 pub object: ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
3771 }
3772
3773 static_assertions::const_assert_eq!(
3774 std::mem::size_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3775 32
3776 );
3777 static_assertions::const_assert_eq!(
3778 std::mem::align_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3779 8
3780 );
3781
3782 static_assertions::const_assert_eq!(
3783 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, flags),
3784 0
3785 );
3786
3787 static_assertions::const_assert_eq!(
3788 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, mode),
3789 4
3790 );
3791
3792 static_assertions::const_assert_eq!(
3793 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, path),
3794 8
3795 );
3796
3797 static_assertions::const_assert_eq!(
3798 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, object),
3799 24
3800 );
3801
3802 impl ::fidl_next::Constrained for DirectoryDeprecatedOpenRequest<'_> {
3803 type Constraint = ();
3804
3805 fn validate(
3806 _: ::fidl_next::Slot<'_, Self>,
3807 _: Self::Constraint,
3808 ) -> Result<(), ::fidl_next::ValidationError> {
3809 Ok(())
3810 }
3811 }
3812
3813 unsafe impl ::fidl_next::Wire for DirectoryDeprecatedOpenRequest<'static> {
3814 type Narrowed<'de> = DirectoryDeprecatedOpenRequest<'de>;
3815
3816 #[inline]
3817 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3818 ::fidl_next::munge! {
3819 let Self {
3820
3821 flags,
3822 mode,
3823 path,
3824 object,
3825
3826 } = &mut *out_;
3827 }
3828
3829 ::fidl_next::Wire::zero_padding(flags);
3830
3831 ::fidl_next::Wire::zero_padding(mode);
3832
3833 ::fidl_next::Wire::zero_padding(path);
3834
3835 ::fidl_next::Wire::zero_padding(object);
3836
3837 unsafe {
3838 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
3839 }
3840 }
3841 }
3842
3843 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryDeprecatedOpenRequest<'de>
3844 where
3845 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3846 ___D: ::fidl_next::Decoder<'de>,
3847 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3848 {
3849 fn decode(
3850 slot_: ::fidl_next::Slot<'_, Self>,
3851 decoder_: &mut ___D,
3852 _: (),
3853 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3854 if slot_.as_bytes()[28..32] != [0u8; 4] {
3855 return Err(::fidl_next::DecodeError::InvalidPadding);
3856 }
3857
3858 ::fidl_next::munge! {
3859 let Self {
3860
3861 mut flags,
3862 mut mode,
3863 mut path,
3864 mut object,
3865
3866 } = slot_;
3867 }
3868
3869 let _field = flags.as_mut();
3870
3871 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3872
3873 let _field = mode.as_mut();
3874
3875 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3876
3877 let _field = path.as_mut();
3878 ::fidl_next::Constrained::validate(_field, 4095)?;
3879 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3880
3881 let path = unsafe { path.deref_unchecked() };
3882
3883 if path.len() > 4095 {
3884 return Err(::fidl_next::DecodeError::VectorTooLong {
3885 size: path.len() as u64,
3886 limit: 4095,
3887 });
3888 }
3889
3890 let _field = object.as_mut();
3891
3892 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3893
3894 Ok(())
3895 }
3896 }
3897
3898 impl<'de> ::fidl_next::IntoNatural for DirectoryDeprecatedOpenRequest<'de> {
3899 type Natural = crate::natural::DirectoryDeprecatedOpenRequest;
3900 }
3901
3902 #[derive(Debug)]
3904 #[repr(C)]
3905 pub struct DirectoryCreateSymlinkRequest<'de> {
3906 pub name: ::fidl_next::wire::String<'de>,
3907
3908 pub target: ::fidl_next::wire::Vector<'de, u8>,
3909
3910 pub connection: ::fidl_next::ServerEnd<
3911 crate::Symlink,
3912 ::fdomain_client::fidl_next::wire::OptionalHandle,
3913 >,
3914 }
3915
3916 static_assertions::const_assert_eq!(
3917 std::mem::size_of::<DirectoryCreateSymlinkRequest<'_>>(),
3918 40
3919 );
3920 static_assertions::const_assert_eq!(
3921 std::mem::align_of::<DirectoryCreateSymlinkRequest<'_>>(),
3922 8
3923 );
3924
3925 static_assertions::const_assert_eq!(
3926 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, name),
3927 0
3928 );
3929
3930 static_assertions::const_assert_eq!(
3931 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, target),
3932 16
3933 );
3934
3935 static_assertions::const_assert_eq!(
3936 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, connection),
3937 32
3938 );
3939
3940 impl ::fidl_next::Constrained for DirectoryCreateSymlinkRequest<'_> {
3941 type Constraint = ();
3942
3943 fn validate(
3944 _: ::fidl_next::Slot<'_, Self>,
3945 _: Self::Constraint,
3946 ) -> Result<(), ::fidl_next::ValidationError> {
3947 Ok(())
3948 }
3949 }
3950
3951 unsafe impl ::fidl_next::Wire for DirectoryCreateSymlinkRequest<'static> {
3952 type Narrowed<'de> = DirectoryCreateSymlinkRequest<'de>;
3953
3954 #[inline]
3955 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3956 ::fidl_next::munge! {
3957 let Self {
3958
3959 name,
3960 target,
3961 connection,
3962
3963 } = &mut *out_;
3964 }
3965
3966 ::fidl_next::Wire::zero_padding(name);
3967
3968 ::fidl_next::Wire::zero_padding(target);
3969
3970 ::fidl_next::Wire::zero_padding(connection);
3971
3972 unsafe {
3973 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3974 }
3975 }
3976 }
3977
3978 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryCreateSymlinkRequest<'de>
3979 where
3980 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3981 ___D: ::fidl_next::Decoder<'de>,
3982 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3983 {
3984 fn decode(
3985 slot_: ::fidl_next::Slot<'_, Self>,
3986 decoder_: &mut ___D,
3987 _: (),
3988 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3989 if slot_.as_bytes()[36..40] != [0u8; 4] {
3990 return Err(::fidl_next::DecodeError::InvalidPadding);
3991 }
3992
3993 ::fidl_next::munge! {
3994 let Self {
3995
3996 mut name,
3997 mut target,
3998 mut connection,
3999
4000 } = slot_;
4001 }
4002
4003 let _field = name.as_mut();
4004 ::fidl_next::Constrained::validate(_field, 255)?;
4005 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
4006
4007 let name = unsafe { name.deref_unchecked() };
4008
4009 if name.len() > 255 {
4010 return Err(::fidl_next::DecodeError::VectorTooLong {
4011 size: name.len() as u64,
4012 limit: 255,
4013 });
4014 }
4015
4016 let _field = target.as_mut();
4017 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
4018 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
4019
4020 let target = unsafe { target.deref_unchecked() };
4021
4022 if target.len() > 4095 {
4023 return Err(::fidl_next::DecodeError::VectorTooLong {
4024 size: target.len() as u64,
4025 limit: 4095,
4026 });
4027 }
4028
4029 let _field = connection.as_mut();
4030
4031 ::fidl_next::Decode::decode(connection.as_mut(), decoder_, ())?;
4032
4033 Ok(())
4034 }
4035 }
4036
4037 impl<'de> ::fidl_next::IntoNatural for DirectoryCreateSymlinkRequest<'de> {
4038 type Natural = crate::natural::DirectoryCreateSymlinkRequest;
4039 }
4040
4041 #[derive(Debug)]
4043 #[repr(C)]
4044 pub struct FileGetBackingMemoryResponse {
4045 pub vmo: ::fdomain_client::fidl_next::wire::Handle,
4046 }
4047
4048 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryResponse>(), 4);
4049 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryResponse>(), 4);
4050
4051 static_assertions::const_assert_eq!(std::mem::offset_of!(FileGetBackingMemoryResponse, vmo), 0);
4052
4053 impl ::fidl_next::Constrained for FileGetBackingMemoryResponse {
4054 type Constraint = ();
4055
4056 fn validate(
4057 _: ::fidl_next::Slot<'_, Self>,
4058 _: Self::Constraint,
4059 ) -> Result<(), ::fidl_next::ValidationError> {
4060 Ok(())
4061 }
4062 }
4063
4064 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryResponse {
4065 type Narrowed<'de> = FileGetBackingMemoryResponse;
4066
4067 #[inline]
4068 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4069 ::fidl_next::munge! {
4070 let Self {
4071
4072 vmo,
4073
4074 } = &mut *out_;
4075 }
4076
4077 ::fidl_next::Wire::zero_padding(vmo);
4078 }
4079 }
4080
4081 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryResponse
4082 where
4083 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4084 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4085 {
4086 fn decode(
4087 slot_: ::fidl_next::Slot<'_, Self>,
4088 decoder_: &mut ___D,
4089 _: (),
4090 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4091 ::fidl_next::munge! {
4092 let Self {
4093
4094 mut vmo,
4095
4096 } = slot_;
4097 }
4098
4099 let _field = vmo.as_mut();
4100
4101 ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
4102
4103 Ok(())
4104 }
4105 }
4106
4107 impl ::fidl_next::IntoNatural for FileGetBackingMemoryResponse {
4108 type Natural = crate::natural::FileGetBackingMemoryResponse;
4109 }
4110
4111 #[derive(Debug)]
4113 #[repr(C)]
4114 pub struct LinkableLinkIntoRequest<'de> {
4115 pub dst_parent_token: ::fdomain_client::fidl_next::wire::Handle,
4116
4117 pub dst: ::fidl_next::wire::String<'de>,
4118 }
4119
4120 static_assertions::const_assert_eq!(std::mem::size_of::<LinkableLinkIntoRequest<'_>>(), 24);
4121 static_assertions::const_assert_eq!(std::mem::align_of::<LinkableLinkIntoRequest<'_>>(), 8);
4122
4123 static_assertions::const_assert_eq!(
4124 std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst_parent_token),
4125 0
4126 );
4127
4128 static_assertions::const_assert_eq!(std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst), 8);
4129
4130 impl ::fidl_next::Constrained for LinkableLinkIntoRequest<'_> {
4131 type Constraint = ();
4132
4133 fn validate(
4134 _: ::fidl_next::Slot<'_, Self>,
4135 _: Self::Constraint,
4136 ) -> Result<(), ::fidl_next::ValidationError> {
4137 Ok(())
4138 }
4139 }
4140
4141 unsafe impl ::fidl_next::Wire for LinkableLinkIntoRequest<'static> {
4142 type Narrowed<'de> = LinkableLinkIntoRequest<'de>;
4143
4144 #[inline]
4145 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4146 ::fidl_next::munge! {
4147 let Self {
4148
4149 dst_parent_token,
4150 dst,
4151
4152 } = &mut *out_;
4153 }
4154
4155 ::fidl_next::Wire::zero_padding(dst_parent_token);
4156
4157 ::fidl_next::Wire::zero_padding(dst);
4158
4159 unsafe {
4160 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
4161 }
4162 }
4163 }
4164
4165 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LinkableLinkIntoRequest<'de>
4166 where
4167 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4168 ___D: ::fidl_next::Decoder<'de>,
4169 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4170 {
4171 fn decode(
4172 slot_: ::fidl_next::Slot<'_, Self>,
4173 decoder_: &mut ___D,
4174 _: (),
4175 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4176 if slot_.as_bytes()[4..8] != [0u8; 4] {
4177 return Err(::fidl_next::DecodeError::InvalidPadding);
4178 }
4179
4180 ::fidl_next::munge! {
4181 let Self {
4182
4183 mut dst_parent_token,
4184 mut dst,
4185
4186 } = slot_;
4187 }
4188
4189 let _field = dst_parent_token.as_mut();
4190
4191 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
4192
4193 let _field = dst.as_mut();
4194 ::fidl_next::Constrained::validate(_field, 255)?;
4195 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
4196
4197 let dst = unsafe { dst.deref_unchecked() };
4198
4199 if dst.len() > 255 {
4200 return Err(::fidl_next::DecodeError::VectorTooLong {
4201 size: dst.len() as u64,
4202 limit: 255,
4203 });
4204 }
4205
4206 Ok(())
4207 }
4208 }
4209
4210 impl<'de> ::fidl_next::IntoNatural for LinkableLinkIntoRequest<'de> {
4211 type Natural = crate::natural::LinkableLinkIntoRequest;
4212 }
4213
4214 #[derive(Debug)]
4216 #[repr(C)]
4217 pub struct FileAllocateRequest {
4218 pub offset: ::fidl_next::wire::Uint64,
4219
4220 pub length: ::fidl_next::wire::Uint64,
4221
4222 pub mode: crate::wire::AllocateMode,
4223 }
4224
4225 static_assertions::const_assert_eq!(std::mem::size_of::<FileAllocateRequest>(), 24);
4226 static_assertions::const_assert_eq!(std::mem::align_of::<FileAllocateRequest>(), 8);
4227
4228 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, offset), 0);
4229
4230 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, length), 8);
4231
4232 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, mode), 16);
4233
4234 impl ::fidl_next::Constrained for FileAllocateRequest {
4235 type Constraint = ();
4236
4237 fn validate(
4238 _: ::fidl_next::Slot<'_, Self>,
4239 _: Self::Constraint,
4240 ) -> Result<(), ::fidl_next::ValidationError> {
4241 Ok(())
4242 }
4243 }
4244
4245 unsafe impl ::fidl_next::Wire for FileAllocateRequest {
4246 type Narrowed<'de> = FileAllocateRequest;
4247
4248 #[inline]
4249 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4250 ::fidl_next::munge! {
4251 let Self {
4252
4253 offset,
4254 length,
4255 mode,
4256
4257 } = &mut *out_;
4258 }
4259
4260 ::fidl_next::Wire::zero_padding(offset);
4261
4262 ::fidl_next::Wire::zero_padding(length);
4263
4264 ::fidl_next::Wire::zero_padding(mode);
4265
4266 unsafe {
4267 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4268 }
4269 }
4270 }
4271
4272 unsafe impl<___D> ::fidl_next::Decode<___D> for FileAllocateRequest
4273 where
4274 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4275 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4276 {
4277 fn decode(
4278 slot_: ::fidl_next::Slot<'_, Self>,
4279 decoder_: &mut ___D,
4280 _: (),
4281 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4282 if slot_.as_bytes()[20..24] != [0u8; 4] {
4283 return Err(::fidl_next::DecodeError::InvalidPadding);
4284 }
4285
4286 ::fidl_next::munge! {
4287 let Self {
4288
4289 mut offset,
4290 mut length,
4291 mut mode,
4292
4293 } = slot_;
4294 }
4295
4296 let _field = offset.as_mut();
4297
4298 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
4299
4300 let _field = length.as_mut();
4301
4302 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
4303
4304 let _field = mode.as_mut();
4305
4306 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
4307
4308 Ok(())
4309 }
4310 }
4311
4312 impl ::fidl_next::IntoNatural for FileAllocateRequest {
4313 type Natural = crate::natural::FileAllocateRequest;
4314 }
4315
4316 #[derive(Debug)]
4318 #[repr(C)]
4319 pub struct FileEnableVerityRequest<'de> {
4320 pub options: crate::wire::VerificationOptions<'de>,
4321 }
4322
4323 static_assertions::const_assert_eq!(std::mem::size_of::<FileEnableVerityRequest<'_>>(), 16);
4324 static_assertions::const_assert_eq!(std::mem::align_of::<FileEnableVerityRequest<'_>>(), 8);
4325
4326 static_assertions::const_assert_eq!(
4327 std::mem::offset_of!(FileEnableVerityRequest<'_>, options),
4328 0
4329 );
4330
4331 impl ::fidl_next::Constrained for FileEnableVerityRequest<'_> {
4332 type Constraint = ();
4333
4334 fn validate(
4335 _: ::fidl_next::Slot<'_, Self>,
4336 _: Self::Constraint,
4337 ) -> Result<(), ::fidl_next::ValidationError> {
4338 Ok(())
4339 }
4340 }
4341
4342 unsafe impl ::fidl_next::Wire for FileEnableVerityRequest<'static> {
4343 type Narrowed<'de> = FileEnableVerityRequest<'de>;
4344
4345 #[inline]
4346 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4347 ::fidl_next::munge! {
4348 let Self {
4349
4350 options,
4351
4352 } = &mut *out_;
4353 }
4354
4355 ::fidl_next::Wire::zero_padding(options);
4356 }
4357 }
4358
4359 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileEnableVerityRequest<'de>
4360 where
4361 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4362 ___D: ::fidl_next::Decoder<'de>,
4363 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4364 {
4365 fn decode(
4366 slot_: ::fidl_next::Slot<'_, Self>,
4367 decoder_: &mut ___D,
4368 _: (),
4369 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4370 ::fidl_next::munge! {
4371 let Self {
4372
4373 mut options,
4374
4375 } = slot_;
4376 }
4377
4378 let _field = options.as_mut();
4379
4380 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
4381
4382 Ok(())
4383 }
4384 }
4385
4386 impl<'de> ::fidl_next::IntoNatural for FileEnableVerityRequest<'de> {
4387 type Natural = crate::natural::FileEnableVerityRequest;
4388 }
4389
4390 #[derive(Debug)]
4392 #[repr(C)]
4393 pub struct FileObject {
4394 pub event: ::fdomain_client::fidl_next::wire::OptionalHandle,
4395
4396 pub stream: ::fdomain_client::fidl_next::wire::OptionalHandle,
4397 }
4398
4399 static_assertions::const_assert_eq!(std::mem::size_of::<FileObject>(), 8);
4400 static_assertions::const_assert_eq!(std::mem::align_of::<FileObject>(), 4);
4401
4402 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, event), 0);
4403
4404 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, stream), 4);
4405
4406 impl ::fidl_next::Constrained for FileObject {
4407 type Constraint = ();
4408
4409 fn validate(
4410 _: ::fidl_next::Slot<'_, Self>,
4411 _: Self::Constraint,
4412 ) -> Result<(), ::fidl_next::ValidationError> {
4413 Ok(())
4414 }
4415 }
4416
4417 unsafe impl ::fidl_next::Wire for FileObject {
4418 type Narrowed<'de> = FileObject;
4419
4420 #[inline]
4421 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4422 ::fidl_next::munge! {
4423 let Self {
4424
4425 event,
4426 stream,
4427
4428 } = &mut *out_;
4429 }
4430
4431 ::fidl_next::Wire::zero_padding(event);
4432
4433 ::fidl_next::Wire::zero_padding(stream);
4434 }
4435 }
4436
4437 unsafe impl<___D> ::fidl_next::Decode<___D> for FileObject
4438 where
4439 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4440 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4441 {
4442 fn decode(
4443 slot_: ::fidl_next::Slot<'_, Self>,
4444 decoder_: &mut ___D,
4445 _: (),
4446 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4447 ::fidl_next::munge! {
4448 let Self {
4449
4450 mut event,
4451 mut stream,
4452
4453 } = slot_;
4454 }
4455
4456 let _field = event.as_mut();
4457
4458 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
4459
4460 let _field = stream.as_mut();
4461
4462 ::fidl_next::Decode::decode(stream.as_mut(), decoder_, ())?;
4463
4464 Ok(())
4465 }
4466 }
4467
4468 impl ::fidl_next::IntoNatural for FileObject {
4469 type Natural = crate::natural::FileObject;
4470 }
4471
4472 #[repr(transparent)]
4474 pub struct NodeInfoDeprecated<'de> {
4475 pub(crate) raw: ::fidl_next::wire::Union,
4476 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4477 }
4478
4479 impl<'de> Drop for NodeInfoDeprecated<'de> {
4480 fn drop(&mut self) {
4481 match self.raw.ordinal() {
4482 1 => {
4483 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Service>() };
4484 }
4485
4486 2 => {
4487 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::FileObject>() };
4488 }
4489
4490 3 => {
4491 let _ =
4492 unsafe { self.raw.get().read_unchecked::<crate::wire::DirectoryObject>() };
4493 }
4494
4495 4 => {
4496 let _ = unsafe {
4497 self.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4498 };
4499 }
4500
4501 _ => unsafe { ::core::hint::unreachable_unchecked() },
4502 }
4503 }
4504 }
4505
4506 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4507 type Constraint = ();
4508
4509 fn validate(
4510 _: ::fidl_next::Slot<'_, Self>,
4511 _: Self::Constraint,
4512 ) -> Result<(), ::fidl_next::ValidationError> {
4513 Ok(())
4514 }
4515 }
4516
4517 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4518 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4519
4520 #[inline]
4521 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4522 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4523 ::fidl_next::wire::Union::zero_padding(raw);
4524 }
4525 }
4526
4527 pub mod node_info_deprecated {
4528 pub enum Ref<'de> {
4529 Service(&'de crate::wire::Service),
4530
4531 File(&'de crate::wire::FileObject),
4532
4533 Directory(&'de crate::wire::DirectoryObject),
4534
4535 Symlink(&'de crate::wire::SymlinkObject<'de>),
4536 }
4537 }
4538
4539 impl<'de> NodeInfoDeprecated<'de> {
4540 pub fn as_ref(&self) -> crate::wire::node_info_deprecated::Ref<'_> {
4541 match self.raw.ordinal() {
4542 1 => crate::wire::node_info_deprecated::Ref::Service(unsafe {
4543 self.raw.get().deref_unchecked::<crate::wire::Service>()
4544 }),
4545
4546 2 => crate::wire::node_info_deprecated::Ref::File(unsafe {
4547 self.raw.get().deref_unchecked::<crate::wire::FileObject>()
4548 }),
4549
4550 3 => crate::wire::node_info_deprecated::Ref::Directory(unsafe {
4551 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>()
4552 }),
4553
4554 4 => crate::wire::node_info_deprecated::Ref::Symlink(unsafe {
4555 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>()
4556 }),
4557
4558 _ => unsafe { ::core::hint::unreachable_unchecked() },
4559 }
4560 }
4561 }
4562
4563 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4564 where
4565 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4566 ___D: ::fidl_next::Decoder<'de>,
4567 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4568 {
4569 fn decode(
4570 mut slot: ::fidl_next::Slot<'_, Self>,
4571 decoder: &mut ___D,
4572 _: (),
4573 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4574 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4575 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4576 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4577 raw,
4578 decoder,
4579 (),
4580 )?,
4581
4582 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4583 raw,
4584 decoder,
4585 (),
4586 )?,
4587
4588 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4589 raw,
4590 decoder,
4591 (),
4592 )?,
4593
4594 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4595 raw,
4596 decoder,
4597 (),
4598 )?,
4599
4600 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
4601 }
4602
4603 Ok(())
4604 }
4605 }
4606
4607 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4608 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4609 match self.raw.ordinal() {
4610 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Service>().fmt(f) },
4611 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::FileObject>().fmt(f) },
4612 3 => unsafe {
4613 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>().fmt(f)
4614 },
4615 4 => unsafe {
4616 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>().fmt(f)
4617 },
4618 _ => unsafe { ::core::hint::unreachable_unchecked() },
4619 }
4620 }
4621 }
4622
4623 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4624 type Natural = crate::natural::NodeInfoDeprecated;
4625 }
4626}
4627
4628pub mod wire_optional {
4629
4630 pub use fidl_next_common_fuchsia_io::wire_optional::*;
4631
4632 #[repr(transparent)]
4633 pub struct ExtendedAttributeValue<'de> {
4634 pub(crate) raw: ::fidl_next::wire::Union,
4635 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4636 }
4637
4638 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
4639 type Constraint = ();
4640
4641 fn validate(
4642 _: ::fidl_next::Slot<'_, Self>,
4643 _: Self::Constraint,
4644 ) -> Result<(), ::fidl_next::ValidationError> {
4645 Ok(())
4646 }
4647 }
4648
4649 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
4650 type Narrowed<'de> = ExtendedAttributeValue<'de>;
4651
4652 #[inline]
4653 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4654 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4655 ::fidl_next::wire::Union::zero_padding(raw);
4656 }
4657 }
4658
4659 impl<'de> ExtendedAttributeValue<'de> {
4660 pub fn is_some(&self) -> bool {
4661 self.raw.is_some()
4662 }
4663
4664 pub fn is_none(&self) -> bool {
4665 self.raw.is_none()
4666 }
4667
4668 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ExtendedAttributeValue<'de>> {
4669 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4670 }
4671
4672 pub fn into_option(
4673 self,
4674 ) -> ::core::option::Option<crate::wire::ExtendedAttributeValue<'de>> {
4675 if self.is_some() {
4676 Some(crate::wire::ExtendedAttributeValue {
4677 raw: self.raw,
4678 _phantom: ::core::marker::PhantomData,
4679 })
4680 } else {
4681 None
4682 }
4683 }
4684 }
4685
4686 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
4687 where
4688 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4689 ___D: ::fidl_next::Decoder<'de>,
4690 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4691 {
4692 fn decode(
4693 mut slot: ::fidl_next::Slot<'_, Self>,
4694 decoder: &mut ___D,
4695 _: (),
4696 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4697 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4698 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4699 1 => {
4700 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
4701 raw,
4702 decoder,
4703 (32768, ()),
4704 )?
4705 }
4706
4707 2 => ::fidl_next::wire::Union::decode_as::<
4708 ___D,
4709 ::fdomain_client::fidl_next::wire::Handle,
4710 >(raw, decoder, ())?,
4711
4712 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4713 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4714 }
4715
4716 Ok(())
4717 }
4718 }
4719
4720 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
4721 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4722 self.as_ref().fmt(f)
4723 }
4724 }
4725
4726 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
4727 type Natural = ::core::option::Option<crate::natural::ExtendedAttributeValue>;
4728 }
4729
4730 #[repr(transparent)]
4731 pub struct Representation<'de> {
4732 pub(crate) raw: ::fidl_next::wire::Union,
4733 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4734 }
4735
4736 impl ::fidl_next::Constrained for Representation<'_> {
4737 type Constraint = ();
4738
4739 fn validate(
4740 _: ::fidl_next::Slot<'_, Self>,
4741 _: Self::Constraint,
4742 ) -> Result<(), ::fidl_next::ValidationError> {
4743 Ok(())
4744 }
4745 }
4746
4747 unsafe impl ::fidl_next::Wire for Representation<'static> {
4748 type Narrowed<'de> = Representation<'de>;
4749
4750 #[inline]
4751 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4752 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4753 ::fidl_next::wire::Union::zero_padding(raw);
4754 }
4755 }
4756
4757 impl<'de> Representation<'de> {
4758 pub fn is_some(&self) -> bool {
4759 self.raw.is_some()
4760 }
4761
4762 pub fn is_none(&self) -> bool {
4763 self.raw.is_none()
4764 }
4765
4766 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Representation<'de>> {
4767 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4768 }
4769
4770 pub fn into_option(self) -> ::core::option::Option<crate::wire::Representation<'de>> {
4771 if self.is_some() {
4772 Some(crate::wire::Representation {
4773 raw: self.raw,
4774 _phantom: ::core::marker::PhantomData,
4775 })
4776 } else {
4777 None
4778 }
4779 }
4780 }
4781
4782 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
4783 where
4784 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4785 ___D: ::fidl_next::Decoder<'de>,
4786 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4787 {
4788 fn decode(
4789 mut slot: ::fidl_next::Slot<'_, Self>,
4790 decoder: &mut ___D,
4791 _: (),
4792 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4793 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4794 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4795 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
4796 raw,
4797 decoder,
4798 (),
4799 )?,
4800
4801 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
4802 raw,
4803 decoder,
4804 (),
4805 )?,
4806
4807 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
4808 raw,
4809 decoder,
4810 (),
4811 )?,
4812
4813 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
4814 raw,
4815 decoder,
4816 (),
4817 )?,
4818
4819 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4820 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4821 }
4822
4823 Ok(())
4824 }
4825 }
4826
4827 impl<'de> ::core::fmt::Debug for Representation<'de> {
4828 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4829 self.as_ref().fmt(f)
4830 }
4831 }
4832
4833 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
4834 type Natural = ::core::option::Option<crate::natural::Representation>;
4835 }
4836
4837 #[repr(transparent)]
4838 pub struct NodeInfoDeprecated<'de> {
4839 pub(crate) raw: ::fidl_next::wire::Union,
4840 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4841 }
4842
4843 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4844 type Constraint = ();
4845
4846 fn validate(
4847 _: ::fidl_next::Slot<'_, Self>,
4848 _: Self::Constraint,
4849 ) -> Result<(), ::fidl_next::ValidationError> {
4850 Ok(())
4851 }
4852 }
4853
4854 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4855 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4856
4857 #[inline]
4858 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4859 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4860 ::fidl_next::wire::Union::zero_padding(raw);
4861 }
4862 }
4863
4864 impl<'de> NodeInfoDeprecated<'de> {
4865 pub fn is_some(&self) -> bool {
4866 self.raw.is_some()
4867 }
4868
4869 pub fn is_none(&self) -> bool {
4870 self.raw.is_none()
4871 }
4872
4873 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::NodeInfoDeprecated<'de>> {
4874 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4875 }
4876
4877 pub fn into_option(self) -> ::core::option::Option<crate::wire::NodeInfoDeprecated<'de>> {
4878 if self.is_some() {
4879 Some(crate::wire::NodeInfoDeprecated {
4880 raw: self.raw,
4881 _phantom: ::core::marker::PhantomData,
4882 })
4883 } else {
4884 None
4885 }
4886 }
4887 }
4888
4889 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4890 where
4891 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4892 ___D: ::fidl_next::Decoder<'de>,
4893 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4894 {
4895 fn decode(
4896 mut slot: ::fidl_next::Slot<'_, Self>,
4897 decoder: &mut ___D,
4898 _: (),
4899 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4900 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4901 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4902 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4903 raw,
4904 decoder,
4905 (),
4906 )?,
4907
4908 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4909 raw,
4910 decoder,
4911 (),
4912 )?,
4913
4914 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4915 raw,
4916 decoder,
4917 (),
4918 )?,
4919
4920 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4921 raw,
4922 decoder,
4923 (),
4924 )?,
4925
4926 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4927 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4928 }
4929
4930 Ok(())
4931 }
4932 }
4933
4934 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4935 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4936 self.as_ref().fmt(f)
4937 }
4938 }
4939
4940 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4941 type Natural = ::core::option::Option<crate::natural::NodeInfoDeprecated>;
4942 }
4943}
4944
4945pub mod generic {
4946
4947 pub use fidl_next_common_fuchsia_io::generic::*;
4948
4949 pub struct DirectoryGetTokenResponse<T0, T1> {
4950 pub s: T0,
4951
4952 pub token: T1,
4953 }
4954
4955 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>
4956 for DirectoryGetTokenResponse<T0, T1>
4957 where
4958 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4959 ___E: ::fdomain_client::fidl_next::HandleEncoder,
4960 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
4961 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::OptionalHandle, ___E>,
4962 {
4963 #[inline]
4964 fn encode(
4965 self,
4966 encoder_: &mut ___E,
4967 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryGetTokenResponse>,
4968 _: (),
4969 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4970 ::fidl_next::munge! {
4971 let crate::wire::DirectoryGetTokenResponse {
4972
4973 s,
4974 token,
4975
4976 } = out_;
4977 }
4978
4979 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
4980
4981 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
4982
4983 Ok(())
4984 }
4985 }
4986
4987 pub struct DirectoryLinkRequest<T0, T1, T2> {
4988 pub src: T0,
4989
4990 pub dst_parent_token: T1,
4991
4992 pub dst: T2,
4993 }
4994
4995 unsafe impl<___E, T0, T1, T2>
4996 ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
4997 for DirectoryLinkRequest<T0, T1, T2>
4998 where
4999 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5000 ___E: ::fidl_next::Encoder,
5001 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5002 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5003 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5004 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5005 {
5006 #[inline]
5007 fn encode(
5008 self,
5009 encoder_: &mut ___E,
5010 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
5011 _: (),
5012 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5013 ::fidl_next::munge! {
5014 let crate::wire::DirectoryLinkRequest {
5015
5016 src,
5017 dst_parent_token,
5018 dst,
5019
5020 } = out_;
5021 }
5022
5023 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5024
5025 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5026
5027 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5028
5029 Ok(())
5030 }
5031 }
5032
5033 pub struct DirectoryRenameRequest<T0, T1, T2> {
5034 pub src: T0,
5035
5036 pub dst_parent_token: T1,
5037
5038 pub dst: T2,
5039 }
5040
5041 unsafe impl<___E, T0, T1, T2>
5042 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
5043 for DirectoryRenameRequest<T0, T1, T2>
5044 where
5045 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5046 ___E: ::fidl_next::Encoder,
5047 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5048 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5049 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5050 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5051 {
5052 #[inline]
5053 fn encode(
5054 self,
5055 encoder_: &mut ___E,
5056 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
5057 _: (),
5058 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5059 ::fidl_next::munge! {
5060 let crate::wire::DirectoryRenameRequest {
5061
5062 src,
5063 dst_parent_token,
5064 dst,
5065
5066 } = out_;
5067 }
5068
5069 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5070
5071 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5072
5073 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5074
5075 Ok(())
5076 }
5077 }
5078
5079 pub struct DirectoryWatchRequest<T0, T1, T2> {
5080 pub mask: T0,
5081
5082 pub options: T1,
5083
5084 pub watcher: T2,
5085 }
5086
5087 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
5088 for DirectoryWatchRequest<T0, T1, T2>
5089 where
5090 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5091 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5092 T0: ::fidl_next::Encode<crate::wire::WatchMask, ___E>,
5093 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5094 T2: ::fidl_next::Encode<
5095 ::fidl_next::ServerEnd<
5096 crate::DirectoryWatcher,
5097 ::fdomain_client::fidl_next::wire::Handle,
5098 >,
5099 ___E,
5100 >,
5101 {
5102 #[inline]
5103 fn encode(
5104 self,
5105 encoder_: &mut ___E,
5106 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
5107 _: (),
5108 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5109 ::fidl_next::munge! {
5110 let crate::wire::DirectoryWatchRequest {
5111
5112 mask,
5113 options,
5114 watcher,
5115
5116 } = out_;
5117 }
5118
5119 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
5120
5121 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5122
5123 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
5124
5125 Ok(())
5126 }
5127 }
5128
5129 pub struct NodeOnOpenRequest<T0, T1> {
5130 pub s: T0,
5131
5132 pub info: T1,
5133 }
5134
5135 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
5136 for NodeOnOpenRequest<T0, T1>
5137 where
5138 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5139 ___E: ::fidl_next::Encoder,
5140 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5141 T0: ::fidl_next::Encode<::fidl_next::wire::Int32, ___E>,
5142 T1: ::fidl_next::Encode<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>,
5143 {
5144 #[inline]
5145 fn encode(
5146 self,
5147 encoder_: &mut ___E,
5148 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
5149 _: (),
5150 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5151 ::fidl_next::munge! {
5152 let crate::wire::NodeOnOpenRequest {
5153
5154 s,
5155 info,
5156
5157 } = out_;
5158 }
5159
5160 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5161
5162 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
5163
5164 Ok(())
5165 }
5166 }
5167
5168 pub struct NodeListExtendedAttributesRequest<T0> {
5169 pub iterator: T0,
5170 }
5171
5172 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
5173 for NodeListExtendedAttributesRequest<T0>
5174 where
5175 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5176 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5177 T0: ::fidl_next::Encode<
5178 ::fidl_next::ServerEnd<
5179 crate::ExtendedAttributeIterator,
5180 ::fdomain_client::fidl_next::wire::Handle,
5181 >,
5182 ___E,
5183 >,
5184 {
5185 #[inline]
5186 fn encode(
5187 self,
5188 encoder_: &mut ___E,
5189 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
5190 _: (),
5191 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5192 ::fidl_next::munge! {
5193 let crate::wire::NodeListExtendedAttributesRequest {
5194
5195 iterator,
5196
5197 } = out_;
5198 }
5199
5200 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
5201
5202 Ok(())
5203 }
5204 }
5205
5206 pub struct NodeSetExtendedAttributeRequest<T0, T1, T2> {
5207 pub name: T0,
5208
5209 pub value: T1,
5210
5211 pub mode: T2,
5212 }
5213
5214 unsafe impl<___E, T0, T1, T2>
5215 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
5216 for NodeSetExtendedAttributeRequest<T0, T1, T2>
5217 where
5218 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5219 ___E: ::fidl_next::Encoder,
5220 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5221 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5222 T1: ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
5223 T2: ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>,
5224 {
5225 #[inline]
5226 fn encode(
5227 self,
5228 encoder_: &mut ___E,
5229 out_: &mut ::core::mem::MaybeUninit<
5230 crate::wire::NodeSetExtendedAttributeRequest<'static>,
5231 >,
5232 _: (),
5233 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5234 ::fidl_next::munge! {
5235 let crate::wire::NodeSetExtendedAttributeRequest {
5236
5237 name,
5238 value,
5239 mode,
5240
5241 } = out_;
5242 }
5243
5244 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
5245
5246 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
5247
5248 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5249
5250 Ok(())
5251 }
5252 }
5253
5254 pub struct DirectoryOpenRequest<T0, T1, T2, T3> {
5255 pub path: T0,
5256
5257 pub flags: T1,
5258
5259 pub options: T2,
5260
5261 pub object: T3,
5262 }
5263
5264 unsafe impl<___E, T0, T1, T2, T3>
5265 ::fidl_next::Encode<crate::wire::DirectoryOpenRequest<'static>, ___E>
5266 for DirectoryOpenRequest<T0, T1, T2, T3>
5267 where
5268 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5269 ___E: ::fidl_next::Encoder,
5270 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5271 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5272 T1: ::fidl_next::Encode<crate::wire::Flags, ___E>,
5273 T2: ::fidl_next::Encode<crate::wire::Options<'static>, ___E>,
5274 T3: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5275 {
5276 #[inline]
5277 fn encode(
5278 self,
5279 encoder_: &mut ___E,
5280 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryOpenRequest<'static>>,
5281 _: (),
5282 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5283 ::fidl_next::munge! {
5284 let crate::wire::DirectoryOpenRequest {
5285
5286 path,
5287 flags,
5288 options,
5289 object,
5290
5291 } = out_;
5292 }
5293
5294 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5295
5296 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5297
5298 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5299
5300 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5301
5302 Ok(())
5303 }
5304 }
5305
5306 pub struct NodeDeprecatedCloneRequest<T0, T1> {
5307 pub flags: T0,
5308
5309 pub object: T1,
5310 }
5311
5312 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
5313 for NodeDeprecatedCloneRequest<T0, T1>
5314 where
5315 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5316 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5317 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5318 T1: ::fidl_next::Encode<
5319 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
5320 ___E,
5321 >,
5322 {
5323 #[inline]
5324 fn encode(
5325 self,
5326 encoder_: &mut ___E,
5327 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
5328 _: (),
5329 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5330 ::fidl_next::munge! {
5331 let crate::wire::NodeDeprecatedCloneRequest {
5332
5333 flags,
5334 object,
5335
5336 } = out_;
5337 }
5338
5339 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5340
5341 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5342
5343 Ok(())
5344 }
5345 }
5346
5347 pub struct DirectoryDeprecatedOpenRequest<T0, T1, T2, T3> {
5348 pub flags: T0,
5349
5350 pub mode: T1,
5351
5352 pub path: T2,
5353
5354 pub object: T3,
5355 }
5356
5357 unsafe impl<___E, T0, T1, T2, T3>
5358 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
5359 for DirectoryDeprecatedOpenRequest<T0, T1, T2, T3>
5360 where
5361 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5362 ___E: ::fidl_next::Encoder,
5363 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5364 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5365 T1: ::fidl_next::Encode<crate::wire::ModeType, ___E>,
5366 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5367 T3: ::fidl_next::Encode<
5368 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
5369 ___E,
5370 >,
5371 {
5372 #[inline]
5373 fn encode(
5374 self,
5375 encoder_: &mut ___E,
5376 out_: &mut ::core::mem::MaybeUninit<
5377 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
5378 >,
5379 _: (),
5380 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5381 ::fidl_next::munge! {
5382 let crate::wire::DirectoryDeprecatedOpenRequest {
5383
5384 flags,
5385 mode,
5386 path,
5387 object,
5388
5389 } = out_;
5390 }
5391
5392 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5393
5394 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5395
5396 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5397
5398 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5399
5400 Ok(())
5401 }
5402 }
5403
5404 pub struct DirectoryCreateSymlinkRequest<T0, T1, T2> {
5405 pub name: T0,
5406
5407 pub target: T1,
5408
5409 pub connection: T2,
5410 }
5411
5412 unsafe impl<___E, T0, T1, T2>
5413 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
5414 for DirectoryCreateSymlinkRequest<T0, T1, T2>
5415 where
5416 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5417 ___E: ::fidl_next::Encoder,
5418 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5419 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5420 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5421 T2: ::fidl_next::Encode<
5422 ::fidl_next::ServerEnd<
5423 crate::Symlink,
5424 ::fdomain_client::fidl_next::wire::OptionalHandle,
5425 >,
5426 ___E,
5427 >,
5428 {
5429 #[inline]
5430 fn encode(
5431 self,
5432 encoder_: &mut ___E,
5433 out_: &mut ::core::mem::MaybeUninit<
5434 crate::wire::DirectoryCreateSymlinkRequest<'static>,
5435 >,
5436 _: (),
5437 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5438 ::fidl_next::munge! {
5439 let crate::wire::DirectoryCreateSymlinkRequest {
5440
5441 name,
5442 target,
5443 connection,
5444
5445 } = out_;
5446 }
5447
5448 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
5449
5450 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
5451
5452 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
5453
5454 Ok(())
5455 }
5456 }
5457
5458 pub struct FileGetBackingMemoryResponse<T0> {
5459 pub vmo: T0,
5460 }
5461
5462 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
5463 for FileGetBackingMemoryResponse<T0>
5464 where
5465 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5466 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5467 T0: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5468 {
5469 #[inline]
5470 fn encode(
5471 self,
5472 encoder_: &mut ___E,
5473 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
5474 _: (),
5475 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5476 ::fidl_next::munge! {
5477 let crate::wire::FileGetBackingMemoryResponse {
5478
5479 vmo,
5480
5481 } = out_;
5482 }
5483
5484 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
5485
5486 Ok(())
5487 }
5488 }
5489
5490 pub struct LinkableLinkIntoRequest<T0, T1> {
5491 pub dst_parent_token: T0,
5492
5493 pub dst: T1,
5494 }
5495
5496 unsafe impl<___E, T0, T1>
5497 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
5498 for LinkableLinkIntoRequest<T0, T1>
5499 where
5500 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5501 ___E: ::fidl_next::Encoder,
5502 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5503 T0: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5504 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5505 {
5506 #[inline]
5507 fn encode(
5508 self,
5509 encoder_: &mut ___E,
5510 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
5511 _: (),
5512 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5513 ::fidl_next::munge! {
5514 let crate::wire::LinkableLinkIntoRequest {
5515
5516 dst_parent_token,
5517 dst,
5518
5519 } = out_;
5520 }
5521
5522 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5523
5524 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5525
5526 Ok(())
5527 }
5528 }
5529
5530 pub struct FileAllocateRequest<T0, T1, T2> {
5531 pub offset: T0,
5532
5533 pub length: T1,
5534
5535 pub mode: T2,
5536 }
5537
5538 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
5539 for FileAllocateRequest<T0, T1, T2>
5540 where
5541 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5542 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5543 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5544 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5545 T2: ::fidl_next::Encode<crate::wire::AllocateMode, ___E>,
5546 {
5547 #[inline]
5548 fn encode(
5549 self,
5550 encoder_: &mut ___E,
5551 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
5552 _: (),
5553 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5554 ::fidl_next::munge! {
5555 let crate::wire::FileAllocateRequest {
5556
5557 offset,
5558 length,
5559 mode,
5560
5561 } = out_;
5562 }
5563
5564 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
5565
5566 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
5567
5568 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5569
5570 Ok(())
5571 }
5572 }
5573
5574 pub struct FileEnableVerityRequest<T0> {
5575 pub options: T0,
5576 }
5577
5578 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
5579 for FileEnableVerityRequest<T0>
5580 where
5581 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5582 ___E: ::fidl_next::Encoder,
5583 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5584 T0: ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>,
5585 {
5586 #[inline]
5587 fn encode(
5588 self,
5589 encoder_: &mut ___E,
5590 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
5591 _: (),
5592 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5593 ::fidl_next::munge! {
5594 let crate::wire::FileEnableVerityRequest {
5595
5596 options,
5597
5598 } = out_;
5599 }
5600
5601 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5602
5603 Ok(())
5604 }
5605 }
5606
5607 pub struct FileObject<T0, T1> {
5608 pub event: T0,
5609
5610 pub stream: T1,
5611 }
5612
5613 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject<T0, T1>
5614 where
5615 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5616 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5617 T0: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::OptionalHandle, ___E>,
5618 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::OptionalHandle, ___E>,
5619 {
5620 #[inline]
5621 fn encode(
5622 self,
5623 encoder_: &mut ___E,
5624 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
5625 _: (),
5626 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5627 ::fidl_next::munge! {
5628 let crate::wire::FileObject {
5629
5630 event,
5631 stream,
5632
5633 } = out_;
5634 }
5635
5636 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
5637
5638 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
5639
5640 Ok(())
5641 }
5642 }
5643}
5644
5645pub use self::natural::*;
5646
5647#[doc = " Node defines the minimal interface for entities which can be accessed in a filesystem.\n"]
5649#[derive(PartialEq, Debug)]
5650pub struct Node;
5651
5652impl ::fidl_next::Discoverable for Node {
5653 const PROTOCOL_NAME: &'static str = "fuchsia.io.Node";
5654}
5655
5656#[cfg(target_os = "fuchsia")]
5657impl ::fidl_next::HasTransport for Node {
5658 type Transport = ::fdomain_client::Channel;
5659}
5660
5661pub mod node {
5662 pub mod prelude {
5663 pub use crate::{Node, NodeClientHandler, NodeServerHandler, node};
5664
5665 pub use crate::natural::ExtendedAttributeValue;
5666
5667 pub use crate::natural::MutableNodeAttributes;
5668
5669 pub use crate::natural::NodeAttributes2;
5670
5671 pub use crate::natural::NodeDeprecatedCloneRequest;
5672
5673 pub use crate::natural::NodeDeprecatedGetAttrResponse;
5674
5675 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
5676
5677 pub use crate::natural::NodeDeprecatedSetAttrRequest;
5678
5679 pub use crate::natural::NodeDeprecatedSetAttrResponse;
5680
5681 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
5682
5683 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
5684
5685 pub use crate::natural::NodeGetAttributesRequest;
5686
5687 pub use crate::natural::NodeGetExtendedAttributeRequest;
5688
5689 pub use crate::natural::NodeListExtendedAttributesRequest;
5690
5691 pub use crate::natural::NodeOnOpenRequest;
5692
5693 pub use crate::natural::NodeQueryFilesystemResponse;
5694
5695 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
5696
5697 pub use crate::natural::NodeSetExtendedAttributeRequest;
5698
5699 pub use crate::natural::NodeSetFlagsRequest;
5700
5701 pub use crate::natural::NodeGetFlagsResponse;
5702
5703 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
5704
5705 pub use crate::natural::NodeSetExtendedAttributeResponse;
5706
5707 pub use crate::natural::NodeSetFlagsResponse;
5708
5709 pub use crate::natural::NodeSyncResponse;
5710
5711 pub use crate::natural::NodeUpdateAttributesResponse;
5712
5713 pub use crate::natural::Representation;
5714
5715 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
5716
5717 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
5718
5719 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
5720 }
5721
5722 pub struct Clone;
5723
5724 impl ::fidl_next::Method for Clone {
5725 const ORDINAL: u64 = 2366825959783828089;
5726 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5727 ::fidl_next::protocol::Flexibility::Strict;
5728
5729 type Protocol = crate::Node;
5730
5731 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
5732 }
5733
5734 pub struct Close;
5735
5736 impl ::fidl_next::Method for Close {
5737 const ORDINAL: u64 = 6540867515453498750;
5738 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5739 ::fidl_next::protocol::Flexibility::Strict;
5740
5741 type Protocol = crate::Node;
5742
5743 type Request = ();
5744 }
5745
5746 impl ::fidl_next::TwoWayMethod for Close {
5747 type Response = ::fidl_next::wire::Result<
5748 'static,
5749 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
5750 ::fidl_next::wire::Int32,
5751 >;
5752 }
5753
5754 impl<___R> ::fidl_next::Respond<___R> for Close {
5755 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
5756
5757 fn respond(response: ___R) -> Self::Output {
5758 ::core::result::Result::Ok(response)
5759 }
5760 }
5761
5762 impl<___R> ::fidl_next::RespondErr<___R> for Close {
5763 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
5764
5765 fn respond_err(response: ___R) -> Self::Output {
5766 ::core::result::Result::Err(response)
5767 }
5768 }
5769
5770 pub struct Query;
5771
5772 impl ::fidl_next::Method for Query {
5773 const ORDINAL: u64 = 2763219980499352582;
5774 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5775 ::fidl_next::protocol::Flexibility::Strict;
5776
5777 type Protocol = crate::Node;
5778
5779 type Request = ();
5780 }
5781
5782 impl ::fidl_next::TwoWayMethod for Query {
5783 type Response = ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
5784 }
5785
5786 impl<___R> ::fidl_next::Respond<___R> for Query {
5787 type Output = ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
5788
5789 fn respond(response: ___R) -> Self::Output {
5790 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
5791 }
5792 }
5793
5794 pub struct DeprecatedClone;
5795
5796 impl ::fidl_next::Method for DeprecatedClone {
5797 const ORDINAL: u64 = 6512600400724287855;
5798 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5799 ::fidl_next::protocol::Flexibility::Flexible;
5800
5801 type Protocol = crate::Node;
5802
5803 type Request = crate::wire::NodeDeprecatedCloneRequest;
5804 }
5805
5806 pub struct OnOpen;
5807
5808 impl ::fidl_next::Method for OnOpen {
5809 const ORDINAL: u64 = 9207534335756671346;
5810 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5811 ::fidl_next::protocol::Flexibility::Flexible;
5812
5813 type Protocol = crate::Node;
5814
5815 type Request = crate::wire::NodeOnOpenRequest<'static>;
5816 }
5817
5818 pub struct DeprecatedGetAttr;
5819
5820 impl ::fidl_next::Method for DeprecatedGetAttr {
5821 const ORDINAL: u64 = 8689798978500614909;
5822 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5823 ::fidl_next::protocol::Flexibility::Strict;
5824
5825 type Protocol = crate::Node;
5826
5827 type Request = ();
5828 }
5829
5830 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
5831 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
5832 }
5833
5834 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
5835 type Output = ___R;
5836
5837 fn respond(response: ___R) -> Self::Output {
5838 response
5839 }
5840 }
5841
5842 pub struct DeprecatedSetAttr;
5843
5844 impl ::fidl_next::Method for DeprecatedSetAttr {
5845 const ORDINAL: u64 = 4721673413776871238;
5846 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5847 ::fidl_next::protocol::Flexibility::Strict;
5848
5849 type Protocol = crate::Node;
5850
5851 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
5852 }
5853
5854 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
5855 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
5856 }
5857
5858 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
5859 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
5860
5861 fn respond(response: ___R) -> Self::Output {
5862 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
5863 }
5864 }
5865
5866 pub struct DeprecatedGetFlags;
5867
5868 impl ::fidl_next::Method for DeprecatedGetFlags {
5869 const ORDINAL: u64 = 6595803110182632097;
5870 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5871 ::fidl_next::protocol::Flexibility::Strict;
5872
5873 type Protocol = crate::Node;
5874
5875 type Request = ();
5876 }
5877
5878 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
5879 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
5880 }
5881
5882 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
5883 type Output = ___R;
5884
5885 fn respond(response: ___R) -> Self::Output {
5886 response
5887 }
5888 }
5889
5890 pub struct DeprecatedSetFlags;
5891
5892 impl ::fidl_next::Method for DeprecatedSetFlags {
5893 const ORDINAL: u64 = 5950864159036794675;
5894 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5895 ::fidl_next::protocol::Flexibility::Strict;
5896
5897 type Protocol = crate::Node;
5898
5899 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
5900 }
5901
5902 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
5903 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
5904 }
5905
5906 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
5907 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
5908
5909 fn respond(response: ___R) -> Self::Output {
5910 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
5911 }
5912 }
5913
5914 pub struct GetFlags;
5915
5916 impl ::fidl_next::Method for GetFlags {
5917 const ORDINAL: u64 = 105530239381466147;
5918 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5919 ::fidl_next::protocol::Flexibility::Flexible;
5920
5921 type Protocol = crate::Node;
5922
5923 type Request = ();
5924 }
5925
5926 impl ::fidl_next::TwoWayMethod for GetFlags {
5927 type Response = ::fidl_next::wire::FlexibleResult<
5928 'static,
5929 crate::wire::NodeGetFlagsResponse,
5930 ::fidl_next::wire::Int32,
5931 >;
5932 }
5933
5934 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
5935 type Output = ::fidl_next::FlexibleResult<
5936 crate::generic::NodeGetFlagsResponse<___R>,
5937 ::fidl_next::util::Never,
5938 >;
5939
5940 fn respond(response: ___R) -> Self::Output {
5941 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
5942 flags: response,
5943 })
5944 }
5945 }
5946
5947 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
5948 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
5949
5950 fn respond_err(response: ___R) -> Self::Output {
5951 ::fidl_next::FlexibleResult::Err(response)
5952 }
5953 }
5954
5955 pub struct SetFlags;
5956
5957 impl ::fidl_next::Method for SetFlags {
5958 const ORDINAL: u64 = 6172186066099445416;
5959 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5960 ::fidl_next::protocol::Flexibility::Flexible;
5961
5962 type Protocol = crate::Node;
5963
5964 type Request = crate::wire::NodeSetFlagsRequest;
5965 }
5966
5967 impl ::fidl_next::TwoWayMethod for SetFlags {
5968 type Response = ::fidl_next::wire::FlexibleResult<
5969 'static,
5970 crate::wire::NodeSetFlagsResponse,
5971 ::fidl_next::wire::Int32,
5972 >;
5973 }
5974
5975 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
5976 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
5977
5978 fn respond(response: ___R) -> Self::Output {
5979 ::fidl_next::FlexibleResult::Ok(response)
5980 }
5981 }
5982
5983 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
5984 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
5985
5986 fn respond_err(response: ___R) -> Self::Output {
5987 ::fidl_next::FlexibleResult::Err(response)
5988 }
5989 }
5990
5991 pub struct QueryFilesystem;
5992
5993 impl ::fidl_next::Method for QueryFilesystem {
5994 const ORDINAL: u64 = 8013111122914313744;
5995 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5996 ::fidl_next::protocol::Flexibility::Strict;
5997
5998 type Protocol = crate::Node;
5999
6000 type Request = ();
6001 }
6002
6003 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
6004 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
6005 }
6006
6007 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
6008 type Output = ___R;
6009
6010 fn respond(response: ___R) -> Self::Output {
6011 response
6012 }
6013 }
6014
6015 pub struct OnRepresentation;
6016
6017 impl ::fidl_next::Method for OnRepresentation {
6018 const ORDINAL: u64 = 6679970090861613324;
6019 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6020 ::fidl_next::protocol::Flexibility::Strict;
6021
6022 type Protocol = crate::Node;
6023
6024 type Request = crate::wire::Representation<'static>;
6025 }
6026
6027 pub struct GetAttributes;
6028
6029 impl ::fidl_next::Method for GetAttributes {
6030 const ORDINAL: u64 = 4414537700416816443;
6031 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6032 ::fidl_next::protocol::Flexibility::Strict;
6033
6034 type Protocol = crate::Node;
6035
6036 type Request = crate::wire::NodeGetAttributesRequest;
6037 }
6038
6039 impl ::fidl_next::TwoWayMethod for GetAttributes {
6040 type Response = ::fidl_next::wire::Result<
6041 'static,
6042 crate::wire::NodeAttributes2<'static>,
6043 ::fidl_next::wire::Int32,
6044 >;
6045 }
6046
6047 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
6048 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6049
6050 fn respond(response: ___R) -> Self::Output {
6051 ::core::result::Result::Ok(response)
6052 }
6053 }
6054
6055 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
6056 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6057
6058 fn respond_err(response: ___R) -> Self::Output {
6059 ::core::result::Result::Err(response)
6060 }
6061 }
6062
6063 pub struct UpdateAttributes;
6064
6065 impl ::fidl_next::Method for UpdateAttributes {
6066 const ORDINAL: u64 = 3677402239314018056;
6067 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6068 ::fidl_next::protocol::Flexibility::Strict;
6069
6070 type Protocol = crate::Node;
6071
6072 type Request = crate::wire::MutableNodeAttributes<'static>;
6073 }
6074
6075 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
6076 type Response = ::fidl_next::wire::Result<
6077 'static,
6078 crate::wire::NodeUpdateAttributesResponse,
6079 ::fidl_next::wire::Int32,
6080 >;
6081 }
6082
6083 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
6084 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6085
6086 fn respond(response: ___R) -> Self::Output {
6087 ::core::result::Result::Ok(response)
6088 }
6089 }
6090
6091 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
6092 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6093
6094 fn respond_err(response: ___R) -> Self::Output {
6095 ::core::result::Result::Err(response)
6096 }
6097 }
6098
6099 pub struct Sync;
6100
6101 impl ::fidl_next::Method for Sync {
6102 const ORDINAL: u64 = 3196473584242777161;
6103 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6104 ::fidl_next::protocol::Flexibility::Strict;
6105
6106 type Protocol = crate::Node;
6107
6108 type Request = ();
6109 }
6110
6111 impl ::fidl_next::TwoWayMethod for Sync {
6112 type Response = ::fidl_next::wire::Result<
6113 'static,
6114 crate::wire::NodeSyncResponse,
6115 ::fidl_next::wire::Int32,
6116 >;
6117 }
6118
6119 impl<___R> ::fidl_next::Respond<___R> for Sync {
6120 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6121
6122 fn respond(response: ___R) -> Self::Output {
6123 ::core::result::Result::Ok(response)
6124 }
6125 }
6126
6127 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
6128 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6129
6130 fn respond_err(response: ___R) -> Self::Output {
6131 ::core::result::Result::Err(response)
6132 }
6133 }
6134
6135 pub struct ListExtendedAttributes;
6136
6137 impl ::fidl_next::Method for ListExtendedAttributes {
6138 const ORDINAL: u64 = 5431626189872037072;
6139 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6140 ::fidl_next::protocol::Flexibility::Strict;
6141
6142 type Protocol = crate::Node;
6143
6144 type Request = crate::wire::NodeListExtendedAttributesRequest;
6145 }
6146
6147 pub struct GetExtendedAttribute;
6148
6149 impl ::fidl_next::Method for GetExtendedAttribute {
6150 const ORDINAL: u64 = 5043930208506967771;
6151 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6152 ::fidl_next::protocol::Flexibility::Strict;
6153
6154 type Protocol = crate::Node;
6155
6156 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
6157 }
6158
6159 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
6160 type Response = ::fidl_next::wire::Result<
6161 'static,
6162 crate::wire::ExtendedAttributeValue<'static>,
6163 ::fidl_next::wire::Int32,
6164 >;
6165 }
6166
6167 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
6168 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6169
6170 fn respond(response: ___R) -> Self::Output {
6171 ::core::result::Result::Ok(response)
6172 }
6173 }
6174
6175 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
6176 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6177
6178 fn respond_err(response: ___R) -> Self::Output {
6179 ::core::result::Result::Err(response)
6180 }
6181 }
6182
6183 pub struct SetExtendedAttribute;
6184
6185 impl ::fidl_next::Method for SetExtendedAttribute {
6186 const ORDINAL: u64 = 5374223046099989052;
6187 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6188 ::fidl_next::protocol::Flexibility::Strict;
6189
6190 type Protocol = crate::Node;
6191
6192 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
6193 }
6194
6195 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
6196 type Response = ::fidl_next::wire::Result<
6197 'static,
6198 crate::wire::NodeSetExtendedAttributeResponse,
6199 ::fidl_next::wire::Int32,
6200 >;
6201 }
6202
6203 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
6204 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6205
6206 fn respond(response: ___R) -> Self::Output {
6207 ::core::result::Result::Ok(response)
6208 }
6209 }
6210
6211 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
6212 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6213
6214 fn respond_err(response: ___R) -> Self::Output {
6215 ::core::result::Result::Err(response)
6216 }
6217 }
6218
6219 pub struct RemoveExtendedAttribute;
6220
6221 impl ::fidl_next::Method for RemoveExtendedAttribute {
6222 const ORDINAL: u64 = 8794297771444732717;
6223 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6224 ::fidl_next::protocol::Flexibility::Strict;
6225
6226 type Protocol = crate::Node;
6227
6228 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
6229 }
6230
6231 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
6232 type Response = ::fidl_next::wire::Result<
6233 'static,
6234 crate::wire::NodeRemoveExtendedAttributeResponse,
6235 ::fidl_next::wire::Int32,
6236 >;
6237 }
6238
6239 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
6240 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
6241
6242 fn respond(response: ___R) -> Self::Output {
6243 ::core::result::Result::Ok(response)
6244 }
6245 }
6246
6247 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
6248 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
6249
6250 fn respond_err(response: ___R) -> Self::Output {
6251 ::core::result::Result::Err(response)
6252 }
6253 }
6254
6255 mod ___detail {
6256 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
6257 where
6258 ___T: ::fidl_next::Transport,
6259 {
6260 type Client = NodeClient<___T>;
6261 type Server = NodeServer<___T>;
6262 }
6263
6264 #[repr(transparent)]
6266 pub struct NodeClient<___T: ::fidl_next::Transport> {
6267 #[allow(dead_code)]
6268 client: ::fidl_next::protocol::Client<___T>,
6269 }
6270
6271 impl<___T> NodeClient<___T>
6272 where
6273 ___T: ::fidl_next::Transport,
6274 {
6275 pub fn clone(
6276 &self,
6277
6278 request: impl ::fidl_next::Encode<
6279 ::fidl_next::ServerEnd<
6280 ::fdomain_next_fuchsia_unknown::Cloneable,
6281 ::fdomain_client::fidl_next::wire::Handle,
6282 >,
6283 <___T as ::fidl_next::Transport>::SendBuffer,
6284 >,
6285 ) -> ::fidl_next::SendFuture<'_, ___T>
6286 where
6287 <___T as ::fidl_next::Transport>::SendBuffer:
6288 ::fidl_next::encoder::InternalHandleEncoder,
6289 <___T as ::fidl_next::Transport>::SendBuffer:
6290 ::fdomain_client::fidl_next::HandleEncoder,
6291 {
6292 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
6293 request,
6294 })
6295 }
6296
6297 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6298 where
6299 ___R: ::fidl_next::Encode<
6300 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
6301 <___T as ::fidl_next::Transport>::SendBuffer,
6302 >,
6303 {
6304 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6305 2366825959783828089,
6306 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
6307 request,
6308 ))
6309 }
6310
6311 #[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"]
6312 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
6313 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6314 6540867515453498750,
6315 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
6316 (),
6317 ))
6318 }
6319
6320 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
6321 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6322 2763219980499352582,
6323 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
6324 (),
6325 ))
6326 }
6327
6328 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6329 pub fn deprecated_clone(
6330 &self,
6331
6332 flags: impl ::fidl_next::Encode<
6333 crate::wire::OpenFlags,
6334 <___T as ::fidl_next::Transport>::SendBuffer,
6335 >,
6336
6337 object: impl ::fidl_next::Encode<
6338 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
6339 <___T as ::fidl_next::Transport>::SendBuffer,
6340 >,
6341 ) -> ::fidl_next::SendFuture<'_, ___T>
6342 where
6343 <___T as ::fidl_next::Transport>::SendBuffer:
6344 ::fidl_next::encoder::InternalHandleEncoder,
6345 <___T as ::fidl_next::Transport>::SendBuffer:
6346 ::fdomain_client::fidl_next::HandleEncoder,
6347 {
6348 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
6349 flags,
6350
6351 object,
6352 })
6353 }
6354
6355 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6356 pub fn deprecated_clone_with<___R>(
6357 &self,
6358 request: ___R,
6359 ) -> ::fidl_next::SendFuture<'_, ___T>
6360 where
6361 ___R: ::fidl_next::Encode<
6362 crate::wire::NodeDeprecatedCloneRequest,
6363 <___T as ::fidl_next::Transport>::SendBuffer,
6364 >,
6365 {
6366 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6367 6512600400724287855,
6368 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
6369 request,
6370 ))
6371 }
6372
6373 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6374 pub fn deprecated_get_attr(
6375 &self,
6376 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
6377 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6378 8689798978500614909,
6379 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
6380 (),
6381 ))
6382 }
6383
6384 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6385 pub fn deprecated_set_attr(
6386 &self,
6387
6388 flags: impl ::fidl_next::Encode<
6389 crate::wire::NodeAttributeFlags,
6390 <___T as ::fidl_next::Transport>::SendBuffer,
6391 >,
6392
6393 attributes: impl ::fidl_next::Encode<
6394 crate::wire::NodeAttributes,
6395 <___T as ::fidl_next::Transport>::SendBuffer,
6396 >,
6397 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6398 where
6399 <___T as ::fidl_next::Transport>::SendBuffer:
6400 ::fidl_next::encoder::InternalHandleEncoder,
6401 {
6402 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
6403 flags,
6404
6405 attributes,
6406 })
6407 }
6408
6409 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6410 pub fn deprecated_set_attr_with<___R>(
6411 &self,
6412 request: ___R,
6413 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6414 where
6415 ___R: ::fidl_next::Encode<
6416 crate::wire::NodeDeprecatedSetAttrRequest,
6417 <___T as ::fidl_next::Transport>::SendBuffer,
6418 >,
6419 {
6420 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6421 4721673413776871238,
6422 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
6423 request,
6424 ))
6425 }
6426
6427 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6428 pub fn deprecated_get_flags(
6429 &self,
6430 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
6431 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6432 6595803110182632097,
6433 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
6434 (),
6435 ))
6436 }
6437
6438 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6439 pub fn deprecated_set_flags(
6440 &self,
6441
6442 flags: impl ::fidl_next::Encode<
6443 crate::wire::OpenFlags,
6444 <___T as ::fidl_next::Transport>::SendBuffer,
6445 >,
6446 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6447 where
6448 <___T as ::fidl_next::Transport>::SendBuffer:
6449 ::fidl_next::encoder::InternalHandleEncoder,
6450 {
6451 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
6452 flags,
6453 })
6454 }
6455
6456 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6457 pub fn deprecated_set_flags_with<___R>(
6458 &self,
6459 request: ___R,
6460 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6461 where
6462 ___R: ::fidl_next::Encode<
6463 crate::wire::NodeDeprecatedSetFlagsRequest,
6464 <___T as ::fidl_next::Transport>::SendBuffer,
6465 >,
6466 {
6467 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6468 5950864159036794675,
6469 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
6470 request,
6471 ))
6472 }
6473
6474 #[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"]
6475 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
6476 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6477 105530239381466147,
6478 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
6479 (),
6480 ))
6481 }
6482
6483 #[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"]
6484 pub fn set_flags(
6485 &self,
6486
6487 flags: impl ::fidl_next::Encode<
6488 crate::wire::Flags,
6489 <___T as ::fidl_next::Transport>::SendBuffer,
6490 >,
6491 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6492 where
6493 <___T as ::fidl_next::Transport>::SendBuffer:
6494 ::fidl_next::encoder::InternalHandleEncoder,
6495 {
6496 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
6497 }
6498
6499 #[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"]
6500 pub fn set_flags_with<___R>(
6501 &self,
6502 request: ___R,
6503 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
6504 where
6505 ___R: ::fidl_next::Encode<
6506 crate::wire::NodeSetFlagsRequest,
6507 <___T as ::fidl_next::Transport>::SendBuffer,
6508 >,
6509 {
6510 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6511 6172186066099445416,
6512 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
6513 request,
6514 ))
6515 }
6516
6517 #[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"]
6518 pub fn query_filesystem(
6519 &self,
6520 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
6521 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6522 8013111122914313744,
6523 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
6524 (),
6525 ))
6526 }
6527
6528 #[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"]
6529 pub fn get_attributes(
6530 &self,
6531
6532 query: impl ::fidl_next::Encode<
6533 crate::wire::NodeAttributesQuery,
6534 <___T as ::fidl_next::Transport>::SendBuffer,
6535 >,
6536 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6537 where
6538 <___T as ::fidl_next::Transport>::SendBuffer:
6539 ::fidl_next::encoder::InternalHandleEncoder,
6540 {
6541 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
6542 }
6543
6544 #[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"]
6545 pub fn get_attributes_with<___R>(
6546 &self,
6547 request: ___R,
6548 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
6549 where
6550 ___R: ::fidl_next::Encode<
6551 crate::wire::NodeGetAttributesRequest,
6552 <___T as ::fidl_next::Transport>::SendBuffer,
6553 >,
6554 {
6555 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6556 4414537700416816443,
6557 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
6558 request,
6559 ))
6560 }
6561
6562 #[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"]
6563 pub fn update_attributes_with<___R>(
6564 &self,
6565 request: ___R,
6566 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
6567 where
6568 ___R: ::fidl_next::Encode<
6569 crate::wire::MutableNodeAttributes<'static>,
6570 <___T as ::fidl_next::Transport>::SendBuffer,
6571 >,
6572 {
6573 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6574 3677402239314018056,
6575 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
6576 request,
6577 ))
6578 }
6579
6580 #[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"]
6581 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
6582 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6583 3196473584242777161,
6584 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
6585 (),
6586 ))
6587 }
6588
6589 #[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"]
6590 pub fn list_extended_attributes(
6591 &self,
6592
6593 iterator: impl ::fidl_next::Encode<
6594 ::fidl_next::ServerEnd<
6595 crate::ExtendedAttributeIterator,
6596 ::fdomain_client::fidl_next::wire::Handle,
6597 >,
6598 <___T as ::fidl_next::Transport>::SendBuffer,
6599 >,
6600 ) -> ::fidl_next::SendFuture<'_, ___T>
6601 where
6602 <___T as ::fidl_next::Transport>::SendBuffer:
6603 ::fidl_next::encoder::InternalHandleEncoder,
6604 <___T as ::fidl_next::Transport>::SendBuffer:
6605 ::fdomain_client::fidl_next::HandleEncoder,
6606 {
6607 self.list_extended_attributes_with(
6608 crate::generic::NodeListExtendedAttributesRequest { iterator },
6609 )
6610 }
6611
6612 #[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"]
6613 pub fn list_extended_attributes_with<___R>(
6614 &self,
6615 request: ___R,
6616 ) -> ::fidl_next::SendFuture<'_, ___T>
6617 where
6618 ___R: ::fidl_next::Encode<
6619 crate::wire::NodeListExtendedAttributesRequest,
6620 <___T as ::fidl_next::Transport>::SendBuffer,
6621 >,
6622 {
6623 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6624 5431626189872037072,
6625 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
6626 request,
6627 ))
6628 }
6629
6630 #[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"]
6631 pub fn get_extended_attribute(
6632 &self,
6633
6634 name: impl ::fidl_next::Encode<
6635 ::fidl_next::wire::Vector<'static, u8>,
6636 <___T as ::fidl_next::Transport>::SendBuffer,
6637 >,
6638 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
6639 where
6640 <___T as ::fidl_next::Transport>::SendBuffer:
6641 ::fidl_next::encoder::InternalHandleEncoder,
6642 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6643 {
6644 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
6645 name,
6646 })
6647 }
6648
6649 #[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"]
6650 pub fn get_extended_attribute_with<___R>(
6651 &self,
6652 request: ___R,
6653 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
6654 where
6655 ___R: ::fidl_next::Encode<
6656 crate::wire::NodeGetExtendedAttributeRequest<'static>,
6657 <___T as ::fidl_next::Transport>::SendBuffer,
6658 >,
6659 {
6660 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6661 5043930208506967771,
6662 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6663 request,
6664 ))
6665 }
6666
6667 #[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"]
6668 pub fn set_extended_attribute(
6669 &self,
6670
6671 name: impl ::fidl_next::Encode<
6672 ::fidl_next::wire::Vector<'static, u8>,
6673 <___T as ::fidl_next::Transport>::SendBuffer,
6674 >,
6675
6676 value: impl ::fidl_next::Encode<
6677 crate::wire::ExtendedAttributeValue<'static>,
6678 <___T as ::fidl_next::Transport>::SendBuffer,
6679 >,
6680
6681 mode: impl ::fidl_next::Encode<
6682 crate::wire::SetExtendedAttributeMode,
6683 <___T as ::fidl_next::Transport>::SendBuffer,
6684 >,
6685 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
6686 where
6687 <___T as ::fidl_next::Transport>::SendBuffer:
6688 ::fidl_next::encoder::InternalHandleEncoder,
6689 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6690 <___T as ::fidl_next::Transport>::SendBuffer:
6691 ::fdomain_client::fidl_next::HandleEncoder,
6692 {
6693 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
6694 name,
6695
6696 value,
6697
6698 mode,
6699 })
6700 }
6701
6702 #[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"]
6703 pub fn set_extended_attribute_with<___R>(
6704 &self,
6705 request: ___R,
6706 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
6707 where
6708 ___R: ::fidl_next::Encode<
6709 crate::wire::NodeSetExtendedAttributeRequest<'static>,
6710 <___T as ::fidl_next::Transport>::SendBuffer,
6711 >,
6712 {
6713 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6714 5374223046099989052,
6715 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6716 request,
6717 ))
6718 }
6719
6720 #[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"]
6721 pub fn remove_extended_attribute(
6722 &self,
6723
6724 name: impl ::fidl_next::Encode<
6725 ::fidl_next::wire::Vector<'static, u8>,
6726 <___T as ::fidl_next::Transport>::SendBuffer,
6727 >,
6728 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
6729 where
6730 <___T as ::fidl_next::Transport>::SendBuffer:
6731 ::fidl_next::encoder::InternalHandleEncoder,
6732 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6733 {
6734 self.remove_extended_attribute_with(
6735 crate::generic::NodeRemoveExtendedAttributeRequest { name },
6736 )
6737 }
6738
6739 #[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"]
6740 pub fn remove_extended_attribute_with<___R>(
6741 &self,
6742 request: ___R,
6743 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
6744 where
6745 ___R: ::fidl_next::Encode<
6746 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
6747 <___T as ::fidl_next::Transport>::SendBuffer,
6748 >,
6749 {
6750 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6751 8794297771444732717,
6752 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
6753 request,
6754 ))
6755 }
6756 }
6757
6758 #[repr(transparent)]
6760 pub struct NodeServer<___T: ::fidl_next::Transport> {
6761 server: ::fidl_next::protocol::Server<___T>,
6762 }
6763
6764 impl<___T> NodeServer<___T>
6765 where
6766 ___T: ::fidl_next::Transport,
6767 {
6768 #[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"]
6769 pub fn on_open(
6770 &self,
6771
6772 s: impl ::fidl_next::Encode<
6773 ::fidl_next::wire::Int32,
6774 <___T as ::fidl_next::Transport>::SendBuffer,
6775 >,
6776
6777 info: impl ::fidl_next::Encode<
6778 crate::wire_optional::NodeInfoDeprecated<'static>,
6779 <___T as ::fidl_next::Transport>::SendBuffer,
6780 >,
6781 ) -> ::fidl_next::SendFuture<'_, ___T>
6782 where
6783 <___T as ::fidl_next::Transport>::SendBuffer:
6784 ::fidl_next::encoder::InternalHandleEncoder,
6785 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6786 <___T as ::fidl_next::Transport>::SendBuffer:
6787 ::fdomain_client::fidl_next::HandleEncoder,
6788 {
6789 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
6790 }
6791
6792 #[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"]
6793
6794 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6795 where
6796 ___R: ::fidl_next::Encode<
6797 <super::OnOpen as ::fidl_next::Method>::Request,
6798 <___T as ::fidl_next::Transport>::SendBuffer,
6799 >,
6800 {
6801 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6802 9207534335756671346,
6803 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
6804 request,
6805 ))
6806 }
6807
6808 #[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"]
6809
6810 pub fn on_representation_with<___R>(
6811 &self,
6812 request: ___R,
6813 ) -> ::fidl_next::SendFuture<'_, ___T>
6814 where
6815 ___R: ::fidl_next::Encode<
6816 <super::OnRepresentation as ::fidl_next::Method>::Request,
6817 <___T as ::fidl_next::Transport>::SendBuffer,
6818 >,
6819 {
6820 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6821 6679970090861613324,
6822 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
6823 request,
6824 ))
6825 }
6826 }
6827 }
6828}
6829
6830pub trait NodeClientHandler<
6834 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
6835 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6836>
6837{
6838 #[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"]
6839 fn on_open(
6840 &mut self,
6841
6842 request: ::fidl_next::Request<node::OnOpen, ___T>,
6843 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6844
6845 #[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"]
6846 fn on_representation(
6847 &mut self,
6848
6849 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
6850 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6851
6852 fn on_unknown_interaction(
6853 &mut self,
6854 ordinal: u64,
6855 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6856 ::core::future::ready(())
6857 }
6858}
6859
6860impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
6861where
6862 ___T: ::fidl_next::Transport,
6863{
6864 async fn on_open(&mut self, _: ::fidl_next::Request<node::OnOpen, ___T>) {}
6865
6866 async fn on_representation(&mut self, _: ::fidl_next::Request<node::OnRepresentation, ___T>) {}
6867
6868 async fn on_unknown_interaction(&mut self, _: u64) {}
6869}
6870
6871impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
6872where
6873 ___H: NodeClientHandler<___T> + ::core::marker::Send,
6874 ___T: ::fidl_next::Transport,
6875 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
6876 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6877 Constraint = (),
6878 >,
6879 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
6880 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6881 Constraint = (),
6882 >,
6883{
6884 async fn on_event(
6885 handler: &mut ___H,
6886 ordinal: u64,
6887 flexibility: ::fidl_next::protocol::Flexibility,
6888 body: ::fidl_next::Body<___T>,
6889 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6890 match ordinal {
6891 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
6892 Ok(decoded) => {
6893 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
6894 Ok(())
6895 }
6896 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6897 ordinal: 9207534335756671346,
6898 error,
6899 }),
6900 },
6901
6902 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
6903 Ok(decoded) => {
6904 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
6905 Ok(())
6906 }
6907 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6908 ordinal: 6679970090861613324,
6909 error,
6910 }),
6911 },
6912
6913 ordinal => {
6914 handler.on_unknown_interaction(ordinal).await;
6915 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
6916 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6917 } else {
6918 Ok(())
6919 }
6920 }
6921 }
6922 }
6923}
6924
6925pub trait NodeServerHandler<
6929 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
6930 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6931>
6932{
6933 fn clone(
6934 &mut self,
6935
6936 request: ::fidl_next::Request<node::Clone, ___T>,
6937 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6938
6939 #[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"]
6940 fn close(
6941 &mut self,
6942
6943 responder: ::fidl_next::Responder<node::Close, ___T>,
6944 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6945
6946 fn query(
6947 &mut self,
6948
6949 responder: ::fidl_next::Responder<node::Query, ___T>,
6950 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6951
6952 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6953 fn deprecated_clone(
6954 &mut self,
6955
6956 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
6957 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6958
6959 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6960 fn deprecated_get_attr(
6961 &mut self,
6962
6963 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
6964 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6965
6966 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6967 fn deprecated_set_attr(
6968 &mut self,
6969
6970 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
6971
6972 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
6973 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6974
6975 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6976 fn deprecated_get_flags(
6977 &mut self,
6978
6979 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
6980 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6981
6982 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6983 fn deprecated_set_flags(
6984 &mut self,
6985
6986 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
6987
6988 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
6989 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6990
6991 #[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"]
6992 fn get_flags(
6993 &mut self,
6994
6995 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
6996 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6997
6998 #[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"]
6999 fn set_flags(
7000 &mut self,
7001
7002 request: ::fidl_next::Request<node::SetFlags, ___T>,
7003
7004 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
7005 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7006
7007 #[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"]
7008 fn query_filesystem(
7009 &mut self,
7010
7011 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
7012 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7013
7014 #[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"]
7015 fn get_attributes(
7016 &mut self,
7017
7018 request: ::fidl_next::Request<node::GetAttributes, ___T>,
7019
7020 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
7021 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7022
7023 #[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"]
7024 fn update_attributes(
7025 &mut self,
7026
7027 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
7028
7029 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
7030 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7031
7032 #[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"]
7033 fn sync(
7034 &mut self,
7035
7036 responder: ::fidl_next::Responder<node::Sync, ___T>,
7037 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7038
7039 #[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"]
7040 fn list_extended_attributes(
7041 &mut self,
7042
7043 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
7044 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7045
7046 #[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"]
7047 fn get_extended_attribute(
7048 &mut self,
7049
7050 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
7051
7052 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
7053 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7054
7055 #[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"]
7056 fn set_extended_attribute(
7057 &mut self,
7058
7059 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
7060
7061 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
7062 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7063
7064 #[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"]
7065 fn remove_extended_attribute(
7066 &mut self,
7067
7068 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
7069
7070 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
7071 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7072
7073 fn on_unknown_interaction(
7074 &mut self,
7075 ordinal: u64,
7076 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7077 ::core::future::ready(())
7078 }
7079}
7080
7081impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
7082where
7083 ___H: NodeServerHandler<___T> + ::core::marker::Send,
7084 ___T: ::fidl_next::Transport,
7085 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
7086 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7087 Constraint = (),
7088 >,
7089 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
7090 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7091 Constraint = (),
7092 >,
7093 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
7094 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7095 Constraint = (),
7096 >,
7097 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
7098 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7099 Constraint = (),
7100 >,
7101 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
7102 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7103 Constraint = (),
7104 >,
7105 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
7106 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7107 Constraint = (),
7108 >,
7109 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
7110 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7111 Constraint = (),
7112 >,
7113 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
7114 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7115 Constraint = (),
7116 >,
7117 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7118 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7119 Constraint = (),
7120 >,
7121 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7122 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7123 Constraint = (),
7124 >,
7125 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7126 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7127 Constraint = (),
7128 >,
7129{
7130 async fn on_one_way(
7131 handler: &mut ___H,
7132 ordinal: u64,
7133 flexibility: ::fidl_next::protocol::Flexibility,
7134 body: ::fidl_next::Body<___T>,
7135 ) -> ::core::result::Result<
7136 (),
7137 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7138 > {
7139 match ordinal {
7140 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7141 Ok(decoded) => {
7142 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
7143 Ok(())
7144 }
7145 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7146 ordinal: 2366825959783828089,
7147 error,
7148 }),
7149 },
7150
7151 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7152 Ok(decoded) => {
7153 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
7154 Ok(())
7155 }
7156 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7157 ordinal: 6512600400724287855,
7158 error,
7159 }),
7160 },
7161
7162 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
7163 Ok(decoded) => {
7164 handler
7165 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
7166 .await;
7167 Ok(())
7168 }
7169 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7170 ordinal: 5431626189872037072,
7171 error,
7172 }),
7173 },
7174
7175 ordinal => {
7176 handler.on_unknown_interaction(ordinal).await;
7177 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7178 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7179 } else {
7180 Ok(())
7181 }
7182 }
7183 }
7184 }
7185
7186 async fn on_two_way(
7187 handler: &mut ___H,
7188 ordinal: u64,
7189 flexibility: ::fidl_next::protocol::Flexibility,
7190 body: ::fidl_next::Body<___T>,
7191 responder: ::fidl_next::protocol::Responder<___T>,
7192 ) -> ::core::result::Result<
7193 (),
7194 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7195 > {
7196 match ordinal {
7197 6540867515453498750 => {
7198 let responder = ::fidl_next::Responder::from_untyped(responder);
7199
7200 handler.close(responder).await;
7201 Ok(())
7202 }
7203
7204 2763219980499352582 => {
7205 let responder = ::fidl_next::Responder::from_untyped(responder);
7206
7207 handler.query(responder).await;
7208 Ok(())
7209 }
7210
7211 8689798978500614909 => {
7212 let responder = ::fidl_next::Responder::from_untyped(responder);
7213
7214 handler.deprecated_get_attr(responder).await;
7215 Ok(())
7216 }
7217
7218 4721673413776871238 => {
7219 let responder = ::fidl_next::Responder::from_untyped(responder);
7220
7221 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7222 Ok(decoded) => {
7223 handler
7224 .deprecated_set_attr(
7225 ::fidl_next::Request::from_decoded(decoded),
7226 responder,
7227 )
7228 .await;
7229 Ok(())
7230 }
7231 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7232 ordinal: 4721673413776871238,
7233 error,
7234 }),
7235 }
7236 }
7237
7238 6595803110182632097 => {
7239 let responder = ::fidl_next::Responder::from_untyped(responder);
7240
7241 handler.deprecated_get_flags(responder).await;
7242 Ok(())
7243 }
7244
7245 5950864159036794675 => {
7246 let responder = ::fidl_next::Responder::from_untyped(responder);
7247
7248 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7249 Ok(decoded) => {
7250 handler
7251 .deprecated_set_flags(
7252 ::fidl_next::Request::from_decoded(decoded),
7253 responder,
7254 )
7255 .await;
7256 Ok(())
7257 }
7258 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7259 ordinal: 5950864159036794675,
7260 error,
7261 }),
7262 }
7263 }
7264
7265 105530239381466147 => {
7266 let responder = ::fidl_next::Responder::from_untyped(responder);
7267
7268 handler.get_flags(responder).await;
7269 Ok(())
7270 }
7271
7272 6172186066099445416 => {
7273 let responder = ::fidl_next::Responder::from_untyped(responder);
7274
7275 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7276 Ok(decoded) => {
7277 handler
7278 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
7279 .await;
7280 Ok(())
7281 }
7282 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7283 ordinal: 6172186066099445416,
7284 error,
7285 }),
7286 }
7287 }
7288
7289 8013111122914313744 => {
7290 let responder = ::fidl_next::Responder::from_untyped(responder);
7291
7292 handler.query_filesystem(responder).await;
7293 Ok(())
7294 }
7295
7296 4414537700416816443 => {
7297 let responder = ::fidl_next::Responder::from_untyped(responder);
7298
7299 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7300 Ok(decoded) => {
7301 handler
7302 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
7303 .await;
7304 Ok(())
7305 }
7306 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7307 ordinal: 4414537700416816443,
7308 error,
7309 }),
7310 }
7311 }
7312
7313 3677402239314018056 => {
7314 let responder = ::fidl_next::Responder::from_untyped(responder);
7315
7316 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7317 Ok(decoded) => {
7318 handler
7319 .update_attributes(
7320 ::fidl_next::Request::from_decoded(decoded),
7321 responder,
7322 )
7323 .await;
7324 Ok(())
7325 }
7326 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7327 ordinal: 3677402239314018056,
7328 error,
7329 }),
7330 }
7331 }
7332
7333 3196473584242777161 => {
7334 let responder = ::fidl_next::Responder::from_untyped(responder);
7335
7336 handler.sync(responder).await;
7337 Ok(())
7338 }
7339
7340 5043930208506967771 => {
7341 let responder = ::fidl_next::Responder::from_untyped(responder);
7342
7343 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7344 Ok(decoded) => {
7345 handler
7346 .get_extended_attribute(
7347 ::fidl_next::Request::from_decoded(decoded),
7348 responder,
7349 )
7350 .await;
7351 Ok(())
7352 }
7353 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7354 ordinal: 5043930208506967771,
7355 error,
7356 }),
7357 }
7358 }
7359
7360 5374223046099989052 => {
7361 let responder = ::fidl_next::Responder::from_untyped(responder);
7362
7363 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7364 Ok(decoded) => {
7365 handler
7366 .set_extended_attribute(
7367 ::fidl_next::Request::from_decoded(decoded),
7368 responder,
7369 )
7370 .await;
7371 Ok(())
7372 }
7373 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7374 ordinal: 5374223046099989052,
7375 error,
7376 }),
7377 }
7378 }
7379
7380 8794297771444732717 => {
7381 let responder = ::fidl_next::Responder::from_untyped(responder);
7382
7383 match ::fidl_next::AsDecoderExt::into_decoded(body) {
7384 Ok(decoded) => {
7385 handler
7386 .remove_extended_attribute(
7387 ::fidl_next::Request::from_decoded(decoded),
7388 responder,
7389 )
7390 .await;
7391 Ok(())
7392 }
7393 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7394 ordinal: 8794297771444732717,
7395 error,
7396 }),
7397 }
7398 }
7399
7400 ordinal => {
7401 handler.on_unknown_interaction(ordinal).await;
7402 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
7403 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7404 } else {
7405 responder
7406 .respond(
7407 ordinal,
7408 flexibility,
7409 ::fidl_next::Flexible::<()>::FrameworkErr(
7410 ::fidl_next::FrameworkError::UnknownMethod,
7411 ),
7412 )
7413 .expect("encoding a framework error should never fail")
7414 .await?;
7415 Ok(())
7416 }
7417 }
7418 }
7419 }
7420}
7421
7422#[doc = " Directory defines a node which is capable of containing other Objects.\n"]
7424#[derive(PartialEq, Debug)]
7425pub struct Directory;
7426
7427impl ::fidl_next::Discoverable for Directory {
7428 const PROTOCOL_NAME: &'static str = "fuchsia.io.Directory";
7429}
7430
7431#[cfg(target_os = "fuchsia")]
7432impl ::fidl_next::HasTransport for Directory {
7433 type Transport = ::fdomain_client::Channel;
7434}
7435
7436pub mod directory {
7437 pub mod prelude {
7438 pub use crate::{Directory, DirectoryClientHandler, DirectoryServerHandler, directory};
7439
7440 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
7441
7442 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
7443
7444 pub use crate::natural::DirectoryCreateSymlinkRequest;
7445
7446 pub use crate::natural::DirectoryDeprecatedOpenRequest;
7447
7448 pub use crate::natural::DirectoryGetTokenResponse;
7449
7450 pub use crate::natural::DirectoryLinkRequest;
7451
7452 pub use crate::natural::DirectoryLinkResponse;
7453
7454 pub use crate::natural::DirectoryOpenRequest;
7455
7456 pub use crate::natural::DirectoryReadDirentsRequest;
7457
7458 pub use crate::natural::DirectoryReadDirentsResponse;
7459
7460 pub use crate::natural::DirectoryRenameRequest;
7461
7462 pub use crate::natural::DirectoryRewindResponse;
7463
7464 pub use crate::natural::DirectoryUnlinkRequest;
7465
7466 pub use crate::natural::DirectoryWatchRequest;
7467
7468 pub use crate::natural::DirectoryWatchResponse;
7469
7470 pub use crate::natural::DirectoryCreateSymlinkResponse;
7471
7472 pub use crate::natural::DirectoryRenameResponse;
7473
7474 pub use crate::natural::DirectoryUnlinkResponse;
7475
7476 pub use crate::natural::ExtendedAttributeValue;
7477
7478 pub use crate::natural::MutableNodeAttributes;
7479
7480 pub use crate::natural::NodeAttributes2;
7481
7482 pub use crate::natural::NodeDeprecatedCloneRequest;
7483
7484 pub use crate::natural::NodeDeprecatedGetAttrResponse;
7485
7486 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
7487
7488 pub use crate::natural::NodeDeprecatedSetAttrRequest;
7489
7490 pub use crate::natural::NodeDeprecatedSetAttrResponse;
7491
7492 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
7493
7494 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
7495
7496 pub use crate::natural::NodeGetAttributesRequest;
7497
7498 pub use crate::natural::NodeGetExtendedAttributeRequest;
7499
7500 pub use crate::natural::NodeListExtendedAttributesRequest;
7501
7502 pub use crate::natural::NodeOnOpenRequest;
7503
7504 pub use crate::natural::NodeQueryFilesystemResponse;
7505
7506 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
7507
7508 pub use crate::natural::NodeSetExtendedAttributeRequest;
7509
7510 pub use crate::natural::NodeSetFlagsRequest;
7511
7512 pub use crate::natural::NodeGetFlagsResponse;
7513
7514 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
7515
7516 pub use crate::natural::NodeSetExtendedAttributeResponse;
7517
7518 pub use crate::natural::NodeSetFlagsResponse;
7519
7520 pub use crate::natural::NodeSyncResponse;
7521
7522 pub use crate::natural::NodeUpdateAttributesResponse;
7523
7524 pub use crate::natural::Representation;
7525
7526 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
7527
7528 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
7529
7530 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
7531 }
7532
7533 pub struct AdvisoryLock;
7534
7535 impl ::fidl_next::Method for AdvisoryLock {
7536 const ORDINAL: u64 = 7992130864415541162;
7537 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7538 ::fidl_next::protocol::Flexibility::Strict;
7539
7540 type Protocol = crate::Directory;
7541
7542 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
7543 }
7544
7545 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
7546 type Response = ::fidl_next::wire::Result<
7547 'static,
7548 crate::wire::AdvisoryLockingAdvisoryLockResponse,
7549 ::fidl_next::wire::Int32,
7550 >;
7551 }
7552
7553 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
7554 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7555
7556 fn respond(response: ___R) -> Self::Output {
7557 ::core::result::Result::Ok(response)
7558 }
7559 }
7560
7561 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
7562 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7563
7564 fn respond_err(response: ___R) -> Self::Output {
7565 ::core::result::Result::Err(response)
7566 }
7567 }
7568
7569 pub struct Clone;
7570
7571 impl ::fidl_next::Method for Clone {
7572 const ORDINAL: u64 = 2366825959783828089;
7573 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7574 ::fidl_next::protocol::Flexibility::Strict;
7575
7576 type Protocol = crate::Directory;
7577
7578 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
7579 }
7580
7581 pub struct Close;
7582
7583 impl ::fidl_next::Method for Close {
7584 const ORDINAL: u64 = 6540867515453498750;
7585 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7586 ::fidl_next::protocol::Flexibility::Strict;
7587
7588 type Protocol = crate::Directory;
7589
7590 type Request = ();
7591 }
7592
7593 impl ::fidl_next::TwoWayMethod for Close {
7594 type Response = ::fidl_next::wire::Result<
7595 'static,
7596 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
7597 ::fidl_next::wire::Int32,
7598 >;
7599 }
7600
7601 impl<___R> ::fidl_next::Respond<___R> for Close {
7602 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7603
7604 fn respond(response: ___R) -> Self::Output {
7605 ::core::result::Result::Ok(response)
7606 }
7607 }
7608
7609 impl<___R> ::fidl_next::RespondErr<___R> for Close {
7610 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7611
7612 fn respond_err(response: ___R) -> Self::Output {
7613 ::core::result::Result::Err(response)
7614 }
7615 }
7616
7617 pub struct Query;
7618
7619 impl ::fidl_next::Method for Query {
7620 const ORDINAL: u64 = 2763219980499352582;
7621 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7622 ::fidl_next::protocol::Flexibility::Strict;
7623
7624 type Protocol = crate::Directory;
7625
7626 type Request = ();
7627 }
7628
7629 impl ::fidl_next::TwoWayMethod for Query {
7630 type Response = ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
7631 }
7632
7633 impl<___R> ::fidl_next::Respond<___R> for Query {
7634 type Output = ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
7635
7636 fn respond(response: ___R) -> Self::Output {
7637 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
7638 }
7639 }
7640
7641 pub struct DeprecatedClone;
7642
7643 impl ::fidl_next::Method for DeprecatedClone {
7644 const ORDINAL: u64 = 6512600400724287855;
7645 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7646 ::fidl_next::protocol::Flexibility::Flexible;
7647
7648 type Protocol = crate::Directory;
7649
7650 type Request = crate::wire::NodeDeprecatedCloneRequest;
7651 }
7652
7653 pub struct OnOpen;
7654
7655 impl ::fidl_next::Method for OnOpen {
7656 const ORDINAL: u64 = 9207534335756671346;
7657 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7658 ::fidl_next::protocol::Flexibility::Flexible;
7659
7660 type Protocol = crate::Directory;
7661
7662 type Request = crate::wire::NodeOnOpenRequest<'static>;
7663 }
7664
7665 pub struct DeprecatedGetAttr;
7666
7667 impl ::fidl_next::Method for DeprecatedGetAttr {
7668 const ORDINAL: u64 = 8689798978500614909;
7669 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7670 ::fidl_next::protocol::Flexibility::Strict;
7671
7672 type Protocol = crate::Directory;
7673
7674 type Request = ();
7675 }
7676
7677 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
7678 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
7679 }
7680
7681 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
7682 type Output = ___R;
7683
7684 fn respond(response: ___R) -> Self::Output {
7685 response
7686 }
7687 }
7688
7689 pub struct DeprecatedSetAttr;
7690
7691 impl ::fidl_next::Method for DeprecatedSetAttr {
7692 const ORDINAL: u64 = 4721673413776871238;
7693 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7694 ::fidl_next::protocol::Flexibility::Strict;
7695
7696 type Protocol = crate::Directory;
7697
7698 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
7699 }
7700
7701 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
7702 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
7703 }
7704
7705 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
7706 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
7707
7708 fn respond(response: ___R) -> Self::Output {
7709 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
7710 }
7711 }
7712
7713 pub struct DeprecatedGetFlags;
7714
7715 impl ::fidl_next::Method for DeprecatedGetFlags {
7716 const ORDINAL: u64 = 6595803110182632097;
7717 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7718 ::fidl_next::protocol::Flexibility::Strict;
7719
7720 type Protocol = crate::Directory;
7721
7722 type Request = ();
7723 }
7724
7725 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
7726 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
7727 }
7728
7729 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
7730 type Output = ___R;
7731
7732 fn respond(response: ___R) -> Self::Output {
7733 response
7734 }
7735 }
7736
7737 pub struct DeprecatedSetFlags;
7738
7739 impl ::fidl_next::Method for DeprecatedSetFlags {
7740 const ORDINAL: u64 = 5950864159036794675;
7741 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7742 ::fidl_next::protocol::Flexibility::Strict;
7743
7744 type Protocol = crate::Directory;
7745
7746 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
7747 }
7748
7749 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
7750 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
7751 }
7752
7753 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
7754 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
7755
7756 fn respond(response: ___R) -> Self::Output {
7757 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
7758 }
7759 }
7760
7761 pub struct GetFlags;
7762
7763 impl ::fidl_next::Method for GetFlags {
7764 const ORDINAL: u64 = 105530239381466147;
7765 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7766 ::fidl_next::protocol::Flexibility::Flexible;
7767
7768 type Protocol = crate::Directory;
7769
7770 type Request = ();
7771 }
7772
7773 impl ::fidl_next::TwoWayMethod for GetFlags {
7774 type Response = ::fidl_next::wire::FlexibleResult<
7775 'static,
7776 crate::wire::NodeGetFlagsResponse,
7777 ::fidl_next::wire::Int32,
7778 >;
7779 }
7780
7781 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
7782 type Output = ::fidl_next::FlexibleResult<
7783 crate::generic::NodeGetFlagsResponse<___R>,
7784 ::fidl_next::util::Never,
7785 >;
7786
7787 fn respond(response: ___R) -> Self::Output {
7788 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
7789 flags: response,
7790 })
7791 }
7792 }
7793
7794 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
7795 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
7796
7797 fn respond_err(response: ___R) -> Self::Output {
7798 ::fidl_next::FlexibleResult::Err(response)
7799 }
7800 }
7801
7802 pub struct SetFlags;
7803
7804 impl ::fidl_next::Method for SetFlags {
7805 const ORDINAL: u64 = 6172186066099445416;
7806 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7807 ::fidl_next::protocol::Flexibility::Flexible;
7808
7809 type Protocol = crate::Directory;
7810
7811 type Request = crate::wire::NodeSetFlagsRequest;
7812 }
7813
7814 impl ::fidl_next::TwoWayMethod for SetFlags {
7815 type Response = ::fidl_next::wire::FlexibleResult<
7816 'static,
7817 crate::wire::NodeSetFlagsResponse,
7818 ::fidl_next::wire::Int32,
7819 >;
7820 }
7821
7822 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
7823 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
7824
7825 fn respond(response: ___R) -> Self::Output {
7826 ::fidl_next::FlexibleResult::Ok(response)
7827 }
7828 }
7829
7830 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
7831 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
7832
7833 fn respond_err(response: ___R) -> Self::Output {
7834 ::fidl_next::FlexibleResult::Err(response)
7835 }
7836 }
7837
7838 pub struct QueryFilesystem;
7839
7840 impl ::fidl_next::Method for QueryFilesystem {
7841 const ORDINAL: u64 = 8013111122914313744;
7842 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7843 ::fidl_next::protocol::Flexibility::Strict;
7844
7845 type Protocol = crate::Directory;
7846
7847 type Request = ();
7848 }
7849
7850 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
7851 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
7852 }
7853
7854 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
7855 type Output = ___R;
7856
7857 fn respond(response: ___R) -> Self::Output {
7858 response
7859 }
7860 }
7861
7862 pub struct OnRepresentation;
7863
7864 impl ::fidl_next::Method for OnRepresentation {
7865 const ORDINAL: u64 = 6679970090861613324;
7866 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7867 ::fidl_next::protocol::Flexibility::Strict;
7868
7869 type Protocol = crate::Directory;
7870
7871 type Request = crate::wire::Representation<'static>;
7872 }
7873
7874 pub struct GetAttributes;
7875
7876 impl ::fidl_next::Method for GetAttributes {
7877 const ORDINAL: u64 = 4414537700416816443;
7878 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7879 ::fidl_next::protocol::Flexibility::Strict;
7880
7881 type Protocol = crate::Directory;
7882
7883 type Request = crate::wire::NodeGetAttributesRequest;
7884 }
7885
7886 impl ::fidl_next::TwoWayMethod for GetAttributes {
7887 type Response = ::fidl_next::wire::Result<
7888 'static,
7889 crate::wire::NodeAttributes2<'static>,
7890 ::fidl_next::wire::Int32,
7891 >;
7892 }
7893
7894 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
7895 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7896
7897 fn respond(response: ___R) -> Self::Output {
7898 ::core::result::Result::Ok(response)
7899 }
7900 }
7901
7902 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
7903 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7904
7905 fn respond_err(response: ___R) -> Self::Output {
7906 ::core::result::Result::Err(response)
7907 }
7908 }
7909
7910 pub struct UpdateAttributes;
7911
7912 impl ::fidl_next::Method for UpdateAttributes {
7913 const ORDINAL: u64 = 3677402239314018056;
7914 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7915 ::fidl_next::protocol::Flexibility::Strict;
7916
7917 type Protocol = crate::Directory;
7918
7919 type Request = crate::wire::MutableNodeAttributes<'static>;
7920 }
7921
7922 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
7923 type Response = ::fidl_next::wire::Result<
7924 'static,
7925 crate::wire::NodeUpdateAttributesResponse,
7926 ::fidl_next::wire::Int32,
7927 >;
7928 }
7929
7930 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
7931 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7932
7933 fn respond(response: ___R) -> Self::Output {
7934 ::core::result::Result::Ok(response)
7935 }
7936 }
7937
7938 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
7939 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7940
7941 fn respond_err(response: ___R) -> Self::Output {
7942 ::core::result::Result::Err(response)
7943 }
7944 }
7945
7946 pub struct Sync;
7947
7948 impl ::fidl_next::Method for Sync {
7949 const ORDINAL: u64 = 3196473584242777161;
7950 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7951 ::fidl_next::protocol::Flexibility::Strict;
7952
7953 type Protocol = crate::Directory;
7954
7955 type Request = ();
7956 }
7957
7958 impl ::fidl_next::TwoWayMethod for Sync {
7959 type Response = ::fidl_next::wire::Result<
7960 'static,
7961 crate::wire::NodeSyncResponse,
7962 ::fidl_next::wire::Int32,
7963 >;
7964 }
7965
7966 impl<___R> ::fidl_next::Respond<___R> for Sync {
7967 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
7968
7969 fn respond(response: ___R) -> Self::Output {
7970 ::core::result::Result::Ok(response)
7971 }
7972 }
7973
7974 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
7975 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
7976
7977 fn respond_err(response: ___R) -> Self::Output {
7978 ::core::result::Result::Err(response)
7979 }
7980 }
7981
7982 pub struct ListExtendedAttributes;
7983
7984 impl ::fidl_next::Method for ListExtendedAttributes {
7985 const ORDINAL: u64 = 5431626189872037072;
7986 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7987 ::fidl_next::protocol::Flexibility::Strict;
7988
7989 type Protocol = crate::Directory;
7990
7991 type Request = crate::wire::NodeListExtendedAttributesRequest;
7992 }
7993
7994 pub struct GetExtendedAttribute;
7995
7996 impl ::fidl_next::Method for GetExtendedAttribute {
7997 const ORDINAL: u64 = 5043930208506967771;
7998 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7999 ::fidl_next::protocol::Flexibility::Strict;
8000
8001 type Protocol = crate::Directory;
8002
8003 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
8004 }
8005
8006 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
8007 type Response = ::fidl_next::wire::Result<
8008 'static,
8009 crate::wire::ExtendedAttributeValue<'static>,
8010 ::fidl_next::wire::Int32,
8011 >;
8012 }
8013
8014 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
8015 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8016
8017 fn respond(response: ___R) -> Self::Output {
8018 ::core::result::Result::Ok(response)
8019 }
8020 }
8021
8022 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
8023 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8024
8025 fn respond_err(response: ___R) -> Self::Output {
8026 ::core::result::Result::Err(response)
8027 }
8028 }
8029
8030 pub struct SetExtendedAttribute;
8031
8032 impl ::fidl_next::Method for SetExtendedAttribute {
8033 const ORDINAL: u64 = 5374223046099989052;
8034 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8035 ::fidl_next::protocol::Flexibility::Strict;
8036
8037 type Protocol = crate::Directory;
8038
8039 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
8040 }
8041
8042 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
8043 type Response = ::fidl_next::wire::Result<
8044 'static,
8045 crate::wire::NodeSetExtendedAttributeResponse,
8046 ::fidl_next::wire::Int32,
8047 >;
8048 }
8049
8050 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
8051 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8052
8053 fn respond(response: ___R) -> Self::Output {
8054 ::core::result::Result::Ok(response)
8055 }
8056 }
8057
8058 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
8059 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8060
8061 fn respond_err(response: ___R) -> Self::Output {
8062 ::core::result::Result::Err(response)
8063 }
8064 }
8065
8066 pub struct RemoveExtendedAttribute;
8067
8068 impl ::fidl_next::Method for RemoveExtendedAttribute {
8069 const ORDINAL: u64 = 8794297771444732717;
8070 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8071 ::fidl_next::protocol::Flexibility::Strict;
8072
8073 type Protocol = crate::Directory;
8074
8075 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
8076 }
8077
8078 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
8079 type Response = ::fidl_next::wire::Result<
8080 'static,
8081 crate::wire::NodeRemoveExtendedAttributeResponse,
8082 ::fidl_next::wire::Int32,
8083 >;
8084 }
8085
8086 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
8087 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8088
8089 fn respond(response: ___R) -> Self::Output {
8090 ::core::result::Result::Ok(response)
8091 }
8092 }
8093
8094 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
8095 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8096
8097 fn respond_err(response: ___R) -> Self::Output {
8098 ::core::result::Result::Err(response)
8099 }
8100 }
8101
8102 pub struct DeprecatedOpen;
8103
8104 impl ::fidl_next::Method for DeprecatedOpen {
8105 const ORDINAL: u64 = 3193127272456937152;
8106 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8107 ::fidl_next::protocol::Flexibility::Flexible;
8108
8109 type Protocol = crate::Directory;
8110
8111 type Request = crate::wire::DirectoryDeprecatedOpenRequest<'static>;
8112 }
8113
8114 pub struct Open;
8115
8116 impl ::fidl_next::Method for Open {
8117 const ORDINAL: u64 = 6236883748953765593;
8118 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8119 ::fidl_next::protocol::Flexibility::Strict;
8120
8121 type Protocol = crate::Directory;
8122
8123 type Request = crate::wire::DirectoryOpenRequest<'static>;
8124 }
8125
8126 pub struct ReadDirents;
8127
8128 impl ::fidl_next::Method for ReadDirents {
8129 const ORDINAL: u64 = 3855785432100874762;
8130 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8131 ::fidl_next::protocol::Flexibility::Strict;
8132
8133 type Protocol = crate::Directory;
8134
8135 type Request = crate::wire::DirectoryReadDirentsRequest;
8136 }
8137
8138 impl ::fidl_next::TwoWayMethod for ReadDirents {
8139 type Response = crate::wire::DirectoryReadDirentsResponse<'static>;
8140 }
8141
8142 impl<___R> ::fidl_next::Respond<___R> for ReadDirents {
8143 type Output = ___R;
8144
8145 fn respond(response: ___R) -> Self::Output {
8146 response
8147 }
8148 }
8149
8150 pub struct Rewind;
8151
8152 impl ::fidl_next::Method for Rewind {
8153 const ORDINAL: u64 = 1635123508515392625;
8154 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8155 ::fidl_next::protocol::Flexibility::Strict;
8156
8157 type Protocol = crate::Directory;
8158
8159 type Request = ();
8160 }
8161
8162 impl ::fidl_next::TwoWayMethod for Rewind {
8163 type Response = crate::wire::DirectoryRewindResponse;
8164 }
8165
8166 impl<___R> ::fidl_next::Respond<___R> for Rewind {
8167 type Output = crate::generic::DirectoryRewindResponse<___R>;
8168
8169 fn respond(response: ___R) -> Self::Output {
8170 crate::generic::DirectoryRewindResponse { s: response }
8171 }
8172 }
8173
8174 pub struct GetToken;
8175
8176 impl ::fidl_next::Method for GetToken {
8177 const ORDINAL: u64 = 2787337947777369685;
8178 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8179 ::fidl_next::protocol::Flexibility::Strict;
8180
8181 type Protocol = crate::Directory;
8182
8183 type Request = ();
8184 }
8185
8186 impl ::fidl_next::TwoWayMethod for GetToken {
8187 type Response = crate::wire::DirectoryGetTokenResponse;
8188 }
8189
8190 impl<___R> ::fidl_next::Respond<___R> for GetToken {
8191 type Output = ___R;
8192
8193 fn respond(response: ___R) -> Self::Output {
8194 response
8195 }
8196 }
8197
8198 pub struct Link;
8199
8200 impl ::fidl_next::Method for Link {
8201 const ORDINAL: u64 = 8360374984291987687;
8202 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8203 ::fidl_next::protocol::Flexibility::Strict;
8204
8205 type Protocol = crate::Directory;
8206
8207 type Request = crate::wire::DirectoryLinkRequest<'static>;
8208 }
8209
8210 impl ::fidl_next::TwoWayMethod for Link {
8211 type Response = crate::wire::DirectoryLinkResponse;
8212 }
8213
8214 impl<___R> ::fidl_next::Respond<___R> for Link {
8215 type Output = crate::generic::DirectoryLinkResponse<___R>;
8216
8217 fn respond(response: ___R) -> Self::Output {
8218 crate::generic::DirectoryLinkResponse { s: response }
8219 }
8220 }
8221
8222 pub struct Unlink;
8223
8224 impl ::fidl_next::Method for Unlink {
8225 const ORDINAL: u64 = 8433556716759383021;
8226 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8227 ::fidl_next::protocol::Flexibility::Strict;
8228
8229 type Protocol = crate::Directory;
8230
8231 type Request = crate::wire::DirectoryUnlinkRequest<'static>;
8232 }
8233
8234 impl ::fidl_next::TwoWayMethod for Unlink {
8235 type Response = ::fidl_next::wire::Result<
8236 'static,
8237 crate::wire::DirectoryUnlinkResponse,
8238 ::fidl_next::wire::Int32,
8239 >;
8240 }
8241
8242 impl<___R> ::fidl_next::Respond<___R> for Unlink {
8243 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8244
8245 fn respond(response: ___R) -> Self::Output {
8246 ::core::result::Result::Ok(response)
8247 }
8248 }
8249
8250 impl<___R> ::fidl_next::RespondErr<___R> for Unlink {
8251 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8252
8253 fn respond_err(response: ___R) -> Self::Output {
8254 ::core::result::Result::Err(response)
8255 }
8256 }
8257
8258 pub struct Rename;
8259
8260 impl ::fidl_next::Method for Rename {
8261 const ORDINAL: u64 = 8097726607824333022;
8262 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8263 ::fidl_next::protocol::Flexibility::Strict;
8264
8265 type Protocol = crate::Directory;
8266
8267 type Request = crate::wire::DirectoryRenameRequest<'static>;
8268 }
8269
8270 impl ::fidl_next::TwoWayMethod for Rename {
8271 type Response = ::fidl_next::wire::Result<
8272 'static,
8273 crate::wire::DirectoryRenameResponse,
8274 ::fidl_next::wire::Int32,
8275 >;
8276 }
8277
8278 impl<___R> ::fidl_next::Respond<___R> for Rename {
8279 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8280
8281 fn respond(response: ___R) -> Self::Output {
8282 ::core::result::Result::Ok(response)
8283 }
8284 }
8285
8286 impl<___R> ::fidl_next::RespondErr<___R> for Rename {
8287 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8288
8289 fn respond_err(response: ___R) -> Self::Output {
8290 ::core::result::Result::Err(response)
8291 }
8292 }
8293
8294 pub struct CreateSymlink;
8295
8296 impl ::fidl_next::Method for CreateSymlink {
8297 const ORDINAL: u64 = 2435901052462315657;
8298 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8299 ::fidl_next::protocol::Flexibility::Strict;
8300
8301 type Protocol = crate::Directory;
8302
8303 type Request = crate::wire::DirectoryCreateSymlinkRequest<'static>;
8304 }
8305
8306 impl ::fidl_next::TwoWayMethod for CreateSymlink {
8307 type Response = ::fidl_next::wire::Result<
8308 'static,
8309 crate::wire::DirectoryCreateSymlinkResponse,
8310 ::fidl_next::wire::Int32,
8311 >;
8312 }
8313
8314 impl<___R> ::fidl_next::Respond<___R> for CreateSymlink {
8315 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
8316
8317 fn respond(response: ___R) -> Self::Output {
8318 ::core::result::Result::Ok(response)
8319 }
8320 }
8321
8322 impl<___R> ::fidl_next::RespondErr<___R> for CreateSymlink {
8323 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
8324
8325 fn respond_err(response: ___R) -> Self::Output {
8326 ::core::result::Result::Err(response)
8327 }
8328 }
8329
8330 pub struct Watch;
8331
8332 impl ::fidl_next::Method for Watch {
8333 const ORDINAL: u64 = 6275512344170098065;
8334 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8335 ::fidl_next::protocol::Flexibility::Strict;
8336
8337 type Protocol = crate::Directory;
8338
8339 type Request = crate::wire::DirectoryWatchRequest;
8340 }
8341
8342 impl ::fidl_next::TwoWayMethod for Watch {
8343 type Response = crate::wire::DirectoryWatchResponse;
8344 }
8345
8346 impl<___R> ::fidl_next::Respond<___R> for Watch {
8347 type Output = crate::generic::DirectoryWatchResponse<___R>;
8348
8349 fn respond(response: ___R) -> Self::Output {
8350 crate::generic::DirectoryWatchResponse { s: response }
8351 }
8352 }
8353
8354 mod ___detail {
8355 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Directory
8356 where
8357 ___T: ::fidl_next::Transport,
8358 {
8359 type Client = DirectoryClient<___T>;
8360 type Server = DirectoryServer<___T>;
8361 }
8362
8363 #[repr(transparent)]
8365 pub struct DirectoryClient<___T: ::fidl_next::Transport> {
8366 #[allow(dead_code)]
8367 client: ::fidl_next::protocol::Client<___T>,
8368 }
8369
8370 impl<___T> DirectoryClient<___T>
8371 where
8372 ___T: ::fidl_next::Transport,
8373 {
8374 #[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"]
8375 pub fn advisory_lock(
8376 &self,
8377
8378 request: impl ::fidl_next::Encode<
8379 crate::wire::AdvisoryLockRequest<'static>,
8380 <___T as ::fidl_next::Transport>::SendBuffer,
8381 >,
8382 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
8383 where
8384 <___T as ::fidl_next::Transport>::SendBuffer:
8385 ::fidl_next::encoder::InternalHandleEncoder,
8386 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8387 {
8388 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
8389 request,
8390 })
8391 }
8392
8393 #[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"]
8394 pub fn advisory_lock_with<___R>(
8395 &self,
8396 request: ___R,
8397 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
8398 where
8399 ___R: ::fidl_next::Encode<
8400 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
8401 <___T as ::fidl_next::Transport>::SendBuffer,
8402 >,
8403 {
8404 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8405 7992130864415541162,
8406 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
8407 request,
8408 ))
8409 }
8410
8411 pub fn clone(
8412 &self,
8413
8414 request: impl ::fidl_next::Encode<
8415 ::fidl_next::ServerEnd<
8416 ::fdomain_next_fuchsia_unknown::Cloneable,
8417 ::fdomain_client::fidl_next::wire::Handle,
8418 >,
8419 <___T as ::fidl_next::Transport>::SendBuffer,
8420 >,
8421 ) -> ::fidl_next::SendFuture<'_, ___T>
8422 where
8423 <___T as ::fidl_next::Transport>::SendBuffer:
8424 ::fidl_next::encoder::InternalHandleEncoder,
8425 <___T as ::fidl_next::Transport>::SendBuffer:
8426 ::fdomain_client::fidl_next::HandleEncoder,
8427 {
8428 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
8429 request,
8430 })
8431 }
8432
8433 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
8434 where
8435 ___R: ::fidl_next::Encode<
8436 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
8437 <___T as ::fidl_next::Transport>::SendBuffer,
8438 >,
8439 {
8440 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8441 2366825959783828089,
8442 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
8443 request,
8444 ))
8445 }
8446
8447 #[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"]
8448 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
8449 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8450 6540867515453498750,
8451 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
8452 (),
8453 ))
8454 }
8455
8456 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
8457 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8458 2763219980499352582,
8459 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
8460 (),
8461 ))
8462 }
8463
8464 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
8465 pub fn deprecated_clone(
8466 &self,
8467
8468 flags: impl ::fidl_next::Encode<
8469 crate::wire::OpenFlags,
8470 <___T as ::fidl_next::Transport>::SendBuffer,
8471 >,
8472
8473 object: impl ::fidl_next::Encode<
8474 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
8475 <___T as ::fidl_next::Transport>::SendBuffer,
8476 >,
8477 ) -> ::fidl_next::SendFuture<'_, ___T>
8478 where
8479 <___T as ::fidl_next::Transport>::SendBuffer:
8480 ::fidl_next::encoder::InternalHandleEncoder,
8481 <___T as ::fidl_next::Transport>::SendBuffer:
8482 ::fdomain_client::fidl_next::HandleEncoder,
8483 {
8484 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
8485 flags,
8486
8487 object,
8488 })
8489 }
8490
8491 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
8492 pub fn deprecated_clone_with<___R>(
8493 &self,
8494 request: ___R,
8495 ) -> ::fidl_next::SendFuture<'_, ___T>
8496 where
8497 ___R: ::fidl_next::Encode<
8498 crate::wire::NodeDeprecatedCloneRequest,
8499 <___T as ::fidl_next::Transport>::SendBuffer,
8500 >,
8501 {
8502 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8503 6512600400724287855,
8504 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
8505 request,
8506 ))
8507 }
8508
8509 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
8510 pub fn deprecated_get_attr(
8511 &self,
8512 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
8513 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8514 8689798978500614909,
8515 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
8516 (),
8517 ))
8518 }
8519
8520 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
8521 pub fn deprecated_set_attr(
8522 &self,
8523
8524 flags: impl ::fidl_next::Encode<
8525 crate::wire::NodeAttributeFlags,
8526 <___T as ::fidl_next::Transport>::SendBuffer,
8527 >,
8528
8529 attributes: impl ::fidl_next::Encode<
8530 crate::wire::NodeAttributes,
8531 <___T as ::fidl_next::Transport>::SendBuffer,
8532 >,
8533 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
8534 where
8535 <___T as ::fidl_next::Transport>::SendBuffer:
8536 ::fidl_next::encoder::InternalHandleEncoder,
8537 {
8538 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
8539 flags,
8540
8541 attributes,
8542 })
8543 }
8544
8545 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
8546 pub fn deprecated_set_attr_with<___R>(
8547 &self,
8548 request: ___R,
8549 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
8550 where
8551 ___R: ::fidl_next::Encode<
8552 crate::wire::NodeDeprecatedSetAttrRequest,
8553 <___T as ::fidl_next::Transport>::SendBuffer,
8554 >,
8555 {
8556 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8557 4721673413776871238,
8558 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
8559 request,
8560 ))
8561 }
8562
8563 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
8564 pub fn deprecated_get_flags(
8565 &self,
8566 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
8567 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8568 6595803110182632097,
8569 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
8570 (),
8571 ))
8572 }
8573
8574 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
8575 pub fn deprecated_set_flags(
8576 &self,
8577
8578 flags: impl ::fidl_next::Encode<
8579 crate::wire::OpenFlags,
8580 <___T as ::fidl_next::Transport>::SendBuffer,
8581 >,
8582 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
8583 where
8584 <___T as ::fidl_next::Transport>::SendBuffer:
8585 ::fidl_next::encoder::InternalHandleEncoder,
8586 {
8587 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
8588 flags,
8589 })
8590 }
8591
8592 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
8593 pub fn deprecated_set_flags_with<___R>(
8594 &self,
8595 request: ___R,
8596 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
8597 where
8598 ___R: ::fidl_next::Encode<
8599 crate::wire::NodeDeprecatedSetFlagsRequest,
8600 <___T as ::fidl_next::Transport>::SendBuffer,
8601 >,
8602 {
8603 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8604 5950864159036794675,
8605 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
8606 request,
8607 ))
8608 }
8609
8610 #[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"]
8611 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
8612 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8613 105530239381466147,
8614 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
8615 (),
8616 ))
8617 }
8618
8619 #[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"]
8620 pub fn set_flags(
8621 &self,
8622
8623 flags: impl ::fidl_next::Encode<
8624 crate::wire::Flags,
8625 <___T as ::fidl_next::Transport>::SendBuffer,
8626 >,
8627 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
8628 where
8629 <___T as ::fidl_next::Transport>::SendBuffer:
8630 ::fidl_next::encoder::InternalHandleEncoder,
8631 {
8632 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
8633 }
8634
8635 #[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"]
8636 pub fn set_flags_with<___R>(
8637 &self,
8638 request: ___R,
8639 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
8640 where
8641 ___R: ::fidl_next::Encode<
8642 crate::wire::NodeSetFlagsRequest,
8643 <___T as ::fidl_next::Transport>::SendBuffer,
8644 >,
8645 {
8646 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8647 6172186066099445416,
8648 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
8649 request,
8650 ))
8651 }
8652
8653 #[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"]
8654 pub fn query_filesystem(
8655 &self,
8656 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
8657 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8658 8013111122914313744,
8659 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
8660 (),
8661 ))
8662 }
8663
8664 #[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"]
8665 pub fn get_attributes(
8666 &self,
8667
8668 query: impl ::fidl_next::Encode<
8669 crate::wire::NodeAttributesQuery,
8670 <___T as ::fidl_next::Transport>::SendBuffer,
8671 >,
8672 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
8673 where
8674 <___T as ::fidl_next::Transport>::SendBuffer:
8675 ::fidl_next::encoder::InternalHandleEncoder,
8676 {
8677 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
8678 }
8679
8680 #[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"]
8681 pub fn get_attributes_with<___R>(
8682 &self,
8683 request: ___R,
8684 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
8685 where
8686 ___R: ::fidl_next::Encode<
8687 crate::wire::NodeGetAttributesRequest,
8688 <___T as ::fidl_next::Transport>::SendBuffer,
8689 >,
8690 {
8691 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8692 4414537700416816443,
8693 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
8694 request,
8695 ))
8696 }
8697
8698 #[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"]
8699 pub fn update_attributes_with<___R>(
8700 &self,
8701 request: ___R,
8702 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
8703 where
8704 ___R: ::fidl_next::Encode<
8705 crate::wire::MutableNodeAttributes<'static>,
8706 <___T as ::fidl_next::Transport>::SendBuffer,
8707 >,
8708 {
8709 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8710 3677402239314018056,
8711 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
8712 request,
8713 ))
8714 }
8715
8716 #[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"]
8717 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
8718 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8719 3196473584242777161,
8720 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
8721 (),
8722 ))
8723 }
8724
8725 #[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"]
8726 pub fn list_extended_attributes(
8727 &self,
8728
8729 iterator: impl ::fidl_next::Encode<
8730 ::fidl_next::ServerEnd<
8731 crate::ExtendedAttributeIterator,
8732 ::fdomain_client::fidl_next::wire::Handle,
8733 >,
8734 <___T as ::fidl_next::Transport>::SendBuffer,
8735 >,
8736 ) -> ::fidl_next::SendFuture<'_, ___T>
8737 where
8738 <___T as ::fidl_next::Transport>::SendBuffer:
8739 ::fidl_next::encoder::InternalHandleEncoder,
8740 <___T as ::fidl_next::Transport>::SendBuffer:
8741 ::fdomain_client::fidl_next::HandleEncoder,
8742 {
8743 self.list_extended_attributes_with(
8744 crate::generic::NodeListExtendedAttributesRequest { iterator },
8745 )
8746 }
8747
8748 #[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"]
8749 pub fn list_extended_attributes_with<___R>(
8750 &self,
8751 request: ___R,
8752 ) -> ::fidl_next::SendFuture<'_, ___T>
8753 where
8754 ___R: ::fidl_next::Encode<
8755 crate::wire::NodeListExtendedAttributesRequest,
8756 <___T as ::fidl_next::Transport>::SendBuffer,
8757 >,
8758 {
8759 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8760 5431626189872037072,
8761 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
8762 request,
8763 ))
8764 }
8765
8766 #[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"]
8767 pub fn get_extended_attribute(
8768 &self,
8769
8770 name: impl ::fidl_next::Encode<
8771 ::fidl_next::wire::Vector<'static, u8>,
8772 <___T as ::fidl_next::Transport>::SendBuffer,
8773 >,
8774 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
8775 where
8776 <___T as ::fidl_next::Transport>::SendBuffer:
8777 ::fidl_next::encoder::InternalHandleEncoder,
8778 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8779 {
8780 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
8781 name,
8782 })
8783 }
8784
8785 #[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"]
8786 pub fn get_extended_attribute_with<___R>(
8787 &self,
8788 request: ___R,
8789 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
8790 where
8791 ___R: ::fidl_next::Encode<
8792 crate::wire::NodeGetExtendedAttributeRequest<'static>,
8793 <___T as ::fidl_next::Transport>::SendBuffer,
8794 >,
8795 {
8796 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8797 5043930208506967771,
8798 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8799 request,
8800 ))
8801 }
8802
8803 #[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"]
8804 pub fn set_extended_attribute(
8805 &self,
8806
8807 name: impl ::fidl_next::Encode<
8808 ::fidl_next::wire::Vector<'static, u8>,
8809 <___T as ::fidl_next::Transport>::SendBuffer,
8810 >,
8811
8812 value: impl ::fidl_next::Encode<
8813 crate::wire::ExtendedAttributeValue<'static>,
8814 <___T as ::fidl_next::Transport>::SendBuffer,
8815 >,
8816
8817 mode: impl ::fidl_next::Encode<
8818 crate::wire::SetExtendedAttributeMode,
8819 <___T as ::fidl_next::Transport>::SendBuffer,
8820 >,
8821 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
8822 where
8823 <___T as ::fidl_next::Transport>::SendBuffer:
8824 ::fidl_next::encoder::InternalHandleEncoder,
8825 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8826 <___T as ::fidl_next::Transport>::SendBuffer:
8827 ::fdomain_client::fidl_next::HandleEncoder,
8828 {
8829 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
8830 name,
8831
8832 value,
8833
8834 mode,
8835 })
8836 }
8837
8838 #[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"]
8839 pub fn set_extended_attribute_with<___R>(
8840 &self,
8841 request: ___R,
8842 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
8843 where
8844 ___R: ::fidl_next::Encode<
8845 crate::wire::NodeSetExtendedAttributeRequest<'static>,
8846 <___T as ::fidl_next::Transport>::SendBuffer,
8847 >,
8848 {
8849 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8850 5374223046099989052,
8851 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8852 request,
8853 ))
8854 }
8855
8856 #[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"]
8857 pub fn remove_extended_attribute(
8858 &self,
8859
8860 name: impl ::fidl_next::Encode<
8861 ::fidl_next::wire::Vector<'static, u8>,
8862 <___T as ::fidl_next::Transport>::SendBuffer,
8863 >,
8864 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
8865 where
8866 <___T as ::fidl_next::Transport>::SendBuffer:
8867 ::fidl_next::encoder::InternalHandleEncoder,
8868 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8869 {
8870 self.remove_extended_attribute_with(
8871 crate::generic::NodeRemoveExtendedAttributeRequest { name },
8872 )
8873 }
8874
8875 #[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"]
8876 pub fn remove_extended_attribute_with<___R>(
8877 &self,
8878 request: ___R,
8879 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
8880 where
8881 ___R: ::fidl_next::Encode<
8882 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
8883 <___T as ::fidl_next::Transport>::SendBuffer,
8884 >,
8885 {
8886 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8887 8794297771444732717,
8888 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8889 request,
8890 ))
8891 }
8892
8893 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
8894 pub fn deprecated_open(
8895 &self,
8896
8897 flags: impl ::fidl_next::Encode<
8898 crate::wire::OpenFlags,
8899 <___T as ::fidl_next::Transport>::SendBuffer,
8900 >,
8901
8902 mode: impl ::fidl_next::Encode<
8903 crate::wire::ModeType,
8904 <___T as ::fidl_next::Transport>::SendBuffer,
8905 >,
8906
8907 path: impl ::fidl_next::Encode<
8908 ::fidl_next::wire::String<'static>,
8909 <___T as ::fidl_next::Transport>::SendBuffer,
8910 >,
8911
8912 object: impl ::fidl_next::Encode<
8913 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
8914 <___T as ::fidl_next::Transport>::SendBuffer,
8915 >,
8916 ) -> ::fidl_next::SendFuture<'_, ___T>
8917 where
8918 <___T as ::fidl_next::Transport>::SendBuffer:
8919 ::fidl_next::encoder::InternalHandleEncoder,
8920 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8921 <___T as ::fidl_next::Transport>::SendBuffer:
8922 ::fdomain_client::fidl_next::HandleEncoder,
8923 {
8924 self.deprecated_open_with(crate::generic::DirectoryDeprecatedOpenRequest {
8925 flags,
8926
8927 mode,
8928
8929 path,
8930
8931 object,
8932 })
8933 }
8934
8935 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
8936 pub fn deprecated_open_with<___R>(
8937 &self,
8938 request: ___R,
8939 ) -> ::fidl_next::SendFuture<'_, ___T>
8940 where
8941 ___R: ::fidl_next::Encode<
8942 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
8943 <___T as ::fidl_next::Transport>::SendBuffer,
8944 >,
8945 {
8946 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
8947 3193127272456937152,
8948 <super::DeprecatedOpen as ::fidl_next::Method>::FLEXIBILITY,
8949 request,
8950 ))
8951 }
8952
8953 #[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"]
8954 pub fn open(
8955 &self,
8956
8957 path: impl ::fidl_next::Encode<
8958 ::fidl_next::wire::String<'static>,
8959 <___T as ::fidl_next::Transport>::SendBuffer,
8960 >,
8961
8962 flags: impl ::fidl_next::Encode<
8963 crate::wire::Flags,
8964 <___T as ::fidl_next::Transport>::SendBuffer,
8965 >,
8966
8967 options: impl ::fidl_next::Encode<
8968 crate::wire::Options<'static>,
8969 <___T as ::fidl_next::Transport>::SendBuffer,
8970 >,
8971
8972 object: impl ::fidl_next::Encode<
8973 ::fdomain_client::fidl_next::wire::Handle,
8974 <___T as ::fidl_next::Transport>::SendBuffer,
8975 >,
8976 ) -> ::fidl_next::SendFuture<'_, ___T>
8977 where
8978 <___T as ::fidl_next::Transport>::SendBuffer:
8979 ::fidl_next::encoder::InternalHandleEncoder,
8980 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8981 <___T as ::fidl_next::Transport>::SendBuffer:
8982 ::fdomain_client::fidl_next::HandleEncoder,
8983 {
8984 self.open_with(crate::generic::DirectoryOpenRequest {
8985 path,
8986
8987 flags,
8988
8989 options,
8990
8991 object,
8992 })
8993 }
8994
8995 #[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"]
8996 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
8997 where
8998 ___R: ::fidl_next::Encode<
8999 crate::wire::DirectoryOpenRequest<'static>,
9000 <___T as ::fidl_next::Transport>::SendBuffer,
9001 >,
9002 {
9003 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9004 6236883748953765593,
9005 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
9006 request,
9007 ))
9008 }
9009
9010 #[doc = " Reads a collection of variably sized dirents into a buffer.\n The number of dirents in a directory may be very large: akin to\n calling read multiple times on a file, directories have a seek\n offset which is updated on subsequent calls to ReadDirents.\n Each call to ReadDirents will only return whole dirent structures,\n they will not get split across ReadDirent calls. When the seek\n offset reaches the end, `dirents` will be empty.\n\n These dirents are of the form:\n ```\n struct dirent {\n // Describes the inode of the entry.\n uint64 ino;\n // Describes the length of the dirent name in bytes.\n uint8 size;\n // Describes the type of the entry. Aligned with the\n // POSIX d_type values. Use `DirentType` constants.\n uint8 type;\n // Unterminated name of entry.\n char name[0];\n }\n ```\n\n This method does not require any rights, since one could always probe for\n directory contents by triggering name conflicts during file creation.\n"]
9011 pub fn read_dirents(
9012 &self,
9013
9014 max_bytes: impl ::fidl_next::Encode<
9015 ::fidl_next::wire::Uint64,
9016 <___T as ::fidl_next::Transport>::SendBuffer,
9017 >,
9018 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
9019 where
9020 <___T as ::fidl_next::Transport>::SendBuffer:
9021 ::fidl_next::encoder::InternalHandleEncoder,
9022 {
9023 self.read_dirents_with(crate::generic::DirectoryReadDirentsRequest { max_bytes })
9024 }
9025
9026 #[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"]
9027 pub fn read_dirents_with<___R>(
9028 &self,
9029 request: ___R,
9030 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
9031 where
9032 ___R: ::fidl_next::Encode<
9033 crate::wire::DirectoryReadDirentsRequest,
9034 <___T as ::fidl_next::Transport>::SendBuffer,
9035 >,
9036 {
9037 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9038 3855785432100874762,
9039 <super::ReadDirents as ::fidl_next::Method>::FLEXIBILITY,
9040 request,
9041 ))
9042 }
9043
9044 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
9045 pub fn rewind(&self) -> ::fidl_next::TwoWayFuture<'_, super::Rewind, ___T> {
9046 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9047 1635123508515392625,
9048 <super::Rewind as ::fidl_next::Method>::FLEXIBILITY,
9049 (),
9050 ))
9051 }
9052
9053 #[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"]
9054 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
9055 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9056 2787337947777369685,
9057 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
9058 (),
9059 ))
9060 }
9061
9062 #[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"]
9063 pub fn link(
9064 &self,
9065
9066 src: impl ::fidl_next::Encode<
9067 ::fidl_next::wire::String<'static>,
9068 <___T as ::fidl_next::Transport>::SendBuffer,
9069 >,
9070
9071 dst_parent_token: impl ::fidl_next::Encode<
9072 ::fdomain_client::fidl_next::wire::Handle,
9073 <___T as ::fidl_next::Transport>::SendBuffer,
9074 >,
9075
9076 dst: impl ::fidl_next::Encode<
9077 ::fidl_next::wire::String<'static>,
9078 <___T as ::fidl_next::Transport>::SendBuffer,
9079 >,
9080 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
9081 where
9082 <___T as ::fidl_next::Transport>::SendBuffer:
9083 ::fidl_next::encoder::InternalHandleEncoder,
9084 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9085 <___T as ::fidl_next::Transport>::SendBuffer:
9086 ::fdomain_client::fidl_next::HandleEncoder,
9087 {
9088 self.link_with(crate::generic::DirectoryLinkRequest { src, dst_parent_token, dst })
9089 }
9090
9091 #[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"]
9092 pub fn link_with<___R>(
9093 &self,
9094 request: ___R,
9095 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
9096 where
9097 ___R: ::fidl_next::Encode<
9098 crate::wire::DirectoryLinkRequest<'static>,
9099 <___T as ::fidl_next::Transport>::SendBuffer,
9100 >,
9101 {
9102 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9103 8360374984291987687,
9104 <super::Link as ::fidl_next::Method>::FLEXIBILITY,
9105 request,
9106 ))
9107 }
9108
9109 #[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"]
9110 pub fn unlink(
9111 &self,
9112
9113 name: impl ::fidl_next::Encode<
9114 ::fidl_next::wire::String<'static>,
9115 <___T as ::fidl_next::Transport>::SendBuffer,
9116 >,
9117
9118 options: impl ::fidl_next::Encode<
9119 crate::wire::UnlinkOptions<'static>,
9120 <___T as ::fidl_next::Transport>::SendBuffer,
9121 >,
9122 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
9123 where
9124 <___T as ::fidl_next::Transport>::SendBuffer:
9125 ::fidl_next::encoder::InternalHandleEncoder,
9126 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9127 {
9128 self.unlink_with(crate::generic::DirectoryUnlinkRequest { name, options })
9129 }
9130
9131 #[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"]
9132 pub fn unlink_with<___R>(
9133 &self,
9134 request: ___R,
9135 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
9136 where
9137 ___R: ::fidl_next::Encode<
9138 crate::wire::DirectoryUnlinkRequest<'static>,
9139 <___T as ::fidl_next::Transport>::SendBuffer,
9140 >,
9141 {
9142 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9143 8433556716759383021,
9144 <super::Unlink as ::fidl_next::Method>::FLEXIBILITY,
9145 request,
9146 ))
9147 }
9148
9149 #[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"]
9150 pub fn rename(
9151 &self,
9152
9153 src: impl ::fidl_next::Encode<
9154 ::fidl_next::wire::String<'static>,
9155 <___T as ::fidl_next::Transport>::SendBuffer,
9156 >,
9157
9158 dst_parent_token: impl ::fidl_next::Encode<
9159 ::fdomain_client::fidl_next::wire::Handle,
9160 <___T as ::fidl_next::Transport>::SendBuffer,
9161 >,
9162
9163 dst: impl ::fidl_next::Encode<
9164 ::fidl_next::wire::String<'static>,
9165 <___T as ::fidl_next::Transport>::SendBuffer,
9166 >,
9167 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
9168 where
9169 <___T as ::fidl_next::Transport>::SendBuffer:
9170 ::fidl_next::encoder::InternalHandleEncoder,
9171 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9172 <___T as ::fidl_next::Transport>::SendBuffer:
9173 ::fdomain_client::fidl_next::HandleEncoder,
9174 {
9175 self.rename_with(crate::generic::DirectoryRenameRequest {
9176 src,
9177
9178 dst_parent_token,
9179
9180 dst,
9181 })
9182 }
9183
9184 #[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"]
9185 pub fn rename_with<___R>(
9186 &self,
9187 request: ___R,
9188 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
9189 where
9190 ___R: ::fidl_next::Encode<
9191 crate::wire::DirectoryRenameRequest<'static>,
9192 <___T as ::fidl_next::Transport>::SendBuffer,
9193 >,
9194 {
9195 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9196 8097726607824333022,
9197 <super::Rename as ::fidl_next::Method>::FLEXIBILITY,
9198 request,
9199 ))
9200 }
9201
9202 #[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"]
9203 pub fn create_symlink(
9204 &self,
9205
9206 name: impl ::fidl_next::Encode<
9207 ::fidl_next::wire::String<'static>,
9208 <___T as ::fidl_next::Transport>::SendBuffer,
9209 >,
9210
9211 target: impl ::fidl_next::Encode<
9212 ::fidl_next::wire::Vector<'static, u8>,
9213 <___T as ::fidl_next::Transport>::SendBuffer,
9214 >,
9215
9216 connection: impl ::fidl_next::Encode<
9217 ::fidl_next::ServerEnd<
9218 crate::Symlink,
9219 ::fdomain_client::fidl_next::wire::OptionalHandle,
9220 >,
9221 <___T as ::fidl_next::Transport>::SendBuffer,
9222 >,
9223 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
9224 where
9225 <___T as ::fidl_next::Transport>::SendBuffer:
9226 ::fidl_next::encoder::InternalHandleEncoder,
9227 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9228 <___T as ::fidl_next::Transport>::SendBuffer:
9229 ::fdomain_client::fidl_next::HandleEncoder,
9230 {
9231 self.create_symlink_with(crate::generic::DirectoryCreateSymlinkRequest {
9232 name,
9233
9234 target,
9235
9236 connection,
9237 })
9238 }
9239
9240 #[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"]
9241 pub fn create_symlink_with<___R>(
9242 &self,
9243 request: ___R,
9244 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
9245 where
9246 ___R: ::fidl_next::Encode<
9247 crate::wire::DirectoryCreateSymlinkRequest<'static>,
9248 <___T as ::fidl_next::Transport>::SendBuffer,
9249 >,
9250 {
9251 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9252 2435901052462315657,
9253 <super::CreateSymlink as ::fidl_next::Method>::FLEXIBILITY,
9254 request,
9255 ))
9256 }
9257
9258 #[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"]
9259 pub fn watch(
9260 &self,
9261
9262 mask: impl ::fidl_next::Encode<
9263 crate::wire::WatchMask,
9264 <___T as ::fidl_next::Transport>::SendBuffer,
9265 >,
9266
9267 options: impl ::fidl_next::Encode<
9268 ::fidl_next::wire::Uint32,
9269 <___T as ::fidl_next::Transport>::SendBuffer,
9270 >,
9271
9272 watcher: impl ::fidl_next::Encode<
9273 ::fidl_next::ServerEnd<
9274 crate::DirectoryWatcher,
9275 ::fdomain_client::fidl_next::wire::Handle,
9276 >,
9277 <___T as ::fidl_next::Transport>::SendBuffer,
9278 >,
9279 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
9280 where
9281 <___T as ::fidl_next::Transport>::SendBuffer:
9282 ::fidl_next::encoder::InternalHandleEncoder,
9283 <___T as ::fidl_next::Transport>::SendBuffer:
9284 ::fdomain_client::fidl_next::HandleEncoder,
9285 {
9286 self.watch_with(crate::generic::DirectoryWatchRequest { mask, options, watcher })
9287 }
9288
9289 #[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"]
9290 pub fn watch_with<___R>(
9291 &self,
9292 request: ___R,
9293 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
9294 where
9295 ___R: ::fidl_next::Encode<
9296 crate::wire::DirectoryWatchRequest,
9297 <___T as ::fidl_next::Transport>::SendBuffer,
9298 >,
9299 {
9300 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9301 6275512344170098065,
9302 <super::Watch as ::fidl_next::Method>::FLEXIBILITY,
9303 request,
9304 ))
9305 }
9306 }
9307
9308 #[repr(transparent)]
9310 pub struct DirectoryServer<___T: ::fidl_next::Transport> {
9311 server: ::fidl_next::protocol::Server<___T>,
9312 }
9313
9314 impl<___T> DirectoryServer<___T>
9315 where
9316 ___T: ::fidl_next::Transport,
9317 {
9318 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
9319 pub fn on_open(
9320 &self,
9321
9322 s: impl ::fidl_next::Encode<
9323 ::fidl_next::wire::Int32,
9324 <___T as ::fidl_next::Transport>::SendBuffer,
9325 >,
9326
9327 info: impl ::fidl_next::Encode<
9328 crate::wire_optional::NodeInfoDeprecated<'static>,
9329 <___T as ::fidl_next::Transport>::SendBuffer,
9330 >,
9331 ) -> ::fidl_next::SendFuture<'_, ___T>
9332 where
9333 <___T as ::fidl_next::Transport>::SendBuffer:
9334 ::fidl_next::encoder::InternalHandleEncoder,
9335 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9336 <___T as ::fidl_next::Transport>::SendBuffer:
9337 ::fdomain_client::fidl_next::HandleEncoder,
9338 {
9339 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
9340 }
9341
9342 #[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"]
9343
9344 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
9345 where
9346 ___R: ::fidl_next::Encode<
9347 <super::OnOpen as ::fidl_next::Method>::Request,
9348 <___T as ::fidl_next::Transport>::SendBuffer,
9349 >,
9350 {
9351 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
9352 9207534335756671346,
9353 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
9354 request,
9355 ))
9356 }
9357
9358 #[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"]
9359
9360 pub fn on_representation_with<___R>(
9361 &self,
9362 request: ___R,
9363 ) -> ::fidl_next::SendFuture<'_, ___T>
9364 where
9365 ___R: ::fidl_next::Encode<
9366 <super::OnRepresentation as ::fidl_next::Method>::Request,
9367 <___T as ::fidl_next::Transport>::SendBuffer,
9368 >,
9369 {
9370 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
9371 6679970090861613324,
9372 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
9373 request,
9374 ))
9375 }
9376 }
9377 }
9378}
9379
9380pub trait DirectoryClientHandler<
9384 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
9385 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9386>
9387{
9388 #[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"]
9389 fn on_open(
9390 &mut self,
9391
9392 request: ::fidl_next::Request<directory::OnOpen, ___T>,
9393 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9394
9395 #[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"]
9396 fn on_representation(
9397 &mut self,
9398
9399 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
9400 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9401
9402 fn on_unknown_interaction(
9403 &mut self,
9404 ordinal: u64,
9405 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9406 ::core::future::ready(())
9407 }
9408}
9409
9410impl<___T> DirectoryClientHandler<___T> for ::fidl_next::IgnoreEvents
9411where
9412 ___T: ::fidl_next::Transport,
9413{
9414 async fn on_open(&mut self, _: ::fidl_next::Request<directory::OnOpen, ___T>) {}
9415
9416 async fn on_representation(
9417 &mut self,
9418
9419 _: ::fidl_next::Request<directory::OnRepresentation, ___T>,
9420 ) {
9421 }
9422
9423 async fn on_unknown_interaction(&mut self, _: u64) {}
9424}
9425
9426impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Directory
9427where
9428 ___H: DirectoryClientHandler<___T> + ::core::marker::Send,
9429 ___T: ::fidl_next::Transport,
9430 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
9431 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9432 Constraint = (),
9433 >,
9434 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
9435 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9436 Constraint = (),
9437 >,
9438{
9439 async fn on_event(
9440 handler: &mut ___H,
9441 ordinal: u64,
9442 flexibility: ::fidl_next::protocol::Flexibility,
9443 body: ::fidl_next::Body<___T>,
9444 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9445 match ordinal {
9446 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9447 Ok(decoded) => {
9448 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
9449 Ok(())
9450 }
9451 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9452 ordinal: 9207534335756671346,
9453 error,
9454 }),
9455 },
9456
9457 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9458 Ok(decoded) => {
9459 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
9460 Ok(())
9461 }
9462 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9463 ordinal: 6679970090861613324,
9464 error,
9465 }),
9466 },
9467
9468 ordinal => {
9469 handler.on_unknown_interaction(ordinal).await;
9470 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
9471 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9472 } else {
9473 Ok(())
9474 }
9475 }
9476 }
9477 }
9478}
9479
9480pub trait DirectoryServerHandler<
9484 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
9485 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
9486>
9487{
9488 #[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"]
9489 fn advisory_lock(
9490 &mut self,
9491
9492 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
9493
9494 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
9495 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9496
9497 fn clone(
9498 &mut self,
9499
9500 request: ::fidl_next::Request<directory::Clone, ___T>,
9501 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9502
9503 #[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"]
9504 fn close(
9505 &mut self,
9506
9507 responder: ::fidl_next::Responder<directory::Close, ___T>,
9508 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9509
9510 fn query(
9511 &mut self,
9512
9513 responder: ::fidl_next::Responder<directory::Query, ___T>,
9514 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9515
9516 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9517 fn deprecated_clone(
9518 &mut self,
9519
9520 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
9521 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9522
9523 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
9524 fn deprecated_get_attr(
9525 &mut self,
9526
9527 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
9528 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9529
9530 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9531 fn deprecated_set_attr(
9532 &mut self,
9533
9534 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
9535
9536 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
9537 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9538
9539 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
9540 fn deprecated_get_flags(
9541 &mut self,
9542
9543 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
9544 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9545
9546 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9547 fn deprecated_set_flags(
9548 &mut self,
9549
9550 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
9551
9552 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
9553 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9554
9555 #[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"]
9556 fn get_flags(
9557 &mut self,
9558
9559 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
9560 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9561
9562 #[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"]
9563 fn set_flags(
9564 &mut self,
9565
9566 request: ::fidl_next::Request<directory::SetFlags, ___T>,
9567
9568 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
9569 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9570
9571 #[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"]
9572 fn query_filesystem(
9573 &mut self,
9574
9575 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
9576 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9577
9578 #[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"]
9579 fn get_attributes(
9580 &mut self,
9581
9582 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
9583
9584 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
9585 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9586
9587 #[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"]
9588 fn update_attributes(
9589 &mut self,
9590
9591 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
9592
9593 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
9594 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9595
9596 #[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"]
9597 fn sync(
9598 &mut self,
9599
9600 responder: ::fidl_next::Responder<directory::Sync, ___T>,
9601 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9602
9603 #[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"]
9604 fn list_extended_attributes(
9605 &mut self,
9606
9607 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
9608 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9609
9610 #[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"]
9611 fn get_extended_attribute(
9612 &mut self,
9613
9614 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
9615
9616 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
9617 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9618
9619 #[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"]
9620 fn set_extended_attribute(
9621 &mut self,
9622
9623 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
9624
9625 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
9626 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9627
9628 #[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"]
9629 fn remove_extended_attribute(
9630 &mut self,
9631
9632 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
9633
9634 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
9635 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9636
9637 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
9638 fn deprecated_open(
9639 &mut self,
9640
9641 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
9642 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9643
9644 #[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"]
9645 fn open(
9646 &mut self,
9647
9648 request: ::fidl_next::Request<directory::Open, ___T>,
9649 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9650
9651 #[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"]
9652 fn read_dirents(
9653 &mut self,
9654
9655 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
9656
9657 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
9658 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9659
9660 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
9661 fn rewind(
9662 &mut self,
9663
9664 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
9665 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9666
9667 #[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"]
9668 fn get_token(
9669 &mut self,
9670
9671 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
9672 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9673
9674 #[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"]
9675 fn link(
9676 &mut self,
9677
9678 request: ::fidl_next::Request<directory::Link, ___T>,
9679
9680 responder: ::fidl_next::Responder<directory::Link, ___T>,
9681 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9682
9683 #[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"]
9684 fn unlink(
9685 &mut self,
9686
9687 request: ::fidl_next::Request<directory::Unlink, ___T>,
9688
9689 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
9690 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9691
9692 #[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"]
9693 fn rename(
9694 &mut self,
9695
9696 request: ::fidl_next::Request<directory::Rename, ___T>,
9697
9698 responder: ::fidl_next::Responder<directory::Rename, ___T>,
9699 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9700
9701 #[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"]
9702 fn create_symlink(
9703 &mut self,
9704
9705 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
9706
9707 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
9708 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9709
9710 #[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"]
9711 fn watch(
9712 &mut self,
9713
9714 request: ::fidl_next::Request<directory::Watch, ___T>,
9715
9716 responder: ::fidl_next::Responder<directory::Watch, ___T>,
9717 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9718
9719 fn on_unknown_interaction(
9720 &mut self,
9721 ordinal: u64,
9722 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9723 ::core::future::ready(())
9724 }
9725}
9726
9727impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Directory
9728where
9729 ___H: DirectoryServerHandler<___T> + ::core::marker::Send,
9730 ___T: ::fidl_next::Transport,
9731 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
9732 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9733 Constraint = (),
9734 >,
9735 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
9736 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9737 Constraint = (),
9738 >,
9739 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
9740 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9741 Constraint = (),
9742 >,
9743 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
9744 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9745 Constraint = (),
9746 >,
9747 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
9748 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9749 Constraint = (),
9750 >,
9751 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
9752 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9753 Constraint = (),
9754 >,
9755 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
9756 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9757 Constraint = (),
9758 >,
9759 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
9760 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9761 Constraint = (),
9762 >,
9763 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
9764 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9765 Constraint = (),
9766 >,
9767 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9768 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9769 Constraint = (),
9770 >,
9771 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9772 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9773 Constraint = (),
9774 >,
9775 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9776 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9777 Constraint = (),
9778 >,
9779 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
9780 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9781 Constraint = (),
9782 >,
9783 for<'de> crate::wire::DirectoryOpenRequest<'de>: ::fidl_next::Decode<
9784 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9785 Constraint = (),
9786 >,
9787 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
9788 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9789 Constraint = (),
9790 >,
9791 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
9792 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9793 Constraint = (),
9794 >,
9795 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
9796 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9797 Constraint = (),
9798 >,
9799 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
9800 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9801 Constraint = (),
9802 >,
9803 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
9804 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9805 Constraint = (),
9806 >,
9807 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
9808 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9809 Constraint = (),
9810 >,
9811{
9812 async fn on_one_way(
9813 handler: &mut ___H,
9814 ordinal: u64,
9815 flexibility: ::fidl_next::protocol::Flexibility,
9816 body: ::fidl_next::Body<___T>,
9817 ) -> ::core::result::Result<
9818 (),
9819 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9820 > {
9821 match ordinal {
9822 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9823 Ok(decoded) => {
9824 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
9825 Ok(())
9826 }
9827 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9828 ordinal: 2366825959783828089,
9829 error,
9830 }),
9831 },
9832
9833 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9834 Ok(decoded) => {
9835 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
9836 Ok(())
9837 }
9838 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9839 ordinal: 6512600400724287855,
9840 error,
9841 }),
9842 },
9843
9844 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9845 Ok(decoded) => {
9846 handler
9847 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
9848 .await;
9849 Ok(())
9850 }
9851 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9852 ordinal: 5431626189872037072,
9853 error,
9854 }),
9855 },
9856
9857 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9858 Ok(decoded) => {
9859 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
9860 Ok(())
9861 }
9862 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9863 ordinal: 3193127272456937152,
9864 error,
9865 }),
9866 },
9867
9868 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
9869 Ok(decoded) => {
9870 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
9871 Ok(())
9872 }
9873 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9874 ordinal: 6236883748953765593,
9875 error,
9876 }),
9877 },
9878
9879 ordinal => {
9880 handler.on_unknown_interaction(ordinal).await;
9881 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
9882 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9883 } else {
9884 Ok(())
9885 }
9886 }
9887 }
9888 }
9889
9890 async fn on_two_way(
9891 handler: &mut ___H,
9892 ordinal: u64,
9893 flexibility: ::fidl_next::protocol::Flexibility,
9894 body: ::fidl_next::Body<___T>,
9895 responder: ::fidl_next::protocol::Responder<___T>,
9896 ) -> ::core::result::Result<
9897 (),
9898 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9899 > {
9900 match ordinal {
9901 7992130864415541162 => {
9902 let responder = ::fidl_next::Responder::from_untyped(responder);
9903
9904 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9905 Ok(decoded) => {
9906 handler
9907 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
9908 .await;
9909 Ok(())
9910 }
9911 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9912 ordinal: 7992130864415541162,
9913 error,
9914 }),
9915 }
9916 }
9917
9918 6540867515453498750 => {
9919 let responder = ::fidl_next::Responder::from_untyped(responder);
9920
9921 handler.close(responder).await;
9922 Ok(())
9923 }
9924
9925 2763219980499352582 => {
9926 let responder = ::fidl_next::Responder::from_untyped(responder);
9927
9928 handler.query(responder).await;
9929 Ok(())
9930 }
9931
9932 8689798978500614909 => {
9933 let responder = ::fidl_next::Responder::from_untyped(responder);
9934
9935 handler.deprecated_get_attr(responder).await;
9936 Ok(())
9937 }
9938
9939 4721673413776871238 => {
9940 let responder = ::fidl_next::Responder::from_untyped(responder);
9941
9942 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9943 Ok(decoded) => {
9944 handler
9945 .deprecated_set_attr(
9946 ::fidl_next::Request::from_decoded(decoded),
9947 responder,
9948 )
9949 .await;
9950 Ok(())
9951 }
9952 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9953 ordinal: 4721673413776871238,
9954 error,
9955 }),
9956 }
9957 }
9958
9959 6595803110182632097 => {
9960 let responder = ::fidl_next::Responder::from_untyped(responder);
9961
9962 handler.deprecated_get_flags(responder).await;
9963 Ok(())
9964 }
9965
9966 5950864159036794675 => {
9967 let responder = ::fidl_next::Responder::from_untyped(responder);
9968
9969 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9970 Ok(decoded) => {
9971 handler
9972 .deprecated_set_flags(
9973 ::fidl_next::Request::from_decoded(decoded),
9974 responder,
9975 )
9976 .await;
9977 Ok(())
9978 }
9979 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9980 ordinal: 5950864159036794675,
9981 error,
9982 }),
9983 }
9984 }
9985
9986 105530239381466147 => {
9987 let responder = ::fidl_next::Responder::from_untyped(responder);
9988
9989 handler.get_flags(responder).await;
9990 Ok(())
9991 }
9992
9993 6172186066099445416 => {
9994 let responder = ::fidl_next::Responder::from_untyped(responder);
9995
9996 match ::fidl_next::AsDecoderExt::into_decoded(body) {
9997 Ok(decoded) => {
9998 handler
9999 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
10000 .await;
10001 Ok(())
10002 }
10003 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10004 ordinal: 6172186066099445416,
10005 error,
10006 }),
10007 }
10008 }
10009
10010 8013111122914313744 => {
10011 let responder = ::fidl_next::Responder::from_untyped(responder);
10012
10013 handler.query_filesystem(responder).await;
10014 Ok(())
10015 }
10016
10017 4414537700416816443 => {
10018 let responder = ::fidl_next::Responder::from_untyped(responder);
10019
10020 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10021 Ok(decoded) => {
10022 handler
10023 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
10024 .await;
10025 Ok(())
10026 }
10027 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10028 ordinal: 4414537700416816443,
10029 error,
10030 }),
10031 }
10032 }
10033
10034 3677402239314018056 => {
10035 let responder = ::fidl_next::Responder::from_untyped(responder);
10036
10037 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10038 Ok(decoded) => {
10039 handler
10040 .update_attributes(
10041 ::fidl_next::Request::from_decoded(decoded),
10042 responder,
10043 )
10044 .await;
10045 Ok(())
10046 }
10047 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10048 ordinal: 3677402239314018056,
10049 error,
10050 }),
10051 }
10052 }
10053
10054 3196473584242777161 => {
10055 let responder = ::fidl_next::Responder::from_untyped(responder);
10056
10057 handler.sync(responder).await;
10058 Ok(())
10059 }
10060
10061 5043930208506967771 => {
10062 let responder = ::fidl_next::Responder::from_untyped(responder);
10063
10064 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10065 Ok(decoded) => {
10066 handler
10067 .get_extended_attribute(
10068 ::fidl_next::Request::from_decoded(decoded),
10069 responder,
10070 )
10071 .await;
10072 Ok(())
10073 }
10074 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10075 ordinal: 5043930208506967771,
10076 error,
10077 }),
10078 }
10079 }
10080
10081 5374223046099989052 => {
10082 let responder = ::fidl_next::Responder::from_untyped(responder);
10083
10084 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10085 Ok(decoded) => {
10086 handler
10087 .set_extended_attribute(
10088 ::fidl_next::Request::from_decoded(decoded),
10089 responder,
10090 )
10091 .await;
10092 Ok(())
10093 }
10094 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10095 ordinal: 5374223046099989052,
10096 error,
10097 }),
10098 }
10099 }
10100
10101 8794297771444732717 => {
10102 let responder = ::fidl_next::Responder::from_untyped(responder);
10103
10104 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10105 Ok(decoded) => {
10106 handler
10107 .remove_extended_attribute(
10108 ::fidl_next::Request::from_decoded(decoded),
10109 responder,
10110 )
10111 .await;
10112 Ok(())
10113 }
10114 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10115 ordinal: 8794297771444732717,
10116 error,
10117 }),
10118 }
10119 }
10120
10121 3855785432100874762 => {
10122 let responder = ::fidl_next::Responder::from_untyped(responder);
10123
10124 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10125 Ok(decoded) => {
10126 handler
10127 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
10128 .await;
10129 Ok(())
10130 }
10131 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10132 ordinal: 3855785432100874762,
10133 error,
10134 }),
10135 }
10136 }
10137
10138 1635123508515392625 => {
10139 let responder = ::fidl_next::Responder::from_untyped(responder);
10140
10141 handler.rewind(responder).await;
10142 Ok(())
10143 }
10144
10145 2787337947777369685 => {
10146 let responder = ::fidl_next::Responder::from_untyped(responder);
10147
10148 handler.get_token(responder).await;
10149 Ok(())
10150 }
10151
10152 8360374984291987687 => {
10153 let responder = ::fidl_next::Responder::from_untyped(responder);
10154
10155 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10156 Ok(decoded) => {
10157 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
10158 Ok(())
10159 }
10160 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10161 ordinal: 8360374984291987687,
10162 error,
10163 }),
10164 }
10165 }
10166
10167 8433556716759383021 => {
10168 let responder = ::fidl_next::Responder::from_untyped(responder);
10169
10170 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10171 Ok(decoded) => {
10172 handler
10173 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
10174 .await;
10175 Ok(())
10176 }
10177 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10178 ordinal: 8433556716759383021,
10179 error,
10180 }),
10181 }
10182 }
10183
10184 8097726607824333022 => {
10185 let responder = ::fidl_next::Responder::from_untyped(responder);
10186
10187 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10188 Ok(decoded) => {
10189 handler
10190 .rename(::fidl_next::Request::from_decoded(decoded), responder)
10191 .await;
10192 Ok(())
10193 }
10194 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10195 ordinal: 8097726607824333022,
10196 error,
10197 }),
10198 }
10199 }
10200
10201 2435901052462315657 => {
10202 let responder = ::fidl_next::Responder::from_untyped(responder);
10203
10204 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10205 Ok(decoded) => {
10206 handler
10207 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
10208 .await;
10209 Ok(())
10210 }
10211 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10212 ordinal: 2435901052462315657,
10213 error,
10214 }),
10215 }
10216 }
10217
10218 6275512344170098065 => {
10219 let responder = ::fidl_next::Responder::from_untyped(responder);
10220
10221 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10222 Ok(decoded) => {
10223 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
10224 Ok(())
10225 }
10226 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10227 ordinal: 6275512344170098065,
10228 error,
10229 }),
10230 }
10231 }
10232
10233 ordinal => {
10234 handler.on_unknown_interaction(ordinal).await;
10235 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
10236 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10237 } else {
10238 responder
10239 .respond(
10240 ordinal,
10241 flexibility,
10242 ::fidl_next::Flexible::<()>::FrameworkErr(
10243 ::fidl_next::FrameworkError::UnknownMethod,
10244 ),
10245 )
10246 .expect("encoding a framework error should never fail")
10247 .await?;
10248 Ok(())
10249 }
10250 }
10251 }
10252 }
10253}
10254
10255#[derive(PartialEq, Debug)]
10257pub struct Linkable;
10258
10259#[cfg(target_os = "fuchsia")]
10260impl ::fidl_next::HasTransport for Linkable {
10261 type Transport = ::fdomain_client::Channel;
10262}
10263
10264pub mod linkable {
10265 pub mod prelude {
10266 pub use crate::{Linkable, LinkableClientHandler, LinkableServerHandler, linkable};
10267
10268 pub use crate::natural::LinkableLinkIntoRequest;
10269
10270 pub use crate::natural::LinkableLinkIntoResponse;
10271 }
10272
10273 pub struct LinkInto;
10274
10275 impl ::fidl_next::Method for LinkInto {
10276 const ORDINAL: u64 = 6121399674497678964;
10277 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10278 ::fidl_next::protocol::Flexibility::Strict;
10279
10280 type Protocol = crate::Linkable;
10281
10282 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
10283 }
10284
10285 impl ::fidl_next::TwoWayMethod for LinkInto {
10286 type Response = ::fidl_next::wire::Result<
10287 'static,
10288 crate::wire::LinkableLinkIntoResponse,
10289 ::fidl_next::wire::Int32,
10290 >;
10291 }
10292
10293 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
10294 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10295
10296 fn respond(response: ___R) -> Self::Output {
10297 ::core::result::Result::Ok(response)
10298 }
10299 }
10300
10301 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
10302 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10303
10304 fn respond_err(response: ___R) -> Self::Output {
10305 ::core::result::Result::Err(response)
10306 }
10307 }
10308
10309 mod ___detail {
10310 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Linkable
10311 where
10312 ___T: ::fidl_next::Transport,
10313 {
10314 type Client = LinkableClient<___T>;
10315 type Server = LinkableServer<___T>;
10316 }
10317
10318 #[repr(transparent)]
10320 pub struct LinkableClient<___T: ::fidl_next::Transport> {
10321 #[allow(dead_code)]
10322 client: ::fidl_next::protocol::Client<___T>,
10323 }
10324
10325 impl<___T> LinkableClient<___T>
10326 where
10327 ___T: ::fidl_next::Transport,
10328 {
10329 #[doc = " Creates a link to this this object with name `dst` in the directory represented by\n `dst_parent_token`.\n\n `dst` must be a resolved object name. Including \"/\" in the string will return\n `ZX_ERR_INVALID_ARGS`.\n\n This method requires the maximal set of rights supported by the filesystem for this object.\n For files this would typically be [`Rights.READ_BYTES`], [`Rights.WRITE_BYTES`],\n [`Rights.GET_ATTRIBUTES`] and [`Rights.UPDATE_ATTRIBUTES`]. Some filesystems might also\n support the [`Rights.EXECUTE`] right. Insufficient rights will result in\n `ZX_ERR_ACCESS_DENIED`.\n\n If this object has no links and is *NOT* an unnamed temporary object (objects opened with\n `Flags.FLAG_CREATE_AS_UNNAMED_TEMPORARY`), it will fail with `ZX_ERR_NOT_FOUND`.\n\n For unnamed temporary objects, use LinkInto to give it a name. Upon successful completion,\n the object will be permanently linked to the filesystem. Requires that the unnamed temporary\n object is linkable, if not, it will fail with `ZX_ERR_NOT_FOUND`.\n\n This method does not have the same atomicity properties has the `Directory::Link` method,\n which means that calling `Open` then `LinkInto` is not equivalent to `Directory::Link`\n because `LinkInto` will not prevent the source from being renamed or unlinked.\n"]
10330 pub fn link_into(
10331 &self,
10332
10333 dst_parent_token: impl ::fidl_next::Encode<
10334 ::fdomain_client::fidl_next::wire::Handle,
10335 <___T as ::fidl_next::Transport>::SendBuffer,
10336 >,
10337
10338 dst: impl ::fidl_next::Encode<
10339 ::fidl_next::wire::String<'static>,
10340 <___T as ::fidl_next::Transport>::SendBuffer,
10341 >,
10342 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
10343 where
10344 <___T as ::fidl_next::Transport>::SendBuffer:
10345 ::fidl_next::encoder::InternalHandleEncoder,
10346 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10347 <___T as ::fidl_next::Transport>::SendBuffer:
10348 ::fdomain_client::fidl_next::HandleEncoder,
10349 {
10350 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
10351 dst_parent_token,
10352
10353 dst,
10354 })
10355 }
10356
10357 #[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"]
10358 pub fn link_into_with<___R>(
10359 &self,
10360 request: ___R,
10361 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
10362 where
10363 ___R: ::fidl_next::Encode<
10364 crate::wire::LinkableLinkIntoRequest<'static>,
10365 <___T as ::fidl_next::Transport>::SendBuffer,
10366 >,
10367 {
10368 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10369 6121399674497678964,
10370 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
10371 request,
10372 ))
10373 }
10374 }
10375
10376 #[repr(transparent)]
10378 pub struct LinkableServer<___T: ::fidl_next::Transport> {
10379 server: ::fidl_next::protocol::Server<___T>,
10380 }
10381
10382 impl<___T> LinkableServer<___T> where ___T: ::fidl_next::Transport {}
10383 }
10384}
10385
10386pub trait LinkableClientHandler<
10390 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
10391 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10392>
10393{
10394}
10395
10396impl<___T> LinkableClientHandler<___T> for ::fidl_next::IgnoreEvents where
10397 ___T: ::fidl_next::Transport
10398{
10399}
10400
10401impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Linkable
10402where
10403 ___H: LinkableClientHandler<___T> + ::core::marker::Send,
10404 ___T: ::fidl_next::Transport,
10405{
10406 async fn on_event(
10407 handler: &mut ___H,
10408 ordinal: u64,
10409 flexibility: ::fidl_next::protocol::Flexibility,
10410 body: ::fidl_next::Body<___T>,
10411 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10412 match ordinal {
10413 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
10414 }
10415 }
10416}
10417
10418pub trait LinkableServerHandler<
10422 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
10423 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10424>
10425{
10426 #[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"]
10427 fn link_into(
10428 &mut self,
10429
10430 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
10431
10432 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
10433 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10434}
10435
10436impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Linkable
10437where
10438 ___H: LinkableServerHandler<___T> + ::core::marker::Send,
10439 ___T: ::fidl_next::Transport,
10440 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
10441 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10442 Constraint = (),
10443 >,
10444{
10445 async fn on_one_way(
10446 handler: &mut ___H,
10447 ordinal: u64,
10448 flexibility: ::fidl_next::protocol::Flexibility,
10449 body: ::fidl_next::Body<___T>,
10450 ) -> ::core::result::Result<
10451 (),
10452 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10453 > {
10454 match ordinal {
10455 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
10456 }
10457 }
10458
10459 async fn on_two_way(
10460 handler: &mut ___H,
10461 ordinal: u64,
10462 flexibility: ::fidl_next::protocol::Flexibility,
10463 body: ::fidl_next::Body<___T>,
10464 responder: ::fidl_next::protocol::Responder<___T>,
10465 ) -> ::core::result::Result<
10466 (),
10467 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10468 > {
10469 match ordinal {
10470 6121399674497678964 => {
10471 let responder = ::fidl_next::Responder::from_untyped(responder);
10472
10473 match ::fidl_next::AsDecoderExt::into_decoded(body) {
10474 Ok(decoded) => {
10475 handler
10476 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
10477 .await;
10478 Ok(())
10479 }
10480 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10481 ordinal: 6121399674497678964,
10482 error,
10483 }),
10484 }
10485 }
10486
10487 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
10488 }
10489 }
10490}
10491
10492#[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"]
10494#[derive(PartialEq, Debug)]
10495pub struct File;
10496
10497impl ::fidl_next::Discoverable for File {
10498 const PROTOCOL_NAME: &'static str = "fuchsia.io.File";
10499}
10500
10501#[cfg(target_os = "fuchsia")]
10502impl ::fidl_next::HasTransport for File {
10503 type Transport = ::fdomain_client::Channel;
10504}
10505
10506pub mod file {
10507 pub mod prelude {
10508 pub use crate::{File, FileClientHandler, FileServerHandler, file};
10509
10510 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
10511
10512 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
10513
10514 pub use crate::natural::ExtendedAttributeValue;
10515
10516 pub use crate::natural::FileAllocateRequest;
10517
10518 pub use crate::natural::FileEnableVerityRequest;
10519
10520 pub use crate::natural::FileGetBackingMemoryRequest;
10521
10522 pub use crate::natural::FileInfo;
10523
10524 pub use crate::natural::FileReadAtRequest;
10525
10526 pub use crate::natural::FileResizeRequest;
10527
10528 pub use crate::natural::FileSeekRequest;
10529
10530 pub use crate::natural::FileWriteAtRequest;
10531
10532 pub use crate::natural::FileAllocateResponse;
10533
10534 pub use crate::natural::FileEnableVerityResponse;
10535
10536 pub use crate::natural::FileGetBackingMemoryResponse;
10537
10538 pub use crate::natural::FileReadAtResponse;
10539
10540 pub use crate::natural::FileResizeResponse;
10541
10542 pub use crate::natural::FileSeekResponse;
10543
10544 pub use crate::natural::FileWriteAtResponse;
10545
10546 pub use crate::natural::LinkableLinkIntoRequest;
10547
10548 pub use crate::natural::LinkableLinkIntoResponse;
10549
10550 pub use crate::natural::MutableNodeAttributes;
10551
10552 pub use crate::natural::NodeAttributes2;
10553
10554 pub use crate::natural::NodeDeprecatedCloneRequest;
10555
10556 pub use crate::natural::NodeDeprecatedGetAttrResponse;
10557
10558 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
10559
10560 pub use crate::natural::NodeDeprecatedSetAttrRequest;
10561
10562 pub use crate::natural::NodeDeprecatedSetAttrResponse;
10563
10564 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
10565
10566 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
10567
10568 pub use crate::natural::NodeGetAttributesRequest;
10569
10570 pub use crate::natural::NodeGetExtendedAttributeRequest;
10571
10572 pub use crate::natural::NodeListExtendedAttributesRequest;
10573
10574 pub use crate::natural::NodeOnOpenRequest;
10575
10576 pub use crate::natural::NodeQueryFilesystemResponse;
10577
10578 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
10579
10580 pub use crate::natural::NodeSetExtendedAttributeRequest;
10581
10582 pub use crate::natural::NodeSetFlagsRequest;
10583
10584 pub use crate::natural::NodeGetFlagsResponse;
10585
10586 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
10587
10588 pub use crate::natural::NodeSetExtendedAttributeResponse;
10589
10590 pub use crate::natural::NodeSetFlagsResponse;
10591
10592 pub use crate::natural::NodeSyncResponse;
10593
10594 pub use crate::natural::NodeUpdateAttributesResponse;
10595
10596 pub use crate::natural::ReadableReadRequest;
10597
10598 pub use crate::natural::ReadableReadResponse;
10599
10600 pub use crate::natural::Representation;
10601
10602 pub use crate::natural::WritableWriteRequest;
10603
10604 pub use crate::natural::WritableWriteResponse;
10605
10606 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
10607
10608 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
10609
10610 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
10611 }
10612
10613 pub struct AdvisoryLock;
10614
10615 impl ::fidl_next::Method for AdvisoryLock {
10616 const ORDINAL: u64 = 7992130864415541162;
10617 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10618 ::fidl_next::protocol::Flexibility::Strict;
10619
10620 type Protocol = crate::File;
10621
10622 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
10623 }
10624
10625 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
10626 type Response = ::fidl_next::wire::Result<
10627 'static,
10628 crate::wire::AdvisoryLockingAdvisoryLockResponse,
10629 ::fidl_next::wire::Int32,
10630 >;
10631 }
10632
10633 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
10634 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10635
10636 fn respond(response: ___R) -> Self::Output {
10637 ::core::result::Result::Ok(response)
10638 }
10639 }
10640
10641 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
10642 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10643
10644 fn respond_err(response: ___R) -> Self::Output {
10645 ::core::result::Result::Err(response)
10646 }
10647 }
10648
10649 pub struct LinkInto;
10650
10651 impl ::fidl_next::Method for LinkInto {
10652 const ORDINAL: u64 = 6121399674497678964;
10653 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10654 ::fidl_next::protocol::Flexibility::Strict;
10655
10656 type Protocol = crate::File;
10657
10658 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
10659 }
10660
10661 impl ::fidl_next::TwoWayMethod for LinkInto {
10662 type Response = ::fidl_next::wire::Result<
10663 'static,
10664 crate::wire::LinkableLinkIntoResponse,
10665 ::fidl_next::wire::Int32,
10666 >;
10667 }
10668
10669 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
10670 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10671
10672 fn respond(response: ___R) -> Self::Output {
10673 ::core::result::Result::Ok(response)
10674 }
10675 }
10676
10677 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
10678 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10679
10680 fn respond_err(response: ___R) -> Self::Output {
10681 ::core::result::Result::Err(response)
10682 }
10683 }
10684
10685 pub struct Clone;
10686
10687 impl ::fidl_next::Method for Clone {
10688 const ORDINAL: u64 = 2366825959783828089;
10689 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10690 ::fidl_next::protocol::Flexibility::Strict;
10691
10692 type Protocol = crate::File;
10693
10694 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
10695 }
10696
10697 pub struct Close;
10698
10699 impl ::fidl_next::Method for Close {
10700 const ORDINAL: u64 = 6540867515453498750;
10701 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10702 ::fidl_next::protocol::Flexibility::Strict;
10703
10704 type Protocol = crate::File;
10705
10706 type Request = ();
10707 }
10708
10709 impl ::fidl_next::TwoWayMethod for Close {
10710 type Response = ::fidl_next::wire::Result<
10711 'static,
10712 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
10713 ::fidl_next::wire::Int32,
10714 >;
10715 }
10716
10717 impl<___R> ::fidl_next::Respond<___R> for Close {
10718 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
10719
10720 fn respond(response: ___R) -> Self::Output {
10721 ::core::result::Result::Ok(response)
10722 }
10723 }
10724
10725 impl<___R> ::fidl_next::RespondErr<___R> for Close {
10726 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
10727
10728 fn respond_err(response: ___R) -> Self::Output {
10729 ::core::result::Result::Err(response)
10730 }
10731 }
10732
10733 pub struct Query;
10734
10735 impl ::fidl_next::Method for Query {
10736 const ORDINAL: u64 = 2763219980499352582;
10737 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10738 ::fidl_next::protocol::Flexibility::Strict;
10739
10740 type Protocol = crate::File;
10741
10742 type Request = ();
10743 }
10744
10745 impl ::fidl_next::TwoWayMethod for Query {
10746 type Response = ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
10747 }
10748
10749 impl<___R> ::fidl_next::Respond<___R> for Query {
10750 type Output = ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
10751
10752 fn respond(response: ___R) -> Self::Output {
10753 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
10754 }
10755 }
10756
10757 pub struct DeprecatedClone;
10758
10759 impl ::fidl_next::Method for DeprecatedClone {
10760 const ORDINAL: u64 = 6512600400724287855;
10761 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10762 ::fidl_next::protocol::Flexibility::Flexible;
10763
10764 type Protocol = crate::File;
10765
10766 type Request = crate::wire::NodeDeprecatedCloneRequest;
10767 }
10768
10769 pub struct OnOpen;
10770
10771 impl ::fidl_next::Method for OnOpen {
10772 const ORDINAL: u64 = 9207534335756671346;
10773 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10774 ::fidl_next::protocol::Flexibility::Flexible;
10775
10776 type Protocol = crate::File;
10777
10778 type Request = crate::wire::NodeOnOpenRequest<'static>;
10779 }
10780
10781 pub struct DeprecatedGetAttr;
10782
10783 impl ::fidl_next::Method for DeprecatedGetAttr {
10784 const ORDINAL: u64 = 8689798978500614909;
10785 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10786 ::fidl_next::protocol::Flexibility::Strict;
10787
10788 type Protocol = crate::File;
10789
10790 type Request = ();
10791 }
10792
10793 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
10794 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
10795 }
10796
10797 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
10798 type Output = ___R;
10799
10800 fn respond(response: ___R) -> Self::Output {
10801 response
10802 }
10803 }
10804
10805 pub struct DeprecatedSetAttr;
10806
10807 impl ::fidl_next::Method for DeprecatedSetAttr {
10808 const ORDINAL: u64 = 4721673413776871238;
10809 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10810 ::fidl_next::protocol::Flexibility::Strict;
10811
10812 type Protocol = crate::File;
10813
10814 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
10815 }
10816
10817 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
10818 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
10819 }
10820
10821 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
10822 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
10823
10824 fn respond(response: ___R) -> Self::Output {
10825 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
10826 }
10827 }
10828
10829 pub struct DeprecatedGetFlags;
10830
10831 impl ::fidl_next::Method for DeprecatedGetFlags {
10832 const ORDINAL: u64 = 6595803110182632097;
10833 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10834 ::fidl_next::protocol::Flexibility::Strict;
10835
10836 type Protocol = crate::File;
10837
10838 type Request = ();
10839 }
10840
10841 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
10842 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
10843 }
10844
10845 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
10846 type Output = ___R;
10847
10848 fn respond(response: ___R) -> Self::Output {
10849 response
10850 }
10851 }
10852
10853 pub struct DeprecatedSetFlags;
10854
10855 impl ::fidl_next::Method for DeprecatedSetFlags {
10856 const ORDINAL: u64 = 5950864159036794675;
10857 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10858 ::fidl_next::protocol::Flexibility::Strict;
10859
10860 type Protocol = crate::File;
10861
10862 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
10863 }
10864
10865 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
10866 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
10867 }
10868
10869 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
10870 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
10871
10872 fn respond(response: ___R) -> Self::Output {
10873 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
10874 }
10875 }
10876
10877 pub struct GetFlags;
10878
10879 impl ::fidl_next::Method for GetFlags {
10880 const ORDINAL: u64 = 105530239381466147;
10881 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10882 ::fidl_next::protocol::Flexibility::Flexible;
10883
10884 type Protocol = crate::File;
10885
10886 type Request = ();
10887 }
10888
10889 impl ::fidl_next::TwoWayMethod for GetFlags {
10890 type Response = ::fidl_next::wire::FlexibleResult<
10891 'static,
10892 crate::wire::NodeGetFlagsResponse,
10893 ::fidl_next::wire::Int32,
10894 >;
10895 }
10896
10897 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
10898 type Output = ::fidl_next::FlexibleResult<
10899 crate::generic::NodeGetFlagsResponse<___R>,
10900 ::fidl_next::util::Never,
10901 >;
10902
10903 fn respond(response: ___R) -> Self::Output {
10904 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
10905 flags: response,
10906 })
10907 }
10908 }
10909
10910 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
10911 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
10912
10913 fn respond_err(response: ___R) -> Self::Output {
10914 ::fidl_next::FlexibleResult::Err(response)
10915 }
10916 }
10917
10918 pub struct SetFlags;
10919
10920 impl ::fidl_next::Method for SetFlags {
10921 const ORDINAL: u64 = 6172186066099445416;
10922 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10923 ::fidl_next::protocol::Flexibility::Flexible;
10924
10925 type Protocol = crate::File;
10926
10927 type Request = crate::wire::NodeSetFlagsRequest;
10928 }
10929
10930 impl ::fidl_next::TwoWayMethod for SetFlags {
10931 type Response = ::fidl_next::wire::FlexibleResult<
10932 'static,
10933 crate::wire::NodeSetFlagsResponse,
10934 ::fidl_next::wire::Int32,
10935 >;
10936 }
10937
10938 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
10939 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
10940
10941 fn respond(response: ___R) -> Self::Output {
10942 ::fidl_next::FlexibleResult::Ok(response)
10943 }
10944 }
10945
10946 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
10947 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
10948
10949 fn respond_err(response: ___R) -> Self::Output {
10950 ::fidl_next::FlexibleResult::Err(response)
10951 }
10952 }
10953
10954 pub struct QueryFilesystem;
10955
10956 impl ::fidl_next::Method for QueryFilesystem {
10957 const ORDINAL: u64 = 8013111122914313744;
10958 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10959 ::fidl_next::protocol::Flexibility::Strict;
10960
10961 type Protocol = crate::File;
10962
10963 type Request = ();
10964 }
10965
10966 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
10967 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
10968 }
10969
10970 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
10971 type Output = ___R;
10972
10973 fn respond(response: ___R) -> Self::Output {
10974 response
10975 }
10976 }
10977
10978 pub struct OnRepresentation;
10979
10980 impl ::fidl_next::Method for OnRepresentation {
10981 const ORDINAL: u64 = 6679970090861613324;
10982 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10983 ::fidl_next::protocol::Flexibility::Strict;
10984
10985 type Protocol = crate::File;
10986
10987 type Request = crate::wire::Representation<'static>;
10988 }
10989
10990 pub struct GetAttributes;
10991
10992 impl ::fidl_next::Method for GetAttributes {
10993 const ORDINAL: u64 = 4414537700416816443;
10994 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10995 ::fidl_next::protocol::Flexibility::Strict;
10996
10997 type Protocol = crate::File;
10998
10999 type Request = crate::wire::NodeGetAttributesRequest;
11000 }
11001
11002 impl ::fidl_next::TwoWayMethod for GetAttributes {
11003 type Response = ::fidl_next::wire::Result<
11004 'static,
11005 crate::wire::NodeAttributes2<'static>,
11006 ::fidl_next::wire::Int32,
11007 >;
11008 }
11009
11010 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
11011 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11012
11013 fn respond(response: ___R) -> Self::Output {
11014 ::core::result::Result::Ok(response)
11015 }
11016 }
11017
11018 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
11019 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11020
11021 fn respond_err(response: ___R) -> Self::Output {
11022 ::core::result::Result::Err(response)
11023 }
11024 }
11025
11026 pub struct UpdateAttributes;
11027
11028 impl ::fidl_next::Method for UpdateAttributes {
11029 const ORDINAL: u64 = 3677402239314018056;
11030 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11031 ::fidl_next::protocol::Flexibility::Strict;
11032
11033 type Protocol = crate::File;
11034
11035 type Request = crate::wire::MutableNodeAttributes<'static>;
11036 }
11037
11038 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
11039 type Response = ::fidl_next::wire::Result<
11040 'static,
11041 crate::wire::NodeUpdateAttributesResponse,
11042 ::fidl_next::wire::Int32,
11043 >;
11044 }
11045
11046 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
11047 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11048
11049 fn respond(response: ___R) -> Self::Output {
11050 ::core::result::Result::Ok(response)
11051 }
11052 }
11053
11054 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
11055 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11056
11057 fn respond_err(response: ___R) -> Self::Output {
11058 ::core::result::Result::Err(response)
11059 }
11060 }
11061
11062 pub struct Sync;
11063
11064 impl ::fidl_next::Method for Sync {
11065 const ORDINAL: u64 = 3196473584242777161;
11066 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11067 ::fidl_next::protocol::Flexibility::Strict;
11068
11069 type Protocol = crate::File;
11070
11071 type Request = ();
11072 }
11073
11074 impl ::fidl_next::TwoWayMethod for Sync {
11075 type Response = ::fidl_next::wire::Result<
11076 'static,
11077 crate::wire::NodeSyncResponse,
11078 ::fidl_next::wire::Int32,
11079 >;
11080 }
11081
11082 impl<___R> ::fidl_next::Respond<___R> for Sync {
11083 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11084
11085 fn respond(response: ___R) -> Self::Output {
11086 ::core::result::Result::Ok(response)
11087 }
11088 }
11089
11090 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
11091 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11092
11093 fn respond_err(response: ___R) -> Self::Output {
11094 ::core::result::Result::Err(response)
11095 }
11096 }
11097
11098 pub struct ListExtendedAttributes;
11099
11100 impl ::fidl_next::Method for ListExtendedAttributes {
11101 const ORDINAL: u64 = 5431626189872037072;
11102 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11103 ::fidl_next::protocol::Flexibility::Strict;
11104
11105 type Protocol = crate::File;
11106
11107 type Request = crate::wire::NodeListExtendedAttributesRequest;
11108 }
11109
11110 pub struct GetExtendedAttribute;
11111
11112 impl ::fidl_next::Method for GetExtendedAttribute {
11113 const ORDINAL: u64 = 5043930208506967771;
11114 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11115 ::fidl_next::protocol::Flexibility::Strict;
11116
11117 type Protocol = crate::File;
11118
11119 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
11120 }
11121
11122 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
11123 type Response = ::fidl_next::wire::Result<
11124 'static,
11125 crate::wire::ExtendedAttributeValue<'static>,
11126 ::fidl_next::wire::Int32,
11127 >;
11128 }
11129
11130 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
11131 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11132
11133 fn respond(response: ___R) -> Self::Output {
11134 ::core::result::Result::Ok(response)
11135 }
11136 }
11137
11138 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
11139 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11140
11141 fn respond_err(response: ___R) -> Self::Output {
11142 ::core::result::Result::Err(response)
11143 }
11144 }
11145
11146 pub struct SetExtendedAttribute;
11147
11148 impl ::fidl_next::Method for SetExtendedAttribute {
11149 const ORDINAL: u64 = 5374223046099989052;
11150 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11151 ::fidl_next::protocol::Flexibility::Strict;
11152
11153 type Protocol = crate::File;
11154
11155 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
11156 }
11157
11158 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
11159 type Response = ::fidl_next::wire::Result<
11160 'static,
11161 crate::wire::NodeSetExtendedAttributeResponse,
11162 ::fidl_next::wire::Int32,
11163 >;
11164 }
11165
11166 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
11167 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11168
11169 fn respond(response: ___R) -> Self::Output {
11170 ::core::result::Result::Ok(response)
11171 }
11172 }
11173
11174 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
11175 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11176
11177 fn respond_err(response: ___R) -> Self::Output {
11178 ::core::result::Result::Err(response)
11179 }
11180 }
11181
11182 pub struct RemoveExtendedAttribute;
11183
11184 impl ::fidl_next::Method for RemoveExtendedAttribute {
11185 const ORDINAL: u64 = 8794297771444732717;
11186 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11187 ::fidl_next::protocol::Flexibility::Strict;
11188
11189 type Protocol = crate::File;
11190
11191 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
11192 }
11193
11194 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
11195 type Response = ::fidl_next::wire::Result<
11196 'static,
11197 crate::wire::NodeRemoveExtendedAttributeResponse,
11198 ::fidl_next::wire::Int32,
11199 >;
11200 }
11201
11202 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
11203 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11204
11205 fn respond(response: ___R) -> Self::Output {
11206 ::core::result::Result::Ok(response)
11207 }
11208 }
11209
11210 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
11211 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11212
11213 fn respond_err(response: ___R) -> Self::Output {
11214 ::core::result::Result::Err(response)
11215 }
11216 }
11217
11218 pub struct Read;
11219
11220 impl ::fidl_next::Method for Read {
11221 const ORDINAL: u64 = 395825947633028830;
11222 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11223 ::fidl_next::protocol::Flexibility::Strict;
11224
11225 type Protocol = crate::File;
11226
11227 type Request = crate::wire::ReadableReadRequest;
11228 }
11229
11230 impl ::fidl_next::TwoWayMethod for Read {
11231 type Response = ::fidl_next::wire::Result<
11232 'static,
11233 crate::wire::ReadableReadResponse<'static>,
11234 ::fidl_next::wire::Int32,
11235 >;
11236 }
11237
11238 impl<___R> ::fidl_next::Respond<___R> for Read {
11239 type Output = ::core::result::Result<
11240 crate::generic::ReadableReadResponse<___R>,
11241 ::fidl_next::util::Never,
11242 >;
11243
11244 fn respond(response: ___R) -> Self::Output {
11245 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
11246 }
11247 }
11248
11249 impl<___R> ::fidl_next::RespondErr<___R> for Read {
11250 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11251
11252 fn respond_err(response: ___R) -> Self::Output {
11253 ::core::result::Result::Err(response)
11254 }
11255 }
11256
11257 pub struct Write;
11258
11259 impl ::fidl_next::Method for Write {
11260 const ORDINAL: u64 = 7651971425397809026;
11261 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11262 ::fidl_next::protocol::Flexibility::Strict;
11263
11264 type Protocol = crate::File;
11265
11266 type Request = crate::wire::WritableWriteRequest<'static>;
11267 }
11268
11269 impl ::fidl_next::TwoWayMethod for Write {
11270 type Response = ::fidl_next::wire::Result<
11271 'static,
11272 crate::wire::WritableWriteResponse,
11273 ::fidl_next::wire::Int32,
11274 >;
11275 }
11276
11277 impl<___R> ::fidl_next::Respond<___R> for Write {
11278 type Output = ::core::result::Result<
11279 crate::generic::WritableWriteResponse<___R>,
11280 ::fidl_next::util::Never,
11281 >;
11282
11283 fn respond(response: ___R) -> Self::Output {
11284 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
11285 actual_count: response,
11286 })
11287 }
11288 }
11289
11290 impl<___R> ::fidl_next::RespondErr<___R> for Write {
11291 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11292
11293 fn respond_err(response: ___R) -> Self::Output {
11294 ::core::result::Result::Err(response)
11295 }
11296 }
11297
11298 pub struct Describe;
11299
11300 impl ::fidl_next::Method for Describe {
11301 const ORDINAL: u64 = 7545125870053689020;
11302 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11303 ::fidl_next::protocol::Flexibility::Strict;
11304
11305 type Protocol = crate::File;
11306
11307 type Request = ();
11308 }
11309
11310 impl ::fidl_next::TwoWayMethod for Describe {
11311 type Response = crate::wire::FileInfo<'static>;
11312 }
11313
11314 impl<___R> ::fidl_next::Respond<___R> for Describe {
11315 type Output = ___R;
11316
11317 fn respond(response: ___R) -> Self::Output {
11318 response
11319 }
11320 }
11321
11322 pub struct Seek;
11323
11324 impl ::fidl_next::Method for Seek {
11325 const ORDINAL: u64 = 8649041485622956551;
11326 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11327 ::fidl_next::protocol::Flexibility::Strict;
11328
11329 type Protocol = crate::File;
11330
11331 type Request = crate::wire::FileSeekRequest;
11332 }
11333
11334 impl ::fidl_next::TwoWayMethod for Seek {
11335 type Response = ::fidl_next::wire::Result<
11336 'static,
11337 crate::wire::FileSeekResponse,
11338 ::fidl_next::wire::Int32,
11339 >;
11340 }
11341
11342 impl<___R> ::fidl_next::Respond<___R> for Seek {
11343 type Output = ::core::result::Result<
11344 crate::generic::FileSeekResponse<___R>,
11345 ::fidl_next::util::Never,
11346 >;
11347
11348 fn respond(response: ___R) -> Self::Output {
11349 ::core::result::Result::Ok(crate::generic::FileSeekResponse {
11350 offset_from_start: response,
11351 })
11352 }
11353 }
11354
11355 impl<___R> ::fidl_next::RespondErr<___R> for Seek {
11356 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11357
11358 fn respond_err(response: ___R) -> Self::Output {
11359 ::core::result::Result::Err(response)
11360 }
11361 }
11362
11363 pub struct ReadAt;
11364
11365 impl ::fidl_next::Method for ReadAt {
11366 const ORDINAL: u64 = 1587416148701180478;
11367 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11368 ::fidl_next::protocol::Flexibility::Strict;
11369
11370 type Protocol = crate::File;
11371
11372 type Request = crate::wire::FileReadAtRequest;
11373 }
11374
11375 impl ::fidl_next::TwoWayMethod for ReadAt {
11376 type Response = ::fidl_next::wire::Result<
11377 'static,
11378 crate::wire::FileReadAtResponse<'static>,
11379 ::fidl_next::wire::Int32,
11380 >;
11381 }
11382
11383 impl<___R> ::fidl_next::Respond<___R> for ReadAt {
11384 type Output = ::core::result::Result<
11385 crate::generic::FileReadAtResponse<___R>,
11386 ::fidl_next::util::Never,
11387 >;
11388
11389 fn respond(response: ___R) -> Self::Output {
11390 ::core::result::Result::Ok(crate::generic::FileReadAtResponse { data: response })
11391 }
11392 }
11393
11394 impl<___R> ::fidl_next::RespondErr<___R> for ReadAt {
11395 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11396
11397 fn respond_err(response: ___R) -> Self::Output {
11398 ::core::result::Result::Err(response)
11399 }
11400 }
11401
11402 pub struct WriteAt;
11403
11404 impl ::fidl_next::Method for WriteAt {
11405 const ORDINAL: u64 = 8736683935131400491;
11406 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11407 ::fidl_next::protocol::Flexibility::Strict;
11408
11409 type Protocol = crate::File;
11410
11411 type Request = crate::wire::FileWriteAtRequest<'static>;
11412 }
11413
11414 impl ::fidl_next::TwoWayMethod for WriteAt {
11415 type Response = ::fidl_next::wire::Result<
11416 'static,
11417 crate::wire::FileWriteAtResponse,
11418 ::fidl_next::wire::Int32,
11419 >;
11420 }
11421
11422 impl<___R> ::fidl_next::Respond<___R> for WriteAt {
11423 type Output = ::core::result::Result<
11424 crate::generic::FileWriteAtResponse<___R>,
11425 ::fidl_next::util::Never,
11426 >;
11427
11428 fn respond(response: ___R) -> Self::Output {
11429 ::core::result::Result::Ok(crate::generic::FileWriteAtResponse {
11430 actual_count: response,
11431 })
11432 }
11433 }
11434
11435 impl<___R> ::fidl_next::RespondErr<___R> for WriteAt {
11436 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11437
11438 fn respond_err(response: ___R) -> Self::Output {
11439 ::core::result::Result::Err(response)
11440 }
11441 }
11442
11443 pub struct Resize;
11444
11445 impl ::fidl_next::Method for Resize {
11446 const ORDINAL: u64 = 3134648685270758458;
11447 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11448 ::fidl_next::protocol::Flexibility::Strict;
11449
11450 type Protocol = crate::File;
11451
11452 type Request = crate::wire::FileResizeRequest;
11453 }
11454
11455 impl ::fidl_next::TwoWayMethod for Resize {
11456 type Response = ::fidl_next::wire::Result<
11457 'static,
11458 crate::wire::FileResizeResponse,
11459 ::fidl_next::wire::Int32,
11460 >;
11461 }
11462
11463 impl<___R> ::fidl_next::Respond<___R> for Resize {
11464 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
11465
11466 fn respond(response: ___R) -> Self::Output {
11467 ::core::result::Result::Ok(response)
11468 }
11469 }
11470
11471 impl<___R> ::fidl_next::RespondErr<___R> for Resize {
11472 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11473
11474 fn respond_err(response: ___R) -> Self::Output {
11475 ::core::result::Result::Err(response)
11476 }
11477 }
11478
11479 pub struct GetBackingMemory;
11480
11481 impl ::fidl_next::Method for GetBackingMemory {
11482 const ORDINAL: u64 = 46911652864194091;
11483 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11484 ::fidl_next::protocol::Flexibility::Strict;
11485
11486 type Protocol = crate::File;
11487
11488 type Request = crate::wire::FileGetBackingMemoryRequest;
11489 }
11490
11491 impl ::fidl_next::TwoWayMethod for GetBackingMemory {
11492 type Response = ::fidl_next::wire::Result<
11493 'static,
11494 crate::wire::FileGetBackingMemoryResponse,
11495 ::fidl_next::wire::Int32,
11496 >;
11497 }
11498
11499 impl<___R> ::fidl_next::Respond<___R> for GetBackingMemory {
11500 type Output = ::core::result::Result<
11501 crate::generic::FileGetBackingMemoryResponse<___R>,
11502 ::fidl_next::util::Never,
11503 >;
11504
11505 fn respond(response: ___R) -> Self::Output {
11506 ::core::result::Result::Ok(crate::generic::FileGetBackingMemoryResponse {
11507 vmo: response,
11508 })
11509 }
11510 }
11511
11512 impl<___R> ::fidl_next::RespondErr<___R> for GetBackingMemory {
11513 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
11514
11515 fn respond_err(response: ___R) -> Self::Output {
11516 ::core::result::Result::Err(response)
11517 }
11518 }
11519
11520 pub struct Allocate;
11521
11522 impl ::fidl_next::Method for Allocate {
11523 const ORDINAL: u64 = 8645235848064269614;
11524 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11525 ::fidl_next::protocol::Flexibility::Flexible;
11526
11527 type Protocol = crate::File;
11528
11529 type Request = crate::wire::FileAllocateRequest;
11530 }
11531
11532 impl ::fidl_next::TwoWayMethod for Allocate {
11533 type Response = ::fidl_next::wire::FlexibleResult<
11534 'static,
11535 crate::wire::FileAllocateResponse,
11536 ::fidl_next::wire::Int32,
11537 >;
11538 }
11539
11540 impl<___R> ::fidl_next::Respond<___R> for Allocate {
11541 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
11542
11543 fn respond(response: ___R) -> Self::Output {
11544 ::fidl_next::FlexibleResult::Ok(response)
11545 }
11546 }
11547
11548 impl<___R> ::fidl_next::RespondErr<___R> for Allocate {
11549 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
11550
11551 fn respond_err(response: ___R) -> Self::Output {
11552 ::fidl_next::FlexibleResult::Err(response)
11553 }
11554 }
11555
11556 pub struct EnableVerity;
11557
11558 impl ::fidl_next::Method for EnableVerity {
11559 const ORDINAL: u64 = 3189145313204943035;
11560 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
11561 ::fidl_next::protocol::Flexibility::Flexible;
11562
11563 type Protocol = crate::File;
11564
11565 type Request = crate::wire::FileEnableVerityRequest<'static>;
11566 }
11567
11568 impl ::fidl_next::TwoWayMethod for EnableVerity {
11569 type Response = ::fidl_next::wire::FlexibleResult<
11570 'static,
11571 crate::wire::FileEnableVerityResponse,
11572 ::fidl_next::wire::Int32,
11573 >;
11574 }
11575
11576 impl<___R> ::fidl_next::Respond<___R> for EnableVerity {
11577 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
11578
11579 fn respond(response: ___R) -> Self::Output {
11580 ::fidl_next::FlexibleResult::Ok(response)
11581 }
11582 }
11583
11584 impl<___R> ::fidl_next::RespondErr<___R> for EnableVerity {
11585 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
11586
11587 fn respond_err(response: ___R) -> Self::Output {
11588 ::fidl_next::FlexibleResult::Err(response)
11589 }
11590 }
11591
11592 mod ___detail {
11593 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::File
11594 where
11595 ___T: ::fidl_next::Transport,
11596 {
11597 type Client = FileClient<___T>;
11598 type Server = FileServer<___T>;
11599 }
11600
11601 #[repr(transparent)]
11603 pub struct FileClient<___T: ::fidl_next::Transport> {
11604 #[allow(dead_code)]
11605 client: ::fidl_next::protocol::Client<___T>,
11606 }
11607
11608 impl<___T> FileClient<___T>
11609 where
11610 ___T: ::fidl_next::Transport,
11611 {
11612 #[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"]
11613 pub fn advisory_lock(
11614 &self,
11615
11616 request: impl ::fidl_next::Encode<
11617 crate::wire::AdvisoryLockRequest<'static>,
11618 <___T as ::fidl_next::Transport>::SendBuffer,
11619 >,
11620 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
11621 where
11622 <___T as ::fidl_next::Transport>::SendBuffer:
11623 ::fidl_next::encoder::InternalHandleEncoder,
11624 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11625 {
11626 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
11627 request,
11628 })
11629 }
11630
11631 #[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"]
11632 pub fn advisory_lock_with<___R>(
11633 &self,
11634 request: ___R,
11635 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
11636 where
11637 ___R: ::fidl_next::Encode<
11638 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
11639 <___T as ::fidl_next::Transport>::SendBuffer,
11640 >,
11641 {
11642 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11643 7992130864415541162,
11644 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
11645 request,
11646 ))
11647 }
11648
11649 #[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"]
11650 pub fn link_into(
11651 &self,
11652
11653 dst_parent_token: impl ::fidl_next::Encode<
11654 ::fdomain_client::fidl_next::wire::Handle,
11655 <___T as ::fidl_next::Transport>::SendBuffer,
11656 >,
11657
11658 dst: impl ::fidl_next::Encode<
11659 ::fidl_next::wire::String<'static>,
11660 <___T as ::fidl_next::Transport>::SendBuffer,
11661 >,
11662 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
11663 where
11664 <___T as ::fidl_next::Transport>::SendBuffer:
11665 ::fidl_next::encoder::InternalHandleEncoder,
11666 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11667 <___T as ::fidl_next::Transport>::SendBuffer:
11668 ::fdomain_client::fidl_next::HandleEncoder,
11669 {
11670 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
11671 dst_parent_token,
11672
11673 dst,
11674 })
11675 }
11676
11677 #[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"]
11678 pub fn link_into_with<___R>(
11679 &self,
11680 request: ___R,
11681 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
11682 where
11683 ___R: ::fidl_next::Encode<
11684 crate::wire::LinkableLinkIntoRequest<'static>,
11685 <___T as ::fidl_next::Transport>::SendBuffer,
11686 >,
11687 {
11688 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11689 6121399674497678964,
11690 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
11691 request,
11692 ))
11693 }
11694
11695 pub fn clone(
11696 &self,
11697
11698 request: impl ::fidl_next::Encode<
11699 ::fidl_next::ServerEnd<
11700 ::fdomain_next_fuchsia_unknown::Cloneable,
11701 ::fdomain_client::fidl_next::wire::Handle,
11702 >,
11703 <___T as ::fidl_next::Transport>::SendBuffer,
11704 >,
11705 ) -> ::fidl_next::SendFuture<'_, ___T>
11706 where
11707 <___T as ::fidl_next::Transport>::SendBuffer:
11708 ::fidl_next::encoder::InternalHandleEncoder,
11709 <___T as ::fidl_next::Transport>::SendBuffer:
11710 ::fdomain_client::fidl_next::HandleEncoder,
11711 {
11712 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
11713 request,
11714 })
11715 }
11716
11717 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
11718 where
11719 ___R: ::fidl_next::Encode<
11720 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
11721 <___T as ::fidl_next::Transport>::SendBuffer,
11722 >,
11723 {
11724 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
11725 2366825959783828089,
11726 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
11727 request,
11728 ))
11729 }
11730
11731 #[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"]
11732 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
11733 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11734 6540867515453498750,
11735 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
11736 (),
11737 ))
11738 }
11739
11740 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
11741 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11742 2763219980499352582,
11743 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
11744 (),
11745 ))
11746 }
11747
11748 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11749 pub fn deprecated_clone(
11750 &self,
11751
11752 flags: impl ::fidl_next::Encode<
11753 crate::wire::OpenFlags,
11754 <___T as ::fidl_next::Transport>::SendBuffer,
11755 >,
11756
11757 object: impl ::fidl_next::Encode<
11758 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
11759 <___T as ::fidl_next::Transport>::SendBuffer,
11760 >,
11761 ) -> ::fidl_next::SendFuture<'_, ___T>
11762 where
11763 <___T as ::fidl_next::Transport>::SendBuffer:
11764 ::fidl_next::encoder::InternalHandleEncoder,
11765 <___T as ::fidl_next::Transport>::SendBuffer:
11766 ::fdomain_client::fidl_next::HandleEncoder,
11767 {
11768 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
11769 flags,
11770
11771 object,
11772 })
11773 }
11774
11775 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11776 pub fn deprecated_clone_with<___R>(
11777 &self,
11778 request: ___R,
11779 ) -> ::fidl_next::SendFuture<'_, ___T>
11780 where
11781 ___R: ::fidl_next::Encode<
11782 crate::wire::NodeDeprecatedCloneRequest,
11783 <___T as ::fidl_next::Transport>::SendBuffer,
11784 >,
11785 {
11786 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
11787 6512600400724287855,
11788 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
11789 request,
11790 ))
11791 }
11792
11793 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
11794 pub fn deprecated_get_attr(
11795 &self,
11796 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
11797 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11798 8689798978500614909,
11799 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
11800 (),
11801 ))
11802 }
11803
11804 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
11805 pub fn deprecated_set_attr(
11806 &self,
11807
11808 flags: impl ::fidl_next::Encode<
11809 crate::wire::NodeAttributeFlags,
11810 <___T as ::fidl_next::Transport>::SendBuffer,
11811 >,
11812
11813 attributes: impl ::fidl_next::Encode<
11814 crate::wire::NodeAttributes,
11815 <___T as ::fidl_next::Transport>::SendBuffer,
11816 >,
11817 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
11818 where
11819 <___T as ::fidl_next::Transport>::SendBuffer:
11820 ::fidl_next::encoder::InternalHandleEncoder,
11821 {
11822 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
11823 flags,
11824
11825 attributes,
11826 })
11827 }
11828
11829 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
11830 pub fn deprecated_set_attr_with<___R>(
11831 &self,
11832 request: ___R,
11833 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
11834 where
11835 ___R: ::fidl_next::Encode<
11836 crate::wire::NodeDeprecatedSetAttrRequest,
11837 <___T as ::fidl_next::Transport>::SendBuffer,
11838 >,
11839 {
11840 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11841 4721673413776871238,
11842 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
11843 request,
11844 ))
11845 }
11846
11847 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
11848 pub fn deprecated_get_flags(
11849 &self,
11850 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
11851 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11852 6595803110182632097,
11853 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
11854 (),
11855 ))
11856 }
11857
11858 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11859 pub fn deprecated_set_flags(
11860 &self,
11861
11862 flags: impl ::fidl_next::Encode<
11863 crate::wire::OpenFlags,
11864 <___T as ::fidl_next::Transport>::SendBuffer,
11865 >,
11866 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
11867 where
11868 <___T as ::fidl_next::Transport>::SendBuffer:
11869 ::fidl_next::encoder::InternalHandleEncoder,
11870 {
11871 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
11872 flags,
11873 })
11874 }
11875
11876 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11877 pub fn deprecated_set_flags_with<___R>(
11878 &self,
11879 request: ___R,
11880 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
11881 where
11882 ___R: ::fidl_next::Encode<
11883 crate::wire::NodeDeprecatedSetFlagsRequest,
11884 <___T as ::fidl_next::Transport>::SendBuffer,
11885 >,
11886 {
11887 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11888 5950864159036794675,
11889 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
11890 request,
11891 ))
11892 }
11893
11894 #[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"]
11895 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
11896 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11897 105530239381466147,
11898 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
11899 (),
11900 ))
11901 }
11902
11903 #[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"]
11904 pub fn set_flags(
11905 &self,
11906
11907 flags: impl ::fidl_next::Encode<
11908 crate::wire::Flags,
11909 <___T as ::fidl_next::Transport>::SendBuffer,
11910 >,
11911 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
11912 where
11913 <___T as ::fidl_next::Transport>::SendBuffer:
11914 ::fidl_next::encoder::InternalHandleEncoder,
11915 {
11916 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
11917 }
11918
11919 #[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"]
11920 pub fn set_flags_with<___R>(
11921 &self,
11922 request: ___R,
11923 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
11924 where
11925 ___R: ::fidl_next::Encode<
11926 crate::wire::NodeSetFlagsRequest,
11927 <___T as ::fidl_next::Transport>::SendBuffer,
11928 >,
11929 {
11930 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11931 6172186066099445416,
11932 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
11933 request,
11934 ))
11935 }
11936
11937 #[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"]
11938 pub fn query_filesystem(
11939 &self,
11940 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
11941 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11942 8013111122914313744,
11943 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
11944 (),
11945 ))
11946 }
11947
11948 #[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"]
11949 pub fn get_attributes(
11950 &self,
11951
11952 query: impl ::fidl_next::Encode<
11953 crate::wire::NodeAttributesQuery,
11954 <___T as ::fidl_next::Transport>::SendBuffer,
11955 >,
11956 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
11957 where
11958 <___T as ::fidl_next::Transport>::SendBuffer:
11959 ::fidl_next::encoder::InternalHandleEncoder,
11960 {
11961 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
11962 }
11963
11964 #[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"]
11965 pub fn get_attributes_with<___R>(
11966 &self,
11967 request: ___R,
11968 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
11969 where
11970 ___R: ::fidl_next::Encode<
11971 crate::wire::NodeGetAttributesRequest,
11972 <___T as ::fidl_next::Transport>::SendBuffer,
11973 >,
11974 {
11975 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11976 4414537700416816443,
11977 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
11978 request,
11979 ))
11980 }
11981
11982 #[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"]
11983 pub fn update_attributes_with<___R>(
11984 &self,
11985 request: ___R,
11986 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
11987 where
11988 ___R: ::fidl_next::Encode<
11989 crate::wire::MutableNodeAttributes<'static>,
11990 <___T as ::fidl_next::Transport>::SendBuffer,
11991 >,
11992 {
11993 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11994 3677402239314018056,
11995 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
11996 request,
11997 ))
11998 }
11999
12000 #[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"]
12001 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
12002 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12003 3196473584242777161,
12004 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
12005 (),
12006 ))
12007 }
12008
12009 #[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"]
12010 pub fn list_extended_attributes(
12011 &self,
12012
12013 iterator: impl ::fidl_next::Encode<
12014 ::fidl_next::ServerEnd<
12015 crate::ExtendedAttributeIterator,
12016 ::fdomain_client::fidl_next::wire::Handle,
12017 >,
12018 <___T as ::fidl_next::Transport>::SendBuffer,
12019 >,
12020 ) -> ::fidl_next::SendFuture<'_, ___T>
12021 where
12022 <___T as ::fidl_next::Transport>::SendBuffer:
12023 ::fidl_next::encoder::InternalHandleEncoder,
12024 <___T as ::fidl_next::Transport>::SendBuffer:
12025 ::fdomain_client::fidl_next::HandleEncoder,
12026 {
12027 self.list_extended_attributes_with(
12028 crate::generic::NodeListExtendedAttributesRequest { iterator },
12029 )
12030 }
12031
12032 #[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"]
12033 pub fn list_extended_attributes_with<___R>(
12034 &self,
12035 request: ___R,
12036 ) -> ::fidl_next::SendFuture<'_, ___T>
12037 where
12038 ___R: ::fidl_next::Encode<
12039 crate::wire::NodeListExtendedAttributesRequest,
12040 <___T as ::fidl_next::Transport>::SendBuffer,
12041 >,
12042 {
12043 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
12044 5431626189872037072,
12045 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
12046 request,
12047 ))
12048 }
12049
12050 #[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"]
12051 pub fn get_extended_attribute(
12052 &self,
12053
12054 name: impl ::fidl_next::Encode<
12055 ::fidl_next::wire::Vector<'static, u8>,
12056 <___T as ::fidl_next::Transport>::SendBuffer,
12057 >,
12058 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
12059 where
12060 <___T as ::fidl_next::Transport>::SendBuffer:
12061 ::fidl_next::encoder::InternalHandleEncoder,
12062 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12063 {
12064 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
12065 name,
12066 })
12067 }
12068
12069 #[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"]
12070 pub fn get_extended_attribute_with<___R>(
12071 &self,
12072 request: ___R,
12073 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
12074 where
12075 ___R: ::fidl_next::Encode<
12076 crate::wire::NodeGetExtendedAttributeRequest<'static>,
12077 <___T as ::fidl_next::Transport>::SendBuffer,
12078 >,
12079 {
12080 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12081 5043930208506967771,
12082 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
12083 request,
12084 ))
12085 }
12086
12087 #[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"]
12088 pub fn set_extended_attribute(
12089 &self,
12090
12091 name: impl ::fidl_next::Encode<
12092 ::fidl_next::wire::Vector<'static, u8>,
12093 <___T as ::fidl_next::Transport>::SendBuffer,
12094 >,
12095
12096 value: impl ::fidl_next::Encode<
12097 crate::wire::ExtendedAttributeValue<'static>,
12098 <___T as ::fidl_next::Transport>::SendBuffer,
12099 >,
12100
12101 mode: impl ::fidl_next::Encode<
12102 crate::wire::SetExtendedAttributeMode,
12103 <___T as ::fidl_next::Transport>::SendBuffer,
12104 >,
12105 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
12106 where
12107 <___T as ::fidl_next::Transport>::SendBuffer:
12108 ::fidl_next::encoder::InternalHandleEncoder,
12109 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12110 <___T as ::fidl_next::Transport>::SendBuffer:
12111 ::fdomain_client::fidl_next::HandleEncoder,
12112 {
12113 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
12114 name,
12115
12116 value,
12117
12118 mode,
12119 })
12120 }
12121
12122 #[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"]
12123 pub fn set_extended_attribute_with<___R>(
12124 &self,
12125 request: ___R,
12126 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
12127 where
12128 ___R: ::fidl_next::Encode<
12129 crate::wire::NodeSetExtendedAttributeRequest<'static>,
12130 <___T as ::fidl_next::Transport>::SendBuffer,
12131 >,
12132 {
12133 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12134 5374223046099989052,
12135 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
12136 request,
12137 ))
12138 }
12139
12140 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
12141 pub fn remove_extended_attribute(
12142 &self,
12143
12144 name: impl ::fidl_next::Encode<
12145 ::fidl_next::wire::Vector<'static, u8>,
12146 <___T as ::fidl_next::Transport>::SendBuffer,
12147 >,
12148 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
12149 where
12150 <___T as ::fidl_next::Transport>::SendBuffer:
12151 ::fidl_next::encoder::InternalHandleEncoder,
12152 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12153 {
12154 self.remove_extended_attribute_with(
12155 crate::generic::NodeRemoveExtendedAttributeRequest { name },
12156 )
12157 }
12158
12159 #[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"]
12160 pub fn remove_extended_attribute_with<___R>(
12161 &self,
12162 request: ___R,
12163 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
12164 where
12165 ___R: ::fidl_next::Encode<
12166 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
12167 <___T as ::fidl_next::Transport>::SendBuffer,
12168 >,
12169 {
12170 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12171 8794297771444732717,
12172 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
12173 request,
12174 ))
12175 }
12176
12177 #[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"]
12178 pub fn read(
12179 &self,
12180
12181 count: impl ::fidl_next::Encode<
12182 ::fidl_next::wire::Uint64,
12183 <___T as ::fidl_next::Transport>::SendBuffer,
12184 >,
12185 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
12186 where
12187 <___T as ::fidl_next::Transport>::SendBuffer:
12188 ::fidl_next::encoder::InternalHandleEncoder,
12189 {
12190 self.read_with(crate::generic::ReadableReadRequest { count })
12191 }
12192
12193 #[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"]
12194 pub fn read_with<___R>(
12195 &self,
12196 request: ___R,
12197 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
12198 where
12199 ___R: ::fidl_next::Encode<
12200 crate::wire::ReadableReadRequest,
12201 <___T as ::fidl_next::Transport>::SendBuffer,
12202 >,
12203 {
12204 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12205 395825947633028830,
12206 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
12207 request,
12208 ))
12209 }
12210
12211 #[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"]
12212 pub fn write(
12213 &self,
12214
12215 data: impl ::fidl_next::Encode<
12216 ::fidl_next::wire::Vector<'static, u8>,
12217 <___T as ::fidl_next::Transport>::SendBuffer,
12218 >,
12219 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
12220 where
12221 <___T as ::fidl_next::Transport>::SendBuffer:
12222 ::fidl_next::encoder::InternalHandleEncoder,
12223 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12224 {
12225 self.write_with(crate::generic::WritableWriteRequest { data })
12226 }
12227
12228 #[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"]
12229 pub fn write_with<___R>(
12230 &self,
12231 request: ___R,
12232 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
12233 where
12234 ___R: ::fidl_next::Encode<
12235 crate::wire::WritableWriteRequest<'static>,
12236 <___T as ::fidl_next::Transport>::SendBuffer,
12237 >,
12238 {
12239 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12240 7651971425397809026,
12241 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
12242 request,
12243 ))
12244 }
12245
12246 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
12247 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12248 7545125870053689020,
12249 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
12250 (),
12251 ))
12252 }
12253
12254 #[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"]
12255 pub fn seek(
12256 &self,
12257
12258 origin: impl ::fidl_next::Encode<
12259 crate::wire::SeekOrigin,
12260 <___T as ::fidl_next::Transport>::SendBuffer,
12261 >,
12262
12263 offset: impl ::fidl_next::Encode<
12264 ::fidl_next::wire::Int64,
12265 <___T as ::fidl_next::Transport>::SendBuffer,
12266 >,
12267 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
12268 where
12269 <___T as ::fidl_next::Transport>::SendBuffer:
12270 ::fidl_next::encoder::InternalHandleEncoder,
12271 {
12272 self.seek_with(crate::generic::FileSeekRequest { origin, offset })
12273 }
12274
12275 #[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"]
12276 pub fn seek_with<___R>(
12277 &self,
12278 request: ___R,
12279 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
12280 where
12281 ___R: ::fidl_next::Encode<
12282 crate::wire::FileSeekRequest,
12283 <___T as ::fidl_next::Transport>::SendBuffer,
12284 >,
12285 {
12286 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12287 8649041485622956551,
12288 <super::Seek as ::fidl_next::Method>::FLEXIBILITY,
12289 request,
12290 ))
12291 }
12292
12293 #[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"]
12294 pub fn read_at(
12295 &self,
12296
12297 count: impl ::fidl_next::Encode<
12298 ::fidl_next::wire::Uint64,
12299 <___T as ::fidl_next::Transport>::SendBuffer,
12300 >,
12301
12302 offset: impl ::fidl_next::Encode<
12303 ::fidl_next::wire::Uint64,
12304 <___T as ::fidl_next::Transport>::SendBuffer,
12305 >,
12306 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
12307 where
12308 <___T as ::fidl_next::Transport>::SendBuffer:
12309 ::fidl_next::encoder::InternalHandleEncoder,
12310 {
12311 self.read_at_with(crate::generic::FileReadAtRequest { count, offset })
12312 }
12313
12314 #[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"]
12315 pub fn read_at_with<___R>(
12316 &self,
12317 request: ___R,
12318 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
12319 where
12320 ___R: ::fidl_next::Encode<
12321 crate::wire::FileReadAtRequest,
12322 <___T as ::fidl_next::Transport>::SendBuffer,
12323 >,
12324 {
12325 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12326 1587416148701180478,
12327 <super::ReadAt as ::fidl_next::Method>::FLEXIBILITY,
12328 request,
12329 ))
12330 }
12331
12332 #[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"]
12333 pub fn write_at(
12334 &self,
12335
12336 data: impl ::fidl_next::Encode<
12337 ::fidl_next::wire::Vector<'static, u8>,
12338 <___T as ::fidl_next::Transport>::SendBuffer,
12339 >,
12340
12341 offset: impl ::fidl_next::Encode<
12342 ::fidl_next::wire::Uint64,
12343 <___T as ::fidl_next::Transport>::SendBuffer,
12344 >,
12345 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
12346 where
12347 <___T as ::fidl_next::Transport>::SendBuffer:
12348 ::fidl_next::encoder::InternalHandleEncoder,
12349 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12350 {
12351 self.write_at_with(crate::generic::FileWriteAtRequest { data, offset })
12352 }
12353
12354 #[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"]
12355 pub fn write_at_with<___R>(
12356 &self,
12357 request: ___R,
12358 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
12359 where
12360 ___R: ::fidl_next::Encode<
12361 crate::wire::FileWriteAtRequest<'static>,
12362 <___T as ::fidl_next::Transport>::SendBuffer,
12363 >,
12364 {
12365 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12366 8736683935131400491,
12367 <super::WriteAt as ::fidl_next::Method>::FLEXIBILITY,
12368 request,
12369 ))
12370 }
12371
12372 #[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"]
12373 pub fn resize(
12374 &self,
12375
12376 length: impl ::fidl_next::Encode<
12377 ::fidl_next::wire::Uint64,
12378 <___T as ::fidl_next::Transport>::SendBuffer,
12379 >,
12380 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
12381 where
12382 <___T as ::fidl_next::Transport>::SendBuffer:
12383 ::fidl_next::encoder::InternalHandleEncoder,
12384 {
12385 self.resize_with(crate::generic::FileResizeRequest { length })
12386 }
12387
12388 #[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"]
12389 pub fn resize_with<___R>(
12390 &self,
12391 request: ___R,
12392 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
12393 where
12394 ___R: ::fidl_next::Encode<
12395 crate::wire::FileResizeRequest,
12396 <___T as ::fidl_next::Transport>::SendBuffer,
12397 >,
12398 {
12399 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12400 3134648685270758458,
12401 <super::Resize as ::fidl_next::Method>::FLEXIBILITY,
12402 request,
12403 ))
12404 }
12405
12406 #[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"]
12407 pub fn get_backing_memory(
12408 &self,
12409
12410 flags: impl ::fidl_next::Encode<
12411 crate::wire::VmoFlags,
12412 <___T as ::fidl_next::Transport>::SendBuffer,
12413 >,
12414 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
12415 where
12416 <___T as ::fidl_next::Transport>::SendBuffer:
12417 ::fidl_next::encoder::InternalHandleEncoder,
12418 {
12419 self.get_backing_memory_with(crate::generic::FileGetBackingMemoryRequest { flags })
12420 }
12421
12422 #[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"]
12423 pub fn get_backing_memory_with<___R>(
12424 &self,
12425 request: ___R,
12426 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
12427 where
12428 ___R: ::fidl_next::Encode<
12429 crate::wire::FileGetBackingMemoryRequest,
12430 <___T as ::fidl_next::Transport>::SendBuffer,
12431 >,
12432 {
12433 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12434 46911652864194091,
12435 <super::GetBackingMemory as ::fidl_next::Method>::FLEXIBILITY,
12436 request,
12437 ))
12438 }
12439
12440 #[doc = " Pre-allocate on-disk space for this file.\n"]
12441 pub fn allocate(
12442 &self,
12443
12444 offset: impl ::fidl_next::Encode<
12445 ::fidl_next::wire::Uint64,
12446 <___T as ::fidl_next::Transport>::SendBuffer,
12447 >,
12448
12449 length: impl ::fidl_next::Encode<
12450 ::fidl_next::wire::Uint64,
12451 <___T as ::fidl_next::Transport>::SendBuffer,
12452 >,
12453
12454 mode: impl ::fidl_next::Encode<
12455 crate::wire::AllocateMode,
12456 <___T as ::fidl_next::Transport>::SendBuffer,
12457 >,
12458 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
12459 where
12460 <___T as ::fidl_next::Transport>::SendBuffer:
12461 ::fidl_next::encoder::InternalHandleEncoder,
12462 <___T as ::fidl_next::Transport>::SendBuffer:
12463 ::fdomain_client::fidl_next::HandleEncoder,
12464 {
12465 self.allocate_with(crate::generic::FileAllocateRequest { offset, length, mode })
12466 }
12467
12468 #[doc = " Pre-allocate on-disk space for this file.\n"]
12469 pub fn allocate_with<___R>(
12470 &self,
12471 request: ___R,
12472 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
12473 where
12474 ___R: ::fidl_next::Encode<
12475 crate::wire::FileAllocateRequest,
12476 <___T as ::fidl_next::Transport>::SendBuffer,
12477 >,
12478 {
12479 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12480 8645235848064269614,
12481 <super::Allocate as ::fidl_next::Method>::FLEXIBILITY,
12482 request,
12483 ))
12484 }
12485
12486 #[doc = " Enables verification for the file (permanently) which involves computing a merkle tree for\n the file. Forces a flush prior to building the merkle tree to ensure cached data is\n captured. Future reads will be verified against the computed merkle tree and writes will be\n rejected. This method can take some time to complete as it depends on the size of the file.\n This method can be aborted by closing the connection that this method was issued on.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n Returns `ZX_ERR_NOT_SUPPORTED` if the filesystem does not support verity.\n Returns `ZX_ERR_ALREADY_EXISTS` if the file was already fsverity-enabled.\n Also returns any error that might arise from reading the file, or from flushing the file,\n such as `ZX_ERR_IO`.\n"]
12487 pub fn enable_verity(
12488 &self,
12489
12490 options: impl ::fidl_next::Encode<
12491 crate::wire::VerificationOptions<'static>,
12492 <___T as ::fidl_next::Transport>::SendBuffer,
12493 >,
12494 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
12495 where
12496 <___T as ::fidl_next::Transport>::SendBuffer:
12497 ::fidl_next::encoder::InternalHandleEncoder,
12498 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12499 <___T as ::fidl_next::Transport>::SendBuffer:
12500 ::fdomain_client::fidl_next::HandleEncoder,
12501 {
12502 self.enable_verity_with(crate::generic::FileEnableVerityRequest { options })
12503 }
12504
12505 #[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"]
12506 pub fn enable_verity_with<___R>(
12507 &self,
12508 request: ___R,
12509 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
12510 where
12511 ___R: ::fidl_next::Encode<
12512 crate::wire::FileEnableVerityRequest<'static>,
12513 <___T as ::fidl_next::Transport>::SendBuffer,
12514 >,
12515 {
12516 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12517 3189145313204943035,
12518 <super::EnableVerity as ::fidl_next::Method>::FLEXIBILITY,
12519 request,
12520 ))
12521 }
12522 }
12523
12524 #[repr(transparent)]
12526 pub struct FileServer<___T: ::fidl_next::Transport> {
12527 server: ::fidl_next::protocol::Server<___T>,
12528 }
12529
12530 impl<___T> FileServer<___T>
12531 where
12532 ___T: ::fidl_next::Transport,
12533 {
12534 #[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"]
12535 pub fn on_open(
12536 &self,
12537
12538 s: impl ::fidl_next::Encode<
12539 ::fidl_next::wire::Int32,
12540 <___T as ::fidl_next::Transport>::SendBuffer,
12541 >,
12542
12543 info: impl ::fidl_next::Encode<
12544 crate::wire_optional::NodeInfoDeprecated<'static>,
12545 <___T as ::fidl_next::Transport>::SendBuffer,
12546 >,
12547 ) -> ::fidl_next::SendFuture<'_, ___T>
12548 where
12549 <___T as ::fidl_next::Transport>::SendBuffer:
12550 ::fidl_next::encoder::InternalHandleEncoder,
12551 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12552 <___T as ::fidl_next::Transport>::SendBuffer:
12553 ::fdomain_client::fidl_next::HandleEncoder,
12554 {
12555 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
12556 }
12557
12558 #[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"]
12559
12560 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
12561 where
12562 ___R: ::fidl_next::Encode<
12563 <super::OnOpen as ::fidl_next::Method>::Request,
12564 <___T as ::fidl_next::Transport>::SendBuffer,
12565 >,
12566 {
12567 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
12568 9207534335756671346,
12569 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
12570 request,
12571 ))
12572 }
12573
12574 #[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"]
12575
12576 pub fn on_representation_with<___R>(
12577 &self,
12578 request: ___R,
12579 ) -> ::fidl_next::SendFuture<'_, ___T>
12580 where
12581 ___R: ::fidl_next::Encode<
12582 <super::OnRepresentation as ::fidl_next::Method>::Request,
12583 <___T as ::fidl_next::Transport>::SendBuffer,
12584 >,
12585 {
12586 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
12587 6679970090861613324,
12588 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
12589 request,
12590 ))
12591 }
12592 }
12593 }
12594}
12595
12596pub trait FileClientHandler<
12600 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
12601 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12602>
12603{
12604 #[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"]
12605 fn on_open(
12606 &mut self,
12607
12608 request: ::fidl_next::Request<file::OnOpen, ___T>,
12609 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12610
12611 #[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"]
12612 fn on_representation(
12613 &mut self,
12614
12615 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
12616 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12617
12618 fn on_unknown_interaction(
12619 &mut self,
12620 ordinal: u64,
12621 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12622 ::core::future::ready(())
12623 }
12624}
12625
12626impl<___T> FileClientHandler<___T> for ::fidl_next::IgnoreEvents
12627where
12628 ___T: ::fidl_next::Transport,
12629{
12630 async fn on_open(&mut self, _: ::fidl_next::Request<file::OnOpen, ___T>) {}
12631
12632 async fn on_representation(&mut self, _: ::fidl_next::Request<file::OnRepresentation, ___T>) {}
12633
12634 async fn on_unknown_interaction(&mut self, _: u64) {}
12635}
12636
12637impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for File
12638where
12639 ___H: FileClientHandler<___T> + ::core::marker::Send,
12640 ___T: ::fidl_next::Transport,
12641 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
12642 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12643 Constraint = (),
12644 >,
12645 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
12646 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12647 Constraint = (),
12648 >,
12649{
12650 async fn on_event(
12651 handler: &mut ___H,
12652 ordinal: u64,
12653 flexibility: ::fidl_next::protocol::Flexibility,
12654 body: ::fidl_next::Body<___T>,
12655 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12656 match ordinal {
12657 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
12658 Ok(decoded) => {
12659 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
12660 Ok(())
12661 }
12662 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12663 ordinal: 9207534335756671346,
12664 error,
12665 }),
12666 },
12667
12668 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
12669 Ok(decoded) => {
12670 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
12671 Ok(())
12672 }
12673 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12674 ordinal: 6679970090861613324,
12675 error,
12676 }),
12677 },
12678
12679 ordinal => {
12680 handler.on_unknown_interaction(ordinal).await;
12681 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
12682 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12683 } else {
12684 Ok(())
12685 }
12686 }
12687 }
12688 }
12689}
12690
12691pub trait FileServerHandler<
12695 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
12696 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12697>
12698{
12699 #[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"]
12700 fn advisory_lock(
12701 &mut self,
12702
12703 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
12704
12705 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
12706 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12707
12708 #[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"]
12709 fn link_into(
12710 &mut self,
12711
12712 request: ::fidl_next::Request<file::LinkInto, ___T>,
12713
12714 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
12715 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12716
12717 fn clone(
12718 &mut self,
12719
12720 request: ::fidl_next::Request<file::Clone, ___T>,
12721 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12722
12723 #[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"]
12724 fn close(
12725 &mut self,
12726
12727 responder: ::fidl_next::Responder<file::Close, ___T>,
12728 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12729
12730 fn query(
12731 &mut self,
12732
12733 responder: ::fidl_next::Responder<file::Query, ___T>,
12734 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12735
12736 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
12737 fn deprecated_clone(
12738 &mut self,
12739
12740 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
12741 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12742
12743 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
12744 fn deprecated_get_attr(
12745 &mut self,
12746
12747 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
12748 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12749
12750 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
12751 fn deprecated_set_attr(
12752 &mut self,
12753
12754 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
12755
12756 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
12757 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12758
12759 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
12760 fn deprecated_get_flags(
12761 &mut self,
12762
12763 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
12764 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12765
12766 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
12767 fn deprecated_set_flags(
12768 &mut self,
12769
12770 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
12771
12772 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
12773 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12774
12775 #[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"]
12776 fn get_flags(
12777 &mut self,
12778
12779 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
12780 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12781
12782 #[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"]
12783 fn set_flags(
12784 &mut self,
12785
12786 request: ::fidl_next::Request<file::SetFlags, ___T>,
12787
12788 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
12789 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12790
12791 #[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"]
12792 fn query_filesystem(
12793 &mut self,
12794
12795 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
12796 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12797
12798 #[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"]
12799 fn get_attributes(
12800 &mut self,
12801
12802 request: ::fidl_next::Request<file::GetAttributes, ___T>,
12803
12804 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
12805 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12806
12807 #[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"]
12808 fn update_attributes(
12809 &mut self,
12810
12811 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
12812
12813 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
12814 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12815
12816 #[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"]
12817 fn sync(
12818 &mut self,
12819
12820 responder: ::fidl_next::Responder<file::Sync, ___T>,
12821 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12822
12823 #[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"]
12824 fn list_extended_attributes(
12825 &mut self,
12826
12827 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
12828 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12829
12830 #[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"]
12831 fn get_extended_attribute(
12832 &mut self,
12833
12834 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
12835
12836 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
12837 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12838
12839 #[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"]
12840 fn set_extended_attribute(
12841 &mut self,
12842
12843 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
12844
12845 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
12846 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12847
12848 #[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"]
12849 fn remove_extended_attribute(
12850 &mut self,
12851
12852 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
12853
12854 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
12855 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12856
12857 #[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"]
12858 fn read(
12859 &mut self,
12860
12861 request: ::fidl_next::Request<file::Read, ___T>,
12862
12863 responder: ::fidl_next::Responder<file::Read, ___T>,
12864 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12865
12866 #[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"]
12867 fn write(
12868 &mut self,
12869
12870 request: ::fidl_next::Request<file::Write, ___T>,
12871
12872 responder: ::fidl_next::Responder<file::Write, ___T>,
12873 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12874
12875 fn describe(
12876 &mut self,
12877
12878 responder: ::fidl_next::Responder<file::Describe, ___T>,
12879 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12880
12881 #[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"]
12882 fn seek(
12883 &mut self,
12884
12885 request: ::fidl_next::Request<file::Seek, ___T>,
12886
12887 responder: ::fidl_next::Responder<file::Seek, ___T>,
12888 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12889
12890 #[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"]
12891 fn read_at(
12892 &mut self,
12893
12894 request: ::fidl_next::Request<file::ReadAt, ___T>,
12895
12896 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
12897 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12898
12899 #[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"]
12900 fn write_at(
12901 &mut self,
12902
12903 request: ::fidl_next::Request<file::WriteAt, ___T>,
12904
12905 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
12906 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12907
12908 #[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"]
12909 fn resize(
12910 &mut self,
12911
12912 request: ::fidl_next::Request<file::Resize, ___T>,
12913
12914 responder: ::fidl_next::Responder<file::Resize, ___T>,
12915 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12916
12917 #[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"]
12918 fn get_backing_memory(
12919 &mut self,
12920
12921 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
12922
12923 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
12924 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12925
12926 #[doc = " Pre-allocate on-disk space for this file.\n"]
12927 fn allocate(
12928 &mut self,
12929
12930 request: ::fidl_next::Request<file::Allocate, ___T>,
12931
12932 responder: ::fidl_next::Responder<file::Allocate, ___T>,
12933 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12934
12935 #[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"]
12936 fn enable_verity(
12937 &mut self,
12938
12939 request: ::fidl_next::Request<file::EnableVerity, ___T>,
12940
12941 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
12942 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12943
12944 fn on_unknown_interaction(
12945 &mut self,
12946 ordinal: u64,
12947 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12948 ::core::future::ready(())
12949 }
12950}
12951
12952impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for File
12953where
12954 ___H: FileServerHandler<___T> + ::core::marker::Send,
12955 ___T: ::fidl_next::Transport,
12956 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
12957 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12958 Constraint = (),
12959 >,
12960 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12961 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12962 Constraint = (),
12963 >,
12964 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
12965 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12966 Constraint = (),
12967 >,
12968 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
12969 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12970 Constraint = (),
12971 >,
12972 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
12973 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12974 Constraint = (),
12975 >,
12976 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
12977 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12978 Constraint = (),
12979 >,
12980 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
12981 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12982 Constraint = (),
12983 >,
12984 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
12985 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12986 Constraint = (),
12987 >,
12988 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
12989 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12990 Constraint = (),
12991 >,
12992 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
12993 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12994 Constraint = (),
12995 >,
12996 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
12997 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12998 Constraint = (),
12999 >,
13000 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
13001 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13002 Constraint = (),
13003 >,
13004 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
13005 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13006 Constraint = (),
13007 >,
13008 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
13009 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13010 Constraint = (),
13011 >,
13012 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
13013 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13014 Constraint = (),
13015 >,
13016 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
13017 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13018 Constraint = (),
13019 >,
13020 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
13021 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13022 Constraint = (),
13023 >,
13024 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
13025 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13026 Constraint = (),
13027 >,
13028 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
13029 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13030 Constraint = (),
13031 >,
13032 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
13033 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13034 Constraint = (),
13035 >,
13036 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
13037 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13038 Constraint = (),
13039 >,
13040 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
13041 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13042 Constraint = (),
13043 >,
13044{
13045 async fn on_one_way(
13046 handler: &mut ___H,
13047 ordinal: u64,
13048 flexibility: ::fidl_next::protocol::Flexibility,
13049 body: ::fidl_next::Body<___T>,
13050 ) -> ::core::result::Result<
13051 (),
13052 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13053 > {
13054 match ordinal {
13055 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
13056 Ok(decoded) => {
13057 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
13058 Ok(())
13059 }
13060 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13061 ordinal: 2366825959783828089,
13062 error,
13063 }),
13064 },
13065
13066 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
13067 Ok(decoded) => {
13068 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
13069 Ok(())
13070 }
13071 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13072 ordinal: 6512600400724287855,
13073 error,
13074 }),
13075 },
13076
13077 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
13078 Ok(decoded) => {
13079 handler
13080 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
13081 .await;
13082 Ok(())
13083 }
13084 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13085 ordinal: 5431626189872037072,
13086 error,
13087 }),
13088 },
13089
13090 ordinal => {
13091 handler.on_unknown_interaction(ordinal).await;
13092 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13093 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13094 } else {
13095 Ok(())
13096 }
13097 }
13098 }
13099 }
13100
13101 async fn on_two_way(
13102 handler: &mut ___H,
13103 ordinal: u64,
13104 flexibility: ::fidl_next::protocol::Flexibility,
13105 body: ::fidl_next::Body<___T>,
13106 responder: ::fidl_next::protocol::Responder<___T>,
13107 ) -> ::core::result::Result<
13108 (),
13109 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13110 > {
13111 match ordinal {
13112 7992130864415541162 => {
13113 let responder = ::fidl_next::Responder::from_untyped(responder);
13114
13115 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13116 Ok(decoded) => {
13117 handler
13118 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
13119 .await;
13120 Ok(())
13121 }
13122 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13123 ordinal: 7992130864415541162,
13124 error,
13125 }),
13126 }
13127 }
13128
13129 6121399674497678964 => {
13130 let responder = ::fidl_next::Responder::from_untyped(responder);
13131
13132 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13133 Ok(decoded) => {
13134 handler
13135 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
13136 .await;
13137 Ok(())
13138 }
13139 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13140 ordinal: 6121399674497678964,
13141 error,
13142 }),
13143 }
13144 }
13145
13146 6540867515453498750 => {
13147 let responder = ::fidl_next::Responder::from_untyped(responder);
13148
13149 handler.close(responder).await;
13150 Ok(())
13151 }
13152
13153 2763219980499352582 => {
13154 let responder = ::fidl_next::Responder::from_untyped(responder);
13155
13156 handler.query(responder).await;
13157 Ok(())
13158 }
13159
13160 8689798978500614909 => {
13161 let responder = ::fidl_next::Responder::from_untyped(responder);
13162
13163 handler.deprecated_get_attr(responder).await;
13164 Ok(())
13165 }
13166
13167 4721673413776871238 => {
13168 let responder = ::fidl_next::Responder::from_untyped(responder);
13169
13170 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13171 Ok(decoded) => {
13172 handler
13173 .deprecated_set_attr(
13174 ::fidl_next::Request::from_decoded(decoded),
13175 responder,
13176 )
13177 .await;
13178 Ok(())
13179 }
13180 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13181 ordinal: 4721673413776871238,
13182 error,
13183 }),
13184 }
13185 }
13186
13187 6595803110182632097 => {
13188 let responder = ::fidl_next::Responder::from_untyped(responder);
13189
13190 handler.deprecated_get_flags(responder).await;
13191 Ok(())
13192 }
13193
13194 5950864159036794675 => {
13195 let responder = ::fidl_next::Responder::from_untyped(responder);
13196
13197 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13198 Ok(decoded) => {
13199 handler
13200 .deprecated_set_flags(
13201 ::fidl_next::Request::from_decoded(decoded),
13202 responder,
13203 )
13204 .await;
13205 Ok(())
13206 }
13207 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13208 ordinal: 5950864159036794675,
13209 error,
13210 }),
13211 }
13212 }
13213
13214 105530239381466147 => {
13215 let responder = ::fidl_next::Responder::from_untyped(responder);
13216
13217 handler.get_flags(responder).await;
13218 Ok(())
13219 }
13220
13221 6172186066099445416 => {
13222 let responder = ::fidl_next::Responder::from_untyped(responder);
13223
13224 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13225 Ok(decoded) => {
13226 handler
13227 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
13228 .await;
13229 Ok(())
13230 }
13231 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13232 ordinal: 6172186066099445416,
13233 error,
13234 }),
13235 }
13236 }
13237
13238 8013111122914313744 => {
13239 let responder = ::fidl_next::Responder::from_untyped(responder);
13240
13241 handler.query_filesystem(responder).await;
13242 Ok(())
13243 }
13244
13245 4414537700416816443 => {
13246 let responder = ::fidl_next::Responder::from_untyped(responder);
13247
13248 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13249 Ok(decoded) => {
13250 handler
13251 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
13252 .await;
13253 Ok(())
13254 }
13255 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13256 ordinal: 4414537700416816443,
13257 error,
13258 }),
13259 }
13260 }
13261
13262 3677402239314018056 => {
13263 let responder = ::fidl_next::Responder::from_untyped(responder);
13264
13265 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13266 Ok(decoded) => {
13267 handler
13268 .update_attributes(
13269 ::fidl_next::Request::from_decoded(decoded),
13270 responder,
13271 )
13272 .await;
13273 Ok(())
13274 }
13275 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13276 ordinal: 3677402239314018056,
13277 error,
13278 }),
13279 }
13280 }
13281
13282 3196473584242777161 => {
13283 let responder = ::fidl_next::Responder::from_untyped(responder);
13284
13285 handler.sync(responder).await;
13286 Ok(())
13287 }
13288
13289 5043930208506967771 => {
13290 let responder = ::fidl_next::Responder::from_untyped(responder);
13291
13292 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13293 Ok(decoded) => {
13294 handler
13295 .get_extended_attribute(
13296 ::fidl_next::Request::from_decoded(decoded),
13297 responder,
13298 )
13299 .await;
13300 Ok(())
13301 }
13302 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13303 ordinal: 5043930208506967771,
13304 error,
13305 }),
13306 }
13307 }
13308
13309 5374223046099989052 => {
13310 let responder = ::fidl_next::Responder::from_untyped(responder);
13311
13312 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13313 Ok(decoded) => {
13314 handler
13315 .set_extended_attribute(
13316 ::fidl_next::Request::from_decoded(decoded),
13317 responder,
13318 )
13319 .await;
13320 Ok(())
13321 }
13322 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13323 ordinal: 5374223046099989052,
13324 error,
13325 }),
13326 }
13327 }
13328
13329 8794297771444732717 => {
13330 let responder = ::fidl_next::Responder::from_untyped(responder);
13331
13332 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13333 Ok(decoded) => {
13334 handler
13335 .remove_extended_attribute(
13336 ::fidl_next::Request::from_decoded(decoded),
13337 responder,
13338 )
13339 .await;
13340 Ok(())
13341 }
13342 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13343 ordinal: 8794297771444732717,
13344 error,
13345 }),
13346 }
13347 }
13348
13349 395825947633028830 => {
13350 let responder = ::fidl_next::Responder::from_untyped(responder);
13351
13352 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13353 Ok(decoded) => {
13354 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
13355 Ok(())
13356 }
13357 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13358 ordinal: 395825947633028830,
13359 error,
13360 }),
13361 }
13362 }
13363
13364 7651971425397809026 => {
13365 let responder = ::fidl_next::Responder::from_untyped(responder);
13366
13367 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13368 Ok(decoded) => {
13369 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
13370 Ok(())
13371 }
13372 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13373 ordinal: 7651971425397809026,
13374 error,
13375 }),
13376 }
13377 }
13378
13379 7545125870053689020 => {
13380 let responder = ::fidl_next::Responder::from_untyped(responder);
13381
13382 handler.describe(responder).await;
13383 Ok(())
13384 }
13385
13386 8649041485622956551 => {
13387 let responder = ::fidl_next::Responder::from_untyped(responder);
13388
13389 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13390 Ok(decoded) => {
13391 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
13392 Ok(())
13393 }
13394 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13395 ordinal: 8649041485622956551,
13396 error,
13397 }),
13398 }
13399 }
13400
13401 1587416148701180478 => {
13402 let responder = ::fidl_next::Responder::from_untyped(responder);
13403
13404 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13405 Ok(decoded) => {
13406 handler
13407 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
13408 .await;
13409 Ok(())
13410 }
13411 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13412 ordinal: 1587416148701180478,
13413 error,
13414 }),
13415 }
13416 }
13417
13418 8736683935131400491 => {
13419 let responder = ::fidl_next::Responder::from_untyped(responder);
13420
13421 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13422 Ok(decoded) => {
13423 handler
13424 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
13425 .await;
13426 Ok(())
13427 }
13428 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13429 ordinal: 8736683935131400491,
13430 error,
13431 }),
13432 }
13433 }
13434
13435 3134648685270758458 => {
13436 let responder = ::fidl_next::Responder::from_untyped(responder);
13437
13438 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13439 Ok(decoded) => {
13440 handler
13441 .resize(::fidl_next::Request::from_decoded(decoded), responder)
13442 .await;
13443 Ok(())
13444 }
13445 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13446 ordinal: 3134648685270758458,
13447 error,
13448 }),
13449 }
13450 }
13451
13452 46911652864194091 => {
13453 let responder = ::fidl_next::Responder::from_untyped(responder);
13454
13455 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13456 Ok(decoded) => {
13457 handler
13458 .get_backing_memory(
13459 ::fidl_next::Request::from_decoded(decoded),
13460 responder,
13461 )
13462 .await;
13463 Ok(())
13464 }
13465 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13466 ordinal: 46911652864194091,
13467 error,
13468 }),
13469 }
13470 }
13471
13472 8645235848064269614 => {
13473 let responder = ::fidl_next::Responder::from_untyped(responder);
13474
13475 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13476 Ok(decoded) => {
13477 handler
13478 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
13479 .await;
13480 Ok(())
13481 }
13482 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13483 ordinal: 8645235848064269614,
13484 error,
13485 }),
13486 }
13487 }
13488
13489 3189145313204943035 => {
13490 let responder = ::fidl_next::Responder::from_untyped(responder);
13491
13492 match ::fidl_next::AsDecoderExt::into_decoded(body) {
13493 Ok(decoded) => {
13494 handler
13495 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
13496 .await;
13497 Ok(())
13498 }
13499 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13500 ordinal: 3189145313204943035,
13501 error,
13502 }),
13503 }
13504 }
13505
13506 ordinal => {
13507 handler.on_unknown_interaction(ordinal).await;
13508 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
13509 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13510 } else {
13511 responder
13512 .respond(
13513 ordinal,
13514 flexibility,
13515 ::fidl_next::Flexible::<()>::FrameworkErr(
13516 ::fidl_next::FrameworkError::UnknownMethod,
13517 ),
13518 )
13519 .expect("encoding a framework error should never fail")
13520 .await?;
13521 Ok(())
13522 }
13523 }
13524 }
13525 }
13526}
13527
13528#[doc = " A [\'Node\'] which contains a symbolic link.\n"]
13530#[derive(PartialEq, Debug)]
13531pub struct Symlink;
13532
13533impl ::fidl_next::Discoverable for Symlink {
13534 const PROTOCOL_NAME: &'static str = "fuchsia.io.Symlink";
13535}
13536
13537#[cfg(target_os = "fuchsia")]
13538impl ::fidl_next::HasTransport for Symlink {
13539 type Transport = ::fdomain_client::Channel;
13540}
13541
13542pub mod symlink {
13543 pub mod prelude {
13544 pub use crate::{Symlink, SymlinkClientHandler, SymlinkServerHandler, symlink};
13545
13546 pub use crate::natural::ExtendedAttributeValue;
13547
13548 pub use crate::natural::LinkableLinkIntoRequest;
13549
13550 pub use crate::natural::LinkableLinkIntoResponse;
13551
13552 pub use crate::natural::MutableNodeAttributes;
13553
13554 pub use crate::natural::NodeAttributes2;
13555
13556 pub use crate::natural::NodeDeprecatedCloneRequest;
13557
13558 pub use crate::natural::NodeDeprecatedGetAttrResponse;
13559
13560 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
13561
13562 pub use crate::natural::NodeDeprecatedSetAttrRequest;
13563
13564 pub use crate::natural::NodeDeprecatedSetAttrResponse;
13565
13566 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
13567
13568 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
13569
13570 pub use crate::natural::NodeGetAttributesRequest;
13571
13572 pub use crate::natural::NodeGetExtendedAttributeRequest;
13573
13574 pub use crate::natural::NodeListExtendedAttributesRequest;
13575
13576 pub use crate::natural::NodeOnOpenRequest;
13577
13578 pub use crate::natural::NodeQueryFilesystemResponse;
13579
13580 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
13581
13582 pub use crate::natural::NodeSetExtendedAttributeRequest;
13583
13584 pub use crate::natural::NodeSetFlagsRequest;
13585
13586 pub use crate::natural::NodeGetFlagsResponse;
13587
13588 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
13589
13590 pub use crate::natural::NodeSetExtendedAttributeResponse;
13591
13592 pub use crate::natural::NodeSetFlagsResponse;
13593
13594 pub use crate::natural::NodeSyncResponse;
13595
13596 pub use crate::natural::NodeUpdateAttributesResponse;
13597
13598 pub use crate::natural::Representation;
13599
13600 pub use crate::natural::SymlinkInfo;
13601
13602 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
13603
13604 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
13605
13606 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
13607 }
13608
13609 pub struct LinkInto;
13610
13611 impl ::fidl_next::Method for LinkInto {
13612 const ORDINAL: u64 = 6121399674497678964;
13613 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13614 ::fidl_next::protocol::Flexibility::Strict;
13615
13616 type Protocol = crate::Symlink;
13617
13618 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
13619 }
13620
13621 impl ::fidl_next::TwoWayMethod for LinkInto {
13622 type Response = ::fidl_next::wire::Result<
13623 'static,
13624 crate::wire::LinkableLinkIntoResponse,
13625 ::fidl_next::wire::Int32,
13626 >;
13627 }
13628
13629 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
13630 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13631
13632 fn respond(response: ___R) -> Self::Output {
13633 ::core::result::Result::Ok(response)
13634 }
13635 }
13636
13637 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
13638 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13639
13640 fn respond_err(response: ___R) -> Self::Output {
13641 ::core::result::Result::Err(response)
13642 }
13643 }
13644
13645 pub struct Clone;
13646
13647 impl ::fidl_next::Method for Clone {
13648 const ORDINAL: u64 = 2366825959783828089;
13649 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13650 ::fidl_next::protocol::Flexibility::Strict;
13651
13652 type Protocol = crate::Symlink;
13653
13654 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
13655 }
13656
13657 pub struct Close;
13658
13659 impl ::fidl_next::Method for Close {
13660 const ORDINAL: u64 = 6540867515453498750;
13661 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13662 ::fidl_next::protocol::Flexibility::Strict;
13663
13664 type Protocol = crate::Symlink;
13665
13666 type Request = ();
13667 }
13668
13669 impl ::fidl_next::TwoWayMethod for Close {
13670 type Response = ::fidl_next::wire::Result<
13671 'static,
13672 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
13673 ::fidl_next::wire::Int32,
13674 >;
13675 }
13676
13677 impl<___R> ::fidl_next::Respond<___R> for Close {
13678 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13679
13680 fn respond(response: ___R) -> Self::Output {
13681 ::core::result::Result::Ok(response)
13682 }
13683 }
13684
13685 impl<___R> ::fidl_next::RespondErr<___R> for Close {
13686 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13687
13688 fn respond_err(response: ___R) -> Self::Output {
13689 ::core::result::Result::Err(response)
13690 }
13691 }
13692
13693 pub struct Query;
13694
13695 impl ::fidl_next::Method for Query {
13696 const ORDINAL: u64 = 2763219980499352582;
13697 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13698 ::fidl_next::protocol::Flexibility::Strict;
13699
13700 type Protocol = crate::Symlink;
13701
13702 type Request = ();
13703 }
13704
13705 impl ::fidl_next::TwoWayMethod for Query {
13706 type Response = ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>;
13707 }
13708
13709 impl<___R> ::fidl_next::Respond<___R> for Query {
13710 type Output = ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>;
13711
13712 fn respond(response: ___R) -> Self::Output {
13713 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse { protocol: response }
13714 }
13715 }
13716
13717 pub struct DeprecatedClone;
13718
13719 impl ::fidl_next::Method for DeprecatedClone {
13720 const ORDINAL: u64 = 6512600400724287855;
13721 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13722 ::fidl_next::protocol::Flexibility::Flexible;
13723
13724 type Protocol = crate::Symlink;
13725
13726 type Request = crate::wire::NodeDeprecatedCloneRequest;
13727 }
13728
13729 pub struct OnOpen;
13730
13731 impl ::fidl_next::Method for OnOpen {
13732 const ORDINAL: u64 = 9207534335756671346;
13733 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13734 ::fidl_next::protocol::Flexibility::Flexible;
13735
13736 type Protocol = crate::Symlink;
13737
13738 type Request = crate::wire::NodeOnOpenRequest<'static>;
13739 }
13740
13741 pub struct DeprecatedGetAttr;
13742
13743 impl ::fidl_next::Method for DeprecatedGetAttr {
13744 const ORDINAL: u64 = 8689798978500614909;
13745 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13746 ::fidl_next::protocol::Flexibility::Strict;
13747
13748 type Protocol = crate::Symlink;
13749
13750 type Request = ();
13751 }
13752
13753 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
13754 type Response = crate::wire::NodeDeprecatedGetAttrResponse;
13755 }
13756
13757 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
13758 type Output = ___R;
13759
13760 fn respond(response: ___R) -> Self::Output {
13761 response
13762 }
13763 }
13764
13765 pub struct DeprecatedSetAttr;
13766
13767 impl ::fidl_next::Method for DeprecatedSetAttr {
13768 const ORDINAL: u64 = 4721673413776871238;
13769 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13770 ::fidl_next::protocol::Flexibility::Strict;
13771
13772 type Protocol = crate::Symlink;
13773
13774 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
13775 }
13776
13777 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
13778 type Response = crate::wire::NodeDeprecatedSetAttrResponse;
13779 }
13780
13781 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
13782 type Output = crate::generic::NodeDeprecatedSetAttrResponse<___R>;
13783
13784 fn respond(response: ___R) -> Self::Output {
13785 crate::generic::NodeDeprecatedSetAttrResponse { s: response }
13786 }
13787 }
13788
13789 pub struct DeprecatedGetFlags;
13790
13791 impl ::fidl_next::Method for DeprecatedGetFlags {
13792 const ORDINAL: u64 = 6595803110182632097;
13793 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13794 ::fidl_next::protocol::Flexibility::Strict;
13795
13796 type Protocol = crate::Symlink;
13797
13798 type Request = ();
13799 }
13800
13801 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
13802 type Response = crate::wire::NodeDeprecatedGetFlagsResponse;
13803 }
13804
13805 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
13806 type Output = ___R;
13807
13808 fn respond(response: ___R) -> Self::Output {
13809 response
13810 }
13811 }
13812
13813 pub struct DeprecatedSetFlags;
13814
13815 impl ::fidl_next::Method for DeprecatedSetFlags {
13816 const ORDINAL: u64 = 5950864159036794675;
13817 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13818 ::fidl_next::protocol::Flexibility::Strict;
13819
13820 type Protocol = crate::Symlink;
13821
13822 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
13823 }
13824
13825 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
13826 type Response = crate::wire::NodeDeprecatedSetFlagsResponse;
13827 }
13828
13829 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
13830 type Output = crate::generic::NodeDeprecatedSetFlagsResponse<___R>;
13831
13832 fn respond(response: ___R) -> Self::Output {
13833 crate::generic::NodeDeprecatedSetFlagsResponse { s: response }
13834 }
13835 }
13836
13837 pub struct GetFlags;
13838
13839 impl ::fidl_next::Method for GetFlags {
13840 const ORDINAL: u64 = 105530239381466147;
13841 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13842 ::fidl_next::protocol::Flexibility::Flexible;
13843
13844 type Protocol = crate::Symlink;
13845
13846 type Request = ();
13847 }
13848
13849 impl ::fidl_next::TwoWayMethod for GetFlags {
13850 type Response = ::fidl_next::wire::FlexibleResult<
13851 'static,
13852 crate::wire::NodeGetFlagsResponse,
13853 ::fidl_next::wire::Int32,
13854 >;
13855 }
13856
13857 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
13858 type Output = ::fidl_next::FlexibleResult<
13859 crate::generic::NodeGetFlagsResponse<___R>,
13860 ::fidl_next::util::Never,
13861 >;
13862
13863 fn respond(response: ___R) -> Self::Output {
13864 ::fidl_next::FlexibleResult::Ok(crate::generic::NodeGetFlagsResponse {
13865 flags: response,
13866 })
13867 }
13868 }
13869
13870 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
13871 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13872
13873 fn respond_err(response: ___R) -> Self::Output {
13874 ::fidl_next::FlexibleResult::Err(response)
13875 }
13876 }
13877
13878 pub struct SetFlags;
13879
13880 impl ::fidl_next::Method for SetFlags {
13881 const ORDINAL: u64 = 6172186066099445416;
13882 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13883 ::fidl_next::protocol::Flexibility::Flexible;
13884
13885 type Protocol = crate::Symlink;
13886
13887 type Request = crate::wire::NodeSetFlagsRequest;
13888 }
13889
13890 impl ::fidl_next::TwoWayMethod for SetFlags {
13891 type Response = ::fidl_next::wire::FlexibleResult<
13892 'static,
13893 crate::wire::NodeSetFlagsResponse,
13894 ::fidl_next::wire::Int32,
13895 >;
13896 }
13897
13898 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
13899 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
13900
13901 fn respond(response: ___R) -> Self::Output {
13902 ::fidl_next::FlexibleResult::Ok(response)
13903 }
13904 }
13905
13906 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
13907 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
13908
13909 fn respond_err(response: ___R) -> Self::Output {
13910 ::fidl_next::FlexibleResult::Err(response)
13911 }
13912 }
13913
13914 pub struct QueryFilesystem;
13915
13916 impl ::fidl_next::Method for QueryFilesystem {
13917 const ORDINAL: u64 = 8013111122914313744;
13918 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13919 ::fidl_next::protocol::Flexibility::Strict;
13920
13921 type Protocol = crate::Symlink;
13922
13923 type Request = ();
13924 }
13925
13926 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
13927 type Response = crate::wire::NodeQueryFilesystemResponse<'static>;
13928 }
13929
13930 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
13931 type Output = ___R;
13932
13933 fn respond(response: ___R) -> Self::Output {
13934 response
13935 }
13936 }
13937
13938 pub struct OnRepresentation;
13939
13940 impl ::fidl_next::Method for OnRepresentation {
13941 const ORDINAL: u64 = 6679970090861613324;
13942 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13943 ::fidl_next::protocol::Flexibility::Strict;
13944
13945 type Protocol = crate::Symlink;
13946
13947 type Request = crate::wire::Representation<'static>;
13948 }
13949
13950 pub struct GetAttributes;
13951
13952 impl ::fidl_next::Method for GetAttributes {
13953 const ORDINAL: u64 = 4414537700416816443;
13954 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13955 ::fidl_next::protocol::Flexibility::Strict;
13956
13957 type Protocol = crate::Symlink;
13958
13959 type Request = crate::wire::NodeGetAttributesRequest;
13960 }
13961
13962 impl ::fidl_next::TwoWayMethod for GetAttributes {
13963 type Response = ::fidl_next::wire::Result<
13964 'static,
13965 crate::wire::NodeAttributes2<'static>,
13966 ::fidl_next::wire::Int32,
13967 >;
13968 }
13969
13970 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
13971 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
13972
13973 fn respond(response: ___R) -> Self::Output {
13974 ::core::result::Result::Ok(response)
13975 }
13976 }
13977
13978 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
13979 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
13980
13981 fn respond_err(response: ___R) -> Self::Output {
13982 ::core::result::Result::Err(response)
13983 }
13984 }
13985
13986 pub struct UpdateAttributes;
13987
13988 impl ::fidl_next::Method for UpdateAttributes {
13989 const ORDINAL: u64 = 3677402239314018056;
13990 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13991 ::fidl_next::protocol::Flexibility::Strict;
13992
13993 type Protocol = crate::Symlink;
13994
13995 type Request = crate::wire::MutableNodeAttributes<'static>;
13996 }
13997
13998 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
13999 type Response = ::fidl_next::wire::Result<
14000 'static,
14001 crate::wire::NodeUpdateAttributesResponse,
14002 ::fidl_next::wire::Int32,
14003 >;
14004 }
14005
14006 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
14007 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14008
14009 fn respond(response: ___R) -> Self::Output {
14010 ::core::result::Result::Ok(response)
14011 }
14012 }
14013
14014 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
14015 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14016
14017 fn respond_err(response: ___R) -> Self::Output {
14018 ::core::result::Result::Err(response)
14019 }
14020 }
14021
14022 pub struct Sync;
14023
14024 impl ::fidl_next::Method for Sync {
14025 const ORDINAL: u64 = 3196473584242777161;
14026 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14027 ::fidl_next::protocol::Flexibility::Strict;
14028
14029 type Protocol = crate::Symlink;
14030
14031 type Request = ();
14032 }
14033
14034 impl ::fidl_next::TwoWayMethod for Sync {
14035 type Response = ::fidl_next::wire::Result<
14036 'static,
14037 crate::wire::NodeSyncResponse,
14038 ::fidl_next::wire::Int32,
14039 >;
14040 }
14041
14042 impl<___R> ::fidl_next::Respond<___R> for Sync {
14043 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14044
14045 fn respond(response: ___R) -> Self::Output {
14046 ::core::result::Result::Ok(response)
14047 }
14048 }
14049
14050 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
14051 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14052
14053 fn respond_err(response: ___R) -> Self::Output {
14054 ::core::result::Result::Err(response)
14055 }
14056 }
14057
14058 pub struct ListExtendedAttributes;
14059
14060 impl ::fidl_next::Method for ListExtendedAttributes {
14061 const ORDINAL: u64 = 5431626189872037072;
14062 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14063 ::fidl_next::protocol::Flexibility::Strict;
14064
14065 type Protocol = crate::Symlink;
14066
14067 type Request = crate::wire::NodeListExtendedAttributesRequest;
14068 }
14069
14070 pub struct GetExtendedAttribute;
14071
14072 impl ::fidl_next::Method for GetExtendedAttribute {
14073 const ORDINAL: u64 = 5043930208506967771;
14074 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14075 ::fidl_next::protocol::Flexibility::Strict;
14076
14077 type Protocol = crate::Symlink;
14078
14079 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
14080 }
14081
14082 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
14083 type Response = ::fidl_next::wire::Result<
14084 'static,
14085 crate::wire::ExtendedAttributeValue<'static>,
14086 ::fidl_next::wire::Int32,
14087 >;
14088 }
14089
14090 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
14091 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14092
14093 fn respond(response: ___R) -> Self::Output {
14094 ::core::result::Result::Ok(response)
14095 }
14096 }
14097
14098 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
14099 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14100
14101 fn respond_err(response: ___R) -> Self::Output {
14102 ::core::result::Result::Err(response)
14103 }
14104 }
14105
14106 pub struct SetExtendedAttribute;
14107
14108 impl ::fidl_next::Method for SetExtendedAttribute {
14109 const ORDINAL: u64 = 5374223046099989052;
14110 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14111 ::fidl_next::protocol::Flexibility::Strict;
14112
14113 type Protocol = crate::Symlink;
14114
14115 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
14116 }
14117
14118 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
14119 type Response = ::fidl_next::wire::Result<
14120 'static,
14121 crate::wire::NodeSetExtendedAttributeResponse,
14122 ::fidl_next::wire::Int32,
14123 >;
14124 }
14125
14126 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
14127 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14128
14129 fn respond(response: ___R) -> Self::Output {
14130 ::core::result::Result::Ok(response)
14131 }
14132 }
14133
14134 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
14135 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14136
14137 fn respond_err(response: ___R) -> Self::Output {
14138 ::core::result::Result::Err(response)
14139 }
14140 }
14141
14142 pub struct RemoveExtendedAttribute;
14143
14144 impl ::fidl_next::Method for RemoveExtendedAttribute {
14145 const ORDINAL: u64 = 8794297771444732717;
14146 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14147 ::fidl_next::protocol::Flexibility::Strict;
14148
14149 type Protocol = crate::Symlink;
14150
14151 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
14152 }
14153
14154 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
14155 type Response = ::fidl_next::wire::Result<
14156 'static,
14157 crate::wire::NodeRemoveExtendedAttributeResponse,
14158 ::fidl_next::wire::Int32,
14159 >;
14160 }
14161
14162 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
14163 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
14164
14165 fn respond(response: ___R) -> Self::Output {
14166 ::core::result::Result::Ok(response)
14167 }
14168 }
14169
14170 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
14171 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
14172
14173 fn respond_err(response: ___R) -> Self::Output {
14174 ::core::result::Result::Err(response)
14175 }
14176 }
14177
14178 pub struct Describe;
14179
14180 impl ::fidl_next::Method for Describe {
14181 const ORDINAL: u64 = 8371117097481679347;
14182 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14183 ::fidl_next::protocol::Flexibility::Flexible;
14184
14185 type Protocol = crate::Symlink;
14186
14187 type Request = ();
14188 }
14189
14190 impl ::fidl_next::TwoWayMethod for Describe {
14191 type Response = ::fidl_next::wire::Flexible<'static, crate::wire::SymlinkInfo<'static>>;
14192 }
14193
14194 impl<___R> ::fidl_next::Respond<___R> for Describe {
14195 type Output = ___R;
14196
14197 fn respond(response: ___R) -> Self::Output {
14198 response
14199 }
14200 }
14201
14202 mod ___detail {
14203 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Symlink
14204 where
14205 ___T: ::fidl_next::Transport,
14206 {
14207 type Client = SymlinkClient<___T>;
14208 type Server = SymlinkServer<___T>;
14209 }
14210
14211 #[repr(transparent)]
14213 pub struct SymlinkClient<___T: ::fidl_next::Transport> {
14214 #[allow(dead_code)]
14215 client: ::fidl_next::protocol::Client<___T>,
14216 }
14217
14218 impl<___T> SymlinkClient<___T>
14219 where
14220 ___T: ::fidl_next::Transport,
14221 {
14222 #[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"]
14223 pub fn link_into(
14224 &self,
14225
14226 dst_parent_token: impl ::fidl_next::Encode<
14227 ::fdomain_client::fidl_next::wire::Handle,
14228 <___T as ::fidl_next::Transport>::SendBuffer,
14229 >,
14230
14231 dst: impl ::fidl_next::Encode<
14232 ::fidl_next::wire::String<'static>,
14233 <___T as ::fidl_next::Transport>::SendBuffer,
14234 >,
14235 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14236 where
14237 <___T as ::fidl_next::Transport>::SendBuffer:
14238 ::fidl_next::encoder::InternalHandleEncoder,
14239 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14240 <___T as ::fidl_next::Transport>::SendBuffer:
14241 ::fdomain_client::fidl_next::HandleEncoder,
14242 {
14243 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
14244 dst_parent_token,
14245
14246 dst,
14247 })
14248 }
14249
14250 #[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"]
14251 pub fn link_into_with<___R>(
14252 &self,
14253 request: ___R,
14254 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14255 where
14256 ___R: ::fidl_next::Encode<
14257 crate::wire::LinkableLinkIntoRequest<'static>,
14258 <___T as ::fidl_next::Transport>::SendBuffer,
14259 >,
14260 {
14261 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14262 6121399674497678964,
14263 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
14264 request,
14265 ))
14266 }
14267
14268 pub fn clone(
14269 &self,
14270
14271 request: impl ::fidl_next::Encode<
14272 ::fidl_next::ServerEnd<
14273 ::fdomain_next_fuchsia_unknown::Cloneable,
14274 ::fdomain_client::fidl_next::wire::Handle,
14275 >,
14276 <___T as ::fidl_next::Transport>::SendBuffer,
14277 >,
14278 ) -> ::fidl_next::SendFuture<'_, ___T>
14279 where
14280 <___T as ::fidl_next::Transport>::SendBuffer:
14281 ::fidl_next::encoder::InternalHandleEncoder,
14282 <___T as ::fidl_next::Transport>::SendBuffer:
14283 ::fdomain_client::fidl_next::HandleEncoder,
14284 {
14285 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
14286 request,
14287 })
14288 }
14289
14290 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14291 where
14292 ___R: ::fidl_next::Encode<
14293 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
14294 <___T as ::fidl_next::Transport>::SendBuffer,
14295 >,
14296 {
14297 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14298 2366825959783828089,
14299 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
14300 request,
14301 ))
14302 }
14303
14304 #[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"]
14305 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
14306 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14307 6540867515453498750,
14308 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
14309 (),
14310 ))
14311 }
14312
14313 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
14314 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14315 2763219980499352582,
14316 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
14317 (),
14318 ))
14319 }
14320
14321 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14322 pub fn deprecated_clone(
14323 &self,
14324
14325 flags: impl ::fidl_next::Encode<
14326 crate::wire::OpenFlags,
14327 <___T as ::fidl_next::Transport>::SendBuffer,
14328 >,
14329
14330 object: impl ::fidl_next::Encode<
14331 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
14332 <___T as ::fidl_next::Transport>::SendBuffer,
14333 >,
14334 ) -> ::fidl_next::SendFuture<'_, ___T>
14335 where
14336 <___T as ::fidl_next::Transport>::SendBuffer:
14337 ::fidl_next::encoder::InternalHandleEncoder,
14338 <___T as ::fidl_next::Transport>::SendBuffer:
14339 ::fdomain_client::fidl_next::HandleEncoder,
14340 {
14341 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
14342 flags,
14343
14344 object,
14345 })
14346 }
14347
14348 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14349 pub fn deprecated_clone_with<___R>(
14350 &self,
14351 request: ___R,
14352 ) -> ::fidl_next::SendFuture<'_, ___T>
14353 where
14354 ___R: ::fidl_next::Encode<
14355 crate::wire::NodeDeprecatedCloneRequest,
14356 <___T as ::fidl_next::Transport>::SendBuffer,
14357 >,
14358 {
14359 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14360 6512600400724287855,
14361 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
14362 request,
14363 ))
14364 }
14365
14366 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14367 pub fn deprecated_get_attr(
14368 &self,
14369 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
14370 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14371 8689798978500614909,
14372 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
14373 (),
14374 ))
14375 }
14376
14377 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14378 pub fn deprecated_set_attr(
14379 &self,
14380
14381 flags: impl ::fidl_next::Encode<
14382 crate::wire::NodeAttributeFlags,
14383 <___T as ::fidl_next::Transport>::SendBuffer,
14384 >,
14385
14386 attributes: impl ::fidl_next::Encode<
14387 crate::wire::NodeAttributes,
14388 <___T as ::fidl_next::Transport>::SendBuffer,
14389 >,
14390 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14391 where
14392 <___T as ::fidl_next::Transport>::SendBuffer:
14393 ::fidl_next::encoder::InternalHandleEncoder,
14394 {
14395 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
14396 flags,
14397
14398 attributes,
14399 })
14400 }
14401
14402 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14403 pub fn deprecated_set_attr_with<___R>(
14404 &self,
14405 request: ___R,
14406 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14407 where
14408 ___R: ::fidl_next::Encode<
14409 crate::wire::NodeDeprecatedSetAttrRequest,
14410 <___T as ::fidl_next::Transport>::SendBuffer,
14411 >,
14412 {
14413 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14414 4721673413776871238,
14415 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
14416 request,
14417 ))
14418 }
14419
14420 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14421 pub fn deprecated_get_flags(
14422 &self,
14423 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
14424 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14425 6595803110182632097,
14426 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
14427 (),
14428 ))
14429 }
14430
14431 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14432 pub fn deprecated_set_flags(
14433 &self,
14434
14435 flags: impl ::fidl_next::Encode<
14436 crate::wire::OpenFlags,
14437 <___T as ::fidl_next::Transport>::SendBuffer,
14438 >,
14439 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14440 where
14441 <___T as ::fidl_next::Transport>::SendBuffer:
14442 ::fidl_next::encoder::InternalHandleEncoder,
14443 {
14444 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
14445 flags,
14446 })
14447 }
14448
14449 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14450 pub fn deprecated_set_flags_with<___R>(
14451 &self,
14452 request: ___R,
14453 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14454 where
14455 ___R: ::fidl_next::Encode<
14456 crate::wire::NodeDeprecatedSetFlagsRequest,
14457 <___T as ::fidl_next::Transport>::SendBuffer,
14458 >,
14459 {
14460 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14461 5950864159036794675,
14462 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
14463 request,
14464 ))
14465 }
14466
14467 #[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"]
14468 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
14469 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14470 105530239381466147,
14471 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
14472 (),
14473 ))
14474 }
14475
14476 #[doc = " Sets the flags that apply to this node after it has been opened. This method does not\n require any rights.\n\n Only `Flags.FILE_APPEND` is currently supported. Calling this method without any flags will\n clear append mode.\n\n Errors:\n - `ZX_ERR_NOT_SUPPORTED`: The object does not support this feature or the specified flags.\n - `ZX_ERR_INVALID_ARGS`: `flags` other than `Flags.FILE_APPEND` were specified.\n"]
14477 pub fn set_flags(
14478 &self,
14479
14480 flags: impl ::fidl_next::Encode<
14481 crate::wire::Flags,
14482 <___T as ::fidl_next::Transport>::SendBuffer,
14483 >,
14484 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14485 where
14486 <___T as ::fidl_next::Transport>::SendBuffer:
14487 ::fidl_next::encoder::InternalHandleEncoder,
14488 {
14489 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
14490 }
14491
14492 #[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"]
14493 pub fn set_flags_with<___R>(
14494 &self,
14495 request: ___R,
14496 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14497 where
14498 ___R: ::fidl_next::Encode<
14499 crate::wire::NodeSetFlagsRequest,
14500 <___T as ::fidl_next::Transport>::SendBuffer,
14501 >,
14502 {
14503 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14504 6172186066099445416,
14505 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
14506 request,
14507 ))
14508 }
14509
14510 #[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"]
14511 pub fn query_filesystem(
14512 &self,
14513 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
14514 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14515 8013111122914313744,
14516 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
14517 (),
14518 ))
14519 }
14520
14521 #[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"]
14522 pub fn get_attributes(
14523 &self,
14524
14525 query: impl ::fidl_next::Encode<
14526 crate::wire::NodeAttributesQuery,
14527 <___T as ::fidl_next::Transport>::SendBuffer,
14528 >,
14529 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14530 where
14531 <___T as ::fidl_next::Transport>::SendBuffer:
14532 ::fidl_next::encoder::InternalHandleEncoder,
14533 {
14534 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
14535 }
14536
14537 #[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"]
14538 pub fn get_attributes_with<___R>(
14539 &self,
14540 request: ___R,
14541 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14542 where
14543 ___R: ::fidl_next::Encode<
14544 crate::wire::NodeGetAttributesRequest,
14545 <___T as ::fidl_next::Transport>::SendBuffer,
14546 >,
14547 {
14548 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14549 4414537700416816443,
14550 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
14551 request,
14552 ))
14553 }
14554
14555 #[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"]
14556 pub fn update_attributes_with<___R>(
14557 &self,
14558 request: ___R,
14559 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
14560 where
14561 ___R: ::fidl_next::Encode<
14562 crate::wire::MutableNodeAttributes<'static>,
14563 <___T as ::fidl_next::Transport>::SendBuffer,
14564 >,
14565 {
14566 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14567 3677402239314018056,
14568 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
14569 request,
14570 ))
14571 }
14572
14573 #[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"]
14574 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
14575 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14576 3196473584242777161,
14577 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
14578 (),
14579 ))
14580 }
14581
14582 #[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"]
14583 pub fn list_extended_attributes(
14584 &self,
14585
14586 iterator: impl ::fidl_next::Encode<
14587 ::fidl_next::ServerEnd<
14588 crate::ExtendedAttributeIterator,
14589 ::fdomain_client::fidl_next::wire::Handle,
14590 >,
14591 <___T as ::fidl_next::Transport>::SendBuffer,
14592 >,
14593 ) -> ::fidl_next::SendFuture<'_, ___T>
14594 where
14595 <___T as ::fidl_next::Transport>::SendBuffer:
14596 ::fidl_next::encoder::InternalHandleEncoder,
14597 <___T as ::fidl_next::Transport>::SendBuffer:
14598 ::fdomain_client::fidl_next::HandleEncoder,
14599 {
14600 self.list_extended_attributes_with(
14601 crate::generic::NodeListExtendedAttributesRequest { iterator },
14602 )
14603 }
14604
14605 #[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"]
14606 pub fn list_extended_attributes_with<___R>(
14607 &self,
14608 request: ___R,
14609 ) -> ::fidl_next::SendFuture<'_, ___T>
14610 where
14611 ___R: ::fidl_next::Encode<
14612 crate::wire::NodeListExtendedAttributesRequest,
14613 <___T as ::fidl_next::Transport>::SendBuffer,
14614 >,
14615 {
14616 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14617 5431626189872037072,
14618 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
14619 request,
14620 ))
14621 }
14622
14623 #[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"]
14624 pub fn get_extended_attribute(
14625 &self,
14626
14627 name: impl ::fidl_next::Encode<
14628 ::fidl_next::wire::Vector<'static, u8>,
14629 <___T as ::fidl_next::Transport>::SendBuffer,
14630 >,
14631 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14632 where
14633 <___T as ::fidl_next::Transport>::SendBuffer:
14634 ::fidl_next::encoder::InternalHandleEncoder,
14635 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14636 {
14637 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
14638 name,
14639 })
14640 }
14641
14642 #[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"]
14643 pub fn get_extended_attribute_with<___R>(
14644 &self,
14645 request: ___R,
14646 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14647 where
14648 ___R: ::fidl_next::Encode<
14649 crate::wire::NodeGetExtendedAttributeRequest<'static>,
14650 <___T as ::fidl_next::Transport>::SendBuffer,
14651 >,
14652 {
14653 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14654 5043930208506967771,
14655 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14656 request,
14657 ))
14658 }
14659
14660 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.\n"]
14661 pub fn set_extended_attribute(
14662 &self,
14663
14664 name: impl ::fidl_next::Encode<
14665 ::fidl_next::wire::Vector<'static, u8>,
14666 <___T as ::fidl_next::Transport>::SendBuffer,
14667 >,
14668
14669 value: impl ::fidl_next::Encode<
14670 crate::wire::ExtendedAttributeValue<'static>,
14671 <___T as ::fidl_next::Transport>::SendBuffer,
14672 >,
14673
14674 mode: impl ::fidl_next::Encode<
14675 crate::wire::SetExtendedAttributeMode,
14676 <___T as ::fidl_next::Transport>::SendBuffer,
14677 >,
14678 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14679 where
14680 <___T as ::fidl_next::Transport>::SendBuffer:
14681 ::fidl_next::encoder::InternalHandleEncoder,
14682 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14683 <___T as ::fidl_next::Transport>::SendBuffer:
14684 ::fdomain_client::fidl_next::HandleEncoder,
14685 {
14686 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
14687 name,
14688
14689 value,
14690
14691 mode,
14692 })
14693 }
14694
14695 #[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"]
14696 pub fn set_extended_attribute_with<___R>(
14697 &self,
14698 request: ___R,
14699 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14700 where
14701 ___R: ::fidl_next::Encode<
14702 crate::wire::NodeSetExtendedAttributeRequest<'static>,
14703 <___T as ::fidl_next::Transport>::SendBuffer,
14704 >,
14705 {
14706 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14707 5374223046099989052,
14708 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14709 request,
14710 ))
14711 }
14712
14713 #[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"]
14714 pub fn remove_extended_attribute(
14715 &self,
14716
14717 name: impl ::fidl_next::Encode<
14718 ::fidl_next::wire::Vector<'static, u8>,
14719 <___T as ::fidl_next::Transport>::SendBuffer,
14720 >,
14721 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14722 where
14723 <___T as ::fidl_next::Transport>::SendBuffer:
14724 ::fidl_next::encoder::InternalHandleEncoder,
14725 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14726 {
14727 self.remove_extended_attribute_with(
14728 crate::generic::NodeRemoveExtendedAttributeRequest { name },
14729 )
14730 }
14731
14732 #[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"]
14733 pub fn remove_extended_attribute_with<___R>(
14734 &self,
14735 request: ___R,
14736 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14737 where
14738 ___R: ::fidl_next::Encode<
14739 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
14740 <___T as ::fidl_next::Transport>::SendBuffer,
14741 >,
14742 {
14743 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14744 8794297771444732717,
14745 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14746 request,
14747 ))
14748 }
14749
14750 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
14751 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14752 8371117097481679347,
14753 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
14754 (),
14755 ))
14756 }
14757 }
14758
14759 #[repr(transparent)]
14761 pub struct SymlinkServer<___T: ::fidl_next::Transport> {
14762 server: ::fidl_next::protocol::Server<___T>,
14763 }
14764
14765 impl<___T> SymlinkServer<___T>
14766 where
14767 ___T: ::fidl_next::Transport,
14768 {
14769 #[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"]
14770 pub fn on_open(
14771 &self,
14772
14773 s: impl ::fidl_next::Encode<
14774 ::fidl_next::wire::Int32,
14775 <___T as ::fidl_next::Transport>::SendBuffer,
14776 >,
14777
14778 info: impl ::fidl_next::Encode<
14779 crate::wire_optional::NodeInfoDeprecated<'static>,
14780 <___T as ::fidl_next::Transport>::SendBuffer,
14781 >,
14782 ) -> ::fidl_next::SendFuture<'_, ___T>
14783 where
14784 <___T as ::fidl_next::Transport>::SendBuffer:
14785 ::fidl_next::encoder::InternalHandleEncoder,
14786 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14787 <___T as ::fidl_next::Transport>::SendBuffer:
14788 ::fdomain_client::fidl_next::HandleEncoder,
14789 {
14790 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
14791 }
14792
14793 #[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"]
14794
14795 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14796 where
14797 ___R: ::fidl_next::Encode<
14798 <super::OnOpen as ::fidl_next::Method>::Request,
14799 <___T as ::fidl_next::Transport>::SendBuffer,
14800 >,
14801 {
14802 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14803 9207534335756671346,
14804 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
14805 request,
14806 ))
14807 }
14808
14809 #[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"]
14810
14811 pub fn on_representation_with<___R>(
14812 &self,
14813 request: ___R,
14814 ) -> ::fidl_next::SendFuture<'_, ___T>
14815 where
14816 ___R: ::fidl_next::Encode<
14817 <super::OnRepresentation as ::fidl_next::Method>::Request,
14818 <___T as ::fidl_next::Transport>::SendBuffer,
14819 >,
14820 {
14821 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
14822 6679970090861613324,
14823 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
14824 request,
14825 ))
14826 }
14827 }
14828 }
14829}
14830
14831pub trait SymlinkClientHandler<
14835 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
14836 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14837>
14838{
14839 #[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"]
14840 fn on_open(
14841 &mut self,
14842
14843 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
14844 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14845
14846 #[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"]
14847 fn on_representation(
14848 &mut self,
14849
14850 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
14851 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14852
14853 fn on_unknown_interaction(
14854 &mut self,
14855 ordinal: u64,
14856 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14857 ::core::future::ready(())
14858 }
14859}
14860
14861impl<___T> SymlinkClientHandler<___T> for ::fidl_next::IgnoreEvents
14862where
14863 ___T: ::fidl_next::Transport,
14864{
14865 async fn on_open(&mut self, _: ::fidl_next::Request<symlink::OnOpen, ___T>) {}
14866
14867 async fn on_representation(
14868 &mut self,
14869
14870 _: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
14871 ) {
14872 }
14873
14874 async fn on_unknown_interaction(&mut self, _: u64) {}
14875}
14876
14877impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Symlink
14878where
14879 ___H: SymlinkClientHandler<___T> + ::core::marker::Send,
14880 ___T: ::fidl_next::Transport,
14881 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
14882 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14883 Constraint = (),
14884 >,
14885 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
14886 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14887 Constraint = (),
14888 >,
14889{
14890 async fn on_event(
14891 handler: &mut ___H,
14892 ordinal: u64,
14893 flexibility: ::fidl_next::protocol::Flexibility,
14894 body: ::fidl_next::Body<___T>,
14895 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14896 match ordinal {
14897 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
14898 Ok(decoded) => {
14899 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
14900 Ok(())
14901 }
14902 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14903 ordinal: 9207534335756671346,
14904 error,
14905 }),
14906 },
14907
14908 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
14909 Ok(decoded) => {
14910 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
14911 Ok(())
14912 }
14913 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14914 ordinal: 6679970090861613324,
14915 error,
14916 }),
14917 },
14918
14919 ordinal => {
14920 handler.on_unknown_interaction(ordinal).await;
14921 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
14922 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14923 } else {
14924 Ok(())
14925 }
14926 }
14927 }
14928 }
14929}
14930
14931pub trait SymlinkServerHandler<
14935 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
14936 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14937>
14938{
14939 #[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"]
14940 fn link_into(
14941 &mut self,
14942
14943 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
14944
14945 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
14946 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14947
14948 fn clone(
14949 &mut self,
14950
14951 request: ::fidl_next::Request<symlink::Clone, ___T>,
14952 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14953
14954 #[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"]
14955 fn close(
14956 &mut self,
14957
14958 responder: ::fidl_next::Responder<symlink::Close, ___T>,
14959 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14960
14961 fn query(
14962 &mut self,
14963
14964 responder: ::fidl_next::Responder<symlink::Query, ___T>,
14965 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14966
14967 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14968 fn deprecated_clone(
14969 &mut self,
14970
14971 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
14972 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14973
14974 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14975 fn deprecated_get_attr(
14976 &mut self,
14977
14978 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
14979 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14980
14981 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14982 fn deprecated_set_attr(
14983 &mut self,
14984
14985 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
14986
14987 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
14988 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14989
14990 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14991 fn deprecated_get_flags(
14992 &mut self,
14993
14994 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
14995 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14996
14997 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14998 fn deprecated_set_flags(
14999 &mut self,
15000
15001 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
15002
15003 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
15004 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15005
15006 #[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"]
15007 fn get_flags(
15008 &mut self,
15009
15010 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
15011 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15012
15013 #[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"]
15014 fn set_flags(
15015 &mut self,
15016
15017 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
15018
15019 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
15020 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15021
15022 #[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"]
15023 fn query_filesystem(
15024 &mut self,
15025
15026 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
15027 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15028
15029 #[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"]
15030 fn get_attributes(
15031 &mut self,
15032
15033 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
15034
15035 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
15036 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15037
15038 #[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"]
15039 fn update_attributes(
15040 &mut self,
15041
15042 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
15043
15044 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
15045 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15046
15047 #[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"]
15048 fn sync(
15049 &mut self,
15050
15051 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
15052 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15053
15054 #[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"]
15055 fn list_extended_attributes(
15056 &mut self,
15057
15058 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
15059 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15060
15061 #[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"]
15062 fn get_extended_attribute(
15063 &mut self,
15064
15065 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
15066
15067 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
15068 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15069
15070 #[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"]
15071 fn set_extended_attribute(
15072 &mut self,
15073
15074 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
15075
15076 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
15077 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15078
15079 #[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"]
15080 fn remove_extended_attribute(
15081 &mut self,
15082
15083 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
15084
15085 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
15086 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15087
15088 fn describe(
15089 &mut self,
15090
15091 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
15092 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15093
15094 fn on_unknown_interaction(
15095 &mut self,
15096 ordinal: u64,
15097 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15098 ::core::future::ready(())
15099 }
15100}
15101
15102impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Symlink
15103where
15104 ___H: SymlinkServerHandler<___T> + ::core::marker::Send,
15105 ___T: ::fidl_next::Transport,
15106 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
15107 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15108 Constraint = (),
15109 >,
15110 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
15111 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15112 Constraint = (),
15113 >,
15114 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
15115 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15116 Constraint = (),
15117 >,
15118 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
15119 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15120 Constraint = (),
15121 >,
15122 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
15123 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15124 Constraint = (),
15125 >,
15126 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
15127 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15128 Constraint = (),
15129 >,
15130 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
15131 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15132 Constraint = (),
15133 >,
15134 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
15135 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15136 Constraint = (),
15137 >,
15138 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
15139 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15140 Constraint = (),
15141 >,
15142 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15143 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15144 Constraint = (),
15145 >,
15146 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15147 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15148 Constraint = (),
15149 >,
15150 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15151 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15152 Constraint = (),
15153 >,
15154{
15155 async fn on_one_way(
15156 handler: &mut ___H,
15157 ordinal: u64,
15158 flexibility: ::fidl_next::protocol::Flexibility,
15159 body: ::fidl_next::Body<___T>,
15160 ) -> ::core::result::Result<
15161 (),
15162 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15163 > {
15164 match ordinal {
15165 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15166 Ok(decoded) => {
15167 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
15168 Ok(())
15169 }
15170 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15171 ordinal: 2366825959783828089,
15172 error,
15173 }),
15174 },
15175
15176 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15177 Ok(decoded) => {
15178 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
15179 Ok(())
15180 }
15181 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15182 ordinal: 6512600400724287855,
15183 error,
15184 }),
15185 },
15186
15187 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(body) {
15188 Ok(decoded) => {
15189 handler
15190 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
15191 .await;
15192 Ok(())
15193 }
15194 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15195 ordinal: 5431626189872037072,
15196 error,
15197 }),
15198 },
15199
15200 ordinal => {
15201 handler.on_unknown_interaction(ordinal).await;
15202 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15203 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15204 } else {
15205 Ok(())
15206 }
15207 }
15208 }
15209 }
15210
15211 async fn on_two_way(
15212 handler: &mut ___H,
15213 ordinal: u64,
15214 flexibility: ::fidl_next::protocol::Flexibility,
15215 body: ::fidl_next::Body<___T>,
15216 responder: ::fidl_next::protocol::Responder<___T>,
15217 ) -> ::core::result::Result<
15218 (),
15219 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15220 > {
15221 match ordinal {
15222 6121399674497678964 => {
15223 let responder = ::fidl_next::Responder::from_untyped(responder);
15224
15225 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15226 Ok(decoded) => {
15227 handler
15228 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
15229 .await;
15230 Ok(())
15231 }
15232 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15233 ordinal: 6121399674497678964,
15234 error,
15235 }),
15236 }
15237 }
15238
15239 6540867515453498750 => {
15240 let responder = ::fidl_next::Responder::from_untyped(responder);
15241
15242 handler.close(responder).await;
15243 Ok(())
15244 }
15245
15246 2763219980499352582 => {
15247 let responder = ::fidl_next::Responder::from_untyped(responder);
15248
15249 handler.query(responder).await;
15250 Ok(())
15251 }
15252
15253 8689798978500614909 => {
15254 let responder = ::fidl_next::Responder::from_untyped(responder);
15255
15256 handler.deprecated_get_attr(responder).await;
15257 Ok(())
15258 }
15259
15260 4721673413776871238 => {
15261 let responder = ::fidl_next::Responder::from_untyped(responder);
15262
15263 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15264 Ok(decoded) => {
15265 handler
15266 .deprecated_set_attr(
15267 ::fidl_next::Request::from_decoded(decoded),
15268 responder,
15269 )
15270 .await;
15271 Ok(())
15272 }
15273 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15274 ordinal: 4721673413776871238,
15275 error,
15276 }),
15277 }
15278 }
15279
15280 6595803110182632097 => {
15281 let responder = ::fidl_next::Responder::from_untyped(responder);
15282
15283 handler.deprecated_get_flags(responder).await;
15284 Ok(())
15285 }
15286
15287 5950864159036794675 => {
15288 let responder = ::fidl_next::Responder::from_untyped(responder);
15289
15290 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15291 Ok(decoded) => {
15292 handler
15293 .deprecated_set_flags(
15294 ::fidl_next::Request::from_decoded(decoded),
15295 responder,
15296 )
15297 .await;
15298 Ok(())
15299 }
15300 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15301 ordinal: 5950864159036794675,
15302 error,
15303 }),
15304 }
15305 }
15306
15307 105530239381466147 => {
15308 let responder = ::fidl_next::Responder::from_untyped(responder);
15309
15310 handler.get_flags(responder).await;
15311 Ok(())
15312 }
15313
15314 6172186066099445416 => {
15315 let responder = ::fidl_next::Responder::from_untyped(responder);
15316
15317 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15318 Ok(decoded) => {
15319 handler
15320 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
15321 .await;
15322 Ok(())
15323 }
15324 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15325 ordinal: 6172186066099445416,
15326 error,
15327 }),
15328 }
15329 }
15330
15331 8013111122914313744 => {
15332 let responder = ::fidl_next::Responder::from_untyped(responder);
15333
15334 handler.query_filesystem(responder).await;
15335 Ok(())
15336 }
15337
15338 4414537700416816443 => {
15339 let responder = ::fidl_next::Responder::from_untyped(responder);
15340
15341 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15342 Ok(decoded) => {
15343 handler
15344 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
15345 .await;
15346 Ok(())
15347 }
15348 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15349 ordinal: 4414537700416816443,
15350 error,
15351 }),
15352 }
15353 }
15354
15355 3677402239314018056 => {
15356 let responder = ::fidl_next::Responder::from_untyped(responder);
15357
15358 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15359 Ok(decoded) => {
15360 handler
15361 .update_attributes(
15362 ::fidl_next::Request::from_decoded(decoded),
15363 responder,
15364 )
15365 .await;
15366 Ok(())
15367 }
15368 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15369 ordinal: 3677402239314018056,
15370 error,
15371 }),
15372 }
15373 }
15374
15375 3196473584242777161 => {
15376 let responder = ::fidl_next::Responder::from_untyped(responder);
15377
15378 handler.sync(responder).await;
15379 Ok(())
15380 }
15381
15382 5043930208506967771 => {
15383 let responder = ::fidl_next::Responder::from_untyped(responder);
15384
15385 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15386 Ok(decoded) => {
15387 handler
15388 .get_extended_attribute(
15389 ::fidl_next::Request::from_decoded(decoded),
15390 responder,
15391 )
15392 .await;
15393 Ok(())
15394 }
15395 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15396 ordinal: 5043930208506967771,
15397 error,
15398 }),
15399 }
15400 }
15401
15402 5374223046099989052 => {
15403 let responder = ::fidl_next::Responder::from_untyped(responder);
15404
15405 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15406 Ok(decoded) => {
15407 handler
15408 .set_extended_attribute(
15409 ::fidl_next::Request::from_decoded(decoded),
15410 responder,
15411 )
15412 .await;
15413 Ok(())
15414 }
15415 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15416 ordinal: 5374223046099989052,
15417 error,
15418 }),
15419 }
15420 }
15421
15422 8794297771444732717 => {
15423 let responder = ::fidl_next::Responder::from_untyped(responder);
15424
15425 match ::fidl_next::AsDecoderExt::into_decoded(body) {
15426 Ok(decoded) => {
15427 handler
15428 .remove_extended_attribute(
15429 ::fidl_next::Request::from_decoded(decoded),
15430 responder,
15431 )
15432 .await;
15433 Ok(())
15434 }
15435 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15436 ordinal: 8794297771444732717,
15437 error,
15438 }),
15439 }
15440 }
15441
15442 8371117097481679347 => {
15443 let responder = ::fidl_next::Responder::from_untyped(responder);
15444
15445 handler.describe(responder).await;
15446 Ok(())
15447 }
15448
15449 ordinal => {
15450 handler.on_unknown_interaction(ordinal).await;
15451 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
15452 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15453 } else {
15454 responder
15455 .respond(
15456 ordinal,
15457 flexibility,
15458 ::fidl_next::Flexible::<()>::FrameworkErr(
15459 ::fidl_next::FrameworkError::UnknownMethod,
15460 ),
15461 )
15462 .expect("encoding a framework error should never fail")
15463 .await?;
15464 Ok(())
15465 }
15466 }
15467 }
15468 }
15469}
15470
15471pub use fidl_next_common_fuchsia_io::*;