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