1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_fuchsia_io::natural::*;
8
9 #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10 pub struct ConnectionInfo {
11 pub rights: ::core::option::Option<crate::natural::Operations>,
12 }
13
14 impl ConnectionInfo {
15 fn __max_ordinal(&self) -> usize {
16 if self.rights.is_some() {
17 return 1;
18 }
19
20 0
21 }
22 }
23
24 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ConnectionInfo<'static>, ___E> for ConnectionInfo
25 where
26 ___E: ::fidl_next::Encoder + ?Sized,
27 ___E: ::fidl_next::fuchsia::HandleEncoder,
28 {
29 #[inline]
30 fn encode(
31 mut self,
32 encoder: &mut ___E,
33 out: &mut ::core::mem::MaybeUninit<crate::wire::ConnectionInfo<'static>>,
34 _: (),
35 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
36 ::fidl_next::munge!(let crate::wire::ConnectionInfo { table } = out);
37
38 let max_ord = self.__max_ordinal();
39
40 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
41 ::fidl_next::Wire::zero_padding(&mut out);
42
43 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
44 ::fidl_next::wire::Envelope,
45 >(encoder, max_ord);
46
47 for i in 1..=max_ord {
48 match i {
49 1 => {
50 if let Some(value) = self.rights.take() {
51 ::fidl_next::wire::Envelope::encode_value::<
52 crate::wire::Operations,
53 ___E,
54 >(
55 value, preallocated.encoder, &mut out, ()
56 )?;
57 } else {
58 ::fidl_next::wire::Envelope::encode_zero(&mut out)
59 }
60 }
61
62 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
63 }
64 unsafe {
65 preallocated.write_next(out.assume_init_ref());
66 }
67 }
68
69 ::fidl_next::wire::Table::encode_len(table, max_ord);
70
71 Ok(())
72 }
73 }
74
75 impl<'de> ::fidl_next::FromWire<crate::wire::ConnectionInfo<'de>> for ConnectionInfo {
76 #[inline]
77 fn from_wire(wire_: crate::wire::ConnectionInfo<'de>) -> Self {
78 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
79
80 let rights = wire_.table.get(1);
81
82 Self {
83 rights: rights.map(|envelope| {
84 ::fidl_next::FromWire::from_wire(unsafe {
85 envelope.read_unchecked::<crate::wire::Operations>()
86 })
87 }),
88 }
89 }
90 }
91
92 #[derive(Debug, PartialEq)]
93 pub struct DirectoryLinkRequest {
94 pub src: ::std::string::String,
95
96 pub dst_parent_token: ::fidl_next::fuchsia::zx::NullableHandle,
97
98 pub dst: ::std::string::String,
99 }
100
101 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
102 for DirectoryLinkRequest
103 where
104 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
105 ___E: ::fidl_next::Encoder,
106 ___E: ::fidl_next::fuchsia::HandleEncoder,
107 {
108 #[inline]
109 fn encode(
110 self,
111 encoder_: &mut ___E,
112 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
113 _: (),
114 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
115 ::fidl_next::munge! {
116 let crate::wire::DirectoryLinkRequest {
117 src,
118 dst_parent_token,
119 dst,
120
121 } = out_;
122 }
123
124 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
125
126 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(src.as_mut_ptr()) };
127 ::fidl_next::Constrained::validate(_field, 255)?;
128
129 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
130
131 let mut _field =
132 unsafe { ::fidl_next::Slot::new_unchecked(dst_parent_token.as_mut_ptr()) };
133
134 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
135
136 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dst.as_mut_ptr()) };
137 ::fidl_next::Constrained::validate(_field, 255)?;
138
139 Ok(())
140 }
141 }
142
143 unsafe impl<___E>
144 ::fidl_next::EncodeOption<
145 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkRequest<'static>>,
146 ___E,
147 > for DirectoryLinkRequest
148 where
149 ___E: ::fidl_next::Encoder + ?Sized,
150 DirectoryLinkRequest: ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>,
151 {
152 #[inline]
153 fn encode_option(
154 this: ::core::option::Option<Self>,
155 encoder: &mut ___E,
156 out: &mut ::core::mem::MaybeUninit<
157 ::fidl_next::wire::Box<'static, crate::wire::DirectoryLinkRequest<'static>>,
158 >,
159 _: (),
160 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
161 if let Some(inner) = this {
162 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
163 ::fidl_next::wire::Box::encode_present(out);
164 } else {
165 ::fidl_next::wire::Box::encode_absent(out);
166 }
167
168 Ok(())
169 }
170 }
171
172 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryLinkRequest<'de>> for DirectoryLinkRequest {
173 #[inline]
174 fn from_wire(wire: crate::wire::DirectoryLinkRequest<'de>) -> Self {
175 Self {
176 src: ::fidl_next::FromWire::from_wire(wire.src),
177
178 dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
179
180 dst: ::fidl_next::FromWire::from_wire(wire.dst),
181 }
182 }
183 }
184
185 #[doc = " The type to identify a connection to a node.\n It represents a capability: a reference to a node with associated rights.\n"]
186 pub type Token = ::fidl_next::fuchsia::zx::Event;
187
188 #[derive(Debug, PartialEq)]
189 pub struct DirectoryRenameRequest {
190 pub src: ::std::string::String,
191
192 pub dst_parent_token: ::fidl_next::fuchsia::zx::Event,
193
194 pub dst: ::std::string::String,
195 }
196
197 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
198 for DirectoryRenameRequest
199 where
200 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
201 ___E: ::fidl_next::Encoder,
202 ___E: ::fidl_next::fuchsia::HandleEncoder,
203 {
204 #[inline]
205 fn encode(
206 self,
207 encoder_: &mut ___E,
208 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
209 _: (),
210 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
211 ::fidl_next::munge! {
212 let crate::wire::DirectoryRenameRequest {
213 src,
214 dst_parent_token,
215 dst,
216
217 } = out_;
218 }
219
220 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
221
222 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(src.as_mut_ptr()) };
223 ::fidl_next::Constrained::validate(_field, 255)?;
224
225 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
226
227 let mut _field =
228 unsafe { ::fidl_next::Slot::new_unchecked(dst_parent_token.as_mut_ptr()) };
229
230 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
231
232 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dst.as_mut_ptr()) };
233 ::fidl_next::Constrained::validate(_field, 255)?;
234
235 Ok(())
236 }
237 }
238
239 unsafe impl<___E>
240 ::fidl_next::EncodeOption<
241 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRenameRequest<'static>>,
242 ___E,
243 > for DirectoryRenameRequest
244 where
245 ___E: ::fidl_next::Encoder + ?Sized,
246 DirectoryRenameRequest:
247 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>,
248 {
249 #[inline]
250 fn encode_option(
251 this: ::core::option::Option<Self>,
252 encoder: &mut ___E,
253 out: &mut ::core::mem::MaybeUninit<
254 ::fidl_next::wire::Box<'static, crate::wire::DirectoryRenameRequest<'static>>,
255 >,
256 _: (),
257 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
258 if let Some(inner) = this {
259 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
260 ::fidl_next::wire::Box::encode_present(out);
261 } else {
262 ::fidl_next::wire::Box::encode_absent(out);
263 }
264
265 Ok(())
266 }
267 }
268
269 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryRenameRequest<'de>>
270 for DirectoryRenameRequest
271 {
272 #[inline]
273 fn from_wire(wire: crate::wire::DirectoryRenameRequest<'de>) -> Self {
274 Self {
275 src: ::fidl_next::FromWire::from_wire(wire.src),
276
277 dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
278
279 dst: ::fidl_next::FromWire::from_wire(wire.dst),
280 }
281 }
282 }
283
284 #[derive(Debug, PartialEq)]
285 #[repr(C)]
286 pub struct DirectoryWatchRequest {
287 pub mask: crate::natural::WatchMask,
288
289 pub options: u32,
290
291 pub watcher:
292 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::fuchsia::zx::Channel>,
293 }
294
295 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
296 for DirectoryWatchRequest
297 where
298 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
299 ___E: ::fidl_next::fuchsia::HandleEncoder,
300 {
301 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
302 Self,
303 crate::wire::DirectoryWatchRequest,
304 > = unsafe {
305 ::fidl_next::CopyOptimization::enable_if(
306 true
307
308 && <
309 crate::natural::WatchMask as ::fidl_next::Encode<crate::wire::WatchMask, ___E>
310 >::COPY_OPTIMIZATION.is_enabled()
311
312 && <
313 u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
314 >::COPY_OPTIMIZATION.is_enabled()
315
316 && <
317 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::wire::fuchsia::Channel>, ___E>
318 >::COPY_OPTIMIZATION.is_enabled()
319
320 )
321 };
322
323 #[inline]
324 fn encode(
325 self,
326 encoder_: &mut ___E,
327 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
328 _: (),
329 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
330 ::fidl_next::munge! {
331 let crate::wire::DirectoryWatchRequest {
332 mask,
333 options,
334 watcher,
335
336 } = out_;
337 }
338
339 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
340
341 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mask.as_mut_ptr()) };
342
343 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
344
345 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
346
347 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
348
349 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(watcher.as_mut_ptr()) };
350
351 Ok(())
352 }
353 }
354
355 unsafe impl<___E>
356 ::fidl_next::EncodeOption<
357 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchRequest>,
358 ___E,
359 > for DirectoryWatchRequest
360 where
361 ___E: ::fidl_next::Encoder + ?Sized,
362 DirectoryWatchRequest: ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>,
363 {
364 #[inline]
365 fn encode_option(
366 this: ::core::option::Option<Self>,
367 encoder: &mut ___E,
368 out: &mut ::core::mem::MaybeUninit<
369 ::fidl_next::wire::Box<'static, crate::wire::DirectoryWatchRequest>,
370 >,
371 _: (),
372 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
373 if let Some(inner) = this {
374 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
375 ::fidl_next::wire::Box::encode_present(out);
376 } else {
377 ::fidl_next::wire::Box::encode_absent(out);
378 }
379
380 Ok(())
381 }
382 }
383
384 impl ::fidl_next::FromWire<crate::wire::DirectoryWatchRequest> for DirectoryWatchRequest {
385 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
386 crate::wire::DirectoryWatchRequest,
387 Self,
388 > = unsafe {
389 ::fidl_next::CopyOptimization::enable_if(
390 true && <crate::natural::WatchMask as ::fidl_next::FromWire<
391 crate::wire::WatchMask,
392 >>::COPY_OPTIMIZATION
393 .is_enabled()
394 && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
395 .is_enabled()
396 && <::fidl_next::ServerEnd<
397 crate::DirectoryWatcher,
398 ::fidl_next::fuchsia::zx::Channel,
399 > as ::fidl_next::FromWire<
400 ::fidl_next::ServerEnd<
401 crate::DirectoryWatcher,
402 ::fidl_next::wire::fuchsia::Channel,
403 >,
404 >>::COPY_OPTIMIZATION
405 .is_enabled(),
406 )
407 };
408
409 #[inline]
410 fn from_wire(wire: crate::wire::DirectoryWatchRequest) -> Self {
411 Self {
412 mask: ::fidl_next::FromWire::from_wire(wire.mask),
413
414 options: ::fidl_next::FromWire::from_wire(wire.options),
415
416 watcher: ::fidl_next::FromWire::from_wire(wire.watcher),
417 }
418 }
419 }
420
421 #[derive(Debug, PartialEq)]
422 #[repr(C)]
423 pub struct NodeListExtendedAttributesRequest {
424 pub iterator: ::fidl_next::ServerEnd<
425 crate::ExtendedAttributeIterator,
426 ::fidl_next::fuchsia::zx::Channel,
427 >,
428 }
429
430 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
431 for NodeListExtendedAttributesRequest
432 where
433 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
434 ___E: ::fidl_next::fuchsia::HandleEncoder,
435 {
436 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
437 Self,
438 crate::wire::NodeListExtendedAttributesRequest,
439 > = unsafe {
440 ::fidl_next::CopyOptimization::enable_if(
441 true && <::fidl_next::ServerEnd<
442 crate::ExtendedAttributeIterator,
443 ::fidl_next::fuchsia::zx::Channel,
444 > as ::fidl_next::Encode<
445 ::fidl_next::ServerEnd<
446 crate::ExtendedAttributeIterator,
447 ::fidl_next::wire::fuchsia::Channel,
448 >,
449 ___E,
450 >>::COPY_OPTIMIZATION
451 .is_enabled(),
452 )
453 };
454
455 #[inline]
456 fn encode(
457 self,
458 encoder_: &mut ___E,
459 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
460 _: (),
461 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
462 ::fidl_next::munge! {
463 let crate::wire::NodeListExtendedAttributesRequest {
464 iterator,
465
466 } = out_;
467 }
468
469 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
470
471 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(iterator.as_mut_ptr()) };
472
473 Ok(())
474 }
475 }
476
477 unsafe impl<___E>
478 ::fidl_next::EncodeOption<
479 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
480 ___E,
481 > for NodeListExtendedAttributesRequest
482 where
483 ___E: ::fidl_next::Encoder + ?Sized,
484 NodeListExtendedAttributesRequest:
485 ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>,
486 {
487 #[inline]
488 fn encode_option(
489 this: ::core::option::Option<Self>,
490 encoder: &mut ___E,
491 out: &mut ::core::mem::MaybeUninit<
492 ::fidl_next::wire::Box<'static, crate::wire::NodeListExtendedAttributesRequest>,
493 >,
494 _: (),
495 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
496 if let Some(inner) = this {
497 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
498 ::fidl_next::wire::Box::encode_present(out);
499 } else {
500 ::fidl_next::wire::Box::encode_absent(out);
501 }
502
503 Ok(())
504 }
505 }
506
507 impl ::fidl_next::FromWire<crate::wire::NodeListExtendedAttributesRequest>
508 for NodeListExtendedAttributesRequest
509 {
510 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
511 crate::wire::NodeListExtendedAttributesRequest,
512 Self,
513 > = unsafe {
514 ::fidl_next::CopyOptimization::enable_if(
515 true && <::fidl_next::ServerEnd<
516 crate::ExtendedAttributeIterator,
517 ::fidl_next::fuchsia::zx::Channel,
518 > as ::fidl_next::FromWire<
519 ::fidl_next::ServerEnd<
520 crate::ExtendedAttributeIterator,
521 ::fidl_next::wire::fuchsia::Channel,
522 >,
523 >>::COPY_OPTIMIZATION
524 .is_enabled(),
525 )
526 };
527
528 #[inline]
529 fn from_wire(wire: crate::wire::NodeListExtendedAttributesRequest) -> Self {
530 Self { iterator: ::fidl_next::FromWire::from_wire(wire.iterator) }
531 }
532 }
533
534 #[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"]
535 #[derive(Debug, PartialEq)]
536 pub enum ExtendedAttributeValue {
537 Bytes(::std::vec::Vec<u8>),
538
539 Buffer(::fidl_next::fuchsia::zx::Vmo),
540
541 UnknownOrdinal_(u64),
542 }
543
544 impl ExtendedAttributeValue {
545 pub fn is_unknown(&self) -> bool {
546 #[allow(unreachable_patterns)]
547 match self {
548 Self::UnknownOrdinal_(_) => true,
549 _ => false,
550 }
551 }
552 }
553
554 unsafe impl<___E> ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>
555 for ExtendedAttributeValue
556 where
557 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
558 ___E: ::fidl_next::Encoder,
559 ___E: ::fidl_next::fuchsia::HandleEncoder,
560 {
561 #[inline]
562 fn encode(
563 self,
564 encoder: &mut ___E,
565 out: &mut ::core::mem::MaybeUninit<crate::wire::ExtendedAttributeValue<'static>>,
566 _: (),
567 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
568 ::fidl_next::munge!(let crate::wire::ExtendedAttributeValue { raw, _phantom: _ } = out);
569
570 match self {
571 Self::Bytes(value) => ::fidl_next::wire::Union::encode_as::<
572 ___E,
573 ::fidl_next::wire::Vector<'static, u8>,
574 >(value, 1, encoder, raw, (32768, ()))?,
575
576 Self::Buffer(value) => ::fidl_next::wire::Union::encode_as::<
577 ___E,
578 ::fidl_next::wire::fuchsia::Vmo,
579 >(value, 2, encoder, raw, ())?,
580
581 Self::UnknownOrdinal_(ordinal) => {
582 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
583 }
584 }
585
586 Ok(())
587 }
588 }
589
590 unsafe impl<___E>
591 ::fidl_next::EncodeOption<crate::wire_optional::ExtendedAttributeValue<'static>, ___E>
592 for ExtendedAttributeValue
593 where
594 ___E: ?Sized,
595 ExtendedAttributeValue:
596 ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
597 {
598 #[inline]
599 fn encode_option(
600 this: ::core::option::Option<Self>,
601 encoder: &mut ___E,
602 out: &mut ::core::mem::MaybeUninit<
603 crate::wire_optional::ExtendedAttributeValue<'static>,
604 >,
605 _: (),
606 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
607 ::fidl_next::munge!(let crate::wire_optional::ExtendedAttributeValue { raw, _phantom: _ } = &mut *out);
608
609 if let Some(inner) = this {
610 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
611 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
612 } else {
613 ::fidl_next::wire::Union::encode_absent(raw);
614 }
615
616 Ok(())
617 }
618 }
619
620 impl<'de> ::fidl_next::FromWire<crate::wire::ExtendedAttributeValue<'de>>
621 for ExtendedAttributeValue
622 {
623 #[inline]
624 fn from_wire(wire: crate::wire::ExtendedAttributeValue<'de>) -> Self {
625 let wire = ::core::mem::ManuallyDrop::new(wire);
626 match wire.raw.ordinal() {
627 1 => Self::Bytes(::fidl_next::FromWire::from_wire(unsafe {
628 wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
629 })),
630
631 2 => Self::Buffer(::fidl_next::FromWire::from_wire(unsafe {
632 wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
633 })),
634
635 ord => return Self::UnknownOrdinal_(ord as u64),
636 }
637 }
638 }
639
640 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
641 for ExtendedAttributeValue
642 {
643 #[inline]
644 fn from_wire_option(
645 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
646 ) -> ::core::option::Option<Self> {
647 if let Some(inner) = wire.into_option() {
648 Some(::fidl_next::FromWire::from_wire(inner))
649 } else {
650 None
651 }
652 }
653 }
654
655 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::ExtendedAttributeValue<'de>>
656 for Box<ExtendedAttributeValue>
657 {
658 #[inline]
659 fn from_wire_option(
660 wire: crate::wire_optional::ExtendedAttributeValue<'de>,
661 ) -> ::core::option::Option<Self> {
662 <ExtendedAttributeValue as ::fidl_next::FromWireOption<
663 crate::wire_optional::ExtendedAttributeValue<'de>,
664 >>::from_wire_option(wire)
665 .map(Box::new)
666 }
667 }
668
669 #[derive(Debug, PartialEq)]
670 pub struct NodeSetExtendedAttributeRequest {
671 pub name: ::std::vec::Vec<u8>,
672
673 pub value: crate::natural::ExtendedAttributeValue,
674
675 pub mode: crate::natural::SetExtendedAttributeMode,
676 }
677
678 unsafe impl<___E>
679 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
680 for NodeSetExtendedAttributeRequest
681 where
682 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
683 ___E: ::fidl_next::Encoder,
684 ___E: ::fidl_next::fuchsia::HandleEncoder,
685 {
686 #[inline]
687 fn encode(
688 self,
689 encoder_: &mut ___E,
690 out_: &mut ::core::mem::MaybeUninit<
691 crate::wire::NodeSetExtendedAttributeRequest<'static>,
692 >,
693 _: (),
694 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
695 ::fidl_next::munge! {
696 let crate::wire::NodeSetExtendedAttributeRequest {
697 name,
698 value,
699 mode,
700
701 } = out_;
702 }
703
704 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
705
706 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
707 ::fidl_next::Constrained::validate(_field, (255, ()))?;
708
709 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
710
711 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
712
713 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
714
715 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
716
717 Ok(())
718 }
719 }
720
721 unsafe impl<___E>
722 ::fidl_next::EncodeOption<
723 ::fidl_next::wire::Box<'static, crate::wire::NodeSetExtendedAttributeRequest<'static>>,
724 ___E,
725 > for NodeSetExtendedAttributeRequest
726 where
727 ___E: ::fidl_next::Encoder + ?Sized,
728 NodeSetExtendedAttributeRequest:
729 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>,
730 {
731 #[inline]
732 fn encode_option(
733 this: ::core::option::Option<Self>,
734 encoder: &mut ___E,
735 out: &mut ::core::mem::MaybeUninit<
736 ::fidl_next::wire::Box<
737 'static,
738 crate::wire::NodeSetExtendedAttributeRequest<'static>,
739 >,
740 >,
741 _: (),
742 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
743 if let Some(inner) = this {
744 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
745 ::fidl_next::wire::Box::encode_present(out);
746 } else {
747 ::fidl_next::wire::Box::encode_absent(out);
748 }
749
750 Ok(())
751 }
752 }
753
754 impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetExtendedAttributeRequest<'de>>
755 for NodeSetExtendedAttributeRequest
756 {
757 #[inline]
758 fn from_wire(wire: crate::wire::NodeSetExtendedAttributeRequest<'de>) -> Self {
759 Self {
760 name: ::fidl_next::FromWire::from_wire(wire.name),
761
762 value: ::fidl_next::FromWire::from_wire(wire.value),
763
764 mode: ::fidl_next::FromWire::from_wire(wire.mode),
765 }
766 }
767 }
768
769 #[derive(Debug, PartialEq)]
770 #[repr(C)]
771 pub struct NodeGetTokenResponse {
772 pub token: ::fidl_next::fuchsia::zx::Event,
773 }
774
775 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeGetTokenResponse, ___E>
776 for NodeGetTokenResponse
777 where
778 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
779 ___E: ::fidl_next::fuchsia::HandleEncoder,
780 {
781 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
782 Self,
783 crate::wire::NodeGetTokenResponse,
784 > = unsafe {
785 ::fidl_next::CopyOptimization::enable_if(
786 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
787 ::fidl_next::wire::fuchsia::Event,
788 ___E,
789 >>::COPY_OPTIMIZATION
790 .is_enabled(),
791 )
792 };
793
794 #[inline]
795 fn encode(
796 self,
797 encoder_: &mut ___E,
798 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetTokenResponse>,
799 _: (),
800 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
801 ::fidl_next::munge! {
802 let crate::wire::NodeGetTokenResponse {
803 token,
804
805 } = out_;
806 }
807
808 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
809
810 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
811
812 Ok(())
813 }
814 }
815
816 unsafe impl<___E>
817 ::fidl_next::EncodeOption<
818 ::fidl_next::wire::Box<'static, crate::wire::NodeGetTokenResponse>,
819 ___E,
820 > for NodeGetTokenResponse
821 where
822 ___E: ::fidl_next::Encoder + ?Sized,
823 NodeGetTokenResponse: ::fidl_next::Encode<crate::wire::NodeGetTokenResponse, ___E>,
824 {
825 #[inline]
826 fn encode_option(
827 this: ::core::option::Option<Self>,
828 encoder: &mut ___E,
829 out: &mut ::core::mem::MaybeUninit<
830 ::fidl_next::wire::Box<'static, crate::wire::NodeGetTokenResponse>,
831 >,
832 _: (),
833 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
834 if let Some(inner) = this {
835 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
836 ::fidl_next::wire::Box::encode_present(out);
837 } else {
838 ::fidl_next::wire::Box::encode_absent(out);
839 }
840
841 Ok(())
842 }
843 }
844
845 impl ::fidl_next::FromWire<crate::wire::NodeGetTokenResponse> for NodeGetTokenResponse {
846 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
847 crate::wire::NodeGetTokenResponse,
848 Self,
849 > = unsafe {
850 ::fidl_next::CopyOptimization::enable_if(
851 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
852 ::fidl_next::wire::fuchsia::Event,
853 >>::COPY_OPTIMIZATION
854 .is_enabled(),
855 )
856 };
857
858 #[inline]
859 fn from_wire(wire: crate::wire::NodeGetTokenResponse) -> Self {
860 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
861 }
862 }
863
864 #[derive(Debug, PartialEq)]
865 #[repr(C)]
866 pub struct DirectoryDeprecatedGetTokenResponse {
867 pub s: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
868
869 pub token: ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle>,
870 }
871
872 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryDeprecatedGetTokenResponse, ___E>
873 for DirectoryDeprecatedGetTokenResponse
874 where
875 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
876 ___E: ::fidl_next::fuchsia::HandleEncoder,
877 {
878 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
879 Self,
880 crate::wire::DirectoryDeprecatedGetTokenResponse,
881 > = unsafe {
882 ::fidl_next::CopyOptimization::enable_if(
883 true
884
885 && <
886 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>
887 >::COPY_OPTIMIZATION.is_enabled()
888
889 && <
890 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>
891 >::COPY_OPTIMIZATION.is_enabled()
892
893 )
894 };
895
896 #[inline]
897 fn encode(
898 self,
899 encoder_: &mut ___E,
900 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryDeprecatedGetTokenResponse>,
901 _: (),
902 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
903 ::fidl_next::munge! {
904 let crate::wire::DirectoryDeprecatedGetTokenResponse {
905 s,
906 token,
907
908 } = out_;
909 }
910
911 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
912
913 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
914
915 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
916
917 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
918
919 Ok(())
920 }
921 }
922
923 unsafe impl<___E>
924 ::fidl_next::EncodeOption<
925 ::fidl_next::wire::Box<'static, crate::wire::DirectoryDeprecatedGetTokenResponse>,
926 ___E,
927 > for DirectoryDeprecatedGetTokenResponse
928 where
929 ___E: ::fidl_next::Encoder + ?Sized,
930 DirectoryDeprecatedGetTokenResponse:
931 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedGetTokenResponse, ___E>,
932 {
933 #[inline]
934 fn encode_option(
935 this: ::core::option::Option<Self>,
936 encoder: &mut ___E,
937 out: &mut ::core::mem::MaybeUninit<
938 ::fidl_next::wire::Box<'static, crate::wire::DirectoryDeprecatedGetTokenResponse>,
939 >,
940 _: (),
941 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
942 if let Some(inner) = this {
943 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
944 ::fidl_next::wire::Box::encode_present(out);
945 } else {
946 ::fidl_next::wire::Box::encode_absent(out);
947 }
948
949 Ok(())
950 }
951 }
952
953 impl ::fidl_next::FromWire<crate::wire::DirectoryDeprecatedGetTokenResponse>
954 for DirectoryDeprecatedGetTokenResponse
955 {
956 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
957 crate::wire::DirectoryDeprecatedGetTokenResponse,
958 Self,
959 > = unsafe {
960 ::fidl_next::CopyOptimization::enable_if(
961 true
962
963 && <
964 ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::StatusResult>
965 >::COPY_OPTIMIZATION.is_enabled()
966
967 && <
968 ::core::option::Option<::fidl_next::fuchsia::zx::NullableHandle> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalNullableHandle>
969 >::COPY_OPTIMIZATION.is_enabled()
970
971 )
972 };
973
974 #[inline]
975 fn from_wire(wire: crate::wire::DirectoryDeprecatedGetTokenResponse) -> Self {
976 Self {
977 s: ::fidl_next::FromWire::from_wire(wire.s),
978
979 token: ::fidl_next::FromWire::from_wire(wire.token),
980 }
981 }
982 }
983
984 #[doc = " Auxiliary data for the file representation of a node.\n"]
985 #[derive(Debug, Default, PartialEq)]
986 pub struct FileInfo {
987 pub is_append: ::core::option::Option<bool>,
988
989 pub observer: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
990
991 pub stream: ::core::option::Option<::fidl_next::fuchsia::zx::Stream>,
992
993 pub attributes: ::core::option::Option<crate::natural::NodeAttributes2>,
994 }
995
996 impl FileInfo {
997 fn __max_ordinal(&self) -> usize {
998 if self.attributes.is_some() {
999 return 4;
1000 }
1001
1002 if self.stream.is_some() {
1003 return 3;
1004 }
1005
1006 if self.observer.is_some() {
1007 return 2;
1008 }
1009
1010 if self.is_append.is_some() {
1011 return 1;
1012 }
1013
1014 0
1015 }
1016 }
1017
1018 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileInfo<'static>, ___E> for FileInfo
1019 where
1020 ___E: ::fidl_next::Encoder + ?Sized,
1021 ___E: ::fidl_next::fuchsia::HandleEncoder,
1022 {
1023 #[inline]
1024 fn encode(
1025 mut self,
1026 encoder: &mut ___E,
1027 out: &mut ::core::mem::MaybeUninit<crate::wire::FileInfo<'static>>,
1028 _: (),
1029 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1030 ::fidl_next::munge!(let crate::wire::FileInfo { table } = out);
1031
1032 let max_ord = self.__max_ordinal();
1033
1034 let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1035 ::fidl_next::Wire::zero_padding(&mut out);
1036
1037 let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1038 ::fidl_next::wire::Envelope,
1039 >(encoder, max_ord);
1040
1041 for i in 1..=max_ord {
1042 match i {
1043 4 => {
1044 if let Some(value) = self.attributes.take() {
1045 ::fidl_next::wire::Envelope::encode_value::<
1046 crate::wire::NodeAttributes2<'static>,
1047 ___E,
1048 >(
1049 value, preallocated.encoder, &mut out, ()
1050 )?;
1051 } else {
1052 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1053 }
1054 }
1055
1056 3 => {
1057 if let Some(value) = self.stream.take() {
1058 ::fidl_next::wire::Envelope::encode_value::<
1059 ::fidl_next::wire::fuchsia::Stream,
1060 ___E,
1061 >(
1062 value, preallocated.encoder, &mut out, ()
1063 )?;
1064 } else {
1065 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1066 }
1067 }
1068
1069 2 => {
1070 if let Some(value) = self.observer.take() {
1071 ::fidl_next::wire::Envelope::encode_value::<
1072 ::fidl_next::wire::fuchsia::Event,
1073 ___E,
1074 >(
1075 value, preallocated.encoder, &mut out, ()
1076 )?;
1077 } else {
1078 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1079 }
1080 }
1081
1082 1 => {
1083 if let Some(value) = self.is_append.take() {
1084 ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1085 value,
1086 preallocated.encoder,
1087 &mut out,
1088 (),
1089 )?;
1090 } else {
1091 ::fidl_next::wire::Envelope::encode_zero(&mut out)
1092 }
1093 }
1094
1095 _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1096 }
1097 unsafe {
1098 preallocated.write_next(out.assume_init_ref());
1099 }
1100 }
1101
1102 ::fidl_next::wire::Table::encode_len(table, max_ord);
1103
1104 Ok(())
1105 }
1106 }
1107
1108 impl<'de> ::fidl_next::FromWire<crate::wire::FileInfo<'de>> for FileInfo {
1109 #[inline]
1110 fn from_wire(wire_: crate::wire::FileInfo<'de>) -> Self {
1111 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1112
1113 let is_append = wire_.table.get(1);
1114
1115 let observer = wire_.table.get(2);
1116
1117 let stream = wire_.table.get(3);
1118
1119 let attributes = wire_.table.get(4);
1120
1121 Self {
1122 is_append: is_append.map(|envelope| {
1123 ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1124 }),
1125
1126 observer: observer.map(|envelope| {
1127 ::fidl_next::FromWire::from_wire(unsafe {
1128 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
1129 })
1130 }),
1131
1132 stream: stream.map(|envelope| {
1133 ::fidl_next::FromWire::from_wire(unsafe {
1134 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Stream>()
1135 })
1136 }),
1137
1138 attributes: attributes.map(|envelope| {
1139 ::fidl_next::FromWire::from_wire(unsafe {
1140 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
1141 })
1142 }),
1143 }
1144 }
1145 }
1146
1147 #[derive(Debug, PartialEq)]
1148 pub enum Representation {
1149 Node(crate::natural::NodeInfo),
1150
1151 Directory(crate::natural::DirectoryInfo),
1152
1153 File(crate::natural::FileInfo),
1154
1155 Symlink(crate::natural::SymlinkInfo),
1156
1157 UnknownOrdinal_(u64),
1158 }
1159
1160 impl Representation {
1161 pub fn is_unknown(&self) -> bool {
1162 #[allow(unreachable_patterns)]
1163 match self {
1164 Self::UnknownOrdinal_(_) => true,
1165 _ => false,
1166 }
1167 }
1168 }
1169
1170 unsafe impl<___E> ::fidl_next::Encode<crate::wire::Representation<'static>, ___E> for Representation
1171 where
1172 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1173 ___E: ::fidl_next::Encoder,
1174 ___E: ::fidl_next::fuchsia::HandleEncoder,
1175 {
1176 #[inline]
1177 fn encode(
1178 self,
1179 encoder: &mut ___E,
1180 out: &mut ::core::mem::MaybeUninit<crate::wire::Representation<'static>>,
1181 _: (),
1182 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1183 ::fidl_next::munge!(let crate::wire::Representation { raw, _phantom: _ } = out);
1184
1185 match self {
1186 Self::Node(value) => ::fidl_next::wire::Union::encode_as::<
1187 ___E,
1188 crate::wire::NodeInfo<'static>,
1189 >(value, 1, encoder, raw, ())?,
1190
1191 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
1192 ___E,
1193 crate::wire::DirectoryInfo<'static>,
1194 >(value, 2, encoder, raw, ())?,
1195
1196 Self::File(value) => ::fidl_next::wire::Union::encode_as::<
1197 ___E,
1198 crate::wire::FileInfo<'static>,
1199 >(value, 3, encoder, raw, ())?,
1200
1201 Self::Symlink(value) => ::fidl_next::wire::Union::encode_as::<
1202 ___E,
1203 crate::wire::SymlinkInfo<'static>,
1204 >(value, 4, encoder, raw, ())?,
1205
1206 Self::UnknownOrdinal_(ordinal) => {
1207 return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1208 }
1209 }
1210
1211 Ok(())
1212 }
1213 }
1214
1215 unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Representation<'static>, ___E>
1216 for Representation
1217 where
1218 ___E: ?Sized,
1219 Representation: ::fidl_next::Encode<crate::wire::Representation<'static>, ___E>,
1220 {
1221 #[inline]
1222 fn encode_option(
1223 this: ::core::option::Option<Self>,
1224 encoder: &mut ___E,
1225 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Representation<'static>>,
1226 _: (),
1227 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1228 ::fidl_next::munge!(let crate::wire_optional::Representation { raw, _phantom: _ } = &mut *out);
1229
1230 if let Some(inner) = this {
1231 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1232 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1233 } else {
1234 ::fidl_next::wire::Union::encode_absent(raw);
1235 }
1236
1237 Ok(())
1238 }
1239 }
1240
1241 impl<'de> ::fidl_next::FromWire<crate::wire::Representation<'de>> for Representation {
1242 #[inline]
1243 fn from_wire(wire: crate::wire::Representation<'de>) -> Self {
1244 let wire = ::core::mem::ManuallyDrop::new(wire);
1245 match wire.raw.ordinal() {
1246 1 => Self::Node(::fidl_next::FromWire::from_wire(unsafe {
1247 wire.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>()
1248 })),
1249
1250 2 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
1251 wire.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
1252 })),
1253
1254 3 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
1255 wire.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>()
1256 })),
1257
1258 4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
1259 wire.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>()
1260 })),
1261
1262 ord => return Self::UnknownOrdinal_(ord as u64),
1263 }
1264 }
1265 }
1266
1267 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1268 for Representation
1269 {
1270 #[inline]
1271 fn from_wire_option(
1272 wire: crate::wire_optional::Representation<'de>,
1273 ) -> ::core::option::Option<Self> {
1274 if let Some(inner) = wire.into_option() {
1275 Some(::fidl_next::FromWire::from_wire(inner))
1276 } else {
1277 None
1278 }
1279 }
1280 }
1281
1282 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Representation<'de>>
1283 for Box<Representation>
1284 {
1285 #[inline]
1286 fn from_wire_option(
1287 wire: crate::wire_optional::Representation<'de>,
1288 ) -> ::core::option::Option<Self> {
1289 <Representation as ::fidl_next::FromWireOption<
1290 crate::wire_optional::Representation<'de>,
1291 >>::from_wire_option(wire)
1292 .map(Box::new)
1293 }
1294 }
1295
1296 #[derive(Debug, PartialEq)]
1297 pub struct OpenableOpenRequest {
1298 pub path: ::std::string::String,
1299
1300 pub flags: crate::natural::Flags,
1301
1302 pub options: crate::natural::Options,
1303
1304 pub object: ::fidl_next::fuchsia::zx::Channel,
1305 }
1306
1307 unsafe impl<___E> ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'static>, ___E>
1308 for OpenableOpenRequest
1309 where
1310 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1311 ___E: ::fidl_next::Encoder,
1312 ___E: ::fidl_next::fuchsia::HandleEncoder,
1313 {
1314 #[inline]
1315 fn encode(
1316 self,
1317 encoder_: &mut ___E,
1318 out_: &mut ::core::mem::MaybeUninit<crate::wire::OpenableOpenRequest<'static>>,
1319 _: (),
1320 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1321 ::fidl_next::munge! {
1322 let crate::wire::OpenableOpenRequest {
1323 path,
1324 flags,
1325 options,
1326 object,
1327
1328 } = out_;
1329 }
1330
1331 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
1332
1333 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
1334 ::fidl_next::Constrained::validate(_field, 4095)?;
1335
1336 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1337
1338 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1339
1340 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
1341
1342 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
1343
1344 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1345
1346 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1347
1348 Ok(())
1349 }
1350 }
1351
1352 unsafe impl<___E>
1353 ::fidl_next::EncodeOption<
1354 ::fidl_next::wire::Box<'static, crate::wire::OpenableOpenRequest<'static>>,
1355 ___E,
1356 > for OpenableOpenRequest
1357 where
1358 ___E: ::fidl_next::Encoder + ?Sized,
1359 OpenableOpenRequest: ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'static>, ___E>,
1360 {
1361 #[inline]
1362 fn encode_option(
1363 this: ::core::option::Option<Self>,
1364 encoder: &mut ___E,
1365 out: &mut ::core::mem::MaybeUninit<
1366 ::fidl_next::wire::Box<'static, crate::wire::OpenableOpenRequest<'static>>,
1367 >,
1368 _: (),
1369 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1370 if let Some(inner) = this {
1371 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1372 ::fidl_next::wire::Box::encode_present(out);
1373 } else {
1374 ::fidl_next::wire::Box::encode_absent(out);
1375 }
1376
1377 Ok(())
1378 }
1379 }
1380
1381 impl<'de> ::fidl_next::FromWire<crate::wire::OpenableOpenRequest<'de>> for OpenableOpenRequest {
1382 #[inline]
1383 fn from_wire(wire: crate::wire::OpenableOpenRequest<'de>) -> Self {
1384 Self {
1385 path: ::fidl_next::FromWire::from_wire(wire.path),
1386
1387 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1388
1389 options: ::fidl_next::FromWire::from_wire(wire.options),
1390
1391 object: ::fidl_next::FromWire::from_wire(wire.object),
1392 }
1393 }
1394 }
1395
1396 #[derive(Debug, PartialEq)]
1397 #[repr(C)]
1398 pub struct NodeDeprecatedCloneRequest {
1399 pub flags: crate::natural::OpenFlags,
1400
1401 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1402 }
1403
1404 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
1405 for NodeDeprecatedCloneRequest
1406 where
1407 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1408 ___E: ::fidl_next::fuchsia::HandleEncoder,
1409 {
1410 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1411 Self,
1412 crate::wire::NodeDeprecatedCloneRequest,
1413 > = unsafe {
1414 ::fidl_next::CopyOptimization::enable_if(
1415 true
1416
1417 && <
1418 crate::natural::OpenFlags as ::fidl_next::Encode<crate::wire::OpenFlags, ___E>
1419 >::COPY_OPTIMIZATION.is_enabled()
1420
1421 && <
1422 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::Encode<::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>, ___E>
1423 >::COPY_OPTIMIZATION.is_enabled()
1424
1425 )
1426 };
1427
1428 #[inline]
1429 fn encode(
1430 self,
1431 encoder_: &mut ___E,
1432 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
1433 _: (),
1434 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1435 ::fidl_next::munge! {
1436 let crate::wire::NodeDeprecatedCloneRequest {
1437 flags,
1438 object,
1439
1440 } = out_;
1441 }
1442
1443 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1444
1445 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1446
1447 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1448
1449 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1450
1451 Ok(())
1452 }
1453 }
1454
1455 unsafe impl<___E>
1456 ::fidl_next::EncodeOption<
1457 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1458 ___E,
1459 > for NodeDeprecatedCloneRequest
1460 where
1461 ___E: ::fidl_next::Encoder + ?Sized,
1462 NodeDeprecatedCloneRequest:
1463 ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>,
1464 {
1465 #[inline]
1466 fn encode_option(
1467 this: ::core::option::Option<Self>,
1468 encoder: &mut ___E,
1469 out: &mut ::core::mem::MaybeUninit<
1470 ::fidl_next::wire::Box<'static, crate::wire::NodeDeprecatedCloneRequest>,
1471 >,
1472 _: (),
1473 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1474 if let Some(inner) = this {
1475 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1476 ::fidl_next::wire::Box::encode_present(out);
1477 } else {
1478 ::fidl_next::wire::Box::encode_absent(out);
1479 }
1480
1481 Ok(())
1482 }
1483 }
1484
1485 impl ::fidl_next::FromWire<crate::wire::NodeDeprecatedCloneRequest> for NodeDeprecatedCloneRequest {
1486 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1487 crate::wire::NodeDeprecatedCloneRequest,
1488 Self,
1489 > = unsafe {
1490 ::fidl_next::CopyOptimization::enable_if(
1491 true
1492
1493 && <
1494 crate::natural::OpenFlags as ::fidl_next::FromWire<crate::wire::OpenFlags>
1495 >::COPY_OPTIMIZATION.is_enabled()
1496
1497 && <
1498 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel> as ::fidl_next::FromWire<::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>>
1499 >::COPY_OPTIMIZATION.is_enabled()
1500
1501 )
1502 };
1503
1504 #[inline]
1505 fn from_wire(wire: crate::wire::NodeDeprecatedCloneRequest) -> Self {
1506 Self {
1507 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1508
1509 object: ::fidl_next::FromWire::from_wire(wire.object),
1510 }
1511 }
1512 }
1513
1514 #[derive(Debug, PartialEq)]
1515 pub struct NodeOnOpenRequest {
1516 pub s: ::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>,
1517
1518 pub info: ::core::option::Option<::std::boxed::Box<crate::natural::NodeInfoDeprecated>>,
1519 }
1520
1521 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
1522 for NodeOnOpenRequest
1523 where
1524 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1525 ___E: ::fidl_next::Encoder,
1526 ___E: ::fidl_next::fuchsia::HandleEncoder,
1527 {
1528 #[inline]
1529 fn encode(
1530 self,
1531 encoder_: &mut ___E,
1532 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
1533 _: (),
1534 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1535 ::fidl_next::munge! {
1536 let crate::wire::NodeOnOpenRequest {
1537 s,
1538 info,
1539
1540 } = out_;
1541 }
1542
1543 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
1544
1545 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(s.as_mut_ptr()) };
1546
1547 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
1548
1549 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
1550
1551 Ok(())
1552 }
1553 }
1554
1555 unsafe impl<___E>
1556 ::fidl_next::EncodeOption<
1557 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
1558 ___E,
1559 > for NodeOnOpenRequest
1560 where
1561 ___E: ::fidl_next::Encoder + ?Sized,
1562 NodeOnOpenRequest: ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>,
1563 {
1564 #[inline]
1565 fn encode_option(
1566 this: ::core::option::Option<Self>,
1567 encoder: &mut ___E,
1568 out: &mut ::core::mem::MaybeUninit<
1569 ::fidl_next::wire::Box<'static, crate::wire::NodeOnOpenRequest<'static>>,
1570 >,
1571 _: (),
1572 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1573 if let Some(inner) = this {
1574 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1575 ::fidl_next::wire::Box::encode_present(out);
1576 } else {
1577 ::fidl_next::wire::Box::encode_absent(out);
1578 }
1579
1580 Ok(())
1581 }
1582 }
1583
1584 impl<'de> ::fidl_next::FromWire<crate::wire::NodeOnOpenRequest<'de>> for NodeOnOpenRequest {
1585 #[inline]
1586 fn from_wire(wire: crate::wire::NodeOnOpenRequest<'de>) -> Self {
1587 Self {
1588 s: ::fidl_next::FromWire::from_wire(wire.s),
1589
1590 info: ::fidl_next::FromWire::from_wire(wire.info),
1591 }
1592 }
1593 }
1594
1595 #[derive(Debug, PartialEq)]
1596 pub struct DirectoryDeprecatedOpenRequest {
1597 pub flags: crate::natural::OpenFlags,
1598
1599 pub mode: crate::natural::ModeType,
1600
1601 pub path: ::std::string::String,
1602
1603 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1604 }
1605
1606 unsafe impl<___E>
1607 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
1608 for DirectoryDeprecatedOpenRequest
1609 where
1610 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1611 ___E: ::fidl_next::Encoder,
1612 ___E: ::fidl_next::fuchsia::HandleEncoder,
1613 {
1614 #[inline]
1615 fn encode(
1616 self,
1617 encoder_: &mut ___E,
1618 out_: &mut ::core::mem::MaybeUninit<
1619 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
1620 >,
1621 _: (),
1622 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1623 ::fidl_next::munge! {
1624 let crate::wire::DirectoryDeprecatedOpenRequest {
1625 flags,
1626 mode,
1627 path,
1628 object,
1629
1630 } = out_;
1631 }
1632
1633 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
1634
1635 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(flags.as_mut_ptr()) };
1636
1637 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
1638
1639 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
1640
1641 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
1642
1643 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
1644 ::fidl_next::Constrained::validate(_field, 4095)?;
1645
1646 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
1647
1648 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(object.as_mut_ptr()) };
1649
1650 Ok(())
1651 }
1652 }
1653
1654 unsafe impl<___E>
1655 ::fidl_next::EncodeOption<
1656 ::fidl_next::wire::Box<'static, crate::wire::DirectoryDeprecatedOpenRequest<'static>>,
1657 ___E,
1658 > for DirectoryDeprecatedOpenRequest
1659 where
1660 ___E: ::fidl_next::Encoder + ?Sized,
1661 DirectoryDeprecatedOpenRequest:
1662 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>,
1663 {
1664 #[inline]
1665 fn encode_option(
1666 this: ::core::option::Option<Self>,
1667 encoder: &mut ___E,
1668 out: &mut ::core::mem::MaybeUninit<
1669 ::fidl_next::wire::Box<
1670 'static,
1671 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
1672 >,
1673 >,
1674 _: (),
1675 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1676 if let Some(inner) = this {
1677 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1678 ::fidl_next::wire::Box::encode_present(out);
1679 } else {
1680 ::fidl_next::wire::Box::encode_absent(out);
1681 }
1682
1683 Ok(())
1684 }
1685 }
1686
1687 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryDeprecatedOpenRequest<'de>>
1688 for DirectoryDeprecatedOpenRequest
1689 {
1690 #[inline]
1691 fn from_wire(wire: crate::wire::DirectoryDeprecatedOpenRequest<'de>) -> Self {
1692 Self {
1693 flags: ::fidl_next::FromWire::from_wire(wire.flags),
1694
1695 mode: ::fidl_next::FromWire::from_wire(wire.mode),
1696
1697 path: ::fidl_next::FromWire::from_wire(wire.path),
1698
1699 object: ::fidl_next::FromWire::from_wire(wire.object),
1700 }
1701 }
1702 }
1703
1704 #[derive(Debug, PartialEq)]
1705 pub struct DirectoryCreateSymlinkRequest {
1706 pub name: ::std::string::String,
1707
1708 pub target: ::std::vec::Vec<u8>,
1709
1710 pub connection: ::core::option::Option<
1711 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::fuchsia::zx::Channel>,
1712 >,
1713 }
1714
1715 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
1716 for DirectoryCreateSymlinkRequest
1717 where
1718 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1719 ___E: ::fidl_next::Encoder,
1720 ___E: ::fidl_next::fuchsia::HandleEncoder,
1721 {
1722 #[inline]
1723 fn encode(
1724 self,
1725 encoder_: &mut ___E,
1726 out_: &mut ::core::mem::MaybeUninit<
1727 crate::wire::DirectoryCreateSymlinkRequest<'static>,
1728 >,
1729 _: (),
1730 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1731 ::fidl_next::munge! {
1732 let crate::wire::DirectoryCreateSymlinkRequest {
1733 name,
1734 target,
1735 connection,
1736
1737 } = out_;
1738 }
1739
1740 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
1741
1742 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(name.as_mut_ptr()) };
1743 ::fidl_next::Constrained::validate(_field, 255)?;
1744
1745 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
1746
1747 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(target.as_mut_ptr()) };
1748 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
1749
1750 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
1751
1752 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(connection.as_mut_ptr()) };
1753
1754 Ok(())
1755 }
1756 }
1757
1758 unsafe impl<___E>
1759 ::fidl_next::EncodeOption<
1760 ::fidl_next::wire::Box<'static, crate::wire::DirectoryCreateSymlinkRequest<'static>>,
1761 ___E,
1762 > for DirectoryCreateSymlinkRequest
1763 where
1764 ___E: ::fidl_next::Encoder + ?Sized,
1765 DirectoryCreateSymlinkRequest:
1766 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>,
1767 {
1768 #[inline]
1769 fn encode_option(
1770 this: ::core::option::Option<Self>,
1771 encoder: &mut ___E,
1772 out: &mut ::core::mem::MaybeUninit<
1773 ::fidl_next::wire::Box<
1774 'static,
1775 crate::wire::DirectoryCreateSymlinkRequest<'static>,
1776 >,
1777 >,
1778 _: (),
1779 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1780 if let Some(inner) = this {
1781 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1782 ::fidl_next::wire::Box::encode_present(out);
1783 } else {
1784 ::fidl_next::wire::Box::encode_absent(out);
1785 }
1786
1787 Ok(())
1788 }
1789 }
1790
1791 impl<'de> ::fidl_next::FromWire<crate::wire::DirectoryCreateSymlinkRequest<'de>>
1792 for DirectoryCreateSymlinkRequest
1793 {
1794 #[inline]
1795 fn from_wire(wire: crate::wire::DirectoryCreateSymlinkRequest<'de>) -> Self {
1796 Self {
1797 name: ::fidl_next::FromWire::from_wire(wire.name),
1798
1799 target: ::fidl_next::FromWire::from_wire(wire.target),
1800
1801 connection: ::fidl_next::FromWire::from_wire(wire.connection),
1802 }
1803 }
1804 }
1805
1806 #[derive(Debug, PartialEq)]
1807 #[repr(C)]
1808 pub struct FileGetBackingMemoryResponse {
1809 pub vmo: ::fidl_next::fuchsia::zx::Vmo,
1810 }
1811
1812 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
1813 for FileGetBackingMemoryResponse
1814 where
1815 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1816 ___E: ::fidl_next::fuchsia::HandleEncoder,
1817 {
1818 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1819 Self,
1820 crate::wire::FileGetBackingMemoryResponse,
1821 > = unsafe {
1822 ::fidl_next::CopyOptimization::enable_if(
1823 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::Encode<
1824 ::fidl_next::wire::fuchsia::Vmo,
1825 ___E,
1826 >>::COPY_OPTIMIZATION
1827 .is_enabled(),
1828 )
1829 };
1830
1831 #[inline]
1832 fn encode(
1833 self,
1834 encoder_: &mut ___E,
1835 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
1836 _: (),
1837 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1838 ::fidl_next::munge! {
1839 let crate::wire::FileGetBackingMemoryResponse {
1840 vmo,
1841
1842 } = out_;
1843 }
1844
1845 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
1846
1847 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo.as_mut_ptr()) };
1848
1849 Ok(())
1850 }
1851 }
1852
1853 unsafe impl<___E>
1854 ::fidl_next::EncodeOption<
1855 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryResponse>,
1856 ___E,
1857 > for FileGetBackingMemoryResponse
1858 where
1859 ___E: ::fidl_next::Encoder + ?Sized,
1860 FileGetBackingMemoryResponse:
1861 ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>,
1862 {
1863 #[inline]
1864 fn encode_option(
1865 this: ::core::option::Option<Self>,
1866 encoder: &mut ___E,
1867 out: &mut ::core::mem::MaybeUninit<
1868 ::fidl_next::wire::Box<'static, crate::wire::FileGetBackingMemoryResponse>,
1869 >,
1870 _: (),
1871 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1872 if let Some(inner) = this {
1873 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1874 ::fidl_next::wire::Box::encode_present(out);
1875 } else {
1876 ::fidl_next::wire::Box::encode_absent(out);
1877 }
1878
1879 Ok(())
1880 }
1881 }
1882
1883 impl ::fidl_next::FromWire<crate::wire::FileGetBackingMemoryResponse>
1884 for FileGetBackingMemoryResponse
1885 {
1886 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1887 crate::wire::FileGetBackingMemoryResponse,
1888 Self,
1889 > = unsafe {
1890 ::fidl_next::CopyOptimization::enable_if(
1891 true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::FromWire<
1892 ::fidl_next::wire::fuchsia::Vmo,
1893 >>::COPY_OPTIMIZATION
1894 .is_enabled(),
1895 )
1896 };
1897
1898 #[inline]
1899 fn from_wire(wire: crate::wire::FileGetBackingMemoryResponse) -> Self {
1900 Self { vmo: ::fidl_next::FromWire::from_wire(wire.vmo) }
1901 }
1902 }
1903
1904 #[derive(Debug, PartialEq)]
1905 pub struct LinkableLinkIntoRequest {
1906 pub dst_parent_token: ::fidl_next::fuchsia::zx::Event,
1907
1908 pub dst: ::std::string::String,
1909 }
1910
1911 unsafe impl<___E> ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
1912 for LinkableLinkIntoRequest
1913 where
1914 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1915 ___E: ::fidl_next::Encoder,
1916 ___E: ::fidl_next::fuchsia::HandleEncoder,
1917 {
1918 #[inline]
1919 fn encode(
1920 self,
1921 encoder_: &mut ___E,
1922 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
1923 _: (),
1924 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1925 ::fidl_next::munge! {
1926 let crate::wire::LinkableLinkIntoRequest {
1927 dst_parent_token,
1928 dst,
1929
1930 } = out_;
1931 }
1932
1933 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
1934
1935 let mut _field =
1936 unsafe { ::fidl_next::Slot::new_unchecked(dst_parent_token.as_mut_ptr()) };
1937
1938 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
1939
1940 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dst.as_mut_ptr()) };
1941 ::fidl_next::Constrained::validate(_field, 255)?;
1942
1943 Ok(())
1944 }
1945 }
1946
1947 unsafe impl<___E>
1948 ::fidl_next::EncodeOption<
1949 ::fidl_next::wire::Box<'static, crate::wire::LinkableLinkIntoRequest<'static>>,
1950 ___E,
1951 > for LinkableLinkIntoRequest
1952 where
1953 ___E: ::fidl_next::Encoder + ?Sized,
1954 LinkableLinkIntoRequest:
1955 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>,
1956 {
1957 #[inline]
1958 fn encode_option(
1959 this: ::core::option::Option<Self>,
1960 encoder: &mut ___E,
1961 out: &mut ::core::mem::MaybeUninit<
1962 ::fidl_next::wire::Box<'static, crate::wire::LinkableLinkIntoRequest<'static>>,
1963 >,
1964 _: (),
1965 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1966 if let Some(inner) = this {
1967 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1968 ::fidl_next::wire::Box::encode_present(out);
1969 } else {
1970 ::fidl_next::wire::Box::encode_absent(out);
1971 }
1972
1973 Ok(())
1974 }
1975 }
1976
1977 impl<'de> ::fidl_next::FromWire<crate::wire::LinkableLinkIntoRequest<'de>>
1978 for LinkableLinkIntoRequest
1979 {
1980 #[inline]
1981 fn from_wire(wire: crate::wire::LinkableLinkIntoRequest<'de>) -> Self {
1982 Self {
1983 dst_parent_token: ::fidl_next::FromWire::from_wire(wire.dst_parent_token),
1984
1985 dst: ::fidl_next::FromWire::from_wire(wire.dst),
1986 }
1987 }
1988 }
1989
1990 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1991 pub struct FileAllocateRequest {
1992 pub offset: u64,
1993
1994 pub length: u64,
1995
1996 pub mode: crate::natural::AllocateMode,
1997 }
1998
1999 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
2000 for FileAllocateRequest
2001 where
2002 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2003 ___E: ::fidl_next::fuchsia::HandleEncoder,
2004 {
2005 #[inline]
2006 fn encode(
2007 self,
2008 encoder_: &mut ___E,
2009 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
2010 _: (),
2011 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2012 ::fidl_next::munge! {
2013 let crate::wire::FileAllocateRequest {
2014 offset,
2015 length,
2016 mode,
2017
2018 } = out_;
2019 }
2020
2021 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
2022
2023 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
2024
2025 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
2026
2027 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(length.as_mut_ptr()) };
2028
2029 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
2030
2031 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(mode.as_mut_ptr()) };
2032
2033 Ok(())
2034 }
2035 }
2036
2037 unsafe impl<___E>
2038 ::fidl_next::EncodeOption<
2039 ::fidl_next::wire::Box<'static, crate::wire::FileAllocateRequest>,
2040 ___E,
2041 > for FileAllocateRequest
2042 where
2043 ___E: ::fidl_next::Encoder + ?Sized,
2044 FileAllocateRequest: ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>,
2045 {
2046 #[inline]
2047 fn encode_option(
2048 this: ::core::option::Option<Self>,
2049 encoder: &mut ___E,
2050 out: &mut ::core::mem::MaybeUninit<
2051 ::fidl_next::wire::Box<'static, crate::wire::FileAllocateRequest>,
2052 >,
2053 _: (),
2054 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2055 if let Some(inner) = this {
2056 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2057 ::fidl_next::wire::Box::encode_present(out);
2058 } else {
2059 ::fidl_next::wire::Box::encode_absent(out);
2060 }
2061
2062 Ok(())
2063 }
2064 }
2065
2066 impl ::fidl_next::FromWire<crate::wire::FileAllocateRequest> for FileAllocateRequest {
2067 #[inline]
2068 fn from_wire(wire: crate::wire::FileAllocateRequest) -> Self {
2069 Self {
2070 offset: ::fidl_next::FromWire::from_wire(wire.offset),
2071
2072 length: ::fidl_next::FromWire::from_wire(wire.length),
2073
2074 mode: ::fidl_next::FromWire::from_wire(wire.mode),
2075 }
2076 }
2077 }
2078
2079 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2080 pub struct FileEnableVerityRequest {
2081 pub options: crate::natural::VerificationOptions,
2082 }
2083
2084 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
2085 for FileEnableVerityRequest
2086 where
2087 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2088 ___E: ::fidl_next::Encoder,
2089 ___E: ::fidl_next::fuchsia::HandleEncoder,
2090 {
2091 #[inline]
2092 fn encode(
2093 self,
2094 encoder_: &mut ___E,
2095 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
2096 _: (),
2097 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2098 ::fidl_next::munge! {
2099 let crate::wire::FileEnableVerityRequest {
2100 options,
2101
2102 } = out_;
2103 }
2104
2105 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
2106
2107 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(options.as_mut_ptr()) };
2108
2109 Ok(())
2110 }
2111 }
2112
2113 unsafe impl<___E>
2114 ::fidl_next::EncodeOption<
2115 ::fidl_next::wire::Box<'static, crate::wire::FileEnableVerityRequest<'static>>,
2116 ___E,
2117 > for FileEnableVerityRequest
2118 where
2119 ___E: ::fidl_next::Encoder + ?Sized,
2120 FileEnableVerityRequest:
2121 ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>,
2122 {
2123 #[inline]
2124 fn encode_option(
2125 this: ::core::option::Option<Self>,
2126 encoder: &mut ___E,
2127 out: &mut ::core::mem::MaybeUninit<
2128 ::fidl_next::wire::Box<'static, crate::wire::FileEnableVerityRequest<'static>>,
2129 >,
2130 _: (),
2131 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2132 if let Some(inner) = this {
2133 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2134 ::fidl_next::wire::Box::encode_present(out);
2135 } else {
2136 ::fidl_next::wire::Box::encode_absent(out);
2137 }
2138
2139 Ok(())
2140 }
2141 }
2142
2143 impl<'de> ::fidl_next::FromWire<crate::wire::FileEnableVerityRequest<'de>>
2144 for FileEnableVerityRequest
2145 {
2146 #[inline]
2147 fn from_wire(wire: crate::wire::FileEnableVerityRequest<'de>) -> Self {
2148 Self { options: ::fidl_next::FromWire::from_wire(wire.options) }
2149 }
2150 }
2151
2152 #[derive(Debug, PartialEq)]
2153 #[repr(C)]
2154 pub struct FileObject {
2155 pub event: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
2156
2157 pub stream: ::core::option::Option<::fidl_next::fuchsia::zx::Stream>,
2158 }
2159
2160 unsafe impl<___E> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject
2161 where
2162 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2163 ___E: ::fidl_next::fuchsia::HandleEncoder,
2164 {
2165 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, crate::wire::FileObject> = unsafe {
2166 ::fidl_next::CopyOptimization::enable_if(
2167 true
2168
2169 && <
2170 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>
2171 >::COPY_OPTIMIZATION.is_enabled()
2172
2173 && <
2174 ::core::option::Option<::fidl_next::fuchsia::zx::Stream> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalStream, ___E>
2175 >::COPY_OPTIMIZATION.is_enabled()
2176
2177 )
2178 };
2179
2180 #[inline]
2181 fn encode(
2182 self,
2183 encoder_: &mut ___E,
2184 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
2185 _: (),
2186 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2187 ::fidl_next::munge! {
2188 let crate::wire::FileObject {
2189 event,
2190 stream,
2191
2192 } = out_;
2193 }
2194
2195 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
2196
2197 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(event.as_mut_ptr()) };
2198
2199 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
2200
2201 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(stream.as_mut_ptr()) };
2202
2203 Ok(())
2204 }
2205 }
2206
2207 unsafe impl<___E>
2208 ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::FileObject>, ___E>
2209 for FileObject
2210 where
2211 ___E: ::fidl_next::Encoder + ?Sized,
2212 FileObject: ::fidl_next::Encode<crate::wire::FileObject, ___E>,
2213 {
2214 #[inline]
2215 fn encode_option(
2216 this: ::core::option::Option<Self>,
2217 encoder: &mut ___E,
2218 out: &mut ::core::mem::MaybeUninit<
2219 ::fidl_next::wire::Box<'static, crate::wire::FileObject>,
2220 >,
2221 _: (),
2222 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2223 if let Some(inner) = this {
2224 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2225 ::fidl_next::wire::Box::encode_present(out);
2226 } else {
2227 ::fidl_next::wire::Box::encode_absent(out);
2228 }
2229
2230 Ok(())
2231 }
2232 }
2233
2234 impl ::fidl_next::FromWire<crate::wire::FileObject> for FileObject {
2235 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<crate::wire::FileObject, Self> = unsafe {
2236 ::fidl_next::CopyOptimization::enable_if(
2237 true
2238
2239 && <
2240 ::core::option::Option<::fidl_next::fuchsia::zx::Event> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalEvent>
2241 >::COPY_OPTIMIZATION.is_enabled()
2242
2243 && <
2244 ::core::option::Option<::fidl_next::fuchsia::zx::Stream> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalStream>
2245 >::COPY_OPTIMIZATION.is_enabled()
2246
2247 )
2248 };
2249
2250 #[inline]
2251 fn from_wire(wire: crate::wire::FileObject) -> Self {
2252 Self {
2253 event: ::fidl_next::FromWire::from_wire(wire.event),
2254
2255 stream: ::fidl_next::FromWire::from_wire(wire.stream),
2256 }
2257 }
2258 }
2259
2260 #[derive(Debug, PartialEq)]
2261 pub enum NodeInfoDeprecated {
2262 Service(crate::natural::Service),
2263
2264 File(crate::natural::FileObject),
2265
2266 Directory(crate::natural::DirectoryObject),
2267
2268 Symlink(crate::natural::SymlinkObject),
2269 }
2270
2271 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeInfoDeprecated<'static>, ___E>
2272 for NodeInfoDeprecated
2273 where
2274 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2275 ___E: ::fidl_next::Encoder,
2276 ___E: ::fidl_next::fuchsia::HandleEncoder,
2277 {
2278 #[inline]
2279 fn encode(
2280 self,
2281 encoder: &mut ___E,
2282 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeInfoDeprecated<'static>>,
2283 _: (),
2284 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2285 ::fidl_next::munge!(let crate::wire::NodeInfoDeprecated { raw, _phantom: _ } = out);
2286
2287 match self {
2288 Self::Service(value) => ::fidl_next::wire::Union::encode_as::<
2289 ___E,
2290 crate::wire::Service,
2291 >(value, 1, encoder, raw, ())?,
2292
2293 Self::File(value) => ::fidl_next::wire::Union::encode_as::<
2294 ___E,
2295 crate::wire::FileObject,
2296 >(value, 2, encoder, raw, ())?,
2297
2298 Self::Directory(value) => ::fidl_next::wire::Union::encode_as::<
2299 ___E,
2300 crate::wire::DirectoryObject,
2301 >(value, 3, encoder, raw, ())?,
2302
2303 Self::Symlink(value) => ::fidl_next::wire::Union::encode_as::<
2304 ___E,
2305 crate::wire::SymlinkObject<'static>,
2306 >(value, 4, encoder, raw, ())?,
2307 }
2308
2309 Ok(())
2310 }
2311 }
2312
2313 unsafe impl<___E>
2314 ::fidl_next::EncodeOption<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>
2315 for NodeInfoDeprecated
2316 where
2317 ___E: ?Sized,
2318 NodeInfoDeprecated: ::fidl_next::Encode<crate::wire::NodeInfoDeprecated<'static>, ___E>,
2319 {
2320 #[inline]
2321 fn encode_option(
2322 this: ::core::option::Option<Self>,
2323 encoder: &mut ___E,
2324 out: &mut ::core::mem::MaybeUninit<crate::wire_optional::NodeInfoDeprecated<'static>>,
2325 _: (),
2326 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2327 ::fidl_next::munge!(let crate::wire_optional::NodeInfoDeprecated { raw, _phantom: _ } = &mut *out);
2328
2329 if let Some(inner) = this {
2330 let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
2331 ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
2332 } else {
2333 ::fidl_next::wire::Union::encode_absent(raw);
2334 }
2335
2336 Ok(())
2337 }
2338 }
2339
2340 impl<'de> ::fidl_next::FromWire<crate::wire::NodeInfoDeprecated<'de>> for NodeInfoDeprecated {
2341 #[inline]
2342 fn from_wire(wire: crate::wire::NodeInfoDeprecated<'de>) -> Self {
2343 let wire = ::core::mem::ManuallyDrop::new(wire);
2344 match wire.raw.ordinal() {
2345 1 => Self::Service(::fidl_next::FromWire::from_wire(unsafe {
2346 wire.raw.get().read_unchecked::<crate::wire::Service>()
2347 })),
2348
2349 2 => Self::File(::fidl_next::FromWire::from_wire(unsafe {
2350 wire.raw.get().read_unchecked::<crate::wire::FileObject>()
2351 })),
2352
2353 3 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
2354 wire.raw.get().read_unchecked::<crate::wire::DirectoryObject>()
2355 })),
2356
2357 4 => Self::Symlink(::fidl_next::FromWire::from_wire(unsafe {
2358 wire.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
2359 })),
2360
2361 _ => unsafe { ::core::hint::unreachable_unchecked() },
2362 }
2363 }
2364 }
2365
2366 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::NodeInfoDeprecated<'de>>
2367 for NodeInfoDeprecated
2368 {
2369 #[inline]
2370 fn from_wire_option(
2371 wire: crate::wire_optional::NodeInfoDeprecated<'de>,
2372 ) -> ::core::option::Option<Self> {
2373 if let Some(inner) = wire.into_option() {
2374 Some(::fidl_next::FromWire::from_wire(inner))
2375 } else {
2376 None
2377 }
2378 }
2379 }
2380
2381 impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::NodeInfoDeprecated<'de>>
2382 for Box<NodeInfoDeprecated>
2383 {
2384 #[inline]
2385 fn from_wire_option(
2386 wire: crate::wire_optional::NodeInfoDeprecated<'de>,
2387 ) -> ::core::option::Option<Self> {
2388 <NodeInfoDeprecated as ::fidl_next::FromWireOption<
2389 crate::wire_optional::NodeInfoDeprecated<'de>,
2390 >>::from_wire_option(wire)
2391 .map(Box::new)
2392 }
2393 }
2394}
2395
2396pub mod wire {
2397
2398 pub use fidl_next_common_fuchsia_io::wire::*;
2399
2400 #[repr(C)]
2402 pub struct ConnectionInfo<'de> {
2403 pub(crate) table: ::fidl_next::wire::Table<'de>,
2404 }
2405
2406 impl<'de> Drop for ConnectionInfo<'de> {
2407 fn drop(&mut self) {
2408 let _ = self
2409 .table
2410 .get(1)
2411 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Operations>() });
2412 }
2413 }
2414
2415 impl ::fidl_next::Constrained for ConnectionInfo<'_> {
2416 type Constraint = ();
2417
2418 fn validate(
2419 _: ::fidl_next::Slot<'_, Self>,
2420 _: Self::Constraint,
2421 ) -> Result<(), ::fidl_next::ValidationError> {
2422 Ok(())
2423 }
2424 }
2425
2426 unsafe impl ::fidl_next::Wire for ConnectionInfo<'static> {
2427 type Narrowed<'de> = ConnectionInfo<'de>;
2428
2429 #[inline]
2430 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2431 ::fidl_next::munge!(let Self { table } = out);
2432 ::fidl_next::wire::Table::zero_padding(table);
2433 }
2434 }
2435
2436 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ConnectionInfo<'de>
2437 where
2438 ___D: ::fidl_next::Decoder<'de> + ?Sized,
2439 ___D: ::fidl_next::fuchsia::HandleDecoder,
2440 {
2441 fn decode(
2442 slot: ::fidl_next::Slot<'_, Self>,
2443 decoder: &mut ___D,
2444 _: (),
2445 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2446 ::fidl_next::munge!(let Self { table } = slot);
2447
2448 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2449 match ordinal {
2450 0 => unsafe { ::core::hint::unreachable_unchecked() },
2451
2452 1 => {
2453 ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Operations>(
2454 slot.as_mut(),
2455 decoder,
2456 (),
2457 )?;
2458
2459 Ok(())
2460 }
2461
2462 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2463 }
2464 })
2465 }
2466 }
2467
2468 impl<'de> ConnectionInfo<'de> {
2469 pub fn rights(&self) -> ::core::option::Option<&crate::wire::Operations> {
2470 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2471 }
2472
2473 pub fn take_rights(&mut self) -> ::core::option::Option<crate::wire::Operations> {
2474 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2475 }
2476 }
2477
2478 impl<'de> ::core::fmt::Debug for ConnectionInfo<'de> {
2479 fn fmt(
2480 &self,
2481 f: &mut ::core::fmt::Formatter<'_>,
2482 ) -> ::core::result::Result<(), ::core::fmt::Error> {
2483 f.debug_struct("ConnectionInfo").field("rights", &self.rights()).finish()
2484 }
2485 }
2486
2487 impl<'de> ::fidl_next::IntoNatural for ConnectionInfo<'de> {
2488 type Natural = crate::natural::ConnectionInfo;
2489 }
2490
2491 #[derive(Debug)]
2493 #[repr(C)]
2494 pub struct DirectoryLinkRequest<'de> {
2495 pub src: ::fidl_next::wire::String<'de>,
2496
2497 pub dst_parent_token: ::fidl_next::wire::fuchsia::NullableHandle,
2498
2499 pub dst: ::fidl_next::wire::String<'de>,
2500 }
2501
2502 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryLinkRequest<'_>>(), 40);
2503 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryLinkRequest<'_>>(), 8);
2504
2505 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, src), 0);
2506
2507 static_assertions::const_assert_eq!(
2508 std::mem::offset_of!(DirectoryLinkRequest<'_>, dst_parent_token),
2509 16
2510 );
2511
2512 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryLinkRequest<'_>, dst), 24);
2513
2514 impl ::fidl_next::Constrained for DirectoryLinkRequest<'_> {
2515 type Constraint = ();
2516
2517 fn validate(
2518 _: ::fidl_next::Slot<'_, Self>,
2519 _: Self::Constraint,
2520 ) -> Result<(), ::fidl_next::ValidationError> {
2521 Ok(())
2522 }
2523 }
2524
2525 unsafe impl ::fidl_next::Wire for DirectoryLinkRequest<'static> {
2526 type Narrowed<'de> = DirectoryLinkRequest<'de>;
2527
2528 #[inline]
2529 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2530 ::fidl_next::munge! {
2531 let Self {
2532 src,
2533 dst_parent_token,
2534 dst,
2535
2536 } = &mut *out_;
2537 }
2538
2539 ::fidl_next::Wire::zero_padding(src);
2540
2541 ::fidl_next::Wire::zero_padding(dst_parent_token);
2542
2543 ::fidl_next::Wire::zero_padding(dst);
2544
2545 unsafe {
2546 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2547 }
2548 }
2549 }
2550
2551 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryLinkRequest<'de>
2552 where
2553 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2554 ___D: ::fidl_next::Decoder<'de>,
2555 ___D: ::fidl_next::fuchsia::HandleDecoder,
2556 {
2557 fn decode(
2558 slot_: ::fidl_next::Slot<'_, Self>,
2559 decoder_: &mut ___D,
2560 _: (),
2561 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2562 if slot_.as_bytes()[20..24] != [0u8; 4] {
2563 return Err(::fidl_next::DecodeError::InvalidPadding);
2564 }
2565
2566 ::fidl_next::munge! {
2567 let Self {
2568 mut src,
2569 mut dst_parent_token,
2570 mut dst,
2571
2572 } = slot_;
2573 }
2574
2575 let _field = src.as_mut();
2576 ::fidl_next::Constrained::validate(_field, 255)?;
2577 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2578
2579 let src = unsafe { src.deref_unchecked() };
2580
2581 if src.len() > 255 {
2582 return Err(::fidl_next::DecodeError::VectorTooLong {
2583 size: src.len() as u64,
2584 limit: 255,
2585 });
2586 }
2587
2588 let _field = dst_parent_token.as_mut();
2589
2590 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2591
2592 let _field = dst.as_mut();
2593 ::fidl_next::Constrained::validate(_field, 255)?;
2594 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2595
2596 let dst = unsafe { dst.deref_unchecked() };
2597
2598 if dst.len() > 255 {
2599 return Err(::fidl_next::DecodeError::VectorTooLong {
2600 size: dst.len() as u64,
2601 limit: 255,
2602 });
2603 }
2604
2605 Ok(())
2606 }
2607 }
2608
2609 impl<'de> ::fidl_next::IntoNatural for DirectoryLinkRequest<'de> {
2610 type Natural = crate::natural::DirectoryLinkRequest;
2611 }
2612
2613 pub type Token = ::fidl_next::wire::fuchsia::Event;
2615
2616 #[derive(Debug)]
2618 #[repr(C)]
2619 pub struct DirectoryRenameRequest<'de> {
2620 pub src: ::fidl_next::wire::String<'de>,
2621
2622 pub dst_parent_token: ::fidl_next::wire::fuchsia::Event,
2623
2624 pub dst: ::fidl_next::wire::String<'de>,
2625 }
2626
2627 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryRenameRequest<'_>>(), 40);
2628 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryRenameRequest<'_>>(), 8);
2629
2630 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, src), 0);
2631
2632 static_assertions::const_assert_eq!(
2633 std::mem::offset_of!(DirectoryRenameRequest<'_>, dst_parent_token),
2634 16
2635 );
2636
2637 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryRenameRequest<'_>, dst), 24);
2638
2639 impl ::fidl_next::Constrained for DirectoryRenameRequest<'_> {
2640 type Constraint = ();
2641
2642 fn validate(
2643 _: ::fidl_next::Slot<'_, Self>,
2644 _: Self::Constraint,
2645 ) -> Result<(), ::fidl_next::ValidationError> {
2646 Ok(())
2647 }
2648 }
2649
2650 unsafe impl ::fidl_next::Wire for DirectoryRenameRequest<'static> {
2651 type Narrowed<'de> = DirectoryRenameRequest<'de>;
2652
2653 #[inline]
2654 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2655 ::fidl_next::munge! {
2656 let Self {
2657 src,
2658 dst_parent_token,
2659 dst,
2660
2661 } = &mut *out_;
2662 }
2663
2664 ::fidl_next::Wire::zero_padding(src);
2665
2666 ::fidl_next::Wire::zero_padding(dst_parent_token);
2667
2668 ::fidl_next::Wire::zero_padding(dst);
2669
2670 unsafe {
2671 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
2672 }
2673 }
2674 }
2675
2676 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryRenameRequest<'de>
2677 where
2678 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2679 ___D: ::fidl_next::Decoder<'de>,
2680 ___D: ::fidl_next::fuchsia::HandleDecoder,
2681 {
2682 fn decode(
2683 slot_: ::fidl_next::Slot<'_, Self>,
2684 decoder_: &mut ___D,
2685 _: (),
2686 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2687 if slot_.as_bytes()[20..24] != [0u8; 4] {
2688 return Err(::fidl_next::DecodeError::InvalidPadding);
2689 }
2690
2691 ::fidl_next::munge! {
2692 let Self {
2693 mut src,
2694 mut dst_parent_token,
2695 mut dst,
2696
2697 } = slot_;
2698 }
2699
2700 let _field = src.as_mut();
2701 ::fidl_next::Constrained::validate(_field, 255)?;
2702 ::fidl_next::Decode::decode(src.as_mut(), decoder_, 255)?;
2703
2704 let src = unsafe { src.deref_unchecked() };
2705
2706 if src.len() > 255 {
2707 return Err(::fidl_next::DecodeError::VectorTooLong {
2708 size: src.len() as u64,
2709 limit: 255,
2710 });
2711 }
2712
2713 let _field = dst_parent_token.as_mut();
2714
2715 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
2716
2717 let _field = dst.as_mut();
2718 ::fidl_next::Constrained::validate(_field, 255)?;
2719 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
2720
2721 let dst = unsafe { dst.deref_unchecked() };
2722
2723 if dst.len() > 255 {
2724 return Err(::fidl_next::DecodeError::VectorTooLong {
2725 size: dst.len() as u64,
2726 limit: 255,
2727 });
2728 }
2729
2730 Ok(())
2731 }
2732 }
2733
2734 impl<'de> ::fidl_next::IntoNatural for DirectoryRenameRequest<'de> {
2735 type Natural = crate::natural::DirectoryRenameRequest;
2736 }
2737
2738 #[derive(Debug)]
2740 #[repr(C)]
2741 pub struct DirectoryWatchRequest {
2742 pub mask: crate::wire::WatchMask,
2743
2744 pub options: ::fidl_next::wire::Uint32,
2745
2746 pub watcher:
2747 ::fidl_next::ServerEnd<crate::DirectoryWatcher, ::fidl_next::wire::fuchsia::Channel>,
2748 }
2749
2750 static_assertions::const_assert_eq!(std::mem::size_of::<DirectoryWatchRequest>(), 12);
2751 static_assertions::const_assert_eq!(std::mem::align_of::<DirectoryWatchRequest>(), 4);
2752
2753 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, mask), 0);
2754
2755 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, options), 4);
2756
2757 static_assertions::const_assert_eq!(std::mem::offset_of!(DirectoryWatchRequest, watcher), 8);
2758
2759 impl ::fidl_next::Constrained for DirectoryWatchRequest {
2760 type Constraint = ();
2761
2762 fn validate(
2763 _: ::fidl_next::Slot<'_, Self>,
2764 _: Self::Constraint,
2765 ) -> Result<(), ::fidl_next::ValidationError> {
2766 Ok(())
2767 }
2768 }
2769
2770 unsafe impl ::fidl_next::Wire for DirectoryWatchRequest {
2771 type Narrowed<'de> = DirectoryWatchRequest;
2772
2773 #[inline]
2774 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2775 ::fidl_next::munge! {
2776 let Self {
2777 mask,
2778 options,
2779 watcher,
2780
2781 } = &mut *out_;
2782 }
2783
2784 ::fidl_next::Wire::zero_padding(mask);
2785
2786 ::fidl_next::Wire::zero_padding(options);
2787
2788 ::fidl_next::Wire::zero_padding(watcher);
2789 }
2790 }
2791
2792 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryWatchRequest
2793 where
2794 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2795 ___D: ::fidl_next::fuchsia::HandleDecoder,
2796 {
2797 fn decode(
2798 slot_: ::fidl_next::Slot<'_, Self>,
2799 decoder_: &mut ___D,
2800 _: (),
2801 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2802 ::fidl_next::munge! {
2803 let Self {
2804 mut mask,
2805 mut options,
2806 mut watcher,
2807
2808 } = slot_;
2809 }
2810
2811 let _field = mask.as_mut();
2812
2813 ::fidl_next::Decode::decode(mask.as_mut(), decoder_, ())?;
2814
2815 let _field = options.as_mut();
2816
2817 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
2818
2819 let _field = watcher.as_mut();
2820
2821 ::fidl_next::Decode::decode(watcher.as_mut(), decoder_, ())?;
2822
2823 Ok(())
2824 }
2825 }
2826
2827 impl ::fidl_next::IntoNatural for DirectoryWatchRequest {
2828 type Natural = crate::natural::DirectoryWatchRequest;
2829 }
2830
2831 #[derive(Debug)]
2833 #[repr(C)]
2834 pub struct NodeListExtendedAttributesRequest {
2835 pub iterator: ::fidl_next::ServerEnd<
2836 crate::ExtendedAttributeIterator,
2837 ::fidl_next::wire::fuchsia::Channel,
2838 >,
2839 }
2840
2841 static_assertions::const_assert_eq!(
2842 std::mem::size_of::<NodeListExtendedAttributesRequest>(),
2843 4
2844 );
2845 static_assertions::const_assert_eq!(
2846 std::mem::align_of::<NodeListExtendedAttributesRequest>(),
2847 4
2848 );
2849
2850 static_assertions::const_assert_eq!(
2851 std::mem::offset_of!(NodeListExtendedAttributesRequest, iterator),
2852 0
2853 );
2854
2855 impl ::fidl_next::Constrained for NodeListExtendedAttributesRequest {
2856 type Constraint = ();
2857
2858 fn validate(
2859 _: ::fidl_next::Slot<'_, Self>,
2860 _: Self::Constraint,
2861 ) -> Result<(), ::fidl_next::ValidationError> {
2862 Ok(())
2863 }
2864 }
2865
2866 unsafe impl ::fidl_next::Wire for NodeListExtendedAttributesRequest {
2867 type Narrowed<'de> = NodeListExtendedAttributesRequest;
2868
2869 #[inline]
2870 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2871 ::fidl_next::munge! {
2872 let Self {
2873 iterator,
2874
2875 } = &mut *out_;
2876 }
2877
2878 ::fidl_next::Wire::zero_padding(iterator);
2879 }
2880 }
2881
2882 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeListExtendedAttributesRequest
2883 where
2884 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2885 ___D: ::fidl_next::fuchsia::HandleDecoder,
2886 {
2887 fn decode(
2888 slot_: ::fidl_next::Slot<'_, Self>,
2889 decoder_: &mut ___D,
2890 _: (),
2891 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2892 ::fidl_next::munge! {
2893 let Self {
2894 mut iterator,
2895
2896 } = slot_;
2897 }
2898
2899 let _field = iterator.as_mut();
2900
2901 ::fidl_next::Decode::decode(iterator.as_mut(), decoder_, ())?;
2902
2903 Ok(())
2904 }
2905 }
2906
2907 impl ::fidl_next::IntoNatural for NodeListExtendedAttributesRequest {
2908 type Natural = crate::natural::NodeListExtendedAttributesRequest;
2909 }
2910
2911 #[repr(transparent)]
2913 pub struct ExtendedAttributeValue<'de> {
2914 pub(crate) raw: ::fidl_next::wire::Union,
2915 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2916 }
2917
2918 impl<'de> Drop for ExtendedAttributeValue<'de> {
2919 fn drop(&mut self) {
2920 match self.raw.ordinal() {
2921 1 => {
2922 let _ = unsafe {
2923 self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2924 };
2925 }
2926
2927 2 => {
2928 let _ = unsafe {
2929 self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2930 };
2931 }
2932
2933 _ => (),
2934 }
2935 }
2936 }
2937
2938 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
2939 type Constraint = ();
2940
2941 fn validate(
2942 _: ::fidl_next::Slot<'_, Self>,
2943 _: Self::Constraint,
2944 ) -> Result<(), ::fidl_next::ValidationError> {
2945 Ok(())
2946 }
2947 }
2948
2949 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
2950 type Narrowed<'de> = ExtendedAttributeValue<'de>;
2951
2952 #[inline]
2953 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2954 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2955 ::fidl_next::wire::Union::zero_padding(raw);
2956 }
2957 }
2958
2959 pub mod extended_attribute_value {
2960 pub enum Ref<'de> {
2961 Bytes(&'de ::fidl_next::wire::Vector<'de, u8>),
2962
2963 Buffer(&'de ::fidl_next::wire::fuchsia::Vmo),
2964
2965 UnknownOrdinal_(u64),
2966 }
2967
2968 pub enum Value<'de> {
2969 Bytes(::fidl_next::wire::Vector<'de, u8>),
2970
2971 Buffer(::fidl_next::wire::fuchsia::Vmo),
2972
2973 UnknownOrdinal_(u64),
2974 }
2975 }
2976
2977 impl<'de> ExtendedAttributeValue<'de> {
2978 pub fn as_ref(&self) -> crate::wire::extended_attribute_value::Ref<'_> {
2979 match self.raw.ordinal() {
2980 1 => crate::wire::extended_attribute_value::Ref::Bytes(unsafe {
2981 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
2982 }),
2983
2984 2 => crate::wire::extended_attribute_value::Ref::Buffer(unsafe {
2985 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2986 }),
2987
2988 unknown => crate::wire::extended_attribute_value::Ref::UnknownOrdinal_(unknown),
2989 }
2990 }
2991
2992 pub fn into_inner(self) -> crate::wire::extended_attribute_value::Value<'de> {
2993 let this = ::core::mem::ManuallyDrop::new(self);
2994
2995 match this.raw.ordinal() {
2996 1 => crate::wire::extended_attribute_value::Value::Bytes(unsafe {
2997 this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2998 }),
2999
3000 2 => crate::wire::extended_attribute_value::Value::Buffer(unsafe {
3001 this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
3002 }),
3003
3004 unknown => crate::wire::extended_attribute_value::Value::UnknownOrdinal_(unknown),
3005 }
3006 }
3007 }
3008
3009 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
3010 where
3011 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3012 ___D: ::fidl_next::Decoder<'de>,
3013 ___D: ::fidl_next::fuchsia::HandleDecoder,
3014 {
3015 fn decode(
3016 mut slot: ::fidl_next::Slot<'_, Self>,
3017 decoder: &mut ___D,
3018 _: (),
3019 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3020 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3021 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3022 1 => {
3023 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3024 raw,
3025 decoder,
3026 (32768, ()),
3027 )?
3028 }
3029
3030 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Vmo>(
3031 raw,
3032 decoder,
3033 (),
3034 )?,
3035
3036 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3037 }
3038
3039 Ok(())
3040 }
3041 }
3042
3043 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
3044 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3045 match self.raw.ordinal() {
3046 1 => unsafe {
3047 self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
3048 },
3049 2 => unsafe {
3050 self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>().fmt(f)
3051 },
3052 _ => unsafe { ::core::hint::unreachable_unchecked() },
3053 }
3054 }
3055 }
3056
3057 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
3058 type Natural = crate::natural::ExtendedAttributeValue;
3059 }
3060
3061 #[derive(Debug)]
3063 #[repr(C)]
3064 pub struct NodeSetExtendedAttributeRequest<'de> {
3065 pub name: ::fidl_next::wire::Vector<'de, u8>,
3066
3067 pub value: crate::wire::ExtendedAttributeValue<'de>,
3068
3069 pub mode: crate::wire::SetExtendedAttributeMode,
3070 }
3071
3072 static_assertions::const_assert_eq!(
3073 std::mem::size_of::<NodeSetExtendedAttributeRequest<'_>>(),
3074 40
3075 );
3076 static_assertions::const_assert_eq!(
3077 std::mem::align_of::<NodeSetExtendedAttributeRequest<'_>>(),
3078 8
3079 );
3080
3081 static_assertions::const_assert_eq!(
3082 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, name),
3083 0
3084 );
3085
3086 static_assertions::const_assert_eq!(
3087 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, value),
3088 16
3089 );
3090
3091 static_assertions::const_assert_eq!(
3092 std::mem::offset_of!(NodeSetExtendedAttributeRequest<'_>, mode),
3093 32
3094 );
3095
3096 impl ::fidl_next::Constrained for NodeSetExtendedAttributeRequest<'_> {
3097 type Constraint = ();
3098
3099 fn validate(
3100 _: ::fidl_next::Slot<'_, Self>,
3101 _: Self::Constraint,
3102 ) -> Result<(), ::fidl_next::ValidationError> {
3103 Ok(())
3104 }
3105 }
3106
3107 unsafe impl ::fidl_next::Wire for NodeSetExtendedAttributeRequest<'static> {
3108 type Narrowed<'de> = NodeSetExtendedAttributeRequest<'de>;
3109
3110 #[inline]
3111 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3112 ::fidl_next::munge! {
3113 let Self {
3114 name,
3115 value,
3116 mode,
3117
3118 } = &mut *out_;
3119 }
3120
3121 ::fidl_next::Wire::zero_padding(name);
3122
3123 ::fidl_next::Wire::zero_padding(value);
3124
3125 ::fidl_next::Wire::zero_padding(mode);
3126
3127 unsafe {
3128 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
3129 }
3130 }
3131 }
3132
3133 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetExtendedAttributeRequest<'de>
3134 where
3135 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3136 ___D: ::fidl_next::Decoder<'de>,
3137 ___D: ::fidl_next::fuchsia::HandleDecoder,
3138 {
3139 fn decode(
3140 slot_: ::fidl_next::Slot<'_, Self>,
3141 decoder_: &mut ___D,
3142 _: (),
3143 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3144 if slot_.as_bytes()[36..40] != [0u8; 4] {
3145 return Err(::fidl_next::DecodeError::InvalidPadding);
3146 }
3147
3148 ::fidl_next::munge! {
3149 let Self {
3150 mut name,
3151 mut value,
3152 mut mode,
3153
3154 } = slot_;
3155 }
3156
3157 let _field = name.as_mut();
3158 ::fidl_next::Constrained::validate(_field, (255, ()))?;
3159 ::fidl_next::Decode::decode(name.as_mut(), decoder_, (255, ()))?;
3160
3161 let name = unsafe { name.deref_unchecked() };
3162
3163 if name.len() > 255 {
3164 return Err(::fidl_next::DecodeError::VectorTooLong {
3165 size: name.len() as u64,
3166 limit: 255,
3167 });
3168 }
3169
3170 let _field = value.as_mut();
3171
3172 ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
3173
3174 let _field = mode.as_mut();
3175
3176 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
3177
3178 Ok(())
3179 }
3180 }
3181
3182 impl<'de> ::fidl_next::IntoNatural for NodeSetExtendedAttributeRequest<'de> {
3183 type Natural = crate::natural::NodeSetExtendedAttributeRequest;
3184 }
3185
3186 #[derive(Debug)]
3188 #[repr(C)]
3189 pub struct NodeGetTokenResponse {
3190 pub token: ::fidl_next::wire::fuchsia::Event,
3191 }
3192
3193 static_assertions::const_assert_eq!(std::mem::size_of::<NodeGetTokenResponse>(), 4);
3194 static_assertions::const_assert_eq!(std::mem::align_of::<NodeGetTokenResponse>(), 4);
3195
3196 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeGetTokenResponse, token), 0);
3197
3198 impl ::fidl_next::Constrained for NodeGetTokenResponse {
3199 type Constraint = ();
3200
3201 fn validate(
3202 _: ::fidl_next::Slot<'_, Self>,
3203 _: Self::Constraint,
3204 ) -> Result<(), ::fidl_next::ValidationError> {
3205 Ok(())
3206 }
3207 }
3208
3209 unsafe impl ::fidl_next::Wire for NodeGetTokenResponse {
3210 type Narrowed<'de> = NodeGetTokenResponse;
3211
3212 #[inline]
3213 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3214 ::fidl_next::munge! {
3215 let Self {
3216 token,
3217
3218 } = &mut *out_;
3219 }
3220
3221 ::fidl_next::Wire::zero_padding(token);
3222 }
3223 }
3224
3225 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeGetTokenResponse
3226 where
3227 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3228 ___D: ::fidl_next::fuchsia::HandleDecoder,
3229 {
3230 fn decode(
3231 slot_: ::fidl_next::Slot<'_, Self>,
3232 decoder_: &mut ___D,
3233 _: (),
3234 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3235 ::fidl_next::munge! {
3236 let Self {
3237 mut token,
3238
3239 } = slot_;
3240 }
3241
3242 let _field = token.as_mut();
3243
3244 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3245
3246 Ok(())
3247 }
3248 }
3249
3250 impl ::fidl_next::IntoNatural for NodeGetTokenResponse {
3251 type Natural = crate::natural::NodeGetTokenResponse;
3252 }
3253
3254 #[derive(Debug)]
3256 #[repr(C)]
3257 pub struct DirectoryDeprecatedGetTokenResponse {
3258 pub s: ::fidl_next::wire::fuchsia::StatusResult,
3259
3260 pub token: ::fidl_next::wire::fuchsia::OptionalNullableHandle,
3261 }
3262
3263 static_assertions::const_assert_eq!(
3264 std::mem::size_of::<DirectoryDeprecatedGetTokenResponse>(),
3265 8
3266 );
3267 static_assertions::const_assert_eq!(
3268 std::mem::align_of::<DirectoryDeprecatedGetTokenResponse>(),
3269 4
3270 );
3271
3272 static_assertions::const_assert_eq!(
3273 std::mem::offset_of!(DirectoryDeprecatedGetTokenResponse, s),
3274 0
3275 );
3276
3277 static_assertions::const_assert_eq!(
3278 std::mem::offset_of!(DirectoryDeprecatedGetTokenResponse, token),
3279 4
3280 );
3281
3282 impl ::fidl_next::Constrained for DirectoryDeprecatedGetTokenResponse {
3283 type Constraint = ();
3284
3285 fn validate(
3286 _: ::fidl_next::Slot<'_, Self>,
3287 _: Self::Constraint,
3288 ) -> Result<(), ::fidl_next::ValidationError> {
3289 Ok(())
3290 }
3291 }
3292
3293 unsafe impl ::fidl_next::Wire for DirectoryDeprecatedGetTokenResponse {
3294 type Narrowed<'de> = DirectoryDeprecatedGetTokenResponse;
3295
3296 #[inline]
3297 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3298 ::fidl_next::munge! {
3299 let Self {
3300 s,
3301 token,
3302
3303 } = &mut *out_;
3304 }
3305
3306 ::fidl_next::Wire::zero_padding(s);
3307
3308 ::fidl_next::Wire::zero_padding(token);
3309 }
3310 }
3311
3312 unsafe impl<___D> ::fidl_next::Decode<___D> for DirectoryDeprecatedGetTokenResponse
3313 where
3314 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3315 ___D: ::fidl_next::fuchsia::HandleDecoder,
3316 {
3317 fn decode(
3318 slot_: ::fidl_next::Slot<'_, Self>,
3319 decoder_: &mut ___D,
3320 _: (),
3321 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3322 ::fidl_next::munge! {
3323 let Self {
3324 mut s,
3325 mut token,
3326
3327 } = slot_;
3328 }
3329
3330 let _field = s.as_mut();
3331
3332 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
3333
3334 let _field = token.as_mut();
3335
3336 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
3337
3338 Ok(())
3339 }
3340 }
3341
3342 impl ::fidl_next::IntoNatural for DirectoryDeprecatedGetTokenResponse {
3343 type Natural = crate::natural::DirectoryDeprecatedGetTokenResponse;
3344 }
3345
3346 #[repr(C)]
3348 pub struct FileInfo<'de> {
3349 pub(crate) table: ::fidl_next::wire::Table<'de>,
3350 }
3351
3352 impl<'de> Drop for FileInfo<'de> {
3353 fn drop(&mut self) {
3354 let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3355
3356 let _ = self.table.get(2).map(|envelope| unsafe {
3357 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
3358 });
3359
3360 let _ = self.table.get(3).map(|envelope| unsafe {
3361 envelope.read_unchecked::<::fidl_next::wire::fuchsia::Stream>()
3362 });
3363
3364 let _ = self.table.get(4).map(|envelope| unsafe {
3365 envelope.read_unchecked::<crate::wire::NodeAttributes2<'de>>()
3366 });
3367 }
3368 }
3369
3370 impl ::fidl_next::Constrained for FileInfo<'_> {
3371 type Constraint = ();
3372
3373 fn validate(
3374 _: ::fidl_next::Slot<'_, Self>,
3375 _: Self::Constraint,
3376 ) -> Result<(), ::fidl_next::ValidationError> {
3377 Ok(())
3378 }
3379 }
3380
3381 unsafe impl ::fidl_next::Wire for FileInfo<'static> {
3382 type Narrowed<'de> = FileInfo<'de>;
3383
3384 #[inline]
3385 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3386 ::fidl_next::munge!(let Self { table } = out);
3387 ::fidl_next::wire::Table::zero_padding(table);
3388 }
3389 }
3390
3391 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileInfo<'de>
3392 where
3393 ___D: ::fidl_next::Decoder<'de> + ?Sized,
3394 ___D: ::fidl_next::fuchsia::HandleDecoder,
3395 {
3396 fn decode(
3397 slot: ::fidl_next::Slot<'_, Self>,
3398 decoder: &mut ___D,
3399 _: (),
3400 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3401 ::fidl_next::munge!(let Self { table } = slot);
3402
3403 ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3404 match ordinal {
3405 0 => unsafe { ::core::hint::unreachable_unchecked() },
3406
3407 1 => {
3408 ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3409 slot.as_mut(),
3410 decoder,
3411 (),
3412 )?;
3413
3414 Ok(())
3415 }
3416
3417 2 => {
3418 ::fidl_next::wire::Envelope::decode_as::<
3419 ___D,
3420 ::fidl_next::wire::fuchsia::Event,
3421 >(slot.as_mut(), decoder, ())?;
3422
3423 Ok(())
3424 }
3425
3426 3 => {
3427 ::fidl_next::wire::Envelope::decode_as::<
3428 ___D,
3429 ::fidl_next::wire::fuchsia::Stream,
3430 >(slot.as_mut(), decoder, ())?;
3431
3432 Ok(())
3433 }
3434
3435 4 => {
3436 ::fidl_next::wire::Envelope::decode_as::<
3437 ___D,
3438 crate::wire::NodeAttributes2<'de>,
3439 >(slot.as_mut(), decoder, ())?;
3440
3441 Ok(())
3442 }
3443
3444 _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3445 }
3446 })
3447 }
3448 }
3449
3450 impl<'de> FileInfo<'de> {
3451 pub fn is_append(&self) -> ::core::option::Option<&bool> {
3452 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3453 }
3454
3455 pub fn take_is_append(&mut self) -> ::core::option::Option<bool> {
3456 unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3457 }
3458
3459 pub fn observer(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
3460 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3461 }
3462
3463 pub fn take_observer(
3464 &mut self,
3465 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
3466 unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3467 }
3468
3469 pub fn stream(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Stream> {
3470 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3471 }
3472
3473 pub fn take_stream(
3474 &mut self,
3475 ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Stream> {
3476 unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3477 }
3478
3479 pub fn attributes(&self) -> ::core::option::Option<&crate::wire::NodeAttributes2<'de>> {
3480 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3481 }
3482
3483 pub fn take_attributes(
3484 &mut self,
3485 ) -> ::core::option::Option<crate::wire::NodeAttributes2<'de>> {
3486 unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
3487 }
3488 }
3489
3490 impl<'de> ::core::fmt::Debug for FileInfo<'de> {
3491 fn fmt(
3492 &self,
3493 f: &mut ::core::fmt::Formatter<'_>,
3494 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3495 f.debug_struct("FileInfo")
3496 .field("is_append", &self.is_append())
3497 .field("observer", &self.observer())
3498 .field("stream", &self.stream())
3499 .field("attributes", &self.attributes())
3500 .finish()
3501 }
3502 }
3503
3504 impl<'de> ::fidl_next::IntoNatural for FileInfo<'de> {
3505 type Natural = crate::natural::FileInfo;
3506 }
3507
3508 #[repr(transparent)]
3510 pub struct Representation<'de> {
3511 pub(crate) raw: ::fidl_next::wire::Union,
3512 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3513 }
3514
3515 impl<'de> Drop for Representation<'de> {
3516 fn drop(&mut self) {
3517 match self.raw.ordinal() {
3518 1 => {
3519 let _ =
3520 unsafe { self.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>() };
3521 }
3522
3523 2 => {
3524 let _ = unsafe {
3525 self.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
3526 };
3527 }
3528
3529 3 => {
3530 let _ =
3531 unsafe { self.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>() };
3532 }
3533
3534 4 => {
3535 let _ =
3536 unsafe { self.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>() };
3537 }
3538
3539 _ => (),
3540 }
3541 }
3542 }
3543
3544 impl ::fidl_next::Constrained for Representation<'_> {
3545 type Constraint = ();
3546
3547 fn validate(
3548 _: ::fidl_next::Slot<'_, Self>,
3549 _: Self::Constraint,
3550 ) -> Result<(), ::fidl_next::ValidationError> {
3551 Ok(())
3552 }
3553 }
3554
3555 unsafe impl ::fidl_next::Wire for Representation<'static> {
3556 type Narrowed<'de> = Representation<'de>;
3557
3558 #[inline]
3559 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3560 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3561 ::fidl_next::wire::Union::zero_padding(raw);
3562 }
3563 }
3564
3565 pub mod representation {
3566 pub enum Ref<'de> {
3567 Node(&'de crate::wire::NodeInfo<'de>),
3568
3569 Directory(&'de crate::wire::DirectoryInfo<'de>),
3570
3571 File(&'de crate::wire::FileInfo<'de>),
3572
3573 Symlink(&'de crate::wire::SymlinkInfo<'de>),
3574
3575 UnknownOrdinal_(u64),
3576 }
3577
3578 pub enum Value<'de> {
3579 Node(crate::wire::NodeInfo<'de>),
3580
3581 Directory(crate::wire::DirectoryInfo<'de>),
3582
3583 File(crate::wire::FileInfo<'de>),
3584
3585 Symlink(crate::wire::SymlinkInfo<'de>),
3586
3587 UnknownOrdinal_(u64),
3588 }
3589 }
3590
3591 impl<'de> Representation<'de> {
3592 pub fn as_ref(&self) -> crate::wire::representation::Ref<'_> {
3593 match self.raw.ordinal() {
3594 1 => crate::wire::representation::Ref::Node(unsafe {
3595 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>()
3596 }),
3597
3598 2 => crate::wire::representation::Ref::Directory(unsafe {
3599 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>()
3600 }),
3601
3602 3 => crate::wire::representation::Ref::File(unsafe {
3603 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>()
3604 }),
3605
3606 4 => crate::wire::representation::Ref::Symlink(unsafe {
3607 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>()
3608 }),
3609
3610 unknown => crate::wire::representation::Ref::UnknownOrdinal_(unknown),
3611 }
3612 }
3613
3614 pub fn into_inner(self) -> crate::wire::representation::Value<'de> {
3615 let this = ::core::mem::ManuallyDrop::new(self);
3616
3617 match this.raw.ordinal() {
3618 1 => crate::wire::representation::Value::Node(unsafe {
3619 this.raw.get().read_unchecked::<crate::wire::NodeInfo<'de>>()
3620 }),
3621
3622 2 => crate::wire::representation::Value::Directory(unsafe {
3623 this.raw.get().read_unchecked::<crate::wire::DirectoryInfo<'de>>()
3624 }),
3625
3626 3 => crate::wire::representation::Value::File(unsafe {
3627 this.raw.get().read_unchecked::<crate::wire::FileInfo<'de>>()
3628 }),
3629
3630 4 => crate::wire::representation::Value::Symlink(unsafe {
3631 this.raw.get().read_unchecked::<crate::wire::SymlinkInfo<'de>>()
3632 }),
3633
3634 unknown => crate::wire::representation::Value::UnknownOrdinal_(unknown),
3635 }
3636 }
3637 }
3638
3639 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
3640 where
3641 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3642 ___D: ::fidl_next::Decoder<'de>,
3643 ___D: ::fidl_next::fuchsia::HandleDecoder,
3644 {
3645 fn decode(
3646 mut slot: ::fidl_next::Slot<'_, Self>,
3647 decoder: &mut ___D,
3648 _: (),
3649 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3650 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3651 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3652 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
3653 raw,
3654 decoder,
3655 (),
3656 )?,
3657
3658 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
3659 raw,
3660 decoder,
3661 (),
3662 )?,
3663
3664 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
3665 raw,
3666 decoder,
3667 (),
3668 )?,
3669
3670 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
3671 raw,
3672 decoder,
3673 (),
3674 )?,
3675
3676 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3677 }
3678
3679 Ok(())
3680 }
3681 }
3682
3683 impl<'de> ::core::fmt::Debug for Representation<'de> {
3684 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3685 match self.raw.ordinal() {
3686 1 => unsafe {
3687 self.raw.get().deref_unchecked::<crate::wire::NodeInfo<'_>>().fmt(f)
3688 },
3689 2 => unsafe {
3690 self.raw.get().deref_unchecked::<crate::wire::DirectoryInfo<'_>>().fmt(f)
3691 },
3692 3 => unsafe {
3693 self.raw.get().deref_unchecked::<crate::wire::FileInfo<'_>>().fmt(f)
3694 },
3695 4 => unsafe {
3696 self.raw.get().deref_unchecked::<crate::wire::SymlinkInfo<'_>>().fmt(f)
3697 },
3698 _ => unsafe { ::core::hint::unreachable_unchecked() },
3699 }
3700 }
3701 }
3702
3703 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
3704 type Natural = crate::natural::Representation;
3705 }
3706
3707 #[derive(Debug)]
3709 #[repr(C)]
3710 pub struct OpenableOpenRequest<'de> {
3711 pub path: ::fidl_next::wire::String<'de>,
3712
3713 pub flags: crate::wire::Flags,
3714
3715 pub options: crate::wire::Options<'de>,
3716
3717 pub object: ::fidl_next::wire::fuchsia::Channel,
3718 }
3719
3720 static_assertions::const_assert_eq!(std::mem::size_of::<OpenableOpenRequest<'_>>(), 48);
3721 static_assertions::const_assert_eq!(std::mem::align_of::<OpenableOpenRequest<'_>>(), 8);
3722
3723 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, path), 0);
3724
3725 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, flags), 16);
3726
3727 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, options), 24);
3728
3729 static_assertions::const_assert_eq!(std::mem::offset_of!(OpenableOpenRequest<'_>, object), 40);
3730
3731 impl ::fidl_next::Constrained for OpenableOpenRequest<'_> {
3732 type Constraint = ();
3733
3734 fn validate(
3735 _: ::fidl_next::Slot<'_, Self>,
3736 _: Self::Constraint,
3737 ) -> Result<(), ::fidl_next::ValidationError> {
3738 Ok(())
3739 }
3740 }
3741
3742 unsafe impl ::fidl_next::Wire for OpenableOpenRequest<'static> {
3743 type Narrowed<'de> = OpenableOpenRequest<'de>;
3744
3745 #[inline]
3746 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3747 ::fidl_next::munge! {
3748 let Self {
3749 path,
3750 flags,
3751 options,
3752 object,
3753
3754 } = &mut *out_;
3755 }
3756
3757 ::fidl_next::Wire::zero_padding(path);
3758
3759 ::fidl_next::Wire::zero_padding(flags);
3760
3761 ::fidl_next::Wire::zero_padding(options);
3762
3763 ::fidl_next::Wire::zero_padding(object);
3764
3765 unsafe {
3766 out_.as_mut_ptr().cast::<u8>().add(44).write_bytes(0, 4);
3767 }
3768 }
3769 }
3770
3771 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for OpenableOpenRequest<'de>
3772 where
3773 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3774 ___D: ::fidl_next::Decoder<'de>,
3775 ___D: ::fidl_next::fuchsia::HandleDecoder,
3776 {
3777 fn decode(
3778 slot_: ::fidl_next::Slot<'_, Self>,
3779 decoder_: &mut ___D,
3780 _: (),
3781 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3782 if slot_.as_bytes()[44..48] != [0u8; 4] {
3783 return Err(::fidl_next::DecodeError::InvalidPadding);
3784 }
3785
3786 ::fidl_next::munge! {
3787 let Self {
3788 mut path,
3789 mut flags,
3790 mut options,
3791 mut object,
3792
3793 } = slot_;
3794 }
3795
3796 let _field = path.as_mut();
3797 ::fidl_next::Constrained::validate(_field, 4095)?;
3798 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
3799
3800 let path = unsafe { path.deref_unchecked() };
3801
3802 if path.len() > 4095 {
3803 return Err(::fidl_next::DecodeError::VectorTooLong {
3804 size: path.len() as u64,
3805 limit: 4095,
3806 });
3807 }
3808
3809 let _field = flags.as_mut();
3810
3811 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3812
3813 let _field = options.as_mut();
3814
3815 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
3816
3817 let _field = object.as_mut();
3818
3819 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3820
3821 Ok(())
3822 }
3823 }
3824
3825 impl<'de> ::fidl_next::IntoNatural for OpenableOpenRequest<'de> {
3826 type Natural = crate::natural::OpenableOpenRequest;
3827 }
3828
3829 #[derive(Debug)]
3831 #[repr(C)]
3832 pub struct NodeDeprecatedCloneRequest {
3833 pub flags: crate::wire::OpenFlags,
3834
3835 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
3836 }
3837
3838 static_assertions::const_assert_eq!(std::mem::size_of::<NodeDeprecatedCloneRequest>(), 8);
3839 static_assertions::const_assert_eq!(std::mem::align_of::<NodeDeprecatedCloneRequest>(), 4);
3840
3841 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeDeprecatedCloneRequest, flags), 0);
3842
3843 static_assertions::const_assert_eq!(
3844 std::mem::offset_of!(NodeDeprecatedCloneRequest, object),
3845 4
3846 );
3847
3848 impl ::fidl_next::Constrained for NodeDeprecatedCloneRequest {
3849 type Constraint = ();
3850
3851 fn validate(
3852 _: ::fidl_next::Slot<'_, Self>,
3853 _: Self::Constraint,
3854 ) -> Result<(), ::fidl_next::ValidationError> {
3855 Ok(())
3856 }
3857 }
3858
3859 unsafe impl ::fidl_next::Wire for NodeDeprecatedCloneRequest {
3860 type Narrowed<'de> = NodeDeprecatedCloneRequest;
3861
3862 #[inline]
3863 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3864 ::fidl_next::munge! {
3865 let Self {
3866 flags,
3867 object,
3868
3869 } = &mut *out_;
3870 }
3871
3872 ::fidl_next::Wire::zero_padding(flags);
3873
3874 ::fidl_next::Wire::zero_padding(object);
3875 }
3876 }
3877
3878 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeDeprecatedCloneRequest
3879 where
3880 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3881 ___D: ::fidl_next::fuchsia::HandleDecoder,
3882 {
3883 fn decode(
3884 slot_: ::fidl_next::Slot<'_, Self>,
3885 decoder_: &mut ___D,
3886 _: (),
3887 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3888 ::fidl_next::munge! {
3889 let Self {
3890 mut flags,
3891 mut object,
3892
3893 } = slot_;
3894 }
3895
3896 let _field = flags.as_mut();
3897
3898 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
3899
3900 let _field = object.as_mut();
3901
3902 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
3903
3904 Ok(())
3905 }
3906 }
3907
3908 impl ::fidl_next::IntoNatural for NodeDeprecatedCloneRequest {
3909 type Natural = crate::natural::NodeDeprecatedCloneRequest;
3910 }
3911
3912 #[derive(Debug)]
3914 #[repr(C)]
3915 pub struct NodeOnOpenRequest<'de> {
3916 pub s: ::fidl_next::wire::fuchsia::StatusResult,
3917
3918 pub info: crate::wire_optional::NodeInfoDeprecated<'de>,
3919 }
3920
3921 static_assertions::const_assert_eq!(std::mem::size_of::<NodeOnOpenRequest<'_>>(), 24);
3922 static_assertions::const_assert_eq!(std::mem::align_of::<NodeOnOpenRequest<'_>>(), 8);
3923
3924 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, s), 0);
3925
3926 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeOnOpenRequest<'_>, info), 8);
3927
3928 impl ::fidl_next::Constrained for NodeOnOpenRequest<'_> {
3929 type Constraint = ();
3930
3931 fn validate(
3932 _: ::fidl_next::Slot<'_, Self>,
3933 _: Self::Constraint,
3934 ) -> Result<(), ::fidl_next::ValidationError> {
3935 Ok(())
3936 }
3937 }
3938
3939 unsafe impl ::fidl_next::Wire for NodeOnOpenRequest<'static> {
3940 type Narrowed<'de> = NodeOnOpenRequest<'de>;
3941
3942 #[inline]
3943 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3944 ::fidl_next::munge! {
3945 let Self {
3946 s,
3947 info,
3948
3949 } = &mut *out_;
3950 }
3951
3952 ::fidl_next::Wire::zero_padding(s);
3953
3954 ::fidl_next::Wire::zero_padding(info);
3955
3956 unsafe {
3957 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
3958 }
3959 }
3960 }
3961
3962 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeOnOpenRequest<'de>
3963 where
3964 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3965 ___D: ::fidl_next::Decoder<'de>,
3966 ___D: ::fidl_next::fuchsia::HandleDecoder,
3967 {
3968 fn decode(
3969 slot_: ::fidl_next::Slot<'_, Self>,
3970 decoder_: &mut ___D,
3971 _: (),
3972 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3973 if slot_.as_bytes()[4..8] != [0u8; 4] {
3974 return Err(::fidl_next::DecodeError::InvalidPadding);
3975 }
3976
3977 ::fidl_next::munge! {
3978 let Self {
3979 mut s,
3980 mut info,
3981
3982 } = slot_;
3983 }
3984
3985 let _field = s.as_mut();
3986
3987 ::fidl_next::Decode::decode(s.as_mut(), decoder_, ())?;
3988
3989 let _field = info.as_mut();
3990
3991 ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
3992
3993 Ok(())
3994 }
3995 }
3996
3997 impl<'de> ::fidl_next::IntoNatural for NodeOnOpenRequest<'de> {
3998 type Natural = crate::natural::NodeOnOpenRequest;
3999 }
4000
4001 #[derive(Debug)]
4003 #[repr(C)]
4004 pub struct DirectoryDeprecatedOpenRequest<'de> {
4005 pub flags: crate::wire::OpenFlags,
4006
4007 pub mode: crate::wire::ModeType,
4008
4009 pub path: ::fidl_next::wire::String<'de>,
4010
4011 pub object: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
4012 }
4013
4014 static_assertions::const_assert_eq!(
4015 std::mem::size_of::<DirectoryDeprecatedOpenRequest<'_>>(),
4016 32
4017 );
4018 static_assertions::const_assert_eq!(
4019 std::mem::align_of::<DirectoryDeprecatedOpenRequest<'_>>(),
4020 8
4021 );
4022
4023 static_assertions::const_assert_eq!(
4024 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, flags),
4025 0
4026 );
4027
4028 static_assertions::const_assert_eq!(
4029 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, mode),
4030 4
4031 );
4032
4033 static_assertions::const_assert_eq!(
4034 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, path),
4035 8
4036 );
4037
4038 static_assertions::const_assert_eq!(
4039 std::mem::offset_of!(DirectoryDeprecatedOpenRequest<'_>, object),
4040 24
4041 );
4042
4043 impl ::fidl_next::Constrained for DirectoryDeprecatedOpenRequest<'_> {
4044 type Constraint = ();
4045
4046 fn validate(
4047 _: ::fidl_next::Slot<'_, Self>,
4048 _: Self::Constraint,
4049 ) -> Result<(), ::fidl_next::ValidationError> {
4050 Ok(())
4051 }
4052 }
4053
4054 unsafe impl ::fidl_next::Wire for DirectoryDeprecatedOpenRequest<'static> {
4055 type Narrowed<'de> = DirectoryDeprecatedOpenRequest<'de>;
4056
4057 #[inline]
4058 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4059 ::fidl_next::munge! {
4060 let Self {
4061 flags,
4062 mode,
4063 path,
4064 object,
4065
4066 } = &mut *out_;
4067 }
4068
4069 ::fidl_next::Wire::zero_padding(flags);
4070
4071 ::fidl_next::Wire::zero_padding(mode);
4072
4073 ::fidl_next::Wire::zero_padding(path);
4074
4075 ::fidl_next::Wire::zero_padding(object);
4076
4077 unsafe {
4078 out_.as_mut_ptr().cast::<u8>().add(28).write_bytes(0, 4);
4079 }
4080 }
4081 }
4082
4083 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryDeprecatedOpenRequest<'de>
4084 where
4085 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4086 ___D: ::fidl_next::Decoder<'de>,
4087 ___D: ::fidl_next::fuchsia::HandleDecoder,
4088 {
4089 fn decode(
4090 slot_: ::fidl_next::Slot<'_, Self>,
4091 decoder_: &mut ___D,
4092 _: (),
4093 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4094 if slot_.as_bytes()[28..32] != [0u8; 4] {
4095 return Err(::fidl_next::DecodeError::InvalidPadding);
4096 }
4097
4098 ::fidl_next::munge! {
4099 let Self {
4100 mut flags,
4101 mut mode,
4102 mut path,
4103 mut object,
4104
4105 } = slot_;
4106 }
4107
4108 let _field = flags.as_mut();
4109
4110 ::fidl_next::Decode::decode(flags.as_mut(), decoder_, ())?;
4111
4112 let _field = mode.as_mut();
4113
4114 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
4115
4116 let _field = path.as_mut();
4117 ::fidl_next::Constrained::validate(_field, 4095)?;
4118 ::fidl_next::Decode::decode(path.as_mut(), decoder_, 4095)?;
4119
4120 let path = unsafe { path.deref_unchecked() };
4121
4122 if path.len() > 4095 {
4123 return Err(::fidl_next::DecodeError::VectorTooLong {
4124 size: path.len() as u64,
4125 limit: 4095,
4126 });
4127 }
4128
4129 let _field = object.as_mut();
4130
4131 ::fidl_next::Decode::decode(object.as_mut(), decoder_, ())?;
4132
4133 Ok(())
4134 }
4135 }
4136
4137 impl<'de> ::fidl_next::IntoNatural for DirectoryDeprecatedOpenRequest<'de> {
4138 type Natural = crate::natural::DirectoryDeprecatedOpenRequest;
4139 }
4140
4141 #[derive(Debug)]
4143 #[repr(C)]
4144 pub struct DirectoryCreateSymlinkRequest<'de> {
4145 pub name: ::fidl_next::wire::String<'de>,
4146
4147 pub target: ::fidl_next::wire::Vector<'de, u8>,
4148
4149 pub connection:
4150 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
4151 }
4152
4153 static_assertions::const_assert_eq!(
4154 std::mem::size_of::<DirectoryCreateSymlinkRequest<'_>>(),
4155 40
4156 );
4157 static_assertions::const_assert_eq!(
4158 std::mem::align_of::<DirectoryCreateSymlinkRequest<'_>>(),
4159 8
4160 );
4161
4162 static_assertions::const_assert_eq!(
4163 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, name),
4164 0
4165 );
4166
4167 static_assertions::const_assert_eq!(
4168 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, target),
4169 16
4170 );
4171
4172 static_assertions::const_assert_eq!(
4173 std::mem::offset_of!(DirectoryCreateSymlinkRequest<'_>, connection),
4174 32
4175 );
4176
4177 impl ::fidl_next::Constrained for DirectoryCreateSymlinkRequest<'_> {
4178 type Constraint = ();
4179
4180 fn validate(
4181 _: ::fidl_next::Slot<'_, Self>,
4182 _: Self::Constraint,
4183 ) -> Result<(), ::fidl_next::ValidationError> {
4184 Ok(())
4185 }
4186 }
4187
4188 unsafe impl ::fidl_next::Wire for DirectoryCreateSymlinkRequest<'static> {
4189 type Narrowed<'de> = DirectoryCreateSymlinkRequest<'de>;
4190
4191 #[inline]
4192 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4193 ::fidl_next::munge! {
4194 let Self {
4195 name,
4196 target,
4197 connection,
4198
4199 } = &mut *out_;
4200 }
4201
4202 ::fidl_next::Wire::zero_padding(name);
4203
4204 ::fidl_next::Wire::zero_padding(target);
4205
4206 ::fidl_next::Wire::zero_padding(connection);
4207
4208 unsafe {
4209 out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
4210 }
4211 }
4212 }
4213
4214 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DirectoryCreateSymlinkRequest<'de>
4215 where
4216 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4217 ___D: ::fidl_next::Decoder<'de>,
4218 ___D: ::fidl_next::fuchsia::HandleDecoder,
4219 {
4220 fn decode(
4221 slot_: ::fidl_next::Slot<'_, Self>,
4222 decoder_: &mut ___D,
4223 _: (),
4224 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4225 if slot_.as_bytes()[36..40] != [0u8; 4] {
4226 return Err(::fidl_next::DecodeError::InvalidPadding);
4227 }
4228
4229 ::fidl_next::munge! {
4230 let Self {
4231 mut name,
4232 mut target,
4233 mut connection,
4234
4235 } = slot_;
4236 }
4237
4238 let _field = name.as_mut();
4239 ::fidl_next::Constrained::validate(_field, 255)?;
4240 ::fidl_next::Decode::decode(name.as_mut(), decoder_, 255)?;
4241
4242 let name = unsafe { name.deref_unchecked() };
4243
4244 if name.len() > 255 {
4245 return Err(::fidl_next::DecodeError::VectorTooLong {
4246 size: name.len() as u64,
4247 limit: 255,
4248 });
4249 }
4250
4251 let _field = target.as_mut();
4252 ::fidl_next::Constrained::validate(_field, (4095, ()))?;
4253 ::fidl_next::Decode::decode(target.as_mut(), decoder_, (4095, ()))?;
4254
4255 let target = unsafe { target.deref_unchecked() };
4256
4257 if target.len() > 4095 {
4258 return Err(::fidl_next::DecodeError::VectorTooLong {
4259 size: target.len() as u64,
4260 limit: 4095,
4261 });
4262 }
4263
4264 let _field = connection.as_mut();
4265
4266 ::fidl_next::Decode::decode(connection.as_mut(), decoder_, ())?;
4267
4268 Ok(())
4269 }
4270 }
4271
4272 impl<'de> ::fidl_next::IntoNatural for DirectoryCreateSymlinkRequest<'de> {
4273 type Natural = crate::natural::DirectoryCreateSymlinkRequest;
4274 }
4275
4276 #[derive(Debug)]
4278 #[repr(C)]
4279 pub struct FileGetBackingMemoryResponse {
4280 pub vmo: ::fidl_next::wire::fuchsia::Vmo,
4281 }
4282
4283 static_assertions::const_assert_eq!(std::mem::size_of::<FileGetBackingMemoryResponse>(), 4);
4284 static_assertions::const_assert_eq!(std::mem::align_of::<FileGetBackingMemoryResponse>(), 4);
4285
4286 static_assertions::const_assert_eq!(std::mem::offset_of!(FileGetBackingMemoryResponse, vmo), 0);
4287
4288 impl ::fidl_next::Constrained for FileGetBackingMemoryResponse {
4289 type Constraint = ();
4290
4291 fn validate(
4292 _: ::fidl_next::Slot<'_, Self>,
4293 _: Self::Constraint,
4294 ) -> Result<(), ::fidl_next::ValidationError> {
4295 Ok(())
4296 }
4297 }
4298
4299 unsafe impl ::fidl_next::Wire for FileGetBackingMemoryResponse {
4300 type Narrowed<'de> = FileGetBackingMemoryResponse;
4301
4302 #[inline]
4303 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4304 ::fidl_next::munge! {
4305 let Self {
4306 vmo,
4307
4308 } = &mut *out_;
4309 }
4310
4311 ::fidl_next::Wire::zero_padding(vmo);
4312 }
4313 }
4314
4315 unsafe impl<___D> ::fidl_next::Decode<___D> for FileGetBackingMemoryResponse
4316 where
4317 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4318 ___D: ::fidl_next::fuchsia::HandleDecoder,
4319 {
4320 fn decode(
4321 slot_: ::fidl_next::Slot<'_, Self>,
4322 decoder_: &mut ___D,
4323 _: (),
4324 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4325 ::fidl_next::munge! {
4326 let Self {
4327 mut vmo,
4328
4329 } = slot_;
4330 }
4331
4332 let _field = vmo.as_mut();
4333
4334 ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
4335
4336 Ok(())
4337 }
4338 }
4339
4340 impl ::fidl_next::IntoNatural for FileGetBackingMemoryResponse {
4341 type Natural = crate::natural::FileGetBackingMemoryResponse;
4342 }
4343
4344 #[derive(Debug)]
4346 #[repr(C)]
4347 pub struct LinkableLinkIntoRequest<'de> {
4348 pub dst_parent_token: ::fidl_next::wire::fuchsia::Event,
4349
4350 pub dst: ::fidl_next::wire::String<'de>,
4351 }
4352
4353 static_assertions::const_assert_eq!(std::mem::size_of::<LinkableLinkIntoRequest<'_>>(), 24);
4354 static_assertions::const_assert_eq!(std::mem::align_of::<LinkableLinkIntoRequest<'_>>(), 8);
4355
4356 static_assertions::const_assert_eq!(
4357 std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst_parent_token),
4358 0
4359 );
4360
4361 static_assertions::const_assert_eq!(std::mem::offset_of!(LinkableLinkIntoRequest<'_>, dst), 8);
4362
4363 impl ::fidl_next::Constrained for LinkableLinkIntoRequest<'_> {
4364 type Constraint = ();
4365
4366 fn validate(
4367 _: ::fidl_next::Slot<'_, Self>,
4368 _: Self::Constraint,
4369 ) -> Result<(), ::fidl_next::ValidationError> {
4370 Ok(())
4371 }
4372 }
4373
4374 unsafe impl ::fidl_next::Wire for LinkableLinkIntoRequest<'static> {
4375 type Narrowed<'de> = LinkableLinkIntoRequest<'de>;
4376
4377 #[inline]
4378 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4379 ::fidl_next::munge! {
4380 let Self {
4381 dst_parent_token,
4382 dst,
4383
4384 } = &mut *out_;
4385 }
4386
4387 ::fidl_next::Wire::zero_padding(dst_parent_token);
4388
4389 ::fidl_next::Wire::zero_padding(dst);
4390
4391 unsafe {
4392 out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
4393 }
4394 }
4395 }
4396
4397 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for LinkableLinkIntoRequest<'de>
4398 where
4399 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4400 ___D: ::fidl_next::Decoder<'de>,
4401 ___D: ::fidl_next::fuchsia::HandleDecoder,
4402 {
4403 fn decode(
4404 slot_: ::fidl_next::Slot<'_, Self>,
4405 decoder_: &mut ___D,
4406 _: (),
4407 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4408 if slot_.as_bytes()[4..8] != [0u8; 4] {
4409 return Err(::fidl_next::DecodeError::InvalidPadding);
4410 }
4411
4412 ::fidl_next::munge! {
4413 let Self {
4414 mut dst_parent_token,
4415 mut dst,
4416
4417 } = slot_;
4418 }
4419
4420 let _field = dst_parent_token.as_mut();
4421
4422 ::fidl_next::Decode::decode(dst_parent_token.as_mut(), decoder_, ())?;
4423
4424 let _field = dst.as_mut();
4425 ::fidl_next::Constrained::validate(_field, 255)?;
4426 ::fidl_next::Decode::decode(dst.as_mut(), decoder_, 255)?;
4427
4428 let dst = unsafe { dst.deref_unchecked() };
4429
4430 if dst.len() > 255 {
4431 return Err(::fidl_next::DecodeError::VectorTooLong {
4432 size: dst.len() as u64,
4433 limit: 255,
4434 });
4435 }
4436
4437 Ok(())
4438 }
4439 }
4440
4441 impl<'de> ::fidl_next::IntoNatural for LinkableLinkIntoRequest<'de> {
4442 type Natural = crate::natural::LinkableLinkIntoRequest;
4443 }
4444
4445 #[derive(Debug)]
4447 #[repr(C)]
4448 pub struct FileAllocateRequest {
4449 pub offset: ::fidl_next::wire::Uint64,
4450
4451 pub length: ::fidl_next::wire::Uint64,
4452
4453 pub mode: crate::wire::AllocateMode,
4454 }
4455
4456 static_assertions::const_assert_eq!(std::mem::size_of::<FileAllocateRequest>(), 24);
4457 static_assertions::const_assert_eq!(std::mem::align_of::<FileAllocateRequest>(), 8);
4458
4459 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, offset), 0);
4460
4461 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, length), 8);
4462
4463 static_assertions::const_assert_eq!(std::mem::offset_of!(FileAllocateRequest, mode), 16);
4464
4465 impl ::fidl_next::Constrained for FileAllocateRequest {
4466 type Constraint = ();
4467
4468 fn validate(
4469 _: ::fidl_next::Slot<'_, Self>,
4470 _: Self::Constraint,
4471 ) -> Result<(), ::fidl_next::ValidationError> {
4472 Ok(())
4473 }
4474 }
4475
4476 unsafe impl ::fidl_next::Wire for FileAllocateRequest {
4477 type Narrowed<'de> = FileAllocateRequest;
4478
4479 #[inline]
4480 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4481 ::fidl_next::munge! {
4482 let Self {
4483 offset,
4484 length,
4485 mode,
4486
4487 } = &mut *out_;
4488 }
4489
4490 ::fidl_next::Wire::zero_padding(offset);
4491
4492 ::fidl_next::Wire::zero_padding(length);
4493
4494 ::fidl_next::Wire::zero_padding(mode);
4495
4496 unsafe {
4497 out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4498 }
4499 }
4500 }
4501
4502 unsafe impl<___D> ::fidl_next::Decode<___D> for FileAllocateRequest
4503 where
4504 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4505 ___D: ::fidl_next::fuchsia::HandleDecoder,
4506 {
4507 fn decode(
4508 slot_: ::fidl_next::Slot<'_, Self>,
4509 decoder_: &mut ___D,
4510 _: (),
4511 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4512 if slot_.as_bytes()[20..24] != [0u8; 4] {
4513 return Err(::fidl_next::DecodeError::InvalidPadding);
4514 }
4515
4516 ::fidl_next::munge! {
4517 let Self {
4518 mut offset,
4519 mut length,
4520 mut mode,
4521
4522 } = slot_;
4523 }
4524
4525 let _field = offset.as_mut();
4526
4527 ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
4528
4529 let _field = length.as_mut();
4530
4531 ::fidl_next::Decode::decode(length.as_mut(), decoder_, ())?;
4532
4533 let _field = mode.as_mut();
4534
4535 ::fidl_next::Decode::decode(mode.as_mut(), decoder_, ())?;
4536
4537 Ok(())
4538 }
4539 }
4540
4541 impl ::fidl_next::IntoNatural for FileAllocateRequest {
4542 type Natural = crate::natural::FileAllocateRequest;
4543 }
4544
4545 #[derive(Debug)]
4547 #[repr(C)]
4548 pub struct FileEnableVerityRequest<'de> {
4549 pub options: crate::wire::VerificationOptions<'de>,
4550 }
4551
4552 static_assertions::const_assert_eq!(std::mem::size_of::<FileEnableVerityRequest<'_>>(), 16);
4553 static_assertions::const_assert_eq!(std::mem::align_of::<FileEnableVerityRequest<'_>>(), 8);
4554
4555 static_assertions::const_assert_eq!(
4556 std::mem::offset_of!(FileEnableVerityRequest<'_>, options),
4557 0
4558 );
4559
4560 impl ::fidl_next::Constrained for FileEnableVerityRequest<'_> {
4561 type Constraint = ();
4562
4563 fn validate(
4564 _: ::fidl_next::Slot<'_, Self>,
4565 _: Self::Constraint,
4566 ) -> Result<(), ::fidl_next::ValidationError> {
4567 Ok(())
4568 }
4569 }
4570
4571 unsafe impl ::fidl_next::Wire for FileEnableVerityRequest<'static> {
4572 type Narrowed<'de> = FileEnableVerityRequest<'de>;
4573
4574 #[inline]
4575 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4576 ::fidl_next::munge! {
4577 let Self {
4578 options,
4579
4580 } = &mut *out_;
4581 }
4582
4583 ::fidl_next::Wire::zero_padding(options);
4584 }
4585 }
4586
4587 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FileEnableVerityRequest<'de>
4588 where
4589 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4590 ___D: ::fidl_next::Decoder<'de>,
4591 ___D: ::fidl_next::fuchsia::HandleDecoder,
4592 {
4593 fn decode(
4594 slot_: ::fidl_next::Slot<'_, Self>,
4595 decoder_: &mut ___D,
4596 _: (),
4597 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4598 ::fidl_next::munge! {
4599 let Self {
4600 mut options,
4601
4602 } = slot_;
4603 }
4604
4605 let _field = options.as_mut();
4606
4607 ::fidl_next::Decode::decode(options.as_mut(), decoder_, ())?;
4608
4609 Ok(())
4610 }
4611 }
4612
4613 impl<'de> ::fidl_next::IntoNatural for FileEnableVerityRequest<'de> {
4614 type Natural = crate::natural::FileEnableVerityRequest;
4615 }
4616
4617 #[derive(Debug)]
4619 #[repr(C)]
4620 pub struct FileObject {
4621 pub event: ::fidl_next::wire::fuchsia::OptionalEvent,
4622
4623 pub stream: ::fidl_next::wire::fuchsia::OptionalStream,
4624 }
4625
4626 static_assertions::const_assert_eq!(std::mem::size_of::<FileObject>(), 8);
4627 static_assertions::const_assert_eq!(std::mem::align_of::<FileObject>(), 4);
4628
4629 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, event), 0);
4630
4631 static_assertions::const_assert_eq!(std::mem::offset_of!(FileObject, stream), 4);
4632
4633 impl ::fidl_next::Constrained for FileObject {
4634 type Constraint = ();
4635
4636 fn validate(
4637 _: ::fidl_next::Slot<'_, Self>,
4638 _: Self::Constraint,
4639 ) -> Result<(), ::fidl_next::ValidationError> {
4640 Ok(())
4641 }
4642 }
4643
4644 unsafe impl ::fidl_next::Wire for FileObject {
4645 type Narrowed<'de> = FileObject;
4646
4647 #[inline]
4648 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4649 ::fidl_next::munge! {
4650 let Self {
4651 event,
4652 stream,
4653
4654 } = &mut *out_;
4655 }
4656
4657 ::fidl_next::Wire::zero_padding(event);
4658
4659 ::fidl_next::Wire::zero_padding(stream);
4660 }
4661 }
4662
4663 unsafe impl<___D> ::fidl_next::Decode<___D> for FileObject
4664 where
4665 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4666 ___D: ::fidl_next::fuchsia::HandleDecoder,
4667 {
4668 fn decode(
4669 slot_: ::fidl_next::Slot<'_, Self>,
4670 decoder_: &mut ___D,
4671 _: (),
4672 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4673 ::fidl_next::munge! {
4674 let Self {
4675 mut event,
4676 mut stream,
4677
4678 } = slot_;
4679 }
4680
4681 let _field = event.as_mut();
4682
4683 ::fidl_next::Decode::decode(event.as_mut(), decoder_, ())?;
4684
4685 let _field = stream.as_mut();
4686
4687 ::fidl_next::Decode::decode(stream.as_mut(), decoder_, ())?;
4688
4689 Ok(())
4690 }
4691 }
4692
4693 impl ::fidl_next::IntoNatural for FileObject {
4694 type Natural = crate::natural::FileObject;
4695 }
4696
4697 #[repr(transparent)]
4699 pub struct NodeInfoDeprecated<'de> {
4700 pub(crate) raw: ::fidl_next::wire::Union,
4701 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4702 }
4703
4704 impl<'de> Drop for NodeInfoDeprecated<'de> {
4705 fn drop(&mut self) {
4706 match self.raw.ordinal() {
4707 1 => {
4708 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::Service>() };
4709 }
4710
4711 2 => {
4712 let _ = unsafe { self.raw.get().read_unchecked::<crate::wire::FileObject>() };
4713 }
4714
4715 3 => {
4716 let _ =
4717 unsafe { self.raw.get().read_unchecked::<crate::wire::DirectoryObject>() };
4718 }
4719
4720 4 => {
4721 let _ = unsafe {
4722 self.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4723 };
4724 }
4725
4726 _ => unsafe { ::core::hint::unreachable_unchecked() },
4727 }
4728 }
4729 }
4730
4731 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
4732 type Constraint = ();
4733
4734 fn validate(
4735 _: ::fidl_next::Slot<'_, Self>,
4736 _: Self::Constraint,
4737 ) -> Result<(), ::fidl_next::ValidationError> {
4738 Ok(())
4739 }
4740 }
4741
4742 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
4743 type Narrowed<'de> = NodeInfoDeprecated<'de>;
4744
4745 #[inline]
4746 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4747 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4748 ::fidl_next::wire::Union::zero_padding(raw);
4749 }
4750 }
4751
4752 pub mod node_info_deprecated {
4753 pub enum Ref<'de> {
4754 Service(&'de crate::wire::Service),
4755
4756 File(&'de crate::wire::FileObject),
4757
4758 Directory(&'de crate::wire::DirectoryObject),
4759
4760 Symlink(&'de crate::wire::SymlinkObject<'de>),
4761 }
4762
4763 pub enum Value<'de> {
4764 Service(crate::wire::Service),
4765
4766 File(crate::wire::FileObject),
4767
4768 Directory(crate::wire::DirectoryObject),
4769
4770 Symlink(crate::wire::SymlinkObject<'de>),
4771 }
4772 }
4773
4774 impl<'de> NodeInfoDeprecated<'de> {
4775 pub fn as_ref(&self) -> crate::wire::node_info_deprecated::Ref<'_> {
4776 match self.raw.ordinal() {
4777 1 => crate::wire::node_info_deprecated::Ref::Service(unsafe {
4778 self.raw.get().deref_unchecked::<crate::wire::Service>()
4779 }),
4780
4781 2 => crate::wire::node_info_deprecated::Ref::File(unsafe {
4782 self.raw.get().deref_unchecked::<crate::wire::FileObject>()
4783 }),
4784
4785 3 => crate::wire::node_info_deprecated::Ref::Directory(unsafe {
4786 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>()
4787 }),
4788
4789 4 => crate::wire::node_info_deprecated::Ref::Symlink(unsafe {
4790 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>()
4791 }),
4792
4793 _ => unsafe { ::core::hint::unreachable_unchecked() },
4794 }
4795 }
4796
4797 pub fn into_inner(self) -> crate::wire::node_info_deprecated::Value<'de> {
4798 let this = ::core::mem::ManuallyDrop::new(self);
4799
4800 match this.raw.ordinal() {
4801 1 => crate::wire::node_info_deprecated::Value::Service(unsafe {
4802 this.raw.get().read_unchecked::<crate::wire::Service>()
4803 }),
4804
4805 2 => crate::wire::node_info_deprecated::Value::File(unsafe {
4806 this.raw.get().read_unchecked::<crate::wire::FileObject>()
4807 }),
4808
4809 3 => crate::wire::node_info_deprecated::Value::Directory(unsafe {
4810 this.raw.get().read_unchecked::<crate::wire::DirectoryObject>()
4811 }),
4812
4813 4 => crate::wire::node_info_deprecated::Value::Symlink(unsafe {
4814 this.raw.get().read_unchecked::<crate::wire::SymlinkObject<'de>>()
4815 }),
4816
4817 _ => unsafe { ::core::hint::unreachable_unchecked() },
4818 }
4819 }
4820 }
4821
4822 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
4823 where
4824 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4825 ___D: ::fidl_next::Decoder<'de>,
4826 ___D: ::fidl_next::fuchsia::HandleDecoder,
4827 {
4828 fn decode(
4829 mut slot: ::fidl_next::Slot<'_, Self>,
4830 decoder: &mut ___D,
4831 _: (),
4832 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4833 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4834 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4835 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
4836 raw,
4837 decoder,
4838 (),
4839 )?,
4840
4841 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
4842 raw,
4843 decoder,
4844 (),
4845 )?,
4846
4847 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
4848 raw,
4849 decoder,
4850 (),
4851 )?,
4852
4853 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
4854 raw,
4855 decoder,
4856 (),
4857 )?,
4858
4859 ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
4860 }
4861
4862 Ok(())
4863 }
4864 }
4865
4866 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
4867 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4868 match self.raw.ordinal() {
4869 1 => unsafe { self.raw.get().deref_unchecked::<crate::wire::Service>().fmt(f) },
4870 2 => unsafe { self.raw.get().deref_unchecked::<crate::wire::FileObject>().fmt(f) },
4871 3 => unsafe {
4872 self.raw.get().deref_unchecked::<crate::wire::DirectoryObject>().fmt(f)
4873 },
4874 4 => unsafe {
4875 self.raw.get().deref_unchecked::<crate::wire::SymlinkObject<'_>>().fmt(f)
4876 },
4877 _ => unsafe { ::core::hint::unreachable_unchecked() },
4878 }
4879 }
4880 }
4881
4882 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
4883 type Natural = crate::natural::NodeInfoDeprecated;
4884 }
4885}
4886
4887pub mod wire_optional {
4888
4889 pub use fidl_next_common_fuchsia_io::wire_optional::*;
4890
4891 #[repr(transparent)]
4892 pub struct ExtendedAttributeValue<'de> {
4893 pub(crate) raw: ::fidl_next::wire::Union,
4894 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4895 }
4896
4897 impl ::fidl_next::Constrained for ExtendedAttributeValue<'_> {
4898 type Constraint = ();
4899
4900 fn validate(
4901 _: ::fidl_next::Slot<'_, Self>,
4902 _: Self::Constraint,
4903 ) -> Result<(), ::fidl_next::ValidationError> {
4904 Ok(())
4905 }
4906 }
4907
4908 unsafe impl ::fidl_next::Wire for ExtendedAttributeValue<'static> {
4909 type Narrowed<'de> = ExtendedAttributeValue<'de>;
4910
4911 #[inline]
4912 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4913 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4914 ::fidl_next::wire::Union::zero_padding(raw);
4915 }
4916 }
4917
4918 impl<'de> ExtendedAttributeValue<'de> {
4919 pub fn is_some(&self) -> bool {
4920 self.raw.is_some()
4921 }
4922
4923 pub fn is_none(&self) -> bool {
4924 self.raw.is_none()
4925 }
4926
4927 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::ExtendedAttributeValue<'de>> {
4928 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4929 }
4930
4931 pub fn into_option(
4932 self,
4933 ) -> ::core::option::Option<crate::wire::ExtendedAttributeValue<'de>> {
4934 if self.is_some() {
4935 Some(crate::wire::ExtendedAttributeValue {
4936 raw: self.raw,
4937 _phantom: ::core::marker::PhantomData,
4938 })
4939 } else {
4940 None
4941 }
4942 }
4943 }
4944
4945 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ExtendedAttributeValue<'de>
4946 where
4947 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4948 ___D: ::fidl_next::Decoder<'de>,
4949 ___D: ::fidl_next::fuchsia::HandleDecoder,
4950 {
4951 fn decode(
4952 mut slot: ::fidl_next::Slot<'_, Self>,
4953 decoder: &mut ___D,
4954 _: (),
4955 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4956 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4957 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4958 1 => {
4959 ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
4960 raw,
4961 decoder,
4962 (32768, ()),
4963 )?
4964 }
4965
4966 2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Vmo>(
4967 raw,
4968 decoder,
4969 (),
4970 )?,
4971
4972 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4973 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4974 }
4975
4976 Ok(())
4977 }
4978 }
4979
4980 impl<'de> ::core::fmt::Debug for ExtendedAttributeValue<'de> {
4981 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4982 self.as_ref().fmt(f)
4983 }
4984 }
4985
4986 impl<'de> ::fidl_next::IntoNatural for ExtendedAttributeValue<'de> {
4987 type Natural = ::core::option::Option<crate::natural::ExtendedAttributeValue>;
4988 }
4989
4990 #[repr(transparent)]
4991 pub struct Representation<'de> {
4992 pub(crate) raw: ::fidl_next::wire::Union,
4993 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4994 }
4995
4996 impl ::fidl_next::Constrained for Representation<'_> {
4997 type Constraint = ();
4998
4999 fn validate(
5000 _: ::fidl_next::Slot<'_, Self>,
5001 _: Self::Constraint,
5002 ) -> Result<(), ::fidl_next::ValidationError> {
5003 Ok(())
5004 }
5005 }
5006
5007 unsafe impl ::fidl_next::Wire for Representation<'static> {
5008 type Narrowed<'de> = Representation<'de>;
5009
5010 #[inline]
5011 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5012 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5013 ::fidl_next::wire::Union::zero_padding(raw);
5014 }
5015 }
5016
5017 impl<'de> Representation<'de> {
5018 pub fn is_some(&self) -> bool {
5019 self.raw.is_some()
5020 }
5021
5022 pub fn is_none(&self) -> bool {
5023 self.raw.is_none()
5024 }
5025
5026 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Representation<'de>> {
5027 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
5028 }
5029
5030 pub fn into_option(self) -> ::core::option::Option<crate::wire::Representation<'de>> {
5031 if self.is_some() {
5032 Some(crate::wire::Representation {
5033 raw: self.raw,
5034 _phantom: ::core::marker::PhantomData,
5035 })
5036 } else {
5037 None
5038 }
5039 }
5040 }
5041
5042 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Representation<'de>
5043 where
5044 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5045 ___D: ::fidl_next::Decoder<'de>,
5046 ___D: ::fidl_next::fuchsia::HandleDecoder,
5047 {
5048 fn decode(
5049 mut slot: ::fidl_next::Slot<'_, Self>,
5050 decoder: &mut ___D,
5051 _: (),
5052 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5053 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5054 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
5055 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::NodeInfo<'de>>(
5056 raw,
5057 decoder,
5058 (),
5059 )?,
5060
5061 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryInfo<'de>>(
5062 raw,
5063 decoder,
5064 (),
5065 )?,
5066
5067 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileInfo<'de>>(
5068 raw,
5069 decoder,
5070 (),
5071 )?,
5072
5073 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkInfo<'de>>(
5074 raw,
5075 decoder,
5076 (),
5077 )?,
5078
5079 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
5080 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
5081 }
5082
5083 Ok(())
5084 }
5085 }
5086
5087 impl<'de> ::core::fmt::Debug for Representation<'de> {
5088 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5089 self.as_ref().fmt(f)
5090 }
5091 }
5092
5093 impl<'de> ::fidl_next::IntoNatural for Representation<'de> {
5094 type Natural = ::core::option::Option<crate::natural::Representation>;
5095 }
5096
5097 #[repr(transparent)]
5098 pub struct NodeInfoDeprecated<'de> {
5099 pub(crate) raw: ::fidl_next::wire::Union,
5100 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5101 }
5102
5103 impl ::fidl_next::Constrained for NodeInfoDeprecated<'_> {
5104 type Constraint = ();
5105
5106 fn validate(
5107 _: ::fidl_next::Slot<'_, Self>,
5108 _: Self::Constraint,
5109 ) -> Result<(), ::fidl_next::ValidationError> {
5110 Ok(())
5111 }
5112 }
5113
5114 unsafe impl ::fidl_next::Wire for NodeInfoDeprecated<'static> {
5115 type Narrowed<'de> = NodeInfoDeprecated<'de>;
5116
5117 #[inline]
5118 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5119 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5120 ::fidl_next::wire::Union::zero_padding(raw);
5121 }
5122 }
5123
5124 impl<'de> NodeInfoDeprecated<'de> {
5125 pub fn is_some(&self) -> bool {
5126 self.raw.is_some()
5127 }
5128
5129 pub fn is_none(&self) -> bool {
5130 self.raw.is_none()
5131 }
5132
5133 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::NodeInfoDeprecated<'de>> {
5134 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
5135 }
5136
5137 pub fn into_option(self) -> ::core::option::Option<crate::wire::NodeInfoDeprecated<'de>> {
5138 if self.is_some() {
5139 Some(crate::wire::NodeInfoDeprecated {
5140 raw: self.raw,
5141 _phantom: ::core::marker::PhantomData,
5142 })
5143 } else {
5144 None
5145 }
5146 }
5147 }
5148
5149 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeInfoDeprecated<'de>
5150 where
5151 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5152 ___D: ::fidl_next::Decoder<'de>,
5153 ___D: ::fidl_next::fuchsia::HandleDecoder,
5154 {
5155 fn decode(
5156 mut slot: ::fidl_next::Slot<'_, Self>,
5157 decoder: &mut ___D,
5158 _: (),
5159 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5160 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5161 match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
5162 1 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::Service>(
5163 raw,
5164 decoder,
5165 (),
5166 )?,
5167
5168 2 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::FileObject>(
5169 raw,
5170 decoder,
5171 (),
5172 )?,
5173
5174 3 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::DirectoryObject>(
5175 raw,
5176 decoder,
5177 (),
5178 )?,
5179
5180 4 => ::fidl_next::wire::Union::decode_as::<___D, crate::wire::SymlinkObject<'de>>(
5181 raw,
5182 decoder,
5183 (),
5184 )?,
5185
5186 0 => ::fidl_next::wire::Union::decode_absent(raw)?,
5187 _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
5188 }
5189
5190 Ok(())
5191 }
5192 }
5193
5194 impl<'de> ::core::fmt::Debug for NodeInfoDeprecated<'de> {
5195 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5196 self.as_ref().fmt(f)
5197 }
5198 }
5199
5200 impl<'de> ::fidl_next::IntoNatural for NodeInfoDeprecated<'de> {
5201 type Natural = ::core::option::Option<crate::natural::NodeInfoDeprecated>;
5202 }
5203}
5204
5205pub mod generic {
5206
5207 pub use fidl_next_common_fuchsia_io::generic::*;
5208
5209 pub struct DirectoryLinkRequest<T0, T1, T2> {
5211 pub src: T0,
5212
5213 pub dst_parent_token: T1,
5214
5215 pub dst: T2,
5216 }
5217
5218 unsafe impl<___E, T0, T1, T2>
5219 ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
5220 for DirectoryLinkRequest<T0, T1, T2>
5221 where
5222 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5223 ___E: ::fidl_next::Encoder,
5224 ___E: ::fidl_next::fuchsia::HandleEncoder,
5225 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5226 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
5227 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5228 {
5229 #[inline]
5230 fn encode(
5231 self,
5232 encoder_: &mut ___E,
5233 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
5234 _: (),
5235 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5236 ::fidl_next::munge! {
5237 let crate::wire::DirectoryLinkRequest {
5238 src,
5239 dst_parent_token,
5240 dst,
5241
5242 } = out_;
5243 }
5244
5245 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5246
5247 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5248
5249 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5250
5251 Ok(())
5252 }
5253 }
5254
5255 unsafe impl<'a, ___E, T0, T1, T2>
5256 ::fidl_next::Encode<crate::wire::DirectoryLinkRequest<'static>, ___E>
5257 for &'a DirectoryLinkRequest<T0, T1, T2>
5258 where
5259 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5260 ___E: ::fidl_next::Encoder,
5261 ___E: ::fidl_next::fuchsia::HandleEncoder,
5262 &'a T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5263 &'a T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::NullableHandle, ___E>,
5264 &'a T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5265 {
5266 #[inline]
5267 fn encode(
5268 self,
5269 encoder_: &mut ___E,
5270 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryLinkRequest<'static>>,
5271 _: (),
5272 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5273 ::fidl_next::munge! {
5274 let crate::wire::DirectoryLinkRequest {
5275 src,
5276 dst_parent_token,
5277 dst,
5278
5279 } = out_;
5280 }
5281
5282 ::fidl_next::Encode::encode(&self.src, encoder_, src, 255)?;
5283
5284 ::fidl_next::Encode::encode(&self.dst_parent_token, encoder_, dst_parent_token, ())?;
5285
5286 ::fidl_next::Encode::encode(&self.dst, encoder_, dst, 255)?;
5287
5288 Ok(())
5289 }
5290 }
5291
5292 pub struct DirectoryRenameRequest<T0, T1, T2> {
5294 pub src: T0,
5295
5296 pub dst_parent_token: T1,
5297
5298 pub dst: T2,
5299 }
5300
5301 unsafe impl<___E, T0, T1, T2>
5302 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
5303 for DirectoryRenameRequest<T0, T1, T2>
5304 where
5305 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5306 ___E: ::fidl_next::Encoder,
5307 ___E: ::fidl_next::fuchsia::HandleEncoder,
5308 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5309 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5310 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5311 {
5312 #[inline]
5313 fn encode(
5314 self,
5315 encoder_: &mut ___E,
5316 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
5317 _: (),
5318 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5319 ::fidl_next::munge! {
5320 let crate::wire::DirectoryRenameRequest {
5321 src,
5322 dst_parent_token,
5323 dst,
5324
5325 } = out_;
5326 }
5327
5328 ::fidl_next::Encode::encode(self.src, encoder_, src, 255)?;
5329
5330 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
5331
5332 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
5333
5334 Ok(())
5335 }
5336 }
5337
5338 unsafe impl<'a, ___E, T0, T1, T2>
5339 ::fidl_next::Encode<crate::wire::DirectoryRenameRequest<'static>, ___E>
5340 for &'a DirectoryRenameRequest<T0, T1, T2>
5341 where
5342 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5343 ___E: ::fidl_next::Encoder,
5344 ___E: ::fidl_next::fuchsia::HandleEncoder,
5345 &'a T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5346 &'a T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5347 &'a T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5348 {
5349 #[inline]
5350 fn encode(
5351 self,
5352 encoder_: &mut ___E,
5353 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryRenameRequest<'static>>,
5354 _: (),
5355 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5356 ::fidl_next::munge! {
5357 let crate::wire::DirectoryRenameRequest {
5358 src,
5359 dst_parent_token,
5360 dst,
5361
5362 } = out_;
5363 }
5364
5365 ::fidl_next::Encode::encode(&self.src, encoder_, src, 255)?;
5366
5367 ::fidl_next::Encode::encode(&self.dst_parent_token, encoder_, dst_parent_token, ())?;
5368
5369 ::fidl_next::Encode::encode(&self.dst, encoder_, dst, 255)?;
5370
5371 Ok(())
5372 }
5373 }
5374
5375 pub struct DirectoryWatchRequest<T0, T1, T2> {
5377 pub mask: T0,
5378
5379 pub options: T1,
5380
5381 pub watcher: T2,
5382 }
5383
5384 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
5385 for DirectoryWatchRequest<T0, T1, T2>
5386 where
5387 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5388 ___E: ::fidl_next::fuchsia::HandleEncoder,
5389 T0: ::fidl_next::Encode<crate::wire::WatchMask, ___E>,
5390 T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5391 T2: ::fidl_next::Encode<
5392 ::fidl_next::ServerEnd<
5393 crate::DirectoryWatcher,
5394 ::fidl_next::wire::fuchsia::Channel,
5395 >,
5396 ___E,
5397 >,
5398 {
5399 #[inline]
5400 fn encode(
5401 self,
5402 encoder_: &mut ___E,
5403 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
5404 _: (),
5405 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5406 ::fidl_next::munge! {
5407 let crate::wire::DirectoryWatchRequest {
5408 mask,
5409 options,
5410 watcher,
5411
5412 } = out_;
5413 }
5414
5415 ::fidl_next::Encode::encode(self.mask, encoder_, mask, ())?;
5416
5417 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5418
5419 ::fidl_next::Encode::encode(self.watcher, encoder_, watcher, ())?;
5420
5421 Ok(())
5422 }
5423 }
5424
5425 unsafe impl<'a, ___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::DirectoryWatchRequest, ___E>
5426 for &'a DirectoryWatchRequest<T0, T1, T2>
5427 where
5428 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5429 ___E: ::fidl_next::fuchsia::HandleEncoder,
5430 &'a T0: ::fidl_next::Encode<crate::wire::WatchMask, ___E>,
5431 &'a T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5432 &'a T2: ::fidl_next::Encode<
5433 ::fidl_next::ServerEnd<
5434 crate::DirectoryWatcher,
5435 ::fidl_next::wire::fuchsia::Channel,
5436 >,
5437 ___E,
5438 >,
5439 {
5440 #[inline]
5441 fn encode(
5442 self,
5443 encoder_: &mut ___E,
5444 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryWatchRequest>,
5445 _: (),
5446 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5447 ::fidl_next::munge! {
5448 let crate::wire::DirectoryWatchRequest {
5449 mask,
5450 options,
5451 watcher,
5452
5453 } = out_;
5454 }
5455
5456 ::fidl_next::Encode::encode(&self.mask, encoder_, mask, ())?;
5457
5458 ::fidl_next::Encode::encode(&self.options, encoder_, options, ())?;
5459
5460 ::fidl_next::Encode::encode(&self.watcher, encoder_, watcher, ())?;
5461
5462 Ok(())
5463 }
5464 }
5465
5466 pub struct NodeListExtendedAttributesRequest<T0> {
5468 pub iterator: T0,
5469 }
5470
5471 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
5472 for NodeListExtendedAttributesRequest<T0>
5473 where
5474 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5475 ___E: ::fidl_next::fuchsia::HandleEncoder,
5476 T0: ::fidl_next::Encode<
5477 ::fidl_next::ServerEnd<
5478 crate::ExtendedAttributeIterator,
5479 ::fidl_next::wire::fuchsia::Channel,
5480 >,
5481 ___E,
5482 >,
5483 {
5484 #[inline]
5485 fn encode(
5486 self,
5487 encoder_: &mut ___E,
5488 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
5489 _: (),
5490 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5491 ::fidl_next::munge! {
5492 let crate::wire::NodeListExtendedAttributesRequest {
5493 iterator,
5494
5495 } = out_;
5496 }
5497
5498 ::fidl_next::Encode::encode(self.iterator, encoder_, iterator, ())?;
5499
5500 Ok(())
5501 }
5502 }
5503
5504 unsafe impl<'a, ___E, T0>
5505 ::fidl_next::Encode<crate::wire::NodeListExtendedAttributesRequest, ___E>
5506 for &'a NodeListExtendedAttributesRequest<T0>
5507 where
5508 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5509 ___E: ::fidl_next::fuchsia::HandleEncoder,
5510 &'a T0: ::fidl_next::Encode<
5511 ::fidl_next::ServerEnd<
5512 crate::ExtendedAttributeIterator,
5513 ::fidl_next::wire::fuchsia::Channel,
5514 >,
5515 ___E,
5516 >,
5517 {
5518 #[inline]
5519 fn encode(
5520 self,
5521 encoder_: &mut ___E,
5522 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeListExtendedAttributesRequest>,
5523 _: (),
5524 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5525 ::fidl_next::munge! {
5526 let crate::wire::NodeListExtendedAttributesRequest {
5527 iterator,
5528
5529 } = out_;
5530 }
5531
5532 ::fidl_next::Encode::encode(&self.iterator, encoder_, iterator, ())?;
5533
5534 Ok(())
5535 }
5536 }
5537
5538 pub struct NodeSetExtendedAttributeRequest<T0, T1, T2> {
5540 pub name: T0,
5541
5542 pub value: T1,
5543
5544 pub mode: T2,
5545 }
5546
5547 unsafe impl<___E, T0, T1, T2>
5548 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
5549 for NodeSetExtendedAttributeRequest<T0, T1, T2>
5550 where
5551 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5552 ___E: ::fidl_next::Encoder,
5553 ___E: ::fidl_next::fuchsia::HandleEncoder,
5554 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5555 T1: ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
5556 T2: ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>,
5557 {
5558 #[inline]
5559 fn encode(
5560 self,
5561 encoder_: &mut ___E,
5562 out_: &mut ::core::mem::MaybeUninit<
5563 crate::wire::NodeSetExtendedAttributeRequest<'static>,
5564 >,
5565 _: (),
5566 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5567 ::fidl_next::munge! {
5568 let crate::wire::NodeSetExtendedAttributeRequest {
5569 name,
5570 value,
5571 mode,
5572
5573 } = out_;
5574 }
5575
5576 ::fidl_next::Encode::encode(self.name, encoder_, name, (255, ()))?;
5577
5578 ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
5579
5580 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
5581
5582 Ok(())
5583 }
5584 }
5585
5586 unsafe impl<'a, ___E, T0, T1, T2>
5587 ::fidl_next::Encode<crate::wire::NodeSetExtendedAttributeRequest<'static>, ___E>
5588 for &'a NodeSetExtendedAttributeRequest<T0, T1, T2>
5589 where
5590 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5591 ___E: ::fidl_next::Encoder,
5592 ___E: ::fidl_next::fuchsia::HandleEncoder,
5593 &'a T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
5594 &'a T1: ::fidl_next::Encode<crate::wire::ExtendedAttributeValue<'static>, ___E>,
5595 &'a T2: ::fidl_next::Encode<crate::wire::SetExtendedAttributeMode, ___E>,
5596 {
5597 #[inline]
5598 fn encode(
5599 self,
5600 encoder_: &mut ___E,
5601 out_: &mut ::core::mem::MaybeUninit<
5602 crate::wire::NodeSetExtendedAttributeRequest<'static>,
5603 >,
5604 _: (),
5605 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5606 ::fidl_next::munge! {
5607 let crate::wire::NodeSetExtendedAttributeRequest {
5608 name,
5609 value,
5610 mode,
5611
5612 } = out_;
5613 }
5614
5615 ::fidl_next::Encode::encode(&self.name, encoder_, name, (255, ()))?;
5616
5617 ::fidl_next::Encode::encode(&self.value, encoder_, value, ())?;
5618
5619 ::fidl_next::Encode::encode(&self.mode, encoder_, mode, ())?;
5620
5621 Ok(())
5622 }
5623 }
5624
5625 pub struct NodeGetTokenResponse<T0> {
5627 pub token: T0,
5628 }
5629
5630 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeGetTokenResponse, ___E>
5631 for NodeGetTokenResponse<T0>
5632 where
5633 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5634 ___E: ::fidl_next::fuchsia::HandleEncoder,
5635 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5636 {
5637 #[inline]
5638 fn encode(
5639 self,
5640 encoder_: &mut ___E,
5641 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetTokenResponse>,
5642 _: (),
5643 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5644 ::fidl_next::munge! {
5645 let crate::wire::NodeGetTokenResponse {
5646 token,
5647
5648 } = out_;
5649 }
5650
5651 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
5652
5653 Ok(())
5654 }
5655 }
5656
5657 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::NodeGetTokenResponse, ___E>
5658 for &'a NodeGetTokenResponse<T0>
5659 where
5660 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5661 ___E: ::fidl_next::fuchsia::HandleEncoder,
5662 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
5663 {
5664 #[inline]
5665 fn encode(
5666 self,
5667 encoder_: &mut ___E,
5668 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeGetTokenResponse>,
5669 _: (),
5670 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5671 ::fidl_next::munge! {
5672 let crate::wire::NodeGetTokenResponse {
5673 token,
5674
5675 } = out_;
5676 }
5677
5678 ::fidl_next::Encode::encode(&self.token, encoder_, token, ())?;
5679
5680 Ok(())
5681 }
5682 }
5683
5684 pub struct DirectoryDeprecatedGetTokenResponse<T0, T1> {
5686 pub s: T0,
5687
5688 pub token: T1,
5689 }
5690
5691 unsafe impl<___E, T0, T1>
5692 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedGetTokenResponse, ___E>
5693 for DirectoryDeprecatedGetTokenResponse<T0, T1>
5694 where
5695 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5696 ___E: ::fidl_next::fuchsia::HandleEncoder,
5697 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
5698 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
5699 {
5700 #[inline]
5701 fn encode(
5702 self,
5703 encoder_: &mut ___E,
5704 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryDeprecatedGetTokenResponse>,
5705 _: (),
5706 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5707 ::fidl_next::munge! {
5708 let crate::wire::DirectoryDeprecatedGetTokenResponse {
5709 s,
5710 token,
5711
5712 } = out_;
5713 }
5714
5715 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5716
5717 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
5718
5719 Ok(())
5720 }
5721 }
5722
5723 unsafe impl<'a, ___E, T0, T1>
5724 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedGetTokenResponse, ___E>
5725 for &'a DirectoryDeprecatedGetTokenResponse<T0, T1>
5726 where
5727 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5728 ___E: ::fidl_next::fuchsia::HandleEncoder,
5729 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
5730 &'a T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalNullableHandle, ___E>,
5731 {
5732 #[inline]
5733 fn encode(
5734 self,
5735 encoder_: &mut ___E,
5736 out_: &mut ::core::mem::MaybeUninit<crate::wire::DirectoryDeprecatedGetTokenResponse>,
5737 _: (),
5738 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5739 ::fidl_next::munge! {
5740 let crate::wire::DirectoryDeprecatedGetTokenResponse {
5741 s,
5742 token,
5743
5744 } = out_;
5745 }
5746
5747 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
5748
5749 ::fidl_next::Encode::encode(&self.token, encoder_, token, ())?;
5750
5751 Ok(())
5752 }
5753 }
5754
5755 pub struct OpenableOpenRequest<T0, T1, T2, T3> {
5757 pub path: T0,
5758
5759 pub flags: T1,
5760
5761 pub options: T2,
5762
5763 pub object: T3,
5764 }
5765
5766 unsafe impl<___E, T0, T1, T2, T3>
5767 ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'static>, ___E>
5768 for OpenableOpenRequest<T0, T1, T2, T3>
5769 where
5770 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5771 ___E: ::fidl_next::Encoder,
5772 ___E: ::fidl_next::fuchsia::HandleEncoder,
5773 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5774 T1: ::fidl_next::Encode<crate::wire::Flags, ___E>,
5775 T2: ::fidl_next::Encode<crate::wire::Options<'static>, ___E>,
5776 T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
5777 {
5778 #[inline]
5779 fn encode(
5780 self,
5781 encoder_: &mut ___E,
5782 out_: &mut ::core::mem::MaybeUninit<crate::wire::OpenableOpenRequest<'static>>,
5783 _: (),
5784 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5785 ::fidl_next::munge! {
5786 let crate::wire::OpenableOpenRequest {
5787 path,
5788 flags,
5789 options,
5790 object,
5791
5792 } = out_;
5793 }
5794
5795 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
5796
5797 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5798
5799 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
5800
5801 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5802
5803 Ok(())
5804 }
5805 }
5806
5807 unsafe impl<'a, ___E, T0, T1, T2, T3>
5808 ::fidl_next::Encode<crate::wire::OpenableOpenRequest<'static>, ___E>
5809 for &'a OpenableOpenRequest<T0, T1, T2, T3>
5810 where
5811 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5812 ___E: ::fidl_next::Encoder,
5813 ___E: ::fidl_next::fuchsia::HandleEncoder,
5814 &'a T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
5815 &'a T1: ::fidl_next::Encode<crate::wire::Flags, ___E>,
5816 &'a T2: ::fidl_next::Encode<crate::wire::Options<'static>, ___E>,
5817 &'a T3: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Channel, ___E>,
5818 {
5819 #[inline]
5820 fn encode(
5821 self,
5822 encoder_: &mut ___E,
5823 out_: &mut ::core::mem::MaybeUninit<crate::wire::OpenableOpenRequest<'static>>,
5824 _: (),
5825 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5826 ::fidl_next::munge! {
5827 let crate::wire::OpenableOpenRequest {
5828 path,
5829 flags,
5830 options,
5831 object,
5832
5833 } = out_;
5834 }
5835
5836 ::fidl_next::Encode::encode(&self.path, encoder_, path, 4095)?;
5837
5838 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
5839
5840 ::fidl_next::Encode::encode(&self.options, encoder_, options, ())?;
5841
5842 ::fidl_next::Encode::encode(&self.object, encoder_, object, ())?;
5843
5844 Ok(())
5845 }
5846 }
5847
5848 pub struct NodeDeprecatedCloneRequest<T0, T1> {
5850 pub flags: T0,
5851
5852 pub object: T1,
5853 }
5854
5855 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
5856 for NodeDeprecatedCloneRequest<T0, T1>
5857 where
5858 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5859 ___E: ::fidl_next::fuchsia::HandleEncoder,
5860 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5861 T1: ::fidl_next::Encode<
5862 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5863 ___E,
5864 >,
5865 {
5866 #[inline]
5867 fn encode(
5868 self,
5869 encoder_: &mut ___E,
5870 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
5871 _: (),
5872 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5873 ::fidl_next::munge! {
5874 let crate::wire::NodeDeprecatedCloneRequest {
5875 flags,
5876 object,
5877
5878 } = out_;
5879 }
5880
5881 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
5882
5883 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
5884
5885 Ok(())
5886 }
5887 }
5888
5889 unsafe impl<'a, ___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeDeprecatedCloneRequest, ___E>
5890 for &'a NodeDeprecatedCloneRequest<T0, T1>
5891 where
5892 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5893 ___E: ::fidl_next::fuchsia::HandleEncoder,
5894 &'a T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
5895 &'a T1: ::fidl_next::Encode<
5896 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
5897 ___E,
5898 >,
5899 {
5900 #[inline]
5901 fn encode(
5902 self,
5903 encoder_: &mut ___E,
5904 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeDeprecatedCloneRequest>,
5905 _: (),
5906 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5907 ::fidl_next::munge! {
5908 let crate::wire::NodeDeprecatedCloneRequest {
5909 flags,
5910 object,
5911
5912 } = out_;
5913 }
5914
5915 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
5916
5917 ::fidl_next::Encode::encode(&self.object, encoder_, object, ())?;
5918
5919 Ok(())
5920 }
5921 }
5922
5923 pub struct NodeOnOpenRequest<T0, T1> {
5925 pub s: T0,
5926
5927 pub info: T1,
5928 }
5929
5930 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
5931 for NodeOnOpenRequest<T0, T1>
5932 where
5933 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5934 ___E: ::fidl_next::Encoder,
5935 ___E: ::fidl_next::fuchsia::HandleEncoder,
5936 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
5937 T1: ::fidl_next::Encode<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>,
5938 {
5939 #[inline]
5940 fn encode(
5941 self,
5942 encoder_: &mut ___E,
5943 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
5944 _: (),
5945 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5946 ::fidl_next::munge! {
5947 let crate::wire::NodeOnOpenRequest {
5948 s,
5949 info,
5950
5951 } = out_;
5952 }
5953
5954 ::fidl_next::Encode::encode(self.s, encoder_, s, ())?;
5955
5956 ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
5957
5958 Ok(())
5959 }
5960 }
5961
5962 unsafe impl<'a, ___E, T0, T1> ::fidl_next::Encode<crate::wire::NodeOnOpenRequest<'static>, ___E>
5963 for &'a NodeOnOpenRequest<T0, T1>
5964 where
5965 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5966 ___E: ::fidl_next::Encoder,
5967 ___E: ::fidl_next::fuchsia::HandleEncoder,
5968 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::StatusResult, ___E>,
5969 &'a T1: ::fidl_next::Encode<crate::wire_optional::NodeInfoDeprecated<'static>, ___E>,
5970 {
5971 #[inline]
5972 fn encode(
5973 self,
5974 encoder_: &mut ___E,
5975 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeOnOpenRequest<'static>>,
5976 _: (),
5977 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5978 ::fidl_next::munge! {
5979 let crate::wire::NodeOnOpenRequest {
5980 s,
5981 info,
5982
5983 } = out_;
5984 }
5985
5986 ::fidl_next::Encode::encode(&self.s, encoder_, s, ())?;
5987
5988 ::fidl_next::Encode::encode(&self.info, encoder_, info, ())?;
5989
5990 Ok(())
5991 }
5992 }
5993
5994 pub struct DirectoryDeprecatedOpenRequest<T0, T1, T2, T3> {
5996 pub flags: T0,
5997
5998 pub mode: T1,
5999
6000 pub path: T2,
6001
6002 pub object: T3,
6003 }
6004
6005 unsafe impl<___E, T0, T1, T2, T3>
6006 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
6007 for DirectoryDeprecatedOpenRequest<T0, T1, T2, T3>
6008 where
6009 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6010 ___E: ::fidl_next::Encoder,
6011 ___E: ::fidl_next::fuchsia::HandleEncoder,
6012 T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
6013 T1: ::fidl_next::Encode<crate::wire::ModeType, ___E>,
6014 T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
6015 T3: ::fidl_next::Encode<
6016 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
6017 ___E,
6018 >,
6019 {
6020 #[inline]
6021 fn encode(
6022 self,
6023 encoder_: &mut ___E,
6024 out_: &mut ::core::mem::MaybeUninit<
6025 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
6026 >,
6027 _: (),
6028 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6029 ::fidl_next::munge! {
6030 let crate::wire::DirectoryDeprecatedOpenRequest {
6031 flags,
6032 mode,
6033 path,
6034 object,
6035
6036 } = out_;
6037 }
6038
6039 ::fidl_next::Encode::encode(self.flags, encoder_, flags, ())?;
6040
6041 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
6042
6043 ::fidl_next::Encode::encode(self.path, encoder_, path, 4095)?;
6044
6045 ::fidl_next::Encode::encode(self.object, encoder_, object, ())?;
6046
6047 Ok(())
6048 }
6049 }
6050
6051 unsafe impl<'a, ___E, T0, T1, T2, T3>
6052 ::fidl_next::Encode<crate::wire::DirectoryDeprecatedOpenRequest<'static>, ___E>
6053 for &'a DirectoryDeprecatedOpenRequest<T0, T1, T2, T3>
6054 where
6055 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6056 ___E: ::fidl_next::Encoder,
6057 ___E: ::fidl_next::fuchsia::HandleEncoder,
6058 &'a T0: ::fidl_next::Encode<crate::wire::OpenFlags, ___E>,
6059 &'a T1: ::fidl_next::Encode<crate::wire::ModeType, ___E>,
6060 &'a T2: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
6061 &'a T3: ::fidl_next::Encode<
6062 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
6063 ___E,
6064 >,
6065 {
6066 #[inline]
6067 fn encode(
6068 self,
6069 encoder_: &mut ___E,
6070 out_: &mut ::core::mem::MaybeUninit<
6071 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
6072 >,
6073 _: (),
6074 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6075 ::fidl_next::munge! {
6076 let crate::wire::DirectoryDeprecatedOpenRequest {
6077 flags,
6078 mode,
6079 path,
6080 object,
6081
6082 } = out_;
6083 }
6084
6085 ::fidl_next::Encode::encode(&self.flags, encoder_, flags, ())?;
6086
6087 ::fidl_next::Encode::encode(&self.mode, encoder_, mode, ())?;
6088
6089 ::fidl_next::Encode::encode(&self.path, encoder_, path, 4095)?;
6090
6091 ::fidl_next::Encode::encode(&self.object, encoder_, object, ())?;
6092
6093 Ok(())
6094 }
6095 }
6096
6097 pub struct DirectoryCreateSymlinkRequest<T0, T1, T2> {
6099 pub name: T0,
6100
6101 pub target: T1,
6102
6103 pub connection: T2,
6104 }
6105
6106 unsafe impl<___E, T0, T1, T2>
6107 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
6108 for DirectoryCreateSymlinkRequest<T0, T1, T2>
6109 where
6110 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6111 ___E: ::fidl_next::Encoder,
6112 ___E: ::fidl_next::fuchsia::HandleEncoder,
6113 T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
6114 T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
6115 T2: ::fidl_next::Encode<
6116 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
6117 ___E,
6118 >,
6119 {
6120 #[inline]
6121 fn encode(
6122 self,
6123 encoder_: &mut ___E,
6124 out_: &mut ::core::mem::MaybeUninit<
6125 crate::wire::DirectoryCreateSymlinkRequest<'static>,
6126 >,
6127 _: (),
6128 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6129 ::fidl_next::munge! {
6130 let crate::wire::DirectoryCreateSymlinkRequest {
6131 name,
6132 target,
6133 connection,
6134
6135 } = out_;
6136 }
6137
6138 ::fidl_next::Encode::encode(self.name, encoder_, name, 255)?;
6139
6140 ::fidl_next::Encode::encode(self.target, encoder_, target, (4095, ()))?;
6141
6142 ::fidl_next::Encode::encode(self.connection, encoder_, connection, ())?;
6143
6144 Ok(())
6145 }
6146 }
6147
6148 unsafe impl<'a, ___E, T0, T1, T2>
6149 ::fidl_next::Encode<crate::wire::DirectoryCreateSymlinkRequest<'static>, ___E>
6150 for &'a DirectoryCreateSymlinkRequest<T0, T1, T2>
6151 where
6152 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6153 ___E: ::fidl_next::Encoder,
6154 ___E: ::fidl_next::fuchsia::HandleEncoder,
6155 &'a T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
6156 &'a T1: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
6157 &'a T2: ::fidl_next::Encode<
6158 ::fidl_next::ServerEnd<crate::Symlink, ::fidl_next::wire::fuchsia::OptionalChannel>,
6159 ___E,
6160 >,
6161 {
6162 #[inline]
6163 fn encode(
6164 self,
6165 encoder_: &mut ___E,
6166 out_: &mut ::core::mem::MaybeUninit<
6167 crate::wire::DirectoryCreateSymlinkRequest<'static>,
6168 >,
6169 _: (),
6170 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6171 ::fidl_next::munge! {
6172 let crate::wire::DirectoryCreateSymlinkRequest {
6173 name,
6174 target,
6175 connection,
6176
6177 } = out_;
6178 }
6179
6180 ::fidl_next::Encode::encode(&self.name, encoder_, name, 255)?;
6181
6182 ::fidl_next::Encode::encode(&self.target, encoder_, target, (4095, ()))?;
6183
6184 ::fidl_next::Encode::encode(&self.connection, encoder_, connection, ())?;
6185
6186 Ok(())
6187 }
6188 }
6189
6190 pub struct FileGetBackingMemoryResponse<T0> {
6192 pub vmo: T0,
6193 }
6194
6195 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
6196 for FileGetBackingMemoryResponse<T0>
6197 where
6198 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6199 ___E: ::fidl_next::fuchsia::HandleEncoder,
6200 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
6201 {
6202 #[inline]
6203 fn encode(
6204 self,
6205 encoder_: &mut ___E,
6206 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
6207 _: (),
6208 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6209 ::fidl_next::munge! {
6210 let crate::wire::FileGetBackingMemoryResponse {
6211 vmo,
6212
6213 } = out_;
6214 }
6215
6216 ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
6217
6218 Ok(())
6219 }
6220 }
6221
6222 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::FileGetBackingMemoryResponse, ___E>
6223 for &'a FileGetBackingMemoryResponse<T0>
6224 where
6225 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6226 ___E: ::fidl_next::fuchsia::HandleEncoder,
6227 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
6228 {
6229 #[inline]
6230 fn encode(
6231 self,
6232 encoder_: &mut ___E,
6233 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileGetBackingMemoryResponse>,
6234 _: (),
6235 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6236 ::fidl_next::munge! {
6237 let crate::wire::FileGetBackingMemoryResponse {
6238 vmo,
6239
6240 } = out_;
6241 }
6242
6243 ::fidl_next::Encode::encode(&self.vmo, encoder_, vmo, ())?;
6244
6245 Ok(())
6246 }
6247 }
6248
6249 pub struct LinkableLinkIntoRequest<T0, T1> {
6251 pub dst_parent_token: T0,
6252
6253 pub dst: T1,
6254 }
6255
6256 unsafe impl<___E, T0, T1>
6257 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
6258 for LinkableLinkIntoRequest<T0, T1>
6259 where
6260 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6261 ___E: ::fidl_next::Encoder,
6262 ___E: ::fidl_next::fuchsia::HandleEncoder,
6263 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
6264 T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
6265 {
6266 #[inline]
6267 fn encode(
6268 self,
6269 encoder_: &mut ___E,
6270 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
6271 _: (),
6272 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6273 ::fidl_next::munge! {
6274 let crate::wire::LinkableLinkIntoRequest {
6275 dst_parent_token,
6276 dst,
6277
6278 } = out_;
6279 }
6280
6281 ::fidl_next::Encode::encode(self.dst_parent_token, encoder_, dst_parent_token, ())?;
6282
6283 ::fidl_next::Encode::encode(self.dst, encoder_, dst, 255)?;
6284
6285 Ok(())
6286 }
6287 }
6288
6289 unsafe impl<'a, ___E, T0, T1>
6290 ::fidl_next::Encode<crate::wire::LinkableLinkIntoRequest<'static>, ___E>
6291 for &'a LinkableLinkIntoRequest<T0, T1>
6292 where
6293 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6294 ___E: ::fidl_next::Encoder,
6295 ___E: ::fidl_next::fuchsia::HandleEncoder,
6296 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
6297 &'a T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
6298 {
6299 #[inline]
6300 fn encode(
6301 self,
6302 encoder_: &mut ___E,
6303 out_: &mut ::core::mem::MaybeUninit<crate::wire::LinkableLinkIntoRequest<'static>>,
6304 _: (),
6305 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6306 ::fidl_next::munge! {
6307 let crate::wire::LinkableLinkIntoRequest {
6308 dst_parent_token,
6309 dst,
6310
6311 } = out_;
6312 }
6313
6314 ::fidl_next::Encode::encode(&self.dst_parent_token, encoder_, dst_parent_token, ())?;
6315
6316 ::fidl_next::Encode::encode(&self.dst, encoder_, dst, 255)?;
6317
6318 Ok(())
6319 }
6320 }
6321
6322 pub struct FileAllocateRequest<T0, T1, T2> {
6324 pub offset: T0,
6325
6326 pub length: T1,
6327
6328 pub mode: T2,
6329 }
6330
6331 unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
6332 for FileAllocateRequest<T0, T1, T2>
6333 where
6334 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6335 ___E: ::fidl_next::fuchsia::HandleEncoder,
6336 T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
6337 T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
6338 T2: ::fidl_next::Encode<crate::wire::AllocateMode, ___E>,
6339 {
6340 #[inline]
6341 fn encode(
6342 self,
6343 encoder_: &mut ___E,
6344 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
6345 _: (),
6346 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6347 ::fidl_next::munge! {
6348 let crate::wire::FileAllocateRequest {
6349 offset,
6350 length,
6351 mode,
6352
6353 } = out_;
6354 }
6355
6356 ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
6357
6358 ::fidl_next::Encode::encode(self.length, encoder_, length, ())?;
6359
6360 ::fidl_next::Encode::encode(self.mode, encoder_, mode, ())?;
6361
6362 Ok(())
6363 }
6364 }
6365
6366 unsafe impl<'a, ___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::FileAllocateRequest, ___E>
6367 for &'a FileAllocateRequest<T0, T1, T2>
6368 where
6369 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6370 ___E: ::fidl_next::fuchsia::HandleEncoder,
6371 &'a T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
6372 &'a T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
6373 &'a T2: ::fidl_next::Encode<crate::wire::AllocateMode, ___E>,
6374 {
6375 #[inline]
6376 fn encode(
6377 self,
6378 encoder_: &mut ___E,
6379 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileAllocateRequest>,
6380 _: (),
6381 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6382 ::fidl_next::munge! {
6383 let crate::wire::FileAllocateRequest {
6384 offset,
6385 length,
6386 mode,
6387
6388 } = out_;
6389 }
6390
6391 ::fidl_next::Encode::encode(&self.offset, encoder_, offset, ())?;
6392
6393 ::fidl_next::Encode::encode(&self.length, encoder_, length, ())?;
6394
6395 ::fidl_next::Encode::encode(&self.mode, encoder_, mode, ())?;
6396
6397 Ok(())
6398 }
6399 }
6400
6401 pub struct FileEnableVerityRequest<T0> {
6403 pub options: T0,
6404 }
6405
6406 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
6407 for FileEnableVerityRequest<T0>
6408 where
6409 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6410 ___E: ::fidl_next::Encoder,
6411 ___E: ::fidl_next::fuchsia::HandleEncoder,
6412 T0: ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>,
6413 {
6414 #[inline]
6415 fn encode(
6416 self,
6417 encoder_: &mut ___E,
6418 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
6419 _: (),
6420 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6421 ::fidl_next::munge! {
6422 let crate::wire::FileEnableVerityRequest {
6423 options,
6424
6425 } = out_;
6426 }
6427
6428 ::fidl_next::Encode::encode(self.options, encoder_, options, ())?;
6429
6430 Ok(())
6431 }
6432 }
6433
6434 unsafe impl<'a, ___E, T0>
6435 ::fidl_next::Encode<crate::wire::FileEnableVerityRequest<'static>, ___E>
6436 for &'a FileEnableVerityRequest<T0>
6437 where
6438 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6439 ___E: ::fidl_next::Encoder,
6440 ___E: ::fidl_next::fuchsia::HandleEncoder,
6441 &'a T0: ::fidl_next::Encode<crate::wire::VerificationOptions<'static>, ___E>,
6442 {
6443 #[inline]
6444 fn encode(
6445 self,
6446 encoder_: &mut ___E,
6447 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileEnableVerityRequest<'static>>,
6448 _: (),
6449 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6450 ::fidl_next::munge! {
6451 let crate::wire::FileEnableVerityRequest {
6452 options,
6453
6454 } = out_;
6455 }
6456
6457 ::fidl_next::Encode::encode(&self.options, encoder_, options, ())?;
6458
6459 Ok(())
6460 }
6461 }
6462
6463 pub struct FileObject<T0, T1> {
6465 pub event: T0,
6466
6467 pub stream: T1,
6468 }
6469
6470 unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::FileObject, ___E> for FileObject<T0, T1>
6471 where
6472 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6473 ___E: ::fidl_next::fuchsia::HandleEncoder,
6474 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
6475 T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalStream, ___E>,
6476 {
6477 #[inline]
6478 fn encode(
6479 self,
6480 encoder_: &mut ___E,
6481 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
6482 _: (),
6483 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6484 ::fidl_next::munge! {
6485 let crate::wire::FileObject {
6486 event,
6487 stream,
6488
6489 } = out_;
6490 }
6491
6492 ::fidl_next::Encode::encode(self.event, encoder_, event, ())?;
6493
6494 ::fidl_next::Encode::encode(self.stream, encoder_, stream, ())?;
6495
6496 Ok(())
6497 }
6498 }
6499
6500 unsafe impl<'a, ___E, T0, T1> ::fidl_next::Encode<crate::wire::FileObject, ___E>
6501 for &'a FileObject<T0, T1>
6502 where
6503 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6504 ___E: ::fidl_next::fuchsia::HandleEncoder,
6505 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEvent, ___E>,
6506 &'a T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalStream, ___E>,
6507 {
6508 #[inline]
6509 fn encode(
6510 self,
6511 encoder_: &mut ___E,
6512 out_: &mut ::core::mem::MaybeUninit<crate::wire::FileObject>,
6513 _: (),
6514 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6515 ::fidl_next::munge! {
6516 let crate::wire::FileObject {
6517 event,
6518 stream,
6519
6520 } = out_;
6521 }
6522
6523 ::fidl_next::Encode::encode(&self.event, encoder_, event, ())?;
6524
6525 ::fidl_next::Encode::encode(&self.stream, encoder_, stream, ())?;
6526
6527 Ok(())
6528 }
6529 }
6530}
6531
6532pub use self::natural::*;
6533
6534#[doc = " Openable defines a node which is capable of opening other objects.\n"]
6536#[derive(PartialEq, Debug)]
6537pub struct Openable;
6538
6539#[cfg(target_os = "fuchsia")]
6540impl ::fidl_next::HasTransport for Openable {
6541 type Transport = ::fidl_next::fuchsia::zx::Channel;
6542}
6543
6544pub mod openable {
6545 pub mod prelude {
6546 pub use crate::{
6547 Openable, OpenableClientHandler, OpenableLocalClientHandler,
6548 OpenableLocalServerHandler, OpenableServerHandler, openable,
6549 };
6550
6551 pub use crate::natural::OpenableOpenRequest;
6552 }
6553
6554 pub struct Open;
6555
6556 impl ::fidl_next::Method for Open {
6557 const ORDINAL: u64 = 6236883748953765593;
6558 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6559 ::fidl_next::protocol::Flexibility::Flexible;
6560
6561 type Protocol = crate::Openable;
6562
6563 type Request = crate::wire::OpenableOpenRequest<'static>;
6564 }
6565
6566 mod ___detail {
6567 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Openable
6568 where
6569 ___T: ::fidl_next::Transport,
6570 {
6571 type Client = OpenableClient<___T>;
6572 type Server = OpenableServer<___T>;
6573 }
6574
6575 #[repr(transparent)]
6577 pub struct OpenableClient<___T: ::fidl_next::Transport> {
6578 #[allow(dead_code)]
6579 client: ::fidl_next::protocol::Client<___T>,
6580 }
6581
6582 impl<___T> OpenableClient<___T>
6583 where
6584 ___T: ::fidl_next::Transport,
6585 {
6586 #[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"]
6587 pub fn open(
6588 &self,
6589
6590 path: impl ::fidl_next::Encode<
6591 ::fidl_next::wire::String<'static>,
6592 <___T as ::fidl_next::Transport>::SendBuffer,
6593 >,
6594
6595 flags: impl ::fidl_next::Encode<
6596 crate::wire::Flags,
6597 <___T as ::fidl_next::Transport>::SendBuffer,
6598 >,
6599
6600 options: impl ::fidl_next::Encode<
6601 crate::wire::Options<'static>,
6602 <___T as ::fidl_next::Transport>::SendBuffer,
6603 >,
6604
6605 object: impl ::fidl_next::Encode<
6606 ::fidl_next::wire::fuchsia::Channel,
6607 <___T as ::fidl_next::Transport>::SendBuffer,
6608 >,
6609 ) -> ::fidl_next::SendFuture<'_, ___T>
6610 where
6611 <___T as ::fidl_next::Transport>::SendBuffer:
6612 ::fidl_next::encoder::InternalHandleEncoder,
6613 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6614 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6615 {
6616 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
6617 }
6618
6619 #[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"]
6620 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6621 where
6622 ___R: ::fidl_next::Encode<
6623 crate::wire::OpenableOpenRequest<'static>,
6624 <___T as ::fidl_next::Transport>::SendBuffer,
6625 >,
6626 {
6627 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
6628 6236883748953765593,
6629 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
6630 request,
6631 ))
6632 }
6633 }
6634
6635 #[repr(transparent)]
6637 pub struct OpenableServer<___T: ::fidl_next::Transport> {
6638 server: ::fidl_next::protocol::Server<___T>,
6639 }
6640
6641 impl<___T> OpenableServer<___T> where ___T: ::fidl_next::Transport {}
6642 }
6643}
6644
6645#[diagnostic::on_unimplemented(
6646 note = "If {Self} implements the non-local OpenableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
6647)]
6648
6649pub trait OpenableLocalClientHandler<
6653 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6654 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6655>
6656{
6657 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6658 ::core::future::ready(())
6659 }
6660}
6661
6662impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Openable
6663where
6664 ___H: OpenableLocalClientHandler<___T>,
6665 ___T: ::fidl_next::Transport,
6666{
6667 async fn on_event(
6668 handler: &mut ___H,
6669 mut message: ::fidl_next::Message<___T>,
6670 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6671 match *message.header().ordinal {
6672 ordinal => {
6673 handler.on_unknown_interaction(ordinal).await;
6674 if ::core::matches!(
6675 message.header().flexibility(),
6676 ::fidl_next::protocol::Flexibility::Strict
6677 ) {
6678 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6679 } else {
6680 Ok(())
6681 }
6682 }
6683 }
6684 }
6685}
6686
6687#[diagnostic::on_unimplemented(
6688 note = "If {Self} implements the non-local OpenableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
6689)]
6690
6691pub trait OpenableLocalServerHandler<
6695 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6696 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6697>
6698{
6699 #[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"]
6700 fn open(
6701 &mut self,
6702
6703 request: ::fidl_next::Request<openable::Open, ___T>,
6704 ) -> impl ::core::future::Future<Output = ()>;
6705
6706 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6707 ::core::future::ready(())
6708 }
6709}
6710
6711impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Openable
6712where
6713 ___H: OpenableLocalServerHandler<___T>,
6714 ___T: ::fidl_next::Transport,
6715 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
6716 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6717 Constraint = (),
6718 >,
6719{
6720 async fn on_one_way(
6721 handler: &mut ___H,
6722 mut message: ::fidl_next::Message<___T>,
6723 ) -> ::core::result::Result<
6724 (),
6725 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6726 > {
6727 match *message.header().ordinal {
6728 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6729 Ok(decoded) => {
6730 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
6731 Ok(())
6732 }
6733 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6734 ordinal: 6236883748953765593,
6735 error,
6736 }),
6737 },
6738
6739 ordinal => {
6740 handler.on_unknown_interaction(ordinal).await;
6741 if ::core::matches!(
6742 message.header().flexibility(),
6743 ::fidl_next::protocol::Flexibility::Strict
6744 ) {
6745 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6746 } else {
6747 Ok(())
6748 }
6749 }
6750 }
6751 }
6752
6753 async fn on_two_way(
6754 handler: &mut ___H,
6755 mut message: ::fidl_next::Message<___T>,
6756 responder: ::fidl_next::protocol::Responder<___T>,
6757 ) -> ::core::result::Result<
6758 (),
6759 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6760 > {
6761 match *message.header().ordinal {
6762 ordinal => {
6763 handler.on_unknown_interaction(ordinal).await;
6764 if ::core::matches!(
6765 message.header().flexibility(),
6766 ::fidl_next::protocol::Flexibility::Strict
6767 ) {
6768 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6769 } else {
6770 responder
6771 .respond_framework_error(
6772 ordinal,
6773 ::fidl_next::FrameworkError::UnknownMethod,
6774 )
6775 .expect("encoding a framework error should never fail")
6776 .await?;
6777 Ok(())
6778 }
6779 }
6780 }
6781 }
6782}
6783
6784pub trait OpenableClientHandler<
6788 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6789 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6790>
6791{
6792 fn on_unknown_interaction(
6793 &mut self,
6794 ordinal: u64,
6795 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6796 ::core::future::ready(())
6797 }
6798}
6799
6800impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Openable
6801where
6802 ___H: OpenableClientHandler<___T> + ::core::marker::Send,
6803 ___T: ::fidl_next::Transport,
6804{
6805 async fn on_event(
6806 handler: &mut ___H,
6807 mut message: ::fidl_next::Message<___T>,
6808 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6809 match *message.header().ordinal {
6810 ordinal => {
6811 handler.on_unknown_interaction(ordinal).await;
6812 if ::core::matches!(
6813 message.header().flexibility(),
6814 ::fidl_next::protocol::Flexibility::Strict
6815 ) {
6816 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6817 } else {
6818 Ok(())
6819 }
6820 }
6821 }
6822 }
6823}
6824
6825pub trait OpenableServerHandler<
6829 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6830 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6831>
6832{
6833 #[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"]
6834 fn open(
6835 &mut self,
6836
6837 request: ::fidl_next::Request<openable::Open, ___T>,
6838 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6839
6840 fn on_unknown_interaction(
6841 &mut self,
6842 ordinal: u64,
6843 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6844 ::core::future::ready(())
6845 }
6846}
6847
6848impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Openable
6849where
6850 ___H: OpenableServerHandler<___T> + ::core::marker::Send,
6851 ___T: ::fidl_next::Transport,
6852 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
6853 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6854 Constraint = (),
6855 >,
6856{
6857 async fn on_one_way(
6858 handler: &mut ___H,
6859 mut message: ::fidl_next::Message<___T>,
6860 ) -> ::core::result::Result<
6861 (),
6862 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6863 > {
6864 match *message.header().ordinal {
6865 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6866 Ok(decoded) => {
6867 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
6868 Ok(())
6869 }
6870 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6871 ordinal: 6236883748953765593,
6872 error,
6873 }),
6874 },
6875
6876 ordinal => {
6877 handler.on_unknown_interaction(ordinal).await;
6878 if ::core::matches!(
6879 message.header().flexibility(),
6880 ::fidl_next::protocol::Flexibility::Strict
6881 ) {
6882 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6883 } else {
6884 Ok(())
6885 }
6886 }
6887 }
6888 }
6889
6890 async fn on_two_way(
6891 handler: &mut ___H,
6892 mut message: ::fidl_next::Message<___T>,
6893 responder: ::fidl_next::protocol::Responder<___T>,
6894 ) -> ::core::result::Result<
6895 (),
6896 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6897 > {
6898 match *message.header().ordinal {
6899 ordinal => {
6900 handler.on_unknown_interaction(ordinal).await;
6901 if ::core::matches!(
6902 message.header().flexibility(),
6903 ::fidl_next::protocol::Flexibility::Strict
6904 ) {
6905 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6906 } else {
6907 responder
6908 .respond_framework_error(
6909 ordinal,
6910 ::fidl_next::FrameworkError::UnknownMethod,
6911 )
6912 .expect("encoding a framework error should never fail")
6913 .await?;
6914 Ok(())
6915 }
6916 }
6917 }
6918 }
6919}
6920
6921impl<___T> OpenableClientHandler<___T> for ::fidl_next::IgnoreEvents
6922where
6923 ___T: ::fidl_next::Transport,
6924{
6925 async fn on_unknown_interaction(&mut self, _: u64) {}
6926}
6927
6928impl<___H, ___T> OpenableLocalClientHandler<___T> for ::fidl_next::Local<___H>
6929where
6930 ___H: OpenableClientHandler<___T>,
6931 ___T: ::fidl_next::Transport,
6932{
6933 async fn on_unknown_interaction(&mut self, ordinal: u64) {
6934 ___H::on_unknown_interaction(&mut self.0, ordinal).await
6935 }
6936}
6937
6938impl<___H, ___T> OpenableLocalServerHandler<___T> for ::fidl_next::Local<___H>
6939where
6940 ___H: OpenableServerHandler<___T>,
6941 ___T: ::fidl_next::Transport,
6942{
6943 async fn open(&mut self, request: ::fidl_next::Request<openable::Open, ___T>) {
6944 ___H::open(&mut self.0, request).await
6945 }
6946
6947 async fn on_unknown_interaction(&mut self, ordinal: u64) {
6948 ___H::on_unknown_interaction(&mut self.0, ordinal).await
6949 }
6950}
6951
6952#[doc = " Node defines the minimal interface for entities which can be accessed in a filesystem.\n"]
6954#[derive(PartialEq, Debug)]
6955pub struct Node;
6956
6957impl ::fidl_next::Discoverable for Node {
6958 const PROTOCOL_NAME: &'static str = "fuchsia.io.Node";
6959}
6960
6961#[cfg(target_os = "fuchsia")]
6962impl ::fidl_next::HasTransport for Node {
6963 type Transport = ::fidl_next::fuchsia::zx::Channel;
6964}
6965
6966pub mod node {
6967 pub mod prelude {
6968 pub use crate::{
6969 Node, NodeClientHandler, NodeLocalClientHandler, NodeLocalServerHandler,
6970 NodeServerHandler, node,
6971 };
6972
6973 pub use crate::natural::ExtendedAttributeValue;
6974
6975 pub use crate::natural::MutableNodeAttributes;
6976
6977 pub use crate::natural::NodeAttributes2;
6978
6979 pub use crate::natural::NodeDeprecatedCloneRequest;
6980
6981 pub use crate::natural::NodeDeprecatedGetAttrResponse;
6982
6983 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
6984
6985 pub use crate::natural::NodeDeprecatedSetAttrRequest;
6986
6987 pub use crate::natural::NodeDeprecatedSetAttrResponse;
6988
6989 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
6990
6991 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
6992
6993 pub use crate::natural::NodeGetAttributesRequest;
6994
6995 pub use crate::natural::NodeGetExtendedAttributeRequest;
6996
6997 pub use crate::natural::NodeListExtendedAttributesRequest;
6998
6999 pub use crate::natural::NodeOnOpenRequest;
7000
7001 pub use crate::natural::NodeQueryFilesystemResponse;
7002
7003 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
7004
7005 pub use crate::natural::NodeSetExtendedAttributeRequest;
7006
7007 pub use crate::natural::NodeSetFlagsRequest;
7008
7009 pub use crate::natural::NodeGetFlagsResponse;
7010
7011 pub use crate::natural::NodeGetTokenResponse;
7012
7013 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
7014
7015 pub use crate::natural::NodeSetExtendedAttributeResponse;
7016
7017 pub use crate::natural::NodeSetFlagsResponse;
7018
7019 pub use crate::natural::NodeSyncResponse;
7020
7021 pub use crate::natural::NodeUpdateAttributesResponse;
7022
7023 pub use crate::natural::Representation;
7024
7025 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
7026
7027 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
7028
7029 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
7030 }
7031
7032 pub struct Clone;
7033
7034 impl ::fidl_next::Method for Clone {
7035 const ORDINAL: u64 = 2366825959783828089;
7036 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7037 ::fidl_next::protocol::Flexibility::Strict;
7038
7039 type Protocol = crate::Node;
7040
7041 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
7042 }
7043
7044 pub struct Close;
7045
7046 impl ::fidl_next::Method for Close {
7047 const ORDINAL: u64 = 6540867515453498750;
7048 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7049 ::fidl_next::protocol::Flexibility::Strict;
7050
7051 type Protocol = crate::Node;
7052
7053 type Request = ::fidl_next::wire::EmptyMessageBody;
7054 }
7055
7056 impl ::fidl_next::TwoWayMethod for Close {
7057 type Response = ::fidl_next::wire::Result<
7058 'static,
7059 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
7060 ::fidl_next::wire::Int32,
7061 >;
7062 }
7063
7064 impl<___R> ::fidl_next::Respond<___R> for Close {
7065 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
7066
7067 fn respond(response: ___R) -> Self::Output {
7068 ::core::result::Result::Ok(response)
7069 }
7070 }
7071
7072 impl<___R> ::fidl_next::RespondErr<___R> for Close {
7073 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7074
7075 fn respond_err(response: ___R) -> Self::Output {
7076 ::core::result::Result::Err(response)
7077 }
7078 }
7079
7080 pub struct Query;
7081
7082 impl ::fidl_next::Method for Query {
7083 const ORDINAL: u64 = 2763219980499352582;
7084 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7085 ::fidl_next::protocol::Flexibility::Strict;
7086
7087 type Protocol = crate::Node;
7088
7089 type Request = ::fidl_next::wire::EmptyMessageBody;
7090 }
7091
7092 impl ::fidl_next::TwoWayMethod for Query {
7093 type Response = ::fidl_next::wire::Strict<
7094 ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
7095 >;
7096 }
7097
7098 impl<___R> ::fidl_next::Respond<___R> for Query {
7099 type Output =
7100 ::fidl_next::Strict<::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>>;
7101
7102 fn respond(response: ___R) -> Self::Output {
7103 ::fidl_next::Strict(::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse {
7104 protocol: response,
7105 })
7106 }
7107 }
7108
7109 pub struct DeprecatedClone;
7110
7111 impl ::fidl_next::Method for DeprecatedClone {
7112 const ORDINAL: u64 = 6512600400724287855;
7113 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7114 ::fidl_next::protocol::Flexibility::Flexible;
7115
7116 type Protocol = crate::Node;
7117
7118 type Request = crate::wire::NodeDeprecatedCloneRequest;
7119 }
7120
7121 pub struct OnOpen;
7122
7123 impl ::fidl_next::Method for OnOpen {
7124 const ORDINAL: u64 = 9207534335756671346;
7125 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7126 ::fidl_next::protocol::Flexibility::Flexible;
7127
7128 type Protocol = crate::Node;
7129
7130 type Request = crate::wire::NodeOnOpenRequest<'static>;
7131 }
7132
7133 pub struct DeprecatedGetAttr;
7134
7135 impl ::fidl_next::Method for DeprecatedGetAttr {
7136 const ORDINAL: u64 = 8689798978500614909;
7137 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7138 ::fidl_next::protocol::Flexibility::Strict;
7139
7140 type Protocol = crate::Node;
7141
7142 type Request = ::fidl_next::wire::EmptyMessageBody;
7143 }
7144
7145 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
7146 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
7147 }
7148
7149 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
7150 type Output = ::fidl_next::Strict<___R>;
7151
7152 fn respond(response: ___R) -> Self::Output {
7153 ::fidl_next::Strict(response)
7154 }
7155 }
7156
7157 pub struct DeprecatedSetAttr;
7158
7159 impl ::fidl_next::Method for DeprecatedSetAttr {
7160 const ORDINAL: u64 = 4721673413776871238;
7161 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7162 ::fidl_next::protocol::Flexibility::Strict;
7163
7164 type Protocol = crate::Node;
7165
7166 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
7167 }
7168
7169 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
7170 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
7171 }
7172
7173 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
7174 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
7175
7176 fn respond(response: ___R) -> Self::Output {
7177 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
7178 }
7179 }
7180
7181 pub struct DeprecatedGetFlags;
7182
7183 impl ::fidl_next::Method for DeprecatedGetFlags {
7184 const ORDINAL: u64 = 6595803110182632097;
7185 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7186 ::fidl_next::protocol::Flexibility::Strict;
7187
7188 type Protocol = crate::Node;
7189
7190 type Request = ::fidl_next::wire::EmptyMessageBody;
7191 }
7192
7193 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
7194 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
7195 }
7196
7197 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
7198 type Output = ::fidl_next::Strict<___R>;
7199
7200 fn respond(response: ___R) -> Self::Output {
7201 ::fidl_next::Strict(response)
7202 }
7203 }
7204
7205 pub struct DeprecatedSetFlags;
7206
7207 impl ::fidl_next::Method for DeprecatedSetFlags {
7208 const ORDINAL: u64 = 5950864159036794675;
7209 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7210 ::fidl_next::protocol::Flexibility::Strict;
7211
7212 type Protocol = crate::Node;
7213
7214 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
7215 }
7216
7217 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
7218 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
7219 }
7220
7221 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
7222 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
7223
7224 fn respond(response: ___R) -> Self::Output {
7225 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
7226 }
7227 }
7228
7229 pub struct GetFlags;
7230
7231 impl ::fidl_next::Method for GetFlags {
7232 const ORDINAL: u64 = 105530239381466147;
7233 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7234 ::fidl_next::protocol::Flexibility::Flexible;
7235
7236 type Protocol = crate::Node;
7237
7238 type Request = ::fidl_next::wire::EmptyMessageBody;
7239 }
7240
7241 impl ::fidl_next::TwoWayMethod for GetFlags {
7242 type Response = ::fidl_next::wire::Result<
7243 'static,
7244 crate::wire::NodeGetFlagsResponse,
7245 ::fidl_next::wire::fuchsia::Status,
7246 >;
7247 }
7248
7249 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
7250 type Output = ::core::result::Result<
7251 crate::generic::NodeGetFlagsResponse<___R>,
7252 ::fidl_next::never::Never,
7253 >;
7254
7255 fn respond(response: ___R) -> Self::Output {
7256 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
7257 }
7258 }
7259
7260 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
7261 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7262
7263 fn respond_err(response: ___R) -> Self::Output {
7264 ::core::result::Result::Err(response)
7265 }
7266 }
7267
7268 pub struct SetFlags;
7269
7270 impl ::fidl_next::Method for SetFlags {
7271 const ORDINAL: u64 = 6172186066099445416;
7272 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7273 ::fidl_next::protocol::Flexibility::Flexible;
7274
7275 type Protocol = crate::Node;
7276
7277 type Request = crate::wire::NodeSetFlagsRequest;
7278 }
7279
7280 impl ::fidl_next::TwoWayMethod for SetFlags {
7281 type Response = ::fidl_next::wire::Result<
7282 'static,
7283 crate::wire::NodeSetFlagsResponse,
7284 ::fidl_next::wire::fuchsia::Status,
7285 >;
7286 }
7287
7288 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
7289 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
7290
7291 fn respond(response: ___R) -> Self::Output {
7292 ::core::result::Result::Ok(response)
7293 }
7294 }
7295
7296 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
7297 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7298
7299 fn respond_err(response: ___R) -> Self::Output {
7300 ::core::result::Result::Err(response)
7301 }
7302 }
7303
7304 pub struct QueryFilesystem;
7305
7306 impl ::fidl_next::Method for QueryFilesystem {
7307 const ORDINAL: u64 = 8013111122914313744;
7308 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7309 ::fidl_next::protocol::Flexibility::Strict;
7310
7311 type Protocol = crate::Node;
7312
7313 type Request = ::fidl_next::wire::EmptyMessageBody;
7314 }
7315
7316 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
7317 type Response =
7318 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
7319 }
7320
7321 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
7322 type Output = ::fidl_next::Strict<___R>;
7323
7324 fn respond(response: ___R) -> Self::Output {
7325 ::fidl_next::Strict(response)
7326 }
7327 }
7328
7329 pub struct OnRepresentation;
7330
7331 impl ::fidl_next::Method for OnRepresentation {
7332 const ORDINAL: u64 = 6679970090861613324;
7333 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7334 ::fidl_next::protocol::Flexibility::Strict;
7335
7336 type Protocol = crate::Node;
7337
7338 type Request = crate::wire::Representation<'static>;
7339 }
7340
7341 pub struct GetToken;
7342
7343 impl ::fidl_next::Method for GetToken {
7344 const ORDINAL: u64 = 5788516050773961964;
7345 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7346 ::fidl_next::protocol::Flexibility::Flexible;
7347
7348 type Protocol = crate::Node;
7349
7350 type Request = ::fidl_next::wire::EmptyMessageBody;
7351 }
7352
7353 impl ::fidl_next::TwoWayMethod for GetToken {
7354 type Response = ::fidl_next::wire::Result<
7355 'static,
7356 crate::wire::NodeGetTokenResponse,
7357 ::fidl_next::wire::fuchsia::Status,
7358 >;
7359 }
7360
7361 impl<___R> ::fidl_next::Respond<___R> for GetToken {
7362 type Output = ::core::result::Result<
7363 crate::generic::NodeGetTokenResponse<___R>,
7364 ::fidl_next::never::Never,
7365 >;
7366
7367 fn respond(response: ___R) -> Self::Output {
7368 ::core::result::Result::Ok(crate::generic::NodeGetTokenResponse { token: response })
7369 }
7370 }
7371
7372 impl<___R> ::fidl_next::RespondErr<___R> for GetToken {
7373 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7374
7375 fn respond_err(response: ___R) -> Self::Output {
7376 ::core::result::Result::Err(response)
7377 }
7378 }
7379
7380 pub struct GetAttributes;
7381
7382 impl ::fidl_next::Method for GetAttributes {
7383 const ORDINAL: u64 = 4414537700416816443;
7384 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7385 ::fidl_next::protocol::Flexibility::Strict;
7386
7387 type Protocol = crate::Node;
7388
7389 type Request = crate::wire::NodeGetAttributesRequest;
7390 }
7391
7392 impl ::fidl_next::TwoWayMethod for GetAttributes {
7393 type Response = ::fidl_next::wire::Result<
7394 'static,
7395 crate::wire::NodeAttributes2<'static>,
7396 ::fidl_next::wire::fuchsia::Status,
7397 >;
7398 }
7399
7400 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
7401 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
7402
7403 fn respond(response: ___R) -> Self::Output {
7404 ::core::result::Result::Ok(response)
7405 }
7406 }
7407
7408 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
7409 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7410
7411 fn respond_err(response: ___R) -> Self::Output {
7412 ::core::result::Result::Err(response)
7413 }
7414 }
7415
7416 pub struct UpdateAttributes;
7417
7418 impl ::fidl_next::Method for UpdateAttributes {
7419 const ORDINAL: u64 = 3677402239314018056;
7420 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7421 ::fidl_next::protocol::Flexibility::Strict;
7422
7423 type Protocol = crate::Node;
7424
7425 type Request = crate::wire::MutableNodeAttributes<'static>;
7426 }
7427
7428 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
7429 type Response = ::fidl_next::wire::Result<
7430 'static,
7431 crate::wire::NodeUpdateAttributesResponse,
7432 ::fidl_next::wire::fuchsia::Status,
7433 >;
7434 }
7435
7436 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
7437 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
7438
7439 fn respond(response: ___R) -> Self::Output {
7440 ::core::result::Result::Ok(response)
7441 }
7442 }
7443
7444 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
7445 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7446
7447 fn respond_err(response: ___R) -> Self::Output {
7448 ::core::result::Result::Err(response)
7449 }
7450 }
7451
7452 pub struct Sync;
7453
7454 impl ::fidl_next::Method for Sync {
7455 const ORDINAL: u64 = 3196473584242777161;
7456 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7457 ::fidl_next::protocol::Flexibility::Strict;
7458
7459 type Protocol = crate::Node;
7460
7461 type Request = ::fidl_next::wire::EmptyMessageBody;
7462 }
7463
7464 impl ::fidl_next::TwoWayMethod for Sync {
7465 type Response = ::fidl_next::wire::Result<
7466 'static,
7467 crate::wire::NodeSyncResponse,
7468 ::fidl_next::wire::fuchsia::Status,
7469 >;
7470 }
7471
7472 impl<___R> ::fidl_next::Respond<___R> for Sync {
7473 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
7474
7475 fn respond(response: ___R) -> Self::Output {
7476 ::core::result::Result::Ok(response)
7477 }
7478 }
7479
7480 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
7481 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7482
7483 fn respond_err(response: ___R) -> Self::Output {
7484 ::core::result::Result::Err(response)
7485 }
7486 }
7487
7488 pub struct ListExtendedAttributes;
7489
7490 impl ::fidl_next::Method for ListExtendedAttributes {
7491 const ORDINAL: u64 = 5431626189872037072;
7492 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7493 ::fidl_next::protocol::Flexibility::Strict;
7494
7495 type Protocol = crate::Node;
7496
7497 type Request = crate::wire::NodeListExtendedAttributesRequest;
7498 }
7499
7500 pub struct GetExtendedAttribute;
7501
7502 impl ::fidl_next::Method for GetExtendedAttribute {
7503 const ORDINAL: u64 = 5043930208506967771;
7504 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7505 ::fidl_next::protocol::Flexibility::Strict;
7506
7507 type Protocol = crate::Node;
7508
7509 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
7510 }
7511
7512 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
7513 type Response = ::fidl_next::wire::Result<
7514 'static,
7515 crate::wire::ExtendedAttributeValue<'static>,
7516 ::fidl_next::wire::fuchsia::Status,
7517 >;
7518 }
7519
7520 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
7521 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
7522
7523 fn respond(response: ___R) -> Self::Output {
7524 ::core::result::Result::Ok(response)
7525 }
7526 }
7527
7528 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
7529 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7530
7531 fn respond_err(response: ___R) -> Self::Output {
7532 ::core::result::Result::Err(response)
7533 }
7534 }
7535
7536 pub struct SetExtendedAttribute;
7537
7538 impl ::fidl_next::Method for SetExtendedAttribute {
7539 const ORDINAL: u64 = 5374223046099989052;
7540 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7541 ::fidl_next::protocol::Flexibility::Strict;
7542
7543 type Protocol = crate::Node;
7544
7545 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
7546 }
7547
7548 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
7549 type Response = ::fidl_next::wire::Result<
7550 'static,
7551 crate::wire::NodeSetExtendedAttributeResponse,
7552 ::fidl_next::wire::fuchsia::Status,
7553 >;
7554 }
7555
7556 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
7557 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
7558
7559 fn respond(response: ___R) -> Self::Output {
7560 ::core::result::Result::Ok(response)
7561 }
7562 }
7563
7564 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
7565 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7566
7567 fn respond_err(response: ___R) -> Self::Output {
7568 ::core::result::Result::Err(response)
7569 }
7570 }
7571
7572 pub struct RemoveExtendedAttribute;
7573
7574 impl ::fidl_next::Method for RemoveExtendedAttribute {
7575 const ORDINAL: u64 = 8794297771444732717;
7576 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7577 ::fidl_next::protocol::Flexibility::Strict;
7578
7579 type Protocol = crate::Node;
7580
7581 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
7582 }
7583
7584 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
7585 type Response = ::fidl_next::wire::Result<
7586 'static,
7587 crate::wire::NodeRemoveExtendedAttributeResponse,
7588 ::fidl_next::wire::fuchsia::Status,
7589 >;
7590 }
7591
7592 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
7593 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
7594
7595 fn respond(response: ___R) -> Self::Output {
7596 ::core::result::Result::Ok(response)
7597 }
7598 }
7599
7600 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
7601 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7602
7603 fn respond_err(response: ___R) -> Self::Output {
7604 ::core::result::Result::Err(response)
7605 }
7606 }
7607
7608 mod ___detail {
7609 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
7610 where
7611 ___T: ::fidl_next::Transport,
7612 {
7613 type Client = NodeClient<___T>;
7614 type Server = NodeServer<___T>;
7615 }
7616
7617 #[repr(transparent)]
7619 pub struct NodeClient<___T: ::fidl_next::Transport> {
7620 #[allow(dead_code)]
7621 client: ::fidl_next::protocol::Client<___T>,
7622 }
7623
7624 impl<___T> NodeClient<___T>
7625 where
7626 ___T: ::fidl_next::Transport,
7627 {
7628 pub fn clone(
7629 &self,
7630
7631 request: impl ::fidl_next::Encode<
7632 ::fidl_next::ServerEnd<
7633 ::fidl_next_fuchsia_unknown::Cloneable,
7634 ::fidl_next::wire::fuchsia::Channel,
7635 >,
7636 <___T as ::fidl_next::Transport>::SendBuffer,
7637 >,
7638 ) -> ::fidl_next::SendFuture<'_, ___T>
7639 where
7640 <___T as ::fidl_next::Transport>::SendBuffer:
7641 ::fidl_next::encoder::InternalHandleEncoder,
7642 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7643 {
7644 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
7645 request,
7646 })
7647 }
7648
7649 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
7650 where
7651 ___R: ::fidl_next::Encode<
7652 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
7653 <___T as ::fidl_next::Transport>::SendBuffer,
7654 >,
7655 {
7656 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7657 2366825959783828089,
7658 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
7659 request,
7660 ))
7661 }
7662
7663 #[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"]
7664 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
7665 ::fidl_next::TwoWayFuture::from_untyped(
7666 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7667 6540867515453498750,
7668 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
7669 (),
7670 ),
7671 )
7672 }
7673
7674 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
7675 ::fidl_next::TwoWayFuture::from_untyped(
7676 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7677 2763219980499352582,
7678 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
7679 (),
7680 ),
7681 )
7682 }
7683
7684 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
7685 pub fn deprecated_clone(
7686 &self,
7687
7688 flags: impl ::fidl_next::Encode<
7689 crate::wire::OpenFlags,
7690 <___T as ::fidl_next::Transport>::SendBuffer,
7691 >,
7692
7693 object: impl ::fidl_next::Encode<
7694 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
7695 <___T as ::fidl_next::Transport>::SendBuffer,
7696 >,
7697 ) -> ::fidl_next::SendFuture<'_, ___T>
7698 where
7699 <___T as ::fidl_next::Transport>::SendBuffer:
7700 ::fidl_next::encoder::InternalHandleEncoder,
7701 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7702 {
7703 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
7704 flags,
7705
7706 object,
7707 })
7708 }
7709
7710 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
7711 pub fn deprecated_clone_with<___R>(
7712 &self,
7713 request: ___R,
7714 ) -> ::fidl_next::SendFuture<'_, ___T>
7715 where
7716 ___R: ::fidl_next::Encode<
7717 crate::wire::NodeDeprecatedCloneRequest,
7718 <___T as ::fidl_next::Transport>::SendBuffer,
7719 >,
7720 {
7721 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7722 6512600400724287855,
7723 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
7724 request,
7725 ))
7726 }
7727
7728 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
7729 pub fn deprecated_get_attr(
7730 &self,
7731 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
7732 ::fidl_next::TwoWayFuture::from_untyped(
7733 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7734 8689798978500614909,
7735 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
7736 (),
7737 ),
7738 )
7739 }
7740
7741 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
7742 pub fn deprecated_set_attr(
7743 &self,
7744
7745 flags: impl ::fidl_next::Encode<
7746 crate::wire::NodeAttributeFlags,
7747 <___T as ::fidl_next::Transport>::SendBuffer,
7748 >,
7749
7750 attributes: impl ::fidl_next::Encode<
7751 crate::wire::NodeAttributes,
7752 <___T as ::fidl_next::Transport>::SendBuffer,
7753 >,
7754 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
7755 where
7756 <___T as ::fidl_next::Transport>::SendBuffer:
7757 ::fidl_next::encoder::InternalHandleEncoder,
7758 {
7759 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
7760 flags,
7761
7762 attributes,
7763 })
7764 }
7765
7766 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
7767 pub fn deprecated_set_attr_with<___R>(
7768 &self,
7769 request: ___R,
7770 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
7771 where
7772 ___R: ::fidl_next::Encode<
7773 crate::wire::NodeDeprecatedSetAttrRequest,
7774 <___T as ::fidl_next::Transport>::SendBuffer,
7775 >,
7776 {
7777 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7778 4721673413776871238,
7779 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
7780 request,
7781 ))
7782 }
7783
7784 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
7785 pub fn deprecated_get_flags(
7786 &self,
7787 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
7788 ::fidl_next::TwoWayFuture::from_untyped(
7789 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7790 6595803110182632097,
7791 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
7792 (),
7793 ),
7794 )
7795 }
7796
7797 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
7798 pub fn deprecated_set_flags(
7799 &self,
7800
7801 flags: impl ::fidl_next::Encode<
7802 crate::wire::OpenFlags,
7803 <___T as ::fidl_next::Transport>::SendBuffer,
7804 >,
7805 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
7806 where
7807 <___T as ::fidl_next::Transport>::SendBuffer:
7808 ::fidl_next::encoder::InternalHandleEncoder,
7809 {
7810 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
7811 flags,
7812 })
7813 }
7814
7815 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
7816 pub fn deprecated_set_flags_with<___R>(
7817 &self,
7818 request: ___R,
7819 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
7820 where
7821 ___R: ::fidl_next::Encode<
7822 crate::wire::NodeDeprecatedSetFlagsRequest,
7823 <___T as ::fidl_next::Transport>::SendBuffer,
7824 >,
7825 {
7826 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7827 5950864159036794675,
7828 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
7829 request,
7830 ))
7831 }
7832
7833 #[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"]
7834 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
7835 ::fidl_next::TwoWayFuture::from_untyped(
7836 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7837 105530239381466147,
7838 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
7839 (),
7840 ),
7841 )
7842 }
7843
7844 #[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"]
7845 pub fn set_flags(
7846 &self,
7847
7848 flags: impl ::fidl_next::Encode<
7849 crate::wire::Flags,
7850 <___T as ::fidl_next::Transport>::SendBuffer,
7851 >,
7852 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
7853 where
7854 <___T as ::fidl_next::Transport>::SendBuffer:
7855 ::fidl_next::encoder::InternalHandleEncoder,
7856 {
7857 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
7858 }
7859
7860 #[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"]
7861 pub fn set_flags_with<___R>(
7862 &self,
7863 request: ___R,
7864 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
7865 where
7866 ___R: ::fidl_next::Encode<
7867 crate::wire::NodeSetFlagsRequest,
7868 <___T as ::fidl_next::Transport>::SendBuffer,
7869 >,
7870 {
7871 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7872 6172186066099445416,
7873 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
7874 request,
7875 ))
7876 }
7877
7878 #[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"]
7879 pub fn query_filesystem(
7880 &self,
7881 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
7882 ::fidl_next::TwoWayFuture::from_untyped(
7883 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7884 8013111122914313744,
7885 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
7886 (),
7887 ),
7888 )
7889 }
7890
7891 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
7892 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
7893 ::fidl_next::TwoWayFuture::from_untyped(
7894 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7895 5788516050773961964,
7896 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
7897 (),
7898 ),
7899 )
7900 }
7901
7902 #[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"]
7903 pub fn get_attributes(
7904 &self,
7905
7906 query: impl ::fidl_next::Encode<
7907 crate::wire::NodeAttributesQuery,
7908 <___T as ::fidl_next::Transport>::SendBuffer,
7909 >,
7910 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
7911 where
7912 <___T as ::fidl_next::Transport>::SendBuffer:
7913 ::fidl_next::encoder::InternalHandleEncoder,
7914 {
7915 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
7916 }
7917
7918 #[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"]
7919 pub fn get_attributes_with<___R>(
7920 &self,
7921 request: ___R,
7922 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
7923 where
7924 ___R: ::fidl_next::Encode<
7925 crate::wire::NodeGetAttributesRequest,
7926 <___T as ::fidl_next::Transport>::SendBuffer,
7927 >,
7928 {
7929 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7930 4414537700416816443,
7931 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
7932 request,
7933 ))
7934 }
7935
7936 #[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"]
7937 pub fn update_attributes_with<___R>(
7938 &self,
7939 request: ___R,
7940 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
7941 where
7942 ___R: ::fidl_next::Encode<
7943 crate::wire::MutableNodeAttributes<'static>,
7944 <___T as ::fidl_next::Transport>::SendBuffer,
7945 >,
7946 {
7947 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7948 3677402239314018056,
7949 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
7950 request,
7951 ))
7952 }
7953
7954 #[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"]
7955 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
7956 ::fidl_next::TwoWayFuture::from_untyped(
7957 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
7958 3196473584242777161,
7959 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
7960 (),
7961 ),
7962 )
7963 }
7964
7965 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
7966 pub fn list_extended_attributes(
7967 &self,
7968
7969 iterator: impl ::fidl_next::Encode<
7970 ::fidl_next::ServerEnd<
7971 crate::ExtendedAttributeIterator,
7972 ::fidl_next::wire::fuchsia::Channel,
7973 >,
7974 <___T as ::fidl_next::Transport>::SendBuffer,
7975 >,
7976 ) -> ::fidl_next::SendFuture<'_, ___T>
7977 where
7978 <___T as ::fidl_next::Transport>::SendBuffer:
7979 ::fidl_next::encoder::InternalHandleEncoder,
7980 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7981 {
7982 self.list_extended_attributes_with(
7983 crate::generic::NodeListExtendedAttributesRequest { iterator },
7984 )
7985 }
7986
7987 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
7988 pub fn list_extended_attributes_with<___R>(
7989 &self,
7990 request: ___R,
7991 ) -> ::fidl_next::SendFuture<'_, ___T>
7992 where
7993 ___R: ::fidl_next::Encode<
7994 crate::wire::NodeListExtendedAttributesRequest,
7995 <___T as ::fidl_next::Transport>::SendBuffer,
7996 >,
7997 {
7998 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
7999 5431626189872037072,
8000 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
8001 request,
8002 ))
8003 }
8004
8005 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
8006 pub fn get_extended_attribute(
8007 &self,
8008
8009 name: impl ::fidl_next::Encode<
8010 ::fidl_next::wire::Vector<'static, u8>,
8011 <___T as ::fidl_next::Transport>::SendBuffer,
8012 >,
8013 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
8014 where
8015 <___T as ::fidl_next::Transport>::SendBuffer:
8016 ::fidl_next::encoder::InternalHandleEncoder,
8017 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8018 {
8019 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
8020 name,
8021 })
8022 }
8023
8024 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
8025 pub fn get_extended_attribute_with<___R>(
8026 &self,
8027 request: ___R,
8028 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
8029 where
8030 ___R: ::fidl_next::Encode<
8031 crate::wire::NodeGetExtendedAttributeRequest<'static>,
8032 <___T as ::fidl_next::Transport>::SendBuffer,
8033 >,
8034 {
8035 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8036 5043930208506967771,
8037 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8038 request,
8039 ))
8040 }
8041
8042 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
8043 pub fn set_extended_attribute(
8044 &self,
8045
8046 name: impl ::fidl_next::Encode<
8047 ::fidl_next::wire::Vector<'static, u8>,
8048 <___T as ::fidl_next::Transport>::SendBuffer,
8049 >,
8050
8051 value: impl ::fidl_next::Encode<
8052 crate::wire::ExtendedAttributeValue<'static>,
8053 <___T as ::fidl_next::Transport>::SendBuffer,
8054 >,
8055
8056 mode: impl ::fidl_next::Encode<
8057 crate::wire::SetExtendedAttributeMode,
8058 <___T as ::fidl_next::Transport>::SendBuffer,
8059 >,
8060 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
8061 where
8062 <___T as ::fidl_next::Transport>::SendBuffer:
8063 ::fidl_next::encoder::InternalHandleEncoder,
8064 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8065 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8066 {
8067 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
8068 name,
8069
8070 value,
8071
8072 mode,
8073 })
8074 }
8075
8076 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
8077 pub fn set_extended_attribute_with<___R>(
8078 &self,
8079 request: ___R,
8080 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
8081 where
8082 ___R: ::fidl_next::Encode<
8083 crate::wire::NodeSetExtendedAttributeRequest<'static>,
8084 <___T as ::fidl_next::Transport>::SendBuffer,
8085 >,
8086 {
8087 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8088 5374223046099989052,
8089 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8090 request,
8091 ))
8092 }
8093
8094 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
8095 pub fn remove_extended_attribute(
8096 &self,
8097
8098 name: impl ::fidl_next::Encode<
8099 ::fidl_next::wire::Vector<'static, u8>,
8100 <___T as ::fidl_next::Transport>::SendBuffer,
8101 >,
8102 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
8103 where
8104 <___T as ::fidl_next::Transport>::SendBuffer:
8105 ::fidl_next::encoder::InternalHandleEncoder,
8106 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8107 {
8108 self.remove_extended_attribute_with(
8109 crate::generic::NodeRemoveExtendedAttributeRequest { name },
8110 )
8111 }
8112
8113 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
8114 pub fn remove_extended_attribute_with<___R>(
8115 &self,
8116 request: ___R,
8117 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
8118 where
8119 ___R: ::fidl_next::Encode<
8120 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
8121 <___T as ::fidl_next::Transport>::SendBuffer,
8122 >,
8123 {
8124 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
8125 8794297771444732717,
8126 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
8127 request,
8128 ))
8129 }
8130 }
8131
8132 #[repr(transparent)]
8134 pub struct NodeServer<___T: ::fidl_next::Transport> {
8135 server: ::fidl_next::protocol::Server<___T>,
8136 }
8137
8138 impl<___T> NodeServer<___T>
8139 where
8140 ___T: ::fidl_next::Transport,
8141 {
8142 #[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"]
8143 pub fn on_open(
8144 &self,
8145
8146 s: impl ::fidl_next::Encode<
8147 ::fidl_next::wire::fuchsia::StatusResult,
8148 <___T as ::fidl_next::Transport>::SendBuffer,
8149 >,
8150
8151 info: impl ::fidl_next::Encode<
8152 crate::wire_optional::NodeInfoDeprecated<'static>,
8153 <___T as ::fidl_next::Transport>::SendBuffer,
8154 >,
8155 ) -> ::fidl_next::SendFuture<'_, ___T>
8156 where
8157 <___T as ::fidl_next::Transport>::SendBuffer:
8158 ::fidl_next::encoder::InternalHandleEncoder,
8159 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8160 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8161 {
8162 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
8163 }
8164
8165 #[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"]
8166
8167 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
8168 where
8169 ___R: ::fidl_next::Encode<
8170 <super::OnOpen as ::fidl_next::Method>::Request,
8171 <___T as ::fidl_next::Transport>::SendBuffer,
8172 >,
8173 {
8174 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
8175 9207534335756671346,
8176 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
8177 request,
8178 ))
8179 }
8180
8181 #[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"]
8182
8183 pub fn on_representation_with<___R>(
8184 &self,
8185 request: ___R,
8186 ) -> ::fidl_next::SendFuture<'_, ___T>
8187 where
8188 ___R: ::fidl_next::Encode<
8189 <super::OnRepresentation as ::fidl_next::Method>::Request,
8190 <___T as ::fidl_next::Transport>::SendBuffer,
8191 >,
8192 {
8193 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
8194 6679970090861613324,
8195 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
8196 request,
8197 ))
8198 }
8199 }
8200 }
8201}
8202
8203#[diagnostic::on_unimplemented(
8204 note = "If {Self} implements the non-local NodeClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
8205)]
8206
8207pub trait NodeLocalClientHandler<
8211 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8212 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8213>
8214{
8215 #[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"]
8216 fn on_open(
8217 &mut self,
8218
8219 request: ::fidl_next::Request<node::OnOpen, ___T>,
8220 ) -> impl ::core::future::Future<Output = ()>;
8221
8222 #[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"]
8223 fn on_representation(
8224 &mut self,
8225
8226 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
8227 ) -> impl ::core::future::Future<Output = ()>;
8228
8229 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
8230 ::core::future::ready(())
8231 }
8232}
8233
8234impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Node
8235where
8236 ___H: NodeLocalClientHandler<___T>,
8237 ___T: ::fidl_next::Transport,
8238 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
8239 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8240 Constraint = (),
8241 >,
8242 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
8243 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8244 Constraint = (),
8245 >,
8246{
8247 async fn on_event(
8248 handler: &mut ___H,
8249 mut message: ::fidl_next::Message<___T>,
8250 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
8251 match *message.header().ordinal {
8252 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8253 Ok(decoded) => {
8254 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
8255 Ok(())
8256 }
8257 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8258 ordinal: 9207534335756671346,
8259 error,
8260 }),
8261 },
8262
8263 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8264 Ok(decoded) => {
8265 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
8266 Ok(())
8267 }
8268 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8269 ordinal: 6679970090861613324,
8270 error,
8271 }),
8272 },
8273
8274 ordinal => {
8275 handler.on_unknown_interaction(ordinal).await;
8276 if ::core::matches!(
8277 message.header().flexibility(),
8278 ::fidl_next::protocol::Flexibility::Strict
8279 ) {
8280 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8281 } else {
8282 Ok(())
8283 }
8284 }
8285 }
8286 }
8287}
8288
8289#[diagnostic::on_unimplemented(
8290 note = "If {Self} implements the non-local NodeServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
8291)]
8292
8293pub trait NodeLocalServerHandler<
8297 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8298 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8299>
8300{
8301 fn clone(
8302 &mut self,
8303
8304 request: ::fidl_next::Request<node::Clone, ___T>,
8305 ) -> impl ::core::future::Future<Output = ()>;
8306
8307 #[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"]
8308 fn close(
8309 &mut self,
8310
8311 responder: ::fidl_next::Responder<node::Close, ___T>,
8312 ) -> impl ::core::future::Future<Output = ()>;
8313
8314 fn query(
8315 &mut self,
8316
8317 responder: ::fidl_next::Responder<node::Query, ___T>,
8318 ) -> impl ::core::future::Future<Output = ()>;
8319
8320 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
8321 fn deprecated_clone(
8322 &mut self,
8323
8324 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
8325 ) -> impl ::core::future::Future<Output = ()>;
8326
8327 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
8328 fn deprecated_get_attr(
8329 &mut self,
8330
8331 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
8332 ) -> impl ::core::future::Future<Output = ()>;
8333
8334 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
8335 fn deprecated_set_attr(
8336 &mut self,
8337
8338 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
8339
8340 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
8341 ) -> impl ::core::future::Future<Output = ()>;
8342
8343 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
8344 fn deprecated_get_flags(
8345 &mut self,
8346
8347 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
8348 ) -> impl ::core::future::Future<Output = ()>;
8349
8350 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
8351 fn deprecated_set_flags(
8352 &mut self,
8353
8354 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
8355
8356 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
8357 ) -> impl ::core::future::Future<Output = ()>;
8358
8359 #[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"]
8360 fn get_flags(
8361 &mut self,
8362
8363 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
8364 ) -> impl ::core::future::Future<Output = ()>;
8365
8366 #[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"]
8367 fn set_flags(
8368 &mut self,
8369
8370 request: ::fidl_next::Request<node::SetFlags, ___T>,
8371
8372 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
8373 ) -> impl ::core::future::Future<Output = ()>;
8374
8375 #[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"]
8376 fn query_filesystem(
8377 &mut self,
8378
8379 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
8380 ) -> impl ::core::future::Future<Output = ()>;
8381
8382 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
8383 fn get_token(
8384 &mut self,
8385
8386 responder: ::fidl_next::Responder<node::GetToken, ___T>,
8387 ) -> impl ::core::future::Future<Output = ()>;
8388
8389 #[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"]
8390 fn get_attributes(
8391 &mut self,
8392
8393 request: ::fidl_next::Request<node::GetAttributes, ___T>,
8394
8395 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
8396 ) -> impl ::core::future::Future<Output = ()>;
8397
8398 #[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"]
8399 fn update_attributes(
8400 &mut self,
8401
8402 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
8403
8404 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
8405 ) -> impl ::core::future::Future<Output = ()>;
8406
8407 #[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"]
8408 fn sync(
8409 &mut self,
8410
8411 responder: ::fidl_next::Responder<node::Sync, ___T>,
8412 ) -> impl ::core::future::Future<Output = ()>;
8413
8414 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
8415 fn list_extended_attributes(
8416 &mut self,
8417
8418 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
8419 ) -> impl ::core::future::Future<Output = ()>;
8420
8421 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
8422 fn get_extended_attribute(
8423 &mut self,
8424
8425 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
8426
8427 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
8428 ) -> impl ::core::future::Future<Output = ()>;
8429
8430 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
8431 fn set_extended_attribute(
8432 &mut self,
8433
8434 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
8435
8436 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
8437 ) -> impl ::core::future::Future<Output = ()>;
8438
8439 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
8440 fn remove_extended_attribute(
8441 &mut self,
8442
8443 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
8444
8445 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
8446 ) -> impl ::core::future::Future<Output = ()>;
8447
8448 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
8449 ::core::future::ready(())
8450 }
8451}
8452
8453impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Node
8454where
8455 ___H: NodeLocalServerHandler<___T>,
8456 ___T: ::fidl_next::Transport,
8457 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
8458 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8459 Constraint = (),
8460 >,
8461 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
8462 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8463 Constraint = (),
8464 >,
8465 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
8466 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8467 Constraint = (),
8468 >,
8469 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
8470 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8471 Constraint = (),
8472 >,
8473 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
8474 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8475 Constraint = (),
8476 >,
8477 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
8478 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8479 Constraint = (),
8480 >,
8481 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
8482 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8483 Constraint = (),
8484 >,
8485 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
8486 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8487 Constraint = (),
8488 >,
8489 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8490 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8491 Constraint = (),
8492 >,
8493 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8494 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8495 Constraint = (),
8496 >,
8497 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
8498 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8499 Constraint = (),
8500 >,
8501{
8502 async fn on_one_way(
8503 handler: &mut ___H,
8504 mut message: ::fidl_next::Message<___T>,
8505 ) -> ::core::result::Result<
8506 (),
8507 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8508 > {
8509 match *message.header().ordinal {
8510 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8511 Ok(decoded) => {
8512 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
8513 Ok(())
8514 }
8515 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8516 ordinal: 2366825959783828089,
8517 error,
8518 }),
8519 },
8520
8521 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8522 Ok(decoded) => {
8523 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
8524 Ok(())
8525 }
8526 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8527 ordinal: 6512600400724287855,
8528 error,
8529 }),
8530 },
8531
8532 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8533 Ok(decoded) => {
8534 handler
8535 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
8536 .await;
8537 Ok(())
8538 }
8539 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8540 ordinal: 5431626189872037072,
8541 error,
8542 }),
8543 },
8544
8545 ordinal => {
8546 handler.on_unknown_interaction(ordinal).await;
8547 if ::core::matches!(
8548 message.header().flexibility(),
8549 ::fidl_next::protocol::Flexibility::Strict
8550 ) {
8551 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8552 } else {
8553 Ok(())
8554 }
8555 }
8556 }
8557 }
8558
8559 async fn on_two_way(
8560 handler: &mut ___H,
8561 mut message: ::fidl_next::Message<___T>,
8562 responder: ::fidl_next::protocol::Responder<___T>,
8563 ) -> ::core::result::Result<
8564 (),
8565 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
8566 > {
8567 match *message.header().ordinal {
8568 6540867515453498750 => {
8569 let responder = ::fidl_next::Responder::from_untyped(responder);
8570
8571 handler.close(responder).await;
8572 Ok(())
8573 }
8574
8575 2763219980499352582 => {
8576 let responder = ::fidl_next::Responder::from_untyped(responder);
8577
8578 handler.query(responder).await;
8579 Ok(())
8580 }
8581
8582 8689798978500614909 => {
8583 let responder = ::fidl_next::Responder::from_untyped(responder);
8584
8585 handler.deprecated_get_attr(responder).await;
8586 Ok(())
8587 }
8588
8589 4721673413776871238 => {
8590 let responder = ::fidl_next::Responder::from_untyped(responder);
8591
8592 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8593 Ok(decoded) => {
8594 handler
8595 .deprecated_set_attr(
8596 ::fidl_next::Request::from_decoded(decoded),
8597 responder,
8598 )
8599 .await;
8600 Ok(())
8601 }
8602 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8603 ordinal: 4721673413776871238,
8604 error,
8605 }),
8606 }
8607 }
8608
8609 6595803110182632097 => {
8610 let responder = ::fidl_next::Responder::from_untyped(responder);
8611
8612 handler.deprecated_get_flags(responder).await;
8613 Ok(())
8614 }
8615
8616 5950864159036794675 => {
8617 let responder = ::fidl_next::Responder::from_untyped(responder);
8618
8619 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8620 Ok(decoded) => {
8621 handler
8622 .deprecated_set_flags(
8623 ::fidl_next::Request::from_decoded(decoded),
8624 responder,
8625 )
8626 .await;
8627 Ok(())
8628 }
8629 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8630 ordinal: 5950864159036794675,
8631 error,
8632 }),
8633 }
8634 }
8635
8636 105530239381466147 => {
8637 let responder = ::fidl_next::Responder::from_untyped(responder);
8638
8639 handler.get_flags(responder).await;
8640 Ok(())
8641 }
8642
8643 6172186066099445416 => {
8644 let responder = ::fidl_next::Responder::from_untyped(responder);
8645
8646 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8647 Ok(decoded) => {
8648 handler
8649 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
8650 .await;
8651 Ok(())
8652 }
8653 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8654 ordinal: 6172186066099445416,
8655 error,
8656 }),
8657 }
8658 }
8659
8660 8013111122914313744 => {
8661 let responder = ::fidl_next::Responder::from_untyped(responder);
8662
8663 handler.query_filesystem(responder).await;
8664 Ok(())
8665 }
8666
8667 5788516050773961964 => {
8668 let responder = ::fidl_next::Responder::from_untyped(responder);
8669
8670 handler.get_token(responder).await;
8671 Ok(())
8672 }
8673
8674 4414537700416816443 => {
8675 let responder = ::fidl_next::Responder::from_untyped(responder);
8676
8677 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8678 Ok(decoded) => {
8679 handler
8680 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
8681 .await;
8682 Ok(())
8683 }
8684 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8685 ordinal: 4414537700416816443,
8686 error,
8687 }),
8688 }
8689 }
8690
8691 3677402239314018056 => {
8692 let responder = ::fidl_next::Responder::from_untyped(responder);
8693
8694 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8695 Ok(decoded) => {
8696 handler
8697 .update_attributes(
8698 ::fidl_next::Request::from_decoded(decoded),
8699 responder,
8700 )
8701 .await;
8702 Ok(())
8703 }
8704 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8705 ordinal: 3677402239314018056,
8706 error,
8707 }),
8708 }
8709 }
8710
8711 3196473584242777161 => {
8712 let responder = ::fidl_next::Responder::from_untyped(responder);
8713
8714 handler.sync(responder).await;
8715 Ok(())
8716 }
8717
8718 5043930208506967771 => {
8719 let responder = ::fidl_next::Responder::from_untyped(responder);
8720
8721 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8722 Ok(decoded) => {
8723 handler
8724 .get_extended_attribute(
8725 ::fidl_next::Request::from_decoded(decoded),
8726 responder,
8727 )
8728 .await;
8729 Ok(())
8730 }
8731 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8732 ordinal: 5043930208506967771,
8733 error,
8734 }),
8735 }
8736 }
8737
8738 5374223046099989052 => {
8739 let responder = ::fidl_next::Responder::from_untyped(responder);
8740
8741 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8742 Ok(decoded) => {
8743 handler
8744 .set_extended_attribute(
8745 ::fidl_next::Request::from_decoded(decoded),
8746 responder,
8747 )
8748 .await;
8749 Ok(())
8750 }
8751 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8752 ordinal: 5374223046099989052,
8753 error,
8754 }),
8755 }
8756 }
8757
8758 8794297771444732717 => {
8759 let responder = ::fidl_next::Responder::from_untyped(responder);
8760
8761 match ::fidl_next::AsDecoderExt::into_decoded(message) {
8762 Ok(decoded) => {
8763 handler
8764 .remove_extended_attribute(
8765 ::fidl_next::Request::from_decoded(decoded),
8766 responder,
8767 )
8768 .await;
8769 Ok(())
8770 }
8771 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8772 ordinal: 8794297771444732717,
8773 error,
8774 }),
8775 }
8776 }
8777
8778 ordinal => {
8779 handler.on_unknown_interaction(ordinal).await;
8780 if ::core::matches!(
8781 message.header().flexibility(),
8782 ::fidl_next::protocol::Flexibility::Strict
8783 ) {
8784 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8785 } else {
8786 responder
8787 .respond_framework_error(
8788 ordinal,
8789 ::fidl_next::FrameworkError::UnknownMethod,
8790 )
8791 .expect("encoding a framework error should never fail")
8792 .await?;
8793 Ok(())
8794 }
8795 }
8796 }
8797 }
8798}
8799
8800pub trait NodeClientHandler<
8804 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8805 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8806>
8807{
8808 #[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"]
8809 fn on_open(
8810 &mut self,
8811
8812 request: ::fidl_next::Request<node::OnOpen, ___T>,
8813 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8814
8815 #[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"]
8816 fn on_representation(
8817 &mut self,
8818
8819 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
8820 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8821
8822 fn on_unknown_interaction(
8823 &mut self,
8824 ordinal: u64,
8825 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
8826 ::core::future::ready(())
8827 }
8828}
8829
8830impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
8831where
8832 ___H: NodeClientHandler<___T> + ::core::marker::Send,
8833 ___T: ::fidl_next::Transport,
8834 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
8835 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8836 Constraint = (),
8837 >,
8838 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
8839 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
8840 Constraint = (),
8841 >,
8842{
8843 async fn on_event(
8844 handler: &mut ___H,
8845 mut message: ::fidl_next::Message<___T>,
8846 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
8847 match *message.header().ordinal {
8848 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8849 Ok(decoded) => {
8850 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
8851 Ok(())
8852 }
8853 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8854 ordinal: 9207534335756671346,
8855 error,
8856 }),
8857 },
8858
8859 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
8860 Ok(decoded) => {
8861 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
8862 Ok(())
8863 }
8864 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
8865 ordinal: 6679970090861613324,
8866 error,
8867 }),
8868 },
8869
8870 ordinal => {
8871 handler.on_unknown_interaction(ordinal).await;
8872 if ::core::matches!(
8873 message.header().flexibility(),
8874 ::fidl_next::protocol::Flexibility::Strict
8875 ) {
8876 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
8877 } else {
8878 Ok(())
8879 }
8880 }
8881 }
8882 }
8883}
8884
8885pub trait NodeServerHandler<
8889 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8890 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
8891>
8892{
8893 fn clone(
8894 &mut self,
8895
8896 request: ::fidl_next::Request<node::Clone, ___T>,
8897 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8898
8899 #[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"]
8900 fn close(
8901 &mut self,
8902
8903 responder: ::fidl_next::Responder<node::Close, ___T>,
8904 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8905
8906 fn query(
8907 &mut self,
8908
8909 responder: ::fidl_next::Responder<node::Query, ___T>,
8910 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8911
8912 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
8913 fn deprecated_clone(
8914 &mut self,
8915
8916 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
8917 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8918
8919 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
8920 fn deprecated_get_attr(
8921 &mut self,
8922
8923 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
8924 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8925
8926 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
8927 fn deprecated_set_attr(
8928 &mut self,
8929
8930 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
8931
8932 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
8933 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8934
8935 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
8936 fn deprecated_get_flags(
8937 &mut self,
8938
8939 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
8940 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8941
8942 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
8943 fn deprecated_set_flags(
8944 &mut self,
8945
8946 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
8947
8948 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
8949 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8950
8951 #[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"]
8952 fn get_flags(
8953 &mut self,
8954
8955 responder: ::fidl_next::Responder<node::GetFlags, ___T>,
8956 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8957
8958 #[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"]
8959 fn set_flags(
8960 &mut self,
8961
8962 request: ::fidl_next::Request<node::SetFlags, ___T>,
8963
8964 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
8965 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8966
8967 #[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"]
8968 fn query_filesystem(
8969 &mut self,
8970
8971 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
8972 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8973
8974 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
8975 fn get_token(
8976 &mut self,
8977
8978 responder: ::fidl_next::Responder<node::GetToken, ___T>,
8979 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8980
8981 #[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"]
8982 fn get_attributes(
8983 &mut self,
8984
8985 request: ::fidl_next::Request<node::GetAttributes, ___T>,
8986
8987 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
8988 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8989
8990 #[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"]
8991 fn update_attributes(
8992 &mut self,
8993
8994 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
8995
8996 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
8997 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8998
8999 #[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"]
9000 fn sync(
9001 &mut self,
9002
9003 responder: ::fidl_next::Responder<node::Sync, ___T>,
9004 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9005
9006 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
9007 fn list_extended_attributes(
9008 &mut self,
9009
9010 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
9011 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9012
9013 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
9014 fn get_extended_attribute(
9015 &mut self,
9016
9017 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
9018
9019 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
9020 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9021
9022 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
9023 fn set_extended_attribute(
9024 &mut self,
9025
9026 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
9027
9028 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
9029 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9030
9031 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
9032 fn remove_extended_attribute(
9033 &mut self,
9034
9035 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
9036
9037 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
9038 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9039
9040 fn on_unknown_interaction(
9041 &mut self,
9042 ordinal: u64,
9043 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9044 ::core::future::ready(())
9045 }
9046}
9047
9048impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
9049where
9050 ___H: NodeServerHandler<___T> + ::core::marker::Send,
9051 ___T: ::fidl_next::Transport,
9052 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
9053 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9054 Constraint = (),
9055 >,
9056 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
9057 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9058 Constraint = (),
9059 >,
9060 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
9061 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9062 Constraint = (),
9063 >,
9064 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
9065 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9066 Constraint = (),
9067 >,
9068 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
9069 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9070 Constraint = (),
9071 >,
9072 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
9073 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9074 Constraint = (),
9075 >,
9076 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
9077 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9078 Constraint = (),
9079 >,
9080 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
9081 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9082 Constraint = (),
9083 >,
9084 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9085 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9086 Constraint = (),
9087 >,
9088 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9089 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9090 Constraint = (),
9091 >,
9092 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
9093 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
9094 Constraint = (),
9095 >,
9096{
9097 async fn on_one_way(
9098 handler: &mut ___H,
9099 mut message: ::fidl_next::Message<___T>,
9100 ) -> ::core::result::Result<
9101 (),
9102 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9103 > {
9104 match *message.header().ordinal {
9105 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
9106 Ok(decoded) => {
9107 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
9108 Ok(())
9109 }
9110 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9111 ordinal: 2366825959783828089,
9112 error,
9113 }),
9114 },
9115
9116 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
9117 Ok(decoded) => {
9118 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
9119 Ok(())
9120 }
9121 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9122 ordinal: 6512600400724287855,
9123 error,
9124 }),
9125 },
9126
9127 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
9128 Ok(decoded) => {
9129 handler
9130 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
9131 .await;
9132 Ok(())
9133 }
9134 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9135 ordinal: 5431626189872037072,
9136 error,
9137 }),
9138 },
9139
9140 ordinal => {
9141 handler.on_unknown_interaction(ordinal).await;
9142 if ::core::matches!(
9143 message.header().flexibility(),
9144 ::fidl_next::protocol::Flexibility::Strict
9145 ) {
9146 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9147 } else {
9148 Ok(())
9149 }
9150 }
9151 }
9152 }
9153
9154 async fn on_two_way(
9155 handler: &mut ___H,
9156 mut message: ::fidl_next::Message<___T>,
9157 responder: ::fidl_next::protocol::Responder<___T>,
9158 ) -> ::core::result::Result<
9159 (),
9160 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
9161 > {
9162 match *message.header().ordinal {
9163 6540867515453498750 => {
9164 let responder = ::fidl_next::Responder::from_untyped(responder);
9165
9166 handler.close(responder).await;
9167 Ok(())
9168 }
9169
9170 2763219980499352582 => {
9171 let responder = ::fidl_next::Responder::from_untyped(responder);
9172
9173 handler.query(responder).await;
9174 Ok(())
9175 }
9176
9177 8689798978500614909 => {
9178 let responder = ::fidl_next::Responder::from_untyped(responder);
9179
9180 handler.deprecated_get_attr(responder).await;
9181 Ok(())
9182 }
9183
9184 4721673413776871238 => {
9185 let responder = ::fidl_next::Responder::from_untyped(responder);
9186
9187 match ::fidl_next::AsDecoderExt::into_decoded(message) {
9188 Ok(decoded) => {
9189 handler
9190 .deprecated_set_attr(
9191 ::fidl_next::Request::from_decoded(decoded),
9192 responder,
9193 )
9194 .await;
9195 Ok(())
9196 }
9197 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9198 ordinal: 4721673413776871238,
9199 error,
9200 }),
9201 }
9202 }
9203
9204 6595803110182632097 => {
9205 let responder = ::fidl_next::Responder::from_untyped(responder);
9206
9207 handler.deprecated_get_flags(responder).await;
9208 Ok(())
9209 }
9210
9211 5950864159036794675 => {
9212 let responder = ::fidl_next::Responder::from_untyped(responder);
9213
9214 match ::fidl_next::AsDecoderExt::into_decoded(message) {
9215 Ok(decoded) => {
9216 handler
9217 .deprecated_set_flags(
9218 ::fidl_next::Request::from_decoded(decoded),
9219 responder,
9220 )
9221 .await;
9222 Ok(())
9223 }
9224 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9225 ordinal: 5950864159036794675,
9226 error,
9227 }),
9228 }
9229 }
9230
9231 105530239381466147 => {
9232 let responder = ::fidl_next::Responder::from_untyped(responder);
9233
9234 handler.get_flags(responder).await;
9235 Ok(())
9236 }
9237
9238 6172186066099445416 => {
9239 let responder = ::fidl_next::Responder::from_untyped(responder);
9240
9241 match ::fidl_next::AsDecoderExt::into_decoded(message) {
9242 Ok(decoded) => {
9243 handler
9244 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
9245 .await;
9246 Ok(())
9247 }
9248 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9249 ordinal: 6172186066099445416,
9250 error,
9251 }),
9252 }
9253 }
9254
9255 8013111122914313744 => {
9256 let responder = ::fidl_next::Responder::from_untyped(responder);
9257
9258 handler.query_filesystem(responder).await;
9259 Ok(())
9260 }
9261
9262 5788516050773961964 => {
9263 let responder = ::fidl_next::Responder::from_untyped(responder);
9264
9265 handler.get_token(responder).await;
9266 Ok(())
9267 }
9268
9269 4414537700416816443 => {
9270 let responder = ::fidl_next::Responder::from_untyped(responder);
9271
9272 match ::fidl_next::AsDecoderExt::into_decoded(message) {
9273 Ok(decoded) => {
9274 handler
9275 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
9276 .await;
9277 Ok(())
9278 }
9279 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9280 ordinal: 4414537700416816443,
9281 error,
9282 }),
9283 }
9284 }
9285
9286 3677402239314018056 => {
9287 let responder = ::fidl_next::Responder::from_untyped(responder);
9288
9289 match ::fidl_next::AsDecoderExt::into_decoded(message) {
9290 Ok(decoded) => {
9291 handler
9292 .update_attributes(
9293 ::fidl_next::Request::from_decoded(decoded),
9294 responder,
9295 )
9296 .await;
9297 Ok(())
9298 }
9299 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9300 ordinal: 3677402239314018056,
9301 error,
9302 }),
9303 }
9304 }
9305
9306 3196473584242777161 => {
9307 let responder = ::fidl_next::Responder::from_untyped(responder);
9308
9309 handler.sync(responder).await;
9310 Ok(())
9311 }
9312
9313 5043930208506967771 => {
9314 let responder = ::fidl_next::Responder::from_untyped(responder);
9315
9316 match ::fidl_next::AsDecoderExt::into_decoded(message) {
9317 Ok(decoded) => {
9318 handler
9319 .get_extended_attribute(
9320 ::fidl_next::Request::from_decoded(decoded),
9321 responder,
9322 )
9323 .await;
9324 Ok(())
9325 }
9326 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9327 ordinal: 5043930208506967771,
9328 error,
9329 }),
9330 }
9331 }
9332
9333 5374223046099989052 => {
9334 let responder = ::fidl_next::Responder::from_untyped(responder);
9335
9336 match ::fidl_next::AsDecoderExt::into_decoded(message) {
9337 Ok(decoded) => {
9338 handler
9339 .set_extended_attribute(
9340 ::fidl_next::Request::from_decoded(decoded),
9341 responder,
9342 )
9343 .await;
9344 Ok(())
9345 }
9346 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9347 ordinal: 5374223046099989052,
9348 error,
9349 }),
9350 }
9351 }
9352
9353 8794297771444732717 => {
9354 let responder = ::fidl_next::Responder::from_untyped(responder);
9355
9356 match ::fidl_next::AsDecoderExt::into_decoded(message) {
9357 Ok(decoded) => {
9358 handler
9359 .remove_extended_attribute(
9360 ::fidl_next::Request::from_decoded(decoded),
9361 responder,
9362 )
9363 .await;
9364 Ok(())
9365 }
9366 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
9367 ordinal: 8794297771444732717,
9368 error,
9369 }),
9370 }
9371 }
9372
9373 ordinal => {
9374 handler.on_unknown_interaction(ordinal).await;
9375 if ::core::matches!(
9376 message.header().flexibility(),
9377 ::fidl_next::protocol::Flexibility::Strict
9378 ) {
9379 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
9380 } else {
9381 responder
9382 .respond_framework_error(
9383 ordinal,
9384 ::fidl_next::FrameworkError::UnknownMethod,
9385 )
9386 .expect("encoding a framework error should never fail")
9387 .await?;
9388 Ok(())
9389 }
9390 }
9391 }
9392 }
9393}
9394
9395impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
9396where
9397 ___T: ::fidl_next::Transport,
9398{
9399 async fn on_open(&mut self, _: ::fidl_next::Request<node::OnOpen, ___T>) {}
9400
9401 async fn on_representation(&mut self, _: ::fidl_next::Request<node::OnRepresentation, ___T>) {}
9402
9403 async fn on_unknown_interaction(&mut self, _: u64) {}
9404}
9405
9406impl<___H, ___T> NodeLocalClientHandler<___T> for ::fidl_next::Local<___H>
9407where
9408 ___H: NodeClientHandler<___T>,
9409 ___T: ::fidl_next::Transport,
9410{
9411 async fn on_open(&mut self, request: ::fidl_next::Request<node::OnOpen, ___T>) {
9412 ___H::on_open(&mut self.0, request).await
9413 }
9414
9415 async fn on_representation(
9416 &mut self,
9417
9418 request: ::fidl_next::Request<node::OnRepresentation, ___T>,
9419 ) {
9420 ___H::on_representation(&mut self.0, request).await
9421 }
9422
9423 async fn on_unknown_interaction(&mut self, ordinal: u64) {
9424 ___H::on_unknown_interaction(&mut self.0, ordinal).await
9425 }
9426}
9427
9428impl<___H, ___T> NodeLocalServerHandler<___T> for ::fidl_next::Local<___H>
9429where
9430 ___H: NodeServerHandler<___T>,
9431 ___T: ::fidl_next::Transport,
9432{
9433 async fn clone(&mut self, request: ::fidl_next::Request<node::Clone, ___T>) {
9434 ___H::clone(&mut self.0, request).await
9435 }
9436
9437 async fn close(&mut self, responder: ::fidl_next::Responder<node::Close, ___T>) {
9438 ___H::close(&mut self.0, responder).await
9439 }
9440
9441 async fn query(&mut self, responder: ::fidl_next::Responder<node::Query, ___T>) {
9442 ___H::query(&mut self.0, responder).await
9443 }
9444
9445 async fn deprecated_clone(
9446 &mut self,
9447
9448 request: ::fidl_next::Request<node::DeprecatedClone, ___T>,
9449 ) {
9450 ___H::deprecated_clone(&mut self.0, request).await
9451 }
9452
9453 async fn deprecated_get_attr(
9454 &mut self,
9455
9456 responder: ::fidl_next::Responder<node::DeprecatedGetAttr, ___T>,
9457 ) {
9458 ___H::deprecated_get_attr(&mut self.0, responder).await
9459 }
9460
9461 async fn deprecated_set_attr(
9462 &mut self,
9463
9464 request: ::fidl_next::Request<node::DeprecatedSetAttr, ___T>,
9465
9466 responder: ::fidl_next::Responder<node::DeprecatedSetAttr, ___T>,
9467 ) {
9468 ___H::deprecated_set_attr(&mut self.0, request, responder).await
9469 }
9470
9471 async fn deprecated_get_flags(
9472 &mut self,
9473
9474 responder: ::fidl_next::Responder<node::DeprecatedGetFlags, ___T>,
9475 ) {
9476 ___H::deprecated_get_flags(&mut self.0, responder).await
9477 }
9478
9479 async fn deprecated_set_flags(
9480 &mut self,
9481
9482 request: ::fidl_next::Request<node::DeprecatedSetFlags, ___T>,
9483
9484 responder: ::fidl_next::Responder<node::DeprecatedSetFlags, ___T>,
9485 ) {
9486 ___H::deprecated_set_flags(&mut self.0, request, responder).await
9487 }
9488
9489 async fn get_flags(&mut self, responder: ::fidl_next::Responder<node::GetFlags, ___T>) {
9490 ___H::get_flags(&mut self.0, responder).await
9491 }
9492
9493 async fn set_flags(
9494 &mut self,
9495
9496 request: ::fidl_next::Request<node::SetFlags, ___T>,
9497
9498 responder: ::fidl_next::Responder<node::SetFlags, ___T>,
9499 ) {
9500 ___H::set_flags(&mut self.0, request, responder).await
9501 }
9502
9503 async fn query_filesystem(
9504 &mut self,
9505
9506 responder: ::fidl_next::Responder<node::QueryFilesystem, ___T>,
9507 ) {
9508 ___H::query_filesystem(&mut self.0, responder).await
9509 }
9510
9511 async fn get_token(&mut self, responder: ::fidl_next::Responder<node::GetToken, ___T>) {
9512 ___H::get_token(&mut self.0, responder).await
9513 }
9514
9515 async fn get_attributes(
9516 &mut self,
9517
9518 request: ::fidl_next::Request<node::GetAttributes, ___T>,
9519
9520 responder: ::fidl_next::Responder<node::GetAttributes, ___T>,
9521 ) {
9522 ___H::get_attributes(&mut self.0, request, responder).await
9523 }
9524
9525 async fn update_attributes(
9526 &mut self,
9527
9528 request: ::fidl_next::Request<node::UpdateAttributes, ___T>,
9529
9530 responder: ::fidl_next::Responder<node::UpdateAttributes, ___T>,
9531 ) {
9532 ___H::update_attributes(&mut self.0, request, responder).await
9533 }
9534
9535 async fn sync(&mut self, responder: ::fidl_next::Responder<node::Sync, ___T>) {
9536 ___H::sync(&mut self.0, responder).await
9537 }
9538
9539 async fn list_extended_attributes(
9540 &mut self,
9541
9542 request: ::fidl_next::Request<node::ListExtendedAttributes, ___T>,
9543 ) {
9544 ___H::list_extended_attributes(&mut self.0, request).await
9545 }
9546
9547 async fn get_extended_attribute(
9548 &mut self,
9549
9550 request: ::fidl_next::Request<node::GetExtendedAttribute, ___T>,
9551
9552 responder: ::fidl_next::Responder<node::GetExtendedAttribute, ___T>,
9553 ) {
9554 ___H::get_extended_attribute(&mut self.0, request, responder).await
9555 }
9556
9557 async fn set_extended_attribute(
9558 &mut self,
9559
9560 request: ::fidl_next::Request<node::SetExtendedAttribute, ___T>,
9561
9562 responder: ::fidl_next::Responder<node::SetExtendedAttribute, ___T>,
9563 ) {
9564 ___H::set_extended_attribute(&mut self.0, request, responder).await
9565 }
9566
9567 async fn remove_extended_attribute(
9568 &mut self,
9569
9570 request: ::fidl_next::Request<node::RemoveExtendedAttribute, ___T>,
9571
9572 responder: ::fidl_next::Responder<node::RemoveExtendedAttribute, ___T>,
9573 ) {
9574 ___H::remove_extended_attribute(&mut self.0, request, responder).await
9575 }
9576
9577 async fn on_unknown_interaction(&mut self, ordinal: u64) {
9578 ___H::on_unknown_interaction(&mut self.0, ordinal).await
9579 }
9580}
9581
9582#[doc = " Directory defines a node which is capable of containing other Objects.\n"]
9584#[derive(PartialEq, Debug)]
9585pub struct Directory;
9586
9587impl ::fidl_next::Discoverable for Directory {
9588 const PROTOCOL_NAME: &'static str = "fuchsia.io.Directory";
9589}
9590
9591#[cfg(target_os = "fuchsia")]
9592impl ::fidl_next::HasTransport for Directory {
9593 type Transport = ::fidl_next::fuchsia::zx::Channel;
9594}
9595
9596pub mod directory {
9597 pub mod prelude {
9598 pub use crate::{
9599 Directory, DirectoryClientHandler, DirectoryLocalClientHandler,
9600 DirectoryLocalServerHandler, DirectoryServerHandler, directory,
9601 };
9602
9603 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
9604
9605 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
9606
9607 pub use crate::natural::DirectoryCreateSymlinkRequest;
9608
9609 pub use crate::natural::DirectoryDeprecatedGetTokenResponse;
9610
9611 pub use crate::natural::DirectoryDeprecatedOpenRequest;
9612
9613 pub use crate::natural::DirectoryLinkRequest;
9614
9615 pub use crate::natural::DirectoryLinkResponse;
9616
9617 pub use crate::natural::DirectoryReadDirentsRequest;
9618
9619 pub use crate::natural::DirectoryReadDirentsResponse;
9620
9621 pub use crate::natural::DirectoryRenameRequest;
9622
9623 pub use crate::natural::DirectoryRewindResponse;
9624
9625 pub use crate::natural::DirectoryUnlinkRequest;
9626
9627 pub use crate::natural::DirectoryWatchRequest;
9628
9629 pub use crate::natural::DirectoryWatchResponse;
9630
9631 pub use crate::natural::DirectoryCreateSymlinkResponse;
9632
9633 pub use crate::natural::DirectoryRenameResponse;
9634
9635 pub use crate::natural::DirectoryUnlinkResponse;
9636
9637 pub use crate::natural::ExtendedAttributeValue;
9638
9639 pub use crate::natural::MutableNodeAttributes;
9640
9641 pub use crate::natural::NodeAttributes2;
9642
9643 pub use crate::natural::NodeDeprecatedCloneRequest;
9644
9645 pub use crate::natural::NodeDeprecatedGetAttrResponse;
9646
9647 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
9648
9649 pub use crate::natural::NodeDeprecatedSetAttrRequest;
9650
9651 pub use crate::natural::NodeDeprecatedSetAttrResponse;
9652
9653 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
9654
9655 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
9656
9657 pub use crate::natural::NodeGetAttributesRequest;
9658
9659 pub use crate::natural::NodeGetExtendedAttributeRequest;
9660
9661 pub use crate::natural::NodeListExtendedAttributesRequest;
9662
9663 pub use crate::natural::NodeOnOpenRequest;
9664
9665 pub use crate::natural::NodeQueryFilesystemResponse;
9666
9667 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
9668
9669 pub use crate::natural::NodeSetExtendedAttributeRequest;
9670
9671 pub use crate::natural::NodeSetFlagsRequest;
9672
9673 pub use crate::natural::NodeGetFlagsResponse;
9674
9675 pub use crate::natural::NodeGetTokenResponse;
9676
9677 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
9678
9679 pub use crate::natural::NodeSetExtendedAttributeResponse;
9680
9681 pub use crate::natural::NodeSetFlagsResponse;
9682
9683 pub use crate::natural::NodeSyncResponse;
9684
9685 pub use crate::natural::NodeUpdateAttributesResponse;
9686
9687 pub use crate::natural::OpenableOpenRequest;
9688
9689 pub use crate::natural::Representation;
9690
9691 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
9692
9693 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
9694
9695 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
9696 }
9697
9698 pub struct AdvisoryLock;
9699
9700 impl ::fidl_next::Method for AdvisoryLock {
9701 const ORDINAL: u64 = 7992130864415541162;
9702 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9703 ::fidl_next::protocol::Flexibility::Strict;
9704
9705 type Protocol = crate::Directory;
9706
9707 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
9708 }
9709
9710 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
9711 type Response = ::fidl_next::wire::Result<
9712 'static,
9713 crate::wire::AdvisoryLockingAdvisoryLockResponse,
9714 ::fidl_next::wire::fuchsia::Status,
9715 >;
9716 }
9717
9718 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
9719 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9720
9721 fn respond(response: ___R) -> Self::Output {
9722 ::core::result::Result::Ok(response)
9723 }
9724 }
9725
9726 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
9727 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9728
9729 fn respond_err(response: ___R) -> Self::Output {
9730 ::core::result::Result::Err(response)
9731 }
9732 }
9733
9734 pub struct Clone;
9735
9736 impl ::fidl_next::Method for Clone {
9737 const ORDINAL: u64 = 2366825959783828089;
9738 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9739 ::fidl_next::protocol::Flexibility::Strict;
9740
9741 type Protocol = crate::Directory;
9742
9743 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
9744 }
9745
9746 pub struct Close;
9747
9748 impl ::fidl_next::Method for Close {
9749 const ORDINAL: u64 = 6540867515453498750;
9750 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9751 ::fidl_next::protocol::Flexibility::Strict;
9752
9753 type Protocol = crate::Directory;
9754
9755 type Request = ::fidl_next::wire::EmptyMessageBody;
9756 }
9757
9758 impl ::fidl_next::TwoWayMethod for Close {
9759 type Response = ::fidl_next::wire::Result<
9760 'static,
9761 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
9762 ::fidl_next::wire::Int32,
9763 >;
9764 }
9765
9766 impl<___R> ::fidl_next::Respond<___R> for Close {
9767 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9768
9769 fn respond(response: ___R) -> Self::Output {
9770 ::core::result::Result::Ok(response)
9771 }
9772 }
9773
9774 impl<___R> ::fidl_next::RespondErr<___R> for Close {
9775 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9776
9777 fn respond_err(response: ___R) -> Self::Output {
9778 ::core::result::Result::Err(response)
9779 }
9780 }
9781
9782 pub struct Query;
9783
9784 impl ::fidl_next::Method for Query {
9785 const ORDINAL: u64 = 2763219980499352582;
9786 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9787 ::fidl_next::protocol::Flexibility::Strict;
9788
9789 type Protocol = crate::Directory;
9790
9791 type Request = ::fidl_next::wire::EmptyMessageBody;
9792 }
9793
9794 impl ::fidl_next::TwoWayMethod for Query {
9795 type Response = ::fidl_next::wire::Strict<
9796 ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
9797 >;
9798 }
9799
9800 impl<___R> ::fidl_next::Respond<___R> for Query {
9801 type Output =
9802 ::fidl_next::Strict<::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>>;
9803
9804 fn respond(response: ___R) -> Self::Output {
9805 ::fidl_next::Strict(::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse {
9806 protocol: response,
9807 })
9808 }
9809 }
9810
9811 pub struct DeprecatedClone;
9812
9813 impl ::fidl_next::Method for DeprecatedClone {
9814 const ORDINAL: u64 = 6512600400724287855;
9815 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9816 ::fidl_next::protocol::Flexibility::Flexible;
9817
9818 type Protocol = crate::Directory;
9819
9820 type Request = crate::wire::NodeDeprecatedCloneRequest;
9821 }
9822
9823 pub struct OnOpen;
9824
9825 impl ::fidl_next::Method for OnOpen {
9826 const ORDINAL: u64 = 9207534335756671346;
9827 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9828 ::fidl_next::protocol::Flexibility::Flexible;
9829
9830 type Protocol = crate::Directory;
9831
9832 type Request = crate::wire::NodeOnOpenRequest<'static>;
9833 }
9834
9835 pub struct DeprecatedGetAttr;
9836
9837 impl ::fidl_next::Method for DeprecatedGetAttr {
9838 const ORDINAL: u64 = 8689798978500614909;
9839 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9840 ::fidl_next::protocol::Flexibility::Strict;
9841
9842 type Protocol = crate::Directory;
9843
9844 type Request = ::fidl_next::wire::EmptyMessageBody;
9845 }
9846
9847 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
9848 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
9849 }
9850
9851 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
9852 type Output = ::fidl_next::Strict<___R>;
9853
9854 fn respond(response: ___R) -> Self::Output {
9855 ::fidl_next::Strict(response)
9856 }
9857 }
9858
9859 pub struct DeprecatedSetAttr;
9860
9861 impl ::fidl_next::Method for DeprecatedSetAttr {
9862 const ORDINAL: u64 = 4721673413776871238;
9863 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9864 ::fidl_next::protocol::Flexibility::Strict;
9865
9866 type Protocol = crate::Directory;
9867
9868 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
9869 }
9870
9871 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
9872 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
9873 }
9874
9875 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
9876 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
9877
9878 fn respond(response: ___R) -> Self::Output {
9879 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
9880 }
9881 }
9882
9883 pub struct DeprecatedGetFlags;
9884
9885 impl ::fidl_next::Method for DeprecatedGetFlags {
9886 const ORDINAL: u64 = 6595803110182632097;
9887 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9888 ::fidl_next::protocol::Flexibility::Strict;
9889
9890 type Protocol = crate::Directory;
9891
9892 type Request = ::fidl_next::wire::EmptyMessageBody;
9893 }
9894
9895 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
9896 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
9897 }
9898
9899 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
9900 type Output = ::fidl_next::Strict<___R>;
9901
9902 fn respond(response: ___R) -> Self::Output {
9903 ::fidl_next::Strict(response)
9904 }
9905 }
9906
9907 pub struct DeprecatedSetFlags;
9908
9909 impl ::fidl_next::Method for DeprecatedSetFlags {
9910 const ORDINAL: u64 = 5950864159036794675;
9911 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9912 ::fidl_next::protocol::Flexibility::Strict;
9913
9914 type Protocol = crate::Directory;
9915
9916 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
9917 }
9918
9919 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
9920 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
9921 }
9922
9923 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
9924 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
9925
9926 fn respond(response: ___R) -> Self::Output {
9927 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
9928 }
9929 }
9930
9931 pub struct GetFlags;
9932
9933 impl ::fidl_next::Method for GetFlags {
9934 const ORDINAL: u64 = 105530239381466147;
9935 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9936 ::fidl_next::protocol::Flexibility::Flexible;
9937
9938 type Protocol = crate::Directory;
9939
9940 type Request = ::fidl_next::wire::EmptyMessageBody;
9941 }
9942
9943 impl ::fidl_next::TwoWayMethod for GetFlags {
9944 type Response = ::fidl_next::wire::Result<
9945 'static,
9946 crate::wire::NodeGetFlagsResponse,
9947 ::fidl_next::wire::fuchsia::Status,
9948 >;
9949 }
9950
9951 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
9952 type Output = ::core::result::Result<
9953 crate::generic::NodeGetFlagsResponse<___R>,
9954 ::fidl_next::never::Never,
9955 >;
9956
9957 fn respond(response: ___R) -> Self::Output {
9958 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
9959 }
9960 }
9961
9962 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
9963 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
9964
9965 fn respond_err(response: ___R) -> Self::Output {
9966 ::core::result::Result::Err(response)
9967 }
9968 }
9969
9970 pub struct SetFlags;
9971
9972 impl ::fidl_next::Method for SetFlags {
9973 const ORDINAL: u64 = 6172186066099445416;
9974 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
9975 ::fidl_next::protocol::Flexibility::Flexible;
9976
9977 type Protocol = crate::Directory;
9978
9979 type Request = crate::wire::NodeSetFlagsRequest;
9980 }
9981
9982 impl ::fidl_next::TwoWayMethod for SetFlags {
9983 type Response = ::fidl_next::wire::Result<
9984 'static,
9985 crate::wire::NodeSetFlagsResponse,
9986 ::fidl_next::wire::fuchsia::Status,
9987 >;
9988 }
9989
9990 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
9991 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
9992
9993 fn respond(response: ___R) -> Self::Output {
9994 ::core::result::Result::Ok(response)
9995 }
9996 }
9997
9998 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
9999 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10000
10001 fn respond_err(response: ___R) -> Self::Output {
10002 ::core::result::Result::Err(response)
10003 }
10004 }
10005
10006 pub struct QueryFilesystem;
10007
10008 impl ::fidl_next::Method for QueryFilesystem {
10009 const ORDINAL: u64 = 8013111122914313744;
10010 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10011 ::fidl_next::protocol::Flexibility::Strict;
10012
10013 type Protocol = crate::Directory;
10014
10015 type Request = ::fidl_next::wire::EmptyMessageBody;
10016 }
10017
10018 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
10019 type Response =
10020 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
10021 }
10022
10023 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
10024 type Output = ::fidl_next::Strict<___R>;
10025
10026 fn respond(response: ___R) -> Self::Output {
10027 ::fidl_next::Strict(response)
10028 }
10029 }
10030
10031 pub struct OnRepresentation;
10032
10033 impl ::fidl_next::Method for OnRepresentation {
10034 const ORDINAL: u64 = 6679970090861613324;
10035 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10036 ::fidl_next::protocol::Flexibility::Strict;
10037
10038 type Protocol = crate::Directory;
10039
10040 type Request = crate::wire::Representation<'static>;
10041 }
10042
10043 pub struct GetToken;
10044
10045 impl ::fidl_next::Method for GetToken {
10046 const ORDINAL: u64 = 5788516050773961964;
10047 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10048 ::fidl_next::protocol::Flexibility::Flexible;
10049
10050 type Protocol = crate::Directory;
10051
10052 type Request = ::fidl_next::wire::EmptyMessageBody;
10053 }
10054
10055 impl ::fidl_next::TwoWayMethod for GetToken {
10056 type Response = ::fidl_next::wire::Result<
10057 'static,
10058 crate::wire::NodeGetTokenResponse,
10059 ::fidl_next::wire::fuchsia::Status,
10060 >;
10061 }
10062
10063 impl<___R> ::fidl_next::Respond<___R> for GetToken {
10064 type Output = ::core::result::Result<
10065 crate::generic::NodeGetTokenResponse<___R>,
10066 ::fidl_next::never::Never,
10067 >;
10068
10069 fn respond(response: ___R) -> Self::Output {
10070 ::core::result::Result::Ok(crate::generic::NodeGetTokenResponse { token: response })
10071 }
10072 }
10073
10074 impl<___R> ::fidl_next::RespondErr<___R> for GetToken {
10075 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10076
10077 fn respond_err(response: ___R) -> Self::Output {
10078 ::core::result::Result::Err(response)
10079 }
10080 }
10081
10082 pub struct GetAttributes;
10083
10084 impl ::fidl_next::Method for GetAttributes {
10085 const ORDINAL: u64 = 4414537700416816443;
10086 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10087 ::fidl_next::protocol::Flexibility::Strict;
10088
10089 type Protocol = crate::Directory;
10090
10091 type Request = crate::wire::NodeGetAttributesRequest;
10092 }
10093
10094 impl ::fidl_next::TwoWayMethod for GetAttributes {
10095 type Response = ::fidl_next::wire::Result<
10096 'static,
10097 crate::wire::NodeAttributes2<'static>,
10098 ::fidl_next::wire::fuchsia::Status,
10099 >;
10100 }
10101
10102 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
10103 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10104
10105 fn respond(response: ___R) -> Self::Output {
10106 ::core::result::Result::Ok(response)
10107 }
10108 }
10109
10110 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
10111 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10112
10113 fn respond_err(response: ___R) -> Self::Output {
10114 ::core::result::Result::Err(response)
10115 }
10116 }
10117
10118 pub struct UpdateAttributes;
10119
10120 impl ::fidl_next::Method for UpdateAttributes {
10121 const ORDINAL: u64 = 3677402239314018056;
10122 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10123 ::fidl_next::protocol::Flexibility::Strict;
10124
10125 type Protocol = crate::Directory;
10126
10127 type Request = crate::wire::MutableNodeAttributes<'static>;
10128 }
10129
10130 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
10131 type Response = ::fidl_next::wire::Result<
10132 'static,
10133 crate::wire::NodeUpdateAttributesResponse,
10134 ::fidl_next::wire::fuchsia::Status,
10135 >;
10136 }
10137
10138 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
10139 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10140
10141 fn respond(response: ___R) -> Self::Output {
10142 ::core::result::Result::Ok(response)
10143 }
10144 }
10145
10146 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
10147 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10148
10149 fn respond_err(response: ___R) -> Self::Output {
10150 ::core::result::Result::Err(response)
10151 }
10152 }
10153
10154 pub struct Sync;
10155
10156 impl ::fidl_next::Method for Sync {
10157 const ORDINAL: u64 = 3196473584242777161;
10158 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10159 ::fidl_next::protocol::Flexibility::Strict;
10160
10161 type Protocol = crate::Directory;
10162
10163 type Request = ::fidl_next::wire::EmptyMessageBody;
10164 }
10165
10166 impl ::fidl_next::TwoWayMethod for Sync {
10167 type Response = ::fidl_next::wire::Result<
10168 'static,
10169 crate::wire::NodeSyncResponse,
10170 ::fidl_next::wire::fuchsia::Status,
10171 >;
10172 }
10173
10174 impl<___R> ::fidl_next::Respond<___R> for Sync {
10175 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10176
10177 fn respond(response: ___R) -> Self::Output {
10178 ::core::result::Result::Ok(response)
10179 }
10180 }
10181
10182 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
10183 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10184
10185 fn respond_err(response: ___R) -> Self::Output {
10186 ::core::result::Result::Err(response)
10187 }
10188 }
10189
10190 pub struct ListExtendedAttributes;
10191
10192 impl ::fidl_next::Method for ListExtendedAttributes {
10193 const ORDINAL: u64 = 5431626189872037072;
10194 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10195 ::fidl_next::protocol::Flexibility::Strict;
10196
10197 type Protocol = crate::Directory;
10198
10199 type Request = crate::wire::NodeListExtendedAttributesRequest;
10200 }
10201
10202 pub struct GetExtendedAttribute;
10203
10204 impl ::fidl_next::Method for GetExtendedAttribute {
10205 const ORDINAL: u64 = 5043930208506967771;
10206 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10207 ::fidl_next::protocol::Flexibility::Strict;
10208
10209 type Protocol = crate::Directory;
10210
10211 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
10212 }
10213
10214 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
10215 type Response = ::fidl_next::wire::Result<
10216 'static,
10217 crate::wire::ExtendedAttributeValue<'static>,
10218 ::fidl_next::wire::fuchsia::Status,
10219 >;
10220 }
10221
10222 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
10223 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10224
10225 fn respond(response: ___R) -> Self::Output {
10226 ::core::result::Result::Ok(response)
10227 }
10228 }
10229
10230 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
10231 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10232
10233 fn respond_err(response: ___R) -> Self::Output {
10234 ::core::result::Result::Err(response)
10235 }
10236 }
10237
10238 pub struct SetExtendedAttribute;
10239
10240 impl ::fidl_next::Method for SetExtendedAttribute {
10241 const ORDINAL: u64 = 5374223046099989052;
10242 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10243 ::fidl_next::protocol::Flexibility::Strict;
10244
10245 type Protocol = crate::Directory;
10246
10247 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
10248 }
10249
10250 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
10251 type Response = ::fidl_next::wire::Result<
10252 'static,
10253 crate::wire::NodeSetExtendedAttributeResponse,
10254 ::fidl_next::wire::fuchsia::Status,
10255 >;
10256 }
10257
10258 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
10259 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10260
10261 fn respond(response: ___R) -> Self::Output {
10262 ::core::result::Result::Ok(response)
10263 }
10264 }
10265
10266 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
10267 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10268
10269 fn respond_err(response: ___R) -> Self::Output {
10270 ::core::result::Result::Err(response)
10271 }
10272 }
10273
10274 pub struct RemoveExtendedAttribute;
10275
10276 impl ::fidl_next::Method for RemoveExtendedAttribute {
10277 const ORDINAL: u64 = 8794297771444732717;
10278 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10279 ::fidl_next::protocol::Flexibility::Strict;
10280
10281 type Protocol = crate::Directory;
10282
10283 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
10284 }
10285
10286 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
10287 type Response = ::fidl_next::wire::Result<
10288 'static,
10289 crate::wire::NodeRemoveExtendedAttributeResponse,
10290 ::fidl_next::wire::fuchsia::Status,
10291 >;
10292 }
10293
10294 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
10295 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10296
10297 fn respond(response: ___R) -> Self::Output {
10298 ::core::result::Result::Ok(response)
10299 }
10300 }
10301
10302 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
10303 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10304
10305 fn respond_err(response: ___R) -> Self::Output {
10306 ::core::result::Result::Err(response)
10307 }
10308 }
10309
10310 pub struct Open;
10311
10312 impl ::fidl_next::Method for Open {
10313 const ORDINAL: u64 = 6236883748953765593;
10314 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10315 ::fidl_next::protocol::Flexibility::Flexible;
10316
10317 type Protocol = crate::Directory;
10318
10319 type Request = crate::wire::OpenableOpenRequest<'static>;
10320 }
10321
10322 pub struct DeprecatedOpen;
10323
10324 impl ::fidl_next::Method for DeprecatedOpen {
10325 const ORDINAL: u64 = 3193127272456937152;
10326 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10327 ::fidl_next::protocol::Flexibility::Flexible;
10328
10329 type Protocol = crate::Directory;
10330
10331 type Request = crate::wire::DirectoryDeprecatedOpenRequest<'static>;
10332 }
10333
10334 pub struct ReadDirents;
10335
10336 impl ::fidl_next::Method for ReadDirents {
10337 const ORDINAL: u64 = 3855785432100874762;
10338 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10339 ::fidl_next::protocol::Flexibility::Strict;
10340
10341 type Protocol = crate::Directory;
10342
10343 type Request = crate::wire::DirectoryReadDirentsRequest;
10344 }
10345
10346 impl ::fidl_next::TwoWayMethod for ReadDirents {
10347 type Response =
10348 ::fidl_next::wire::Strict<crate::wire::DirectoryReadDirentsResponse<'static>>;
10349 }
10350
10351 impl<___R> ::fidl_next::Respond<___R> for ReadDirents {
10352 type Output = ::fidl_next::Strict<___R>;
10353
10354 fn respond(response: ___R) -> Self::Output {
10355 ::fidl_next::Strict(response)
10356 }
10357 }
10358
10359 pub struct Rewind;
10360
10361 impl ::fidl_next::Method for Rewind {
10362 const ORDINAL: u64 = 1635123508515392625;
10363 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10364 ::fidl_next::protocol::Flexibility::Strict;
10365
10366 type Protocol = crate::Directory;
10367
10368 type Request = ::fidl_next::wire::EmptyMessageBody;
10369 }
10370
10371 impl ::fidl_next::TwoWayMethod for Rewind {
10372 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryRewindResponse>;
10373 }
10374
10375 impl<___R> ::fidl_next::Respond<___R> for Rewind {
10376 type Output = ::fidl_next::Strict<crate::generic::DirectoryRewindResponse<___R>>;
10377
10378 fn respond(response: ___R) -> Self::Output {
10379 ::fidl_next::Strict(crate::generic::DirectoryRewindResponse { s: response })
10380 }
10381 }
10382
10383 pub struct DeprecatedGetToken;
10384
10385 impl ::fidl_next::Method for DeprecatedGetToken {
10386 const ORDINAL: u64 = 2787337947777369685;
10387 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10388 ::fidl_next::protocol::Flexibility::Strict;
10389
10390 type Protocol = crate::Directory;
10391
10392 type Request = ::fidl_next::wire::EmptyMessageBody;
10393 }
10394
10395 impl ::fidl_next::TwoWayMethod for DeprecatedGetToken {
10396 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryDeprecatedGetTokenResponse>;
10397 }
10398
10399 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetToken {
10400 type Output = ::fidl_next::Strict<___R>;
10401
10402 fn respond(response: ___R) -> Self::Output {
10403 ::fidl_next::Strict(response)
10404 }
10405 }
10406
10407 pub struct Link;
10408
10409 impl ::fidl_next::Method for Link {
10410 const ORDINAL: u64 = 8360374984291987687;
10411 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10412 ::fidl_next::protocol::Flexibility::Strict;
10413
10414 type Protocol = crate::Directory;
10415
10416 type Request = crate::wire::DirectoryLinkRequest<'static>;
10417 }
10418
10419 impl ::fidl_next::TwoWayMethod for Link {
10420 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryLinkResponse>;
10421 }
10422
10423 impl<___R> ::fidl_next::Respond<___R> for Link {
10424 type Output = ::fidl_next::Strict<crate::generic::DirectoryLinkResponse<___R>>;
10425
10426 fn respond(response: ___R) -> Self::Output {
10427 ::fidl_next::Strict(crate::generic::DirectoryLinkResponse { s: response })
10428 }
10429 }
10430
10431 pub struct Unlink;
10432
10433 impl ::fidl_next::Method for Unlink {
10434 const ORDINAL: u64 = 8433556716759383021;
10435 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10436 ::fidl_next::protocol::Flexibility::Strict;
10437
10438 type Protocol = crate::Directory;
10439
10440 type Request = crate::wire::DirectoryUnlinkRequest<'static>;
10441 }
10442
10443 impl ::fidl_next::TwoWayMethod for Unlink {
10444 type Response = ::fidl_next::wire::Result<
10445 'static,
10446 crate::wire::DirectoryUnlinkResponse,
10447 ::fidl_next::wire::fuchsia::Status,
10448 >;
10449 }
10450
10451 impl<___R> ::fidl_next::Respond<___R> for Unlink {
10452 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10453
10454 fn respond(response: ___R) -> Self::Output {
10455 ::core::result::Result::Ok(response)
10456 }
10457 }
10458
10459 impl<___R> ::fidl_next::RespondErr<___R> for Unlink {
10460 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10461
10462 fn respond_err(response: ___R) -> Self::Output {
10463 ::core::result::Result::Err(response)
10464 }
10465 }
10466
10467 pub struct Rename;
10468
10469 impl ::fidl_next::Method for Rename {
10470 const ORDINAL: u64 = 8097726607824333022;
10471 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10472 ::fidl_next::protocol::Flexibility::Strict;
10473
10474 type Protocol = crate::Directory;
10475
10476 type Request = crate::wire::DirectoryRenameRequest<'static>;
10477 }
10478
10479 impl ::fidl_next::TwoWayMethod for Rename {
10480 type Response = ::fidl_next::wire::Result<
10481 'static,
10482 crate::wire::DirectoryRenameResponse,
10483 ::fidl_next::wire::fuchsia::Status,
10484 >;
10485 }
10486
10487 impl<___R> ::fidl_next::Respond<___R> for Rename {
10488 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10489
10490 fn respond(response: ___R) -> Self::Output {
10491 ::core::result::Result::Ok(response)
10492 }
10493 }
10494
10495 impl<___R> ::fidl_next::RespondErr<___R> for Rename {
10496 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10497
10498 fn respond_err(response: ___R) -> Self::Output {
10499 ::core::result::Result::Err(response)
10500 }
10501 }
10502
10503 pub struct CreateSymlink;
10504
10505 impl ::fidl_next::Method for CreateSymlink {
10506 const ORDINAL: u64 = 2435901052462315657;
10507 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10508 ::fidl_next::protocol::Flexibility::Strict;
10509
10510 type Protocol = crate::Directory;
10511
10512 type Request = crate::wire::DirectoryCreateSymlinkRequest<'static>;
10513 }
10514
10515 impl ::fidl_next::TwoWayMethod for CreateSymlink {
10516 type Response = ::fidl_next::wire::Result<
10517 'static,
10518 crate::wire::DirectoryCreateSymlinkResponse,
10519 ::fidl_next::wire::fuchsia::Status,
10520 >;
10521 }
10522
10523 impl<___R> ::fidl_next::Respond<___R> for CreateSymlink {
10524 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
10525
10526 fn respond(response: ___R) -> Self::Output {
10527 ::core::result::Result::Ok(response)
10528 }
10529 }
10530
10531 impl<___R> ::fidl_next::RespondErr<___R> for CreateSymlink {
10532 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
10533
10534 fn respond_err(response: ___R) -> Self::Output {
10535 ::core::result::Result::Err(response)
10536 }
10537 }
10538
10539 pub struct Watch;
10540
10541 impl ::fidl_next::Method for Watch {
10542 const ORDINAL: u64 = 6275512344170098065;
10543 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
10544 ::fidl_next::protocol::Flexibility::Strict;
10545
10546 type Protocol = crate::Directory;
10547
10548 type Request = crate::wire::DirectoryWatchRequest;
10549 }
10550
10551 impl ::fidl_next::TwoWayMethod for Watch {
10552 type Response = ::fidl_next::wire::Strict<crate::wire::DirectoryWatchResponse>;
10553 }
10554
10555 impl<___R> ::fidl_next::Respond<___R> for Watch {
10556 type Output = ::fidl_next::Strict<crate::generic::DirectoryWatchResponse<___R>>;
10557
10558 fn respond(response: ___R) -> Self::Output {
10559 ::fidl_next::Strict(crate::generic::DirectoryWatchResponse { s: response })
10560 }
10561 }
10562
10563 mod ___detail {
10564 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Directory
10565 where
10566 ___T: ::fidl_next::Transport,
10567 {
10568 type Client = DirectoryClient<___T>;
10569 type Server = DirectoryServer<___T>;
10570 }
10571
10572 #[repr(transparent)]
10574 pub struct DirectoryClient<___T: ::fidl_next::Transport> {
10575 #[allow(dead_code)]
10576 client: ::fidl_next::protocol::Client<___T>,
10577 }
10578
10579 impl<___T> DirectoryClient<___T>
10580 where
10581 ___T: ::fidl_next::Transport,
10582 {
10583 #[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"]
10584 pub fn advisory_lock(
10585 &self,
10586
10587 request: impl ::fidl_next::Encode<
10588 crate::wire::AdvisoryLockRequest<'static>,
10589 <___T as ::fidl_next::Transport>::SendBuffer,
10590 >,
10591 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
10592 where
10593 <___T as ::fidl_next::Transport>::SendBuffer:
10594 ::fidl_next::encoder::InternalHandleEncoder,
10595 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10596 {
10597 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
10598 request,
10599 })
10600 }
10601
10602 #[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"]
10603 pub fn advisory_lock_with<___R>(
10604 &self,
10605 request: ___R,
10606 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
10607 where
10608 ___R: ::fidl_next::Encode<
10609 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
10610 <___T as ::fidl_next::Transport>::SendBuffer,
10611 >,
10612 {
10613 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10614 7992130864415541162,
10615 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
10616 request,
10617 ))
10618 }
10619
10620 pub fn clone(
10621 &self,
10622
10623 request: impl ::fidl_next::Encode<
10624 ::fidl_next::ServerEnd<
10625 ::fidl_next_fuchsia_unknown::Cloneable,
10626 ::fidl_next::wire::fuchsia::Channel,
10627 >,
10628 <___T as ::fidl_next::Transport>::SendBuffer,
10629 >,
10630 ) -> ::fidl_next::SendFuture<'_, ___T>
10631 where
10632 <___T as ::fidl_next::Transport>::SendBuffer:
10633 ::fidl_next::encoder::InternalHandleEncoder,
10634 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10635 {
10636 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
10637 request,
10638 })
10639 }
10640
10641 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
10642 where
10643 ___R: ::fidl_next::Encode<
10644 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
10645 <___T as ::fidl_next::Transport>::SendBuffer,
10646 >,
10647 {
10648 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
10649 2366825959783828089,
10650 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
10651 request,
10652 ))
10653 }
10654
10655 #[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"]
10656 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
10657 ::fidl_next::TwoWayFuture::from_untyped(
10658 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10659 6540867515453498750,
10660 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
10661 (),
10662 ),
10663 )
10664 }
10665
10666 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
10667 ::fidl_next::TwoWayFuture::from_untyped(
10668 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10669 2763219980499352582,
10670 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
10671 (),
10672 ),
10673 )
10674 }
10675
10676 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
10677 pub fn deprecated_clone(
10678 &self,
10679
10680 flags: impl ::fidl_next::Encode<
10681 crate::wire::OpenFlags,
10682 <___T as ::fidl_next::Transport>::SendBuffer,
10683 >,
10684
10685 object: impl ::fidl_next::Encode<
10686 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
10687 <___T as ::fidl_next::Transport>::SendBuffer,
10688 >,
10689 ) -> ::fidl_next::SendFuture<'_, ___T>
10690 where
10691 <___T as ::fidl_next::Transport>::SendBuffer:
10692 ::fidl_next::encoder::InternalHandleEncoder,
10693 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10694 {
10695 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
10696 flags,
10697
10698 object,
10699 })
10700 }
10701
10702 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
10703 pub fn deprecated_clone_with<___R>(
10704 &self,
10705 request: ___R,
10706 ) -> ::fidl_next::SendFuture<'_, ___T>
10707 where
10708 ___R: ::fidl_next::Encode<
10709 crate::wire::NodeDeprecatedCloneRequest,
10710 <___T as ::fidl_next::Transport>::SendBuffer,
10711 >,
10712 {
10713 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
10714 6512600400724287855,
10715 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
10716 request,
10717 ))
10718 }
10719
10720 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
10721 pub fn deprecated_get_attr(
10722 &self,
10723 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
10724 ::fidl_next::TwoWayFuture::from_untyped(
10725 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10726 8689798978500614909,
10727 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
10728 (),
10729 ),
10730 )
10731 }
10732
10733 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
10734 pub fn deprecated_set_attr(
10735 &self,
10736
10737 flags: impl ::fidl_next::Encode<
10738 crate::wire::NodeAttributeFlags,
10739 <___T as ::fidl_next::Transport>::SendBuffer,
10740 >,
10741
10742 attributes: impl ::fidl_next::Encode<
10743 crate::wire::NodeAttributes,
10744 <___T as ::fidl_next::Transport>::SendBuffer,
10745 >,
10746 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
10747 where
10748 <___T as ::fidl_next::Transport>::SendBuffer:
10749 ::fidl_next::encoder::InternalHandleEncoder,
10750 {
10751 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
10752 flags,
10753
10754 attributes,
10755 })
10756 }
10757
10758 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
10759 pub fn deprecated_set_attr_with<___R>(
10760 &self,
10761 request: ___R,
10762 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
10763 where
10764 ___R: ::fidl_next::Encode<
10765 crate::wire::NodeDeprecatedSetAttrRequest,
10766 <___T as ::fidl_next::Transport>::SendBuffer,
10767 >,
10768 {
10769 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10770 4721673413776871238,
10771 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
10772 request,
10773 ))
10774 }
10775
10776 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
10777 pub fn deprecated_get_flags(
10778 &self,
10779 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
10780 ::fidl_next::TwoWayFuture::from_untyped(
10781 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10782 6595803110182632097,
10783 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
10784 (),
10785 ),
10786 )
10787 }
10788
10789 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
10790 pub fn deprecated_set_flags(
10791 &self,
10792
10793 flags: impl ::fidl_next::Encode<
10794 crate::wire::OpenFlags,
10795 <___T as ::fidl_next::Transport>::SendBuffer,
10796 >,
10797 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
10798 where
10799 <___T as ::fidl_next::Transport>::SendBuffer:
10800 ::fidl_next::encoder::InternalHandleEncoder,
10801 {
10802 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
10803 flags,
10804 })
10805 }
10806
10807 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
10808 pub fn deprecated_set_flags_with<___R>(
10809 &self,
10810 request: ___R,
10811 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
10812 where
10813 ___R: ::fidl_next::Encode<
10814 crate::wire::NodeDeprecatedSetFlagsRequest,
10815 <___T as ::fidl_next::Transport>::SendBuffer,
10816 >,
10817 {
10818 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10819 5950864159036794675,
10820 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
10821 request,
10822 ))
10823 }
10824
10825 #[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"]
10826 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
10827 ::fidl_next::TwoWayFuture::from_untyped(
10828 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10829 105530239381466147,
10830 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
10831 (),
10832 ),
10833 )
10834 }
10835
10836 #[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"]
10837 pub fn set_flags(
10838 &self,
10839
10840 flags: impl ::fidl_next::Encode<
10841 crate::wire::Flags,
10842 <___T as ::fidl_next::Transport>::SendBuffer,
10843 >,
10844 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
10845 where
10846 <___T as ::fidl_next::Transport>::SendBuffer:
10847 ::fidl_next::encoder::InternalHandleEncoder,
10848 {
10849 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
10850 }
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 pub fn set_flags_with<___R>(
10854 &self,
10855 request: ___R,
10856 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
10857 where
10858 ___R: ::fidl_next::Encode<
10859 crate::wire::NodeSetFlagsRequest,
10860 <___T as ::fidl_next::Transport>::SendBuffer,
10861 >,
10862 {
10863 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10864 6172186066099445416,
10865 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
10866 request,
10867 ))
10868 }
10869
10870 #[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"]
10871 pub fn query_filesystem(
10872 &self,
10873 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
10874 ::fidl_next::TwoWayFuture::from_untyped(
10875 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10876 8013111122914313744,
10877 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
10878 (),
10879 ),
10880 )
10881 }
10882
10883 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
10884 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
10885 ::fidl_next::TwoWayFuture::from_untyped(
10886 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10887 5788516050773961964,
10888 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
10889 (),
10890 ),
10891 )
10892 }
10893
10894 #[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"]
10895 pub fn get_attributes(
10896 &self,
10897
10898 query: impl ::fidl_next::Encode<
10899 crate::wire::NodeAttributesQuery,
10900 <___T as ::fidl_next::Transport>::SendBuffer,
10901 >,
10902 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
10903 where
10904 <___T as ::fidl_next::Transport>::SendBuffer:
10905 ::fidl_next::encoder::InternalHandleEncoder,
10906 {
10907 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
10908 }
10909
10910 #[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"]
10911 pub fn get_attributes_with<___R>(
10912 &self,
10913 request: ___R,
10914 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
10915 where
10916 ___R: ::fidl_next::Encode<
10917 crate::wire::NodeGetAttributesRequest,
10918 <___T as ::fidl_next::Transport>::SendBuffer,
10919 >,
10920 {
10921 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10922 4414537700416816443,
10923 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
10924 request,
10925 ))
10926 }
10927
10928 #[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"]
10929 pub fn update_attributes_with<___R>(
10930 &self,
10931 request: ___R,
10932 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
10933 where
10934 ___R: ::fidl_next::Encode<
10935 crate::wire::MutableNodeAttributes<'static>,
10936 <___T as ::fidl_next::Transport>::SendBuffer,
10937 >,
10938 {
10939 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
10940 3677402239314018056,
10941 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
10942 request,
10943 ))
10944 }
10945
10946 #[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"]
10947 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
10948 ::fidl_next::TwoWayFuture::from_untyped(
10949 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
10950 3196473584242777161,
10951 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
10952 (),
10953 ),
10954 )
10955 }
10956
10957 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
10958 pub fn list_extended_attributes(
10959 &self,
10960
10961 iterator: impl ::fidl_next::Encode<
10962 ::fidl_next::ServerEnd<
10963 crate::ExtendedAttributeIterator,
10964 ::fidl_next::wire::fuchsia::Channel,
10965 >,
10966 <___T as ::fidl_next::Transport>::SendBuffer,
10967 >,
10968 ) -> ::fidl_next::SendFuture<'_, ___T>
10969 where
10970 <___T as ::fidl_next::Transport>::SendBuffer:
10971 ::fidl_next::encoder::InternalHandleEncoder,
10972 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10973 {
10974 self.list_extended_attributes_with(
10975 crate::generic::NodeListExtendedAttributesRequest { iterator },
10976 )
10977 }
10978
10979 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
10980 pub fn list_extended_attributes_with<___R>(
10981 &self,
10982 request: ___R,
10983 ) -> ::fidl_next::SendFuture<'_, ___T>
10984 where
10985 ___R: ::fidl_next::Encode<
10986 crate::wire::NodeListExtendedAttributesRequest,
10987 <___T as ::fidl_next::Transport>::SendBuffer,
10988 >,
10989 {
10990 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
10991 5431626189872037072,
10992 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
10993 request,
10994 ))
10995 }
10996
10997 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
10998 pub fn get_extended_attribute(
10999 &self,
11000
11001 name: impl ::fidl_next::Encode<
11002 ::fidl_next::wire::Vector<'static, u8>,
11003 <___T as ::fidl_next::Transport>::SendBuffer,
11004 >,
11005 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
11006 where
11007 <___T as ::fidl_next::Transport>::SendBuffer:
11008 ::fidl_next::encoder::InternalHandleEncoder,
11009 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11010 {
11011 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
11012 name,
11013 })
11014 }
11015
11016 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
11017 pub fn get_extended_attribute_with<___R>(
11018 &self,
11019 request: ___R,
11020 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
11021 where
11022 ___R: ::fidl_next::Encode<
11023 crate::wire::NodeGetExtendedAttributeRequest<'static>,
11024 <___T as ::fidl_next::Transport>::SendBuffer,
11025 >,
11026 {
11027 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11028 5043930208506967771,
11029 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
11030 request,
11031 ))
11032 }
11033
11034 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
11035 pub fn set_extended_attribute(
11036 &self,
11037
11038 name: impl ::fidl_next::Encode<
11039 ::fidl_next::wire::Vector<'static, u8>,
11040 <___T as ::fidl_next::Transport>::SendBuffer,
11041 >,
11042
11043 value: impl ::fidl_next::Encode<
11044 crate::wire::ExtendedAttributeValue<'static>,
11045 <___T as ::fidl_next::Transport>::SendBuffer,
11046 >,
11047
11048 mode: impl ::fidl_next::Encode<
11049 crate::wire::SetExtendedAttributeMode,
11050 <___T as ::fidl_next::Transport>::SendBuffer,
11051 >,
11052 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
11053 where
11054 <___T as ::fidl_next::Transport>::SendBuffer:
11055 ::fidl_next::encoder::InternalHandleEncoder,
11056 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11057 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11058 {
11059 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
11060 name,
11061
11062 value,
11063
11064 mode,
11065 })
11066 }
11067
11068 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
11069 pub fn set_extended_attribute_with<___R>(
11070 &self,
11071 request: ___R,
11072 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
11073 where
11074 ___R: ::fidl_next::Encode<
11075 crate::wire::NodeSetExtendedAttributeRequest<'static>,
11076 <___T as ::fidl_next::Transport>::SendBuffer,
11077 >,
11078 {
11079 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11080 5374223046099989052,
11081 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
11082 request,
11083 ))
11084 }
11085
11086 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
11087 pub fn remove_extended_attribute(
11088 &self,
11089
11090 name: impl ::fidl_next::Encode<
11091 ::fidl_next::wire::Vector<'static, u8>,
11092 <___T as ::fidl_next::Transport>::SendBuffer,
11093 >,
11094 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
11095 where
11096 <___T as ::fidl_next::Transport>::SendBuffer:
11097 ::fidl_next::encoder::InternalHandleEncoder,
11098 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11099 {
11100 self.remove_extended_attribute_with(
11101 crate::generic::NodeRemoveExtendedAttributeRequest { name },
11102 )
11103 }
11104
11105 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
11106 pub fn remove_extended_attribute_with<___R>(
11107 &self,
11108 request: ___R,
11109 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
11110 where
11111 ___R: ::fidl_next::Encode<
11112 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
11113 <___T as ::fidl_next::Transport>::SendBuffer,
11114 >,
11115 {
11116 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11117 8794297771444732717,
11118 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
11119 request,
11120 ))
11121 }
11122
11123 #[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"]
11124 pub fn open(
11125 &self,
11126
11127 path: impl ::fidl_next::Encode<
11128 ::fidl_next::wire::String<'static>,
11129 <___T as ::fidl_next::Transport>::SendBuffer,
11130 >,
11131
11132 flags: impl ::fidl_next::Encode<
11133 crate::wire::Flags,
11134 <___T as ::fidl_next::Transport>::SendBuffer,
11135 >,
11136
11137 options: impl ::fidl_next::Encode<
11138 crate::wire::Options<'static>,
11139 <___T as ::fidl_next::Transport>::SendBuffer,
11140 >,
11141
11142 object: impl ::fidl_next::Encode<
11143 ::fidl_next::wire::fuchsia::Channel,
11144 <___T as ::fidl_next::Transport>::SendBuffer,
11145 >,
11146 ) -> ::fidl_next::SendFuture<'_, ___T>
11147 where
11148 <___T as ::fidl_next::Transport>::SendBuffer:
11149 ::fidl_next::encoder::InternalHandleEncoder,
11150 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11151 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11152 {
11153 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
11154 }
11155
11156 #[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"]
11157 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
11158 where
11159 ___R: ::fidl_next::Encode<
11160 crate::wire::OpenableOpenRequest<'static>,
11161 <___T as ::fidl_next::Transport>::SendBuffer,
11162 >,
11163 {
11164 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
11165 6236883748953765593,
11166 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
11167 request,
11168 ))
11169 }
11170
11171 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
11172 pub fn deprecated_open(
11173 &self,
11174
11175 flags: impl ::fidl_next::Encode<
11176 crate::wire::OpenFlags,
11177 <___T as ::fidl_next::Transport>::SendBuffer,
11178 >,
11179
11180 mode: impl ::fidl_next::Encode<
11181 crate::wire::ModeType,
11182 <___T as ::fidl_next::Transport>::SendBuffer,
11183 >,
11184
11185 path: impl ::fidl_next::Encode<
11186 ::fidl_next::wire::String<'static>,
11187 <___T as ::fidl_next::Transport>::SendBuffer,
11188 >,
11189
11190 object: impl ::fidl_next::Encode<
11191 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
11192 <___T as ::fidl_next::Transport>::SendBuffer,
11193 >,
11194 ) -> ::fidl_next::SendFuture<'_, ___T>
11195 where
11196 <___T as ::fidl_next::Transport>::SendBuffer:
11197 ::fidl_next::encoder::InternalHandleEncoder,
11198 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11199 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11200 {
11201 self.deprecated_open_with(crate::generic::DirectoryDeprecatedOpenRequest {
11202 flags,
11203
11204 mode,
11205
11206 path,
11207
11208 object,
11209 })
11210 }
11211
11212 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
11213 pub fn deprecated_open_with<___R>(
11214 &self,
11215 request: ___R,
11216 ) -> ::fidl_next::SendFuture<'_, ___T>
11217 where
11218 ___R: ::fidl_next::Encode<
11219 crate::wire::DirectoryDeprecatedOpenRequest<'static>,
11220 <___T as ::fidl_next::Transport>::SendBuffer,
11221 >,
11222 {
11223 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
11224 3193127272456937152,
11225 <super::DeprecatedOpen as ::fidl_next::Method>::FLEXIBILITY,
11226 request,
11227 ))
11228 }
11229
11230 #[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 requires the following rights:\n\n * [`Rights.ENUMERATE`]\n"]
11231 pub fn read_dirents(
11232 &self,
11233
11234 max_bytes: impl ::fidl_next::Encode<
11235 ::fidl_next::wire::Uint64,
11236 <___T as ::fidl_next::Transport>::SendBuffer,
11237 >,
11238 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
11239 where
11240 <___T as ::fidl_next::Transport>::SendBuffer:
11241 ::fidl_next::encoder::InternalHandleEncoder,
11242 {
11243 self.read_dirents_with(crate::generic::DirectoryReadDirentsRequest { max_bytes })
11244 }
11245
11246 #[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 requires the following rights:\n\n * [`Rights.ENUMERATE`]\n"]
11247 pub fn read_dirents_with<___R>(
11248 &self,
11249 request: ___R,
11250 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadDirents, ___T>
11251 where
11252 ___R: ::fidl_next::Encode<
11253 crate::wire::DirectoryReadDirentsRequest,
11254 <___T as ::fidl_next::Transport>::SendBuffer,
11255 >,
11256 {
11257 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11258 3855785432100874762,
11259 <super::ReadDirents as ::fidl_next::Method>::FLEXIBILITY,
11260 request,
11261 ))
11262 }
11263
11264 #[doc = " Resets the directory seek offset.\n\n This method requires the following rights:\n\n * [`Rights.ENUMERATE`]\n"]
11265 pub fn rewind(&self) -> ::fidl_next::TwoWayFuture<'_, super::Rewind, ___T> {
11266 ::fidl_next::TwoWayFuture::from_untyped(
11267 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
11268 1635123508515392625,
11269 <super::Rewind as ::fidl_next::Method>::FLEXIBILITY,
11270 (),
11271 ),
11272 )
11273 }
11274
11275 #[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\n This method is deprecated: use `fuchsia.io/Node.GetToken` instead (once it is added).\n"]
11276 pub fn deprecated_get_token(
11277 &self,
11278 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetToken, ___T> {
11279 ::fidl_next::TwoWayFuture::from_untyped(
11280 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
11281 2787337947777369685,
11282 <super::DeprecatedGetToken as ::fidl_next::Method>::FLEXIBILITY,
11283 (),
11284 ),
11285 )
11286 }
11287
11288 #[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"]
11289 pub fn link(
11290 &self,
11291
11292 src: impl ::fidl_next::Encode<
11293 ::fidl_next::wire::String<'static>,
11294 <___T as ::fidl_next::Transport>::SendBuffer,
11295 >,
11296
11297 dst_parent_token: impl ::fidl_next::Encode<
11298 ::fidl_next::wire::fuchsia::NullableHandle,
11299 <___T as ::fidl_next::Transport>::SendBuffer,
11300 >,
11301
11302 dst: impl ::fidl_next::Encode<
11303 ::fidl_next::wire::String<'static>,
11304 <___T as ::fidl_next::Transport>::SendBuffer,
11305 >,
11306 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
11307 where
11308 <___T as ::fidl_next::Transport>::SendBuffer:
11309 ::fidl_next::encoder::InternalHandleEncoder,
11310 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11311 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11312 {
11313 self.link_with(crate::generic::DirectoryLinkRequest { src, dst_parent_token, dst })
11314 }
11315
11316 #[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"]
11317 pub fn link_with<___R>(
11318 &self,
11319 request: ___R,
11320 ) -> ::fidl_next::TwoWayFuture<'_, super::Link, ___T>
11321 where
11322 ___R: ::fidl_next::Encode<
11323 crate::wire::DirectoryLinkRequest<'static>,
11324 <___T as ::fidl_next::Transport>::SendBuffer,
11325 >,
11326 {
11327 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11328 8360374984291987687,
11329 <super::Link as ::fidl_next::Method>::FLEXIBILITY,
11330 request,
11331 ))
11332 }
11333
11334 #[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"]
11335 pub fn unlink(
11336 &self,
11337
11338 name: impl ::fidl_next::Encode<
11339 ::fidl_next::wire::String<'static>,
11340 <___T as ::fidl_next::Transport>::SendBuffer,
11341 >,
11342
11343 options: impl ::fidl_next::Encode<
11344 crate::wire::UnlinkOptions<'static>,
11345 <___T as ::fidl_next::Transport>::SendBuffer,
11346 >,
11347 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
11348 where
11349 <___T as ::fidl_next::Transport>::SendBuffer:
11350 ::fidl_next::encoder::InternalHandleEncoder,
11351 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11352 {
11353 self.unlink_with(crate::generic::DirectoryUnlinkRequest { name, options })
11354 }
11355
11356 #[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"]
11357 pub fn unlink_with<___R>(
11358 &self,
11359 request: ___R,
11360 ) -> ::fidl_next::TwoWayFuture<'_, super::Unlink, ___T>
11361 where
11362 ___R: ::fidl_next::Encode<
11363 crate::wire::DirectoryUnlinkRequest<'static>,
11364 <___T as ::fidl_next::Transport>::SendBuffer,
11365 >,
11366 {
11367 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11368 8433556716759383021,
11369 <super::Unlink as ::fidl_next::Method>::FLEXIBILITY,
11370 request,
11371 ))
11372 }
11373
11374 #[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"]
11375 pub fn rename(
11376 &self,
11377
11378 src: impl ::fidl_next::Encode<
11379 ::fidl_next::wire::String<'static>,
11380 <___T as ::fidl_next::Transport>::SendBuffer,
11381 >,
11382
11383 dst_parent_token: impl ::fidl_next::Encode<
11384 ::fidl_next::wire::fuchsia::Event,
11385 <___T as ::fidl_next::Transport>::SendBuffer,
11386 >,
11387
11388 dst: impl ::fidl_next::Encode<
11389 ::fidl_next::wire::String<'static>,
11390 <___T as ::fidl_next::Transport>::SendBuffer,
11391 >,
11392 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
11393 where
11394 <___T as ::fidl_next::Transport>::SendBuffer:
11395 ::fidl_next::encoder::InternalHandleEncoder,
11396 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11397 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11398 {
11399 self.rename_with(crate::generic::DirectoryRenameRequest {
11400 src,
11401
11402 dst_parent_token,
11403
11404 dst,
11405 })
11406 }
11407
11408 #[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"]
11409 pub fn rename_with<___R>(
11410 &self,
11411 request: ___R,
11412 ) -> ::fidl_next::TwoWayFuture<'_, super::Rename, ___T>
11413 where
11414 ___R: ::fidl_next::Encode<
11415 crate::wire::DirectoryRenameRequest<'static>,
11416 <___T as ::fidl_next::Transport>::SendBuffer,
11417 >,
11418 {
11419 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11420 8097726607824333022,
11421 <super::Rename as ::fidl_next::Method>::FLEXIBILITY,
11422 request,
11423 ))
11424 }
11425
11426 #[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"]
11427 pub fn create_symlink(
11428 &self,
11429
11430 name: impl ::fidl_next::Encode<
11431 ::fidl_next::wire::String<'static>,
11432 <___T as ::fidl_next::Transport>::SendBuffer,
11433 >,
11434
11435 target: impl ::fidl_next::Encode<
11436 ::fidl_next::wire::Vector<'static, u8>,
11437 <___T as ::fidl_next::Transport>::SendBuffer,
11438 >,
11439
11440 connection: impl ::fidl_next::Encode<
11441 ::fidl_next::ServerEnd<
11442 crate::Symlink,
11443 ::fidl_next::wire::fuchsia::OptionalChannel,
11444 >,
11445 <___T as ::fidl_next::Transport>::SendBuffer,
11446 >,
11447 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
11448 where
11449 <___T as ::fidl_next::Transport>::SendBuffer:
11450 ::fidl_next::encoder::InternalHandleEncoder,
11451 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11452 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11453 {
11454 self.create_symlink_with(crate::generic::DirectoryCreateSymlinkRequest {
11455 name,
11456
11457 target,
11458
11459 connection,
11460 })
11461 }
11462
11463 #[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"]
11464 pub fn create_symlink_with<___R>(
11465 &self,
11466 request: ___R,
11467 ) -> ::fidl_next::TwoWayFuture<'_, super::CreateSymlink, ___T>
11468 where
11469 ___R: ::fidl_next::Encode<
11470 crate::wire::DirectoryCreateSymlinkRequest<'static>,
11471 <___T as ::fidl_next::Transport>::SendBuffer,
11472 >,
11473 {
11474 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11475 2435901052462315657,
11476 <super::CreateSymlink as ::fidl_next::Method>::FLEXIBILITY,
11477 request,
11478 ))
11479 }
11480
11481 #[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 requires the following rights:\n\n * [`Rights.ENUMERATE`]\n"]
11482 pub fn watch(
11483 &self,
11484
11485 mask: impl ::fidl_next::Encode<
11486 crate::wire::WatchMask,
11487 <___T as ::fidl_next::Transport>::SendBuffer,
11488 >,
11489
11490 options: impl ::fidl_next::Encode<
11491 ::fidl_next::wire::Uint32,
11492 <___T as ::fidl_next::Transport>::SendBuffer,
11493 >,
11494
11495 watcher: impl ::fidl_next::Encode<
11496 ::fidl_next::ServerEnd<
11497 crate::DirectoryWatcher,
11498 ::fidl_next::wire::fuchsia::Channel,
11499 >,
11500 <___T as ::fidl_next::Transport>::SendBuffer,
11501 >,
11502 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
11503 where
11504 <___T as ::fidl_next::Transport>::SendBuffer:
11505 ::fidl_next::encoder::InternalHandleEncoder,
11506 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11507 {
11508 self.watch_with(crate::generic::DirectoryWatchRequest { mask, options, watcher })
11509 }
11510
11511 #[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 requires the following rights:\n\n * [`Rights.ENUMERATE`]\n"]
11512 pub fn watch_with<___R>(
11513 &self,
11514 request: ___R,
11515 ) -> ::fidl_next::TwoWayFuture<'_, super::Watch, ___T>
11516 where
11517 ___R: ::fidl_next::Encode<
11518 crate::wire::DirectoryWatchRequest,
11519 <___T as ::fidl_next::Transport>::SendBuffer,
11520 >,
11521 {
11522 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
11523 6275512344170098065,
11524 <super::Watch as ::fidl_next::Method>::FLEXIBILITY,
11525 request,
11526 ))
11527 }
11528 }
11529
11530 #[repr(transparent)]
11532 pub struct DirectoryServer<___T: ::fidl_next::Transport> {
11533 server: ::fidl_next::protocol::Server<___T>,
11534 }
11535
11536 impl<___T> DirectoryServer<___T>
11537 where
11538 ___T: ::fidl_next::Transport,
11539 {
11540 #[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"]
11541 pub fn on_open(
11542 &self,
11543
11544 s: impl ::fidl_next::Encode<
11545 ::fidl_next::wire::fuchsia::StatusResult,
11546 <___T as ::fidl_next::Transport>::SendBuffer,
11547 >,
11548
11549 info: impl ::fidl_next::Encode<
11550 crate::wire_optional::NodeInfoDeprecated<'static>,
11551 <___T as ::fidl_next::Transport>::SendBuffer,
11552 >,
11553 ) -> ::fidl_next::SendFuture<'_, ___T>
11554 where
11555 <___T as ::fidl_next::Transport>::SendBuffer:
11556 ::fidl_next::encoder::InternalHandleEncoder,
11557 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11558 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11559 {
11560 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
11561 }
11562
11563 #[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"]
11564
11565 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
11566 where
11567 ___R: ::fidl_next::Encode<
11568 <super::OnOpen as ::fidl_next::Method>::Request,
11569 <___T as ::fidl_next::Transport>::SendBuffer,
11570 >,
11571 {
11572 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
11573 9207534335756671346,
11574 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
11575 request,
11576 ))
11577 }
11578
11579 #[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"]
11580
11581 pub fn on_representation_with<___R>(
11582 &self,
11583 request: ___R,
11584 ) -> ::fidl_next::SendFuture<'_, ___T>
11585 where
11586 ___R: ::fidl_next::Encode<
11587 <super::OnRepresentation as ::fidl_next::Method>::Request,
11588 <___T as ::fidl_next::Transport>::SendBuffer,
11589 >,
11590 {
11591 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
11592 6679970090861613324,
11593 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
11594 request,
11595 ))
11596 }
11597 }
11598 }
11599}
11600
11601#[diagnostic::on_unimplemented(
11602 note = "If {Self} implements the non-local DirectoryClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
11603)]
11604
11605pub trait DirectoryLocalClientHandler<
11609 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11610 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11611>
11612{
11613 #[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"]
11614 fn on_open(
11615 &mut self,
11616
11617 request: ::fidl_next::Request<directory::OnOpen, ___T>,
11618 ) -> impl ::core::future::Future<Output = ()>;
11619
11620 #[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"]
11621 fn on_representation(
11622 &mut self,
11623
11624 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
11625 ) -> impl ::core::future::Future<Output = ()>;
11626
11627 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
11628 ::core::future::ready(())
11629 }
11630}
11631
11632impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Directory
11633where
11634 ___H: DirectoryLocalClientHandler<___T>,
11635 ___T: ::fidl_next::Transport,
11636 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
11637 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11638 Constraint = (),
11639 >,
11640 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
11641 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11642 Constraint = (),
11643 >,
11644{
11645 async fn on_event(
11646 handler: &mut ___H,
11647 mut message: ::fidl_next::Message<___T>,
11648 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11649 match *message.header().ordinal {
11650 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11651 Ok(decoded) => {
11652 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
11653 Ok(())
11654 }
11655 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11656 ordinal: 9207534335756671346,
11657 error,
11658 }),
11659 },
11660
11661 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
11662 Ok(decoded) => {
11663 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
11664 Ok(())
11665 }
11666 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
11667 ordinal: 6679970090861613324,
11668 error,
11669 }),
11670 },
11671
11672 ordinal => {
11673 handler.on_unknown_interaction(ordinal).await;
11674 if ::core::matches!(
11675 message.header().flexibility(),
11676 ::fidl_next::protocol::Flexibility::Strict
11677 ) {
11678 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
11679 } else {
11680 Ok(())
11681 }
11682 }
11683 }
11684 }
11685}
11686
11687#[diagnostic::on_unimplemented(
11688 note = "If {Self} implements the non-local DirectoryServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
11689)]
11690
11691pub trait DirectoryLocalServerHandler<
11695 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11696 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
11697>
11698{
11699 #[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"]
11700 fn advisory_lock(
11701 &mut self,
11702
11703 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
11704
11705 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
11706 ) -> impl ::core::future::Future<Output = ()>;
11707
11708 fn clone(
11709 &mut self,
11710
11711 request: ::fidl_next::Request<directory::Clone, ___T>,
11712 ) -> impl ::core::future::Future<Output = ()>;
11713
11714 #[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"]
11715 fn close(
11716 &mut self,
11717
11718 responder: ::fidl_next::Responder<directory::Close, ___T>,
11719 ) -> impl ::core::future::Future<Output = ()>;
11720
11721 fn query(
11722 &mut self,
11723
11724 responder: ::fidl_next::Responder<directory::Query, ___T>,
11725 ) -> impl ::core::future::Future<Output = ()>;
11726
11727 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
11728 fn deprecated_clone(
11729 &mut self,
11730
11731 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
11732 ) -> impl ::core::future::Future<Output = ()>;
11733
11734 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
11735 fn deprecated_get_attr(
11736 &mut self,
11737
11738 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
11739 ) -> impl ::core::future::Future<Output = ()>;
11740
11741 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
11742 fn deprecated_set_attr(
11743 &mut self,
11744
11745 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
11746
11747 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
11748 ) -> impl ::core::future::Future<Output = ()>;
11749
11750 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
11751 fn deprecated_get_flags(
11752 &mut self,
11753
11754 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
11755 ) -> impl ::core::future::Future<Output = ()>;
11756
11757 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
11758 fn deprecated_set_flags(
11759 &mut self,
11760
11761 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
11762
11763 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
11764 ) -> impl ::core::future::Future<Output = ()>;
11765
11766 #[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"]
11767 fn get_flags(
11768 &mut self,
11769
11770 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
11771 ) -> impl ::core::future::Future<Output = ()>;
11772
11773 #[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"]
11774 fn set_flags(
11775 &mut self,
11776
11777 request: ::fidl_next::Request<directory::SetFlags, ___T>,
11778
11779 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
11780 ) -> impl ::core::future::Future<Output = ()>;
11781
11782 #[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"]
11783 fn query_filesystem(
11784 &mut self,
11785
11786 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
11787 ) -> impl ::core::future::Future<Output = ()>;
11788
11789 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
11790 fn get_token(
11791 &mut self,
11792
11793 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
11794 ) -> impl ::core::future::Future<Output = ()>;
11795
11796 #[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"]
11797 fn get_attributes(
11798 &mut self,
11799
11800 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
11801
11802 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
11803 ) -> impl ::core::future::Future<Output = ()>;
11804
11805 #[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"]
11806 fn update_attributes(
11807 &mut self,
11808
11809 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
11810
11811 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
11812 ) -> impl ::core::future::Future<Output = ()>;
11813
11814 #[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"]
11815 fn sync(
11816 &mut self,
11817
11818 responder: ::fidl_next::Responder<directory::Sync, ___T>,
11819 ) -> impl ::core::future::Future<Output = ()>;
11820
11821 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
11822 fn list_extended_attributes(
11823 &mut self,
11824
11825 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
11826 ) -> impl ::core::future::Future<Output = ()>;
11827
11828 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
11829 fn get_extended_attribute(
11830 &mut self,
11831
11832 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
11833
11834 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
11835 ) -> impl ::core::future::Future<Output = ()>;
11836
11837 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
11838 fn set_extended_attribute(
11839 &mut self,
11840
11841 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
11842
11843 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
11844 ) -> impl ::core::future::Future<Output = ()>;
11845
11846 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
11847 fn remove_extended_attribute(
11848 &mut self,
11849
11850 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
11851
11852 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
11853 ) -> impl ::core::future::Future<Output = ()>;
11854
11855 #[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"]
11856 fn open(
11857 &mut self,
11858
11859 request: ::fidl_next::Request<directory::Open, ___T>,
11860 ) -> impl ::core::future::Future<Output = ()>;
11861
11862 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
11863 fn deprecated_open(
11864 &mut self,
11865
11866 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
11867 ) -> impl ::core::future::Future<Output = ()>;
11868
11869 #[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 requires the following rights:\n\n * [`Rights.ENUMERATE`]\n"]
11870 fn read_dirents(
11871 &mut self,
11872
11873 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
11874
11875 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
11876 ) -> impl ::core::future::Future<Output = ()>;
11877
11878 #[doc = " Resets the directory seek offset.\n\n This method requires the following rights:\n\n * [`Rights.ENUMERATE`]\n"]
11879 fn rewind(
11880 &mut self,
11881
11882 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
11883 ) -> impl ::core::future::Future<Output = ()>;
11884
11885 #[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\n This method is deprecated: use `fuchsia.io/Node.GetToken` instead (once it is added).\n"]
11886 fn deprecated_get_token(
11887 &mut self,
11888
11889 responder: ::fidl_next::Responder<directory::DeprecatedGetToken, ___T>,
11890 ) -> impl ::core::future::Future<Output = ()>;
11891
11892 #[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"]
11893 fn link(
11894 &mut self,
11895
11896 request: ::fidl_next::Request<directory::Link, ___T>,
11897
11898 responder: ::fidl_next::Responder<directory::Link, ___T>,
11899 ) -> impl ::core::future::Future<Output = ()>;
11900
11901 #[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"]
11902 fn unlink(
11903 &mut self,
11904
11905 request: ::fidl_next::Request<directory::Unlink, ___T>,
11906
11907 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
11908 ) -> impl ::core::future::Future<Output = ()>;
11909
11910 #[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"]
11911 fn rename(
11912 &mut self,
11913
11914 request: ::fidl_next::Request<directory::Rename, ___T>,
11915
11916 responder: ::fidl_next::Responder<directory::Rename, ___T>,
11917 ) -> impl ::core::future::Future<Output = ()>;
11918
11919 #[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"]
11920 fn create_symlink(
11921 &mut self,
11922
11923 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
11924
11925 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
11926 ) -> impl ::core::future::Future<Output = ()>;
11927
11928 #[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 requires the following rights:\n\n * [`Rights.ENUMERATE`]\n"]
11929 fn watch(
11930 &mut self,
11931
11932 request: ::fidl_next::Request<directory::Watch, ___T>,
11933
11934 responder: ::fidl_next::Responder<directory::Watch, ___T>,
11935 ) -> impl ::core::future::Future<Output = ()>;
11936
11937 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
11938 ::core::future::ready(())
11939 }
11940}
11941
11942impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Directory
11943where
11944 ___H: DirectoryLocalServerHandler<___T>,
11945 ___T: ::fidl_next::Transport,
11946 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
11947 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11948 Constraint = (),
11949 >,
11950 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
11951 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11952 Constraint = (),
11953 >,
11954 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
11955 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11956 Constraint = (),
11957 >,
11958 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
11959 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11960 Constraint = (),
11961 >,
11962 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
11963 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11964 Constraint = (),
11965 >,
11966 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
11967 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11968 Constraint = (),
11969 >,
11970 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
11971 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11972 Constraint = (),
11973 >,
11974 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
11975 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11976 Constraint = (),
11977 >,
11978 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
11979 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11980 Constraint = (),
11981 >,
11982 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11983 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11984 Constraint = (),
11985 >,
11986 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11987 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11988 Constraint = (),
11989 >,
11990 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
11991 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11992 Constraint = (),
11993 >,
11994 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
11995 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
11996 Constraint = (),
11997 >,
11998 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
11999 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12000 Constraint = (),
12001 >,
12002 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
12003 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12004 Constraint = (),
12005 >,
12006 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
12007 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12008 Constraint = (),
12009 >,
12010 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
12011 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12012 Constraint = (),
12013 >,
12014 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
12015 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12016 Constraint = (),
12017 >,
12018 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
12019 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12020 Constraint = (),
12021 >,
12022 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
12023 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12024 Constraint = (),
12025 >,
12026{
12027 async fn on_one_way(
12028 handler: &mut ___H,
12029 mut message: ::fidl_next::Message<___T>,
12030 ) -> ::core::result::Result<
12031 (),
12032 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12033 > {
12034 match *message.header().ordinal {
12035 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12036 Ok(decoded) => {
12037 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
12038 Ok(())
12039 }
12040 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12041 ordinal: 2366825959783828089,
12042 error,
12043 }),
12044 },
12045
12046 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12047 Ok(decoded) => {
12048 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
12049 Ok(())
12050 }
12051 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12052 ordinal: 6512600400724287855,
12053 error,
12054 }),
12055 },
12056
12057 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12058 Ok(decoded) => {
12059 handler
12060 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
12061 .await;
12062 Ok(())
12063 }
12064 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12065 ordinal: 5431626189872037072,
12066 error,
12067 }),
12068 },
12069
12070 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12071 Ok(decoded) => {
12072 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
12073 Ok(())
12074 }
12075 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12076 ordinal: 6236883748953765593,
12077 error,
12078 }),
12079 },
12080
12081 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12082 Ok(decoded) => {
12083 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
12084 Ok(())
12085 }
12086 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12087 ordinal: 3193127272456937152,
12088 error,
12089 }),
12090 },
12091
12092 ordinal => {
12093 handler.on_unknown_interaction(ordinal).await;
12094 if ::core::matches!(
12095 message.header().flexibility(),
12096 ::fidl_next::protocol::Flexibility::Strict
12097 ) {
12098 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12099 } else {
12100 Ok(())
12101 }
12102 }
12103 }
12104 }
12105
12106 async fn on_two_way(
12107 handler: &mut ___H,
12108 mut message: ::fidl_next::Message<___T>,
12109 responder: ::fidl_next::protocol::Responder<___T>,
12110 ) -> ::core::result::Result<
12111 (),
12112 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12113 > {
12114 match *message.header().ordinal {
12115 7992130864415541162 => {
12116 let responder = ::fidl_next::Responder::from_untyped(responder);
12117
12118 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12119 Ok(decoded) => {
12120 handler
12121 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
12122 .await;
12123 Ok(())
12124 }
12125 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12126 ordinal: 7992130864415541162,
12127 error,
12128 }),
12129 }
12130 }
12131
12132 6540867515453498750 => {
12133 let responder = ::fidl_next::Responder::from_untyped(responder);
12134
12135 handler.close(responder).await;
12136 Ok(())
12137 }
12138
12139 2763219980499352582 => {
12140 let responder = ::fidl_next::Responder::from_untyped(responder);
12141
12142 handler.query(responder).await;
12143 Ok(())
12144 }
12145
12146 8689798978500614909 => {
12147 let responder = ::fidl_next::Responder::from_untyped(responder);
12148
12149 handler.deprecated_get_attr(responder).await;
12150 Ok(())
12151 }
12152
12153 4721673413776871238 => {
12154 let responder = ::fidl_next::Responder::from_untyped(responder);
12155
12156 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12157 Ok(decoded) => {
12158 handler
12159 .deprecated_set_attr(
12160 ::fidl_next::Request::from_decoded(decoded),
12161 responder,
12162 )
12163 .await;
12164 Ok(())
12165 }
12166 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12167 ordinal: 4721673413776871238,
12168 error,
12169 }),
12170 }
12171 }
12172
12173 6595803110182632097 => {
12174 let responder = ::fidl_next::Responder::from_untyped(responder);
12175
12176 handler.deprecated_get_flags(responder).await;
12177 Ok(())
12178 }
12179
12180 5950864159036794675 => {
12181 let responder = ::fidl_next::Responder::from_untyped(responder);
12182
12183 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12184 Ok(decoded) => {
12185 handler
12186 .deprecated_set_flags(
12187 ::fidl_next::Request::from_decoded(decoded),
12188 responder,
12189 )
12190 .await;
12191 Ok(())
12192 }
12193 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12194 ordinal: 5950864159036794675,
12195 error,
12196 }),
12197 }
12198 }
12199
12200 105530239381466147 => {
12201 let responder = ::fidl_next::Responder::from_untyped(responder);
12202
12203 handler.get_flags(responder).await;
12204 Ok(())
12205 }
12206
12207 6172186066099445416 => {
12208 let responder = ::fidl_next::Responder::from_untyped(responder);
12209
12210 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12211 Ok(decoded) => {
12212 handler
12213 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
12214 .await;
12215 Ok(())
12216 }
12217 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12218 ordinal: 6172186066099445416,
12219 error,
12220 }),
12221 }
12222 }
12223
12224 8013111122914313744 => {
12225 let responder = ::fidl_next::Responder::from_untyped(responder);
12226
12227 handler.query_filesystem(responder).await;
12228 Ok(())
12229 }
12230
12231 5788516050773961964 => {
12232 let responder = ::fidl_next::Responder::from_untyped(responder);
12233
12234 handler.get_token(responder).await;
12235 Ok(())
12236 }
12237
12238 4414537700416816443 => {
12239 let responder = ::fidl_next::Responder::from_untyped(responder);
12240
12241 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12242 Ok(decoded) => {
12243 handler
12244 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
12245 .await;
12246 Ok(())
12247 }
12248 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12249 ordinal: 4414537700416816443,
12250 error,
12251 }),
12252 }
12253 }
12254
12255 3677402239314018056 => {
12256 let responder = ::fidl_next::Responder::from_untyped(responder);
12257
12258 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12259 Ok(decoded) => {
12260 handler
12261 .update_attributes(
12262 ::fidl_next::Request::from_decoded(decoded),
12263 responder,
12264 )
12265 .await;
12266 Ok(())
12267 }
12268 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12269 ordinal: 3677402239314018056,
12270 error,
12271 }),
12272 }
12273 }
12274
12275 3196473584242777161 => {
12276 let responder = ::fidl_next::Responder::from_untyped(responder);
12277
12278 handler.sync(responder).await;
12279 Ok(())
12280 }
12281
12282 5043930208506967771 => {
12283 let responder = ::fidl_next::Responder::from_untyped(responder);
12284
12285 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12286 Ok(decoded) => {
12287 handler
12288 .get_extended_attribute(
12289 ::fidl_next::Request::from_decoded(decoded),
12290 responder,
12291 )
12292 .await;
12293 Ok(())
12294 }
12295 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12296 ordinal: 5043930208506967771,
12297 error,
12298 }),
12299 }
12300 }
12301
12302 5374223046099989052 => {
12303 let responder = ::fidl_next::Responder::from_untyped(responder);
12304
12305 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12306 Ok(decoded) => {
12307 handler
12308 .set_extended_attribute(
12309 ::fidl_next::Request::from_decoded(decoded),
12310 responder,
12311 )
12312 .await;
12313 Ok(())
12314 }
12315 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12316 ordinal: 5374223046099989052,
12317 error,
12318 }),
12319 }
12320 }
12321
12322 8794297771444732717 => {
12323 let responder = ::fidl_next::Responder::from_untyped(responder);
12324
12325 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12326 Ok(decoded) => {
12327 handler
12328 .remove_extended_attribute(
12329 ::fidl_next::Request::from_decoded(decoded),
12330 responder,
12331 )
12332 .await;
12333 Ok(())
12334 }
12335 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12336 ordinal: 8794297771444732717,
12337 error,
12338 }),
12339 }
12340 }
12341
12342 3855785432100874762 => {
12343 let responder = ::fidl_next::Responder::from_untyped(responder);
12344
12345 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12346 Ok(decoded) => {
12347 handler
12348 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
12349 .await;
12350 Ok(())
12351 }
12352 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12353 ordinal: 3855785432100874762,
12354 error,
12355 }),
12356 }
12357 }
12358
12359 1635123508515392625 => {
12360 let responder = ::fidl_next::Responder::from_untyped(responder);
12361
12362 handler.rewind(responder).await;
12363 Ok(())
12364 }
12365
12366 2787337947777369685 => {
12367 let responder = ::fidl_next::Responder::from_untyped(responder);
12368
12369 handler.deprecated_get_token(responder).await;
12370 Ok(())
12371 }
12372
12373 8360374984291987687 => {
12374 let responder = ::fidl_next::Responder::from_untyped(responder);
12375
12376 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12377 Ok(decoded) => {
12378 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
12379 Ok(())
12380 }
12381 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12382 ordinal: 8360374984291987687,
12383 error,
12384 }),
12385 }
12386 }
12387
12388 8433556716759383021 => {
12389 let responder = ::fidl_next::Responder::from_untyped(responder);
12390
12391 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12392 Ok(decoded) => {
12393 handler
12394 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
12395 .await;
12396 Ok(())
12397 }
12398 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12399 ordinal: 8433556716759383021,
12400 error,
12401 }),
12402 }
12403 }
12404
12405 8097726607824333022 => {
12406 let responder = ::fidl_next::Responder::from_untyped(responder);
12407
12408 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12409 Ok(decoded) => {
12410 handler
12411 .rename(::fidl_next::Request::from_decoded(decoded), responder)
12412 .await;
12413 Ok(())
12414 }
12415 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12416 ordinal: 8097726607824333022,
12417 error,
12418 }),
12419 }
12420 }
12421
12422 2435901052462315657 => {
12423 let responder = ::fidl_next::Responder::from_untyped(responder);
12424
12425 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12426 Ok(decoded) => {
12427 handler
12428 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
12429 .await;
12430 Ok(())
12431 }
12432 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12433 ordinal: 2435901052462315657,
12434 error,
12435 }),
12436 }
12437 }
12438
12439 6275512344170098065 => {
12440 let responder = ::fidl_next::Responder::from_untyped(responder);
12441
12442 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12443 Ok(decoded) => {
12444 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
12445 Ok(())
12446 }
12447 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12448 ordinal: 6275512344170098065,
12449 error,
12450 }),
12451 }
12452 }
12453
12454 ordinal => {
12455 handler.on_unknown_interaction(ordinal).await;
12456 if ::core::matches!(
12457 message.header().flexibility(),
12458 ::fidl_next::protocol::Flexibility::Strict
12459 ) {
12460 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12461 } else {
12462 responder
12463 .respond_framework_error(
12464 ordinal,
12465 ::fidl_next::FrameworkError::UnknownMethod,
12466 )
12467 .expect("encoding a framework error should never fail")
12468 .await?;
12469 Ok(())
12470 }
12471 }
12472 }
12473 }
12474}
12475
12476pub trait DirectoryClientHandler<
12480 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12481 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12482>
12483{
12484 #[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"]
12485 fn on_open(
12486 &mut self,
12487
12488 request: ::fidl_next::Request<directory::OnOpen, ___T>,
12489 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12490
12491 #[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"]
12492 fn on_representation(
12493 &mut self,
12494
12495 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
12496 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12497
12498 fn on_unknown_interaction(
12499 &mut self,
12500 ordinal: u64,
12501 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12502 ::core::future::ready(())
12503 }
12504}
12505
12506impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Directory
12507where
12508 ___H: DirectoryClientHandler<___T> + ::core::marker::Send,
12509 ___T: ::fidl_next::Transport,
12510 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
12511 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12512 Constraint = (),
12513 >,
12514 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
12515 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12516 Constraint = (),
12517 >,
12518{
12519 async fn on_event(
12520 handler: &mut ___H,
12521 mut message: ::fidl_next::Message<___T>,
12522 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12523 match *message.header().ordinal {
12524 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12525 Ok(decoded) => {
12526 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
12527 Ok(())
12528 }
12529 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12530 ordinal: 9207534335756671346,
12531 error,
12532 }),
12533 },
12534
12535 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12536 Ok(decoded) => {
12537 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
12538 Ok(())
12539 }
12540 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12541 ordinal: 6679970090861613324,
12542 error,
12543 }),
12544 },
12545
12546 ordinal => {
12547 handler.on_unknown_interaction(ordinal).await;
12548 if ::core::matches!(
12549 message.header().flexibility(),
12550 ::fidl_next::protocol::Flexibility::Strict
12551 ) {
12552 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12553 } else {
12554 Ok(())
12555 }
12556 }
12557 }
12558 }
12559}
12560
12561pub trait DirectoryServerHandler<
12565 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12566 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
12567>
12568{
12569 #[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"]
12570 fn advisory_lock(
12571 &mut self,
12572
12573 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
12574
12575 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
12576 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12577
12578 fn clone(
12579 &mut self,
12580
12581 request: ::fidl_next::Request<directory::Clone, ___T>,
12582 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12583
12584 #[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"]
12585 fn close(
12586 &mut self,
12587
12588 responder: ::fidl_next::Responder<directory::Close, ___T>,
12589 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12590
12591 fn query(
12592 &mut self,
12593
12594 responder: ::fidl_next::Responder<directory::Query, ___T>,
12595 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12596
12597 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
12598 fn deprecated_clone(
12599 &mut self,
12600
12601 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
12602 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12603
12604 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
12605 fn deprecated_get_attr(
12606 &mut self,
12607
12608 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
12609 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12610
12611 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
12612 fn deprecated_set_attr(
12613 &mut self,
12614
12615 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
12616
12617 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
12618 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12619
12620 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
12621 fn deprecated_get_flags(
12622 &mut self,
12623
12624 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
12625 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12626
12627 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
12628 fn deprecated_set_flags(
12629 &mut self,
12630
12631 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
12632
12633 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
12634 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12635
12636 #[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"]
12637 fn get_flags(
12638 &mut self,
12639
12640 responder: ::fidl_next::Responder<directory::GetFlags, ___T>,
12641 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12642
12643 #[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"]
12644 fn set_flags(
12645 &mut self,
12646
12647 request: ::fidl_next::Request<directory::SetFlags, ___T>,
12648
12649 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
12650 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12651
12652 #[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"]
12653 fn query_filesystem(
12654 &mut self,
12655
12656 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
12657 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12658
12659 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
12660 fn get_token(
12661 &mut self,
12662
12663 responder: ::fidl_next::Responder<directory::GetToken, ___T>,
12664 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12665
12666 #[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"]
12667 fn get_attributes(
12668 &mut self,
12669
12670 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
12671
12672 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
12673 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12674
12675 #[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"]
12676 fn update_attributes(
12677 &mut self,
12678
12679 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
12680
12681 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
12682 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12683
12684 #[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"]
12685 fn sync(
12686 &mut self,
12687
12688 responder: ::fidl_next::Responder<directory::Sync, ___T>,
12689 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12690
12691 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
12692 fn list_extended_attributes(
12693 &mut self,
12694
12695 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
12696 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12697
12698 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
12699 fn get_extended_attribute(
12700 &mut self,
12701
12702 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
12703
12704 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
12705 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12706
12707 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
12708 fn set_extended_attribute(
12709 &mut self,
12710
12711 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
12712
12713 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
12714 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12715
12716 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
12717 fn remove_extended_attribute(
12718 &mut self,
12719
12720 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
12721
12722 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
12723 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12724
12725 #[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"]
12726 fn open(
12727 &mut self,
12728
12729 request: ::fidl_next::Request<directory::Open, ___T>,
12730 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12731
12732 #[doc = " DEPRECATED - Use `fuchsia.io/Directory.Open` instead.\n"]
12733 fn deprecated_open(
12734 &mut self,
12735
12736 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
12737 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12738
12739 #[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 requires the following rights:\n\n * [`Rights.ENUMERATE`]\n"]
12740 fn read_dirents(
12741 &mut self,
12742
12743 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
12744
12745 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
12746 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12747
12748 #[doc = " Resets the directory seek offset.\n\n This method requires the following rights:\n\n * [`Rights.ENUMERATE`]\n"]
12749 fn rewind(
12750 &mut self,
12751
12752 responder: ::fidl_next::Responder<directory::Rewind, ___T>,
12753 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12754
12755 #[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\n This method is deprecated: use `fuchsia.io/Node.GetToken` instead (once it is added).\n"]
12756 fn deprecated_get_token(
12757 &mut self,
12758
12759 responder: ::fidl_next::Responder<directory::DeprecatedGetToken, ___T>,
12760 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12761
12762 #[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"]
12763 fn link(
12764 &mut self,
12765
12766 request: ::fidl_next::Request<directory::Link, ___T>,
12767
12768 responder: ::fidl_next::Responder<directory::Link, ___T>,
12769 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12770
12771 #[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"]
12772 fn unlink(
12773 &mut self,
12774
12775 request: ::fidl_next::Request<directory::Unlink, ___T>,
12776
12777 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
12778 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12779
12780 #[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"]
12781 fn rename(
12782 &mut self,
12783
12784 request: ::fidl_next::Request<directory::Rename, ___T>,
12785
12786 responder: ::fidl_next::Responder<directory::Rename, ___T>,
12787 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12788
12789 #[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"]
12790 fn create_symlink(
12791 &mut self,
12792
12793 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
12794
12795 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
12796 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12797
12798 #[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 requires the following rights:\n\n * [`Rights.ENUMERATE`]\n"]
12799 fn watch(
12800 &mut self,
12801
12802 request: ::fidl_next::Request<directory::Watch, ___T>,
12803
12804 responder: ::fidl_next::Responder<directory::Watch, ___T>,
12805 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12806
12807 fn on_unknown_interaction(
12808 &mut self,
12809 ordinal: u64,
12810 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12811 ::core::future::ready(())
12812 }
12813}
12814
12815impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Directory
12816where
12817 ___H: DirectoryServerHandler<___T> + ::core::marker::Send,
12818 ___T: ::fidl_next::Transport,
12819 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
12820 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12821 Constraint = (),
12822 >,
12823 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
12824 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12825 Constraint = (),
12826 >,
12827 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
12828 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12829 Constraint = (),
12830 >,
12831 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
12832 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12833 Constraint = (),
12834 >,
12835 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
12836 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12837 Constraint = (),
12838 >,
12839 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
12840 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12841 Constraint = (),
12842 >,
12843 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
12844 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12845 Constraint = (),
12846 >,
12847 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
12848 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12849 Constraint = (),
12850 >,
12851 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
12852 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12853 Constraint = (),
12854 >,
12855 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
12856 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12857 Constraint = (),
12858 >,
12859 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
12860 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12861 Constraint = (),
12862 >,
12863 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
12864 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12865 Constraint = (),
12866 >,
12867 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
12868 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12869 Constraint = (),
12870 >,
12871 for<'de> crate::wire::DirectoryDeprecatedOpenRequest<'de>: ::fidl_next::Decode<
12872 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12873 Constraint = (),
12874 >,
12875 for<'de> crate::wire::DirectoryReadDirentsRequest: ::fidl_next::Decode<
12876 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12877 Constraint = (),
12878 >,
12879 for<'de> crate::wire::DirectoryLinkRequest<'de>: ::fidl_next::Decode<
12880 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12881 Constraint = (),
12882 >,
12883 for<'de> crate::wire::DirectoryUnlinkRequest<'de>: ::fidl_next::Decode<
12884 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12885 Constraint = (),
12886 >,
12887 for<'de> crate::wire::DirectoryRenameRequest<'de>: ::fidl_next::Decode<
12888 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12889 Constraint = (),
12890 >,
12891 for<'de> crate::wire::DirectoryCreateSymlinkRequest<'de>: ::fidl_next::Decode<
12892 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12893 Constraint = (),
12894 >,
12895 for<'de> crate::wire::DirectoryWatchRequest: ::fidl_next::Decode<
12896 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
12897 Constraint = (),
12898 >,
12899{
12900 async fn on_one_way(
12901 handler: &mut ___H,
12902 mut message: ::fidl_next::Message<___T>,
12903 ) -> ::core::result::Result<
12904 (),
12905 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12906 > {
12907 match *message.header().ordinal {
12908 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12909 Ok(decoded) => {
12910 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
12911 Ok(())
12912 }
12913 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12914 ordinal: 2366825959783828089,
12915 error,
12916 }),
12917 },
12918
12919 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12920 Ok(decoded) => {
12921 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
12922 Ok(())
12923 }
12924 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12925 ordinal: 6512600400724287855,
12926 error,
12927 }),
12928 },
12929
12930 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12931 Ok(decoded) => {
12932 handler
12933 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
12934 .await;
12935 Ok(())
12936 }
12937 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12938 ordinal: 5431626189872037072,
12939 error,
12940 }),
12941 },
12942
12943 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12944 Ok(decoded) => {
12945 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
12946 Ok(())
12947 }
12948 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12949 ordinal: 6236883748953765593,
12950 error,
12951 }),
12952 },
12953
12954 3193127272456937152 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
12955 Ok(decoded) => {
12956 handler.deprecated_open(::fidl_next::Request::from_decoded(decoded)).await;
12957 Ok(())
12958 }
12959 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12960 ordinal: 3193127272456937152,
12961 error,
12962 }),
12963 },
12964
12965 ordinal => {
12966 handler.on_unknown_interaction(ordinal).await;
12967 if ::core::matches!(
12968 message.header().flexibility(),
12969 ::fidl_next::protocol::Flexibility::Strict
12970 ) {
12971 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
12972 } else {
12973 Ok(())
12974 }
12975 }
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 7992130864415541162 => {
12989 let responder = ::fidl_next::Responder::from_untyped(responder);
12990
12991 match ::fidl_next::AsDecoderExt::into_decoded(message) {
12992 Ok(decoded) => {
12993 handler
12994 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
12995 .await;
12996 Ok(())
12997 }
12998 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12999 ordinal: 7992130864415541162,
13000 error,
13001 }),
13002 }
13003 }
13004
13005 6540867515453498750 => {
13006 let responder = ::fidl_next::Responder::from_untyped(responder);
13007
13008 handler.close(responder).await;
13009 Ok(())
13010 }
13011
13012 2763219980499352582 => {
13013 let responder = ::fidl_next::Responder::from_untyped(responder);
13014
13015 handler.query(responder).await;
13016 Ok(())
13017 }
13018
13019 8689798978500614909 => {
13020 let responder = ::fidl_next::Responder::from_untyped(responder);
13021
13022 handler.deprecated_get_attr(responder).await;
13023 Ok(())
13024 }
13025
13026 4721673413776871238 => {
13027 let responder = ::fidl_next::Responder::from_untyped(responder);
13028
13029 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13030 Ok(decoded) => {
13031 handler
13032 .deprecated_set_attr(
13033 ::fidl_next::Request::from_decoded(decoded),
13034 responder,
13035 )
13036 .await;
13037 Ok(())
13038 }
13039 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13040 ordinal: 4721673413776871238,
13041 error,
13042 }),
13043 }
13044 }
13045
13046 6595803110182632097 => {
13047 let responder = ::fidl_next::Responder::from_untyped(responder);
13048
13049 handler.deprecated_get_flags(responder).await;
13050 Ok(())
13051 }
13052
13053 5950864159036794675 => {
13054 let responder = ::fidl_next::Responder::from_untyped(responder);
13055
13056 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13057 Ok(decoded) => {
13058 handler
13059 .deprecated_set_flags(
13060 ::fidl_next::Request::from_decoded(decoded),
13061 responder,
13062 )
13063 .await;
13064 Ok(())
13065 }
13066 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13067 ordinal: 5950864159036794675,
13068 error,
13069 }),
13070 }
13071 }
13072
13073 105530239381466147 => {
13074 let responder = ::fidl_next::Responder::from_untyped(responder);
13075
13076 handler.get_flags(responder).await;
13077 Ok(())
13078 }
13079
13080 6172186066099445416 => {
13081 let responder = ::fidl_next::Responder::from_untyped(responder);
13082
13083 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13084 Ok(decoded) => {
13085 handler
13086 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
13087 .await;
13088 Ok(())
13089 }
13090 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13091 ordinal: 6172186066099445416,
13092 error,
13093 }),
13094 }
13095 }
13096
13097 8013111122914313744 => {
13098 let responder = ::fidl_next::Responder::from_untyped(responder);
13099
13100 handler.query_filesystem(responder).await;
13101 Ok(())
13102 }
13103
13104 5788516050773961964 => {
13105 let responder = ::fidl_next::Responder::from_untyped(responder);
13106
13107 handler.get_token(responder).await;
13108 Ok(())
13109 }
13110
13111 4414537700416816443 => {
13112 let responder = ::fidl_next::Responder::from_untyped(responder);
13113
13114 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13115 Ok(decoded) => {
13116 handler
13117 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
13118 .await;
13119 Ok(())
13120 }
13121 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13122 ordinal: 4414537700416816443,
13123 error,
13124 }),
13125 }
13126 }
13127
13128 3677402239314018056 => {
13129 let responder = ::fidl_next::Responder::from_untyped(responder);
13130
13131 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13132 Ok(decoded) => {
13133 handler
13134 .update_attributes(
13135 ::fidl_next::Request::from_decoded(decoded),
13136 responder,
13137 )
13138 .await;
13139 Ok(())
13140 }
13141 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13142 ordinal: 3677402239314018056,
13143 error,
13144 }),
13145 }
13146 }
13147
13148 3196473584242777161 => {
13149 let responder = ::fidl_next::Responder::from_untyped(responder);
13150
13151 handler.sync(responder).await;
13152 Ok(())
13153 }
13154
13155 5043930208506967771 => {
13156 let responder = ::fidl_next::Responder::from_untyped(responder);
13157
13158 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13159 Ok(decoded) => {
13160 handler
13161 .get_extended_attribute(
13162 ::fidl_next::Request::from_decoded(decoded),
13163 responder,
13164 )
13165 .await;
13166 Ok(())
13167 }
13168 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13169 ordinal: 5043930208506967771,
13170 error,
13171 }),
13172 }
13173 }
13174
13175 5374223046099989052 => {
13176 let responder = ::fidl_next::Responder::from_untyped(responder);
13177
13178 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13179 Ok(decoded) => {
13180 handler
13181 .set_extended_attribute(
13182 ::fidl_next::Request::from_decoded(decoded),
13183 responder,
13184 )
13185 .await;
13186 Ok(())
13187 }
13188 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13189 ordinal: 5374223046099989052,
13190 error,
13191 }),
13192 }
13193 }
13194
13195 8794297771444732717 => {
13196 let responder = ::fidl_next::Responder::from_untyped(responder);
13197
13198 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13199 Ok(decoded) => {
13200 handler
13201 .remove_extended_attribute(
13202 ::fidl_next::Request::from_decoded(decoded),
13203 responder,
13204 )
13205 .await;
13206 Ok(())
13207 }
13208 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13209 ordinal: 8794297771444732717,
13210 error,
13211 }),
13212 }
13213 }
13214
13215 3855785432100874762 => {
13216 let responder = ::fidl_next::Responder::from_untyped(responder);
13217
13218 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13219 Ok(decoded) => {
13220 handler
13221 .read_dirents(::fidl_next::Request::from_decoded(decoded), responder)
13222 .await;
13223 Ok(())
13224 }
13225 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13226 ordinal: 3855785432100874762,
13227 error,
13228 }),
13229 }
13230 }
13231
13232 1635123508515392625 => {
13233 let responder = ::fidl_next::Responder::from_untyped(responder);
13234
13235 handler.rewind(responder).await;
13236 Ok(())
13237 }
13238
13239 2787337947777369685 => {
13240 let responder = ::fidl_next::Responder::from_untyped(responder);
13241
13242 handler.deprecated_get_token(responder).await;
13243 Ok(())
13244 }
13245
13246 8360374984291987687 => {
13247 let responder = ::fidl_next::Responder::from_untyped(responder);
13248
13249 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13250 Ok(decoded) => {
13251 handler.link(::fidl_next::Request::from_decoded(decoded), responder).await;
13252 Ok(())
13253 }
13254 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13255 ordinal: 8360374984291987687,
13256 error,
13257 }),
13258 }
13259 }
13260
13261 8433556716759383021 => {
13262 let responder = ::fidl_next::Responder::from_untyped(responder);
13263
13264 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13265 Ok(decoded) => {
13266 handler
13267 .unlink(::fidl_next::Request::from_decoded(decoded), responder)
13268 .await;
13269 Ok(())
13270 }
13271 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13272 ordinal: 8433556716759383021,
13273 error,
13274 }),
13275 }
13276 }
13277
13278 8097726607824333022 => {
13279 let responder = ::fidl_next::Responder::from_untyped(responder);
13280
13281 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13282 Ok(decoded) => {
13283 handler
13284 .rename(::fidl_next::Request::from_decoded(decoded), responder)
13285 .await;
13286 Ok(())
13287 }
13288 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13289 ordinal: 8097726607824333022,
13290 error,
13291 }),
13292 }
13293 }
13294
13295 2435901052462315657 => {
13296 let responder = ::fidl_next::Responder::from_untyped(responder);
13297
13298 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13299 Ok(decoded) => {
13300 handler
13301 .create_symlink(::fidl_next::Request::from_decoded(decoded), responder)
13302 .await;
13303 Ok(())
13304 }
13305 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13306 ordinal: 2435901052462315657,
13307 error,
13308 }),
13309 }
13310 }
13311
13312 6275512344170098065 => {
13313 let responder = ::fidl_next::Responder::from_untyped(responder);
13314
13315 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13316 Ok(decoded) => {
13317 handler.watch(::fidl_next::Request::from_decoded(decoded), responder).await;
13318 Ok(())
13319 }
13320 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13321 ordinal: 6275512344170098065,
13322 error,
13323 }),
13324 }
13325 }
13326
13327 ordinal => {
13328 handler.on_unknown_interaction(ordinal).await;
13329 if ::core::matches!(
13330 message.header().flexibility(),
13331 ::fidl_next::protocol::Flexibility::Strict
13332 ) {
13333 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
13334 } else {
13335 responder
13336 .respond_framework_error(
13337 ordinal,
13338 ::fidl_next::FrameworkError::UnknownMethod,
13339 )
13340 .expect("encoding a framework error should never fail")
13341 .await?;
13342 Ok(())
13343 }
13344 }
13345 }
13346 }
13347}
13348
13349impl<___T> DirectoryClientHandler<___T> for ::fidl_next::IgnoreEvents
13350where
13351 ___T: ::fidl_next::Transport,
13352{
13353 async fn on_open(&mut self, _: ::fidl_next::Request<directory::OnOpen, ___T>) {}
13354
13355 async fn on_representation(
13356 &mut self,
13357
13358 _: ::fidl_next::Request<directory::OnRepresentation, ___T>,
13359 ) {
13360 }
13361
13362 async fn on_unknown_interaction(&mut self, _: u64) {}
13363}
13364
13365impl<___H, ___T> DirectoryLocalClientHandler<___T> for ::fidl_next::Local<___H>
13366where
13367 ___H: DirectoryClientHandler<___T>,
13368 ___T: ::fidl_next::Transport,
13369{
13370 async fn on_open(&mut self, request: ::fidl_next::Request<directory::OnOpen, ___T>) {
13371 ___H::on_open(&mut self.0, request).await
13372 }
13373
13374 async fn on_representation(
13375 &mut self,
13376
13377 request: ::fidl_next::Request<directory::OnRepresentation, ___T>,
13378 ) {
13379 ___H::on_representation(&mut self.0, request).await
13380 }
13381
13382 async fn on_unknown_interaction(&mut self, ordinal: u64) {
13383 ___H::on_unknown_interaction(&mut self.0, ordinal).await
13384 }
13385}
13386
13387impl<___H, ___T> DirectoryLocalServerHandler<___T> for ::fidl_next::Local<___H>
13388where
13389 ___H: DirectoryServerHandler<___T>,
13390 ___T: ::fidl_next::Transport,
13391{
13392 async fn advisory_lock(
13393 &mut self,
13394
13395 request: ::fidl_next::Request<directory::AdvisoryLock, ___T>,
13396
13397 responder: ::fidl_next::Responder<directory::AdvisoryLock, ___T>,
13398 ) {
13399 ___H::advisory_lock(&mut self.0, request, responder).await
13400 }
13401
13402 async fn clone(&mut self, request: ::fidl_next::Request<directory::Clone, ___T>) {
13403 ___H::clone(&mut self.0, request).await
13404 }
13405
13406 async fn close(&mut self, responder: ::fidl_next::Responder<directory::Close, ___T>) {
13407 ___H::close(&mut self.0, responder).await
13408 }
13409
13410 async fn query(&mut self, responder: ::fidl_next::Responder<directory::Query, ___T>) {
13411 ___H::query(&mut self.0, responder).await
13412 }
13413
13414 async fn deprecated_clone(
13415 &mut self,
13416
13417 request: ::fidl_next::Request<directory::DeprecatedClone, ___T>,
13418 ) {
13419 ___H::deprecated_clone(&mut self.0, request).await
13420 }
13421
13422 async fn deprecated_get_attr(
13423 &mut self,
13424
13425 responder: ::fidl_next::Responder<directory::DeprecatedGetAttr, ___T>,
13426 ) {
13427 ___H::deprecated_get_attr(&mut self.0, responder).await
13428 }
13429
13430 async fn deprecated_set_attr(
13431 &mut self,
13432
13433 request: ::fidl_next::Request<directory::DeprecatedSetAttr, ___T>,
13434
13435 responder: ::fidl_next::Responder<directory::DeprecatedSetAttr, ___T>,
13436 ) {
13437 ___H::deprecated_set_attr(&mut self.0, request, responder).await
13438 }
13439
13440 async fn deprecated_get_flags(
13441 &mut self,
13442
13443 responder: ::fidl_next::Responder<directory::DeprecatedGetFlags, ___T>,
13444 ) {
13445 ___H::deprecated_get_flags(&mut self.0, responder).await
13446 }
13447
13448 async fn deprecated_set_flags(
13449 &mut self,
13450
13451 request: ::fidl_next::Request<directory::DeprecatedSetFlags, ___T>,
13452
13453 responder: ::fidl_next::Responder<directory::DeprecatedSetFlags, ___T>,
13454 ) {
13455 ___H::deprecated_set_flags(&mut self.0, request, responder).await
13456 }
13457
13458 async fn get_flags(&mut self, responder: ::fidl_next::Responder<directory::GetFlags, ___T>) {
13459 ___H::get_flags(&mut self.0, responder).await
13460 }
13461
13462 async fn set_flags(
13463 &mut self,
13464
13465 request: ::fidl_next::Request<directory::SetFlags, ___T>,
13466
13467 responder: ::fidl_next::Responder<directory::SetFlags, ___T>,
13468 ) {
13469 ___H::set_flags(&mut self.0, request, responder).await
13470 }
13471
13472 async fn query_filesystem(
13473 &mut self,
13474
13475 responder: ::fidl_next::Responder<directory::QueryFilesystem, ___T>,
13476 ) {
13477 ___H::query_filesystem(&mut self.0, responder).await
13478 }
13479
13480 async fn get_token(&mut self, responder: ::fidl_next::Responder<directory::GetToken, ___T>) {
13481 ___H::get_token(&mut self.0, responder).await
13482 }
13483
13484 async fn get_attributes(
13485 &mut self,
13486
13487 request: ::fidl_next::Request<directory::GetAttributes, ___T>,
13488
13489 responder: ::fidl_next::Responder<directory::GetAttributes, ___T>,
13490 ) {
13491 ___H::get_attributes(&mut self.0, request, responder).await
13492 }
13493
13494 async fn update_attributes(
13495 &mut self,
13496
13497 request: ::fidl_next::Request<directory::UpdateAttributes, ___T>,
13498
13499 responder: ::fidl_next::Responder<directory::UpdateAttributes, ___T>,
13500 ) {
13501 ___H::update_attributes(&mut self.0, request, responder).await
13502 }
13503
13504 async fn sync(&mut self, responder: ::fidl_next::Responder<directory::Sync, ___T>) {
13505 ___H::sync(&mut self.0, responder).await
13506 }
13507
13508 async fn list_extended_attributes(
13509 &mut self,
13510
13511 request: ::fidl_next::Request<directory::ListExtendedAttributes, ___T>,
13512 ) {
13513 ___H::list_extended_attributes(&mut self.0, request).await
13514 }
13515
13516 async fn get_extended_attribute(
13517 &mut self,
13518
13519 request: ::fidl_next::Request<directory::GetExtendedAttribute, ___T>,
13520
13521 responder: ::fidl_next::Responder<directory::GetExtendedAttribute, ___T>,
13522 ) {
13523 ___H::get_extended_attribute(&mut self.0, request, responder).await
13524 }
13525
13526 async fn set_extended_attribute(
13527 &mut self,
13528
13529 request: ::fidl_next::Request<directory::SetExtendedAttribute, ___T>,
13530
13531 responder: ::fidl_next::Responder<directory::SetExtendedAttribute, ___T>,
13532 ) {
13533 ___H::set_extended_attribute(&mut self.0, request, responder).await
13534 }
13535
13536 async fn remove_extended_attribute(
13537 &mut self,
13538
13539 request: ::fidl_next::Request<directory::RemoveExtendedAttribute, ___T>,
13540
13541 responder: ::fidl_next::Responder<directory::RemoveExtendedAttribute, ___T>,
13542 ) {
13543 ___H::remove_extended_attribute(&mut self.0, request, responder).await
13544 }
13545
13546 async fn open(&mut self, request: ::fidl_next::Request<directory::Open, ___T>) {
13547 ___H::open(&mut self.0, request).await
13548 }
13549
13550 async fn deprecated_open(
13551 &mut self,
13552
13553 request: ::fidl_next::Request<directory::DeprecatedOpen, ___T>,
13554 ) {
13555 ___H::deprecated_open(&mut self.0, request).await
13556 }
13557
13558 async fn read_dirents(
13559 &mut self,
13560
13561 request: ::fidl_next::Request<directory::ReadDirents, ___T>,
13562
13563 responder: ::fidl_next::Responder<directory::ReadDirents, ___T>,
13564 ) {
13565 ___H::read_dirents(&mut self.0, request, responder).await
13566 }
13567
13568 async fn rewind(&mut self, responder: ::fidl_next::Responder<directory::Rewind, ___T>) {
13569 ___H::rewind(&mut self.0, responder).await
13570 }
13571
13572 async fn deprecated_get_token(
13573 &mut self,
13574
13575 responder: ::fidl_next::Responder<directory::DeprecatedGetToken, ___T>,
13576 ) {
13577 ___H::deprecated_get_token(&mut self.0, responder).await
13578 }
13579
13580 async fn link(
13581 &mut self,
13582
13583 request: ::fidl_next::Request<directory::Link, ___T>,
13584
13585 responder: ::fidl_next::Responder<directory::Link, ___T>,
13586 ) {
13587 ___H::link(&mut self.0, request, responder).await
13588 }
13589
13590 async fn unlink(
13591 &mut self,
13592
13593 request: ::fidl_next::Request<directory::Unlink, ___T>,
13594
13595 responder: ::fidl_next::Responder<directory::Unlink, ___T>,
13596 ) {
13597 ___H::unlink(&mut self.0, request, responder).await
13598 }
13599
13600 async fn rename(
13601 &mut self,
13602
13603 request: ::fidl_next::Request<directory::Rename, ___T>,
13604
13605 responder: ::fidl_next::Responder<directory::Rename, ___T>,
13606 ) {
13607 ___H::rename(&mut self.0, request, responder).await
13608 }
13609
13610 async fn create_symlink(
13611 &mut self,
13612
13613 request: ::fidl_next::Request<directory::CreateSymlink, ___T>,
13614
13615 responder: ::fidl_next::Responder<directory::CreateSymlink, ___T>,
13616 ) {
13617 ___H::create_symlink(&mut self.0, request, responder).await
13618 }
13619
13620 async fn watch(
13621 &mut self,
13622
13623 request: ::fidl_next::Request<directory::Watch, ___T>,
13624
13625 responder: ::fidl_next::Responder<directory::Watch, ___T>,
13626 ) {
13627 ___H::watch(&mut self.0, request, responder).await
13628 }
13629
13630 async fn on_unknown_interaction(&mut self, ordinal: u64) {
13631 ___H::on_unknown_interaction(&mut self.0, ordinal).await
13632 }
13633}
13634
13635#[derive(PartialEq, Debug)]
13637pub struct Linkable;
13638
13639#[cfg(target_os = "fuchsia")]
13640impl ::fidl_next::HasTransport for Linkable {
13641 type Transport = ::fidl_next::fuchsia::zx::Channel;
13642}
13643
13644pub mod linkable {
13645 pub mod prelude {
13646 pub use crate::{
13647 Linkable, LinkableClientHandler, LinkableLocalClientHandler,
13648 LinkableLocalServerHandler, LinkableServerHandler, linkable,
13649 };
13650
13651 pub use crate::natural::LinkableLinkIntoRequest;
13652
13653 pub use crate::natural::LinkableLinkIntoResponse;
13654 }
13655
13656 pub struct LinkInto;
13657
13658 impl ::fidl_next::Method for LinkInto {
13659 const ORDINAL: u64 = 6121399674497678964;
13660 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
13661 ::fidl_next::protocol::Flexibility::Strict;
13662
13663 type Protocol = crate::Linkable;
13664
13665 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
13666 }
13667
13668 impl ::fidl_next::TwoWayMethod for LinkInto {
13669 type Response = ::fidl_next::wire::Result<
13670 'static,
13671 crate::wire::LinkableLinkIntoResponse,
13672 ::fidl_next::wire::fuchsia::Status,
13673 >;
13674 }
13675
13676 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
13677 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
13678
13679 fn respond(response: ___R) -> Self::Output {
13680 ::core::result::Result::Ok(response)
13681 }
13682 }
13683
13684 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
13685 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
13686
13687 fn respond_err(response: ___R) -> Self::Output {
13688 ::core::result::Result::Err(response)
13689 }
13690 }
13691
13692 mod ___detail {
13693 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Linkable
13694 where
13695 ___T: ::fidl_next::Transport,
13696 {
13697 type Client = LinkableClient<___T>;
13698 type Server = LinkableServer<___T>;
13699 }
13700
13701 #[repr(transparent)]
13703 pub struct LinkableClient<___T: ::fidl_next::Transport> {
13704 #[allow(dead_code)]
13705 client: ::fidl_next::protocol::Client<___T>,
13706 }
13707
13708 impl<___T> LinkableClient<___T>
13709 where
13710 ___T: ::fidl_next::Transport,
13711 {
13712 #[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"]
13713 pub fn link_into(
13714 &self,
13715
13716 dst_parent_token: impl ::fidl_next::Encode<
13717 ::fidl_next::wire::fuchsia::Event,
13718 <___T as ::fidl_next::Transport>::SendBuffer,
13719 >,
13720
13721 dst: impl ::fidl_next::Encode<
13722 ::fidl_next::wire::String<'static>,
13723 <___T as ::fidl_next::Transport>::SendBuffer,
13724 >,
13725 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
13726 where
13727 <___T as ::fidl_next::Transport>::SendBuffer:
13728 ::fidl_next::encoder::InternalHandleEncoder,
13729 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
13730 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
13731 {
13732 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
13733 dst_parent_token,
13734
13735 dst,
13736 })
13737 }
13738
13739 #[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"]
13740 pub fn link_into_with<___R>(
13741 &self,
13742 request: ___R,
13743 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
13744 where
13745 ___R: ::fidl_next::Encode<
13746 crate::wire::LinkableLinkIntoRequest<'static>,
13747 <___T as ::fidl_next::Transport>::SendBuffer,
13748 >,
13749 {
13750 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
13751 6121399674497678964,
13752 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
13753 request,
13754 ))
13755 }
13756 }
13757
13758 #[repr(transparent)]
13760 pub struct LinkableServer<___T: ::fidl_next::Transport> {
13761 server: ::fidl_next::protocol::Server<___T>,
13762 }
13763
13764 impl<___T> LinkableServer<___T> where ___T: ::fidl_next::Transport {}
13765 }
13766}
13767
13768#[diagnostic::on_unimplemented(
13769 note = "If {Self} implements the non-local LinkableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
13770)]
13771
13772pub trait LinkableLocalClientHandler<
13776 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13777 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13778>
13779{
13780}
13781
13782impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Linkable
13783where
13784 ___H: LinkableLocalClientHandler<___T>,
13785 ___T: ::fidl_next::Transport,
13786{
13787 async fn on_event(
13788 handler: &mut ___H,
13789 mut message: ::fidl_next::Message<___T>,
13790 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13791 match *message.header().ordinal {
13792 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
13793 }
13794 }
13795}
13796
13797#[diagnostic::on_unimplemented(
13798 note = "If {Self} implements the non-local LinkableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
13799)]
13800
13801pub trait LinkableLocalServerHandler<
13805 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13806 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13807>
13808{
13809 #[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"]
13810 fn link_into(
13811 &mut self,
13812
13813 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
13814
13815 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
13816 ) -> impl ::core::future::Future<Output = ()>;
13817}
13818
13819impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Linkable
13820where
13821 ___H: LinkableLocalServerHandler<___T>,
13822 ___T: ::fidl_next::Transport,
13823 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
13824 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13825 Constraint = (),
13826 >,
13827{
13828 async fn on_one_way(
13829 handler: &mut ___H,
13830 mut message: ::fidl_next::Message<___T>,
13831 ) -> ::core::result::Result<
13832 (),
13833 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13834 > {
13835 match *message.header().ordinal {
13836 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
13837 }
13838 }
13839
13840 async fn on_two_way(
13841 handler: &mut ___H,
13842 mut message: ::fidl_next::Message<___T>,
13843 responder: ::fidl_next::protocol::Responder<___T>,
13844 ) -> ::core::result::Result<
13845 (),
13846 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13847 > {
13848 match *message.header().ordinal {
13849 6121399674497678964 => {
13850 let responder = ::fidl_next::Responder::from_untyped(responder);
13851
13852 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13853 Ok(decoded) => {
13854 handler
13855 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
13856 .await;
13857 Ok(())
13858 }
13859 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13860 ordinal: 6121399674497678964,
13861 error,
13862 }),
13863 }
13864 }
13865
13866 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
13867 }
13868 }
13869}
13870
13871pub trait LinkableClientHandler<
13875 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13876 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13877>
13878{
13879}
13880
13881impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Linkable
13882where
13883 ___H: LinkableClientHandler<___T> + ::core::marker::Send,
13884 ___T: ::fidl_next::Transport,
13885{
13886 async fn on_event(
13887 handler: &mut ___H,
13888 mut message: ::fidl_next::Message<___T>,
13889 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
13890 match *message.header().ordinal {
13891 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
13892 }
13893 }
13894}
13895
13896pub trait LinkableServerHandler<
13900 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13901 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
13902>
13903{
13904 #[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"]
13905 fn link_into(
13906 &mut self,
13907
13908 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
13909
13910 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
13911 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
13912}
13913
13914impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Linkable
13915where
13916 ___H: LinkableServerHandler<___T> + ::core::marker::Send,
13917 ___T: ::fidl_next::Transport,
13918 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
13919 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
13920 Constraint = (),
13921 >,
13922{
13923 async fn on_one_way(
13924 handler: &mut ___H,
13925 mut message: ::fidl_next::Message<___T>,
13926 ) -> ::core::result::Result<
13927 (),
13928 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13929 > {
13930 match *message.header().ordinal {
13931 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
13932 }
13933 }
13934
13935 async fn on_two_way(
13936 handler: &mut ___H,
13937 mut message: ::fidl_next::Message<___T>,
13938 responder: ::fidl_next::protocol::Responder<___T>,
13939 ) -> ::core::result::Result<
13940 (),
13941 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
13942 > {
13943 match *message.header().ordinal {
13944 6121399674497678964 => {
13945 let responder = ::fidl_next::Responder::from_untyped(responder);
13946
13947 match ::fidl_next::AsDecoderExt::into_decoded(message) {
13948 Ok(decoded) => {
13949 handler
13950 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
13951 .await;
13952 Ok(())
13953 }
13954 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
13955 ordinal: 6121399674497678964,
13956 error,
13957 }),
13958 }
13959 }
13960
13961 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
13962 }
13963 }
13964}
13965
13966impl<___T> LinkableClientHandler<___T> for ::fidl_next::IgnoreEvents where
13967 ___T: ::fidl_next::Transport
13968{
13969}
13970
13971impl<___H, ___T> LinkableLocalClientHandler<___T> for ::fidl_next::Local<___H>
13972where
13973 ___H: LinkableClientHandler<___T>,
13974 ___T: ::fidl_next::Transport,
13975{
13976}
13977
13978impl<___H, ___T> LinkableLocalServerHandler<___T> for ::fidl_next::Local<___H>
13979where
13980 ___H: LinkableServerHandler<___T>,
13981 ___T: ::fidl_next::Transport,
13982{
13983 async fn link_into(
13984 &mut self,
13985
13986 request: ::fidl_next::Request<linkable::LinkInto, ___T>,
13987
13988 responder: ::fidl_next::Responder<linkable::LinkInto, ___T>,
13989 ) {
13990 ___H::link_into(&mut self.0, request, responder).await
13991 }
13992}
13993
13994#[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"]
13996#[derive(PartialEq, Debug)]
13997pub struct File;
13998
13999impl ::fidl_next::Discoverable for File {
14000 const PROTOCOL_NAME: &'static str = "fuchsia.io.File";
14001}
14002
14003#[cfg(target_os = "fuchsia")]
14004impl ::fidl_next::HasTransport for File {
14005 type Transport = ::fidl_next::fuchsia::zx::Channel;
14006}
14007
14008pub mod file {
14009 pub mod prelude {
14010 pub use crate::{
14011 File, FileClientHandler, FileLocalClientHandler, FileLocalServerHandler,
14012 FileServerHandler, file,
14013 };
14014
14015 pub use crate::natural::AdvisoryLockingAdvisoryLockRequest;
14016
14017 pub use crate::natural::AdvisoryLockingAdvisoryLockResponse;
14018
14019 pub use crate::natural::ExtendedAttributeValue;
14020
14021 pub use crate::natural::FileAllocateRequest;
14022
14023 pub use crate::natural::FileEnableVerityRequest;
14024
14025 pub use crate::natural::FileGetBackingMemoryRequest;
14026
14027 pub use crate::natural::FileInfo;
14028
14029 pub use crate::natural::FileReadAtRequest;
14030
14031 pub use crate::natural::FileResizeRequest;
14032
14033 pub use crate::natural::FileSeekRequest;
14034
14035 pub use crate::natural::FileWriteAtRequest;
14036
14037 pub use crate::natural::FileAllocateResponse;
14038
14039 pub use crate::natural::FileEnableVerityResponse;
14040
14041 pub use crate::natural::FileGetBackingMemoryResponse;
14042
14043 pub use crate::natural::FileReadAtResponse;
14044
14045 pub use crate::natural::FileResizeResponse;
14046
14047 pub use crate::natural::FileSeekResponse;
14048
14049 pub use crate::natural::FileWriteAtResponse;
14050
14051 pub use crate::natural::LinkableLinkIntoRequest;
14052
14053 pub use crate::natural::LinkableLinkIntoResponse;
14054
14055 pub use crate::natural::MutableNodeAttributes;
14056
14057 pub use crate::natural::NodeAttributes2;
14058
14059 pub use crate::natural::NodeDeprecatedCloneRequest;
14060
14061 pub use crate::natural::NodeDeprecatedGetAttrResponse;
14062
14063 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
14064
14065 pub use crate::natural::NodeDeprecatedSetAttrRequest;
14066
14067 pub use crate::natural::NodeDeprecatedSetAttrResponse;
14068
14069 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
14070
14071 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
14072
14073 pub use crate::natural::NodeGetAttributesRequest;
14074
14075 pub use crate::natural::NodeGetExtendedAttributeRequest;
14076
14077 pub use crate::natural::NodeListExtendedAttributesRequest;
14078
14079 pub use crate::natural::NodeOnOpenRequest;
14080
14081 pub use crate::natural::NodeQueryFilesystemResponse;
14082
14083 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
14084
14085 pub use crate::natural::NodeSetExtendedAttributeRequest;
14086
14087 pub use crate::natural::NodeSetFlagsRequest;
14088
14089 pub use crate::natural::NodeGetFlagsResponse;
14090
14091 pub use crate::natural::NodeGetTokenResponse;
14092
14093 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
14094
14095 pub use crate::natural::NodeSetExtendedAttributeResponse;
14096
14097 pub use crate::natural::NodeSetFlagsResponse;
14098
14099 pub use crate::natural::NodeSyncResponse;
14100
14101 pub use crate::natural::NodeUpdateAttributesResponse;
14102
14103 pub use crate::natural::ReadableReadRequest;
14104
14105 pub use crate::natural::ReadableReadResponse;
14106
14107 pub use crate::natural::Representation;
14108
14109 pub use crate::natural::WritableWriteRequest;
14110
14111 pub use crate::natural::WritableWriteResponse;
14112
14113 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
14114
14115 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
14116
14117 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
14118 }
14119
14120 pub struct AdvisoryLock;
14121
14122 impl ::fidl_next::Method for AdvisoryLock {
14123 const ORDINAL: u64 = 7992130864415541162;
14124 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14125 ::fidl_next::protocol::Flexibility::Strict;
14126
14127 type Protocol = crate::File;
14128
14129 type Request = crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>;
14130 }
14131
14132 impl ::fidl_next::TwoWayMethod for AdvisoryLock {
14133 type Response = ::fidl_next::wire::Result<
14134 'static,
14135 crate::wire::AdvisoryLockingAdvisoryLockResponse,
14136 ::fidl_next::wire::fuchsia::Status,
14137 >;
14138 }
14139
14140 impl<___R> ::fidl_next::Respond<___R> for AdvisoryLock {
14141 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14142
14143 fn respond(response: ___R) -> Self::Output {
14144 ::core::result::Result::Ok(response)
14145 }
14146 }
14147
14148 impl<___R> ::fidl_next::RespondErr<___R> for AdvisoryLock {
14149 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14150
14151 fn respond_err(response: ___R) -> Self::Output {
14152 ::core::result::Result::Err(response)
14153 }
14154 }
14155
14156 pub struct LinkInto;
14157
14158 impl ::fidl_next::Method for LinkInto {
14159 const ORDINAL: u64 = 6121399674497678964;
14160 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14161 ::fidl_next::protocol::Flexibility::Strict;
14162
14163 type Protocol = crate::File;
14164
14165 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
14166 }
14167
14168 impl ::fidl_next::TwoWayMethod for LinkInto {
14169 type Response = ::fidl_next::wire::Result<
14170 'static,
14171 crate::wire::LinkableLinkIntoResponse,
14172 ::fidl_next::wire::fuchsia::Status,
14173 >;
14174 }
14175
14176 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
14177 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14178
14179 fn respond(response: ___R) -> Self::Output {
14180 ::core::result::Result::Ok(response)
14181 }
14182 }
14183
14184 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
14185 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14186
14187 fn respond_err(response: ___R) -> Self::Output {
14188 ::core::result::Result::Err(response)
14189 }
14190 }
14191
14192 pub struct Clone;
14193
14194 impl ::fidl_next::Method for Clone {
14195 const ORDINAL: u64 = 2366825959783828089;
14196 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14197 ::fidl_next::protocol::Flexibility::Strict;
14198
14199 type Protocol = crate::File;
14200
14201 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
14202 }
14203
14204 pub struct Close;
14205
14206 impl ::fidl_next::Method for Close {
14207 const ORDINAL: u64 = 6540867515453498750;
14208 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14209 ::fidl_next::protocol::Flexibility::Strict;
14210
14211 type Protocol = crate::File;
14212
14213 type Request = ::fidl_next::wire::EmptyMessageBody;
14214 }
14215
14216 impl ::fidl_next::TwoWayMethod for Close {
14217 type Response = ::fidl_next::wire::Result<
14218 'static,
14219 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
14220 ::fidl_next::wire::Int32,
14221 >;
14222 }
14223
14224 impl<___R> ::fidl_next::Respond<___R> for Close {
14225 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14226
14227 fn respond(response: ___R) -> Self::Output {
14228 ::core::result::Result::Ok(response)
14229 }
14230 }
14231
14232 impl<___R> ::fidl_next::RespondErr<___R> for Close {
14233 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14234
14235 fn respond_err(response: ___R) -> Self::Output {
14236 ::core::result::Result::Err(response)
14237 }
14238 }
14239
14240 pub struct Query;
14241
14242 impl ::fidl_next::Method for Query {
14243 const ORDINAL: u64 = 2763219980499352582;
14244 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14245 ::fidl_next::protocol::Flexibility::Strict;
14246
14247 type Protocol = crate::File;
14248
14249 type Request = ::fidl_next::wire::EmptyMessageBody;
14250 }
14251
14252 impl ::fidl_next::TwoWayMethod for Query {
14253 type Response = ::fidl_next::wire::Strict<
14254 ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
14255 >;
14256 }
14257
14258 impl<___R> ::fidl_next::Respond<___R> for Query {
14259 type Output =
14260 ::fidl_next::Strict<::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>>;
14261
14262 fn respond(response: ___R) -> Self::Output {
14263 ::fidl_next::Strict(::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse {
14264 protocol: response,
14265 })
14266 }
14267 }
14268
14269 pub struct DeprecatedClone;
14270
14271 impl ::fidl_next::Method for DeprecatedClone {
14272 const ORDINAL: u64 = 6512600400724287855;
14273 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14274 ::fidl_next::protocol::Flexibility::Flexible;
14275
14276 type Protocol = crate::File;
14277
14278 type Request = crate::wire::NodeDeprecatedCloneRequest;
14279 }
14280
14281 pub struct OnOpen;
14282
14283 impl ::fidl_next::Method for OnOpen {
14284 const ORDINAL: u64 = 9207534335756671346;
14285 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14286 ::fidl_next::protocol::Flexibility::Flexible;
14287
14288 type Protocol = crate::File;
14289
14290 type Request = crate::wire::NodeOnOpenRequest<'static>;
14291 }
14292
14293 pub struct DeprecatedGetAttr;
14294
14295 impl ::fidl_next::Method for DeprecatedGetAttr {
14296 const ORDINAL: u64 = 8689798978500614909;
14297 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14298 ::fidl_next::protocol::Flexibility::Strict;
14299
14300 type Protocol = crate::File;
14301
14302 type Request = ::fidl_next::wire::EmptyMessageBody;
14303 }
14304
14305 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
14306 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
14307 }
14308
14309 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
14310 type Output = ::fidl_next::Strict<___R>;
14311
14312 fn respond(response: ___R) -> Self::Output {
14313 ::fidl_next::Strict(response)
14314 }
14315 }
14316
14317 pub struct DeprecatedSetAttr;
14318
14319 impl ::fidl_next::Method for DeprecatedSetAttr {
14320 const ORDINAL: u64 = 4721673413776871238;
14321 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14322 ::fidl_next::protocol::Flexibility::Strict;
14323
14324 type Protocol = crate::File;
14325
14326 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
14327 }
14328
14329 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
14330 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
14331 }
14332
14333 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
14334 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
14335
14336 fn respond(response: ___R) -> Self::Output {
14337 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
14338 }
14339 }
14340
14341 pub struct DeprecatedGetFlags;
14342
14343 impl ::fidl_next::Method for DeprecatedGetFlags {
14344 const ORDINAL: u64 = 6595803110182632097;
14345 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14346 ::fidl_next::protocol::Flexibility::Strict;
14347
14348 type Protocol = crate::File;
14349
14350 type Request = ::fidl_next::wire::EmptyMessageBody;
14351 }
14352
14353 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
14354 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
14355 }
14356
14357 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
14358 type Output = ::fidl_next::Strict<___R>;
14359
14360 fn respond(response: ___R) -> Self::Output {
14361 ::fidl_next::Strict(response)
14362 }
14363 }
14364
14365 pub struct DeprecatedSetFlags;
14366
14367 impl ::fidl_next::Method for DeprecatedSetFlags {
14368 const ORDINAL: u64 = 5950864159036794675;
14369 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14370 ::fidl_next::protocol::Flexibility::Strict;
14371
14372 type Protocol = crate::File;
14373
14374 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
14375 }
14376
14377 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
14378 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
14379 }
14380
14381 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
14382 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
14383
14384 fn respond(response: ___R) -> Self::Output {
14385 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
14386 }
14387 }
14388
14389 pub struct GetFlags;
14390
14391 impl ::fidl_next::Method for GetFlags {
14392 const ORDINAL: u64 = 105530239381466147;
14393 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14394 ::fidl_next::protocol::Flexibility::Flexible;
14395
14396 type Protocol = crate::File;
14397
14398 type Request = ::fidl_next::wire::EmptyMessageBody;
14399 }
14400
14401 impl ::fidl_next::TwoWayMethod for GetFlags {
14402 type Response = ::fidl_next::wire::Result<
14403 'static,
14404 crate::wire::NodeGetFlagsResponse,
14405 ::fidl_next::wire::fuchsia::Status,
14406 >;
14407 }
14408
14409 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
14410 type Output = ::core::result::Result<
14411 crate::generic::NodeGetFlagsResponse<___R>,
14412 ::fidl_next::never::Never,
14413 >;
14414
14415 fn respond(response: ___R) -> Self::Output {
14416 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
14417 }
14418 }
14419
14420 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
14421 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14422
14423 fn respond_err(response: ___R) -> Self::Output {
14424 ::core::result::Result::Err(response)
14425 }
14426 }
14427
14428 pub struct SetFlags;
14429
14430 impl ::fidl_next::Method for SetFlags {
14431 const ORDINAL: u64 = 6172186066099445416;
14432 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14433 ::fidl_next::protocol::Flexibility::Flexible;
14434
14435 type Protocol = crate::File;
14436
14437 type Request = crate::wire::NodeSetFlagsRequest;
14438 }
14439
14440 impl ::fidl_next::TwoWayMethod for SetFlags {
14441 type Response = ::fidl_next::wire::Result<
14442 'static,
14443 crate::wire::NodeSetFlagsResponse,
14444 ::fidl_next::wire::fuchsia::Status,
14445 >;
14446 }
14447
14448 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
14449 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14450
14451 fn respond(response: ___R) -> Self::Output {
14452 ::core::result::Result::Ok(response)
14453 }
14454 }
14455
14456 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
14457 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14458
14459 fn respond_err(response: ___R) -> Self::Output {
14460 ::core::result::Result::Err(response)
14461 }
14462 }
14463
14464 pub struct QueryFilesystem;
14465
14466 impl ::fidl_next::Method for QueryFilesystem {
14467 const ORDINAL: u64 = 8013111122914313744;
14468 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14469 ::fidl_next::protocol::Flexibility::Strict;
14470
14471 type Protocol = crate::File;
14472
14473 type Request = ::fidl_next::wire::EmptyMessageBody;
14474 }
14475
14476 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
14477 type Response =
14478 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
14479 }
14480
14481 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
14482 type Output = ::fidl_next::Strict<___R>;
14483
14484 fn respond(response: ___R) -> Self::Output {
14485 ::fidl_next::Strict(response)
14486 }
14487 }
14488
14489 pub struct OnRepresentation;
14490
14491 impl ::fidl_next::Method for OnRepresentation {
14492 const ORDINAL: u64 = 6679970090861613324;
14493 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14494 ::fidl_next::protocol::Flexibility::Strict;
14495
14496 type Protocol = crate::File;
14497
14498 type Request = crate::wire::Representation<'static>;
14499 }
14500
14501 pub struct GetToken;
14502
14503 impl ::fidl_next::Method for GetToken {
14504 const ORDINAL: u64 = 5788516050773961964;
14505 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14506 ::fidl_next::protocol::Flexibility::Flexible;
14507
14508 type Protocol = crate::File;
14509
14510 type Request = ::fidl_next::wire::EmptyMessageBody;
14511 }
14512
14513 impl ::fidl_next::TwoWayMethod for GetToken {
14514 type Response = ::fidl_next::wire::Result<
14515 'static,
14516 crate::wire::NodeGetTokenResponse,
14517 ::fidl_next::wire::fuchsia::Status,
14518 >;
14519 }
14520
14521 impl<___R> ::fidl_next::Respond<___R> for GetToken {
14522 type Output = ::core::result::Result<
14523 crate::generic::NodeGetTokenResponse<___R>,
14524 ::fidl_next::never::Never,
14525 >;
14526
14527 fn respond(response: ___R) -> Self::Output {
14528 ::core::result::Result::Ok(crate::generic::NodeGetTokenResponse { token: response })
14529 }
14530 }
14531
14532 impl<___R> ::fidl_next::RespondErr<___R> for GetToken {
14533 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14534
14535 fn respond_err(response: ___R) -> Self::Output {
14536 ::core::result::Result::Err(response)
14537 }
14538 }
14539
14540 pub struct GetAttributes;
14541
14542 impl ::fidl_next::Method for GetAttributes {
14543 const ORDINAL: u64 = 4414537700416816443;
14544 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14545 ::fidl_next::protocol::Flexibility::Strict;
14546
14547 type Protocol = crate::File;
14548
14549 type Request = crate::wire::NodeGetAttributesRequest;
14550 }
14551
14552 impl ::fidl_next::TwoWayMethod for GetAttributes {
14553 type Response = ::fidl_next::wire::Result<
14554 'static,
14555 crate::wire::NodeAttributes2<'static>,
14556 ::fidl_next::wire::fuchsia::Status,
14557 >;
14558 }
14559
14560 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
14561 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14562
14563 fn respond(response: ___R) -> Self::Output {
14564 ::core::result::Result::Ok(response)
14565 }
14566 }
14567
14568 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
14569 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14570
14571 fn respond_err(response: ___R) -> Self::Output {
14572 ::core::result::Result::Err(response)
14573 }
14574 }
14575
14576 pub struct UpdateAttributes;
14577
14578 impl ::fidl_next::Method for UpdateAttributes {
14579 const ORDINAL: u64 = 3677402239314018056;
14580 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14581 ::fidl_next::protocol::Flexibility::Strict;
14582
14583 type Protocol = crate::File;
14584
14585 type Request = crate::wire::MutableNodeAttributes<'static>;
14586 }
14587
14588 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
14589 type Response = ::fidl_next::wire::Result<
14590 'static,
14591 crate::wire::NodeUpdateAttributesResponse,
14592 ::fidl_next::wire::fuchsia::Status,
14593 >;
14594 }
14595
14596 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
14597 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14598
14599 fn respond(response: ___R) -> Self::Output {
14600 ::core::result::Result::Ok(response)
14601 }
14602 }
14603
14604 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
14605 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14606
14607 fn respond_err(response: ___R) -> Self::Output {
14608 ::core::result::Result::Err(response)
14609 }
14610 }
14611
14612 pub struct Sync;
14613
14614 impl ::fidl_next::Method for Sync {
14615 const ORDINAL: u64 = 3196473584242777161;
14616 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14617 ::fidl_next::protocol::Flexibility::Strict;
14618
14619 type Protocol = crate::File;
14620
14621 type Request = ::fidl_next::wire::EmptyMessageBody;
14622 }
14623
14624 impl ::fidl_next::TwoWayMethod for Sync {
14625 type Response = ::fidl_next::wire::Result<
14626 'static,
14627 crate::wire::NodeSyncResponse,
14628 ::fidl_next::wire::fuchsia::Status,
14629 >;
14630 }
14631
14632 impl<___R> ::fidl_next::Respond<___R> for Sync {
14633 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14634
14635 fn respond(response: ___R) -> Self::Output {
14636 ::core::result::Result::Ok(response)
14637 }
14638 }
14639
14640 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
14641 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14642
14643 fn respond_err(response: ___R) -> Self::Output {
14644 ::core::result::Result::Err(response)
14645 }
14646 }
14647
14648 pub struct ListExtendedAttributes;
14649
14650 impl ::fidl_next::Method for ListExtendedAttributes {
14651 const ORDINAL: u64 = 5431626189872037072;
14652 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14653 ::fidl_next::protocol::Flexibility::Strict;
14654
14655 type Protocol = crate::File;
14656
14657 type Request = crate::wire::NodeListExtendedAttributesRequest;
14658 }
14659
14660 pub struct GetExtendedAttribute;
14661
14662 impl ::fidl_next::Method for GetExtendedAttribute {
14663 const ORDINAL: u64 = 5043930208506967771;
14664 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14665 ::fidl_next::protocol::Flexibility::Strict;
14666
14667 type Protocol = crate::File;
14668
14669 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
14670 }
14671
14672 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
14673 type Response = ::fidl_next::wire::Result<
14674 'static,
14675 crate::wire::ExtendedAttributeValue<'static>,
14676 ::fidl_next::wire::fuchsia::Status,
14677 >;
14678 }
14679
14680 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
14681 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14682
14683 fn respond(response: ___R) -> Self::Output {
14684 ::core::result::Result::Ok(response)
14685 }
14686 }
14687
14688 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
14689 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14690
14691 fn respond_err(response: ___R) -> Self::Output {
14692 ::core::result::Result::Err(response)
14693 }
14694 }
14695
14696 pub struct SetExtendedAttribute;
14697
14698 impl ::fidl_next::Method for SetExtendedAttribute {
14699 const ORDINAL: u64 = 5374223046099989052;
14700 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14701 ::fidl_next::protocol::Flexibility::Strict;
14702
14703 type Protocol = crate::File;
14704
14705 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
14706 }
14707
14708 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
14709 type Response = ::fidl_next::wire::Result<
14710 'static,
14711 crate::wire::NodeSetExtendedAttributeResponse,
14712 ::fidl_next::wire::fuchsia::Status,
14713 >;
14714 }
14715
14716 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
14717 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14718
14719 fn respond(response: ___R) -> Self::Output {
14720 ::core::result::Result::Ok(response)
14721 }
14722 }
14723
14724 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
14725 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14726
14727 fn respond_err(response: ___R) -> Self::Output {
14728 ::core::result::Result::Err(response)
14729 }
14730 }
14731
14732 pub struct RemoveExtendedAttribute;
14733
14734 impl ::fidl_next::Method for RemoveExtendedAttribute {
14735 const ORDINAL: u64 = 8794297771444732717;
14736 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14737 ::fidl_next::protocol::Flexibility::Strict;
14738
14739 type Protocol = crate::File;
14740
14741 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
14742 }
14743
14744 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
14745 type Response = ::fidl_next::wire::Result<
14746 'static,
14747 crate::wire::NodeRemoveExtendedAttributeResponse,
14748 ::fidl_next::wire::fuchsia::Status,
14749 >;
14750 }
14751
14752 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
14753 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14754
14755 fn respond(response: ___R) -> Self::Output {
14756 ::core::result::Result::Ok(response)
14757 }
14758 }
14759
14760 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
14761 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14762
14763 fn respond_err(response: ___R) -> Self::Output {
14764 ::core::result::Result::Err(response)
14765 }
14766 }
14767
14768 pub struct Read;
14769
14770 impl ::fidl_next::Method for Read {
14771 const ORDINAL: u64 = 395825947633028830;
14772 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14773 ::fidl_next::protocol::Flexibility::Strict;
14774
14775 type Protocol = crate::File;
14776
14777 type Request = crate::wire::ReadableReadRequest;
14778 }
14779
14780 impl ::fidl_next::TwoWayMethod for Read {
14781 type Response = ::fidl_next::wire::Result<
14782 'static,
14783 crate::wire::ReadableReadResponse<'static>,
14784 ::fidl_next::wire::fuchsia::Status,
14785 >;
14786 }
14787
14788 impl<___R> ::fidl_next::Respond<___R> for Read {
14789 type Output = ::core::result::Result<
14790 crate::generic::ReadableReadResponse<___R>,
14791 ::fidl_next::never::Never,
14792 >;
14793
14794 fn respond(response: ___R) -> Self::Output {
14795 ::core::result::Result::Ok(crate::generic::ReadableReadResponse { data: response })
14796 }
14797 }
14798
14799 impl<___R> ::fidl_next::RespondErr<___R> for Read {
14800 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14801
14802 fn respond_err(response: ___R) -> Self::Output {
14803 ::core::result::Result::Err(response)
14804 }
14805 }
14806
14807 pub struct Write;
14808
14809 impl ::fidl_next::Method for Write {
14810 const ORDINAL: u64 = 7651971425397809026;
14811 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14812 ::fidl_next::protocol::Flexibility::Strict;
14813
14814 type Protocol = crate::File;
14815
14816 type Request = crate::wire::WritableWriteRequest<'static>;
14817 }
14818
14819 impl ::fidl_next::TwoWayMethod for Write {
14820 type Response = ::fidl_next::wire::Result<
14821 'static,
14822 crate::wire::WritableWriteResponse,
14823 ::fidl_next::wire::fuchsia::Status,
14824 >;
14825 }
14826
14827 impl<___R> ::fidl_next::Respond<___R> for Write {
14828 type Output = ::core::result::Result<
14829 crate::generic::WritableWriteResponse<___R>,
14830 ::fidl_next::never::Never,
14831 >;
14832
14833 fn respond(response: ___R) -> Self::Output {
14834 ::core::result::Result::Ok(crate::generic::WritableWriteResponse {
14835 actual_count: response,
14836 })
14837 }
14838 }
14839
14840 impl<___R> ::fidl_next::RespondErr<___R> for Write {
14841 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14842
14843 fn respond_err(response: ___R) -> Self::Output {
14844 ::core::result::Result::Err(response)
14845 }
14846 }
14847
14848 pub struct Describe;
14849
14850 impl ::fidl_next::Method for Describe {
14851 const ORDINAL: u64 = 7545125870053689020;
14852 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14853 ::fidl_next::protocol::Flexibility::Strict;
14854
14855 type Protocol = crate::File;
14856
14857 type Request = ::fidl_next::wire::EmptyMessageBody;
14858 }
14859
14860 impl ::fidl_next::TwoWayMethod for Describe {
14861 type Response = ::fidl_next::wire::Strict<crate::wire::FileInfo<'static>>;
14862 }
14863
14864 impl<___R> ::fidl_next::Respond<___R> for Describe {
14865 type Output = ::fidl_next::Strict<___R>;
14866
14867 fn respond(response: ___R) -> Self::Output {
14868 ::fidl_next::Strict(response)
14869 }
14870 }
14871
14872 pub struct Seek;
14873
14874 impl ::fidl_next::Method for Seek {
14875 const ORDINAL: u64 = 8649041485622956551;
14876 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14877 ::fidl_next::protocol::Flexibility::Strict;
14878
14879 type Protocol = crate::File;
14880
14881 type Request = crate::wire::FileSeekRequest;
14882 }
14883
14884 impl ::fidl_next::TwoWayMethod for Seek {
14885 type Response = ::fidl_next::wire::Result<
14886 'static,
14887 crate::wire::FileSeekResponse,
14888 ::fidl_next::wire::fuchsia::Status,
14889 >;
14890 }
14891
14892 impl<___R> ::fidl_next::Respond<___R> for Seek {
14893 type Output = ::core::result::Result<
14894 crate::generic::FileSeekResponse<___R>,
14895 ::fidl_next::never::Never,
14896 >;
14897
14898 fn respond(response: ___R) -> Self::Output {
14899 ::core::result::Result::Ok(crate::generic::FileSeekResponse {
14900 offset_from_start: response,
14901 })
14902 }
14903 }
14904
14905 impl<___R> ::fidl_next::RespondErr<___R> for Seek {
14906 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14907
14908 fn respond_err(response: ___R) -> Self::Output {
14909 ::core::result::Result::Err(response)
14910 }
14911 }
14912
14913 pub struct ReadAt;
14914
14915 impl ::fidl_next::Method for ReadAt {
14916 const ORDINAL: u64 = 1587416148701180478;
14917 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14918 ::fidl_next::protocol::Flexibility::Strict;
14919
14920 type Protocol = crate::File;
14921
14922 type Request = crate::wire::FileReadAtRequest;
14923 }
14924
14925 impl ::fidl_next::TwoWayMethod for ReadAt {
14926 type Response = ::fidl_next::wire::Result<
14927 'static,
14928 crate::wire::FileReadAtResponse<'static>,
14929 ::fidl_next::wire::fuchsia::Status,
14930 >;
14931 }
14932
14933 impl<___R> ::fidl_next::Respond<___R> for ReadAt {
14934 type Output = ::core::result::Result<
14935 crate::generic::FileReadAtResponse<___R>,
14936 ::fidl_next::never::Never,
14937 >;
14938
14939 fn respond(response: ___R) -> Self::Output {
14940 ::core::result::Result::Ok(crate::generic::FileReadAtResponse { data: response })
14941 }
14942 }
14943
14944 impl<___R> ::fidl_next::RespondErr<___R> for ReadAt {
14945 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14946
14947 fn respond_err(response: ___R) -> Self::Output {
14948 ::core::result::Result::Err(response)
14949 }
14950 }
14951
14952 pub struct WriteAt;
14953
14954 impl ::fidl_next::Method for WriteAt {
14955 const ORDINAL: u64 = 8736683935131400491;
14956 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14957 ::fidl_next::protocol::Flexibility::Strict;
14958
14959 type Protocol = crate::File;
14960
14961 type Request = crate::wire::FileWriteAtRequest<'static>;
14962 }
14963
14964 impl ::fidl_next::TwoWayMethod for WriteAt {
14965 type Response = ::fidl_next::wire::Result<
14966 'static,
14967 crate::wire::FileWriteAtResponse,
14968 ::fidl_next::wire::fuchsia::Status,
14969 >;
14970 }
14971
14972 impl<___R> ::fidl_next::Respond<___R> for WriteAt {
14973 type Output = ::core::result::Result<
14974 crate::generic::FileWriteAtResponse<___R>,
14975 ::fidl_next::never::Never,
14976 >;
14977
14978 fn respond(response: ___R) -> Self::Output {
14979 ::core::result::Result::Ok(crate::generic::FileWriteAtResponse {
14980 actual_count: response,
14981 })
14982 }
14983 }
14984
14985 impl<___R> ::fidl_next::RespondErr<___R> for WriteAt {
14986 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14987
14988 fn respond_err(response: ___R) -> Self::Output {
14989 ::core::result::Result::Err(response)
14990 }
14991 }
14992
14993 pub struct Resize;
14994
14995 impl ::fidl_next::Method for Resize {
14996 const ORDINAL: u64 = 3134648685270758458;
14997 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14998 ::fidl_next::protocol::Flexibility::Strict;
14999
15000 type Protocol = crate::File;
15001
15002 type Request = crate::wire::FileResizeRequest;
15003 }
15004
15005 impl ::fidl_next::TwoWayMethod for Resize {
15006 type Response = ::fidl_next::wire::Result<
15007 'static,
15008 crate::wire::FileResizeResponse,
15009 ::fidl_next::wire::fuchsia::Status,
15010 >;
15011 }
15012
15013 impl<___R> ::fidl_next::Respond<___R> for Resize {
15014 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
15015
15016 fn respond(response: ___R) -> Self::Output {
15017 ::core::result::Result::Ok(response)
15018 }
15019 }
15020
15021 impl<___R> ::fidl_next::RespondErr<___R> for Resize {
15022 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
15023
15024 fn respond_err(response: ___R) -> Self::Output {
15025 ::core::result::Result::Err(response)
15026 }
15027 }
15028
15029 pub struct GetBackingMemory;
15030
15031 impl ::fidl_next::Method for GetBackingMemory {
15032 const ORDINAL: u64 = 46911652864194091;
15033 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
15034 ::fidl_next::protocol::Flexibility::Strict;
15035
15036 type Protocol = crate::File;
15037
15038 type Request = crate::wire::FileGetBackingMemoryRequest;
15039 }
15040
15041 impl ::fidl_next::TwoWayMethod for GetBackingMemory {
15042 type Response = ::fidl_next::wire::Result<
15043 'static,
15044 crate::wire::FileGetBackingMemoryResponse,
15045 ::fidl_next::wire::fuchsia::Status,
15046 >;
15047 }
15048
15049 impl<___R> ::fidl_next::Respond<___R> for GetBackingMemory {
15050 type Output = ::core::result::Result<
15051 crate::generic::FileGetBackingMemoryResponse<___R>,
15052 ::fidl_next::never::Never,
15053 >;
15054
15055 fn respond(response: ___R) -> Self::Output {
15056 ::core::result::Result::Ok(crate::generic::FileGetBackingMemoryResponse {
15057 vmo: response,
15058 })
15059 }
15060 }
15061
15062 impl<___R> ::fidl_next::RespondErr<___R> for GetBackingMemory {
15063 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
15064
15065 fn respond_err(response: ___R) -> Self::Output {
15066 ::core::result::Result::Err(response)
15067 }
15068 }
15069
15070 pub struct Allocate;
15071
15072 impl ::fidl_next::Method for Allocate {
15073 const ORDINAL: u64 = 8645235848064269614;
15074 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
15075 ::fidl_next::protocol::Flexibility::Flexible;
15076
15077 type Protocol = crate::File;
15078
15079 type Request = crate::wire::FileAllocateRequest;
15080 }
15081
15082 impl ::fidl_next::TwoWayMethod for Allocate {
15083 type Response = ::fidl_next::wire::Result<
15084 'static,
15085 crate::wire::FileAllocateResponse,
15086 ::fidl_next::wire::fuchsia::Status,
15087 >;
15088 }
15089
15090 impl<___R> ::fidl_next::Respond<___R> for Allocate {
15091 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
15092
15093 fn respond(response: ___R) -> Self::Output {
15094 ::core::result::Result::Ok(response)
15095 }
15096 }
15097
15098 impl<___R> ::fidl_next::RespondErr<___R> for Allocate {
15099 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
15100
15101 fn respond_err(response: ___R) -> Self::Output {
15102 ::core::result::Result::Err(response)
15103 }
15104 }
15105
15106 pub struct EnableVerity;
15107
15108 impl ::fidl_next::Method for EnableVerity {
15109 const ORDINAL: u64 = 3189145313204943035;
15110 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
15111 ::fidl_next::protocol::Flexibility::Flexible;
15112
15113 type Protocol = crate::File;
15114
15115 type Request = crate::wire::FileEnableVerityRequest<'static>;
15116 }
15117
15118 impl ::fidl_next::TwoWayMethod for EnableVerity {
15119 type Response = ::fidl_next::wire::Result<
15120 'static,
15121 crate::wire::FileEnableVerityResponse,
15122 ::fidl_next::wire::fuchsia::Status,
15123 >;
15124 }
15125
15126 impl<___R> ::fidl_next::Respond<___R> for EnableVerity {
15127 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
15128
15129 fn respond(response: ___R) -> Self::Output {
15130 ::core::result::Result::Ok(response)
15131 }
15132 }
15133
15134 impl<___R> ::fidl_next::RespondErr<___R> for EnableVerity {
15135 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
15136
15137 fn respond_err(response: ___R) -> Self::Output {
15138 ::core::result::Result::Err(response)
15139 }
15140 }
15141
15142 mod ___detail {
15143 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::File
15144 where
15145 ___T: ::fidl_next::Transport,
15146 {
15147 type Client = FileClient<___T>;
15148 type Server = FileServer<___T>;
15149 }
15150
15151 #[repr(transparent)]
15153 pub struct FileClient<___T: ::fidl_next::Transport> {
15154 #[allow(dead_code)]
15155 client: ::fidl_next::protocol::Client<___T>,
15156 }
15157
15158 impl<___T> FileClient<___T>
15159 where
15160 ___T: ::fidl_next::Transport,
15161 {
15162 #[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"]
15163 pub fn advisory_lock(
15164 &self,
15165
15166 request: impl ::fidl_next::Encode<
15167 crate::wire::AdvisoryLockRequest<'static>,
15168 <___T as ::fidl_next::Transport>::SendBuffer,
15169 >,
15170 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
15171 where
15172 <___T as ::fidl_next::Transport>::SendBuffer:
15173 ::fidl_next::encoder::InternalHandleEncoder,
15174 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
15175 {
15176 self.advisory_lock_with(crate::generic::AdvisoryLockingAdvisoryLockRequest {
15177 request,
15178 })
15179 }
15180
15181 #[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"]
15182 pub fn advisory_lock_with<___R>(
15183 &self,
15184 request: ___R,
15185 ) -> ::fidl_next::TwoWayFuture<'_, super::AdvisoryLock, ___T>
15186 where
15187 ___R: ::fidl_next::Encode<
15188 crate::wire::AdvisoryLockingAdvisoryLockRequest<'static>,
15189 <___T as ::fidl_next::Transport>::SendBuffer,
15190 >,
15191 {
15192 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15193 7992130864415541162,
15194 <super::AdvisoryLock as ::fidl_next::Method>::FLEXIBILITY,
15195 request,
15196 ))
15197 }
15198
15199 #[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"]
15200 pub fn link_into(
15201 &self,
15202
15203 dst_parent_token: impl ::fidl_next::Encode<
15204 ::fidl_next::wire::fuchsia::Event,
15205 <___T as ::fidl_next::Transport>::SendBuffer,
15206 >,
15207
15208 dst: impl ::fidl_next::Encode<
15209 ::fidl_next::wire::String<'static>,
15210 <___T as ::fidl_next::Transport>::SendBuffer,
15211 >,
15212 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
15213 where
15214 <___T as ::fidl_next::Transport>::SendBuffer:
15215 ::fidl_next::encoder::InternalHandleEncoder,
15216 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
15217 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
15218 {
15219 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
15220 dst_parent_token,
15221
15222 dst,
15223 })
15224 }
15225
15226 #[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"]
15227 pub fn link_into_with<___R>(
15228 &self,
15229 request: ___R,
15230 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
15231 where
15232 ___R: ::fidl_next::Encode<
15233 crate::wire::LinkableLinkIntoRequest<'static>,
15234 <___T as ::fidl_next::Transport>::SendBuffer,
15235 >,
15236 {
15237 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15238 6121399674497678964,
15239 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
15240 request,
15241 ))
15242 }
15243
15244 pub fn clone(
15245 &self,
15246
15247 request: impl ::fidl_next::Encode<
15248 ::fidl_next::ServerEnd<
15249 ::fidl_next_fuchsia_unknown::Cloneable,
15250 ::fidl_next::wire::fuchsia::Channel,
15251 >,
15252 <___T as ::fidl_next::Transport>::SendBuffer,
15253 >,
15254 ) -> ::fidl_next::SendFuture<'_, ___T>
15255 where
15256 <___T as ::fidl_next::Transport>::SendBuffer:
15257 ::fidl_next::encoder::InternalHandleEncoder,
15258 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
15259 {
15260 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
15261 request,
15262 })
15263 }
15264
15265 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
15266 where
15267 ___R: ::fidl_next::Encode<
15268 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
15269 <___T as ::fidl_next::Transport>::SendBuffer,
15270 >,
15271 {
15272 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
15273 2366825959783828089,
15274 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
15275 request,
15276 ))
15277 }
15278
15279 #[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"]
15280 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
15281 ::fidl_next::TwoWayFuture::from_untyped(
15282 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
15283 6540867515453498750,
15284 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
15285 (),
15286 ),
15287 )
15288 }
15289
15290 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
15291 ::fidl_next::TwoWayFuture::from_untyped(
15292 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
15293 2763219980499352582,
15294 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
15295 (),
15296 ),
15297 )
15298 }
15299
15300 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
15301 pub fn deprecated_clone(
15302 &self,
15303
15304 flags: impl ::fidl_next::Encode<
15305 crate::wire::OpenFlags,
15306 <___T as ::fidl_next::Transport>::SendBuffer,
15307 >,
15308
15309 object: impl ::fidl_next::Encode<
15310 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
15311 <___T as ::fidl_next::Transport>::SendBuffer,
15312 >,
15313 ) -> ::fidl_next::SendFuture<'_, ___T>
15314 where
15315 <___T as ::fidl_next::Transport>::SendBuffer:
15316 ::fidl_next::encoder::InternalHandleEncoder,
15317 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
15318 {
15319 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
15320 flags,
15321
15322 object,
15323 })
15324 }
15325
15326 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
15327 pub fn deprecated_clone_with<___R>(
15328 &self,
15329 request: ___R,
15330 ) -> ::fidl_next::SendFuture<'_, ___T>
15331 where
15332 ___R: ::fidl_next::Encode<
15333 crate::wire::NodeDeprecatedCloneRequest,
15334 <___T as ::fidl_next::Transport>::SendBuffer,
15335 >,
15336 {
15337 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
15338 6512600400724287855,
15339 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
15340 request,
15341 ))
15342 }
15343
15344 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
15345 pub fn deprecated_get_attr(
15346 &self,
15347 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
15348 ::fidl_next::TwoWayFuture::from_untyped(
15349 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
15350 8689798978500614909,
15351 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
15352 (),
15353 ),
15354 )
15355 }
15356
15357 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
15358 pub fn deprecated_set_attr(
15359 &self,
15360
15361 flags: impl ::fidl_next::Encode<
15362 crate::wire::NodeAttributeFlags,
15363 <___T as ::fidl_next::Transport>::SendBuffer,
15364 >,
15365
15366 attributes: impl ::fidl_next::Encode<
15367 crate::wire::NodeAttributes,
15368 <___T as ::fidl_next::Transport>::SendBuffer,
15369 >,
15370 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
15371 where
15372 <___T as ::fidl_next::Transport>::SendBuffer:
15373 ::fidl_next::encoder::InternalHandleEncoder,
15374 {
15375 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
15376 flags,
15377
15378 attributes,
15379 })
15380 }
15381
15382 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
15383 pub fn deprecated_set_attr_with<___R>(
15384 &self,
15385 request: ___R,
15386 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
15387 where
15388 ___R: ::fidl_next::Encode<
15389 crate::wire::NodeDeprecatedSetAttrRequest,
15390 <___T as ::fidl_next::Transport>::SendBuffer,
15391 >,
15392 {
15393 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15394 4721673413776871238,
15395 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
15396 request,
15397 ))
15398 }
15399
15400 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
15401 pub fn deprecated_get_flags(
15402 &self,
15403 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
15404 ::fidl_next::TwoWayFuture::from_untyped(
15405 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
15406 6595803110182632097,
15407 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
15408 (),
15409 ),
15410 )
15411 }
15412
15413 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
15414 pub fn deprecated_set_flags(
15415 &self,
15416
15417 flags: impl ::fidl_next::Encode<
15418 crate::wire::OpenFlags,
15419 <___T as ::fidl_next::Transport>::SendBuffer,
15420 >,
15421 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
15422 where
15423 <___T as ::fidl_next::Transport>::SendBuffer:
15424 ::fidl_next::encoder::InternalHandleEncoder,
15425 {
15426 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
15427 flags,
15428 })
15429 }
15430
15431 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
15432 pub fn deprecated_set_flags_with<___R>(
15433 &self,
15434 request: ___R,
15435 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
15436 where
15437 ___R: ::fidl_next::Encode<
15438 crate::wire::NodeDeprecatedSetFlagsRequest,
15439 <___T as ::fidl_next::Transport>::SendBuffer,
15440 >,
15441 {
15442 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15443 5950864159036794675,
15444 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
15445 request,
15446 ))
15447 }
15448
15449 #[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"]
15450 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
15451 ::fidl_next::TwoWayFuture::from_untyped(
15452 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
15453 105530239381466147,
15454 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
15455 (),
15456 ),
15457 )
15458 }
15459
15460 #[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"]
15461 pub fn set_flags(
15462 &self,
15463
15464 flags: impl ::fidl_next::Encode<
15465 crate::wire::Flags,
15466 <___T as ::fidl_next::Transport>::SendBuffer,
15467 >,
15468 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
15469 where
15470 <___T as ::fidl_next::Transport>::SendBuffer:
15471 ::fidl_next::encoder::InternalHandleEncoder,
15472 {
15473 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
15474 }
15475
15476 #[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"]
15477 pub fn set_flags_with<___R>(
15478 &self,
15479 request: ___R,
15480 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
15481 where
15482 ___R: ::fidl_next::Encode<
15483 crate::wire::NodeSetFlagsRequest,
15484 <___T as ::fidl_next::Transport>::SendBuffer,
15485 >,
15486 {
15487 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15488 6172186066099445416,
15489 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
15490 request,
15491 ))
15492 }
15493
15494 #[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"]
15495 pub fn query_filesystem(
15496 &self,
15497 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
15498 ::fidl_next::TwoWayFuture::from_untyped(
15499 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
15500 8013111122914313744,
15501 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
15502 (),
15503 ),
15504 )
15505 }
15506
15507 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
15508 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
15509 ::fidl_next::TwoWayFuture::from_untyped(
15510 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
15511 5788516050773961964,
15512 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
15513 (),
15514 ),
15515 )
15516 }
15517
15518 #[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"]
15519 pub fn get_attributes(
15520 &self,
15521
15522 query: impl ::fidl_next::Encode<
15523 crate::wire::NodeAttributesQuery,
15524 <___T as ::fidl_next::Transport>::SendBuffer,
15525 >,
15526 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
15527 where
15528 <___T as ::fidl_next::Transport>::SendBuffer:
15529 ::fidl_next::encoder::InternalHandleEncoder,
15530 {
15531 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
15532 }
15533
15534 #[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"]
15535 pub fn get_attributes_with<___R>(
15536 &self,
15537 request: ___R,
15538 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
15539 where
15540 ___R: ::fidl_next::Encode<
15541 crate::wire::NodeGetAttributesRequest,
15542 <___T as ::fidl_next::Transport>::SendBuffer,
15543 >,
15544 {
15545 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15546 4414537700416816443,
15547 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
15548 request,
15549 ))
15550 }
15551
15552 #[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"]
15553 pub fn update_attributes_with<___R>(
15554 &self,
15555 request: ___R,
15556 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
15557 where
15558 ___R: ::fidl_next::Encode<
15559 crate::wire::MutableNodeAttributes<'static>,
15560 <___T as ::fidl_next::Transport>::SendBuffer,
15561 >,
15562 {
15563 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15564 3677402239314018056,
15565 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
15566 request,
15567 ))
15568 }
15569
15570 #[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"]
15571 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
15572 ::fidl_next::TwoWayFuture::from_untyped(
15573 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
15574 3196473584242777161,
15575 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
15576 (),
15577 ),
15578 )
15579 }
15580
15581 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
15582 pub fn list_extended_attributes(
15583 &self,
15584
15585 iterator: impl ::fidl_next::Encode<
15586 ::fidl_next::ServerEnd<
15587 crate::ExtendedAttributeIterator,
15588 ::fidl_next::wire::fuchsia::Channel,
15589 >,
15590 <___T as ::fidl_next::Transport>::SendBuffer,
15591 >,
15592 ) -> ::fidl_next::SendFuture<'_, ___T>
15593 where
15594 <___T as ::fidl_next::Transport>::SendBuffer:
15595 ::fidl_next::encoder::InternalHandleEncoder,
15596 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
15597 {
15598 self.list_extended_attributes_with(
15599 crate::generic::NodeListExtendedAttributesRequest { iterator },
15600 )
15601 }
15602
15603 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
15604 pub fn list_extended_attributes_with<___R>(
15605 &self,
15606 request: ___R,
15607 ) -> ::fidl_next::SendFuture<'_, ___T>
15608 where
15609 ___R: ::fidl_next::Encode<
15610 crate::wire::NodeListExtendedAttributesRequest,
15611 <___T as ::fidl_next::Transport>::SendBuffer,
15612 >,
15613 {
15614 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
15615 5431626189872037072,
15616 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
15617 request,
15618 ))
15619 }
15620
15621 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
15622 pub fn get_extended_attribute(
15623 &self,
15624
15625 name: impl ::fidl_next::Encode<
15626 ::fidl_next::wire::Vector<'static, u8>,
15627 <___T as ::fidl_next::Transport>::SendBuffer,
15628 >,
15629 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
15630 where
15631 <___T as ::fidl_next::Transport>::SendBuffer:
15632 ::fidl_next::encoder::InternalHandleEncoder,
15633 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
15634 {
15635 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
15636 name,
15637 })
15638 }
15639
15640 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
15641 pub fn get_extended_attribute_with<___R>(
15642 &self,
15643 request: ___R,
15644 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
15645 where
15646 ___R: ::fidl_next::Encode<
15647 crate::wire::NodeGetExtendedAttributeRequest<'static>,
15648 <___T as ::fidl_next::Transport>::SendBuffer,
15649 >,
15650 {
15651 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15652 5043930208506967771,
15653 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
15654 request,
15655 ))
15656 }
15657
15658 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
15659 pub fn set_extended_attribute(
15660 &self,
15661
15662 name: impl ::fidl_next::Encode<
15663 ::fidl_next::wire::Vector<'static, u8>,
15664 <___T as ::fidl_next::Transport>::SendBuffer,
15665 >,
15666
15667 value: impl ::fidl_next::Encode<
15668 crate::wire::ExtendedAttributeValue<'static>,
15669 <___T as ::fidl_next::Transport>::SendBuffer,
15670 >,
15671
15672 mode: impl ::fidl_next::Encode<
15673 crate::wire::SetExtendedAttributeMode,
15674 <___T as ::fidl_next::Transport>::SendBuffer,
15675 >,
15676 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
15677 where
15678 <___T as ::fidl_next::Transport>::SendBuffer:
15679 ::fidl_next::encoder::InternalHandleEncoder,
15680 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
15681 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
15682 {
15683 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
15684 name,
15685
15686 value,
15687
15688 mode,
15689 })
15690 }
15691
15692 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
15693 pub fn set_extended_attribute_with<___R>(
15694 &self,
15695 request: ___R,
15696 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
15697 where
15698 ___R: ::fidl_next::Encode<
15699 crate::wire::NodeSetExtendedAttributeRequest<'static>,
15700 <___T as ::fidl_next::Transport>::SendBuffer,
15701 >,
15702 {
15703 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15704 5374223046099989052,
15705 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
15706 request,
15707 ))
15708 }
15709
15710 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
15711 pub fn remove_extended_attribute(
15712 &self,
15713
15714 name: impl ::fidl_next::Encode<
15715 ::fidl_next::wire::Vector<'static, u8>,
15716 <___T as ::fidl_next::Transport>::SendBuffer,
15717 >,
15718 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
15719 where
15720 <___T as ::fidl_next::Transport>::SendBuffer:
15721 ::fidl_next::encoder::InternalHandleEncoder,
15722 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
15723 {
15724 self.remove_extended_attribute_with(
15725 crate::generic::NodeRemoveExtendedAttributeRequest { name },
15726 )
15727 }
15728
15729 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
15730 pub fn remove_extended_attribute_with<___R>(
15731 &self,
15732 request: ___R,
15733 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
15734 where
15735 ___R: ::fidl_next::Encode<
15736 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
15737 <___T as ::fidl_next::Transport>::SendBuffer,
15738 >,
15739 {
15740 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15741 8794297771444732717,
15742 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
15743 request,
15744 ))
15745 }
15746
15747 #[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"]
15748 pub fn read(
15749 &self,
15750
15751 count: impl ::fidl_next::Encode<
15752 ::fidl_next::wire::Uint64,
15753 <___T as ::fidl_next::Transport>::SendBuffer,
15754 >,
15755 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
15756 where
15757 <___T as ::fidl_next::Transport>::SendBuffer:
15758 ::fidl_next::encoder::InternalHandleEncoder,
15759 {
15760 self.read_with(crate::generic::ReadableReadRequest { count })
15761 }
15762
15763 #[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"]
15764 pub fn read_with<___R>(
15765 &self,
15766 request: ___R,
15767 ) -> ::fidl_next::TwoWayFuture<'_, super::Read, ___T>
15768 where
15769 ___R: ::fidl_next::Encode<
15770 crate::wire::ReadableReadRequest,
15771 <___T as ::fidl_next::Transport>::SendBuffer,
15772 >,
15773 {
15774 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15775 395825947633028830,
15776 <super::Read as ::fidl_next::Method>::FLEXIBILITY,
15777 request,
15778 ))
15779 }
15780
15781 #[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"]
15782 pub fn write(
15783 &self,
15784
15785 data: impl ::fidl_next::Encode<
15786 ::fidl_next::wire::Vector<'static, u8>,
15787 <___T as ::fidl_next::Transport>::SendBuffer,
15788 >,
15789 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
15790 where
15791 <___T as ::fidl_next::Transport>::SendBuffer:
15792 ::fidl_next::encoder::InternalHandleEncoder,
15793 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
15794 {
15795 self.write_with(crate::generic::WritableWriteRequest { data })
15796 }
15797
15798 #[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"]
15799 pub fn write_with<___R>(
15800 &self,
15801 request: ___R,
15802 ) -> ::fidl_next::TwoWayFuture<'_, super::Write, ___T>
15803 where
15804 ___R: ::fidl_next::Encode<
15805 crate::wire::WritableWriteRequest<'static>,
15806 <___T as ::fidl_next::Transport>::SendBuffer,
15807 >,
15808 {
15809 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15810 7651971425397809026,
15811 <super::Write as ::fidl_next::Method>::FLEXIBILITY,
15812 request,
15813 ))
15814 }
15815
15816 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
15817 ::fidl_next::TwoWayFuture::from_untyped(
15818 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
15819 7545125870053689020,
15820 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
15821 (),
15822 ),
15823 )
15824 }
15825
15826 #[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"]
15827 pub fn seek(
15828 &self,
15829
15830 origin: impl ::fidl_next::Encode<
15831 crate::wire::SeekOrigin,
15832 <___T as ::fidl_next::Transport>::SendBuffer,
15833 >,
15834
15835 offset: impl ::fidl_next::Encode<
15836 ::fidl_next::wire::Int64,
15837 <___T as ::fidl_next::Transport>::SendBuffer,
15838 >,
15839 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
15840 where
15841 <___T as ::fidl_next::Transport>::SendBuffer:
15842 ::fidl_next::encoder::InternalHandleEncoder,
15843 {
15844 self.seek_with(crate::generic::FileSeekRequest { origin, offset })
15845 }
15846
15847 #[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"]
15848 pub fn seek_with<___R>(
15849 &self,
15850 request: ___R,
15851 ) -> ::fidl_next::TwoWayFuture<'_, super::Seek, ___T>
15852 where
15853 ___R: ::fidl_next::Encode<
15854 crate::wire::FileSeekRequest,
15855 <___T as ::fidl_next::Transport>::SendBuffer,
15856 >,
15857 {
15858 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15859 8649041485622956551,
15860 <super::Seek as ::fidl_next::Method>::FLEXIBILITY,
15861 request,
15862 ))
15863 }
15864
15865 #[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"]
15866 pub fn read_at(
15867 &self,
15868
15869 count: impl ::fidl_next::Encode<
15870 ::fidl_next::wire::Uint64,
15871 <___T as ::fidl_next::Transport>::SendBuffer,
15872 >,
15873
15874 offset: impl ::fidl_next::Encode<
15875 ::fidl_next::wire::Uint64,
15876 <___T as ::fidl_next::Transport>::SendBuffer,
15877 >,
15878 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
15879 where
15880 <___T as ::fidl_next::Transport>::SendBuffer:
15881 ::fidl_next::encoder::InternalHandleEncoder,
15882 {
15883 self.read_at_with(crate::generic::FileReadAtRequest { count, offset })
15884 }
15885
15886 #[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"]
15887 pub fn read_at_with<___R>(
15888 &self,
15889 request: ___R,
15890 ) -> ::fidl_next::TwoWayFuture<'_, super::ReadAt, ___T>
15891 where
15892 ___R: ::fidl_next::Encode<
15893 crate::wire::FileReadAtRequest,
15894 <___T as ::fidl_next::Transport>::SendBuffer,
15895 >,
15896 {
15897 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15898 1587416148701180478,
15899 <super::ReadAt as ::fidl_next::Method>::FLEXIBILITY,
15900 request,
15901 ))
15902 }
15903
15904 #[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"]
15905 pub fn write_at(
15906 &self,
15907
15908 data: impl ::fidl_next::Encode<
15909 ::fidl_next::wire::Vector<'static, u8>,
15910 <___T as ::fidl_next::Transport>::SendBuffer,
15911 >,
15912
15913 offset: impl ::fidl_next::Encode<
15914 ::fidl_next::wire::Uint64,
15915 <___T as ::fidl_next::Transport>::SendBuffer,
15916 >,
15917 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
15918 where
15919 <___T as ::fidl_next::Transport>::SendBuffer:
15920 ::fidl_next::encoder::InternalHandleEncoder,
15921 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
15922 {
15923 self.write_at_with(crate::generic::FileWriteAtRequest { data, offset })
15924 }
15925
15926 #[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"]
15927 pub fn write_at_with<___R>(
15928 &self,
15929 request: ___R,
15930 ) -> ::fidl_next::TwoWayFuture<'_, super::WriteAt, ___T>
15931 where
15932 ___R: ::fidl_next::Encode<
15933 crate::wire::FileWriteAtRequest<'static>,
15934 <___T as ::fidl_next::Transport>::SendBuffer,
15935 >,
15936 {
15937 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15938 8736683935131400491,
15939 <super::WriteAt as ::fidl_next::Method>::FLEXIBILITY,
15940 request,
15941 ))
15942 }
15943
15944 #[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"]
15945 pub fn resize(
15946 &self,
15947
15948 length: impl ::fidl_next::Encode<
15949 ::fidl_next::wire::Uint64,
15950 <___T as ::fidl_next::Transport>::SendBuffer,
15951 >,
15952 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
15953 where
15954 <___T as ::fidl_next::Transport>::SendBuffer:
15955 ::fidl_next::encoder::InternalHandleEncoder,
15956 {
15957 self.resize_with(crate::generic::FileResizeRequest { length })
15958 }
15959
15960 #[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"]
15961 pub fn resize_with<___R>(
15962 &self,
15963 request: ___R,
15964 ) -> ::fidl_next::TwoWayFuture<'_, super::Resize, ___T>
15965 where
15966 ___R: ::fidl_next::Encode<
15967 crate::wire::FileResizeRequest,
15968 <___T as ::fidl_next::Transport>::SendBuffer,
15969 >,
15970 {
15971 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
15972 3134648685270758458,
15973 <super::Resize as ::fidl_next::Method>::FLEXIBILITY,
15974 request,
15975 ))
15976 }
15977
15978 #[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"]
15979 pub fn get_backing_memory(
15980 &self,
15981
15982 flags: impl ::fidl_next::Encode<
15983 crate::wire::VmoFlags,
15984 <___T as ::fidl_next::Transport>::SendBuffer,
15985 >,
15986 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
15987 where
15988 <___T as ::fidl_next::Transport>::SendBuffer:
15989 ::fidl_next::encoder::InternalHandleEncoder,
15990 {
15991 self.get_backing_memory_with(crate::generic::FileGetBackingMemoryRequest { flags })
15992 }
15993
15994 #[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"]
15995 pub fn get_backing_memory_with<___R>(
15996 &self,
15997 request: ___R,
15998 ) -> ::fidl_next::TwoWayFuture<'_, super::GetBackingMemory, ___T>
15999 where
16000 ___R: ::fidl_next::Encode<
16001 crate::wire::FileGetBackingMemoryRequest,
16002 <___T as ::fidl_next::Transport>::SendBuffer,
16003 >,
16004 {
16005 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
16006 46911652864194091,
16007 <super::GetBackingMemory as ::fidl_next::Method>::FLEXIBILITY,
16008 request,
16009 ))
16010 }
16011
16012 #[doc = " Pre-allocate on-disk space for this file.\n"]
16013 pub fn allocate(
16014 &self,
16015
16016 offset: impl ::fidl_next::Encode<
16017 ::fidl_next::wire::Uint64,
16018 <___T as ::fidl_next::Transport>::SendBuffer,
16019 >,
16020
16021 length: impl ::fidl_next::Encode<
16022 ::fidl_next::wire::Uint64,
16023 <___T as ::fidl_next::Transport>::SendBuffer,
16024 >,
16025
16026 mode: impl ::fidl_next::Encode<
16027 crate::wire::AllocateMode,
16028 <___T as ::fidl_next::Transport>::SendBuffer,
16029 >,
16030 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
16031 where
16032 <___T as ::fidl_next::Transport>::SendBuffer:
16033 ::fidl_next::encoder::InternalHandleEncoder,
16034 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
16035 {
16036 self.allocate_with(crate::generic::FileAllocateRequest { offset, length, mode })
16037 }
16038
16039 #[doc = " Pre-allocate on-disk space for this file.\n"]
16040 pub fn allocate_with<___R>(
16041 &self,
16042 request: ___R,
16043 ) -> ::fidl_next::TwoWayFuture<'_, super::Allocate, ___T>
16044 where
16045 ___R: ::fidl_next::Encode<
16046 crate::wire::FileAllocateRequest,
16047 <___T as ::fidl_next::Transport>::SendBuffer,
16048 >,
16049 {
16050 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
16051 8645235848064269614,
16052 <super::Allocate as ::fidl_next::Method>::FLEXIBILITY,
16053 request,
16054 ))
16055 }
16056
16057 #[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"]
16058 pub fn enable_verity(
16059 &self,
16060
16061 options: impl ::fidl_next::Encode<
16062 crate::wire::VerificationOptions<'static>,
16063 <___T as ::fidl_next::Transport>::SendBuffer,
16064 >,
16065 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
16066 where
16067 <___T as ::fidl_next::Transport>::SendBuffer:
16068 ::fidl_next::encoder::InternalHandleEncoder,
16069 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
16070 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
16071 {
16072 self.enable_verity_with(crate::generic::FileEnableVerityRequest { options })
16073 }
16074
16075 #[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"]
16076 pub fn enable_verity_with<___R>(
16077 &self,
16078 request: ___R,
16079 ) -> ::fidl_next::TwoWayFuture<'_, super::EnableVerity, ___T>
16080 where
16081 ___R: ::fidl_next::Encode<
16082 crate::wire::FileEnableVerityRequest<'static>,
16083 <___T as ::fidl_next::Transport>::SendBuffer,
16084 >,
16085 {
16086 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
16087 3189145313204943035,
16088 <super::EnableVerity as ::fidl_next::Method>::FLEXIBILITY,
16089 request,
16090 ))
16091 }
16092 }
16093
16094 #[repr(transparent)]
16096 pub struct FileServer<___T: ::fidl_next::Transport> {
16097 server: ::fidl_next::protocol::Server<___T>,
16098 }
16099
16100 impl<___T> FileServer<___T>
16101 where
16102 ___T: ::fidl_next::Transport,
16103 {
16104 #[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"]
16105 pub fn on_open(
16106 &self,
16107
16108 s: impl ::fidl_next::Encode<
16109 ::fidl_next::wire::fuchsia::StatusResult,
16110 <___T as ::fidl_next::Transport>::SendBuffer,
16111 >,
16112
16113 info: impl ::fidl_next::Encode<
16114 crate::wire_optional::NodeInfoDeprecated<'static>,
16115 <___T as ::fidl_next::Transport>::SendBuffer,
16116 >,
16117 ) -> ::fidl_next::SendFuture<'_, ___T>
16118 where
16119 <___T as ::fidl_next::Transport>::SendBuffer:
16120 ::fidl_next::encoder::InternalHandleEncoder,
16121 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
16122 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
16123 {
16124 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
16125 }
16126
16127 #[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"]
16128
16129 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
16130 where
16131 ___R: ::fidl_next::Encode<
16132 <super::OnOpen as ::fidl_next::Method>::Request,
16133 <___T as ::fidl_next::Transport>::SendBuffer,
16134 >,
16135 {
16136 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
16137 9207534335756671346,
16138 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
16139 request,
16140 ))
16141 }
16142
16143 #[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"]
16144
16145 pub fn on_representation_with<___R>(
16146 &self,
16147 request: ___R,
16148 ) -> ::fidl_next::SendFuture<'_, ___T>
16149 where
16150 ___R: ::fidl_next::Encode<
16151 <super::OnRepresentation as ::fidl_next::Method>::Request,
16152 <___T as ::fidl_next::Transport>::SendBuffer,
16153 >,
16154 {
16155 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
16156 6679970090861613324,
16157 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
16158 request,
16159 ))
16160 }
16161 }
16162 }
16163}
16164
16165#[diagnostic::on_unimplemented(
16166 note = "If {Self} implements the non-local FileClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
16167)]
16168
16169pub trait FileLocalClientHandler<
16173 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16174 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16175>
16176{
16177 #[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"]
16178 fn on_open(
16179 &mut self,
16180
16181 request: ::fidl_next::Request<file::OnOpen, ___T>,
16182 ) -> impl ::core::future::Future<Output = ()>;
16183
16184 #[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"]
16185 fn on_representation(
16186 &mut self,
16187
16188 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
16189 ) -> impl ::core::future::Future<Output = ()>;
16190
16191 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
16192 ::core::future::ready(())
16193 }
16194}
16195
16196impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for File
16197where
16198 ___H: FileLocalClientHandler<___T>,
16199 ___T: ::fidl_next::Transport,
16200 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
16201 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16202 Constraint = (),
16203 >,
16204 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
16205 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16206 Constraint = (),
16207 >,
16208{
16209 async fn on_event(
16210 handler: &mut ___H,
16211 mut message: ::fidl_next::Message<___T>,
16212 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
16213 match *message.header().ordinal {
16214 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16215 Ok(decoded) => {
16216 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
16217 Ok(())
16218 }
16219 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16220 ordinal: 9207534335756671346,
16221 error,
16222 }),
16223 },
16224
16225 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16226 Ok(decoded) => {
16227 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
16228 Ok(())
16229 }
16230 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16231 ordinal: 6679970090861613324,
16232 error,
16233 }),
16234 },
16235
16236 ordinal => {
16237 handler.on_unknown_interaction(ordinal).await;
16238 if ::core::matches!(
16239 message.header().flexibility(),
16240 ::fidl_next::protocol::Flexibility::Strict
16241 ) {
16242 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16243 } else {
16244 Ok(())
16245 }
16246 }
16247 }
16248 }
16249}
16250
16251#[diagnostic::on_unimplemented(
16252 note = "If {Self} implements the non-local FileServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
16253)]
16254
16255pub trait FileLocalServerHandler<
16259 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
16260 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
16261>
16262{
16263 #[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"]
16264 fn advisory_lock(
16265 &mut self,
16266
16267 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
16268
16269 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
16270 ) -> impl ::core::future::Future<Output = ()>;
16271
16272 #[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"]
16273 fn link_into(
16274 &mut self,
16275
16276 request: ::fidl_next::Request<file::LinkInto, ___T>,
16277
16278 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
16279 ) -> impl ::core::future::Future<Output = ()>;
16280
16281 fn clone(
16282 &mut self,
16283
16284 request: ::fidl_next::Request<file::Clone, ___T>,
16285 ) -> impl ::core::future::Future<Output = ()>;
16286
16287 #[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"]
16288 fn close(
16289 &mut self,
16290
16291 responder: ::fidl_next::Responder<file::Close, ___T>,
16292 ) -> impl ::core::future::Future<Output = ()>;
16293
16294 fn query(
16295 &mut self,
16296
16297 responder: ::fidl_next::Responder<file::Query, ___T>,
16298 ) -> impl ::core::future::Future<Output = ()>;
16299
16300 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
16301 fn deprecated_clone(
16302 &mut self,
16303
16304 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
16305 ) -> impl ::core::future::Future<Output = ()>;
16306
16307 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
16308 fn deprecated_get_attr(
16309 &mut self,
16310
16311 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
16312 ) -> impl ::core::future::Future<Output = ()>;
16313
16314 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
16315 fn deprecated_set_attr(
16316 &mut self,
16317
16318 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
16319
16320 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
16321 ) -> impl ::core::future::Future<Output = ()>;
16322
16323 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
16324 fn deprecated_get_flags(
16325 &mut self,
16326
16327 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
16328 ) -> impl ::core::future::Future<Output = ()>;
16329
16330 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
16331 fn deprecated_set_flags(
16332 &mut self,
16333
16334 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
16335
16336 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
16337 ) -> impl ::core::future::Future<Output = ()>;
16338
16339 #[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"]
16340 fn get_flags(
16341 &mut self,
16342
16343 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
16344 ) -> impl ::core::future::Future<Output = ()>;
16345
16346 #[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"]
16347 fn set_flags(
16348 &mut self,
16349
16350 request: ::fidl_next::Request<file::SetFlags, ___T>,
16351
16352 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
16353 ) -> impl ::core::future::Future<Output = ()>;
16354
16355 #[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"]
16356 fn query_filesystem(
16357 &mut self,
16358
16359 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
16360 ) -> impl ::core::future::Future<Output = ()>;
16361
16362 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
16363 fn get_token(
16364 &mut self,
16365
16366 responder: ::fidl_next::Responder<file::GetToken, ___T>,
16367 ) -> impl ::core::future::Future<Output = ()>;
16368
16369 #[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"]
16370 fn get_attributes(
16371 &mut self,
16372
16373 request: ::fidl_next::Request<file::GetAttributes, ___T>,
16374
16375 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
16376 ) -> impl ::core::future::Future<Output = ()>;
16377
16378 #[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"]
16379 fn update_attributes(
16380 &mut self,
16381
16382 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
16383
16384 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
16385 ) -> impl ::core::future::Future<Output = ()>;
16386
16387 #[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"]
16388 fn sync(
16389 &mut self,
16390
16391 responder: ::fidl_next::Responder<file::Sync, ___T>,
16392 ) -> impl ::core::future::Future<Output = ()>;
16393
16394 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
16395 fn list_extended_attributes(
16396 &mut self,
16397
16398 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
16399 ) -> impl ::core::future::Future<Output = ()>;
16400
16401 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
16402 fn get_extended_attribute(
16403 &mut self,
16404
16405 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
16406
16407 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
16408 ) -> impl ::core::future::Future<Output = ()>;
16409
16410 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
16411 fn set_extended_attribute(
16412 &mut self,
16413
16414 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
16415
16416 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
16417 ) -> impl ::core::future::Future<Output = ()>;
16418
16419 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
16420 fn remove_extended_attribute(
16421 &mut self,
16422
16423 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
16424
16425 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
16426 ) -> impl ::core::future::Future<Output = ()>;
16427
16428 #[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"]
16429 fn read(
16430 &mut self,
16431
16432 request: ::fidl_next::Request<file::Read, ___T>,
16433
16434 responder: ::fidl_next::Responder<file::Read, ___T>,
16435 ) -> impl ::core::future::Future<Output = ()>;
16436
16437 #[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"]
16438 fn write(
16439 &mut self,
16440
16441 request: ::fidl_next::Request<file::Write, ___T>,
16442
16443 responder: ::fidl_next::Responder<file::Write, ___T>,
16444 ) -> impl ::core::future::Future<Output = ()>;
16445
16446 fn describe(
16447 &mut self,
16448
16449 responder: ::fidl_next::Responder<file::Describe, ___T>,
16450 ) -> impl ::core::future::Future<Output = ()>;
16451
16452 #[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"]
16453 fn seek(
16454 &mut self,
16455
16456 request: ::fidl_next::Request<file::Seek, ___T>,
16457
16458 responder: ::fidl_next::Responder<file::Seek, ___T>,
16459 ) -> impl ::core::future::Future<Output = ()>;
16460
16461 #[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"]
16462 fn read_at(
16463 &mut self,
16464
16465 request: ::fidl_next::Request<file::ReadAt, ___T>,
16466
16467 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
16468 ) -> impl ::core::future::Future<Output = ()>;
16469
16470 #[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"]
16471 fn write_at(
16472 &mut self,
16473
16474 request: ::fidl_next::Request<file::WriteAt, ___T>,
16475
16476 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
16477 ) -> impl ::core::future::Future<Output = ()>;
16478
16479 #[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"]
16480 fn resize(
16481 &mut self,
16482
16483 request: ::fidl_next::Request<file::Resize, ___T>,
16484
16485 responder: ::fidl_next::Responder<file::Resize, ___T>,
16486 ) -> impl ::core::future::Future<Output = ()>;
16487
16488 #[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"]
16489 fn get_backing_memory(
16490 &mut self,
16491
16492 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
16493
16494 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
16495 ) -> impl ::core::future::Future<Output = ()>;
16496
16497 #[doc = " Pre-allocate on-disk space for this file.\n"]
16498 fn allocate(
16499 &mut self,
16500
16501 request: ::fidl_next::Request<file::Allocate, ___T>,
16502
16503 responder: ::fidl_next::Responder<file::Allocate, ___T>,
16504 ) -> impl ::core::future::Future<Output = ()>;
16505
16506 #[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"]
16507 fn enable_verity(
16508 &mut self,
16509
16510 request: ::fidl_next::Request<file::EnableVerity, ___T>,
16511
16512 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
16513 ) -> impl ::core::future::Future<Output = ()>;
16514
16515 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
16516 ::core::future::ready(())
16517 }
16518}
16519
16520impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for File
16521where
16522 ___H: FileLocalServerHandler<___T>,
16523 ___T: ::fidl_next::Transport,
16524 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
16525 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16526 Constraint = (),
16527 >,
16528 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
16529 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16530 Constraint = (),
16531 >,
16532 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
16533 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16534 Constraint = (),
16535 >,
16536 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
16537 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16538 Constraint = (),
16539 >,
16540 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
16541 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16542 Constraint = (),
16543 >,
16544 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
16545 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16546 Constraint = (),
16547 >,
16548 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
16549 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16550 Constraint = (),
16551 >,
16552 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
16553 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16554 Constraint = (),
16555 >,
16556 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
16557 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16558 Constraint = (),
16559 >,
16560 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
16561 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16562 Constraint = (),
16563 >,
16564 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16565 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16566 Constraint = (),
16567 >,
16568 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16569 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16570 Constraint = (),
16571 >,
16572 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
16573 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16574 Constraint = (),
16575 >,
16576 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
16577 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16578 Constraint = (),
16579 >,
16580 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
16581 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16582 Constraint = (),
16583 >,
16584 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
16585 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16586 Constraint = (),
16587 >,
16588 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
16589 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16590 Constraint = (),
16591 >,
16592 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
16593 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16594 Constraint = (),
16595 >,
16596 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
16597 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16598 Constraint = (),
16599 >,
16600 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
16601 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16602 Constraint = (),
16603 >,
16604 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
16605 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16606 Constraint = (),
16607 >,
16608 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
16609 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
16610 Constraint = (),
16611 >,
16612{
16613 async fn on_one_way(
16614 handler: &mut ___H,
16615 mut message: ::fidl_next::Message<___T>,
16616 ) -> ::core::result::Result<
16617 (),
16618 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16619 > {
16620 match *message.header().ordinal {
16621 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16622 Ok(decoded) => {
16623 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
16624 Ok(())
16625 }
16626 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16627 ordinal: 2366825959783828089,
16628 error,
16629 }),
16630 },
16631
16632 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16633 Ok(decoded) => {
16634 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
16635 Ok(())
16636 }
16637 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16638 ordinal: 6512600400724287855,
16639 error,
16640 }),
16641 },
16642
16643 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
16644 Ok(decoded) => {
16645 handler
16646 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
16647 .await;
16648 Ok(())
16649 }
16650 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16651 ordinal: 5431626189872037072,
16652 error,
16653 }),
16654 },
16655
16656 ordinal => {
16657 handler.on_unknown_interaction(ordinal).await;
16658 if ::core::matches!(
16659 message.header().flexibility(),
16660 ::fidl_next::protocol::Flexibility::Strict
16661 ) {
16662 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
16663 } else {
16664 Ok(())
16665 }
16666 }
16667 }
16668 }
16669
16670 async fn on_two_way(
16671 handler: &mut ___H,
16672 mut message: ::fidl_next::Message<___T>,
16673 responder: ::fidl_next::protocol::Responder<___T>,
16674 ) -> ::core::result::Result<
16675 (),
16676 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
16677 > {
16678 match *message.header().ordinal {
16679 7992130864415541162 => {
16680 let responder = ::fidl_next::Responder::from_untyped(responder);
16681
16682 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16683 Ok(decoded) => {
16684 handler
16685 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
16686 .await;
16687 Ok(())
16688 }
16689 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16690 ordinal: 7992130864415541162,
16691 error,
16692 }),
16693 }
16694 }
16695
16696 6121399674497678964 => {
16697 let responder = ::fidl_next::Responder::from_untyped(responder);
16698
16699 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16700 Ok(decoded) => {
16701 handler
16702 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
16703 .await;
16704 Ok(())
16705 }
16706 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16707 ordinal: 6121399674497678964,
16708 error,
16709 }),
16710 }
16711 }
16712
16713 6540867515453498750 => {
16714 let responder = ::fidl_next::Responder::from_untyped(responder);
16715
16716 handler.close(responder).await;
16717 Ok(())
16718 }
16719
16720 2763219980499352582 => {
16721 let responder = ::fidl_next::Responder::from_untyped(responder);
16722
16723 handler.query(responder).await;
16724 Ok(())
16725 }
16726
16727 8689798978500614909 => {
16728 let responder = ::fidl_next::Responder::from_untyped(responder);
16729
16730 handler.deprecated_get_attr(responder).await;
16731 Ok(())
16732 }
16733
16734 4721673413776871238 => {
16735 let responder = ::fidl_next::Responder::from_untyped(responder);
16736
16737 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16738 Ok(decoded) => {
16739 handler
16740 .deprecated_set_attr(
16741 ::fidl_next::Request::from_decoded(decoded),
16742 responder,
16743 )
16744 .await;
16745 Ok(())
16746 }
16747 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16748 ordinal: 4721673413776871238,
16749 error,
16750 }),
16751 }
16752 }
16753
16754 6595803110182632097 => {
16755 let responder = ::fidl_next::Responder::from_untyped(responder);
16756
16757 handler.deprecated_get_flags(responder).await;
16758 Ok(())
16759 }
16760
16761 5950864159036794675 => {
16762 let responder = ::fidl_next::Responder::from_untyped(responder);
16763
16764 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16765 Ok(decoded) => {
16766 handler
16767 .deprecated_set_flags(
16768 ::fidl_next::Request::from_decoded(decoded),
16769 responder,
16770 )
16771 .await;
16772 Ok(())
16773 }
16774 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16775 ordinal: 5950864159036794675,
16776 error,
16777 }),
16778 }
16779 }
16780
16781 105530239381466147 => {
16782 let responder = ::fidl_next::Responder::from_untyped(responder);
16783
16784 handler.get_flags(responder).await;
16785 Ok(())
16786 }
16787
16788 6172186066099445416 => {
16789 let responder = ::fidl_next::Responder::from_untyped(responder);
16790
16791 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16792 Ok(decoded) => {
16793 handler
16794 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
16795 .await;
16796 Ok(())
16797 }
16798 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16799 ordinal: 6172186066099445416,
16800 error,
16801 }),
16802 }
16803 }
16804
16805 8013111122914313744 => {
16806 let responder = ::fidl_next::Responder::from_untyped(responder);
16807
16808 handler.query_filesystem(responder).await;
16809 Ok(())
16810 }
16811
16812 5788516050773961964 => {
16813 let responder = ::fidl_next::Responder::from_untyped(responder);
16814
16815 handler.get_token(responder).await;
16816 Ok(())
16817 }
16818
16819 4414537700416816443 => {
16820 let responder = ::fidl_next::Responder::from_untyped(responder);
16821
16822 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16823 Ok(decoded) => {
16824 handler
16825 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
16826 .await;
16827 Ok(())
16828 }
16829 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16830 ordinal: 4414537700416816443,
16831 error,
16832 }),
16833 }
16834 }
16835
16836 3677402239314018056 => {
16837 let responder = ::fidl_next::Responder::from_untyped(responder);
16838
16839 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16840 Ok(decoded) => {
16841 handler
16842 .update_attributes(
16843 ::fidl_next::Request::from_decoded(decoded),
16844 responder,
16845 )
16846 .await;
16847 Ok(())
16848 }
16849 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16850 ordinal: 3677402239314018056,
16851 error,
16852 }),
16853 }
16854 }
16855
16856 3196473584242777161 => {
16857 let responder = ::fidl_next::Responder::from_untyped(responder);
16858
16859 handler.sync(responder).await;
16860 Ok(())
16861 }
16862
16863 5043930208506967771 => {
16864 let responder = ::fidl_next::Responder::from_untyped(responder);
16865
16866 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16867 Ok(decoded) => {
16868 handler
16869 .get_extended_attribute(
16870 ::fidl_next::Request::from_decoded(decoded),
16871 responder,
16872 )
16873 .await;
16874 Ok(())
16875 }
16876 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16877 ordinal: 5043930208506967771,
16878 error,
16879 }),
16880 }
16881 }
16882
16883 5374223046099989052 => {
16884 let responder = ::fidl_next::Responder::from_untyped(responder);
16885
16886 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16887 Ok(decoded) => {
16888 handler
16889 .set_extended_attribute(
16890 ::fidl_next::Request::from_decoded(decoded),
16891 responder,
16892 )
16893 .await;
16894 Ok(())
16895 }
16896 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16897 ordinal: 5374223046099989052,
16898 error,
16899 }),
16900 }
16901 }
16902
16903 8794297771444732717 => {
16904 let responder = ::fidl_next::Responder::from_untyped(responder);
16905
16906 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16907 Ok(decoded) => {
16908 handler
16909 .remove_extended_attribute(
16910 ::fidl_next::Request::from_decoded(decoded),
16911 responder,
16912 )
16913 .await;
16914 Ok(())
16915 }
16916 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16917 ordinal: 8794297771444732717,
16918 error,
16919 }),
16920 }
16921 }
16922
16923 395825947633028830 => {
16924 let responder = ::fidl_next::Responder::from_untyped(responder);
16925
16926 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16927 Ok(decoded) => {
16928 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
16929 Ok(())
16930 }
16931 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16932 ordinal: 395825947633028830,
16933 error,
16934 }),
16935 }
16936 }
16937
16938 7651971425397809026 => {
16939 let responder = ::fidl_next::Responder::from_untyped(responder);
16940
16941 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16942 Ok(decoded) => {
16943 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
16944 Ok(())
16945 }
16946 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16947 ordinal: 7651971425397809026,
16948 error,
16949 }),
16950 }
16951 }
16952
16953 7545125870053689020 => {
16954 let responder = ::fidl_next::Responder::from_untyped(responder);
16955
16956 handler.describe(responder).await;
16957 Ok(())
16958 }
16959
16960 8649041485622956551 => {
16961 let responder = ::fidl_next::Responder::from_untyped(responder);
16962
16963 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16964 Ok(decoded) => {
16965 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
16966 Ok(())
16967 }
16968 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16969 ordinal: 8649041485622956551,
16970 error,
16971 }),
16972 }
16973 }
16974
16975 1587416148701180478 => {
16976 let responder = ::fidl_next::Responder::from_untyped(responder);
16977
16978 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16979 Ok(decoded) => {
16980 handler
16981 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
16982 .await;
16983 Ok(())
16984 }
16985 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
16986 ordinal: 1587416148701180478,
16987 error,
16988 }),
16989 }
16990 }
16991
16992 8736683935131400491 => {
16993 let responder = ::fidl_next::Responder::from_untyped(responder);
16994
16995 match ::fidl_next::AsDecoderExt::into_decoded(message) {
16996 Ok(decoded) => {
16997 handler
16998 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
16999 .await;
17000 Ok(())
17001 }
17002 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17003 ordinal: 8736683935131400491,
17004 error,
17005 }),
17006 }
17007 }
17008
17009 3134648685270758458 => {
17010 let responder = ::fidl_next::Responder::from_untyped(responder);
17011
17012 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17013 Ok(decoded) => {
17014 handler
17015 .resize(::fidl_next::Request::from_decoded(decoded), responder)
17016 .await;
17017 Ok(())
17018 }
17019 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17020 ordinal: 3134648685270758458,
17021 error,
17022 }),
17023 }
17024 }
17025
17026 46911652864194091 => {
17027 let responder = ::fidl_next::Responder::from_untyped(responder);
17028
17029 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17030 Ok(decoded) => {
17031 handler
17032 .get_backing_memory(
17033 ::fidl_next::Request::from_decoded(decoded),
17034 responder,
17035 )
17036 .await;
17037 Ok(())
17038 }
17039 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17040 ordinal: 46911652864194091,
17041 error,
17042 }),
17043 }
17044 }
17045
17046 8645235848064269614 => {
17047 let responder = ::fidl_next::Responder::from_untyped(responder);
17048
17049 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17050 Ok(decoded) => {
17051 handler
17052 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
17053 .await;
17054 Ok(())
17055 }
17056 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17057 ordinal: 8645235848064269614,
17058 error,
17059 }),
17060 }
17061 }
17062
17063 3189145313204943035 => {
17064 let responder = ::fidl_next::Responder::from_untyped(responder);
17065
17066 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17067 Ok(decoded) => {
17068 handler
17069 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
17070 .await;
17071 Ok(())
17072 }
17073 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17074 ordinal: 3189145313204943035,
17075 error,
17076 }),
17077 }
17078 }
17079
17080 ordinal => {
17081 handler.on_unknown_interaction(ordinal).await;
17082 if ::core::matches!(
17083 message.header().flexibility(),
17084 ::fidl_next::protocol::Flexibility::Strict
17085 ) {
17086 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
17087 } else {
17088 responder
17089 .respond_framework_error(
17090 ordinal,
17091 ::fidl_next::FrameworkError::UnknownMethod,
17092 )
17093 .expect("encoding a framework error should never fail")
17094 .await?;
17095 Ok(())
17096 }
17097 }
17098 }
17099 }
17100}
17101
17102pub trait FileClientHandler<
17106 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17107 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17108>
17109{
17110 #[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"]
17111 fn on_open(
17112 &mut self,
17113
17114 request: ::fidl_next::Request<file::OnOpen, ___T>,
17115 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17116
17117 #[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"]
17118 fn on_representation(
17119 &mut self,
17120
17121 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
17122 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17123
17124 fn on_unknown_interaction(
17125 &mut self,
17126 ordinal: u64,
17127 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
17128 ::core::future::ready(())
17129 }
17130}
17131
17132impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for File
17133where
17134 ___H: FileClientHandler<___T> + ::core::marker::Send,
17135 ___T: ::fidl_next::Transport,
17136 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
17137 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17138 Constraint = (),
17139 >,
17140 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
17141 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17142 Constraint = (),
17143 >,
17144{
17145 async fn on_event(
17146 handler: &mut ___H,
17147 mut message: ::fidl_next::Message<___T>,
17148 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
17149 match *message.header().ordinal {
17150 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
17151 Ok(decoded) => {
17152 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
17153 Ok(())
17154 }
17155 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17156 ordinal: 9207534335756671346,
17157 error,
17158 }),
17159 },
17160
17161 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
17162 Ok(decoded) => {
17163 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
17164 Ok(())
17165 }
17166 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17167 ordinal: 6679970090861613324,
17168 error,
17169 }),
17170 },
17171
17172 ordinal => {
17173 handler.on_unknown_interaction(ordinal).await;
17174 if ::core::matches!(
17175 message.header().flexibility(),
17176 ::fidl_next::protocol::Flexibility::Strict
17177 ) {
17178 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
17179 } else {
17180 Ok(())
17181 }
17182 }
17183 }
17184 }
17185}
17186
17187pub trait FileServerHandler<
17191 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
17192 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
17193>
17194{
17195 #[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"]
17196 fn advisory_lock(
17197 &mut self,
17198
17199 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
17200
17201 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
17202 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17203
17204 #[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"]
17205 fn link_into(
17206 &mut self,
17207
17208 request: ::fidl_next::Request<file::LinkInto, ___T>,
17209
17210 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
17211 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17212
17213 fn clone(
17214 &mut self,
17215
17216 request: ::fidl_next::Request<file::Clone, ___T>,
17217 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17218
17219 #[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"]
17220 fn close(
17221 &mut self,
17222
17223 responder: ::fidl_next::Responder<file::Close, ___T>,
17224 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17225
17226 fn query(
17227 &mut self,
17228
17229 responder: ::fidl_next::Responder<file::Query, ___T>,
17230 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17231
17232 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
17233 fn deprecated_clone(
17234 &mut self,
17235
17236 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
17237 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17238
17239 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
17240 fn deprecated_get_attr(
17241 &mut self,
17242
17243 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
17244 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17245
17246 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
17247 fn deprecated_set_attr(
17248 &mut self,
17249
17250 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
17251
17252 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
17253 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17254
17255 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
17256 fn deprecated_get_flags(
17257 &mut self,
17258
17259 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
17260 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17261
17262 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
17263 fn deprecated_set_flags(
17264 &mut self,
17265
17266 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
17267
17268 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
17269 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17270
17271 #[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"]
17272 fn get_flags(
17273 &mut self,
17274
17275 responder: ::fidl_next::Responder<file::GetFlags, ___T>,
17276 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17277
17278 #[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"]
17279 fn set_flags(
17280 &mut self,
17281
17282 request: ::fidl_next::Request<file::SetFlags, ___T>,
17283
17284 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
17285 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17286
17287 #[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"]
17288 fn query_filesystem(
17289 &mut self,
17290
17291 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
17292 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17293
17294 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
17295 fn get_token(
17296 &mut self,
17297
17298 responder: ::fidl_next::Responder<file::GetToken, ___T>,
17299 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17300
17301 #[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"]
17302 fn get_attributes(
17303 &mut self,
17304
17305 request: ::fidl_next::Request<file::GetAttributes, ___T>,
17306
17307 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
17308 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17309
17310 #[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"]
17311 fn update_attributes(
17312 &mut self,
17313
17314 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
17315
17316 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
17317 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17318
17319 #[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"]
17320 fn sync(
17321 &mut self,
17322
17323 responder: ::fidl_next::Responder<file::Sync, ___T>,
17324 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17325
17326 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
17327 fn list_extended_attributes(
17328 &mut self,
17329
17330 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
17331 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17332
17333 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
17334 fn get_extended_attribute(
17335 &mut self,
17336
17337 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
17338
17339 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
17340 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17341
17342 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
17343 fn set_extended_attribute(
17344 &mut self,
17345
17346 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
17347
17348 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
17349 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17350
17351 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
17352 fn remove_extended_attribute(
17353 &mut self,
17354
17355 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
17356
17357 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
17358 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17359
17360 #[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"]
17361 fn read(
17362 &mut self,
17363
17364 request: ::fidl_next::Request<file::Read, ___T>,
17365
17366 responder: ::fidl_next::Responder<file::Read, ___T>,
17367 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17368
17369 #[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"]
17370 fn write(
17371 &mut self,
17372
17373 request: ::fidl_next::Request<file::Write, ___T>,
17374
17375 responder: ::fidl_next::Responder<file::Write, ___T>,
17376 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17377
17378 fn describe(
17379 &mut self,
17380
17381 responder: ::fidl_next::Responder<file::Describe, ___T>,
17382 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17383
17384 #[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"]
17385 fn seek(
17386 &mut self,
17387
17388 request: ::fidl_next::Request<file::Seek, ___T>,
17389
17390 responder: ::fidl_next::Responder<file::Seek, ___T>,
17391 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17392
17393 #[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"]
17394 fn read_at(
17395 &mut self,
17396
17397 request: ::fidl_next::Request<file::ReadAt, ___T>,
17398
17399 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
17400 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17401
17402 #[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"]
17403 fn write_at(
17404 &mut self,
17405
17406 request: ::fidl_next::Request<file::WriteAt, ___T>,
17407
17408 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
17409 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17410
17411 #[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"]
17412 fn resize(
17413 &mut self,
17414
17415 request: ::fidl_next::Request<file::Resize, ___T>,
17416
17417 responder: ::fidl_next::Responder<file::Resize, ___T>,
17418 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17419
17420 #[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"]
17421 fn get_backing_memory(
17422 &mut self,
17423
17424 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
17425
17426 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
17427 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17428
17429 #[doc = " Pre-allocate on-disk space for this file.\n"]
17430 fn allocate(
17431 &mut self,
17432
17433 request: ::fidl_next::Request<file::Allocate, ___T>,
17434
17435 responder: ::fidl_next::Responder<file::Allocate, ___T>,
17436 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17437
17438 #[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"]
17439 fn enable_verity(
17440 &mut self,
17441
17442 request: ::fidl_next::Request<file::EnableVerity, ___T>,
17443
17444 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
17445 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
17446
17447 fn on_unknown_interaction(
17448 &mut self,
17449 ordinal: u64,
17450 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
17451 ::core::future::ready(())
17452 }
17453}
17454
17455impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for File
17456where
17457 ___H: FileServerHandler<___T> + ::core::marker::Send,
17458 ___T: ::fidl_next::Transport,
17459 for<'de> crate::wire::AdvisoryLockingAdvisoryLockRequest<'de>: ::fidl_next::Decode<
17460 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17461 Constraint = (),
17462 >,
17463 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
17464 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17465 Constraint = (),
17466 >,
17467 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
17468 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17469 Constraint = (),
17470 >,
17471 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
17472 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17473 Constraint = (),
17474 >,
17475 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
17476 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17477 Constraint = (),
17478 >,
17479 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
17480 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17481 Constraint = (),
17482 >,
17483 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
17484 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17485 Constraint = (),
17486 >,
17487 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
17488 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17489 Constraint = (),
17490 >,
17491 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
17492 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17493 Constraint = (),
17494 >,
17495 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
17496 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17497 Constraint = (),
17498 >,
17499 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
17500 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17501 Constraint = (),
17502 >,
17503 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
17504 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17505 Constraint = (),
17506 >,
17507 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
17508 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17509 Constraint = (),
17510 >,
17511 for<'de> crate::wire::ReadableReadRequest: ::fidl_next::Decode<
17512 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17513 Constraint = (),
17514 >,
17515 for<'de> crate::wire::WritableWriteRequest<'de>: ::fidl_next::Decode<
17516 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17517 Constraint = (),
17518 >,
17519 for<'de> crate::wire::FileSeekRequest: ::fidl_next::Decode<
17520 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17521 Constraint = (),
17522 >,
17523 for<'de> crate::wire::FileReadAtRequest: ::fidl_next::Decode<
17524 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17525 Constraint = (),
17526 >,
17527 for<'de> crate::wire::FileWriteAtRequest<'de>: ::fidl_next::Decode<
17528 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17529 Constraint = (),
17530 >,
17531 for<'de> crate::wire::FileResizeRequest: ::fidl_next::Decode<
17532 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17533 Constraint = (),
17534 >,
17535 for<'de> crate::wire::FileGetBackingMemoryRequest: ::fidl_next::Decode<
17536 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17537 Constraint = (),
17538 >,
17539 for<'de> crate::wire::FileAllocateRequest: ::fidl_next::Decode<
17540 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17541 Constraint = (),
17542 >,
17543 for<'de> crate::wire::FileEnableVerityRequest<'de>: ::fidl_next::Decode<
17544 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
17545 Constraint = (),
17546 >,
17547{
17548 async fn on_one_way(
17549 handler: &mut ___H,
17550 mut message: ::fidl_next::Message<___T>,
17551 ) -> ::core::result::Result<
17552 (),
17553 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17554 > {
17555 match *message.header().ordinal {
17556 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
17557 Ok(decoded) => {
17558 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
17559 Ok(())
17560 }
17561 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17562 ordinal: 2366825959783828089,
17563 error,
17564 }),
17565 },
17566
17567 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
17568 Ok(decoded) => {
17569 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
17570 Ok(())
17571 }
17572 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17573 ordinal: 6512600400724287855,
17574 error,
17575 }),
17576 },
17577
17578 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
17579 Ok(decoded) => {
17580 handler
17581 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
17582 .await;
17583 Ok(())
17584 }
17585 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17586 ordinal: 5431626189872037072,
17587 error,
17588 }),
17589 },
17590
17591 ordinal => {
17592 handler.on_unknown_interaction(ordinal).await;
17593 if ::core::matches!(
17594 message.header().flexibility(),
17595 ::fidl_next::protocol::Flexibility::Strict
17596 ) {
17597 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
17598 } else {
17599 Ok(())
17600 }
17601 }
17602 }
17603 }
17604
17605 async fn on_two_way(
17606 handler: &mut ___H,
17607 mut message: ::fidl_next::Message<___T>,
17608 responder: ::fidl_next::protocol::Responder<___T>,
17609 ) -> ::core::result::Result<
17610 (),
17611 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
17612 > {
17613 match *message.header().ordinal {
17614 7992130864415541162 => {
17615 let responder = ::fidl_next::Responder::from_untyped(responder);
17616
17617 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17618 Ok(decoded) => {
17619 handler
17620 .advisory_lock(::fidl_next::Request::from_decoded(decoded), responder)
17621 .await;
17622 Ok(())
17623 }
17624 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17625 ordinal: 7992130864415541162,
17626 error,
17627 }),
17628 }
17629 }
17630
17631 6121399674497678964 => {
17632 let responder = ::fidl_next::Responder::from_untyped(responder);
17633
17634 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17635 Ok(decoded) => {
17636 handler
17637 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
17638 .await;
17639 Ok(())
17640 }
17641 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17642 ordinal: 6121399674497678964,
17643 error,
17644 }),
17645 }
17646 }
17647
17648 6540867515453498750 => {
17649 let responder = ::fidl_next::Responder::from_untyped(responder);
17650
17651 handler.close(responder).await;
17652 Ok(())
17653 }
17654
17655 2763219980499352582 => {
17656 let responder = ::fidl_next::Responder::from_untyped(responder);
17657
17658 handler.query(responder).await;
17659 Ok(())
17660 }
17661
17662 8689798978500614909 => {
17663 let responder = ::fidl_next::Responder::from_untyped(responder);
17664
17665 handler.deprecated_get_attr(responder).await;
17666 Ok(())
17667 }
17668
17669 4721673413776871238 => {
17670 let responder = ::fidl_next::Responder::from_untyped(responder);
17671
17672 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17673 Ok(decoded) => {
17674 handler
17675 .deprecated_set_attr(
17676 ::fidl_next::Request::from_decoded(decoded),
17677 responder,
17678 )
17679 .await;
17680 Ok(())
17681 }
17682 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17683 ordinal: 4721673413776871238,
17684 error,
17685 }),
17686 }
17687 }
17688
17689 6595803110182632097 => {
17690 let responder = ::fidl_next::Responder::from_untyped(responder);
17691
17692 handler.deprecated_get_flags(responder).await;
17693 Ok(())
17694 }
17695
17696 5950864159036794675 => {
17697 let responder = ::fidl_next::Responder::from_untyped(responder);
17698
17699 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17700 Ok(decoded) => {
17701 handler
17702 .deprecated_set_flags(
17703 ::fidl_next::Request::from_decoded(decoded),
17704 responder,
17705 )
17706 .await;
17707 Ok(())
17708 }
17709 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17710 ordinal: 5950864159036794675,
17711 error,
17712 }),
17713 }
17714 }
17715
17716 105530239381466147 => {
17717 let responder = ::fidl_next::Responder::from_untyped(responder);
17718
17719 handler.get_flags(responder).await;
17720 Ok(())
17721 }
17722
17723 6172186066099445416 => {
17724 let responder = ::fidl_next::Responder::from_untyped(responder);
17725
17726 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17727 Ok(decoded) => {
17728 handler
17729 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
17730 .await;
17731 Ok(())
17732 }
17733 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17734 ordinal: 6172186066099445416,
17735 error,
17736 }),
17737 }
17738 }
17739
17740 8013111122914313744 => {
17741 let responder = ::fidl_next::Responder::from_untyped(responder);
17742
17743 handler.query_filesystem(responder).await;
17744 Ok(())
17745 }
17746
17747 5788516050773961964 => {
17748 let responder = ::fidl_next::Responder::from_untyped(responder);
17749
17750 handler.get_token(responder).await;
17751 Ok(())
17752 }
17753
17754 4414537700416816443 => {
17755 let responder = ::fidl_next::Responder::from_untyped(responder);
17756
17757 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17758 Ok(decoded) => {
17759 handler
17760 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
17761 .await;
17762 Ok(())
17763 }
17764 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17765 ordinal: 4414537700416816443,
17766 error,
17767 }),
17768 }
17769 }
17770
17771 3677402239314018056 => {
17772 let responder = ::fidl_next::Responder::from_untyped(responder);
17773
17774 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17775 Ok(decoded) => {
17776 handler
17777 .update_attributes(
17778 ::fidl_next::Request::from_decoded(decoded),
17779 responder,
17780 )
17781 .await;
17782 Ok(())
17783 }
17784 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17785 ordinal: 3677402239314018056,
17786 error,
17787 }),
17788 }
17789 }
17790
17791 3196473584242777161 => {
17792 let responder = ::fidl_next::Responder::from_untyped(responder);
17793
17794 handler.sync(responder).await;
17795 Ok(())
17796 }
17797
17798 5043930208506967771 => {
17799 let responder = ::fidl_next::Responder::from_untyped(responder);
17800
17801 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17802 Ok(decoded) => {
17803 handler
17804 .get_extended_attribute(
17805 ::fidl_next::Request::from_decoded(decoded),
17806 responder,
17807 )
17808 .await;
17809 Ok(())
17810 }
17811 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17812 ordinal: 5043930208506967771,
17813 error,
17814 }),
17815 }
17816 }
17817
17818 5374223046099989052 => {
17819 let responder = ::fidl_next::Responder::from_untyped(responder);
17820
17821 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17822 Ok(decoded) => {
17823 handler
17824 .set_extended_attribute(
17825 ::fidl_next::Request::from_decoded(decoded),
17826 responder,
17827 )
17828 .await;
17829 Ok(())
17830 }
17831 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17832 ordinal: 5374223046099989052,
17833 error,
17834 }),
17835 }
17836 }
17837
17838 8794297771444732717 => {
17839 let responder = ::fidl_next::Responder::from_untyped(responder);
17840
17841 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17842 Ok(decoded) => {
17843 handler
17844 .remove_extended_attribute(
17845 ::fidl_next::Request::from_decoded(decoded),
17846 responder,
17847 )
17848 .await;
17849 Ok(())
17850 }
17851 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17852 ordinal: 8794297771444732717,
17853 error,
17854 }),
17855 }
17856 }
17857
17858 395825947633028830 => {
17859 let responder = ::fidl_next::Responder::from_untyped(responder);
17860
17861 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17862 Ok(decoded) => {
17863 handler.read(::fidl_next::Request::from_decoded(decoded), responder).await;
17864 Ok(())
17865 }
17866 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17867 ordinal: 395825947633028830,
17868 error,
17869 }),
17870 }
17871 }
17872
17873 7651971425397809026 => {
17874 let responder = ::fidl_next::Responder::from_untyped(responder);
17875
17876 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17877 Ok(decoded) => {
17878 handler.write(::fidl_next::Request::from_decoded(decoded), responder).await;
17879 Ok(())
17880 }
17881 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17882 ordinal: 7651971425397809026,
17883 error,
17884 }),
17885 }
17886 }
17887
17888 7545125870053689020 => {
17889 let responder = ::fidl_next::Responder::from_untyped(responder);
17890
17891 handler.describe(responder).await;
17892 Ok(())
17893 }
17894
17895 8649041485622956551 => {
17896 let responder = ::fidl_next::Responder::from_untyped(responder);
17897
17898 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17899 Ok(decoded) => {
17900 handler.seek(::fidl_next::Request::from_decoded(decoded), responder).await;
17901 Ok(())
17902 }
17903 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17904 ordinal: 8649041485622956551,
17905 error,
17906 }),
17907 }
17908 }
17909
17910 1587416148701180478 => {
17911 let responder = ::fidl_next::Responder::from_untyped(responder);
17912
17913 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17914 Ok(decoded) => {
17915 handler
17916 .read_at(::fidl_next::Request::from_decoded(decoded), responder)
17917 .await;
17918 Ok(())
17919 }
17920 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17921 ordinal: 1587416148701180478,
17922 error,
17923 }),
17924 }
17925 }
17926
17927 8736683935131400491 => {
17928 let responder = ::fidl_next::Responder::from_untyped(responder);
17929
17930 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17931 Ok(decoded) => {
17932 handler
17933 .write_at(::fidl_next::Request::from_decoded(decoded), responder)
17934 .await;
17935 Ok(())
17936 }
17937 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17938 ordinal: 8736683935131400491,
17939 error,
17940 }),
17941 }
17942 }
17943
17944 3134648685270758458 => {
17945 let responder = ::fidl_next::Responder::from_untyped(responder);
17946
17947 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17948 Ok(decoded) => {
17949 handler
17950 .resize(::fidl_next::Request::from_decoded(decoded), responder)
17951 .await;
17952 Ok(())
17953 }
17954 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17955 ordinal: 3134648685270758458,
17956 error,
17957 }),
17958 }
17959 }
17960
17961 46911652864194091 => {
17962 let responder = ::fidl_next::Responder::from_untyped(responder);
17963
17964 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17965 Ok(decoded) => {
17966 handler
17967 .get_backing_memory(
17968 ::fidl_next::Request::from_decoded(decoded),
17969 responder,
17970 )
17971 .await;
17972 Ok(())
17973 }
17974 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17975 ordinal: 46911652864194091,
17976 error,
17977 }),
17978 }
17979 }
17980
17981 8645235848064269614 => {
17982 let responder = ::fidl_next::Responder::from_untyped(responder);
17983
17984 match ::fidl_next::AsDecoderExt::into_decoded(message) {
17985 Ok(decoded) => {
17986 handler
17987 .allocate(::fidl_next::Request::from_decoded(decoded), responder)
17988 .await;
17989 Ok(())
17990 }
17991 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
17992 ordinal: 8645235848064269614,
17993 error,
17994 }),
17995 }
17996 }
17997
17998 3189145313204943035 => {
17999 let responder = ::fidl_next::Responder::from_untyped(responder);
18000
18001 match ::fidl_next::AsDecoderExt::into_decoded(message) {
18002 Ok(decoded) => {
18003 handler
18004 .enable_verity(::fidl_next::Request::from_decoded(decoded), responder)
18005 .await;
18006 Ok(())
18007 }
18008 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
18009 ordinal: 3189145313204943035,
18010 error,
18011 }),
18012 }
18013 }
18014
18015 ordinal => {
18016 handler.on_unknown_interaction(ordinal).await;
18017 if ::core::matches!(
18018 message.header().flexibility(),
18019 ::fidl_next::protocol::Flexibility::Strict
18020 ) {
18021 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
18022 } else {
18023 responder
18024 .respond_framework_error(
18025 ordinal,
18026 ::fidl_next::FrameworkError::UnknownMethod,
18027 )
18028 .expect("encoding a framework error should never fail")
18029 .await?;
18030 Ok(())
18031 }
18032 }
18033 }
18034 }
18035}
18036
18037impl<___T> FileClientHandler<___T> for ::fidl_next::IgnoreEvents
18038where
18039 ___T: ::fidl_next::Transport,
18040{
18041 async fn on_open(&mut self, _: ::fidl_next::Request<file::OnOpen, ___T>) {}
18042
18043 async fn on_representation(&mut self, _: ::fidl_next::Request<file::OnRepresentation, ___T>) {}
18044
18045 async fn on_unknown_interaction(&mut self, _: u64) {}
18046}
18047
18048impl<___H, ___T> FileLocalClientHandler<___T> for ::fidl_next::Local<___H>
18049where
18050 ___H: FileClientHandler<___T>,
18051 ___T: ::fidl_next::Transport,
18052{
18053 async fn on_open(&mut self, request: ::fidl_next::Request<file::OnOpen, ___T>) {
18054 ___H::on_open(&mut self.0, request).await
18055 }
18056
18057 async fn on_representation(
18058 &mut self,
18059
18060 request: ::fidl_next::Request<file::OnRepresentation, ___T>,
18061 ) {
18062 ___H::on_representation(&mut self.0, request).await
18063 }
18064
18065 async fn on_unknown_interaction(&mut self, ordinal: u64) {
18066 ___H::on_unknown_interaction(&mut self.0, ordinal).await
18067 }
18068}
18069
18070impl<___H, ___T> FileLocalServerHandler<___T> for ::fidl_next::Local<___H>
18071where
18072 ___H: FileServerHandler<___T>,
18073 ___T: ::fidl_next::Transport,
18074{
18075 async fn advisory_lock(
18076 &mut self,
18077
18078 request: ::fidl_next::Request<file::AdvisoryLock, ___T>,
18079
18080 responder: ::fidl_next::Responder<file::AdvisoryLock, ___T>,
18081 ) {
18082 ___H::advisory_lock(&mut self.0, request, responder).await
18083 }
18084
18085 async fn link_into(
18086 &mut self,
18087
18088 request: ::fidl_next::Request<file::LinkInto, ___T>,
18089
18090 responder: ::fidl_next::Responder<file::LinkInto, ___T>,
18091 ) {
18092 ___H::link_into(&mut self.0, request, responder).await
18093 }
18094
18095 async fn clone(&mut self, request: ::fidl_next::Request<file::Clone, ___T>) {
18096 ___H::clone(&mut self.0, request).await
18097 }
18098
18099 async fn close(&mut self, responder: ::fidl_next::Responder<file::Close, ___T>) {
18100 ___H::close(&mut self.0, responder).await
18101 }
18102
18103 async fn query(&mut self, responder: ::fidl_next::Responder<file::Query, ___T>) {
18104 ___H::query(&mut self.0, responder).await
18105 }
18106
18107 async fn deprecated_clone(
18108 &mut self,
18109
18110 request: ::fidl_next::Request<file::DeprecatedClone, ___T>,
18111 ) {
18112 ___H::deprecated_clone(&mut self.0, request).await
18113 }
18114
18115 async fn deprecated_get_attr(
18116 &mut self,
18117
18118 responder: ::fidl_next::Responder<file::DeprecatedGetAttr, ___T>,
18119 ) {
18120 ___H::deprecated_get_attr(&mut self.0, responder).await
18121 }
18122
18123 async fn deprecated_set_attr(
18124 &mut self,
18125
18126 request: ::fidl_next::Request<file::DeprecatedSetAttr, ___T>,
18127
18128 responder: ::fidl_next::Responder<file::DeprecatedSetAttr, ___T>,
18129 ) {
18130 ___H::deprecated_set_attr(&mut self.0, request, responder).await
18131 }
18132
18133 async fn deprecated_get_flags(
18134 &mut self,
18135
18136 responder: ::fidl_next::Responder<file::DeprecatedGetFlags, ___T>,
18137 ) {
18138 ___H::deprecated_get_flags(&mut self.0, responder).await
18139 }
18140
18141 async fn deprecated_set_flags(
18142 &mut self,
18143
18144 request: ::fidl_next::Request<file::DeprecatedSetFlags, ___T>,
18145
18146 responder: ::fidl_next::Responder<file::DeprecatedSetFlags, ___T>,
18147 ) {
18148 ___H::deprecated_set_flags(&mut self.0, request, responder).await
18149 }
18150
18151 async fn get_flags(&mut self, responder: ::fidl_next::Responder<file::GetFlags, ___T>) {
18152 ___H::get_flags(&mut self.0, responder).await
18153 }
18154
18155 async fn set_flags(
18156 &mut self,
18157
18158 request: ::fidl_next::Request<file::SetFlags, ___T>,
18159
18160 responder: ::fidl_next::Responder<file::SetFlags, ___T>,
18161 ) {
18162 ___H::set_flags(&mut self.0, request, responder).await
18163 }
18164
18165 async fn query_filesystem(
18166 &mut self,
18167
18168 responder: ::fidl_next::Responder<file::QueryFilesystem, ___T>,
18169 ) {
18170 ___H::query_filesystem(&mut self.0, responder).await
18171 }
18172
18173 async fn get_token(&mut self, responder: ::fidl_next::Responder<file::GetToken, ___T>) {
18174 ___H::get_token(&mut self.0, responder).await
18175 }
18176
18177 async fn get_attributes(
18178 &mut self,
18179
18180 request: ::fidl_next::Request<file::GetAttributes, ___T>,
18181
18182 responder: ::fidl_next::Responder<file::GetAttributes, ___T>,
18183 ) {
18184 ___H::get_attributes(&mut self.0, request, responder).await
18185 }
18186
18187 async fn update_attributes(
18188 &mut self,
18189
18190 request: ::fidl_next::Request<file::UpdateAttributes, ___T>,
18191
18192 responder: ::fidl_next::Responder<file::UpdateAttributes, ___T>,
18193 ) {
18194 ___H::update_attributes(&mut self.0, request, responder).await
18195 }
18196
18197 async fn sync(&mut self, responder: ::fidl_next::Responder<file::Sync, ___T>) {
18198 ___H::sync(&mut self.0, responder).await
18199 }
18200
18201 async fn list_extended_attributes(
18202 &mut self,
18203
18204 request: ::fidl_next::Request<file::ListExtendedAttributes, ___T>,
18205 ) {
18206 ___H::list_extended_attributes(&mut self.0, request).await
18207 }
18208
18209 async fn get_extended_attribute(
18210 &mut self,
18211
18212 request: ::fidl_next::Request<file::GetExtendedAttribute, ___T>,
18213
18214 responder: ::fidl_next::Responder<file::GetExtendedAttribute, ___T>,
18215 ) {
18216 ___H::get_extended_attribute(&mut self.0, request, responder).await
18217 }
18218
18219 async fn set_extended_attribute(
18220 &mut self,
18221
18222 request: ::fidl_next::Request<file::SetExtendedAttribute, ___T>,
18223
18224 responder: ::fidl_next::Responder<file::SetExtendedAttribute, ___T>,
18225 ) {
18226 ___H::set_extended_attribute(&mut self.0, request, responder).await
18227 }
18228
18229 async fn remove_extended_attribute(
18230 &mut self,
18231
18232 request: ::fidl_next::Request<file::RemoveExtendedAttribute, ___T>,
18233
18234 responder: ::fidl_next::Responder<file::RemoveExtendedAttribute, ___T>,
18235 ) {
18236 ___H::remove_extended_attribute(&mut self.0, request, responder).await
18237 }
18238
18239 async fn read(
18240 &mut self,
18241
18242 request: ::fidl_next::Request<file::Read, ___T>,
18243
18244 responder: ::fidl_next::Responder<file::Read, ___T>,
18245 ) {
18246 ___H::read(&mut self.0, request, responder).await
18247 }
18248
18249 async fn write(
18250 &mut self,
18251
18252 request: ::fidl_next::Request<file::Write, ___T>,
18253
18254 responder: ::fidl_next::Responder<file::Write, ___T>,
18255 ) {
18256 ___H::write(&mut self.0, request, responder).await
18257 }
18258
18259 async fn describe(&mut self, responder: ::fidl_next::Responder<file::Describe, ___T>) {
18260 ___H::describe(&mut self.0, responder).await
18261 }
18262
18263 async fn seek(
18264 &mut self,
18265
18266 request: ::fidl_next::Request<file::Seek, ___T>,
18267
18268 responder: ::fidl_next::Responder<file::Seek, ___T>,
18269 ) {
18270 ___H::seek(&mut self.0, request, responder).await
18271 }
18272
18273 async fn read_at(
18274 &mut self,
18275
18276 request: ::fidl_next::Request<file::ReadAt, ___T>,
18277
18278 responder: ::fidl_next::Responder<file::ReadAt, ___T>,
18279 ) {
18280 ___H::read_at(&mut self.0, request, responder).await
18281 }
18282
18283 async fn write_at(
18284 &mut self,
18285
18286 request: ::fidl_next::Request<file::WriteAt, ___T>,
18287
18288 responder: ::fidl_next::Responder<file::WriteAt, ___T>,
18289 ) {
18290 ___H::write_at(&mut self.0, request, responder).await
18291 }
18292
18293 async fn resize(
18294 &mut self,
18295
18296 request: ::fidl_next::Request<file::Resize, ___T>,
18297
18298 responder: ::fidl_next::Responder<file::Resize, ___T>,
18299 ) {
18300 ___H::resize(&mut self.0, request, responder).await
18301 }
18302
18303 async fn get_backing_memory(
18304 &mut self,
18305
18306 request: ::fidl_next::Request<file::GetBackingMemory, ___T>,
18307
18308 responder: ::fidl_next::Responder<file::GetBackingMemory, ___T>,
18309 ) {
18310 ___H::get_backing_memory(&mut self.0, request, responder).await
18311 }
18312
18313 async fn allocate(
18314 &mut self,
18315
18316 request: ::fidl_next::Request<file::Allocate, ___T>,
18317
18318 responder: ::fidl_next::Responder<file::Allocate, ___T>,
18319 ) {
18320 ___H::allocate(&mut self.0, request, responder).await
18321 }
18322
18323 async fn enable_verity(
18324 &mut self,
18325
18326 request: ::fidl_next::Request<file::EnableVerity, ___T>,
18327
18328 responder: ::fidl_next::Responder<file::EnableVerity, ___T>,
18329 ) {
18330 ___H::enable_verity(&mut self.0, request, responder).await
18331 }
18332
18333 async fn on_unknown_interaction(&mut self, ordinal: u64) {
18334 ___H::on_unknown_interaction(&mut self.0, ordinal).await
18335 }
18336}
18337
18338#[doc = " A [\'Node\'] which contains a symbolic link.\n"]
18340#[derive(PartialEq, Debug)]
18341pub struct Symlink;
18342
18343impl ::fidl_next::Discoverable for Symlink {
18344 const PROTOCOL_NAME: &'static str = "fuchsia.io.Symlink";
18345}
18346
18347#[cfg(target_os = "fuchsia")]
18348impl ::fidl_next::HasTransport for Symlink {
18349 type Transport = ::fidl_next::fuchsia::zx::Channel;
18350}
18351
18352pub mod symlink {
18353 pub mod prelude {
18354 pub use crate::{
18355 Symlink, SymlinkClientHandler, SymlinkLocalClientHandler, SymlinkLocalServerHandler,
18356 SymlinkServerHandler, symlink,
18357 };
18358
18359 pub use crate::natural::ExtendedAttributeValue;
18360
18361 pub use crate::natural::LinkableLinkIntoRequest;
18362
18363 pub use crate::natural::LinkableLinkIntoResponse;
18364
18365 pub use crate::natural::MutableNodeAttributes;
18366
18367 pub use crate::natural::NodeAttributes2;
18368
18369 pub use crate::natural::NodeDeprecatedCloneRequest;
18370
18371 pub use crate::natural::NodeDeprecatedGetAttrResponse;
18372
18373 pub use crate::natural::NodeDeprecatedGetFlagsResponse;
18374
18375 pub use crate::natural::NodeDeprecatedSetAttrRequest;
18376
18377 pub use crate::natural::NodeDeprecatedSetAttrResponse;
18378
18379 pub use crate::natural::NodeDeprecatedSetFlagsRequest;
18380
18381 pub use crate::natural::NodeDeprecatedSetFlagsResponse;
18382
18383 pub use crate::natural::NodeGetAttributesRequest;
18384
18385 pub use crate::natural::NodeGetExtendedAttributeRequest;
18386
18387 pub use crate::natural::NodeListExtendedAttributesRequest;
18388
18389 pub use crate::natural::NodeOnOpenRequest;
18390
18391 pub use crate::natural::NodeQueryFilesystemResponse;
18392
18393 pub use crate::natural::NodeRemoveExtendedAttributeRequest;
18394
18395 pub use crate::natural::NodeSetExtendedAttributeRequest;
18396
18397 pub use crate::natural::NodeSetFlagsRequest;
18398
18399 pub use crate::natural::NodeGetFlagsResponse;
18400
18401 pub use crate::natural::NodeGetTokenResponse;
18402
18403 pub use crate::natural::NodeRemoveExtendedAttributeResponse;
18404
18405 pub use crate::natural::NodeSetExtendedAttributeResponse;
18406
18407 pub use crate::natural::NodeSetFlagsResponse;
18408
18409 pub use crate::natural::NodeSyncResponse;
18410
18411 pub use crate::natural::NodeUpdateAttributesResponse;
18412
18413 pub use crate::natural::OpenableOpenRequest;
18414
18415 pub use crate::natural::Representation;
18416
18417 pub use crate::natural::SymlinkInfo;
18418
18419 pub use ::fidl_next_fuchsia_unknown::natural::CloneableCloneRequest;
18420
18421 pub use ::fidl_next_fuchsia_unknown::natural::CloseableCloseResponse;
18422
18423 pub use ::fidl_next_fuchsia_unknown::natural::QueryableQueryResponse;
18424 }
18425
18426 pub struct LinkInto;
18427
18428 impl ::fidl_next::Method for LinkInto {
18429 const ORDINAL: u64 = 6121399674497678964;
18430 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18431 ::fidl_next::protocol::Flexibility::Strict;
18432
18433 type Protocol = crate::Symlink;
18434
18435 type Request = crate::wire::LinkableLinkIntoRequest<'static>;
18436 }
18437
18438 impl ::fidl_next::TwoWayMethod for LinkInto {
18439 type Response = ::fidl_next::wire::Result<
18440 'static,
18441 crate::wire::LinkableLinkIntoResponse,
18442 ::fidl_next::wire::fuchsia::Status,
18443 >;
18444 }
18445
18446 impl<___R> ::fidl_next::Respond<___R> for LinkInto {
18447 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
18448
18449 fn respond(response: ___R) -> Self::Output {
18450 ::core::result::Result::Ok(response)
18451 }
18452 }
18453
18454 impl<___R> ::fidl_next::RespondErr<___R> for LinkInto {
18455 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18456
18457 fn respond_err(response: ___R) -> Self::Output {
18458 ::core::result::Result::Err(response)
18459 }
18460 }
18461
18462 pub struct Clone;
18463
18464 impl ::fidl_next::Method for Clone {
18465 const ORDINAL: u64 = 2366825959783828089;
18466 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18467 ::fidl_next::protocol::Flexibility::Strict;
18468
18469 type Protocol = crate::Symlink;
18470
18471 type Request = ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest;
18472 }
18473
18474 pub struct Close;
18475
18476 impl ::fidl_next::Method for Close {
18477 const ORDINAL: u64 = 6540867515453498750;
18478 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18479 ::fidl_next::protocol::Flexibility::Strict;
18480
18481 type Protocol = crate::Symlink;
18482
18483 type Request = ::fidl_next::wire::EmptyMessageBody;
18484 }
18485
18486 impl ::fidl_next::TwoWayMethod for Close {
18487 type Response = ::fidl_next::wire::Result<
18488 'static,
18489 ::fidl_next_fuchsia_unknown::wire::CloseableCloseResponse,
18490 ::fidl_next::wire::Int32,
18491 >;
18492 }
18493
18494 impl<___R> ::fidl_next::Respond<___R> for Close {
18495 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
18496
18497 fn respond(response: ___R) -> Self::Output {
18498 ::core::result::Result::Ok(response)
18499 }
18500 }
18501
18502 impl<___R> ::fidl_next::RespondErr<___R> for Close {
18503 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18504
18505 fn respond_err(response: ___R) -> Self::Output {
18506 ::core::result::Result::Err(response)
18507 }
18508 }
18509
18510 pub struct Query;
18511
18512 impl ::fidl_next::Method for Query {
18513 const ORDINAL: u64 = 2763219980499352582;
18514 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18515 ::fidl_next::protocol::Flexibility::Strict;
18516
18517 type Protocol = crate::Symlink;
18518
18519 type Request = ::fidl_next::wire::EmptyMessageBody;
18520 }
18521
18522 impl ::fidl_next::TwoWayMethod for Query {
18523 type Response = ::fidl_next::wire::Strict<
18524 ::fidl_next_fuchsia_unknown::wire::QueryableQueryResponse<'static>,
18525 >;
18526 }
18527
18528 impl<___R> ::fidl_next::Respond<___R> for Query {
18529 type Output =
18530 ::fidl_next::Strict<::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse<___R>>;
18531
18532 fn respond(response: ___R) -> Self::Output {
18533 ::fidl_next::Strict(::fidl_next_fuchsia_unknown::generic::QueryableQueryResponse {
18534 protocol: response,
18535 })
18536 }
18537 }
18538
18539 pub struct DeprecatedClone;
18540
18541 impl ::fidl_next::Method for DeprecatedClone {
18542 const ORDINAL: u64 = 6512600400724287855;
18543 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18544 ::fidl_next::protocol::Flexibility::Flexible;
18545
18546 type Protocol = crate::Symlink;
18547
18548 type Request = crate::wire::NodeDeprecatedCloneRequest;
18549 }
18550
18551 pub struct OnOpen;
18552
18553 impl ::fidl_next::Method for OnOpen {
18554 const ORDINAL: u64 = 9207534335756671346;
18555 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18556 ::fidl_next::protocol::Flexibility::Flexible;
18557
18558 type Protocol = crate::Symlink;
18559
18560 type Request = crate::wire::NodeOnOpenRequest<'static>;
18561 }
18562
18563 pub struct DeprecatedGetAttr;
18564
18565 impl ::fidl_next::Method for DeprecatedGetAttr {
18566 const ORDINAL: u64 = 8689798978500614909;
18567 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18568 ::fidl_next::protocol::Flexibility::Strict;
18569
18570 type Protocol = crate::Symlink;
18571
18572 type Request = ::fidl_next::wire::EmptyMessageBody;
18573 }
18574
18575 impl ::fidl_next::TwoWayMethod for DeprecatedGetAttr {
18576 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetAttrResponse>;
18577 }
18578
18579 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetAttr {
18580 type Output = ::fidl_next::Strict<___R>;
18581
18582 fn respond(response: ___R) -> Self::Output {
18583 ::fidl_next::Strict(response)
18584 }
18585 }
18586
18587 pub struct DeprecatedSetAttr;
18588
18589 impl ::fidl_next::Method for DeprecatedSetAttr {
18590 const ORDINAL: u64 = 4721673413776871238;
18591 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18592 ::fidl_next::protocol::Flexibility::Strict;
18593
18594 type Protocol = crate::Symlink;
18595
18596 type Request = crate::wire::NodeDeprecatedSetAttrRequest;
18597 }
18598
18599 impl ::fidl_next::TwoWayMethod for DeprecatedSetAttr {
18600 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetAttrResponse>;
18601 }
18602
18603 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetAttr {
18604 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetAttrResponse<___R>>;
18605
18606 fn respond(response: ___R) -> Self::Output {
18607 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetAttrResponse { s: response })
18608 }
18609 }
18610
18611 pub struct DeprecatedGetFlags;
18612
18613 impl ::fidl_next::Method for DeprecatedGetFlags {
18614 const ORDINAL: u64 = 6595803110182632097;
18615 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18616 ::fidl_next::protocol::Flexibility::Strict;
18617
18618 type Protocol = crate::Symlink;
18619
18620 type Request = ::fidl_next::wire::EmptyMessageBody;
18621 }
18622
18623 impl ::fidl_next::TwoWayMethod for DeprecatedGetFlags {
18624 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedGetFlagsResponse>;
18625 }
18626
18627 impl<___R> ::fidl_next::Respond<___R> for DeprecatedGetFlags {
18628 type Output = ::fidl_next::Strict<___R>;
18629
18630 fn respond(response: ___R) -> Self::Output {
18631 ::fidl_next::Strict(response)
18632 }
18633 }
18634
18635 pub struct DeprecatedSetFlags;
18636
18637 impl ::fidl_next::Method for DeprecatedSetFlags {
18638 const ORDINAL: u64 = 5950864159036794675;
18639 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18640 ::fidl_next::protocol::Flexibility::Strict;
18641
18642 type Protocol = crate::Symlink;
18643
18644 type Request = crate::wire::NodeDeprecatedSetFlagsRequest;
18645 }
18646
18647 impl ::fidl_next::TwoWayMethod for DeprecatedSetFlags {
18648 type Response = ::fidl_next::wire::Strict<crate::wire::NodeDeprecatedSetFlagsResponse>;
18649 }
18650
18651 impl<___R> ::fidl_next::Respond<___R> for DeprecatedSetFlags {
18652 type Output = ::fidl_next::Strict<crate::generic::NodeDeprecatedSetFlagsResponse<___R>>;
18653
18654 fn respond(response: ___R) -> Self::Output {
18655 ::fidl_next::Strict(crate::generic::NodeDeprecatedSetFlagsResponse { s: response })
18656 }
18657 }
18658
18659 pub struct GetFlags;
18660
18661 impl ::fidl_next::Method for GetFlags {
18662 const ORDINAL: u64 = 105530239381466147;
18663 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18664 ::fidl_next::protocol::Flexibility::Flexible;
18665
18666 type Protocol = crate::Symlink;
18667
18668 type Request = ::fidl_next::wire::EmptyMessageBody;
18669 }
18670
18671 impl ::fidl_next::TwoWayMethod for GetFlags {
18672 type Response = ::fidl_next::wire::Result<
18673 'static,
18674 crate::wire::NodeGetFlagsResponse,
18675 ::fidl_next::wire::fuchsia::Status,
18676 >;
18677 }
18678
18679 impl<___R> ::fidl_next::Respond<___R> for GetFlags {
18680 type Output = ::core::result::Result<
18681 crate::generic::NodeGetFlagsResponse<___R>,
18682 ::fidl_next::never::Never,
18683 >;
18684
18685 fn respond(response: ___R) -> Self::Output {
18686 ::core::result::Result::Ok(crate::generic::NodeGetFlagsResponse { flags: response })
18687 }
18688 }
18689
18690 impl<___R> ::fidl_next::RespondErr<___R> for GetFlags {
18691 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18692
18693 fn respond_err(response: ___R) -> Self::Output {
18694 ::core::result::Result::Err(response)
18695 }
18696 }
18697
18698 pub struct SetFlags;
18699
18700 impl ::fidl_next::Method for SetFlags {
18701 const ORDINAL: u64 = 6172186066099445416;
18702 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18703 ::fidl_next::protocol::Flexibility::Flexible;
18704
18705 type Protocol = crate::Symlink;
18706
18707 type Request = crate::wire::NodeSetFlagsRequest;
18708 }
18709
18710 impl ::fidl_next::TwoWayMethod for SetFlags {
18711 type Response = ::fidl_next::wire::Result<
18712 'static,
18713 crate::wire::NodeSetFlagsResponse,
18714 ::fidl_next::wire::fuchsia::Status,
18715 >;
18716 }
18717
18718 impl<___R> ::fidl_next::Respond<___R> for SetFlags {
18719 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
18720
18721 fn respond(response: ___R) -> Self::Output {
18722 ::core::result::Result::Ok(response)
18723 }
18724 }
18725
18726 impl<___R> ::fidl_next::RespondErr<___R> for SetFlags {
18727 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18728
18729 fn respond_err(response: ___R) -> Self::Output {
18730 ::core::result::Result::Err(response)
18731 }
18732 }
18733
18734 pub struct QueryFilesystem;
18735
18736 impl ::fidl_next::Method for QueryFilesystem {
18737 const ORDINAL: u64 = 8013111122914313744;
18738 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18739 ::fidl_next::protocol::Flexibility::Strict;
18740
18741 type Protocol = crate::Symlink;
18742
18743 type Request = ::fidl_next::wire::EmptyMessageBody;
18744 }
18745
18746 impl ::fidl_next::TwoWayMethod for QueryFilesystem {
18747 type Response =
18748 ::fidl_next::wire::Strict<crate::wire::NodeQueryFilesystemResponse<'static>>;
18749 }
18750
18751 impl<___R> ::fidl_next::Respond<___R> for QueryFilesystem {
18752 type Output = ::fidl_next::Strict<___R>;
18753
18754 fn respond(response: ___R) -> Self::Output {
18755 ::fidl_next::Strict(response)
18756 }
18757 }
18758
18759 pub struct OnRepresentation;
18760
18761 impl ::fidl_next::Method for OnRepresentation {
18762 const ORDINAL: u64 = 6679970090861613324;
18763 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18764 ::fidl_next::protocol::Flexibility::Strict;
18765
18766 type Protocol = crate::Symlink;
18767
18768 type Request = crate::wire::Representation<'static>;
18769 }
18770
18771 pub struct GetToken;
18772
18773 impl ::fidl_next::Method for GetToken {
18774 const ORDINAL: u64 = 5788516050773961964;
18775 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18776 ::fidl_next::protocol::Flexibility::Flexible;
18777
18778 type Protocol = crate::Symlink;
18779
18780 type Request = ::fidl_next::wire::EmptyMessageBody;
18781 }
18782
18783 impl ::fidl_next::TwoWayMethod for GetToken {
18784 type Response = ::fidl_next::wire::Result<
18785 'static,
18786 crate::wire::NodeGetTokenResponse,
18787 ::fidl_next::wire::fuchsia::Status,
18788 >;
18789 }
18790
18791 impl<___R> ::fidl_next::Respond<___R> for GetToken {
18792 type Output = ::core::result::Result<
18793 crate::generic::NodeGetTokenResponse<___R>,
18794 ::fidl_next::never::Never,
18795 >;
18796
18797 fn respond(response: ___R) -> Self::Output {
18798 ::core::result::Result::Ok(crate::generic::NodeGetTokenResponse { token: response })
18799 }
18800 }
18801
18802 impl<___R> ::fidl_next::RespondErr<___R> for GetToken {
18803 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18804
18805 fn respond_err(response: ___R) -> Self::Output {
18806 ::core::result::Result::Err(response)
18807 }
18808 }
18809
18810 pub struct GetAttributes;
18811
18812 impl ::fidl_next::Method for GetAttributes {
18813 const ORDINAL: u64 = 4414537700416816443;
18814 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18815 ::fidl_next::protocol::Flexibility::Strict;
18816
18817 type Protocol = crate::Symlink;
18818
18819 type Request = crate::wire::NodeGetAttributesRequest;
18820 }
18821
18822 impl ::fidl_next::TwoWayMethod for GetAttributes {
18823 type Response = ::fidl_next::wire::Result<
18824 'static,
18825 crate::wire::NodeAttributes2<'static>,
18826 ::fidl_next::wire::fuchsia::Status,
18827 >;
18828 }
18829
18830 impl<___R> ::fidl_next::Respond<___R> for GetAttributes {
18831 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
18832
18833 fn respond(response: ___R) -> Self::Output {
18834 ::core::result::Result::Ok(response)
18835 }
18836 }
18837
18838 impl<___R> ::fidl_next::RespondErr<___R> for GetAttributes {
18839 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18840
18841 fn respond_err(response: ___R) -> Self::Output {
18842 ::core::result::Result::Err(response)
18843 }
18844 }
18845
18846 pub struct UpdateAttributes;
18847
18848 impl ::fidl_next::Method for UpdateAttributes {
18849 const ORDINAL: u64 = 3677402239314018056;
18850 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18851 ::fidl_next::protocol::Flexibility::Strict;
18852
18853 type Protocol = crate::Symlink;
18854
18855 type Request = crate::wire::MutableNodeAttributes<'static>;
18856 }
18857
18858 impl ::fidl_next::TwoWayMethod for UpdateAttributes {
18859 type Response = ::fidl_next::wire::Result<
18860 'static,
18861 crate::wire::NodeUpdateAttributesResponse,
18862 ::fidl_next::wire::fuchsia::Status,
18863 >;
18864 }
18865
18866 impl<___R> ::fidl_next::Respond<___R> for UpdateAttributes {
18867 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
18868
18869 fn respond(response: ___R) -> Self::Output {
18870 ::core::result::Result::Ok(response)
18871 }
18872 }
18873
18874 impl<___R> ::fidl_next::RespondErr<___R> for UpdateAttributes {
18875 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18876
18877 fn respond_err(response: ___R) -> Self::Output {
18878 ::core::result::Result::Err(response)
18879 }
18880 }
18881
18882 pub struct Sync;
18883
18884 impl ::fidl_next::Method for Sync {
18885 const ORDINAL: u64 = 3196473584242777161;
18886 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18887 ::fidl_next::protocol::Flexibility::Strict;
18888
18889 type Protocol = crate::Symlink;
18890
18891 type Request = ::fidl_next::wire::EmptyMessageBody;
18892 }
18893
18894 impl ::fidl_next::TwoWayMethod for Sync {
18895 type Response = ::fidl_next::wire::Result<
18896 'static,
18897 crate::wire::NodeSyncResponse,
18898 ::fidl_next::wire::fuchsia::Status,
18899 >;
18900 }
18901
18902 impl<___R> ::fidl_next::Respond<___R> for Sync {
18903 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
18904
18905 fn respond(response: ___R) -> Self::Output {
18906 ::core::result::Result::Ok(response)
18907 }
18908 }
18909
18910 impl<___R> ::fidl_next::RespondErr<___R> for Sync {
18911 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18912
18913 fn respond_err(response: ___R) -> Self::Output {
18914 ::core::result::Result::Err(response)
18915 }
18916 }
18917
18918 pub struct ListExtendedAttributes;
18919
18920 impl ::fidl_next::Method for ListExtendedAttributes {
18921 const ORDINAL: u64 = 5431626189872037072;
18922 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18923 ::fidl_next::protocol::Flexibility::Strict;
18924
18925 type Protocol = crate::Symlink;
18926
18927 type Request = crate::wire::NodeListExtendedAttributesRequest;
18928 }
18929
18930 pub struct GetExtendedAttribute;
18931
18932 impl ::fidl_next::Method for GetExtendedAttribute {
18933 const ORDINAL: u64 = 5043930208506967771;
18934 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18935 ::fidl_next::protocol::Flexibility::Strict;
18936
18937 type Protocol = crate::Symlink;
18938
18939 type Request = crate::wire::NodeGetExtendedAttributeRequest<'static>;
18940 }
18941
18942 impl ::fidl_next::TwoWayMethod for GetExtendedAttribute {
18943 type Response = ::fidl_next::wire::Result<
18944 'static,
18945 crate::wire::ExtendedAttributeValue<'static>,
18946 ::fidl_next::wire::fuchsia::Status,
18947 >;
18948 }
18949
18950 impl<___R> ::fidl_next::Respond<___R> for GetExtendedAttribute {
18951 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
18952
18953 fn respond(response: ___R) -> Self::Output {
18954 ::core::result::Result::Ok(response)
18955 }
18956 }
18957
18958 impl<___R> ::fidl_next::RespondErr<___R> for GetExtendedAttribute {
18959 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18960
18961 fn respond_err(response: ___R) -> Self::Output {
18962 ::core::result::Result::Err(response)
18963 }
18964 }
18965
18966 pub struct SetExtendedAttribute;
18967
18968 impl ::fidl_next::Method for SetExtendedAttribute {
18969 const ORDINAL: u64 = 5374223046099989052;
18970 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
18971 ::fidl_next::protocol::Flexibility::Strict;
18972
18973 type Protocol = crate::Symlink;
18974
18975 type Request = crate::wire::NodeSetExtendedAttributeRequest<'static>;
18976 }
18977
18978 impl ::fidl_next::TwoWayMethod for SetExtendedAttribute {
18979 type Response = ::fidl_next::wire::Result<
18980 'static,
18981 crate::wire::NodeSetExtendedAttributeResponse,
18982 ::fidl_next::wire::fuchsia::Status,
18983 >;
18984 }
18985
18986 impl<___R> ::fidl_next::Respond<___R> for SetExtendedAttribute {
18987 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
18988
18989 fn respond(response: ___R) -> Self::Output {
18990 ::core::result::Result::Ok(response)
18991 }
18992 }
18993
18994 impl<___R> ::fidl_next::RespondErr<___R> for SetExtendedAttribute {
18995 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
18996
18997 fn respond_err(response: ___R) -> Self::Output {
18998 ::core::result::Result::Err(response)
18999 }
19000 }
19001
19002 pub struct RemoveExtendedAttribute;
19003
19004 impl ::fidl_next::Method for RemoveExtendedAttribute {
19005 const ORDINAL: u64 = 8794297771444732717;
19006 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
19007 ::fidl_next::protocol::Flexibility::Strict;
19008
19009 type Protocol = crate::Symlink;
19010
19011 type Request = crate::wire::NodeRemoveExtendedAttributeRequest<'static>;
19012 }
19013
19014 impl ::fidl_next::TwoWayMethod for RemoveExtendedAttribute {
19015 type Response = ::fidl_next::wire::Result<
19016 'static,
19017 crate::wire::NodeRemoveExtendedAttributeResponse,
19018 ::fidl_next::wire::fuchsia::Status,
19019 >;
19020 }
19021
19022 impl<___R> ::fidl_next::Respond<___R> for RemoveExtendedAttribute {
19023 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
19024
19025 fn respond(response: ___R) -> Self::Output {
19026 ::core::result::Result::Ok(response)
19027 }
19028 }
19029
19030 impl<___R> ::fidl_next::RespondErr<___R> for RemoveExtendedAttribute {
19031 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
19032
19033 fn respond_err(response: ___R) -> Self::Output {
19034 ::core::result::Result::Err(response)
19035 }
19036 }
19037
19038 pub struct Open;
19039
19040 impl ::fidl_next::Method for Open {
19041 const ORDINAL: u64 = 6236883748953765593;
19042 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
19043 ::fidl_next::protocol::Flexibility::Flexible;
19044
19045 type Protocol = crate::Symlink;
19046
19047 type Request = crate::wire::OpenableOpenRequest<'static>;
19048 }
19049
19050 pub struct Describe;
19051
19052 impl ::fidl_next::Method for Describe {
19053 const ORDINAL: u64 = 8371117097481679347;
19054 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
19055 ::fidl_next::protocol::Flexibility::Flexible;
19056
19057 type Protocol = crate::Symlink;
19058
19059 type Request = ::fidl_next::wire::EmptyMessageBody;
19060 }
19061
19062 impl ::fidl_next::TwoWayMethod for Describe {
19063 type Response = ::fidl_next::wire::Flexible<'static, crate::wire::SymlinkInfo<'static>>;
19064 }
19065
19066 impl<___R> ::fidl_next::Respond<___R> for Describe {
19067 type Output = ::fidl_next::Flexible<___R>;
19068
19069 fn respond(response: ___R) -> Self::Output {
19070 ::fidl_next::Flexible(response)
19071 }
19072 }
19073
19074 mod ___detail {
19075 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Symlink
19076 where
19077 ___T: ::fidl_next::Transport,
19078 {
19079 type Client = SymlinkClient<___T>;
19080 type Server = SymlinkServer<___T>;
19081 }
19082
19083 #[repr(transparent)]
19085 pub struct SymlinkClient<___T: ::fidl_next::Transport> {
19086 #[allow(dead_code)]
19087 client: ::fidl_next::protocol::Client<___T>,
19088 }
19089
19090 impl<___T> SymlinkClient<___T>
19091 where
19092 ___T: ::fidl_next::Transport,
19093 {
19094 #[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"]
19095 pub fn link_into(
19096 &self,
19097
19098 dst_parent_token: impl ::fidl_next::Encode<
19099 ::fidl_next::wire::fuchsia::Event,
19100 <___T as ::fidl_next::Transport>::SendBuffer,
19101 >,
19102
19103 dst: impl ::fidl_next::Encode<
19104 ::fidl_next::wire::String<'static>,
19105 <___T as ::fidl_next::Transport>::SendBuffer,
19106 >,
19107 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
19108 where
19109 <___T as ::fidl_next::Transport>::SendBuffer:
19110 ::fidl_next::encoder::InternalHandleEncoder,
19111 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
19112 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
19113 {
19114 self.link_into_with(crate::generic::LinkableLinkIntoRequest {
19115 dst_parent_token,
19116
19117 dst,
19118 })
19119 }
19120
19121 #[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"]
19122 pub fn link_into_with<___R>(
19123 &self,
19124 request: ___R,
19125 ) -> ::fidl_next::TwoWayFuture<'_, super::LinkInto, ___T>
19126 where
19127 ___R: ::fidl_next::Encode<
19128 crate::wire::LinkableLinkIntoRequest<'static>,
19129 <___T as ::fidl_next::Transport>::SendBuffer,
19130 >,
19131 {
19132 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19133 6121399674497678964,
19134 <super::LinkInto as ::fidl_next::Method>::FLEXIBILITY,
19135 request,
19136 ))
19137 }
19138
19139 pub fn clone(
19140 &self,
19141
19142 request: impl ::fidl_next::Encode<
19143 ::fidl_next::ServerEnd<
19144 ::fidl_next_fuchsia_unknown::Cloneable,
19145 ::fidl_next::wire::fuchsia::Channel,
19146 >,
19147 <___T as ::fidl_next::Transport>::SendBuffer,
19148 >,
19149 ) -> ::fidl_next::SendFuture<'_, ___T>
19150 where
19151 <___T as ::fidl_next::Transport>::SendBuffer:
19152 ::fidl_next::encoder::InternalHandleEncoder,
19153 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
19154 {
19155 self.clone_with(::fidl_next_fuchsia_unknown::generic::CloneableCloneRequest {
19156 request,
19157 })
19158 }
19159
19160 pub fn clone_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
19161 where
19162 ___R: ::fidl_next::Encode<
19163 ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest,
19164 <___T as ::fidl_next::Transport>::SendBuffer,
19165 >,
19166 {
19167 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
19168 2366825959783828089,
19169 <super::Clone as ::fidl_next::Method>::FLEXIBILITY,
19170 request,
19171 ))
19172 }
19173
19174 #[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"]
19175 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
19176 ::fidl_next::TwoWayFuture::from_untyped(
19177 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
19178 6540867515453498750,
19179 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
19180 (),
19181 ),
19182 )
19183 }
19184
19185 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
19186 ::fidl_next::TwoWayFuture::from_untyped(
19187 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
19188 2763219980499352582,
19189 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
19190 (),
19191 ),
19192 )
19193 }
19194
19195 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
19196 pub fn deprecated_clone(
19197 &self,
19198
19199 flags: impl ::fidl_next::Encode<
19200 crate::wire::OpenFlags,
19201 <___T as ::fidl_next::Transport>::SendBuffer,
19202 >,
19203
19204 object: impl ::fidl_next::Encode<
19205 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
19206 <___T as ::fidl_next::Transport>::SendBuffer,
19207 >,
19208 ) -> ::fidl_next::SendFuture<'_, ___T>
19209 where
19210 <___T as ::fidl_next::Transport>::SendBuffer:
19211 ::fidl_next::encoder::InternalHandleEncoder,
19212 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
19213 {
19214 self.deprecated_clone_with(crate::generic::NodeDeprecatedCloneRequest {
19215 flags,
19216
19217 object,
19218 })
19219 }
19220
19221 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
19222 pub fn deprecated_clone_with<___R>(
19223 &self,
19224 request: ___R,
19225 ) -> ::fidl_next::SendFuture<'_, ___T>
19226 where
19227 ___R: ::fidl_next::Encode<
19228 crate::wire::NodeDeprecatedCloneRequest,
19229 <___T as ::fidl_next::Transport>::SendBuffer,
19230 >,
19231 {
19232 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
19233 6512600400724287855,
19234 <super::DeprecatedClone as ::fidl_next::Method>::FLEXIBILITY,
19235 request,
19236 ))
19237 }
19238
19239 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
19240 pub fn deprecated_get_attr(
19241 &self,
19242 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetAttr, ___T> {
19243 ::fidl_next::TwoWayFuture::from_untyped(
19244 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
19245 8689798978500614909,
19246 <super::DeprecatedGetAttr as ::fidl_next::Method>::FLEXIBILITY,
19247 (),
19248 ),
19249 )
19250 }
19251
19252 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
19253 pub fn deprecated_set_attr(
19254 &self,
19255
19256 flags: impl ::fidl_next::Encode<
19257 crate::wire::NodeAttributeFlags,
19258 <___T as ::fidl_next::Transport>::SendBuffer,
19259 >,
19260
19261 attributes: impl ::fidl_next::Encode<
19262 crate::wire::NodeAttributes,
19263 <___T as ::fidl_next::Transport>::SendBuffer,
19264 >,
19265 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
19266 where
19267 <___T as ::fidl_next::Transport>::SendBuffer:
19268 ::fidl_next::encoder::InternalHandleEncoder,
19269 {
19270 self.deprecated_set_attr_with(crate::generic::NodeDeprecatedSetAttrRequest {
19271 flags,
19272
19273 attributes,
19274 })
19275 }
19276
19277 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
19278 pub fn deprecated_set_attr_with<___R>(
19279 &self,
19280 request: ___R,
19281 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetAttr, ___T>
19282 where
19283 ___R: ::fidl_next::Encode<
19284 crate::wire::NodeDeprecatedSetAttrRequest,
19285 <___T as ::fidl_next::Transport>::SendBuffer,
19286 >,
19287 {
19288 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19289 4721673413776871238,
19290 <super::DeprecatedSetAttr as ::fidl_next::Method>::FLEXIBILITY,
19291 request,
19292 ))
19293 }
19294
19295 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
19296 pub fn deprecated_get_flags(
19297 &self,
19298 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedGetFlags, ___T> {
19299 ::fidl_next::TwoWayFuture::from_untyped(
19300 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
19301 6595803110182632097,
19302 <super::DeprecatedGetFlags as ::fidl_next::Method>::FLEXIBILITY,
19303 (),
19304 ),
19305 )
19306 }
19307
19308 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
19309 pub fn deprecated_set_flags(
19310 &self,
19311
19312 flags: impl ::fidl_next::Encode<
19313 crate::wire::OpenFlags,
19314 <___T as ::fidl_next::Transport>::SendBuffer,
19315 >,
19316 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
19317 where
19318 <___T as ::fidl_next::Transport>::SendBuffer:
19319 ::fidl_next::encoder::InternalHandleEncoder,
19320 {
19321 self.deprecated_set_flags_with(crate::generic::NodeDeprecatedSetFlagsRequest {
19322 flags,
19323 })
19324 }
19325
19326 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
19327 pub fn deprecated_set_flags_with<___R>(
19328 &self,
19329 request: ___R,
19330 ) -> ::fidl_next::TwoWayFuture<'_, super::DeprecatedSetFlags, ___T>
19331 where
19332 ___R: ::fidl_next::Encode<
19333 crate::wire::NodeDeprecatedSetFlagsRequest,
19334 <___T as ::fidl_next::Transport>::SendBuffer,
19335 >,
19336 {
19337 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19338 5950864159036794675,
19339 <super::DeprecatedSetFlags as ::fidl_next::Method>::FLEXIBILITY,
19340 request,
19341 ))
19342 }
19343
19344 #[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"]
19345 pub fn get_flags(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetFlags, ___T> {
19346 ::fidl_next::TwoWayFuture::from_untyped(
19347 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
19348 105530239381466147,
19349 <super::GetFlags as ::fidl_next::Method>::FLEXIBILITY,
19350 (),
19351 ),
19352 )
19353 }
19354
19355 #[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"]
19356 pub fn set_flags(
19357 &self,
19358
19359 flags: impl ::fidl_next::Encode<
19360 crate::wire::Flags,
19361 <___T as ::fidl_next::Transport>::SendBuffer,
19362 >,
19363 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
19364 where
19365 <___T as ::fidl_next::Transport>::SendBuffer:
19366 ::fidl_next::encoder::InternalHandleEncoder,
19367 {
19368 self.set_flags_with(crate::generic::NodeSetFlagsRequest { flags })
19369 }
19370
19371 #[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"]
19372 pub fn set_flags_with<___R>(
19373 &self,
19374 request: ___R,
19375 ) -> ::fidl_next::TwoWayFuture<'_, super::SetFlags, ___T>
19376 where
19377 ___R: ::fidl_next::Encode<
19378 crate::wire::NodeSetFlagsRequest,
19379 <___T as ::fidl_next::Transport>::SendBuffer,
19380 >,
19381 {
19382 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19383 6172186066099445416,
19384 <super::SetFlags as ::fidl_next::Method>::FLEXIBILITY,
19385 request,
19386 ))
19387 }
19388
19389 #[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"]
19390 pub fn query_filesystem(
19391 &self,
19392 ) -> ::fidl_next::TwoWayFuture<'_, super::QueryFilesystem, ___T> {
19393 ::fidl_next::TwoWayFuture::from_untyped(
19394 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
19395 8013111122914313744,
19396 <super::QueryFilesystem as ::fidl_next::Method>::FLEXIBILITY,
19397 (),
19398 ),
19399 )
19400 }
19401
19402 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
19403 pub fn get_token(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetToken, ___T> {
19404 ::fidl_next::TwoWayFuture::from_untyped(
19405 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
19406 5788516050773961964,
19407 <super::GetToken as ::fidl_next::Method>::FLEXIBILITY,
19408 (),
19409 ),
19410 )
19411 }
19412
19413 #[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"]
19414 pub fn get_attributes(
19415 &self,
19416
19417 query: impl ::fidl_next::Encode<
19418 crate::wire::NodeAttributesQuery,
19419 <___T as ::fidl_next::Transport>::SendBuffer,
19420 >,
19421 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
19422 where
19423 <___T as ::fidl_next::Transport>::SendBuffer:
19424 ::fidl_next::encoder::InternalHandleEncoder,
19425 {
19426 self.get_attributes_with(crate::generic::NodeGetAttributesRequest { query })
19427 }
19428
19429 #[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"]
19430 pub fn get_attributes_with<___R>(
19431 &self,
19432 request: ___R,
19433 ) -> ::fidl_next::TwoWayFuture<'_, super::GetAttributes, ___T>
19434 where
19435 ___R: ::fidl_next::Encode<
19436 crate::wire::NodeGetAttributesRequest,
19437 <___T as ::fidl_next::Transport>::SendBuffer,
19438 >,
19439 {
19440 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19441 4414537700416816443,
19442 <super::GetAttributes as ::fidl_next::Method>::FLEXIBILITY,
19443 request,
19444 ))
19445 }
19446
19447 #[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"]
19448 pub fn update_attributes_with<___R>(
19449 &self,
19450 request: ___R,
19451 ) -> ::fidl_next::TwoWayFuture<'_, super::UpdateAttributes, ___T>
19452 where
19453 ___R: ::fidl_next::Encode<
19454 crate::wire::MutableNodeAttributes<'static>,
19455 <___T as ::fidl_next::Transport>::SendBuffer,
19456 >,
19457 {
19458 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19459 3677402239314018056,
19460 <super::UpdateAttributes as ::fidl_next::Method>::FLEXIBILITY,
19461 request,
19462 ))
19463 }
19464
19465 #[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"]
19466 pub fn sync(&self) -> ::fidl_next::TwoWayFuture<'_, super::Sync, ___T> {
19467 ::fidl_next::TwoWayFuture::from_untyped(
19468 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
19469 3196473584242777161,
19470 <super::Sync as ::fidl_next::Method>::FLEXIBILITY,
19471 (),
19472 ),
19473 )
19474 }
19475
19476 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
19477 pub fn list_extended_attributes(
19478 &self,
19479
19480 iterator: impl ::fidl_next::Encode<
19481 ::fidl_next::ServerEnd<
19482 crate::ExtendedAttributeIterator,
19483 ::fidl_next::wire::fuchsia::Channel,
19484 >,
19485 <___T as ::fidl_next::Transport>::SendBuffer,
19486 >,
19487 ) -> ::fidl_next::SendFuture<'_, ___T>
19488 where
19489 <___T as ::fidl_next::Transport>::SendBuffer:
19490 ::fidl_next::encoder::InternalHandleEncoder,
19491 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
19492 {
19493 self.list_extended_attributes_with(
19494 crate::generic::NodeListExtendedAttributesRequest { iterator },
19495 )
19496 }
19497
19498 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
19499 pub fn list_extended_attributes_with<___R>(
19500 &self,
19501 request: ___R,
19502 ) -> ::fidl_next::SendFuture<'_, ___T>
19503 where
19504 ___R: ::fidl_next::Encode<
19505 crate::wire::NodeListExtendedAttributesRequest,
19506 <___T as ::fidl_next::Transport>::SendBuffer,
19507 >,
19508 {
19509 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
19510 5431626189872037072,
19511 <super::ListExtendedAttributes as ::fidl_next::Method>::FLEXIBILITY,
19512 request,
19513 ))
19514 }
19515
19516 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
19517 pub fn get_extended_attribute(
19518 &self,
19519
19520 name: impl ::fidl_next::Encode<
19521 ::fidl_next::wire::Vector<'static, u8>,
19522 <___T as ::fidl_next::Transport>::SendBuffer,
19523 >,
19524 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
19525 where
19526 <___T as ::fidl_next::Transport>::SendBuffer:
19527 ::fidl_next::encoder::InternalHandleEncoder,
19528 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
19529 {
19530 self.get_extended_attribute_with(crate::generic::NodeGetExtendedAttributeRequest {
19531 name,
19532 })
19533 }
19534
19535 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
19536 pub fn get_extended_attribute_with<___R>(
19537 &self,
19538 request: ___R,
19539 ) -> ::fidl_next::TwoWayFuture<'_, super::GetExtendedAttribute, ___T>
19540 where
19541 ___R: ::fidl_next::Encode<
19542 crate::wire::NodeGetExtendedAttributeRequest<'static>,
19543 <___T as ::fidl_next::Transport>::SendBuffer,
19544 >,
19545 {
19546 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19547 5043930208506967771,
19548 <super::GetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
19549 request,
19550 ))
19551 }
19552
19553 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
19554 pub fn set_extended_attribute(
19555 &self,
19556
19557 name: impl ::fidl_next::Encode<
19558 ::fidl_next::wire::Vector<'static, u8>,
19559 <___T as ::fidl_next::Transport>::SendBuffer,
19560 >,
19561
19562 value: impl ::fidl_next::Encode<
19563 crate::wire::ExtendedAttributeValue<'static>,
19564 <___T as ::fidl_next::Transport>::SendBuffer,
19565 >,
19566
19567 mode: impl ::fidl_next::Encode<
19568 crate::wire::SetExtendedAttributeMode,
19569 <___T as ::fidl_next::Transport>::SendBuffer,
19570 >,
19571 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
19572 where
19573 <___T as ::fidl_next::Transport>::SendBuffer:
19574 ::fidl_next::encoder::InternalHandleEncoder,
19575 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
19576 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
19577 {
19578 self.set_extended_attribute_with(crate::generic::NodeSetExtendedAttributeRequest {
19579 name,
19580
19581 value,
19582
19583 mode,
19584 })
19585 }
19586
19587 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
19588 pub fn set_extended_attribute_with<___R>(
19589 &self,
19590 request: ___R,
19591 ) -> ::fidl_next::TwoWayFuture<'_, super::SetExtendedAttribute, ___T>
19592 where
19593 ___R: ::fidl_next::Encode<
19594 crate::wire::NodeSetExtendedAttributeRequest<'static>,
19595 <___T as ::fidl_next::Transport>::SendBuffer,
19596 >,
19597 {
19598 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19599 5374223046099989052,
19600 <super::SetExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
19601 request,
19602 ))
19603 }
19604
19605 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
19606 pub fn remove_extended_attribute(
19607 &self,
19608
19609 name: impl ::fidl_next::Encode<
19610 ::fidl_next::wire::Vector<'static, u8>,
19611 <___T as ::fidl_next::Transport>::SendBuffer,
19612 >,
19613 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
19614 where
19615 <___T as ::fidl_next::Transport>::SendBuffer:
19616 ::fidl_next::encoder::InternalHandleEncoder,
19617 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
19618 {
19619 self.remove_extended_attribute_with(
19620 crate::generic::NodeRemoveExtendedAttributeRequest { name },
19621 )
19622 }
19623
19624 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
19625 pub fn remove_extended_attribute_with<___R>(
19626 &self,
19627 request: ___R,
19628 ) -> ::fidl_next::TwoWayFuture<'_, super::RemoveExtendedAttribute, ___T>
19629 where
19630 ___R: ::fidl_next::Encode<
19631 crate::wire::NodeRemoveExtendedAttributeRequest<'static>,
19632 <___T as ::fidl_next::Transport>::SendBuffer,
19633 >,
19634 {
19635 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
19636 8794297771444732717,
19637 <super::RemoveExtendedAttribute as ::fidl_next::Method>::FLEXIBILITY,
19638 request,
19639 ))
19640 }
19641
19642 #[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"]
19643 pub fn open(
19644 &self,
19645
19646 path: impl ::fidl_next::Encode<
19647 ::fidl_next::wire::String<'static>,
19648 <___T as ::fidl_next::Transport>::SendBuffer,
19649 >,
19650
19651 flags: impl ::fidl_next::Encode<
19652 crate::wire::Flags,
19653 <___T as ::fidl_next::Transport>::SendBuffer,
19654 >,
19655
19656 options: impl ::fidl_next::Encode<
19657 crate::wire::Options<'static>,
19658 <___T as ::fidl_next::Transport>::SendBuffer,
19659 >,
19660
19661 object: impl ::fidl_next::Encode<
19662 ::fidl_next::wire::fuchsia::Channel,
19663 <___T as ::fidl_next::Transport>::SendBuffer,
19664 >,
19665 ) -> ::fidl_next::SendFuture<'_, ___T>
19666 where
19667 <___T as ::fidl_next::Transport>::SendBuffer:
19668 ::fidl_next::encoder::InternalHandleEncoder,
19669 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
19670 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
19671 {
19672 self.open_with(crate::generic::OpenableOpenRequest { path, flags, options, object })
19673 }
19674
19675 #[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"]
19676 pub fn open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
19677 where
19678 ___R: ::fidl_next::Encode<
19679 crate::wire::OpenableOpenRequest<'static>,
19680 <___T as ::fidl_next::Transport>::SendBuffer,
19681 >,
19682 {
19683 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
19684 6236883748953765593,
19685 <super::Open as ::fidl_next::Method>::FLEXIBILITY,
19686 request,
19687 ))
19688 }
19689
19690 pub fn describe(&self) -> ::fidl_next::TwoWayFuture<'_, super::Describe, ___T> {
19691 ::fidl_next::TwoWayFuture::from_untyped(
19692 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
19693 8371117097481679347,
19694 <super::Describe as ::fidl_next::Method>::FLEXIBILITY,
19695 (),
19696 ),
19697 )
19698 }
19699 }
19700
19701 #[repr(transparent)]
19703 pub struct SymlinkServer<___T: ::fidl_next::Transport> {
19704 server: ::fidl_next::protocol::Server<___T>,
19705 }
19706
19707 impl<___T> SymlinkServer<___T>
19708 where
19709 ___T: ::fidl_next::Transport,
19710 {
19711 #[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"]
19712 pub fn on_open(
19713 &self,
19714
19715 s: impl ::fidl_next::Encode<
19716 ::fidl_next::wire::fuchsia::StatusResult,
19717 <___T as ::fidl_next::Transport>::SendBuffer,
19718 >,
19719
19720 info: impl ::fidl_next::Encode<
19721 crate::wire_optional::NodeInfoDeprecated<'static>,
19722 <___T as ::fidl_next::Transport>::SendBuffer,
19723 >,
19724 ) -> ::fidl_next::SendFuture<'_, ___T>
19725 where
19726 <___T as ::fidl_next::Transport>::SendBuffer:
19727 ::fidl_next::encoder::InternalHandleEncoder,
19728 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
19729 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
19730 {
19731 self.on_open_with(crate::generic::NodeOnOpenRequest { s, info })
19732 }
19733
19734 #[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"]
19735
19736 pub fn on_open_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
19737 where
19738 ___R: ::fidl_next::Encode<
19739 <super::OnOpen as ::fidl_next::Method>::Request,
19740 <___T as ::fidl_next::Transport>::SendBuffer,
19741 >,
19742 {
19743 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
19744 9207534335756671346,
19745 <super::OnOpen as ::fidl_next::Method>::FLEXIBILITY,
19746 request,
19747 ))
19748 }
19749
19750 #[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"]
19751
19752 pub fn on_representation_with<___R>(
19753 &self,
19754 request: ___R,
19755 ) -> ::fidl_next::SendFuture<'_, ___T>
19756 where
19757 ___R: ::fidl_next::Encode<
19758 <super::OnRepresentation as ::fidl_next::Method>::Request,
19759 <___T as ::fidl_next::Transport>::SendBuffer,
19760 >,
19761 {
19762 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
19763 6679970090861613324,
19764 <super::OnRepresentation as ::fidl_next::Method>::FLEXIBILITY,
19765 request,
19766 ))
19767 }
19768 }
19769 }
19770}
19771
19772#[diagnostic::on_unimplemented(
19773 note = "If {Self} implements the non-local SymlinkClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
19774)]
19775
19776pub trait SymlinkLocalClientHandler<
19780 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19781 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19782>
19783{
19784 #[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"]
19785 fn on_open(
19786 &mut self,
19787
19788 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
19789 ) -> impl ::core::future::Future<Output = ()>;
19790
19791 #[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"]
19792 fn on_representation(
19793 &mut self,
19794
19795 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
19796 ) -> impl ::core::future::Future<Output = ()>;
19797
19798 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
19799 ::core::future::ready(())
19800 }
19801}
19802
19803impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Symlink
19804where
19805 ___H: SymlinkLocalClientHandler<___T>,
19806 ___T: ::fidl_next::Transport,
19807 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
19808 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19809 Constraint = (),
19810 >,
19811 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
19812 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
19813 Constraint = (),
19814 >,
19815{
19816 async fn on_event(
19817 handler: &mut ___H,
19818 mut message: ::fidl_next::Message<___T>,
19819 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
19820 match *message.header().ordinal {
19821 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19822 Ok(decoded) => {
19823 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
19824 Ok(())
19825 }
19826 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19827 ordinal: 9207534335756671346,
19828 error,
19829 }),
19830 },
19831
19832 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
19833 Ok(decoded) => {
19834 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
19835 Ok(())
19836 }
19837 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
19838 ordinal: 6679970090861613324,
19839 error,
19840 }),
19841 },
19842
19843 ordinal => {
19844 handler.on_unknown_interaction(ordinal).await;
19845 if ::core::matches!(
19846 message.header().flexibility(),
19847 ::fidl_next::protocol::Flexibility::Strict
19848 ) {
19849 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
19850 } else {
19851 Ok(())
19852 }
19853 }
19854 }
19855 }
19856}
19857
19858#[diagnostic::on_unimplemented(
19859 note = "If {Self} implements the non-local SymlinkServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
19860)]
19861
19862pub trait SymlinkLocalServerHandler<
19866 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
19867 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
19868>
19869{
19870 #[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"]
19871 fn link_into(
19872 &mut self,
19873
19874 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
19875
19876 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
19877 ) -> impl ::core::future::Future<Output = ()>;
19878
19879 fn clone(
19880 &mut self,
19881
19882 request: ::fidl_next::Request<symlink::Clone, ___T>,
19883 ) -> impl ::core::future::Future<Output = ()>;
19884
19885 #[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"]
19886 fn close(
19887 &mut self,
19888
19889 responder: ::fidl_next::Responder<symlink::Close, ___T>,
19890 ) -> impl ::core::future::Future<Output = ()>;
19891
19892 fn query(
19893 &mut self,
19894
19895 responder: ::fidl_next::Responder<symlink::Query, ___T>,
19896 ) -> impl ::core::future::Future<Output = ()>;
19897
19898 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
19899 fn deprecated_clone(
19900 &mut self,
19901
19902 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
19903 ) -> impl ::core::future::Future<Output = ()>;
19904
19905 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
19906 fn deprecated_get_attr(
19907 &mut self,
19908
19909 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
19910 ) -> impl ::core::future::Future<Output = ()>;
19911
19912 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
19913 fn deprecated_set_attr(
19914 &mut self,
19915
19916 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
19917
19918 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
19919 ) -> impl ::core::future::Future<Output = ()>;
19920
19921 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
19922 fn deprecated_get_flags(
19923 &mut self,
19924
19925 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
19926 ) -> impl ::core::future::Future<Output = ()>;
19927
19928 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
19929 fn deprecated_set_flags(
19930 &mut self,
19931
19932 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
19933
19934 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
19935 ) -> impl ::core::future::Future<Output = ()>;
19936
19937 #[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"]
19938 fn get_flags(
19939 &mut self,
19940
19941 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
19942 ) -> impl ::core::future::Future<Output = ()>;
19943
19944 #[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"]
19945 fn set_flags(
19946 &mut self,
19947
19948 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
19949
19950 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
19951 ) -> impl ::core::future::Future<Output = ()>;
19952
19953 #[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"]
19954 fn query_filesystem(
19955 &mut self,
19956
19957 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
19958 ) -> impl ::core::future::Future<Output = ()>;
19959
19960 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
19961 fn get_token(
19962 &mut self,
19963
19964 responder: ::fidl_next::Responder<symlink::GetToken, ___T>,
19965 ) -> impl ::core::future::Future<Output = ()>;
19966
19967 #[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"]
19968 fn get_attributes(
19969 &mut self,
19970
19971 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
19972
19973 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
19974 ) -> impl ::core::future::Future<Output = ()>;
19975
19976 #[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"]
19977 fn update_attributes(
19978 &mut self,
19979
19980 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
19981
19982 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
19983 ) -> impl ::core::future::Future<Output = ()>;
19984
19985 #[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"]
19986 fn sync(
19987 &mut self,
19988
19989 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
19990 ) -> impl ::core::future::Future<Output = ()>;
19991
19992 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
19993 fn list_extended_attributes(
19994 &mut self,
19995
19996 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
19997 ) -> impl ::core::future::Future<Output = ()>;
19998
19999 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
20000 fn get_extended_attribute(
20001 &mut self,
20002
20003 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
20004
20005 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
20006 ) -> impl ::core::future::Future<Output = ()>;
20007
20008 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
20009 fn set_extended_attribute(
20010 &mut self,
20011
20012 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
20013
20014 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
20015 ) -> impl ::core::future::Future<Output = ()>;
20016
20017 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
20018 fn remove_extended_attribute(
20019 &mut self,
20020
20021 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
20022
20023 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
20024 ) -> impl ::core::future::Future<Output = ()>;
20025
20026 #[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"]
20027 fn open(
20028 &mut self,
20029
20030 request: ::fidl_next::Request<symlink::Open, ___T>,
20031 ) -> impl ::core::future::Future<Output = ()>;
20032
20033 fn describe(
20034 &mut self,
20035
20036 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
20037 ) -> impl ::core::future::Future<Output = ()>;
20038
20039 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
20040 ::core::future::ready(())
20041 }
20042}
20043
20044impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Symlink
20045where
20046 ___H: SymlinkLocalServerHandler<___T>,
20047 ___T: ::fidl_next::Transport,
20048 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
20049 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20050 Constraint = (),
20051 >,
20052 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
20053 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20054 Constraint = (),
20055 >,
20056 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
20057 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20058 Constraint = (),
20059 >,
20060 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
20061 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20062 Constraint = (),
20063 >,
20064 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
20065 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20066 Constraint = (),
20067 >,
20068 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
20069 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20070 Constraint = (),
20071 >,
20072 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
20073 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20074 Constraint = (),
20075 >,
20076 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
20077 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20078 Constraint = (),
20079 >,
20080 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
20081 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20082 Constraint = (),
20083 >,
20084 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
20085 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20086 Constraint = (),
20087 >,
20088 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
20089 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20090 Constraint = (),
20091 >,
20092 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
20093 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20094 Constraint = (),
20095 >,
20096 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
20097 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20098 Constraint = (),
20099 >,
20100{
20101 async fn on_one_way(
20102 handler: &mut ___H,
20103 mut message: ::fidl_next::Message<___T>,
20104 ) -> ::core::result::Result<
20105 (),
20106 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20107 > {
20108 match *message.header().ordinal {
20109 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
20110 Ok(decoded) => {
20111 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
20112 Ok(())
20113 }
20114 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20115 ordinal: 2366825959783828089,
20116 error,
20117 }),
20118 },
20119
20120 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
20121 Ok(decoded) => {
20122 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
20123 Ok(())
20124 }
20125 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20126 ordinal: 6512600400724287855,
20127 error,
20128 }),
20129 },
20130
20131 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
20132 Ok(decoded) => {
20133 handler
20134 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
20135 .await;
20136 Ok(())
20137 }
20138 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20139 ordinal: 5431626189872037072,
20140 error,
20141 }),
20142 },
20143
20144 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
20145 Ok(decoded) => {
20146 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
20147 Ok(())
20148 }
20149 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20150 ordinal: 6236883748953765593,
20151 error,
20152 }),
20153 },
20154
20155 ordinal => {
20156 handler.on_unknown_interaction(ordinal).await;
20157 if ::core::matches!(
20158 message.header().flexibility(),
20159 ::fidl_next::protocol::Flexibility::Strict
20160 ) {
20161 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
20162 } else {
20163 Ok(())
20164 }
20165 }
20166 }
20167 }
20168
20169 async fn on_two_way(
20170 handler: &mut ___H,
20171 mut message: ::fidl_next::Message<___T>,
20172 responder: ::fidl_next::protocol::Responder<___T>,
20173 ) -> ::core::result::Result<
20174 (),
20175 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20176 > {
20177 match *message.header().ordinal {
20178 6121399674497678964 => {
20179 let responder = ::fidl_next::Responder::from_untyped(responder);
20180
20181 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20182 Ok(decoded) => {
20183 handler
20184 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
20185 .await;
20186 Ok(())
20187 }
20188 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20189 ordinal: 6121399674497678964,
20190 error,
20191 }),
20192 }
20193 }
20194
20195 6540867515453498750 => {
20196 let responder = ::fidl_next::Responder::from_untyped(responder);
20197
20198 handler.close(responder).await;
20199 Ok(())
20200 }
20201
20202 2763219980499352582 => {
20203 let responder = ::fidl_next::Responder::from_untyped(responder);
20204
20205 handler.query(responder).await;
20206 Ok(())
20207 }
20208
20209 8689798978500614909 => {
20210 let responder = ::fidl_next::Responder::from_untyped(responder);
20211
20212 handler.deprecated_get_attr(responder).await;
20213 Ok(())
20214 }
20215
20216 4721673413776871238 => {
20217 let responder = ::fidl_next::Responder::from_untyped(responder);
20218
20219 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20220 Ok(decoded) => {
20221 handler
20222 .deprecated_set_attr(
20223 ::fidl_next::Request::from_decoded(decoded),
20224 responder,
20225 )
20226 .await;
20227 Ok(())
20228 }
20229 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20230 ordinal: 4721673413776871238,
20231 error,
20232 }),
20233 }
20234 }
20235
20236 6595803110182632097 => {
20237 let responder = ::fidl_next::Responder::from_untyped(responder);
20238
20239 handler.deprecated_get_flags(responder).await;
20240 Ok(())
20241 }
20242
20243 5950864159036794675 => {
20244 let responder = ::fidl_next::Responder::from_untyped(responder);
20245
20246 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20247 Ok(decoded) => {
20248 handler
20249 .deprecated_set_flags(
20250 ::fidl_next::Request::from_decoded(decoded),
20251 responder,
20252 )
20253 .await;
20254 Ok(())
20255 }
20256 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20257 ordinal: 5950864159036794675,
20258 error,
20259 }),
20260 }
20261 }
20262
20263 105530239381466147 => {
20264 let responder = ::fidl_next::Responder::from_untyped(responder);
20265
20266 handler.get_flags(responder).await;
20267 Ok(())
20268 }
20269
20270 6172186066099445416 => {
20271 let responder = ::fidl_next::Responder::from_untyped(responder);
20272
20273 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20274 Ok(decoded) => {
20275 handler
20276 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
20277 .await;
20278 Ok(())
20279 }
20280 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20281 ordinal: 6172186066099445416,
20282 error,
20283 }),
20284 }
20285 }
20286
20287 8013111122914313744 => {
20288 let responder = ::fidl_next::Responder::from_untyped(responder);
20289
20290 handler.query_filesystem(responder).await;
20291 Ok(())
20292 }
20293
20294 5788516050773961964 => {
20295 let responder = ::fidl_next::Responder::from_untyped(responder);
20296
20297 handler.get_token(responder).await;
20298 Ok(())
20299 }
20300
20301 4414537700416816443 => {
20302 let responder = ::fidl_next::Responder::from_untyped(responder);
20303
20304 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20305 Ok(decoded) => {
20306 handler
20307 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
20308 .await;
20309 Ok(())
20310 }
20311 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20312 ordinal: 4414537700416816443,
20313 error,
20314 }),
20315 }
20316 }
20317
20318 3677402239314018056 => {
20319 let responder = ::fidl_next::Responder::from_untyped(responder);
20320
20321 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20322 Ok(decoded) => {
20323 handler
20324 .update_attributes(
20325 ::fidl_next::Request::from_decoded(decoded),
20326 responder,
20327 )
20328 .await;
20329 Ok(())
20330 }
20331 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20332 ordinal: 3677402239314018056,
20333 error,
20334 }),
20335 }
20336 }
20337
20338 3196473584242777161 => {
20339 let responder = ::fidl_next::Responder::from_untyped(responder);
20340
20341 handler.sync(responder).await;
20342 Ok(())
20343 }
20344
20345 5043930208506967771 => {
20346 let responder = ::fidl_next::Responder::from_untyped(responder);
20347
20348 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20349 Ok(decoded) => {
20350 handler
20351 .get_extended_attribute(
20352 ::fidl_next::Request::from_decoded(decoded),
20353 responder,
20354 )
20355 .await;
20356 Ok(())
20357 }
20358 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20359 ordinal: 5043930208506967771,
20360 error,
20361 }),
20362 }
20363 }
20364
20365 5374223046099989052 => {
20366 let responder = ::fidl_next::Responder::from_untyped(responder);
20367
20368 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20369 Ok(decoded) => {
20370 handler
20371 .set_extended_attribute(
20372 ::fidl_next::Request::from_decoded(decoded),
20373 responder,
20374 )
20375 .await;
20376 Ok(())
20377 }
20378 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20379 ordinal: 5374223046099989052,
20380 error,
20381 }),
20382 }
20383 }
20384
20385 8794297771444732717 => {
20386 let responder = ::fidl_next::Responder::from_untyped(responder);
20387
20388 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20389 Ok(decoded) => {
20390 handler
20391 .remove_extended_attribute(
20392 ::fidl_next::Request::from_decoded(decoded),
20393 responder,
20394 )
20395 .await;
20396 Ok(())
20397 }
20398 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20399 ordinal: 8794297771444732717,
20400 error,
20401 }),
20402 }
20403 }
20404
20405 8371117097481679347 => {
20406 let responder = ::fidl_next::Responder::from_untyped(responder);
20407
20408 handler.describe(responder).await;
20409 Ok(())
20410 }
20411
20412 ordinal => {
20413 handler.on_unknown_interaction(ordinal).await;
20414 if ::core::matches!(
20415 message.header().flexibility(),
20416 ::fidl_next::protocol::Flexibility::Strict
20417 ) {
20418 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
20419 } else {
20420 responder
20421 .respond_framework_error(
20422 ordinal,
20423 ::fidl_next::FrameworkError::UnknownMethod,
20424 )
20425 .expect("encoding a framework error should never fail")
20426 .await?;
20427 Ok(())
20428 }
20429 }
20430 }
20431 }
20432}
20433
20434pub trait SymlinkClientHandler<
20438 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20439 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20440>
20441{
20442 #[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"]
20443 fn on_open(
20444 &mut self,
20445
20446 request: ::fidl_next::Request<symlink::OnOpen, ___T>,
20447 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20448
20449 #[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"]
20450 fn on_representation(
20451 &mut self,
20452
20453 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
20454 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20455
20456 fn on_unknown_interaction(
20457 &mut self,
20458 ordinal: u64,
20459 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
20460 ::core::future::ready(())
20461 }
20462}
20463
20464impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Symlink
20465where
20466 ___H: SymlinkClientHandler<___T> + ::core::marker::Send,
20467 ___T: ::fidl_next::Transport,
20468 for<'de> crate::wire::NodeOnOpenRequest<'de>: ::fidl_next::Decode<
20469 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20470 Constraint = (),
20471 >,
20472 for<'de> crate::wire::Representation<'de>: ::fidl_next::Decode<
20473 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20474 Constraint = (),
20475 >,
20476{
20477 async fn on_event(
20478 handler: &mut ___H,
20479 mut message: ::fidl_next::Message<___T>,
20480 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
20481 match *message.header().ordinal {
20482 9207534335756671346 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
20483 Ok(decoded) => {
20484 handler.on_open(::fidl_next::Request::from_decoded(decoded)).await;
20485 Ok(())
20486 }
20487 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20488 ordinal: 9207534335756671346,
20489 error,
20490 }),
20491 },
20492
20493 6679970090861613324 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
20494 Ok(decoded) => {
20495 handler.on_representation(::fidl_next::Request::from_decoded(decoded)).await;
20496 Ok(())
20497 }
20498 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20499 ordinal: 6679970090861613324,
20500 error,
20501 }),
20502 },
20503
20504 ordinal => {
20505 handler.on_unknown_interaction(ordinal).await;
20506 if ::core::matches!(
20507 message.header().flexibility(),
20508 ::fidl_next::protocol::Flexibility::Strict
20509 ) {
20510 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
20511 } else {
20512 Ok(())
20513 }
20514 }
20515 }
20516 }
20517}
20518
20519pub trait SymlinkServerHandler<
20523 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
20524 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
20525>
20526{
20527 #[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"]
20528 fn link_into(
20529 &mut self,
20530
20531 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
20532
20533 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
20534 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20535
20536 fn clone(
20537 &mut self,
20538
20539 request: ::fidl_next::Request<symlink::Clone, ___T>,
20540 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20541
20542 #[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"]
20543 fn close(
20544 &mut self,
20545
20546 responder: ::fidl_next::Responder<symlink::Close, ___T>,
20547 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20548
20549 fn query(
20550 &mut self,
20551
20552 responder: ::fidl_next::Responder<symlink::Query, ___T>,
20553 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20554
20555 #[doc = " DEPRECATED - Use `fuchsia.unknown/Cloneable.Clone` instead.\n"]
20556 fn deprecated_clone(
20557 &mut self,
20558
20559 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
20560 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20561
20562 #[doc = " DEPRECATED - Use `Node.GetAttributes` instead.\n\n This method requires the [`Rights.GET_ATTRIBUTES`] right.\n"]
20563 fn deprecated_get_attr(
20564 &mut self,
20565
20566 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
20567 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20568
20569 #[doc = " DEPRECATED - Use `Node.UpdateAttributes` instead.\n"]
20570 fn deprecated_set_attr(
20571 &mut self,
20572
20573 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
20574
20575 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
20576 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20577
20578 #[doc = " [DEPRECATED - Use new GetFlags method instead.]\n"]
20579 fn deprecated_get_flags(
20580 &mut self,
20581
20582 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
20583 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20584
20585 #[doc = " [DEPRECATED - Use new SetFlags method instead.]\n"]
20586 fn deprecated_set_flags(
20587 &mut self,
20588
20589 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
20590
20591 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
20592 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20593
20594 #[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"]
20595 fn get_flags(
20596 &mut self,
20597
20598 responder: ::fidl_next::Responder<symlink::GetFlags, ___T>,
20599 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20600
20601 #[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"]
20602 fn set_flags(
20603 &mut self,
20604
20605 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
20606
20607 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
20608 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20609
20610 #[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"]
20611 fn query_filesystem(
20612 &mut self,
20613
20614 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
20615 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20616
20617 #[doc = " Acquires a token which can be used to identify this connection at a later point in\n time. The token will remain valid for as long as the connection requesting the token\n remains open.\n\n This method does not require any rights. Note that the token identifies\n the connection, hence carries the rights information on this connection.\n"]
20618 fn get_token(
20619 &mut self,
20620
20621 responder: ::fidl_next::Responder<symlink::GetToken, ___T>,
20622 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20623
20624 #[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"]
20625 fn get_attributes(
20626 &mut self,
20627
20628 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
20629
20630 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
20631 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20632
20633 #[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"]
20634 fn update_attributes(
20635 &mut self,
20636
20637 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
20638
20639 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
20640 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20641
20642 #[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"]
20643 fn sync(
20644 &mut self,
20645
20646 responder: ::fidl_next::Responder<symlink::Sync, ___T>,
20647 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20648
20649 #[doc = " Creates an iterator over all the extended attribute names associated\n with this node. If an error occurs it is returned as an epitaph on the\n iterator request channel, and then the channel is closed.\n\n GetExtendedAttributes can be used with any of these names to retrieve\n the associated value.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
20650 fn list_extended_attributes(
20651 &mut self,
20652
20653 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
20654 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20655
20656 #[doc = " Get the value associated with the given attribute `name` for this node.\n\n Attribute names have a maximum length of MAX_ATTRIBUTE_NAME. No\n particular structure is imposed on them.\n\n This method requires the [`Rights.READ_BYTES`] right.\n"]
20657 fn get_extended_attribute(
20658 &mut self,
20659
20660 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
20661
20662 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
20663 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20664
20665 #[doc = " Set the value for the given attribute `name` to `value` for this node.\n\n The attribute name may exist, in which case the attribute is updated.\n If the attribute doesn\'t exist, it is created. The name should have no\n null bytes in it. If it does, ZX_ERR_INVALID_ARGS is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
20666 fn set_extended_attribute(
20667 &mut self,
20668
20669 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
20670
20671 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
20672 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20673
20674 #[doc = " Remove the specified extended attribute.\n\n If the attribute doesn\'t exist, ZX_ERR_NOT_FOUND is returned.\n\n This method requires the [`Rights.WRITE_BYTES`] right.\n"]
20675 fn remove_extended_attribute(
20676 &mut self,
20677
20678 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
20679
20680 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
20681 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20682
20683 #[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"]
20684 fn open(
20685 &mut self,
20686
20687 request: ::fidl_next::Request<symlink::Open, ___T>,
20688 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20689
20690 fn describe(
20691 &mut self,
20692
20693 responder: ::fidl_next::Responder<symlink::Describe, ___T>,
20694 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
20695
20696 fn on_unknown_interaction(
20697 &mut self,
20698 ordinal: u64,
20699 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
20700 ::core::future::ready(())
20701 }
20702}
20703
20704impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Symlink
20705where
20706 ___H: SymlinkServerHandler<___T> + ::core::marker::Send,
20707 ___T: ::fidl_next::Transport,
20708 for<'de> crate::wire::LinkableLinkIntoRequest<'de>: ::fidl_next::Decode<
20709 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20710 Constraint = (),
20711 >,
20712 for<'de> ::fidl_next_fuchsia_unknown::wire::CloneableCloneRequest: ::fidl_next::Decode<
20713 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20714 Constraint = (),
20715 >,
20716 for<'de> crate::wire::NodeDeprecatedCloneRequest: ::fidl_next::Decode<
20717 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20718 Constraint = (),
20719 >,
20720 for<'de> crate::wire::NodeDeprecatedSetAttrRequest: ::fidl_next::Decode<
20721 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20722 Constraint = (),
20723 >,
20724 for<'de> crate::wire::NodeDeprecatedSetFlagsRequest: ::fidl_next::Decode<
20725 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20726 Constraint = (),
20727 >,
20728 for<'de> crate::wire::NodeSetFlagsRequest: ::fidl_next::Decode<
20729 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20730 Constraint = (),
20731 >,
20732 for<'de> crate::wire::NodeGetAttributesRequest: ::fidl_next::Decode<
20733 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20734 Constraint = (),
20735 >,
20736 for<'de> crate::wire::MutableNodeAttributes<'de>: ::fidl_next::Decode<
20737 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20738 Constraint = (),
20739 >,
20740 for<'de> crate::wire::NodeListExtendedAttributesRequest: ::fidl_next::Decode<
20741 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20742 Constraint = (),
20743 >,
20744 for<'de> crate::wire::NodeGetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
20745 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20746 Constraint = (),
20747 >,
20748 for<'de> crate::wire::NodeSetExtendedAttributeRequest<'de>: ::fidl_next::Decode<
20749 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20750 Constraint = (),
20751 >,
20752 for<'de> crate::wire::NodeRemoveExtendedAttributeRequest<'de>: ::fidl_next::Decode<
20753 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20754 Constraint = (),
20755 >,
20756 for<'de> crate::wire::OpenableOpenRequest<'de>: ::fidl_next::Decode<
20757 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
20758 Constraint = (),
20759 >,
20760{
20761 async fn on_one_way(
20762 handler: &mut ___H,
20763 mut message: ::fidl_next::Message<___T>,
20764 ) -> ::core::result::Result<
20765 (),
20766 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20767 > {
20768 match *message.header().ordinal {
20769 2366825959783828089 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
20770 Ok(decoded) => {
20771 handler.clone(::fidl_next::Request::from_decoded(decoded)).await;
20772 Ok(())
20773 }
20774 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20775 ordinal: 2366825959783828089,
20776 error,
20777 }),
20778 },
20779
20780 6512600400724287855 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
20781 Ok(decoded) => {
20782 handler.deprecated_clone(::fidl_next::Request::from_decoded(decoded)).await;
20783 Ok(())
20784 }
20785 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20786 ordinal: 6512600400724287855,
20787 error,
20788 }),
20789 },
20790
20791 5431626189872037072 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
20792 Ok(decoded) => {
20793 handler
20794 .list_extended_attributes(::fidl_next::Request::from_decoded(decoded))
20795 .await;
20796 Ok(())
20797 }
20798 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20799 ordinal: 5431626189872037072,
20800 error,
20801 }),
20802 },
20803
20804 6236883748953765593 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
20805 Ok(decoded) => {
20806 handler.open(::fidl_next::Request::from_decoded(decoded)).await;
20807 Ok(())
20808 }
20809 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20810 ordinal: 6236883748953765593,
20811 error,
20812 }),
20813 },
20814
20815 ordinal => {
20816 handler.on_unknown_interaction(ordinal).await;
20817 if ::core::matches!(
20818 message.header().flexibility(),
20819 ::fidl_next::protocol::Flexibility::Strict
20820 ) {
20821 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
20822 } else {
20823 Ok(())
20824 }
20825 }
20826 }
20827 }
20828
20829 async fn on_two_way(
20830 handler: &mut ___H,
20831 mut message: ::fidl_next::Message<___T>,
20832 responder: ::fidl_next::protocol::Responder<___T>,
20833 ) -> ::core::result::Result<
20834 (),
20835 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
20836 > {
20837 match *message.header().ordinal {
20838 6121399674497678964 => {
20839 let responder = ::fidl_next::Responder::from_untyped(responder);
20840
20841 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20842 Ok(decoded) => {
20843 handler
20844 .link_into(::fidl_next::Request::from_decoded(decoded), responder)
20845 .await;
20846 Ok(())
20847 }
20848 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20849 ordinal: 6121399674497678964,
20850 error,
20851 }),
20852 }
20853 }
20854
20855 6540867515453498750 => {
20856 let responder = ::fidl_next::Responder::from_untyped(responder);
20857
20858 handler.close(responder).await;
20859 Ok(())
20860 }
20861
20862 2763219980499352582 => {
20863 let responder = ::fidl_next::Responder::from_untyped(responder);
20864
20865 handler.query(responder).await;
20866 Ok(())
20867 }
20868
20869 8689798978500614909 => {
20870 let responder = ::fidl_next::Responder::from_untyped(responder);
20871
20872 handler.deprecated_get_attr(responder).await;
20873 Ok(())
20874 }
20875
20876 4721673413776871238 => {
20877 let responder = ::fidl_next::Responder::from_untyped(responder);
20878
20879 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20880 Ok(decoded) => {
20881 handler
20882 .deprecated_set_attr(
20883 ::fidl_next::Request::from_decoded(decoded),
20884 responder,
20885 )
20886 .await;
20887 Ok(())
20888 }
20889 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20890 ordinal: 4721673413776871238,
20891 error,
20892 }),
20893 }
20894 }
20895
20896 6595803110182632097 => {
20897 let responder = ::fidl_next::Responder::from_untyped(responder);
20898
20899 handler.deprecated_get_flags(responder).await;
20900 Ok(())
20901 }
20902
20903 5950864159036794675 => {
20904 let responder = ::fidl_next::Responder::from_untyped(responder);
20905
20906 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20907 Ok(decoded) => {
20908 handler
20909 .deprecated_set_flags(
20910 ::fidl_next::Request::from_decoded(decoded),
20911 responder,
20912 )
20913 .await;
20914 Ok(())
20915 }
20916 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20917 ordinal: 5950864159036794675,
20918 error,
20919 }),
20920 }
20921 }
20922
20923 105530239381466147 => {
20924 let responder = ::fidl_next::Responder::from_untyped(responder);
20925
20926 handler.get_flags(responder).await;
20927 Ok(())
20928 }
20929
20930 6172186066099445416 => {
20931 let responder = ::fidl_next::Responder::from_untyped(responder);
20932
20933 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20934 Ok(decoded) => {
20935 handler
20936 .set_flags(::fidl_next::Request::from_decoded(decoded), responder)
20937 .await;
20938 Ok(())
20939 }
20940 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20941 ordinal: 6172186066099445416,
20942 error,
20943 }),
20944 }
20945 }
20946
20947 8013111122914313744 => {
20948 let responder = ::fidl_next::Responder::from_untyped(responder);
20949
20950 handler.query_filesystem(responder).await;
20951 Ok(())
20952 }
20953
20954 5788516050773961964 => {
20955 let responder = ::fidl_next::Responder::from_untyped(responder);
20956
20957 handler.get_token(responder).await;
20958 Ok(())
20959 }
20960
20961 4414537700416816443 => {
20962 let responder = ::fidl_next::Responder::from_untyped(responder);
20963
20964 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20965 Ok(decoded) => {
20966 handler
20967 .get_attributes(::fidl_next::Request::from_decoded(decoded), responder)
20968 .await;
20969 Ok(())
20970 }
20971 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20972 ordinal: 4414537700416816443,
20973 error,
20974 }),
20975 }
20976 }
20977
20978 3677402239314018056 => {
20979 let responder = ::fidl_next::Responder::from_untyped(responder);
20980
20981 match ::fidl_next::AsDecoderExt::into_decoded(message) {
20982 Ok(decoded) => {
20983 handler
20984 .update_attributes(
20985 ::fidl_next::Request::from_decoded(decoded),
20986 responder,
20987 )
20988 .await;
20989 Ok(())
20990 }
20991 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
20992 ordinal: 3677402239314018056,
20993 error,
20994 }),
20995 }
20996 }
20997
20998 3196473584242777161 => {
20999 let responder = ::fidl_next::Responder::from_untyped(responder);
21000
21001 handler.sync(responder).await;
21002 Ok(())
21003 }
21004
21005 5043930208506967771 => {
21006 let responder = ::fidl_next::Responder::from_untyped(responder);
21007
21008 match ::fidl_next::AsDecoderExt::into_decoded(message) {
21009 Ok(decoded) => {
21010 handler
21011 .get_extended_attribute(
21012 ::fidl_next::Request::from_decoded(decoded),
21013 responder,
21014 )
21015 .await;
21016 Ok(())
21017 }
21018 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
21019 ordinal: 5043930208506967771,
21020 error,
21021 }),
21022 }
21023 }
21024
21025 5374223046099989052 => {
21026 let responder = ::fidl_next::Responder::from_untyped(responder);
21027
21028 match ::fidl_next::AsDecoderExt::into_decoded(message) {
21029 Ok(decoded) => {
21030 handler
21031 .set_extended_attribute(
21032 ::fidl_next::Request::from_decoded(decoded),
21033 responder,
21034 )
21035 .await;
21036 Ok(())
21037 }
21038 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
21039 ordinal: 5374223046099989052,
21040 error,
21041 }),
21042 }
21043 }
21044
21045 8794297771444732717 => {
21046 let responder = ::fidl_next::Responder::from_untyped(responder);
21047
21048 match ::fidl_next::AsDecoderExt::into_decoded(message) {
21049 Ok(decoded) => {
21050 handler
21051 .remove_extended_attribute(
21052 ::fidl_next::Request::from_decoded(decoded),
21053 responder,
21054 )
21055 .await;
21056 Ok(())
21057 }
21058 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
21059 ordinal: 8794297771444732717,
21060 error,
21061 }),
21062 }
21063 }
21064
21065 8371117097481679347 => {
21066 let responder = ::fidl_next::Responder::from_untyped(responder);
21067
21068 handler.describe(responder).await;
21069 Ok(())
21070 }
21071
21072 ordinal => {
21073 handler.on_unknown_interaction(ordinal).await;
21074 if ::core::matches!(
21075 message.header().flexibility(),
21076 ::fidl_next::protocol::Flexibility::Strict
21077 ) {
21078 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
21079 } else {
21080 responder
21081 .respond_framework_error(
21082 ordinal,
21083 ::fidl_next::FrameworkError::UnknownMethod,
21084 )
21085 .expect("encoding a framework error should never fail")
21086 .await?;
21087 Ok(())
21088 }
21089 }
21090 }
21091 }
21092}
21093
21094impl<___T> SymlinkClientHandler<___T> for ::fidl_next::IgnoreEvents
21095where
21096 ___T: ::fidl_next::Transport,
21097{
21098 async fn on_open(&mut self, _: ::fidl_next::Request<symlink::OnOpen, ___T>) {}
21099
21100 async fn on_representation(
21101 &mut self,
21102
21103 _: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
21104 ) {
21105 }
21106
21107 async fn on_unknown_interaction(&mut self, _: u64) {}
21108}
21109
21110impl<___H, ___T> SymlinkLocalClientHandler<___T> for ::fidl_next::Local<___H>
21111where
21112 ___H: SymlinkClientHandler<___T>,
21113 ___T: ::fidl_next::Transport,
21114{
21115 async fn on_open(&mut self, request: ::fidl_next::Request<symlink::OnOpen, ___T>) {
21116 ___H::on_open(&mut self.0, request).await
21117 }
21118
21119 async fn on_representation(
21120 &mut self,
21121
21122 request: ::fidl_next::Request<symlink::OnRepresentation, ___T>,
21123 ) {
21124 ___H::on_representation(&mut self.0, request).await
21125 }
21126
21127 async fn on_unknown_interaction(&mut self, ordinal: u64) {
21128 ___H::on_unknown_interaction(&mut self.0, ordinal).await
21129 }
21130}
21131
21132impl<___H, ___T> SymlinkLocalServerHandler<___T> for ::fidl_next::Local<___H>
21133where
21134 ___H: SymlinkServerHandler<___T>,
21135 ___T: ::fidl_next::Transport,
21136{
21137 async fn link_into(
21138 &mut self,
21139
21140 request: ::fidl_next::Request<symlink::LinkInto, ___T>,
21141
21142 responder: ::fidl_next::Responder<symlink::LinkInto, ___T>,
21143 ) {
21144 ___H::link_into(&mut self.0, request, responder).await
21145 }
21146
21147 async fn clone(&mut self, request: ::fidl_next::Request<symlink::Clone, ___T>) {
21148 ___H::clone(&mut self.0, request).await
21149 }
21150
21151 async fn close(&mut self, responder: ::fidl_next::Responder<symlink::Close, ___T>) {
21152 ___H::close(&mut self.0, responder).await
21153 }
21154
21155 async fn query(&mut self, responder: ::fidl_next::Responder<symlink::Query, ___T>) {
21156 ___H::query(&mut self.0, responder).await
21157 }
21158
21159 async fn deprecated_clone(
21160 &mut self,
21161
21162 request: ::fidl_next::Request<symlink::DeprecatedClone, ___T>,
21163 ) {
21164 ___H::deprecated_clone(&mut self.0, request).await
21165 }
21166
21167 async fn deprecated_get_attr(
21168 &mut self,
21169
21170 responder: ::fidl_next::Responder<symlink::DeprecatedGetAttr, ___T>,
21171 ) {
21172 ___H::deprecated_get_attr(&mut self.0, responder).await
21173 }
21174
21175 async fn deprecated_set_attr(
21176 &mut self,
21177
21178 request: ::fidl_next::Request<symlink::DeprecatedSetAttr, ___T>,
21179
21180 responder: ::fidl_next::Responder<symlink::DeprecatedSetAttr, ___T>,
21181 ) {
21182 ___H::deprecated_set_attr(&mut self.0, request, responder).await
21183 }
21184
21185 async fn deprecated_get_flags(
21186 &mut self,
21187
21188 responder: ::fidl_next::Responder<symlink::DeprecatedGetFlags, ___T>,
21189 ) {
21190 ___H::deprecated_get_flags(&mut self.0, responder).await
21191 }
21192
21193 async fn deprecated_set_flags(
21194 &mut self,
21195
21196 request: ::fidl_next::Request<symlink::DeprecatedSetFlags, ___T>,
21197
21198 responder: ::fidl_next::Responder<symlink::DeprecatedSetFlags, ___T>,
21199 ) {
21200 ___H::deprecated_set_flags(&mut self.0, request, responder).await
21201 }
21202
21203 async fn get_flags(&mut self, responder: ::fidl_next::Responder<symlink::GetFlags, ___T>) {
21204 ___H::get_flags(&mut self.0, responder).await
21205 }
21206
21207 async fn set_flags(
21208 &mut self,
21209
21210 request: ::fidl_next::Request<symlink::SetFlags, ___T>,
21211
21212 responder: ::fidl_next::Responder<symlink::SetFlags, ___T>,
21213 ) {
21214 ___H::set_flags(&mut self.0, request, responder).await
21215 }
21216
21217 async fn query_filesystem(
21218 &mut self,
21219
21220 responder: ::fidl_next::Responder<symlink::QueryFilesystem, ___T>,
21221 ) {
21222 ___H::query_filesystem(&mut self.0, responder).await
21223 }
21224
21225 async fn get_token(&mut self, responder: ::fidl_next::Responder<symlink::GetToken, ___T>) {
21226 ___H::get_token(&mut self.0, responder).await
21227 }
21228
21229 async fn get_attributes(
21230 &mut self,
21231
21232 request: ::fidl_next::Request<symlink::GetAttributes, ___T>,
21233
21234 responder: ::fidl_next::Responder<symlink::GetAttributes, ___T>,
21235 ) {
21236 ___H::get_attributes(&mut self.0, request, responder).await
21237 }
21238
21239 async fn update_attributes(
21240 &mut self,
21241
21242 request: ::fidl_next::Request<symlink::UpdateAttributes, ___T>,
21243
21244 responder: ::fidl_next::Responder<symlink::UpdateAttributes, ___T>,
21245 ) {
21246 ___H::update_attributes(&mut self.0, request, responder).await
21247 }
21248
21249 async fn sync(&mut self, responder: ::fidl_next::Responder<symlink::Sync, ___T>) {
21250 ___H::sync(&mut self.0, responder).await
21251 }
21252
21253 async fn list_extended_attributes(
21254 &mut self,
21255
21256 request: ::fidl_next::Request<symlink::ListExtendedAttributes, ___T>,
21257 ) {
21258 ___H::list_extended_attributes(&mut self.0, request).await
21259 }
21260
21261 async fn get_extended_attribute(
21262 &mut self,
21263
21264 request: ::fidl_next::Request<symlink::GetExtendedAttribute, ___T>,
21265
21266 responder: ::fidl_next::Responder<symlink::GetExtendedAttribute, ___T>,
21267 ) {
21268 ___H::get_extended_attribute(&mut self.0, request, responder).await
21269 }
21270
21271 async fn set_extended_attribute(
21272 &mut self,
21273
21274 request: ::fidl_next::Request<symlink::SetExtendedAttribute, ___T>,
21275
21276 responder: ::fidl_next::Responder<symlink::SetExtendedAttribute, ___T>,
21277 ) {
21278 ___H::set_extended_attribute(&mut self.0, request, responder).await
21279 }
21280
21281 async fn remove_extended_attribute(
21282 &mut self,
21283
21284 request: ::fidl_next::Request<symlink::RemoveExtendedAttribute, ___T>,
21285
21286 responder: ::fidl_next::Responder<symlink::RemoveExtendedAttribute, ___T>,
21287 ) {
21288 ___H::remove_extended_attribute(&mut self.0, request, responder).await
21289 }
21290
21291 async fn open(&mut self, request: ::fidl_next::Request<symlink::Open, ___T>) {
21292 ___H::open(&mut self.0, request).await
21293 }
21294
21295 async fn describe(&mut self, responder: ::fidl_next::Responder<symlink::Describe, ___T>) {
21296 ___H::describe(&mut self.0, responder).await
21297 }
21298
21299 async fn on_unknown_interaction(&mut self, ordinal: u64) {
21300 ___H::on_unknown_interaction(&mut self.0, ordinal).await
21301 }
21302}
21303
21304pub use fidl_next_common_fuchsia_io::*;