1use core::cmp::Ordering;
6use core::mem;
7
8extern crate flatbuffers;
9use self::flatbuffers::{EndianScalar, Follow};
10
11#[allow(unused_imports, dead_code)]
12pub mod generated {
13
14 use core::cmp::Ordering;
15 use core::mem;
16
17 extern crate flatbuffers;
18 use self::flatbuffers::{EndianScalar, Follow};
19
20 #[deprecated(
21 since = "2.0.0",
22 note = "Use associated constants instead. This will no longer be generated in 2021."
23 )]
24 pub const ENUM_MIN_NODE_DATA: u8 = 0;
25 #[deprecated(
26 since = "2.0.0",
27 note = "Use associated constants instead. This will no longer be generated in 2021."
28 )]
29 pub const ENUM_MAX_NODE_DATA: u8 = 2;
30 #[deprecated(
31 since = "2.0.0",
32 note = "Use associated constants instead. This will no longer be generated in 2021."
33 )]
34 #[allow(non_camel_case_types)]
35 pub const ENUM_VALUES_NODE_DATA: [NodeData; 3] =
36 [NodeData::NONE, NodeData::Array, NodeData::Group];
37
38 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
39 #[repr(transparent)]
40 pub struct NodeData(pub u8);
41 #[allow(non_upper_case_globals)]
42 impl NodeData {
43 pub const NONE: Self = Self(0);
44 pub const Array: Self = Self(1);
45 pub const Group: Self = Self(2);
46
47 pub const ENUM_MIN: u8 = 0;
48 pub const ENUM_MAX: u8 = 2;
49 pub const ENUM_VALUES: &'static [Self] = &[Self::NONE, Self::Array, Self::Group];
50 pub fn variant_name(self) -> Option<&'static str> {
52 match self {
53 Self::NONE => Some("NONE"),
54 Self::Array => Some("Array"),
55 Self::Group => Some("Group"),
56 _ => None,
57 }
58 }
59 }
60 impl core::fmt::Debug for NodeData {
61 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
62 if let Some(name) = self.variant_name() {
63 f.write_str(name)
64 } else {
65 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
66 }
67 }
68 }
69 impl<'a> flatbuffers::Follow<'a> for NodeData {
70 type Inner = Self;
71 #[inline]
72 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
73 let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
74 Self(b)
75 }
76 }
77
78 impl flatbuffers::Push for NodeData {
79 type Output = NodeData;
80 #[inline]
81 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
82 unsafe {
83 flatbuffers::emplace_scalar::<u8>(dst, self.0);
84 }
85 }
86 }
87
88 impl flatbuffers::EndianScalar for NodeData {
89 type Scalar = u8;
90 #[inline]
91 fn to_little_endian(self) -> u8 {
92 self.0.to_le()
93 }
94 #[inline]
95 #[allow(clippy::wrong_self_convention)]
96 fn from_little_endian(v: u8) -> Self {
97 let b = u8::from_le(v);
98 Self(b)
99 }
100 }
101
102 impl<'a> flatbuffers::Verifiable for NodeData {
103 #[inline]
104 fn run_verifier(
105 v: &mut flatbuffers::Verifier,
106 pos: usize,
107 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
108 use self::flatbuffers::Verifiable;
109 u8::run_verifier(v, pos)
110 }
111 }
112
113 impl flatbuffers::SimpleToVerifyInSlice for NodeData {}
114 pub struct NodeDataUnionTableOffset {}
115
116 #[deprecated(
117 since = "2.0.0",
118 note = "Use associated constants instead. This will no longer be generated in 2021."
119 )]
120 pub const ENUM_MIN_REPO_AVAILABILITY: u8 = 0;
121 #[deprecated(
122 since = "2.0.0",
123 note = "Use associated constants instead. This will no longer be generated in 2021."
124 )]
125 pub const ENUM_MAX_REPO_AVAILABILITY: u8 = 2;
126 #[deprecated(
127 since = "2.0.0",
128 note = "Use associated constants instead. This will no longer be generated in 2021."
129 )]
130 #[allow(non_camel_case_types)]
131 pub const ENUM_VALUES_REPO_AVAILABILITY: [RepoAvailability; 3] =
132 [RepoAvailability::Online, RepoAvailability::ReadOnly, RepoAvailability::Offline];
133
134 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
135 #[repr(transparent)]
136 pub struct RepoAvailability(pub u8);
137 #[allow(non_upper_case_globals)]
138 impl RepoAvailability {
139 pub const Online: Self = Self(0);
140 pub const ReadOnly: Self = Self(1);
141 pub const Offline: Self = Self(2);
142
143 pub const ENUM_MIN: u8 = 0;
144 pub const ENUM_MAX: u8 = 2;
145 pub const ENUM_VALUES: &'static [Self] =
146 &[Self::Online, Self::ReadOnly, Self::Offline];
147 pub fn variant_name(self) -> Option<&'static str> {
149 match self {
150 Self::Online => Some("Online"),
151 Self::ReadOnly => Some("ReadOnly"),
152 Self::Offline => Some("Offline"),
153 _ => None,
154 }
155 }
156 }
157 impl core::fmt::Debug for RepoAvailability {
158 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
159 if let Some(name) = self.variant_name() {
160 f.write_str(name)
161 } else {
162 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
163 }
164 }
165 }
166 impl<'a> flatbuffers::Follow<'a> for RepoAvailability {
167 type Inner = Self;
168 #[inline]
169 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
170 let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
171 Self(b)
172 }
173 }
174
175 impl flatbuffers::Push for RepoAvailability {
176 type Output = RepoAvailability;
177 #[inline]
178 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
179 unsafe {
180 flatbuffers::emplace_scalar::<u8>(dst, self.0);
181 }
182 }
183 }
184
185 impl flatbuffers::EndianScalar for RepoAvailability {
186 type Scalar = u8;
187 #[inline]
188 fn to_little_endian(self) -> u8 {
189 self.0.to_le()
190 }
191 #[inline]
192 #[allow(clippy::wrong_self_convention)]
193 fn from_little_endian(v: u8) -> Self {
194 let b = u8::from_le(v);
195 Self(b)
196 }
197 }
198
199 impl<'a> flatbuffers::Verifiable for RepoAvailability {
200 #[inline]
201 fn run_verifier(
202 v: &mut flatbuffers::Verifier,
203 pos: usize,
204 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
205 use self::flatbuffers::Verifiable;
206 u8::run_verifier(v, pos)
207 }
208 }
209
210 impl flatbuffers::SimpleToVerifyInSlice for RepoAvailability {}
211 #[deprecated(
212 since = "2.0.0",
213 note = "Use associated constants instead. This will no longer be generated in 2021."
214 )]
215 pub const ENUM_MIN_UPDATE_TYPE: u8 = 0;
216 #[deprecated(
217 since = "2.0.0",
218 note = "Use associated constants instead. This will no longer be generated in 2021."
219 )]
220 pub const ENUM_MAX_UPDATE_TYPE: u8 = 16;
221 #[deprecated(
222 since = "2.0.0",
223 note = "Use associated constants instead. This will no longer be generated in 2021."
224 )]
225 #[allow(non_camel_case_types)]
226 pub const ENUM_VALUES_UPDATE_TYPE: [UpdateType; 17] = [
227 UpdateType::NONE,
228 UpdateType::RepoInitializedUpdate,
229 UpdateType::RepoMigratedUpdate,
230 UpdateType::ConfigChangedUpdate,
231 UpdateType::MetadataChangedUpdate,
232 UpdateType::TagCreatedUpdate,
233 UpdateType::TagDeletedUpdate,
234 UpdateType::BranchCreatedUpdate,
235 UpdateType::BranchDeletedUpdate,
236 UpdateType::BranchResetUpdate,
237 UpdateType::NewCommitUpdate,
238 UpdateType::CommitAmendedUpdate,
239 UpdateType::NewDetachedSnapshotUpdate,
240 UpdateType::GCRanUpdate,
241 UpdateType::ExpirationRanUpdate,
242 UpdateType::FeatureFlagChangedUpdate,
243 UpdateType::RepoStatusChangedUpdate,
244 ];
245
246 #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
247 #[repr(transparent)]
248 pub struct UpdateType(pub u8);
249 #[allow(non_upper_case_globals)]
250 impl UpdateType {
251 pub const NONE: Self = Self(0);
252 pub const RepoInitializedUpdate: Self = Self(1);
253 pub const RepoMigratedUpdate: Self = Self(2);
254 pub const ConfigChangedUpdate: Self = Self(3);
255 pub const MetadataChangedUpdate: Self = Self(4);
256 pub const TagCreatedUpdate: Self = Self(5);
257 pub const TagDeletedUpdate: Self = Self(6);
258 pub const BranchCreatedUpdate: Self = Self(7);
259 pub const BranchDeletedUpdate: Self = Self(8);
260 pub const BranchResetUpdate: Self = Self(9);
261 pub const NewCommitUpdate: Self = Self(10);
262 pub const CommitAmendedUpdate: Self = Self(11);
263 pub const NewDetachedSnapshotUpdate: Self = Self(12);
264 pub const GCRanUpdate: Self = Self(13);
265 pub const ExpirationRanUpdate: Self = Self(14);
266 pub const FeatureFlagChangedUpdate: Self = Self(15);
267 pub const RepoStatusChangedUpdate: Self = Self(16);
268
269 pub const ENUM_MIN: u8 = 0;
270 pub const ENUM_MAX: u8 = 16;
271 pub const ENUM_VALUES: &'static [Self] = &[
272 Self::NONE,
273 Self::RepoInitializedUpdate,
274 Self::RepoMigratedUpdate,
275 Self::ConfigChangedUpdate,
276 Self::MetadataChangedUpdate,
277 Self::TagCreatedUpdate,
278 Self::TagDeletedUpdate,
279 Self::BranchCreatedUpdate,
280 Self::BranchDeletedUpdate,
281 Self::BranchResetUpdate,
282 Self::NewCommitUpdate,
283 Self::CommitAmendedUpdate,
284 Self::NewDetachedSnapshotUpdate,
285 Self::GCRanUpdate,
286 Self::ExpirationRanUpdate,
287 Self::FeatureFlagChangedUpdate,
288 Self::RepoStatusChangedUpdate,
289 ];
290 pub fn variant_name(self) -> Option<&'static str> {
292 match self {
293 Self::NONE => Some("NONE"),
294 Self::RepoInitializedUpdate => Some("RepoInitializedUpdate"),
295 Self::RepoMigratedUpdate => Some("RepoMigratedUpdate"),
296 Self::ConfigChangedUpdate => Some("ConfigChangedUpdate"),
297 Self::MetadataChangedUpdate => Some("MetadataChangedUpdate"),
298 Self::TagCreatedUpdate => Some("TagCreatedUpdate"),
299 Self::TagDeletedUpdate => Some("TagDeletedUpdate"),
300 Self::BranchCreatedUpdate => Some("BranchCreatedUpdate"),
301 Self::BranchDeletedUpdate => Some("BranchDeletedUpdate"),
302 Self::BranchResetUpdate => Some("BranchResetUpdate"),
303 Self::NewCommitUpdate => Some("NewCommitUpdate"),
304 Self::CommitAmendedUpdate => Some("CommitAmendedUpdate"),
305 Self::NewDetachedSnapshotUpdate => Some("NewDetachedSnapshotUpdate"),
306 Self::GCRanUpdate => Some("GCRanUpdate"),
307 Self::ExpirationRanUpdate => Some("ExpirationRanUpdate"),
308 Self::FeatureFlagChangedUpdate => Some("FeatureFlagChangedUpdate"),
309 Self::RepoStatusChangedUpdate => Some("RepoStatusChangedUpdate"),
310 _ => None,
311 }
312 }
313 }
314 impl core::fmt::Debug for UpdateType {
315 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
316 if let Some(name) = self.variant_name() {
317 f.write_str(name)
318 } else {
319 f.write_fmt(format_args!("<UNKNOWN {:?}>", self.0))
320 }
321 }
322 }
323 impl<'a> flatbuffers::Follow<'a> for UpdateType {
324 type Inner = Self;
325 #[inline]
326 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
327 let b = unsafe { flatbuffers::read_scalar_at::<u8>(buf, loc) };
328 Self(b)
329 }
330 }
331
332 impl flatbuffers::Push for UpdateType {
333 type Output = UpdateType;
334 #[inline]
335 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
336 unsafe {
337 flatbuffers::emplace_scalar::<u8>(dst, self.0);
338 }
339 }
340 }
341
342 impl flatbuffers::EndianScalar for UpdateType {
343 type Scalar = u8;
344 #[inline]
345 fn to_little_endian(self) -> u8 {
346 self.0.to_le()
347 }
348 #[inline]
349 #[allow(clippy::wrong_self_convention)]
350 fn from_little_endian(v: u8) -> Self {
351 let b = u8::from_le(v);
352 Self(b)
353 }
354 }
355
356 impl<'a> flatbuffers::Verifiable for UpdateType {
357 #[inline]
358 fn run_verifier(
359 v: &mut flatbuffers::Verifier,
360 pos: usize,
361 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
362 use self::flatbuffers::Verifiable;
363 u8::run_verifier(v, pos)
364 }
365 }
366
367 impl flatbuffers::SimpleToVerifyInSlice for UpdateType {}
368 pub struct UpdateTypeUnionTableOffset {}
369
370 #[repr(transparent)]
372 #[derive(Clone, Copy, PartialEq)]
373 pub struct ObjectId12(pub [u8; 12]);
374 impl Default for ObjectId12 {
375 fn default() -> Self {
376 Self([0; 12])
377 }
378 }
379 impl core::fmt::Debug for ObjectId12 {
380 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
381 f.debug_struct("ObjectId12").field("bytes", &self.bytes()).finish()
382 }
383 }
384
385 impl flatbuffers::SimpleToVerifyInSlice for ObjectId12 {}
386 impl<'a> flatbuffers::Follow<'a> for ObjectId12 {
387 type Inner = &'a ObjectId12;
388 #[inline]
389 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
390 unsafe { <&'a ObjectId12>::follow(buf, loc) }
391 }
392 }
393 impl<'a> flatbuffers::Follow<'a> for &'a ObjectId12 {
394 type Inner = &'a ObjectId12;
395 #[inline]
396 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
397 unsafe { flatbuffers::follow_cast_ref::<ObjectId12>(buf, loc) }
398 }
399 }
400 impl<'b> flatbuffers::Push for ObjectId12 {
401 type Output = ObjectId12;
402 #[inline]
403 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
404 let src = unsafe {
405 ::core::slice::from_raw_parts(
406 self as *const ObjectId12 as *const u8,
407 <Self as flatbuffers::Push>::size(),
408 )
409 };
410 dst.copy_from_slice(src);
411 }
412 #[inline]
413 fn alignment() -> flatbuffers::PushAlignment {
414 flatbuffers::PushAlignment::new(1)
415 }
416 }
417
418 impl<'a> flatbuffers::Verifiable for ObjectId12 {
419 #[inline]
420 fn run_verifier(
421 v: &mut flatbuffers::Verifier,
422 pos: usize,
423 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
424 use self::flatbuffers::Verifiable;
425 v.in_buffer::<Self>(pos)
426 }
427 }
428
429 impl<'a> ObjectId12 {
430 #[allow(clippy::too_many_arguments)]
431 pub fn new(bytes: &[u8; 12]) -> Self {
432 let mut s = Self([0; 12]);
433 s.set_bytes(bytes);
434 s
435 }
436
437 pub fn bytes(&'a self) -> flatbuffers::Array<'a, u8, 12> {
438 unsafe { flatbuffers::Array::follow(&self.0, 0) }
442 }
443
444 pub fn set_bytes(&mut self, items: &[u8; 12]) {
445 unsafe { flatbuffers::emplace_scalar_array(&mut self.0, 0, items) };
449 }
450 }
451
452 #[repr(transparent)]
454 #[derive(Clone, Copy, PartialEq)]
455 pub struct ObjectId8(pub [u8; 8]);
456 impl Default for ObjectId8 {
457 fn default() -> Self {
458 Self([0; 8])
459 }
460 }
461 impl core::fmt::Debug for ObjectId8 {
462 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
463 f.debug_struct("ObjectId8").field("bytes", &self.bytes()).finish()
464 }
465 }
466
467 impl flatbuffers::SimpleToVerifyInSlice for ObjectId8 {}
468 impl<'a> flatbuffers::Follow<'a> for ObjectId8 {
469 type Inner = &'a ObjectId8;
470 #[inline]
471 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
472 unsafe { <&'a ObjectId8>::follow(buf, loc) }
473 }
474 }
475 impl<'a> flatbuffers::Follow<'a> for &'a ObjectId8 {
476 type Inner = &'a ObjectId8;
477 #[inline]
478 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
479 unsafe { flatbuffers::follow_cast_ref::<ObjectId8>(buf, loc) }
480 }
481 }
482 impl<'b> flatbuffers::Push for ObjectId8 {
483 type Output = ObjectId8;
484 #[inline]
485 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
486 let src = unsafe {
487 ::core::slice::from_raw_parts(
488 self as *const ObjectId8 as *const u8,
489 <Self as flatbuffers::Push>::size(),
490 )
491 };
492 dst.copy_from_slice(src);
493 }
494 #[inline]
495 fn alignment() -> flatbuffers::PushAlignment {
496 flatbuffers::PushAlignment::new(1)
497 }
498 }
499
500 impl<'a> flatbuffers::Verifiable for ObjectId8 {
501 #[inline]
502 fn run_verifier(
503 v: &mut flatbuffers::Verifier,
504 pos: usize,
505 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
506 use self::flatbuffers::Verifiable;
507 v.in_buffer::<Self>(pos)
508 }
509 }
510
511 impl<'a> ObjectId8 {
512 #[allow(clippy::too_many_arguments)]
513 pub fn new(bytes: &[u8; 8]) -> Self {
514 let mut s = Self([0; 8]);
515 s.set_bytes(bytes);
516 s
517 }
518
519 pub fn bytes(&'a self) -> flatbuffers::Array<'a, u8, 8> {
520 unsafe { flatbuffers::Array::follow(&self.0, 0) }
524 }
525
526 pub fn set_bytes(&mut self, items: &[u8; 8]) {
527 unsafe { flatbuffers::emplace_scalar_array(&mut self.0, 0, items) };
531 }
532 }
533
534 #[repr(transparent)]
536 #[derive(Clone, Copy, PartialEq)]
537 pub struct ManifestFileInfo(pub [u8; 32]);
538 impl Default for ManifestFileInfo {
539 fn default() -> Self {
540 Self([0; 32])
541 }
542 }
543 impl core::fmt::Debug for ManifestFileInfo {
544 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
545 f.debug_struct("ManifestFileInfo")
546 .field("id", &self.id())
547 .field("size_bytes", &self.size_bytes())
548 .field("num_chunk_refs", &self.num_chunk_refs())
549 .finish()
550 }
551 }
552
553 impl flatbuffers::SimpleToVerifyInSlice for ManifestFileInfo {}
554 impl<'a> flatbuffers::Follow<'a> for ManifestFileInfo {
555 type Inner = &'a ManifestFileInfo;
556 #[inline]
557 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
558 unsafe { <&'a ManifestFileInfo>::follow(buf, loc) }
559 }
560 }
561 impl<'a> flatbuffers::Follow<'a> for &'a ManifestFileInfo {
562 type Inner = &'a ManifestFileInfo;
563 #[inline]
564 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
565 unsafe { flatbuffers::follow_cast_ref::<ManifestFileInfo>(buf, loc) }
566 }
567 }
568 impl<'b> flatbuffers::Push for ManifestFileInfo {
569 type Output = ManifestFileInfo;
570 #[inline]
571 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
572 let src = unsafe {
573 ::core::slice::from_raw_parts(
574 self as *const ManifestFileInfo as *const u8,
575 <Self as flatbuffers::Push>::size(),
576 )
577 };
578 dst.copy_from_slice(src);
579 }
580 #[inline]
581 fn alignment() -> flatbuffers::PushAlignment {
582 flatbuffers::PushAlignment::new(8)
583 }
584 }
585
586 impl<'a> flatbuffers::Verifiable for ManifestFileInfo {
587 #[inline]
588 fn run_verifier(
589 v: &mut flatbuffers::Verifier,
590 pos: usize,
591 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
592 use self::flatbuffers::Verifiable;
593 v.in_buffer::<Self>(pos)
594 }
595 }
596
597 impl<'a> ManifestFileInfo {
598 #[allow(clippy::too_many_arguments)]
599 pub fn new(id: &ObjectId12, size_bytes: u64, num_chunk_refs: u32) -> Self {
600 let mut s = Self([0; 32]);
601 s.set_id(id);
602 s.set_size_bytes(size_bytes);
603 s.set_num_chunk_refs(num_chunk_refs);
604 s
605 }
606
607 pub fn id(&self) -> &ObjectId12 {
608 unsafe { &*(self.0[0..].as_ptr() as *const ObjectId12) }
612 }
613
614 #[allow(clippy::identity_op)]
615 pub fn set_id(&mut self, x: &ObjectId12) {
616 self.0[0..0 + 12].copy_from_slice(&x.0)
617 }
618
619 pub fn size_bytes(&self) -> u64 {
620 let mut mem =
621 core::mem::MaybeUninit::<<u64 as EndianScalar>::Scalar>::uninit();
622 EndianScalar::from_little_endian(unsafe {
626 core::ptr::copy_nonoverlapping(
627 self.0[16..].as_ptr(),
628 mem.as_mut_ptr() as *mut u8,
629 core::mem::size_of::<<u64 as EndianScalar>::Scalar>(),
630 );
631 mem.assume_init()
632 })
633 }
634
635 pub fn set_size_bytes(&mut self, x: u64) {
636 let x_le = x.to_little_endian();
637 unsafe {
641 core::ptr::copy_nonoverlapping(
642 &x_le as *const _ as *const u8,
643 self.0[16..].as_mut_ptr(),
644 core::mem::size_of::<<u64 as EndianScalar>::Scalar>(),
645 );
646 }
647 }
648
649 pub fn num_chunk_refs(&self) -> u32 {
650 let mut mem =
651 core::mem::MaybeUninit::<<u32 as EndianScalar>::Scalar>::uninit();
652 EndianScalar::from_little_endian(unsafe {
656 core::ptr::copy_nonoverlapping(
657 self.0[24..].as_ptr(),
658 mem.as_mut_ptr() as *mut u8,
659 core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
660 );
661 mem.assume_init()
662 })
663 }
664
665 pub fn set_num_chunk_refs(&mut self, x: u32) {
666 let x_le = x.to_little_endian();
667 unsafe {
671 core::ptr::copy_nonoverlapping(
672 &x_le as *const _ as *const u8,
673 self.0[24..].as_mut_ptr(),
674 core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
675 );
676 }
677 }
678 }
679
680 #[repr(transparent)]
682 #[derive(Clone, Copy, PartialEq)]
683 pub struct ChunkIndexRange(pub [u8; 8]);
684 impl Default for ChunkIndexRange {
685 fn default() -> Self {
686 Self([0; 8])
687 }
688 }
689 impl core::fmt::Debug for ChunkIndexRange {
690 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
691 f.debug_struct("ChunkIndexRange")
692 .field("from", &self.from())
693 .field("to", &self.to())
694 .finish()
695 }
696 }
697
698 impl flatbuffers::SimpleToVerifyInSlice for ChunkIndexRange {}
699 impl<'a> flatbuffers::Follow<'a> for ChunkIndexRange {
700 type Inner = &'a ChunkIndexRange;
701 #[inline]
702 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
703 unsafe { <&'a ChunkIndexRange>::follow(buf, loc) }
704 }
705 }
706 impl<'a> flatbuffers::Follow<'a> for &'a ChunkIndexRange {
707 type Inner = &'a ChunkIndexRange;
708 #[inline]
709 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
710 unsafe { flatbuffers::follow_cast_ref::<ChunkIndexRange>(buf, loc) }
711 }
712 }
713 impl<'b> flatbuffers::Push for ChunkIndexRange {
714 type Output = ChunkIndexRange;
715 #[inline]
716 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
717 let src = unsafe {
718 ::core::slice::from_raw_parts(
719 self as *const ChunkIndexRange as *const u8,
720 <Self as flatbuffers::Push>::size(),
721 )
722 };
723 dst.copy_from_slice(src);
724 }
725 #[inline]
726 fn alignment() -> flatbuffers::PushAlignment {
727 flatbuffers::PushAlignment::new(4)
728 }
729 }
730
731 impl<'a> flatbuffers::Verifiable for ChunkIndexRange {
732 #[inline]
733 fn run_verifier(
734 v: &mut flatbuffers::Verifier,
735 pos: usize,
736 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
737 use self::flatbuffers::Verifiable;
738 v.in_buffer::<Self>(pos)
739 }
740 }
741
742 impl<'a> ChunkIndexRange {
743 #[allow(clippy::too_many_arguments)]
744 pub fn new(from: u32, to: u32) -> Self {
745 let mut s = Self([0; 8]);
746 s.set_from(from);
747 s.set_to(to);
748 s
749 }
750
751 pub fn from(&self) -> u32 {
752 let mut mem =
753 core::mem::MaybeUninit::<<u32 as EndianScalar>::Scalar>::uninit();
754 EndianScalar::from_little_endian(unsafe {
758 core::ptr::copy_nonoverlapping(
759 self.0[0..].as_ptr(),
760 mem.as_mut_ptr() as *mut u8,
761 core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
762 );
763 mem.assume_init()
764 })
765 }
766
767 pub fn set_from(&mut self, x: u32) {
768 let x_le = x.to_little_endian();
769 unsafe {
773 core::ptr::copy_nonoverlapping(
774 &x_le as *const _ as *const u8,
775 self.0[0..].as_mut_ptr(),
776 core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
777 );
778 }
779 }
780
781 pub fn to(&self) -> u32 {
782 let mut mem =
783 core::mem::MaybeUninit::<<u32 as EndianScalar>::Scalar>::uninit();
784 EndianScalar::from_little_endian(unsafe {
788 core::ptr::copy_nonoverlapping(
789 self.0[4..].as_ptr(),
790 mem.as_mut_ptr() as *mut u8,
791 core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
792 );
793 mem.assume_init()
794 })
795 }
796
797 pub fn set_to(&mut self, x: u32) {
798 let x_le = x.to_little_endian();
799 unsafe {
803 core::ptr::copy_nonoverlapping(
804 &x_le as *const _ as *const u8,
805 self.0[4..].as_mut_ptr(),
806 core::mem::size_of::<<u32 as EndianScalar>::Scalar>(),
807 );
808 }
809 }
810 }
811
812 #[repr(transparent)]
814 #[derive(Clone, Copy, PartialEq)]
815 pub struct DimensionShape(pub [u8; 16]);
816 impl Default for DimensionShape {
817 fn default() -> Self {
818 Self([0; 16])
819 }
820 }
821 impl core::fmt::Debug for DimensionShape {
822 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
823 f.debug_struct("DimensionShape")
824 .field("array_length", &self.array_length())
825 .field("chunk_length", &self.chunk_length())
826 .finish()
827 }
828 }
829
830 impl flatbuffers::SimpleToVerifyInSlice for DimensionShape {}
831 impl<'a> flatbuffers::Follow<'a> for DimensionShape {
832 type Inner = &'a DimensionShape;
833 #[inline]
834 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
835 unsafe { <&'a DimensionShape>::follow(buf, loc) }
836 }
837 }
838 impl<'a> flatbuffers::Follow<'a> for &'a DimensionShape {
839 type Inner = &'a DimensionShape;
840 #[inline]
841 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
842 unsafe { flatbuffers::follow_cast_ref::<DimensionShape>(buf, loc) }
843 }
844 }
845 impl<'b> flatbuffers::Push for DimensionShape {
846 type Output = DimensionShape;
847 #[inline]
848 unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
849 let src = unsafe {
850 ::core::slice::from_raw_parts(
851 self as *const DimensionShape as *const u8,
852 <Self as flatbuffers::Push>::size(),
853 )
854 };
855 dst.copy_from_slice(src);
856 }
857 #[inline]
858 fn alignment() -> flatbuffers::PushAlignment {
859 flatbuffers::PushAlignment::new(8)
860 }
861 }
862
863 impl<'a> flatbuffers::Verifiable for DimensionShape {
864 #[inline]
865 fn run_verifier(
866 v: &mut flatbuffers::Verifier,
867 pos: usize,
868 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
869 use self::flatbuffers::Verifiable;
870 v.in_buffer::<Self>(pos)
871 }
872 }
873
874 impl<'a> DimensionShape {
875 #[allow(clippy::too_many_arguments)]
876 pub fn new(array_length: u64, chunk_length: u64) -> Self {
877 let mut s = Self([0; 16]);
878 s.set_array_length(array_length);
879 s.set_chunk_length(chunk_length);
880 s
881 }
882
883 pub fn array_length(&self) -> u64 {
884 let mut mem =
885 core::mem::MaybeUninit::<<u64 as EndianScalar>::Scalar>::uninit();
886 EndianScalar::from_little_endian(unsafe {
890 core::ptr::copy_nonoverlapping(
891 self.0[0..].as_ptr(),
892 mem.as_mut_ptr() as *mut u8,
893 core::mem::size_of::<<u64 as EndianScalar>::Scalar>(),
894 );
895 mem.assume_init()
896 })
897 }
898
899 pub fn set_array_length(&mut self, x: u64) {
900 let x_le = x.to_little_endian();
901 unsafe {
905 core::ptr::copy_nonoverlapping(
906 &x_le as *const _ as *const u8,
907 self.0[0..].as_mut_ptr(),
908 core::mem::size_of::<<u64 as EndianScalar>::Scalar>(),
909 );
910 }
911 }
912
913 pub fn chunk_length(&self) -> u64 {
914 let mut mem =
915 core::mem::MaybeUninit::<<u64 as EndianScalar>::Scalar>::uninit();
916 EndianScalar::from_little_endian(unsafe {
920 core::ptr::copy_nonoverlapping(
921 self.0[8..].as_ptr(),
922 mem.as_mut_ptr() as *mut u8,
923 core::mem::size_of::<<u64 as EndianScalar>::Scalar>(),
924 );
925 mem.assume_init()
926 })
927 }
928
929 pub fn set_chunk_length(&mut self, x: u64) {
930 let x_le = x.to_little_endian();
931 unsafe {
935 core::ptr::copy_nonoverlapping(
936 &x_le as *const _ as *const u8,
937 self.0[8..].as_mut_ptr(),
938 core::mem::size_of::<<u64 as EndianScalar>::Scalar>(),
939 );
940 }
941 }
942 }
943
944 pub enum MetadataItemOffset {}
945 #[derive(Copy, Clone, PartialEq)]
946
947 pub struct MetadataItem<'a> {
948 pub _tab: flatbuffers::Table<'a>,
949 }
950
951 impl<'a> flatbuffers::Follow<'a> for MetadataItem<'a> {
952 type Inner = MetadataItem<'a>;
953 #[inline]
954 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
955 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
956 }
957 }
958
959 impl<'a> MetadataItem<'a> {
960 pub const VT_NAME: flatbuffers::VOffsetT = 4;
961 pub const VT_VALUE: flatbuffers::VOffsetT = 6;
962
963 #[inline]
964 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
965 MetadataItem { _tab: table }
966 }
967 #[allow(unused_mut)]
968 pub fn create<
969 'bldr: 'args,
970 'args: 'mut_bldr,
971 'mut_bldr,
972 A: flatbuffers::Allocator + 'bldr,
973 >(
974 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
975 args: &'args MetadataItemArgs<'args>,
976 ) -> flatbuffers::WIPOffset<MetadataItem<'bldr>> {
977 let mut builder = MetadataItemBuilder::new(_fbb);
978 if let Some(x) = args.value {
979 builder.add_value(x);
980 }
981 if let Some(x) = args.name {
982 builder.add_name(x);
983 }
984 builder.finish()
985 }
986
987 #[inline]
988 pub fn name(&self) -> &'a str {
989 unsafe {
993 self._tab
994 .get::<flatbuffers::ForwardsUOffset<&str>>(
995 MetadataItem::VT_NAME,
996 None,
997 )
998 .unwrap()
999 }
1000 }
1001 #[inline]
1002 pub fn value(&self) -> flatbuffers::Vector<'a, u8> {
1003 unsafe {
1007 self._tab
1008 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
1009 MetadataItem::VT_VALUE,
1010 None,
1011 )
1012 .unwrap()
1013 }
1014 }
1015 }
1016
1017 impl flatbuffers::Verifiable for MetadataItem<'_> {
1018 #[inline]
1019 fn run_verifier(
1020 v: &mut flatbuffers::Verifier,
1021 pos: usize,
1022 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1023 use self::flatbuffers::Verifiable;
1024 v.visit_table(pos)?
1025 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
1026 "name",
1027 Self::VT_NAME,
1028 true,
1029 )?
1030 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>(
1031 "value",
1032 Self::VT_VALUE,
1033 true,
1034 )?
1035 .finish();
1036 Ok(())
1037 }
1038 }
1039 pub struct MetadataItemArgs<'a> {
1040 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
1041 pub value: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
1042 }
1043 impl<'a> Default for MetadataItemArgs<'a> {
1044 #[inline]
1045 fn default() -> Self {
1046 MetadataItemArgs {
1047 name: None, value: None, }
1050 }
1051 }
1052
1053 pub struct MetadataItemBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1054 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1055 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1056 }
1057 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MetadataItemBuilder<'a, 'b, A> {
1058 #[inline]
1059 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
1060 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1061 MetadataItem::VT_NAME,
1062 name,
1063 );
1064 }
1065 #[inline]
1066 pub fn add_value(
1067 &mut self,
1068 value: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
1069 ) {
1070 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1071 MetadataItem::VT_VALUE,
1072 value,
1073 );
1074 }
1075 #[inline]
1076 pub fn new(
1077 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1078 ) -> MetadataItemBuilder<'a, 'b, A> {
1079 let start = _fbb.start_table();
1080 MetadataItemBuilder { fbb_: _fbb, start_: start }
1081 }
1082 #[inline]
1083 pub fn finish(self) -> flatbuffers::WIPOffset<MetadataItem<'a>> {
1084 let o = self.fbb_.end_table(self.start_);
1085 self.fbb_.required(o, MetadataItem::VT_NAME, "name");
1086 self.fbb_.required(o, MetadataItem::VT_VALUE, "value");
1087 flatbuffers::WIPOffset::new(o.value())
1088 }
1089 }
1090
1091 impl core::fmt::Debug for MetadataItem<'_> {
1092 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1093 let mut ds = f.debug_struct("MetadataItem");
1094 ds.field("name", &self.name());
1095 ds.field("value", &self.value());
1096 ds.finish()
1097 }
1098 }
1099 pub enum ChunkRefOffset {}
1100 #[derive(Copy, Clone, PartialEq)]
1101
1102 pub struct ChunkRef<'a> {
1103 pub _tab: flatbuffers::Table<'a>,
1104 }
1105
1106 impl<'a> flatbuffers::Follow<'a> for ChunkRef<'a> {
1107 type Inner = ChunkRef<'a>;
1108 #[inline]
1109 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1110 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
1111 }
1112 }
1113
1114 impl<'a> ChunkRef<'a> {
1115 pub const VT_INDEX: flatbuffers::VOffsetT = 4;
1116 pub const VT_INLINE: flatbuffers::VOffsetT = 6;
1117 pub const VT_OFFSET: flatbuffers::VOffsetT = 8;
1118 pub const VT_LENGTH: flatbuffers::VOffsetT = 10;
1119 pub const VT_CHUNK_ID: flatbuffers::VOffsetT = 12;
1120 pub const VT_LOCATION: flatbuffers::VOffsetT = 14;
1121 pub const VT_CHECKSUM_ETAG: flatbuffers::VOffsetT = 16;
1122 pub const VT_CHECKSUM_LAST_MODIFIED: flatbuffers::VOffsetT = 18;
1123 pub const VT_COMPRESSED_LOCATION: flatbuffers::VOffsetT = 20;
1124 pub const VT_EXTRA: flatbuffers::VOffsetT = 22;
1125
1126 #[inline]
1127 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1128 ChunkRef { _tab: table }
1129 }
1130 #[allow(unused_mut)]
1131 pub fn create<
1132 'bldr: 'args,
1133 'args: 'mut_bldr,
1134 'mut_bldr,
1135 A: flatbuffers::Allocator + 'bldr,
1136 >(
1137 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1138 args: &'args ChunkRefArgs<'args>,
1139 ) -> flatbuffers::WIPOffset<ChunkRef<'bldr>> {
1140 let mut builder = ChunkRefBuilder::new(_fbb);
1141 builder.add_length(args.length);
1142 builder.add_offset(args.offset);
1143 if let Some(x) = args.extra {
1144 builder.add_extra(x);
1145 }
1146 if let Some(x) = args.compressed_location {
1147 builder.add_compressed_location(x);
1148 }
1149 builder.add_checksum_last_modified(args.checksum_last_modified);
1150 if let Some(x) = args.checksum_etag {
1151 builder.add_checksum_etag(x);
1152 }
1153 if let Some(x) = args.location {
1154 builder.add_location(x);
1155 }
1156 if let Some(x) = args.chunk_id {
1157 builder.add_chunk_id(x);
1158 }
1159 if let Some(x) = args.inline {
1160 builder.add_inline(x);
1161 }
1162 if let Some(x) = args.index {
1163 builder.add_index(x);
1164 }
1165 builder.finish()
1166 }
1167
1168 #[inline]
1169 pub fn index(&self) -> flatbuffers::Vector<'a, u32> {
1170 unsafe {
1174 self._tab
1175 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
1176 ChunkRef::VT_INDEX,
1177 None,
1178 )
1179 .unwrap()
1180 }
1181 }
1182 #[inline]
1183 pub fn inline(&self) -> Option<flatbuffers::Vector<'a, u8>> {
1184 unsafe {
1188 self._tab
1189 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
1190 ChunkRef::VT_INLINE,
1191 None,
1192 )
1193 }
1194 }
1195 #[inline]
1196 pub fn offset(&self) -> u64 {
1197 unsafe { self._tab.get::<u64>(ChunkRef::VT_OFFSET, Some(0)).unwrap() }
1201 }
1202 #[inline]
1203 pub fn length(&self) -> u64 {
1204 unsafe { self._tab.get::<u64>(ChunkRef::VT_LENGTH, Some(0)).unwrap() }
1208 }
1209 #[inline]
1210 pub fn chunk_id(&self) -> Option<&'a ObjectId12> {
1211 unsafe { self._tab.get::<ObjectId12>(ChunkRef::VT_CHUNK_ID, None) }
1215 }
1216 #[inline]
1217 pub fn location(&self) -> Option<&'a str> {
1218 unsafe {
1222 self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(
1223 ChunkRef::VT_LOCATION,
1224 None,
1225 )
1226 }
1227 }
1228 #[inline]
1229 pub fn checksum_etag(&self) -> Option<&'a str> {
1230 unsafe {
1234 self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(
1235 ChunkRef::VT_CHECKSUM_ETAG,
1236 None,
1237 )
1238 }
1239 }
1240 #[inline]
1241 pub fn checksum_last_modified(&self) -> u32 {
1242 unsafe {
1246 self._tab
1247 .get::<u32>(ChunkRef::VT_CHECKSUM_LAST_MODIFIED, Some(0))
1248 .unwrap()
1249 }
1250 }
1251 #[inline]
1252 pub fn compressed_location(&self) -> Option<flatbuffers::Vector<'a, u8>> {
1253 unsafe {
1257 self._tab
1258 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
1259 ChunkRef::VT_COMPRESSED_LOCATION,
1260 None,
1261 )
1262 }
1263 }
1264 #[inline]
1265 pub fn extra(&self) -> Option<flatbuffers::Vector<'a, u8>> {
1266 unsafe {
1270 self._tab
1271 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
1272 ChunkRef::VT_EXTRA,
1273 None,
1274 )
1275 }
1276 }
1277 }
1278
1279 impl flatbuffers::Verifiable for ChunkRef<'_> {
1280 #[inline]
1281 fn run_verifier(
1282 v: &mut flatbuffers::Verifier,
1283 pos: usize,
1284 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1285 use self::flatbuffers::Verifiable;
1286 v.visit_table(pos)?
1287 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>("index", Self::VT_INDEX, true)?
1288 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>("inline", Self::VT_INLINE, false)?
1289 .visit_field::<u64>("offset", Self::VT_OFFSET, false)?
1290 .visit_field::<u64>("length", Self::VT_LENGTH, false)?
1291 .visit_field::<ObjectId12>("chunk_id", Self::VT_CHUNK_ID, false)?
1292 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("location", Self::VT_LOCATION, false)?
1293 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("checksum_etag", Self::VT_CHECKSUM_ETAG, false)?
1294 .visit_field::<u32>("checksum_last_modified", Self::VT_CHECKSUM_LAST_MODIFIED, false)?
1295 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>("compressed_location", Self::VT_COMPRESSED_LOCATION, false)?
1296 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>("extra", Self::VT_EXTRA, false)?
1297 .finish();
1298 Ok(())
1299 }
1300 }
1301 pub struct ChunkRefArgs<'a> {
1302 pub index: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
1303 pub inline: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
1304 pub offset: u64,
1305 pub length: u64,
1306 pub chunk_id: Option<&'a ObjectId12>,
1307 pub location: Option<flatbuffers::WIPOffset<&'a str>>,
1308 pub checksum_etag: Option<flatbuffers::WIPOffset<&'a str>>,
1309 pub checksum_last_modified: u32,
1310 pub compressed_location:
1311 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
1312 pub extra: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
1313 }
1314 impl<'a> Default for ChunkRefArgs<'a> {
1315 #[inline]
1316 fn default() -> Self {
1317 ChunkRefArgs {
1318 index: None, inline: None,
1320 offset: 0,
1321 length: 0,
1322 chunk_id: None,
1323 location: None,
1324 checksum_etag: None,
1325 checksum_last_modified: 0,
1326 compressed_location: None,
1327 extra: None,
1328 }
1329 }
1330 }
1331
1332 pub struct ChunkRefBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1333 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1334 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1335 }
1336 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ChunkRefBuilder<'a, 'b, A> {
1337 #[inline]
1338 pub fn add_index(
1339 &mut self,
1340 index: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>,
1341 ) {
1342 self.fbb_
1343 .push_slot_always::<flatbuffers::WIPOffset<_>>(ChunkRef::VT_INDEX, index);
1344 }
1345 #[inline]
1346 pub fn add_inline(
1347 &mut self,
1348 inline: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
1349 ) {
1350 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1351 ChunkRef::VT_INLINE,
1352 inline,
1353 );
1354 }
1355 #[inline]
1356 pub fn add_offset(&mut self, offset: u64) {
1357 self.fbb_.push_slot::<u64>(ChunkRef::VT_OFFSET, offset, 0);
1358 }
1359 #[inline]
1360 pub fn add_length(&mut self, length: u64) {
1361 self.fbb_.push_slot::<u64>(ChunkRef::VT_LENGTH, length, 0);
1362 }
1363 #[inline]
1364 pub fn add_chunk_id(&mut self, chunk_id: &ObjectId12) {
1365 self.fbb_.push_slot_always::<&ObjectId12>(ChunkRef::VT_CHUNK_ID, chunk_id);
1366 }
1367 #[inline]
1368 pub fn add_location(&mut self, location: flatbuffers::WIPOffset<&'b str>) {
1369 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1370 ChunkRef::VT_LOCATION,
1371 location,
1372 );
1373 }
1374 #[inline]
1375 pub fn add_checksum_etag(
1376 &mut self,
1377 checksum_etag: flatbuffers::WIPOffset<&'b str>,
1378 ) {
1379 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1380 ChunkRef::VT_CHECKSUM_ETAG,
1381 checksum_etag,
1382 );
1383 }
1384 #[inline]
1385 pub fn add_checksum_last_modified(&mut self, checksum_last_modified: u32) {
1386 self.fbb_.push_slot::<u32>(
1387 ChunkRef::VT_CHECKSUM_LAST_MODIFIED,
1388 checksum_last_modified,
1389 0,
1390 );
1391 }
1392 #[inline]
1393 pub fn add_compressed_location(
1394 &mut self,
1395 compressed_location: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
1396 ) {
1397 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1398 ChunkRef::VT_COMPRESSED_LOCATION,
1399 compressed_location,
1400 );
1401 }
1402 #[inline]
1403 pub fn add_extra(
1404 &mut self,
1405 extra: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
1406 ) {
1407 self.fbb_
1408 .push_slot_always::<flatbuffers::WIPOffset<_>>(ChunkRef::VT_EXTRA, extra);
1409 }
1410 #[inline]
1411 pub fn new(
1412 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1413 ) -> ChunkRefBuilder<'a, 'b, A> {
1414 let start = _fbb.start_table();
1415 ChunkRefBuilder { fbb_: _fbb, start_: start }
1416 }
1417 #[inline]
1418 pub fn finish(self) -> flatbuffers::WIPOffset<ChunkRef<'a>> {
1419 let o = self.fbb_.end_table(self.start_);
1420 self.fbb_.required(o, ChunkRef::VT_INDEX, "index");
1421 flatbuffers::WIPOffset::new(o.value())
1422 }
1423 }
1424
1425 impl core::fmt::Debug for ChunkRef<'_> {
1426 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1427 let mut ds = f.debug_struct("ChunkRef");
1428 ds.field("index", &self.index());
1429 ds.field("inline", &self.inline());
1430 ds.field("offset", &self.offset());
1431 ds.field("length", &self.length());
1432 ds.field("chunk_id", &self.chunk_id());
1433 ds.field("location", &self.location());
1434 ds.field("checksum_etag", &self.checksum_etag());
1435 ds.field("checksum_last_modified", &self.checksum_last_modified());
1436 ds.field("compressed_location", &self.compressed_location());
1437 ds.field("extra", &self.extra());
1438 ds.finish()
1439 }
1440 }
1441 pub enum ArrayManifestOffset {}
1442 #[derive(Copy, Clone, PartialEq)]
1443
1444 pub struct ArrayManifest<'a> {
1445 pub _tab: flatbuffers::Table<'a>,
1446 }
1447
1448 impl<'a> flatbuffers::Follow<'a> for ArrayManifest<'a> {
1449 type Inner = ArrayManifest<'a>;
1450 #[inline]
1451 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1452 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
1453 }
1454 }
1455
1456 impl<'a> ArrayManifest<'a> {
1457 pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
1458 pub const VT_REFS: flatbuffers::VOffsetT = 6;
1459 pub const VT_EXTRA: flatbuffers::VOffsetT = 8;
1460
1461 #[inline]
1462 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1463 ArrayManifest { _tab: table }
1464 }
1465 #[allow(unused_mut)]
1466 pub fn create<
1467 'bldr: 'args,
1468 'args: 'mut_bldr,
1469 'mut_bldr,
1470 A: flatbuffers::Allocator + 'bldr,
1471 >(
1472 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1473 args: &'args ArrayManifestArgs<'args>,
1474 ) -> flatbuffers::WIPOffset<ArrayManifest<'bldr>> {
1475 let mut builder = ArrayManifestBuilder::new(_fbb);
1476 if let Some(x) = args.extra {
1477 builder.add_extra(x);
1478 }
1479 if let Some(x) = args.refs {
1480 builder.add_refs(x);
1481 }
1482 if let Some(x) = args.node_id {
1483 builder.add_node_id(x);
1484 }
1485 builder.finish()
1486 }
1487
1488 #[inline]
1489 pub fn node_id(&self) -> &'a ObjectId8 {
1490 unsafe {
1494 self._tab.get::<ObjectId8>(ArrayManifest::VT_NODE_ID, None).unwrap()
1495 }
1496 }
1497 #[inline]
1498 pub fn refs(
1499 &self,
1500 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChunkRef<'a>>> {
1501 unsafe {
1505 self._tab
1506 .get::<flatbuffers::ForwardsUOffset<
1507 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChunkRef>>,
1508 >>(ArrayManifest::VT_REFS, None)
1509 .unwrap()
1510 }
1511 }
1512 #[inline]
1513 pub fn extra(&self) -> Option<flatbuffers::Vector<'a, u8>> {
1514 unsafe {
1518 self._tab
1519 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
1520 ArrayManifest::VT_EXTRA,
1521 None,
1522 )
1523 }
1524 }
1525 }
1526
1527 impl flatbuffers::Verifiable for ArrayManifest<'_> {
1528 #[inline]
1529 fn run_verifier(
1530 v: &mut flatbuffers::Verifier,
1531 pos: usize,
1532 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1533 use self::flatbuffers::Verifiable;
1534 v.visit_table(pos)?
1535 .visit_field::<ObjectId8>("node_id", Self::VT_NODE_ID, true)?
1536 .visit_field::<flatbuffers::ForwardsUOffset<
1537 flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ChunkRef>>,
1538 >>("refs", Self::VT_REFS, true)?
1539 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>(
1540 "extra",
1541 Self::VT_EXTRA,
1542 false,
1543 )?
1544 .finish();
1545 Ok(())
1546 }
1547 }
1548 pub struct ArrayManifestArgs<'a> {
1549 pub node_id: Option<&'a ObjectId8>,
1550 pub refs: Option<
1551 flatbuffers::WIPOffset<
1552 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChunkRef<'a>>>,
1553 >,
1554 >,
1555 pub extra: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
1556 }
1557 impl<'a> Default for ArrayManifestArgs<'a> {
1558 #[inline]
1559 fn default() -> Self {
1560 ArrayManifestArgs {
1561 node_id: None, refs: None, extra: None,
1564 }
1565 }
1566 }
1567
1568 pub struct ArrayManifestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1569 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1570 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1571 }
1572 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ArrayManifestBuilder<'a, 'b, A> {
1573 #[inline]
1574 pub fn add_node_id(&mut self, node_id: &ObjectId8) {
1575 self.fbb_.push_slot_always::<&ObjectId8>(ArrayManifest::VT_NODE_ID, node_id);
1576 }
1577 #[inline]
1578 pub fn add_refs(
1579 &mut self,
1580 refs: flatbuffers::WIPOffset<
1581 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<ChunkRef<'b>>>,
1582 >,
1583 ) {
1584 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1585 ArrayManifest::VT_REFS,
1586 refs,
1587 );
1588 }
1589 #[inline]
1590 pub fn add_extra(
1591 &mut self,
1592 extra: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
1593 ) {
1594 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1595 ArrayManifest::VT_EXTRA,
1596 extra,
1597 );
1598 }
1599 #[inline]
1600 pub fn new(
1601 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1602 ) -> ArrayManifestBuilder<'a, 'b, A> {
1603 let start = _fbb.start_table();
1604 ArrayManifestBuilder { fbb_: _fbb, start_: start }
1605 }
1606 #[inline]
1607 pub fn finish(self) -> flatbuffers::WIPOffset<ArrayManifest<'a>> {
1608 let o = self.fbb_.end_table(self.start_);
1609 self.fbb_.required(o, ArrayManifest::VT_NODE_ID, "node_id");
1610 self.fbb_.required(o, ArrayManifest::VT_REFS, "refs");
1611 flatbuffers::WIPOffset::new(o.value())
1612 }
1613 }
1614
1615 impl core::fmt::Debug for ArrayManifest<'_> {
1616 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1617 let mut ds = f.debug_struct("ArrayManifest");
1618 ds.field("node_id", &self.node_id());
1619 ds.field("refs", &self.refs());
1620 ds.field("extra", &self.extra());
1621 ds.finish()
1622 }
1623 }
1624 pub enum ManifestOffset {}
1625 #[derive(Copy, Clone, PartialEq)]
1626
1627 pub struct Manifest<'a> {
1628 pub _tab: flatbuffers::Table<'a>,
1629 }
1630
1631 impl<'a> flatbuffers::Follow<'a> for Manifest<'a> {
1632 type Inner = Manifest<'a>;
1633 #[inline]
1634 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1635 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
1636 }
1637 }
1638
1639 impl<'a> Manifest<'a> {
1640 pub const VT_ID: flatbuffers::VOffsetT = 4;
1641 pub const VT_ARRAYS: flatbuffers::VOffsetT = 6;
1642 pub const VT_LOCATION_DICTIONARY: flatbuffers::VOffsetT = 8;
1643 pub const VT_COMPRESSION_ALGORITHM: flatbuffers::VOffsetT = 10;
1644 pub const VT_EXTRA: flatbuffers::VOffsetT = 12;
1645
1646 #[inline]
1647 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1648 Manifest { _tab: table }
1649 }
1650 #[allow(unused_mut)]
1651 pub fn create<
1652 'bldr: 'args,
1653 'args: 'mut_bldr,
1654 'mut_bldr,
1655 A: flatbuffers::Allocator + 'bldr,
1656 >(
1657 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1658 args: &'args ManifestArgs<'args>,
1659 ) -> flatbuffers::WIPOffset<Manifest<'bldr>> {
1660 let mut builder = ManifestBuilder::new(_fbb);
1661 if let Some(x) = args.extra {
1662 builder.add_extra(x);
1663 }
1664 if let Some(x) = args.location_dictionary {
1665 builder.add_location_dictionary(x);
1666 }
1667 if let Some(x) = args.arrays {
1668 builder.add_arrays(x);
1669 }
1670 if let Some(x) = args.id {
1671 builder.add_id(x);
1672 }
1673 builder.add_compression_algorithm(args.compression_algorithm);
1674 builder.finish()
1675 }
1676
1677 #[inline]
1678 pub fn id(&self) -> &'a ObjectId12 {
1679 unsafe { self._tab.get::<ObjectId12>(Manifest::VT_ID, None).unwrap() }
1683 }
1684 #[inline]
1685 pub fn arrays(
1686 &self,
1687 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ArrayManifest<'a>>>
1688 {
1689 unsafe {
1693 self._tab
1694 .get::<flatbuffers::ForwardsUOffset<
1695 flatbuffers::Vector<
1696 'a,
1697 flatbuffers::ForwardsUOffset<ArrayManifest>,
1698 >,
1699 >>(Manifest::VT_ARRAYS, None)
1700 .unwrap()
1701 }
1702 }
1703 #[inline]
1704 pub fn location_dictionary(&self) -> Option<flatbuffers::Vector<'a, u8>> {
1705 unsafe {
1709 self._tab
1710 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
1711 Manifest::VT_LOCATION_DICTIONARY,
1712 None,
1713 )
1714 }
1715 }
1716 #[inline]
1717 pub fn compression_algorithm(&self) -> u8 {
1718 unsafe {
1722 self._tab.get::<u8>(Manifest::VT_COMPRESSION_ALGORITHM, Some(1)).unwrap()
1723 }
1724 }
1725 #[inline]
1726 pub fn extra(&self) -> Option<flatbuffers::Vector<'a, u8>> {
1727 unsafe {
1731 self._tab
1732 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
1733 Manifest::VT_EXTRA,
1734 None,
1735 )
1736 }
1737 }
1738 }
1739
1740 impl flatbuffers::Verifiable for Manifest<'_> {
1741 #[inline]
1742 fn run_verifier(
1743 v: &mut flatbuffers::Verifier,
1744 pos: usize,
1745 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1746 use self::flatbuffers::Verifiable;
1747 v.visit_table(pos)?
1748 .visit_field::<ObjectId12>("id", Self::VT_ID, true)?
1749 .visit_field::<flatbuffers::ForwardsUOffset<
1750 flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ArrayManifest>>,
1751 >>("arrays", Self::VT_ARRAYS, true)?
1752 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>(
1753 "location_dictionary",
1754 Self::VT_LOCATION_DICTIONARY,
1755 false,
1756 )?
1757 .visit_field::<u8>(
1758 "compression_algorithm",
1759 Self::VT_COMPRESSION_ALGORITHM,
1760 false,
1761 )?
1762 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>(
1763 "extra",
1764 Self::VT_EXTRA,
1765 false,
1766 )?
1767 .finish();
1768 Ok(())
1769 }
1770 }
1771 pub struct ManifestArgs<'a> {
1772 pub id: Option<&'a ObjectId12>,
1773 pub arrays: Option<
1774 flatbuffers::WIPOffset<
1775 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ArrayManifest<'a>>>,
1776 >,
1777 >,
1778 pub location_dictionary:
1779 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
1780 pub compression_algorithm: u8,
1781 pub extra: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
1782 }
1783 impl<'a> Default for ManifestArgs<'a> {
1784 #[inline]
1785 fn default() -> Self {
1786 ManifestArgs {
1787 id: None, arrays: None, location_dictionary: None,
1790 compression_algorithm: 1,
1791 extra: None,
1792 }
1793 }
1794 }
1795
1796 pub struct ManifestBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1797 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1798 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
1799 }
1800 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ManifestBuilder<'a, 'b, A> {
1801 #[inline]
1802 pub fn add_id(&mut self, id: &ObjectId12) {
1803 self.fbb_.push_slot_always::<&ObjectId12>(Manifest::VT_ID, id);
1804 }
1805 #[inline]
1806 pub fn add_arrays(
1807 &mut self,
1808 arrays: flatbuffers::WIPOffset<
1809 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<ArrayManifest<'b>>>,
1810 >,
1811 ) {
1812 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1813 Manifest::VT_ARRAYS,
1814 arrays,
1815 );
1816 }
1817 #[inline]
1818 pub fn add_location_dictionary(
1819 &mut self,
1820 location_dictionary: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
1821 ) {
1822 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
1823 Manifest::VT_LOCATION_DICTIONARY,
1824 location_dictionary,
1825 );
1826 }
1827 #[inline]
1828 pub fn add_compression_algorithm(&mut self, compression_algorithm: u8) {
1829 self.fbb_.push_slot::<u8>(
1830 Manifest::VT_COMPRESSION_ALGORITHM,
1831 compression_algorithm,
1832 1,
1833 );
1834 }
1835 #[inline]
1836 pub fn add_extra(
1837 &mut self,
1838 extra: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
1839 ) {
1840 self.fbb_
1841 .push_slot_always::<flatbuffers::WIPOffset<_>>(Manifest::VT_EXTRA, extra);
1842 }
1843 #[inline]
1844 pub fn new(
1845 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1846 ) -> ManifestBuilder<'a, 'b, A> {
1847 let start = _fbb.start_table();
1848 ManifestBuilder { fbb_: _fbb, start_: start }
1849 }
1850 #[inline]
1851 pub fn finish(self) -> flatbuffers::WIPOffset<Manifest<'a>> {
1852 let o = self.fbb_.end_table(self.start_);
1853 self.fbb_.required(o, Manifest::VT_ID, "id");
1854 self.fbb_.required(o, Manifest::VT_ARRAYS, "arrays");
1855 flatbuffers::WIPOffset::new(o.value())
1856 }
1857 }
1858
1859 impl core::fmt::Debug for Manifest<'_> {
1860 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
1861 let mut ds = f.debug_struct("Manifest");
1862 ds.field("id", &self.id());
1863 ds.field("arrays", &self.arrays());
1864 ds.field("location_dictionary", &self.location_dictionary());
1865 ds.field("compression_algorithm", &self.compression_algorithm());
1866 ds.field("extra", &self.extra());
1867 ds.finish()
1868 }
1869 }
1870 pub enum ManifestFileInfoV2Offset {}
1871 #[derive(Copy, Clone, PartialEq)]
1872
1873 pub struct ManifestFileInfoV2<'a> {
1874 pub _tab: flatbuffers::Table<'a>,
1875 }
1876
1877 impl<'a> flatbuffers::Follow<'a> for ManifestFileInfoV2<'a> {
1878 type Inner = ManifestFileInfoV2<'a>;
1879 #[inline]
1880 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
1881 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
1882 }
1883 }
1884
1885 impl<'a> ManifestFileInfoV2<'a> {
1886 pub const VT_ID: flatbuffers::VOffsetT = 4;
1887 pub const VT_SIZE_BYTES: flatbuffers::VOffsetT = 6;
1888 pub const VT_NUM_CHUNK_REFS: flatbuffers::VOffsetT = 8;
1889 pub const VT_EXTRA: flatbuffers::VOffsetT = 10;
1890
1891 #[inline]
1892 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
1893 ManifestFileInfoV2 { _tab: table }
1894 }
1895 #[allow(unused_mut)]
1896 pub fn create<
1897 'bldr: 'args,
1898 'args: 'mut_bldr,
1899 'mut_bldr,
1900 A: flatbuffers::Allocator + 'bldr,
1901 >(
1902 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
1903 args: &'args ManifestFileInfoV2Args<'args>,
1904 ) -> flatbuffers::WIPOffset<ManifestFileInfoV2<'bldr>> {
1905 let mut builder = ManifestFileInfoV2Builder::new(_fbb);
1906 builder.add_size_bytes(args.size_bytes);
1907 if let Some(x) = args.extra {
1908 builder.add_extra(x);
1909 }
1910 builder.add_num_chunk_refs(args.num_chunk_refs);
1911 if let Some(x) = args.id {
1912 builder.add_id(x);
1913 }
1914 builder.finish()
1915 }
1916
1917 #[inline]
1918 pub fn id(&self) -> Option<&'a ObjectId12> {
1919 unsafe { self._tab.get::<ObjectId12>(ManifestFileInfoV2::VT_ID, None) }
1923 }
1924 #[inline]
1925 pub fn size_bytes(&self) -> u64 {
1926 unsafe {
1930 self._tab.get::<u64>(ManifestFileInfoV2::VT_SIZE_BYTES, Some(0)).unwrap()
1931 }
1932 }
1933 #[inline]
1934 pub fn num_chunk_refs(&self) -> u32 {
1935 unsafe {
1939 self._tab
1940 .get::<u32>(ManifestFileInfoV2::VT_NUM_CHUNK_REFS, Some(0))
1941 .unwrap()
1942 }
1943 }
1944 #[inline]
1945 pub fn extra(&self) -> Option<flatbuffers::Vector<'a, u8>> {
1946 unsafe {
1950 self._tab
1951 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
1952 ManifestFileInfoV2::VT_EXTRA,
1953 None,
1954 )
1955 }
1956 }
1957 }
1958
1959 impl flatbuffers::Verifiable for ManifestFileInfoV2<'_> {
1960 #[inline]
1961 fn run_verifier(
1962 v: &mut flatbuffers::Verifier,
1963 pos: usize,
1964 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
1965 use self::flatbuffers::Verifiable;
1966 v.visit_table(pos)?
1967 .visit_field::<ObjectId12>("id", Self::VT_ID, false)?
1968 .visit_field::<u64>("size_bytes", Self::VT_SIZE_BYTES, false)?
1969 .visit_field::<u32>("num_chunk_refs", Self::VT_NUM_CHUNK_REFS, false)?
1970 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>(
1971 "extra",
1972 Self::VT_EXTRA,
1973 false,
1974 )?
1975 .finish();
1976 Ok(())
1977 }
1978 }
1979 pub struct ManifestFileInfoV2Args<'a> {
1980 pub id: Option<&'a ObjectId12>,
1981 pub size_bytes: u64,
1982 pub num_chunk_refs: u32,
1983 pub extra: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
1984 }
1985 impl<'a> Default for ManifestFileInfoV2Args<'a> {
1986 #[inline]
1987 fn default() -> Self {
1988 ManifestFileInfoV2Args {
1989 id: None,
1990 size_bytes: 0,
1991 num_chunk_refs: 0,
1992 extra: None,
1993 }
1994 }
1995 }
1996
1997 pub struct ManifestFileInfoV2Builder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
1998 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
1999 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2000 }
2001 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ManifestFileInfoV2Builder<'a, 'b, A> {
2002 #[inline]
2003 pub fn add_id(&mut self, id: &ObjectId12) {
2004 self.fbb_.push_slot_always::<&ObjectId12>(ManifestFileInfoV2::VT_ID, id);
2005 }
2006 #[inline]
2007 pub fn add_size_bytes(&mut self, size_bytes: u64) {
2008 self.fbb_.push_slot::<u64>(ManifestFileInfoV2::VT_SIZE_BYTES, size_bytes, 0);
2009 }
2010 #[inline]
2011 pub fn add_num_chunk_refs(&mut self, num_chunk_refs: u32) {
2012 self.fbb_.push_slot::<u32>(
2013 ManifestFileInfoV2::VT_NUM_CHUNK_REFS,
2014 num_chunk_refs,
2015 0,
2016 );
2017 }
2018 #[inline]
2019 pub fn add_extra(
2020 &mut self,
2021 extra: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
2022 ) {
2023 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2024 ManifestFileInfoV2::VT_EXTRA,
2025 extra,
2026 );
2027 }
2028 #[inline]
2029 pub fn new(
2030 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2031 ) -> ManifestFileInfoV2Builder<'a, 'b, A> {
2032 let start = _fbb.start_table();
2033 ManifestFileInfoV2Builder { fbb_: _fbb, start_: start }
2034 }
2035 #[inline]
2036 pub fn finish(self) -> flatbuffers::WIPOffset<ManifestFileInfoV2<'a>> {
2037 let o = self.fbb_.end_table(self.start_);
2038 flatbuffers::WIPOffset::new(o.value())
2039 }
2040 }
2041
2042 impl core::fmt::Debug for ManifestFileInfoV2<'_> {
2043 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2044 let mut ds = f.debug_struct("ManifestFileInfoV2");
2045 ds.field("id", &self.id());
2046 ds.field("size_bytes", &self.size_bytes());
2047 ds.field("num_chunk_refs", &self.num_chunk_refs());
2048 ds.field("extra", &self.extra());
2049 ds.finish()
2050 }
2051 }
2052 pub enum ManifestRefOffset {}
2053 #[derive(Copy, Clone, PartialEq)]
2054
2055 pub struct ManifestRef<'a> {
2056 pub _tab: flatbuffers::Table<'a>,
2057 }
2058
2059 impl<'a> flatbuffers::Follow<'a> for ManifestRef<'a> {
2060 type Inner = ManifestRef<'a>;
2061 #[inline]
2062 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2063 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
2064 }
2065 }
2066
2067 impl<'a> ManifestRef<'a> {
2068 pub const VT_OBJECT_ID: flatbuffers::VOffsetT = 4;
2069 pub const VT_EXTENTS: flatbuffers::VOffsetT = 6;
2070
2071 #[inline]
2072 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2073 ManifestRef { _tab: table }
2074 }
2075 #[allow(unused_mut)]
2076 pub fn create<
2077 'bldr: 'args,
2078 'args: 'mut_bldr,
2079 'mut_bldr,
2080 A: flatbuffers::Allocator + 'bldr,
2081 >(
2082 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2083 args: &'args ManifestRefArgs<'args>,
2084 ) -> flatbuffers::WIPOffset<ManifestRef<'bldr>> {
2085 let mut builder = ManifestRefBuilder::new(_fbb);
2086 if let Some(x) = args.extents {
2087 builder.add_extents(x);
2088 }
2089 if let Some(x) = args.object_id {
2090 builder.add_object_id(x);
2091 }
2092 builder.finish()
2093 }
2094
2095 #[inline]
2096 pub fn object_id(&self) -> &'a ObjectId12 {
2097 unsafe {
2101 self._tab.get::<ObjectId12>(ManifestRef::VT_OBJECT_ID, None).unwrap()
2102 }
2103 }
2104 #[inline]
2105 pub fn extents(&self) -> flatbuffers::Vector<'a, ChunkIndexRange> {
2106 unsafe {
2110 self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, ChunkIndexRange>>>(ManifestRef::VT_EXTENTS, None).unwrap()
2111 }
2112 }
2113 }
2114
2115 impl flatbuffers::Verifiable for ManifestRef<'_> {
2116 #[inline]
2117 fn run_verifier(
2118 v: &mut flatbuffers::Verifier,
2119 pos: usize,
2120 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2121 use self::flatbuffers::Verifiable;
2122 v.visit_table(pos)?
2123 .visit_field::<ObjectId12>("object_id", Self::VT_OBJECT_ID, true)?
2124 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, ChunkIndexRange>>>("extents", Self::VT_EXTENTS, true)?
2125 .finish();
2126 Ok(())
2127 }
2128 }
2129 pub struct ManifestRefArgs<'a> {
2130 pub object_id: Option<&'a ObjectId12>,
2131 pub extents:
2132 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, ChunkIndexRange>>>,
2133 }
2134 impl<'a> Default for ManifestRefArgs<'a> {
2135 #[inline]
2136 fn default() -> Self {
2137 ManifestRefArgs {
2138 object_id: None, extents: None, }
2141 }
2142 }
2143
2144 pub struct ManifestRefBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2145 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2146 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2147 }
2148 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ManifestRefBuilder<'a, 'b, A> {
2149 #[inline]
2150 pub fn add_object_id(&mut self, object_id: &ObjectId12) {
2151 self.fbb_
2152 .push_slot_always::<&ObjectId12>(ManifestRef::VT_OBJECT_ID, object_id);
2153 }
2154 #[inline]
2155 pub fn add_extents(
2156 &mut self,
2157 extents: flatbuffers::WIPOffset<flatbuffers::Vector<'b, ChunkIndexRange>>,
2158 ) {
2159 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2160 ManifestRef::VT_EXTENTS,
2161 extents,
2162 );
2163 }
2164 #[inline]
2165 pub fn new(
2166 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2167 ) -> ManifestRefBuilder<'a, 'b, A> {
2168 let start = _fbb.start_table();
2169 ManifestRefBuilder { fbb_: _fbb, start_: start }
2170 }
2171 #[inline]
2172 pub fn finish(self) -> flatbuffers::WIPOffset<ManifestRef<'a>> {
2173 let o = self.fbb_.end_table(self.start_);
2174 self.fbb_.required(o, ManifestRef::VT_OBJECT_ID, "object_id");
2175 self.fbb_.required(o, ManifestRef::VT_EXTENTS, "extents");
2176 flatbuffers::WIPOffset::new(o.value())
2177 }
2178 }
2179
2180 impl core::fmt::Debug for ManifestRef<'_> {
2181 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2182 let mut ds = f.debug_struct("ManifestRef");
2183 ds.field("object_id", &self.object_id());
2184 ds.field("extents", &self.extents());
2185 ds.finish()
2186 }
2187 }
2188 pub enum DimensionShapeV2Offset {}
2189 #[derive(Copy, Clone, PartialEq)]
2190
2191 pub struct DimensionShapeV2<'a> {
2192 pub _tab: flatbuffers::Table<'a>,
2193 }
2194
2195 impl<'a> flatbuffers::Follow<'a> for DimensionShapeV2<'a> {
2196 type Inner = DimensionShapeV2<'a>;
2197 #[inline]
2198 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2199 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
2200 }
2201 }
2202
2203 impl<'a> DimensionShapeV2<'a> {
2204 pub const VT_ARRAY_LENGTH: flatbuffers::VOffsetT = 4;
2205 pub const VT_NUM_CHUNKS: flatbuffers::VOffsetT = 6;
2206
2207 #[inline]
2208 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2209 DimensionShapeV2 { _tab: table }
2210 }
2211 #[allow(unused_mut)]
2212 pub fn create<
2213 'bldr: 'args,
2214 'args: 'mut_bldr,
2215 'mut_bldr,
2216 A: flatbuffers::Allocator + 'bldr,
2217 >(
2218 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2219 args: &'args DimensionShapeV2Args,
2220 ) -> flatbuffers::WIPOffset<DimensionShapeV2<'bldr>> {
2221 let mut builder = DimensionShapeV2Builder::new(_fbb);
2222 builder.add_array_length(args.array_length);
2223 builder.add_num_chunks(args.num_chunks);
2224 builder.finish()
2225 }
2226
2227 #[inline]
2228 pub fn array_length(&self) -> u64 {
2229 unsafe {
2233 self._tab.get::<u64>(DimensionShapeV2::VT_ARRAY_LENGTH, Some(0)).unwrap()
2234 }
2235 }
2236 #[inline]
2237 pub fn num_chunks(&self) -> u32 {
2238 unsafe {
2242 self._tab.get::<u32>(DimensionShapeV2::VT_NUM_CHUNKS, Some(0)).unwrap()
2243 }
2244 }
2245 }
2246
2247 impl flatbuffers::Verifiable for DimensionShapeV2<'_> {
2248 #[inline]
2249 fn run_verifier(
2250 v: &mut flatbuffers::Verifier,
2251 pos: usize,
2252 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2253 use self::flatbuffers::Verifiable;
2254 v.visit_table(pos)?
2255 .visit_field::<u64>("array_length", Self::VT_ARRAY_LENGTH, false)?
2256 .visit_field::<u32>("num_chunks", Self::VT_NUM_CHUNKS, false)?
2257 .finish();
2258 Ok(())
2259 }
2260 }
2261 pub struct DimensionShapeV2Args {
2262 pub array_length: u64,
2263 pub num_chunks: u32,
2264 }
2265 impl<'a> Default for DimensionShapeV2Args {
2266 #[inline]
2267 fn default() -> Self {
2268 DimensionShapeV2Args { array_length: 0, num_chunks: 0 }
2269 }
2270 }
2271
2272 pub struct DimensionShapeV2Builder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2273 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2274 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2275 }
2276 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DimensionShapeV2Builder<'a, 'b, A> {
2277 #[inline]
2278 pub fn add_array_length(&mut self, array_length: u64) {
2279 self.fbb_.push_slot::<u64>(
2280 DimensionShapeV2::VT_ARRAY_LENGTH,
2281 array_length,
2282 0,
2283 );
2284 }
2285 #[inline]
2286 pub fn add_num_chunks(&mut self, num_chunks: u32) {
2287 self.fbb_.push_slot::<u32>(DimensionShapeV2::VT_NUM_CHUNKS, num_chunks, 0);
2288 }
2289 #[inline]
2290 pub fn new(
2291 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2292 ) -> DimensionShapeV2Builder<'a, 'b, A> {
2293 let start = _fbb.start_table();
2294 DimensionShapeV2Builder { fbb_: _fbb, start_: start }
2295 }
2296 #[inline]
2297 pub fn finish(self) -> flatbuffers::WIPOffset<DimensionShapeV2<'a>> {
2298 let o = self.fbb_.end_table(self.start_);
2299 flatbuffers::WIPOffset::new(o.value())
2300 }
2301 }
2302
2303 impl core::fmt::Debug for DimensionShapeV2<'_> {
2304 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2305 let mut ds = f.debug_struct("DimensionShapeV2");
2306 ds.field("array_length", &self.array_length());
2307 ds.field("num_chunks", &self.num_chunks());
2308 ds.finish()
2309 }
2310 }
2311 pub enum DimensionNameOffset {}
2312 #[derive(Copy, Clone, PartialEq)]
2313
2314 pub struct DimensionName<'a> {
2315 pub _tab: flatbuffers::Table<'a>,
2316 }
2317
2318 impl<'a> flatbuffers::Follow<'a> for DimensionName<'a> {
2319 type Inner = DimensionName<'a>;
2320 #[inline]
2321 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2322 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
2323 }
2324 }
2325
2326 impl<'a> DimensionName<'a> {
2327 pub const VT_NAME: flatbuffers::VOffsetT = 4;
2328
2329 #[inline]
2330 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2331 DimensionName { _tab: table }
2332 }
2333 #[allow(unused_mut)]
2334 pub fn create<
2335 'bldr: 'args,
2336 'args: 'mut_bldr,
2337 'mut_bldr,
2338 A: flatbuffers::Allocator + 'bldr,
2339 >(
2340 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2341 args: &'args DimensionNameArgs<'args>,
2342 ) -> flatbuffers::WIPOffset<DimensionName<'bldr>> {
2343 let mut builder = DimensionNameBuilder::new(_fbb);
2344 if let Some(x) = args.name {
2345 builder.add_name(x);
2346 }
2347 builder.finish()
2348 }
2349
2350 #[inline]
2351 pub fn name(&self) -> Option<&'a str> {
2352 unsafe {
2356 self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(
2357 DimensionName::VT_NAME,
2358 None,
2359 )
2360 }
2361 }
2362 }
2363
2364 impl flatbuffers::Verifiable for DimensionName<'_> {
2365 #[inline]
2366 fn run_verifier(
2367 v: &mut flatbuffers::Verifier,
2368 pos: usize,
2369 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2370 use self::flatbuffers::Verifiable;
2371 v.visit_table(pos)?
2372 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
2373 "name",
2374 Self::VT_NAME,
2375 false,
2376 )?
2377 .finish();
2378 Ok(())
2379 }
2380 }
2381 pub struct DimensionNameArgs<'a> {
2382 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
2383 }
2384 impl<'a> Default for DimensionNameArgs<'a> {
2385 #[inline]
2386 fn default() -> Self {
2387 DimensionNameArgs { name: None }
2388 }
2389 }
2390
2391 pub struct DimensionNameBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2392 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2393 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2394 }
2395 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> DimensionNameBuilder<'a, 'b, A> {
2396 #[inline]
2397 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
2398 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2399 DimensionName::VT_NAME,
2400 name,
2401 );
2402 }
2403 #[inline]
2404 pub fn new(
2405 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2406 ) -> DimensionNameBuilder<'a, 'b, A> {
2407 let start = _fbb.start_table();
2408 DimensionNameBuilder { fbb_: _fbb, start_: start }
2409 }
2410 #[inline]
2411 pub fn finish(self) -> flatbuffers::WIPOffset<DimensionName<'a>> {
2412 let o = self.fbb_.end_table(self.start_);
2413 flatbuffers::WIPOffset::new(o.value())
2414 }
2415 }
2416
2417 impl core::fmt::Debug for DimensionName<'_> {
2418 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2419 let mut ds = f.debug_struct("DimensionName");
2420 ds.field("name", &self.name());
2421 ds.finish()
2422 }
2423 }
2424 pub enum GroupNodeDataOffset {}
2425 #[derive(Copy, Clone, PartialEq)]
2426
2427 pub struct GroupNodeData<'a> {
2428 pub _tab: flatbuffers::Table<'a>,
2429 }
2430
2431 impl<'a> flatbuffers::Follow<'a> for GroupNodeData<'a> {
2432 type Inner = GroupNodeData<'a>;
2433 #[inline]
2434 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2435 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
2436 }
2437 }
2438
2439 impl<'a> GroupNodeData<'a> {
2440 #[inline]
2441 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2442 GroupNodeData { _tab: table }
2443 }
2444 #[allow(unused_mut)]
2445 pub fn create<
2446 'bldr: 'args,
2447 'args: 'mut_bldr,
2448 'mut_bldr,
2449 A: flatbuffers::Allocator + 'bldr,
2450 >(
2451 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2452 _args: &'args GroupNodeDataArgs,
2453 ) -> flatbuffers::WIPOffset<GroupNodeData<'bldr>> {
2454 let mut builder = GroupNodeDataBuilder::new(_fbb);
2455 builder.finish()
2456 }
2457 }
2458
2459 impl flatbuffers::Verifiable for GroupNodeData<'_> {
2460 #[inline]
2461 fn run_verifier(
2462 v: &mut flatbuffers::Verifier,
2463 pos: usize,
2464 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2465 use self::flatbuffers::Verifiable;
2466 v.visit_table(pos)?.finish();
2467 Ok(())
2468 }
2469 }
2470 pub struct GroupNodeDataArgs {}
2471 impl<'a> Default for GroupNodeDataArgs {
2472 #[inline]
2473 fn default() -> Self {
2474 GroupNodeDataArgs {}
2475 }
2476 }
2477
2478 pub struct GroupNodeDataBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2479 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2480 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2481 }
2482 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GroupNodeDataBuilder<'a, 'b, A> {
2483 #[inline]
2484 pub fn new(
2485 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2486 ) -> GroupNodeDataBuilder<'a, 'b, A> {
2487 let start = _fbb.start_table();
2488 GroupNodeDataBuilder { fbb_: _fbb, start_: start }
2489 }
2490 #[inline]
2491 pub fn finish(self) -> flatbuffers::WIPOffset<GroupNodeData<'a>> {
2492 let o = self.fbb_.end_table(self.start_);
2493 flatbuffers::WIPOffset::new(o.value())
2494 }
2495 }
2496
2497 impl core::fmt::Debug for GroupNodeData<'_> {
2498 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2499 let mut ds = f.debug_struct("GroupNodeData");
2500 ds.finish()
2501 }
2502 }
2503 pub enum ArrayNodeDataOffset {}
2504 #[derive(Copy, Clone, PartialEq)]
2505
2506 pub struct ArrayNodeData<'a> {
2507 pub _tab: flatbuffers::Table<'a>,
2508 }
2509
2510 impl<'a> flatbuffers::Follow<'a> for ArrayNodeData<'a> {
2511 type Inner = ArrayNodeData<'a>;
2512 #[inline]
2513 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2514 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
2515 }
2516 }
2517
2518 impl<'a> ArrayNodeData<'a> {
2519 pub const VT_SHAPE: flatbuffers::VOffsetT = 4;
2520 pub const VT_DIMENSION_NAMES: flatbuffers::VOffsetT = 6;
2521 pub const VT_MANIFESTS: flatbuffers::VOffsetT = 8;
2522 pub const VT_SHAPE_V2: flatbuffers::VOffsetT = 10;
2523
2524 #[inline]
2525 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2526 ArrayNodeData { _tab: table }
2527 }
2528 #[allow(unused_mut)]
2529 pub fn create<
2530 'bldr: 'args,
2531 'args: 'mut_bldr,
2532 'mut_bldr,
2533 A: flatbuffers::Allocator + 'bldr,
2534 >(
2535 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2536 args: &'args ArrayNodeDataArgs<'args>,
2537 ) -> flatbuffers::WIPOffset<ArrayNodeData<'bldr>> {
2538 let mut builder = ArrayNodeDataBuilder::new(_fbb);
2539 if let Some(x) = args.shape_v2 {
2540 builder.add_shape_v2(x);
2541 }
2542 if let Some(x) = args.manifests {
2543 builder.add_manifests(x);
2544 }
2545 if let Some(x) = args.dimension_names {
2546 builder.add_dimension_names(x);
2547 }
2548 if let Some(x) = args.shape {
2549 builder.add_shape(x);
2550 }
2551 builder.finish()
2552 }
2553
2554 #[inline]
2555 pub fn shape(&self) -> flatbuffers::Vector<'a, DimensionShape> {
2556 unsafe {
2560 self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, DimensionShape>>>(ArrayNodeData::VT_SHAPE, None).unwrap()
2561 }
2562 }
2563 #[inline]
2564 pub fn dimension_names(
2565 &self,
2566 ) -> Option<
2567 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<DimensionName<'a>>>,
2568 > {
2569 unsafe {
2573 self._tab.get::<flatbuffers::ForwardsUOffset<
2574 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<DimensionName>>,
2575 >>(ArrayNodeData::VT_DIMENSION_NAMES, None)
2576 }
2577 }
2578 #[inline]
2579 pub fn manifests(
2580 &self,
2581 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ManifestRef<'a>>>
2582 {
2583 unsafe {
2587 self._tab
2588 .get::<flatbuffers::ForwardsUOffset<
2589 flatbuffers::Vector<
2590 'a,
2591 flatbuffers::ForwardsUOffset<ManifestRef>,
2592 >,
2593 >>(ArrayNodeData::VT_MANIFESTS, None)
2594 .unwrap()
2595 }
2596 }
2597 #[inline]
2598 pub fn shape_v2(
2599 &self,
2600 ) -> Option<
2601 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<DimensionShapeV2<'a>>>,
2602 > {
2603 unsafe {
2607 self._tab.get::<flatbuffers::ForwardsUOffset<
2608 flatbuffers::Vector<
2609 'a,
2610 flatbuffers::ForwardsUOffset<DimensionShapeV2>,
2611 >,
2612 >>(ArrayNodeData::VT_SHAPE_V2, None)
2613 }
2614 }
2615 }
2616
2617 impl flatbuffers::Verifiable for ArrayNodeData<'_> {
2618 #[inline]
2619 fn run_verifier(
2620 v: &mut flatbuffers::Verifier,
2621 pos: usize,
2622 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2623 use self::flatbuffers::Verifiable;
2624 v.visit_table(pos)?
2625 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, DimensionShape>>>("shape", Self::VT_SHAPE, true)?
2626 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<DimensionName>>>>("dimension_names", Self::VT_DIMENSION_NAMES, false)?
2627 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ManifestRef>>>>("manifests", Self::VT_MANIFESTS, true)?
2628 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<DimensionShapeV2>>>>("shape_v2", Self::VT_SHAPE_V2, false)?
2629 .finish();
2630 Ok(())
2631 }
2632 }
2633 pub struct ArrayNodeDataArgs<'a> {
2634 pub shape:
2635 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, DimensionShape>>>,
2636 pub dimension_names: Option<
2637 flatbuffers::WIPOffset<
2638 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<DimensionName<'a>>>,
2639 >,
2640 >,
2641 pub manifests: Option<
2642 flatbuffers::WIPOffset<
2643 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ManifestRef<'a>>>,
2644 >,
2645 >,
2646 pub shape_v2: Option<
2647 flatbuffers::WIPOffset<
2648 flatbuffers::Vector<
2649 'a,
2650 flatbuffers::ForwardsUOffset<DimensionShapeV2<'a>>,
2651 >,
2652 >,
2653 >,
2654 }
2655 impl<'a> Default for ArrayNodeDataArgs<'a> {
2656 #[inline]
2657 fn default() -> Self {
2658 ArrayNodeDataArgs {
2659 shape: None, dimension_names: None,
2661 manifests: None, shape_v2: None,
2663 }
2664 }
2665 }
2666
2667 pub struct ArrayNodeDataBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2668 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2669 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2670 }
2671 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ArrayNodeDataBuilder<'a, 'b, A> {
2672 #[inline]
2673 pub fn add_shape(
2674 &mut self,
2675 shape: flatbuffers::WIPOffset<flatbuffers::Vector<'b, DimensionShape>>,
2676 ) {
2677 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2678 ArrayNodeData::VT_SHAPE,
2679 shape,
2680 );
2681 }
2682 #[inline]
2683 pub fn add_dimension_names(
2684 &mut self,
2685 dimension_names: flatbuffers::WIPOffset<
2686 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<DimensionName<'b>>>,
2687 >,
2688 ) {
2689 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2690 ArrayNodeData::VT_DIMENSION_NAMES,
2691 dimension_names,
2692 );
2693 }
2694 #[inline]
2695 pub fn add_manifests(
2696 &mut self,
2697 manifests: flatbuffers::WIPOffset<
2698 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<ManifestRef<'b>>>,
2699 >,
2700 ) {
2701 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2702 ArrayNodeData::VT_MANIFESTS,
2703 manifests,
2704 );
2705 }
2706 #[inline]
2707 pub fn add_shape_v2(
2708 &mut self,
2709 shape_v2: flatbuffers::WIPOffset<
2710 flatbuffers::Vector<
2711 'b,
2712 flatbuffers::ForwardsUOffset<DimensionShapeV2<'b>>,
2713 >,
2714 >,
2715 ) {
2716 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2717 ArrayNodeData::VT_SHAPE_V2,
2718 shape_v2,
2719 );
2720 }
2721 #[inline]
2722 pub fn new(
2723 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2724 ) -> ArrayNodeDataBuilder<'a, 'b, A> {
2725 let start = _fbb.start_table();
2726 ArrayNodeDataBuilder { fbb_: _fbb, start_: start }
2727 }
2728 #[inline]
2729 pub fn finish(self) -> flatbuffers::WIPOffset<ArrayNodeData<'a>> {
2730 let o = self.fbb_.end_table(self.start_);
2731 self.fbb_.required(o, ArrayNodeData::VT_SHAPE, "shape");
2732 self.fbb_.required(o, ArrayNodeData::VT_MANIFESTS, "manifests");
2733 flatbuffers::WIPOffset::new(o.value())
2734 }
2735 }
2736
2737 impl core::fmt::Debug for ArrayNodeData<'_> {
2738 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
2739 let mut ds = f.debug_struct("ArrayNodeData");
2740 ds.field("shape", &self.shape());
2741 ds.field("dimension_names", &self.dimension_names());
2742 ds.field("manifests", &self.manifests());
2743 ds.field("shape_v2", &self.shape_v2());
2744 ds.finish()
2745 }
2746 }
2747 pub enum NodeSnapshotOffset {}
2748 #[derive(Copy, Clone, PartialEq)]
2749
2750 pub struct NodeSnapshot<'a> {
2751 pub _tab: flatbuffers::Table<'a>,
2752 }
2753
2754 impl<'a> flatbuffers::Follow<'a> for NodeSnapshot<'a> {
2755 type Inner = NodeSnapshot<'a>;
2756 #[inline]
2757 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
2758 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
2759 }
2760 }
2761
2762 impl<'a> NodeSnapshot<'a> {
2763 pub const VT_ID: flatbuffers::VOffsetT = 4;
2764 pub const VT_PATH: flatbuffers::VOffsetT = 6;
2765 pub const VT_USER_DATA: flatbuffers::VOffsetT = 8;
2766 pub const VT_NODE_DATA_TYPE: flatbuffers::VOffsetT = 10;
2767 pub const VT_NODE_DATA: flatbuffers::VOffsetT = 12;
2768 pub const VT_EXTRA: flatbuffers::VOffsetT = 14;
2769
2770 #[inline]
2771 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
2772 NodeSnapshot { _tab: table }
2773 }
2774 #[allow(unused_mut)]
2775 pub fn create<
2776 'bldr: 'args,
2777 'args: 'mut_bldr,
2778 'mut_bldr,
2779 A: flatbuffers::Allocator + 'bldr,
2780 >(
2781 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
2782 args: &'args NodeSnapshotArgs<'args>,
2783 ) -> flatbuffers::WIPOffset<NodeSnapshot<'bldr>> {
2784 let mut builder = NodeSnapshotBuilder::new(_fbb);
2785 if let Some(x) = args.extra {
2786 builder.add_extra(x);
2787 }
2788 if let Some(x) = args.node_data {
2789 builder.add_node_data(x);
2790 }
2791 if let Some(x) = args.user_data {
2792 builder.add_user_data(x);
2793 }
2794 if let Some(x) = args.path {
2795 builder.add_path(x);
2796 }
2797 if let Some(x) = args.id {
2798 builder.add_id(x);
2799 }
2800 builder.add_node_data_type(args.node_data_type);
2801 builder.finish()
2802 }
2803
2804 #[inline]
2805 pub fn id(&self) -> &'a ObjectId8 {
2806 unsafe { self._tab.get::<ObjectId8>(NodeSnapshot::VT_ID, None).unwrap() }
2810 }
2811 #[inline]
2812 pub fn path(&self) -> &'a str {
2813 unsafe {
2817 self._tab
2818 .get::<flatbuffers::ForwardsUOffset<&str>>(
2819 NodeSnapshot::VT_PATH,
2820 None,
2821 )
2822 .unwrap()
2823 }
2824 }
2825 #[inline]
2826 pub fn user_data(&self) -> flatbuffers::Vector<'a, u8> {
2827 unsafe {
2831 self._tab
2832 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
2833 NodeSnapshot::VT_USER_DATA,
2834 None,
2835 )
2836 .unwrap()
2837 }
2838 }
2839 #[inline]
2840 pub fn node_data_type(&self) -> NodeData {
2841 unsafe {
2845 self._tab
2846 .get::<NodeData>(
2847 NodeSnapshot::VT_NODE_DATA_TYPE,
2848 Some(NodeData::NONE),
2849 )
2850 .unwrap()
2851 }
2852 }
2853 #[inline]
2854 pub fn node_data(&self) -> flatbuffers::Table<'a> {
2855 unsafe {
2859 self._tab
2860 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(
2861 NodeSnapshot::VT_NODE_DATA,
2862 None,
2863 )
2864 .unwrap()
2865 }
2866 }
2867 #[inline]
2868 pub fn extra(&self) -> Option<flatbuffers::Vector<'a, u8>> {
2869 unsafe {
2873 self._tab
2874 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
2875 NodeSnapshot::VT_EXTRA,
2876 None,
2877 )
2878 }
2879 }
2880 #[inline]
2881 #[allow(non_snake_case)]
2882 pub fn node_data_as_array(&self) -> Option<ArrayNodeData<'a>> {
2883 if self.node_data_type() == NodeData::Array {
2884 let u = self.node_data();
2885 Some(unsafe { ArrayNodeData::init_from_table(u) })
2889 } else {
2890 None
2891 }
2892 }
2893
2894 #[inline]
2895 #[allow(non_snake_case)]
2896 pub fn node_data_as_group(&self) -> Option<GroupNodeData<'a>> {
2897 if self.node_data_type() == NodeData::Group {
2898 let u = self.node_data();
2899 Some(unsafe { GroupNodeData::init_from_table(u) })
2903 } else {
2904 None
2905 }
2906 }
2907 }
2908
2909 impl flatbuffers::Verifiable for NodeSnapshot<'_> {
2910 #[inline]
2911 fn run_verifier(
2912 v: &mut flatbuffers::Verifier,
2913 pos: usize,
2914 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
2915 use self::flatbuffers::Verifiable;
2916 v.visit_table(pos)?
2917 .visit_field::<ObjectId8>("id", Self::VT_ID, true)?
2918 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("path", Self::VT_PATH, true)?
2919 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>("user_data", Self::VT_USER_DATA, true)?
2920 .visit_union::<NodeData, _>("node_data_type", Self::VT_NODE_DATA_TYPE, "node_data", Self::VT_NODE_DATA, true, |key, v, pos| {
2921 match key {
2922 NodeData::Array => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ArrayNodeData>>("NodeData::Array", pos),
2923 NodeData::Group => v.verify_union_variant::<flatbuffers::ForwardsUOffset<GroupNodeData>>("NodeData::Group", pos),
2924 _ => Ok(()),
2925 }
2926 })?
2927 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>("extra", Self::VT_EXTRA, false)?
2928 .finish();
2929 Ok(())
2930 }
2931 }
2932 pub struct NodeSnapshotArgs<'a> {
2933 pub id: Option<&'a ObjectId8>,
2934 pub path: Option<flatbuffers::WIPOffset<&'a str>>,
2935 pub user_data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
2936 pub node_data_type: NodeData,
2937 pub node_data: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
2938 pub extra: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
2939 }
2940 impl<'a> Default for NodeSnapshotArgs<'a> {
2941 #[inline]
2942 fn default() -> Self {
2943 NodeSnapshotArgs {
2944 id: None, path: None, user_data: None, node_data_type: NodeData::NONE,
2948 node_data: None, extra: None,
2950 }
2951 }
2952 }
2953
2954 pub struct NodeSnapshotBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
2955 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
2956 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
2957 }
2958 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> NodeSnapshotBuilder<'a, 'b, A> {
2959 #[inline]
2960 pub fn add_id(&mut self, id: &ObjectId8) {
2961 self.fbb_.push_slot_always::<&ObjectId8>(NodeSnapshot::VT_ID, id);
2962 }
2963 #[inline]
2964 pub fn add_path(&mut self, path: flatbuffers::WIPOffset<&'b str>) {
2965 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2966 NodeSnapshot::VT_PATH,
2967 path,
2968 );
2969 }
2970 #[inline]
2971 pub fn add_user_data(
2972 &mut self,
2973 user_data: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
2974 ) {
2975 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2976 NodeSnapshot::VT_USER_DATA,
2977 user_data,
2978 );
2979 }
2980 #[inline]
2981 pub fn add_node_data_type(&mut self, node_data_type: NodeData) {
2982 self.fbb_.push_slot::<NodeData>(
2983 NodeSnapshot::VT_NODE_DATA_TYPE,
2984 node_data_type,
2985 NodeData::NONE,
2986 );
2987 }
2988 #[inline]
2989 pub fn add_node_data(
2990 &mut self,
2991 node_data: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>,
2992 ) {
2993 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
2994 NodeSnapshot::VT_NODE_DATA,
2995 node_data,
2996 );
2997 }
2998 #[inline]
2999 pub fn add_extra(
3000 &mut self,
3001 extra: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
3002 ) {
3003 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3004 NodeSnapshot::VT_EXTRA,
3005 extra,
3006 );
3007 }
3008 #[inline]
3009 pub fn new(
3010 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3011 ) -> NodeSnapshotBuilder<'a, 'b, A> {
3012 let start = _fbb.start_table();
3013 NodeSnapshotBuilder { fbb_: _fbb, start_: start }
3014 }
3015 #[inline]
3016 pub fn finish(self) -> flatbuffers::WIPOffset<NodeSnapshot<'a>> {
3017 let o = self.fbb_.end_table(self.start_);
3018 self.fbb_.required(o, NodeSnapshot::VT_ID, "id");
3019 self.fbb_.required(o, NodeSnapshot::VT_PATH, "path");
3020 self.fbb_.required(o, NodeSnapshot::VT_USER_DATA, "user_data");
3021 self.fbb_.required(o, NodeSnapshot::VT_NODE_DATA, "node_data");
3022 flatbuffers::WIPOffset::new(o.value())
3023 }
3024 }
3025
3026 impl core::fmt::Debug for NodeSnapshot<'_> {
3027 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3028 let mut ds = f.debug_struct("NodeSnapshot");
3029 ds.field("id", &self.id());
3030 ds.field("path", &self.path());
3031 ds.field("user_data", &self.user_data());
3032 ds.field("node_data_type", &self.node_data_type());
3033 match self.node_data_type() {
3034 NodeData::Array => {
3035 if let Some(x) = self.node_data_as_array() {
3036 ds.field("node_data", &x)
3037 } else {
3038 ds.field("node_data", &"InvalidFlatbuffer: Union discriminant does not match value.")
3039 }
3040 }
3041 NodeData::Group => {
3042 if let Some(x) = self.node_data_as_group() {
3043 ds.field("node_data", &x)
3044 } else {
3045 ds.field("node_data", &"InvalidFlatbuffer: Union discriminant does not match value.")
3046 }
3047 }
3048 _ => {
3049 let x: Option<()> = None;
3050 ds.field("node_data", &x)
3051 }
3052 };
3053 ds.field("extra", &self.extra());
3054 ds.finish()
3055 }
3056 }
3057 pub enum SnapshotOffset {}
3058 #[derive(Copy, Clone, PartialEq)]
3059
3060 pub struct Snapshot<'a> {
3061 pub _tab: flatbuffers::Table<'a>,
3062 }
3063
3064 impl<'a> flatbuffers::Follow<'a> for Snapshot<'a> {
3065 type Inner = Snapshot<'a>;
3066 #[inline]
3067 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3068 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
3069 }
3070 }
3071
3072 impl<'a> Snapshot<'a> {
3073 pub const VT_ID: flatbuffers::VOffsetT = 4;
3074 pub const VT_PARENT_ID: flatbuffers::VOffsetT = 6;
3075 pub const VT_NODES: flatbuffers::VOffsetT = 8;
3076 pub const VT_FLUSHED_AT: flatbuffers::VOffsetT = 10;
3077 pub const VT_MESSAGE: flatbuffers::VOffsetT = 12;
3078 pub const VT_METADATA: flatbuffers::VOffsetT = 14;
3079 pub const VT_MANIFEST_FILES: flatbuffers::VOffsetT = 16;
3080 pub const VT_EXTRA: flatbuffers::VOffsetT = 18;
3081 pub const VT_MANIFEST_FILES_V2: flatbuffers::VOffsetT = 20;
3082
3083 #[inline]
3084 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3085 Snapshot { _tab: table }
3086 }
3087 #[allow(unused_mut)]
3088 pub fn create<
3089 'bldr: 'args,
3090 'args: 'mut_bldr,
3091 'mut_bldr,
3092 A: flatbuffers::Allocator + 'bldr,
3093 >(
3094 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3095 args: &'args SnapshotArgs<'args>,
3096 ) -> flatbuffers::WIPOffset<Snapshot<'bldr>> {
3097 let mut builder = SnapshotBuilder::new(_fbb);
3098 builder.add_flushed_at(args.flushed_at);
3099 if let Some(x) = args.manifest_files_v2 {
3100 builder.add_manifest_files_v2(x);
3101 }
3102 if let Some(x) = args.extra {
3103 builder.add_extra(x);
3104 }
3105 if let Some(x) = args.manifest_files {
3106 builder.add_manifest_files(x);
3107 }
3108 if let Some(x) = args.metadata {
3109 builder.add_metadata(x);
3110 }
3111 if let Some(x) = args.message {
3112 builder.add_message(x);
3113 }
3114 if let Some(x) = args.nodes {
3115 builder.add_nodes(x);
3116 }
3117 if let Some(x) = args.parent_id {
3118 builder.add_parent_id(x);
3119 }
3120 if let Some(x) = args.id {
3121 builder.add_id(x);
3122 }
3123 builder.finish()
3124 }
3125
3126 #[inline]
3127 pub fn id(&self) -> &'a ObjectId12 {
3128 unsafe { self._tab.get::<ObjectId12>(Snapshot::VT_ID, None).unwrap() }
3132 }
3133 #[inline]
3134 pub fn parent_id(&self) -> Option<&'a ObjectId12> {
3135 unsafe { self._tab.get::<ObjectId12>(Snapshot::VT_PARENT_ID, None) }
3139 }
3140 #[inline]
3141 pub fn nodes(
3142 &self,
3143 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<NodeSnapshot<'a>>>
3144 {
3145 unsafe {
3149 self._tab
3150 .get::<flatbuffers::ForwardsUOffset<
3151 flatbuffers::Vector<
3152 'a,
3153 flatbuffers::ForwardsUOffset<NodeSnapshot>,
3154 >,
3155 >>(Snapshot::VT_NODES, None)
3156 .unwrap()
3157 }
3158 }
3159 #[inline]
3160 pub fn flushed_at(&self) -> u64 {
3161 unsafe { self._tab.get::<u64>(Snapshot::VT_FLUSHED_AT, Some(0)).unwrap() }
3165 }
3166 #[inline]
3167 pub fn message(&self) -> &'a str {
3168 unsafe {
3172 self._tab
3173 .get::<flatbuffers::ForwardsUOffset<&str>>(Snapshot::VT_MESSAGE, None)
3174 .unwrap()
3175 }
3176 }
3177 #[inline]
3178 pub fn metadata(
3179 &self,
3180 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MetadataItem<'a>>>
3181 {
3182 unsafe {
3186 self._tab
3187 .get::<flatbuffers::ForwardsUOffset<
3188 flatbuffers::Vector<
3189 'a,
3190 flatbuffers::ForwardsUOffset<MetadataItem>,
3191 >,
3192 >>(Snapshot::VT_METADATA, None)
3193 .unwrap()
3194 }
3195 }
3196 #[inline]
3197 pub fn manifest_files(&self) -> flatbuffers::Vector<'a, ManifestFileInfo> {
3198 unsafe {
3202 self._tab
3203 .get::<flatbuffers::ForwardsUOffset<
3204 flatbuffers::Vector<'a, ManifestFileInfo>,
3205 >>(Snapshot::VT_MANIFEST_FILES, None)
3206 .unwrap()
3207 }
3208 }
3209 #[inline]
3210 pub fn extra(&self) -> Option<flatbuffers::Vector<'a, u8>> {
3211 unsafe {
3215 self._tab
3216 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
3217 Snapshot::VT_EXTRA,
3218 None,
3219 )
3220 }
3221 }
3222 #[inline]
3223 pub fn manifest_files_v2(
3224 &self,
3225 ) -> Option<
3226 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ManifestFileInfoV2<'a>>>,
3227 > {
3228 unsafe {
3232 self._tab.get::<flatbuffers::ForwardsUOffset<
3233 flatbuffers::Vector<
3234 'a,
3235 flatbuffers::ForwardsUOffset<ManifestFileInfoV2>,
3236 >,
3237 >>(Snapshot::VT_MANIFEST_FILES_V2, None)
3238 }
3239 }
3240 }
3241
3242 impl flatbuffers::Verifiable for Snapshot<'_> {
3243 #[inline]
3244 fn run_verifier(
3245 v: &mut flatbuffers::Verifier,
3246 pos: usize,
3247 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3248 use self::flatbuffers::Verifiable;
3249 v.visit_table(pos)?
3250 .visit_field::<ObjectId12>("id", Self::VT_ID, true)?
3251 .visit_field::<ObjectId12>("parent_id", Self::VT_PARENT_ID, false)?
3252 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<NodeSnapshot>>>>("nodes", Self::VT_NODES, true)?
3253 .visit_field::<u64>("flushed_at", Self::VT_FLUSHED_AT, false)?
3254 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("message", Self::VT_MESSAGE, true)?
3255 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<MetadataItem>>>>("metadata", Self::VT_METADATA, true)?
3256 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, ManifestFileInfo>>>("manifest_files", Self::VT_MANIFEST_FILES, true)?
3257 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>("extra", Self::VT_EXTRA, false)?
3258 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ManifestFileInfoV2>>>>("manifest_files_v2", Self::VT_MANIFEST_FILES_V2, false)?
3259 .finish();
3260 Ok(())
3261 }
3262 }
3263 pub struct SnapshotArgs<'a> {
3264 pub id: Option<&'a ObjectId12>,
3265 pub parent_id: Option<&'a ObjectId12>,
3266 pub nodes: Option<
3267 flatbuffers::WIPOffset<
3268 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<NodeSnapshot<'a>>>,
3269 >,
3270 >,
3271 pub flushed_at: u64,
3272 pub message: Option<flatbuffers::WIPOffset<&'a str>>,
3273 pub metadata: Option<
3274 flatbuffers::WIPOffset<
3275 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MetadataItem<'a>>>,
3276 >,
3277 >,
3278 pub manifest_files:
3279 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, ManifestFileInfo>>>,
3280 pub extra: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
3281 pub manifest_files_v2: Option<
3282 flatbuffers::WIPOffset<
3283 flatbuffers::Vector<
3284 'a,
3285 flatbuffers::ForwardsUOffset<ManifestFileInfoV2<'a>>,
3286 >,
3287 >,
3288 >,
3289 }
3290 impl<'a> Default for SnapshotArgs<'a> {
3291 #[inline]
3292 fn default() -> Self {
3293 SnapshotArgs {
3294 id: None, parent_id: None,
3296 nodes: None, flushed_at: 0,
3298 message: None, metadata: None, manifest_files: None, extra: None,
3302 manifest_files_v2: None,
3303 }
3304 }
3305 }
3306
3307 pub struct SnapshotBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3308 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3309 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3310 }
3311 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SnapshotBuilder<'a, 'b, A> {
3312 #[inline]
3313 pub fn add_id(&mut self, id: &ObjectId12) {
3314 self.fbb_.push_slot_always::<&ObjectId12>(Snapshot::VT_ID, id);
3315 }
3316 #[inline]
3317 pub fn add_parent_id(&mut self, parent_id: &ObjectId12) {
3318 self.fbb_.push_slot_always::<&ObjectId12>(Snapshot::VT_PARENT_ID, parent_id);
3319 }
3320 #[inline]
3321 pub fn add_nodes(
3322 &mut self,
3323 nodes: flatbuffers::WIPOffset<
3324 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<NodeSnapshot<'b>>>,
3325 >,
3326 ) {
3327 self.fbb_
3328 .push_slot_always::<flatbuffers::WIPOffset<_>>(Snapshot::VT_NODES, nodes);
3329 }
3330 #[inline]
3331 pub fn add_flushed_at(&mut self, flushed_at: u64) {
3332 self.fbb_.push_slot::<u64>(Snapshot::VT_FLUSHED_AT, flushed_at, 0);
3333 }
3334 #[inline]
3335 pub fn add_message(&mut self, message: flatbuffers::WIPOffset<&'b str>) {
3336 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3337 Snapshot::VT_MESSAGE,
3338 message,
3339 );
3340 }
3341 #[inline]
3342 pub fn add_metadata(
3343 &mut self,
3344 metadata: flatbuffers::WIPOffset<
3345 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<MetadataItem<'b>>>,
3346 >,
3347 ) {
3348 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3349 Snapshot::VT_METADATA,
3350 metadata,
3351 );
3352 }
3353 #[inline]
3354 pub fn add_manifest_files(
3355 &mut self,
3356 manifest_files: flatbuffers::WIPOffset<
3357 flatbuffers::Vector<'b, ManifestFileInfo>,
3358 >,
3359 ) {
3360 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3361 Snapshot::VT_MANIFEST_FILES,
3362 manifest_files,
3363 );
3364 }
3365 #[inline]
3366 pub fn add_extra(
3367 &mut self,
3368 extra: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
3369 ) {
3370 self.fbb_
3371 .push_slot_always::<flatbuffers::WIPOffset<_>>(Snapshot::VT_EXTRA, extra);
3372 }
3373 #[inline]
3374 pub fn add_manifest_files_v2(
3375 &mut self,
3376 manifest_files_v2: flatbuffers::WIPOffset<
3377 flatbuffers::Vector<
3378 'b,
3379 flatbuffers::ForwardsUOffset<ManifestFileInfoV2<'b>>,
3380 >,
3381 >,
3382 ) {
3383 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3384 Snapshot::VT_MANIFEST_FILES_V2,
3385 manifest_files_v2,
3386 );
3387 }
3388 #[inline]
3389 pub fn new(
3390 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3391 ) -> SnapshotBuilder<'a, 'b, A> {
3392 let start = _fbb.start_table();
3393 SnapshotBuilder { fbb_: _fbb, start_: start }
3394 }
3395 #[inline]
3396 pub fn finish(self) -> flatbuffers::WIPOffset<Snapshot<'a>> {
3397 let o = self.fbb_.end_table(self.start_);
3398 self.fbb_.required(o, Snapshot::VT_ID, "id");
3399 self.fbb_.required(o, Snapshot::VT_NODES, "nodes");
3400 self.fbb_.required(o, Snapshot::VT_MESSAGE, "message");
3401 self.fbb_.required(o, Snapshot::VT_METADATA, "metadata");
3402 self.fbb_.required(o, Snapshot::VT_MANIFEST_FILES, "manifest_files");
3403 flatbuffers::WIPOffset::new(o.value())
3404 }
3405 }
3406
3407 impl core::fmt::Debug for Snapshot<'_> {
3408 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3409 let mut ds = f.debug_struct("Snapshot");
3410 ds.field("id", &self.id());
3411 ds.field("parent_id", &self.parent_id());
3412 ds.field("nodes", &self.nodes());
3413 ds.field("flushed_at", &self.flushed_at());
3414 ds.field("message", &self.message());
3415 ds.field("metadata", &self.metadata());
3416 ds.field("manifest_files", &self.manifest_files());
3417 ds.field("extra", &self.extra());
3418 ds.field("manifest_files_v2", &self.manifest_files_v2());
3419 ds.finish()
3420 }
3421 }
3422 pub enum ChunkIndicesOffset {}
3423 #[derive(Copy, Clone, PartialEq)]
3424
3425 pub struct ChunkIndices<'a> {
3426 pub _tab: flatbuffers::Table<'a>,
3427 }
3428
3429 impl<'a> flatbuffers::Follow<'a> for ChunkIndices<'a> {
3430 type Inner = ChunkIndices<'a>;
3431 #[inline]
3432 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3433 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
3434 }
3435 }
3436
3437 impl<'a> ChunkIndices<'a> {
3438 pub const VT_COORDS: flatbuffers::VOffsetT = 4;
3439
3440 #[inline]
3441 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3442 ChunkIndices { _tab: table }
3443 }
3444 #[allow(unused_mut)]
3445 pub fn create<
3446 'bldr: 'args,
3447 'args: 'mut_bldr,
3448 'mut_bldr,
3449 A: flatbuffers::Allocator + 'bldr,
3450 >(
3451 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3452 args: &'args ChunkIndicesArgs<'args>,
3453 ) -> flatbuffers::WIPOffset<ChunkIndices<'bldr>> {
3454 let mut builder = ChunkIndicesBuilder::new(_fbb);
3455 if let Some(x) = args.coords {
3456 builder.add_coords(x);
3457 }
3458 builder.finish()
3459 }
3460
3461 #[inline]
3462 pub fn coords(&self) -> flatbuffers::Vector<'a, u32> {
3463 unsafe {
3467 self._tab
3468 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u32>>>(
3469 ChunkIndices::VT_COORDS,
3470 None,
3471 )
3472 .unwrap()
3473 }
3474 }
3475 }
3476
3477 impl flatbuffers::Verifiable for ChunkIndices<'_> {
3478 #[inline]
3479 fn run_verifier(
3480 v: &mut flatbuffers::Verifier,
3481 pos: usize,
3482 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3483 use self::flatbuffers::Verifiable;
3484 v.visit_table(pos)?
3485 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u32>>>("coords", Self::VT_COORDS, true)?
3486 .finish();
3487 Ok(())
3488 }
3489 }
3490 pub struct ChunkIndicesArgs<'a> {
3491 pub coords: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u32>>>,
3492 }
3493 impl<'a> Default for ChunkIndicesArgs<'a> {
3494 #[inline]
3495 fn default() -> Self {
3496 ChunkIndicesArgs {
3497 coords: None, }
3499 }
3500 }
3501
3502 pub struct ChunkIndicesBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3503 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3504 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3505 }
3506 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ChunkIndicesBuilder<'a, 'b, A> {
3507 #[inline]
3508 pub fn add_coords(
3509 &mut self,
3510 coords: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u32>>,
3511 ) {
3512 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3513 ChunkIndices::VT_COORDS,
3514 coords,
3515 );
3516 }
3517 #[inline]
3518 pub fn new(
3519 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3520 ) -> ChunkIndicesBuilder<'a, 'b, A> {
3521 let start = _fbb.start_table();
3522 ChunkIndicesBuilder { fbb_: _fbb, start_: start }
3523 }
3524 #[inline]
3525 pub fn finish(self) -> flatbuffers::WIPOffset<ChunkIndices<'a>> {
3526 let o = self.fbb_.end_table(self.start_);
3527 self.fbb_.required(o, ChunkIndices::VT_COORDS, "coords");
3528 flatbuffers::WIPOffset::new(o.value())
3529 }
3530 }
3531
3532 impl core::fmt::Debug for ChunkIndices<'_> {
3533 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3534 let mut ds = f.debug_struct("ChunkIndices");
3535 ds.field("coords", &self.coords());
3536 ds.finish()
3537 }
3538 }
3539 pub enum ArrayUpdatedChunksOffset {}
3540 #[derive(Copy, Clone, PartialEq)]
3541
3542 pub struct ArrayUpdatedChunks<'a> {
3543 pub _tab: flatbuffers::Table<'a>,
3544 }
3545
3546 impl<'a> flatbuffers::Follow<'a> for ArrayUpdatedChunks<'a> {
3547 type Inner = ArrayUpdatedChunks<'a>;
3548 #[inline]
3549 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3550 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
3551 }
3552 }
3553
3554 impl<'a> ArrayUpdatedChunks<'a> {
3555 pub const VT_NODE_ID: flatbuffers::VOffsetT = 4;
3556 pub const VT_CHUNKS: flatbuffers::VOffsetT = 6;
3557
3558 #[inline]
3559 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3560 ArrayUpdatedChunks { _tab: table }
3561 }
3562 #[allow(unused_mut)]
3563 pub fn create<
3564 'bldr: 'args,
3565 'args: 'mut_bldr,
3566 'mut_bldr,
3567 A: flatbuffers::Allocator + 'bldr,
3568 >(
3569 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3570 args: &'args ArrayUpdatedChunksArgs<'args>,
3571 ) -> flatbuffers::WIPOffset<ArrayUpdatedChunks<'bldr>> {
3572 let mut builder = ArrayUpdatedChunksBuilder::new(_fbb);
3573 if let Some(x) = args.chunks {
3574 builder.add_chunks(x);
3575 }
3576 if let Some(x) = args.node_id {
3577 builder.add_node_id(x);
3578 }
3579 builder.finish()
3580 }
3581
3582 #[inline]
3583 pub fn node_id(&self) -> &'a ObjectId8 {
3584 unsafe {
3588 self._tab.get::<ObjectId8>(ArrayUpdatedChunks::VT_NODE_ID, None).unwrap()
3589 }
3590 }
3591 #[inline]
3592 pub fn chunks(
3593 &self,
3594 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChunkIndices<'a>>>
3595 {
3596 unsafe {
3600 self._tab
3601 .get::<flatbuffers::ForwardsUOffset<
3602 flatbuffers::Vector<
3603 'a,
3604 flatbuffers::ForwardsUOffset<ChunkIndices>,
3605 >,
3606 >>(ArrayUpdatedChunks::VT_CHUNKS, None)
3607 .unwrap()
3608 }
3609 }
3610 }
3611
3612 impl flatbuffers::Verifiable for ArrayUpdatedChunks<'_> {
3613 #[inline]
3614 fn run_verifier(
3615 v: &mut flatbuffers::Verifier,
3616 pos: usize,
3617 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3618 use self::flatbuffers::Verifiable;
3619 v.visit_table(pos)?
3620 .visit_field::<ObjectId8>("node_id", Self::VT_NODE_ID, true)?
3621 .visit_field::<flatbuffers::ForwardsUOffset<
3622 flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ChunkIndices>>,
3623 >>("chunks", Self::VT_CHUNKS, true)?
3624 .finish();
3625 Ok(())
3626 }
3627 }
3628 pub struct ArrayUpdatedChunksArgs<'a> {
3629 pub node_id: Option<&'a ObjectId8>,
3630 pub chunks: Option<
3631 flatbuffers::WIPOffset<
3632 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ChunkIndices<'a>>>,
3633 >,
3634 >,
3635 }
3636 impl<'a> Default for ArrayUpdatedChunksArgs<'a> {
3637 #[inline]
3638 fn default() -> Self {
3639 ArrayUpdatedChunksArgs {
3640 node_id: None, chunks: None, }
3643 }
3644 }
3645
3646 pub struct ArrayUpdatedChunksBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3647 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3648 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3649 }
3650 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ArrayUpdatedChunksBuilder<'a, 'b, A> {
3651 #[inline]
3652 pub fn add_node_id(&mut self, node_id: &ObjectId8) {
3653 self.fbb_
3654 .push_slot_always::<&ObjectId8>(ArrayUpdatedChunks::VT_NODE_ID, node_id);
3655 }
3656 #[inline]
3657 pub fn add_chunks(
3658 &mut self,
3659 chunks: flatbuffers::WIPOffset<
3660 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<ChunkIndices<'b>>>,
3661 >,
3662 ) {
3663 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3664 ArrayUpdatedChunks::VT_CHUNKS,
3665 chunks,
3666 );
3667 }
3668 #[inline]
3669 pub fn new(
3670 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3671 ) -> ArrayUpdatedChunksBuilder<'a, 'b, A> {
3672 let start = _fbb.start_table();
3673 ArrayUpdatedChunksBuilder { fbb_: _fbb, start_: start }
3674 }
3675 #[inline]
3676 pub fn finish(self) -> flatbuffers::WIPOffset<ArrayUpdatedChunks<'a>> {
3677 let o = self.fbb_.end_table(self.start_);
3678 self.fbb_.required(o, ArrayUpdatedChunks::VT_NODE_ID, "node_id");
3679 self.fbb_.required(o, ArrayUpdatedChunks::VT_CHUNKS, "chunks");
3680 flatbuffers::WIPOffset::new(o.value())
3681 }
3682 }
3683
3684 impl core::fmt::Debug for ArrayUpdatedChunks<'_> {
3685 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3686 let mut ds = f.debug_struct("ArrayUpdatedChunks");
3687 ds.field("node_id", &self.node_id());
3688 ds.field("chunks", &self.chunks());
3689 ds.finish()
3690 }
3691 }
3692 pub enum MoveOperationOffset {}
3693 #[derive(Copy, Clone, PartialEq)]
3694
3695 pub struct MoveOperation<'a> {
3696 pub _tab: flatbuffers::Table<'a>,
3697 }
3698
3699 impl<'a> flatbuffers::Follow<'a> for MoveOperation<'a> {
3700 type Inner = MoveOperation<'a>;
3701 #[inline]
3702 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3703 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
3704 }
3705 }
3706
3707 impl<'a> MoveOperation<'a> {
3708 pub const VT_FROM: flatbuffers::VOffsetT = 4;
3709 pub const VT_TO: flatbuffers::VOffsetT = 6;
3710
3711 #[inline]
3712 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3713 MoveOperation { _tab: table }
3714 }
3715 #[allow(unused_mut)]
3716 pub fn create<
3717 'bldr: 'args,
3718 'args: 'mut_bldr,
3719 'mut_bldr,
3720 A: flatbuffers::Allocator + 'bldr,
3721 >(
3722 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3723 args: &'args MoveOperationArgs<'args>,
3724 ) -> flatbuffers::WIPOffset<MoveOperation<'bldr>> {
3725 let mut builder = MoveOperationBuilder::new(_fbb);
3726 if let Some(x) = args.to {
3727 builder.add_to(x);
3728 }
3729 if let Some(x) = args.from {
3730 builder.add_from(x);
3731 }
3732 builder.finish()
3733 }
3734
3735 #[inline]
3736 pub fn from(&self) -> &'a str {
3737 unsafe {
3741 self._tab
3742 .get::<flatbuffers::ForwardsUOffset<&str>>(
3743 MoveOperation::VT_FROM,
3744 None,
3745 )
3746 .unwrap()
3747 }
3748 }
3749 #[inline]
3750 pub fn to(&self) -> &'a str {
3751 unsafe {
3755 self._tab
3756 .get::<flatbuffers::ForwardsUOffset<&str>>(MoveOperation::VT_TO, None)
3757 .unwrap()
3758 }
3759 }
3760 }
3761
3762 impl flatbuffers::Verifiable for MoveOperation<'_> {
3763 #[inline]
3764 fn run_verifier(
3765 v: &mut flatbuffers::Verifier,
3766 pos: usize,
3767 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
3768 use self::flatbuffers::Verifiable;
3769 v.visit_table(pos)?
3770 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3771 "from",
3772 Self::VT_FROM,
3773 true,
3774 )?
3775 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
3776 "to",
3777 Self::VT_TO,
3778 true,
3779 )?
3780 .finish();
3781 Ok(())
3782 }
3783 }
3784 pub struct MoveOperationArgs<'a> {
3785 pub from: Option<flatbuffers::WIPOffset<&'a str>>,
3786 pub to: Option<flatbuffers::WIPOffset<&'a str>>,
3787 }
3788 impl<'a> Default for MoveOperationArgs<'a> {
3789 #[inline]
3790 fn default() -> Self {
3791 MoveOperationArgs {
3792 from: None, to: None, }
3795 }
3796 }
3797
3798 pub struct MoveOperationBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
3799 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3800 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
3801 }
3802 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MoveOperationBuilder<'a, 'b, A> {
3803 #[inline]
3804 pub fn add_from(&mut self, from: flatbuffers::WIPOffset<&'b str>) {
3805 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
3806 MoveOperation::VT_FROM,
3807 from,
3808 );
3809 }
3810 #[inline]
3811 pub fn add_to(&mut self, to: flatbuffers::WIPOffset<&'b str>) {
3812 self.fbb_
3813 .push_slot_always::<flatbuffers::WIPOffset<_>>(MoveOperation::VT_TO, to);
3814 }
3815 #[inline]
3816 pub fn new(
3817 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
3818 ) -> MoveOperationBuilder<'a, 'b, A> {
3819 let start = _fbb.start_table();
3820 MoveOperationBuilder { fbb_: _fbb, start_: start }
3821 }
3822 #[inline]
3823 pub fn finish(self) -> flatbuffers::WIPOffset<MoveOperation<'a>> {
3824 let o = self.fbb_.end_table(self.start_);
3825 self.fbb_.required(o, MoveOperation::VT_FROM, "from");
3826 self.fbb_.required(o, MoveOperation::VT_TO, "to");
3827 flatbuffers::WIPOffset::new(o.value())
3828 }
3829 }
3830
3831 impl core::fmt::Debug for MoveOperation<'_> {
3832 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3833 let mut ds = f.debug_struct("MoveOperation");
3834 ds.field("from", &self.from());
3835 ds.field("to", &self.to());
3836 ds.finish()
3837 }
3838 }
3839 pub enum TransactionLogOffset {}
3840 #[derive(Copy, Clone, PartialEq)]
3841
3842 pub struct TransactionLog<'a> {
3843 pub _tab: flatbuffers::Table<'a>,
3844 }
3845
3846 impl<'a> flatbuffers::Follow<'a> for TransactionLog<'a> {
3847 type Inner = TransactionLog<'a>;
3848 #[inline]
3849 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
3850 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
3851 }
3852 }
3853
3854 impl<'a> TransactionLog<'a> {
3855 pub const VT_ID: flatbuffers::VOffsetT = 4;
3856 pub const VT_NEW_GROUPS: flatbuffers::VOffsetT = 6;
3857 pub const VT_NEW_ARRAYS: flatbuffers::VOffsetT = 8;
3858 pub const VT_DELETED_GROUPS: flatbuffers::VOffsetT = 10;
3859 pub const VT_DELETED_ARRAYS: flatbuffers::VOffsetT = 12;
3860 pub const VT_UPDATED_ARRAYS: flatbuffers::VOffsetT = 14;
3861 pub const VT_UPDATED_GROUPS: flatbuffers::VOffsetT = 16;
3862 pub const VT_UPDATED_CHUNKS: flatbuffers::VOffsetT = 18;
3863 pub const VT_MOVED_NODES: flatbuffers::VOffsetT = 20;
3864 pub const VT_EXTRA: flatbuffers::VOffsetT = 22;
3865
3866 #[inline]
3867 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
3868 TransactionLog { _tab: table }
3869 }
3870 #[allow(unused_mut)]
3871 pub fn create<
3872 'bldr: 'args,
3873 'args: 'mut_bldr,
3874 'mut_bldr,
3875 A: flatbuffers::Allocator + 'bldr,
3876 >(
3877 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
3878 args: &'args TransactionLogArgs<'args>,
3879 ) -> flatbuffers::WIPOffset<TransactionLog<'bldr>> {
3880 let mut builder = TransactionLogBuilder::new(_fbb);
3881 if let Some(x) = args.extra {
3882 builder.add_extra(x);
3883 }
3884 if let Some(x) = args.moved_nodes {
3885 builder.add_moved_nodes(x);
3886 }
3887 if let Some(x) = args.updated_chunks {
3888 builder.add_updated_chunks(x);
3889 }
3890 if let Some(x) = args.updated_groups {
3891 builder.add_updated_groups(x);
3892 }
3893 if let Some(x) = args.updated_arrays {
3894 builder.add_updated_arrays(x);
3895 }
3896 if let Some(x) = args.deleted_arrays {
3897 builder.add_deleted_arrays(x);
3898 }
3899 if let Some(x) = args.deleted_groups {
3900 builder.add_deleted_groups(x);
3901 }
3902 if let Some(x) = args.new_arrays {
3903 builder.add_new_arrays(x);
3904 }
3905 if let Some(x) = args.new_groups {
3906 builder.add_new_groups(x);
3907 }
3908 if let Some(x) = args.id {
3909 builder.add_id(x);
3910 }
3911 builder.finish()
3912 }
3913
3914 #[inline]
3915 pub fn id(&self) -> &'a ObjectId12 {
3916 unsafe { self._tab.get::<ObjectId12>(TransactionLog::VT_ID, None).unwrap() }
3920 }
3921 #[inline]
3922 pub fn new_groups(&self) -> flatbuffers::Vector<'a, ObjectId8> {
3923 unsafe {
3927 self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, ObjectId8>>>(TransactionLog::VT_NEW_GROUPS, None).unwrap()
3928 }
3929 }
3930 #[inline]
3931 pub fn new_arrays(&self) -> flatbuffers::Vector<'a, ObjectId8> {
3932 unsafe {
3936 self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, ObjectId8>>>(TransactionLog::VT_NEW_ARRAYS, None).unwrap()
3937 }
3938 }
3939 #[inline]
3940 pub fn deleted_groups(&self) -> flatbuffers::Vector<'a, ObjectId8> {
3941 unsafe {
3945 self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, ObjectId8>>>(TransactionLog::VT_DELETED_GROUPS, None).unwrap()
3946 }
3947 }
3948 #[inline]
3949 pub fn deleted_arrays(&self) -> flatbuffers::Vector<'a, ObjectId8> {
3950 unsafe {
3954 self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, ObjectId8>>>(TransactionLog::VT_DELETED_ARRAYS, None).unwrap()
3955 }
3956 }
3957 #[inline]
3958 pub fn updated_arrays(&self) -> flatbuffers::Vector<'a, ObjectId8> {
3959 unsafe {
3963 self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, ObjectId8>>>(TransactionLog::VT_UPDATED_ARRAYS, None).unwrap()
3964 }
3965 }
3966 #[inline]
3967 pub fn updated_groups(&self) -> flatbuffers::Vector<'a, ObjectId8> {
3968 unsafe {
3972 self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, ObjectId8>>>(TransactionLog::VT_UPDATED_GROUPS, None).unwrap()
3973 }
3974 }
3975 #[inline]
3976 pub fn updated_chunks(
3977 &self,
3978 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<ArrayUpdatedChunks<'a>>>
3979 {
3980 unsafe {
3984 self._tab
3985 .get::<flatbuffers::ForwardsUOffset<
3986 flatbuffers::Vector<
3987 'a,
3988 flatbuffers::ForwardsUOffset<ArrayUpdatedChunks>,
3989 >,
3990 >>(TransactionLog::VT_UPDATED_CHUNKS, None)
3991 .unwrap()
3992 }
3993 }
3994 #[inline]
3995 pub fn moved_nodes(
3996 &self,
3997 ) -> Option<
3998 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MoveOperation<'a>>>,
3999 > {
4000 unsafe {
4004 self._tab.get::<flatbuffers::ForwardsUOffset<
4005 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MoveOperation>>,
4006 >>(TransactionLog::VT_MOVED_NODES, None)
4007 }
4008 }
4009 #[inline]
4010 pub fn extra(&self) -> Option<flatbuffers::Vector<'a, u8>> {
4011 unsafe {
4015 self._tab
4016 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
4017 TransactionLog::VT_EXTRA,
4018 None,
4019 )
4020 }
4021 }
4022 }
4023
4024 impl flatbuffers::Verifiable for TransactionLog<'_> {
4025 #[inline]
4026 fn run_verifier(
4027 v: &mut flatbuffers::Verifier,
4028 pos: usize,
4029 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4030 use self::flatbuffers::Verifiable;
4031 v.visit_table(pos)?
4032 .visit_field::<ObjectId12>("id", Self::VT_ID, true)?
4033 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, ObjectId8>>>("new_groups", Self::VT_NEW_GROUPS, true)?
4034 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, ObjectId8>>>("new_arrays", Self::VT_NEW_ARRAYS, true)?
4035 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, ObjectId8>>>("deleted_groups", Self::VT_DELETED_GROUPS, true)?
4036 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, ObjectId8>>>("deleted_arrays", Self::VT_DELETED_ARRAYS, true)?
4037 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, ObjectId8>>>("updated_arrays", Self::VT_UPDATED_ARRAYS, true)?
4038 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, ObjectId8>>>("updated_groups", Self::VT_UPDATED_GROUPS, true)?
4039 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<ArrayUpdatedChunks>>>>("updated_chunks", Self::VT_UPDATED_CHUNKS, true)?
4040 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<MoveOperation>>>>("moved_nodes", Self::VT_MOVED_NODES, false)?
4041 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>("extra", Self::VT_EXTRA, false)?
4042 .finish();
4043 Ok(())
4044 }
4045 }
4046 pub struct TransactionLogArgs<'a> {
4047 pub id: Option<&'a ObjectId12>,
4048 pub new_groups:
4049 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, ObjectId8>>>,
4050 pub new_arrays:
4051 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, ObjectId8>>>,
4052 pub deleted_groups:
4053 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, ObjectId8>>>,
4054 pub deleted_arrays:
4055 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, ObjectId8>>>,
4056 pub updated_arrays:
4057 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, ObjectId8>>>,
4058 pub updated_groups:
4059 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, ObjectId8>>>,
4060 pub updated_chunks: Option<
4061 flatbuffers::WIPOffset<
4062 flatbuffers::Vector<
4063 'a,
4064 flatbuffers::ForwardsUOffset<ArrayUpdatedChunks<'a>>,
4065 >,
4066 >,
4067 >,
4068 pub moved_nodes: Option<
4069 flatbuffers::WIPOffset<
4070 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MoveOperation<'a>>>,
4071 >,
4072 >,
4073 pub extra: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
4074 }
4075 impl<'a> Default for TransactionLogArgs<'a> {
4076 #[inline]
4077 fn default() -> Self {
4078 TransactionLogArgs {
4079 id: None, new_groups: None, new_arrays: None, deleted_groups: None, deleted_arrays: None, updated_arrays: None, updated_groups: None, updated_chunks: None, moved_nodes: None,
4088 extra: None,
4089 }
4090 }
4091 }
4092
4093 pub struct TransactionLogBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4094 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4095 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4096 }
4097 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TransactionLogBuilder<'a, 'b, A> {
4098 #[inline]
4099 pub fn add_id(&mut self, id: &ObjectId12) {
4100 self.fbb_.push_slot_always::<&ObjectId12>(TransactionLog::VT_ID, id);
4101 }
4102 #[inline]
4103 pub fn add_new_groups(
4104 &mut self,
4105 new_groups: flatbuffers::WIPOffset<flatbuffers::Vector<'b, ObjectId8>>,
4106 ) {
4107 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4108 TransactionLog::VT_NEW_GROUPS,
4109 new_groups,
4110 );
4111 }
4112 #[inline]
4113 pub fn add_new_arrays(
4114 &mut self,
4115 new_arrays: flatbuffers::WIPOffset<flatbuffers::Vector<'b, ObjectId8>>,
4116 ) {
4117 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4118 TransactionLog::VT_NEW_ARRAYS,
4119 new_arrays,
4120 );
4121 }
4122 #[inline]
4123 pub fn add_deleted_groups(
4124 &mut self,
4125 deleted_groups: flatbuffers::WIPOffset<flatbuffers::Vector<'b, ObjectId8>>,
4126 ) {
4127 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4128 TransactionLog::VT_DELETED_GROUPS,
4129 deleted_groups,
4130 );
4131 }
4132 #[inline]
4133 pub fn add_deleted_arrays(
4134 &mut self,
4135 deleted_arrays: flatbuffers::WIPOffset<flatbuffers::Vector<'b, ObjectId8>>,
4136 ) {
4137 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4138 TransactionLog::VT_DELETED_ARRAYS,
4139 deleted_arrays,
4140 );
4141 }
4142 #[inline]
4143 pub fn add_updated_arrays(
4144 &mut self,
4145 updated_arrays: flatbuffers::WIPOffset<flatbuffers::Vector<'b, ObjectId8>>,
4146 ) {
4147 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4148 TransactionLog::VT_UPDATED_ARRAYS,
4149 updated_arrays,
4150 );
4151 }
4152 #[inline]
4153 pub fn add_updated_groups(
4154 &mut self,
4155 updated_groups: flatbuffers::WIPOffset<flatbuffers::Vector<'b, ObjectId8>>,
4156 ) {
4157 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4158 TransactionLog::VT_UPDATED_GROUPS,
4159 updated_groups,
4160 );
4161 }
4162 #[inline]
4163 pub fn add_updated_chunks(
4164 &mut self,
4165 updated_chunks: flatbuffers::WIPOffset<
4166 flatbuffers::Vector<
4167 'b,
4168 flatbuffers::ForwardsUOffset<ArrayUpdatedChunks<'b>>,
4169 >,
4170 >,
4171 ) {
4172 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4173 TransactionLog::VT_UPDATED_CHUNKS,
4174 updated_chunks,
4175 );
4176 }
4177 #[inline]
4178 pub fn add_moved_nodes(
4179 &mut self,
4180 moved_nodes: flatbuffers::WIPOffset<
4181 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<MoveOperation<'b>>>,
4182 >,
4183 ) {
4184 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4185 TransactionLog::VT_MOVED_NODES,
4186 moved_nodes,
4187 );
4188 }
4189 #[inline]
4190 pub fn add_extra(
4191 &mut self,
4192 extra: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
4193 ) {
4194 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4195 TransactionLog::VT_EXTRA,
4196 extra,
4197 );
4198 }
4199 #[inline]
4200 pub fn new(
4201 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4202 ) -> TransactionLogBuilder<'a, 'b, A> {
4203 let start = _fbb.start_table();
4204 TransactionLogBuilder { fbb_: _fbb, start_: start }
4205 }
4206 #[inline]
4207 pub fn finish(self) -> flatbuffers::WIPOffset<TransactionLog<'a>> {
4208 let o = self.fbb_.end_table(self.start_);
4209 self.fbb_.required(o, TransactionLog::VT_ID, "id");
4210 self.fbb_.required(o, TransactionLog::VT_NEW_GROUPS, "new_groups");
4211 self.fbb_.required(o, TransactionLog::VT_NEW_ARRAYS, "new_arrays");
4212 self.fbb_.required(o, TransactionLog::VT_DELETED_GROUPS, "deleted_groups");
4213 self.fbb_.required(o, TransactionLog::VT_DELETED_ARRAYS, "deleted_arrays");
4214 self.fbb_.required(o, TransactionLog::VT_UPDATED_ARRAYS, "updated_arrays");
4215 self.fbb_.required(o, TransactionLog::VT_UPDATED_GROUPS, "updated_groups");
4216 self.fbb_.required(o, TransactionLog::VT_UPDATED_CHUNKS, "updated_chunks");
4217 flatbuffers::WIPOffset::new(o.value())
4218 }
4219 }
4220
4221 impl core::fmt::Debug for TransactionLog<'_> {
4222 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4223 let mut ds = f.debug_struct("TransactionLog");
4224 ds.field("id", &self.id());
4225 ds.field("new_groups", &self.new_groups());
4226 ds.field("new_arrays", &self.new_arrays());
4227 ds.field("deleted_groups", &self.deleted_groups());
4228 ds.field("deleted_arrays", &self.deleted_arrays());
4229 ds.field("updated_arrays", &self.updated_arrays());
4230 ds.field("updated_groups", &self.updated_groups());
4231 ds.field("updated_chunks", &self.updated_chunks());
4232 ds.field("moved_nodes", &self.moved_nodes());
4233 ds.field("extra", &self.extra());
4234 ds.finish()
4235 }
4236 }
4237 pub enum RefOffset {}
4238 #[derive(Copy, Clone, PartialEq)]
4239
4240 pub struct Ref<'a> {
4241 pub _tab: flatbuffers::Table<'a>,
4242 }
4243
4244 impl<'a> flatbuffers::Follow<'a> for Ref<'a> {
4245 type Inner = Ref<'a>;
4246 #[inline]
4247 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4248 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
4249 }
4250 }
4251
4252 impl<'a> Ref<'a> {
4253 pub const VT_NAME: flatbuffers::VOffsetT = 4;
4254 pub const VT_SNAPSHOT_INDEX: flatbuffers::VOffsetT = 6;
4255
4256 #[inline]
4257 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4258 Ref { _tab: table }
4259 }
4260 #[allow(unused_mut)]
4261 pub fn create<
4262 'bldr: 'args,
4263 'args: 'mut_bldr,
4264 'mut_bldr,
4265 A: flatbuffers::Allocator + 'bldr,
4266 >(
4267 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4268 args: &'args RefArgs<'args>,
4269 ) -> flatbuffers::WIPOffset<Ref<'bldr>> {
4270 let mut builder = RefBuilder::new(_fbb);
4271 builder.add_snapshot_index(args.snapshot_index);
4272 if let Some(x) = args.name {
4273 builder.add_name(x);
4274 }
4275 builder.finish()
4276 }
4277
4278 #[inline]
4279 pub fn name(&self) -> &'a str {
4280 unsafe {
4284 self._tab
4285 .get::<flatbuffers::ForwardsUOffset<&str>>(Ref::VT_NAME, None)
4286 .unwrap()
4287 }
4288 }
4289 #[inline]
4290 pub fn snapshot_index(&self) -> u32 {
4291 unsafe { self._tab.get::<u32>(Ref::VT_SNAPSHOT_INDEX, Some(0)).unwrap() }
4295 }
4296 }
4297
4298 impl flatbuffers::Verifiable for Ref<'_> {
4299 #[inline]
4300 fn run_verifier(
4301 v: &mut flatbuffers::Verifier,
4302 pos: usize,
4303 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4304 use self::flatbuffers::Verifiable;
4305 v.visit_table(pos)?
4306 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
4307 "name",
4308 Self::VT_NAME,
4309 true,
4310 )?
4311 .visit_field::<u32>("snapshot_index", Self::VT_SNAPSHOT_INDEX, false)?
4312 .finish();
4313 Ok(())
4314 }
4315 }
4316 pub struct RefArgs<'a> {
4317 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
4318 pub snapshot_index: u32,
4319 }
4320 impl<'a> Default for RefArgs<'a> {
4321 #[inline]
4322 fn default() -> Self {
4323 RefArgs {
4324 name: None, snapshot_index: 0,
4326 }
4327 }
4328 }
4329
4330 pub struct RefBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4331 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4332 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4333 }
4334 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RefBuilder<'a, 'b, A> {
4335 #[inline]
4336 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
4337 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Ref::VT_NAME, name);
4338 }
4339 #[inline]
4340 pub fn add_snapshot_index(&mut self, snapshot_index: u32) {
4341 self.fbb_.push_slot::<u32>(Ref::VT_SNAPSHOT_INDEX, snapshot_index, 0);
4342 }
4343 #[inline]
4344 pub fn new(
4345 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4346 ) -> RefBuilder<'a, 'b, A> {
4347 let start = _fbb.start_table();
4348 RefBuilder { fbb_: _fbb, start_: start }
4349 }
4350 #[inline]
4351 pub fn finish(self) -> flatbuffers::WIPOffset<Ref<'a>> {
4352 let o = self.fbb_.end_table(self.start_);
4353 self.fbb_.required(o, Ref::VT_NAME, "name");
4354 flatbuffers::WIPOffset::new(o.value())
4355 }
4356 }
4357
4358 impl core::fmt::Debug for Ref<'_> {
4359 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4360 let mut ds = f.debug_struct("Ref");
4361 ds.field("name", &self.name());
4362 ds.field("snapshot_index", &self.snapshot_index());
4363 ds.finish()
4364 }
4365 }
4366 pub enum SnapshotInfoOffset {}
4367 #[derive(Copy, Clone, PartialEq)]
4368
4369 pub struct SnapshotInfo<'a> {
4370 pub _tab: flatbuffers::Table<'a>,
4371 }
4372
4373 impl<'a> flatbuffers::Follow<'a> for SnapshotInfo<'a> {
4374 type Inner = SnapshotInfo<'a>;
4375 #[inline]
4376 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4377 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
4378 }
4379 }
4380
4381 impl<'a> SnapshotInfo<'a> {
4382 pub const VT_ID: flatbuffers::VOffsetT = 4;
4383 pub const VT_PARENT_OFFSET: flatbuffers::VOffsetT = 6;
4384 pub const VT_FLUSHED_AT: flatbuffers::VOffsetT = 8;
4385 pub const VT_MESSAGE: flatbuffers::VOffsetT = 10;
4386 pub const VT_METADATA: flatbuffers::VOffsetT = 12;
4387
4388 #[inline]
4389 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4390 SnapshotInfo { _tab: table }
4391 }
4392 #[allow(unused_mut)]
4393 pub fn create<
4394 'bldr: 'args,
4395 'args: 'mut_bldr,
4396 'mut_bldr,
4397 A: flatbuffers::Allocator + 'bldr,
4398 >(
4399 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4400 args: &'args SnapshotInfoArgs<'args>,
4401 ) -> flatbuffers::WIPOffset<SnapshotInfo<'bldr>> {
4402 let mut builder = SnapshotInfoBuilder::new(_fbb);
4403 builder.add_flushed_at(args.flushed_at);
4404 if let Some(x) = args.metadata {
4405 builder.add_metadata(x);
4406 }
4407 if let Some(x) = args.message {
4408 builder.add_message(x);
4409 }
4410 builder.add_parent_offset(args.parent_offset);
4411 if let Some(x) = args.id {
4412 builder.add_id(x);
4413 }
4414 builder.finish()
4415 }
4416
4417 #[inline]
4418 pub fn id(&self) -> &'a ObjectId12 {
4419 unsafe { self._tab.get::<ObjectId12>(SnapshotInfo::VT_ID, None).unwrap() }
4423 }
4424 #[inline]
4425 pub fn parent_offset(&self) -> i32 {
4426 unsafe {
4430 self._tab.get::<i32>(SnapshotInfo::VT_PARENT_OFFSET, Some(0)).unwrap()
4431 }
4432 }
4433 #[inline]
4434 pub fn flushed_at(&self) -> u64 {
4435 unsafe { self._tab.get::<u64>(SnapshotInfo::VT_FLUSHED_AT, Some(0)).unwrap() }
4439 }
4440 #[inline]
4441 pub fn message(&self) -> &'a str {
4442 unsafe {
4446 self._tab
4447 .get::<flatbuffers::ForwardsUOffset<&str>>(
4448 SnapshotInfo::VT_MESSAGE,
4449 None,
4450 )
4451 .unwrap()
4452 }
4453 }
4454 #[inline]
4455 pub fn metadata(
4456 &self,
4457 ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MetadataItem<'a>>>>
4458 {
4459 unsafe {
4463 self._tab.get::<flatbuffers::ForwardsUOffset<
4464 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MetadataItem>>,
4465 >>(SnapshotInfo::VT_METADATA, None)
4466 }
4467 }
4468 }
4469
4470 impl flatbuffers::Verifiable for SnapshotInfo<'_> {
4471 #[inline]
4472 fn run_verifier(
4473 v: &mut flatbuffers::Verifier,
4474 pos: usize,
4475 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4476 use self::flatbuffers::Verifiable;
4477 v.visit_table(pos)?
4478 .visit_field::<ObjectId12>("id", Self::VT_ID, true)?
4479 .visit_field::<i32>("parent_offset", Self::VT_PARENT_OFFSET, false)?
4480 .visit_field::<u64>("flushed_at", Self::VT_FLUSHED_AT, false)?
4481 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
4482 "message",
4483 Self::VT_MESSAGE,
4484 true,
4485 )?
4486 .visit_field::<flatbuffers::ForwardsUOffset<
4487 flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<MetadataItem>>,
4488 >>("metadata", Self::VT_METADATA, false)?
4489 .finish();
4490 Ok(())
4491 }
4492 }
4493 pub struct SnapshotInfoArgs<'a> {
4494 pub id: Option<&'a ObjectId12>,
4495 pub parent_offset: i32,
4496 pub flushed_at: u64,
4497 pub message: Option<flatbuffers::WIPOffset<&'a str>>,
4498 pub metadata: Option<
4499 flatbuffers::WIPOffset<
4500 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MetadataItem<'a>>>,
4501 >,
4502 >,
4503 }
4504 impl<'a> Default for SnapshotInfoArgs<'a> {
4505 #[inline]
4506 fn default() -> Self {
4507 SnapshotInfoArgs {
4508 id: None, parent_offset: 0,
4510 flushed_at: 0,
4511 message: None, metadata: None,
4513 }
4514 }
4515 }
4516
4517 pub struct SnapshotInfoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4518 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4519 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4520 }
4521 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> SnapshotInfoBuilder<'a, 'b, A> {
4522 #[inline]
4523 pub fn add_id(&mut self, id: &ObjectId12) {
4524 self.fbb_.push_slot_always::<&ObjectId12>(SnapshotInfo::VT_ID, id);
4525 }
4526 #[inline]
4527 pub fn add_parent_offset(&mut self, parent_offset: i32) {
4528 self.fbb_.push_slot::<i32>(SnapshotInfo::VT_PARENT_OFFSET, parent_offset, 0);
4529 }
4530 #[inline]
4531 pub fn add_flushed_at(&mut self, flushed_at: u64) {
4532 self.fbb_.push_slot::<u64>(SnapshotInfo::VT_FLUSHED_AT, flushed_at, 0);
4533 }
4534 #[inline]
4535 pub fn add_message(&mut self, message: flatbuffers::WIPOffset<&'b str>) {
4536 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4537 SnapshotInfo::VT_MESSAGE,
4538 message,
4539 );
4540 }
4541 #[inline]
4542 pub fn add_metadata(
4543 &mut self,
4544 metadata: flatbuffers::WIPOffset<
4545 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<MetadataItem<'b>>>,
4546 >,
4547 ) {
4548 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4549 SnapshotInfo::VT_METADATA,
4550 metadata,
4551 );
4552 }
4553 #[inline]
4554 pub fn new(
4555 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4556 ) -> SnapshotInfoBuilder<'a, 'b, A> {
4557 let start = _fbb.start_table();
4558 SnapshotInfoBuilder { fbb_: _fbb, start_: start }
4559 }
4560 #[inline]
4561 pub fn finish(self) -> flatbuffers::WIPOffset<SnapshotInfo<'a>> {
4562 let o = self.fbb_.end_table(self.start_);
4563 self.fbb_.required(o, SnapshotInfo::VT_ID, "id");
4564 self.fbb_.required(o, SnapshotInfo::VT_MESSAGE, "message");
4565 flatbuffers::WIPOffset::new(o.value())
4566 }
4567 }
4568
4569 impl core::fmt::Debug for SnapshotInfo<'_> {
4570 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4571 let mut ds = f.debug_struct("SnapshotInfo");
4572 ds.field("id", &self.id());
4573 ds.field("parent_offset", &self.parent_offset());
4574 ds.field("flushed_at", &self.flushed_at());
4575 ds.field("message", &self.message());
4576 ds.field("metadata", &self.metadata());
4577 ds.finish()
4578 }
4579 }
4580 pub enum RepoStatusOffset {}
4581 #[derive(Copy, Clone, PartialEq)]
4582
4583 pub struct RepoStatus<'a> {
4584 pub _tab: flatbuffers::Table<'a>,
4585 }
4586
4587 impl<'a> flatbuffers::Follow<'a> for RepoStatus<'a> {
4588 type Inner = RepoStatus<'a>;
4589 #[inline]
4590 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4591 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
4592 }
4593 }
4594
4595 impl<'a> RepoStatus<'a> {
4596 pub const VT_AVAILABILITY: flatbuffers::VOffsetT = 4;
4597 pub const VT_SET_AT: flatbuffers::VOffsetT = 6;
4598 pub const VT_LIMITED_AVAILABILITY_REASON: flatbuffers::VOffsetT = 8;
4599
4600 #[inline]
4601 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4602 RepoStatus { _tab: table }
4603 }
4604 #[allow(unused_mut)]
4605 pub fn create<
4606 'bldr: 'args,
4607 'args: 'mut_bldr,
4608 'mut_bldr,
4609 A: flatbuffers::Allocator + 'bldr,
4610 >(
4611 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4612 args: &'args RepoStatusArgs<'args>,
4613 ) -> flatbuffers::WIPOffset<RepoStatus<'bldr>> {
4614 let mut builder = RepoStatusBuilder::new(_fbb);
4615 builder.add_set_at(args.set_at);
4616 if let Some(x) = args.limited_availability_reason {
4617 builder.add_limited_availability_reason(x);
4618 }
4619 builder.add_availability(args.availability);
4620 builder.finish()
4621 }
4622
4623 #[inline]
4624 pub fn availability(&self) -> RepoAvailability {
4625 unsafe {
4629 self._tab
4630 .get::<RepoAvailability>(
4631 RepoStatus::VT_AVAILABILITY,
4632 Some(RepoAvailability::Online),
4633 )
4634 .unwrap()
4635 }
4636 }
4637 #[inline]
4638 pub fn set_at(&self) -> u64 {
4639 unsafe { self._tab.get::<u64>(RepoStatus::VT_SET_AT, Some(0)).unwrap() }
4643 }
4644 #[inline]
4645 pub fn limited_availability_reason(&self) -> Option<&'a str> {
4646 unsafe {
4650 self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(
4651 RepoStatus::VT_LIMITED_AVAILABILITY_REASON,
4652 None,
4653 )
4654 }
4655 }
4656 }
4657
4658 impl flatbuffers::Verifiable for RepoStatus<'_> {
4659 #[inline]
4660 fn run_verifier(
4661 v: &mut flatbuffers::Verifier,
4662 pos: usize,
4663 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4664 use self::flatbuffers::Verifiable;
4665 v.visit_table(pos)?
4666 .visit_field::<RepoAvailability>(
4667 "availability",
4668 Self::VT_AVAILABILITY,
4669 false,
4670 )?
4671 .visit_field::<u64>("set_at", Self::VT_SET_AT, false)?
4672 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
4673 "limited_availability_reason",
4674 Self::VT_LIMITED_AVAILABILITY_REASON,
4675 false,
4676 )?
4677 .finish();
4678 Ok(())
4679 }
4680 }
4681 pub struct RepoStatusArgs<'a> {
4682 pub availability: RepoAvailability,
4683 pub set_at: u64,
4684 pub limited_availability_reason: Option<flatbuffers::WIPOffset<&'a str>>,
4685 }
4686 impl<'a> Default for RepoStatusArgs<'a> {
4687 #[inline]
4688 fn default() -> Self {
4689 RepoStatusArgs {
4690 availability: RepoAvailability::Online,
4691 set_at: 0,
4692 limited_availability_reason: None,
4693 }
4694 }
4695 }
4696
4697 pub struct RepoStatusBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4698 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4699 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4700 }
4701 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RepoStatusBuilder<'a, 'b, A> {
4702 #[inline]
4703 pub fn add_availability(&mut self, availability: RepoAvailability) {
4704 self.fbb_.push_slot::<RepoAvailability>(
4705 RepoStatus::VT_AVAILABILITY,
4706 availability,
4707 RepoAvailability::Online,
4708 );
4709 }
4710 #[inline]
4711 pub fn add_set_at(&mut self, set_at: u64) {
4712 self.fbb_.push_slot::<u64>(RepoStatus::VT_SET_AT, set_at, 0);
4713 }
4714 #[inline]
4715 pub fn add_limited_availability_reason(
4716 &mut self,
4717 limited_availability_reason: flatbuffers::WIPOffset<&'b str>,
4718 ) {
4719 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
4720 RepoStatus::VT_LIMITED_AVAILABILITY_REASON,
4721 limited_availability_reason,
4722 );
4723 }
4724 #[inline]
4725 pub fn new(
4726 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4727 ) -> RepoStatusBuilder<'a, 'b, A> {
4728 let start = _fbb.start_table();
4729 RepoStatusBuilder { fbb_: _fbb, start_: start }
4730 }
4731 #[inline]
4732 pub fn finish(self) -> flatbuffers::WIPOffset<RepoStatus<'a>> {
4733 let o = self.fbb_.end_table(self.start_);
4734 flatbuffers::WIPOffset::new(o.value())
4735 }
4736 }
4737
4738 impl core::fmt::Debug for RepoStatus<'_> {
4739 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4740 let mut ds = f.debug_struct("RepoStatus");
4741 ds.field("availability", &self.availability());
4742 ds.field("set_at", &self.set_at());
4743 ds.field("limited_availability_reason", &self.limited_availability_reason());
4744 ds.finish()
4745 }
4746 }
4747 pub enum RepoInitializedUpdateOffset {}
4748 #[derive(Copy, Clone, PartialEq)]
4749
4750 pub struct RepoInitializedUpdate<'a> {
4751 pub _tab: flatbuffers::Table<'a>,
4752 }
4753
4754 impl<'a> flatbuffers::Follow<'a> for RepoInitializedUpdate<'a> {
4755 type Inner = RepoInitializedUpdate<'a>;
4756 #[inline]
4757 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4758 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
4759 }
4760 }
4761
4762 impl<'a> RepoInitializedUpdate<'a> {
4763 #[inline]
4764 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4765 RepoInitializedUpdate { _tab: table }
4766 }
4767 #[allow(unused_mut)]
4768 pub fn create<
4769 'bldr: 'args,
4770 'args: 'mut_bldr,
4771 'mut_bldr,
4772 A: flatbuffers::Allocator + 'bldr,
4773 >(
4774 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4775 _args: &'args RepoInitializedUpdateArgs,
4776 ) -> flatbuffers::WIPOffset<RepoInitializedUpdate<'bldr>> {
4777 let mut builder = RepoInitializedUpdateBuilder::new(_fbb);
4778 builder.finish()
4779 }
4780 }
4781
4782 impl flatbuffers::Verifiable for RepoInitializedUpdate<'_> {
4783 #[inline]
4784 fn run_verifier(
4785 v: &mut flatbuffers::Verifier,
4786 pos: usize,
4787 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4788 use self::flatbuffers::Verifiable;
4789 v.visit_table(pos)?.finish();
4790 Ok(())
4791 }
4792 }
4793 pub struct RepoInitializedUpdateArgs {}
4794 impl<'a> Default for RepoInitializedUpdateArgs {
4795 #[inline]
4796 fn default() -> Self {
4797 RepoInitializedUpdateArgs {}
4798 }
4799 }
4800
4801 pub struct RepoInitializedUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4802 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4803 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4804 }
4805 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RepoInitializedUpdateBuilder<'a, 'b, A> {
4806 #[inline]
4807 pub fn new(
4808 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4809 ) -> RepoInitializedUpdateBuilder<'a, 'b, A> {
4810 let start = _fbb.start_table();
4811 RepoInitializedUpdateBuilder { fbb_: _fbb, start_: start }
4812 }
4813 #[inline]
4814 pub fn finish(self) -> flatbuffers::WIPOffset<RepoInitializedUpdate<'a>> {
4815 let o = self.fbb_.end_table(self.start_);
4816 flatbuffers::WIPOffset::new(o.value())
4817 }
4818 }
4819
4820 impl core::fmt::Debug for RepoInitializedUpdate<'_> {
4821 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4822 let mut ds = f.debug_struct("RepoInitializedUpdate");
4823 ds.finish()
4824 }
4825 }
4826 pub enum RepoMigratedUpdateOffset {}
4827 #[derive(Copy, Clone, PartialEq)]
4828
4829 pub struct RepoMigratedUpdate<'a> {
4830 pub _tab: flatbuffers::Table<'a>,
4831 }
4832
4833 impl<'a> flatbuffers::Follow<'a> for RepoMigratedUpdate<'a> {
4834 type Inner = RepoMigratedUpdate<'a>;
4835 #[inline]
4836 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4837 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
4838 }
4839 }
4840
4841 impl<'a> RepoMigratedUpdate<'a> {
4842 pub const VT_FROM_VERSION: flatbuffers::VOffsetT = 4;
4843 pub const VT_TO_VERSION: flatbuffers::VOffsetT = 6;
4844
4845 #[inline]
4846 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4847 RepoMigratedUpdate { _tab: table }
4848 }
4849 #[allow(unused_mut)]
4850 pub fn create<
4851 'bldr: 'args,
4852 'args: 'mut_bldr,
4853 'mut_bldr,
4854 A: flatbuffers::Allocator + 'bldr,
4855 >(
4856 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4857 args: &'args RepoMigratedUpdateArgs,
4858 ) -> flatbuffers::WIPOffset<RepoMigratedUpdate<'bldr>> {
4859 let mut builder = RepoMigratedUpdateBuilder::new(_fbb);
4860 builder.add_to_version(args.to_version);
4861 builder.add_from_version(args.from_version);
4862 builder.finish()
4863 }
4864
4865 #[inline]
4866 pub fn from_version(&self) -> u8 {
4867 unsafe {
4871 self._tab.get::<u8>(RepoMigratedUpdate::VT_FROM_VERSION, Some(0)).unwrap()
4872 }
4873 }
4874 #[inline]
4875 pub fn to_version(&self) -> u8 {
4876 unsafe {
4880 self._tab.get::<u8>(RepoMigratedUpdate::VT_TO_VERSION, Some(0)).unwrap()
4881 }
4882 }
4883 }
4884
4885 impl flatbuffers::Verifiable for RepoMigratedUpdate<'_> {
4886 #[inline]
4887 fn run_verifier(
4888 v: &mut flatbuffers::Verifier,
4889 pos: usize,
4890 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
4891 use self::flatbuffers::Verifiable;
4892 v.visit_table(pos)?
4893 .visit_field::<u8>("from_version", Self::VT_FROM_VERSION, false)?
4894 .visit_field::<u8>("to_version", Self::VT_TO_VERSION, false)?
4895 .finish();
4896 Ok(())
4897 }
4898 }
4899 pub struct RepoMigratedUpdateArgs {
4900 pub from_version: u8,
4901 pub to_version: u8,
4902 }
4903 impl<'a> Default for RepoMigratedUpdateArgs {
4904 #[inline]
4905 fn default() -> Self {
4906 RepoMigratedUpdateArgs { from_version: 0, to_version: 0 }
4907 }
4908 }
4909
4910 pub struct RepoMigratedUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
4911 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4912 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
4913 }
4914 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RepoMigratedUpdateBuilder<'a, 'b, A> {
4915 #[inline]
4916 pub fn add_from_version(&mut self, from_version: u8) {
4917 self.fbb_.push_slot::<u8>(
4918 RepoMigratedUpdate::VT_FROM_VERSION,
4919 from_version,
4920 0,
4921 );
4922 }
4923 #[inline]
4924 pub fn add_to_version(&mut self, to_version: u8) {
4925 self.fbb_.push_slot::<u8>(RepoMigratedUpdate::VT_TO_VERSION, to_version, 0);
4926 }
4927 #[inline]
4928 pub fn new(
4929 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
4930 ) -> RepoMigratedUpdateBuilder<'a, 'b, A> {
4931 let start = _fbb.start_table();
4932 RepoMigratedUpdateBuilder { fbb_: _fbb, start_: start }
4933 }
4934 #[inline]
4935 pub fn finish(self) -> flatbuffers::WIPOffset<RepoMigratedUpdate<'a>> {
4936 let o = self.fbb_.end_table(self.start_);
4937 flatbuffers::WIPOffset::new(o.value())
4938 }
4939 }
4940
4941 impl core::fmt::Debug for RepoMigratedUpdate<'_> {
4942 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
4943 let mut ds = f.debug_struct("RepoMigratedUpdate");
4944 ds.field("from_version", &self.from_version());
4945 ds.field("to_version", &self.to_version());
4946 ds.finish()
4947 }
4948 }
4949 pub enum RepoStatusChangedUpdateOffset {}
4950 #[derive(Copy, Clone, PartialEq)]
4951
4952 pub struct RepoStatusChangedUpdate<'a> {
4953 pub _tab: flatbuffers::Table<'a>,
4954 }
4955
4956 impl<'a> flatbuffers::Follow<'a> for RepoStatusChangedUpdate<'a> {
4957 type Inner = RepoStatusChangedUpdate<'a>;
4958 #[inline]
4959 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
4960 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
4961 }
4962 }
4963
4964 impl<'a> RepoStatusChangedUpdate<'a> {
4965 pub const VT_STATUS: flatbuffers::VOffsetT = 4;
4966
4967 #[inline]
4968 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
4969 RepoStatusChangedUpdate { _tab: table }
4970 }
4971 #[allow(unused_mut)]
4972 pub fn create<
4973 'bldr: 'args,
4974 'args: 'mut_bldr,
4975 'mut_bldr,
4976 A: flatbuffers::Allocator + 'bldr,
4977 >(
4978 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
4979 args: &'args RepoStatusChangedUpdateArgs<'args>,
4980 ) -> flatbuffers::WIPOffset<RepoStatusChangedUpdate<'bldr>> {
4981 let mut builder = RepoStatusChangedUpdateBuilder::new(_fbb);
4982 if let Some(x) = args.status {
4983 builder.add_status(x);
4984 }
4985 builder.finish()
4986 }
4987
4988 #[inline]
4989 pub fn status(&self) -> Option<RepoStatus<'a>> {
4990 unsafe {
4994 self._tab.get::<flatbuffers::ForwardsUOffset<RepoStatus>>(
4995 RepoStatusChangedUpdate::VT_STATUS,
4996 None,
4997 )
4998 }
4999 }
5000 }
5001
5002 impl flatbuffers::Verifiable for RepoStatusChangedUpdate<'_> {
5003 #[inline]
5004 fn run_verifier(
5005 v: &mut flatbuffers::Verifier,
5006 pos: usize,
5007 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5008 use self::flatbuffers::Verifiable;
5009 v.visit_table(pos)?
5010 .visit_field::<flatbuffers::ForwardsUOffset<RepoStatus>>(
5011 "status",
5012 Self::VT_STATUS,
5013 false,
5014 )?
5015 .finish();
5016 Ok(())
5017 }
5018 }
5019 pub struct RepoStatusChangedUpdateArgs<'a> {
5020 pub status: Option<flatbuffers::WIPOffset<RepoStatus<'a>>>,
5021 }
5022 impl<'a> Default for RepoStatusChangedUpdateArgs<'a> {
5023 #[inline]
5024 fn default() -> Self {
5025 RepoStatusChangedUpdateArgs { status: None }
5026 }
5027 }
5028
5029 pub struct RepoStatusChangedUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5030 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5031 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5032 }
5033 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a>
5034 RepoStatusChangedUpdateBuilder<'a, 'b, A>
5035 {
5036 #[inline]
5037 pub fn add_status(&mut self, status: flatbuffers::WIPOffset<RepoStatus<'b>>) {
5038 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<RepoStatus>>(
5039 RepoStatusChangedUpdate::VT_STATUS,
5040 status,
5041 );
5042 }
5043 #[inline]
5044 pub fn new(
5045 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5046 ) -> RepoStatusChangedUpdateBuilder<'a, 'b, A> {
5047 let start = _fbb.start_table();
5048 RepoStatusChangedUpdateBuilder { fbb_: _fbb, start_: start }
5049 }
5050 #[inline]
5051 pub fn finish(self) -> flatbuffers::WIPOffset<RepoStatusChangedUpdate<'a>> {
5052 let o = self.fbb_.end_table(self.start_);
5053 flatbuffers::WIPOffset::new(o.value())
5054 }
5055 }
5056
5057 impl core::fmt::Debug for RepoStatusChangedUpdate<'_> {
5058 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5059 let mut ds = f.debug_struct("RepoStatusChangedUpdate");
5060 ds.field("status", &self.status());
5061 ds.finish()
5062 }
5063 }
5064 pub enum ConfigChangedUpdateOffset {}
5065 #[derive(Copy, Clone, PartialEq)]
5066
5067 pub struct ConfigChangedUpdate<'a> {
5068 pub _tab: flatbuffers::Table<'a>,
5069 }
5070
5071 impl<'a> flatbuffers::Follow<'a> for ConfigChangedUpdate<'a> {
5072 type Inner = ConfigChangedUpdate<'a>;
5073 #[inline]
5074 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5075 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
5076 }
5077 }
5078
5079 impl<'a> ConfigChangedUpdate<'a> {
5080 #[inline]
5081 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5082 ConfigChangedUpdate { _tab: table }
5083 }
5084 #[allow(unused_mut)]
5085 pub fn create<
5086 'bldr: 'args,
5087 'args: 'mut_bldr,
5088 'mut_bldr,
5089 A: flatbuffers::Allocator + 'bldr,
5090 >(
5091 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5092 _args: &'args ConfigChangedUpdateArgs,
5093 ) -> flatbuffers::WIPOffset<ConfigChangedUpdate<'bldr>> {
5094 let mut builder = ConfigChangedUpdateBuilder::new(_fbb);
5095 builder.finish()
5096 }
5097 }
5098
5099 impl flatbuffers::Verifiable for ConfigChangedUpdate<'_> {
5100 #[inline]
5101 fn run_verifier(
5102 v: &mut flatbuffers::Verifier,
5103 pos: usize,
5104 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5105 use self::flatbuffers::Verifiable;
5106 v.visit_table(pos)?.finish();
5107 Ok(())
5108 }
5109 }
5110 pub struct ConfigChangedUpdateArgs {}
5111 impl<'a> Default for ConfigChangedUpdateArgs {
5112 #[inline]
5113 fn default() -> Self {
5114 ConfigChangedUpdateArgs {}
5115 }
5116 }
5117
5118 pub struct ConfigChangedUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5119 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5120 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5121 }
5122 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ConfigChangedUpdateBuilder<'a, 'b, A> {
5123 #[inline]
5124 pub fn new(
5125 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5126 ) -> ConfigChangedUpdateBuilder<'a, 'b, A> {
5127 let start = _fbb.start_table();
5128 ConfigChangedUpdateBuilder { fbb_: _fbb, start_: start }
5129 }
5130 #[inline]
5131 pub fn finish(self) -> flatbuffers::WIPOffset<ConfigChangedUpdate<'a>> {
5132 let o = self.fbb_.end_table(self.start_);
5133 flatbuffers::WIPOffset::new(o.value())
5134 }
5135 }
5136
5137 impl core::fmt::Debug for ConfigChangedUpdate<'_> {
5138 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5139 let mut ds = f.debug_struct("ConfigChangedUpdate");
5140 ds.finish()
5141 }
5142 }
5143 pub enum MetadataChangedUpdateOffset {}
5144 #[derive(Copy, Clone, PartialEq)]
5145
5146 pub struct MetadataChangedUpdate<'a> {
5147 pub _tab: flatbuffers::Table<'a>,
5148 }
5149
5150 impl<'a> flatbuffers::Follow<'a> for MetadataChangedUpdate<'a> {
5151 type Inner = MetadataChangedUpdate<'a>;
5152 #[inline]
5153 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5154 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
5155 }
5156 }
5157
5158 impl<'a> MetadataChangedUpdate<'a> {
5159 #[inline]
5160 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5161 MetadataChangedUpdate { _tab: table }
5162 }
5163 #[allow(unused_mut)]
5164 pub fn create<
5165 'bldr: 'args,
5166 'args: 'mut_bldr,
5167 'mut_bldr,
5168 A: flatbuffers::Allocator + 'bldr,
5169 >(
5170 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5171 _args: &'args MetadataChangedUpdateArgs,
5172 ) -> flatbuffers::WIPOffset<MetadataChangedUpdate<'bldr>> {
5173 let mut builder = MetadataChangedUpdateBuilder::new(_fbb);
5174 builder.finish()
5175 }
5176 }
5177
5178 impl flatbuffers::Verifiable for MetadataChangedUpdate<'_> {
5179 #[inline]
5180 fn run_verifier(
5181 v: &mut flatbuffers::Verifier,
5182 pos: usize,
5183 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5184 use self::flatbuffers::Verifiable;
5185 v.visit_table(pos)?.finish();
5186 Ok(())
5187 }
5188 }
5189 pub struct MetadataChangedUpdateArgs {}
5190 impl<'a> Default for MetadataChangedUpdateArgs {
5191 #[inline]
5192 fn default() -> Self {
5193 MetadataChangedUpdateArgs {}
5194 }
5195 }
5196
5197 pub struct MetadataChangedUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5198 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5199 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5200 }
5201 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> MetadataChangedUpdateBuilder<'a, 'b, A> {
5202 #[inline]
5203 pub fn new(
5204 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5205 ) -> MetadataChangedUpdateBuilder<'a, 'b, A> {
5206 let start = _fbb.start_table();
5207 MetadataChangedUpdateBuilder { fbb_: _fbb, start_: start }
5208 }
5209 #[inline]
5210 pub fn finish(self) -> flatbuffers::WIPOffset<MetadataChangedUpdate<'a>> {
5211 let o = self.fbb_.end_table(self.start_);
5212 flatbuffers::WIPOffset::new(o.value())
5213 }
5214 }
5215
5216 impl core::fmt::Debug for MetadataChangedUpdate<'_> {
5217 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5218 let mut ds = f.debug_struct("MetadataChangedUpdate");
5219 ds.finish()
5220 }
5221 }
5222 pub enum TagCreatedUpdateOffset {}
5223 #[derive(Copy, Clone, PartialEq)]
5224
5225 pub struct TagCreatedUpdate<'a> {
5226 pub _tab: flatbuffers::Table<'a>,
5227 }
5228
5229 impl<'a> flatbuffers::Follow<'a> for TagCreatedUpdate<'a> {
5230 type Inner = TagCreatedUpdate<'a>;
5231 #[inline]
5232 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5233 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
5234 }
5235 }
5236
5237 impl<'a> TagCreatedUpdate<'a> {
5238 pub const VT_NAME: flatbuffers::VOffsetT = 4;
5239
5240 #[inline]
5241 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5242 TagCreatedUpdate { _tab: table }
5243 }
5244 #[allow(unused_mut)]
5245 pub fn create<
5246 'bldr: 'args,
5247 'args: 'mut_bldr,
5248 'mut_bldr,
5249 A: flatbuffers::Allocator + 'bldr,
5250 >(
5251 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5252 args: &'args TagCreatedUpdateArgs<'args>,
5253 ) -> flatbuffers::WIPOffset<TagCreatedUpdate<'bldr>> {
5254 let mut builder = TagCreatedUpdateBuilder::new(_fbb);
5255 if let Some(x) = args.name {
5256 builder.add_name(x);
5257 }
5258 builder.finish()
5259 }
5260
5261 #[inline]
5262 pub fn name(&self) -> &'a str {
5263 unsafe {
5267 self._tab
5268 .get::<flatbuffers::ForwardsUOffset<&str>>(
5269 TagCreatedUpdate::VT_NAME,
5270 None,
5271 )
5272 .unwrap()
5273 }
5274 }
5275 }
5276
5277 impl flatbuffers::Verifiable for TagCreatedUpdate<'_> {
5278 #[inline]
5279 fn run_verifier(
5280 v: &mut flatbuffers::Verifier,
5281 pos: usize,
5282 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5283 use self::flatbuffers::Verifiable;
5284 v.visit_table(pos)?
5285 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
5286 "name",
5287 Self::VT_NAME,
5288 true,
5289 )?
5290 .finish();
5291 Ok(())
5292 }
5293 }
5294 pub struct TagCreatedUpdateArgs<'a> {
5295 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
5296 }
5297 impl<'a> Default for TagCreatedUpdateArgs<'a> {
5298 #[inline]
5299 fn default() -> Self {
5300 TagCreatedUpdateArgs {
5301 name: None, }
5303 }
5304 }
5305
5306 pub struct TagCreatedUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5307 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5308 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5309 }
5310 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TagCreatedUpdateBuilder<'a, 'b, A> {
5311 #[inline]
5312 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
5313 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
5314 TagCreatedUpdate::VT_NAME,
5315 name,
5316 );
5317 }
5318 #[inline]
5319 pub fn new(
5320 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5321 ) -> TagCreatedUpdateBuilder<'a, 'b, A> {
5322 let start = _fbb.start_table();
5323 TagCreatedUpdateBuilder { fbb_: _fbb, start_: start }
5324 }
5325 #[inline]
5326 pub fn finish(self) -> flatbuffers::WIPOffset<TagCreatedUpdate<'a>> {
5327 let o = self.fbb_.end_table(self.start_);
5328 self.fbb_.required(o, TagCreatedUpdate::VT_NAME, "name");
5329 flatbuffers::WIPOffset::new(o.value())
5330 }
5331 }
5332
5333 impl core::fmt::Debug for TagCreatedUpdate<'_> {
5334 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5335 let mut ds = f.debug_struct("TagCreatedUpdate");
5336 ds.field("name", &self.name());
5337 ds.finish()
5338 }
5339 }
5340 pub enum TagDeletedUpdateOffset {}
5341 #[derive(Copy, Clone, PartialEq)]
5342
5343 pub struct TagDeletedUpdate<'a> {
5344 pub _tab: flatbuffers::Table<'a>,
5345 }
5346
5347 impl<'a> flatbuffers::Follow<'a> for TagDeletedUpdate<'a> {
5348 type Inner = TagDeletedUpdate<'a>;
5349 #[inline]
5350 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5351 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
5352 }
5353 }
5354
5355 impl<'a> TagDeletedUpdate<'a> {
5356 pub const VT_NAME: flatbuffers::VOffsetT = 4;
5357 pub const VT_PREVIOUS_SNAP_ID: flatbuffers::VOffsetT = 6;
5358
5359 #[inline]
5360 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5361 TagDeletedUpdate { _tab: table }
5362 }
5363 #[allow(unused_mut)]
5364 pub fn create<
5365 'bldr: 'args,
5366 'args: 'mut_bldr,
5367 'mut_bldr,
5368 A: flatbuffers::Allocator + 'bldr,
5369 >(
5370 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5371 args: &'args TagDeletedUpdateArgs<'args>,
5372 ) -> flatbuffers::WIPOffset<TagDeletedUpdate<'bldr>> {
5373 let mut builder = TagDeletedUpdateBuilder::new(_fbb);
5374 if let Some(x) = args.previous_snap_id {
5375 builder.add_previous_snap_id(x);
5376 }
5377 if let Some(x) = args.name {
5378 builder.add_name(x);
5379 }
5380 builder.finish()
5381 }
5382
5383 #[inline]
5384 pub fn name(&self) -> &'a str {
5385 unsafe {
5389 self._tab
5390 .get::<flatbuffers::ForwardsUOffset<&str>>(
5391 TagDeletedUpdate::VT_NAME,
5392 None,
5393 )
5394 .unwrap()
5395 }
5396 }
5397 #[inline]
5398 pub fn previous_snap_id(&self) -> &'a ObjectId12 {
5399 unsafe {
5403 self._tab
5404 .get::<ObjectId12>(TagDeletedUpdate::VT_PREVIOUS_SNAP_ID, None)
5405 .unwrap()
5406 }
5407 }
5408 }
5409
5410 impl flatbuffers::Verifiable for TagDeletedUpdate<'_> {
5411 #[inline]
5412 fn run_verifier(
5413 v: &mut flatbuffers::Verifier,
5414 pos: usize,
5415 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5416 use self::flatbuffers::Verifiable;
5417 v.visit_table(pos)?
5418 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
5419 "name",
5420 Self::VT_NAME,
5421 true,
5422 )?
5423 .visit_field::<ObjectId12>(
5424 "previous_snap_id",
5425 Self::VT_PREVIOUS_SNAP_ID,
5426 true,
5427 )?
5428 .finish();
5429 Ok(())
5430 }
5431 }
5432 pub struct TagDeletedUpdateArgs<'a> {
5433 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
5434 pub previous_snap_id: Option<&'a ObjectId12>,
5435 }
5436 impl<'a> Default for TagDeletedUpdateArgs<'a> {
5437 #[inline]
5438 fn default() -> Self {
5439 TagDeletedUpdateArgs {
5440 name: None, previous_snap_id: None, }
5443 }
5444 }
5445
5446 pub struct TagDeletedUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5447 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5448 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5449 }
5450 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> TagDeletedUpdateBuilder<'a, 'b, A> {
5451 #[inline]
5452 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
5453 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
5454 TagDeletedUpdate::VT_NAME,
5455 name,
5456 );
5457 }
5458 #[inline]
5459 pub fn add_previous_snap_id(&mut self, previous_snap_id: &ObjectId12) {
5460 self.fbb_.push_slot_always::<&ObjectId12>(
5461 TagDeletedUpdate::VT_PREVIOUS_SNAP_ID,
5462 previous_snap_id,
5463 );
5464 }
5465 #[inline]
5466 pub fn new(
5467 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5468 ) -> TagDeletedUpdateBuilder<'a, 'b, A> {
5469 let start = _fbb.start_table();
5470 TagDeletedUpdateBuilder { fbb_: _fbb, start_: start }
5471 }
5472 #[inline]
5473 pub fn finish(self) -> flatbuffers::WIPOffset<TagDeletedUpdate<'a>> {
5474 let o = self.fbb_.end_table(self.start_);
5475 self.fbb_.required(o, TagDeletedUpdate::VT_NAME, "name");
5476 self.fbb_.required(
5477 o,
5478 TagDeletedUpdate::VT_PREVIOUS_SNAP_ID,
5479 "previous_snap_id",
5480 );
5481 flatbuffers::WIPOffset::new(o.value())
5482 }
5483 }
5484
5485 impl core::fmt::Debug for TagDeletedUpdate<'_> {
5486 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5487 let mut ds = f.debug_struct("TagDeletedUpdate");
5488 ds.field("name", &self.name());
5489 ds.field("previous_snap_id", &self.previous_snap_id());
5490 ds.finish()
5491 }
5492 }
5493 pub enum BranchCreatedUpdateOffset {}
5494 #[derive(Copy, Clone, PartialEq)]
5495
5496 pub struct BranchCreatedUpdate<'a> {
5497 pub _tab: flatbuffers::Table<'a>,
5498 }
5499
5500 impl<'a> flatbuffers::Follow<'a> for BranchCreatedUpdate<'a> {
5501 type Inner = BranchCreatedUpdate<'a>;
5502 #[inline]
5503 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5504 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
5505 }
5506 }
5507
5508 impl<'a> BranchCreatedUpdate<'a> {
5509 pub const VT_NAME: flatbuffers::VOffsetT = 4;
5510
5511 #[inline]
5512 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5513 BranchCreatedUpdate { _tab: table }
5514 }
5515 #[allow(unused_mut)]
5516 pub fn create<
5517 'bldr: 'args,
5518 'args: 'mut_bldr,
5519 'mut_bldr,
5520 A: flatbuffers::Allocator + 'bldr,
5521 >(
5522 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5523 args: &'args BranchCreatedUpdateArgs<'args>,
5524 ) -> flatbuffers::WIPOffset<BranchCreatedUpdate<'bldr>> {
5525 let mut builder = BranchCreatedUpdateBuilder::new(_fbb);
5526 if let Some(x) = args.name {
5527 builder.add_name(x);
5528 }
5529 builder.finish()
5530 }
5531
5532 #[inline]
5533 pub fn name(&self) -> &'a str {
5534 unsafe {
5538 self._tab
5539 .get::<flatbuffers::ForwardsUOffset<&str>>(
5540 BranchCreatedUpdate::VT_NAME,
5541 None,
5542 )
5543 .unwrap()
5544 }
5545 }
5546 }
5547
5548 impl flatbuffers::Verifiable for BranchCreatedUpdate<'_> {
5549 #[inline]
5550 fn run_verifier(
5551 v: &mut flatbuffers::Verifier,
5552 pos: usize,
5553 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5554 use self::flatbuffers::Verifiable;
5555 v.visit_table(pos)?
5556 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
5557 "name",
5558 Self::VT_NAME,
5559 true,
5560 )?
5561 .finish();
5562 Ok(())
5563 }
5564 }
5565 pub struct BranchCreatedUpdateArgs<'a> {
5566 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
5567 }
5568 impl<'a> Default for BranchCreatedUpdateArgs<'a> {
5569 #[inline]
5570 fn default() -> Self {
5571 BranchCreatedUpdateArgs {
5572 name: None, }
5574 }
5575 }
5576
5577 pub struct BranchCreatedUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5578 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5579 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5580 }
5581 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BranchCreatedUpdateBuilder<'a, 'b, A> {
5582 #[inline]
5583 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
5584 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
5585 BranchCreatedUpdate::VT_NAME,
5586 name,
5587 );
5588 }
5589 #[inline]
5590 pub fn new(
5591 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5592 ) -> BranchCreatedUpdateBuilder<'a, 'b, A> {
5593 let start = _fbb.start_table();
5594 BranchCreatedUpdateBuilder { fbb_: _fbb, start_: start }
5595 }
5596 #[inline]
5597 pub fn finish(self) -> flatbuffers::WIPOffset<BranchCreatedUpdate<'a>> {
5598 let o = self.fbb_.end_table(self.start_);
5599 self.fbb_.required(o, BranchCreatedUpdate::VT_NAME, "name");
5600 flatbuffers::WIPOffset::new(o.value())
5601 }
5602 }
5603
5604 impl core::fmt::Debug for BranchCreatedUpdate<'_> {
5605 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5606 let mut ds = f.debug_struct("BranchCreatedUpdate");
5607 ds.field("name", &self.name());
5608 ds.finish()
5609 }
5610 }
5611 pub enum BranchDeletedUpdateOffset {}
5612 #[derive(Copy, Clone, PartialEq)]
5613
5614 pub struct BranchDeletedUpdate<'a> {
5615 pub _tab: flatbuffers::Table<'a>,
5616 }
5617
5618 impl<'a> flatbuffers::Follow<'a> for BranchDeletedUpdate<'a> {
5619 type Inner = BranchDeletedUpdate<'a>;
5620 #[inline]
5621 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5622 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
5623 }
5624 }
5625
5626 impl<'a> BranchDeletedUpdate<'a> {
5627 pub const VT_NAME: flatbuffers::VOffsetT = 4;
5628 pub const VT_PREVIOUS_SNAP_ID: flatbuffers::VOffsetT = 6;
5629
5630 #[inline]
5631 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5632 BranchDeletedUpdate { _tab: table }
5633 }
5634 #[allow(unused_mut)]
5635 pub fn create<
5636 'bldr: 'args,
5637 'args: 'mut_bldr,
5638 'mut_bldr,
5639 A: flatbuffers::Allocator + 'bldr,
5640 >(
5641 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5642 args: &'args BranchDeletedUpdateArgs<'args>,
5643 ) -> flatbuffers::WIPOffset<BranchDeletedUpdate<'bldr>> {
5644 let mut builder = BranchDeletedUpdateBuilder::new(_fbb);
5645 if let Some(x) = args.previous_snap_id {
5646 builder.add_previous_snap_id(x);
5647 }
5648 if let Some(x) = args.name {
5649 builder.add_name(x);
5650 }
5651 builder.finish()
5652 }
5653
5654 #[inline]
5655 pub fn name(&self) -> &'a str {
5656 unsafe {
5660 self._tab
5661 .get::<flatbuffers::ForwardsUOffset<&str>>(
5662 BranchDeletedUpdate::VT_NAME,
5663 None,
5664 )
5665 .unwrap()
5666 }
5667 }
5668 #[inline]
5669 pub fn previous_snap_id(&self) -> &'a ObjectId12 {
5670 unsafe {
5674 self._tab
5675 .get::<ObjectId12>(BranchDeletedUpdate::VT_PREVIOUS_SNAP_ID, None)
5676 .unwrap()
5677 }
5678 }
5679 }
5680
5681 impl flatbuffers::Verifiable for BranchDeletedUpdate<'_> {
5682 #[inline]
5683 fn run_verifier(
5684 v: &mut flatbuffers::Verifier,
5685 pos: usize,
5686 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5687 use self::flatbuffers::Verifiable;
5688 v.visit_table(pos)?
5689 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
5690 "name",
5691 Self::VT_NAME,
5692 true,
5693 )?
5694 .visit_field::<ObjectId12>(
5695 "previous_snap_id",
5696 Self::VT_PREVIOUS_SNAP_ID,
5697 true,
5698 )?
5699 .finish();
5700 Ok(())
5701 }
5702 }
5703 pub struct BranchDeletedUpdateArgs<'a> {
5704 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
5705 pub previous_snap_id: Option<&'a ObjectId12>,
5706 }
5707 impl<'a> Default for BranchDeletedUpdateArgs<'a> {
5708 #[inline]
5709 fn default() -> Self {
5710 BranchDeletedUpdateArgs {
5711 name: None, previous_snap_id: None, }
5714 }
5715 }
5716
5717 pub struct BranchDeletedUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5718 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5719 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5720 }
5721 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BranchDeletedUpdateBuilder<'a, 'b, A> {
5722 #[inline]
5723 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
5724 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
5725 BranchDeletedUpdate::VT_NAME,
5726 name,
5727 );
5728 }
5729 #[inline]
5730 pub fn add_previous_snap_id(&mut self, previous_snap_id: &ObjectId12) {
5731 self.fbb_.push_slot_always::<&ObjectId12>(
5732 BranchDeletedUpdate::VT_PREVIOUS_SNAP_ID,
5733 previous_snap_id,
5734 );
5735 }
5736 #[inline]
5737 pub fn new(
5738 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5739 ) -> BranchDeletedUpdateBuilder<'a, 'b, A> {
5740 let start = _fbb.start_table();
5741 BranchDeletedUpdateBuilder { fbb_: _fbb, start_: start }
5742 }
5743 #[inline]
5744 pub fn finish(self) -> flatbuffers::WIPOffset<BranchDeletedUpdate<'a>> {
5745 let o = self.fbb_.end_table(self.start_);
5746 self.fbb_.required(o, BranchDeletedUpdate::VT_NAME, "name");
5747 self.fbb_.required(
5748 o,
5749 BranchDeletedUpdate::VT_PREVIOUS_SNAP_ID,
5750 "previous_snap_id",
5751 );
5752 flatbuffers::WIPOffset::new(o.value())
5753 }
5754 }
5755
5756 impl core::fmt::Debug for BranchDeletedUpdate<'_> {
5757 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5758 let mut ds = f.debug_struct("BranchDeletedUpdate");
5759 ds.field("name", &self.name());
5760 ds.field("previous_snap_id", &self.previous_snap_id());
5761 ds.finish()
5762 }
5763 }
5764 pub enum BranchResetUpdateOffset {}
5765 #[derive(Copy, Clone, PartialEq)]
5766
5767 pub struct BranchResetUpdate<'a> {
5768 pub _tab: flatbuffers::Table<'a>,
5769 }
5770
5771 impl<'a> flatbuffers::Follow<'a> for BranchResetUpdate<'a> {
5772 type Inner = BranchResetUpdate<'a>;
5773 #[inline]
5774 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5775 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
5776 }
5777 }
5778
5779 impl<'a> BranchResetUpdate<'a> {
5780 pub const VT_NAME: flatbuffers::VOffsetT = 4;
5781 pub const VT_PREVIOUS_SNAP_ID: flatbuffers::VOffsetT = 6;
5782
5783 #[inline]
5784 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5785 BranchResetUpdate { _tab: table }
5786 }
5787 #[allow(unused_mut)]
5788 pub fn create<
5789 'bldr: 'args,
5790 'args: 'mut_bldr,
5791 'mut_bldr,
5792 A: flatbuffers::Allocator + 'bldr,
5793 >(
5794 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5795 args: &'args BranchResetUpdateArgs<'args>,
5796 ) -> flatbuffers::WIPOffset<BranchResetUpdate<'bldr>> {
5797 let mut builder = BranchResetUpdateBuilder::new(_fbb);
5798 if let Some(x) = args.previous_snap_id {
5799 builder.add_previous_snap_id(x);
5800 }
5801 if let Some(x) = args.name {
5802 builder.add_name(x);
5803 }
5804 builder.finish()
5805 }
5806
5807 #[inline]
5808 pub fn name(&self) -> &'a str {
5809 unsafe {
5813 self._tab
5814 .get::<flatbuffers::ForwardsUOffset<&str>>(
5815 BranchResetUpdate::VT_NAME,
5816 None,
5817 )
5818 .unwrap()
5819 }
5820 }
5821 #[inline]
5822 pub fn previous_snap_id(&self) -> &'a ObjectId12 {
5823 unsafe {
5827 self._tab
5828 .get::<ObjectId12>(BranchResetUpdate::VT_PREVIOUS_SNAP_ID, None)
5829 .unwrap()
5830 }
5831 }
5832 }
5833
5834 impl flatbuffers::Verifiable for BranchResetUpdate<'_> {
5835 #[inline]
5836 fn run_verifier(
5837 v: &mut flatbuffers::Verifier,
5838 pos: usize,
5839 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5840 use self::flatbuffers::Verifiable;
5841 v.visit_table(pos)?
5842 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
5843 "name",
5844 Self::VT_NAME,
5845 true,
5846 )?
5847 .visit_field::<ObjectId12>(
5848 "previous_snap_id",
5849 Self::VT_PREVIOUS_SNAP_ID,
5850 true,
5851 )?
5852 .finish();
5853 Ok(())
5854 }
5855 }
5856 pub struct BranchResetUpdateArgs<'a> {
5857 pub name: Option<flatbuffers::WIPOffset<&'a str>>,
5858 pub previous_snap_id: Option<&'a ObjectId12>,
5859 }
5860 impl<'a> Default for BranchResetUpdateArgs<'a> {
5861 #[inline]
5862 fn default() -> Self {
5863 BranchResetUpdateArgs {
5864 name: None, previous_snap_id: None, }
5867 }
5868 }
5869
5870 pub struct BranchResetUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
5871 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5872 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
5873 }
5874 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> BranchResetUpdateBuilder<'a, 'b, A> {
5875 #[inline]
5876 pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) {
5877 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
5878 BranchResetUpdate::VT_NAME,
5879 name,
5880 );
5881 }
5882 #[inline]
5883 pub fn add_previous_snap_id(&mut self, previous_snap_id: &ObjectId12) {
5884 self.fbb_.push_slot_always::<&ObjectId12>(
5885 BranchResetUpdate::VT_PREVIOUS_SNAP_ID,
5886 previous_snap_id,
5887 );
5888 }
5889 #[inline]
5890 pub fn new(
5891 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
5892 ) -> BranchResetUpdateBuilder<'a, 'b, A> {
5893 let start = _fbb.start_table();
5894 BranchResetUpdateBuilder { fbb_: _fbb, start_: start }
5895 }
5896 #[inline]
5897 pub fn finish(self) -> flatbuffers::WIPOffset<BranchResetUpdate<'a>> {
5898 let o = self.fbb_.end_table(self.start_);
5899 self.fbb_.required(o, BranchResetUpdate::VT_NAME, "name");
5900 self.fbb_.required(
5901 o,
5902 BranchResetUpdate::VT_PREVIOUS_SNAP_ID,
5903 "previous_snap_id",
5904 );
5905 flatbuffers::WIPOffset::new(o.value())
5906 }
5907 }
5908
5909 impl core::fmt::Debug for BranchResetUpdate<'_> {
5910 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
5911 let mut ds = f.debug_struct("BranchResetUpdate");
5912 ds.field("name", &self.name());
5913 ds.field("previous_snap_id", &self.previous_snap_id());
5914 ds.finish()
5915 }
5916 }
5917 pub enum NewCommitUpdateOffset {}
5918 #[derive(Copy, Clone, PartialEq)]
5919
5920 pub struct NewCommitUpdate<'a> {
5921 pub _tab: flatbuffers::Table<'a>,
5922 }
5923
5924 impl<'a> flatbuffers::Follow<'a> for NewCommitUpdate<'a> {
5925 type Inner = NewCommitUpdate<'a>;
5926 #[inline]
5927 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
5928 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
5929 }
5930 }
5931
5932 impl<'a> NewCommitUpdate<'a> {
5933 pub const VT_BRANCH: flatbuffers::VOffsetT = 4;
5934 pub const VT_NEW_SNAP_ID: flatbuffers::VOffsetT = 6;
5935
5936 #[inline]
5937 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
5938 NewCommitUpdate { _tab: table }
5939 }
5940 #[allow(unused_mut)]
5941 pub fn create<
5942 'bldr: 'args,
5943 'args: 'mut_bldr,
5944 'mut_bldr,
5945 A: flatbuffers::Allocator + 'bldr,
5946 >(
5947 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
5948 args: &'args NewCommitUpdateArgs<'args>,
5949 ) -> flatbuffers::WIPOffset<NewCommitUpdate<'bldr>> {
5950 let mut builder = NewCommitUpdateBuilder::new(_fbb);
5951 if let Some(x) = args.new_snap_id {
5952 builder.add_new_snap_id(x);
5953 }
5954 if let Some(x) = args.branch {
5955 builder.add_branch(x);
5956 }
5957 builder.finish()
5958 }
5959
5960 #[inline]
5961 pub fn branch(&self) -> &'a str {
5962 unsafe {
5966 self._tab
5967 .get::<flatbuffers::ForwardsUOffset<&str>>(
5968 NewCommitUpdate::VT_BRANCH,
5969 None,
5970 )
5971 .unwrap()
5972 }
5973 }
5974 #[inline]
5975 pub fn new_snap_id(&self) -> &'a ObjectId12 {
5976 unsafe {
5980 self._tab
5981 .get::<ObjectId12>(NewCommitUpdate::VT_NEW_SNAP_ID, None)
5982 .unwrap()
5983 }
5984 }
5985 }
5986
5987 impl flatbuffers::Verifiable for NewCommitUpdate<'_> {
5988 #[inline]
5989 fn run_verifier(
5990 v: &mut flatbuffers::Verifier,
5991 pos: usize,
5992 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
5993 use self::flatbuffers::Verifiable;
5994 v.visit_table(pos)?
5995 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
5996 "branch",
5997 Self::VT_BRANCH,
5998 true,
5999 )?
6000 .visit_field::<ObjectId12>("new_snap_id", Self::VT_NEW_SNAP_ID, true)?
6001 .finish();
6002 Ok(())
6003 }
6004 }
6005 pub struct NewCommitUpdateArgs<'a> {
6006 pub branch: Option<flatbuffers::WIPOffset<&'a str>>,
6007 pub new_snap_id: Option<&'a ObjectId12>,
6008 }
6009 impl<'a> Default for NewCommitUpdateArgs<'a> {
6010 #[inline]
6011 fn default() -> Self {
6012 NewCommitUpdateArgs {
6013 branch: None, new_snap_id: None, }
6016 }
6017 }
6018
6019 pub struct NewCommitUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6020 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6021 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6022 }
6023 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> NewCommitUpdateBuilder<'a, 'b, A> {
6024 #[inline]
6025 pub fn add_branch(&mut self, branch: flatbuffers::WIPOffset<&'b str>) {
6026 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
6027 NewCommitUpdate::VT_BRANCH,
6028 branch,
6029 );
6030 }
6031 #[inline]
6032 pub fn add_new_snap_id(&mut self, new_snap_id: &ObjectId12) {
6033 self.fbb_.push_slot_always::<&ObjectId12>(
6034 NewCommitUpdate::VT_NEW_SNAP_ID,
6035 new_snap_id,
6036 );
6037 }
6038 #[inline]
6039 pub fn new(
6040 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6041 ) -> NewCommitUpdateBuilder<'a, 'b, A> {
6042 let start = _fbb.start_table();
6043 NewCommitUpdateBuilder { fbb_: _fbb, start_: start }
6044 }
6045 #[inline]
6046 pub fn finish(self) -> flatbuffers::WIPOffset<NewCommitUpdate<'a>> {
6047 let o = self.fbb_.end_table(self.start_);
6048 self.fbb_.required(o, NewCommitUpdate::VT_BRANCH, "branch");
6049 self.fbb_.required(o, NewCommitUpdate::VT_NEW_SNAP_ID, "new_snap_id");
6050 flatbuffers::WIPOffset::new(o.value())
6051 }
6052 }
6053
6054 impl core::fmt::Debug for NewCommitUpdate<'_> {
6055 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6056 let mut ds = f.debug_struct("NewCommitUpdate");
6057 ds.field("branch", &self.branch());
6058 ds.field("new_snap_id", &self.new_snap_id());
6059 ds.finish()
6060 }
6061 }
6062 pub enum CommitAmendedUpdateOffset {}
6063 #[derive(Copy, Clone, PartialEq)]
6064
6065 pub struct CommitAmendedUpdate<'a> {
6066 pub _tab: flatbuffers::Table<'a>,
6067 }
6068
6069 impl<'a> flatbuffers::Follow<'a> for CommitAmendedUpdate<'a> {
6070 type Inner = CommitAmendedUpdate<'a>;
6071 #[inline]
6072 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6073 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
6074 }
6075 }
6076
6077 impl<'a> CommitAmendedUpdate<'a> {
6078 pub const VT_BRANCH: flatbuffers::VOffsetT = 4;
6079 pub const VT_PREVIOUS_SNAP_ID: flatbuffers::VOffsetT = 6;
6080 pub const VT_NEW_SNAP_ID: flatbuffers::VOffsetT = 8;
6081
6082 #[inline]
6083 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6084 CommitAmendedUpdate { _tab: table }
6085 }
6086 #[allow(unused_mut)]
6087 pub fn create<
6088 'bldr: 'args,
6089 'args: 'mut_bldr,
6090 'mut_bldr,
6091 A: flatbuffers::Allocator + 'bldr,
6092 >(
6093 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6094 args: &'args CommitAmendedUpdateArgs<'args>,
6095 ) -> flatbuffers::WIPOffset<CommitAmendedUpdate<'bldr>> {
6096 let mut builder = CommitAmendedUpdateBuilder::new(_fbb);
6097 if let Some(x) = args.new_snap_id {
6098 builder.add_new_snap_id(x);
6099 }
6100 if let Some(x) = args.previous_snap_id {
6101 builder.add_previous_snap_id(x);
6102 }
6103 if let Some(x) = args.branch {
6104 builder.add_branch(x);
6105 }
6106 builder.finish()
6107 }
6108
6109 #[inline]
6110 pub fn branch(&self) -> &'a str {
6111 unsafe {
6115 self._tab
6116 .get::<flatbuffers::ForwardsUOffset<&str>>(
6117 CommitAmendedUpdate::VT_BRANCH,
6118 None,
6119 )
6120 .unwrap()
6121 }
6122 }
6123 #[inline]
6124 pub fn previous_snap_id(&self) -> &'a ObjectId12 {
6125 unsafe {
6129 self._tab
6130 .get::<ObjectId12>(CommitAmendedUpdate::VT_PREVIOUS_SNAP_ID, None)
6131 .unwrap()
6132 }
6133 }
6134 #[inline]
6135 pub fn new_snap_id(&self) -> &'a ObjectId12 {
6136 unsafe {
6140 self._tab
6141 .get::<ObjectId12>(CommitAmendedUpdate::VT_NEW_SNAP_ID, None)
6142 .unwrap()
6143 }
6144 }
6145 }
6146
6147 impl flatbuffers::Verifiable for CommitAmendedUpdate<'_> {
6148 #[inline]
6149 fn run_verifier(
6150 v: &mut flatbuffers::Verifier,
6151 pos: usize,
6152 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6153 use self::flatbuffers::Verifiable;
6154 v.visit_table(pos)?
6155 .visit_field::<flatbuffers::ForwardsUOffset<&str>>(
6156 "branch",
6157 Self::VT_BRANCH,
6158 true,
6159 )?
6160 .visit_field::<ObjectId12>(
6161 "previous_snap_id",
6162 Self::VT_PREVIOUS_SNAP_ID,
6163 true,
6164 )?
6165 .visit_field::<ObjectId12>("new_snap_id", Self::VT_NEW_SNAP_ID, true)?
6166 .finish();
6167 Ok(())
6168 }
6169 }
6170 pub struct CommitAmendedUpdateArgs<'a> {
6171 pub branch: Option<flatbuffers::WIPOffset<&'a str>>,
6172 pub previous_snap_id: Option<&'a ObjectId12>,
6173 pub new_snap_id: Option<&'a ObjectId12>,
6174 }
6175 impl<'a> Default for CommitAmendedUpdateArgs<'a> {
6176 #[inline]
6177 fn default() -> Self {
6178 CommitAmendedUpdateArgs {
6179 branch: None, previous_snap_id: None, new_snap_id: None, }
6183 }
6184 }
6185
6186 pub struct CommitAmendedUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6187 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6188 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6189 }
6190 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> CommitAmendedUpdateBuilder<'a, 'b, A> {
6191 #[inline]
6192 pub fn add_branch(&mut self, branch: flatbuffers::WIPOffset<&'b str>) {
6193 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
6194 CommitAmendedUpdate::VT_BRANCH,
6195 branch,
6196 );
6197 }
6198 #[inline]
6199 pub fn add_previous_snap_id(&mut self, previous_snap_id: &ObjectId12) {
6200 self.fbb_.push_slot_always::<&ObjectId12>(
6201 CommitAmendedUpdate::VT_PREVIOUS_SNAP_ID,
6202 previous_snap_id,
6203 );
6204 }
6205 #[inline]
6206 pub fn add_new_snap_id(&mut self, new_snap_id: &ObjectId12) {
6207 self.fbb_.push_slot_always::<&ObjectId12>(
6208 CommitAmendedUpdate::VT_NEW_SNAP_ID,
6209 new_snap_id,
6210 );
6211 }
6212 #[inline]
6213 pub fn new(
6214 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6215 ) -> CommitAmendedUpdateBuilder<'a, 'b, A> {
6216 let start = _fbb.start_table();
6217 CommitAmendedUpdateBuilder { fbb_: _fbb, start_: start }
6218 }
6219 #[inline]
6220 pub fn finish(self) -> flatbuffers::WIPOffset<CommitAmendedUpdate<'a>> {
6221 let o = self.fbb_.end_table(self.start_);
6222 self.fbb_.required(o, CommitAmendedUpdate::VT_BRANCH, "branch");
6223 self.fbb_.required(
6224 o,
6225 CommitAmendedUpdate::VT_PREVIOUS_SNAP_ID,
6226 "previous_snap_id",
6227 );
6228 self.fbb_.required(o, CommitAmendedUpdate::VT_NEW_SNAP_ID, "new_snap_id");
6229 flatbuffers::WIPOffset::new(o.value())
6230 }
6231 }
6232
6233 impl core::fmt::Debug for CommitAmendedUpdate<'_> {
6234 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6235 let mut ds = f.debug_struct("CommitAmendedUpdate");
6236 ds.field("branch", &self.branch());
6237 ds.field("previous_snap_id", &self.previous_snap_id());
6238 ds.field("new_snap_id", &self.new_snap_id());
6239 ds.finish()
6240 }
6241 }
6242 pub enum NewDetachedSnapshotUpdateOffset {}
6243 #[derive(Copy, Clone, PartialEq)]
6244
6245 pub struct NewDetachedSnapshotUpdate<'a> {
6246 pub _tab: flatbuffers::Table<'a>,
6247 }
6248
6249 impl<'a> flatbuffers::Follow<'a> for NewDetachedSnapshotUpdate<'a> {
6250 type Inner = NewDetachedSnapshotUpdate<'a>;
6251 #[inline]
6252 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6253 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
6254 }
6255 }
6256
6257 impl<'a> NewDetachedSnapshotUpdate<'a> {
6258 pub const VT_NEW_SNAP_ID: flatbuffers::VOffsetT = 4;
6259
6260 #[inline]
6261 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6262 NewDetachedSnapshotUpdate { _tab: table }
6263 }
6264 #[allow(unused_mut)]
6265 pub fn create<
6266 'bldr: 'args,
6267 'args: 'mut_bldr,
6268 'mut_bldr,
6269 A: flatbuffers::Allocator + 'bldr,
6270 >(
6271 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6272 args: &'args NewDetachedSnapshotUpdateArgs<'args>,
6273 ) -> flatbuffers::WIPOffset<NewDetachedSnapshotUpdate<'bldr>> {
6274 let mut builder = NewDetachedSnapshotUpdateBuilder::new(_fbb);
6275 if let Some(x) = args.new_snap_id {
6276 builder.add_new_snap_id(x);
6277 }
6278 builder.finish()
6279 }
6280
6281 #[inline]
6282 pub fn new_snap_id(&self) -> &'a ObjectId12 {
6283 unsafe {
6287 self._tab
6288 .get::<ObjectId12>(NewDetachedSnapshotUpdate::VT_NEW_SNAP_ID, None)
6289 .unwrap()
6290 }
6291 }
6292 }
6293
6294 impl flatbuffers::Verifiable for NewDetachedSnapshotUpdate<'_> {
6295 #[inline]
6296 fn run_verifier(
6297 v: &mut flatbuffers::Verifier,
6298 pos: usize,
6299 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6300 use self::flatbuffers::Verifiable;
6301 v.visit_table(pos)?
6302 .visit_field::<ObjectId12>("new_snap_id", Self::VT_NEW_SNAP_ID, true)?
6303 .finish();
6304 Ok(())
6305 }
6306 }
6307 pub struct NewDetachedSnapshotUpdateArgs<'a> {
6308 pub new_snap_id: Option<&'a ObjectId12>,
6309 }
6310 impl<'a> Default for NewDetachedSnapshotUpdateArgs<'a> {
6311 #[inline]
6312 fn default() -> Self {
6313 NewDetachedSnapshotUpdateArgs {
6314 new_snap_id: None, }
6316 }
6317 }
6318
6319 pub struct NewDetachedSnapshotUpdateBuilder<
6320 'a: 'b,
6321 'b,
6322 A: flatbuffers::Allocator + 'a,
6323 > {
6324 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6325 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6326 }
6327 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a>
6328 NewDetachedSnapshotUpdateBuilder<'a, 'b, A>
6329 {
6330 #[inline]
6331 pub fn add_new_snap_id(&mut self, new_snap_id: &ObjectId12) {
6332 self.fbb_.push_slot_always::<&ObjectId12>(
6333 NewDetachedSnapshotUpdate::VT_NEW_SNAP_ID,
6334 new_snap_id,
6335 );
6336 }
6337 #[inline]
6338 pub fn new(
6339 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6340 ) -> NewDetachedSnapshotUpdateBuilder<'a, 'b, A> {
6341 let start = _fbb.start_table();
6342 NewDetachedSnapshotUpdateBuilder { fbb_: _fbb, start_: start }
6343 }
6344 #[inline]
6345 pub fn finish(self) -> flatbuffers::WIPOffset<NewDetachedSnapshotUpdate<'a>> {
6346 let o = self.fbb_.end_table(self.start_);
6347 self.fbb_.required(
6348 o,
6349 NewDetachedSnapshotUpdate::VT_NEW_SNAP_ID,
6350 "new_snap_id",
6351 );
6352 flatbuffers::WIPOffset::new(o.value())
6353 }
6354 }
6355
6356 impl core::fmt::Debug for NewDetachedSnapshotUpdate<'_> {
6357 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6358 let mut ds = f.debug_struct("NewDetachedSnapshotUpdate");
6359 ds.field("new_snap_id", &self.new_snap_id());
6360 ds.finish()
6361 }
6362 }
6363 pub enum GCRanUpdateOffset {}
6364 #[derive(Copy, Clone, PartialEq)]
6365
6366 pub struct GCRanUpdate<'a> {
6367 pub _tab: flatbuffers::Table<'a>,
6368 }
6369
6370 impl<'a> flatbuffers::Follow<'a> for GCRanUpdate<'a> {
6371 type Inner = GCRanUpdate<'a>;
6372 #[inline]
6373 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6374 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
6375 }
6376 }
6377
6378 impl<'a> GCRanUpdate<'a> {
6379 #[inline]
6380 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6381 GCRanUpdate { _tab: table }
6382 }
6383 #[allow(unused_mut)]
6384 pub fn create<
6385 'bldr: 'args,
6386 'args: 'mut_bldr,
6387 'mut_bldr,
6388 A: flatbuffers::Allocator + 'bldr,
6389 >(
6390 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6391 _args: &'args GCRanUpdateArgs,
6392 ) -> flatbuffers::WIPOffset<GCRanUpdate<'bldr>> {
6393 let mut builder = GCRanUpdateBuilder::new(_fbb);
6394 builder.finish()
6395 }
6396 }
6397
6398 impl flatbuffers::Verifiable for GCRanUpdate<'_> {
6399 #[inline]
6400 fn run_verifier(
6401 v: &mut flatbuffers::Verifier,
6402 pos: usize,
6403 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6404 use self::flatbuffers::Verifiable;
6405 v.visit_table(pos)?.finish();
6406 Ok(())
6407 }
6408 }
6409 pub struct GCRanUpdateArgs {}
6410 impl<'a> Default for GCRanUpdateArgs {
6411 #[inline]
6412 fn default() -> Self {
6413 GCRanUpdateArgs {}
6414 }
6415 }
6416
6417 pub struct GCRanUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6418 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6419 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6420 }
6421 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GCRanUpdateBuilder<'a, 'b, A> {
6422 #[inline]
6423 pub fn new(
6424 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6425 ) -> GCRanUpdateBuilder<'a, 'b, A> {
6426 let start = _fbb.start_table();
6427 GCRanUpdateBuilder { fbb_: _fbb, start_: start }
6428 }
6429 #[inline]
6430 pub fn finish(self) -> flatbuffers::WIPOffset<GCRanUpdate<'a>> {
6431 let o = self.fbb_.end_table(self.start_);
6432 flatbuffers::WIPOffset::new(o.value())
6433 }
6434 }
6435
6436 impl core::fmt::Debug for GCRanUpdate<'_> {
6437 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6438 let mut ds = f.debug_struct("GCRanUpdate");
6439 ds.finish()
6440 }
6441 }
6442 pub enum ExpirationRanUpdateOffset {}
6443 #[derive(Copy, Clone, PartialEq)]
6444
6445 pub struct ExpirationRanUpdate<'a> {
6446 pub _tab: flatbuffers::Table<'a>,
6447 }
6448
6449 impl<'a> flatbuffers::Follow<'a> for ExpirationRanUpdate<'a> {
6450 type Inner = ExpirationRanUpdate<'a>;
6451 #[inline]
6452 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6453 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
6454 }
6455 }
6456
6457 impl<'a> ExpirationRanUpdate<'a> {
6458 #[inline]
6459 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6460 ExpirationRanUpdate { _tab: table }
6461 }
6462 #[allow(unused_mut)]
6463 pub fn create<
6464 'bldr: 'args,
6465 'args: 'mut_bldr,
6466 'mut_bldr,
6467 A: flatbuffers::Allocator + 'bldr,
6468 >(
6469 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6470 _args: &'args ExpirationRanUpdateArgs,
6471 ) -> flatbuffers::WIPOffset<ExpirationRanUpdate<'bldr>> {
6472 let mut builder = ExpirationRanUpdateBuilder::new(_fbb);
6473 builder.finish()
6474 }
6475 }
6476
6477 impl flatbuffers::Verifiable for ExpirationRanUpdate<'_> {
6478 #[inline]
6479 fn run_verifier(
6480 v: &mut flatbuffers::Verifier,
6481 pos: usize,
6482 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6483 use self::flatbuffers::Verifiable;
6484 v.visit_table(pos)?.finish();
6485 Ok(())
6486 }
6487 }
6488 pub struct ExpirationRanUpdateArgs {}
6489 impl<'a> Default for ExpirationRanUpdateArgs {
6490 #[inline]
6491 fn default() -> Self {
6492 ExpirationRanUpdateArgs {}
6493 }
6494 }
6495
6496 pub struct ExpirationRanUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6497 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6498 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6499 }
6500 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> ExpirationRanUpdateBuilder<'a, 'b, A> {
6501 #[inline]
6502 pub fn new(
6503 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6504 ) -> ExpirationRanUpdateBuilder<'a, 'b, A> {
6505 let start = _fbb.start_table();
6506 ExpirationRanUpdateBuilder { fbb_: _fbb, start_: start }
6507 }
6508 #[inline]
6509 pub fn finish(self) -> flatbuffers::WIPOffset<ExpirationRanUpdate<'a>> {
6510 let o = self.fbb_.end_table(self.start_);
6511 flatbuffers::WIPOffset::new(o.value())
6512 }
6513 }
6514
6515 impl core::fmt::Debug for ExpirationRanUpdate<'_> {
6516 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6517 let mut ds = f.debug_struct("ExpirationRanUpdate");
6518 ds.finish()
6519 }
6520 }
6521 pub enum FeatureFlagChangedUpdateOffset {}
6522 #[derive(Copy, Clone, PartialEq)]
6523
6524 pub struct FeatureFlagChangedUpdate<'a> {
6525 pub _tab: flatbuffers::Table<'a>,
6526 }
6527
6528 impl<'a> flatbuffers::Follow<'a> for FeatureFlagChangedUpdate<'a> {
6529 type Inner = FeatureFlagChangedUpdate<'a>;
6530 #[inline]
6531 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6532 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
6533 }
6534 }
6535
6536 impl<'a> FeatureFlagChangedUpdate<'a> {
6537 pub const VT_ID: flatbuffers::VOffsetT = 4;
6538 pub const VT_NEW_VALUE: flatbuffers::VOffsetT = 6;
6539 pub const VT_IS_SET: flatbuffers::VOffsetT = 8;
6540
6541 #[inline]
6542 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6543 FeatureFlagChangedUpdate { _tab: table }
6544 }
6545 #[allow(unused_mut)]
6546 pub fn create<
6547 'bldr: 'args,
6548 'args: 'mut_bldr,
6549 'mut_bldr,
6550 A: flatbuffers::Allocator + 'bldr,
6551 >(
6552 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6553 args: &'args FeatureFlagChangedUpdateArgs,
6554 ) -> flatbuffers::WIPOffset<FeatureFlagChangedUpdate<'bldr>> {
6555 let mut builder = FeatureFlagChangedUpdateBuilder::new(_fbb);
6556 builder.add_id(args.id);
6557 builder.add_is_set(args.is_set);
6558 builder.add_new_value(args.new_value);
6559 builder.finish()
6560 }
6561
6562 #[inline]
6563 pub fn id(&self) -> u16 {
6564 unsafe {
6568 self._tab.get::<u16>(FeatureFlagChangedUpdate::VT_ID, Some(0)).unwrap()
6569 }
6570 }
6571 #[inline]
6572 pub fn new_value(&self) -> bool {
6573 unsafe {
6577 self._tab
6578 .get::<bool>(FeatureFlagChangedUpdate::VT_NEW_VALUE, Some(false))
6579 .unwrap()
6580 }
6581 }
6582 #[inline]
6583 pub fn is_set(&self) -> bool {
6584 unsafe {
6588 self._tab
6589 .get::<bool>(FeatureFlagChangedUpdate::VT_IS_SET, Some(false))
6590 .unwrap()
6591 }
6592 }
6593 }
6594
6595 impl flatbuffers::Verifiable for FeatureFlagChangedUpdate<'_> {
6596 #[inline]
6597 fn run_verifier(
6598 v: &mut flatbuffers::Verifier,
6599 pos: usize,
6600 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
6601 use self::flatbuffers::Verifiable;
6602 v.visit_table(pos)?
6603 .visit_field::<u16>("id", Self::VT_ID, false)?
6604 .visit_field::<bool>("new_value", Self::VT_NEW_VALUE, false)?
6605 .visit_field::<bool>("is_set", Self::VT_IS_SET, false)?
6606 .finish();
6607 Ok(())
6608 }
6609 }
6610 pub struct FeatureFlagChangedUpdateArgs {
6611 pub id: u16,
6612 pub new_value: bool,
6613 pub is_set: bool,
6614 }
6615 impl<'a> Default for FeatureFlagChangedUpdateArgs {
6616 #[inline]
6617 fn default() -> Self {
6618 FeatureFlagChangedUpdateArgs { id: 0, new_value: false, is_set: false }
6619 }
6620 }
6621
6622 pub struct FeatureFlagChangedUpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
6623 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6624 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
6625 }
6626 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a>
6627 FeatureFlagChangedUpdateBuilder<'a, 'b, A>
6628 {
6629 #[inline]
6630 pub fn add_id(&mut self, id: u16) {
6631 self.fbb_.push_slot::<u16>(FeatureFlagChangedUpdate::VT_ID, id, 0);
6632 }
6633 #[inline]
6634 pub fn add_new_value(&mut self, new_value: bool) {
6635 self.fbb_.push_slot::<bool>(
6636 FeatureFlagChangedUpdate::VT_NEW_VALUE,
6637 new_value,
6638 false,
6639 );
6640 }
6641 #[inline]
6642 pub fn add_is_set(&mut self, is_set: bool) {
6643 self.fbb_.push_slot::<bool>(
6644 FeatureFlagChangedUpdate::VT_IS_SET,
6645 is_set,
6646 false,
6647 );
6648 }
6649 #[inline]
6650 pub fn new(
6651 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
6652 ) -> FeatureFlagChangedUpdateBuilder<'a, 'b, A> {
6653 let start = _fbb.start_table();
6654 FeatureFlagChangedUpdateBuilder { fbb_: _fbb, start_: start }
6655 }
6656 #[inline]
6657 pub fn finish(self) -> flatbuffers::WIPOffset<FeatureFlagChangedUpdate<'a>> {
6658 let o = self.fbb_.end_table(self.start_);
6659 flatbuffers::WIPOffset::new(o.value())
6660 }
6661 }
6662
6663 impl core::fmt::Debug for FeatureFlagChangedUpdate<'_> {
6664 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
6665 let mut ds = f.debug_struct("FeatureFlagChangedUpdate");
6666 ds.field("id", &self.id());
6667 ds.field("new_value", &self.new_value());
6668 ds.field("is_set", &self.is_set());
6669 ds.finish()
6670 }
6671 }
6672 pub enum UpdateOffset {}
6673 #[derive(Copy, Clone, PartialEq)]
6674
6675 pub struct Update<'a> {
6676 pub _tab: flatbuffers::Table<'a>,
6677 }
6678
6679 impl<'a> flatbuffers::Follow<'a> for Update<'a> {
6680 type Inner = Update<'a>;
6681 #[inline]
6682 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
6683 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
6684 }
6685 }
6686
6687 impl<'a> Update<'a> {
6688 pub const VT_UPDATE_TYPE_TYPE: flatbuffers::VOffsetT = 4;
6689 pub const VT_UPDATE_TYPE: flatbuffers::VOffsetT = 6;
6690 pub const VT_UPDATED_AT: flatbuffers::VOffsetT = 8;
6691 pub const VT_BACKUP_PATH: flatbuffers::VOffsetT = 10;
6692
6693 #[inline]
6694 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
6695 Update { _tab: table }
6696 }
6697 #[allow(unused_mut)]
6698 pub fn create<
6699 'bldr: 'args,
6700 'args: 'mut_bldr,
6701 'mut_bldr,
6702 A: flatbuffers::Allocator + 'bldr,
6703 >(
6704 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
6705 args: &'args UpdateArgs<'args>,
6706 ) -> flatbuffers::WIPOffset<Update<'bldr>> {
6707 let mut builder = UpdateBuilder::new(_fbb);
6708 builder.add_updated_at(args.updated_at);
6709 if let Some(x) = args.backup_path {
6710 builder.add_backup_path(x);
6711 }
6712 if let Some(x) = args.update_type {
6713 builder.add_update_type(x);
6714 }
6715 builder.add_update_type_type(args.update_type_type);
6716 builder.finish()
6717 }
6718
6719 #[inline]
6720 pub fn update_type_type(&self) -> UpdateType {
6721 unsafe {
6725 self._tab
6726 .get::<UpdateType>(
6727 Update::VT_UPDATE_TYPE_TYPE,
6728 Some(UpdateType::NONE),
6729 )
6730 .unwrap()
6731 }
6732 }
6733 #[inline]
6734 pub fn update_type(&self) -> flatbuffers::Table<'a> {
6735 unsafe {
6739 self._tab
6740 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Table<'a>>>(
6741 Update::VT_UPDATE_TYPE,
6742 None,
6743 )
6744 .unwrap()
6745 }
6746 }
6747 #[inline]
6748 pub fn updated_at(&self) -> u64 {
6749 unsafe { self._tab.get::<u64>(Update::VT_UPDATED_AT, Some(0)).unwrap() }
6753 }
6754 #[inline]
6755 pub fn backup_path(&self) -> Option<&'a str> {
6756 unsafe {
6760 self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(
6761 Update::VT_BACKUP_PATH,
6762 None,
6763 )
6764 }
6765 }
6766 #[inline]
6767 #[allow(non_snake_case)]
6768 pub fn update_type_as_repo_initialized_update(
6769 &self,
6770 ) -> Option<RepoInitializedUpdate<'a>> {
6771 if self.update_type_type() == UpdateType::RepoInitializedUpdate {
6772 let u = self.update_type();
6773 Some(unsafe { RepoInitializedUpdate::init_from_table(u) })
6777 } else {
6778 None
6779 }
6780 }
6781
6782 #[inline]
6783 #[allow(non_snake_case)]
6784 pub fn update_type_as_repo_migrated_update(
6785 &self,
6786 ) -> Option<RepoMigratedUpdate<'a>> {
6787 if self.update_type_type() == UpdateType::RepoMigratedUpdate {
6788 let u = self.update_type();
6789 Some(unsafe { RepoMigratedUpdate::init_from_table(u) })
6793 } else {
6794 None
6795 }
6796 }
6797
6798 #[inline]
6799 #[allow(non_snake_case)]
6800 pub fn update_type_as_config_changed_update(
6801 &self,
6802 ) -> Option<ConfigChangedUpdate<'a>> {
6803 if self.update_type_type() == UpdateType::ConfigChangedUpdate {
6804 let u = self.update_type();
6805 Some(unsafe { ConfigChangedUpdate::init_from_table(u) })
6809 } else {
6810 None
6811 }
6812 }
6813
6814 #[inline]
6815 #[allow(non_snake_case)]
6816 pub fn update_type_as_metadata_changed_update(
6817 &self,
6818 ) -> Option<MetadataChangedUpdate<'a>> {
6819 if self.update_type_type() == UpdateType::MetadataChangedUpdate {
6820 let u = self.update_type();
6821 Some(unsafe { MetadataChangedUpdate::init_from_table(u) })
6825 } else {
6826 None
6827 }
6828 }
6829
6830 #[inline]
6831 #[allow(non_snake_case)]
6832 pub fn update_type_as_tag_created_update(&self) -> Option<TagCreatedUpdate<'a>> {
6833 if self.update_type_type() == UpdateType::TagCreatedUpdate {
6834 let u = self.update_type();
6835 Some(unsafe { TagCreatedUpdate::init_from_table(u) })
6839 } else {
6840 None
6841 }
6842 }
6843
6844 #[inline]
6845 #[allow(non_snake_case)]
6846 pub fn update_type_as_tag_deleted_update(&self) -> Option<TagDeletedUpdate<'a>> {
6847 if self.update_type_type() == UpdateType::TagDeletedUpdate {
6848 let u = self.update_type();
6849 Some(unsafe { TagDeletedUpdate::init_from_table(u) })
6853 } else {
6854 None
6855 }
6856 }
6857
6858 #[inline]
6859 #[allow(non_snake_case)]
6860 pub fn update_type_as_branch_created_update(
6861 &self,
6862 ) -> Option<BranchCreatedUpdate<'a>> {
6863 if self.update_type_type() == UpdateType::BranchCreatedUpdate {
6864 let u = self.update_type();
6865 Some(unsafe { BranchCreatedUpdate::init_from_table(u) })
6869 } else {
6870 None
6871 }
6872 }
6873
6874 #[inline]
6875 #[allow(non_snake_case)]
6876 pub fn update_type_as_branch_deleted_update(
6877 &self,
6878 ) -> Option<BranchDeletedUpdate<'a>> {
6879 if self.update_type_type() == UpdateType::BranchDeletedUpdate {
6880 let u = self.update_type();
6881 Some(unsafe { BranchDeletedUpdate::init_from_table(u) })
6885 } else {
6886 None
6887 }
6888 }
6889
6890 #[inline]
6891 #[allow(non_snake_case)]
6892 pub fn update_type_as_branch_reset_update(
6893 &self,
6894 ) -> Option<BranchResetUpdate<'a>> {
6895 if self.update_type_type() == UpdateType::BranchResetUpdate {
6896 let u = self.update_type();
6897 Some(unsafe { BranchResetUpdate::init_from_table(u) })
6901 } else {
6902 None
6903 }
6904 }
6905
6906 #[inline]
6907 #[allow(non_snake_case)]
6908 pub fn update_type_as_new_commit_update(&self) -> Option<NewCommitUpdate<'a>> {
6909 if self.update_type_type() == UpdateType::NewCommitUpdate {
6910 let u = self.update_type();
6911 Some(unsafe { NewCommitUpdate::init_from_table(u) })
6915 } else {
6916 None
6917 }
6918 }
6919
6920 #[inline]
6921 #[allow(non_snake_case)]
6922 pub fn update_type_as_commit_amended_update(
6923 &self,
6924 ) -> Option<CommitAmendedUpdate<'a>> {
6925 if self.update_type_type() == UpdateType::CommitAmendedUpdate {
6926 let u = self.update_type();
6927 Some(unsafe { CommitAmendedUpdate::init_from_table(u) })
6931 } else {
6932 None
6933 }
6934 }
6935
6936 #[inline]
6937 #[allow(non_snake_case)]
6938 pub fn update_type_as_new_detached_snapshot_update(
6939 &self,
6940 ) -> Option<NewDetachedSnapshotUpdate<'a>> {
6941 if self.update_type_type() == UpdateType::NewDetachedSnapshotUpdate {
6942 let u = self.update_type();
6943 Some(unsafe { NewDetachedSnapshotUpdate::init_from_table(u) })
6947 } else {
6948 None
6949 }
6950 }
6951
6952 #[inline]
6953 #[allow(non_snake_case)]
6954 pub fn update_type_as_gcran_update(&self) -> Option<GCRanUpdate<'a>> {
6955 if self.update_type_type() == UpdateType::GCRanUpdate {
6956 let u = self.update_type();
6957 Some(unsafe { GCRanUpdate::init_from_table(u) })
6961 } else {
6962 None
6963 }
6964 }
6965
6966 #[inline]
6967 #[allow(non_snake_case)]
6968 pub fn update_type_as_expiration_ran_update(
6969 &self,
6970 ) -> Option<ExpirationRanUpdate<'a>> {
6971 if self.update_type_type() == UpdateType::ExpirationRanUpdate {
6972 let u = self.update_type();
6973 Some(unsafe { ExpirationRanUpdate::init_from_table(u) })
6977 } else {
6978 None
6979 }
6980 }
6981
6982 #[inline]
6983 #[allow(non_snake_case)]
6984 pub fn update_type_as_feature_flag_changed_update(
6985 &self,
6986 ) -> Option<FeatureFlagChangedUpdate<'a>> {
6987 if self.update_type_type() == UpdateType::FeatureFlagChangedUpdate {
6988 let u = self.update_type();
6989 Some(unsafe { FeatureFlagChangedUpdate::init_from_table(u) })
6993 } else {
6994 None
6995 }
6996 }
6997
6998 #[inline]
6999 #[allow(non_snake_case)]
7000 pub fn update_type_as_repo_status_changed_update(
7001 &self,
7002 ) -> Option<RepoStatusChangedUpdate<'a>> {
7003 if self.update_type_type() == UpdateType::RepoStatusChangedUpdate {
7004 let u = self.update_type();
7005 Some(unsafe { RepoStatusChangedUpdate::init_from_table(u) })
7009 } else {
7010 None
7011 }
7012 }
7013 }
7014
7015 impl flatbuffers::Verifiable for Update<'_> {
7016 #[inline]
7017 fn run_verifier(
7018 v: &mut flatbuffers::Verifier,
7019 pos: usize,
7020 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
7021 use self::flatbuffers::Verifiable;
7022 v.visit_table(pos)?
7023 .visit_union::<UpdateType, _>("update_type_type", Self::VT_UPDATE_TYPE_TYPE, "update_type", Self::VT_UPDATE_TYPE, true, |key, v, pos| {
7024 match key {
7025 UpdateType::RepoInitializedUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<RepoInitializedUpdate>>("UpdateType::RepoInitializedUpdate", pos),
7026 UpdateType::RepoMigratedUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<RepoMigratedUpdate>>("UpdateType::RepoMigratedUpdate", pos),
7027 UpdateType::ConfigChangedUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ConfigChangedUpdate>>("UpdateType::ConfigChangedUpdate", pos),
7028 UpdateType::MetadataChangedUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<MetadataChangedUpdate>>("UpdateType::MetadataChangedUpdate", pos),
7029 UpdateType::TagCreatedUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<TagCreatedUpdate>>("UpdateType::TagCreatedUpdate", pos),
7030 UpdateType::TagDeletedUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<TagDeletedUpdate>>("UpdateType::TagDeletedUpdate", pos),
7031 UpdateType::BranchCreatedUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<BranchCreatedUpdate>>("UpdateType::BranchCreatedUpdate", pos),
7032 UpdateType::BranchDeletedUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<BranchDeletedUpdate>>("UpdateType::BranchDeletedUpdate", pos),
7033 UpdateType::BranchResetUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<BranchResetUpdate>>("UpdateType::BranchResetUpdate", pos),
7034 UpdateType::NewCommitUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<NewCommitUpdate>>("UpdateType::NewCommitUpdate", pos),
7035 UpdateType::CommitAmendedUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<CommitAmendedUpdate>>("UpdateType::CommitAmendedUpdate", pos),
7036 UpdateType::NewDetachedSnapshotUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<NewDetachedSnapshotUpdate>>("UpdateType::NewDetachedSnapshotUpdate", pos),
7037 UpdateType::GCRanUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<GCRanUpdate>>("UpdateType::GCRanUpdate", pos),
7038 UpdateType::ExpirationRanUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<ExpirationRanUpdate>>("UpdateType::ExpirationRanUpdate", pos),
7039 UpdateType::FeatureFlagChangedUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<FeatureFlagChangedUpdate>>("UpdateType::FeatureFlagChangedUpdate", pos),
7040 UpdateType::RepoStatusChangedUpdate => v.verify_union_variant::<flatbuffers::ForwardsUOffset<RepoStatusChangedUpdate>>("UpdateType::RepoStatusChangedUpdate", pos),
7041 _ => Ok(()),
7042 }
7043 })?
7044 .visit_field::<u64>("updated_at", Self::VT_UPDATED_AT, false)?
7045 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("backup_path", Self::VT_BACKUP_PATH, false)?
7046 .finish();
7047 Ok(())
7048 }
7049 }
7050 pub struct UpdateArgs<'a> {
7051 pub update_type_type: UpdateType,
7052 pub update_type: Option<flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>>,
7053 pub updated_at: u64,
7054 pub backup_path: Option<flatbuffers::WIPOffset<&'a str>>,
7055 }
7056 impl<'a> Default for UpdateArgs<'a> {
7057 #[inline]
7058 fn default() -> Self {
7059 UpdateArgs {
7060 update_type_type: UpdateType::NONE,
7061 update_type: None, updated_at: 0,
7063 backup_path: None,
7064 }
7065 }
7066 }
7067
7068 pub struct UpdateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
7069 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
7070 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
7071 }
7072 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UpdateBuilder<'a, 'b, A> {
7073 #[inline]
7074 pub fn add_update_type_type(&mut self, update_type_type: UpdateType) {
7075 self.fbb_.push_slot::<UpdateType>(
7076 Update::VT_UPDATE_TYPE_TYPE,
7077 update_type_type,
7078 UpdateType::NONE,
7079 );
7080 }
7081 #[inline]
7082 pub fn add_update_type(
7083 &mut self,
7084 update_type: flatbuffers::WIPOffset<flatbuffers::UnionWIPOffset>,
7085 ) {
7086 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
7087 Update::VT_UPDATE_TYPE,
7088 update_type,
7089 );
7090 }
7091 #[inline]
7092 pub fn add_updated_at(&mut self, updated_at: u64) {
7093 self.fbb_.push_slot::<u64>(Update::VT_UPDATED_AT, updated_at, 0);
7094 }
7095 #[inline]
7096 pub fn add_backup_path(&mut self, backup_path: flatbuffers::WIPOffset<&'b str>) {
7097 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
7098 Update::VT_BACKUP_PATH,
7099 backup_path,
7100 );
7101 }
7102 #[inline]
7103 pub fn new(
7104 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
7105 ) -> UpdateBuilder<'a, 'b, A> {
7106 let start = _fbb.start_table();
7107 UpdateBuilder { fbb_: _fbb, start_: start }
7108 }
7109 #[inline]
7110 pub fn finish(self) -> flatbuffers::WIPOffset<Update<'a>> {
7111 let o = self.fbb_.end_table(self.start_);
7112 self.fbb_.required(o, Update::VT_UPDATE_TYPE, "update_type");
7113 flatbuffers::WIPOffset::new(o.value())
7114 }
7115 }
7116
7117 impl core::fmt::Debug for Update<'_> {
7118 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7119 let mut ds = f.debug_struct("Update");
7120 ds.field("update_type_type", &self.update_type_type());
7121 match self.update_type_type() {
7122 UpdateType::RepoInitializedUpdate => {
7123 if let Some(x) = self.update_type_as_repo_initialized_update() {
7124 ds.field("update_type", &x)
7125 } else {
7126 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7127 }
7128 }
7129 UpdateType::RepoMigratedUpdate => {
7130 if let Some(x) = self.update_type_as_repo_migrated_update() {
7131 ds.field("update_type", &x)
7132 } else {
7133 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7134 }
7135 }
7136 UpdateType::ConfigChangedUpdate => {
7137 if let Some(x) = self.update_type_as_config_changed_update() {
7138 ds.field("update_type", &x)
7139 } else {
7140 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7141 }
7142 }
7143 UpdateType::MetadataChangedUpdate => {
7144 if let Some(x) = self.update_type_as_metadata_changed_update() {
7145 ds.field("update_type", &x)
7146 } else {
7147 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7148 }
7149 }
7150 UpdateType::TagCreatedUpdate => {
7151 if let Some(x) = self.update_type_as_tag_created_update() {
7152 ds.field("update_type", &x)
7153 } else {
7154 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7155 }
7156 }
7157 UpdateType::TagDeletedUpdate => {
7158 if let Some(x) = self.update_type_as_tag_deleted_update() {
7159 ds.field("update_type", &x)
7160 } else {
7161 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7162 }
7163 }
7164 UpdateType::BranchCreatedUpdate => {
7165 if let Some(x) = self.update_type_as_branch_created_update() {
7166 ds.field("update_type", &x)
7167 } else {
7168 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7169 }
7170 }
7171 UpdateType::BranchDeletedUpdate => {
7172 if let Some(x) = self.update_type_as_branch_deleted_update() {
7173 ds.field("update_type", &x)
7174 } else {
7175 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7176 }
7177 }
7178 UpdateType::BranchResetUpdate => {
7179 if let Some(x) = self.update_type_as_branch_reset_update() {
7180 ds.field("update_type", &x)
7181 } else {
7182 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7183 }
7184 }
7185 UpdateType::NewCommitUpdate => {
7186 if let Some(x) = self.update_type_as_new_commit_update() {
7187 ds.field("update_type", &x)
7188 } else {
7189 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7190 }
7191 }
7192 UpdateType::CommitAmendedUpdate => {
7193 if let Some(x) = self.update_type_as_commit_amended_update() {
7194 ds.field("update_type", &x)
7195 } else {
7196 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7197 }
7198 }
7199 UpdateType::NewDetachedSnapshotUpdate => {
7200 if let Some(x) = self.update_type_as_new_detached_snapshot_update() {
7201 ds.field("update_type", &x)
7202 } else {
7203 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7204 }
7205 }
7206 UpdateType::GCRanUpdate => {
7207 if let Some(x) = self.update_type_as_gcran_update() {
7208 ds.field("update_type", &x)
7209 } else {
7210 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7211 }
7212 }
7213 UpdateType::ExpirationRanUpdate => {
7214 if let Some(x) = self.update_type_as_expiration_ran_update() {
7215 ds.field("update_type", &x)
7216 } else {
7217 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7218 }
7219 }
7220 UpdateType::FeatureFlagChangedUpdate => {
7221 if let Some(x) = self.update_type_as_feature_flag_changed_update() {
7222 ds.field("update_type", &x)
7223 } else {
7224 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7225 }
7226 }
7227 UpdateType::RepoStatusChangedUpdate => {
7228 if let Some(x) = self.update_type_as_repo_status_changed_update() {
7229 ds.field("update_type", &x)
7230 } else {
7231 ds.field("update_type", &"InvalidFlatbuffer: Union discriminant does not match value.")
7232 }
7233 }
7234 _ => {
7235 let x: Option<()> = None;
7236 ds.field("update_type", &x)
7237 }
7238 };
7239 ds.field("updated_at", &self.updated_at());
7240 ds.field("backup_path", &self.backup_path());
7241 ds.finish()
7242 }
7243 }
7244 pub enum RepoOffset {}
7245 #[derive(Copy, Clone, PartialEq)]
7246
7247 pub struct Repo<'a> {
7248 pub _tab: flatbuffers::Table<'a>,
7249 }
7250
7251 impl<'a> flatbuffers::Follow<'a> for Repo<'a> {
7252 type Inner = Repo<'a>;
7253 #[inline]
7254 unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
7255 Self { _tab: unsafe { flatbuffers::Table::new(buf, loc) } }
7256 }
7257 }
7258
7259 impl<'a> Repo<'a> {
7260 pub const VT_SPEC_VERSION: flatbuffers::VOffsetT = 4;
7261 pub const VT_TAGS: flatbuffers::VOffsetT = 6;
7262 pub const VT_BRANCHES: flatbuffers::VOffsetT = 8;
7263 pub const VT_DELETED_TAGS: flatbuffers::VOffsetT = 10;
7264 pub const VT_SNAPSHOTS: flatbuffers::VOffsetT = 12;
7265 pub const VT_STATUS: flatbuffers::VOffsetT = 14;
7266 pub const VT_METADATA: flatbuffers::VOffsetT = 16;
7267 pub const VT_LATEST_UPDATES: flatbuffers::VOffsetT = 18;
7268 pub const VT_REPO_BEFORE_UPDATES: flatbuffers::VOffsetT = 20;
7269 pub const VT_CONFIG: flatbuffers::VOffsetT = 22;
7270 pub const VT_ENABLED_FEATURE_FLAGS: flatbuffers::VOffsetT = 24;
7271 pub const VT_DISABLED_FEATURE_FLAGS: flatbuffers::VOffsetT = 26;
7272 pub const VT_EXTRA: flatbuffers::VOffsetT = 28;
7273
7274 #[inline]
7275 pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
7276 Repo { _tab: table }
7277 }
7278 #[allow(unused_mut)]
7279 pub fn create<
7280 'bldr: 'args,
7281 'args: 'mut_bldr,
7282 'mut_bldr,
7283 A: flatbuffers::Allocator + 'bldr,
7284 >(
7285 _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
7286 args: &'args RepoArgs<'args>,
7287 ) -> flatbuffers::WIPOffset<Repo<'bldr>> {
7288 let mut builder = RepoBuilder::new(_fbb);
7289 if let Some(x) = args.extra {
7290 builder.add_extra(x);
7291 }
7292 if let Some(x) = args.disabled_feature_flags {
7293 builder.add_disabled_feature_flags(x);
7294 }
7295 if let Some(x) = args.enabled_feature_flags {
7296 builder.add_enabled_feature_flags(x);
7297 }
7298 if let Some(x) = args.config {
7299 builder.add_config(x);
7300 }
7301 if let Some(x) = args.repo_before_updates {
7302 builder.add_repo_before_updates(x);
7303 }
7304 if let Some(x) = args.latest_updates {
7305 builder.add_latest_updates(x);
7306 }
7307 if let Some(x) = args.metadata {
7308 builder.add_metadata(x);
7309 }
7310 if let Some(x) = args.status {
7311 builder.add_status(x);
7312 }
7313 if let Some(x) = args.snapshots {
7314 builder.add_snapshots(x);
7315 }
7316 if let Some(x) = args.deleted_tags {
7317 builder.add_deleted_tags(x);
7318 }
7319 if let Some(x) = args.branches {
7320 builder.add_branches(x);
7321 }
7322 if let Some(x) = args.tags {
7323 builder.add_tags(x);
7324 }
7325 builder.add_spec_version(args.spec_version);
7326 builder.finish()
7327 }
7328
7329 #[inline]
7330 pub fn spec_version(&self) -> u8 {
7331 unsafe { self._tab.get::<u8>(Repo::VT_SPEC_VERSION, Some(0)).unwrap() }
7335 }
7336 #[inline]
7337 pub fn tags(
7338 &self,
7339 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Ref<'a>>> {
7340 unsafe {
7344 self._tab
7345 .get::<flatbuffers::ForwardsUOffset<
7346 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Ref>>,
7347 >>(Repo::VT_TAGS, None)
7348 .unwrap()
7349 }
7350 }
7351 #[inline]
7352 pub fn branches(
7353 &self,
7354 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Ref<'a>>> {
7355 unsafe {
7359 self._tab
7360 .get::<flatbuffers::ForwardsUOffset<
7361 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Ref>>,
7362 >>(Repo::VT_BRANCHES, None)
7363 .unwrap()
7364 }
7365 }
7366 #[inline]
7367 pub fn deleted_tags(
7368 &self,
7369 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>> {
7370 unsafe {
7374 self._tab
7375 .get::<flatbuffers::ForwardsUOffset<
7376 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
7377 >>(Repo::VT_DELETED_TAGS, None)
7378 .unwrap()
7379 }
7380 }
7381 #[inline]
7382 pub fn snapshots(
7383 &self,
7384 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SnapshotInfo<'a>>>
7385 {
7386 unsafe {
7390 self._tab
7391 .get::<flatbuffers::ForwardsUOffset<
7392 flatbuffers::Vector<
7393 'a,
7394 flatbuffers::ForwardsUOffset<SnapshotInfo>,
7395 >,
7396 >>(Repo::VT_SNAPSHOTS, None)
7397 .unwrap()
7398 }
7399 }
7400 #[inline]
7401 pub fn status(&self) -> RepoStatus<'a> {
7402 unsafe {
7406 self._tab
7407 .get::<flatbuffers::ForwardsUOffset<RepoStatus>>(
7408 Repo::VT_STATUS,
7409 None,
7410 )
7411 .unwrap()
7412 }
7413 }
7414 #[inline]
7415 pub fn metadata(
7416 &self,
7417 ) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MetadataItem<'a>>>>
7418 {
7419 unsafe {
7423 self._tab.get::<flatbuffers::ForwardsUOffset<
7424 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MetadataItem>>,
7425 >>(Repo::VT_METADATA, None)
7426 }
7427 }
7428 #[inline]
7429 pub fn latest_updates(
7430 &self,
7431 ) -> flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Update<'a>>> {
7432 unsafe {
7436 self._tab
7437 .get::<flatbuffers::ForwardsUOffset<
7438 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Update>>,
7439 >>(Repo::VT_LATEST_UPDATES, None)
7440 .unwrap()
7441 }
7442 }
7443 #[inline]
7444 pub fn repo_before_updates(&self) -> Option<&'a str> {
7445 unsafe {
7449 self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(
7450 Repo::VT_REPO_BEFORE_UPDATES,
7451 None,
7452 )
7453 }
7454 }
7455 #[inline]
7456 pub fn config(&self) -> Option<flatbuffers::Vector<'a, u8>> {
7457 unsafe {
7461 self._tab
7462 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
7463 Repo::VT_CONFIG,
7464 None,
7465 )
7466 }
7467 }
7468 #[inline]
7469 pub fn enabled_feature_flags(&self) -> Option<flatbuffers::Vector<'a, u16>> {
7470 unsafe {
7474 self._tab
7475 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u16>>>(
7476 Repo::VT_ENABLED_FEATURE_FLAGS,
7477 None,
7478 )
7479 }
7480 }
7481 #[inline]
7482 pub fn disabled_feature_flags(&self) -> Option<flatbuffers::Vector<'a, u16>> {
7483 unsafe {
7487 self._tab
7488 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u16>>>(
7489 Repo::VT_DISABLED_FEATURE_FLAGS,
7490 None,
7491 )
7492 }
7493 }
7494 #[inline]
7495 pub fn extra(&self) -> Option<flatbuffers::Vector<'a, u8>> {
7496 unsafe {
7500 self._tab
7501 .get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, u8>>>(
7502 Repo::VT_EXTRA,
7503 None,
7504 )
7505 }
7506 }
7507 }
7508
7509 impl flatbuffers::Verifiable for Repo<'_> {
7510 #[inline]
7511 fn run_verifier(
7512 v: &mut flatbuffers::Verifier,
7513 pos: usize,
7514 ) -> Result<(), flatbuffers::InvalidFlatbuffer> {
7515 use self::flatbuffers::Verifiable;
7516 v.visit_table(pos)?
7517 .visit_field::<u8>("spec_version", Self::VT_SPEC_VERSION, false)?
7518 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Ref>>>>("tags", Self::VT_TAGS, true)?
7519 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Ref>>>>("branches", Self::VT_BRANCHES, true)?
7520 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<&'_ str>>>>("deleted_tags", Self::VT_DELETED_TAGS, true)?
7521 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<SnapshotInfo>>>>("snapshots", Self::VT_SNAPSHOTS, true)?
7522 .visit_field::<flatbuffers::ForwardsUOffset<RepoStatus>>("status", Self::VT_STATUS, true)?
7523 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<MetadataItem>>>>("metadata", Self::VT_METADATA, false)?
7524 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<Update>>>>("latest_updates", Self::VT_LATEST_UPDATES, true)?
7525 .visit_field::<flatbuffers::ForwardsUOffset<&str>>("repo_before_updates", Self::VT_REPO_BEFORE_UPDATES, false)?
7526 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>("config", Self::VT_CONFIG, false)?
7527 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u16>>>("enabled_feature_flags", Self::VT_ENABLED_FEATURE_FLAGS, false)?
7528 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u16>>>("disabled_feature_flags", Self::VT_DISABLED_FEATURE_FLAGS, false)?
7529 .visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, u8>>>("extra", Self::VT_EXTRA, false)?
7530 .finish();
7531 Ok(())
7532 }
7533 }
7534 pub struct RepoArgs<'a> {
7535 pub spec_version: u8,
7536 pub tags: Option<
7537 flatbuffers::WIPOffset<
7538 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Ref<'a>>>,
7539 >,
7540 >,
7541 pub branches: Option<
7542 flatbuffers::WIPOffset<
7543 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Ref<'a>>>,
7544 >,
7545 >,
7546 pub deleted_tags: Option<
7547 flatbuffers::WIPOffset<
7548 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<&'a str>>,
7549 >,
7550 >,
7551 pub snapshots: Option<
7552 flatbuffers::WIPOffset<
7553 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<SnapshotInfo<'a>>>,
7554 >,
7555 >,
7556 pub status: Option<flatbuffers::WIPOffset<RepoStatus<'a>>>,
7557 pub metadata: Option<
7558 flatbuffers::WIPOffset<
7559 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<MetadataItem<'a>>>,
7560 >,
7561 >,
7562 pub latest_updates: Option<
7563 flatbuffers::WIPOffset<
7564 flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Update<'a>>>,
7565 >,
7566 >,
7567 pub repo_before_updates: Option<flatbuffers::WIPOffset<&'a str>>,
7568 pub config: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
7569 pub enabled_feature_flags:
7570 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u16>>>,
7571 pub disabled_feature_flags:
7572 Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u16>>>,
7573 pub extra: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, u8>>>,
7574 }
7575 impl<'a> Default for RepoArgs<'a> {
7576 #[inline]
7577 fn default() -> Self {
7578 RepoArgs {
7579 spec_version: 0,
7580 tags: None, branches: None, deleted_tags: None, snapshots: None, status: None, metadata: None,
7586 latest_updates: None, repo_before_updates: None,
7588 config: None,
7589 enabled_feature_flags: None,
7590 disabled_feature_flags: None,
7591 extra: None,
7592 }
7593 }
7594 }
7595
7596 pub struct RepoBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
7597 fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
7598 start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
7599 }
7600 impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> RepoBuilder<'a, 'b, A> {
7601 #[inline]
7602 pub fn add_spec_version(&mut self, spec_version: u8) {
7603 self.fbb_.push_slot::<u8>(Repo::VT_SPEC_VERSION, spec_version, 0);
7604 }
7605 #[inline]
7606 pub fn add_tags(
7607 &mut self,
7608 tags: flatbuffers::WIPOffset<
7609 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Ref<'b>>>,
7610 >,
7611 ) {
7612 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Repo::VT_TAGS, tags);
7613 }
7614 #[inline]
7615 pub fn add_branches(
7616 &mut self,
7617 branches: flatbuffers::WIPOffset<
7618 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Ref<'b>>>,
7619 >,
7620 ) {
7621 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
7622 Repo::VT_BRANCHES,
7623 branches,
7624 );
7625 }
7626 #[inline]
7627 pub fn add_deleted_tags(
7628 &mut self,
7629 deleted_tags: flatbuffers::WIPOffset<
7630 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<&'b str>>,
7631 >,
7632 ) {
7633 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
7634 Repo::VT_DELETED_TAGS,
7635 deleted_tags,
7636 );
7637 }
7638 #[inline]
7639 pub fn add_snapshots(
7640 &mut self,
7641 snapshots: flatbuffers::WIPOffset<
7642 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<SnapshotInfo<'b>>>,
7643 >,
7644 ) {
7645 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
7646 Repo::VT_SNAPSHOTS,
7647 snapshots,
7648 );
7649 }
7650 #[inline]
7651 pub fn add_status(&mut self, status: flatbuffers::WIPOffset<RepoStatus<'b>>) {
7652 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<RepoStatus>>(
7653 Repo::VT_STATUS,
7654 status,
7655 );
7656 }
7657 #[inline]
7658 pub fn add_metadata(
7659 &mut self,
7660 metadata: flatbuffers::WIPOffset<
7661 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<MetadataItem<'b>>>,
7662 >,
7663 ) {
7664 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
7665 Repo::VT_METADATA,
7666 metadata,
7667 );
7668 }
7669 #[inline]
7670 pub fn add_latest_updates(
7671 &mut self,
7672 latest_updates: flatbuffers::WIPOffset<
7673 flatbuffers::Vector<'b, flatbuffers::ForwardsUOffset<Update<'b>>>,
7674 >,
7675 ) {
7676 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
7677 Repo::VT_LATEST_UPDATES,
7678 latest_updates,
7679 );
7680 }
7681 #[inline]
7682 pub fn add_repo_before_updates(
7683 &mut self,
7684 repo_before_updates: flatbuffers::WIPOffset<&'b str>,
7685 ) {
7686 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
7687 Repo::VT_REPO_BEFORE_UPDATES,
7688 repo_before_updates,
7689 );
7690 }
7691 #[inline]
7692 pub fn add_config(
7693 &mut self,
7694 config: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
7695 ) {
7696 self.fbb_
7697 .push_slot_always::<flatbuffers::WIPOffset<_>>(Repo::VT_CONFIG, config);
7698 }
7699 #[inline]
7700 pub fn add_enabled_feature_flags(
7701 &mut self,
7702 enabled_feature_flags: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u16>>,
7703 ) {
7704 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
7705 Repo::VT_ENABLED_FEATURE_FLAGS,
7706 enabled_feature_flags,
7707 );
7708 }
7709 #[inline]
7710 pub fn add_disabled_feature_flags(
7711 &mut self,
7712 disabled_feature_flags: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u16>>,
7713 ) {
7714 self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(
7715 Repo::VT_DISABLED_FEATURE_FLAGS,
7716 disabled_feature_flags,
7717 );
7718 }
7719 #[inline]
7720 pub fn add_extra(
7721 &mut self,
7722 extra: flatbuffers::WIPOffset<flatbuffers::Vector<'b, u8>>,
7723 ) {
7724 self.fbb_
7725 .push_slot_always::<flatbuffers::WIPOffset<_>>(Repo::VT_EXTRA, extra);
7726 }
7727 #[inline]
7728 pub fn new(
7729 _fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
7730 ) -> RepoBuilder<'a, 'b, A> {
7731 let start = _fbb.start_table();
7732 RepoBuilder { fbb_: _fbb, start_: start }
7733 }
7734 #[inline]
7735 pub fn finish(self) -> flatbuffers::WIPOffset<Repo<'a>> {
7736 let o = self.fbb_.end_table(self.start_);
7737 self.fbb_.required(o, Repo::VT_TAGS, "tags");
7738 self.fbb_.required(o, Repo::VT_BRANCHES, "branches");
7739 self.fbb_.required(o, Repo::VT_DELETED_TAGS, "deleted_tags");
7740 self.fbb_.required(o, Repo::VT_SNAPSHOTS, "snapshots");
7741 self.fbb_.required(o, Repo::VT_STATUS, "status");
7742 self.fbb_.required(o, Repo::VT_LATEST_UPDATES, "latest_updates");
7743 flatbuffers::WIPOffset::new(o.value())
7744 }
7745 }
7746
7747 impl core::fmt::Debug for Repo<'_> {
7748 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
7749 let mut ds = f.debug_struct("Repo");
7750 ds.field("spec_version", &self.spec_version());
7751 ds.field("tags", &self.tags());
7752 ds.field("branches", &self.branches());
7753 ds.field("deleted_tags", &self.deleted_tags());
7754 ds.field("snapshots", &self.snapshots());
7755 ds.field("status", &self.status());
7756 ds.field("metadata", &self.metadata());
7757 ds.field("latest_updates", &self.latest_updates());
7758 ds.field("repo_before_updates", &self.repo_before_updates());
7759 ds.field("config", &self.config());
7760 ds.field("enabled_feature_flags", &self.enabled_feature_flags());
7761 ds.field("disabled_feature_flags", &self.disabled_feature_flags());
7762 ds.field("extra", &self.extra());
7763 ds.finish()
7764 }
7765 }
7766}