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: ::fidl_next::fuchsia::zx::Status,
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 ::fidl_next::fuchsia::zx::Status as ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>
115 >::COPY_OPTIMIZATION.is_enabled()
116
117 && <
118 ::core::option::Option<::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 ::fidl_next::fuchsia::zx::Status as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::Status>
191 >::COPY_OPTIMIZATION.is_enabled()
192
193 && <
194 ::core::option::Option<::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 #[repr(C)]
538 pub struct NodeListExtendedAttributesRequest {
539 pub iterator:
540 ::fidl_next::ServerEnd<crate::ExtendedAttributeIterator, ::fdomain_client::Channel>,
541 }
542
543 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
544 for NodeListExtendedAttributesRequest
545 where
546 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
547 ___E: ::fdomain_client::fidl_next::HandleEncoder,
548 {
549 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
550 Self,
551 crate::wire::NodeListExtendedAttributesRequest,
552 > = unsafe {
553 ::fidl_next::CopyOptimization::enable_if(
554 true && <::fidl_next::ServerEnd<
555 crate::ExtendedAttributeIterator,
556 ::fdomain_client::Channel,
557 > as ::fidl_next::Encode<
558 ::fidl_next::ServerEnd<
559 crate::ExtendedAttributeIterator,
560 ::fdomain_client::fidl_next::wire::Handle,
561 >,
562 ___E,
563 >>::COPY_OPTIMIZATION
564 .is_enabled(),
565 )
566 };
567
568 #[inline]
569 fn encode(
570 self,
571 encoder_: &mut ___E,
572 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
573 _: (),
574 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
575 ::fidl_next::munge! {
576 let crate::wire::NodeListExtendedAttributesRequest {
577 iterator,
578
579 } = out_;
580 }
581
582 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
583
584 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
585
586 Ok(())
587 }
588 }
589
590 unsafe impl<___E>
591 ::fidl_next::EncodeOption<
592 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
593 ___E,
594 > for NodeListExtendedAttributesRequest
595 where
596 ___E: ::fidl_next::Encoder + ?Sized,
597 NodeListExtendedAttributesRequest:
598 ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>,
599 {
600 #[inline]
601 fn encode_option(
602 this: ::core::option::Option<Self>,
603 encoder: &mut ___E,
604 out: &mut ::core::mem::MaybeUninit<
605 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
606 >,
607 _: (),
608 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
609 if let Some(inner) = this {
610 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
611 ::fidl_next::wire::Box::encode_present(out);
612 } else {
613 ::fidl_next::wire::Box::encode_absent(out);
614 }
615
616 Ok(())
617 }
618 }
619
620 impl ::fidl_next::FromWire<crate::wire::NodeListExtendedAttributesRequest>
621 for NodeListExtendedAttributesRequest
622 {
623 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
624 crate::wire::NodeListExtendedAttributesRequest,
625 Self,
626 > = unsafe {
627 ::fidl_next::CopyOptimization::enable_if(
628 true && <::fidl_next::ServerEnd<
629 crate::ExtendedAttributeIterator,
630 ::fdomain_client::Channel,
631 > as ::fidl_next::FromWire<
632 ::fidl_next::ServerEnd<
633 crate::ExtendedAttributeIterator,
634 ::fdomain_client::fidl_next::wire::Handle,
635 >,
636 >>::COPY_OPTIMIZATION
637 .is_enabled(),
638 )
639 };
640
641 #[inline]
642 fn from_wire(wire: crate::wire::NodeListExtendedAttributesRequest) -> Self {
643 Self { iterator: ::fidl_next::FromWire::from_wire(wire.iterator) }
644 }
645 }
646
647 #[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"]
648 #[derive(Debug, PartialEq)]
649 pub enum ExtendedAttributeValue {
650 Bytes(::std::vec::Vec<u8>),
651
652 Buffer(::fdomain_client::Vmo),
653
654 UnknownOrdinal_(u64),
655 }
656
657 impl ExtendedAttributeValue {
658 pub fn is_unknown(&self) -> bool {
659 #[allow(unreachable_patterns)]
660 match self {
661 Self::UnknownOrdinal_(_) => true,
662 _ => false,
663 }
664 }
665 }
666
667 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>
668 for ExtendedAttributeValue
669 where
670 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
671 ___E: ::fidl_next::Encoder,
672 ___E: ::fdomain_client::fidl_next::HandleEncoder,
673 {
674 #[inline]
675 fn encode(
676 self,
677 encoder: &mut ___E,
678 out: &mut ::core::mem::MaybeUninit<crate::wire::ExtendedAttributeValue<'static>>,
679 _: (),
680 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
681 ::fidl_next::munge!(let crate::wire::ExtendedAttributeValue { raw, _phantom: _ } = out);
682
683 match self {
684 Self::Bytes(value) => ::fidl_next::wire::Union::encode_as::<
685 ___E,
686 ::fidl_next::wire::Vector<'static, u8>,
687 >(value, 1, encoder, raw, (32768, ()))?,
688
689 Self::Buffer(value) => ::fidl_next::wire::Union::encode_as::<
690 ___E,
691 ::fdomain_client::fidl_next::wire::Handle,
692 >(value, 2, encoder, raw, ())?,
693
694 Self::UnknownOrdinal_(ordinal) => {
695 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
696 }
697 }
698
699 Ok(())
700 }
701 }
702
703 unsafe impl<___E>
704 ::fidl_next::EncodeOption<crate::wire_optional::ExtendedAttributeValue<'static>, ___E>
705 for ExtendedAttributeValue
706 where
707 ___E: ?Sized,
708 ExtendedAttributeValue:
709 ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
710 {
711 #[inline]
712 fn encode_option(
713 this: ::core::option::Option<Self>,
714 encoder: &mut ___E,
715 out: &mut ::core::mem::MaybeUninit<
716 crate::wire_optional::ExtendedAttributeValue<'static>,
717 >,
718 _: (),
719 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
720 ::fidl_next::munge!(let crate::wire_optional::ExtendedAttributeValue { raw, _phantom: _ } = &mut *out);
721
722 if let Some(inner) = this {
723 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
724 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
725 } else {
726 ::fidl_next::wire::Union::encode_absent(raw);
727 }
728
729 Ok(())
730 }
731 }
732
733 impl<'de> ::fidl_next::FromWire<crate::wire::ExtendedAttributeValue<'de>>
734 for ExtendedAttributeValue
735 {
736 #[inline]
737 fn from_wire(wire: crate::wire::ExtendedAttributeValue<'de>) -> Self {
738 let wire = ::core::mem::ManuallyDrop::new(wire);
739 match wire.raw.ordinal() {
740 1 => Self::Bytes(::fidl_next::FromWire::from_wire(unsafe {
741 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
742 })),
743
744 2 => Self::Buffer(::fidl_next::FromWire::from_wire(unsafe {
745 wire.raw.get().read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
746 })),
747
748 ord => return Self::UnknownOrdinal_(ord as u64),
749 }
750 }
751 }
752
753 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
754 for ExtendedAttributeValue
755 {
756 #[inline]
757 fn from_wire_option(
758 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
759 ) -> ::core::option::Option<Self> {
760 if let Some(inner) = wire.into_option() {
761 Some(::fidl_next::FromWire::from_wire(inner))
762 } else {
763 None
764 }
765 }
766 }
767
768 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
769 for Box<ExtendedAttributeValue>
770 {
771 #[inline]
772 fn from_wire_option(
773 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
774 ) -> ::core::option::Option<Self> {
775 <ExtendedAttributeValue as ::fidl_next::FromWireOption<
776 crate::wire_optional::ExtendedAttributeValue<'de>,
777 >>::from_wire_option(wire)
778 .map(Box::new)
779 }
780 }
781
782 #[derive(Debug, PartialEq)]
783 pub struct NodeSetExtendedAttributeRequest {
784 pub name: ::std::vec::Vec<u8>,
785
786 pub value: crate::natural::ExtendedAttributeValue,
787
788 pub mode: crate::natural::SetExtendedAttributeMode,
789 }
790
791 unsafe impl<___E>
792 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
793 for NodeSetExtendedAttributeRequest
794 where
795 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
796 ___E: ::fidl_next::Encoder,
797 ___E: ::fdomain_client::fidl_next::HandleEncoder,
798 {
799 #[inline]
800 fn encode(
801 self,
802 encoder_: &mut ___E,
803 out_: &mut ::core::mem::MaybeUninit<
804 crate::wire::NodeSetExtendedAttributeRequest<'static>,
805 >,
806 _: (),
807 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
808 ::fidl_next::munge! {
809 let crate::wire::NodeSetExtendedAttributeRequest {
810 name,
811 value,
812 mode,
813
814 } = out_;
815 }
816
817 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
818
819 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
820 ::fidl_next::Constrained::validate(_field, (255, ()))?;
821
822 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
823
824 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
825
826 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
827
828 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
829
830 Ok(())
831 }
832 }
833
834 unsafe impl<___E>
835 ::fidl_next::EncodeOption<
836 ::fidl_next::wire::Box<'static, crate::wire::NodeSetExtendedAttributeRequest<'static>>,
837 ___E,
838 > for NodeSetExtendedAttributeRequest
839 where
840 ___E: ::fidl_next::Encoder + ?Sized,
841 NodeSetExtendedAttributeRequest:
842 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>,
843 {
844 #[inline]
845 fn encode_option(
846 this: ::core::option::Option<Self>,
847 encoder: &mut ___E,
848 out: &mut ::core::mem::MaybeUninit<
849 ::fidl_next::wire::Box<
850 'static,
851 crate::wire::NodeSetExtendedAttributeRequest<'static>,
852 >,
853 >,
854 _: (),
855 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
856 if let Some(inner) = this {
857 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
858 ::fidl_next::wire::Box::encode_present(out);
859 } else {
860 ::fidl_next::wire::Box::encode_absent(out);
861 }
862
863 Ok(())
864 }
865 }
866
867 impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetExtendedAttributeRequest<'de>>
868 for NodeSetExtendedAttributeRequest
869 {
870 #[inline]
871 fn from_wire(wire: crate::wire::NodeSetExtendedAttributeRequest<'de>) -> Self {
872 Self {
873 name: ::fidl_next::FromWire::from_wire(wire.name),
874
875 value: ::fidl_next::FromWire::from_wire(wire.value),
876
877 mode: ::fidl_next::FromWire::from_wire(wire.mode),
878 }
879 }
880 }
881
882 #[doc = " Auxiliary data for the file representation of a node.\n"]
883 #[derive(Debug, Default, PartialEq)]
884 pub struct FileInfo {
885 pub is_append: ::core::option::Option<bool>,
886
887 pub observer: ::core::option::Option<::fdomain_client::Event>,
888
889 pub stream: ::core::option::Option<::fdomain_client::Stream>,
890
891 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
892 }
893
894 impl FileInfo {
895 fn __max_ordinal(&self) -> usize {
896 if self.attributes.is_some() {
897 return 4;
898 }
899
900 if self.stream.is_some() {
901 return 3;
902 }
903
904 if self.observer.is_some() {
905 return 2;
906 }
907
908 if self.is_append.is_some() {
909 return 1;
910 }
911
912 0
913 }
914 }
915
916 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileInfo<'static>, ___E> for FileInfo
917 where
918 ___E: ::fidl_next::Encoder + ?Sized,
919 ___E: ::fdomain_client::fidl_next::HandleEncoder,
920 {
921 #[inline]
922 fn encode(
923 mut self,
924 encoder: &mut ___E,
925 out: &mut ::core::mem::MaybeUninit<crate::wire::FileInfo<'static>>,
926 _: (),
927 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
928 ::fidl_next::munge!(let crate::wire::FileInfo { table } = out);
929
930 let max_ord = self.__max_ordinal();
931
932 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
933 ::fidl_next::Wire::zero_padding(&mut out);
934
935 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
936 ::fidl_next::wire::Envelope,
937 >(encoder, max_ord);
938
939 for i in 1..=max_ord {
940 match i {
941 4 => {
942 if let Some(value) = self.attributes.take() {
943 ::fidl_next::wire::Envelope::encode_value::<
944 crate::wire::NodeAttributes2<'static>,
945 ___E,
946 >(
947 value, preallocated.encoder, &mut out, ()
948 )?;
949 } else {
950 ::fidl_next::wire::Envelope::encode_zero(&mut out)
951 }
952 }
953
954 3 => {
955 if let Some(value) = self.stream.take() {
956 ::fidl_next::wire::Envelope::encode_value::<
957 ::fdomain_client::fidl_next::wire::Handle,
958 ___E,
959 >(
960 value, preallocated.encoder, &mut out, ()
961 )?;
962 } else {
963 ::fidl_next::wire::Envelope::encode_zero(&mut out)
964 }
965 }
966
967 2 => {
968 if let Some(value) = self.observer.take() {
969 ::fidl_next::wire::Envelope::encode_value::<
970 ::fdomain_client::fidl_next::wire::Handle,
971 ___E,
972 >(
973 value, preallocated.encoder, &mut out, ()
974 )?;
975 } else {
976 ::fidl_next::wire::Envelope::encode_zero(&mut out)
977 }
978 }
979
980 1 => {
981 if let Some(value) = self.is_append.take() {
982 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
983 value,
984 preallocated.encoder,
985 &mut out,
986 (),
987 )?;
988 } else {
989 ::fidl_next::wire::Envelope::encode_zero(&mut out)
990 }
991 }
992
993 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
994 }
995 unsafe {
996 preallocated.write_next(out.assume_init_ref());
997 }
998 }
999
1000 ::fidl_next::wire::Table::encode_len(table, max_ord);
1001
1002 Ok(())
1003 }
1004 }
1005
1006 impl<'de> ::fidl_next::FromWire<crate::wire::FileInfo<'de>> for FileInfo {
1007 #[inline]
1008 fn from_wire(wire_: crate::wire::FileInfo<'de>) -> Self {
1009 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1010
1011 let is_append = wire_.table.get(1);
1012
1013 let observer = wire_.table.get(2);
1014
1015 let stream = wire_.table.get(3);
1016
1017 let attributes = wire_.table.get(4);
1018
1019 Self {
1020 is_append: is_append.map(|envelope| {
1021 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1022 }),
1023
1024 observer: observer.map(|envelope| {
1025 ::fidl_next::FromWire::from_wire(unsafe {
1026 envelope.read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
1027 })
1028 }),
1029
1030 stream: stream.map(|envelope| {
1031 ::fidl_next::FromWire::from_wire(unsafe {
1032 envelope.read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
1033 })
1034 }),
1035
1036 attributes: attributes.map(|envelope| {
1037 ::fidl_next::FromWire::from_wire(unsafe {
1038 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
1039 })
1040 }),
1041 }
1042 }
1043 }
1044
1045 #[derive(Debug, PartialEq)]
1046 pub enum Representation {
1047 Node(crate::natural::NodeInfo),
1048
1049 Directory(crate::natural::DirectoryInfo),
1050
1051 File(crate::natural::FileInfo),
1052
1053 Symlink(crate::natural::SymlinkInfo),
1054
1055 UnknownOrdinal_(u64),
1056 }
1057
1058 impl Representation {
1059 pub fn is_unknown(&self) -> bool {
1060 #[allow(unreachable_patterns)]
1061 match self {
1062 Self::UnknownOrdinal_(_) => true,
1063 _ => false,
1064 }
1065 }
1066 }
1067
1068 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Representation<'static>, ___E> for Representation
1069 where
1070 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1071 ___E: ::fidl_next::Encoder,
1072 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1073 {
1074 #[inline]
1075 fn encode(
1076 self,
1077 encoder: &mut ___E,
1078 out: &mut ::core::mem::MaybeUninit<crate::wire::Representation<'static>>,
1079 _: (),
1080 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1081 ::fidl_next::munge!(let crate::wire::Representation { raw, _phantom: _ } = out);
1082
1083 match self {
1084 Self::Node(value) => ::fidl_next::wire::Union::encode_as::<
1085 ___E,
1086 crate::wire::NodeInfo<'static>,
1087 >(value, 1, encoder, raw, ())?,
1088
1089 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
1090 ___E,
1091 crate::wire::DirectoryInfo<'static>,
1092 >(value, 2, encoder, raw, ())?,
1093
1094 Self::File(value) => ::fidl_next::wire::Union::encode_as::<
1095 ___E,
1096 crate::wire::FileInfo<'static>,
1097 >(value, 3, encoder, raw, ())?,
1098
1099 Self::Symlink(value) => ::fidl_next::wire::Union::encode_as::<
1100 ___E,
1101 crate::wire::SymlinkInfo<'static>,
1102 >(value, 4, encoder, raw, ())?,
1103
1104 Self::UnknownOrdinal_(ordinal) => {
1105 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1106 }
1107 }
1108
1109 Ok(())
1110 }
1111 }
1112
1113 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Representation<'static>, ___E>
1114 for Representation
1115 where
1116 ___E: ?Sized,
1117 Representation: ::fidl_next::Encode<crate::wire::Representation<'static>, ___E>,
1118 {
1119 #[inline]
1120 fn encode_option(
1121 this: ::core::option::Option<Self>,
1122 encoder: &mut ___E,
1123 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Representation<'static>>,
1124 _: (),
1125 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1126 ::fidl_next::munge!(let crate::wire_optional::Representation { raw, _phantom: _ } = &mut *out);
1127
1128 if let Some(inner) = this {
1129 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1130 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1131 } else {
1132 ::fidl_next::wire::Union::encode_absent(raw);
1133 }
1134
1135 Ok(())
1136 }
1137 }
1138
1139 impl<'de> ::fidl_next::FromWire<crate::wire::Representation<'de>> for Representation {
1140 #[inline]
1141 fn from_wire(wire: crate::wire::Representation<'de>) -> Self {
1142 let wire = ::core::mem::ManuallyDrop::new(wire);
1143 match wire.raw.ordinal() {
1144 1 => Self::Node(::fidl_next::FromWire::from_wire(unsafe {
1145 wire.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>()
1146 })),
1147
1148 2 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
1149 wire.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
1150 })),
1151
1152 3 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
1153 wire.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>()
1154 })),
1155
1156 4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
1157 wire.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>()
1158 })),
1159
1160 ord => return Self::UnknownOrdinal_(ord as u64),
1161 }
1162 }
1163 }
1164
1165 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1166 for Representation
1167 {
1168 #[inline]
1169 fn from_wire_option(
1170 wire: crate::wire_optional::Representation<'de>,
1171 ) -> ::core::option::Option<Self> {
1172 if let Some(inner) = wire.into_option() {
1173 Some(::fidl_next::FromWire::from_wire(inner))
1174 } else {
1175 None
1176 }
1177 }
1178 }
1179
1180 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1181 for Box<Representation>
1182 {
1183 #[inline]
1184 fn from_wire_option(
1185 wire: crate::wire_optional::Representation<'de>,
1186 ) -> ::core::option::Option<Self> {
1187 <Representation as ::fidl_next::FromWireOption<
1188 crate::wire_optional::Representation<'de>,
1189 >>::from_wire_option(wire)
1190 .map(Box::new)
1191 }
1192 }
1193
1194 #[derive(Debug, PartialEq)]
1195 pub struct OpenableOpenRequest {
1196 pub path: ::std::string::String,
1197
1198 pub flags: crate::natural::Flags,
1199
1200 pub options: crate::natural::Options,
1201
1202 pub object: ::fdomain_client::Channel,
1203 }
1204
1205 unsafe impl<___E> ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'static>, ___E>
1206 for OpenableOpenRequest
1207 where
1208 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1209 ___E: ::fidl_next::Encoder,
1210 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1211 {
1212 #[inline]
1213 fn encode(
1214 self,
1215 encoder_: &mut ___E,
1216 out_: &mut ::core::mem::MaybeUninit<crate::wire::OpenableOpenRequest<'static>>,
1217 _: (),
1218 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1219 ::fidl_next::munge! {
1220 let crate::wire::OpenableOpenRequest {
1221 path,
1222 flags,
1223 options,
1224 object,
1225
1226 } = out_;
1227 }
1228
1229 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
1230
1231 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
1232 ::fidl_next::Constrained::validate(_field, 4095)?;
1233
1234 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1235
1236 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1237
1238 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
1239
1240 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
1241
1242 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1243
1244 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1245
1246 Ok(())
1247 }
1248 }
1249
1250 unsafe impl<___E>
1251 ::fidl_next::EncodeOption<
1252 ::fidl_next::wire::Box<'static, crate::wire::OpenableOpenRequest<'static>>,
1253 ___E,
1254 > for OpenableOpenRequest
1255 where
1256 ___E: ::fidl_next::Encoder + ?Sized,
1257 OpenableOpenRequest: ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'static>, ___E>,
1258 {
1259 #[inline]
1260 fn encode_option(
1261 this: ::core::option::Option<Self>,
1262 encoder: &mut ___E,
1263 out: &mut ::core::mem::MaybeUninit<
1264 ::fidl_next::wire::Box<'static, crate::wire::OpenableOpenRequest<'static>>,
1265 >,
1266 _: (),
1267 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1268 if let Some(inner) = this {
1269 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1270 ::fidl_next::wire::Box::encode_present(out);
1271 } else {
1272 ::fidl_next::wire::Box::encode_absent(out);
1273 }
1274
1275 Ok(())
1276 }
1277 }
1278
1279 impl<'de> ::fidl_next::FromWire<crate::wire::OpenableOpenRequest<'de>> for OpenableOpenRequest {
1280 #[inline]
1281 fn from_wire(wire: crate::wire::OpenableOpenRequest<'de>) -> Self {
1282 Self {
1283 path: ::fidl_next::FromWire::from_wire(wire.path),
1284
1285 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1286
1287 options: ::fidl_next::FromWire::from_wire(wire.options),
1288
1289 object: ::fidl_next::FromWire::from_wire(wire.object),
1290 }
1291 }
1292 }
1293
1294 #[derive(Debug, PartialEq)]
1295 #[repr(C)]
1296 pub struct NodeDeprecatedCloneRequest {
1297 pub flags: crate::natural::OpenFlags,
1298
1299 pub object: ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::Channel>,
1300 }
1301
1302 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
1303 for NodeDeprecatedCloneRequest
1304 where
1305 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1306 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1307 {
1308 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1309 Self,
1310 crate::wire::NodeDeprecatedCloneRequest,
1311 > = unsafe {
1312 ::fidl_next::CopyOptimization::enable_if(
1313 true
1314
1315 && <
1316 crate::natural::OpenFlags as ::fidl_next::Encode<crate::wire::OpenFlags, ___E>
1317 >::COPY_OPTIMIZATION.is_enabled()
1318
1319 && <
1320 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>, ___E>
1321 >::COPY_OPTIMIZATION.is_enabled()
1322
1323 )
1324 };
1325
1326 #[inline]
1327 fn encode(
1328 self,
1329 encoder_: &mut ___E,
1330 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
1331 _: (),
1332 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1333 ::fidl_next::munge! {
1334 let crate::wire::NodeDeprecatedCloneRequest {
1335 flags,
1336 object,
1337
1338 } = out_;
1339 }
1340
1341 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1342
1343 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1344
1345 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1346
1347 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1348
1349 Ok(())
1350 }
1351 }
1352
1353 unsafe impl<___E>
1354 ::fidl_next::EncodeOption<
1355 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1356 ___E,
1357 > for NodeDeprecatedCloneRequest
1358 where
1359 ___E: ::fidl_next::Encoder + ?Sized,
1360 NodeDeprecatedCloneRequest:
1361 ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>,
1362 {
1363 #[inline]
1364 fn encode_option(
1365 this: ::core::option::Option<Self>,
1366 encoder: &mut ___E,
1367 out: &mut ::core::mem::MaybeUninit<
1368 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1369 >,
1370 _: (),
1371 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1372 if let Some(inner) = this {
1373 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1374 ::fidl_next::wire::Box::encode_present(out);
1375 } else {
1376 ::fidl_next::wire::Box::encode_absent(out);
1377 }
1378
1379 Ok(())
1380 }
1381 }
1382
1383 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedCloneRequest> for NodeDeprecatedCloneRequest {
1384 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1385 crate::wire::NodeDeprecatedCloneRequest,
1386 Self,
1387 > = unsafe {
1388 ::fidl_next::CopyOptimization::enable_if(
1389 true
1390
1391 && <
1392 crate::natural::OpenFlags as ::fidl_next::FromWire<crate::wire::OpenFlags>
1393 >::COPY_OPTIMIZATION.is_enabled()
1394
1395 && <
1396 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>>
1397 >::COPY_OPTIMIZATION.is_enabled()
1398
1399 )
1400 };
1401
1402 #[inline]
1403 fn from_wire(wire: crate::wire::NodeDeprecatedCloneRequest) -> Self {
1404 Self {
1405 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1406
1407 object: ::fidl_next::FromWire::from_wire(wire.object),
1408 }
1409 }
1410 }
1411
1412 #[derive(Debug, PartialEq)]
1413 pub struct NodeOnOpenRequest {
1414 pub s: ::fidl_next::fuchsia::zx::Status,
1415
1416 pub info: ::core::option::Option<::std::boxed::Box<crate::natural::NodeInfoDeprecated>>,
1417 }
1418
1419 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
1420 for NodeOnOpenRequest
1421 where
1422 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1423 ___E: ::fidl_next::Encoder,
1424 ___E: ::fdomain_client::fidl_next::HandleEncoder,
1425 {
1426 #[inline]
1427 fn encode(
1428 self,
1429 encoder_: &mut ___E,
1430 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
1431 _: (),
1432 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1433 ::fidl_next::munge! {
1434 let crate::wire::NodeOnOpenRequest {
1435 s,
1436 info,
1437
1438 } = out_;
1439 }
1440
1441 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1442
1443 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1444
1445 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
1446
1447 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
1448
1449 Ok(())
1450 }
1451 }
1452
1453 unsafe impl<___E>
1454 ::fidl_next::EncodeOption<
1455 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
1456 ___E,
1457 > for NodeOnOpenRequest
1458 where
1459 ___E: ::fidl_next::Encoder + ?Sized,
1460 NodeOnOpenRequest: ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>,
1461 {
1462 #[inline]
1463 fn encode_option(
1464 this: ::core::option::Option<Self>,
1465 encoder: &mut ___E,
1466 out: &mut ::core::mem::MaybeUninit<
1467 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
1468 >,
1469 _: (),
1470 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1471 if let Some(inner) = this {
1472 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1473 ::fidl_next::wire::Box::encode_present(out);
1474 } else {
1475 ::fidl_next::wire::Box::encode_absent(out);
1476 }
1477
1478 Ok(())
1479 }
1480 }
1481
1482 impl<'de> ::fidl_next::FromWire<crate::wire::NodeOnOpenRequest<'de>> for NodeOnOpenRequest {
1483 #[inline]
1484 fn from_wire(wire: crate::wire::NodeOnOpenRequest<'de>) -> Self {
1485 Self {
1486 s: ::fidl_next::FromWire::from_wire(wire.s),
1487
1488 info: ::fidl_next::FromWire::from_wire(wire.info),
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 pub fn take_rights(&mut self) -> ::core::option::Option<crate::wire::Operations> {
2372 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2373 }
2374 }
2375
2376 impl<'de> ::core::fmt::Debug for ConnectionInfo<'de> {
2377 fn fmt(
2378 &self,
2379 f: &mut ::core::fmt::Formatter<'_>,
2380 ) -> ::core::result::Result<(), ::core::fmt::Error> {
2381 f.debug_struct("ConnectionInfo").field("rights", &self.rights()).finish()
2382 }
2383 }
2384
2385 impl<'de> ::fidl_next::IntoNatural for ConnectionInfo<'de> {
2386 type Natural = crate::natural::ConnectionInfo;
2387 }
2388
2389 #[derive(Debug)]
2391 #[repr(C)]
2392 pub struct DirectoryGetTokenResponse {
2393 pub s: ::fidl_next::wire::fuchsia::Status,
2394
2395 pub token: ::fdomain_client::fidl_next::wire::OptionalHandle,
2396 }
2397
2398 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryGetTokenResponse>(), 8);
2399 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryGetTokenResponse>(), 4);
2400
2401 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryGetTokenResponse, s), 0);
2402
2403 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryGetTokenResponse, token), 4);
2404
2405 impl ::fidl_next::Constrained for DirectoryGetTokenResponse {
2406 type Constraint = ();
2407
2408 fn validate(
2409 _: ::fidl_next::Slot<'_, Self>,
2410 _: Self::Constraint,
2411 ) -> Result<(), ::fidl_next::ValidationError> {
2412 Ok(())
2413 }
2414 }
2415
2416 unsafe impl ::fidl_next::Wire for DirectoryGetTokenResponse {
2417 type Narrowed<'de> = DirectoryGetTokenResponse;
2418
2419 #[inline]
2420 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2421 ::fidl_next::munge! {
2422 let Self {
2423 s,
2424 token,
2425
2426 } = &mut *out_;
2427 }
2428
2429 ::fidl_next::Wire::zero_padding(s);
2430
2431 ::fidl_next::Wire::zero_padding(token);
2432 }
2433 }
2434
2435 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryGetTokenResponse
2436 where
2437 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2438 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2439 {
2440 fn decode(
2441 slot_: ::fidl_next::Slot<'_, Self>,
2442 decoder_: &mut ___D,
2443 _: (),
2444 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2445 ::fidl_next::munge! {
2446 let Self {
2447 mut s,
2448 mut token,
2449
2450 } = slot_;
2451 }
2452
2453 let _field = s.as_mut();
2454
2455 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
2456
2457 let _field = token.as_mut();
2458
2459 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
2460
2461 Ok(())
2462 }
2463 }
2464
2465 impl ::fidl_next::IntoNatural for DirectoryGetTokenResponse {
2466 type Natural = crate::natural::DirectoryGetTokenResponse;
2467 }
2468
2469 #[derive(Debug)]
2471 #[repr(C)]
2472 pub struct DirectoryLinkRequest<'de> {
2473 pub src: ::fidl_next::wire::String<'de>,
2474
2475 pub dst_parent_token: ::fdomain_client::fidl_next::wire::Handle,
2476
2477 pub dst: ::fidl_next::wire::String<'de>,
2478 }
2479
2480 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkRequest<'_>>(), 40);
2481 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkRequest<'_>>(), 8);
2482
2483 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, src), 0);
2484
2485 static_assertions::const_assert_eq!(
2486 std::mem::offset_of!(DirectoryLinkRequest<'_>, dst_parent_token),
2487 16
2488 );
2489
2490 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, dst), 24);
2491
2492 impl ::fidl_next::Constrained for DirectoryLinkRequest<'_> {
2493 type Constraint = ();
2494
2495 fn validate(
2496 _: ::fidl_next::Slot<'_, Self>,
2497 _: Self::Constraint,
2498 ) -> Result<(), ::fidl_next::ValidationError> {
2499 Ok(())
2500 }
2501 }
2502
2503 unsafe impl ::fidl_next::Wire for DirectoryLinkRequest<'static> {
2504 type Narrowed<'de> = DirectoryLinkRequest<'de>;
2505
2506 #[inline]
2507 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2508 ::fidl_next::munge! {
2509 let Self {
2510 src,
2511 dst_parent_token,
2512 dst,
2513
2514 } = &mut *out_;
2515 }
2516
2517 ::fidl_next::Wire::zero_padding(src);
2518
2519 ::fidl_next::Wire::zero_padding(dst_parent_token);
2520
2521 ::fidl_next::Wire::zero_padding(dst);
2522
2523 unsafe {
2524 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2525 }
2526 }
2527 }
2528
2529 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryLinkRequest<'de>
2530 where
2531 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2532 ___D: ::fidl_next::Decoder<'de>,
2533 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2534 {
2535 fn decode(
2536 slot_: ::fidl_next::Slot<'_, Self>,
2537 decoder_: &mut ___D,
2538 _: (),
2539 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2540 if slot_.as_bytes()[20..24] != [0u8; 4] {
2541 return Err(::fidl_next::DecodeError::InvalidPadding);
2542 }
2543
2544 ::fidl_next::munge! {
2545 let Self {
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 src,
2636 dst_parent_token,
2637 dst,
2638
2639 } = &mut *out_;
2640 }
2641
2642 ::fidl_next::Wire::zero_padding(src);
2643
2644 ::fidl_next::Wire::zero_padding(dst_parent_token);
2645
2646 ::fidl_next::Wire::zero_padding(dst);
2647
2648 unsafe {
2649 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2650 }
2651 }
2652 }
2653
2654 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryRenameRequest<'de>
2655 where
2656 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2657 ___D: ::fidl_next::Decoder<'de>,
2658 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2659 {
2660 fn decode(
2661 slot_: ::fidl_next::Slot<'_, Self>,
2662 decoder_: &mut ___D,
2663 _: (),
2664 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2665 if slot_.as_bytes()[20..24] != [0u8; 4] {
2666 return Err(::fidl_next::DecodeError::InvalidPadding);
2667 }
2668
2669 ::fidl_next::munge! {
2670 let Self {
2671 mut src,
2672 mut dst_parent_token,
2673 mut dst,
2674
2675 } = slot_;
2676 }
2677
2678 let _field = src.as_mut();
2679 ::fidl_next::Constrained::validate(_field, 255)?;
2680 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2681
2682 let src = unsafe { src.deref_unchecked() };
2683
2684 if src.len() > 255 {
2685 return Err(::fidl_next::DecodeError::VectorTooLong {
2686 size: src.len() as u64,
2687 limit: 255,
2688 });
2689 }
2690
2691 let _field = dst_parent_token.as_mut();
2692
2693 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2694
2695 let _field = dst.as_mut();
2696 ::fidl_next::Constrained::validate(_field, 255)?;
2697 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2698
2699 let dst = unsafe { dst.deref_unchecked() };
2700
2701 if dst.len() > 255 {
2702 return Err(::fidl_next::DecodeError::VectorTooLong {
2703 size: dst.len() as u64,
2704 limit: 255,
2705 });
2706 }
2707
2708 Ok(())
2709 }
2710 }
2711
2712 impl<'de> ::fidl_next::IntoNatural for DirectoryRenameRequest<'de> {
2713 type Natural = crate::natural::DirectoryRenameRequest;
2714 }
2715
2716 #[derive(Debug)]
2718 #[repr(C)]
2719 pub struct DirectoryWatchRequest {
2720 pub mask: crate::wire::WatchMask,
2721
2722 pub options: ::fidl_next::wire::Uint32,
2723
2724 pub watcher: ::fidl_next::ServerEnd<
2725 crate::DirectoryWatcher,
2726 ::fdomain_client::fidl_next::wire::Handle,
2727 >,
2728 }
2729
2730 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchRequest>(), 12);
2731 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchRequest>(), 4);
2732
2733 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, mask), 0);
2734
2735 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, options), 4);
2736
2737 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, watcher), 8);
2738
2739 impl ::fidl_next::Constrained for DirectoryWatchRequest {
2740 type Constraint = ();
2741
2742 fn validate(
2743 _: ::fidl_next::Slot<'_, Self>,
2744 _: Self::Constraint,
2745 ) -> Result<(), ::fidl_next::ValidationError> {
2746 Ok(())
2747 }
2748 }
2749
2750 unsafe impl ::fidl_next::Wire for DirectoryWatchRequest {
2751 type Narrowed<'de> = DirectoryWatchRequest;
2752
2753 #[inline]
2754 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2755 ::fidl_next::munge! {
2756 let Self {
2757 mask,
2758 options,
2759 watcher,
2760
2761 } = &mut *out_;
2762 }
2763
2764 ::fidl_next::Wire::zero_padding(mask);
2765
2766 ::fidl_next::Wire::zero_padding(options);
2767
2768 ::fidl_next::Wire::zero_padding(watcher);
2769 }
2770 }
2771
2772 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchRequest
2773 where
2774 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2775 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2776 {
2777 fn decode(
2778 slot_: ::fidl_next::Slot<'_, Self>,
2779 decoder_: &mut ___D,
2780 _: (),
2781 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2782 ::fidl_next::munge! {
2783 let Self {
2784 mut mask,
2785 mut options,
2786 mut watcher,
2787
2788 } = slot_;
2789 }
2790
2791 let _field = mask.as_mut();
2792
2793 ::fidl_next::Decode::decode(mask.as_mut(), decoder_, ())?;
2794
2795 let _field = options.as_mut();
2796
2797 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
2798
2799 let _field = watcher.as_mut();
2800
2801 ::fidl_next::Decode::decode(watcher.as_mut(), decoder_, ())?;
2802
2803 Ok(())
2804 }
2805 }
2806
2807 impl ::fidl_next::IntoNatural for DirectoryWatchRequest {
2808 type Natural = crate::natural::DirectoryWatchRequest;
2809 }
2810
2811 #[derive(Debug)]
2813 #[repr(C)]
2814 pub struct NodeListExtendedAttributesRequest {
2815 pub iterator: ::fidl_next::ServerEnd<
2816 crate::ExtendedAttributeIterator,
2817 ::fdomain_client::fidl_next::wire::Handle,
2818 >,
2819 }
2820
2821 static_assertions::const_assert_eq!(
2822 std::mem::size_of::<NodeListExtendedAttributesRequest>(),
2823 4
2824 );
2825 static_assertions::const_assert_eq!(
2826 std::mem::align_of::<NodeListExtendedAttributesRequest>(),
2827 4
2828 );
2829
2830 static_assertions::const_assert_eq!(
2831 std::mem::offset_of!(NodeListExtendedAttributesRequest, iterator),
2832 0
2833 );
2834
2835 impl ::fidl_next::Constrained for NodeListExtendedAttributesRequest {
2836 type Constraint = ();
2837
2838 fn validate(
2839 _: ::fidl_next::Slot<'_, Self>,
2840 _: Self::Constraint,
2841 ) -> Result<(), ::fidl_next::ValidationError> {
2842 Ok(())
2843 }
2844 }
2845
2846 unsafe impl ::fidl_next::Wire for NodeListExtendedAttributesRequest {
2847 type Narrowed<'de> = NodeListExtendedAttributesRequest;
2848
2849 #[inline]
2850 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2851 ::fidl_next::munge! {
2852 let Self {
2853 iterator,
2854
2855 } = &mut *out_;
2856 }
2857
2858 ::fidl_next::Wire::zero_padding(iterator);
2859 }
2860 }
2861
2862 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeListExtendedAttributesRequest
2863 where
2864 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2865 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2866 {
2867 fn decode(
2868 slot_: ::fidl_next::Slot<'_, Self>,
2869 decoder_: &mut ___D,
2870 _: (),
2871 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2872 ::fidl_next::munge! {
2873 let Self {
2874 mut iterator,
2875
2876 } = slot_;
2877 }
2878
2879 let _field = iterator.as_mut();
2880
2881 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
2882
2883 Ok(())
2884 }
2885 }
2886
2887 impl ::fidl_next::IntoNatural for NodeListExtendedAttributesRequest {
2888 type Natural = crate::natural::NodeListExtendedAttributesRequest;
2889 }
2890
2891 #[repr(transparent)]
2893 pub struct ExtendedAttributeValue<'de> {
2894 pub(crate) raw: ::fidl_next::wire::Union,
2895 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2896 }
2897
2898 impl<'de> Drop for ExtendedAttributeValue<'de> {
2899 fn drop(&mut self) {
2900 match self.raw.ordinal() {
2901 1 => {
2902 let _ = unsafe {
2903 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2904 };
2905 }
2906
2907 2 => {
2908 let _ = unsafe {
2909 self.raw.get().read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
2910 };
2911 }
2912
2913 _ => (),
2914 }
2915 }
2916 }
2917
2918 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
2919 type Constraint = ();
2920
2921 fn validate(
2922 _: ::fidl_next::Slot<'_, Self>,
2923 _: Self::Constraint,
2924 ) -> Result<(), ::fidl_next::ValidationError> {
2925 Ok(())
2926 }
2927 }
2928
2929 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
2930 type Narrowed<'de> = ExtendedAttributeValue<'de>;
2931
2932 #[inline]
2933 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2934 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2935 ::fidl_next::wire::Union::zero_padding(raw);
2936 }
2937 }
2938
2939 pub mod extended_attribute_value {
2940 pub enum Ref<'de> {
2941 Bytes(&'de ::fidl_next::wire::Vector<'de, u8>),
2942
2943 Buffer(&'de ::fdomain_client::fidl_next::wire::Handle),
2944
2945 UnknownOrdinal_(u64),
2946 }
2947
2948 pub enum Value<'de> {
2949 Bytes(::fidl_next::wire::Vector<'de, u8>),
2950
2951 Buffer(::fdomain_client::fidl_next::wire::Handle),
2952
2953 UnknownOrdinal_(u64),
2954 }
2955 }
2956
2957 impl<'de> ExtendedAttributeValue<'de> {
2958 pub fn as_ref(&self) -> crate::wire::extended_attribute_value::Ref<'_> {
2959 match self.raw.ordinal() {
2960 1 => crate::wire::extended_attribute_value::Ref::Bytes(unsafe {
2961 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
2962 }),
2963
2964 2 => crate::wire::extended_attribute_value::Ref::Buffer(unsafe {
2965 self.raw.get().deref_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
2966 }),
2967
2968 unknown => crate::wire::extended_attribute_value::Ref::UnknownOrdinal_(unknown),
2969 }
2970 }
2971
2972 pub fn into_inner(self) -> crate::wire::extended_attribute_value::Value<'de> {
2973 let this = ::core::mem::ManuallyDrop::new(self);
2974
2975 match this.raw.ordinal() {
2976 1 => crate::wire::extended_attribute_value::Value::Bytes(unsafe {
2977 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2978 }),
2979
2980 2 => crate::wire::extended_attribute_value::Value::Buffer(unsafe {
2981 this.raw.get().read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
2982 }),
2983
2984 unknown => crate::wire::extended_attribute_value::Value::UnknownOrdinal_(unknown),
2985 }
2986 }
2987 }
2988
2989 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
2990 where
2991 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2992 ___D: ::fidl_next::Decoder<'de>,
2993 ___D: ::fdomain_client::fidl_next::HandleDecoder,
2994 {
2995 fn decode(
2996 mut slot: ::fidl_next::Slot<'_, Self>,
2997 decoder: &mut ___D,
2998 _: (),
2999 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3000 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3001 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3002 1 => {
3003 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3004 raw,
3005 decoder,
3006 (32768, ()),
3007 )?
3008 }
3009
3010 2 => ::fidl_next::wire::Union::decode_as::<
3011 ___D,
3012 ::fdomain_client::fidl_next::wire::Handle,
3013 >(raw, decoder, ())?,
3014
3015 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3016 }
3017
3018 Ok(())
3019 }
3020 }
3021
3022 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
3023 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3024 match self.raw.ordinal() {
3025 1 => unsafe {
3026 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
3027 },
3028 2 => unsafe {
3029 self.raw
3030 .get()
3031 .deref_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3032 .fmt(f)
3033 },
3034 _ => unsafe { ::core::hint::unreachable_unchecked() },
3035 }
3036 }
3037 }
3038
3039 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
3040 type Natural = crate::natural::ExtendedAttributeValue;
3041 }
3042
3043 #[derive(Debug)]
3045 #[repr(C)]
3046 pub struct NodeSetExtendedAttributeRequest<'de> {
3047 pub name: ::fidl_next::wire::Vector<'de, u8>,
3048
3049 pub value: crate::wire::ExtendedAttributeValue<'de>,
3050
3051 pub mode: crate::wire::SetExtendedAttributeMode,
3052 }
3053
3054 static_assertions::const_assert_eq!(
3055 std::mem::size_of::<NodeSetExtendedAttributeRequest<'_>>(),
3056 40
3057 );
3058 static_assertions::const_assert_eq!(
3059 std::mem::align_of::<NodeSetExtendedAttributeRequest<'_>>(),
3060 8
3061 );
3062
3063 static_assertions::const_assert_eq!(
3064 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, name),
3065 0
3066 );
3067
3068 static_assertions::const_assert_eq!(
3069 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, value),
3070 16
3071 );
3072
3073 static_assertions::const_assert_eq!(
3074 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, mode),
3075 32
3076 );
3077
3078 impl ::fidl_next::Constrained for NodeSetExtendedAttributeRequest<'_> {
3079 type Constraint = ();
3080
3081 fn validate(
3082 _: ::fidl_next::Slot<'_, Self>,
3083 _: Self::Constraint,
3084 ) -> Result<(), ::fidl_next::ValidationError> {
3085 Ok(())
3086 }
3087 }
3088
3089 unsafe impl ::fidl_next::Wire for NodeSetExtendedAttributeRequest<'static> {
3090 type Narrowed<'de> = NodeSetExtendedAttributeRequest<'de>;
3091
3092 #[inline]
3093 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3094 ::fidl_next::munge! {
3095 let Self {
3096 name,
3097 value,
3098 mode,
3099
3100 } = &mut *out_;
3101 }
3102
3103 ::fidl_next::Wire::zero_padding(name);
3104
3105 ::fidl_next::Wire::zero_padding(value);
3106
3107 ::fidl_next::Wire::zero_padding(mode);
3108
3109 unsafe {
3110 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3111 }
3112 }
3113 }
3114
3115 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetExtendedAttributeRequest<'de>
3116 where
3117 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3118 ___D: ::fidl_next::Decoder<'de>,
3119 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3120 {
3121 fn decode(
3122 slot_: ::fidl_next::Slot<'_, Self>,
3123 decoder_: &mut ___D,
3124 _: (),
3125 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3126 if slot_.as_bytes()[36..40] != [0u8; 4] {
3127 return Err(::fidl_next::DecodeError::InvalidPadding);
3128 }
3129
3130 ::fidl_next::munge! {
3131 let Self {
3132 mut name,
3133 mut value,
3134 mut mode,
3135
3136 } = slot_;
3137 }
3138
3139 let _field = name.as_mut();
3140 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3141 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
3142
3143 let name = unsafe { name.deref_unchecked() };
3144
3145 if name.len() > 255 {
3146 return Err(::fidl_next::DecodeError::VectorTooLong {
3147 size: name.len() as u64,
3148 limit: 255,
3149 });
3150 }
3151
3152 let _field = value.as_mut();
3153
3154 ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
3155
3156 let _field = mode.as_mut();
3157
3158 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3159
3160 Ok(())
3161 }
3162 }
3163
3164 impl<'de> ::fidl_next::IntoNatural for NodeSetExtendedAttributeRequest<'de> {
3165 type Natural = crate::natural::NodeSetExtendedAttributeRequest;
3166 }
3167
3168 #[repr(C)]
3170 pub struct FileInfo<'de> {
3171 pub(crate) table: ::fidl_next::wire::Table<'de>,
3172 }
3173
3174 impl<'de> Drop for FileInfo<'de> {
3175 fn drop(&mut self) {
3176 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3177
3178 let _ = self.table.get(2).map(|envelope| unsafe {
3179 envelope.read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3180 });
3181
3182 let _ = self.table.get(3).map(|envelope| unsafe {
3183 envelope.read_unchecked::<::fdomain_client::fidl_next::wire::Handle>()
3184 });
3185
3186 let _ = self.table.get(4).map(|envelope| unsafe {
3187 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
3188 });
3189 }
3190 }
3191
3192 impl ::fidl_next::Constrained for FileInfo<'_> {
3193 type Constraint = ();
3194
3195 fn validate(
3196 _: ::fidl_next::Slot<'_, Self>,
3197 _: Self::Constraint,
3198 ) -> Result<(), ::fidl_next::ValidationError> {
3199 Ok(())
3200 }
3201 }
3202
3203 unsafe impl ::fidl_next::Wire for FileInfo<'static> {
3204 type Narrowed<'de> = FileInfo<'de>;
3205
3206 #[inline]
3207 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3208 ::fidl_next::munge!(let Self { table } = out);
3209 ::fidl_next::wire::Table::zero_padding(table);
3210 }
3211 }
3212
3213 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileInfo<'de>
3214 where
3215 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3216 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3217 {
3218 fn decode(
3219 slot: ::fidl_next::Slot<'_, Self>,
3220 decoder: &mut ___D,
3221 _: (),
3222 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3223 ::fidl_next::munge!(let Self { table } = slot);
3224
3225 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3226 match ordinal {
3227 0 => unsafe { ::core::hint::unreachable_unchecked() },
3228
3229 1 => {
3230 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3231 slot.as_mut(),
3232 decoder,
3233 (),
3234 )?;
3235
3236 Ok(())
3237 }
3238
3239 2 => {
3240 ::fidl_next::wire::Envelope::decode_as::<
3241 ___D,
3242 ::fdomain_client::fidl_next::wire::Handle,
3243 >(slot.as_mut(), decoder, ())?;
3244
3245 Ok(())
3246 }
3247
3248 3 => {
3249 ::fidl_next::wire::Envelope::decode_as::<
3250 ___D,
3251 ::fdomain_client::fidl_next::wire::Handle,
3252 >(slot.as_mut(), decoder, ())?;
3253
3254 Ok(())
3255 }
3256
3257 4 => {
3258 ::fidl_next::wire::Envelope::decode_as::<
3259 ___D,
3260 crate::wire::NodeAttributes2<'de>,
3261 >(slot.as_mut(), decoder, ())?;
3262
3263 Ok(())
3264 }
3265
3266 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3267 }
3268 })
3269 }
3270 }
3271
3272 impl<'de> FileInfo<'de> {
3273 pub fn is_append(&self) -> ::core::option::Option<&bool> {
3274 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3275 }
3276
3277 pub fn take_is_append(&mut self) -> ::core::option::Option<bool> {
3278 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3279 }
3280
3281 pub fn observer(
3282 &self,
3283 ) -> ::core::option::Option<&::fdomain_client::fidl_next::wire::Handle> {
3284 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3285 }
3286
3287 pub fn take_observer(
3288 &mut self,
3289 ) -> ::core::option::Option<::fdomain_client::fidl_next::wire::Handle> {
3290 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3291 }
3292
3293 pub fn stream(&self) -> ::core::option::Option<&::fdomain_client::fidl_next::wire::Handle> {
3294 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3295 }
3296
3297 pub fn take_stream(
3298 &mut self,
3299 ) -> ::core::option::Option<::fdomain_client::fidl_next::wire::Handle> {
3300 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3301 }
3302
3303 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
3304 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3305 }
3306
3307 pub fn take_attributes(
3308 &mut self,
3309 ) -> ::core::option::Option<crate::wire::NodeAttributes2<'de>> {
3310 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
3311 }
3312 }
3313
3314 impl<'de> ::core::fmt::Debug for FileInfo<'de> {
3315 fn fmt(
3316 &self,
3317 f: &mut ::core::fmt::Formatter<'_>,
3318 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3319 f.debug_struct("FileInfo")
3320 .field("is_append", &self.is_append())
3321 .field("observer", &self.observer())
3322 .field("stream", &self.stream())
3323 .field("attributes", &self.attributes())
3324 .finish()
3325 }
3326 }
3327
3328 impl<'de> ::fidl_next::IntoNatural for FileInfo<'de> {
3329 type Natural = crate::natural::FileInfo;
3330 }
3331
3332 #[repr(transparent)]
3334 pub struct Representation<'de> {
3335 pub(crate) raw: ::fidl_next::wire::Union,
3336 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3337 }
3338
3339 impl<'de> Drop for Representation<'de> {
3340 fn drop(&mut self) {
3341 match self.raw.ordinal() {
3342 1 => {
3343 let _ =
3344 unsafe { self.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>() };
3345 }
3346
3347 2 => {
3348 let _ = unsafe {
3349 self.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
3350 };
3351 }
3352
3353 3 => {
3354 let _ =
3355 unsafe { self.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>() };
3356 }
3357
3358 4 => {
3359 let _ =
3360 unsafe { self.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>() };
3361 }
3362
3363 _ => (),
3364 }
3365 }
3366 }
3367
3368 impl ::fidl_next::Constrained for Representation<'_> {
3369 type Constraint = ();
3370
3371 fn validate(
3372 _: ::fidl_next::Slot<'_, Self>,
3373 _: Self::Constraint,
3374 ) -> Result<(), ::fidl_next::ValidationError> {
3375 Ok(())
3376 }
3377 }
3378
3379 unsafe impl ::fidl_next::Wire for Representation<'static> {
3380 type Narrowed<'de> = Representation<'de>;
3381
3382 #[inline]
3383 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3384 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3385 ::fidl_next::wire::Union::zero_padding(raw);
3386 }
3387 }
3388
3389 pub mod representation {
3390 pub enum Ref<'de> {
3391 Node(&'de crate::wire::NodeInfo<'de>),
3392
3393 Directory(&'de crate::wire::DirectoryInfo<'de>),
3394
3395 File(&'de crate::wire::FileInfo<'de>),
3396
3397 Symlink(&'de crate::wire::SymlinkInfo<'de>),
3398
3399 UnknownOrdinal_(u64),
3400 }
3401
3402 pub enum Value<'de> {
3403 Node(crate::wire::NodeInfo<'de>),
3404
3405 Directory(crate::wire::DirectoryInfo<'de>),
3406
3407 File(crate::wire::FileInfo<'de>),
3408
3409 Symlink(crate::wire::SymlinkInfo<'de>),
3410
3411 UnknownOrdinal_(u64),
3412 }
3413 }
3414
3415 impl<'de> Representation<'de> {
3416 pub fn as_ref(&self) -> crate::wire::representation::Ref<'_> {
3417 match self.raw.ordinal() {
3418 1 => crate::wire::representation::Ref::Node(unsafe {
3419 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>()
3420 }),
3421
3422 2 => crate::wire::representation::Ref::Directory(unsafe {
3423 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>()
3424 }),
3425
3426 3 => crate::wire::representation::Ref::File(unsafe {
3427 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>()
3428 }),
3429
3430 4 => crate::wire::representation::Ref::Symlink(unsafe {
3431 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>()
3432 }),
3433
3434 unknown => crate::wire::representation::Ref::UnknownOrdinal_(unknown),
3435 }
3436 }
3437
3438 pub fn into_inner(self) -> crate::wire::representation::Value<'de> {
3439 let this = ::core::mem::ManuallyDrop::new(self);
3440
3441 match this.raw.ordinal() {
3442 1 => crate::wire::representation::Value::Node(unsafe {
3443 this.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>()
3444 }),
3445
3446 2 => crate::wire::representation::Value::Directory(unsafe {
3447 this.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
3448 }),
3449
3450 3 => crate::wire::representation::Value::File(unsafe {
3451 this.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>()
3452 }),
3453
3454 4 => crate::wire::representation::Value::Symlink(unsafe {
3455 this.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>()
3456 }),
3457
3458 unknown => crate::wire::representation::Value::UnknownOrdinal_(unknown),
3459 }
3460 }
3461 }
3462
3463 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
3464 where
3465 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3466 ___D: ::fidl_next::Decoder<'de>,
3467 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3468 {
3469 fn decode(
3470 mut slot: ::fidl_next::Slot<'_, Self>,
3471 decoder: &mut ___D,
3472 _: (),
3473 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3474 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3475 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3476 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
3477 raw,
3478 decoder,
3479 (),
3480 )?,
3481
3482 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
3483 raw,
3484 decoder,
3485 (),
3486 )?,
3487
3488 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
3489 raw,
3490 decoder,
3491 (),
3492 )?,
3493
3494 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
3495 raw,
3496 decoder,
3497 (),
3498 )?,
3499
3500 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3501 }
3502
3503 Ok(())
3504 }
3505 }
3506
3507 impl<'de> ::core::fmt::Debug for Representation<'de> {
3508 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3509 match self.raw.ordinal() {
3510 1 => unsafe {
3511 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>().fmt(f)
3512 },
3513 2 => unsafe {
3514 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>().fmt(f)
3515 },
3516 3 => unsafe {
3517 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>().fmt(f)
3518 },
3519 4 => unsafe {
3520 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>().fmt(f)
3521 },
3522 _ => unsafe { ::core::hint::unreachable_unchecked() },
3523 }
3524 }
3525 }
3526
3527 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
3528 type Natural = crate::natural::Representation;
3529 }
3530
3531 #[derive(Debug)]
3533 #[repr(C)]
3534 pub struct OpenableOpenRequest<'de> {
3535 pub path: ::fidl_next::wire::String<'de>,
3536
3537 pub flags: crate::wire::Flags,
3538
3539 pub options: crate::wire::Options<'de>,
3540
3541 pub object: ::fdomain_client::fidl_next::wire::Handle,
3542 }
3543
3544 static_assertions::const_assert_eq!(std::mem::size_of::<OpenableOpenRequest<'_>>(), 48);
3545 static_assertions::const_assert_eq!(std::mem::align_of::<OpenableOpenRequest<'_>>(), 8);
3546
3547 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, path), 0);
3548
3549 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, flags), 16);
3550
3551 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, options), 24);
3552
3553 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, object), 40);
3554
3555 impl ::fidl_next::Constrained for OpenableOpenRequest<'_> {
3556 type Constraint = ();
3557
3558 fn validate(
3559 _: ::fidl_next::Slot<'_, Self>,
3560 _: Self::Constraint,
3561 ) -> Result<(), ::fidl_next::ValidationError> {
3562 Ok(())
3563 }
3564 }
3565
3566 unsafe impl ::fidl_next::Wire for OpenableOpenRequest<'static> {
3567 type Narrowed<'de> = OpenableOpenRequest<'de>;
3568
3569 #[inline]
3570 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3571 ::fidl_next::munge! {
3572 let Self {
3573 path,
3574 flags,
3575 options,
3576 object,
3577
3578 } = &mut *out_;
3579 }
3580
3581 ::fidl_next::Wire::zero_padding(path);
3582
3583 ::fidl_next::Wire::zero_padding(flags);
3584
3585 ::fidl_next::Wire::zero_padding(options);
3586
3587 ::fidl_next::Wire::zero_padding(object);
3588
3589 unsafe {
3590 out_.as_mut_ptr().cast::<u8>().add(44).write_bytes(0, 4);
3591 }
3592 }
3593 }
3594
3595 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OpenableOpenRequest<'de>
3596 where
3597 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3598 ___D: ::fidl_next::Decoder<'de>,
3599 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3600 {
3601 fn decode(
3602 slot_: ::fidl_next::Slot<'_, Self>,
3603 decoder_: &mut ___D,
3604 _: (),
3605 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3606 if slot_.as_bytes()[44..48] != [0u8; 4] {
3607 return Err(::fidl_next::DecodeError::InvalidPadding);
3608 }
3609
3610 ::fidl_next::munge! {
3611 let Self {
3612 mut path,
3613 mut flags,
3614 mut options,
3615 mut object,
3616
3617 } = slot_;
3618 }
3619
3620 let _field = path.as_mut();
3621 ::fidl_next::Constrained::validate(_field, 4095)?;
3622 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3623
3624 let path = unsafe { path.deref_unchecked() };
3625
3626 if path.len() > 4095 {
3627 return Err(::fidl_next::DecodeError::VectorTooLong {
3628 size: path.len() as u64,
3629 limit: 4095,
3630 });
3631 }
3632
3633 let _field = flags.as_mut();
3634
3635 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3636
3637 let _field = options.as_mut();
3638
3639 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
3640
3641 let _field = object.as_mut();
3642
3643 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3644
3645 Ok(())
3646 }
3647 }
3648
3649 impl<'de> ::fidl_next::IntoNatural for OpenableOpenRequest<'de> {
3650 type Natural = crate::natural::OpenableOpenRequest;
3651 }
3652
3653 #[derive(Debug)]
3655 #[repr(C)]
3656 pub struct NodeDeprecatedCloneRequest {
3657 pub flags: crate::wire::OpenFlags,
3658
3659 pub object: ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
3660 }
3661
3662 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedCloneRequest>(), 8);
3663 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedCloneRequest>(), 4);
3664
3665 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedCloneRequest, flags), 0);
3666
3667 static_assertions::const_assert_eq!(
3668 std::mem::offset_of!(NodeDeprecatedCloneRequest, object),
3669 4
3670 );
3671
3672 impl ::fidl_next::Constrained for NodeDeprecatedCloneRequest {
3673 type Constraint = ();
3674
3675 fn validate(
3676 _: ::fidl_next::Slot<'_, Self>,
3677 _: Self::Constraint,
3678 ) -> Result<(), ::fidl_next::ValidationError> {
3679 Ok(())
3680 }
3681 }
3682
3683 unsafe impl ::fidl_next::Wire for NodeDeprecatedCloneRequest {
3684 type Narrowed<'de> = NodeDeprecatedCloneRequest;
3685
3686 #[inline]
3687 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3688 ::fidl_next::munge! {
3689 let Self {
3690 flags,
3691 object,
3692
3693 } = &mut *out_;
3694 }
3695
3696 ::fidl_next::Wire::zero_padding(flags);
3697
3698 ::fidl_next::Wire::zero_padding(object);
3699 }
3700 }
3701
3702 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedCloneRequest
3703 where
3704 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3705 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3706 {
3707 fn decode(
3708 slot_: ::fidl_next::Slot<'_, Self>,
3709 decoder_: &mut ___D,
3710 _: (),
3711 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3712 ::fidl_next::munge! {
3713 let Self {
3714 mut flags,
3715 mut object,
3716
3717 } = slot_;
3718 }
3719
3720 let _field = flags.as_mut();
3721
3722 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3723
3724 let _field = object.as_mut();
3725
3726 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3727
3728 Ok(())
3729 }
3730 }
3731
3732 impl ::fidl_next::IntoNatural for NodeDeprecatedCloneRequest {
3733 type Natural = crate::natural::NodeDeprecatedCloneRequest;
3734 }
3735
3736 #[derive(Debug)]
3738 #[repr(C)]
3739 pub struct NodeOnOpenRequest<'de> {
3740 pub s: ::fidl_next::wire::fuchsia::Status,
3741
3742 pub info: crate::wire_optional::NodeInfoDeprecated<'de>,
3743 }
3744
3745 static_assertions::const_assert_eq!(std::mem::size_of::<NodeOnOpenRequest<'_>>(), 24);
3746 static_assertions::const_assert_eq!(std::mem::align_of::<NodeOnOpenRequest<'_>>(), 8);
3747
3748 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, s), 0);
3749
3750 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, info), 8);
3751
3752 impl ::fidl_next::Constrained for NodeOnOpenRequest<'_> {
3753 type Constraint = ();
3754
3755 fn validate(
3756 _: ::fidl_next::Slot<'_, Self>,
3757 _: Self::Constraint,
3758 ) -> Result<(), ::fidl_next::ValidationError> {
3759 Ok(())
3760 }
3761 }
3762
3763 unsafe impl ::fidl_next::Wire for NodeOnOpenRequest<'static> {
3764 type Narrowed<'de> = NodeOnOpenRequest<'de>;
3765
3766 #[inline]
3767 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3768 ::fidl_next::munge! {
3769 let Self {
3770 s,
3771 info,
3772
3773 } = &mut *out_;
3774 }
3775
3776 ::fidl_next::Wire::zero_padding(s);
3777
3778 ::fidl_next::Wire::zero_padding(info);
3779
3780 unsafe {
3781 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
3782 }
3783 }
3784 }
3785
3786 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeOnOpenRequest<'de>
3787 where
3788 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3789 ___D: ::fidl_next::Decoder<'de>,
3790 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3791 {
3792 fn decode(
3793 slot_: ::fidl_next::Slot<'_, Self>,
3794 decoder_: &mut ___D,
3795 _: (),
3796 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3797 if slot_.as_bytes()[4..8] != [0u8; 4] {
3798 return Err(::fidl_next::DecodeError::InvalidPadding);
3799 }
3800
3801 ::fidl_next::munge! {
3802 let Self {
3803 mut s,
3804 mut info,
3805
3806 } = slot_;
3807 }
3808
3809 let _field = s.as_mut();
3810
3811 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
3812
3813 let _field = info.as_mut();
3814
3815 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
3816
3817 Ok(())
3818 }
3819 }
3820
3821 impl<'de> ::fidl_next::IntoNatural for NodeOnOpenRequest<'de> {
3822 type Natural = crate::natural::NodeOnOpenRequest;
3823 }
3824
3825 #[derive(Debug)]
3827 #[repr(C)]
3828 pub struct DirectoryDeprecatedOpenRequest<'de> {
3829 pub flags: crate::wire::OpenFlags,
3830
3831 pub mode: crate::wire::ModeType,
3832
3833 pub path: ::fidl_next::wire::String<'de>,
3834
3835 pub object: ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
3836 }
3837
3838 static_assertions::const_assert_eq!(
3839 std::mem::size_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3840 32
3841 );
3842 static_assertions::const_assert_eq!(
3843 std::mem::align_of::<DirectoryDeprecatedOpenRequest<'_>>(),
3844 8
3845 );
3846
3847 static_assertions::const_assert_eq!(
3848 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, flags),
3849 0
3850 );
3851
3852 static_assertions::const_assert_eq!(
3853 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, mode),
3854 4
3855 );
3856
3857 static_assertions::const_assert_eq!(
3858 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, path),
3859 8
3860 );
3861
3862 static_assertions::const_assert_eq!(
3863 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, object),
3864 24
3865 );
3866
3867 impl ::fidl_next::Constrained for DirectoryDeprecatedOpenRequest<'_> {
3868 type Constraint = ();
3869
3870 fn validate(
3871 _: ::fidl_next::Slot<'_, Self>,
3872 _: Self::Constraint,
3873 ) -> Result<(), ::fidl_next::ValidationError> {
3874 Ok(())
3875 }
3876 }
3877
3878 unsafe impl ::fidl_next::Wire for DirectoryDeprecatedOpenRequest<'static> {
3879 type Narrowed<'de> = DirectoryDeprecatedOpenRequest<'de>;
3880
3881 #[inline]
3882 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3883 ::fidl_next::munge! {
3884 let Self {
3885 flags,
3886 mode,
3887 path,
3888 object,
3889
3890 } = &mut *out_;
3891 }
3892
3893 ::fidl_next::Wire::zero_padding(flags);
3894
3895 ::fidl_next::Wire::zero_padding(mode);
3896
3897 ::fidl_next::Wire::zero_padding(path);
3898
3899 ::fidl_next::Wire::zero_padding(object);
3900
3901 unsafe {
3902 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
3903 }
3904 }
3905 }
3906
3907 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryDeprecatedOpenRequest<'de>
3908 where
3909 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3910 ___D: ::fidl_next::Decoder<'de>,
3911 ___D: ::fdomain_client::fidl_next::HandleDecoder,
3912 {
3913 fn decode(
3914 slot_: ::fidl_next::Slot<'_, Self>,
3915 decoder_: &mut ___D,
3916 _: (),
3917 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3918 if slot_.as_bytes()[28..32] != [0u8; 4] {
3919 return Err(::fidl_next::DecodeError::InvalidPadding);
3920 }
3921
3922 ::fidl_next::munge! {
3923 let Self {
3924 mut flags,
3925 mut mode,
3926 mut path,
3927 mut object,
3928
3929 } = slot_;
3930 }
3931
3932 let _field = flags.as_mut();
3933
3934 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3935
3936 let _field = mode.as_mut();
3937
3938 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3939
3940 let _field = path.as_mut();
3941 ::fidl_next::Constrained::validate(_field, 4095)?;
3942 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3943
3944 let path = unsafe { path.deref_unchecked() };
3945
3946 if path.len() > 4095 {
3947 return Err(::fidl_next::DecodeError::VectorTooLong {
3948 size: path.len() as u64,
3949 limit: 4095,
3950 });
3951 }
3952
3953 let _field = object.as_mut();
3954
3955 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3956
3957 Ok(())
3958 }
3959 }
3960
3961 impl<'de> ::fidl_next::IntoNatural for DirectoryDeprecatedOpenRequest<'de> {
3962 type Natural = crate::natural::DirectoryDeprecatedOpenRequest;
3963 }
3964
3965 #[derive(Debug)]
3967 #[repr(C)]
3968 pub struct DirectoryCreateSymlinkRequest<'de> {
3969 pub name: ::fidl_next::wire::String<'de>,
3970
3971 pub target: ::fidl_next::wire::Vector<'de, u8>,
3972
3973 pub connection: ::fidl_next::ServerEnd<
3974 crate::Symlink,
3975 ::fdomain_client::fidl_next::wire::OptionalHandle,
3976 >,
3977 }
3978
3979 static_assertions::const_assert_eq!(
3980 std::mem::size_of::<DirectoryCreateSymlinkRequest<'_>>(),
3981 40
3982 );
3983 static_assertions::const_assert_eq!(
3984 std::mem::align_of::<DirectoryCreateSymlinkRequest<'_>>(),
3985 8
3986 );
3987
3988 static_assertions::const_assert_eq!(
3989 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, name),
3990 0
3991 );
3992
3993 static_assertions::const_assert_eq!(
3994 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, target),
3995 16
3996 );
3997
3998 static_assertions::const_assert_eq!(
3999 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, connection),
4000 32
4001 );
4002
4003 impl ::fidl_next::Constrained for DirectoryCreateSymlinkRequest<'_> {
4004 type Constraint = ();
4005
4006 fn validate(
4007 _: ::fidl_next::Slot<'_, Self>,
4008 _: Self::Constraint,
4009 ) -> Result<(), ::fidl_next::ValidationError> {
4010 Ok(())
4011 }
4012 }
4013
4014 unsafe impl ::fidl_next::Wire for DirectoryCreateSymlinkRequest<'static> {
4015 type Narrowed<'de> = DirectoryCreateSymlinkRequest<'de>;
4016
4017 #[inline]
4018 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4019 ::fidl_next::munge! {
4020 let Self {
4021 name,
4022 target,
4023 connection,
4024
4025 } = &mut *out_;
4026 }
4027
4028 ::fidl_next::Wire::zero_padding(name);
4029
4030 ::fidl_next::Wire::zero_padding(target);
4031
4032 ::fidl_next::Wire::zero_padding(connection);
4033
4034 unsafe {
4035 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
4036 }
4037 }
4038 }
4039
4040 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryCreateSymlinkRequest<'de>
4041 where
4042 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4043 ___D: ::fidl_next::Decoder<'de>,
4044 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4045 {
4046 fn decode(
4047 slot_: ::fidl_next::Slot<'_, Self>,
4048 decoder_: &mut ___D,
4049 _: (),
4050 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4051 if slot_.as_bytes()[36..40] != [0u8; 4] {
4052 return Err(::fidl_next::DecodeError::InvalidPadding);
4053 }
4054
4055 ::fidl_next::munge! {
4056 let Self {
4057 mut name,
4058 mut target,
4059 mut connection,
4060
4061 } = slot_;
4062 }
4063
4064 let _field = name.as_mut();
4065 ::fidl_next::Constrained::validate(_field, 255)?;
4066 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
4067
4068 let name = unsafe { name.deref_unchecked() };
4069
4070 if name.len() > 255 {
4071 return Err(::fidl_next::DecodeError::VectorTooLong {
4072 size: name.len() as u64,
4073 limit: 255,
4074 });
4075 }
4076
4077 let _field = target.as_mut();
4078 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
4079 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
4080
4081 let target = unsafe { target.deref_unchecked() };
4082
4083 if target.len() > 4095 {
4084 return Err(::fidl_next::DecodeError::VectorTooLong {
4085 size: target.len() as u64,
4086 limit: 4095,
4087 });
4088 }
4089
4090 let _field = connection.as_mut();
4091
4092 ::fidl_next::Decode::decode(connection.as_mut(), decoder_, ())?;
4093
4094 Ok(())
4095 }
4096 }
4097
4098 impl<'de> ::fidl_next::IntoNatural for DirectoryCreateSymlinkRequest<'de> {
4099 type Natural = crate::natural::DirectoryCreateSymlinkRequest;
4100 }
4101
4102 #[derive(Debug)]
4104 #[repr(C)]
4105 pub struct FileGetBackingMemoryResponse {
4106 pub vmo: ::fdomain_client::fidl_next::wire::Handle,
4107 }
4108
4109 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryResponse>(), 4);
4110 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryResponse>(), 4);
4111
4112 static_assertions::const_assert_eq!(std::mem::offset_of!(FileGetBackingMemoryResponse, vmo), 0);
4113
4114 impl ::fidl_next::Constrained for FileGetBackingMemoryResponse {
4115 type Constraint = ();
4116
4117 fn validate(
4118 _: ::fidl_next::Slot<'_, Self>,
4119 _: Self::Constraint,
4120 ) -> Result<(), ::fidl_next::ValidationError> {
4121 Ok(())
4122 }
4123 }
4124
4125 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryResponse {
4126 type Narrowed<'de> = FileGetBackingMemoryResponse;
4127
4128 #[inline]
4129 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4130 ::fidl_next::munge! {
4131 let Self {
4132 vmo,
4133
4134 } = &mut *out_;
4135 }
4136
4137 ::fidl_next::Wire::zero_padding(vmo);
4138 }
4139 }
4140
4141 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryResponse
4142 where
4143 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4144 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4145 {
4146 fn decode(
4147 slot_: ::fidl_next::Slot<'_, Self>,
4148 decoder_: &mut ___D,
4149 _: (),
4150 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4151 ::fidl_next::munge! {
4152 let Self {
4153 mut vmo,
4154
4155 } = slot_;
4156 }
4157
4158 let _field = vmo.as_mut();
4159
4160 ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
4161
4162 Ok(())
4163 }
4164 }
4165
4166 impl ::fidl_next::IntoNatural for FileGetBackingMemoryResponse {
4167 type Natural = crate::natural::FileGetBackingMemoryResponse;
4168 }
4169
4170 #[derive(Debug)]
4172 #[repr(C)]
4173 pub struct LinkableLinkIntoRequest<'de> {
4174 pub dst_parent_token: ::fdomain_client::fidl_next::wire::Handle,
4175
4176 pub dst: ::fidl_next::wire::String<'de>,
4177 }
4178
4179 static_assertions::const_assert_eq!(std::mem::size_of::<LinkableLinkIntoRequest<'_>>(), 24);
4180 static_assertions::const_assert_eq!(std::mem::align_of::<LinkableLinkIntoRequest<'_>>(), 8);
4181
4182 static_assertions::const_assert_eq!(
4183 std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst_parent_token),
4184 0
4185 );
4186
4187 static_assertions::const_assert_eq!(std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst), 8);
4188
4189 impl ::fidl_next::Constrained for LinkableLinkIntoRequest<'_> {
4190 type Constraint = ();
4191
4192 fn validate(
4193 _: ::fidl_next::Slot<'_, Self>,
4194 _: Self::Constraint,
4195 ) -> Result<(), ::fidl_next::ValidationError> {
4196 Ok(())
4197 }
4198 }
4199
4200 unsafe impl ::fidl_next::Wire for LinkableLinkIntoRequest<'static> {
4201 type Narrowed<'de> = LinkableLinkIntoRequest<'de>;
4202
4203 #[inline]
4204 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4205 ::fidl_next::munge! {
4206 let Self {
4207 dst_parent_token,
4208 dst,
4209
4210 } = &mut *out_;
4211 }
4212
4213 ::fidl_next::Wire::zero_padding(dst_parent_token);
4214
4215 ::fidl_next::Wire::zero_padding(dst);
4216
4217 unsafe {
4218 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
4219 }
4220 }
4221 }
4222
4223 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LinkableLinkIntoRequest<'de>
4224 where
4225 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4226 ___D: ::fidl_next::Decoder<'de>,
4227 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4228 {
4229 fn decode(
4230 slot_: ::fidl_next::Slot<'_, Self>,
4231 decoder_: &mut ___D,
4232 _: (),
4233 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4234 if slot_.as_bytes()[4..8] != [0u8; 4] {
4235 return Err(::fidl_next::DecodeError::InvalidPadding);
4236 }
4237
4238 ::fidl_next::munge! {
4239 let Self {
4240 mut dst_parent_token,
4241 mut dst,
4242
4243 } = slot_;
4244 }
4245
4246 let _field = dst_parent_token.as_mut();
4247
4248 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
4249
4250 let _field = dst.as_mut();
4251 ::fidl_next::Constrained::validate(_field, 255)?;
4252 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
4253
4254 let dst = unsafe { dst.deref_unchecked() };
4255
4256 if dst.len() > 255 {
4257 return Err(::fidl_next::DecodeError::VectorTooLong {
4258 size: dst.len() as u64,
4259 limit: 255,
4260 });
4261 }
4262
4263 Ok(())
4264 }
4265 }
4266
4267 impl<'de> ::fidl_next::IntoNatural for LinkableLinkIntoRequest<'de> {
4268 type Natural = crate::natural::LinkableLinkIntoRequest;
4269 }
4270
4271 #[derive(Debug)]
4273 #[repr(C)]
4274 pub struct FileAllocateRequest {
4275 pub offset: ::fidl_next::wire::Uint64,
4276
4277 pub length: ::fidl_next::wire::Uint64,
4278
4279 pub mode: crate::wire::AllocateMode,
4280 }
4281
4282 static_assertions::const_assert_eq!(std::mem::size_of::<FileAllocateRequest>(), 24);
4283 static_assertions::const_assert_eq!(std::mem::align_of::<FileAllocateRequest>(), 8);
4284
4285 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, offset), 0);
4286
4287 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, length), 8);
4288
4289 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, mode), 16);
4290
4291 impl ::fidl_next::Constrained for FileAllocateRequest {
4292 type Constraint = ();
4293
4294 fn validate(
4295 _: ::fidl_next::Slot<'_, Self>,
4296 _: Self::Constraint,
4297 ) -> Result<(), ::fidl_next::ValidationError> {
4298 Ok(())
4299 }
4300 }
4301
4302 unsafe impl ::fidl_next::Wire for FileAllocateRequest {
4303 type Narrowed<'de> = FileAllocateRequest;
4304
4305 #[inline]
4306 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4307 ::fidl_next::munge! {
4308 let Self {
4309 offset,
4310 length,
4311 mode,
4312
4313 } = &mut *out_;
4314 }
4315
4316 ::fidl_next::Wire::zero_padding(offset);
4317
4318 ::fidl_next::Wire::zero_padding(length);
4319
4320 ::fidl_next::Wire::zero_padding(mode);
4321
4322 unsafe {
4323 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4324 }
4325 }
4326 }
4327
4328 unsafe impl<___D> ::fidl_next::Decode<___D> for FileAllocateRequest
4329 where
4330 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4331 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4332 {
4333 fn decode(
4334 slot_: ::fidl_next::Slot<'_, Self>,
4335 decoder_: &mut ___D,
4336 _: (),
4337 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4338 if slot_.as_bytes()[20..24] != [0u8; 4] {
4339 return Err(::fidl_next::DecodeError::InvalidPadding);
4340 }
4341
4342 ::fidl_next::munge! {
4343 let Self {
4344 mut offset,
4345 mut length,
4346 mut mode,
4347
4348 } = slot_;
4349 }
4350
4351 let _field = offset.as_mut();
4352
4353 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
4354
4355 let _field = length.as_mut();
4356
4357 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
4358
4359 let _field = mode.as_mut();
4360
4361 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
4362
4363 Ok(())
4364 }
4365 }
4366
4367 impl ::fidl_next::IntoNatural for FileAllocateRequest {
4368 type Natural = crate::natural::FileAllocateRequest;
4369 }
4370
4371 #[derive(Debug)]
4373 #[repr(C)]
4374 pub struct FileEnableVerityRequest<'de> {
4375 pub options: crate::wire::VerificationOptions<'de>,
4376 }
4377
4378 static_assertions::const_assert_eq!(std::mem::size_of::<FileEnableVerityRequest<'_>>(), 16);
4379 static_assertions::const_assert_eq!(std::mem::align_of::<FileEnableVerityRequest<'_>>(), 8);
4380
4381 static_assertions::const_assert_eq!(
4382 std::mem::offset_of!(FileEnableVerityRequest<'_>, options),
4383 0
4384 );
4385
4386 impl ::fidl_next::Constrained for FileEnableVerityRequest<'_> {
4387 type Constraint = ();
4388
4389 fn validate(
4390 _: ::fidl_next::Slot<'_, Self>,
4391 _: Self::Constraint,
4392 ) -> Result<(), ::fidl_next::ValidationError> {
4393 Ok(())
4394 }
4395 }
4396
4397 unsafe impl ::fidl_next::Wire for FileEnableVerityRequest<'static> {
4398 type Narrowed<'de> = FileEnableVerityRequest<'de>;
4399
4400 #[inline]
4401 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4402 ::fidl_next::munge! {
4403 let Self {
4404 options,
4405
4406 } = &mut *out_;
4407 }
4408
4409 ::fidl_next::Wire::zero_padding(options);
4410 }
4411 }
4412
4413 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileEnableVerityRequest<'de>
4414 where
4415 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4416 ___D: ::fidl_next::Decoder<'de>,
4417 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4418 {
4419 fn decode(
4420 slot_: ::fidl_next::Slot<'_, Self>,
4421 decoder_: &mut ___D,
4422 _: (),
4423 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4424 ::fidl_next::munge! {
4425 let Self {
4426 mut options,
4427
4428 } = slot_;
4429 }
4430
4431 let _field = options.as_mut();
4432
4433 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
4434
4435 Ok(())
4436 }
4437 }
4438
4439 impl<'de> ::fidl_next::IntoNatural for FileEnableVerityRequest<'de> {
4440 type Natural = crate::natural::FileEnableVerityRequest;
4441 }
4442
4443 #[derive(Debug)]
4445 #[repr(C)]
4446 pub struct FileObject {
4447 pub event: ::fdomain_client::fidl_next::wire::OptionalHandle,
4448
4449 pub stream: ::fdomain_client::fidl_next::wire::OptionalHandle,
4450 }
4451
4452 static_assertions::const_assert_eq!(std::mem::size_of::<FileObject>(), 8);
4453 static_assertions::const_assert_eq!(std::mem::align_of::<FileObject>(), 4);
4454
4455 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, event), 0);
4456
4457 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, stream), 4);
4458
4459 impl ::fidl_next::Constrained for FileObject {
4460 type Constraint = ();
4461
4462 fn validate(
4463 _: ::fidl_next::Slot<'_, Self>,
4464 _: Self::Constraint,
4465 ) -> Result<(), ::fidl_next::ValidationError> {
4466 Ok(())
4467 }
4468 }
4469
4470 unsafe impl ::fidl_next::Wire for FileObject {
4471 type Narrowed<'de> = FileObject;
4472
4473 #[inline]
4474 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4475 ::fidl_next::munge! {
4476 let Self {
4477 event,
4478 stream,
4479
4480 } = &mut *out_;
4481 }
4482
4483 ::fidl_next::Wire::zero_padding(event);
4484
4485 ::fidl_next::Wire::zero_padding(stream);
4486 }
4487 }
4488
4489 unsafe impl<___D> ::fidl_next::Decode<___D> for FileObject
4490 where
4491 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4492 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4493 {
4494 fn decode(
4495 slot_: ::fidl_next::Slot<'_, Self>,
4496 decoder_: &mut ___D,
4497 _: (),
4498 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4499 ::fidl_next::munge! {
4500 let Self {
4501 mut event,
4502 mut stream,
4503
4504 } = slot_;
4505 }
4506
4507 let _field = event.as_mut();
4508
4509 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
4510
4511 let _field = stream.as_mut();
4512
4513 ::fidl_next::Decode::decode(stream.as_mut(), decoder_, ())?;
4514
4515 Ok(())
4516 }
4517 }
4518
4519 impl ::fidl_next::IntoNatural for FileObject {
4520 type Natural = crate::natural::FileObject;
4521 }
4522
4523 #[repr(transparent)]
4525 pub struct NodeInfoDeprecated<'de> {
4526 pub(crate) raw: ::fidl_next::wire::Union,
4527 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4528 }
4529
4530 impl<'de> Drop for NodeInfoDeprecated<'de> {
4531 fn drop(&mut self) {
4532 match self.raw.ordinal() {
4533 1 => {
4534 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Service>() };
4535 }
4536
4537 2 => {
4538 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::FileObject>() };
4539 }
4540
4541 3 => {
4542 let _ =
4543 unsafe { self.raw.get().read_unchecked::<crate::wire::DirectoryObject>() };
4544 }
4545
4546 4 => {
4547 let _ = unsafe {
4548 self.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4549 };
4550 }
4551
4552 _ => unsafe { ::core::hint::unreachable_unchecked() },
4553 }
4554 }
4555 }
4556
4557 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4558 type Constraint = ();
4559
4560 fn validate(
4561 _: ::fidl_next::Slot<'_, Self>,
4562 _: Self::Constraint,
4563 ) -> Result<(), ::fidl_next::ValidationError> {
4564 Ok(())
4565 }
4566 }
4567
4568 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4569 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4570
4571 #[inline]
4572 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4573 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4574 ::fidl_next::wire::Union::zero_padding(raw);
4575 }
4576 }
4577
4578 pub mod node_info_deprecated {
4579 pub enum Ref<'de> {
4580 Service(&'de crate::wire::Service),
4581
4582 File(&'de crate::wire::FileObject),
4583
4584 Directory(&'de crate::wire::DirectoryObject),
4585
4586 Symlink(&'de crate::wire::SymlinkObject<'de>),
4587 }
4588
4589 pub enum Value<'de> {
4590 Service(crate::wire::Service),
4591
4592 File(crate::wire::FileObject),
4593
4594 Directory(crate::wire::DirectoryObject),
4595
4596 Symlink(crate::wire::SymlinkObject<'de>),
4597 }
4598 }
4599
4600 impl<'de> NodeInfoDeprecated<'de> {
4601 pub fn as_ref(&self) -> crate::wire::node_info_deprecated::Ref<'_> {
4602 match self.raw.ordinal() {
4603 1 => crate::wire::node_info_deprecated::Ref::Service(unsafe {
4604 self.raw.get().deref_unchecked::<crate::wire::Service>()
4605 }),
4606
4607 2 => crate::wire::node_info_deprecated::Ref::File(unsafe {
4608 self.raw.get().deref_unchecked::<crate::wire::FileObject>()
4609 }),
4610
4611 3 => crate::wire::node_info_deprecated::Ref::Directory(unsafe {
4612 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>()
4613 }),
4614
4615 4 => crate::wire::node_info_deprecated::Ref::Symlink(unsafe {
4616 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>()
4617 }),
4618
4619 _ => unsafe { ::core::hint::unreachable_unchecked() },
4620 }
4621 }
4622
4623 pub fn into_inner(self) -> crate::wire::node_info_deprecated::Value<'de> {
4624 let this = ::core::mem::ManuallyDrop::new(self);
4625
4626 match this.raw.ordinal() {
4627 1 => crate::wire::node_info_deprecated::Value::Service(unsafe {
4628 this.raw.get().read_unchecked::<crate::wire::Service>()
4629 }),
4630
4631 2 => crate::wire::node_info_deprecated::Value::File(unsafe {
4632 this.raw.get().read_unchecked::<crate::wire::FileObject>()
4633 }),
4634
4635 3 => crate::wire::node_info_deprecated::Value::Directory(unsafe {
4636 this.raw.get().read_unchecked::<crate::wire::DirectoryObject>()
4637 }),
4638
4639 4 => crate::wire::node_info_deprecated::Value::Symlink(unsafe {
4640 this.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4641 }),
4642
4643 _ => unsafe { ::core::hint::unreachable_unchecked() },
4644 }
4645 }
4646 }
4647
4648 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4649 where
4650 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4651 ___D: ::fidl_next::Decoder<'de>,
4652 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4653 {
4654 fn decode(
4655 mut slot: ::fidl_next::Slot<'_, Self>,
4656 decoder: &mut ___D,
4657 _: (),
4658 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4659 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4660 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4661 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4662 raw,
4663 decoder,
4664 (),
4665 )?,
4666
4667 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4668 raw,
4669 decoder,
4670 (),
4671 )?,
4672
4673 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4674 raw,
4675 decoder,
4676 (),
4677 )?,
4678
4679 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4680 raw,
4681 decoder,
4682 (),
4683 )?,
4684
4685 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
4686 }
4687
4688 Ok(())
4689 }
4690 }
4691
4692 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4693 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4694 match self.raw.ordinal() {
4695 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Service>().fmt(f) },
4696 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::FileObject>().fmt(f) },
4697 3 => unsafe {
4698 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>().fmt(f)
4699 },
4700 4 => unsafe {
4701 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>().fmt(f)
4702 },
4703 _ => unsafe { ::core::hint::unreachable_unchecked() },
4704 }
4705 }
4706 }
4707
4708 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4709 type Natural = crate::natural::NodeInfoDeprecated;
4710 }
4711}
4712
4713pub mod wire_optional {
4714
4715 pub use fidl_next_common_fuchsia_io::wire_optional::*;
4716
4717 #[repr(transparent)]
4718 pub struct ExtendedAttributeValue<'de> {
4719 pub(crate) raw: ::fidl_next::wire::Union,
4720 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4721 }
4722
4723 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
4724 type Constraint = ();
4725
4726 fn validate(
4727 _: ::fidl_next::Slot<'_, Self>,
4728 _: Self::Constraint,
4729 ) -> Result<(), ::fidl_next::ValidationError> {
4730 Ok(())
4731 }
4732 }
4733
4734 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
4735 type Narrowed<'de> = ExtendedAttributeValue<'de>;
4736
4737 #[inline]
4738 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4739 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4740 ::fidl_next::wire::Union::zero_padding(raw);
4741 }
4742 }
4743
4744 impl<'de> ExtendedAttributeValue<'de> {
4745 pub fn is_some(&self) -> bool {
4746 self.raw.is_some()
4747 }
4748
4749 pub fn is_none(&self) -> bool {
4750 self.raw.is_none()
4751 }
4752
4753 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ExtendedAttributeValue<'de>> {
4754 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4755 }
4756
4757 pub fn into_option(
4758 self,
4759 ) -> ::core::option::Option<crate::wire::ExtendedAttributeValue<'de>> {
4760 if self.is_some() {
4761 Some(crate::wire::ExtendedAttributeValue {
4762 raw: self.raw,
4763 _phantom: ::core::marker::PhantomData,
4764 })
4765 } else {
4766 None
4767 }
4768 }
4769 }
4770
4771 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
4772 where
4773 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4774 ___D: ::fidl_next::Decoder<'de>,
4775 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4776 {
4777 fn decode(
4778 mut slot: ::fidl_next::Slot<'_, Self>,
4779 decoder: &mut ___D,
4780 _: (),
4781 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4782 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4783 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4784 1 => {
4785 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
4786 raw,
4787 decoder,
4788 (32768, ()),
4789 )?
4790 }
4791
4792 2 => ::fidl_next::wire::Union::decode_as::<
4793 ___D,
4794 ::fdomain_client::fidl_next::wire::Handle,
4795 >(raw, decoder, ())?,
4796
4797 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4798 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4799 }
4800
4801 Ok(())
4802 }
4803 }
4804
4805 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
4806 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4807 self.as_ref().fmt(f)
4808 }
4809 }
4810
4811 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
4812 type Natural = ::core::option::Option<crate::natural::ExtendedAttributeValue>;
4813 }
4814
4815 #[repr(transparent)]
4816 pub struct Representation<'de> {
4817 pub(crate) raw: ::fidl_next::wire::Union,
4818 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4819 }
4820
4821 impl ::fidl_next::Constrained for Representation<'_> {
4822 type Constraint = ();
4823
4824 fn validate(
4825 _: ::fidl_next::Slot<'_, Self>,
4826 _: Self::Constraint,
4827 ) -> Result<(), ::fidl_next::ValidationError> {
4828 Ok(())
4829 }
4830 }
4831
4832 unsafe impl ::fidl_next::Wire for Representation<'static> {
4833 type Narrowed<'de> = Representation<'de>;
4834
4835 #[inline]
4836 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4837 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4838 ::fidl_next::wire::Union::zero_padding(raw);
4839 }
4840 }
4841
4842 impl<'de> Representation<'de> {
4843 pub fn is_some(&self) -> bool {
4844 self.raw.is_some()
4845 }
4846
4847 pub fn is_none(&self) -> bool {
4848 self.raw.is_none()
4849 }
4850
4851 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Representation<'de>> {
4852 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4853 }
4854
4855 pub fn into_option(self) -> ::core::option::Option<crate::wire::Representation<'de>> {
4856 if self.is_some() {
4857 Some(crate::wire::Representation {
4858 raw: self.raw,
4859 _phantom: ::core::marker::PhantomData,
4860 })
4861 } else {
4862 None
4863 }
4864 }
4865 }
4866
4867 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
4868 where
4869 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4870 ___D: ::fidl_next::Decoder<'de>,
4871 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4872 {
4873 fn decode(
4874 mut slot: ::fidl_next::Slot<'_, Self>,
4875 decoder: &mut ___D,
4876 _: (),
4877 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4878 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4879 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4880 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
4881 raw,
4882 decoder,
4883 (),
4884 )?,
4885
4886 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
4887 raw,
4888 decoder,
4889 (),
4890 )?,
4891
4892 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
4893 raw,
4894 decoder,
4895 (),
4896 )?,
4897
4898 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
4899 raw,
4900 decoder,
4901 (),
4902 )?,
4903
4904 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4905 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4906 }
4907
4908 Ok(())
4909 }
4910 }
4911
4912 impl<'de> ::core::fmt::Debug for Representation<'de> {
4913 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4914 self.as_ref().fmt(f)
4915 }
4916 }
4917
4918 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
4919 type Natural = ::core::option::Option<crate::natural::Representation>;
4920 }
4921
4922 #[repr(transparent)]
4923 pub struct NodeInfoDeprecated<'de> {
4924 pub(crate) raw: ::fidl_next::wire::Union,
4925 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4926 }
4927
4928 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4929 type Constraint = ();
4930
4931 fn validate(
4932 _: ::fidl_next::Slot<'_, Self>,
4933 _: Self::Constraint,
4934 ) -> Result<(), ::fidl_next::ValidationError> {
4935 Ok(())
4936 }
4937 }
4938
4939 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4940 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4941
4942 #[inline]
4943 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4944 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4945 ::fidl_next::wire::Union::zero_padding(raw);
4946 }
4947 }
4948
4949 impl<'de> NodeInfoDeprecated<'de> {
4950 pub fn is_some(&self) -> bool {
4951 self.raw.is_some()
4952 }
4953
4954 pub fn is_none(&self) -> bool {
4955 self.raw.is_none()
4956 }
4957
4958 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::NodeInfoDeprecated<'de>> {
4959 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4960 }
4961
4962 pub fn into_option(self) -> ::core::option::Option<crate::wire::NodeInfoDeprecated<'de>> {
4963 if self.is_some() {
4964 Some(crate::wire::NodeInfoDeprecated {
4965 raw: self.raw,
4966 _phantom: ::core::marker::PhantomData,
4967 })
4968 } else {
4969 None
4970 }
4971 }
4972 }
4973
4974 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4975 where
4976 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4977 ___D: ::fidl_next::Decoder<'de>,
4978 ___D: ::fdomain_client::fidl_next::HandleDecoder,
4979 {
4980 fn decode(
4981 mut slot: ::fidl_next::Slot<'_, Self>,
4982 decoder: &mut ___D,
4983 _: (),
4984 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4985 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4986 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4987 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4988 raw,
4989 decoder,
4990 (),
4991 )?,
4992
4993 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4994 raw,
4995 decoder,
4996 (),
4997 )?,
4998
4999 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
5000 raw,
5001 decoder,
5002 (),
5003 )?,
5004
5005 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
5006 raw,
5007 decoder,
5008 (),
5009 )?,
5010
5011 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
5012 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
5013 }
5014
5015 Ok(())
5016 }
5017 }
5018
5019 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
5020 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5021 self.as_ref().fmt(f)
5022 }
5023 }
5024
5025 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
5026 type Natural = ::core::option::Option<crate::natural::NodeInfoDeprecated>;
5027 }
5028}
5029
5030pub mod generic {
5031
5032 pub use fidl_next_common_fuchsia_io::generic::*;
5033
5034 pub struct DirectoryGetTokenResponse<T0, T1> {
5036 pub s: T0,
5037
5038 pub token: T1,
5039 }
5040
5041 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::DirectoryGetTokenResponse, ___E>
5042 for DirectoryGetTokenResponse<T0, T1>
5043 where
5044 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5045 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5046 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
5047 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::OptionalHandle, ___E>,
5048 {
5049 #[inline]
5050 fn encode(
5051 self,
5052 encoder_: &mut ___E,
5053 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryGetTokenResponse>,
5054 _: (),
5055 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5056 ::fidl_next::munge! {
5057 let crate::wire::DirectoryGetTokenResponse {
5058 s,
5059 token,
5060
5061 } = out_;
5062 }
5063
5064 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5065
5066 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
5067
5068 Ok(())
5069 }
5070 }
5071
5072 pub struct DirectoryLinkRequest<T0, T1, T2> {
5074 pub src: T0,
5075
5076 pub dst_parent_token: T1,
5077
5078 pub dst: T2,
5079 }
5080
5081 unsafe impl<___E, T0, T1, T2>
5082 ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
5083 for DirectoryLinkRequest<T0, T1, T2>
5084 where
5085 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5086 ___E: ::fidl_next::Encoder,
5087 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5088 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5089 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5090 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5091 {
5092 #[inline]
5093 fn encode(
5094 self,
5095 encoder_: &mut ___E,
5096 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
5097 _: (),
5098 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5099 ::fidl_next::munge! {
5100 let crate::wire::DirectoryLinkRequest {
5101 src,
5102 dst_parent_token,
5103 dst,
5104
5105 } = out_;
5106 }
5107
5108 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5109
5110 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5111
5112 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5113
5114 Ok(())
5115 }
5116 }
5117
5118 pub struct DirectoryRenameRequest<T0, T1, T2> {
5120 pub src: T0,
5121
5122 pub dst_parent_token: T1,
5123
5124 pub dst: T2,
5125 }
5126
5127 unsafe impl<___E, T0, T1, T2>
5128 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
5129 for DirectoryRenameRequest<T0, T1, T2>
5130 where
5131 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5132 ___E: ::fidl_next::Encoder,
5133 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5134 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5135 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5136 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5137 {
5138 #[inline]
5139 fn encode(
5140 self,
5141 encoder_: &mut ___E,
5142 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
5143 _: (),
5144 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5145 ::fidl_next::munge! {
5146 let crate::wire::DirectoryRenameRequest {
5147 src,
5148 dst_parent_token,
5149 dst,
5150
5151 } = out_;
5152 }
5153
5154 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5155
5156 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5157
5158 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5159
5160 Ok(())
5161 }
5162 }
5163
5164 pub struct DirectoryWatchRequest<T0, T1, T2> {
5166 pub mask: T0,
5167
5168 pub options: T1,
5169
5170 pub watcher: T2,
5171 }
5172
5173 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
5174 for DirectoryWatchRequest<T0, T1, T2>
5175 where
5176 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5177 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5178 T0: ::fidl_next::Encode<crate::wire::WatchMask, ___E>,
5179 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5180 T2: ::fidl_next::Encode<
5181 ::fidl_next::ServerEnd<
5182 crate::DirectoryWatcher,
5183 ::fdomain_client::fidl_next::wire::Handle,
5184 >,
5185 ___E,
5186 >,
5187 {
5188 #[inline]
5189 fn encode(
5190 self,
5191 encoder_: &mut ___E,
5192 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
5193 _: (),
5194 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5195 ::fidl_next::munge! {
5196 let crate::wire::DirectoryWatchRequest {
5197 mask,
5198 options,
5199 watcher,
5200
5201 } = out_;
5202 }
5203
5204 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
5205
5206 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5207
5208 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
5209
5210 Ok(())
5211 }
5212 }
5213
5214 pub struct NodeListExtendedAttributesRequest<T0> {
5216 pub iterator: T0,
5217 }
5218
5219 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
5220 for NodeListExtendedAttributesRequest<T0>
5221 where
5222 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5223 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5224 T0: ::fidl_next::Encode<
5225 ::fidl_next::ServerEnd<
5226 crate::ExtendedAttributeIterator,
5227 ::fdomain_client::fidl_next::wire::Handle,
5228 >,
5229 ___E,
5230 >,
5231 {
5232 #[inline]
5233 fn encode(
5234 self,
5235 encoder_: &mut ___E,
5236 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
5237 _: (),
5238 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5239 ::fidl_next::munge! {
5240 let crate::wire::NodeListExtendedAttributesRequest {
5241 iterator,
5242
5243 } = out_;
5244 }
5245
5246 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
5247
5248 Ok(())
5249 }
5250 }
5251
5252 pub struct NodeSetExtendedAttributeRequest<T0, T1, T2> {
5254 pub name: T0,
5255
5256 pub value: T1,
5257
5258 pub mode: T2,
5259 }
5260
5261 unsafe impl<___E, T0, T1, T2>
5262 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
5263 for NodeSetExtendedAttributeRequest<T0, T1, T2>
5264 where
5265 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5266 ___E: ::fidl_next::Encoder,
5267 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5268 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5269 T1: ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
5270 T2: ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>,
5271 {
5272 #[inline]
5273 fn encode(
5274 self,
5275 encoder_: &mut ___E,
5276 out_: &mut ::core::mem::MaybeUninit<
5277 crate::wire::NodeSetExtendedAttributeRequest<'static>,
5278 >,
5279 _: (),
5280 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5281 ::fidl_next::munge! {
5282 let crate::wire::NodeSetExtendedAttributeRequest {
5283 name,
5284 value,
5285 mode,
5286
5287 } = out_;
5288 }
5289
5290 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
5291
5292 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
5293
5294 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5295
5296 Ok(())
5297 }
5298 }
5299
5300 pub struct OpenableOpenRequest<T0, T1, T2, T3> {
5302 pub path: T0,
5303
5304 pub flags: T1,
5305
5306 pub options: T2,
5307
5308 pub object: T3,
5309 }
5310
5311 unsafe impl<___E, T0, T1, T2, T3>
5312 ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'static>, ___E>
5313 for OpenableOpenRequest<T0, T1, T2, T3>
5314 where
5315 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5316 ___E: ::fidl_next::Encoder,
5317 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5318 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5319 T1: ::fidl_next::Encode<crate::wire::Flags, ___E>,
5320 T2: ::fidl_next::Encode<crate::wire::Options<'static>, ___E>,
5321 T3: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5322 {
5323 #[inline]
5324 fn encode(
5325 self,
5326 encoder_: &mut ___E,
5327 out_: &mut ::core::mem::MaybeUninit<crate::wire::OpenableOpenRequest<'static>>,
5328 _: (),
5329 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5330 ::fidl_next::munge! {
5331 let crate::wire::OpenableOpenRequest {
5332 path,
5333 flags,
5334 options,
5335 object,
5336
5337 } = out_;
5338 }
5339
5340 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5341
5342 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5343
5344 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5345
5346 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5347
5348 Ok(())
5349 }
5350 }
5351
5352 pub struct NodeDeprecatedCloneRequest<T0, T1> {
5354 pub flags: T0,
5355
5356 pub object: T1,
5357 }
5358
5359 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
5360 for NodeDeprecatedCloneRequest<T0, T1>
5361 where
5362 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5363 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5364 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5365 T1: ::fidl_next::Encode<
5366 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
5367 ___E,
5368 >,
5369 {
5370 #[inline]
5371 fn encode(
5372 self,
5373 encoder_: &mut ___E,
5374 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
5375 _: (),
5376 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5377 ::fidl_next::munge! {
5378 let crate::wire::NodeDeprecatedCloneRequest {
5379 flags,
5380 object,
5381
5382 } = out_;
5383 }
5384
5385 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5386
5387 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5388
5389 Ok(())
5390 }
5391 }
5392
5393 pub struct NodeOnOpenRequest<T0, T1> {
5395 pub s: T0,
5396
5397 pub info: T1,
5398 }
5399
5400 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
5401 for NodeOnOpenRequest<T0, T1>
5402 where
5403 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5404 ___E: ::fidl_next::Encoder,
5405 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5406 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Status, ___E>,
5407 T1: ::fidl_next::Encode<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>,
5408 {
5409 #[inline]
5410 fn encode(
5411 self,
5412 encoder_: &mut ___E,
5413 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
5414 _: (),
5415 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5416 ::fidl_next::munge! {
5417 let crate::wire::NodeOnOpenRequest {
5418 s,
5419 info,
5420
5421 } = out_;
5422 }
5423
5424 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5425
5426 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
5427
5428 Ok(())
5429 }
5430 }
5431
5432 pub struct DirectoryDeprecatedOpenRequest<T0, T1, T2, T3> {
5434 pub flags: T0,
5435
5436 pub mode: T1,
5437
5438 pub path: T2,
5439
5440 pub object: T3,
5441 }
5442
5443 unsafe impl<___E, T0, T1, T2, T3>
5444 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
5445 for DirectoryDeprecatedOpenRequest<T0, T1, T2, T3>
5446 where
5447 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5448 ___E: ::fidl_next::Encoder,
5449 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5450 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5451 T1: ::fidl_next::Encode<crate::wire::ModeType, ___E>,
5452 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5453 T3: ::fidl_next::Encode<
5454 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
5455 ___E,
5456 >,
5457 {
5458 #[inline]
5459 fn encode(
5460 self,
5461 encoder_: &mut ___E,
5462 out_: &mut ::core::mem::MaybeUninit<
5463 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
5464 >,
5465 _: (),
5466 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5467 ::fidl_next::munge! {
5468 let crate::wire::DirectoryDeprecatedOpenRequest {
5469 flags,
5470 mode,
5471 path,
5472 object,
5473
5474 } = out_;
5475 }
5476
5477 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5478
5479 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5480
5481 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5482
5483 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5484
5485 Ok(())
5486 }
5487 }
5488
5489 pub struct DirectoryCreateSymlinkRequest<T0, T1, T2> {
5491 pub name: T0,
5492
5493 pub target: T1,
5494
5495 pub connection: T2,
5496 }
5497
5498 unsafe impl<___E, T0, T1, T2>
5499 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
5500 for DirectoryCreateSymlinkRequest<T0, T1, T2>
5501 where
5502 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5503 ___E: ::fidl_next::Encoder,
5504 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5505 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5506 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5507 T2: ::fidl_next::Encode<
5508 ::fidl_next::ServerEnd<
5509 crate::Symlink,
5510 ::fdomain_client::fidl_next::wire::OptionalHandle,
5511 >,
5512 ___E,
5513 >,
5514 {
5515 #[inline]
5516 fn encode(
5517 self,
5518 encoder_: &mut ___E,
5519 out_: &mut ::core::mem::MaybeUninit<
5520 crate::wire::DirectoryCreateSymlinkRequest<'static>,
5521 >,
5522 _: (),
5523 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5524 ::fidl_next::munge! {
5525 let crate::wire::DirectoryCreateSymlinkRequest {
5526 name,
5527 target,
5528 connection,
5529
5530 } = out_;
5531 }
5532
5533 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
5534
5535 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
5536
5537 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
5538
5539 Ok(())
5540 }
5541 }
5542
5543 pub struct FileGetBackingMemoryResponse<T0> {
5545 pub vmo: T0,
5546 }
5547
5548 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
5549 for FileGetBackingMemoryResponse<T0>
5550 where
5551 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5552 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5553 T0: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5554 {
5555 #[inline]
5556 fn encode(
5557 self,
5558 encoder_: &mut ___E,
5559 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
5560 _: (),
5561 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5562 ::fidl_next::munge! {
5563 let crate::wire::FileGetBackingMemoryResponse {
5564 vmo,
5565
5566 } = out_;
5567 }
5568
5569 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
5570
5571 Ok(())
5572 }
5573 }
5574
5575 pub struct LinkableLinkIntoRequest<T0, T1> {
5577 pub dst_parent_token: T0,
5578
5579 pub dst: T1,
5580 }
5581
5582 unsafe impl<___E, T0, T1>
5583 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
5584 for LinkableLinkIntoRequest<T0, T1>
5585 where
5586 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5587 ___E: ::fidl_next::Encoder,
5588 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5589 T0: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::Handle, ___E>,
5590 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5591 {
5592 #[inline]
5593 fn encode(
5594 self,
5595 encoder_: &mut ___E,
5596 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
5597 _: (),
5598 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5599 ::fidl_next::munge! {
5600 let crate::wire::LinkableLinkIntoRequest {
5601 dst_parent_token,
5602 dst,
5603
5604 } = out_;
5605 }
5606
5607 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5608
5609 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5610
5611 Ok(())
5612 }
5613 }
5614
5615 pub struct FileAllocateRequest<T0, T1, T2> {
5617 pub offset: T0,
5618
5619 pub length: T1,
5620
5621 pub mode: T2,
5622 }
5623
5624 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
5625 for FileAllocateRequest<T0, T1, T2>
5626 where
5627 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5628 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5629 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5630 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5631 T2: ::fidl_next::Encode<crate::wire::AllocateMode, ___E>,
5632 {
5633 #[inline]
5634 fn encode(
5635 self,
5636 encoder_: &mut ___E,
5637 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
5638 _: (),
5639 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5640 ::fidl_next::munge! {
5641 let crate::wire::FileAllocateRequest {
5642 offset,
5643 length,
5644 mode,
5645
5646 } = out_;
5647 }
5648
5649 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
5650
5651 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
5652
5653 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5654
5655 Ok(())
5656 }
5657 }
5658
5659 pub struct FileEnableVerityRequest<T0> {
5661 pub options: T0,
5662 }
5663
5664 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
5665 for FileEnableVerityRequest<T0>
5666 where
5667 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5668 ___E: ::fidl_next::Encoder,
5669 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5670 T0: ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>,
5671 {
5672 #[inline]
5673 fn encode(
5674 self,
5675 encoder_: &mut ___E,
5676 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
5677 _: (),
5678 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5679 ::fidl_next::munge! {
5680 let crate::wire::FileEnableVerityRequest {
5681 options,
5682
5683 } = out_;
5684 }
5685
5686 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5687
5688 Ok(())
5689 }
5690 }
5691
5692 pub struct FileObject<T0, T1> {
5694 pub event: T0,
5695
5696 pub stream: T1,
5697 }
5698
5699 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject<T0, T1>
5700 where
5701 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5702 ___E: ::fdomain_client::fidl_next::HandleEncoder,
5703 T0: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::OptionalHandle, ___E>,
5704 T1: ::fidl_next::Encode<::fdomain_client::fidl_next::wire::OptionalHandle, ___E>,
5705 {
5706 #[inline]
5707 fn encode(
5708 self,
5709 encoder_: &mut ___E,
5710 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
5711 _: (),
5712 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5713 ::fidl_next::munge! {
5714 let crate::wire::FileObject {
5715 event,
5716 stream,
5717
5718 } = out_;
5719 }
5720
5721 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
5722
5723 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
5724
5725 Ok(())
5726 }
5727 }
5728}
5729
5730pub use self::natural::*;
5731
5732#[doc = " Openable defines a node which is capable of opening other objects.\n"]
5734#[derive(PartialEq, Debug)]
5735pub struct Openable;
5736
5737#[cfg(target_os = "fuchsia")]
5738impl ::fidl_next::HasTransport for Openable {
5739 type Transport = ::fdomain_client::Channel;
5740}
5741
5742pub mod openable {
5743 pub mod prelude {
5744 pub use crate::{
5745 Openable, OpenableClientHandler, OpenableLocalClientHandler,
5746 OpenableLocalServerHandler, OpenableServerHandler, openable,
5747 };
5748
5749 pub use crate::natural::OpenableOpenRequest;
5750 }
5751
5752 pub struct Open;
5753
5754 impl ::fidl_next::Method for Open {
5755 const ORDINAL: u64 = 6236883748953765593;
5756 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5757 ::fidl_next::protocol::Flexibility::Flexible;
5758
5759 type Protocol = crate::Openable;
5760
5761 type Request = crate::wire::OpenableOpenRequest<'static>;
5762 }
5763
5764 mod ___detail {
5765 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Openable
5766 where
5767 ___T: ::fidl_next::Transport,
5768 {
5769 type Client = OpenableClient<___T>;
5770 type Server = OpenableServer<___T>;
5771 }
5772
5773 #[repr(transparent)]
5775 pub struct OpenableClient<___T: ::fidl_next::Transport> {
5776 #[allow(dead_code)]
5777 client: ::fidl_next::protocol::Client<___T>,
5778 }
5779
5780 impl<___T> OpenableClient<___T>
5781 where
5782 ___T: ::fidl_next::Transport,
5783 {
5784 #[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"]
5785 pub fn open(
5786 &self,
5787
5788 path: impl ::fidl_next::Encode<
5789 ::fidl_next::wire::String<'static>,
5790 <___T as ::fidl_next::Transport>::SendBuffer,
5791 >,
5792
5793 flags: impl ::fidl_next::Encode<
5794 crate::wire::Flags,
5795 <___T as ::fidl_next::Transport>::SendBuffer,
5796 >,
5797
5798 options: impl ::fidl_next::Encode<
5799 crate::wire::Options<'static>,
5800 <___T as ::fidl_next::Transport>::SendBuffer,
5801 >,
5802
5803 object: impl ::fidl_next::Encode<
5804 ::fdomain_client::fidl_next::wire::Handle,
5805 <___T as ::fidl_next::Transport>::SendBuffer,
5806 >,
5807 ) -> ::fidl_next::SendFuture<'_, ___T>
5808 where
5809 <___T as ::fidl_next::Transport>::SendBuffer:
5810 ::fidl_next::encoder::InternalHandleEncoder,
5811 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5812 <___T as ::fidl_next::Transport>::SendBuffer:
5813 ::fdomain_client::fidl_next::HandleEncoder,
5814 {
5815 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
5816 }
5817
5818 #[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"]
5819 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
5820 where
5821 ___R: ::fidl_next::Encode<
5822 crate::wire::OpenableOpenRequest<'static>,
5823 <___T as ::fidl_next::Transport>::SendBuffer,
5824 >,
5825 {
5826 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
5827 6236883748953765593,
5828 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
5829 request,
5830 ))
5831 }
5832 }
5833
5834 #[repr(transparent)]
5836 pub struct OpenableServer<___T: ::fidl_next::Transport> {
5837 server: ::fidl_next::protocol::Server<___T>,
5838 }
5839
5840 impl<___T> OpenableServer<___T> where ___T: ::fidl_next::Transport {}
5841 }
5842}
5843
5844#[diagnostic::on_unimplemented(
5845 note = "If {Self} implements the non-local OpenableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5846)]
5847
5848pub trait OpenableLocalClientHandler<
5852 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
5853 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5854>
5855{
5856 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5857 ::core::future::ready(())
5858 }
5859}
5860
5861impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Openable
5862where
5863 ___H: OpenableLocalClientHandler<___T>,
5864 ___T: ::fidl_next::Transport,
5865{
5866 async fn on_event(
5867 handler: &mut ___H,
5868 mut message: ::fidl_next::Message<___T>,
5869 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5870 match *message.header().ordinal {
5871 ordinal => {
5872 handler.on_unknown_interaction(ordinal).await;
5873 if ::core::matches!(
5874 message.header().flexibility(),
5875 ::fidl_next::protocol::Flexibility::Strict
5876 ) {
5877 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5878 } else {
5879 Ok(())
5880 }
5881 }
5882 }
5883 }
5884}
5885
5886#[diagnostic::on_unimplemented(
5887 note = "If {Self} implements the non-local OpenableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5888)]
5889
5890pub trait OpenableLocalServerHandler<
5894 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
5895 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5896>
5897{
5898 #[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"]
5899 fn open(
5900 &mut self,
5901
5902 request: ::fidl_next::Request<openable::Open, ___T>,
5903 ) -> impl ::core::future::Future<Output = ()>;
5904
5905 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5906 ::core::future::ready(())
5907 }
5908}
5909
5910impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Openable
5911where
5912 ___H: OpenableLocalServerHandler<___T>,
5913 ___T: ::fidl_next::Transport,
5914 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
5915 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5916 Constraint = (),
5917 >,
5918{
5919 async fn on_one_way(
5920 handler: &mut ___H,
5921 mut message: ::fidl_next::Message<___T>,
5922 ) -> ::core::result::Result<
5923 (),
5924 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5925 > {
5926 match *message.header().ordinal {
5927 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5928 Ok(decoded) => {
5929 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
5930 Ok(())
5931 }
5932 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5933 ordinal: 6236883748953765593,
5934 error,
5935 }),
5936 },
5937
5938 ordinal => {
5939 handler.on_unknown_interaction(ordinal).await;
5940 if ::core::matches!(
5941 message.header().flexibility(),
5942 ::fidl_next::protocol::Flexibility::Strict
5943 ) {
5944 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5945 } else {
5946 Ok(())
5947 }
5948 }
5949 }
5950 }
5951
5952 async fn on_two_way(
5953 handler: &mut ___H,
5954 mut message: ::fidl_next::Message<___T>,
5955 responder: ::fidl_next::protocol::Responder<___T>,
5956 ) -> ::core::result::Result<
5957 (),
5958 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5959 > {
5960 match *message.header().ordinal {
5961 ordinal => {
5962 handler.on_unknown_interaction(ordinal).await;
5963 if ::core::matches!(
5964 message.header().flexibility(),
5965 ::fidl_next::protocol::Flexibility::Strict
5966 ) {
5967 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5968 } else {
5969 responder
5970 .respond_framework_error(
5971 ordinal,
5972 ::fidl_next::FrameworkError::UnknownMethod,
5973 )
5974 .expect("encoding a framework error should never fail")
5975 .await?;
5976 Ok(())
5977 }
5978 }
5979 }
5980 }
5981}
5982
5983pub trait OpenableClientHandler<
5987 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
5988 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5989>
5990{
5991 fn on_unknown_interaction(
5992 &mut self,
5993 ordinal: u64,
5994 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5995 ::core::future::ready(())
5996 }
5997}
5998
5999impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Openable
6000where
6001 ___H: OpenableClientHandler<___T> + ::core::marker::Send,
6002 ___T: ::fidl_next::Transport,
6003{
6004 async fn on_event(
6005 handler: &mut ___H,
6006 mut message: ::fidl_next::Message<___T>,
6007 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6008 match *message.header().ordinal {
6009 ordinal => {
6010 handler.on_unknown_interaction(ordinal).await;
6011 if ::core::matches!(
6012 message.header().flexibility(),
6013 ::fidl_next::protocol::Flexibility::Strict
6014 ) {
6015 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6016 } else {
6017 Ok(())
6018 }
6019 }
6020 }
6021 }
6022}
6023
6024pub trait OpenableServerHandler<
6028 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
6029 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6030>
6031{
6032 #[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"]
6033 fn open(
6034 &mut self,
6035
6036 request: ::fidl_next::Request<openable::Open, ___T>,
6037 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6038
6039 fn on_unknown_interaction(
6040 &mut self,
6041 ordinal: u64,
6042 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6043 ::core::future::ready(())
6044 }
6045}
6046
6047impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Openable
6048where
6049 ___H: OpenableServerHandler<___T> + ::core::marker::Send,
6050 ___T: ::fidl_next::Transport,
6051 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
6052 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6053 Constraint = (),
6054 >,
6055{
6056 async fn on_one_way(
6057 handler: &mut ___H,
6058 mut message: ::fidl_next::Message<___T>,
6059 ) -> ::core::result::Result<
6060 (),
6061 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6062 > {
6063 match *message.header().ordinal {
6064 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6065 Ok(decoded) => {
6066 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
6067 Ok(())
6068 }
6069 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6070 ordinal: 6236883748953765593,
6071 error,
6072 }),
6073 },
6074
6075 ordinal => {
6076 handler.on_unknown_interaction(ordinal).await;
6077 if ::core::matches!(
6078 message.header().flexibility(),
6079 ::fidl_next::protocol::Flexibility::Strict
6080 ) {
6081 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6082 } else {
6083 Ok(())
6084 }
6085 }
6086 }
6087 }
6088
6089 async fn on_two_way(
6090 handler: &mut ___H,
6091 mut message: ::fidl_next::Message<___T>,
6092 responder: ::fidl_next::protocol::Responder<___T>,
6093 ) -> ::core::result::Result<
6094 (),
6095 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6096 > {
6097 match *message.header().ordinal {
6098 ordinal => {
6099 handler.on_unknown_interaction(ordinal).await;
6100 if ::core::matches!(
6101 message.header().flexibility(),
6102 ::fidl_next::protocol::Flexibility::Strict
6103 ) {
6104 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6105 } else {
6106 responder
6107 .respond_framework_error(
6108 ordinal,
6109 ::fidl_next::FrameworkError::UnknownMethod,
6110 )
6111 .expect("encoding a framework error should never fail")
6112 .await?;
6113 Ok(())
6114 }
6115 }
6116 }
6117 }
6118}
6119
6120impl<___T> OpenableClientHandler<___T> for ::fidl_next::IgnoreEvents
6121where
6122 ___T: ::fidl_next::Transport,
6123{
6124 async fn on_unknown_interaction(&mut self, _: u64) {}
6125}
6126
6127impl<___H, ___T> OpenableLocalClientHandler<___T> for ::fidl_next::Local<___H>
6128where
6129 ___H: OpenableClientHandler<___T>,
6130 ___T: ::fidl_next::Transport,
6131{
6132 async fn on_unknown_interaction(&mut self, ordinal: u64) {
6133 ___H::on_unknown_interaction(&mut self.0, ordinal).await
6134 }
6135}
6136
6137impl<___H, ___T> OpenableLocalServerHandler<___T> for ::fidl_next::Local<___H>
6138where
6139 ___H: OpenableServerHandler<___T>,
6140 ___T: ::fidl_next::Transport,
6141{
6142 async fn open(&mut self, request: ::fidl_next::Request<openable::Open, ___T>) {
6143 ___H::open(&mut self.0, request).await
6144 }
6145
6146 async fn on_unknown_interaction(&mut self, ordinal: u64) {
6147 ___H::on_unknown_interaction(&mut self.0, ordinal).await
6148 }
6149}
6150
6151#[doc = " Node defines the minimal interface for entities which can be accessed in a filesystem.\n"]
6153#[derive(PartialEq, Debug)]
6154pub struct Node;
6155
6156impl ::fidl_next::Discoverable for Node {
6157 const PROTOCOL_NAME: &'static str = "fuchsia.io.Node";
6158}
6159
6160#[cfg(target_os = "fuchsia")]
6161impl ::fidl_next::HasTransport for Node {
6162 type Transport = ::fdomain_client::Channel;
6163}
6164
6165pub mod node {
6166 pub mod prelude {
6167 pub use crate::{
6168 Node, NodeClientHandler, NodeLocalClientHandler, NodeLocalServerHandler,
6169 NodeServerHandler, node,
6170 };
6171
6172 pub use crate::natural::ExtendedAttributeValue;
6173
6174 pub use crate::natural::MutableNodeAttributes;
6175
6176 pub use crate::natural::NodeAttributes2;
6177
6178 pub use crate::natural::NodeDeprecatedCloneRequest;
6179
6180 pub use crate::natural::NodeDeprecatedGetAttrResponse;
6181
6182 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
6183
6184 pub use crate::natural::NodeDeprecatedSetAttrRequest;
6185
6186 pub use crate::natural::NodeDeprecatedSetAttrResponse;
6187
6188 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
6189
6190 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
6191
6192 pub use crate::natural::NodeGetAttributesRequest;
6193
6194 pub use crate::natural::NodeGetExtendedAttributeRequest;
6195
6196 pub use crate::natural::NodeListExtendedAttributesRequest;
6197
6198 pub use crate::natural::NodeOnOpenRequest;
6199
6200 pub use crate::natural::NodeQueryFilesystemResponse;
6201
6202 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
6203
6204 pub use crate::natural::NodeSetExtendedAttributeRequest;
6205
6206 pub use crate::natural::NodeSetFlagsRequest;
6207
6208 pub use crate::natural::NodeGetFlagsResponse;
6209
6210 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
6211
6212 pub use crate::natural::NodeSetExtendedAttributeResponse;
6213
6214 pub use crate::natural::NodeSetFlagsResponse;
6215
6216 pub use crate::natural::NodeSyncResponse;
6217
6218 pub use crate::natural::NodeUpdateAttributesResponse;
6219
6220 pub use crate::natural::Representation;
6221
6222 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
6223
6224 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
6225
6226 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
6227 }
6228
6229 pub struct Clone;
6230
6231 impl ::fidl_next::Method for Clone {
6232 const ORDINAL: u64 = 2366825959783828089;
6233 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6234 ::fidl_next::protocol::Flexibility::Strict;
6235
6236 type Protocol = crate::Node;
6237
6238 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
6239 }
6240
6241 pub struct Close;
6242
6243 impl ::fidl_next::Method for Close {
6244 const ORDINAL: u64 = 6540867515453498750;
6245 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6246 ::fidl_next::protocol::Flexibility::Strict;
6247
6248 type Protocol = crate::Node;
6249
6250 type Request = ::fidl_next::wire::EmptyMessageBody;
6251 }
6252
6253 impl ::fidl_next::TwoWayMethod for Close {
6254 type Response = ::fidl_next::wire::Result<
6255 'static,
6256 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
6257 ::fidl_next::wire::Int32,
6258 >;
6259 }
6260
6261 impl<___R> ::fidl_next::Respond<___R> for Close {
6262 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6263
6264 fn respond(response: ___R) -> Self::Output {
6265 ::core::result::Result::Ok(response)
6266 }
6267 }
6268
6269 impl<___R> ::fidl_next::RespondErr<___R> for Close {
6270 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6271
6272 fn respond_err(response: ___R) -> Self::Output {
6273 ::core::result::Result::Err(response)
6274 }
6275 }
6276
6277 pub struct Query;
6278
6279 impl ::fidl_next::Method for Query {
6280 const ORDINAL: u64 = 2763219980499352582;
6281 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6282 ::fidl_next::protocol::Flexibility::Strict;
6283
6284 type Protocol = crate::Node;
6285
6286 type Request = ::fidl_next::wire::EmptyMessageBody;
6287 }
6288
6289 impl ::fidl_next::TwoWayMethod for Query {
6290 type Response = ::fidl_next::wire::Strict<
6291 ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
6292 >;
6293 }
6294
6295 impl<___R> ::fidl_next::Respond<___R> for Query {
6296 type Output = ::fidl_next::Strict<
6297 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>,
6298 >;
6299
6300 fn respond(response: ___R) -> Self::Output {
6301 ::fidl_next::Strict(::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse {
6302 protocol: response,
6303 })
6304 }
6305 }
6306
6307 pub struct DeprecatedClone;
6308
6309 impl ::fidl_next::Method for DeprecatedClone {
6310 const ORDINAL: u64 = 6512600400724287855;
6311 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6312 ::fidl_next::protocol::Flexibility::Flexible;
6313
6314 type Protocol = crate::Node;
6315
6316 type Request = crate::wire::NodeDeprecatedCloneRequest;
6317 }
6318
6319 pub struct OnOpen;
6320
6321 impl ::fidl_next::Method for OnOpen {
6322 const ORDINAL: u64 = 9207534335756671346;
6323 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6324 ::fidl_next::protocol::Flexibility::Flexible;
6325
6326 type Protocol = crate::Node;
6327
6328 type Request = crate::wire::NodeOnOpenRequest<'static>;
6329 }
6330
6331 pub struct DeprecatedGetAttr;
6332
6333 impl ::fidl_next::Method for DeprecatedGetAttr {
6334 const ORDINAL: u64 = 8689798978500614909;
6335 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6336 ::fidl_next::protocol::Flexibility::Strict;
6337
6338 type Protocol = crate::Node;
6339
6340 type Request = ::fidl_next::wire::EmptyMessageBody;
6341 }
6342
6343 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
6344 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
6345 }
6346
6347 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
6348 type Output = ::fidl_next::Strict<___R>;
6349
6350 fn respond(response: ___R) -> Self::Output {
6351 ::fidl_next::Strict(response)
6352 }
6353 }
6354
6355 pub struct DeprecatedSetAttr;
6356
6357 impl ::fidl_next::Method for DeprecatedSetAttr {
6358 const ORDINAL: u64 = 4721673413776871238;
6359 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6360 ::fidl_next::protocol::Flexibility::Strict;
6361
6362 type Protocol = crate::Node;
6363
6364 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
6365 }
6366
6367 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
6368 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
6369 }
6370
6371 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
6372 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
6373
6374 fn respond(response: ___R) -> Self::Output {
6375 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
6376 }
6377 }
6378
6379 pub struct DeprecatedGetFlags;
6380
6381 impl ::fidl_next::Method for DeprecatedGetFlags {
6382 const ORDINAL: u64 = 6595803110182632097;
6383 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6384 ::fidl_next::protocol::Flexibility::Strict;
6385
6386 type Protocol = crate::Node;
6387
6388 type Request = ::fidl_next::wire::EmptyMessageBody;
6389 }
6390
6391 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
6392 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
6393 }
6394
6395 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
6396 type Output = ::fidl_next::Strict<___R>;
6397
6398 fn respond(response: ___R) -> Self::Output {
6399 ::fidl_next::Strict(response)
6400 }
6401 }
6402
6403 pub struct DeprecatedSetFlags;
6404
6405 impl ::fidl_next::Method for DeprecatedSetFlags {
6406 const ORDINAL: u64 = 5950864159036794675;
6407 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6408 ::fidl_next::protocol::Flexibility::Strict;
6409
6410 type Protocol = crate::Node;
6411
6412 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
6413 }
6414
6415 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
6416 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
6417 }
6418
6419 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
6420 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
6421
6422 fn respond(response: ___R) -> Self::Output {
6423 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
6424 }
6425 }
6426
6427 pub struct GetFlags;
6428
6429 impl ::fidl_next::Method for GetFlags {
6430 const ORDINAL: u64 = 105530239381466147;
6431 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6432 ::fidl_next::protocol::Flexibility::Flexible;
6433
6434 type Protocol = crate::Node;
6435
6436 type Request = ::fidl_next::wire::EmptyMessageBody;
6437 }
6438
6439 impl ::fidl_next::TwoWayMethod for GetFlags {
6440 type Response = ::fidl_next::wire::Result<
6441 'static,
6442 crate::wire::NodeGetFlagsResponse,
6443 ::fidl_next::wire::fuchsia::Status,
6444 >;
6445 }
6446
6447 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
6448 type Output = ::core::result::Result<
6449 crate::generic::NodeGetFlagsResponse<___R>,
6450 ::fidl_next::never::Never,
6451 >;
6452
6453 fn respond(response: ___R) -> Self::Output {
6454 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
6455 }
6456 }
6457
6458 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
6459 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6460
6461 fn respond_err(response: ___R) -> Self::Output {
6462 ::core::result::Result::Err(response)
6463 }
6464 }
6465
6466 pub struct SetFlags;
6467
6468 impl ::fidl_next::Method for SetFlags {
6469 const ORDINAL: u64 = 6172186066099445416;
6470 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6471 ::fidl_next::protocol::Flexibility::Flexible;
6472
6473 type Protocol = crate::Node;
6474
6475 type Request = crate::wire::NodeSetFlagsRequest;
6476 }
6477
6478 impl ::fidl_next::TwoWayMethod for SetFlags {
6479 type Response = ::fidl_next::wire::Result<
6480 'static,
6481 crate::wire::NodeSetFlagsResponse,
6482 ::fidl_next::wire::fuchsia::Status,
6483 >;
6484 }
6485
6486 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
6487 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6488
6489 fn respond(response: ___R) -> Self::Output {
6490 ::core::result::Result::Ok(response)
6491 }
6492 }
6493
6494 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
6495 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6496
6497 fn respond_err(response: ___R) -> Self::Output {
6498 ::core::result::Result::Err(response)
6499 }
6500 }
6501
6502 pub struct QueryFilesystem;
6503
6504 impl ::fidl_next::Method for QueryFilesystem {
6505 const ORDINAL: u64 = 8013111122914313744;
6506 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6507 ::fidl_next::protocol::Flexibility::Strict;
6508
6509 type Protocol = crate::Node;
6510
6511 type Request = ::fidl_next::wire::EmptyMessageBody;
6512 }
6513
6514 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
6515 type Response =
6516 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
6517 }
6518
6519 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
6520 type Output = ::fidl_next::Strict<___R>;
6521
6522 fn respond(response: ___R) -> Self::Output {
6523 ::fidl_next::Strict(response)
6524 }
6525 }
6526
6527 pub struct OnRepresentation;
6528
6529 impl ::fidl_next::Method for OnRepresentation {
6530 const ORDINAL: u64 = 6679970090861613324;
6531 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6532 ::fidl_next::protocol::Flexibility::Strict;
6533
6534 type Protocol = crate::Node;
6535
6536 type Request = crate::wire::Representation<'static>;
6537 }
6538
6539 pub struct GetAttributes;
6540
6541 impl ::fidl_next::Method for GetAttributes {
6542 const ORDINAL: u64 = 4414537700416816443;
6543 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6544 ::fidl_next::protocol::Flexibility::Strict;
6545
6546 type Protocol = crate::Node;
6547
6548 type Request = crate::wire::NodeGetAttributesRequest;
6549 }
6550
6551 impl ::fidl_next::TwoWayMethod for GetAttributes {
6552 type Response = ::fidl_next::wire::Result<
6553 'static,
6554 crate::wire::NodeAttributes2<'static>,
6555 ::fidl_next::wire::fuchsia::Status,
6556 >;
6557 }
6558
6559 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
6560 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6561
6562 fn respond(response: ___R) -> Self::Output {
6563 ::core::result::Result::Ok(response)
6564 }
6565 }
6566
6567 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
6568 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6569
6570 fn respond_err(response: ___R) -> Self::Output {
6571 ::core::result::Result::Err(response)
6572 }
6573 }
6574
6575 pub struct UpdateAttributes;
6576
6577 impl ::fidl_next::Method for UpdateAttributes {
6578 const ORDINAL: u64 = 3677402239314018056;
6579 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6580 ::fidl_next::protocol::Flexibility::Strict;
6581
6582 type Protocol = crate::Node;
6583
6584 type Request = crate::wire::MutableNodeAttributes<'static>;
6585 }
6586
6587 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
6588 type Response = ::fidl_next::wire::Result<
6589 'static,
6590 crate::wire::NodeUpdateAttributesResponse,
6591 ::fidl_next::wire::fuchsia::Status,
6592 >;
6593 }
6594
6595 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
6596 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6597
6598 fn respond(response: ___R) -> Self::Output {
6599 ::core::result::Result::Ok(response)
6600 }
6601 }
6602
6603 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
6604 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6605
6606 fn respond_err(response: ___R) -> Self::Output {
6607 ::core::result::Result::Err(response)
6608 }
6609 }
6610
6611 pub struct Sync;
6612
6613 impl ::fidl_next::Method for Sync {
6614 const ORDINAL: u64 = 3196473584242777161;
6615 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6616 ::fidl_next::protocol::Flexibility::Strict;
6617
6618 type Protocol = crate::Node;
6619
6620 type Request = ::fidl_next::wire::EmptyMessageBody;
6621 }
6622
6623 impl ::fidl_next::TwoWayMethod for Sync {
6624 type Response = ::fidl_next::wire::Result<
6625 'static,
6626 crate::wire::NodeSyncResponse,
6627 ::fidl_next::wire::fuchsia::Status,
6628 >;
6629 }
6630
6631 impl<___R> ::fidl_next::Respond<___R> for Sync {
6632 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6633
6634 fn respond(response: ___R) -> Self::Output {
6635 ::core::result::Result::Ok(response)
6636 }
6637 }
6638
6639 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
6640 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6641
6642 fn respond_err(response: ___R) -> Self::Output {
6643 ::core::result::Result::Err(response)
6644 }
6645 }
6646
6647 pub struct ListExtendedAttributes;
6648
6649 impl ::fidl_next::Method for ListExtendedAttributes {
6650 const ORDINAL: u64 = 5431626189872037072;
6651 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6652 ::fidl_next::protocol::Flexibility::Strict;
6653
6654 type Protocol = crate::Node;
6655
6656 type Request = crate::wire::NodeListExtendedAttributesRequest;
6657 }
6658
6659 pub struct GetExtendedAttribute;
6660
6661 impl ::fidl_next::Method for GetExtendedAttribute {
6662 const ORDINAL: u64 = 5043930208506967771;
6663 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6664 ::fidl_next::protocol::Flexibility::Strict;
6665
6666 type Protocol = crate::Node;
6667
6668 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
6669 }
6670
6671 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
6672 type Response = ::fidl_next::wire::Result<
6673 'static,
6674 crate::wire::ExtendedAttributeValue<'static>,
6675 ::fidl_next::wire::fuchsia::Status,
6676 >;
6677 }
6678
6679 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
6680 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6681
6682 fn respond(response: ___R) -> Self::Output {
6683 ::core::result::Result::Ok(response)
6684 }
6685 }
6686
6687 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
6688 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6689
6690 fn respond_err(response: ___R) -> Self::Output {
6691 ::core::result::Result::Err(response)
6692 }
6693 }
6694
6695 pub struct SetExtendedAttribute;
6696
6697 impl ::fidl_next::Method for SetExtendedAttribute {
6698 const ORDINAL: u64 = 5374223046099989052;
6699 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6700 ::fidl_next::protocol::Flexibility::Strict;
6701
6702 type Protocol = crate::Node;
6703
6704 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
6705 }
6706
6707 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
6708 type Response = ::fidl_next::wire::Result<
6709 'static,
6710 crate::wire::NodeSetExtendedAttributeResponse,
6711 ::fidl_next::wire::fuchsia::Status,
6712 >;
6713 }
6714
6715 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
6716 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6717
6718 fn respond(response: ___R) -> Self::Output {
6719 ::core::result::Result::Ok(response)
6720 }
6721 }
6722
6723 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
6724 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6725
6726 fn respond_err(response: ___R) -> Self::Output {
6727 ::core::result::Result::Err(response)
6728 }
6729 }
6730
6731 pub struct RemoveExtendedAttribute;
6732
6733 impl ::fidl_next::Method for RemoveExtendedAttribute {
6734 const ORDINAL: u64 = 8794297771444732717;
6735 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6736 ::fidl_next::protocol::Flexibility::Strict;
6737
6738 type Protocol = crate::Node;
6739
6740 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
6741 }
6742
6743 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
6744 type Response = ::fidl_next::wire::Result<
6745 'static,
6746 crate::wire::NodeRemoveExtendedAttributeResponse,
6747 ::fidl_next::wire::fuchsia::Status,
6748 >;
6749 }
6750
6751 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
6752 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6753
6754 fn respond(response: ___R) -> Self::Output {
6755 ::core::result::Result::Ok(response)
6756 }
6757 }
6758
6759 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
6760 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6761
6762 fn respond_err(response: ___R) -> Self::Output {
6763 ::core::result::Result::Err(response)
6764 }
6765 }
6766
6767 mod ___detail {
6768 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
6769 where
6770 ___T: ::fidl_next::Transport,
6771 {
6772 type Client = NodeClient<___T>;
6773 type Server = NodeServer<___T>;
6774 }
6775
6776 #[repr(transparent)]
6778 pub struct NodeClient<___T: ::fidl_next::Transport> {
6779 #[allow(dead_code)]
6780 client: ::fidl_next::protocol::Client<___T>,
6781 }
6782
6783 impl<___T> NodeClient<___T>
6784 where
6785 ___T: ::fidl_next::Transport,
6786 {
6787 pub fn clone(
6788 &self,
6789
6790 request: impl ::fidl_next::Encode<
6791 ::fidl_next::ServerEnd<
6792 ::fdomain_next_fuchsia_unknown::Cloneable,
6793 ::fdomain_client::fidl_next::wire::Handle,
6794 >,
6795 <___T as ::fidl_next::Transport>::SendBuffer,
6796 >,
6797 ) -> ::fidl_next::SendFuture<'_, ___T>
6798 where
6799 <___T as ::fidl_next::Transport>::SendBuffer:
6800 ::fidl_next::encoder::InternalHandleEncoder,
6801 <___T as ::fidl_next::Transport>::SendBuffer:
6802 ::fdomain_client::fidl_next::HandleEncoder,
6803 {
6804 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
6805 request,
6806 })
6807 }
6808
6809 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6810 where
6811 ___R: ::fidl_next::Encode<
6812 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
6813 <___T as ::fidl_next::Transport>::SendBuffer,
6814 >,
6815 {
6816 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6817 2366825959783828089,
6818 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
6819 request,
6820 ))
6821 }
6822
6823 #[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"]
6824 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
6825 ::fidl_next::TwoWayFuture::from_untyped(
6826 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6827 6540867515453498750,
6828 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
6829 (),
6830 ),
6831 )
6832 }
6833
6834 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
6835 ::fidl_next::TwoWayFuture::from_untyped(
6836 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6837 2763219980499352582,
6838 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
6839 (),
6840 ),
6841 )
6842 }
6843
6844 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6845 pub fn deprecated_clone(
6846 &self,
6847
6848 flags: impl ::fidl_next::Encode<
6849 crate::wire::OpenFlags,
6850 <___T as ::fidl_next::Transport>::SendBuffer,
6851 >,
6852
6853 object: impl ::fidl_next::Encode<
6854 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
6855 <___T as ::fidl_next::Transport>::SendBuffer,
6856 >,
6857 ) -> ::fidl_next::SendFuture<'_, ___T>
6858 where
6859 <___T as ::fidl_next::Transport>::SendBuffer:
6860 ::fidl_next::encoder::InternalHandleEncoder,
6861 <___T as ::fidl_next::Transport>::SendBuffer:
6862 ::fdomain_client::fidl_next::HandleEncoder,
6863 {
6864 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
6865 flags,
6866
6867 object,
6868 })
6869 }
6870
6871 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
6872 pub fn deprecated_clone_with<___R>(
6873 &self,
6874 request: ___R,
6875 ) -> ::fidl_next::SendFuture<'_, ___T>
6876 where
6877 ___R: ::fidl_next::Encode<
6878 crate::wire::NodeDeprecatedCloneRequest,
6879 <___T as ::fidl_next::Transport>::SendBuffer,
6880 >,
6881 {
6882 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6883 6512600400724287855,
6884 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
6885 request,
6886 ))
6887 }
6888
6889 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
6890 pub fn deprecated_get_attr(
6891 &self,
6892 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
6893 ::fidl_next::TwoWayFuture::from_untyped(
6894 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6895 8689798978500614909,
6896 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
6897 (),
6898 ),
6899 )
6900 }
6901
6902 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6903 pub fn deprecated_set_attr(
6904 &self,
6905
6906 flags: impl ::fidl_next::Encode<
6907 crate::wire::NodeAttributeFlags,
6908 <___T as ::fidl_next::Transport>::SendBuffer,
6909 >,
6910
6911 attributes: impl ::fidl_next::Encode<
6912 crate::wire::NodeAttributes,
6913 <___T as ::fidl_next::Transport>::SendBuffer,
6914 >,
6915 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6916 where
6917 <___T as ::fidl_next::Transport>::SendBuffer:
6918 ::fidl_next::encoder::InternalHandleEncoder,
6919 {
6920 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
6921 flags,
6922
6923 attributes,
6924 })
6925 }
6926
6927 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
6928 pub fn deprecated_set_attr_with<___R>(
6929 &self,
6930 request: ___R,
6931 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
6932 where
6933 ___R: ::fidl_next::Encode<
6934 crate::wire::NodeDeprecatedSetAttrRequest,
6935 <___T as ::fidl_next::Transport>::SendBuffer,
6936 >,
6937 {
6938 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6939 4721673413776871238,
6940 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
6941 request,
6942 ))
6943 }
6944
6945 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
6946 pub fn deprecated_get_flags(
6947 &self,
6948 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
6949 ::fidl_next::TwoWayFuture::from_untyped(
6950 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6951 6595803110182632097,
6952 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
6953 (),
6954 ),
6955 )
6956 }
6957
6958 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6959 pub fn deprecated_set_flags(
6960 &self,
6961
6962 flags: impl ::fidl_next::Encode<
6963 crate::wire::OpenFlags,
6964 <___T as ::fidl_next::Transport>::SendBuffer,
6965 >,
6966 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6967 where
6968 <___T as ::fidl_next::Transport>::SendBuffer:
6969 ::fidl_next::encoder::InternalHandleEncoder,
6970 {
6971 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
6972 flags,
6973 })
6974 }
6975
6976 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
6977 pub fn deprecated_set_flags_with<___R>(
6978 &self,
6979 request: ___R,
6980 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
6981 where
6982 ___R: ::fidl_next::Encode<
6983 crate::wire::NodeDeprecatedSetFlagsRequest,
6984 <___T as ::fidl_next::Transport>::SendBuffer,
6985 >,
6986 {
6987 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6988 5950864159036794675,
6989 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
6990 request,
6991 ))
6992 }
6993
6994 #[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"]
6995 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
6996 ::fidl_next::TwoWayFuture::from_untyped(
6997 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6998 105530239381466147,
6999 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
7000 (),
7001 ),
7002 )
7003 }
7004
7005 #[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"]
7006 pub fn set_flags(
7007 &self,
7008
7009 flags: impl ::fidl_next::Encode<
7010 crate::wire::Flags,
7011 <___T as ::fidl_next::Transport>::SendBuffer,
7012 >,
7013 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
7014 where
7015 <___T as ::fidl_next::Transport>::SendBuffer:
7016 ::fidl_next::encoder::InternalHandleEncoder,
7017 {
7018 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
7019 }
7020
7021 #[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"]
7022 pub fn set_flags_with<___R>(
7023 &self,
7024 request: ___R,
7025 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
7026 where
7027 ___R: ::fidl_next::Encode<
7028 crate::wire::NodeSetFlagsRequest,
7029 <___T as ::fidl_next::Transport>::SendBuffer,
7030 >,
7031 {
7032 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7033 6172186066099445416,
7034 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
7035 request,
7036 ))
7037 }
7038
7039 #[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"]
7040 pub fn query_filesystem(
7041 &self,
7042 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
7043 ::fidl_next::TwoWayFuture::from_untyped(
7044 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7045 8013111122914313744,
7046 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
7047 (),
7048 ),
7049 )
7050 }
7051
7052 #[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"]
7053 pub fn get_attributes(
7054 &self,
7055
7056 query: impl ::fidl_next::Encode<
7057 crate::wire::NodeAttributesQuery,
7058 <___T as ::fidl_next::Transport>::SendBuffer,
7059 >,
7060 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
7061 where
7062 <___T as ::fidl_next::Transport>::SendBuffer:
7063 ::fidl_next::encoder::InternalHandleEncoder,
7064 {
7065 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
7066 }
7067
7068 #[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"]
7069 pub fn get_attributes_with<___R>(
7070 &self,
7071 request: ___R,
7072 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
7073 where
7074 ___R: ::fidl_next::Encode<
7075 crate::wire::NodeGetAttributesRequest,
7076 <___T as ::fidl_next::Transport>::SendBuffer,
7077 >,
7078 {
7079 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7080 4414537700416816443,
7081 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
7082 request,
7083 ))
7084 }
7085
7086 #[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"]
7087 pub fn update_attributes_with<___R>(
7088 &self,
7089 request: ___R,
7090 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
7091 where
7092 ___R: ::fidl_next::Encode<
7093 crate::wire::MutableNodeAttributes<'static>,
7094 <___T as ::fidl_next::Transport>::SendBuffer,
7095 >,
7096 {
7097 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7098 3677402239314018056,
7099 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
7100 request,
7101 ))
7102 }
7103
7104 #[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"]
7105 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
7106 ::fidl_next::TwoWayFuture::from_untyped(
7107 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7108 3196473584242777161,
7109 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
7110 (),
7111 ),
7112 )
7113 }
7114
7115 #[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"]
7116 pub fn list_extended_attributes(
7117 &self,
7118
7119 iterator: impl ::fidl_next::Encode<
7120 ::fidl_next::ServerEnd<
7121 crate::ExtendedAttributeIterator,
7122 ::fdomain_client::fidl_next::wire::Handle,
7123 >,
7124 <___T as ::fidl_next::Transport>::SendBuffer,
7125 >,
7126 ) -> ::fidl_next::SendFuture<'_, ___T>
7127 where
7128 <___T as ::fidl_next::Transport>::SendBuffer:
7129 ::fidl_next::encoder::InternalHandleEncoder,
7130 <___T as ::fidl_next::Transport>::SendBuffer:
7131 ::fdomain_client::fidl_next::HandleEncoder,
7132 {
7133 self.list_extended_attributes_with(
7134 crate::generic::NodeListExtendedAttributesRequest { iterator },
7135 )
7136 }
7137
7138 #[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"]
7139 pub fn list_extended_attributes_with<___R>(
7140 &self,
7141 request: ___R,
7142 ) -> ::fidl_next::SendFuture<'_, ___T>
7143 where
7144 ___R: ::fidl_next::Encode<
7145 crate::wire::NodeListExtendedAttributesRequest,
7146 <___T as ::fidl_next::Transport>::SendBuffer,
7147 >,
7148 {
7149 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7150 5431626189872037072,
7151 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
7152 request,
7153 ))
7154 }
7155
7156 #[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"]
7157 pub fn get_extended_attribute(
7158 &self,
7159
7160 name: impl ::fidl_next::Encode<
7161 ::fidl_next::wire::Vector<'static, u8>,
7162 <___T as ::fidl_next::Transport>::SendBuffer,
7163 >,
7164 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
7165 where
7166 <___T as ::fidl_next::Transport>::SendBuffer:
7167 ::fidl_next::encoder::InternalHandleEncoder,
7168 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7169 {
7170 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
7171 name,
7172 })
7173 }
7174
7175 #[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"]
7176 pub fn get_extended_attribute_with<___R>(
7177 &self,
7178 request: ___R,
7179 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
7180 where
7181 ___R: ::fidl_next::Encode<
7182 crate::wire::NodeGetExtendedAttributeRequest<'static>,
7183 <___T as ::fidl_next::Transport>::SendBuffer,
7184 >,
7185 {
7186 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7187 5043930208506967771,
7188 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
7189 request,
7190 ))
7191 }
7192
7193 #[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"]
7194 pub fn set_extended_attribute(
7195 &self,
7196
7197 name: impl ::fidl_next::Encode<
7198 ::fidl_next::wire::Vector<'static, u8>,
7199 <___T as ::fidl_next::Transport>::SendBuffer,
7200 >,
7201
7202 value: impl ::fidl_next::Encode<
7203 crate::wire::ExtendedAttributeValue<'static>,
7204 <___T as ::fidl_next::Transport>::SendBuffer,
7205 >,
7206
7207 mode: impl ::fidl_next::Encode<
7208 crate::wire::SetExtendedAttributeMode,
7209 <___T as ::fidl_next::Transport>::SendBuffer,
7210 >,
7211 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
7212 where
7213 <___T as ::fidl_next::Transport>::SendBuffer:
7214 ::fidl_next::encoder::InternalHandleEncoder,
7215 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7216 <___T as ::fidl_next::Transport>::SendBuffer:
7217 ::fdomain_client::fidl_next::HandleEncoder,
7218 {
7219 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
7220 name,
7221
7222 value,
7223
7224 mode,
7225 })
7226 }
7227
7228 #[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"]
7229 pub fn set_extended_attribute_with<___R>(
7230 &self,
7231 request: ___R,
7232 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
7233 where
7234 ___R: ::fidl_next::Encode<
7235 crate::wire::NodeSetExtendedAttributeRequest<'static>,
7236 <___T as ::fidl_next::Transport>::SendBuffer,
7237 >,
7238 {
7239 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7240 5374223046099989052,
7241 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
7242 request,
7243 ))
7244 }
7245
7246 #[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"]
7247 pub fn remove_extended_attribute(
7248 &self,
7249
7250 name: impl ::fidl_next::Encode<
7251 ::fidl_next::wire::Vector<'static, u8>,
7252 <___T as ::fidl_next::Transport>::SendBuffer,
7253 >,
7254 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
7255 where
7256 <___T as ::fidl_next::Transport>::SendBuffer:
7257 ::fidl_next::encoder::InternalHandleEncoder,
7258 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7259 {
7260 self.remove_extended_attribute_with(
7261 crate::generic::NodeRemoveExtendedAttributeRequest { name },
7262 )
7263 }
7264
7265 #[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"]
7266 pub fn remove_extended_attribute_with<___R>(
7267 &self,
7268 request: ___R,
7269 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
7270 where
7271 ___R: ::fidl_next::Encode<
7272 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
7273 <___T as ::fidl_next::Transport>::SendBuffer,
7274 >,
7275 {
7276 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7277 8794297771444732717,
7278 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
7279 request,
7280 ))
7281 }
7282 }
7283
7284 #[repr(transparent)]
7286 pub struct NodeServer<___T: ::fidl_next::Transport> {
7287 server: ::fidl_next::protocol::Server<___T>,
7288 }
7289
7290 impl<___T> NodeServer<___T>
7291 where
7292 ___T: ::fidl_next::Transport,
7293 {
7294 #[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"]
7295 pub fn on_open(
7296 &self,
7297
7298 s: impl ::fidl_next::Encode<
7299 ::fidl_next::wire::fuchsia::Status,
7300 <___T as ::fidl_next::Transport>::SendBuffer,
7301 >,
7302
7303 info: impl ::fidl_next::Encode<
7304 crate::wire_optional::NodeInfoDeprecated<'static>,
7305 <___T as ::fidl_next::Transport>::SendBuffer,
7306 >,
7307 ) -> ::fidl_next::SendFuture<'_, ___T>
7308 where
7309 <___T as ::fidl_next::Transport>::SendBuffer:
7310 ::fidl_next::encoder::InternalHandleEncoder,
7311 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7312 <___T as ::fidl_next::Transport>::SendBuffer:
7313 ::fdomain_client::fidl_next::HandleEncoder,
7314 {
7315 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
7316 }
7317
7318 #[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"]
7319
7320 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
7321 where
7322 ___R: ::fidl_next::Encode<
7323 <super::OnOpen as ::fidl_next::Method>::Request,
7324 <___T as ::fidl_next::Transport>::SendBuffer,
7325 >,
7326 {
7327 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
7328 9207534335756671346,
7329 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
7330 request,
7331 ))
7332 }
7333
7334 #[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"]
7335
7336 pub fn on_representation_with<___R>(
7337 &self,
7338 request: ___R,
7339 ) -> ::fidl_next::SendFuture<'_, ___T>
7340 where
7341 ___R: ::fidl_next::Encode<
7342 <super::OnRepresentation as ::fidl_next::Method>::Request,
7343 <___T as ::fidl_next::Transport>::SendBuffer,
7344 >,
7345 {
7346 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
7347 6679970090861613324,
7348 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
7349 request,
7350 ))
7351 }
7352 }
7353 }
7354}
7355
7356#[diagnostic::on_unimplemented(
7357 note = "If {Self} implements the non-local NodeClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
7358)]
7359
7360pub trait NodeLocalClientHandler<
7364 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
7365 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7366>
7367{
7368 #[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"]
7369 fn on_open(
7370 &mut self,
7371
7372 request: ::fidl_next::Request<node::OnOpen, ___T>,
7373 ) -> impl ::core::future::Future<Output = ()>;
7374
7375 #[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"]
7376 fn on_representation(
7377 &mut self,
7378
7379 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
7380 ) -> impl ::core::future::Future<Output = ()>;
7381
7382 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7383 ::core::future::ready(())
7384 }
7385}
7386
7387impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Node
7388where
7389 ___H: NodeLocalClientHandler<___T>,
7390 ___T: ::fidl_next::Transport,
7391 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
7392 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7393 Constraint = (),
7394 >,
7395 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
7396 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7397 Constraint = (),
7398 >,
7399{
7400 async fn on_event(
7401 handler: &mut ___H,
7402 mut message: ::fidl_next::Message<___T>,
7403 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7404 match *message.header().ordinal {
7405 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7406 Ok(decoded) => {
7407 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
7408 Ok(())
7409 }
7410 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7411 ordinal: 9207534335756671346,
7412 error,
7413 }),
7414 },
7415
7416 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7417 Ok(decoded) => {
7418 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
7419 Ok(())
7420 }
7421 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7422 ordinal: 6679970090861613324,
7423 error,
7424 }),
7425 },
7426
7427 ordinal => {
7428 handler.on_unknown_interaction(ordinal).await;
7429 if ::core::matches!(
7430 message.header().flexibility(),
7431 ::fidl_next::protocol::Flexibility::Strict
7432 ) {
7433 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7434 } else {
7435 Ok(())
7436 }
7437 }
7438 }
7439 }
7440}
7441
7442#[diagnostic::on_unimplemented(
7443 note = "If {Self} implements the non-local NodeServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
7444)]
7445
7446pub trait NodeLocalServerHandler<
7450 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
7451 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7452>
7453{
7454 fn clone(
7455 &mut self,
7456
7457 request: ::fidl_next::Request<node::Clone, ___T>,
7458 ) -> impl ::core::future::Future<Output = ()>;
7459
7460 #[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"]
7461 fn close(
7462 &mut self,
7463
7464 responder: ::fidl_next::Responder<node::Close, ___T>,
7465 ) -> impl ::core::future::Future<Output = ()>;
7466
7467 fn query(
7468 &mut self,
7469
7470 responder: ::fidl_next::Responder<node::Query, ___T>,
7471 ) -> impl ::core::future::Future<Output = ()>;
7472
7473 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
7474 fn deprecated_clone(
7475 &mut self,
7476
7477 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
7478 ) -> impl ::core::future::Future<Output = ()>;
7479
7480 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
7481 fn deprecated_get_attr(
7482 &mut self,
7483
7484 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
7485 ) -> impl ::core::future::Future<Output = ()>;
7486
7487 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
7488 fn deprecated_set_attr(
7489 &mut self,
7490
7491 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
7492
7493 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
7494 ) -> impl ::core::future::Future<Output = ()>;
7495
7496 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
7497 fn deprecated_get_flags(
7498 &mut self,
7499
7500 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
7501 ) -> impl ::core::future::Future<Output = ()>;
7502
7503 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
7504 fn deprecated_set_flags(
7505 &mut self,
7506
7507 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
7508
7509 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
7510 ) -> impl ::core::future::Future<Output = ()>;
7511
7512 #[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"]
7513 fn get_flags(
7514 &mut self,
7515
7516 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
7517 ) -> impl ::core::future::Future<Output = ()>;
7518
7519 #[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"]
7520 fn set_flags(
7521 &mut self,
7522
7523 request: ::fidl_next::Request<node::SetFlags, ___T>,
7524
7525 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
7526 ) -> impl ::core::future::Future<Output = ()>;
7527
7528 #[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"]
7529 fn query_filesystem(
7530 &mut self,
7531
7532 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
7533 ) -> impl ::core::future::Future<Output = ()>;
7534
7535 #[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"]
7536 fn get_attributes(
7537 &mut self,
7538
7539 request: ::fidl_next::Request<node::GetAttributes, ___T>,
7540
7541 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
7542 ) -> impl ::core::future::Future<Output = ()>;
7543
7544 #[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"]
7545 fn update_attributes(
7546 &mut self,
7547
7548 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
7549
7550 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
7551 ) -> impl ::core::future::Future<Output = ()>;
7552
7553 #[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"]
7554 fn sync(
7555 &mut self,
7556
7557 responder: ::fidl_next::Responder<node::Sync, ___T>,
7558 ) -> impl ::core::future::Future<Output = ()>;
7559
7560 #[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"]
7561 fn list_extended_attributes(
7562 &mut self,
7563
7564 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
7565 ) -> impl ::core::future::Future<Output = ()>;
7566
7567 #[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"]
7568 fn get_extended_attribute(
7569 &mut self,
7570
7571 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
7572
7573 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
7574 ) -> impl ::core::future::Future<Output = ()>;
7575
7576 #[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"]
7577 fn set_extended_attribute(
7578 &mut self,
7579
7580 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
7581
7582 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
7583 ) -> impl ::core::future::Future<Output = ()>;
7584
7585 #[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"]
7586 fn remove_extended_attribute(
7587 &mut self,
7588
7589 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
7590
7591 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
7592 ) -> impl ::core::future::Future<Output = ()>;
7593
7594 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7595 ::core::future::ready(())
7596 }
7597}
7598
7599impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Node
7600where
7601 ___H: NodeLocalServerHandler<___T>,
7602 ___T: ::fidl_next::Transport,
7603 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
7604 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7605 Constraint = (),
7606 >,
7607 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
7608 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7609 Constraint = (),
7610 >,
7611 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
7612 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7613 Constraint = (),
7614 >,
7615 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
7616 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7617 Constraint = (),
7618 >,
7619 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
7620 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7621 Constraint = (),
7622 >,
7623 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
7624 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7625 Constraint = (),
7626 >,
7627 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
7628 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7629 Constraint = (),
7630 >,
7631 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
7632 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7633 Constraint = (),
7634 >,
7635 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7636 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7637 Constraint = (),
7638 >,
7639 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7640 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7641 Constraint = (),
7642 >,
7643 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
7644 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7645 Constraint = (),
7646 >,
7647{
7648 async fn on_one_way(
7649 handler: &mut ___H,
7650 mut message: ::fidl_next::Message<___T>,
7651 ) -> ::core::result::Result<
7652 (),
7653 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7654 > {
7655 match *message.header().ordinal {
7656 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7657 Ok(decoded) => {
7658 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
7659 Ok(())
7660 }
7661 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7662 ordinal: 2366825959783828089,
7663 error,
7664 }),
7665 },
7666
7667 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7668 Ok(decoded) => {
7669 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
7670 Ok(())
7671 }
7672 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7673 ordinal: 6512600400724287855,
7674 error,
7675 }),
7676 },
7677
7678 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7679 Ok(decoded) => {
7680 handler
7681 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
7682 .await;
7683 Ok(())
7684 }
7685 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7686 ordinal: 5431626189872037072,
7687 error,
7688 }),
7689 },
7690
7691 ordinal => {
7692 handler.on_unknown_interaction(ordinal).await;
7693 if ::core::matches!(
7694 message.header().flexibility(),
7695 ::fidl_next::protocol::Flexibility::Strict
7696 ) {
7697 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7698 } else {
7699 Ok(())
7700 }
7701 }
7702 }
7703 }
7704
7705 async fn on_two_way(
7706 handler: &mut ___H,
7707 mut message: ::fidl_next::Message<___T>,
7708 responder: ::fidl_next::protocol::Responder<___T>,
7709 ) -> ::core::result::Result<
7710 (),
7711 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7712 > {
7713 match *message.header().ordinal {
7714 6540867515453498750 => {
7715 let responder = ::fidl_next::Responder::from_untyped(responder);
7716
7717 handler.close(responder).await;
7718 Ok(())
7719 }
7720
7721 2763219980499352582 => {
7722 let responder = ::fidl_next::Responder::from_untyped(responder);
7723
7724 handler.query(responder).await;
7725 Ok(())
7726 }
7727
7728 8689798978500614909 => {
7729 let responder = ::fidl_next::Responder::from_untyped(responder);
7730
7731 handler.deprecated_get_attr(responder).await;
7732 Ok(())
7733 }
7734
7735 4721673413776871238 => {
7736 let responder = ::fidl_next::Responder::from_untyped(responder);
7737
7738 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7739 Ok(decoded) => {
7740 handler
7741 .deprecated_set_attr(
7742 ::fidl_next::Request::from_decoded(decoded),
7743 responder,
7744 )
7745 .await;
7746 Ok(())
7747 }
7748 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7749 ordinal: 4721673413776871238,
7750 error,
7751 }),
7752 }
7753 }
7754
7755 6595803110182632097 => {
7756 let responder = ::fidl_next::Responder::from_untyped(responder);
7757
7758 handler.deprecated_get_flags(responder).await;
7759 Ok(())
7760 }
7761
7762 5950864159036794675 => {
7763 let responder = ::fidl_next::Responder::from_untyped(responder);
7764
7765 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7766 Ok(decoded) => {
7767 handler
7768 .deprecated_set_flags(
7769 ::fidl_next::Request::from_decoded(decoded),
7770 responder,
7771 )
7772 .await;
7773 Ok(())
7774 }
7775 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7776 ordinal: 5950864159036794675,
7777 error,
7778 }),
7779 }
7780 }
7781
7782 105530239381466147 => {
7783 let responder = ::fidl_next::Responder::from_untyped(responder);
7784
7785 handler.get_flags(responder).await;
7786 Ok(())
7787 }
7788
7789 6172186066099445416 => {
7790 let responder = ::fidl_next::Responder::from_untyped(responder);
7791
7792 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7793 Ok(decoded) => {
7794 handler
7795 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
7796 .await;
7797 Ok(())
7798 }
7799 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7800 ordinal: 6172186066099445416,
7801 error,
7802 }),
7803 }
7804 }
7805
7806 8013111122914313744 => {
7807 let responder = ::fidl_next::Responder::from_untyped(responder);
7808
7809 handler.query_filesystem(responder).await;
7810 Ok(())
7811 }
7812
7813 4414537700416816443 => {
7814 let responder = ::fidl_next::Responder::from_untyped(responder);
7815
7816 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7817 Ok(decoded) => {
7818 handler
7819 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
7820 .await;
7821 Ok(())
7822 }
7823 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7824 ordinal: 4414537700416816443,
7825 error,
7826 }),
7827 }
7828 }
7829
7830 3677402239314018056 => {
7831 let responder = ::fidl_next::Responder::from_untyped(responder);
7832
7833 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7834 Ok(decoded) => {
7835 handler
7836 .update_attributes(
7837 ::fidl_next::Request::from_decoded(decoded),
7838 responder,
7839 )
7840 .await;
7841 Ok(())
7842 }
7843 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7844 ordinal: 3677402239314018056,
7845 error,
7846 }),
7847 }
7848 }
7849
7850 3196473584242777161 => {
7851 let responder = ::fidl_next::Responder::from_untyped(responder);
7852
7853 handler.sync(responder).await;
7854 Ok(())
7855 }
7856
7857 5043930208506967771 => {
7858 let responder = ::fidl_next::Responder::from_untyped(responder);
7859
7860 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7861 Ok(decoded) => {
7862 handler
7863 .get_extended_attribute(
7864 ::fidl_next::Request::from_decoded(decoded),
7865 responder,
7866 )
7867 .await;
7868 Ok(())
7869 }
7870 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7871 ordinal: 5043930208506967771,
7872 error,
7873 }),
7874 }
7875 }
7876
7877 5374223046099989052 => {
7878 let responder = ::fidl_next::Responder::from_untyped(responder);
7879
7880 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7881 Ok(decoded) => {
7882 handler
7883 .set_extended_attribute(
7884 ::fidl_next::Request::from_decoded(decoded),
7885 responder,
7886 )
7887 .await;
7888 Ok(())
7889 }
7890 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7891 ordinal: 5374223046099989052,
7892 error,
7893 }),
7894 }
7895 }
7896
7897 8794297771444732717 => {
7898 let responder = ::fidl_next::Responder::from_untyped(responder);
7899
7900 match ::fidl_next::AsDecoderExt::into_decoded(message) {
7901 Ok(decoded) => {
7902 handler
7903 .remove_extended_attribute(
7904 ::fidl_next::Request::from_decoded(decoded),
7905 responder,
7906 )
7907 .await;
7908 Ok(())
7909 }
7910 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7911 ordinal: 8794297771444732717,
7912 error,
7913 }),
7914 }
7915 }
7916
7917 ordinal => {
7918 handler.on_unknown_interaction(ordinal).await;
7919 if ::core::matches!(
7920 message.header().flexibility(),
7921 ::fidl_next::protocol::Flexibility::Strict
7922 ) {
7923 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7924 } else {
7925 responder
7926 .respond_framework_error(
7927 ordinal,
7928 ::fidl_next::FrameworkError::UnknownMethod,
7929 )
7930 .expect("encoding a framework error should never fail")
7931 .await?;
7932 Ok(())
7933 }
7934 }
7935 }
7936 }
7937}
7938
7939pub trait NodeClientHandler<
7943 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
7944 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7945>
7946{
7947 #[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"]
7948 fn on_open(
7949 &mut self,
7950
7951 request: ::fidl_next::Request<node::OnOpen, ___T>,
7952 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7953
7954 #[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"]
7955 fn on_representation(
7956 &mut self,
7957
7958 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
7959 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7960
7961 fn on_unknown_interaction(
7962 &mut self,
7963 ordinal: u64,
7964 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7965 ::core::future::ready(())
7966 }
7967}
7968
7969impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
7970where
7971 ___H: NodeClientHandler<___T> + ::core::marker::Send,
7972 ___T: ::fidl_next::Transport,
7973 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
7974 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7975 Constraint = (),
7976 >,
7977 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
7978 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7979 Constraint = (),
7980 >,
7981{
7982 async fn on_event(
7983 handler: &mut ___H,
7984 mut message: ::fidl_next::Message<___T>,
7985 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7986 match *message.header().ordinal {
7987 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7988 Ok(decoded) => {
7989 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
7990 Ok(())
7991 }
7992 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7993 ordinal: 9207534335756671346,
7994 error,
7995 }),
7996 },
7997
7998 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
7999 Ok(decoded) => {
8000 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
8001 Ok(())
8002 }
8003 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8004 ordinal: 6679970090861613324,
8005 error,
8006 }),
8007 },
8008
8009 ordinal => {
8010 handler.on_unknown_interaction(ordinal).await;
8011 if ::core::matches!(
8012 message.header().flexibility(),
8013 ::fidl_next::protocol::Flexibility::Strict
8014 ) {
8015 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8016 } else {
8017 Ok(())
8018 }
8019 }
8020 }
8021 }
8022}
8023
8024pub trait NodeServerHandler<
8028 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
8029 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8030>
8031{
8032 fn clone(
8033 &mut self,
8034
8035 request: ::fidl_next::Request<node::Clone, ___T>,
8036 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8037
8038 #[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"]
8039 fn close(
8040 &mut self,
8041
8042 responder: ::fidl_next::Responder<node::Close, ___T>,
8043 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8044
8045 fn query(
8046 &mut self,
8047
8048 responder: ::fidl_next::Responder<node::Query, ___T>,
8049 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8050
8051 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
8052 fn deprecated_clone(
8053 &mut self,
8054
8055 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
8056 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8057
8058 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
8059 fn deprecated_get_attr(
8060 &mut self,
8061
8062 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
8063 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8064
8065 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
8066 fn deprecated_set_attr(
8067 &mut self,
8068
8069 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
8070
8071 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
8072 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8073
8074 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
8075 fn deprecated_get_flags(
8076 &mut self,
8077
8078 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
8079 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8080
8081 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
8082 fn deprecated_set_flags(
8083 &mut self,
8084
8085 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
8086
8087 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
8088 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8089
8090 #[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"]
8091 fn get_flags(
8092 &mut self,
8093
8094 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
8095 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8096
8097 #[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"]
8098 fn set_flags(
8099 &mut self,
8100
8101 request: ::fidl_next::Request<node::SetFlags, ___T>,
8102
8103 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
8104 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8105
8106 #[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"]
8107 fn query_filesystem(
8108 &mut self,
8109
8110 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
8111 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8112
8113 #[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"]
8114 fn get_attributes(
8115 &mut self,
8116
8117 request: ::fidl_next::Request<node::GetAttributes, ___T>,
8118
8119 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
8120 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8121
8122 #[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"]
8123 fn update_attributes(
8124 &mut self,
8125
8126 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
8127
8128 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
8129 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8130
8131 #[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"]
8132 fn sync(
8133 &mut self,
8134
8135 responder: ::fidl_next::Responder<node::Sync, ___T>,
8136 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8137
8138 #[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"]
8139 fn list_extended_attributes(
8140 &mut self,
8141
8142 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
8143 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8144
8145 #[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"]
8146 fn get_extended_attribute(
8147 &mut self,
8148
8149 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
8150
8151 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
8152 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8153
8154 #[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"]
8155 fn set_extended_attribute(
8156 &mut self,
8157
8158 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
8159
8160 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
8161 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8162
8163 #[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"]
8164 fn remove_extended_attribute(
8165 &mut self,
8166
8167 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
8168
8169 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
8170 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8171
8172 fn on_unknown_interaction(
8173 &mut self,
8174 ordinal: u64,
8175 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
8176 ::core::future::ready(())
8177 }
8178}
8179
8180impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
8181where
8182 ___H: NodeServerHandler<___T> + ::core::marker::Send,
8183 ___T: ::fidl_next::Transport,
8184 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
8185 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8186 Constraint = (),
8187 >,
8188 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
8189 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8190 Constraint = (),
8191 >,
8192 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
8193 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8194 Constraint = (),
8195 >,
8196 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
8197 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8198 Constraint = (),
8199 >,
8200 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
8201 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8202 Constraint = (),
8203 >,
8204 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
8205 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8206 Constraint = (),
8207 >,
8208 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
8209 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8210 Constraint = (),
8211 >,
8212 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
8213 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8214 Constraint = (),
8215 >,
8216 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8217 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8218 Constraint = (),
8219 >,
8220 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8221 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8222 Constraint = (),
8223 >,
8224 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8225 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8226 Constraint = (),
8227 >,
8228{
8229 async fn on_one_way(
8230 handler: &mut ___H,
8231 mut message: ::fidl_next::Message<___T>,
8232 ) -> ::core::result::Result<
8233 (),
8234 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8235 > {
8236 match *message.header().ordinal {
8237 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8238 Ok(decoded) => {
8239 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
8240 Ok(())
8241 }
8242 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8243 ordinal: 2366825959783828089,
8244 error,
8245 }),
8246 },
8247
8248 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8249 Ok(decoded) => {
8250 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
8251 Ok(())
8252 }
8253 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8254 ordinal: 6512600400724287855,
8255 error,
8256 }),
8257 },
8258
8259 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8260 Ok(decoded) => {
8261 handler
8262 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
8263 .await;
8264 Ok(())
8265 }
8266 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8267 ordinal: 5431626189872037072,
8268 error,
8269 }),
8270 },
8271
8272 ordinal => {
8273 handler.on_unknown_interaction(ordinal).await;
8274 if ::core::matches!(
8275 message.header().flexibility(),
8276 ::fidl_next::protocol::Flexibility::Strict
8277 ) {
8278 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8279 } else {
8280 Ok(())
8281 }
8282 }
8283 }
8284 }
8285
8286 async fn on_two_way(
8287 handler: &mut ___H,
8288 mut message: ::fidl_next::Message<___T>,
8289 responder: ::fidl_next::protocol::Responder<___T>,
8290 ) -> ::core::result::Result<
8291 (),
8292 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8293 > {
8294 match *message.header().ordinal {
8295 6540867515453498750 => {
8296 let responder = ::fidl_next::Responder::from_untyped(responder);
8297
8298 handler.close(responder).await;
8299 Ok(())
8300 }
8301
8302 2763219980499352582 => {
8303 let responder = ::fidl_next::Responder::from_untyped(responder);
8304
8305 handler.query(responder).await;
8306 Ok(())
8307 }
8308
8309 8689798978500614909 => {
8310 let responder = ::fidl_next::Responder::from_untyped(responder);
8311
8312 handler.deprecated_get_attr(responder).await;
8313 Ok(())
8314 }
8315
8316 4721673413776871238 => {
8317 let responder = ::fidl_next::Responder::from_untyped(responder);
8318
8319 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8320 Ok(decoded) => {
8321 handler
8322 .deprecated_set_attr(
8323 ::fidl_next::Request::from_decoded(decoded),
8324 responder,
8325 )
8326 .await;
8327 Ok(())
8328 }
8329 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8330 ordinal: 4721673413776871238,
8331 error,
8332 }),
8333 }
8334 }
8335
8336 6595803110182632097 => {
8337 let responder = ::fidl_next::Responder::from_untyped(responder);
8338
8339 handler.deprecated_get_flags(responder).await;
8340 Ok(())
8341 }
8342
8343 5950864159036794675 => {
8344 let responder = ::fidl_next::Responder::from_untyped(responder);
8345
8346 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8347 Ok(decoded) => {
8348 handler
8349 .deprecated_set_flags(
8350 ::fidl_next::Request::from_decoded(decoded),
8351 responder,
8352 )
8353 .await;
8354 Ok(())
8355 }
8356 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8357 ordinal: 5950864159036794675,
8358 error,
8359 }),
8360 }
8361 }
8362
8363 105530239381466147 => {
8364 let responder = ::fidl_next::Responder::from_untyped(responder);
8365
8366 handler.get_flags(responder).await;
8367 Ok(())
8368 }
8369
8370 6172186066099445416 => {
8371 let responder = ::fidl_next::Responder::from_untyped(responder);
8372
8373 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8374 Ok(decoded) => {
8375 handler
8376 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
8377 .await;
8378 Ok(())
8379 }
8380 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8381 ordinal: 6172186066099445416,
8382 error,
8383 }),
8384 }
8385 }
8386
8387 8013111122914313744 => {
8388 let responder = ::fidl_next::Responder::from_untyped(responder);
8389
8390 handler.query_filesystem(responder).await;
8391 Ok(())
8392 }
8393
8394 4414537700416816443 => {
8395 let responder = ::fidl_next::Responder::from_untyped(responder);
8396
8397 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8398 Ok(decoded) => {
8399 handler
8400 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
8401 .await;
8402 Ok(())
8403 }
8404 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8405 ordinal: 4414537700416816443,
8406 error,
8407 }),
8408 }
8409 }
8410
8411 3677402239314018056 => {
8412 let responder = ::fidl_next::Responder::from_untyped(responder);
8413
8414 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8415 Ok(decoded) => {
8416 handler
8417 .update_attributes(
8418 ::fidl_next::Request::from_decoded(decoded),
8419 responder,
8420 )
8421 .await;
8422 Ok(())
8423 }
8424 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8425 ordinal: 3677402239314018056,
8426 error,
8427 }),
8428 }
8429 }
8430
8431 3196473584242777161 => {
8432 let responder = ::fidl_next::Responder::from_untyped(responder);
8433
8434 handler.sync(responder).await;
8435 Ok(())
8436 }
8437
8438 5043930208506967771 => {
8439 let responder = ::fidl_next::Responder::from_untyped(responder);
8440
8441 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8442 Ok(decoded) => {
8443 handler
8444 .get_extended_attribute(
8445 ::fidl_next::Request::from_decoded(decoded),
8446 responder,
8447 )
8448 .await;
8449 Ok(())
8450 }
8451 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8452 ordinal: 5043930208506967771,
8453 error,
8454 }),
8455 }
8456 }
8457
8458 5374223046099989052 => {
8459 let responder = ::fidl_next::Responder::from_untyped(responder);
8460
8461 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8462 Ok(decoded) => {
8463 handler
8464 .set_extended_attribute(
8465 ::fidl_next::Request::from_decoded(decoded),
8466 responder,
8467 )
8468 .await;
8469 Ok(())
8470 }
8471 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8472 ordinal: 5374223046099989052,
8473 error,
8474 }),
8475 }
8476 }
8477
8478 8794297771444732717 => {
8479 let responder = ::fidl_next::Responder::from_untyped(responder);
8480
8481 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8482 Ok(decoded) => {
8483 handler
8484 .remove_extended_attribute(
8485 ::fidl_next::Request::from_decoded(decoded),
8486 responder,
8487 )
8488 .await;
8489 Ok(())
8490 }
8491 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8492 ordinal: 8794297771444732717,
8493 error,
8494 }),
8495 }
8496 }
8497
8498 ordinal => {
8499 handler.on_unknown_interaction(ordinal).await;
8500 if ::core::matches!(
8501 message.header().flexibility(),
8502 ::fidl_next::protocol::Flexibility::Strict
8503 ) {
8504 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8505 } else {
8506 responder
8507 .respond_framework_error(
8508 ordinal,
8509 ::fidl_next::FrameworkError::UnknownMethod,
8510 )
8511 .expect("encoding a framework error should never fail")
8512 .await?;
8513 Ok(())
8514 }
8515 }
8516 }
8517 }
8518}
8519
8520impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
8521where
8522 ___T: ::fidl_next::Transport,
8523{
8524 async fn on_open(&mut self, _: ::fidl_next::Request<node::OnOpen, ___T>) {}
8525
8526 async fn on_representation(&mut self, _: ::fidl_next::Request<node::OnRepresentation, ___T>) {}
8527
8528 async fn on_unknown_interaction(&mut self, _: u64) {}
8529}
8530
8531impl<___H, ___T> NodeLocalClientHandler<___T> for ::fidl_next::Local<___H>
8532where
8533 ___H: NodeClientHandler<___T>,
8534 ___T: ::fidl_next::Transport,
8535{
8536 async fn on_open(&mut self, request: ::fidl_next::Request<node::OnOpen, ___T>) {
8537 ___H::on_open(&mut self.0, request).await
8538 }
8539
8540 async fn on_representation(
8541 &mut self,
8542
8543 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
8544 ) {
8545 ___H::on_representation(&mut self.0, request).await
8546 }
8547
8548 async fn on_unknown_interaction(&mut self, ordinal: u64) {
8549 ___H::on_unknown_interaction(&mut self.0, ordinal).await
8550 }
8551}
8552
8553impl<___H, ___T> NodeLocalServerHandler<___T> for ::fidl_next::Local<___H>
8554where
8555 ___H: NodeServerHandler<___T>,
8556 ___T: ::fidl_next::Transport,
8557{
8558 async fn clone(&mut self, request: ::fidl_next::Request<node::Clone, ___T>) {
8559 ___H::clone(&mut self.0, request).await
8560 }
8561
8562 async fn close(&mut self, responder: ::fidl_next::Responder<node::Close, ___T>) {
8563 ___H::close(&mut self.0, responder).await
8564 }
8565
8566 async fn query(&mut self, responder: ::fidl_next::Responder<node::Query, ___T>) {
8567 ___H::query(&mut self.0, responder).await
8568 }
8569
8570 async fn deprecated_clone(
8571 &mut self,
8572
8573 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
8574 ) {
8575 ___H::deprecated_clone(&mut self.0, request).await
8576 }
8577
8578 async fn deprecated_get_attr(
8579 &mut self,
8580
8581 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
8582 ) {
8583 ___H::deprecated_get_attr(&mut self.0, responder).await
8584 }
8585
8586 async fn deprecated_set_attr(
8587 &mut self,
8588
8589 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
8590
8591 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
8592 ) {
8593 ___H::deprecated_set_attr(&mut self.0, request, responder).await
8594 }
8595
8596 async fn deprecated_get_flags(
8597 &mut self,
8598
8599 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
8600 ) {
8601 ___H::deprecated_get_flags(&mut self.0, responder).await
8602 }
8603
8604 async fn deprecated_set_flags(
8605 &mut self,
8606
8607 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
8608
8609 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
8610 ) {
8611 ___H::deprecated_set_flags(&mut self.0, request, responder).await
8612 }
8613
8614 async fn get_flags(&mut self, responder: ::fidl_next::Responder<node::GetFlags, ___T>) {
8615 ___H::get_flags(&mut self.0, responder).await
8616 }
8617
8618 async fn set_flags(
8619 &mut self,
8620
8621 request: ::fidl_next::Request<node::SetFlags, ___T>,
8622
8623 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
8624 ) {
8625 ___H::set_flags(&mut self.0, request, responder).await
8626 }
8627
8628 async fn query_filesystem(
8629 &mut self,
8630
8631 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
8632 ) {
8633 ___H::query_filesystem(&mut self.0, responder).await
8634 }
8635
8636 async fn get_attributes(
8637 &mut self,
8638
8639 request: ::fidl_next::Request<node::GetAttributes, ___T>,
8640
8641 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
8642 ) {
8643 ___H::get_attributes(&mut self.0, request, responder).await
8644 }
8645
8646 async fn update_attributes(
8647 &mut self,
8648
8649 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
8650
8651 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
8652 ) {
8653 ___H::update_attributes(&mut self.0, request, responder).await
8654 }
8655
8656 async fn sync(&mut self, responder: ::fidl_next::Responder<node::Sync, ___T>) {
8657 ___H::sync(&mut self.0, responder).await
8658 }
8659
8660 async fn list_extended_attributes(
8661 &mut self,
8662
8663 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
8664 ) {
8665 ___H::list_extended_attributes(&mut self.0, request).await
8666 }
8667
8668 async fn get_extended_attribute(
8669 &mut self,
8670
8671 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
8672
8673 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
8674 ) {
8675 ___H::get_extended_attribute(&mut self.0, request, responder).await
8676 }
8677
8678 async fn set_extended_attribute(
8679 &mut self,
8680
8681 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
8682
8683 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
8684 ) {
8685 ___H::set_extended_attribute(&mut self.0, request, responder).await
8686 }
8687
8688 async fn remove_extended_attribute(
8689 &mut self,
8690
8691 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
8692
8693 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
8694 ) {
8695 ___H::remove_extended_attribute(&mut self.0, request, responder).await
8696 }
8697
8698 async fn on_unknown_interaction(&mut self, ordinal: u64) {
8699 ___H::on_unknown_interaction(&mut self.0, ordinal).await
8700 }
8701}
8702
8703#[doc = " Directory defines a node which is capable of containing other Objects.\n"]
8705#[derive(PartialEq, Debug)]
8706pub struct Directory;
8707
8708impl ::fidl_next::Discoverable for Directory {
8709 const PROTOCOL_NAME: &'static str = "fuchsia.io.Directory";
8710}
8711
8712#[cfg(target_os = "fuchsia")]
8713impl ::fidl_next::HasTransport for Directory {
8714 type Transport = ::fdomain_client::Channel;
8715}
8716
8717pub mod directory {
8718 pub mod prelude {
8719 pub use crate::{
8720 Directory, DirectoryClientHandler, DirectoryLocalClientHandler,
8721 DirectoryLocalServerHandler, DirectoryServerHandler, directory,
8722 };
8723
8724 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
8725
8726 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
8727
8728 pub use crate::natural::DirectoryCreateSymlinkRequest;
8729
8730 pub use crate::natural::DirectoryDeprecatedOpenRequest;
8731
8732 pub use crate::natural::DirectoryGetTokenResponse;
8733
8734 pub use crate::natural::DirectoryLinkRequest;
8735
8736 pub use crate::natural::DirectoryLinkResponse;
8737
8738 pub use crate::natural::DirectoryReadDirentsRequest;
8739
8740 pub use crate::natural::DirectoryReadDirentsResponse;
8741
8742 pub use crate::natural::DirectoryRenameRequest;
8743
8744 pub use crate::natural::DirectoryRewindResponse;
8745
8746 pub use crate::natural::DirectoryUnlinkRequest;
8747
8748 pub use crate::natural::DirectoryWatchRequest;
8749
8750 pub use crate::natural::DirectoryWatchResponse;
8751
8752 pub use crate::natural::DirectoryCreateSymlinkResponse;
8753
8754 pub use crate::natural::DirectoryRenameResponse;
8755
8756 pub use crate::natural::DirectoryUnlinkResponse;
8757
8758 pub use crate::natural::ExtendedAttributeValue;
8759
8760 pub use crate::natural::MutableNodeAttributes;
8761
8762 pub use crate::natural::NodeAttributes2;
8763
8764 pub use crate::natural::NodeDeprecatedCloneRequest;
8765
8766 pub use crate::natural::NodeDeprecatedGetAttrResponse;
8767
8768 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
8769
8770 pub use crate::natural::NodeDeprecatedSetAttrRequest;
8771
8772 pub use crate::natural::NodeDeprecatedSetAttrResponse;
8773
8774 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
8775
8776 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
8777
8778 pub use crate::natural::NodeGetAttributesRequest;
8779
8780 pub use crate::natural::NodeGetExtendedAttributeRequest;
8781
8782 pub use crate::natural::NodeListExtendedAttributesRequest;
8783
8784 pub use crate::natural::NodeOnOpenRequest;
8785
8786 pub use crate::natural::NodeQueryFilesystemResponse;
8787
8788 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
8789
8790 pub use crate::natural::NodeSetExtendedAttributeRequest;
8791
8792 pub use crate::natural::NodeSetFlagsRequest;
8793
8794 pub use crate::natural::NodeGetFlagsResponse;
8795
8796 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
8797
8798 pub use crate::natural::NodeSetExtendedAttributeResponse;
8799
8800 pub use crate::natural::NodeSetFlagsResponse;
8801
8802 pub use crate::natural::NodeSyncResponse;
8803
8804 pub use crate::natural::NodeUpdateAttributesResponse;
8805
8806 pub use crate::natural::OpenableOpenRequest;
8807
8808 pub use crate::natural::Representation;
8809
8810 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
8811
8812 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
8813
8814 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
8815 }
8816
8817 pub struct AdvisoryLock;
8818
8819 impl ::fidl_next::Method for AdvisoryLock {
8820 const ORDINAL: u64 = 7992130864415541162;
8821 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8822 ::fidl_next::protocol::Flexibility::Strict;
8823
8824 type Protocol = crate::Directory;
8825
8826 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
8827 }
8828
8829 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
8830 type Response = ::fidl_next::wire::Result<
8831 'static,
8832 crate::wire::AdvisoryLockingAdvisoryLockResponse,
8833 ::fidl_next::wire::fuchsia::Status,
8834 >;
8835 }
8836
8837 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
8838 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
8839
8840 fn respond(response: ___R) -> Self::Output {
8841 ::core::result::Result::Ok(response)
8842 }
8843 }
8844
8845 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
8846 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
8847
8848 fn respond_err(response: ___R) -> Self::Output {
8849 ::core::result::Result::Err(response)
8850 }
8851 }
8852
8853 pub struct Clone;
8854
8855 impl ::fidl_next::Method for Clone {
8856 const ORDINAL: u64 = 2366825959783828089;
8857 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8858 ::fidl_next::protocol::Flexibility::Strict;
8859
8860 type Protocol = crate::Directory;
8861
8862 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
8863 }
8864
8865 pub struct Close;
8866
8867 impl ::fidl_next::Method for Close {
8868 const ORDINAL: u64 = 6540867515453498750;
8869 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8870 ::fidl_next::protocol::Flexibility::Strict;
8871
8872 type Protocol = crate::Directory;
8873
8874 type Request = ::fidl_next::wire::EmptyMessageBody;
8875 }
8876
8877 impl ::fidl_next::TwoWayMethod for Close {
8878 type Response = ::fidl_next::wire::Result<
8879 'static,
8880 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
8881 ::fidl_next::wire::Int32,
8882 >;
8883 }
8884
8885 impl<___R> ::fidl_next::Respond<___R> for Close {
8886 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
8887
8888 fn respond(response: ___R) -> Self::Output {
8889 ::core::result::Result::Ok(response)
8890 }
8891 }
8892
8893 impl<___R> ::fidl_next::RespondErr<___R> for Close {
8894 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
8895
8896 fn respond_err(response: ___R) -> Self::Output {
8897 ::core::result::Result::Err(response)
8898 }
8899 }
8900
8901 pub struct Query;
8902
8903 impl ::fidl_next::Method for Query {
8904 const ORDINAL: u64 = 2763219980499352582;
8905 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8906 ::fidl_next::protocol::Flexibility::Strict;
8907
8908 type Protocol = crate::Directory;
8909
8910 type Request = ::fidl_next::wire::EmptyMessageBody;
8911 }
8912
8913 impl ::fidl_next::TwoWayMethod for Query {
8914 type Response = ::fidl_next::wire::Strict<
8915 ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
8916 >;
8917 }
8918
8919 impl<___R> ::fidl_next::Respond<___R> for Query {
8920 type Output = ::fidl_next::Strict<
8921 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>,
8922 >;
8923
8924 fn respond(response: ___R) -> Self::Output {
8925 ::fidl_next::Strict(::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse {
8926 protocol: response,
8927 })
8928 }
8929 }
8930
8931 pub struct DeprecatedClone;
8932
8933 impl ::fidl_next::Method for DeprecatedClone {
8934 const ORDINAL: u64 = 6512600400724287855;
8935 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8936 ::fidl_next::protocol::Flexibility::Flexible;
8937
8938 type Protocol = crate::Directory;
8939
8940 type Request = crate::wire::NodeDeprecatedCloneRequest;
8941 }
8942
8943 pub struct OnOpen;
8944
8945 impl ::fidl_next::Method for OnOpen {
8946 const ORDINAL: u64 = 9207534335756671346;
8947 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8948 ::fidl_next::protocol::Flexibility::Flexible;
8949
8950 type Protocol = crate::Directory;
8951
8952 type Request = crate::wire::NodeOnOpenRequest<'static>;
8953 }
8954
8955 pub struct DeprecatedGetAttr;
8956
8957 impl ::fidl_next::Method for DeprecatedGetAttr {
8958 const ORDINAL: u64 = 8689798978500614909;
8959 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8960 ::fidl_next::protocol::Flexibility::Strict;
8961
8962 type Protocol = crate::Directory;
8963
8964 type Request = ::fidl_next::wire::EmptyMessageBody;
8965 }
8966
8967 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
8968 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
8969 }
8970
8971 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
8972 type Output = ::fidl_next::Strict<___R>;
8973
8974 fn respond(response: ___R) -> Self::Output {
8975 ::fidl_next::Strict(response)
8976 }
8977 }
8978
8979 pub struct DeprecatedSetAttr;
8980
8981 impl ::fidl_next::Method for DeprecatedSetAttr {
8982 const ORDINAL: u64 = 4721673413776871238;
8983 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
8984 ::fidl_next::protocol::Flexibility::Strict;
8985
8986 type Protocol = crate::Directory;
8987
8988 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
8989 }
8990
8991 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
8992 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
8993 }
8994
8995 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
8996 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
8997
8998 fn respond(response: ___R) -> Self::Output {
8999 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
9000 }
9001 }
9002
9003 pub struct DeprecatedGetFlags;
9004
9005 impl ::fidl_next::Method for DeprecatedGetFlags {
9006 const ORDINAL: u64 = 6595803110182632097;
9007 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9008 ::fidl_next::protocol::Flexibility::Strict;
9009
9010 type Protocol = crate::Directory;
9011
9012 type Request = ::fidl_next::wire::EmptyMessageBody;
9013 }
9014
9015 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
9016 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
9017 }
9018
9019 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
9020 type Output = ::fidl_next::Strict<___R>;
9021
9022 fn respond(response: ___R) -> Self::Output {
9023 ::fidl_next::Strict(response)
9024 }
9025 }
9026
9027 pub struct DeprecatedSetFlags;
9028
9029 impl ::fidl_next::Method for DeprecatedSetFlags {
9030 const ORDINAL: u64 = 5950864159036794675;
9031 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9032 ::fidl_next::protocol::Flexibility::Strict;
9033
9034 type Protocol = crate::Directory;
9035
9036 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
9037 }
9038
9039 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
9040 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
9041 }
9042
9043 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
9044 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
9045
9046 fn respond(response: ___R) -> Self::Output {
9047 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
9048 }
9049 }
9050
9051 pub struct GetFlags;
9052
9053 impl ::fidl_next::Method for GetFlags {
9054 const ORDINAL: u64 = 105530239381466147;
9055 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9056 ::fidl_next::protocol::Flexibility::Flexible;
9057
9058 type Protocol = crate::Directory;
9059
9060 type Request = ::fidl_next::wire::EmptyMessageBody;
9061 }
9062
9063 impl ::fidl_next::TwoWayMethod for GetFlags {
9064 type Response = ::fidl_next::wire::Result<
9065 'static,
9066 crate::wire::NodeGetFlagsResponse,
9067 ::fidl_next::wire::fuchsia::Status,
9068 >;
9069 }
9070
9071 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
9072 type Output = ::core::result::Result<
9073 crate::generic::NodeGetFlagsResponse<___R>,
9074 ::fidl_next::never::Never,
9075 >;
9076
9077 fn respond(response: ___R) -> Self::Output {
9078 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
9079 }
9080 }
9081
9082 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
9083 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9084
9085 fn respond_err(response: ___R) -> Self::Output {
9086 ::core::result::Result::Err(response)
9087 }
9088 }
9089
9090 pub struct SetFlags;
9091
9092 impl ::fidl_next::Method for SetFlags {
9093 const ORDINAL: u64 = 6172186066099445416;
9094 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9095 ::fidl_next::protocol::Flexibility::Flexible;
9096
9097 type Protocol = crate::Directory;
9098
9099 type Request = crate::wire::NodeSetFlagsRequest;
9100 }
9101
9102 impl ::fidl_next::TwoWayMethod for SetFlags {
9103 type Response = ::fidl_next::wire::Result<
9104 'static,
9105 crate::wire::NodeSetFlagsResponse,
9106 ::fidl_next::wire::fuchsia::Status,
9107 >;
9108 }
9109
9110 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
9111 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9112
9113 fn respond(response: ___R) -> Self::Output {
9114 ::core::result::Result::Ok(response)
9115 }
9116 }
9117
9118 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
9119 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9120
9121 fn respond_err(response: ___R) -> Self::Output {
9122 ::core::result::Result::Err(response)
9123 }
9124 }
9125
9126 pub struct QueryFilesystem;
9127
9128 impl ::fidl_next::Method for QueryFilesystem {
9129 const ORDINAL: u64 = 8013111122914313744;
9130 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9131 ::fidl_next::protocol::Flexibility::Strict;
9132
9133 type Protocol = crate::Directory;
9134
9135 type Request = ::fidl_next::wire::EmptyMessageBody;
9136 }
9137
9138 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
9139 type Response =
9140 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
9141 }
9142
9143 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
9144 type Output = ::fidl_next::Strict<___R>;
9145
9146 fn respond(response: ___R) -> Self::Output {
9147 ::fidl_next::Strict(response)
9148 }
9149 }
9150
9151 pub struct OnRepresentation;
9152
9153 impl ::fidl_next::Method for OnRepresentation {
9154 const ORDINAL: u64 = 6679970090861613324;
9155 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9156 ::fidl_next::protocol::Flexibility::Strict;
9157
9158 type Protocol = crate::Directory;
9159
9160 type Request = crate::wire::Representation<'static>;
9161 }
9162
9163 pub struct GetAttributes;
9164
9165 impl ::fidl_next::Method for GetAttributes {
9166 const ORDINAL: u64 = 4414537700416816443;
9167 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9168 ::fidl_next::protocol::Flexibility::Strict;
9169
9170 type Protocol = crate::Directory;
9171
9172 type Request = crate::wire::NodeGetAttributesRequest;
9173 }
9174
9175 impl ::fidl_next::TwoWayMethod for GetAttributes {
9176 type Response = ::fidl_next::wire::Result<
9177 'static,
9178 crate::wire::NodeAttributes2<'static>,
9179 ::fidl_next::wire::fuchsia::Status,
9180 >;
9181 }
9182
9183 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
9184 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9185
9186 fn respond(response: ___R) -> Self::Output {
9187 ::core::result::Result::Ok(response)
9188 }
9189 }
9190
9191 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
9192 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9193
9194 fn respond_err(response: ___R) -> Self::Output {
9195 ::core::result::Result::Err(response)
9196 }
9197 }
9198
9199 pub struct UpdateAttributes;
9200
9201 impl ::fidl_next::Method for UpdateAttributes {
9202 const ORDINAL: u64 = 3677402239314018056;
9203 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9204 ::fidl_next::protocol::Flexibility::Strict;
9205
9206 type Protocol = crate::Directory;
9207
9208 type Request = crate::wire::MutableNodeAttributes<'static>;
9209 }
9210
9211 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
9212 type Response = ::fidl_next::wire::Result<
9213 'static,
9214 crate::wire::NodeUpdateAttributesResponse,
9215 ::fidl_next::wire::fuchsia::Status,
9216 >;
9217 }
9218
9219 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
9220 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9221
9222 fn respond(response: ___R) -> Self::Output {
9223 ::core::result::Result::Ok(response)
9224 }
9225 }
9226
9227 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
9228 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9229
9230 fn respond_err(response: ___R) -> Self::Output {
9231 ::core::result::Result::Err(response)
9232 }
9233 }
9234
9235 pub struct Sync;
9236
9237 impl ::fidl_next::Method for Sync {
9238 const ORDINAL: u64 = 3196473584242777161;
9239 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9240 ::fidl_next::protocol::Flexibility::Strict;
9241
9242 type Protocol = crate::Directory;
9243
9244 type Request = ::fidl_next::wire::EmptyMessageBody;
9245 }
9246
9247 impl ::fidl_next::TwoWayMethod for Sync {
9248 type Response = ::fidl_next::wire::Result<
9249 'static,
9250 crate::wire::NodeSyncResponse,
9251 ::fidl_next::wire::fuchsia::Status,
9252 >;
9253 }
9254
9255 impl<___R> ::fidl_next::Respond<___R> for Sync {
9256 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9257
9258 fn respond(response: ___R) -> Self::Output {
9259 ::core::result::Result::Ok(response)
9260 }
9261 }
9262
9263 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
9264 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9265
9266 fn respond_err(response: ___R) -> Self::Output {
9267 ::core::result::Result::Err(response)
9268 }
9269 }
9270
9271 pub struct ListExtendedAttributes;
9272
9273 impl ::fidl_next::Method for ListExtendedAttributes {
9274 const ORDINAL: u64 = 5431626189872037072;
9275 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9276 ::fidl_next::protocol::Flexibility::Strict;
9277
9278 type Protocol = crate::Directory;
9279
9280 type Request = crate::wire::NodeListExtendedAttributesRequest;
9281 }
9282
9283 pub struct GetExtendedAttribute;
9284
9285 impl ::fidl_next::Method for GetExtendedAttribute {
9286 const ORDINAL: u64 = 5043930208506967771;
9287 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9288 ::fidl_next::protocol::Flexibility::Strict;
9289
9290 type Protocol = crate::Directory;
9291
9292 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
9293 }
9294
9295 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
9296 type Response = ::fidl_next::wire::Result<
9297 'static,
9298 crate::wire::ExtendedAttributeValue<'static>,
9299 ::fidl_next::wire::fuchsia::Status,
9300 >;
9301 }
9302
9303 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
9304 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9305
9306 fn respond(response: ___R) -> Self::Output {
9307 ::core::result::Result::Ok(response)
9308 }
9309 }
9310
9311 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
9312 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9313
9314 fn respond_err(response: ___R) -> Self::Output {
9315 ::core::result::Result::Err(response)
9316 }
9317 }
9318
9319 pub struct SetExtendedAttribute;
9320
9321 impl ::fidl_next::Method for SetExtendedAttribute {
9322 const ORDINAL: u64 = 5374223046099989052;
9323 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9324 ::fidl_next::protocol::Flexibility::Strict;
9325
9326 type Protocol = crate::Directory;
9327
9328 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
9329 }
9330
9331 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
9332 type Response = ::fidl_next::wire::Result<
9333 'static,
9334 crate::wire::NodeSetExtendedAttributeResponse,
9335 ::fidl_next::wire::fuchsia::Status,
9336 >;
9337 }
9338
9339 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
9340 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9341
9342 fn respond(response: ___R) -> Self::Output {
9343 ::core::result::Result::Ok(response)
9344 }
9345 }
9346
9347 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
9348 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9349
9350 fn respond_err(response: ___R) -> Self::Output {
9351 ::core::result::Result::Err(response)
9352 }
9353 }
9354
9355 pub struct RemoveExtendedAttribute;
9356
9357 impl ::fidl_next::Method for RemoveExtendedAttribute {
9358 const ORDINAL: u64 = 8794297771444732717;
9359 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9360 ::fidl_next::protocol::Flexibility::Strict;
9361
9362 type Protocol = crate::Directory;
9363
9364 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
9365 }
9366
9367 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
9368 type Response = ::fidl_next::wire::Result<
9369 'static,
9370 crate::wire::NodeRemoveExtendedAttributeResponse,
9371 ::fidl_next::wire::fuchsia::Status,
9372 >;
9373 }
9374
9375 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
9376 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9377
9378 fn respond(response: ___R) -> Self::Output {
9379 ::core::result::Result::Ok(response)
9380 }
9381 }
9382
9383 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
9384 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9385
9386 fn respond_err(response: ___R) -> Self::Output {
9387 ::core::result::Result::Err(response)
9388 }
9389 }
9390
9391 pub struct Open;
9392
9393 impl ::fidl_next::Method for Open {
9394 const ORDINAL: u64 = 6236883748953765593;
9395 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9396 ::fidl_next::protocol::Flexibility::Flexible;
9397
9398 type Protocol = crate::Directory;
9399
9400 type Request = crate::wire::OpenableOpenRequest<'static>;
9401 }
9402
9403 pub struct DeprecatedOpen;
9404
9405 impl ::fidl_next::Method for DeprecatedOpen {
9406 const ORDINAL: u64 = 3193127272456937152;
9407 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9408 ::fidl_next::protocol::Flexibility::Flexible;
9409
9410 type Protocol = crate::Directory;
9411
9412 type Request = crate::wire::DirectoryDeprecatedOpenRequest<'static>;
9413 }
9414
9415 pub struct ReadDirents;
9416
9417 impl ::fidl_next::Method for ReadDirents {
9418 const ORDINAL: u64 = 3855785432100874762;
9419 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9420 ::fidl_next::protocol::Flexibility::Strict;
9421
9422 type Protocol = crate::Directory;
9423
9424 type Request = crate::wire::DirectoryReadDirentsRequest;
9425 }
9426
9427 impl ::fidl_next::TwoWayMethod for ReadDirents {
9428 type Response =
9429 ::fidl_next::wire::Strict<crate::wire::DirectoryReadDirentsResponse<'static>>;
9430 }
9431
9432 impl<___R> ::fidl_next::Respond<___R> for ReadDirents {
9433 type Output = ::fidl_next::Strict<___R>;
9434
9435 fn respond(response: ___R) -> Self::Output {
9436 ::fidl_next::Strict(response)
9437 }
9438 }
9439
9440 pub struct Rewind;
9441
9442 impl ::fidl_next::Method for Rewind {
9443 const ORDINAL: u64 = 1635123508515392625;
9444 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9445 ::fidl_next::protocol::Flexibility::Strict;
9446
9447 type Protocol = crate::Directory;
9448
9449 type Request = ::fidl_next::wire::EmptyMessageBody;
9450 }
9451
9452 impl ::fidl_next::TwoWayMethod for Rewind {
9453 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryRewindResponse>;
9454 }
9455
9456 impl<___R> ::fidl_next::Respond<___R> for Rewind {
9457 type Output = ::fidl_next::Strict<crate::generic::DirectoryRewindResponse<___R>>;
9458
9459 fn respond(response: ___R) -> Self::Output {
9460 ::fidl_next::Strict(crate::generic::DirectoryRewindResponse { s: response })
9461 }
9462 }
9463
9464 pub struct GetToken;
9465
9466 impl ::fidl_next::Method for GetToken {
9467 const ORDINAL: u64 = 2787337947777369685;
9468 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9469 ::fidl_next::protocol::Flexibility::Strict;
9470
9471 type Protocol = crate::Directory;
9472
9473 type Request = ::fidl_next::wire::EmptyMessageBody;
9474 }
9475
9476 impl ::fidl_next::TwoWayMethod for GetToken {
9477 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryGetTokenResponse>;
9478 }
9479
9480 impl<___R> ::fidl_next::Respond<___R> for GetToken {
9481 type Output = ::fidl_next::Strict<___R>;
9482
9483 fn respond(response: ___R) -> Self::Output {
9484 ::fidl_next::Strict(response)
9485 }
9486 }
9487
9488 pub struct Link;
9489
9490 impl ::fidl_next::Method for Link {
9491 const ORDINAL: u64 = 8360374984291987687;
9492 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9493 ::fidl_next::protocol::Flexibility::Strict;
9494
9495 type Protocol = crate::Directory;
9496
9497 type Request = crate::wire::DirectoryLinkRequest<'static>;
9498 }
9499
9500 impl ::fidl_next::TwoWayMethod for Link {
9501 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryLinkResponse>;
9502 }
9503
9504 impl<___R> ::fidl_next::Respond<___R> for Link {
9505 type Output = ::fidl_next::Strict<crate::generic::DirectoryLinkResponse<___R>>;
9506
9507 fn respond(response: ___R) -> Self::Output {
9508 ::fidl_next::Strict(crate::generic::DirectoryLinkResponse { s: response })
9509 }
9510 }
9511
9512 pub struct Unlink;
9513
9514 impl ::fidl_next::Method for Unlink {
9515 const ORDINAL: u64 = 8433556716759383021;
9516 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9517 ::fidl_next::protocol::Flexibility::Strict;
9518
9519 type Protocol = crate::Directory;
9520
9521 type Request = crate::wire::DirectoryUnlinkRequest<'static>;
9522 }
9523
9524 impl ::fidl_next::TwoWayMethod for Unlink {
9525 type Response = ::fidl_next::wire::Result<
9526 'static,
9527 crate::wire::DirectoryUnlinkResponse,
9528 ::fidl_next::wire::fuchsia::Status,
9529 >;
9530 }
9531
9532 impl<___R> ::fidl_next::Respond<___R> for Unlink {
9533 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9534
9535 fn respond(response: ___R) -> Self::Output {
9536 ::core::result::Result::Ok(response)
9537 }
9538 }
9539
9540 impl<___R> ::fidl_next::RespondErr<___R> for Unlink {
9541 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9542
9543 fn respond_err(response: ___R) -> Self::Output {
9544 ::core::result::Result::Err(response)
9545 }
9546 }
9547
9548 pub struct Rename;
9549
9550 impl ::fidl_next::Method for Rename {
9551 const ORDINAL: u64 = 8097726607824333022;
9552 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9553 ::fidl_next::protocol::Flexibility::Strict;
9554
9555 type Protocol = crate::Directory;
9556
9557 type Request = crate::wire::DirectoryRenameRequest<'static>;
9558 }
9559
9560 impl ::fidl_next::TwoWayMethod for Rename {
9561 type Response = ::fidl_next::wire::Result<
9562 'static,
9563 crate::wire::DirectoryRenameResponse,
9564 ::fidl_next::wire::fuchsia::Status,
9565 >;
9566 }
9567
9568 impl<___R> ::fidl_next::Respond<___R> for Rename {
9569 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9570
9571 fn respond(response: ___R) -> Self::Output {
9572 ::core::result::Result::Ok(response)
9573 }
9574 }
9575
9576 impl<___R> ::fidl_next::RespondErr<___R> for Rename {
9577 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9578
9579 fn respond_err(response: ___R) -> Self::Output {
9580 ::core::result::Result::Err(response)
9581 }
9582 }
9583
9584 pub struct CreateSymlink;
9585
9586 impl ::fidl_next::Method for CreateSymlink {
9587 const ORDINAL: u64 = 2435901052462315657;
9588 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9589 ::fidl_next::protocol::Flexibility::Strict;
9590
9591 type Protocol = crate::Directory;
9592
9593 type Request = crate::wire::DirectoryCreateSymlinkRequest<'static>;
9594 }
9595
9596 impl ::fidl_next::TwoWayMethod for CreateSymlink {
9597 type Response = ::fidl_next::wire::Result<
9598 'static,
9599 crate::wire::DirectoryCreateSymlinkResponse,
9600 ::fidl_next::wire::fuchsia::Status,
9601 >;
9602 }
9603
9604 impl<___R> ::fidl_next::Respond<___R> for CreateSymlink {
9605 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9606
9607 fn respond(response: ___R) -> Self::Output {
9608 ::core::result::Result::Ok(response)
9609 }
9610 }
9611
9612 impl<___R> ::fidl_next::RespondErr<___R> for CreateSymlink {
9613 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9614
9615 fn respond_err(response: ___R) -> Self::Output {
9616 ::core::result::Result::Err(response)
9617 }
9618 }
9619
9620 pub struct Watch;
9621
9622 impl ::fidl_next::Method for Watch {
9623 const ORDINAL: u64 = 6275512344170098065;
9624 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9625 ::fidl_next::protocol::Flexibility::Strict;
9626
9627 type Protocol = crate::Directory;
9628
9629 type Request = crate::wire::DirectoryWatchRequest;
9630 }
9631
9632 impl ::fidl_next::TwoWayMethod for Watch {
9633 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryWatchResponse>;
9634 }
9635
9636 impl<___R> ::fidl_next::Respond<___R> for Watch {
9637 type Output = ::fidl_next::Strict<crate::generic::DirectoryWatchResponse<___R>>;
9638
9639 fn respond(response: ___R) -> Self::Output {
9640 ::fidl_next::Strict(crate::generic::DirectoryWatchResponse { s: response })
9641 }
9642 }
9643
9644 mod ___detail {
9645 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Directory
9646 where
9647 ___T: ::fidl_next::Transport,
9648 {
9649 type Client = DirectoryClient<___T>;
9650 type Server = DirectoryServer<___T>;
9651 }
9652
9653 #[repr(transparent)]
9655 pub struct DirectoryClient<___T: ::fidl_next::Transport> {
9656 #[allow(dead_code)]
9657 client: ::fidl_next::protocol::Client<___T>,
9658 }
9659
9660 impl<___T> DirectoryClient<___T>
9661 where
9662 ___T: ::fidl_next::Transport,
9663 {
9664 #[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"]
9665 pub fn advisory_lock(
9666 &self,
9667
9668 request: impl ::fidl_next::Encode<
9669 crate::wire::AdvisoryLockRequest<'static>,
9670 <___T as ::fidl_next::Transport>::SendBuffer,
9671 >,
9672 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
9673 where
9674 <___T as ::fidl_next::Transport>::SendBuffer:
9675 ::fidl_next::encoder::InternalHandleEncoder,
9676 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9677 {
9678 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
9679 request,
9680 })
9681 }
9682
9683 #[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"]
9684 pub fn advisory_lock_with<___R>(
9685 &self,
9686 request: ___R,
9687 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
9688 where
9689 ___R: ::fidl_next::Encode<
9690 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
9691 <___T as ::fidl_next::Transport>::SendBuffer,
9692 >,
9693 {
9694 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9695 7992130864415541162,
9696 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
9697 request,
9698 ))
9699 }
9700
9701 pub fn clone(
9702 &self,
9703
9704 request: impl ::fidl_next::Encode<
9705 ::fidl_next::ServerEnd<
9706 ::fdomain_next_fuchsia_unknown::Cloneable,
9707 ::fdomain_client::fidl_next::wire::Handle,
9708 >,
9709 <___T as ::fidl_next::Transport>::SendBuffer,
9710 >,
9711 ) -> ::fidl_next::SendFuture<'_, ___T>
9712 where
9713 <___T as ::fidl_next::Transport>::SendBuffer:
9714 ::fidl_next::encoder::InternalHandleEncoder,
9715 <___T as ::fidl_next::Transport>::SendBuffer:
9716 ::fdomain_client::fidl_next::HandleEncoder,
9717 {
9718 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
9719 request,
9720 })
9721 }
9722
9723 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
9724 where
9725 ___R: ::fidl_next::Encode<
9726 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
9727 <___T as ::fidl_next::Transport>::SendBuffer,
9728 >,
9729 {
9730 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9731 2366825959783828089,
9732 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
9733 request,
9734 ))
9735 }
9736
9737 #[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"]
9738 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
9739 ::fidl_next::TwoWayFuture::from_untyped(
9740 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9741 6540867515453498750,
9742 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
9743 (),
9744 ),
9745 )
9746 }
9747
9748 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
9749 ::fidl_next::TwoWayFuture::from_untyped(
9750 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9751 2763219980499352582,
9752 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
9753 (),
9754 ),
9755 )
9756 }
9757
9758 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9759 pub fn deprecated_clone(
9760 &self,
9761
9762 flags: impl ::fidl_next::Encode<
9763 crate::wire::OpenFlags,
9764 <___T as ::fidl_next::Transport>::SendBuffer,
9765 >,
9766
9767 object: impl ::fidl_next::Encode<
9768 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
9769 <___T as ::fidl_next::Transport>::SendBuffer,
9770 >,
9771 ) -> ::fidl_next::SendFuture<'_, ___T>
9772 where
9773 <___T as ::fidl_next::Transport>::SendBuffer:
9774 ::fidl_next::encoder::InternalHandleEncoder,
9775 <___T as ::fidl_next::Transport>::SendBuffer:
9776 ::fdomain_client::fidl_next::HandleEncoder,
9777 {
9778 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
9779 flags,
9780
9781 object,
9782 })
9783 }
9784
9785 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
9786 pub fn deprecated_clone_with<___R>(
9787 &self,
9788 request: ___R,
9789 ) -> ::fidl_next::SendFuture<'_, ___T>
9790 where
9791 ___R: ::fidl_next::Encode<
9792 crate::wire::NodeDeprecatedCloneRequest,
9793 <___T as ::fidl_next::Transport>::SendBuffer,
9794 >,
9795 {
9796 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
9797 6512600400724287855,
9798 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
9799 request,
9800 ))
9801 }
9802
9803 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
9804 pub fn deprecated_get_attr(
9805 &self,
9806 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
9807 ::fidl_next::TwoWayFuture::from_untyped(
9808 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9809 8689798978500614909,
9810 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
9811 (),
9812 ),
9813 )
9814 }
9815
9816 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9817 pub fn deprecated_set_attr(
9818 &self,
9819
9820 flags: impl ::fidl_next::Encode<
9821 crate::wire::NodeAttributeFlags,
9822 <___T as ::fidl_next::Transport>::SendBuffer,
9823 >,
9824
9825 attributes: impl ::fidl_next::Encode<
9826 crate::wire::NodeAttributes,
9827 <___T as ::fidl_next::Transport>::SendBuffer,
9828 >,
9829 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
9830 where
9831 <___T as ::fidl_next::Transport>::SendBuffer:
9832 ::fidl_next::encoder::InternalHandleEncoder,
9833 {
9834 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
9835 flags,
9836
9837 attributes,
9838 })
9839 }
9840
9841 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
9842 pub fn deprecated_set_attr_with<___R>(
9843 &self,
9844 request: ___R,
9845 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
9846 where
9847 ___R: ::fidl_next::Encode<
9848 crate::wire::NodeDeprecatedSetAttrRequest,
9849 <___T as ::fidl_next::Transport>::SendBuffer,
9850 >,
9851 {
9852 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9853 4721673413776871238,
9854 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
9855 request,
9856 ))
9857 }
9858
9859 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
9860 pub fn deprecated_get_flags(
9861 &self,
9862 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
9863 ::fidl_next::TwoWayFuture::from_untyped(
9864 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9865 6595803110182632097,
9866 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
9867 (),
9868 ),
9869 )
9870 }
9871
9872 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9873 pub fn deprecated_set_flags(
9874 &self,
9875
9876 flags: impl ::fidl_next::Encode<
9877 crate::wire::OpenFlags,
9878 <___T as ::fidl_next::Transport>::SendBuffer,
9879 >,
9880 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
9881 where
9882 <___T as ::fidl_next::Transport>::SendBuffer:
9883 ::fidl_next::encoder::InternalHandleEncoder,
9884 {
9885 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
9886 flags,
9887 })
9888 }
9889
9890 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
9891 pub fn deprecated_set_flags_with<___R>(
9892 &self,
9893 request: ___R,
9894 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
9895 where
9896 ___R: ::fidl_next::Encode<
9897 crate::wire::NodeDeprecatedSetFlagsRequest,
9898 <___T as ::fidl_next::Transport>::SendBuffer,
9899 >,
9900 {
9901 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9902 5950864159036794675,
9903 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
9904 request,
9905 ))
9906 }
9907
9908 #[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"]
9909 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
9910 ::fidl_next::TwoWayFuture::from_untyped(
9911 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9912 105530239381466147,
9913 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
9914 (),
9915 ),
9916 )
9917 }
9918
9919 #[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"]
9920 pub fn set_flags(
9921 &self,
9922
9923 flags: impl ::fidl_next::Encode<
9924 crate::wire::Flags,
9925 <___T as ::fidl_next::Transport>::SendBuffer,
9926 >,
9927 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
9928 where
9929 <___T as ::fidl_next::Transport>::SendBuffer:
9930 ::fidl_next::encoder::InternalHandleEncoder,
9931 {
9932 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
9933 }
9934
9935 #[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"]
9936 pub fn set_flags_with<___R>(
9937 &self,
9938 request: ___R,
9939 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
9940 where
9941 ___R: ::fidl_next::Encode<
9942 crate::wire::NodeSetFlagsRequest,
9943 <___T as ::fidl_next::Transport>::SendBuffer,
9944 >,
9945 {
9946 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9947 6172186066099445416,
9948 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
9949 request,
9950 ))
9951 }
9952
9953 #[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"]
9954 pub fn query_filesystem(
9955 &self,
9956 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
9957 ::fidl_next::TwoWayFuture::from_untyped(
9958 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
9959 8013111122914313744,
9960 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
9961 (),
9962 ),
9963 )
9964 }
9965
9966 #[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"]
9967 pub fn get_attributes(
9968 &self,
9969
9970 query: impl ::fidl_next::Encode<
9971 crate::wire::NodeAttributesQuery,
9972 <___T as ::fidl_next::Transport>::SendBuffer,
9973 >,
9974 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
9975 where
9976 <___T as ::fidl_next::Transport>::SendBuffer:
9977 ::fidl_next::encoder::InternalHandleEncoder,
9978 {
9979 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
9980 }
9981
9982 #[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"]
9983 pub fn get_attributes_with<___R>(
9984 &self,
9985 request: ___R,
9986 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
9987 where
9988 ___R: ::fidl_next::Encode<
9989 crate::wire::NodeGetAttributesRequest,
9990 <___T as ::fidl_next::Transport>::SendBuffer,
9991 >,
9992 {
9993 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
9994 4414537700416816443,
9995 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
9996 request,
9997 ))
9998 }
9999
10000 #[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"]
10001 pub fn update_attributes_with<___R>(
10002 &self,
10003 request: ___R,
10004 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
10005 where
10006 ___R: ::fidl_next::Encode<
10007 crate::wire::MutableNodeAttributes<'static>,
10008 <___T as ::fidl_next::Transport>::SendBuffer,
10009 >,
10010 {
10011 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10012 3677402239314018056,
10013 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
10014 request,
10015 ))
10016 }
10017
10018 #[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"]
10019 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
10020 ::fidl_next::TwoWayFuture::from_untyped(
10021 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10022 3196473584242777161,
10023 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
10024 (),
10025 ),
10026 )
10027 }
10028
10029 #[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"]
10030 pub fn list_extended_attributes(
10031 &self,
10032
10033 iterator: impl ::fidl_next::Encode<
10034 ::fidl_next::ServerEnd<
10035 crate::ExtendedAttributeIterator,
10036 ::fdomain_client::fidl_next::wire::Handle,
10037 >,
10038 <___T as ::fidl_next::Transport>::SendBuffer,
10039 >,
10040 ) -> ::fidl_next::SendFuture<'_, ___T>
10041 where
10042 <___T as ::fidl_next::Transport>::SendBuffer:
10043 ::fidl_next::encoder::InternalHandleEncoder,
10044 <___T as ::fidl_next::Transport>::SendBuffer:
10045 ::fdomain_client::fidl_next::HandleEncoder,
10046 {
10047 self.list_extended_attributes_with(
10048 crate::generic::NodeListExtendedAttributesRequest { iterator },
10049 )
10050 }
10051
10052 #[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"]
10053 pub fn list_extended_attributes_with<___R>(
10054 &self,
10055 request: ___R,
10056 ) -> ::fidl_next::SendFuture<'_, ___T>
10057 where
10058 ___R: ::fidl_next::Encode<
10059 crate::wire::NodeListExtendedAttributesRequest,
10060 <___T as ::fidl_next::Transport>::SendBuffer,
10061 >,
10062 {
10063 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
10064 5431626189872037072,
10065 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
10066 request,
10067 ))
10068 }
10069
10070 #[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"]
10071 pub fn get_extended_attribute(
10072 &self,
10073
10074 name: impl ::fidl_next::Encode<
10075 ::fidl_next::wire::Vector<'static, u8>,
10076 <___T as ::fidl_next::Transport>::SendBuffer,
10077 >,
10078 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
10079 where
10080 <___T as ::fidl_next::Transport>::SendBuffer:
10081 ::fidl_next::encoder::InternalHandleEncoder,
10082 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10083 {
10084 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
10085 name,
10086 })
10087 }
10088
10089 #[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"]
10090 pub fn get_extended_attribute_with<___R>(
10091 &self,
10092 request: ___R,
10093 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
10094 where
10095 ___R: ::fidl_next::Encode<
10096 crate::wire::NodeGetExtendedAttributeRequest<'static>,
10097 <___T as ::fidl_next::Transport>::SendBuffer,
10098 >,
10099 {
10100 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10101 5043930208506967771,
10102 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
10103 request,
10104 ))
10105 }
10106
10107 #[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"]
10108 pub fn set_extended_attribute(
10109 &self,
10110
10111 name: impl ::fidl_next::Encode<
10112 ::fidl_next::wire::Vector<'static, u8>,
10113 <___T as ::fidl_next::Transport>::SendBuffer,
10114 >,
10115
10116 value: impl ::fidl_next::Encode<
10117 crate::wire::ExtendedAttributeValue<'static>,
10118 <___T as ::fidl_next::Transport>::SendBuffer,
10119 >,
10120
10121 mode: impl ::fidl_next::Encode<
10122 crate::wire::SetExtendedAttributeMode,
10123 <___T as ::fidl_next::Transport>::SendBuffer,
10124 >,
10125 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
10126 where
10127 <___T as ::fidl_next::Transport>::SendBuffer:
10128 ::fidl_next::encoder::InternalHandleEncoder,
10129 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10130 <___T as ::fidl_next::Transport>::SendBuffer:
10131 ::fdomain_client::fidl_next::HandleEncoder,
10132 {
10133 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
10134 name,
10135
10136 value,
10137
10138 mode,
10139 })
10140 }
10141
10142 #[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"]
10143 pub fn set_extended_attribute_with<___R>(
10144 &self,
10145 request: ___R,
10146 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
10147 where
10148 ___R: ::fidl_next::Encode<
10149 crate::wire::NodeSetExtendedAttributeRequest<'static>,
10150 <___T as ::fidl_next::Transport>::SendBuffer,
10151 >,
10152 {
10153 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10154 5374223046099989052,
10155 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
10156 request,
10157 ))
10158 }
10159
10160 #[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"]
10161 pub fn remove_extended_attribute(
10162 &self,
10163
10164 name: impl ::fidl_next::Encode<
10165 ::fidl_next::wire::Vector<'static, u8>,
10166 <___T as ::fidl_next::Transport>::SendBuffer,
10167 >,
10168 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
10169 where
10170 <___T as ::fidl_next::Transport>::SendBuffer:
10171 ::fidl_next::encoder::InternalHandleEncoder,
10172 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10173 {
10174 self.remove_extended_attribute_with(
10175 crate::generic::NodeRemoveExtendedAttributeRequest { name },
10176 )
10177 }
10178
10179 #[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"]
10180 pub fn remove_extended_attribute_with<___R>(
10181 &self,
10182 request: ___R,
10183 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
10184 where
10185 ___R: ::fidl_next::Encode<
10186 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
10187 <___T as ::fidl_next::Transport>::SendBuffer,
10188 >,
10189 {
10190 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10191 8794297771444732717,
10192 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
10193 request,
10194 ))
10195 }
10196
10197 #[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"]
10198 pub fn open(
10199 &self,
10200
10201 path: impl ::fidl_next::Encode<
10202 ::fidl_next::wire::String<'static>,
10203 <___T as ::fidl_next::Transport>::SendBuffer,
10204 >,
10205
10206 flags: impl ::fidl_next::Encode<
10207 crate::wire::Flags,
10208 <___T as ::fidl_next::Transport>::SendBuffer,
10209 >,
10210
10211 options: impl ::fidl_next::Encode<
10212 crate::wire::Options<'static>,
10213 <___T as ::fidl_next::Transport>::SendBuffer,
10214 >,
10215
10216 object: impl ::fidl_next::Encode<
10217 ::fdomain_client::fidl_next::wire::Handle,
10218 <___T as ::fidl_next::Transport>::SendBuffer,
10219 >,
10220 ) -> ::fidl_next::SendFuture<'_, ___T>
10221 where
10222 <___T as ::fidl_next::Transport>::SendBuffer:
10223 ::fidl_next::encoder::InternalHandleEncoder,
10224 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10225 <___T as ::fidl_next::Transport>::SendBuffer:
10226 ::fdomain_client::fidl_next::HandleEncoder,
10227 {
10228 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
10229 }
10230
10231 #[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"]
10232 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
10233 where
10234 ___R: ::fidl_next::Encode<
10235 crate::wire::OpenableOpenRequest<'static>,
10236 <___T as ::fidl_next::Transport>::SendBuffer,
10237 >,
10238 {
10239 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
10240 6236883748953765593,
10241 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
10242 request,
10243 ))
10244 }
10245
10246 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
10247 pub fn deprecated_open(
10248 &self,
10249
10250 flags: impl ::fidl_next::Encode<
10251 crate::wire::OpenFlags,
10252 <___T as ::fidl_next::Transport>::SendBuffer,
10253 >,
10254
10255 mode: impl ::fidl_next::Encode<
10256 crate::wire::ModeType,
10257 <___T as ::fidl_next::Transport>::SendBuffer,
10258 >,
10259
10260 path: impl ::fidl_next::Encode<
10261 ::fidl_next::wire::String<'static>,
10262 <___T as ::fidl_next::Transport>::SendBuffer,
10263 >,
10264
10265 object: impl ::fidl_next::Encode<
10266 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
10267 <___T as ::fidl_next::Transport>::SendBuffer,
10268 >,
10269 ) -> ::fidl_next::SendFuture<'_, ___T>
10270 where
10271 <___T as ::fidl_next::Transport>::SendBuffer:
10272 ::fidl_next::encoder::InternalHandleEncoder,
10273 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10274 <___T as ::fidl_next::Transport>::SendBuffer:
10275 ::fdomain_client::fidl_next::HandleEncoder,
10276 {
10277 self.deprecated_open_with(crate::generic::DirectoryDeprecatedOpenRequest {
10278 flags,
10279
10280 mode,
10281
10282 path,
10283
10284 object,
10285 })
10286 }
10287
10288 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
10289 pub fn deprecated_open_with<___R>(
10290 &self,
10291 request: ___R,
10292 ) -> ::fidl_next::SendFuture<'_, ___T>
10293 where
10294 ___R: ::fidl_next::Encode<
10295 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
10296 <___T as ::fidl_next::Transport>::SendBuffer,
10297 >,
10298 {
10299 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
10300 3193127272456937152,
10301 <super::DeprecatedOpen as ::fidl_next::Method>::FLEXIBILITY,
10302 request,
10303 ))
10304 }
10305
10306 #[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"]
10307 pub fn read_dirents(
10308 &self,
10309
10310 max_bytes: impl ::fidl_next::Encode<
10311 ::fidl_next::wire::Uint64,
10312 <___T as ::fidl_next::Transport>::SendBuffer,
10313 >,
10314 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
10315 where
10316 <___T as ::fidl_next::Transport>::SendBuffer:
10317 ::fidl_next::encoder::InternalHandleEncoder,
10318 {
10319 self.read_dirents_with(crate::generic::DirectoryReadDirentsRequest { max_bytes })
10320 }
10321
10322 #[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"]
10323 pub fn read_dirents_with<___R>(
10324 &self,
10325 request: ___R,
10326 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
10327 where
10328 ___R: ::fidl_next::Encode<
10329 crate::wire::DirectoryReadDirentsRequest,
10330 <___T as ::fidl_next::Transport>::SendBuffer,
10331 >,
10332 {
10333 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10334 3855785432100874762,
10335 <super::ReadDirents as ::fidl_next::Method>::FLEXIBILITY,
10336 request,
10337 ))
10338 }
10339
10340 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
10341 pub fn rewind(&self) -> ::fidl_next::TwoWayFuture<'_, super::Rewind, ___T> {
10342 ::fidl_next::TwoWayFuture::from_untyped(
10343 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10344 1635123508515392625,
10345 <super::Rewind as ::fidl_next::Method>::FLEXIBILITY,
10346 (),
10347 ),
10348 )
10349 }
10350
10351 #[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"]
10352 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
10353 ::fidl_next::TwoWayFuture::from_untyped(
10354 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10355 2787337947777369685,
10356 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
10357 (),
10358 ),
10359 )
10360 }
10361
10362 #[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"]
10363 pub fn link(
10364 &self,
10365
10366 src: impl ::fidl_next::Encode<
10367 ::fidl_next::wire::String<'static>,
10368 <___T as ::fidl_next::Transport>::SendBuffer,
10369 >,
10370
10371 dst_parent_token: impl ::fidl_next::Encode<
10372 ::fdomain_client::fidl_next::wire::Handle,
10373 <___T as ::fidl_next::Transport>::SendBuffer,
10374 >,
10375
10376 dst: impl ::fidl_next::Encode<
10377 ::fidl_next::wire::String<'static>,
10378 <___T as ::fidl_next::Transport>::SendBuffer,
10379 >,
10380 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
10381 where
10382 <___T as ::fidl_next::Transport>::SendBuffer:
10383 ::fidl_next::encoder::InternalHandleEncoder,
10384 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10385 <___T as ::fidl_next::Transport>::SendBuffer:
10386 ::fdomain_client::fidl_next::HandleEncoder,
10387 {
10388 self.link_with(crate::generic::DirectoryLinkRequest { src, dst_parent_token, dst })
10389 }
10390
10391 #[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"]
10392 pub fn link_with<___R>(
10393 &self,
10394 request: ___R,
10395 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
10396 where
10397 ___R: ::fidl_next::Encode<
10398 crate::wire::DirectoryLinkRequest<'static>,
10399 <___T as ::fidl_next::Transport>::SendBuffer,
10400 >,
10401 {
10402 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10403 8360374984291987687,
10404 <super::Link as ::fidl_next::Method>::FLEXIBILITY,
10405 request,
10406 ))
10407 }
10408
10409 #[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"]
10410 pub fn unlink(
10411 &self,
10412
10413 name: impl ::fidl_next::Encode<
10414 ::fidl_next::wire::String<'static>,
10415 <___T as ::fidl_next::Transport>::SendBuffer,
10416 >,
10417
10418 options: impl ::fidl_next::Encode<
10419 crate::wire::UnlinkOptions<'static>,
10420 <___T as ::fidl_next::Transport>::SendBuffer,
10421 >,
10422 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
10423 where
10424 <___T as ::fidl_next::Transport>::SendBuffer:
10425 ::fidl_next::encoder::InternalHandleEncoder,
10426 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10427 {
10428 self.unlink_with(crate::generic::DirectoryUnlinkRequest { name, options })
10429 }
10430
10431 #[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"]
10432 pub fn unlink_with<___R>(
10433 &self,
10434 request: ___R,
10435 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
10436 where
10437 ___R: ::fidl_next::Encode<
10438 crate::wire::DirectoryUnlinkRequest<'static>,
10439 <___T as ::fidl_next::Transport>::SendBuffer,
10440 >,
10441 {
10442 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10443 8433556716759383021,
10444 <super::Unlink as ::fidl_next::Method>::FLEXIBILITY,
10445 request,
10446 ))
10447 }
10448
10449 #[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"]
10450 pub fn rename(
10451 &self,
10452
10453 src: impl ::fidl_next::Encode<
10454 ::fidl_next::wire::String<'static>,
10455 <___T as ::fidl_next::Transport>::SendBuffer,
10456 >,
10457
10458 dst_parent_token: impl ::fidl_next::Encode<
10459 ::fdomain_client::fidl_next::wire::Handle,
10460 <___T as ::fidl_next::Transport>::SendBuffer,
10461 >,
10462
10463 dst: impl ::fidl_next::Encode<
10464 ::fidl_next::wire::String<'static>,
10465 <___T as ::fidl_next::Transport>::SendBuffer,
10466 >,
10467 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
10468 where
10469 <___T as ::fidl_next::Transport>::SendBuffer:
10470 ::fidl_next::encoder::InternalHandleEncoder,
10471 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10472 <___T as ::fidl_next::Transport>::SendBuffer:
10473 ::fdomain_client::fidl_next::HandleEncoder,
10474 {
10475 self.rename_with(crate::generic::DirectoryRenameRequest {
10476 src,
10477
10478 dst_parent_token,
10479
10480 dst,
10481 })
10482 }
10483
10484 #[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"]
10485 pub fn rename_with<___R>(
10486 &self,
10487 request: ___R,
10488 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
10489 where
10490 ___R: ::fidl_next::Encode<
10491 crate::wire::DirectoryRenameRequest<'static>,
10492 <___T as ::fidl_next::Transport>::SendBuffer,
10493 >,
10494 {
10495 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10496 8097726607824333022,
10497 <super::Rename as ::fidl_next::Method>::FLEXIBILITY,
10498 request,
10499 ))
10500 }
10501
10502 #[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"]
10503 pub fn create_symlink(
10504 &self,
10505
10506 name: impl ::fidl_next::Encode<
10507 ::fidl_next::wire::String<'static>,
10508 <___T as ::fidl_next::Transport>::SendBuffer,
10509 >,
10510
10511 target: impl ::fidl_next::Encode<
10512 ::fidl_next::wire::Vector<'static, u8>,
10513 <___T as ::fidl_next::Transport>::SendBuffer,
10514 >,
10515
10516 connection: impl ::fidl_next::Encode<
10517 ::fidl_next::ServerEnd<
10518 crate::Symlink,
10519 ::fdomain_client::fidl_next::wire::OptionalHandle,
10520 >,
10521 <___T as ::fidl_next::Transport>::SendBuffer,
10522 >,
10523 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
10524 where
10525 <___T as ::fidl_next::Transport>::SendBuffer:
10526 ::fidl_next::encoder::InternalHandleEncoder,
10527 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10528 <___T as ::fidl_next::Transport>::SendBuffer:
10529 ::fdomain_client::fidl_next::HandleEncoder,
10530 {
10531 self.create_symlink_with(crate::generic::DirectoryCreateSymlinkRequest {
10532 name,
10533
10534 target,
10535
10536 connection,
10537 })
10538 }
10539
10540 #[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"]
10541 pub fn create_symlink_with<___R>(
10542 &self,
10543 request: ___R,
10544 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
10545 where
10546 ___R: ::fidl_next::Encode<
10547 crate::wire::DirectoryCreateSymlinkRequest<'static>,
10548 <___T as ::fidl_next::Transport>::SendBuffer,
10549 >,
10550 {
10551 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10552 2435901052462315657,
10553 <super::CreateSymlink as ::fidl_next::Method>::FLEXIBILITY,
10554 request,
10555 ))
10556 }
10557
10558 #[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"]
10559 pub fn watch(
10560 &self,
10561
10562 mask: impl ::fidl_next::Encode<
10563 crate::wire::WatchMask,
10564 <___T as ::fidl_next::Transport>::SendBuffer,
10565 >,
10566
10567 options: impl ::fidl_next::Encode<
10568 ::fidl_next::wire::Uint32,
10569 <___T as ::fidl_next::Transport>::SendBuffer,
10570 >,
10571
10572 watcher: impl ::fidl_next::Encode<
10573 ::fidl_next::ServerEnd<
10574 crate::DirectoryWatcher,
10575 ::fdomain_client::fidl_next::wire::Handle,
10576 >,
10577 <___T as ::fidl_next::Transport>::SendBuffer,
10578 >,
10579 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
10580 where
10581 <___T as ::fidl_next::Transport>::SendBuffer:
10582 ::fidl_next::encoder::InternalHandleEncoder,
10583 <___T as ::fidl_next::Transport>::SendBuffer:
10584 ::fdomain_client::fidl_next::HandleEncoder,
10585 {
10586 self.watch_with(crate::generic::DirectoryWatchRequest { mask, options, watcher })
10587 }
10588
10589 #[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"]
10590 pub fn watch_with<___R>(
10591 &self,
10592 request: ___R,
10593 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
10594 where
10595 ___R: ::fidl_next::Encode<
10596 crate::wire::DirectoryWatchRequest,
10597 <___T as ::fidl_next::Transport>::SendBuffer,
10598 >,
10599 {
10600 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10601 6275512344170098065,
10602 <super::Watch as ::fidl_next::Method>::FLEXIBILITY,
10603 request,
10604 ))
10605 }
10606 }
10607
10608 #[repr(transparent)]
10610 pub struct DirectoryServer<___T: ::fidl_next::Transport> {
10611 server: ::fidl_next::protocol::Server<___T>,
10612 }
10613
10614 impl<___T> DirectoryServer<___T>
10615 where
10616 ___T: ::fidl_next::Transport,
10617 {
10618 #[doc = " An event produced eagerly by a FIDL server if requested by `OpenFlags.DESCRIBE`.\n\n Indicates the success or failure of the open operation, and optionally describes the\n object. If the status is `ZX_OK`, `info` contains descriptive information about the object\n (the same as would be returned by `Describe`).\n"]
10619 pub fn on_open(
10620 &self,
10621
10622 s: impl ::fidl_next::Encode<
10623 ::fidl_next::wire::fuchsia::Status,
10624 <___T as ::fidl_next::Transport>::SendBuffer,
10625 >,
10626
10627 info: impl ::fidl_next::Encode<
10628 crate::wire_optional::NodeInfoDeprecated<'static>,
10629 <___T as ::fidl_next::Transport>::SendBuffer,
10630 >,
10631 ) -> ::fidl_next::SendFuture<'_, ___T>
10632 where
10633 <___T as ::fidl_next::Transport>::SendBuffer:
10634 ::fidl_next::encoder::InternalHandleEncoder,
10635 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10636 <___T as ::fidl_next::Transport>::SendBuffer:
10637 ::fdomain_client::fidl_next::HandleEncoder,
10638 {
10639 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
10640 }
10641
10642 #[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"]
10643
10644 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
10645 where
10646 ___R: ::fidl_next::Encode<
10647 <super::OnOpen as ::fidl_next::Method>::Request,
10648 <___T as ::fidl_next::Transport>::SendBuffer,
10649 >,
10650 {
10651 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
10652 9207534335756671346,
10653 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
10654 request,
10655 ))
10656 }
10657
10658 #[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"]
10659
10660 pub fn on_representation_with<___R>(
10661 &self,
10662 request: ___R,
10663 ) -> ::fidl_next::SendFuture<'_, ___T>
10664 where
10665 ___R: ::fidl_next::Encode<
10666 <super::OnRepresentation as ::fidl_next::Method>::Request,
10667 <___T as ::fidl_next::Transport>::SendBuffer,
10668 >,
10669 {
10670 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
10671 6679970090861613324,
10672 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
10673 request,
10674 ))
10675 }
10676 }
10677 }
10678}
10679
10680#[diagnostic::on_unimplemented(
10681 note = "If {Self} implements the non-local DirectoryClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
10682)]
10683
10684pub trait DirectoryLocalClientHandler<
10688 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
10689 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10690>
10691{
10692 #[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"]
10693 fn on_open(
10694 &mut self,
10695
10696 request: ::fidl_next::Request<directory::OnOpen, ___T>,
10697 ) -> impl ::core::future::Future<Output = ()>;
10698
10699 #[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"]
10700 fn on_representation(
10701 &mut self,
10702
10703 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
10704 ) -> impl ::core::future::Future<Output = ()>;
10705
10706 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
10707 ::core::future::ready(())
10708 }
10709}
10710
10711impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Directory
10712where
10713 ___H: DirectoryLocalClientHandler<___T>,
10714 ___T: ::fidl_next::Transport,
10715 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
10716 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10717 Constraint = (),
10718 >,
10719 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
10720 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
10721 Constraint = (),
10722 >,
10723{
10724 async fn on_event(
10725 handler: &mut ___H,
10726 mut message: ::fidl_next::Message<___T>,
10727 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
10728 match *message.header().ordinal {
10729 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
10730 Ok(decoded) => {
10731 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
10732 Ok(())
10733 }
10734 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10735 ordinal: 9207534335756671346,
10736 error,
10737 }),
10738 },
10739
10740 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
10741 Ok(decoded) => {
10742 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
10743 Ok(())
10744 }
10745 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10746 ordinal: 6679970090861613324,
10747 error,
10748 }),
10749 },
10750
10751 ordinal => {
10752 handler.on_unknown_interaction(ordinal).await;
10753 if ::core::matches!(
10754 message.header().flexibility(),
10755 ::fidl_next::protocol::Flexibility::Strict
10756 ) {
10757 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
10758 } else {
10759 Ok(())
10760 }
10761 }
10762 }
10763 }
10764}
10765
10766#[diagnostic::on_unimplemented(
10767 note = "If {Self} implements the non-local DirectoryServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
10768)]
10769
10770pub trait DirectoryLocalServerHandler<
10774 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
10775 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
10776>
10777{
10778 #[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"]
10779 fn advisory_lock(
10780 &mut self,
10781
10782 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
10783
10784 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
10785 ) -> impl ::core::future::Future<Output = ()>;
10786
10787 fn clone(
10788 &mut self,
10789
10790 request: ::fidl_next::Request<directory::Clone, ___T>,
10791 ) -> impl ::core::future::Future<Output = ()>;
10792
10793 #[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"]
10794 fn close(
10795 &mut self,
10796
10797 responder: ::fidl_next::Responder<directory::Close, ___T>,
10798 ) -> impl ::core::future::Future<Output = ()>;
10799
10800 fn query(
10801 &mut self,
10802
10803 responder: ::fidl_next::Responder<directory::Query, ___T>,
10804 ) -> impl ::core::future::Future<Output = ()>;
10805
10806 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
10807 fn deprecated_clone(
10808 &mut self,
10809
10810 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
10811 ) -> impl ::core::future::Future<Output = ()>;
10812
10813 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
10814 fn deprecated_get_attr(
10815 &mut self,
10816
10817 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
10818 ) -> impl ::core::future::Future<Output = ()>;
10819
10820 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
10821 fn deprecated_set_attr(
10822 &mut self,
10823
10824 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
10825
10826 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
10827 ) -> impl ::core::future::Future<Output = ()>;
10828
10829 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
10830 fn deprecated_get_flags(
10831 &mut self,
10832
10833 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
10834 ) -> impl ::core::future::Future<Output = ()>;
10835
10836 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
10837 fn deprecated_set_flags(
10838 &mut self,
10839
10840 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
10841
10842 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
10843 ) -> impl ::core::future::Future<Output = ()>;
10844
10845 #[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"]
10846 fn get_flags(
10847 &mut self,
10848
10849 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
10850 ) -> impl ::core::future::Future<Output = ()>;
10851
10852 #[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"]
10853 fn set_flags(
10854 &mut self,
10855
10856 request: ::fidl_next::Request<directory::SetFlags, ___T>,
10857
10858 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
10859 ) -> impl ::core::future::Future<Output = ()>;
10860
10861 #[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"]
10862 fn query_filesystem(
10863 &mut self,
10864
10865 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
10866 ) -> impl ::core::future::Future<Output = ()>;
10867
10868 #[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"]
10869 fn get_attributes(
10870 &mut self,
10871
10872 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
10873
10874 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
10875 ) -> impl ::core::future::Future<Output = ()>;
10876
10877 #[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"]
10878 fn update_attributes(
10879 &mut self,
10880
10881 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
10882
10883 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
10884 ) -> impl ::core::future::Future<Output = ()>;
10885
10886 #[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"]
10887 fn sync(
10888 &mut self,
10889
10890 responder: ::fidl_next::Responder<directory::Sync, ___T>,
10891 ) -> impl ::core::future::Future<Output = ()>;
10892
10893 #[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"]
10894 fn list_extended_attributes(
10895 &mut self,
10896
10897 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
10898 ) -> impl ::core::future::Future<Output = ()>;
10899
10900 #[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"]
10901 fn get_extended_attribute(
10902 &mut self,
10903
10904 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
10905
10906 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
10907 ) -> impl ::core::future::Future<Output = ()>;
10908
10909 #[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"]
10910 fn set_extended_attribute(
10911 &mut self,
10912
10913 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
10914
10915 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
10916 ) -> impl ::core::future::Future<Output = ()>;
10917
10918 #[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"]
10919 fn remove_extended_attribute(
10920 &mut self,
10921
10922 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
10923
10924 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
10925 ) -> impl ::core::future::Future<Output = ()>;
10926
10927 #[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"]
10928 fn open(
10929 &mut self,
10930
10931 request: ::fidl_next::Request<directory::Open, ___T>,
10932 ) -> impl ::core::future::Future<Output = ()>;
10933
10934 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
10935 fn deprecated_open(
10936 &mut self,
10937
10938 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
10939 ) -> impl ::core::future::Future<Output = ()>;
10940
10941 #[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"]
10942 fn read_dirents(
10943 &mut self,
10944
10945 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
10946
10947 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
10948 ) -> impl ::core::future::Future<Output = ()>;
10949
10950 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
10951 fn rewind(
10952 &mut self,
10953
10954 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
10955 ) -> impl ::core::future::Future<Output = ()>;
10956
10957 #[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"]
10958 fn get_token(
10959 &mut self,
10960
10961 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
10962 ) -> impl ::core::future::Future<Output = ()>;
10963
10964 #[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"]
10965 fn link(
10966 &mut self,
10967
10968 request: ::fidl_next::Request<directory::Link, ___T>,
10969
10970 responder: ::fidl_next::Responder<directory::Link, ___T>,
10971 ) -> impl ::core::future::Future<Output = ()>;
10972
10973 #[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"]
10974 fn unlink(
10975 &mut self,
10976
10977 request: ::fidl_next::Request<directory::Unlink, ___T>,
10978
10979 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
10980 ) -> impl ::core::future::Future<Output = ()>;
10981
10982 #[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"]
10983 fn rename(
10984 &mut self,
10985
10986 request: ::fidl_next::Request<directory::Rename, ___T>,
10987
10988 responder: ::fidl_next::Responder<directory::Rename, ___T>,
10989 ) -> impl ::core::future::Future<Output = ()>;
10990
10991 #[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"]
10992 fn create_symlink(
10993 &mut self,
10994
10995 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
10996
10997 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
10998 ) -> impl ::core::future::Future<Output = ()>;
10999
11000 #[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"]
11001 fn watch(
11002 &mut self,
11003
11004 request: ::fidl_next::Request<directory::Watch, ___T>,
11005
11006 responder: ::fidl_next::Responder<directory::Watch, ___T>,
11007 ) -> impl ::core::future::Future<Output = ()>;
11008
11009 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
11010 ::core::future::ready(())
11011 }
11012}
11013
11014impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Directory
11015where
11016 ___H: DirectoryLocalServerHandler<___T>,
11017 ___T: ::fidl_next::Transport,
11018 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
11019 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11020 Constraint = (),
11021 >,
11022 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
11023 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11024 Constraint = (),
11025 >,
11026 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
11027 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11028 Constraint = (),
11029 >,
11030 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
11031 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11032 Constraint = (),
11033 >,
11034 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
11035 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11036 Constraint = (),
11037 >,
11038 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
11039 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11040 Constraint = (),
11041 >,
11042 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
11043 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11044 Constraint = (),
11045 >,
11046 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
11047 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11048 Constraint = (),
11049 >,
11050 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
11051 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11052 Constraint = (),
11053 >,
11054 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11055 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11056 Constraint = (),
11057 >,
11058 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11059 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11060 Constraint = (),
11061 >,
11062 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11063 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11064 Constraint = (),
11065 >,
11066 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
11067 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11068 Constraint = (),
11069 >,
11070 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
11071 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11072 Constraint = (),
11073 >,
11074 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
11075 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11076 Constraint = (),
11077 >,
11078 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
11079 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11080 Constraint = (),
11081 >,
11082 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
11083 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11084 Constraint = (),
11085 >,
11086 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
11087 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11088 Constraint = (),
11089 >,
11090 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
11091 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11092 Constraint = (),
11093 >,
11094 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
11095 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11096 Constraint = (),
11097 >,
11098{
11099 async fn on_one_way(
11100 handler: &mut ___H,
11101 mut message: ::fidl_next::Message<___T>,
11102 ) -> ::core::result::Result<
11103 (),
11104 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11105 > {
11106 match *message.header().ordinal {
11107 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11108 Ok(decoded) => {
11109 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
11110 Ok(())
11111 }
11112 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11113 ordinal: 2366825959783828089,
11114 error,
11115 }),
11116 },
11117
11118 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11119 Ok(decoded) => {
11120 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
11121 Ok(())
11122 }
11123 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11124 ordinal: 6512600400724287855,
11125 error,
11126 }),
11127 },
11128
11129 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11130 Ok(decoded) => {
11131 handler
11132 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
11133 .await;
11134 Ok(())
11135 }
11136 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11137 ordinal: 5431626189872037072,
11138 error,
11139 }),
11140 },
11141
11142 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11143 Ok(decoded) => {
11144 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
11145 Ok(())
11146 }
11147 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11148 ordinal: 6236883748953765593,
11149 error,
11150 }),
11151 },
11152
11153 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11154 Ok(decoded) => {
11155 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
11156 Ok(())
11157 }
11158 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11159 ordinal: 3193127272456937152,
11160 error,
11161 }),
11162 },
11163
11164 ordinal => {
11165 handler.on_unknown_interaction(ordinal).await;
11166 if ::core::matches!(
11167 message.header().flexibility(),
11168 ::fidl_next::protocol::Flexibility::Strict
11169 ) {
11170 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11171 } else {
11172 Ok(())
11173 }
11174 }
11175 }
11176 }
11177
11178 async fn on_two_way(
11179 handler: &mut ___H,
11180 mut message: ::fidl_next::Message<___T>,
11181 responder: ::fidl_next::protocol::Responder<___T>,
11182 ) -> ::core::result::Result<
11183 (),
11184 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11185 > {
11186 match *message.header().ordinal {
11187 7992130864415541162 => {
11188 let responder = ::fidl_next::Responder::from_untyped(responder);
11189
11190 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11191 Ok(decoded) => {
11192 handler
11193 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
11194 .await;
11195 Ok(())
11196 }
11197 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11198 ordinal: 7992130864415541162,
11199 error,
11200 }),
11201 }
11202 }
11203
11204 6540867515453498750 => {
11205 let responder = ::fidl_next::Responder::from_untyped(responder);
11206
11207 handler.close(responder).await;
11208 Ok(())
11209 }
11210
11211 2763219980499352582 => {
11212 let responder = ::fidl_next::Responder::from_untyped(responder);
11213
11214 handler.query(responder).await;
11215 Ok(())
11216 }
11217
11218 8689798978500614909 => {
11219 let responder = ::fidl_next::Responder::from_untyped(responder);
11220
11221 handler.deprecated_get_attr(responder).await;
11222 Ok(())
11223 }
11224
11225 4721673413776871238 => {
11226 let responder = ::fidl_next::Responder::from_untyped(responder);
11227
11228 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11229 Ok(decoded) => {
11230 handler
11231 .deprecated_set_attr(
11232 ::fidl_next::Request::from_decoded(decoded),
11233 responder,
11234 )
11235 .await;
11236 Ok(())
11237 }
11238 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11239 ordinal: 4721673413776871238,
11240 error,
11241 }),
11242 }
11243 }
11244
11245 6595803110182632097 => {
11246 let responder = ::fidl_next::Responder::from_untyped(responder);
11247
11248 handler.deprecated_get_flags(responder).await;
11249 Ok(())
11250 }
11251
11252 5950864159036794675 => {
11253 let responder = ::fidl_next::Responder::from_untyped(responder);
11254
11255 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11256 Ok(decoded) => {
11257 handler
11258 .deprecated_set_flags(
11259 ::fidl_next::Request::from_decoded(decoded),
11260 responder,
11261 )
11262 .await;
11263 Ok(())
11264 }
11265 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11266 ordinal: 5950864159036794675,
11267 error,
11268 }),
11269 }
11270 }
11271
11272 105530239381466147 => {
11273 let responder = ::fidl_next::Responder::from_untyped(responder);
11274
11275 handler.get_flags(responder).await;
11276 Ok(())
11277 }
11278
11279 6172186066099445416 => {
11280 let responder = ::fidl_next::Responder::from_untyped(responder);
11281
11282 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11283 Ok(decoded) => {
11284 handler
11285 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
11286 .await;
11287 Ok(())
11288 }
11289 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11290 ordinal: 6172186066099445416,
11291 error,
11292 }),
11293 }
11294 }
11295
11296 8013111122914313744 => {
11297 let responder = ::fidl_next::Responder::from_untyped(responder);
11298
11299 handler.query_filesystem(responder).await;
11300 Ok(())
11301 }
11302
11303 4414537700416816443 => {
11304 let responder = ::fidl_next::Responder::from_untyped(responder);
11305
11306 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11307 Ok(decoded) => {
11308 handler
11309 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
11310 .await;
11311 Ok(())
11312 }
11313 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11314 ordinal: 4414537700416816443,
11315 error,
11316 }),
11317 }
11318 }
11319
11320 3677402239314018056 => {
11321 let responder = ::fidl_next::Responder::from_untyped(responder);
11322
11323 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11324 Ok(decoded) => {
11325 handler
11326 .update_attributes(
11327 ::fidl_next::Request::from_decoded(decoded),
11328 responder,
11329 )
11330 .await;
11331 Ok(())
11332 }
11333 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11334 ordinal: 3677402239314018056,
11335 error,
11336 }),
11337 }
11338 }
11339
11340 3196473584242777161 => {
11341 let responder = ::fidl_next::Responder::from_untyped(responder);
11342
11343 handler.sync(responder).await;
11344 Ok(())
11345 }
11346
11347 5043930208506967771 => {
11348 let responder = ::fidl_next::Responder::from_untyped(responder);
11349
11350 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11351 Ok(decoded) => {
11352 handler
11353 .get_extended_attribute(
11354 ::fidl_next::Request::from_decoded(decoded),
11355 responder,
11356 )
11357 .await;
11358 Ok(())
11359 }
11360 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11361 ordinal: 5043930208506967771,
11362 error,
11363 }),
11364 }
11365 }
11366
11367 5374223046099989052 => {
11368 let responder = ::fidl_next::Responder::from_untyped(responder);
11369
11370 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11371 Ok(decoded) => {
11372 handler
11373 .set_extended_attribute(
11374 ::fidl_next::Request::from_decoded(decoded),
11375 responder,
11376 )
11377 .await;
11378 Ok(())
11379 }
11380 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11381 ordinal: 5374223046099989052,
11382 error,
11383 }),
11384 }
11385 }
11386
11387 8794297771444732717 => {
11388 let responder = ::fidl_next::Responder::from_untyped(responder);
11389
11390 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11391 Ok(decoded) => {
11392 handler
11393 .remove_extended_attribute(
11394 ::fidl_next::Request::from_decoded(decoded),
11395 responder,
11396 )
11397 .await;
11398 Ok(())
11399 }
11400 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11401 ordinal: 8794297771444732717,
11402 error,
11403 }),
11404 }
11405 }
11406
11407 3855785432100874762 => {
11408 let responder = ::fidl_next::Responder::from_untyped(responder);
11409
11410 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11411 Ok(decoded) => {
11412 handler
11413 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
11414 .await;
11415 Ok(())
11416 }
11417 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11418 ordinal: 3855785432100874762,
11419 error,
11420 }),
11421 }
11422 }
11423
11424 1635123508515392625 => {
11425 let responder = ::fidl_next::Responder::from_untyped(responder);
11426
11427 handler.rewind(responder).await;
11428 Ok(())
11429 }
11430
11431 2787337947777369685 => {
11432 let responder = ::fidl_next::Responder::from_untyped(responder);
11433
11434 handler.get_token(responder).await;
11435 Ok(())
11436 }
11437
11438 8360374984291987687 => {
11439 let responder = ::fidl_next::Responder::from_untyped(responder);
11440
11441 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11442 Ok(decoded) => {
11443 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
11444 Ok(())
11445 }
11446 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11447 ordinal: 8360374984291987687,
11448 error,
11449 }),
11450 }
11451 }
11452
11453 8433556716759383021 => {
11454 let responder = ::fidl_next::Responder::from_untyped(responder);
11455
11456 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11457 Ok(decoded) => {
11458 handler
11459 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
11460 .await;
11461 Ok(())
11462 }
11463 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11464 ordinal: 8433556716759383021,
11465 error,
11466 }),
11467 }
11468 }
11469
11470 8097726607824333022 => {
11471 let responder = ::fidl_next::Responder::from_untyped(responder);
11472
11473 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11474 Ok(decoded) => {
11475 handler
11476 .rename(::fidl_next::Request::from_decoded(decoded), responder)
11477 .await;
11478 Ok(())
11479 }
11480 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11481 ordinal: 8097726607824333022,
11482 error,
11483 }),
11484 }
11485 }
11486
11487 2435901052462315657 => {
11488 let responder = ::fidl_next::Responder::from_untyped(responder);
11489
11490 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11491 Ok(decoded) => {
11492 handler
11493 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
11494 .await;
11495 Ok(())
11496 }
11497 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11498 ordinal: 2435901052462315657,
11499 error,
11500 }),
11501 }
11502 }
11503
11504 6275512344170098065 => {
11505 let responder = ::fidl_next::Responder::from_untyped(responder);
11506
11507 match ::fidl_next::AsDecoderExt::into_decoded(message) {
11508 Ok(decoded) => {
11509 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
11510 Ok(())
11511 }
11512 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11513 ordinal: 6275512344170098065,
11514 error,
11515 }),
11516 }
11517 }
11518
11519 ordinal => {
11520 handler.on_unknown_interaction(ordinal).await;
11521 if ::core::matches!(
11522 message.header().flexibility(),
11523 ::fidl_next::protocol::Flexibility::Strict
11524 ) {
11525 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11526 } else {
11527 responder
11528 .respond_framework_error(
11529 ordinal,
11530 ::fidl_next::FrameworkError::UnknownMethod,
11531 )
11532 .expect("encoding a framework error should never fail")
11533 .await?;
11534 Ok(())
11535 }
11536 }
11537 }
11538 }
11539}
11540
11541pub trait DirectoryClientHandler<
11545 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
11546 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11547>
11548{
11549 #[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"]
11550 fn on_open(
11551 &mut self,
11552
11553 request: ::fidl_next::Request<directory::OnOpen, ___T>,
11554 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11555
11556 #[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"]
11557 fn on_representation(
11558 &mut self,
11559
11560 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
11561 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11562
11563 fn on_unknown_interaction(
11564 &mut self,
11565 ordinal: u64,
11566 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11567 ::core::future::ready(())
11568 }
11569}
11570
11571impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Directory
11572where
11573 ___H: DirectoryClientHandler<___T> + ::core::marker::Send,
11574 ___T: ::fidl_next::Transport,
11575 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
11576 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11577 Constraint = (),
11578 >,
11579 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
11580 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11581 Constraint = (),
11582 >,
11583{
11584 async fn on_event(
11585 handler: &mut ___H,
11586 mut message: ::fidl_next::Message<___T>,
11587 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11588 match *message.header().ordinal {
11589 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11590 Ok(decoded) => {
11591 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
11592 Ok(())
11593 }
11594 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11595 ordinal: 9207534335756671346,
11596 error,
11597 }),
11598 },
11599
11600 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11601 Ok(decoded) => {
11602 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
11603 Ok(())
11604 }
11605 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11606 ordinal: 6679970090861613324,
11607 error,
11608 }),
11609 },
11610
11611 ordinal => {
11612 handler.on_unknown_interaction(ordinal).await;
11613 if ::core::matches!(
11614 message.header().flexibility(),
11615 ::fidl_next::protocol::Flexibility::Strict
11616 ) {
11617 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11618 } else {
11619 Ok(())
11620 }
11621 }
11622 }
11623 }
11624}
11625
11626pub trait DirectoryServerHandler<
11630 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
11631 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11632>
11633{
11634 #[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"]
11635 fn advisory_lock(
11636 &mut self,
11637
11638 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
11639
11640 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
11641 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11642
11643 fn clone(
11644 &mut self,
11645
11646 request: ::fidl_next::Request<directory::Clone, ___T>,
11647 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11648
11649 #[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"]
11650 fn close(
11651 &mut self,
11652
11653 responder: ::fidl_next::Responder<directory::Close, ___T>,
11654 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11655
11656 fn query(
11657 &mut self,
11658
11659 responder: ::fidl_next::Responder<directory::Query, ___T>,
11660 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11661
11662 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11663 fn deprecated_clone(
11664 &mut self,
11665
11666 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
11667 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11668
11669 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
11670 fn deprecated_get_attr(
11671 &mut self,
11672
11673 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
11674 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11675
11676 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
11677 fn deprecated_set_attr(
11678 &mut self,
11679
11680 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
11681
11682 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
11683 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11684
11685 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
11686 fn deprecated_get_flags(
11687 &mut self,
11688
11689 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
11690 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11691
11692 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11693 fn deprecated_set_flags(
11694 &mut self,
11695
11696 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
11697
11698 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
11699 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11700
11701 #[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"]
11702 fn get_flags(
11703 &mut self,
11704
11705 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
11706 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11707
11708 #[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"]
11709 fn set_flags(
11710 &mut self,
11711
11712 request: ::fidl_next::Request<directory::SetFlags, ___T>,
11713
11714 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
11715 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11716
11717 #[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"]
11718 fn query_filesystem(
11719 &mut self,
11720
11721 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
11722 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11723
11724 #[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"]
11725 fn get_attributes(
11726 &mut self,
11727
11728 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
11729
11730 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
11731 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11732
11733 #[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"]
11734 fn update_attributes(
11735 &mut self,
11736
11737 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
11738
11739 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
11740 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11741
11742 #[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"]
11743 fn sync(
11744 &mut self,
11745
11746 responder: ::fidl_next::Responder<directory::Sync, ___T>,
11747 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11748
11749 #[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"]
11750 fn list_extended_attributes(
11751 &mut self,
11752
11753 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
11754 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11755
11756 #[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"]
11757 fn get_extended_attribute(
11758 &mut self,
11759
11760 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
11761
11762 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
11763 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11764
11765 #[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"]
11766 fn set_extended_attribute(
11767 &mut self,
11768
11769 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
11770
11771 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
11772 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11773
11774 #[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"]
11775 fn remove_extended_attribute(
11776 &mut self,
11777
11778 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
11779
11780 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
11781 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11782
11783 #[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"]
11784 fn open(
11785 &mut self,
11786
11787 request: ::fidl_next::Request<directory::Open, ___T>,
11788 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11789
11790 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
11791 fn deprecated_open(
11792 &mut self,
11793
11794 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
11795 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11796
11797 #[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"]
11798 fn read_dirents(
11799 &mut self,
11800
11801 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
11802
11803 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
11804 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11805
11806 #[doc = " Resets the directory seek offset.\n\n This method does not require any rights, similar to ReadDirents.\n"]
11807 fn rewind(
11808 &mut self,
11809
11810 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
11811 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11812
11813 #[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"]
11814 fn get_token(
11815 &mut self,
11816
11817 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
11818 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11819
11820 #[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"]
11821 fn link(
11822 &mut self,
11823
11824 request: ::fidl_next::Request<directory::Link, ___T>,
11825
11826 responder: ::fidl_next::Responder<directory::Link, ___T>,
11827 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11828
11829 #[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"]
11830 fn unlink(
11831 &mut self,
11832
11833 request: ::fidl_next::Request<directory::Unlink, ___T>,
11834
11835 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
11836 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11837
11838 #[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"]
11839 fn rename(
11840 &mut self,
11841
11842 request: ::fidl_next::Request<directory::Rename, ___T>,
11843
11844 responder: ::fidl_next::Responder<directory::Rename, ___T>,
11845 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11846
11847 #[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"]
11848 fn create_symlink(
11849 &mut self,
11850
11851 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
11852
11853 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
11854 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11855
11856 #[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"]
11857 fn watch(
11858 &mut self,
11859
11860 request: ::fidl_next::Request<directory::Watch, ___T>,
11861
11862 responder: ::fidl_next::Responder<directory::Watch, ___T>,
11863 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11864
11865 fn on_unknown_interaction(
11866 &mut self,
11867 ordinal: u64,
11868 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11869 ::core::future::ready(())
11870 }
11871}
11872
11873impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Directory
11874where
11875 ___H: DirectoryServerHandler<___T> + ::core::marker::Send,
11876 ___T: ::fidl_next::Transport,
11877 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
11878 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11879 Constraint = (),
11880 >,
11881 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
11882 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11883 Constraint = (),
11884 >,
11885 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
11886 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11887 Constraint = (),
11888 >,
11889 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
11890 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11891 Constraint = (),
11892 >,
11893 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
11894 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11895 Constraint = (),
11896 >,
11897 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
11898 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11899 Constraint = (),
11900 >,
11901 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
11902 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11903 Constraint = (),
11904 >,
11905 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
11906 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11907 Constraint = (),
11908 >,
11909 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
11910 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11911 Constraint = (),
11912 >,
11913 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11914 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11915 Constraint = (),
11916 >,
11917 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11918 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11919 Constraint = (),
11920 >,
11921 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11922 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11923 Constraint = (),
11924 >,
11925 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
11926 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11927 Constraint = (),
11928 >,
11929 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
11930 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11931 Constraint = (),
11932 >,
11933 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
11934 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11935 Constraint = (),
11936 >,
11937 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
11938 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11939 Constraint = (),
11940 >,
11941 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
11942 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11943 Constraint = (),
11944 >,
11945 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
11946 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11947 Constraint = (),
11948 >,
11949 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
11950 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11951 Constraint = (),
11952 >,
11953 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
11954 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11955 Constraint = (),
11956 >,
11957{
11958 async fn on_one_way(
11959 handler: &mut ___H,
11960 mut message: ::fidl_next::Message<___T>,
11961 ) -> ::core::result::Result<
11962 (),
11963 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
11964 > {
11965 match *message.header().ordinal {
11966 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11967 Ok(decoded) => {
11968 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
11969 Ok(())
11970 }
11971 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11972 ordinal: 2366825959783828089,
11973 error,
11974 }),
11975 },
11976
11977 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11978 Ok(decoded) => {
11979 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
11980 Ok(())
11981 }
11982 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11983 ordinal: 6512600400724287855,
11984 error,
11985 }),
11986 },
11987
11988 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11989 Ok(decoded) => {
11990 handler
11991 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
11992 .await;
11993 Ok(())
11994 }
11995 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11996 ordinal: 5431626189872037072,
11997 error,
11998 }),
11999 },
12000
12001 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12002 Ok(decoded) => {
12003 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
12004 Ok(())
12005 }
12006 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12007 ordinal: 6236883748953765593,
12008 error,
12009 }),
12010 },
12011
12012 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12013 Ok(decoded) => {
12014 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
12015 Ok(())
12016 }
12017 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12018 ordinal: 3193127272456937152,
12019 error,
12020 }),
12021 },
12022
12023 ordinal => {
12024 handler.on_unknown_interaction(ordinal).await;
12025 if ::core::matches!(
12026 message.header().flexibility(),
12027 ::fidl_next::protocol::Flexibility::Strict
12028 ) {
12029 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12030 } else {
12031 Ok(())
12032 }
12033 }
12034 }
12035 }
12036
12037 async fn on_two_way(
12038 handler: &mut ___H,
12039 mut message: ::fidl_next::Message<___T>,
12040 responder: ::fidl_next::protocol::Responder<___T>,
12041 ) -> ::core::result::Result<
12042 (),
12043 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12044 > {
12045 match *message.header().ordinal {
12046 7992130864415541162 => {
12047 let responder = ::fidl_next::Responder::from_untyped(responder);
12048
12049 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12050 Ok(decoded) => {
12051 handler
12052 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
12053 .await;
12054 Ok(())
12055 }
12056 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12057 ordinal: 7992130864415541162,
12058 error,
12059 }),
12060 }
12061 }
12062
12063 6540867515453498750 => {
12064 let responder = ::fidl_next::Responder::from_untyped(responder);
12065
12066 handler.close(responder).await;
12067 Ok(())
12068 }
12069
12070 2763219980499352582 => {
12071 let responder = ::fidl_next::Responder::from_untyped(responder);
12072
12073 handler.query(responder).await;
12074 Ok(())
12075 }
12076
12077 8689798978500614909 => {
12078 let responder = ::fidl_next::Responder::from_untyped(responder);
12079
12080 handler.deprecated_get_attr(responder).await;
12081 Ok(())
12082 }
12083
12084 4721673413776871238 => {
12085 let responder = ::fidl_next::Responder::from_untyped(responder);
12086
12087 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12088 Ok(decoded) => {
12089 handler
12090 .deprecated_set_attr(
12091 ::fidl_next::Request::from_decoded(decoded),
12092 responder,
12093 )
12094 .await;
12095 Ok(())
12096 }
12097 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12098 ordinal: 4721673413776871238,
12099 error,
12100 }),
12101 }
12102 }
12103
12104 6595803110182632097 => {
12105 let responder = ::fidl_next::Responder::from_untyped(responder);
12106
12107 handler.deprecated_get_flags(responder).await;
12108 Ok(())
12109 }
12110
12111 5950864159036794675 => {
12112 let responder = ::fidl_next::Responder::from_untyped(responder);
12113
12114 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12115 Ok(decoded) => {
12116 handler
12117 .deprecated_set_flags(
12118 ::fidl_next::Request::from_decoded(decoded),
12119 responder,
12120 )
12121 .await;
12122 Ok(())
12123 }
12124 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12125 ordinal: 5950864159036794675,
12126 error,
12127 }),
12128 }
12129 }
12130
12131 105530239381466147 => {
12132 let responder = ::fidl_next::Responder::from_untyped(responder);
12133
12134 handler.get_flags(responder).await;
12135 Ok(())
12136 }
12137
12138 6172186066099445416 => {
12139 let responder = ::fidl_next::Responder::from_untyped(responder);
12140
12141 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12142 Ok(decoded) => {
12143 handler
12144 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
12145 .await;
12146 Ok(())
12147 }
12148 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12149 ordinal: 6172186066099445416,
12150 error,
12151 }),
12152 }
12153 }
12154
12155 8013111122914313744 => {
12156 let responder = ::fidl_next::Responder::from_untyped(responder);
12157
12158 handler.query_filesystem(responder).await;
12159 Ok(())
12160 }
12161
12162 4414537700416816443 => {
12163 let responder = ::fidl_next::Responder::from_untyped(responder);
12164
12165 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12166 Ok(decoded) => {
12167 handler
12168 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
12169 .await;
12170 Ok(())
12171 }
12172 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12173 ordinal: 4414537700416816443,
12174 error,
12175 }),
12176 }
12177 }
12178
12179 3677402239314018056 => {
12180 let responder = ::fidl_next::Responder::from_untyped(responder);
12181
12182 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12183 Ok(decoded) => {
12184 handler
12185 .update_attributes(
12186 ::fidl_next::Request::from_decoded(decoded),
12187 responder,
12188 )
12189 .await;
12190 Ok(())
12191 }
12192 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12193 ordinal: 3677402239314018056,
12194 error,
12195 }),
12196 }
12197 }
12198
12199 3196473584242777161 => {
12200 let responder = ::fidl_next::Responder::from_untyped(responder);
12201
12202 handler.sync(responder).await;
12203 Ok(())
12204 }
12205
12206 5043930208506967771 => {
12207 let responder = ::fidl_next::Responder::from_untyped(responder);
12208
12209 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12210 Ok(decoded) => {
12211 handler
12212 .get_extended_attribute(
12213 ::fidl_next::Request::from_decoded(decoded),
12214 responder,
12215 )
12216 .await;
12217 Ok(())
12218 }
12219 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12220 ordinal: 5043930208506967771,
12221 error,
12222 }),
12223 }
12224 }
12225
12226 5374223046099989052 => {
12227 let responder = ::fidl_next::Responder::from_untyped(responder);
12228
12229 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12230 Ok(decoded) => {
12231 handler
12232 .set_extended_attribute(
12233 ::fidl_next::Request::from_decoded(decoded),
12234 responder,
12235 )
12236 .await;
12237 Ok(())
12238 }
12239 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12240 ordinal: 5374223046099989052,
12241 error,
12242 }),
12243 }
12244 }
12245
12246 8794297771444732717 => {
12247 let responder = ::fidl_next::Responder::from_untyped(responder);
12248
12249 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12250 Ok(decoded) => {
12251 handler
12252 .remove_extended_attribute(
12253 ::fidl_next::Request::from_decoded(decoded),
12254 responder,
12255 )
12256 .await;
12257 Ok(())
12258 }
12259 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12260 ordinal: 8794297771444732717,
12261 error,
12262 }),
12263 }
12264 }
12265
12266 3855785432100874762 => {
12267 let responder = ::fidl_next::Responder::from_untyped(responder);
12268
12269 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12270 Ok(decoded) => {
12271 handler
12272 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
12273 .await;
12274 Ok(())
12275 }
12276 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12277 ordinal: 3855785432100874762,
12278 error,
12279 }),
12280 }
12281 }
12282
12283 1635123508515392625 => {
12284 let responder = ::fidl_next::Responder::from_untyped(responder);
12285
12286 handler.rewind(responder).await;
12287 Ok(())
12288 }
12289
12290 2787337947777369685 => {
12291 let responder = ::fidl_next::Responder::from_untyped(responder);
12292
12293 handler.get_token(responder).await;
12294 Ok(())
12295 }
12296
12297 8360374984291987687 => {
12298 let responder = ::fidl_next::Responder::from_untyped(responder);
12299
12300 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12301 Ok(decoded) => {
12302 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
12303 Ok(())
12304 }
12305 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12306 ordinal: 8360374984291987687,
12307 error,
12308 }),
12309 }
12310 }
12311
12312 8433556716759383021 => {
12313 let responder = ::fidl_next::Responder::from_untyped(responder);
12314
12315 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12316 Ok(decoded) => {
12317 handler
12318 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
12319 .await;
12320 Ok(())
12321 }
12322 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12323 ordinal: 8433556716759383021,
12324 error,
12325 }),
12326 }
12327 }
12328
12329 8097726607824333022 => {
12330 let responder = ::fidl_next::Responder::from_untyped(responder);
12331
12332 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12333 Ok(decoded) => {
12334 handler
12335 .rename(::fidl_next::Request::from_decoded(decoded), responder)
12336 .await;
12337 Ok(())
12338 }
12339 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12340 ordinal: 8097726607824333022,
12341 error,
12342 }),
12343 }
12344 }
12345
12346 2435901052462315657 => {
12347 let responder = ::fidl_next::Responder::from_untyped(responder);
12348
12349 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12350 Ok(decoded) => {
12351 handler
12352 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
12353 .await;
12354 Ok(())
12355 }
12356 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12357 ordinal: 2435901052462315657,
12358 error,
12359 }),
12360 }
12361 }
12362
12363 6275512344170098065 => {
12364 let responder = ::fidl_next::Responder::from_untyped(responder);
12365
12366 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12367 Ok(decoded) => {
12368 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
12369 Ok(())
12370 }
12371 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12372 ordinal: 6275512344170098065,
12373 error,
12374 }),
12375 }
12376 }
12377
12378 ordinal => {
12379 handler.on_unknown_interaction(ordinal).await;
12380 if ::core::matches!(
12381 message.header().flexibility(),
12382 ::fidl_next::protocol::Flexibility::Strict
12383 ) {
12384 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12385 } else {
12386 responder
12387 .respond_framework_error(
12388 ordinal,
12389 ::fidl_next::FrameworkError::UnknownMethod,
12390 )
12391 .expect("encoding a framework error should never fail")
12392 .await?;
12393 Ok(())
12394 }
12395 }
12396 }
12397 }
12398}
12399
12400impl<___T> DirectoryClientHandler<___T> for ::fidl_next::IgnoreEvents
12401where
12402 ___T: ::fidl_next::Transport,
12403{
12404 async fn on_open(&mut self, _: ::fidl_next::Request<directory::OnOpen, ___T>) {}
12405
12406 async fn on_representation(
12407 &mut self,
12408
12409 _: ::fidl_next::Request<directory::OnRepresentation, ___T>,
12410 ) {
12411 }
12412
12413 async fn on_unknown_interaction(&mut self, _: u64) {}
12414}
12415
12416impl<___H, ___T> DirectoryLocalClientHandler<___T> for ::fidl_next::Local<___H>
12417where
12418 ___H: DirectoryClientHandler<___T>,
12419 ___T: ::fidl_next::Transport,
12420{
12421 async fn on_open(&mut self, request: ::fidl_next::Request<directory::OnOpen, ___T>) {
12422 ___H::on_open(&mut self.0, request).await
12423 }
12424
12425 async fn on_representation(
12426 &mut self,
12427
12428 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
12429 ) {
12430 ___H::on_representation(&mut self.0, request).await
12431 }
12432
12433 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12434 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12435 }
12436}
12437
12438impl<___H, ___T> DirectoryLocalServerHandler<___T> for ::fidl_next::Local<___H>
12439where
12440 ___H: DirectoryServerHandler<___T>,
12441 ___T: ::fidl_next::Transport,
12442{
12443 async fn advisory_lock(
12444 &mut self,
12445
12446 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
12447
12448 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
12449 ) {
12450 ___H::advisory_lock(&mut self.0, request, responder).await
12451 }
12452
12453 async fn clone(&mut self, request: ::fidl_next::Request<directory::Clone, ___T>) {
12454 ___H::clone(&mut self.0, request).await
12455 }
12456
12457 async fn close(&mut self, responder: ::fidl_next::Responder<directory::Close, ___T>) {
12458 ___H::close(&mut self.0, responder).await
12459 }
12460
12461 async fn query(&mut self, responder: ::fidl_next::Responder<directory::Query, ___T>) {
12462 ___H::query(&mut self.0, responder).await
12463 }
12464
12465 async fn deprecated_clone(
12466 &mut self,
12467
12468 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
12469 ) {
12470 ___H::deprecated_clone(&mut self.0, request).await
12471 }
12472
12473 async fn deprecated_get_attr(
12474 &mut self,
12475
12476 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
12477 ) {
12478 ___H::deprecated_get_attr(&mut self.0, responder).await
12479 }
12480
12481 async fn deprecated_set_attr(
12482 &mut self,
12483
12484 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
12485
12486 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
12487 ) {
12488 ___H::deprecated_set_attr(&mut self.0, request, responder).await
12489 }
12490
12491 async fn deprecated_get_flags(
12492 &mut self,
12493
12494 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
12495 ) {
12496 ___H::deprecated_get_flags(&mut self.0, responder).await
12497 }
12498
12499 async fn deprecated_set_flags(
12500 &mut self,
12501
12502 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
12503
12504 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
12505 ) {
12506 ___H::deprecated_set_flags(&mut self.0, request, responder).await
12507 }
12508
12509 async fn get_flags(&mut self, responder: ::fidl_next::Responder<directory::GetFlags, ___T>) {
12510 ___H::get_flags(&mut self.0, responder).await
12511 }
12512
12513 async fn set_flags(
12514 &mut self,
12515
12516 request: ::fidl_next::Request<directory::SetFlags, ___T>,
12517
12518 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
12519 ) {
12520 ___H::set_flags(&mut self.0, request, responder).await
12521 }
12522
12523 async fn query_filesystem(
12524 &mut self,
12525
12526 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
12527 ) {
12528 ___H::query_filesystem(&mut self.0, responder).await
12529 }
12530
12531 async fn get_attributes(
12532 &mut self,
12533
12534 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
12535
12536 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
12537 ) {
12538 ___H::get_attributes(&mut self.0, request, responder).await
12539 }
12540
12541 async fn update_attributes(
12542 &mut self,
12543
12544 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
12545
12546 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
12547 ) {
12548 ___H::update_attributes(&mut self.0, request, responder).await
12549 }
12550
12551 async fn sync(&mut self, responder: ::fidl_next::Responder<directory::Sync, ___T>) {
12552 ___H::sync(&mut self.0, responder).await
12553 }
12554
12555 async fn list_extended_attributes(
12556 &mut self,
12557
12558 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
12559 ) {
12560 ___H::list_extended_attributes(&mut self.0, request).await
12561 }
12562
12563 async fn get_extended_attribute(
12564 &mut self,
12565
12566 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
12567
12568 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
12569 ) {
12570 ___H::get_extended_attribute(&mut self.0, request, responder).await
12571 }
12572
12573 async fn set_extended_attribute(
12574 &mut self,
12575
12576 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
12577
12578 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
12579 ) {
12580 ___H::set_extended_attribute(&mut self.0, request, responder).await
12581 }
12582
12583 async fn remove_extended_attribute(
12584 &mut self,
12585
12586 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
12587
12588 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
12589 ) {
12590 ___H::remove_extended_attribute(&mut self.0, request, responder).await
12591 }
12592
12593 async fn open(&mut self, request: ::fidl_next::Request<directory::Open, ___T>) {
12594 ___H::open(&mut self.0, request).await
12595 }
12596
12597 async fn deprecated_open(
12598 &mut self,
12599
12600 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
12601 ) {
12602 ___H::deprecated_open(&mut self.0, request).await
12603 }
12604
12605 async fn read_dirents(
12606 &mut self,
12607
12608 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
12609
12610 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
12611 ) {
12612 ___H::read_dirents(&mut self.0, request, responder).await
12613 }
12614
12615 async fn rewind(&mut self, responder: ::fidl_next::Responder<directory::Rewind, ___T>) {
12616 ___H::rewind(&mut self.0, responder).await
12617 }
12618
12619 async fn get_token(&mut self, responder: ::fidl_next::Responder<directory::GetToken, ___T>) {
12620 ___H::get_token(&mut self.0, responder).await
12621 }
12622
12623 async fn link(
12624 &mut self,
12625
12626 request: ::fidl_next::Request<directory::Link, ___T>,
12627
12628 responder: ::fidl_next::Responder<directory::Link, ___T>,
12629 ) {
12630 ___H::link(&mut self.0, request, responder).await
12631 }
12632
12633 async fn unlink(
12634 &mut self,
12635
12636 request: ::fidl_next::Request<directory::Unlink, ___T>,
12637
12638 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
12639 ) {
12640 ___H::unlink(&mut self.0, request, responder).await
12641 }
12642
12643 async fn rename(
12644 &mut self,
12645
12646 request: ::fidl_next::Request<directory::Rename, ___T>,
12647
12648 responder: ::fidl_next::Responder<directory::Rename, ___T>,
12649 ) {
12650 ___H::rename(&mut self.0, request, responder).await
12651 }
12652
12653 async fn create_symlink(
12654 &mut self,
12655
12656 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
12657
12658 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
12659 ) {
12660 ___H::create_symlink(&mut self.0, request, responder).await
12661 }
12662
12663 async fn watch(
12664 &mut self,
12665
12666 request: ::fidl_next::Request<directory::Watch, ___T>,
12667
12668 responder: ::fidl_next::Responder<directory::Watch, ___T>,
12669 ) {
12670 ___H::watch(&mut self.0, request, responder).await
12671 }
12672
12673 async fn on_unknown_interaction(&mut self, ordinal: u64) {
12674 ___H::on_unknown_interaction(&mut self.0, ordinal).await
12675 }
12676}
12677
12678#[derive(PartialEq, Debug)]
12680pub struct Linkable;
12681
12682#[cfg(target_os = "fuchsia")]
12683impl ::fidl_next::HasTransport for Linkable {
12684 type Transport = ::fdomain_client::Channel;
12685}
12686
12687pub mod linkable {
12688 pub mod prelude {
12689 pub use crate::{
12690 Linkable, LinkableClientHandler, LinkableLocalClientHandler,
12691 LinkableLocalServerHandler, LinkableServerHandler, linkable,
12692 };
12693
12694 pub use crate::natural::LinkableLinkIntoRequest;
12695
12696 pub use crate::natural::LinkableLinkIntoResponse;
12697 }
12698
12699 pub struct LinkInto;
12700
12701 impl ::fidl_next::Method for LinkInto {
12702 const ORDINAL: u64 = 6121399674497678964;
12703 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
12704 ::fidl_next::protocol::Flexibility::Strict;
12705
12706 type Protocol = crate::Linkable;
12707
12708 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
12709 }
12710
12711 impl ::fidl_next::TwoWayMethod for LinkInto {
12712 type Response = ::fidl_next::wire::Result<
12713 'static,
12714 crate::wire::LinkableLinkIntoResponse,
12715 ::fidl_next::wire::fuchsia::Status,
12716 >;
12717 }
12718
12719 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
12720 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
12721
12722 fn respond(response: ___R) -> Self::Output {
12723 ::core::result::Result::Ok(response)
12724 }
12725 }
12726
12727 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
12728 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
12729
12730 fn respond_err(response: ___R) -> Self::Output {
12731 ::core::result::Result::Err(response)
12732 }
12733 }
12734
12735 mod ___detail {
12736 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Linkable
12737 where
12738 ___T: ::fidl_next::Transport,
12739 {
12740 type Client = LinkableClient<___T>;
12741 type Server = LinkableServer<___T>;
12742 }
12743
12744 #[repr(transparent)]
12746 pub struct LinkableClient<___T: ::fidl_next::Transport> {
12747 #[allow(dead_code)]
12748 client: ::fidl_next::protocol::Client<___T>,
12749 }
12750
12751 impl<___T> LinkableClient<___T>
12752 where
12753 ___T: ::fidl_next::Transport,
12754 {
12755 #[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"]
12756 pub fn link_into(
12757 &self,
12758
12759 dst_parent_token: impl ::fidl_next::Encode<
12760 ::fdomain_client::fidl_next::wire::Handle,
12761 <___T as ::fidl_next::Transport>::SendBuffer,
12762 >,
12763
12764 dst: impl ::fidl_next::Encode<
12765 ::fidl_next::wire::String<'static>,
12766 <___T as ::fidl_next::Transport>::SendBuffer,
12767 >,
12768 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
12769 where
12770 <___T as ::fidl_next::Transport>::SendBuffer:
12771 ::fidl_next::encoder::InternalHandleEncoder,
12772 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
12773 <___T as ::fidl_next::Transport>::SendBuffer:
12774 ::fdomain_client::fidl_next::HandleEncoder,
12775 {
12776 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
12777 dst_parent_token,
12778
12779 dst,
12780 })
12781 }
12782
12783 #[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"]
12784 pub fn link_into_with<___R>(
12785 &self,
12786 request: ___R,
12787 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
12788 where
12789 ___R: ::fidl_next::Encode<
12790 crate::wire::LinkableLinkIntoRequest<'static>,
12791 <___T as ::fidl_next::Transport>::SendBuffer,
12792 >,
12793 {
12794 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
12795 6121399674497678964,
12796 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
12797 request,
12798 ))
12799 }
12800 }
12801
12802 #[repr(transparent)]
12804 pub struct LinkableServer<___T: ::fidl_next::Transport> {
12805 server: ::fidl_next::protocol::Server<___T>,
12806 }
12807
12808 impl<___T> LinkableServer<___T> where ___T: ::fidl_next::Transport {}
12809 }
12810}
12811
12812#[diagnostic::on_unimplemented(
12813 note = "If {Self} implements the non-local LinkableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
12814)]
12815
12816pub trait LinkableLocalClientHandler<
12820 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
12821 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12822>
12823{
12824}
12825
12826impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Linkable
12827where
12828 ___H: LinkableLocalClientHandler<___T>,
12829 ___T: ::fidl_next::Transport,
12830{
12831 async fn on_event(
12832 handler: &mut ___H,
12833 mut message: ::fidl_next::Message<___T>,
12834 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12835 match *message.header().ordinal {
12836 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12837 }
12838 }
12839}
12840
12841#[diagnostic::on_unimplemented(
12842 note = "If {Self} implements the non-local LinkableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
12843)]
12844
12845pub trait LinkableLocalServerHandler<
12849 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
12850 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12851>
12852{
12853 #[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"]
12854 fn link_into(
12855 &mut self,
12856
12857 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12858
12859 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12860 ) -> impl ::core::future::Future<Output = ()>;
12861}
12862
12863impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Linkable
12864where
12865 ___H: LinkableLocalServerHandler<___T>,
12866 ___T: ::fidl_next::Transport,
12867 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12868 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12869 Constraint = (),
12870 >,
12871{
12872 async fn on_one_way(
12873 handler: &mut ___H,
12874 mut message: ::fidl_next::Message<___T>,
12875 ) -> ::core::result::Result<
12876 (),
12877 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12878 > {
12879 match *message.header().ordinal {
12880 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12881 }
12882 }
12883
12884 async fn on_two_way(
12885 handler: &mut ___H,
12886 mut message: ::fidl_next::Message<___T>,
12887 responder: ::fidl_next::protocol::Responder<___T>,
12888 ) -> ::core::result::Result<
12889 (),
12890 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12891 > {
12892 match *message.header().ordinal {
12893 6121399674497678964 => {
12894 let responder = ::fidl_next::Responder::from_untyped(responder);
12895
12896 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12897 Ok(decoded) => {
12898 handler
12899 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
12900 .await;
12901 Ok(())
12902 }
12903 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12904 ordinal: 6121399674497678964,
12905 error,
12906 }),
12907 }
12908 }
12909
12910 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12911 }
12912 }
12913}
12914
12915pub trait LinkableClientHandler<
12919 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
12920 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12921>
12922{
12923}
12924
12925impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Linkable
12926where
12927 ___H: LinkableClientHandler<___T> + ::core::marker::Send,
12928 ___T: ::fidl_next::Transport,
12929{
12930 async fn on_event(
12931 handler: &mut ___H,
12932 mut message: ::fidl_next::Message<___T>,
12933 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12934 match *message.header().ordinal {
12935 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12936 }
12937 }
12938}
12939
12940pub trait LinkableServerHandler<
12944 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
12945 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12946>
12947{
12948 #[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"]
12949 fn link_into(
12950 &mut self,
12951
12952 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
12953
12954 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
12955 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12956}
12957
12958impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Linkable
12959where
12960 ___H: LinkableServerHandler<___T> + ::core::marker::Send,
12961 ___T: ::fidl_next::Transport,
12962 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
12963 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12964 Constraint = (),
12965 >,
12966{
12967 async fn on_one_way(
12968 handler: &mut ___H,
12969 mut message: ::fidl_next::Message<___T>,
12970 ) -> ::core::result::Result<
12971 (),
12972 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12973 > {
12974 match *message.header().ordinal {
12975 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
12976 }
12977 }
12978
12979 async fn on_two_way(
12980 handler: &mut ___H,
12981 mut message: ::fidl_next::Message<___T>,
12982 responder: ::fidl_next::protocol::Responder<___T>,
12983 ) -> ::core::result::Result<
12984 (),
12985 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12986 > {
12987 match *message.header().ordinal {
12988 6121399674497678964 => {
12989 let responder = ::fidl_next::Responder::from_untyped(responder);
12990
12991 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12992 Ok(decoded) => {
12993 handler
12994 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
12995 .await;
12996 Ok(())
12997 }
12998 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12999 ordinal: 6121399674497678964,
13000 error,
13001 }),
13002 }
13003 }
13004
13005 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
13006 }
13007 }
13008}
13009
13010impl<___T> LinkableClientHandler<___T> for ::fidl_next::IgnoreEvents where
13011 ___T: ::fidl_next::Transport
13012{
13013}
13014
13015impl<___H, ___T> LinkableLocalClientHandler<___T> for ::fidl_next::Local<___H>
13016where
13017 ___H: LinkableClientHandler<___T>,
13018 ___T: ::fidl_next::Transport,
13019{
13020}
13021
13022impl<___H, ___T> LinkableLocalServerHandler<___T> for ::fidl_next::Local<___H>
13023where
13024 ___H: LinkableServerHandler<___T>,
13025 ___T: ::fidl_next::Transport,
13026{
13027 async fn link_into(
13028 &mut self,
13029
13030 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
13031
13032 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
13033 ) {
13034 ___H::link_into(&mut self.0, request, responder).await
13035 }
13036}
13037
13038#[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"]
13040#[derive(PartialEq, Debug)]
13041pub struct File;
13042
13043impl ::fidl_next::Discoverable for File {
13044 const PROTOCOL_NAME: &'static str = "fuchsia.io.File";
13045}
13046
13047#[cfg(target_os = "fuchsia")]
13048impl ::fidl_next::HasTransport for File {
13049 type Transport = ::fdomain_client::Channel;
13050}
13051
13052pub mod file {
13053 pub mod prelude {
13054 pub use crate::{
13055 File, FileClientHandler, FileLocalClientHandler, FileLocalServerHandler,
13056 FileServerHandler, file,
13057 };
13058
13059 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
13060
13061 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
13062
13063 pub use crate::natural::ExtendedAttributeValue;
13064
13065 pub use crate::natural::FileAllocateRequest;
13066
13067 pub use crate::natural::FileEnableVerityRequest;
13068
13069 pub use crate::natural::FileGetBackingMemoryRequest;
13070
13071 pub use crate::natural::FileInfo;
13072
13073 pub use crate::natural::FileReadAtRequest;
13074
13075 pub use crate::natural::FileResizeRequest;
13076
13077 pub use crate::natural::FileSeekRequest;
13078
13079 pub use crate::natural::FileWriteAtRequest;
13080
13081 pub use crate::natural::FileAllocateResponse;
13082
13083 pub use crate::natural::FileEnableVerityResponse;
13084
13085 pub use crate::natural::FileGetBackingMemoryResponse;
13086
13087 pub use crate::natural::FileReadAtResponse;
13088
13089 pub use crate::natural::FileResizeResponse;
13090
13091 pub use crate::natural::FileSeekResponse;
13092
13093 pub use crate::natural::FileWriteAtResponse;
13094
13095 pub use crate::natural::LinkableLinkIntoRequest;
13096
13097 pub use crate::natural::LinkableLinkIntoResponse;
13098
13099 pub use crate::natural::MutableNodeAttributes;
13100
13101 pub use crate::natural::NodeAttributes2;
13102
13103 pub use crate::natural::NodeDeprecatedCloneRequest;
13104
13105 pub use crate::natural::NodeDeprecatedGetAttrResponse;
13106
13107 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
13108
13109 pub use crate::natural::NodeDeprecatedSetAttrRequest;
13110
13111 pub use crate::natural::NodeDeprecatedSetAttrResponse;
13112
13113 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
13114
13115 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
13116
13117 pub use crate::natural::NodeGetAttributesRequest;
13118
13119 pub use crate::natural::NodeGetExtendedAttributeRequest;
13120
13121 pub use crate::natural::NodeListExtendedAttributesRequest;
13122
13123 pub use crate::natural::NodeOnOpenRequest;
13124
13125 pub use crate::natural::NodeQueryFilesystemResponse;
13126
13127 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
13128
13129 pub use crate::natural::NodeSetExtendedAttributeRequest;
13130
13131 pub use crate::natural::NodeSetFlagsRequest;
13132
13133 pub use crate::natural::NodeGetFlagsResponse;
13134
13135 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
13136
13137 pub use crate::natural::NodeSetExtendedAttributeResponse;
13138
13139 pub use crate::natural::NodeSetFlagsResponse;
13140
13141 pub use crate::natural::NodeSyncResponse;
13142
13143 pub use crate::natural::NodeUpdateAttributesResponse;
13144
13145 pub use crate::natural::ReadableReadRequest;
13146
13147 pub use crate::natural::ReadableReadResponse;
13148
13149 pub use crate::natural::Representation;
13150
13151 pub use crate::natural::WritableWriteRequest;
13152
13153 pub use crate::natural::WritableWriteResponse;
13154
13155 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
13156
13157 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
13158
13159 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
13160 }
13161
13162 pub struct AdvisoryLock;
13163
13164 impl ::fidl_next::Method for AdvisoryLock {
13165 const ORDINAL: u64 = 7992130864415541162;
13166 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13167 ::fidl_next::protocol::Flexibility::Strict;
13168
13169 type Protocol = crate::File;
13170
13171 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
13172 }
13173
13174 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
13175 type Response = ::fidl_next::wire::Result<
13176 'static,
13177 crate::wire::AdvisoryLockingAdvisoryLockResponse,
13178 ::fidl_next::wire::fuchsia::Status,
13179 >;
13180 }
13181
13182 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
13183 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13184
13185 fn respond(response: ___R) -> Self::Output {
13186 ::core::result::Result::Ok(response)
13187 }
13188 }
13189
13190 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
13191 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13192
13193 fn respond_err(response: ___R) -> Self::Output {
13194 ::core::result::Result::Err(response)
13195 }
13196 }
13197
13198 pub struct LinkInto;
13199
13200 impl ::fidl_next::Method for LinkInto {
13201 const ORDINAL: u64 = 6121399674497678964;
13202 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13203 ::fidl_next::protocol::Flexibility::Strict;
13204
13205 type Protocol = crate::File;
13206
13207 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
13208 }
13209
13210 impl ::fidl_next::TwoWayMethod for LinkInto {
13211 type Response = ::fidl_next::wire::Result<
13212 'static,
13213 crate::wire::LinkableLinkIntoResponse,
13214 ::fidl_next::wire::fuchsia::Status,
13215 >;
13216 }
13217
13218 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
13219 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13220
13221 fn respond(response: ___R) -> Self::Output {
13222 ::core::result::Result::Ok(response)
13223 }
13224 }
13225
13226 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
13227 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13228
13229 fn respond_err(response: ___R) -> Self::Output {
13230 ::core::result::Result::Err(response)
13231 }
13232 }
13233
13234 pub struct Clone;
13235
13236 impl ::fidl_next::Method for Clone {
13237 const ORDINAL: u64 = 2366825959783828089;
13238 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13239 ::fidl_next::protocol::Flexibility::Strict;
13240
13241 type Protocol = crate::File;
13242
13243 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
13244 }
13245
13246 pub struct Close;
13247
13248 impl ::fidl_next::Method for Close {
13249 const ORDINAL: u64 = 6540867515453498750;
13250 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13251 ::fidl_next::protocol::Flexibility::Strict;
13252
13253 type Protocol = crate::File;
13254
13255 type Request = ::fidl_next::wire::EmptyMessageBody;
13256 }
13257
13258 impl ::fidl_next::TwoWayMethod for Close {
13259 type Response = ::fidl_next::wire::Result<
13260 'static,
13261 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
13262 ::fidl_next::wire::Int32,
13263 >;
13264 }
13265
13266 impl<___R> ::fidl_next::Respond<___R> for Close {
13267 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13268
13269 fn respond(response: ___R) -> Self::Output {
13270 ::core::result::Result::Ok(response)
13271 }
13272 }
13273
13274 impl<___R> ::fidl_next::RespondErr<___R> for Close {
13275 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13276
13277 fn respond_err(response: ___R) -> Self::Output {
13278 ::core::result::Result::Err(response)
13279 }
13280 }
13281
13282 pub struct Query;
13283
13284 impl ::fidl_next::Method for Query {
13285 const ORDINAL: u64 = 2763219980499352582;
13286 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13287 ::fidl_next::protocol::Flexibility::Strict;
13288
13289 type Protocol = crate::File;
13290
13291 type Request = ::fidl_next::wire::EmptyMessageBody;
13292 }
13293
13294 impl ::fidl_next::TwoWayMethod for Query {
13295 type Response = ::fidl_next::wire::Strict<
13296 ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
13297 >;
13298 }
13299
13300 impl<___R> ::fidl_next::Respond<___R> for Query {
13301 type Output = ::fidl_next::Strict<
13302 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>,
13303 >;
13304
13305 fn respond(response: ___R) -> Self::Output {
13306 ::fidl_next::Strict(::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse {
13307 protocol: response,
13308 })
13309 }
13310 }
13311
13312 pub struct DeprecatedClone;
13313
13314 impl ::fidl_next::Method for DeprecatedClone {
13315 const ORDINAL: u64 = 6512600400724287855;
13316 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13317 ::fidl_next::protocol::Flexibility::Flexible;
13318
13319 type Protocol = crate::File;
13320
13321 type Request = crate::wire::NodeDeprecatedCloneRequest;
13322 }
13323
13324 pub struct OnOpen;
13325
13326 impl ::fidl_next::Method for OnOpen {
13327 const ORDINAL: u64 = 9207534335756671346;
13328 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13329 ::fidl_next::protocol::Flexibility::Flexible;
13330
13331 type Protocol = crate::File;
13332
13333 type Request = crate::wire::NodeOnOpenRequest<'static>;
13334 }
13335
13336 pub struct DeprecatedGetAttr;
13337
13338 impl ::fidl_next::Method for DeprecatedGetAttr {
13339 const ORDINAL: u64 = 8689798978500614909;
13340 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13341 ::fidl_next::protocol::Flexibility::Strict;
13342
13343 type Protocol = crate::File;
13344
13345 type Request = ::fidl_next::wire::EmptyMessageBody;
13346 }
13347
13348 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
13349 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
13350 }
13351
13352 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
13353 type Output = ::fidl_next::Strict<___R>;
13354
13355 fn respond(response: ___R) -> Self::Output {
13356 ::fidl_next::Strict(response)
13357 }
13358 }
13359
13360 pub struct DeprecatedSetAttr;
13361
13362 impl ::fidl_next::Method for DeprecatedSetAttr {
13363 const ORDINAL: u64 = 4721673413776871238;
13364 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13365 ::fidl_next::protocol::Flexibility::Strict;
13366
13367 type Protocol = crate::File;
13368
13369 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
13370 }
13371
13372 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
13373 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
13374 }
13375
13376 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
13377 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
13378
13379 fn respond(response: ___R) -> Self::Output {
13380 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
13381 }
13382 }
13383
13384 pub struct DeprecatedGetFlags;
13385
13386 impl ::fidl_next::Method for DeprecatedGetFlags {
13387 const ORDINAL: u64 = 6595803110182632097;
13388 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13389 ::fidl_next::protocol::Flexibility::Strict;
13390
13391 type Protocol = crate::File;
13392
13393 type Request = ::fidl_next::wire::EmptyMessageBody;
13394 }
13395
13396 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
13397 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
13398 }
13399
13400 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
13401 type Output = ::fidl_next::Strict<___R>;
13402
13403 fn respond(response: ___R) -> Self::Output {
13404 ::fidl_next::Strict(response)
13405 }
13406 }
13407
13408 pub struct DeprecatedSetFlags;
13409
13410 impl ::fidl_next::Method for DeprecatedSetFlags {
13411 const ORDINAL: u64 = 5950864159036794675;
13412 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13413 ::fidl_next::protocol::Flexibility::Strict;
13414
13415 type Protocol = crate::File;
13416
13417 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
13418 }
13419
13420 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
13421 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
13422 }
13423
13424 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
13425 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
13426
13427 fn respond(response: ___R) -> Self::Output {
13428 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
13429 }
13430 }
13431
13432 pub struct GetFlags;
13433
13434 impl ::fidl_next::Method for GetFlags {
13435 const ORDINAL: u64 = 105530239381466147;
13436 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13437 ::fidl_next::protocol::Flexibility::Flexible;
13438
13439 type Protocol = crate::File;
13440
13441 type Request = ::fidl_next::wire::EmptyMessageBody;
13442 }
13443
13444 impl ::fidl_next::TwoWayMethod for GetFlags {
13445 type Response = ::fidl_next::wire::Result<
13446 'static,
13447 crate::wire::NodeGetFlagsResponse,
13448 ::fidl_next::wire::fuchsia::Status,
13449 >;
13450 }
13451
13452 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
13453 type Output = ::core::result::Result<
13454 crate::generic::NodeGetFlagsResponse<___R>,
13455 ::fidl_next::never::Never,
13456 >;
13457
13458 fn respond(response: ___R) -> Self::Output {
13459 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
13460 }
13461 }
13462
13463 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
13464 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13465
13466 fn respond_err(response: ___R) -> Self::Output {
13467 ::core::result::Result::Err(response)
13468 }
13469 }
13470
13471 pub struct SetFlags;
13472
13473 impl ::fidl_next::Method for SetFlags {
13474 const ORDINAL: u64 = 6172186066099445416;
13475 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13476 ::fidl_next::protocol::Flexibility::Flexible;
13477
13478 type Protocol = crate::File;
13479
13480 type Request = crate::wire::NodeSetFlagsRequest;
13481 }
13482
13483 impl ::fidl_next::TwoWayMethod for SetFlags {
13484 type Response = ::fidl_next::wire::Result<
13485 'static,
13486 crate::wire::NodeSetFlagsResponse,
13487 ::fidl_next::wire::fuchsia::Status,
13488 >;
13489 }
13490
13491 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
13492 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13493
13494 fn respond(response: ___R) -> Self::Output {
13495 ::core::result::Result::Ok(response)
13496 }
13497 }
13498
13499 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
13500 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13501
13502 fn respond_err(response: ___R) -> Self::Output {
13503 ::core::result::Result::Err(response)
13504 }
13505 }
13506
13507 pub struct QueryFilesystem;
13508
13509 impl ::fidl_next::Method for QueryFilesystem {
13510 const ORDINAL: u64 = 8013111122914313744;
13511 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13512 ::fidl_next::protocol::Flexibility::Strict;
13513
13514 type Protocol = crate::File;
13515
13516 type Request = ::fidl_next::wire::EmptyMessageBody;
13517 }
13518
13519 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
13520 type Response =
13521 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
13522 }
13523
13524 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
13525 type Output = ::fidl_next::Strict<___R>;
13526
13527 fn respond(response: ___R) -> Self::Output {
13528 ::fidl_next::Strict(response)
13529 }
13530 }
13531
13532 pub struct OnRepresentation;
13533
13534 impl ::fidl_next::Method for OnRepresentation {
13535 const ORDINAL: u64 = 6679970090861613324;
13536 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13537 ::fidl_next::protocol::Flexibility::Strict;
13538
13539 type Protocol = crate::File;
13540
13541 type Request = crate::wire::Representation<'static>;
13542 }
13543
13544 pub struct GetAttributes;
13545
13546 impl ::fidl_next::Method for GetAttributes {
13547 const ORDINAL: u64 = 4414537700416816443;
13548 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13549 ::fidl_next::protocol::Flexibility::Strict;
13550
13551 type Protocol = crate::File;
13552
13553 type Request = crate::wire::NodeGetAttributesRequest;
13554 }
13555
13556 impl ::fidl_next::TwoWayMethod for GetAttributes {
13557 type Response = ::fidl_next::wire::Result<
13558 'static,
13559 crate::wire::NodeAttributes2<'static>,
13560 ::fidl_next::wire::fuchsia::Status,
13561 >;
13562 }
13563
13564 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
13565 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13566
13567 fn respond(response: ___R) -> Self::Output {
13568 ::core::result::Result::Ok(response)
13569 }
13570 }
13571
13572 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
13573 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13574
13575 fn respond_err(response: ___R) -> Self::Output {
13576 ::core::result::Result::Err(response)
13577 }
13578 }
13579
13580 pub struct UpdateAttributes;
13581
13582 impl ::fidl_next::Method for UpdateAttributes {
13583 const ORDINAL: u64 = 3677402239314018056;
13584 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13585 ::fidl_next::protocol::Flexibility::Strict;
13586
13587 type Protocol = crate::File;
13588
13589 type Request = crate::wire::MutableNodeAttributes<'static>;
13590 }
13591
13592 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
13593 type Response = ::fidl_next::wire::Result<
13594 'static,
13595 crate::wire::NodeUpdateAttributesResponse,
13596 ::fidl_next::wire::fuchsia::Status,
13597 >;
13598 }
13599
13600 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
13601 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13602
13603 fn respond(response: ___R) -> Self::Output {
13604 ::core::result::Result::Ok(response)
13605 }
13606 }
13607
13608 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
13609 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13610
13611 fn respond_err(response: ___R) -> Self::Output {
13612 ::core::result::Result::Err(response)
13613 }
13614 }
13615
13616 pub struct Sync;
13617
13618 impl ::fidl_next::Method for Sync {
13619 const ORDINAL: u64 = 3196473584242777161;
13620 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13621 ::fidl_next::protocol::Flexibility::Strict;
13622
13623 type Protocol = crate::File;
13624
13625 type Request = ::fidl_next::wire::EmptyMessageBody;
13626 }
13627
13628 impl ::fidl_next::TwoWayMethod for Sync {
13629 type Response = ::fidl_next::wire::Result<
13630 'static,
13631 crate::wire::NodeSyncResponse,
13632 ::fidl_next::wire::fuchsia::Status,
13633 >;
13634 }
13635
13636 impl<___R> ::fidl_next::Respond<___R> for Sync {
13637 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13638
13639 fn respond(response: ___R) -> Self::Output {
13640 ::core::result::Result::Ok(response)
13641 }
13642 }
13643
13644 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
13645 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13646
13647 fn respond_err(response: ___R) -> Self::Output {
13648 ::core::result::Result::Err(response)
13649 }
13650 }
13651
13652 pub struct ListExtendedAttributes;
13653
13654 impl ::fidl_next::Method for ListExtendedAttributes {
13655 const ORDINAL: u64 = 5431626189872037072;
13656 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13657 ::fidl_next::protocol::Flexibility::Strict;
13658
13659 type Protocol = crate::File;
13660
13661 type Request = crate::wire::NodeListExtendedAttributesRequest;
13662 }
13663
13664 pub struct GetExtendedAttribute;
13665
13666 impl ::fidl_next::Method for GetExtendedAttribute {
13667 const ORDINAL: u64 = 5043930208506967771;
13668 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13669 ::fidl_next::protocol::Flexibility::Strict;
13670
13671 type Protocol = crate::File;
13672
13673 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
13674 }
13675
13676 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
13677 type Response = ::fidl_next::wire::Result<
13678 'static,
13679 crate::wire::ExtendedAttributeValue<'static>,
13680 ::fidl_next::wire::fuchsia::Status,
13681 >;
13682 }
13683
13684 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
13685 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13686
13687 fn respond(response: ___R) -> Self::Output {
13688 ::core::result::Result::Ok(response)
13689 }
13690 }
13691
13692 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
13693 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13694
13695 fn respond_err(response: ___R) -> Self::Output {
13696 ::core::result::Result::Err(response)
13697 }
13698 }
13699
13700 pub struct SetExtendedAttribute;
13701
13702 impl ::fidl_next::Method for SetExtendedAttribute {
13703 const ORDINAL: u64 = 5374223046099989052;
13704 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13705 ::fidl_next::protocol::Flexibility::Strict;
13706
13707 type Protocol = crate::File;
13708
13709 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
13710 }
13711
13712 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
13713 type Response = ::fidl_next::wire::Result<
13714 'static,
13715 crate::wire::NodeSetExtendedAttributeResponse,
13716 ::fidl_next::wire::fuchsia::Status,
13717 >;
13718 }
13719
13720 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
13721 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13722
13723 fn respond(response: ___R) -> Self::Output {
13724 ::core::result::Result::Ok(response)
13725 }
13726 }
13727
13728 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
13729 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13730
13731 fn respond_err(response: ___R) -> Self::Output {
13732 ::core::result::Result::Err(response)
13733 }
13734 }
13735
13736 pub struct RemoveExtendedAttribute;
13737
13738 impl ::fidl_next::Method for RemoveExtendedAttribute {
13739 const ORDINAL: u64 = 8794297771444732717;
13740 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13741 ::fidl_next::protocol::Flexibility::Strict;
13742
13743 type Protocol = crate::File;
13744
13745 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
13746 }
13747
13748 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
13749 type Response = ::fidl_next::wire::Result<
13750 'static,
13751 crate::wire::NodeRemoveExtendedAttributeResponse,
13752 ::fidl_next::wire::fuchsia::Status,
13753 >;
13754 }
13755
13756 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
13757 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13758
13759 fn respond(response: ___R) -> Self::Output {
13760 ::core::result::Result::Ok(response)
13761 }
13762 }
13763
13764 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
13765 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13766
13767 fn respond_err(response: ___R) -> Self::Output {
13768 ::core::result::Result::Err(response)
13769 }
13770 }
13771
13772 pub struct Read;
13773
13774 impl ::fidl_next::Method for Read {
13775 const ORDINAL: u64 = 395825947633028830;
13776 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13777 ::fidl_next::protocol::Flexibility::Strict;
13778
13779 type Protocol = crate::File;
13780
13781 type Request = crate::wire::ReadableReadRequest;
13782 }
13783
13784 impl ::fidl_next::TwoWayMethod for Read {
13785 type Response = ::fidl_next::wire::Result<
13786 'static,
13787 crate::wire::ReadableReadResponse<'static>,
13788 ::fidl_next::wire::fuchsia::Status,
13789 >;
13790 }
13791
13792 impl<___R> ::fidl_next::Respond<___R> for Read {
13793 type Output = ::core::result::Result<
13794 crate::generic::ReadableReadResponse<___R>,
13795 ::fidl_next::never::Never,
13796 >;
13797
13798 fn respond(response: ___R) -> Self::Output {
13799 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
13800 }
13801 }
13802
13803 impl<___R> ::fidl_next::RespondErr<___R> for Read {
13804 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13805
13806 fn respond_err(response: ___R) -> Self::Output {
13807 ::core::result::Result::Err(response)
13808 }
13809 }
13810
13811 pub struct Write;
13812
13813 impl ::fidl_next::Method for Write {
13814 const ORDINAL: u64 = 7651971425397809026;
13815 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13816 ::fidl_next::protocol::Flexibility::Strict;
13817
13818 type Protocol = crate::File;
13819
13820 type Request = crate::wire::WritableWriteRequest<'static>;
13821 }
13822
13823 impl ::fidl_next::TwoWayMethod for Write {
13824 type Response = ::fidl_next::wire::Result<
13825 'static,
13826 crate::wire::WritableWriteResponse,
13827 ::fidl_next::wire::fuchsia::Status,
13828 >;
13829 }
13830
13831 impl<___R> ::fidl_next::Respond<___R> for Write {
13832 type Output = ::core::result::Result<
13833 crate::generic::WritableWriteResponse<___R>,
13834 ::fidl_next::never::Never,
13835 >;
13836
13837 fn respond(response: ___R) -> Self::Output {
13838 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
13839 actual_count: response,
13840 })
13841 }
13842 }
13843
13844 impl<___R> ::fidl_next::RespondErr<___R> for Write {
13845 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13846
13847 fn respond_err(response: ___R) -> Self::Output {
13848 ::core::result::Result::Err(response)
13849 }
13850 }
13851
13852 pub struct Describe;
13853
13854 impl ::fidl_next::Method for Describe {
13855 const ORDINAL: u64 = 7545125870053689020;
13856 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13857 ::fidl_next::protocol::Flexibility::Strict;
13858
13859 type Protocol = crate::File;
13860
13861 type Request = ::fidl_next::wire::EmptyMessageBody;
13862 }
13863
13864 impl ::fidl_next::TwoWayMethod for Describe {
13865 type Response = ::fidl_next::wire::Strict<crate::wire::FileInfo<'static>>;
13866 }
13867
13868 impl<___R> ::fidl_next::Respond<___R> for Describe {
13869 type Output = ::fidl_next::Strict<___R>;
13870
13871 fn respond(response: ___R) -> Self::Output {
13872 ::fidl_next::Strict(response)
13873 }
13874 }
13875
13876 pub struct Seek;
13877
13878 impl ::fidl_next::Method for Seek {
13879 const ORDINAL: u64 = 8649041485622956551;
13880 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13881 ::fidl_next::protocol::Flexibility::Strict;
13882
13883 type Protocol = crate::File;
13884
13885 type Request = crate::wire::FileSeekRequest;
13886 }
13887
13888 impl ::fidl_next::TwoWayMethod for Seek {
13889 type Response = ::fidl_next::wire::Result<
13890 'static,
13891 crate::wire::FileSeekResponse,
13892 ::fidl_next::wire::fuchsia::Status,
13893 >;
13894 }
13895
13896 impl<___R> ::fidl_next::Respond<___R> for Seek {
13897 type Output = ::core::result::Result<
13898 crate::generic::FileSeekResponse<___R>,
13899 ::fidl_next::never::Never,
13900 >;
13901
13902 fn respond(response: ___R) -> Self::Output {
13903 ::core::result::Result::Ok(crate::generic::FileSeekResponse {
13904 offset_from_start: response,
13905 })
13906 }
13907 }
13908
13909 impl<___R> ::fidl_next::RespondErr<___R> for Seek {
13910 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13911
13912 fn respond_err(response: ___R) -> Self::Output {
13913 ::core::result::Result::Err(response)
13914 }
13915 }
13916
13917 pub struct ReadAt;
13918
13919 impl ::fidl_next::Method for ReadAt {
13920 const ORDINAL: u64 = 1587416148701180478;
13921 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13922 ::fidl_next::protocol::Flexibility::Strict;
13923
13924 type Protocol = crate::File;
13925
13926 type Request = crate::wire::FileReadAtRequest;
13927 }
13928
13929 impl ::fidl_next::TwoWayMethod for ReadAt {
13930 type Response = ::fidl_next::wire::Result<
13931 'static,
13932 crate::wire::FileReadAtResponse<'static>,
13933 ::fidl_next::wire::fuchsia::Status,
13934 >;
13935 }
13936
13937 impl<___R> ::fidl_next::Respond<___R> for ReadAt {
13938 type Output = ::core::result::Result<
13939 crate::generic::FileReadAtResponse<___R>,
13940 ::fidl_next::never::Never,
13941 >;
13942
13943 fn respond(response: ___R) -> Self::Output {
13944 ::core::result::Result::Ok(crate::generic::FileReadAtResponse { data: response })
13945 }
13946 }
13947
13948 impl<___R> ::fidl_next::RespondErr<___R> for ReadAt {
13949 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13950
13951 fn respond_err(response: ___R) -> Self::Output {
13952 ::core::result::Result::Err(response)
13953 }
13954 }
13955
13956 pub struct WriteAt;
13957
13958 impl ::fidl_next::Method for WriteAt {
13959 const ORDINAL: u64 = 8736683935131400491;
13960 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13961 ::fidl_next::protocol::Flexibility::Strict;
13962
13963 type Protocol = crate::File;
13964
13965 type Request = crate::wire::FileWriteAtRequest<'static>;
13966 }
13967
13968 impl ::fidl_next::TwoWayMethod for WriteAt {
13969 type Response = ::fidl_next::wire::Result<
13970 'static,
13971 crate::wire::FileWriteAtResponse,
13972 ::fidl_next::wire::fuchsia::Status,
13973 >;
13974 }
13975
13976 impl<___R> ::fidl_next::Respond<___R> for WriteAt {
13977 type Output = ::core::result::Result<
13978 crate::generic::FileWriteAtResponse<___R>,
13979 ::fidl_next::never::Never,
13980 >;
13981
13982 fn respond(response: ___R) -> Self::Output {
13983 ::core::result::Result::Ok(crate::generic::FileWriteAtResponse {
13984 actual_count: response,
13985 })
13986 }
13987 }
13988
13989 impl<___R> ::fidl_next::RespondErr<___R> for WriteAt {
13990 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13991
13992 fn respond_err(response: ___R) -> Self::Output {
13993 ::core::result::Result::Err(response)
13994 }
13995 }
13996
13997 pub struct Resize;
13998
13999 impl ::fidl_next::Method for Resize {
14000 const ORDINAL: u64 = 3134648685270758458;
14001 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14002 ::fidl_next::protocol::Flexibility::Strict;
14003
14004 type Protocol = crate::File;
14005
14006 type Request = crate::wire::FileResizeRequest;
14007 }
14008
14009 impl ::fidl_next::TwoWayMethod for Resize {
14010 type Response = ::fidl_next::wire::Result<
14011 'static,
14012 crate::wire::FileResizeResponse,
14013 ::fidl_next::wire::fuchsia::Status,
14014 >;
14015 }
14016
14017 impl<___R> ::fidl_next::Respond<___R> for Resize {
14018 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14019
14020 fn respond(response: ___R) -> Self::Output {
14021 ::core::result::Result::Ok(response)
14022 }
14023 }
14024
14025 impl<___R> ::fidl_next::RespondErr<___R> for Resize {
14026 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14027
14028 fn respond_err(response: ___R) -> Self::Output {
14029 ::core::result::Result::Err(response)
14030 }
14031 }
14032
14033 pub struct GetBackingMemory;
14034
14035 impl ::fidl_next::Method for GetBackingMemory {
14036 const ORDINAL: u64 = 46911652864194091;
14037 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14038 ::fidl_next::protocol::Flexibility::Strict;
14039
14040 type Protocol = crate::File;
14041
14042 type Request = crate::wire::FileGetBackingMemoryRequest;
14043 }
14044
14045 impl ::fidl_next::TwoWayMethod for GetBackingMemory {
14046 type Response = ::fidl_next::wire::Result<
14047 'static,
14048 crate::wire::FileGetBackingMemoryResponse,
14049 ::fidl_next::wire::fuchsia::Status,
14050 >;
14051 }
14052
14053 impl<___R> ::fidl_next::Respond<___R> for GetBackingMemory {
14054 type Output = ::core::result::Result<
14055 crate::generic::FileGetBackingMemoryResponse<___R>,
14056 ::fidl_next::never::Never,
14057 >;
14058
14059 fn respond(response: ___R) -> Self::Output {
14060 ::core::result::Result::Ok(crate::generic::FileGetBackingMemoryResponse {
14061 vmo: response,
14062 })
14063 }
14064 }
14065
14066 impl<___R> ::fidl_next::RespondErr<___R> for GetBackingMemory {
14067 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14068
14069 fn respond_err(response: ___R) -> Self::Output {
14070 ::core::result::Result::Err(response)
14071 }
14072 }
14073
14074 pub struct Allocate;
14075
14076 impl ::fidl_next::Method for Allocate {
14077 const ORDINAL: u64 = 8645235848064269614;
14078 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14079 ::fidl_next::protocol::Flexibility::Flexible;
14080
14081 type Protocol = crate::File;
14082
14083 type Request = crate::wire::FileAllocateRequest;
14084 }
14085
14086 impl ::fidl_next::TwoWayMethod for Allocate {
14087 type Response = ::fidl_next::wire::Result<
14088 'static,
14089 crate::wire::FileAllocateResponse,
14090 ::fidl_next::wire::fuchsia::Status,
14091 >;
14092 }
14093
14094 impl<___R> ::fidl_next::Respond<___R> for Allocate {
14095 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14096
14097 fn respond(response: ___R) -> Self::Output {
14098 ::core::result::Result::Ok(response)
14099 }
14100 }
14101
14102 impl<___R> ::fidl_next::RespondErr<___R> for Allocate {
14103 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14104
14105 fn respond_err(response: ___R) -> Self::Output {
14106 ::core::result::Result::Err(response)
14107 }
14108 }
14109
14110 pub struct EnableVerity;
14111
14112 impl ::fidl_next::Method for EnableVerity {
14113 const ORDINAL: u64 = 3189145313204943035;
14114 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14115 ::fidl_next::protocol::Flexibility::Flexible;
14116
14117 type Protocol = crate::File;
14118
14119 type Request = crate::wire::FileEnableVerityRequest<'static>;
14120 }
14121
14122 impl ::fidl_next::TwoWayMethod for EnableVerity {
14123 type Response = ::fidl_next::wire::Result<
14124 'static,
14125 crate::wire::FileEnableVerityResponse,
14126 ::fidl_next::wire::fuchsia::Status,
14127 >;
14128 }
14129
14130 impl<___R> ::fidl_next::Respond<___R> for EnableVerity {
14131 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14132
14133 fn respond(response: ___R) -> Self::Output {
14134 ::core::result::Result::Ok(response)
14135 }
14136 }
14137
14138 impl<___R> ::fidl_next::RespondErr<___R> for EnableVerity {
14139 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14140
14141 fn respond_err(response: ___R) -> Self::Output {
14142 ::core::result::Result::Err(response)
14143 }
14144 }
14145
14146 mod ___detail {
14147 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::File
14148 where
14149 ___T: ::fidl_next::Transport,
14150 {
14151 type Client = FileClient<___T>;
14152 type Server = FileServer<___T>;
14153 }
14154
14155 #[repr(transparent)]
14157 pub struct FileClient<___T: ::fidl_next::Transport> {
14158 #[allow(dead_code)]
14159 client: ::fidl_next::protocol::Client<___T>,
14160 }
14161
14162 impl<___T> FileClient<___T>
14163 where
14164 ___T: ::fidl_next::Transport,
14165 {
14166 #[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"]
14167 pub fn advisory_lock(
14168 &self,
14169
14170 request: impl ::fidl_next::Encode<
14171 crate::wire::AdvisoryLockRequest<'static>,
14172 <___T as ::fidl_next::Transport>::SendBuffer,
14173 >,
14174 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
14175 where
14176 <___T as ::fidl_next::Transport>::SendBuffer:
14177 ::fidl_next::encoder::InternalHandleEncoder,
14178 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14179 {
14180 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
14181 request,
14182 })
14183 }
14184
14185 #[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"]
14186 pub fn advisory_lock_with<___R>(
14187 &self,
14188 request: ___R,
14189 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
14190 where
14191 ___R: ::fidl_next::Encode<
14192 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
14193 <___T as ::fidl_next::Transport>::SendBuffer,
14194 >,
14195 {
14196 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14197 7992130864415541162,
14198 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
14199 request,
14200 ))
14201 }
14202
14203 #[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"]
14204 pub fn link_into(
14205 &self,
14206
14207 dst_parent_token: impl ::fidl_next::Encode<
14208 ::fdomain_client::fidl_next::wire::Handle,
14209 <___T as ::fidl_next::Transport>::SendBuffer,
14210 >,
14211
14212 dst: impl ::fidl_next::Encode<
14213 ::fidl_next::wire::String<'static>,
14214 <___T as ::fidl_next::Transport>::SendBuffer,
14215 >,
14216 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14217 where
14218 <___T as ::fidl_next::Transport>::SendBuffer:
14219 ::fidl_next::encoder::InternalHandleEncoder,
14220 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14221 <___T as ::fidl_next::Transport>::SendBuffer:
14222 ::fdomain_client::fidl_next::HandleEncoder,
14223 {
14224 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
14225 dst_parent_token,
14226
14227 dst,
14228 })
14229 }
14230
14231 #[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"]
14232 pub fn link_into_with<___R>(
14233 &self,
14234 request: ___R,
14235 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
14236 where
14237 ___R: ::fidl_next::Encode<
14238 crate::wire::LinkableLinkIntoRequest<'static>,
14239 <___T as ::fidl_next::Transport>::SendBuffer,
14240 >,
14241 {
14242 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14243 6121399674497678964,
14244 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
14245 request,
14246 ))
14247 }
14248
14249 pub fn clone(
14250 &self,
14251
14252 request: impl ::fidl_next::Encode<
14253 ::fidl_next::ServerEnd<
14254 ::fdomain_next_fuchsia_unknown::Cloneable,
14255 ::fdomain_client::fidl_next::wire::Handle,
14256 >,
14257 <___T as ::fidl_next::Transport>::SendBuffer,
14258 >,
14259 ) -> ::fidl_next::SendFuture<'_, ___T>
14260 where
14261 <___T as ::fidl_next::Transport>::SendBuffer:
14262 ::fidl_next::encoder::InternalHandleEncoder,
14263 <___T as ::fidl_next::Transport>::SendBuffer:
14264 ::fdomain_client::fidl_next::HandleEncoder,
14265 {
14266 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
14267 request,
14268 })
14269 }
14270
14271 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
14272 where
14273 ___R: ::fidl_next::Encode<
14274 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
14275 <___T as ::fidl_next::Transport>::SendBuffer,
14276 >,
14277 {
14278 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14279 2366825959783828089,
14280 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
14281 request,
14282 ))
14283 }
14284
14285 #[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"]
14286 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
14287 ::fidl_next::TwoWayFuture::from_untyped(
14288 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14289 6540867515453498750,
14290 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
14291 (),
14292 ),
14293 )
14294 }
14295
14296 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
14297 ::fidl_next::TwoWayFuture::from_untyped(
14298 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14299 2763219980499352582,
14300 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
14301 (),
14302 ),
14303 )
14304 }
14305
14306 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14307 pub fn deprecated_clone(
14308 &self,
14309
14310 flags: impl ::fidl_next::Encode<
14311 crate::wire::OpenFlags,
14312 <___T as ::fidl_next::Transport>::SendBuffer,
14313 >,
14314
14315 object: impl ::fidl_next::Encode<
14316 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
14317 <___T as ::fidl_next::Transport>::SendBuffer,
14318 >,
14319 ) -> ::fidl_next::SendFuture<'_, ___T>
14320 where
14321 <___T as ::fidl_next::Transport>::SendBuffer:
14322 ::fidl_next::encoder::InternalHandleEncoder,
14323 <___T as ::fidl_next::Transport>::SendBuffer:
14324 ::fdomain_client::fidl_next::HandleEncoder,
14325 {
14326 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
14327 flags,
14328
14329 object,
14330 })
14331 }
14332
14333 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
14334 pub fn deprecated_clone_with<___R>(
14335 &self,
14336 request: ___R,
14337 ) -> ::fidl_next::SendFuture<'_, ___T>
14338 where
14339 ___R: ::fidl_next::Encode<
14340 crate::wire::NodeDeprecatedCloneRequest,
14341 <___T as ::fidl_next::Transport>::SendBuffer,
14342 >,
14343 {
14344 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14345 6512600400724287855,
14346 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
14347 request,
14348 ))
14349 }
14350
14351 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
14352 pub fn deprecated_get_attr(
14353 &self,
14354 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
14355 ::fidl_next::TwoWayFuture::from_untyped(
14356 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14357 8689798978500614909,
14358 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
14359 (),
14360 ),
14361 )
14362 }
14363
14364 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14365 pub fn deprecated_set_attr(
14366 &self,
14367
14368 flags: impl ::fidl_next::Encode<
14369 crate::wire::NodeAttributeFlags,
14370 <___T as ::fidl_next::Transport>::SendBuffer,
14371 >,
14372
14373 attributes: impl ::fidl_next::Encode<
14374 crate::wire::NodeAttributes,
14375 <___T as ::fidl_next::Transport>::SendBuffer,
14376 >,
14377 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14378 where
14379 <___T as ::fidl_next::Transport>::SendBuffer:
14380 ::fidl_next::encoder::InternalHandleEncoder,
14381 {
14382 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
14383 flags,
14384
14385 attributes,
14386 })
14387 }
14388
14389 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
14390 pub fn deprecated_set_attr_with<___R>(
14391 &self,
14392 request: ___R,
14393 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
14394 where
14395 ___R: ::fidl_next::Encode<
14396 crate::wire::NodeDeprecatedSetAttrRequest,
14397 <___T as ::fidl_next::Transport>::SendBuffer,
14398 >,
14399 {
14400 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14401 4721673413776871238,
14402 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
14403 request,
14404 ))
14405 }
14406
14407 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
14408 pub fn deprecated_get_flags(
14409 &self,
14410 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
14411 ::fidl_next::TwoWayFuture::from_untyped(
14412 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14413 6595803110182632097,
14414 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
14415 (),
14416 ),
14417 )
14418 }
14419
14420 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14421 pub fn deprecated_set_flags(
14422 &self,
14423
14424 flags: impl ::fidl_next::Encode<
14425 crate::wire::OpenFlags,
14426 <___T as ::fidl_next::Transport>::SendBuffer,
14427 >,
14428 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14429 where
14430 <___T as ::fidl_next::Transport>::SendBuffer:
14431 ::fidl_next::encoder::InternalHandleEncoder,
14432 {
14433 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
14434 flags,
14435 })
14436 }
14437
14438 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
14439 pub fn deprecated_set_flags_with<___R>(
14440 &self,
14441 request: ___R,
14442 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
14443 where
14444 ___R: ::fidl_next::Encode<
14445 crate::wire::NodeDeprecatedSetFlagsRequest,
14446 <___T as ::fidl_next::Transport>::SendBuffer,
14447 >,
14448 {
14449 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14450 5950864159036794675,
14451 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
14452 request,
14453 ))
14454 }
14455
14456 #[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"]
14457 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
14458 ::fidl_next::TwoWayFuture::from_untyped(
14459 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14460 105530239381466147,
14461 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
14462 (),
14463 ),
14464 )
14465 }
14466
14467 #[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"]
14468 pub fn set_flags(
14469 &self,
14470
14471 flags: impl ::fidl_next::Encode<
14472 crate::wire::Flags,
14473 <___T as ::fidl_next::Transport>::SendBuffer,
14474 >,
14475 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14476 where
14477 <___T as ::fidl_next::Transport>::SendBuffer:
14478 ::fidl_next::encoder::InternalHandleEncoder,
14479 {
14480 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
14481 }
14482
14483 #[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"]
14484 pub fn set_flags_with<___R>(
14485 &self,
14486 request: ___R,
14487 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
14488 where
14489 ___R: ::fidl_next::Encode<
14490 crate::wire::NodeSetFlagsRequest,
14491 <___T as ::fidl_next::Transport>::SendBuffer,
14492 >,
14493 {
14494 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14495 6172186066099445416,
14496 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
14497 request,
14498 ))
14499 }
14500
14501 #[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"]
14502 pub fn query_filesystem(
14503 &self,
14504 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
14505 ::fidl_next::TwoWayFuture::from_untyped(
14506 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14507 8013111122914313744,
14508 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
14509 (),
14510 ),
14511 )
14512 }
14513
14514 #[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"]
14515 pub fn get_attributes(
14516 &self,
14517
14518 query: impl ::fidl_next::Encode<
14519 crate::wire::NodeAttributesQuery,
14520 <___T as ::fidl_next::Transport>::SendBuffer,
14521 >,
14522 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14523 where
14524 <___T as ::fidl_next::Transport>::SendBuffer:
14525 ::fidl_next::encoder::InternalHandleEncoder,
14526 {
14527 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
14528 }
14529
14530 #[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"]
14531 pub fn get_attributes_with<___R>(
14532 &self,
14533 request: ___R,
14534 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
14535 where
14536 ___R: ::fidl_next::Encode<
14537 crate::wire::NodeGetAttributesRequest,
14538 <___T as ::fidl_next::Transport>::SendBuffer,
14539 >,
14540 {
14541 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14542 4414537700416816443,
14543 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
14544 request,
14545 ))
14546 }
14547
14548 #[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"]
14549 pub fn update_attributes_with<___R>(
14550 &self,
14551 request: ___R,
14552 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
14553 where
14554 ___R: ::fidl_next::Encode<
14555 crate::wire::MutableNodeAttributes<'static>,
14556 <___T as ::fidl_next::Transport>::SendBuffer,
14557 >,
14558 {
14559 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14560 3677402239314018056,
14561 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
14562 request,
14563 ))
14564 }
14565
14566 #[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"]
14567 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
14568 ::fidl_next::TwoWayFuture::from_untyped(
14569 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14570 3196473584242777161,
14571 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
14572 (),
14573 ),
14574 )
14575 }
14576
14577 #[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"]
14578 pub fn list_extended_attributes(
14579 &self,
14580
14581 iterator: impl ::fidl_next::Encode<
14582 ::fidl_next::ServerEnd<
14583 crate::ExtendedAttributeIterator,
14584 ::fdomain_client::fidl_next::wire::Handle,
14585 >,
14586 <___T as ::fidl_next::Transport>::SendBuffer,
14587 >,
14588 ) -> ::fidl_next::SendFuture<'_, ___T>
14589 where
14590 <___T as ::fidl_next::Transport>::SendBuffer:
14591 ::fidl_next::encoder::InternalHandleEncoder,
14592 <___T as ::fidl_next::Transport>::SendBuffer:
14593 ::fdomain_client::fidl_next::HandleEncoder,
14594 {
14595 self.list_extended_attributes_with(
14596 crate::generic::NodeListExtendedAttributesRequest { iterator },
14597 )
14598 }
14599
14600 #[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"]
14601 pub fn list_extended_attributes_with<___R>(
14602 &self,
14603 request: ___R,
14604 ) -> ::fidl_next::SendFuture<'_, ___T>
14605 where
14606 ___R: ::fidl_next::Encode<
14607 crate::wire::NodeListExtendedAttributesRequest,
14608 <___T as ::fidl_next::Transport>::SendBuffer,
14609 >,
14610 {
14611 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
14612 5431626189872037072,
14613 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
14614 request,
14615 ))
14616 }
14617
14618 #[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"]
14619 pub fn get_extended_attribute(
14620 &self,
14621
14622 name: impl ::fidl_next::Encode<
14623 ::fidl_next::wire::Vector<'static, u8>,
14624 <___T as ::fidl_next::Transport>::SendBuffer,
14625 >,
14626 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14627 where
14628 <___T as ::fidl_next::Transport>::SendBuffer:
14629 ::fidl_next::encoder::InternalHandleEncoder,
14630 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14631 {
14632 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
14633 name,
14634 })
14635 }
14636
14637 #[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"]
14638 pub fn get_extended_attribute_with<___R>(
14639 &self,
14640 request: ___R,
14641 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
14642 where
14643 ___R: ::fidl_next::Encode<
14644 crate::wire::NodeGetExtendedAttributeRequest<'static>,
14645 <___T as ::fidl_next::Transport>::SendBuffer,
14646 >,
14647 {
14648 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14649 5043930208506967771,
14650 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14651 request,
14652 ))
14653 }
14654
14655 #[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"]
14656 pub fn set_extended_attribute(
14657 &self,
14658
14659 name: impl ::fidl_next::Encode<
14660 ::fidl_next::wire::Vector<'static, u8>,
14661 <___T as ::fidl_next::Transport>::SendBuffer,
14662 >,
14663
14664 value: impl ::fidl_next::Encode<
14665 crate::wire::ExtendedAttributeValue<'static>,
14666 <___T as ::fidl_next::Transport>::SendBuffer,
14667 >,
14668
14669 mode: impl ::fidl_next::Encode<
14670 crate::wire::SetExtendedAttributeMode,
14671 <___T as ::fidl_next::Transport>::SendBuffer,
14672 >,
14673 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14674 where
14675 <___T as ::fidl_next::Transport>::SendBuffer:
14676 ::fidl_next::encoder::InternalHandleEncoder,
14677 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14678 <___T as ::fidl_next::Transport>::SendBuffer:
14679 ::fdomain_client::fidl_next::HandleEncoder,
14680 {
14681 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
14682 name,
14683
14684 value,
14685
14686 mode,
14687 })
14688 }
14689
14690 #[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"]
14691 pub fn set_extended_attribute_with<___R>(
14692 &self,
14693 request: ___R,
14694 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
14695 where
14696 ___R: ::fidl_next::Encode<
14697 crate::wire::NodeSetExtendedAttributeRequest<'static>,
14698 <___T as ::fidl_next::Transport>::SendBuffer,
14699 >,
14700 {
14701 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14702 5374223046099989052,
14703 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14704 request,
14705 ))
14706 }
14707
14708 #[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"]
14709 pub fn remove_extended_attribute(
14710 &self,
14711
14712 name: impl ::fidl_next::Encode<
14713 ::fidl_next::wire::Vector<'static, u8>,
14714 <___T as ::fidl_next::Transport>::SendBuffer,
14715 >,
14716 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14717 where
14718 <___T as ::fidl_next::Transport>::SendBuffer:
14719 ::fidl_next::encoder::InternalHandleEncoder,
14720 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14721 {
14722 self.remove_extended_attribute_with(
14723 crate::generic::NodeRemoveExtendedAttributeRequest { name },
14724 )
14725 }
14726
14727 #[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"]
14728 pub fn remove_extended_attribute_with<___R>(
14729 &self,
14730 request: ___R,
14731 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
14732 where
14733 ___R: ::fidl_next::Encode<
14734 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
14735 <___T as ::fidl_next::Transport>::SendBuffer,
14736 >,
14737 {
14738 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14739 8794297771444732717,
14740 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
14741 request,
14742 ))
14743 }
14744
14745 #[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"]
14746 pub fn read(
14747 &self,
14748
14749 count: impl ::fidl_next::Encode<
14750 ::fidl_next::wire::Uint64,
14751 <___T as ::fidl_next::Transport>::SendBuffer,
14752 >,
14753 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
14754 where
14755 <___T as ::fidl_next::Transport>::SendBuffer:
14756 ::fidl_next::encoder::InternalHandleEncoder,
14757 {
14758 self.read_with(crate::generic::ReadableReadRequest { count })
14759 }
14760
14761 #[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"]
14762 pub fn read_with<___R>(
14763 &self,
14764 request: ___R,
14765 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
14766 where
14767 ___R: ::fidl_next::Encode<
14768 crate::wire::ReadableReadRequest,
14769 <___T as ::fidl_next::Transport>::SendBuffer,
14770 >,
14771 {
14772 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14773 395825947633028830,
14774 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
14775 request,
14776 ))
14777 }
14778
14779 #[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"]
14780 pub fn write(
14781 &self,
14782
14783 data: impl ::fidl_next::Encode<
14784 ::fidl_next::wire::Vector<'static, u8>,
14785 <___T as ::fidl_next::Transport>::SendBuffer,
14786 >,
14787 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
14788 where
14789 <___T as ::fidl_next::Transport>::SendBuffer:
14790 ::fidl_next::encoder::InternalHandleEncoder,
14791 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14792 {
14793 self.write_with(crate::generic::WritableWriteRequest { data })
14794 }
14795
14796 #[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"]
14797 pub fn write_with<___R>(
14798 &self,
14799 request: ___R,
14800 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
14801 where
14802 ___R: ::fidl_next::Encode<
14803 crate::wire::WritableWriteRequest<'static>,
14804 <___T as ::fidl_next::Transport>::SendBuffer,
14805 >,
14806 {
14807 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14808 7651971425397809026,
14809 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
14810 request,
14811 ))
14812 }
14813
14814 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
14815 ::fidl_next::TwoWayFuture::from_untyped(
14816 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14817 7545125870053689020,
14818 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
14819 (),
14820 ),
14821 )
14822 }
14823
14824 #[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"]
14825 pub fn seek(
14826 &self,
14827
14828 origin: impl ::fidl_next::Encode<
14829 crate::wire::SeekOrigin,
14830 <___T as ::fidl_next::Transport>::SendBuffer,
14831 >,
14832
14833 offset: impl ::fidl_next::Encode<
14834 ::fidl_next::wire::Int64,
14835 <___T as ::fidl_next::Transport>::SendBuffer,
14836 >,
14837 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
14838 where
14839 <___T as ::fidl_next::Transport>::SendBuffer:
14840 ::fidl_next::encoder::InternalHandleEncoder,
14841 {
14842 self.seek_with(crate::generic::FileSeekRequest { origin, offset })
14843 }
14844
14845 #[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"]
14846 pub fn seek_with<___R>(
14847 &self,
14848 request: ___R,
14849 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
14850 where
14851 ___R: ::fidl_next::Encode<
14852 crate::wire::FileSeekRequest,
14853 <___T as ::fidl_next::Transport>::SendBuffer,
14854 >,
14855 {
14856 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14857 8649041485622956551,
14858 <super::Seek as ::fidl_next::Method>::FLEXIBILITY,
14859 request,
14860 ))
14861 }
14862
14863 #[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"]
14864 pub fn read_at(
14865 &self,
14866
14867 count: impl ::fidl_next::Encode<
14868 ::fidl_next::wire::Uint64,
14869 <___T as ::fidl_next::Transport>::SendBuffer,
14870 >,
14871
14872 offset: impl ::fidl_next::Encode<
14873 ::fidl_next::wire::Uint64,
14874 <___T as ::fidl_next::Transport>::SendBuffer,
14875 >,
14876 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
14877 where
14878 <___T as ::fidl_next::Transport>::SendBuffer:
14879 ::fidl_next::encoder::InternalHandleEncoder,
14880 {
14881 self.read_at_with(crate::generic::FileReadAtRequest { count, offset })
14882 }
14883
14884 #[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"]
14885 pub fn read_at_with<___R>(
14886 &self,
14887 request: ___R,
14888 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
14889 where
14890 ___R: ::fidl_next::Encode<
14891 crate::wire::FileReadAtRequest,
14892 <___T as ::fidl_next::Transport>::SendBuffer,
14893 >,
14894 {
14895 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14896 1587416148701180478,
14897 <super::ReadAt as ::fidl_next::Method>::FLEXIBILITY,
14898 request,
14899 ))
14900 }
14901
14902 #[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"]
14903 pub fn write_at(
14904 &self,
14905
14906 data: impl ::fidl_next::Encode<
14907 ::fidl_next::wire::Vector<'static, u8>,
14908 <___T as ::fidl_next::Transport>::SendBuffer,
14909 >,
14910
14911 offset: impl ::fidl_next::Encode<
14912 ::fidl_next::wire::Uint64,
14913 <___T as ::fidl_next::Transport>::SendBuffer,
14914 >,
14915 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
14916 where
14917 <___T as ::fidl_next::Transport>::SendBuffer:
14918 ::fidl_next::encoder::InternalHandleEncoder,
14919 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
14920 {
14921 self.write_at_with(crate::generic::FileWriteAtRequest { data, offset })
14922 }
14923
14924 #[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"]
14925 pub fn write_at_with<___R>(
14926 &self,
14927 request: ___R,
14928 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
14929 where
14930 ___R: ::fidl_next::Encode<
14931 crate::wire::FileWriteAtRequest<'static>,
14932 <___T as ::fidl_next::Transport>::SendBuffer,
14933 >,
14934 {
14935 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14936 8736683935131400491,
14937 <super::WriteAt as ::fidl_next::Method>::FLEXIBILITY,
14938 request,
14939 ))
14940 }
14941
14942 #[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"]
14943 pub fn resize(
14944 &self,
14945
14946 length: impl ::fidl_next::Encode<
14947 ::fidl_next::wire::Uint64,
14948 <___T as ::fidl_next::Transport>::SendBuffer,
14949 >,
14950 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
14951 where
14952 <___T as ::fidl_next::Transport>::SendBuffer:
14953 ::fidl_next::encoder::InternalHandleEncoder,
14954 {
14955 self.resize_with(crate::generic::FileResizeRequest { length })
14956 }
14957
14958 #[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"]
14959 pub fn resize_with<___R>(
14960 &self,
14961 request: ___R,
14962 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
14963 where
14964 ___R: ::fidl_next::Encode<
14965 crate::wire::FileResizeRequest,
14966 <___T as ::fidl_next::Transport>::SendBuffer,
14967 >,
14968 {
14969 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14970 3134648685270758458,
14971 <super::Resize as ::fidl_next::Method>::FLEXIBILITY,
14972 request,
14973 ))
14974 }
14975
14976 #[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"]
14977 pub fn get_backing_memory(
14978 &self,
14979
14980 flags: impl ::fidl_next::Encode<
14981 crate::wire::VmoFlags,
14982 <___T as ::fidl_next::Transport>::SendBuffer,
14983 >,
14984 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
14985 where
14986 <___T as ::fidl_next::Transport>::SendBuffer:
14987 ::fidl_next::encoder::InternalHandleEncoder,
14988 {
14989 self.get_backing_memory_with(crate::generic::FileGetBackingMemoryRequest { flags })
14990 }
14991
14992 #[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"]
14993 pub fn get_backing_memory_with<___R>(
14994 &self,
14995 request: ___R,
14996 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
14997 where
14998 ___R: ::fidl_next::Encode<
14999 crate::wire::FileGetBackingMemoryRequest,
15000 <___T as ::fidl_next::Transport>::SendBuffer,
15001 >,
15002 {
15003 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15004 46911652864194091,
15005 <super::GetBackingMemory as ::fidl_next::Method>::FLEXIBILITY,
15006 request,
15007 ))
15008 }
15009
15010 #[doc = " Pre-allocate on-disk space for this file.\n"]
15011 pub fn allocate(
15012 &self,
15013
15014 offset: impl ::fidl_next::Encode<
15015 ::fidl_next::wire::Uint64,
15016 <___T as ::fidl_next::Transport>::SendBuffer,
15017 >,
15018
15019 length: impl ::fidl_next::Encode<
15020 ::fidl_next::wire::Uint64,
15021 <___T as ::fidl_next::Transport>::SendBuffer,
15022 >,
15023
15024 mode: impl ::fidl_next::Encode<
15025 crate::wire::AllocateMode,
15026 <___T as ::fidl_next::Transport>::SendBuffer,
15027 >,
15028 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
15029 where
15030 <___T as ::fidl_next::Transport>::SendBuffer:
15031 ::fidl_next::encoder::InternalHandleEncoder,
15032 <___T as ::fidl_next::Transport>::SendBuffer:
15033 ::fdomain_client::fidl_next::HandleEncoder,
15034 {
15035 self.allocate_with(crate::generic::FileAllocateRequest { offset, length, mode })
15036 }
15037
15038 #[doc = " Pre-allocate on-disk space for this file.\n"]
15039 pub fn allocate_with<___R>(
15040 &self,
15041 request: ___R,
15042 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
15043 where
15044 ___R: ::fidl_next::Encode<
15045 crate::wire::FileAllocateRequest,
15046 <___T as ::fidl_next::Transport>::SendBuffer,
15047 >,
15048 {
15049 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15050 8645235848064269614,
15051 <super::Allocate as ::fidl_next::Method>::FLEXIBILITY,
15052 request,
15053 ))
15054 }
15055
15056 #[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"]
15057 pub fn enable_verity(
15058 &self,
15059
15060 options: impl ::fidl_next::Encode<
15061 crate::wire::VerificationOptions<'static>,
15062 <___T as ::fidl_next::Transport>::SendBuffer,
15063 >,
15064 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
15065 where
15066 <___T as ::fidl_next::Transport>::SendBuffer:
15067 ::fidl_next::encoder::InternalHandleEncoder,
15068 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
15069 <___T as ::fidl_next::Transport>::SendBuffer:
15070 ::fdomain_client::fidl_next::HandleEncoder,
15071 {
15072 self.enable_verity_with(crate::generic::FileEnableVerityRequest { options })
15073 }
15074
15075 #[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"]
15076 pub fn enable_verity_with<___R>(
15077 &self,
15078 request: ___R,
15079 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
15080 where
15081 ___R: ::fidl_next::Encode<
15082 crate::wire::FileEnableVerityRequest<'static>,
15083 <___T as ::fidl_next::Transport>::SendBuffer,
15084 >,
15085 {
15086 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15087 3189145313204943035,
15088 <super::EnableVerity as ::fidl_next::Method>::FLEXIBILITY,
15089 request,
15090 ))
15091 }
15092 }
15093
15094 #[repr(transparent)]
15096 pub struct FileServer<___T: ::fidl_next::Transport> {
15097 server: ::fidl_next::protocol::Server<___T>,
15098 }
15099
15100 impl<___T> FileServer<___T>
15101 where
15102 ___T: ::fidl_next::Transport,
15103 {
15104 #[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"]
15105 pub fn on_open(
15106 &self,
15107
15108 s: impl ::fidl_next::Encode<
15109 ::fidl_next::wire::fuchsia::Status,
15110 <___T as ::fidl_next::Transport>::SendBuffer,
15111 >,
15112
15113 info: impl ::fidl_next::Encode<
15114 crate::wire_optional::NodeInfoDeprecated<'static>,
15115 <___T as ::fidl_next::Transport>::SendBuffer,
15116 >,
15117 ) -> ::fidl_next::SendFuture<'_, ___T>
15118 where
15119 <___T as ::fidl_next::Transport>::SendBuffer:
15120 ::fidl_next::encoder::InternalHandleEncoder,
15121 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
15122 <___T as ::fidl_next::Transport>::SendBuffer:
15123 ::fdomain_client::fidl_next::HandleEncoder,
15124 {
15125 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
15126 }
15127
15128 #[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"]
15129
15130 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
15131 where
15132 ___R: ::fidl_next::Encode<
15133 <super::OnOpen as ::fidl_next::Method>::Request,
15134 <___T as ::fidl_next::Transport>::SendBuffer,
15135 >,
15136 {
15137 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
15138 9207534335756671346,
15139 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
15140 request,
15141 ))
15142 }
15143
15144 #[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"]
15145
15146 pub fn on_representation_with<___R>(
15147 &self,
15148 request: ___R,
15149 ) -> ::fidl_next::SendFuture<'_, ___T>
15150 where
15151 ___R: ::fidl_next::Encode<
15152 <super::OnRepresentation as ::fidl_next::Method>::Request,
15153 <___T as ::fidl_next::Transport>::SendBuffer,
15154 >,
15155 {
15156 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
15157 6679970090861613324,
15158 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
15159 request,
15160 ))
15161 }
15162 }
15163 }
15164}
15165
15166#[diagnostic::on_unimplemented(
15167 note = "If {Self} implements the non-local FileClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
15168)]
15169
15170pub trait FileLocalClientHandler<
15174 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
15175 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15176>
15177{
15178 #[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"]
15179 fn on_open(
15180 &mut self,
15181
15182 request: ::fidl_next::Request<file::OnOpen, ___T>,
15183 ) -> impl ::core::future::Future<Output = ()>;
15184
15185 #[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"]
15186 fn on_representation(
15187 &mut self,
15188
15189 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
15190 ) -> impl ::core::future::Future<Output = ()>;
15191
15192 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15193 ::core::future::ready(())
15194 }
15195}
15196
15197impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for File
15198where
15199 ___H: FileLocalClientHandler<___T>,
15200 ___T: ::fidl_next::Transport,
15201 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
15202 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15203 Constraint = (),
15204 >,
15205 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
15206 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15207 Constraint = (),
15208 >,
15209{
15210 async fn on_event(
15211 handler: &mut ___H,
15212 mut message: ::fidl_next::Message<___T>,
15213 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
15214 match *message.header().ordinal {
15215 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
15216 Ok(decoded) => {
15217 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
15218 Ok(())
15219 }
15220 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15221 ordinal: 9207534335756671346,
15222 error,
15223 }),
15224 },
15225
15226 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
15227 Ok(decoded) => {
15228 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
15229 Ok(())
15230 }
15231 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15232 ordinal: 6679970090861613324,
15233 error,
15234 }),
15235 },
15236
15237 ordinal => {
15238 handler.on_unknown_interaction(ordinal).await;
15239 if ::core::matches!(
15240 message.header().flexibility(),
15241 ::fidl_next::protocol::Flexibility::Strict
15242 ) {
15243 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15244 } else {
15245 Ok(())
15246 }
15247 }
15248 }
15249 }
15250}
15251
15252#[diagnostic::on_unimplemented(
15253 note = "If {Self} implements the non-local FileServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
15254)]
15255
15256pub trait FileLocalServerHandler<
15260 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
15261 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
15262>
15263{
15264 #[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"]
15265 fn advisory_lock(
15266 &mut self,
15267
15268 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
15269
15270 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
15271 ) -> impl ::core::future::Future<Output = ()>;
15272
15273 #[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"]
15274 fn link_into(
15275 &mut self,
15276
15277 request: ::fidl_next::Request<file::LinkInto, ___T>,
15278
15279 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
15280 ) -> impl ::core::future::Future<Output = ()>;
15281
15282 fn clone(
15283 &mut self,
15284
15285 request: ::fidl_next::Request<file::Clone, ___T>,
15286 ) -> impl ::core::future::Future<Output = ()>;
15287
15288 #[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"]
15289 fn close(
15290 &mut self,
15291
15292 responder: ::fidl_next::Responder<file::Close, ___T>,
15293 ) -> impl ::core::future::Future<Output = ()>;
15294
15295 fn query(
15296 &mut self,
15297
15298 responder: ::fidl_next::Responder<file::Query, ___T>,
15299 ) -> impl ::core::future::Future<Output = ()>;
15300
15301 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
15302 fn deprecated_clone(
15303 &mut self,
15304
15305 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
15306 ) -> impl ::core::future::Future<Output = ()>;
15307
15308 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
15309 fn deprecated_get_attr(
15310 &mut self,
15311
15312 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
15313 ) -> impl ::core::future::Future<Output = ()>;
15314
15315 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
15316 fn deprecated_set_attr(
15317 &mut self,
15318
15319 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
15320
15321 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
15322 ) -> impl ::core::future::Future<Output = ()>;
15323
15324 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
15325 fn deprecated_get_flags(
15326 &mut self,
15327
15328 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
15329 ) -> impl ::core::future::Future<Output = ()>;
15330
15331 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
15332 fn deprecated_set_flags(
15333 &mut self,
15334
15335 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
15336
15337 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
15338 ) -> impl ::core::future::Future<Output = ()>;
15339
15340 #[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"]
15341 fn get_flags(
15342 &mut self,
15343
15344 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
15345 ) -> impl ::core::future::Future<Output = ()>;
15346
15347 #[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"]
15348 fn set_flags(
15349 &mut self,
15350
15351 request: ::fidl_next::Request<file::SetFlags, ___T>,
15352
15353 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
15354 ) -> impl ::core::future::Future<Output = ()>;
15355
15356 #[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"]
15357 fn query_filesystem(
15358 &mut self,
15359
15360 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
15361 ) -> impl ::core::future::Future<Output = ()>;
15362
15363 #[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"]
15364 fn get_attributes(
15365 &mut self,
15366
15367 request: ::fidl_next::Request<file::GetAttributes, ___T>,
15368
15369 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
15370 ) -> impl ::core::future::Future<Output = ()>;
15371
15372 #[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"]
15373 fn update_attributes(
15374 &mut self,
15375
15376 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
15377
15378 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
15379 ) -> impl ::core::future::Future<Output = ()>;
15380
15381 #[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"]
15382 fn sync(
15383 &mut self,
15384
15385 responder: ::fidl_next::Responder<file::Sync, ___T>,
15386 ) -> impl ::core::future::Future<Output = ()>;
15387
15388 #[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"]
15389 fn list_extended_attributes(
15390 &mut self,
15391
15392 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
15393 ) -> impl ::core::future::Future<Output = ()>;
15394
15395 #[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"]
15396 fn get_extended_attribute(
15397 &mut self,
15398
15399 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
15400
15401 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
15402 ) -> impl ::core::future::Future<Output = ()>;
15403
15404 #[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"]
15405 fn set_extended_attribute(
15406 &mut self,
15407
15408 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
15409
15410 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
15411 ) -> impl ::core::future::Future<Output = ()>;
15412
15413 #[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"]
15414 fn remove_extended_attribute(
15415 &mut self,
15416
15417 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
15418
15419 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
15420 ) -> impl ::core::future::Future<Output = ()>;
15421
15422 #[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"]
15423 fn read(
15424 &mut self,
15425
15426 request: ::fidl_next::Request<file::Read, ___T>,
15427
15428 responder: ::fidl_next::Responder<file::Read, ___T>,
15429 ) -> impl ::core::future::Future<Output = ()>;
15430
15431 #[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"]
15432 fn write(
15433 &mut self,
15434
15435 request: ::fidl_next::Request<file::Write, ___T>,
15436
15437 responder: ::fidl_next::Responder<file::Write, ___T>,
15438 ) -> impl ::core::future::Future<Output = ()>;
15439
15440 fn describe(
15441 &mut self,
15442
15443 responder: ::fidl_next::Responder<file::Describe, ___T>,
15444 ) -> impl ::core::future::Future<Output = ()>;
15445
15446 #[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"]
15447 fn seek(
15448 &mut self,
15449
15450 request: ::fidl_next::Request<file::Seek, ___T>,
15451
15452 responder: ::fidl_next::Responder<file::Seek, ___T>,
15453 ) -> impl ::core::future::Future<Output = ()>;
15454
15455 #[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"]
15456 fn read_at(
15457 &mut self,
15458
15459 request: ::fidl_next::Request<file::ReadAt, ___T>,
15460
15461 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
15462 ) -> impl ::core::future::Future<Output = ()>;
15463
15464 #[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"]
15465 fn write_at(
15466 &mut self,
15467
15468 request: ::fidl_next::Request<file::WriteAt, ___T>,
15469
15470 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
15471 ) -> impl ::core::future::Future<Output = ()>;
15472
15473 #[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"]
15474 fn resize(
15475 &mut self,
15476
15477 request: ::fidl_next::Request<file::Resize, ___T>,
15478
15479 responder: ::fidl_next::Responder<file::Resize, ___T>,
15480 ) -> impl ::core::future::Future<Output = ()>;
15481
15482 #[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"]
15483 fn get_backing_memory(
15484 &mut self,
15485
15486 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
15487
15488 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
15489 ) -> impl ::core::future::Future<Output = ()>;
15490
15491 #[doc = " Pre-allocate on-disk space for this file.\n"]
15492 fn allocate(
15493 &mut self,
15494
15495 request: ::fidl_next::Request<file::Allocate, ___T>,
15496
15497 responder: ::fidl_next::Responder<file::Allocate, ___T>,
15498 ) -> impl ::core::future::Future<Output = ()>;
15499
15500 #[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"]
15501 fn enable_verity(
15502 &mut self,
15503
15504 request: ::fidl_next::Request<file::EnableVerity, ___T>,
15505
15506 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
15507 ) -> impl ::core::future::Future<Output = ()>;
15508
15509 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
15510 ::core::future::ready(())
15511 }
15512}
15513
15514impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for File
15515where
15516 ___H: FileLocalServerHandler<___T>,
15517 ___T: ::fidl_next::Transport,
15518 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
15519 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15520 Constraint = (),
15521 >,
15522 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
15523 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15524 Constraint = (),
15525 >,
15526 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
15527 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15528 Constraint = (),
15529 >,
15530 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
15531 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15532 Constraint = (),
15533 >,
15534 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
15535 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15536 Constraint = (),
15537 >,
15538 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
15539 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15540 Constraint = (),
15541 >,
15542 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
15543 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15544 Constraint = (),
15545 >,
15546 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
15547 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15548 Constraint = (),
15549 >,
15550 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
15551 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15552 Constraint = (),
15553 >,
15554 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
15555 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15556 Constraint = (),
15557 >,
15558 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15559 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15560 Constraint = (),
15561 >,
15562 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15563 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15564 Constraint = (),
15565 >,
15566 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
15567 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15568 Constraint = (),
15569 >,
15570 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
15571 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15572 Constraint = (),
15573 >,
15574 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
15575 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15576 Constraint = (),
15577 >,
15578 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
15579 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15580 Constraint = (),
15581 >,
15582 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
15583 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15584 Constraint = (),
15585 >,
15586 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
15587 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15588 Constraint = (),
15589 >,
15590 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
15591 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15592 Constraint = (),
15593 >,
15594 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
15595 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15596 Constraint = (),
15597 >,
15598 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
15599 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15600 Constraint = (),
15601 >,
15602 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
15603 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15604 Constraint = (),
15605 >,
15606{
15607 async fn on_one_way(
15608 handler: &mut ___H,
15609 mut message: ::fidl_next::Message<___T>,
15610 ) -> ::core::result::Result<
15611 (),
15612 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15613 > {
15614 match *message.header().ordinal {
15615 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
15616 Ok(decoded) => {
15617 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
15618 Ok(())
15619 }
15620 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15621 ordinal: 2366825959783828089,
15622 error,
15623 }),
15624 },
15625
15626 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
15627 Ok(decoded) => {
15628 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
15629 Ok(())
15630 }
15631 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15632 ordinal: 6512600400724287855,
15633 error,
15634 }),
15635 },
15636
15637 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
15638 Ok(decoded) => {
15639 handler
15640 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
15641 .await;
15642 Ok(())
15643 }
15644 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15645 ordinal: 5431626189872037072,
15646 error,
15647 }),
15648 },
15649
15650 ordinal => {
15651 handler.on_unknown_interaction(ordinal).await;
15652 if ::core::matches!(
15653 message.header().flexibility(),
15654 ::fidl_next::protocol::Flexibility::Strict
15655 ) {
15656 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15657 } else {
15658 Ok(())
15659 }
15660 }
15661 }
15662 }
15663
15664 async fn on_two_way(
15665 handler: &mut ___H,
15666 mut message: ::fidl_next::Message<___T>,
15667 responder: ::fidl_next::protocol::Responder<___T>,
15668 ) -> ::core::result::Result<
15669 (),
15670 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15671 > {
15672 match *message.header().ordinal {
15673 7992130864415541162 => {
15674 let responder = ::fidl_next::Responder::from_untyped(responder);
15675
15676 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15677 Ok(decoded) => {
15678 handler
15679 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
15680 .await;
15681 Ok(())
15682 }
15683 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15684 ordinal: 7992130864415541162,
15685 error,
15686 }),
15687 }
15688 }
15689
15690 6121399674497678964 => {
15691 let responder = ::fidl_next::Responder::from_untyped(responder);
15692
15693 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15694 Ok(decoded) => {
15695 handler
15696 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
15697 .await;
15698 Ok(())
15699 }
15700 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15701 ordinal: 6121399674497678964,
15702 error,
15703 }),
15704 }
15705 }
15706
15707 6540867515453498750 => {
15708 let responder = ::fidl_next::Responder::from_untyped(responder);
15709
15710 handler.close(responder).await;
15711 Ok(())
15712 }
15713
15714 2763219980499352582 => {
15715 let responder = ::fidl_next::Responder::from_untyped(responder);
15716
15717 handler.query(responder).await;
15718 Ok(())
15719 }
15720
15721 8689798978500614909 => {
15722 let responder = ::fidl_next::Responder::from_untyped(responder);
15723
15724 handler.deprecated_get_attr(responder).await;
15725 Ok(())
15726 }
15727
15728 4721673413776871238 => {
15729 let responder = ::fidl_next::Responder::from_untyped(responder);
15730
15731 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15732 Ok(decoded) => {
15733 handler
15734 .deprecated_set_attr(
15735 ::fidl_next::Request::from_decoded(decoded),
15736 responder,
15737 )
15738 .await;
15739 Ok(())
15740 }
15741 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15742 ordinal: 4721673413776871238,
15743 error,
15744 }),
15745 }
15746 }
15747
15748 6595803110182632097 => {
15749 let responder = ::fidl_next::Responder::from_untyped(responder);
15750
15751 handler.deprecated_get_flags(responder).await;
15752 Ok(())
15753 }
15754
15755 5950864159036794675 => {
15756 let responder = ::fidl_next::Responder::from_untyped(responder);
15757
15758 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15759 Ok(decoded) => {
15760 handler
15761 .deprecated_set_flags(
15762 ::fidl_next::Request::from_decoded(decoded),
15763 responder,
15764 )
15765 .await;
15766 Ok(())
15767 }
15768 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15769 ordinal: 5950864159036794675,
15770 error,
15771 }),
15772 }
15773 }
15774
15775 105530239381466147 => {
15776 let responder = ::fidl_next::Responder::from_untyped(responder);
15777
15778 handler.get_flags(responder).await;
15779 Ok(())
15780 }
15781
15782 6172186066099445416 => {
15783 let responder = ::fidl_next::Responder::from_untyped(responder);
15784
15785 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15786 Ok(decoded) => {
15787 handler
15788 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
15789 .await;
15790 Ok(())
15791 }
15792 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15793 ordinal: 6172186066099445416,
15794 error,
15795 }),
15796 }
15797 }
15798
15799 8013111122914313744 => {
15800 let responder = ::fidl_next::Responder::from_untyped(responder);
15801
15802 handler.query_filesystem(responder).await;
15803 Ok(())
15804 }
15805
15806 4414537700416816443 => {
15807 let responder = ::fidl_next::Responder::from_untyped(responder);
15808
15809 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15810 Ok(decoded) => {
15811 handler
15812 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
15813 .await;
15814 Ok(())
15815 }
15816 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15817 ordinal: 4414537700416816443,
15818 error,
15819 }),
15820 }
15821 }
15822
15823 3677402239314018056 => {
15824 let responder = ::fidl_next::Responder::from_untyped(responder);
15825
15826 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15827 Ok(decoded) => {
15828 handler
15829 .update_attributes(
15830 ::fidl_next::Request::from_decoded(decoded),
15831 responder,
15832 )
15833 .await;
15834 Ok(())
15835 }
15836 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15837 ordinal: 3677402239314018056,
15838 error,
15839 }),
15840 }
15841 }
15842
15843 3196473584242777161 => {
15844 let responder = ::fidl_next::Responder::from_untyped(responder);
15845
15846 handler.sync(responder).await;
15847 Ok(())
15848 }
15849
15850 5043930208506967771 => {
15851 let responder = ::fidl_next::Responder::from_untyped(responder);
15852
15853 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15854 Ok(decoded) => {
15855 handler
15856 .get_extended_attribute(
15857 ::fidl_next::Request::from_decoded(decoded),
15858 responder,
15859 )
15860 .await;
15861 Ok(())
15862 }
15863 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15864 ordinal: 5043930208506967771,
15865 error,
15866 }),
15867 }
15868 }
15869
15870 5374223046099989052 => {
15871 let responder = ::fidl_next::Responder::from_untyped(responder);
15872
15873 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15874 Ok(decoded) => {
15875 handler
15876 .set_extended_attribute(
15877 ::fidl_next::Request::from_decoded(decoded),
15878 responder,
15879 )
15880 .await;
15881 Ok(())
15882 }
15883 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15884 ordinal: 5374223046099989052,
15885 error,
15886 }),
15887 }
15888 }
15889
15890 8794297771444732717 => {
15891 let responder = ::fidl_next::Responder::from_untyped(responder);
15892
15893 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15894 Ok(decoded) => {
15895 handler
15896 .remove_extended_attribute(
15897 ::fidl_next::Request::from_decoded(decoded),
15898 responder,
15899 )
15900 .await;
15901 Ok(())
15902 }
15903 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15904 ordinal: 8794297771444732717,
15905 error,
15906 }),
15907 }
15908 }
15909
15910 395825947633028830 => {
15911 let responder = ::fidl_next::Responder::from_untyped(responder);
15912
15913 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15914 Ok(decoded) => {
15915 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
15916 Ok(())
15917 }
15918 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15919 ordinal: 395825947633028830,
15920 error,
15921 }),
15922 }
15923 }
15924
15925 7651971425397809026 => {
15926 let responder = ::fidl_next::Responder::from_untyped(responder);
15927
15928 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15929 Ok(decoded) => {
15930 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
15931 Ok(())
15932 }
15933 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15934 ordinal: 7651971425397809026,
15935 error,
15936 }),
15937 }
15938 }
15939
15940 7545125870053689020 => {
15941 let responder = ::fidl_next::Responder::from_untyped(responder);
15942
15943 handler.describe(responder).await;
15944 Ok(())
15945 }
15946
15947 8649041485622956551 => {
15948 let responder = ::fidl_next::Responder::from_untyped(responder);
15949
15950 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15951 Ok(decoded) => {
15952 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
15953 Ok(())
15954 }
15955 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15956 ordinal: 8649041485622956551,
15957 error,
15958 }),
15959 }
15960 }
15961
15962 1587416148701180478 => {
15963 let responder = ::fidl_next::Responder::from_untyped(responder);
15964
15965 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15966 Ok(decoded) => {
15967 handler
15968 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
15969 .await;
15970 Ok(())
15971 }
15972 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15973 ordinal: 1587416148701180478,
15974 error,
15975 }),
15976 }
15977 }
15978
15979 8736683935131400491 => {
15980 let responder = ::fidl_next::Responder::from_untyped(responder);
15981
15982 match ::fidl_next::AsDecoderExt::into_decoded(message) {
15983 Ok(decoded) => {
15984 handler
15985 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
15986 .await;
15987 Ok(())
15988 }
15989 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15990 ordinal: 8736683935131400491,
15991 error,
15992 }),
15993 }
15994 }
15995
15996 3134648685270758458 => {
15997 let responder = ::fidl_next::Responder::from_untyped(responder);
15998
15999 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16000 Ok(decoded) => {
16001 handler
16002 .resize(::fidl_next::Request::from_decoded(decoded), responder)
16003 .await;
16004 Ok(())
16005 }
16006 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16007 ordinal: 3134648685270758458,
16008 error,
16009 }),
16010 }
16011 }
16012
16013 46911652864194091 => {
16014 let responder = ::fidl_next::Responder::from_untyped(responder);
16015
16016 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16017 Ok(decoded) => {
16018 handler
16019 .get_backing_memory(
16020 ::fidl_next::Request::from_decoded(decoded),
16021 responder,
16022 )
16023 .await;
16024 Ok(())
16025 }
16026 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16027 ordinal: 46911652864194091,
16028 error,
16029 }),
16030 }
16031 }
16032
16033 8645235848064269614 => {
16034 let responder = ::fidl_next::Responder::from_untyped(responder);
16035
16036 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16037 Ok(decoded) => {
16038 handler
16039 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
16040 .await;
16041 Ok(())
16042 }
16043 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16044 ordinal: 8645235848064269614,
16045 error,
16046 }),
16047 }
16048 }
16049
16050 3189145313204943035 => {
16051 let responder = ::fidl_next::Responder::from_untyped(responder);
16052
16053 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16054 Ok(decoded) => {
16055 handler
16056 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
16057 .await;
16058 Ok(())
16059 }
16060 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16061 ordinal: 3189145313204943035,
16062 error,
16063 }),
16064 }
16065 }
16066
16067 ordinal => {
16068 handler.on_unknown_interaction(ordinal).await;
16069 if ::core::matches!(
16070 message.header().flexibility(),
16071 ::fidl_next::protocol::Flexibility::Strict
16072 ) {
16073 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16074 } else {
16075 responder
16076 .respond_framework_error(
16077 ordinal,
16078 ::fidl_next::FrameworkError::UnknownMethod,
16079 )
16080 .expect("encoding a framework error should never fail")
16081 .await?;
16082 Ok(())
16083 }
16084 }
16085 }
16086 }
16087}
16088
16089pub trait FileClientHandler<
16093 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
16094 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16095>
16096{
16097 #[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"]
16098 fn on_open(
16099 &mut self,
16100
16101 request: ::fidl_next::Request<file::OnOpen, ___T>,
16102 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16103
16104 #[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"]
16105 fn on_representation(
16106 &mut self,
16107
16108 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
16109 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16110
16111 fn on_unknown_interaction(
16112 &mut self,
16113 ordinal: u64,
16114 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16115 ::core::future::ready(())
16116 }
16117}
16118
16119impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for File
16120where
16121 ___H: FileClientHandler<___T> + ::core::marker::Send,
16122 ___T: ::fidl_next::Transport,
16123 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
16124 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16125 Constraint = (),
16126 >,
16127 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
16128 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16129 Constraint = (),
16130 >,
16131{
16132 async fn on_event(
16133 handler: &mut ___H,
16134 mut message: ::fidl_next::Message<___T>,
16135 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
16136 match *message.header().ordinal {
16137 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16138 Ok(decoded) => {
16139 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
16140 Ok(())
16141 }
16142 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16143 ordinal: 9207534335756671346,
16144 error,
16145 }),
16146 },
16147
16148 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16149 Ok(decoded) => {
16150 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
16151 Ok(())
16152 }
16153 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16154 ordinal: 6679970090861613324,
16155 error,
16156 }),
16157 },
16158
16159 ordinal => {
16160 handler.on_unknown_interaction(ordinal).await;
16161 if ::core::matches!(
16162 message.header().flexibility(),
16163 ::fidl_next::protocol::Flexibility::Strict
16164 ) {
16165 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16166 } else {
16167 Ok(())
16168 }
16169 }
16170 }
16171 }
16172}
16173
16174pub trait FileServerHandler<
16178 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
16179 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16180>
16181{
16182 #[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"]
16183 fn advisory_lock(
16184 &mut self,
16185
16186 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
16187
16188 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
16189 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16190
16191 #[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"]
16192 fn link_into(
16193 &mut self,
16194
16195 request: ::fidl_next::Request<file::LinkInto, ___T>,
16196
16197 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
16198 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16199
16200 fn clone(
16201 &mut self,
16202
16203 request: ::fidl_next::Request<file::Clone, ___T>,
16204 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16205
16206 #[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"]
16207 fn close(
16208 &mut self,
16209
16210 responder: ::fidl_next::Responder<file::Close, ___T>,
16211 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16212
16213 fn query(
16214 &mut self,
16215
16216 responder: ::fidl_next::Responder<file::Query, ___T>,
16217 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16218
16219 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
16220 fn deprecated_clone(
16221 &mut self,
16222
16223 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
16224 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16225
16226 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
16227 fn deprecated_get_attr(
16228 &mut self,
16229
16230 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
16231 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16232
16233 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
16234 fn deprecated_set_attr(
16235 &mut self,
16236
16237 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
16238
16239 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
16240 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16241
16242 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
16243 fn deprecated_get_flags(
16244 &mut self,
16245
16246 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
16247 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16248
16249 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
16250 fn deprecated_set_flags(
16251 &mut self,
16252
16253 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
16254
16255 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
16256 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16257
16258 #[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"]
16259 fn get_flags(
16260 &mut self,
16261
16262 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
16263 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16264
16265 #[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"]
16266 fn set_flags(
16267 &mut self,
16268
16269 request: ::fidl_next::Request<file::SetFlags, ___T>,
16270
16271 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
16272 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16273
16274 #[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"]
16275 fn query_filesystem(
16276 &mut self,
16277
16278 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
16279 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16280
16281 #[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"]
16282 fn get_attributes(
16283 &mut self,
16284
16285 request: ::fidl_next::Request<file::GetAttributes, ___T>,
16286
16287 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
16288 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16289
16290 #[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"]
16291 fn update_attributes(
16292 &mut self,
16293
16294 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
16295
16296 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
16297 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16298
16299 #[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"]
16300 fn sync(
16301 &mut self,
16302
16303 responder: ::fidl_next::Responder<file::Sync, ___T>,
16304 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16305
16306 #[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"]
16307 fn list_extended_attributes(
16308 &mut self,
16309
16310 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
16311 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16312
16313 #[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"]
16314 fn get_extended_attribute(
16315 &mut self,
16316
16317 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
16318
16319 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
16320 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16321
16322 #[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"]
16323 fn set_extended_attribute(
16324 &mut self,
16325
16326 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
16327
16328 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
16329 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16330
16331 #[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"]
16332 fn remove_extended_attribute(
16333 &mut self,
16334
16335 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
16336
16337 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
16338 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16339
16340 #[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"]
16341 fn read(
16342 &mut self,
16343
16344 request: ::fidl_next::Request<file::Read, ___T>,
16345
16346 responder: ::fidl_next::Responder<file::Read, ___T>,
16347 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16348
16349 #[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"]
16350 fn write(
16351 &mut self,
16352
16353 request: ::fidl_next::Request<file::Write, ___T>,
16354
16355 responder: ::fidl_next::Responder<file::Write, ___T>,
16356 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16357
16358 fn describe(
16359 &mut self,
16360
16361 responder: ::fidl_next::Responder<file::Describe, ___T>,
16362 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16363
16364 #[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"]
16365 fn seek(
16366 &mut self,
16367
16368 request: ::fidl_next::Request<file::Seek, ___T>,
16369
16370 responder: ::fidl_next::Responder<file::Seek, ___T>,
16371 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16372
16373 #[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"]
16374 fn read_at(
16375 &mut self,
16376
16377 request: ::fidl_next::Request<file::ReadAt, ___T>,
16378
16379 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
16380 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16381
16382 #[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"]
16383 fn write_at(
16384 &mut self,
16385
16386 request: ::fidl_next::Request<file::WriteAt, ___T>,
16387
16388 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
16389 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16390
16391 #[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"]
16392 fn resize(
16393 &mut self,
16394
16395 request: ::fidl_next::Request<file::Resize, ___T>,
16396
16397 responder: ::fidl_next::Responder<file::Resize, ___T>,
16398 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16399
16400 #[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"]
16401 fn get_backing_memory(
16402 &mut self,
16403
16404 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
16405
16406 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
16407 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16408
16409 #[doc = " Pre-allocate on-disk space for this file.\n"]
16410 fn allocate(
16411 &mut self,
16412
16413 request: ::fidl_next::Request<file::Allocate, ___T>,
16414
16415 responder: ::fidl_next::Responder<file::Allocate, ___T>,
16416 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16417
16418 #[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"]
16419 fn enable_verity(
16420 &mut self,
16421
16422 request: ::fidl_next::Request<file::EnableVerity, ___T>,
16423
16424 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
16425 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
16426
16427 fn on_unknown_interaction(
16428 &mut self,
16429 ordinal: u64,
16430 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
16431 ::core::future::ready(())
16432 }
16433}
16434
16435impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for File
16436where
16437 ___H: FileServerHandler<___T> + ::core::marker::Send,
16438 ___T: ::fidl_next::Transport,
16439 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
16440 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16441 Constraint = (),
16442 >,
16443 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
16444 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16445 Constraint = (),
16446 >,
16447 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
16448 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16449 Constraint = (),
16450 >,
16451 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
16452 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16453 Constraint = (),
16454 >,
16455 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
16456 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16457 Constraint = (),
16458 >,
16459 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
16460 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16461 Constraint = (),
16462 >,
16463 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
16464 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16465 Constraint = (),
16466 >,
16467 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
16468 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16469 Constraint = (),
16470 >,
16471 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
16472 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16473 Constraint = (),
16474 >,
16475 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
16476 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16477 Constraint = (),
16478 >,
16479 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16480 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16481 Constraint = (),
16482 >,
16483 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16484 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16485 Constraint = (),
16486 >,
16487 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16488 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16489 Constraint = (),
16490 >,
16491 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
16492 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16493 Constraint = (),
16494 >,
16495 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
16496 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16497 Constraint = (),
16498 >,
16499 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
16500 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16501 Constraint = (),
16502 >,
16503 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
16504 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16505 Constraint = (),
16506 >,
16507 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
16508 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16509 Constraint = (),
16510 >,
16511 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
16512 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16513 Constraint = (),
16514 >,
16515 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
16516 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16517 Constraint = (),
16518 >,
16519 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
16520 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16521 Constraint = (),
16522 >,
16523 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
16524 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16525 Constraint = (),
16526 >,
16527{
16528 async fn on_one_way(
16529 handler: &mut ___H,
16530 mut message: ::fidl_next::Message<___T>,
16531 ) -> ::core::result::Result<
16532 (),
16533 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16534 > {
16535 match *message.header().ordinal {
16536 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16537 Ok(decoded) => {
16538 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
16539 Ok(())
16540 }
16541 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16542 ordinal: 2366825959783828089,
16543 error,
16544 }),
16545 },
16546
16547 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16548 Ok(decoded) => {
16549 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
16550 Ok(())
16551 }
16552 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16553 ordinal: 6512600400724287855,
16554 error,
16555 }),
16556 },
16557
16558 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16559 Ok(decoded) => {
16560 handler
16561 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
16562 .await;
16563 Ok(())
16564 }
16565 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16566 ordinal: 5431626189872037072,
16567 error,
16568 }),
16569 },
16570
16571 ordinal => {
16572 handler.on_unknown_interaction(ordinal).await;
16573 if ::core::matches!(
16574 message.header().flexibility(),
16575 ::fidl_next::protocol::Flexibility::Strict
16576 ) {
16577 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16578 } else {
16579 Ok(())
16580 }
16581 }
16582 }
16583 }
16584
16585 async fn on_two_way(
16586 handler: &mut ___H,
16587 mut message: ::fidl_next::Message<___T>,
16588 responder: ::fidl_next::protocol::Responder<___T>,
16589 ) -> ::core::result::Result<
16590 (),
16591 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16592 > {
16593 match *message.header().ordinal {
16594 7992130864415541162 => {
16595 let responder = ::fidl_next::Responder::from_untyped(responder);
16596
16597 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16598 Ok(decoded) => {
16599 handler
16600 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
16601 .await;
16602 Ok(())
16603 }
16604 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16605 ordinal: 7992130864415541162,
16606 error,
16607 }),
16608 }
16609 }
16610
16611 6121399674497678964 => {
16612 let responder = ::fidl_next::Responder::from_untyped(responder);
16613
16614 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16615 Ok(decoded) => {
16616 handler
16617 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
16618 .await;
16619 Ok(())
16620 }
16621 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16622 ordinal: 6121399674497678964,
16623 error,
16624 }),
16625 }
16626 }
16627
16628 6540867515453498750 => {
16629 let responder = ::fidl_next::Responder::from_untyped(responder);
16630
16631 handler.close(responder).await;
16632 Ok(())
16633 }
16634
16635 2763219980499352582 => {
16636 let responder = ::fidl_next::Responder::from_untyped(responder);
16637
16638 handler.query(responder).await;
16639 Ok(())
16640 }
16641
16642 8689798978500614909 => {
16643 let responder = ::fidl_next::Responder::from_untyped(responder);
16644
16645 handler.deprecated_get_attr(responder).await;
16646 Ok(())
16647 }
16648
16649 4721673413776871238 => {
16650 let responder = ::fidl_next::Responder::from_untyped(responder);
16651
16652 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16653 Ok(decoded) => {
16654 handler
16655 .deprecated_set_attr(
16656 ::fidl_next::Request::from_decoded(decoded),
16657 responder,
16658 )
16659 .await;
16660 Ok(())
16661 }
16662 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16663 ordinal: 4721673413776871238,
16664 error,
16665 }),
16666 }
16667 }
16668
16669 6595803110182632097 => {
16670 let responder = ::fidl_next::Responder::from_untyped(responder);
16671
16672 handler.deprecated_get_flags(responder).await;
16673 Ok(())
16674 }
16675
16676 5950864159036794675 => {
16677 let responder = ::fidl_next::Responder::from_untyped(responder);
16678
16679 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16680 Ok(decoded) => {
16681 handler
16682 .deprecated_set_flags(
16683 ::fidl_next::Request::from_decoded(decoded),
16684 responder,
16685 )
16686 .await;
16687 Ok(())
16688 }
16689 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16690 ordinal: 5950864159036794675,
16691 error,
16692 }),
16693 }
16694 }
16695
16696 105530239381466147 => {
16697 let responder = ::fidl_next::Responder::from_untyped(responder);
16698
16699 handler.get_flags(responder).await;
16700 Ok(())
16701 }
16702
16703 6172186066099445416 => {
16704 let responder = ::fidl_next::Responder::from_untyped(responder);
16705
16706 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16707 Ok(decoded) => {
16708 handler
16709 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
16710 .await;
16711 Ok(())
16712 }
16713 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16714 ordinal: 6172186066099445416,
16715 error,
16716 }),
16717 }
16718 }
16719
16720 8013111122914313744 => {
16721 let responder = ::fidl_next::Responder::from_untyped(responder);
16722
16723 handler.query_filesystem(responder).await;
16724 Ok(())
16725 }
16726
16727 4414537700416816443 => {
16728 let responder = ::fidl_next::Responder::from_untyped(responder);
16729
16730 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16731 Ok(decoded) => {
16732 handler
16733 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
16734 .await;
16735 Ok(())
16736 }
16737 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16738 ordinal: 4414537700416816443,
16739 error,
16740 }),
16741 }
16742 }
16743
16744 3677402239314018056 => {
16745 let responder = ::fidl_next::Responder::from_untyped(responder);
16746
16747 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16748 Ok(decoded) => {
16749 handler
16750 .update_attributes(
16751 ::fidl_next::Request::from_decoded(decoded),
16752 responder,
16753 )
16754 .await;
16755 Ok(())
16756 }
16757 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16758 ordinal: 3677402239314018056,
16759 error,
16760 }),
16761 }
16762 }
16763
16764 3196473584242777161 => {
16765 let responder = ::fidl_next::Responder::from_untyped(responder);
16766
16767 handler.sync(responder).await;
16768 Ok(())
16769 }
16770
16771 5043930208506967771 => {
16772 let responder = ::fidl_next::Responder::from_untyped(responder);
16773
16774 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16775 Ok(decoded) => {
16776 handler
16777 .get_extended_attribute(
16778 ::fidl_next::Request::from_decoded(decoded),
16779 responder,
16780 )
16781 .await;
16782 Ok(())
16783 }
16784 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16785 ordinal: 5043930208506967771,
16786 error,
16787 }),
16788 }
16789 }
16790
16791 5374223046099989052 => {
16792 let responder = ::fidl_next::Responder::from_untyped(responder);
16793
16794 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16795 Ok(decoded) => {
16796 handler
16797 .set_extended_attribute(
16798 ::fidl_next::Request::from_decoded(decoded),
16799 responder,
16800 )
16801 .await;
16802 Ok(())
16803 }
16804 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16805 ordinal: 5374223046099989052,
16806 error,
16807 }),
16808 }
16809 }
16810
16811 8794297771444732717 => {
16812 let responder = ::fidl_next::Responder::from_untyped(responder);
16813
16814 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16815 Ok(decoded) => {
16816 handler
16817 .remove_extended_attribute(
16818 ::fidl_next::Request::from_decoded(decoded),
16819 responder,
16820 )
16821 .await;
16822 Ok(())
16823 }
16824 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16825 ordinal: 8794297771444732717,
16826 error,
16827 }),
16828 }
16829 }
16830
16831 395825947633028830 => {
16832 let responder = ::fidl_next::Responder::from_untyped(responder);
16833
16834 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16835 Ok(decoded) => {
16836 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
16837 Ok(())
16838 }
16839 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16840 ordinal: 395825947633028830,
16841 error,
16842 }),
16843 }
16844 }
16845
16846 7651971425397809026 => {
16847 let responder = ::fidl_next::Responder::from_untyped(responder);
16848
16849 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16850 Ok(decoded) => {
16851 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
16852 Ok(())
16853 }
16854 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16855 ordinal: 7651971425397809026,
16856 error,
16857 }),
16858 }
16859 }
16860
16861 7545125870053689020 => {
16862 let responder = ::fidl_next::Responder::from_untyped(responder);
16863
16864 handler.describe(responder).await;
16865 Ok(())
16866 }
16867
16868 8649041485622956551 => {
16869 let responder = ::fidl_next::Responder::from_untyped(responder);
16870
16871 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16872 Ok(decoded) => {
16873 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
16874 Ok(())
16875 }
16876 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16877 ordinal: 8649041485622956551,
16878 error,
16879 }),
16880 }
16881 }
16882
16883 1587416148701180478 => {
16884 let responder = ::fidl_next::Responder::from_untyped(responder);
16885
16886 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16887 Ok(decoded) => {
16888 handler
16889 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
16890 .await;
16891 Ok(())
16892 }
16893 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16894 ordinal: 1587416148701180478,
16895 error,
16896 }),
16897 }
16898 }
16899
16900 8736683935131400491 => {
16901 let responder = ::fidl_next::Responder::from_untyped(responder);
16902
16903 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16904 Ok(decoded) => {
16905 handler
16906 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
16907 .await;
16908 Ok(())
16909 }
16910 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16911 ordinal: 8736683935131400491,
16912 error,
16913 }),
16914 }
16915 }
16916
16917 3134648685270758458 => {
16918 let responder = ::fidl_next::Responder::from_untyped(responder);
16919
16920 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16921 Ok(decoded) => {
16922 handler
16923 .resize(::fidl_next::Request::from_decoded(decoded), responder)
16924 .await;
16925 Ok(())
16926 }
16927 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16928 ordinal: 3134648685270758458,
16929 error,
16930 }),
16931 }
16932 }
16933
16934 46911652864194091 => {
16935 let responder = ::fidl_next::Responder::from_untyped(responder);
16936
16937 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16938 Ok(decoded) => {
16939 handler
16940 .get_backing_memory(
16941 ::fidl_next::Request::from_decoded(decoded),
16942 responder,
16943 )
16944 .await;
16945 Ok(())
16946 }
16947 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16948 ordinal: 46911652864194091,
16949 error,
16950 }),
16951 }
16952 }
16953
16954 8645235848064269614 => {
16955 let responder = ::fidl_next::Responder::from_untyped(responder);
16956
16957 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16958 Ok(decoded) => {
16959 handler
16960 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
16961 .await;
16962 Ok(())
16963 }
16964 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16965 ordinal: 8645235848064269614,
16966 error,
16967 }),
16968 }
16969 }
16970
16971 3189145313204943035 => {
16972 let responder = ::fidl_next::Responder::from_untyped(responder);
16973
16974 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16975 Ok(decoded) => {
16976 handler
16977 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
16978 .await;
16979 Ok(())
16980 }
16981 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16982 ordinal: 3189145313204943035,
16983 error,
16984 }),
16985 }
16986 }
16987
16988 ordinal => {
16989 handler.on_unknown_interaction(ordinal).await;
16990 if ::core::matches!(
16991 message.header().flexibility(),
16992 ::fidl_next::protocol::Flexibility::Strict
16993 ) {
16994 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16995 } else {
16996 responder
16997 .respond_framework_error(
16998 ordinal,
16999 ::fidl_next::FrameworkError::UnknownMethod,
17000 )
17001 .expect("encoding a framework error should never fail")
17002 .await?;
17003 Ok(())
17004 }
17005 }
17006 }
17007 }
17008}
17009
17010impl<___T> FileClientHandler<___T> for ::fidl_next::IgnoreEvents
17011where
17012 ___T: ::fidl_next::Transport,
17013{
17014 async fn on_open(&mut self, _: ::fidl_next::Request<file::OnOpen, ___T>) {}
17015
17016 async fn on_representation(&mut self, _: ::fidl_next::Request<file::OnRepresentation, ___T>) {}
17017
17018 async fn on_unknown_interaction(&mut self, _: u64) {}
17019}
17020
17021impl<___H, ___T> FileLocalClientHandler<___T> for ::fidl_next::Local<___H>
17022where
17023 ___H: FileClientHandler<___T>,
17024 ___T: ::fidl_next::Transport,
17025{
17026 async fn on_open(&mut self, request: ::fidl_next::Request<file::OnOpen, ___T>) {
17027 ___H::on_open(&mut self.0, request).await
17028 }
17029
17030 async fn on_representation(
17031 &mut self,
17032
17033 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
17034 ) {
17035 ___H::on_representation(&mut self.0, request).await
17036 }
17037
17038 async fn on_unknown_interaction(&mut self, ordinal: u64) {
17039 ___H::on_unknown_interaction(&mut self.0, ordinal).await
17040 }
17041}
17042
17043impl<___H, ___T> FileLocalServerHandler<___T> for ::fidl_next::Local<___H>
17044where
17045 ___H: FileServerHandler<___T>,
17046 ___T: ::fidl_next::Transport,
17047{
17048 async fn advisory_lock(
17049 &mut self,
17050
17051 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
17052
17053 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
17054 ) {
17055 ___H::advisory_lock(&mut self.0, request, responder).await
17056 }
17057
17058 async fn link_into(
17059 &mut self,
17060
17061 request: ::fidl_next::Request<file::LinkInto, ___T>,
17062
17063 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
17064 ) {
17065 ___H::link_into(&mut self.0, request, responder).await
17066 }
17067
17068 async fn clone(&mut self, request: ::fidl_next::Request<file::Clone, ___T>) {
17069 ___H::clone(&mut self.0, request).await
17070 }
17071
17072 async fn close(&mut self, responder: ::fidl_next::Responder<file::Close, ___T>) {
17073 ___H::close(&mut self.0, responder).await
17074 }
17075
17076 async fn query(&mut self, responder: ::fidl_next::Responder<file::Query, ___T>) {
17077 ___H::query(&mut self.0, responder).await
17078 }
17079
17080 async fn deprecated_clone(
17081 &mut self,
17082
17083 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
17084 ) {
17085 ___H::deprecated_clone(&mut self.0, request).await
17086 }
17087
17088 async fn deprecated_get_attr(
17089 &mut self,
17090
17091 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
17092 ) {
17093 ___H::deprecated_get_attr(&mut self.0, responder).await
17094 }
17095
17096 async fn deprecated_set_attr(
17097 &mut self,
17098
17099 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
17100
17101 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
17102 ) {
17103 ___H::deprecated_set_attr(&mut self.0, request, responder).await
17104 }
17105
17106 async fn deprecated_get_flags(
17107 &mut self,
17108
17109 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
17110 ) {
17111 ___H::deprecated_get_flags(&mut self.0, responder).await
17112 }
17113
17114 async fn deprecated_set_flags(
17115 &mut self,
17116
17117 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
17118
17119 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
17120 ) {
17121 ___H::deprecated_set_flags(&mut self.0, request, responder).await
17122 }
17123
17124 async fn get_flags(&mut self, responder: ::fidl_next::Responder<file::GetFlags, ___T>) {
17125 ___H::get_flags(&mut self.0, responder).await
17126 }
17127
17128 async fn set_flags(
17129 &mut self,
17130
17131 request: ::fidl_next::Request<file::SetFlags, ___T>,
17132
17133 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
17134 ) {
17135 ___H::set_flags(&mut self.0, request, responder).await
17136 }
17137
17138 async fn query_filesystem(
17139 &mut self,
17140
17141 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
17142 ) {
17143 ___H::query_filesystem(&mut self.0, responder).await
17144 }
17145
17146 async fn get_attributes(
17147 &mut self,
17148
17149 request: ::fidl_next::Request<file::GetAttributes, ___T>,
17150
17151 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
17152 ) {
17153 ___H::get_attributes(&mut self.0, request, responder).await
17154 }
17155
17156 async fn update_attributes(
17157 &mut self,
17158
17159 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
17160
17161 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
17162 ) {
17163 ___H::update_attributes(&mut self.0, request, responder).await
17164 }
17165
17166 async fn sync(&mut self, responder: ::fidl_next::Responder<file::Sync, ___T>) {
17167 ___H::sync(&mut self.0, responder).await
17168 }
17169
17170 async fn list_extended_attributes(
17171 &mut self,
17172
17173 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
17174 ) {
17175 ___H::list_extended_attributes(&mut self.0, request).await
17176 }
17177
17178 async fn get_extended_attribute(
17179 &mut self,
17180
17181 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
17182
17183 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
17184 ) {
17185 ___H::get_extended_attribute(&mut self.0, request, responder).await
17186 }
17187
17188 async fn set_extended_attribute(
17189 &mut self,
17190
17191 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
17192
17193 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
17194 ) {
17195 ___H::set_extended_attribute(&mut self.0, request, responder).await
17196 }
17197
17198 async fn remove_extended_attribute(
17199 &mut self,
17200
17201 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
17202
17203 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
17204 ) {
17205 ___H::remove_extended_attribute(&mut self.0, request, responder).await
17206 }
17207
17208 async fn read(
17209 &mut self,
17210
17211 request: ::fidl_next::Request<file::Read, ___T>,
17212
17213 responder: ::fidl_next::Responder<file::Read, ___T>,
17214 ) {
17215 ___H::read(&mut self.0, request, responder).await
17216 }
17217
17218 async fn write(
17219 &mut self,
17220
17221 request: ::fidl_next::Request<file::Write, ___T>,
17222
17223 responder: ::fidl_next::Responder<file::Write, ___T>,
17224 ) {
17225 ___H::write(&mut self.0, request, responder).await
17226 }
17227
17228 async fn describe(&mut self, responder: ::fidl_next::Responder<file::Describe, ___T>) {
17229 ___H::describe(&mut self.0, responder).await
17230 }
17231
17232 async fn seek(
17233 &mut self,
17234
17235 request: ::fidl_next::Request<file::Seek, ___T>,
17236
17237 responder: ::fidl_next::Responder<file::Seek, ___T>,
17238 ) {
17239 ___H::seek(&mut self.0, request, responder).await
17240 }
17241
17242 async fn read_at(
17243 &mut self,
17244
17245 request: ::fidl_next::Request<file::ReadAt, ___T>,
17246
17247 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
17248 ) {
17249 ___H::read_at(&mut self.0, request, responder).await
17250 }
17251
17252 async fn write_at(
17253 &mut self,
17254
17255 request: ::fidl_next::Request<file::WriteAt, ___T>,
17256
17257 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
17258 ) {
17259 ___H::write_at(&mut self.0, request, responder).await
17260 }
17261
17262 async fn resize(
17263 &mut self,
17264
17265 request: ::fidl_next::Request<file::Resize, ___T>,
17266
17267 responder: ::fidl_next::Responder<file::Resize, ___T>,
17268 ) {
17269 ___H::resize(&mut self.0, request, responder).await
17270 }
17271
17272 async fn get_backing_memory(
17273 &mut self,
17274
17275 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
17276
17277 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
17278 ) {
17279 ___H::get_backing_memory(&mut self.0, request, responder).await
17280 }
17281
17282 async fn allocate(
17283 &mut self,
17284
17285 request: ::fidl_next::Request<file::Allocate, ___T>,
17286
17287 responder: ::fidl_next::Responder<file::Allocate, ___T>,
17288 ) {
17289 ___H::allocate(&mut self.0, request, responder).await
17290 }
17291
17292 async fn enable_verity(
17293 &mut self,
17294
17295 request: ::fidl_next::Request<file::EnableVerity, ___T>,
17296
17297 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
17298 ) {
17299 ___H::enable_verity(&mut self.0, request, responder).await
17300 }
17301
17302 async fn on_unknown_interaction(&mut self, ordinal: u64) {
17303 ___H::on_unknown_interaction(&mut self.0, ordinal).await
17304 }
17305}
17306
17307#[doc = " A [\'Node\'] which contains a symbolic link.\n"]
17309#[derive(PartialEq, Debug)]
17310pub struct Symlink;
17311
17312impl ::fidl_next::Discoverable for Symlink {
17313 const PROTOCOL_NAME: &'static str = "fuchsia.io.Symlink";
17314}
17315
17316#[cfg(target_os = "fuchsia")]
17317impl ::fidl_next::HasTransport for Symlink {
17318 type Transport = ::fdomain_client::Channel;
17319}
17320
17321pub mod symlink {
17322 pub mod prelude {
17323 pub use crate::{
17324 Symlink, SymlinkClientHandler, SymlinkLocalClientHandler, SymlinkLocalServerHandler,
17325 SymlinkServerHandler, symlink,
17326 };
17327
17328 pub use crate::natural::ExtendedAttributeValue;
17329
17330 pub use crate::natural::LinkableLinkIntoRequest;
17331
17332 pub use crate::natural::LinkableLinkIntoResponse;
17333
17334 pub use crate::natural::MutableNodeAttributes;
17335
17336 pub use crate::natural::NodeAttributes2;
17337
17338 pub use crate::natural::NodeDeprecatedCloneRequest;
17339
17340 pub use crate::natural::NodeDeprecatedGetAttrResponse;
17341
17342 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
17343
17344 pub use crate::natural::NodeDeprecatedSetAttrRequest;
17345
17346 pub use crate::natural::NodeDeprecatedSetAttrResponse;
17347
17348 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
17349
17350 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
17351
17352 pub use crate::natural::NodeGetAttributesRequest;
17353
17354 pub use crate::natural::NodeGetExtendedAttributeRequest;
17355
17356 pub use crate::natural::NodeListExtendedAttributesRequest;
17357
17358 pub use crate::natural::NodeOnOpenRequest;
17359
17360 pub use crate::natural::NodeQueryFilesystemResponse;
17361
17362 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
17363
17364 pub use crate::natural::NodeSetExtendedAttributeRequest;
17365
17366 pub use crate::natural::NodeSetFlagsRequest;
17367
17368 pub use crate::natural::NodeGetFlagsResponse;
17369
17370 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
17371
17372 pub use crate::natural::NodeSetExtendedAttributeResponse;
17373
17374 pub use crate::natural::NodeSetFlagsResponse;
17375
17376 pub use crate::natural::NodeSyncResponse;
17377
17378 pub use crate::natural::NodeUpdateAttributesResponse;
17379
17380 pub use crate::natural::OpenableOpenRequest;
17381
17382 pub use crate::natural::Representation;
17383
17384 pub use crate::natural::SymlinkInfo;
17385
17386 pub use ::fdomain_next_fuchsia_unknown::natural::CloneableCloneRequest;
17387
17388 pub use ::fdomain_next_fuchsia_unknown::natural::CloseableCloseResponse;
17389
17390 pub use ::fdomain_next_fuchsia_unknown::natural::QueryableQueryResponse;
17391 }
17392
17393 pub struct LinkInto;
17394
17395 impl ::fidl_next::Method for LinkInto {
17396 const ORDINAL: u64 = 6121399674497678964;
17397 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17398 ::fidl_next::protocol::Flexibility::Strict;
17399
17400 type Protocol = crate::Symlink;
17401
17402 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
17403 }
17404
17405 impl ::fidl_next::TwoWayMethod for LinkInto {
17406 type Response = ::fidl_next::wire::Result<
17407 'static,
17408 crate::wire::LinkableLinkIntoResponse,
17409 ::fidl_next::wire::fuchsia::Status,
17410 >;
17411 }
17412
17413 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
17414 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17415
17416 fn respond(response: ___R) -> Self::Output {
17417 ::core::result::Result::Ok(response)
17418 }
17419 }
17420
17421 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
17422 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17423
17424 fn respond_err(response: ___R) -> Self::Output {
17425 ::core::result::Result::Err(response)
17426 }
17427 }
17428
17429 pub struct Clone;
17430
17431 impl ::fidl_next::Method for Clone {
17432 const ORDINAL: u64 = 2366825959783828089;
17433 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17434 ::fidl_next::protocol::Flexibility::Strict;
17435
17436 type Protocol = crate::Symlink;
17437
17438 type Request = ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest;
17439 }
17440
17441 pub struct Close;
17442
17443 impl ::fidl_next::Method for Close {
17444 const ORDINAL: u64 = 6540867515453498750;
17445 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17446 ::fidl_next::protocol::Flexibility::Strict;
17447
17448 type Protocol = crate::Symlink;
17449
17450 type Request = ::fidl_next::wire::EmptyMessageBody;
17451 }
17452
17453 impl ::fidl_next::TwoWayMethod for Close {
17454 type Response = ::fidl_next::wire::Result<
17455 'static,
17456 ::fdomain_next_fuchsia_unknown::wire::CloseableCloseResponse,
17457 ::fidl_next::wire::Int32,
17458 >;
17459 }
17460
17461 impl<___R> ::fidl_next::Respond<___R> for Close {
17462 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17463
17464 fn respond(response: ___R) -> Self::Output {
17465 ::core::result::Result::Ok(response)
17466 }
17467 }
17468
17469 impl<___R> ::fidl_next::RespondErr<___R> for Close {
17470 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17471
17472 fn respond_err(response: ___R) -> Self::Output {
17473 ::core::result::Result::Err(response)
17474 }
17475 }
17476
17477 pub struct Query;
17478
17479 impl ::fidl_next::Method for Query {
17480 const ORDINAL: u64 = 2763219980499352582;
17481 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17482 ::fidl_next::protocol::Flexibility::Strict;
17483
17484 type Protocol = crate::Symlink;
17485
17486 type Request = ::fidl_next::wire::EmptyMessageBody;
17487 }
17488
17489 impl ::fidl_next::TwoWayMethod for Query {
17490 type Response = ::fidl_next::wire::Strict<
17491 ::fdomain_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
17492 >;
17493 }
17494
17495 impl<___R> ::fidl_next::Respond<___R> for Query {
17496 type Output = ::fidl_next::Strict<
17497 ::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>,
17498 >;
17499
17500 fn respond(response: ___R) -> Self::Output {
17501 ::fidl_next::Strict(::fdomain_next_fuchsia_unknown::generic::QueryableQueryResponse {
17502 protocol: response,
17503 })
17504 }
17505 }
17506
17507 pub struct DeprecatedClone;
17508
17509 impl ::fidl_next::Method for DeprecatedClone {
17510 const ORDINAL: u64 = 6512600400724287855;
17511 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17512 ::fidl_next::protocol::Flexibility::Flexible;
17513
17514 type Protocol = crate::Symlink;
17515
17516 type Request = crate::wire::NodeDeprecatedCloneRequest;
17517 }
17518
17519 pub struct OnOpen;
17520
17521 impl ::fidl_next::Method for OnOpen {
17522 const ORDINAL: u64 = 9207534335756671346;
17523 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17524 ::fidl_next::protocol::Flexibility::Flexible;
17525
17526 type Protocol = crate::Symlink;
17527
17528 type Request = crate::wire::NodeOnOpenRequest<'static>;
17529 }
17530
17531 pub struct DeprecatedGetAttr;
17532
17533 impl ::fidl_next::Method for DeprecatedGetAttr {
17534 const ORDINAL: u64 = 8689798978500614909;
17535 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17536 ::fidl_next::protocol::Flexibility::Strict;
17537
17538 type Protocol = crate::Symlink;
17539
17540 type Request = ::fidl_next::wire::EmptyMessageBody;
17541 }
17542
17543 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
17544 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
17545 }
17546
17547 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
17548 type Output = ::fidl_next::Strict<___R>;
17549
17550 fn respond(response: ___R) -> Self::Output {
17551 ::fidl_next::Strict(response)
17552 }
17553 }
17554
17555 pub struct DeprecatedSetAttr;
17556
17557 impl ::fidl_next::Method for DeprecatedSetAttr {
17558 const ORDINAL: u64 = 4721673413776871238;
17559 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17560 ::fidl_next::protocol::Flexibility::Strict;
17561
17562 type Protocol = crate::Symlink;
17563
17564 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
17565 }
17566
17567 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
17568 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
17569 }
17570
17571 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
17572 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
17573
17574 fn respond(response: ___R) -> Self::Output {
17575 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
17576 }
17577 }
17578
17579 pub struct DeprecatedGetFlags;
17580
17581 impl ::fidl_next::Method for DeprecatedGetFlags {
17582 const ORDINAL: u64 = 6595803110182632097;
17583 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17584 ::fidl_next::protocol::Flexibility::Strict;
17585
17586 type Protocol = crate::Symlink;
17587
17588 type Request = ::fidl_next::wire::EmptyMessageBody;
17589 }
17590
17591 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
17592 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
17593 }
17594
17595 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
17596 type Output = ::fidl_next::Strict<___R>;
17597
17598 fn respond(response: ___R) -> Self::Output {
17599 ::fidl_next::Strict(response)
17600 }
17601 }
17602
17603 pub struct DeprecatedSetFlags;
17604
17605 impl ::fidl_next::Method for DeprecatedSetFlags {
17606 const ORDINAL: u64 = 5950864159036794675;
17607 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17608 ::fidl_next::protocol::Flexibility::Strict;
17609
17610 type Protocol = crate::Symlink;
17611
17612 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
17613 }
17614
17615 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
17616 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
17617 }
17618
17619 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
17620 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
17621
17622 fn respond(response: ___R) -> Self::Output {
17623 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
17624 }
17625 }
17626
17627 pub struct GetFlags;
17628
17629 impl ::fidl_next::Method for GetFlags {
17630 const ORDINAL: u64 = 105530239381466147;
17631 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17632 ::fidl_next::protocol::Flexibility::Flexible;
17633
17634 type Protocol = crate::Symlink;
17635
17636 type Request = ::fidl_next::wire::EmptyMessageBody;
17637 }
17638
17639 impl ::fidl_next::TwoWayMethod for GetFlags {
17640 type Response = ::fidl_next::wire::Result<
17641 'static,
17642 crate::wire::NodeGetFlagsResponse,
17643 ::fidl_next::wire::fuchsia::Status,
17644 >;
17645 }
17646
17647 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
17648 type Output = ::core::result::Result<
17649 crate::generic::NodeGetFlagsResponse<___R>,
17650 ::fidl_next::never::Never,
17651 >;
17652
17653 fn respond(response: ___R) -> Self::Output {
17654 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
17655 }
17656 }
17657
17658 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
17659 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17660
17661 fn respond_err(response: ___R) -> Self::Output {
17662 ::core::result::Result::Err(response)
17663 }
17664 }
17665
17666 pub struct SetFlags;
17667
17668 impl ::fidl_next::Method for SetFlags {
17669 const ORDINAL: u64 = 6172186066099445416;
17670 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17671 ::fidl_next::protocol::Flexibility::Flexible;
17672
17673 type Protocol = crate::Symlink;
17674
17675 type Request = crate::wire::NodeSetFlagsRequest;
17676 }
17677
17678 impl ::fidl_next::TwoWayMethod for SetFlags {
17679 type Response = ::fidl_next::wire::Result<
17680 'static,
17681 crate::wire::NodeSetFlagsResponse,
17682 ::fidl_next::wire::fuchsia::Status,
17683 >;
17684 }
17685
17686 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
17687 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17688
17689 fn respond(response: ___R) -> Self::Output {
17690 ::core::result::Result::Ok(response)
17691 }
17692 }
17693
17694 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
17695 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17696
17697 fn respond_err(response: ___R) -> Self::Output {
17698 ::core::result::Result::Err(response)
17699 }
17700 }
17701
17702 pub struct QueryFilesystem;
17703
17704 impl ::fidl_next::Method for QueryFilesystem {
17705 const ORDINAL: u64 = 8013111122914313744;
17706 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17707 ::fidl_next::protocol::Flexibility::Strict;
17708
17709 type Protocol = crate::Symlink;
17710
17711 type Request = ::fidl_next::wire::EmptyMessageBody;
17712 }
17713
17714 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
17715 type Response =
17716 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
17717 }
17718
17719 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
17720 type Output = ::fidl_next::Strict<___R>;
17721
17722 fn respond(response: ___R) -> Self::Output {
17723 ::fidl_next::Strict(response)
17724 }
17725 }
17726
17727 pub struct OnRepresentation;
17728
17729 impl ::fidl_next::Method for OnRepresentation {
17730 const ORDINAL: u64 = 6679970090861613324;
17731 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17732 ::fidl_next::protocol::Flexibility::Strict;
17733
17734 type Protocol = crate::Symlink;
17735
17736 type Request = crate::wire::Representation<'static>;
17737 }
17738
17739 pub struct GetAttributes;
17740
17741 impl ::fidl_next::Method for GetAttributes {
17742 const ORDINAL: u64 = 4414537700416816443;
17743 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17744 ::fidl_next::protocol::Flexibility::Strict;
17745
17746 type Protocol = crate::Symlink;
17747
17748 type Request = crate::wire::NodeGetAttributesRequest;
17749 }
17750
17751 impl ::fidl_next::TwoWayMethod for GetAttributes {
17752 type Response = ::fidl_next::wire::Result<
17753 'static,
17754 crate::wire::NodeAttributes2<'static>,
17755 ::fidl_next::wire::fuchsia::Status,
17756 >;
17757 }
17758
17759 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
17760 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17761
17762 fn respond(response: ___R) -> Self::Output {
17763 ::core::result::Result::Ok(response)
17764 }
17765 }
17766
17767 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
17768 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17769
17770 fn respond_err(response: ___R) -> Self::Output {
17771 ::core::result::Result::Err(response)
17772 }
17773 }
17774
17775 pub struct UpdateAttributes;
17776
17777 impl ::fidl_next::Method for UpdateAttributes {
17778 const ORDINAL: u64 = 3677402239314018056;
17779 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17780 ::fidl_next::protocol::Flexibility::Strict;
17781
17782 type Protocol = crate::Symlink;
17783
17784 type Request = crate::wire::MutableNodeAttributes<'static>;
17785 }
17786
17787 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
17788 type Response = ::fidl_next::wire::Result<
17789 'static,
17790 crate::wire::NodeUpdateAttributesResponse,
17791 ::fidl_next::wire::fuchsia::Status,
17792 >;
17793 }
17794
17795 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
17796 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17797
17798 fn respond(response: ___R) -> Self::Output {
17799 ::core::result::Result::Ok(response)
17800 }
17801 }
17802
17803 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
17804 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17805
17806 fn respond_err(response: ___R) -> Self::Output {
17807 ::core::result::Result::Err(response)
17808 }
17809 }
17810
17811 pub struct Sync;
17812
17813 impl ::fidl_next::Method for Sync {
17814 const ORDINAL: u64 = 3196473584242777161;
17815 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17816 ::fidl_next::protocol::Flexibility::Strict;
17817
17818 type Protocol = crate::Symlink;
17819
17820 type Request = ::fidl_next::wire::EmptyMessageBody;
17821 }
17822
17823 impl ::fidl_next::TwoWayMethod for Sync {
17824 type Response = ::fidl_next::wire::Result<
17825 'static,
17826 crate::wire::NodeSyncResponse,
17827 ::fidl_next::wire::fuchsia::Status,
17828 >;
17829 }
17830
17831 impl<___R> ::fidl_next::Respond<___R> for Sync {
17832 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17833
17834 fn respond(response: ___R) -> Self::Output {
17835 ::core::result::Result::Ok(response)
17836 }
17837 }
17838
17839 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
17840 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17841
17842 fn respond_err(response: ___R) -> Self::Output {
17843 ::core::result::Result::Err(response)
17844 }
17845 }
17846
17847 pub struct ListExtendedAttributes;
17848
17849 impl ::fidl_next::Method for ListExtendedAttributes {
17850 const ORDINAL: u64 = 5431626189872037072;
17851 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17852 ::fidl_next::protocol::Flexibility::Strict;
17853
17854 type Protocol = crate::Symlink;
17855
17856 type Request = crate::wire::NodeListExtendedAttributesRequest;
17857 }
17858
17859 pub struct GetExtendedAttribute;
17860
17861 impl ::fidl_next::Method for GetExtendedAttribute {
17862 const ORDINAL: u64 = 5043930208506967771;
17863 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17864 ::fidl_next::protocol::Flexibility::Strict;
17865
17866 type Protocol = crate::Symlink;
17867
17868 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
17869 }
17870
17871 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
17872 type Response = ::fidl_next::wire::Result<
17873 'static,
17874 crate::wire::ExtendedAttributeValue<'static>,
17875 ::fidl_next::wire::fuchsia::Status,
17876 >;
17877 }
17878
17879 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
17880 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17881
17882 fn respond(response: ___R) -> Self::Output {
17883 ::core::result::Result::Ok(response)
17884 }
17885 }
17886
17887 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
17888 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17889
17890 fn respond_err(response: ___R) -> Self::Output {
17891 ::core::result::Result::Err(response)
17892 }
17893 }
17894
17895 pub struct SetExtendedAttribute;
17896
17897 impl ::fidl_next::Method for SetExtendedAttribute {
17898 const ORDINAL: u64 = 5374223046099989052;
17899 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17900 ::fidl_next::protocol::Flexibility::Strict;
17901
17902 type Protocol = crate::Symlink;
17903
17904 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
17905 }
17906
17907 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
17908 type Response = ::fidl_next::wire::Result<
17909 'static,
17910 crate::wire::NodeSetExtendedAttributeResponse,
17911 ::fidl_next::wire::fuchsia::Status,
17912 >;
17913 }
17914
17915 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
17916 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17917
17918 fn respond(response: ___R) -> Self::Output {
17919 ::core::result::Result::Ok(response)
17920 }
17921 }
17922
17923 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
17924 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17925
17926 fn respond_err(response: ___R) -> Self::Output {
17927 ::core::result::Result::Err(response)
17928 }
17929 }
17930
17931 pub struct RemoveExtendedAttribute;
17932
17933 impl ::fidl_next::Method for RemoveExtendedAttribute {
17934 const ORDINAL: u64 = 8794297771444732717;
17935 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17936 ::fidl_next::protocol::Flexibility::Strict;
17937
17938 type Protocol = crate::Symlink;
17939
17940 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
17941 }
17942
17943 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
17944 type Response = ::fidl_next::wire::Result<
17945 'static,
17946 crate::wire::NodeRemoveExtendedAttributeResponse,
17947 ::fidl_next::wire::fuchsia::Status,
17948 >;
17949 }
17950
17951 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
17952 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
17953
17954 fn respond(response: ___R) -> Self::Output {
17955 ::core::result::Result::Ok(response)
17956 }
17957 }
17958
17959 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
17960 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
17961
17962 fn respond_err(response: ___R) -> Self::Output {
17963 ::core::result::Result::Err(response)
17964 }
17965 }
17966
17967 pub struct Open;
17968
17969 impl ::fidl_next::Method for Open {
17970 const ORDINAL: u64 = 6236883748953765593;
17971 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17972 ::fidl_next::protocol::Flexibility::Flexible;
17973
17974 type Protocol = crate::Symlink;
17975
17976 type Request = crate::wire::OpenableOpenRequest<'static>;
17977 }
17978
17979 pub struct Describe;
17980
17981 impl ::fidl_next::Method for Describe {
17982 const ORDINAL: u64 = 8371117097481679347;
17983 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
17984 ::fidl_next::protocol::Flexibility::Flexible;
17985
17986 type Protocol = crate::Symlink;
17987
17988 type Request = ::fidl_next::wire::EmptyMessageBody;
17989 }
17990
17991 impl ::fidl_next::TwoWayMethod for Describe {
17992 type Response = ::fidl_next::wire::Flexible<'static, crate::wire::SymlinkInfo<'static>>;
17993 }
17994
17995 impl<___R> ::fidl_next::Respond<___R> for Describe {
17996 type Output = ::fidl_next::Flexible<___R>;
17997
17998 fn respond(response: ___R) -> Self::Output {
17999 ::fidl_next::Flexible(response)
18000 }
18001 }
18002
18003 mod ___detail {
18004 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Symlink
18005 where
18006 ___T: ::fidl_next::Transport,
18007 {
18008 type Client = SymlinkClient<___T>;
18009 type Server = SymlinkServer<___T>;
18010 }
18011
18012 #[repr(transparent)]
18014 pub struct SymlinkClient<___T: ::fidl_next::Transport> {
18015 #[allow(dead_code)]
18016 client: ::fidl_next::protocol::Client<___T>,
18017 }
18018
18019 impl<___T> SymlinkClient<___T>
18020 where
18021 ___T: ::fidl_next::Transport,
18022 {
18023 #[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"]
18024 pub fn link_into(
18025 &self,
18026
18027 dst_parent_token: impl ::fidl_next::Encode<
18028 ::fdomain_client::fidl_next::wire::Handle,
18029 <___T as ::fidl_next::Transport>::SendBuffer,
18030 >,
18031
18032 dst: impl ::fidl_next::Encode<
18033 ::fidl_next::wire::String<'static>,
18034 <___T as ::fidl_next::Transport>::SendBuffer,
18035 >,
18036 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
18037 where
18038 <___T as ::fidl_next::Transport>::SendBuffer:
18039 ::fidl_next::encoder::InternalHandleEncoder,
18040 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18041 <___T as ::fidl_next::Transport>::SendBuffer:
18042 ::fdomain_client::fidl_next::HandleEncoder,
18043 {
18044 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
18045 dst_parent_token,
18046
18047 dst,
18048 })
18049 }
18050
18051 #[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"]
18052 pub fn link_into_with<___R>(
18053 &self,
18054 request: ___R,
18055 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
18056 where
18057 ___R: ::fidl_next::Encode<
18058 crate::wire::LinkableLinkIntoRequest<'static>,
18059 <___T as ::fidl_next::Transport>::SendBuffer,
18060 >,
18061 {
18062 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18063 6121399674497678964,
18064 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
18065 request,
18066 ))
18067 }
18068
18069 pub fn clone(
18070 &self,
18071
18072 request: impl ::fidl_next::Encode<
18073 ::fidl_next::ServerEnd<
18074 ::fdomain_next_fuchsia_unknown::Cloneable,
18075 ::fdomain_client::fidl_next::wire::Handle,
18076 >,
18077 <___T as ::fidl_next::Transport>::SendBuffer,
18078 >,
18079 ) -> ::fidl_next::SendFuture<'_, ___T>
18080 where
18081 <___T as ::fidl_next::Transport>::SendBuffer:
18082 ::fidl_next::encoder::InternalHandleEncoder,
18083 <___T as ::fidl_next::Transport>::SendBuffer:
18084 ::fdomain_client::fidl_next::HandleEncoder,
18085 {
18086 self.clone_with(::fdomain_next_fuchsia_unknown::generic::CloneableCloneRequest {
18087 request,
18088 })
18089 }
18090
18091 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
18092 where
18093 ___R: ::fidl_next::Encode<
18094 ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest,
18095 <___T as ::fidl_next::Transport>::SendBuffer,
18096 >,
18097 {
18098 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
18099 2366825959783828089,
18100 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
18101 request,
18102 ))
18103 }
18104
18105 #[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"]
18106 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
18107 ::fidl_next::TwoWayFuture::from_untyped(
18108 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18109 6540867515453498750,
18110 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
18111 (),
18112 ),
18113 )
18114 }
18115
18116 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
18117 ::fidl_next::TwoWayFuture::from_untyped(
18118 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18119 2763219980499352582,
18120 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
18121 (),
18122 ),
18123 )
18124 }
18125
18126 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
18127 pub fn deprecated_clone(
18128 &self,
18129
18130 flags: impl ::fidl_next::Encode<
18131 crate::wire::OpenFlags,
18132 <___T as ::fidl_next::Transport>::SendBuffer,
18133 >,
18134
18135 object: impl ::fidl_next::Encode<
18136 ::fidl_next::ServerEnd<crate::Node, ::fdomain_client::fidl_next::wire::Handle>,
18137 <___T as ::fidl_next::Transport>::SendBuffer,
18138 >,
18139 ) -> ::fidl_next::SendFuture<'_, ___T>
18140 where
18141 <___T as ::fidl_next::Transport>::SendBuffer:
18142 ::fidl_next::encoder::InternalHandleEncoder,
18143 <___T as ::fidl_next::Transport>::SendBuffer:
18144 ::fdomain_client::fidl_next::HandleEncoder,
18145 {
18146 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
18147 flags,
18148
18149 object,
18150 })
18151 }
18152
18153 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
18154 pub fn deprecated_clone_with<___R>(
18155 &self,
18156 request: ___R,
18157 ) -> ::fidl_next::SendFuture<'_, ___T>
18158 where
18159 ___R: ::fidl_next::Encode<
18160 crate::wire::NodeDeprecatedCloneRequest,
18161 <___T as ::fidl_next::Transport>::SendBuffer,
18162 >,
18163 {
18164 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
18165 6512600400724287855,
18166 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
18167 request,
18168 ))
18169 }
18170
18171 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
18172 pub fn deprecated_get_attr(
18173 &self,
18174 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
18175 ::fidl_next::TwoWayFuture::from_untyped(
18176 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18177 8689798978500614909,
18178 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
18179 (),
18180 ),
18181 )
18182 }
18183
18184 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18185 pub fn deprecated_set_attr(
18186 &self,
18187
18188 flags: impl ::fidl_next::Encode<
18189 crate::wire::NodeAttributeFlags,
18190 <___T as ::fidl_next::Transport>::SendBuffer,
18191 >,
18192
18193 attributes: impl ::fidl_next::Encode<
18194 crate::wire::NodeAttributes,
18195 <___T as ::fidl_next::Transport>::SendBuffer,
18196 >,
18197 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
18198 where
18199 <___T as ::fidl_next::Transport>::SendBuffer:
18200 ::fidl_next::encoder::InternalHandleEncoder,
18201 {
18202 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
18203 flags,
18204
18205 attributes,
18206 })
18207 }
18208
18209 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18210 pub fn deprecated_set_attr_with<___R>(
18211 &self,
18212 request: ___R,
18213 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
18214 where
18215 ___R: ::fidl_next::Encode<
18216 crate::wire::NodeDeprecatedSetAttrRequest,
18217 <___T as ::fidl_next::Transport>::SendBuffer,
18218 >,
18219 {
18220 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18221 4721673413776871238,
18222 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
18223 request,
18224 ))
18225 }
18226
18227 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
18228 pub fn deprecated_get_flags(
18229 &self,
18230 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
18231 ::fidl_next::TwoWayFuture::from_untyped(
18232 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18233 6595803110182632097,
18234 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
18235 (),
18236 ),
18237 )
18238 }
18239
18240 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18241 pub fn deprecated_set_flags(
18242 &self,
18243
18244 flags: impl ::fidl_next::Encode<
18245 crate::wire::OpenFlags,
18246 <___T as ::fidl_next::Transport>::SendBuffer,
18247 >,
18248 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
18249 where
18250 <___T as ::fidl_next::Transport>::SendBuffer:
18251 ::fidl_next::encoder::InternalHandleEncoder,
18252 {
18253 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
18254 flags,
18255 })
18256 }
18257
18258 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18259 pub fn deprecated_set_flags_with<___R>(
18260 &self,
18261 request: ___R,
18262 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
18263 where
18264 ___R: ::fidl_next::Encode<
18265 crate::wire::NodeDeprecatedSetFlagsRequest,
18266 <___T as ::fidl_next::Transport>::SendBuffer,
18267 >,
18268 {
18269 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18270 5950864159036794675,
18271 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
18272 request,
18273 ))
18274 }
18275
18276 #[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"]
18277 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
18278 ::fidl_next::TwoWayFuture::from_untyped(
18279 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18280 105530239381466147,
18281 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
18282 (),
18283 ),
18284 )
18285 }
18286
18287 #[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"]
18288 pub fn set_flags(
18289 &self,
18290
18291 flags: impl ::fidl_next::Encode<
18292 crate::wire::Flags,
18293 <___T as ::fidl_next::Transport>::SendBuffer,
18294 >,
18295 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
18296 where
18297 <___T as ::fidl_next::Transport>::SendBuffer:
18298 ::fidl_next::encoder::InternalHandleEncoder,
18299 {
18300 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
18301 }
18302
18303 #[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"]
18304 pub fn set_flags_with<___R>(
18305 &self,
18306 request: ___R,
18307 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
18308 where
18309 ___R: ::fidl_next::Encode<
18310 crate::wire::NodeSetFlagsRequest,
18311 <___T as ::fidl_next::Transport>::SendBuffer,
18312 >,
18313 {
18314 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18315 6172186066099445416,
18316 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
18317 request,
18318 ))
18319 }
18320
18321 #[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"]
18322 pub fn query_filesystem(
18323 &self,
18324 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
18325 ::fidl_next::TwoWayFuture::from_untyped(
18326 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18327 8013111122914313744,
18328 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
18329 (),
18330 ),
18331 )
18332 }
18333
18334 #[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"]
18335 pub fn get_attributes(
18336 &self,
18337
18338 query: impl ::fidl_next::Encode<
18339 crate::wire::NodeAttributesQuery,
18340 <___T as ::fidl_next::Transport>::SendBuffer,
18341 >,
18342 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
18343 where
18344 <___T as ::fidl_next::Transport>::SendBuffer:
18345 ::fidl_next::encoder::InternalHandleEncoder,
18346 {
18347 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
18348 }
18349
18350 #[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"]
18351 pub fn get_attributes_with<___R>(
18352 &self,
18353 request: ___R,
18354 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
18355 where
18356 ___R: ::fidl_next::Encode<
18357 crate::wire::NodeGetAttributesRequest,
18358 <___T as ::fidl_next::Transport>::SendBuffer,
18359 >,
18360 {
18361 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18362 4414537700416816443,
18363 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
18364 request,
18365 ))
18366 }
18367
18368 #[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"]
18369 pub fn update_attributes_with<___R>(
18370 &self,
18371 request: ___R,
18372 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
18373 where
18374 ___R: ::fidl_next::Encode<
18375 crate::wire::MutableNodeAttributes<'static>,
18376 <___T as ::fidl_next::Transport>::SendBuffer,
18377 >,
18378 {
18379 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18380 3677402239314018056,
18381 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
18382 request,
18383 ))
18384 }
18385
18386 #[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"]
18387 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
18388 ::fidl_next::TwoWayFuture::from_untyped(
18389 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18390 3196473584242777161,
18391 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
18392 (),
18393 ),
18394 )
18395 }
18396
18397 #[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"]
18398 pub fn list_extended_attributes(
18399 &self,
18400
18401 iterator: impl ::fidl_next::Encode<
18402 ::fidl_next::ServerEnd<
18403 crate::ExtendedAttributeIterator,
18404 ::fdomain_client::fidl_next::wire::Handle,
18405 >,
18406 <___T as ::fidl_next::Transport>::SendBuffer,
18407 >,
18408 ) -> ::fidl_next::SendFuture<'_, ___T>
18409 where
18410 <___T as ::fidl_next::Transport>::SendBuffer:
18411 ::fidl_next::encoder::InternalHandleEncoder,
18412 <___T as ::fidl_next::Transport>::SendBuffer:
18413 ::fdomain_client::fidl_next::HandleEncoder,
18414 {
18415 self.list_extended_attributes_with(
18416 crate::generic::NodeListExtendedAttributesRequest { iterator },
18417 )
18418 }
18419
18420 #[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"]
18421 pub fn list_extended_attributes_with<___R>(
18422 &self,
18423 request: ___R,
18424 ) -> ::fidl_next::SendFuture<'_, ___T>
18425 where
18426 ___R: ::fidl_next::Encode<
18427 crate::wire::NodeListExtendedAttributesRequest,
18428 <___T as ::fidl_next::Transport>::SendBuffer,
18429 >,
18430 {
18431 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
18432 5431626189872037072,
18433 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
18434 request,
18435 ))
18436 }
18437
18438 #[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"]
18439 pub fn get_extended_attribute(
18440 &self,
18441
18442 name: impl ::fidl_next::Encode<
18443 ::fidl_next::wire::Vector<'static, u8>,
18444 <___T as ::fidl_next::Transport>::SendBuffer,
18445 >,
18446 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
18447 where
18448 <___T as ::fidl_next::Transport>::SendBuffer:
18449 ::fidl_next::encoder::InternalHandleEncoder,
18450 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18451 {
18452 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
18453 name,
18454 })
18455 }
18456
18457 #[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"]
18458 pub fn get_extended_attribute_with<___R>(
18459 &self,
18460 request: ___R,
18461 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
18462 where
18463 ___R: ::fidl_next::Encode<
18464 crate::wire::NodeGetExtendedAttributeRequest<'static>,
18465 <___T as ::fidl_next::Transport>::SendBuffer,
18466 >,
18467 {
18468 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18469 5043930208506967771,
18470 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
18471 request,
18472 ))
18473 }
18474
18475 #[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"]
18476 pub fn set_extended_attribute(
18477 &self,
18478
18479 name: impl ::fidl_next::Encode<
18480 ::fidl_next::wire::Vector<'static, u8>,
18481 <___T as ::fidl_next::Transport>::SendBuffer,
18482 >,
18483
18484 value: impl ::fidl_next::Encode<
18485 crate::wire::ExtendedAttributeValue<'static>,
18486 <___T as ::fidl_next::Transport>::SendBuffer,
18487 >,
18488
18489 mode: impl ::fidl_next::Encode<
18490 crate::wire::SetExtendedAttributeMode,
18491 <___T as ::fidl_next::Transport>::SendBuffer,
18492 >,
18493 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
18494 where
18495 <___T as ::fidl_next::Transport>::SendBuffer:
18496 ::fidl_next::encoder::InternalHandleEncoder,
18497 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18498 <___T as ::fidl_next::Transport>::SendBuffer:
18499 ::fdomain_client::fidl_next::HandleEncoder,
18500 {
18501 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
18502 name,
18503
18504 value,
18505
18506 mode,
18507 })
18508 }
18509
18510 #[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"]
18511 pub fn set_extended_attribute_with<___R>(
18512 &self,
18513 request: ___R,
18514 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
18515 where
18516 ___R: ::fidl_next::Encode<
18517 crate::wire::NodeSetExtendedAttributeRequest<'static>,
18518 <___T as ::fidl_next::Transport>::SendBuffer,
18519 >,
18520 {
18521 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18522 5374223046099989052,
18523 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
18524 request,
18525 ))
18526 }
18527
18528 #[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"]
18529 pub fn remove_extended_attribute(
18530 &self,
18531
18532 name: impl ::fidl_next::Encode<
18533 ::fidl_next::wire::Vector<'static, u8>,
18534 <___T as ::fidl_next::Transport>::SendBuffer,
18535 >,
18536 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
18537 where
18538 <___T as ::fidl_next::Transport>::SendBuffer:
18539 ::fidl_next::encoder::InternalHandleEncoder,
18540 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18541 {
18542 self.remove_extended_attribute_with(
18543 crate::generic::NodeRemoveExtendedAttributeRequest { name },
18544 )
18545 }
18546
18547 #[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"]
18548 pub fn remove_extended_attribute_with<___R>(
18549 &self,
18550 request: ___R,
18551 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
18552 where
18553 ___R: ::fidl_next::Encode<
18554 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
18555 <___T as ::fidl_next::Transport>::SendBuffer,
18556 >,
18557 {
18558 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
18559 8794297771444732717,
18560 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
18561 request,
18562 ))
18563 }
18564
18565 #[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"]
18566 pub fn open(
18567 &self,
18568
18569 path: impl ::fidl_next::Encode<
18570 ::fidl_next::wire::String<'static>,
18571 <___T as ::fidl_next::Transport>::SendBuffer,
18572 >,
18573
18574 flags: impl ::fidl_next::Encode<
18575 crate::wire::Flags,
18576 <___T as ::fidl_next::Transport>::SendBuffer,
18577 >,
18578
18579 options: impl ::fidl_next::Encode<
18580 crate::wire::Options<'static>,
18581 <___T as ::fidl_next::Transport>::SendBuffer,
18582 >,
18583
18584 object: impl ::fidl_next::Encode<
18585 ::fdomain_client::fidl_next::wire::Handle,
18586 <___T as ::fidl_next::Transport>::SendBuffer,
18587 >,
18588 ) -> ::fidl_next::SendFuture<'_, ___T>
18589 where
18590 <___T as ::fidl_next::Transport>::SendBuffer:
18591 ::fidl_next::encoder::InternalHandleEncoder,
18592 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18593 <___T as ::fidl_next::Transport>::SendBuffer:
18594 ::fdomain_client::fidl_next::HandleEncoder,
18595 {
18596 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
18597 }
18598
18599 #[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"]
18600 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
18601 where
18602 ___R: ::fidl_next::Encode<
18603 crate::wire::OpenableOpenRequest<'static>,
18604 <___T as ::fidl_next::Transport>::SendBuffer,
18605 >,
18606 {
18607 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
18608 6236883748953765593,
18609 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
18610 request,
18611 ))
18612 }
18613
18614 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
18615 ::fidl_next::TwoWayFuture::from_untyped(
18616 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
18617 8371117097481679347,
18618 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
18619 (),
18620 ),
18621 )
18622 }
18623 }
18624
18625 #[repr(transparent)]
18627 pub struct SymlinkServer<___T: ::fidl_next::Transport> {
18628 server: ::fidl_next::protocol::Server<___T>,
18629 }
18630
18631 impl<___T> SymlinkServer<___T>
18632 where
18633 ___T: ::fidl_next::Transport,
18634 {
18635 #[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"]
18636 pub fn on_open(
18637 &self,
18638
18639 s: impl ::fidl_next::Encode<
18640 ::fidl_next::wire::fuchsia::Status,
18641 <___T as ::fidl_next::Transport>::SendBuffer,
18642 >,
18643
18644 info: impl ::fidl_next::Encode<
18645 crate::wire_optional::NodeInfoDeprecated<'static>,
18646 <___T as ::fidl_next::Transport>::SendBuffer,
18647 >,
18648 ) -> ::fidl_next::SendFuture<'_, ___T>
18649 where
18650 <___T as ::fidl_next::Transport>::SendBuffer:
18651 ::fidl_next::encoder::InternalHandleEncoder,
18652 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
18653 <___T as ::fidl_next::Transport>::SendBuffer:
18654 ::fdomain_client::fidl_next::HandleEncoder,
18655 {
18656 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
18657 }
18658
18659 #[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"]
18660
18661 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
18662 where
18663 ___R: ::fidl_next::Encode<
18664 <super::OnOpen as ::fidl_next::Method>::Request,
18665 <___T as ::fidl_next::Transport>::SendBuffer,
18666 >,
18667 {
18668 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
18669 9207534335756671346,
18670 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
18671 request,
18672 ))
18673 }
18674
18675 #[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"]
18676
18677 pub fn on_representation_with<___R>(
18678 &self,
18679 request: ___R,
18680 ) -> ::fidl_next::SendFuture<'_, ___T>
18681 where
18682 ___R: ::fidl_next::Encode<
18683 <super::OnRepresentation as ::fidl_next::Method>::Request,
18684 <___T as ::fidl_next::Transport>::SendBuffer,
18685 >,
18686 {
18687 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
18688 6679970090861613324,
18689 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
18690 request,
18691 ))
18692 }
18693 }
18694 }
18695}
18696
18697#[diagnostic::on_unimplemented(
18698 note = "If {Self} implements the non-local SymlinkClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
18699)]
18700
18701pub trait SymlinkLocalClientHandler<
18705 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
18706 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18707>
18708{
18709 #[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"]
18710 fn on_open(
18711 &mut self,
18712
18713 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
18714 ) -> impl ::core::future::Future<Output = ()>;
18715
18716 #[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"]
18717 fn on_representation(
18718 &mut self,
18719
18720 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
18721 ) -> impl ::core::future::Future<Output = ()>;
18722
18723 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
18724 ::core::future::ready(())
18725 }
18726}
18727
18728impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Symlink
18729where
18730 ___H: SymlinkLocalClientHandler<___T>,
18731 ___T: ::fidl_next::Transport,
18732 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
18733 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18734 Constraint = (),
18735 >,
18736 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
18737 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18738 Constraint = (),
18739 >,
18740{
18741 async fn on_event(
18742 handler: &mut ___H,
18743 mut message: ::fidl_next::Message<___T>,
18744 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
18745 match *message.header().ordinal {
18746 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
18747 Ok(decoded) => {
18748 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
18749 Ok(())
18750 }
18751 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18752 ordinal: 9207534335756671346,
18753 error,
18754 }),
18755 },
18756
18757 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
18758 Ok(decoded) => {
18759 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
18760 Ok(())
18761 }
18762 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18763 ordinal: 6679970090861613324,
18764 error,
18765 }),
18766 },
18767
18768 ordinal => {
18769 handler.on_unknown_interaction(ordinal).await;
18770 if ::core::matches!(
18771 message.header().flexibility(),
18772 ::fidl_next::protocol::Flexibility::Strict
18773 ) {
18774 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18775 } else {
18776 Ok(())
18777 }
18778 }
18779 }
18780 }
18781}
18782
18783#[diagnostic::on_unimplemented(
18784 note = "If {Self} implements the non-local SymlinkServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
18785)]
18786
18787pub trait SymlinkLocalServerHandler<
18791 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
18792 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
18793>
18794{
18795 #[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"]
18796 fn link_into(
18797 &mut self,
18798
18799 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
18800
18801 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
18802 ) -> impl ::core::future::Future<Output = ()>;
18803
18804 fn clone(
18805 &mut self,
18806
18807 request: ::fidl_next::Request<symlink::Clone, ___T>,
18808 ) -> impl ::core::future::Future<Output = ()>;
18809
18810 #[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"]
18811 fn close(
18812 &mut self,
18813
18814 responder: ::fidl_next::Responder<symlink::Close, ___T>,
18815 ) -> impl ::core::future::Future<Output = ()>;
18816
18817 fn query(
18818 &mut self,
18819
18820 responder: ::fidl_next::Responder<symlink::Query, ___T>,
18821 ) -> impl ::core::future::Future<Output = ()>;
18822
18823 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
18824 fn deprecated_clone(
18825 &mut self,
18826
18827 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
18828 ) -> impl ::core::future::Future<Output = ()>;
18829
18830 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
18831 fn deprecated_get_attr(
18832 &mut self,
18833
18834 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
18835 ) -> impl ::core::future::Future<Output = ()>;
18836
18837 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
18838 fn deprecated_set_attr(
18839 &mut self,
18840
18841 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
18842
18843 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
18844 ) -> impl ::core::future::Future<Output = ()>;
18845
18846 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
18847 fn deprecated_get_flags(
18848 &mut self,
18849
18850 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
18851 ) -> impl ::core::future::Future<Output = ()>;
18852
18853 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
18854 fn deprecated_set_flags(
18855 &mut self,
18856
18857 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
18858
18859 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
18860 ) -> impl ::core::future::Future<Output = ()>;
18861
18862 #[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"]
18863 fn get_flags(
18864 &mut self,
18865
18866 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
18867 ) -> impl ::core::future::Future<Output = ()>;
18868
18869 #[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"]
18870 fn set_flags(
18871 &mut self,
18872
18873 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
18874
18875 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
18876 ) -> impl ::core::future::Future<Output = ()>;
18877
18878 #[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"]
18879 fn query_filesystem(
18880 &mut self,
18881
18882 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
18883 ) -> impl ::core::future::Future<Output = ()>;
18884
18885 #[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"]
18886 fn get_attributes(
18887 &mut self,
18888
18889 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
18890
18891 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
18892 ) -> impl ::core::future::Future<Output = ()>;
18893
18894 #[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"]
18895 fn update_attributes(
18896 &mut self,
18897
18898 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
18899
18900 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
18901 ) -> impl ::core::future::Future<Output = ()>;
18902
18903 #[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"]
18904 fn sync(
18905 &mut self,
18906
18907 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
18908 ) -> impl ::core::future::Future<Output = ()>;
18909
18910 #[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"]
18911 fn list_extended_attributes(
18912 &mut self,
18913
18914 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
18915 ) -> impl ::core::future::Future<Output = ()>;
18916
18917 #[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"]
18918 fn get_extended_attribute(
18919 &mut self,
18920
18921 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
18922
18923 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
18924 ) -> impl ::core::future::Future<Output = ()>;
18925
18926 #[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"]
18927 fn set_extended_attribute(
18928 &mut self,
18929
18930 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
18931
18932 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
18933 ) -> impl ::core::future::Future<Output = ()>;
18934
18935 #[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"]
18936 fn remove_extended_attribute(
18937 &mut self,
18938
18939 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
18940
18941 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
18942 ) -> impl ::core::future::Future<Output = ()>;
18943
18944 #[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"]
18945 fn open(
18946 &mut self,
18947
18948 request: ::fidl_next::Request<symlink::Open, ___T>,
18949 ) -> impl ::core::future::Future<Output = ()>;
18950
18951 fn describe(
18952 &mut self,
18953
18954 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
18955 ) -> impl ::core::future::Future<Output = ()>;
18956
18957 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
18958 ::core::future::ready(())
18959 }
18960}
18961
18962impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Symlink
18963where
18964 ___H: SymlinkLocalServerHandler<___T>,
18965 ___T: ::fidl_next::Transport,
18966 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
18967 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18968 Constraint = (),
18969 >,
18970 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
18971 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18972 Constraint = (),
18973 >,
18974 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
18975 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18976 Constraint = (),
18977 >,
18978 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
18979 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18980 Constraint = (),
18981 >,
18982 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
18983 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18984 Constraint = (),
18985 >,
18986 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
18987 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18988 Constraint = (),
18989 >,
18990 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
18991 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18992 Constraint = (),
18993 >,
18994 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
18995 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
18996 Constraint = (),
18997 >,
18998 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
18999 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19000 Constraint = (),
19001 >,
19002 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19003 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19004 Constraint = (),
19005 >,
19006 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19007 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19008 Constraint = (),
19009 >,
19010 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19011 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19012 Constraint = (),
19013 >,
19014 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
19015 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19016 Constraint = (),
19017 >,
19018{
19019 async fn on_one_way(
19020 handler: &mut ___H,
19021 mut message: ::fidl_next::Message<___T>,
19022 ) -> ::core::result::Result<
19023 (),
19024 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19025 > {
19026 match *message.header().ordinal {
19027 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19028 Ok(decoded) => {
19029 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
19030 Ok(())
19031 }
19032 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19033 ordinal: 2366825959783828089,
19034 error,
19035 }),
19036 },
19037
19038 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19039 Ok(decoded) => {
19040 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
19041 Ok(())
19042 }
19043 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19044 ordinal: 6512600400724287855,
19045 error,
19046 }),
19047 },
19048
19049 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19050 Ok(decoded) => {
19051 handler
19052 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
19053 .await;
19054 Ok(())
19055 }
19056 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19057 ordinal: 5431626189872037072,
19058 error,
19059 }),
19060 },
19061
19062 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19063 Ok(decoded) => {
19064 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
19065 Ok(())
19066 }
19067 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19068 ordinal: 6236883748953765593,
19069 error,
19070 }),
19071 },
19072
19073 ordinal => {
19074 handler.on_unknown_interaction(ordinal).await;
19075 if ::core::matches!(
19076 message.header().flexibility(),
19077 ::fidl_next::protocol::Flexibility::Strict
19078 ) {
19079 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19080 } else {
19081 Ok(())
19082 }
19083 }
19084 }
19085 }
19086
19087 async fn on_two_way(
19088 handler: &mut ___H,
19089 mut message: ::fidl_next::Message<___T>,
19090 responder: ::fidl_next::protocol::Responder<___T>,
19091 ) -> ::core::result::Result<
19092 (),
19093 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19094 > {
19095 match *message.header().ordinal {
19096 6121399674497678964 => {
19097 let responder = ::fidl_next::Responder::from_untyped(responder);
19098
19099 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19100 Ok(decoded) => {
19101 handler
19102 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
19103 .await;
19104 Ok(())
19105 }
19106 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19107 ordinal: 6121399674497678964,
19108 error,
19109 }),
19110 }
19111 }
19112
19113 6540867515453498750 => {
19114 let responder = ::fidl_next::Responder::from_untyped(responder);
19115
19116 handler.close(responder).await;
19117 Ok(())
19118 }
19119
19120 2763219980499352582 => {
19121 let responder = ::fidl_next::Responder::from_untyped(responder);
19122
19123 handler.query(responder).await;
19124 Ok(())
19125 }
19126
19127 8689798978500614909 => {
19128 let responder = ::fidl_next::Responder::from_untyped(responder);
19129
19130 handler.deprecated_get_attr(responder).await;
19131 Ok(())
19132 }
19133
19134 4721673413776871238 => {
19135 let responder = ::fidl_next::Responder::from_untyped(responder);
19136
19137 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19138 Ok(decoded) => {
19139 handler
19140 .deprecated_set_attr(
19141 ::fidl_next::Request::from_decoded(decoded),
19142 responder,
19143 )
19144 .await;
19145 Ok(())
19146 }
19147 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19148 ordinal: 4721673413776871238,
19149 error,
19150 }),
19151 }
19152 }
19153
19154 6595803110182632097 => {
19155 let responder = ::fidl_next::Responder::from_untyped(responder);
19156
19157 handler.deprecated_get_flags(responder).await;
19158 Ok(())
19159 }
19160
19161 5950864159036794675 => {
19162 let responder = ::fidl_next::Responder::from_untyped(responder);
19163
19164 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19165 Ok(decoded) => {
19166 handler
19167 .deprecated_set_flags(
19168 ::fidl_next::Request::from_decoded(decoded),
19169 responder,
19170 )
19171 .await;
19172 Ok(())
19173 }
19174 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19175 ordinal: 5950864159036794675,
19176 error,
19177 }),
19178 }
19179 }
19180
19181 105530239381466147 => {
19182 let responder = ::fidl_next::Responder::from_untyped(responder);
19183
19184 handler.get_flags(responder).await;
19185 Ok(())
19186 }
19187
19188 6172186066099445416 => {
19189 let responder = ::fidl_next::Responder::from_untyped(responder);
19190
19191 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19192 Ok(decoded) => {
19193 handler
19194 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
19195 .await;
19196 Ok(())
19197 }
19198 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19199 ordinal: 6172186066099445416,
19200 error,
19201 }),
19202 }
19203 }
19204
19205 8013111122914313744 => {
19206 let responder = ::fidl_next::Responder::from_untyped(responder);
19207
19208 handler.query_filesystem(responder).await;
19209 Ok(())
19210 }
19211
19212 4414537700416816443 => {
19213 let responder = ::fidl_next::Responder::from_untyped(responder);
19214
19215 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19216 Ok(decoded) => {
19217 handler
19218 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
19219 .await;
19220 Ok(())
19221 }
19222 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19223 ordinal: 4414537700416816443,
19224 error,
19225 }),
19226 }
19227 }
19228
19229 3677402239314018056 => {
19230 let responder = ::fidl_next::Responder::from_untyped(responder);
19231
19232 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19233 Ok(decoded) => {
19234 handler
19235 .update_attributes(
19236 ::fidl_next::Request::from_decoded(decoded),
19237 responder,
19238 )
19239 .await;
19240 Ok(())
19241 }
19242 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19243 ordinal: 3677402239314018056,
19244 error,
19245 }),
19246 }
19247 }
19248
19249 3196473584242777161 => {
19250 let responder = ::fidl_next::Responder::from_untyped(responder);
19251
19252 handler.sync(responder).await;
19253 Ok(())
19254 }
19255
19256 5043930208506967771 => {
19257 let responder = ::fidl_next::Responder::from_untyped(responder);
19258
19259 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19260 Ok(decoded) => {
19261 handler
19262 .get_extended_attribute(
19263 ::fidl_next::Request::from_decoded(decoded),
19264 responder,
19265 )
19266 .await;
19267 Ok(())
19268 }
19269 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19270 ordinal: 5043930208506967771,
19271 error,
19272 }),
19273 }
19274 }
19275
19276 5374223046099989052 => {
19277 let responder = ::fidl_next::Responder::from_untyped(responder);
19278
19279 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19280 Ok(decoded) => {
19281 handler
19282 .set_extended_attribute(
19283 ::fidl_next::Request::from_decoded(decoded),
19284 responder,
19285 )
19286 .await;
19287 Ok(())
19288 }
19289 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19290 ordinal: 5374223046099989052,
19291 error,
19292 }),
19293 }
19294 }
19295
19296 8794297771444732717 => {
19297 let responder = ::fidl_next::Responder::from_untyped(responder);
19298
19299 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19300 Ok(decoded) => {
19301 handler
19302 .remove_extended_attribute(
19303 ::fidl_next::Request::from_decoded(decoded),
19304 responder,
19305 )
19306 .await;
19307 Ok(())
19308 }
19309 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19310 ordinal: 8794297771444732717,
19311 error,
19312 }),
19313 }
19314 }
19315
19316 8371117097481679347 => {
19317 let responder = ::fidl_next::Responder::from_untyped(responder);
19318
19319 handler.describe(responder).await;
19320 Ok(())
19321 }
19322
19323 ordinal => {
19324 handler.on_unknown_interaction(ordinal).await;
19325 if ::core::matches!(
19326 message.header().flexibility(),
19327 ::fidl_next::protocol::Flexibility::Strict
19328 ) {
19329 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19330 } else {
19331 responder
19332 .respond_framework_error(
19333 ordinal,
19334 ::fidl_next::FrameworkError::UnknownMethod,
19335 )
19336 .expect("encoding a framework error should never fail")
19337 .await?;
19338 Ok(())
19339 }
19340 }
19341 }
19342 }
19343}
19344
19345pub trait SymlinkClientHandler<
19349 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
19350 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19351>
19352{
19353 #[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"]
19354 fn on_open(
19355 &mut self,
19356
19357 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
19358 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19359
19360 #[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"]
19361 fn on_representation(
19362 &mut self,
19363
19364 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19365 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19366
19367 fn on_unknown_interaction(
19368 &mut self,
19369 ordinal: u64,
19370 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
19371 ::core::future::ready(())
19372 }
19373}
19374
19375impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Symlink
19376where
19377 ___H: SymlinkClientHandler<___T> + ::core::marker::Send,
19378 ___T: ::fidl_next::Transport,
19379 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
19380 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19381 Constraint = (),
19382 >,
19383 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
19384 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19385 Constraint = (),
19386 >,
19387{
19388 async fn on_event(
19389 handler: &mut ___H,
19390 mut message: ::fidl_next::Message<___T>,
19391 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
19392 match *message.header().ordinal {
19393 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19394 Ok(decoded) => {
19395 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
19396 Ok(())
19397 }
19398 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19399 ordinal: 9207534335756671346,
19400 error,
19401 }),
19402 },
19403
19404 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19405 Ok(decoded) => {
19406 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
19407 Ok(())
19408 }
19409 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19410 ordinal: 6679970090861613324,
19411 error,
19412 }),
19413 },
19414
19415 ordinal => {
19416 handler.on_unknown_interaction(ordinal).await;
19417 if ::core::matches!(
19418 message.header().flexibility(),
19419 ::fidl_next::protocol::Flexibility::Strict
19420 ) {
19421 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19422 } else {
19423 Ok(())
19424 }
19425 }
19426 }
19427 }
19428}
19429
19430pub trait SymlinkServerHandler<
19434 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fdomain_client::Channel,
19435 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19436>
19437{
19438 #[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"]
19439 fn link_into(
19440 &mut self,
19441
19442 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
19443
19444 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
19445 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19446
19447 fn clone(
19448 &mut self,
19449
19450 request: ::fidl_next::Request<symlink::Clone, ___T>,
19451 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19452
19453 #[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"]
19454 fn close(
19455 &mut self,
19456
19457 responder: ::fidl_next::Responder<symlink::Close, ___T>,
19458 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19459
19460 fn query(
19461 &mut self,
19462
19463 responder: ::fidl_next::Responder<symlink::Query, ___T>,
19464 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19465
19466 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
19467 fn deprecated_clone(
19468 &mut self,
19469
19470 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
19471 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19472
19473 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n"]
19474 fn deprecated_get_attr(
19475 &mut self,
19476
19477 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
19478 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19479
19480 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
19481 fn deprecated_set_attr(
19482 &mut self,
19483
19484 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
19485
19486 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
19487 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19488
19489 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
19490 fn deprecated_get_flags(
19491 &mut self,
19492
19493 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
19494 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19495
19496 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
19497 fn deprecated_set_flags(
19498 &mut self,
19499
19500 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
19501
19502 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
19503 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19504
19505 #[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"]
19506 fn get_flags(
19507 &mut self,
19508
19509 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
19510 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19511
19512 #[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"]
19513 fn set_flags(
19514 &mut self,
19515
19516 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
19517
19518 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
19519 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19520
19521 #[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"]
19522 fn query_filesystem(
19523 &mut self,
19524
19525 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
19526 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19527
19528 #[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"]
19529 fn get_attributes(
19530 &mut self,
19531
19532 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
19533
19534 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
19535 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19536
19537 #[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"]
19538 fn update_attributes(
19539 &mut self,
19540
19541 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
19542
19543 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
19544 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19545
19546 #[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"]
19547 fn sync(
19548 &mut self,
19549
19550 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
19551 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19552
19553 #[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"]
19554 fn list_extended_attributes(
19555 &mut self,
19556
19557 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
19558 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19559
19560 #[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"]
19561 fn get_extended_attribute(
19562 &mut self,
19563
19564 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
19565
19566 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
19567 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19568
19569 #[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"]
19570 fn set_extended_attribute(
19571 &mut self,
19572
19573 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
19574
19575 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
19576 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19577
19578 #[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"]
19579 fn remove_extended_attribute(
19580 &mut self,
19581
19582 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
19583
19584 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
19585 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19586
19587 #[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"]
19588 fn open(
19589 &mut self,
19590
19591 request: ::fidl_next::Request<symlink::Open, ___T>,
19592 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19593
19594 fn describe(
19595 &mut self,
19596
19597 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
19598 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
19599
19600 fn on_unknown_interaction(
19601 &mut self,
19602 ordinal: u64,
19603 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
19604 ::core::future::ready(())
19605 }
19606}
19607
19608impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Symlink
19609where
19610 ___H: SymlinkServerHandler<___T> + ::core::marker::Send,
19611 ___T: ::fidl_next::Transport,
19612 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
19613 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19614 Constraint = (),
19615 >,
19616 for<'de> ::fdomain_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
19617 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19618 Constraint = (),
19619 >,
19620 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
19621 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19622 Constraint = (),
19623 >,
19624 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
19625 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19626 Constraint = (),
19627 >,
19628 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
19629 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19630 Constraint = (),
19631 >,
19632 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
19633 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19634 Constraint = (),
19635 >,
19636 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
19637 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19638 Constraint = (),
19639 >,
19640 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
19641 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19642 Constraint = (),
19643 >,
19644 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
19645 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19646 Constraint = (),
19647 >,
19648 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19649 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19650 Constraint = (),
19651 >,
19652 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19653 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19654 Constraint = (),
19655 >,
19656 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
19657 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19658 Constraint = (),
19659 >,
19660 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
19661 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19662 Constraint = (),
19663 >,
19664{
19665 async fn on_one_way(
19666 handler: &mut ___H,
19667 mut message: ::fidl_next::Message<___T>,
19668 ) -> ::core::result::Result<
19669 (),
19670 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19671 > {
19672 match *message.header().ordinal {
19673 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19674 Ok(decoded) => {
19675 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
19676 Ok(())
19677 }
19678 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19679 ordinal: 2366825959783828089,
19680 error,
19681 }),
19682 },
19683
19684 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19685 Ok(decoded) => {
19686 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
19687 Ok(())
19688 }
19689 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19690 ordinal: 6512600400724287855,
19691 error,
19692 }),
19693 },
19694
19695 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19696 Ok(decoded) => {
19697 handler
19698 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
19699 .await;
19700 Ok(())
19701 }
19702 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19703 ordinal: 5431626189872037072,
19704 error,
19705 }),
19706 },
19707
19708 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19709 Ok(decoded) => {
19710 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
19711 Ok(())
19712 }
19713 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19714 ordinal: 6236883748953765593,
19715 error,
19716 }),
19717 },
19718
19719 ordinal => {
19720 handler.on_unknown_interaction(ordinal).await;
19721 if ::core::matches!(
19722 message.header().flexibility(),
19723 ::fidl_next::protocol::Flexibility::Strict
19724 ) {
19725 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19726 } else {
19727 Ok(())
19728 }
19729 }
19730 }
19731 }
19732
19733 async fn on_two_way(
19734 handler: &mut ___H,
19735 mut message: ::fidl_next::Message<___T>,
19736 responder: ::fidl_next::protocol::Responder<___T>,
19737 ) -> ::core::result::Result<
19738 (),
19739 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
19740 > {
19741 match *message.header().ordinal {
19742 6121399674497678964 => {
19743 let responder = ::fidl_next::Responder::from_untyped(responder);
19744
19745 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19746 Ok(decoded) => {
19747 handler
19748 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
19749 .await;
19750 Ok(())
19751 }
19752 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19753 ordinal: 6121399674497678964,
19754 error,
19755 }),
19756 }
19757 }
19758
19759 6540867515453498750 => {
19760 let responder = ::fidl_next::Responder::from_untyped(responder);
19761
19762 handler.close(responder).await;
19763 Ok(())
19764 }
19765
19766 2763219980499352582 => {
19767 let responder = ::fidl_next::Responder::from_untyped(responder);
19768
19769 handler.query(responder).await;
19770 Ok(())
19771 }
19772
19773 8689798978500614909 => {
19774 let responder = ::fidl_next::Responder::from_untyped(responder);
19775
19776 handler.deprecated_get_attr(responder).await;
19777 Ok(())
19778 }
19779
19780 4721673413776871238 => {
19781 let responder = ::fidl_next::Responder::from_untyped(responder);
19782
19783 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19784 Ok(decoded) => {
19785 handler
19786 .deprecated_set_attr(
19787 ::fidl_next::Request::from_decoded(decoded),
19788 responder,
19789 )
19790 .await;
19791 Ok(())
19792 }
19793 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19794 ordinal: 4721673413776871238,
19795 error,
19796 }),
19797 }
19798 }
19799
19800 6595803110182632097 => {
19801 let responder = ::fidl_next::Responder::from_untyped(responder);
19802
19803 handler.deprecated_get_flags(responder).await;
19804 Ok(())
19805 }
19806
19807 5950864159036794675 => {
19808 let responder = ::fidl_next::Responder::from_untyped(responder);
19809
19810 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19811 Ok(decoded) => {
19812 handler
19813 .deprecated_set_flags(
19814 ::fidl_next::Request::from_decoded(decoded),
19815 responder,
19816 )
19817 .await;
19818 Ok(())
19819 }
19820 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19821 ordinal: 5950864159036794675,
19822 error,
19823 }),
19824 }
19825 }
19826
19827 105530239381466147 => {
19828 let responder = ::fidl_next::Responder::from_untyped(responder);
19829
19830 handler.get_flags(responder).await;
19831 Ok(())
19832 }
19833
19834 6172186066099445416 => {
19835 let responder = ::fidl_next::Responder::from_untyped(responder);
19836
19837 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19838 Ok(decoded) => {
19839 handler
19840 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
19841 .await;
19842 Ok(())
19843 }
19844 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19845 ordinal: 6172186066099445416,
19846 error,
19847 }),
19848 }
19849 }
19850
19851 8013111122914313744 => {
19852 let responder = ::fidl_next::Responder::from_untyped(responder);
19853
19854 handler.query_filesystem(responder).await;
19855 Ok(())
19856 }
19857
19858 4414537700416816443 => {
19859 let responder = ::fidl_next::Responder::from_untyped(responder);
19860
19861 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19862 Ok(decoded) => {
19863 handler
19864 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
19865 .await;
19866 Ok(())
19867 }
19868 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19869 ordinal: 4414537700416816443,
19870 error,
19871 }),
19872 }
19873 }
19874
19875 3677402239314018056 => {
19876 let responder = ::fidl_next::Responder::from_untyped(responder);
19877
19878 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19879 Ok(decoded) => {
19880 handler
19881 .update_attributes(
19882 ::fidl_next::Request::from_decoded(decoded),
19883 responder,
19884 )
19885 .await;
19886 Ok(())
19887 }
19888 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19889 ordinal: 3677402239314018056,
19890 error,
19891 }),
19892 }
19893 }
19894
19895 3196473584242777161 => {
19896 let responder = ::fidl_next::Responder::from_untyped(responder);
19897
19898 handler.sync(responder).await;
19899 Ok(())
19900 }
19901
19902 5043930208506967771 => {
19903 let responder = ::fidl_next::Responder::from_untyped(responder);
19904
19905 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19906 Ok(decoded) => {
19907 handler
19908 .get_extended_attribute(
19909 ::fidl_next::Request::from_decoded(decoded),
19910 responder,
19911 )
19912 .await;
19913 Ok(())
19914 }
19915 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19916 ordinal: 5043930208506967771,
19917 error,
19918 }),
19919 }
19920 }
19921
19922 5374223046099989052 => {
19923 let responder = ::fidl_next::Responder::from_untyped(responder);
19924
19925 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19926 Ok(decoded) => {
19927 handler
19928 .set_extended_attribute(
19929 ::fidl_next::Request::from_decoded(decoded),
19930 responder,
19931 )
19932 .await;
19933 Ok(())
19934 }
19935 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19936 ordinal: 5374223046099989052,
19937 error,
19938 }),
19939 }
19940 }
19941
19942 8794297771444732717 => {
19943 let responder = ::fidl_next::Responder::from_untyped(responder);
19944
19945 match ::fidl_next::AsDecoderExt::into_decoded(message) {
19946 Ok(decoded) => {
19947 handler
19948 .remove_extended_attribute(
19949 ::fidl_next::Request::from_decoded(decoded),
19950 responder,
19951 )
19952 .await;
19953 Ok(())
19954 }
19955 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19956 ordinal: 8794297771444732717,
19957 error,
19958 }),
19959 }
19960 }
19961
19962 8371117097481679347 => {
19963 let responder = ::fidl_next::Responder::from_untyped(responder);
19964
19965 handler.describe(responder).await;
19966 Ok(())
19967 }
19968
19969 ordinal => {
19970 handler.on_unknown_interaction(ordinal).await;
19971 if ::core::matches!(
19972 message.header().flexibility(),
19973 ::fidl_next::protocol::Flexibility::Strict
19974 ) {
19975 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19976 } else {
19977 responder
19978 .respond_framework_error(
19979 ordinal,
19980 ::fidl_next::FrameworkError::UnknownMethod,
19981 )
19982 .expect("encoding a framework error should never fail")
19983 .await?;
19984 Ok(())
19985 }
19986 }
19987 }
19988 }
19989}
19990
19991impl<___T> SymlinkClientHandler<___T> for ::fidl_next::IgnoreEvents
19992where
19993 ___T: ::fidl_next::Transport,
19994{
19995 async fn on_open(&mut self, _: ::fidl_next::Request<symlink::OnOpen, ___T>) {}
19996
19997 async fn on_representation(
19998 &mut self,
19999
20000 _: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
20001 ) {
20002 }
20003
20004 async fn on_unknown_interaction(&mut self, _: u64) {}
20005}
20006
20007impl<___H, ___T> SymlinkLocalClientHandler<___T> for ::fidl_next::Local<___H>
20008where
20009 ___H: SymlinkClientHandler<___T>,
20010 ___T: ::fidl_next::Transport,
20011{
20012 async fn on_open(&mut self, request: ::fidl_next::Request<symlink::OnOpen, ___T>) {
20013 ___H::on_open(&mut self.0, request).await
20014 }
20015
20016 async fn on_representation(
20017 &mut self,
20018
20019 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
20020 ) {
20021 ___H::on_representation(&mut self.0, request).await
20022 }
20023
20024 async fn on_unknown_interaction(&mut self, ordinal: u64) {
20025 ___H::on_unknown_interaction(&mut self.0, ordinal).await
20026 }
20027}
20028
20029impl<___H, ___T> SymlinkLocalServerHandler<___T> for ::fidl_next::Local<___H>
20030where
20031 ___H: SymlinkServerHandler<___T>,
20032 ___T: ::fidl_next::Transport,
20033{
20034 async fn link_into(
20035 &mut self,
20036
20037 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
20038
20039 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
20040 ) {
20041 ___H::link_into(&mut self.0, request, responder).await
20042 }
20043
20044 async fn clone(&mut self, request: ::fidl_next::Request<symlink::Clone, ___T>) {
20045 ___H::clone(&mut self.0, request).await
20046 }
20047
20048 async fn close(&mut self, responder: ::fidl_next::Responder<symlink::Close, ___T>) {
20049 ___H::close(&mut self.0, responder).await
20050 }
20051
20052 async fn query(&mut self, responder: ::fidl_next::Responder<symlink::Query, ___T>) {
20053 ___H::query(&mut self.0, responder).await
20054 }
20055
20056 async fn deprecated_clone(
20057 &mut self,
20058
20059 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
20060 ) {
20061 ___H::deprecated_clone(&mut self.0, request).await
20062 }
20063
20064 async fn deprecated_get_attr(
20065 &mut self,
20066
20067 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
20068 ) {
20069 ___H::deprecated_get_attr(&mut self.0, responder).await
20070 }
20071
20072 async fn deprecated_set_attr(
20073 &mut self,
20074
20075 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
20076
20077 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
20078 ) {
20079 ___H::deprecated_set_attr(&mut self.0, request, responder).await
20080 }
20081
20082 async fn deprecated_get_flags(
20083 &mut self,
20084
20085 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
20086 ) {
20087 ___H::deprecated_get_flags(&mut self.0, responder).await
20088 }
20089
20090 async fn deprecated_set_flags(
20091 &mut self,
20092
20093 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
20094
20095 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
20096 ) {
20097 ___H::deprecated_set_flags(&mut self.0, request, responder).await
20098 }
20099
20100 async fn get_flags(&mut self, responder: ::fidl_next::Responder<symlink::GetFlags, ___T>) {
20101 ___H::get_flags(&mut self.0, responder).await
20102 }
20103
20104 async fn set_flags(
20105 &mut self,
20106
20107 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
20108
20109 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
20110 ) {
20111 ___H::set_flags(&mut self.0, request, responder).await
20112 }
20113
20114 async fn query_filesystem(
20115 &mut self,
20116
20117 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
20118 ) {
20119 ___H::query_filesystem(&mut self.0, responder).await
20120 }
20121
20122 async fn get_attributes(
20123 &mut self,
20124
20125 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
20126
20127 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
20128 ) {
20129 ___H::get_attributes(&mut self.0, request, responder).await
20130 }
20131
20132 async fn update_attributes(
20133 &mut self,
20134
20135 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
20136
20137 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
20138 ) {
20139 ___H::update_attributes(&mut self.0, request, responder).await
20140 }
20141
20142 async fn sync(&mut self, responder: ::fidl_next::Responder<symlink::Sync, ___T>) {
20143 ___H::sync(&mut self.0, responder).await
20144 }
20145
20146 async fn list_extended_attributes(
20147 &mut self,
20148
20149 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
20150 ) {
20151 ___H::list_extended_attributes(&mut self.0, request).await
20152 }
20153
20154 async fn get_extended_attribute(
20155 &mut self,
20156
20157 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
20158
20159 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
20160 ) {
20161 ___H::get_extended_attribute(&mut self.0, request, responder).await
20162 }
20163
20164 async fn set_extended_attribute(
20165 &mut self,
20166
20167 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
20168
20169 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
20170 ) {
20171 ___H::set_extended_attribute(&mut self.0, request, responder).await
20172 }
20173
20174 async fn remove_extended_attribute(
20175 &mut self,
20176
20177 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
20178
20179 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
20180 ) {
20181 ___H::remove_extended_attribute(&mut self.0, request, responder).await
20182 }
20183
20184 async fn open(&mut self, request: ::fidl_next::Request<symlink::Open, ___T>) {
20185 ___H::open(&mut self.0, request).await
20186 }
20187
20188 async fn describe(&mut self, responder: ::fidl_next::Responder<symlink::Describe, ___T>) {
20189 ___H::describe(&mut self.0, responder).await
20190 }
20191
20192 async fn on_unknown_interaction(&mut self, ordinal: u64) {
20193 ___H::on_unknown_interaction(&mut self.0, ordinal).await
20194 }
20195}
20196
20197pub use fidl_next_common_fuchsia_io::*;