1#include "engine/shared/snapshot.h"
2#include <array>
3#include <cassert>
4#include <cstddef>
5#include <cstdint>
6#include <iterator>
7#include <new>
8#include <stdexcept>
9#include <type_traits>
10#include <utility>
11#if __cplusplus >= 202002L
12#include <ranges>
13#endif
14
15#ifdef __GNUC__
16#pragma GCC diagnostic ignored "-Wmissing-declarations"
17#ifdef __clang__
18#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
19#endif // __clang__
20#endif // __GNUC__
21
22namespace rust {
23inline namespace cxxbridge1 {
24// #include "rust/cxx.h"
25
26#ifndef CXXBRIDGE1_PANIC
27#define CXXBRIDGE1_PANIC
28template <typename Exception>
29void panic [[noreturn]] (const char *msg);
30#endif // CXXBRIDGE1_PANIC
31
32namespace {
33template <typename T>
34class impl;
35} // namespace
36
37template <typename T>
38::std::size_t size_of();
39template <typename T>
40::std::size_t align_of();
41
42#ifndef CXXBRIDGE1_RUST_SLICE
43#define CXXBRIDGE1_RUST_SLICE
44namespace detail {
45template <bool>
46struct copy_assignable_if {};
47
48template <>
49struct copy_assignable_if<false> {
50 copy_assignable_if() noexcept = default;
51 copy_assignable_if(const copy_assignable_if &) noexcept = default;
52 copy_assignable_if &operator=(const copy_assignable_if &) & noexcept = delete;
53 copy_assignable_if &operator=(copy_assignable_if &&) & noexcept = default;
54};
55} // namespace detail
56
57template <typename T>
58class Slice final
59 : private detail::copy_assignable_if<std::is_const<T>::value> {
60public:
61 using value_type = T;
62
63 Slice() noexcept;
64 Slice(T *, std::size_t count) noexcept;
65
66 template <typename C>
67 explicit Slice(C &c) : Slice(c.data(), c.size()) {}
68
69 Slice &operator=(const Slice<T> &) & noexcept = default;
70 Slice &operator=(Slice<T> &&) & noexcept = default;
71
72 T *data() const noexcept;
73 std::size_t size() const noexcept;
74 std::size_t length() const noexcept;
75 bool empty() const noexcept;
76
77 T &operator[](std::size_t n) const noexcept;
78 T &at(std::size_t n) const;
79 T &front() const noexcept;
80 T &back() const noexcept;
81
82 Slice(const Slice<T> &) noexcept = default;
83 ~Slice() noexcept = default;
84
85 class iterator;
86 iterator begin() const noexcept;
87 iterator end() const noexcept;
88
89 void swap(Slice &) noexcept;
90
91private:
92 class uninit;
93 Slice(uninit) noexcept;
94 friend impl<Slice>;
95 friend void sliceInit(void *, const void *, std::size_t) noexcept;
96 friend void *slicePtr(const void *) noexcept;
97 friend std::size_t sliceLen(const void *) noexcept;
98
99 std::array<std::uintptr_t, 2> repr;
100};
101
102#ifdef __cpp_deduction_guides
103template <typename C>
104explicit Slice(C &c)
105 -> Slice<std::remove_reference_t<decltype(*std::declval<C>().data())>>;
106#endif // __cpp_deduction_guides
107
108template <typename T>
109class Slice<T>::iterator final {
110public:
111#if __cplusplus >= 202002L
112 using iterator_category = std::contiguous_iterator_tag;
113#else
114 using iterator_category = std::random_access_iterator_tag;
115#endif
116 using value_type = T;
117 using difference_type = std::ptrdiff_t;
118 using pointer = typename std::add_pointer<T>::type;
119 using reference = typename std::add_lvalue_reference<T>::type;
120
121 reference operator*() const noexcept;
122 pointer operator->() const noexcept;
123 reference operator[](difference_type) const noexcept;
124
125 iterator &operator++() noexcept;
126 iterator operator++(int) noexcept;
127 iterator &operator--() noexcept;
128 iterator operator--(int) noexcept;
129
130 iterator &operator+=(difference_type) noexcept;
131 iterator &operator-=(difference_type) noexcept;
132 iterator operator+(difference_type) const noexcept;
133 friend inline iterator operator+(difference_type lhs, iterator rhs) noexcept {
134 return rhs + lhs;
135 }
136 iterator operator-(difference_type) const noexcept;
137 difference_type operator-(const iterator &) const noexcept;
138
139 bool operator==(const iterator &) const noexcept;
140 bool operator!=(const iterator &) const noexcept;
141 bool operator<(const iterator &) const noexcept;
142 bool operator<=(const iterator &) const noexcept;
143 bool operator>(const iterator &) const noexcept;
144 bool operator>=(const iterator &) const noexcept;
145
146private:
147 friend class Slice;
148 void *pos;
149 std::size_t stride;
150};
151
152#if __cplusplus >= 202002L
153static_assert(std::ranges::contiguous_range<rust::Slice<const uint8_t>>);
154static_assert(std::contiguous_iterator<rust::Slice<const uint8_t>::iterator>);
155#endif
156
157template <typename T>
158Slice<T>::Slice() noexcept {
159 sliceInit(this, reinterpret_cast<void *>(align_of<T>()), 0);
160}
161
162template <typename T>
163Slice<T>::Slice(T *s, std::size_t count) noexcept {
164 assert(s != nullptr || count == 0);
165 sliceInit(this,
166 s == nullptr && count == 0
167 ? reinterpret_cast<void *>(align_of<T>())
168 : const_cast<typename std::remove_const<T>::type *>(s),
169 count);
170}
171
172template <typename T>
173T *Slice<T>::data() const noexcept {
174 return reinterpret_cast<T *>(slicePtr(this));
175}
176
177template <typename T>
178std::size_t Slice<T>::size() const noexcept {
179 return sliceLen(this);
180}
181
182template <typename T>
183std::size_t Slice<T>::length() const noexcept {
184 return this->size();
185}
186
187template <typename T>
188bool Slice<T>::empty() const noexcept {
189 return this->size() == 0;
190}
191
192template <typename T>
193T &Slice<T>::operator[](std::size_t n) const noexcept {
194 assert(n < this->size());
195 auto ptr = static_cast<char *>(slicePtr(this)) + size_of<T>() * n;
196 return *reinterpret_cast<T *>(ptr);
197}
198
199template <typename T>
200T &Slice<T>::at(std::size_t n) const {
201 if (n >= this->size()) {
202 panic<std::out_of_range>("rust::Slice index out of range");
203 }
204 return (*this)[n];
205}
206
207template <typename T>
208T &Slice<T>::front() const noexcept {
209 assert(!this->empty());
210 return (*this)[0];
211}
212
213template <typename T>
214T &Slice<T>::back() const noexcept {
215 assert(!this->empty());
216 return (*this)[this->size() - 1];
217}
218
219template <typename T>
220typename Slice<T>::iterator::reference
221Slice<T>::iterator::operator*() const noexcept {
222 return *static_cast<T *>(this->pos);
223}
224
225template <typename T>
226typename Slice<T>::iterator::pointer
227Slice<T>::iterator::operator->() const noexcept {
228 return static_cast<T *>(this->pos);
229}
230
231template <typename T>
232typename Slice<T>::iterator::reference Slice<T>::iterator::operator[](
233 typename Slice<T>::iterator::difference_type n) const noexcept {
234 auto ptr = static_cast<char *>(this->pos) + this->stride * n;
235 return *reinterpret_cast<T *>(ptr);
236}
237
238template <typename T>
239typename Slice<T>::iterator &Slice<T>::iterator::operator++() noexcept {
240 this->pos = static_cast<char *>(this->pos) + this->stride;
241 return *this;
242}
243
244template <typename T>
245typename Slice<T>::iterator Slice<T>::iterator::operator++(int) noexcept {
246 auto ret = iterator(*this);
247 this->pos = static_cast<char *>(this->pos) + this->stride;
248 return ret;
249}
250
251template <typename T>
252typename Slice<T>::iterator &Slice<T>::iterator::operator--() noexcept {
253 this->pos = static_cast<char *>(this->pos) - this->stride;
254 return *this;
255}
256
257template <typename T>
258typename Slice<T>::iterator Slice<T>::iterator::operator--(int) noexcept {
259 auto ret = iterator(*this);
260 this->pos = static_cast<char *>(this->pos) - this->stride;
261 return ret;
262}
263
264template <typename T>
265typename Slice<T>::iterator &Slice<T>::iterator::operator+=(
266 typename Slice<T>::iterator::difference_type n) noexcept {
267 this->pos = static_cast<char *>(this->pos) + this->stride * n;
268 return *this;
269}
270
271template <typename T>
272typename Slice<T>::iterator &Slice<T>::iterator::operator-=(
273 typename Slice<T>::iterator::difference_type n) noexcept {
274 this->pos = static_cast<char *>(this->pos) - this->stride * n;
275 return *this;
276}
277
278template <typename T>
279typename Slice<T>::iterator Slice<T>::iterator::operator+(
280 typename Slice<T>::iterator::difference_type n) const noexcept {
281 auto ret = iterator(*this);
282 ret.pos = static_cast<char *>(this->pos) + this->stride * n;
283 return ret;
284}
285
286template <typename T>
287typename Slice<T>::iterator Slice<T>::iterator::operator-(
288 typename Slice<T>::iterator::difference_type n) const noexcept {
289 auto ret = iterator(*this);
290 ret.pos = static_cast<char *>(this->pos) - this->stride * n;
291 return ret;
292}
293
294template <typename T>
295typename Slice<T>::iterator::difference_type
296Slice<T>::iterator::operator-(const iterator &other) const noexcept {
297 auto diff = std::distance(static_cast<char *>(other.pos),
298 static_cast<char *>(this->pos));
299 return diff / static_cast<typename Slice<T>::iterator::difference_type>(
300 this->stride);
301}
302
303template <typename T>
304bool Slice<T>::iterator::operator==(const iterator &other) const noexcept {
305 return this->pos == other.pos;
306}
307
308template <typename T>
309bool Slice<T>::iterator::operator!=(const iterator &other) const noexcept {
310 return this->pos != other.pos;
311}
312
313template <typename T>
314bool Slice<T>::iterator::operator<(const iterator &other) const noexcept {
315 return this->pos < other.pos;
316}
317
318template <typename T>
319bool Slice<T>::iterator::operator<=(const iterator &other) const noexcept {
320 return this->pos <= other.pos;
321}
322
323template <typename T>
324bool Slice<T>::iterator::operator>(const iterator &other) const noexcept {
325 return this->pos > other.pos;
326}
327
328template <typename T>
329bool Slice<T>::iterator::operator>=(const iterator &other) const noexcept {
330 return this->pos >= other.pos;
331}
332
333template <typename T>
334typename Slice<T>::iterator Slice<T>::begin() const noexcept {
335 iterator it;
336 it.pos = slicePtr(this);
337 it.stride = size_of<T>();
338 return it;
339}
340
341template <typename T>
342typename Slice<T>::iterator Slice<T>::end() const noexcept {
343 iterator it = this->begin();
344 it.pos = static_cast<char *>(it.pos) + it.stride * this->size();
345 return it;
346}
347
348template <typename T>
349void Slice<T>::swap(Slice &rhs) noexcept {
350 std::swap(*this, rhs);
351}
352#endif // CXXBRIDGE1_RUST_SLICE
353
354#ifndef CXXBRIDGE1_RUST_BOX
355#define CXXBRIDGE1_RUST_BOX
356template <typename T>
357class Box final {
358public:
359 using element_type = T;
360 using const_pointer =
361 typename std::add_pointer<typename std::add_const<T>::type>::type;
362 using pointer = typename std::add_pointer<T>::type;
363
364 Box() = delete;
365 Box(Box &&) noexcept;
366 ~Box() noexcept;
367
368 explicit Box(const T &);
369 explicit Box(T &&);
370
371 Box &operator=(Box &&) & noexcept;
372
373 const T *operator->() const noexcept;
374 const T &operator*() const noexcept;
375 T *operator->() noexcept;
376 T &operator*() noexcept;
377
378 template <typename... Fields>
379 static Box in_place(Fields &&...);
380
381 void swap(Box &) noexcept;
382
383 static Box from_raw(T *) noexcept;
384
385 T *into_raw() noexcept;
386
387 /* Deprecated */ using value_type = element_type;
388
389private:
390 class uninit;
391 class allocation;
392 Box(uninit) noexcept;
393 void drop() noexcept;
394
395 friend void swap(Box &lhs, Box &rhs) noexcept { lhs.swap(rhs); }
396
397 T *ptr;
398};
399
400template <typename T>
401class Box<T>::uninit {};
402
403template <typename T>
404class Box<T>::allocation {
405 static T *alloc() noexcept;
406 static void dealloc(T *) noexcept;
407
408public:
409 allocation() noexcept : ptr(alloc()) {}
410 ~allocation() noexcept {
411 if (this->ptr) {
412 dealloc(this->ptr);
413 }
414 }
415 T *ptr;
416};
417
418template <typename T>
419Box<T>::Box(Box &&other) noexcept : ptr(other.ptr) {
420 other.ptr = nullptr;
421}
422
423template <typename T>
424Box<T>::Box(const T &val) {
425 allocation alloc;
426 ::new (alloc.ptr) T(val);
427 this->ptr = alloc.ptr;
428 alloc.ptr = nullptr;
429}
430
431template <typename T>
432Box<T>::Box(T &&val) {
433 allocation alloc;
434 ::new (alloc.ptr) T(std::move(val));
435 this->ptr = alloc.ptr;
436 alloc.ptr = nullptr;
437}
438
439template <typename T>
440Box<T>::~Box() noexcept {
441 if (this->ptr) {
442 this->drop();
443 }
444}
445
446template <typename T>
447Box<T> &Box<T>::operator=(Box &&other) & noexcept {
448 if (this->ptr) {
449 this->drop();
450 }
451 this->ptr = other.ptr;
452 other.ptr = nullptr;
453 return *this;
454}
455
456template <typename T>
457const T *Box<T>::operator->() const noexcept {
458 return this->ptr;
459}
460
461template <typename T>
462const T &Box<T>::operator*() const noexcept {
463 return *this->ptr;
464}
465
466template <typename T>
467T *Box<T>::operator->() noexcept {
468 return this->ptr;
469}
470
471template <typename T>
472T &Box<T>::operator*() noexcept {
473 return *this->ptr;
474}
475
476template <typename T>
477template <typename... Fields>
478Box<T> Box<T>::in_place(Fields &&...fields) {
479 allocation alloc;
480 auto ptr = alloc.ptr;
481 ::new (ptr) T{std::forward<Fields>(fields)...};
482 alloc.ptr = nullptr;
483 return from_raw(ptr);
484}
485
486template <typename T>
487void Box<T>::swap(Box &rhs) noexcept {
488 using std::swap;
489 swap(this->ptr, rhs.ptr);
490}
491
492template <typename T>
493Box<T> Box<T>::from_raw(T *raw) noexcept {
494 Box box = uninit{};
495 box.ptr = raw;
496 return box;
497}
498
499template <typename T>
500T *Box<T>::into_raw() noexcept {
501 T *raw = this->ptr;
502 this->ptr = nullptr;
503 return raw;
504}
505
506template <typename T>
507Box<T>::Box(uninit) noexcept {}
508#endif // CXXBRIDGE1_RUST_BOX
509
510#ifndef CXXBRIDGE1_RUST_OPAQUE
511#define CXXBRIDGE1_RUST_OPAQUE
512class Opaque {
513public:
514 Opaque() = delete;
515 Opaque(const Opaque &) = delete;
516 ~Opaque() = delete;
517};
518#endif // CXXBRIDGE1_RUST_OPAQUE
519
520#ifndef CXXBRIDGE1_IS_COMPLETE
521#define CXXBRIDGE1_IS_COMPLETE
522namespace detail {
523namespace {
524template <typename T, typename = std::size_t>
525struct is_complete : std::false_type {};
526template <typename T>
527struct is_complete<T, decltype(sizeof(T))> : std::true_type {};
528} // namespace
529} // namespace detail
530#endif // CXXBRIDGE1_IS_COMPLETE
531
532#ifndef CXXBRIDGE1_LAYOUT
533#define CXXBRIDGE1_LAYOUT
534class layout {
535 template <typename T>
536 friend std::size_t size_of();
537 template <typename T>
538 friend std::size_t align_of();
539 template <typename T>
540 static typename std::enable_if<std::is_base_of<Opaque, T>::value,
541 std::size_t>::type
542 do_size_of() {
543 return T::layout::size();
544 }
545 template <typename T>
546 static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
547 std::size_t>::type
548 do_size_of() {
549 return sizeof(T);
550 }
551 template <typename T>
552 static
553 typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
554 size_of() {
555 return do_size_of<T>();
556 }
557 template <typename T>
558 static typename std::enable_if<std::is_base_of<Opaque, T>::value,
559 std::size_t>::type
560 do_align_of() {
561 return T::layout::align();
562 }
563 template <typename T>
564 static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
565 std::size_t>::type
566 do_align_of() {
567 return alignof(T);
568 }
569 template <typename T>
570 static
571 typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
572 align_of() {
573 return do_align_of<T>();
574 }
575};
576
577template <typename T>
578std::size_t size_of() {
579 return layout::size_of<T>();
580}
581
582template <typename T>
583std::size_t align_of() {
584 return layout::align_of<T>();
585}
586#endif // CXXBRIDGE1_LAYOUT
587
588template <typename T>
589class Slice<T>::uninit {};
590template <typename T>
591inline Slice<T>::Slice(uninit) noexcept {}
592
593namespace repr {
594using Fat = ::std::array<::std::uintptr_t, 2>;
595} // namespace repr
596
597namespace {
598template <typename T>
599class impl<Slice<T>> final {
600public:
601 static Slice<T> slice(repr::Fat repr) noexcept {
602 Slice<T> slice = typename Slice<T>::uninit{};
603 slice.repr = repr;
604 return slice;
605 }
606};
607} // namespace
608} // namespace cxxbridge1
609} // namespace rust
610
611struct CSnapshotDelta;
612
613#ifndef CXXBRIDGE1_STRUCT_CSnapshotDelta
614#define CXXBRIDGE1_STRUCT_CSnapshotDelta
615struct CSnapshotDelta final : public ::rust::Opaque {
616 static void DiffItem(::rust::Slice<::std::int32_t const> past, ::rust::Slice<::std::int32_t const> current, ::rust::Slice<::std::int32_t > out) noexcept;
617
618 // Create a new snapshot delta.
619 //
620 // # Example
621 //
622 // ```
623 // # extern crate ddnet_test;
624 // use ddnet_engine_shared::CSnapshotDelta;
625 //
626 // let delta = CSnapshotDelta::New();
627 // ```
628 static ::rust::Box<::CSnapshotDelta> New() noexcept;
629
630 ::rust::Box<::CSnapshotDelta> Clone() noexcept;
631 ::std::uint64_t GetDataRate(::std::int32_t type_) const noexcept;
632 ::std::uint64_t GetDataUpdates(::std::int32_t type_) const noexcept;
633 void SetStaticsize(::std::int32_t type_, ::std::size_t size) noexcept;
634 ::rust::Slice<::std::int32_t const> EmptyDelta() const noexcept;
635 ::std::int32_t CreateDelta(::CSnapshot const &from, ::CSnapshot const &to, ::rust::Slice<::std::int32_t > delta) noexcept;
636 ::std::int32_t UnpackDelta(::CSnapshot const &from, ::CSnapshotBuffer &to, ::rust::Slice<::std::int32_t const> delta) noexcept;
637 ~CSnapshotDelta() = delete;
638
639private:
640 friend ::rust::layout;
641 struct layout {
642 static ::std::size_t size() noexcept;
643 static ::std::size_t align() noexcept;
644 };
645};
646#endif // CXXBRIDGE1_STRUCT_CSnapshotDelta
647
648extern "C" {
649::std::size_t cxxbridge1$194$CSnapshotDelta$operator$sizeof() noexcept;
650::std::size_t cxxbridge1$194$CSnapshotDelta$operator$alignof() noexcept;
651
652void cxxbridge1$194$CSnapshotDelta$DiffItem(::rust::Slice<::std::int32_t const> past, ::rust::Slice<::std::int32_t const> current, ::rust::Slice<::std::int32_t > out) noexcept;
653
654::CSnapshotDelta *cxxbridge1$194$CSnapshotDelta$New() noexcept;
655
656::CSnapshotDelta *cxxbridge1$194$CSnapshotDelta$Clone(::CSnapshotDelta &self) noexcept;
657
658::std::uint64_t cxxbridge1$194$CSnapshotDelta$GetDataRate(::CSnapshotDelta const &self, ::std::int32_t type_) noexcept;
659
660::std::uint64_t cxxbridge1$194$CSnapshotDelta$GetDataUpdates(::CSnapshotDelta const &self, ::std::int32_t type_) noexcept;
661
662void cxxbridge1$194$CSnapshotDelta$SetStaticsize(::CSnapshotDelta &self, ::std::int32_t type_, ::std::size_t size) noexcept;
663
664::rust::repr::Fat cxxbridge1$194$CSnapshotDelta$EmptyDelta(::CSnapshotDelta const &self) noexcept;
665
666::std::int32_t cxxbridge1$194$CSnapshotDelta$CreateDelta(::CSnapshotDelta &self, ::CSnapshot const &from, ::CSnapshot const &to, ::rust::Slice<::std::int32_t > delta) noexcept;
667
668::std::int32_t cxxbridge1$194$CSnapshotDelta$UnpackDelta(::CSnapshotDelta &self, ::CSnapshot const &from, ::CSnapshotBuffer &to, ::rust::Slice<::std::int32_t const> delta) noexcept;
669} // extern "C"
670
671::std::size_t CSnapshotDelta::layout::size() noexcept {
672 return cxxbridge1$194$CSnapshotDelta$operator$sizeof();
673}
674
675::std::size_t CSnapshotDelta::layout::align() noexcept {
676 return cxxbridge1$194$CSnapshotDelta$operator$alignof();
677}
678
679void CSnapshotDelta::DiffItem(::rust::Slice<::std::int32_t const> past, ::rust::Slice<::std::int32_t const> current, ::rust::Slice<::std::int32_t > out) noexcept {
680 cxxbridge1$194$CSnapshotDelta$DiffItem(past, current, out);
681}
682
683::rust::Box<::CSnapshotDelta> CSnapshotDelta::New() noexcept {
684 return ::rust::Box<::CSnapshotDelta>::from_raw(raw: cxxbridge1$194$CSnapshotDelta$New());
685}
686
687::rust::Box<::CSnapshotDelta> CSnapshotDelta::Clone() noexcept {
688 return ::rust::Box<::CSnapshotDelta>::from_raw(raw: cxxbridge1$194$CSnapshotDelta$Clone(self&: *this));
689}
690
691::std::uint64_t CSnapshotDelta::GetDataRate(::std::int32_t type_) const noexcept {
692 return cxxbridge1$194$CSnapshotDelta$GetDataRate(self: *this, type_);
693}
694
695::std::uint64_t CSnapshotDelta::GetDataUpdates(::std::int32_t type_) const noexcept {
696 return cxxbridge1$194$CSnapshotDelta$GetDataUpdates(self: *this, type_);
697}
698
699void CSnapshotDelta::SetStaticsize(::std::int32_t type_, ::std::size_t size) noexcept {
700 cxxbridge1$194$CSnapshotDelta$SetStaticsize(self&: *this, type_, size);
701}
702
703::rust::Slice<::std::int32_t const> CSnapshotDelta::EmptyDelta() const noexcept {
704 return ::rust::impl<::rust::Slice<::std::int32_t const>>::slice(repr: cxxbridge1$194$CSnapshotDelta$EmptyDelta(self: *this));
705}
706
707::std::int32_t CSnapshotDelta::CreateDelta(::CSnapshot const &from, ::CSnapshot const &to, ::rust::Slice<::std::int32_t > delta) noexcept {
708 return cxxbridge1$194$CSnapshotDelta$CreateDelta(self&: *this, from, to, delta);
709}
710
711::std::int32_t CSnapshotDelta::UnpackDelta(::CSnapshot const &from, ::CSnapshotBuffer &to, ::rust::Slice<::std::int32_t const> delta) noexcept {
712 return cxxbridge1$194$CSnapshotDelta$UnpackDelta(self&: *this, from, to, delta);
713}
714
715extern "C" {
716::CSnapshotDelta *cxxbridge1$box$CSnapshotDelta$alloc() noexcept;
717void cxxbridge1$box$CSnapshotDelta$dealloc(::CSnapshotDelta *) noexcept;
718void cxxbridge1$box$CSnapshotDelta$drop(::rust::Box<::CSnapshotDelta> *ptr) noexcept;
719} // extern "C"
720
721namespace rust {
722inline namespace cxxbridge1 {
723template <>
724::CSnapshotDelta *Box<::CSnapshotDelta>::allocation::alloc() noexcept {
725 return cxxbridge1$box$CSnapshotDelta$alloc();
726}
727template <>
728void Box<::CSnapshotDelta>::allocation::dealloc(::CSnapshotDelta *ptr) noexcept {
729 cxxbridge1$box$CSnapshotDelta$dealloc(ptr);
730}
731template <>
732void Box<::CSnapshotDelta>::drop() noexcept {
733 cxxbridge1$box$CSnapshotDelta$drop(ptr: this);
734}
735} // namespace cxxbridge1
736} // namespace rust
737