| // This file is generated by src/gn/ffi/update_bridge.sh. Do not edit manually. |
| // Source: src/gn/ffi/starlark/crates/ffi/src/bridge.rs |
| #include "gn/ffi/scope.h" |
| #include "gn/ffi/test_with_scope.h" |
| #include "gn/ffi/value.h" |
| #include "gn/label.h" |
| #include "gn/output_file.h" |
| #include "gn/scope.h" |
| #include "gn/settings.h" |
| #include "gn/source_dir.h" |
| #include "gn/test_with_scope.h" |
| #include "gn/value.h" |
| #include <array> |
| #include <cassert> |
| #include <cstddef> |
| #include <cstdint> |
| #include <iterator> |
| #include <memory> |
| #include <new> |
| #include <stdexcept> |
| #include <string> |
| #include <type_traits> |
| #include <utility> |
| #if __cplusplus >= 201703L |
| #include <string_view> |
| #endif |
| #if __cplusplus >= 202002L |
| #include <ranges> |
| #endif |
| |
| #ifdef __GNUC__ |
| #pragma GCC diagnostic ignored "-Wmissing-declarations" |
| #ifdef __clang__ |
| #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension" |
| #endif // __clang__ |
| #endif // __GNUC__ |
| |
| namespace rust { |
| inline namespace cxxbridge1 { |
| // #include "rust/cxx.h" |
| |
| #ifndef CXXBRIDGE1_PANIC |
| #define CXXBRIDGE1_PANIC |
| template <typename Exception> |
| void panic [[noreturn]](const char *msg); |
| #endif // CXXBRIDGE1_PANIC |
| |
| namespace { |
| template <typename T> |
| class impl; |
| } // namespace |
| |
| class String; |
| class Opaque; |
| |
| template <typename T> |
| ::std::size_t size_of(); |
| template <typename T> |
| ::std::size_t align_of(); |
| |
| #ifndef CXXBRIDGE1_RUST_STR |
| #define CXXBRIDGE1_RUST_STR |
| class Str final { |
| public: |
| Str() noexcept; |
| Str(const String &) noexcept; |
| Str(const std::string &); |
| Str(const char *); |
| Str(const char *, std::size_t); |
| #if __cplusplus >= 201703L |
| Str(std::string_view s) : Str(s.data(), s.size()) {} |
| #endif |
| |
| Str &operator=(const Str &) & noexcept = default; |
| |
| explicit operator std::string() const; |
| #if __cplusplus >= 201703L |
| explicit operator std::string_view() const; |
| #endif |
| |
| const char *data() const noexcept; |
| std::size_t size() const noexcept; |
| std::size_t length() const noexcept; |
| bool empty() const noexcept; |
| |
| Str(const Str &) noexcept = default; |
| ~Str() noexcept = default; |
| |
| using iterator = const char *; |
| using const_iterator = const char *; |
| const_iterator begin() const noexcept; |
| const_iterator end() const noexcept; |
| const_iterator cbegin() const noexcept; |
| const_iterator cend() const noexcept; |
| |
| bool operator==(const Str &) const noexcept; |
| bool operator!=(const Str &) const noexcept; |
| bool operator<(const Str &) const noexcept; |
| bool operator<=(const Str &) const noexcept; |
| bool operator>(const Str &) const noexcept; |
| bool operator>=(const Str &) const noexcept; |
| |
| void swap(Str &) noexcept; |
| |
| private: |
| class uninit; |
| Str(uninit) noexcept; |
| friend impl<Str>; |
| |
| std::array<std::uintptr_t, 2> repr; |
| }; |
| |
| #if __cplusplus >= 201703L |
| inline Str cxx_to_rust(std::string_view view) { return Str(view); } |
| #endif |
| |
| inline Str cxx_to_rust(const std::string &s) { return Str(s); } |
| #endif // CXXBRIDGE1_RUST_STR |
| |
| #ifndef CXXBRIDGE1_RUST_SLICE |
| #define CXXBRIDGE1_RUST_SLICE |
| namespace detail { |
| template <bool> |
| struct copy_assignable_if {}; |
| |
| template <> |
| struct copy_assignable_if<false> { |
| copy_assignable_if() noexcept = default; |
| copy_assignable_if(const copy_assignable_if &) noexcept = default; |
| copy_assignable_if &operator=(const copy_assignable_if &) & noexcept = delete; |
| copy_assignable_if &operator=(copy_assignable_if &&) & noexcept = default; |
| }; |
| } // namespace detail |
| |
| template <typename T> |
| class Slice final |
| : private detail::copy_assignable_if<std::is_const<T>::value> { |
| public: |
| using value_type = T; |
| |
| Slice() noexcept; |
| Slice(T *, std::size_t count) noexcept; |
| |
| template <typename C> |
| explicit Slice(C &c) : Slice(c.data(), c.size()) {} |
| |
| Slice &operator=(const Slice<T> &) & noexcept = default; |
| Slice &operator=(Slice<T> &&) & noexcept = default; |
| |
| T *data() const noexcept; |
| std::size_t size() const noexcept; |
| std::size_t length() const noexcept; |
| bool empty() const noexcept; |
| |
| T &operator[](std::size_t n) const noexcept; |
| T &at(std::size_t n) const; |
| T &front() const noexcept; |
| T &back() const noexcept; |
| |
| Slice(const Slice<T> &) noexcept = default; |
| ~Slice() noexcept = default; |
| |
| class iterator; |
| iterator begin() const noexcept; |
| iterator end() const noexcept; |
| |
| void swap(Slice &) noexcept; |
| |
| private: |
| class uninit; |
| Slice(uninit) noexcept; |
| friend impl<Slice>; |
| friend void sliceInit(void *, const void *, std::size_t) noexcept; |
| friend void *slicePtr(const void *) noexcept; |
| friend std::size_t sliceLen(const void *) noexcept; |
| |
| std::array<std::uintptr_t, 2> repr; |
| }; |
| |
| #ifdef __cpp_deduction_guides |
| template <typename C> |
| explicit Slice(C &c) |
| -> Slice<std::remove_reference_t<decltype(*std::declval<C>().data())>>; |
| #endif // __cpp_deduction_guides |
| |
| template <typename T> |
| class Slice<T>::iterator final { |
| public: |
| #if __cplusplus >= 202002L |
| using iterator_category = std::contiguous_iterator_tag; |
| #else |
| using iterator_category = std::random_access_iterator_tag; |
| #endif |
| using value_type = T; |
| using element_type = T; |
| using difference_type = std::ptrdiff_t; |
| using pointer = typename std::add_pointer<T>::type; |
| using reference = typename std::add_lvalue_reference<T>::type; |
| |
| reference operator*() const noexcept; |
| pointer operator->() const noexcept; |
| reference operator[](difference_type) const noexcept; |
| |
| iterator &operator++() noexcept; |
| iterator operator++(int) noexcept; |
| iterator &operator--() noexcept; |
| iterator operator--(int) noexcept; |
| |
| iterator &operator+=(difference_type) noexcept; |
| iterator &operator-=(difference_type) noexcept; |
| iterator operator+(difference_type) const noexcept; |
| friend inline iterator operator+(difference_type lhs, iterator rhs) noexcept { |
| return rhs + lhs; |
| } |
| iterator operator-(difference_type) const noexcept; |
| difference_type operator-(const iterator &) const noexcept; |
| |
| bool operator==(const iterator &) const noexcept; |
| bool operator!=(const iterator &) const noexcept; |
| bool operator<(const iterator &) const noexcept; |
| bool operator<=(const iterator &) const noexcept; |
| bool operator>(const iterator &) const noexcept; |
| bool operator>=(const iterator &) const noexcept; |
| |
| private: |
| friend class Slice; |
| void *pos; |
| std::size_t stride; |
| }; |
| |
| #if __cplusplus >= 202002L |
| static_assert(std::ranges::contiguous_range<rust::Slice<const uint8_t>>); |
| static_assert(std::contiguous_iterator<rust::Slice<const uint8_t>::iterator>); |
| #endif |
| |
| template <typename T> |
| Slice<T>::Slice() noexcept { |
| sliceInit(this, reinterpret_cast<void *>(align_of<T>()), 0); |
| } |
| |
| template <typename T> |
| Slice<T>::Slice(T *s, std::size_t count) noexcept { |
| assert(s != nullptr || count == 0); |
| sliceInit(this, |
| s == nullptr && count == 0 |
| ? reinterpret_cast<void *>(align_of<T>()) |
| : const_cast<typename std::remove_const<T>::type *>(s), |
| count); |
| } |
| |
| template <typename T> |
| T *Slice<T>::data() const noexcept { |
| return reinterpret_cast<T *>(slicePtr(this)); |
| } |
| |
| template <typename T> |
| std::size_t Slice<T>::size() const noexcept { |
| return sliceLen(this); |
| } |
| |
| template <typename T> |
| std::size_t Slice<T>::length() const noexcept { |
| return this->size(); |
| } |
| |
| template <typename T> |
| bool Slice<T>::empty() const noexcept { |
| return this->size() == 0; |
| } |
| |
| template <typename T> |
| T &Slice<T>::operator[](std::size_t n) const noexcept { |
| assert(n < this->size()); |
| auto ptr = static_cast<char *>(slicePtr(this)) + size_of<T>() * n; |
| return *reinterpret_cast<T *>(ptr); |
| } |
| |
| template <typename T> |
| T &Slice<T>::at(std::size_t n) const { |
| if (n >= this->size()) { |
| panic<std::out_of_range>("rust::Slice index out of range"); |
| } |
| return (*this)[n]; |
| } |
| |
| template <typename T> |
| T &Slice<T>::front() const noexcept { |
| assert(!this->empty()); |
| return (*this)[0]; |
| } |
| |
| template <typename T> |
| T &Slice<T>::back() const noexcept { |
| assert(!this->empty()); |
| return (*this)[this->size() - 1]; |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator::reference |
| Slice<T>::iterator::operator*() const noexcept { |
| return *static_cast<T *>(this->pos); |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator::pointer |
| Slice<T>::iterator::operator->() const noexcept { |
| return static_cast<T *>(this->pos); |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator::reference Slice<T>::iterator::operator[]( |
| typename Slice<T>::iterator::difference_type n) const noexcept { |
| auto ptr = static_cast<char *>(this->pos) + this->stride * n; |
| return *reinterpret_cast<T *>(ptr); |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator &Slice<T>::iterator::operator++() noexcept { |
| this->pos = static_cast<char *>(this->pos) + this->stride; |
| return *this; |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator Slice<T>::iterator::operator++(int) noexcept { |
| auto ret = iterator(*this); |
| this->pos = static_cast<char *>(this->pos) + this->stride; |
| return ret; |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator &Slice<T>::iterator::operator--() noexcept { |
| this->pos = static_cast<char *>(this->pos) - this->stride; |
| return *this; |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator Slice<T>::iterator::operator--(int) noexcept { |
| auto ret = iterator(*this); |
| this->pos = static_cast<char *>(this->pos) - this->stride; |
| return ret; |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator &Slice<T>::iterator::operator+=( |
| typename Slice<T>::iterator::difference_type n) noexcept { |
| this->pos = static_cast<char *>(this->pos) + this->stride * n; |
| return *this; |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator &Slice<T>::iterator::operator-=( |
| typename Slice<T>::iterator::difference_type n) noexcept { |
| this->pos = static_cast<char *>(this->pos) - this->stride * n; |
| return *this; |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator Slice<T>::iterator::operator+( |
| typename Slice<T>::iterator::difference_type n) const noexcept { |
| auto ret = iterator(*this); |
| ret.pos = static_cast<char *>(this->pos) + this->stride * n; |
| return ret; |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator Slice<T>::iterator::operator-( |
| typename Slice<T>::iterator::difference_type n) const noexcept { |
| auto ret = iterator(*this); |
| ret.pos = static_cast<char *>(this->pos) - this->stride * n; |
| return ret; |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator::difference_type |
| Slice<T>::iterator::operator-(const iterator &other) const noexcept { |
| auto diff = std::distance(static_cast<char *>(other.pos), |
| static_cast<char *>(this->pos)); |
| return diff / static_cast<typename Slice<T>::iterator::difference_type>( |
| this->stride); |
| } |
| |
| template <typename T> |
| bool Slice<T>::iterator::operator==(const iterator &other) const noexcept { |
| return this->pos == other.pos; |
| } |
| |
| template <typename T> |
| bool Slice<T>::iterator::operator!=(const iterator &other) const noexcept { |
| return this->pos != other.pos; |
| } |
| |
| template <typename T> |
| bool Slice<T>::iterator::operator<(const iterator &other) const noexcept { |
| return this->pos < other.pos; |
| } |
| |
| template <typename T> |
| bool Slice<T>::iterator::operator<=(const iterator &other) const noexcept { |
| return this->pos <= other.pos; |
| } |
| |
| template <typename T> |
| bool Slice<T>::iterator::operator>(const iterator &other) const noexcept { |
| return this->pos > other.pos; |
| } |
| |
| template <typename T> |
| bool Slice<T>::iterator::operator>=(const iterator &other) const noexcept { |
| return this->pos >= other.pos; |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator Slice<T>::begin() const noexcept { |
| iterator it; |
| it.pos = slicePtr(this); |
| it.stride = size_of<T>(); |
| return it; |
| } |
| |
| template <typename T> |
| typename Slice<T>::iterator Slice<T>::end() const noexcept { |
| iterator it = this->begin(); |
| it.pos = static_cast<char *>(it.pos) + it.stride * this->size(); |
| return it; |
| } |
| |
| template <typename T> |
| void Slice<T>::swap(Slice &rhs) noexcept { |
| std::swap(*this, rhs); |
| } |
| #endif // CXXBRIDGE1_RUST_SLICE |
| |
| #ifndef CXXBRIDGE1_IS_COMPLETE |
| #define CXXBRIDGE1_IS_COMPLETE |
| namespace detail { |
| namespace { |
| template <typename T, typename = std::size_t> |
| struct is_complete : std::false_type {}; |
| template <typename T> |
| struct is_complete<T, decltype(sizeof(T))> : std::true_type {}; |
| } // namespace |
| } // namespace detail |
| #endif // CXXBRIDGE1_IS_COMPLETE |
| |
| #ifndef CXXBRIDGE1_LAYOUT |
| #define CXXBRIDGE1_LAYOUT |
| class layout { |
| template <typename T> |
| friend std::size_t size_of(); |
| template <typename T> |
| friend std::size_t align_of(); |
| template <typename T> |
| static typename std::enable_if<std::is_base_of<Opaque, T>::value, |
| std::size_t>::type |
| do_size_of() { |
| return T::layout::size(); |
| } |
| template <typename T> |
| static typename std::enable_if<!std::is_base_of<Opaque, T>::value, |
| std::size_t>::type |
| do_size_of() { |
| return sizeof(T); |
| } |
| template <typename T> |
| static |
| typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type |
| size_of() { |
| return do_size_of<T>(); |
| } |
| template <typename T> |
| static typename std::enable_if<std::is_base_of<Opaque, T>::value, |
| std::size_t>::type |
| do_align_of() { |
| return T::layout::align(); |
| } |
| template <typename T> |
| static typename std::enable_if<!std::is_base_of<Opaque, T>::value, |
| std::size_t>::type |
| do_align_of() { |
| return alignof(T); |
| } |
| template <typename T> |
| static |
| typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type |
| align_of() { |
| return do_align_of<T>(); |
| } |
| }; |
| |
| template <typename T> |
| std::size_t size_of() { |
| return layout::size_of<T>(); |
| } |
| |
| template <typename T> |
| std::size_t align_of() { |
| return layout::align_of<T>(); |
| } |
| #endif // CXXBRIDGE1_LAYOUT |
| |
| namespace { |
| template <bool> struct deleter_if { |
| template <typename T> void operator()(T *) {} |
| }; |
| template <> struct deleter_if<true> { |
| template <typename T> void operator()(T *ptr) { ptr->~T(); } |
| }; |
| } // namespace |
| } // namespace cxxbridge1 |
| } // namespace rust |
| |
| #if __cplusplus >= 201402L |
| #define CXX_DEFAULT_VALUE(value) = value |
| #else |
| #define CXX_DEFAULT_VALUE(value) |
| #endif |
| |
| struct Any; |
| struct SliceAny; |
| struct KeyValue; |
| enum class ValueType : ::std::uint8_t; |
| using OutputFile = ::OutputFile; |
| using SourceDir = ::SourceDir; |
| using Label = ::Label; |
| using Settings = ::Settings; |
| using Scope = ::Scope; |
| using TestWithScope = ::TestWithScope; |
| using Value = ::Value; |
| using ParseNode = ::ParseNode; |
| |
| #ifndef CXXBRIDGE1_STRUCT_Any |
| #define CXXBRIDGE1_STRUCT_Any |
| struct Any final { |
| ::std::uint8_t _private CXX_DEFAULT_VALUE(0); |
| |
| using IsRelocatable = ::std::true_type; |
| }; |
| #endif // CXXBRIDGE1_STRUCT_Any |
| |
| #ifndef CXXBRIDGE1_STRUCT_SliceAny |
| #define CXXBRIDGE1_STRUCT_SliceAny |
| struct SliceAny final { |
| ::std::size_t len CXX_DEFAULT_VALUE(0); |
| ::Any *ptr CXX_DEFAULT_VALUE(nullptr); |
| |
| using IsRelocatable = ::std::true_type; |
| }; |
| #endif // CXXBRIDGE1_STRUCT_SliceAny |
| |
| #ifndef CXXBRIDGE1_STRUCT_KeyValue |
| #define CXXBRIDGE1_STRUCT_KeyValue |
| struct KeyValue final { |
| ::rust::Str key; |
| ::Value const &value; |
| |
| using IsRelocatable = ::std::true_type; |
| }; |
| #endif // CXXBRIDGE1_STRUCT_KeyValue |
| |
| #ifndef CXXBRIDGE1_ENUM_ValueType |
| #define CXXBRIDGE1_ENUM_ValueType |
| enum class ValueType : ::std::uint8_t { |
| None = 0, |
| Boolean = 1, |
| Integer = 2, |
| String = 3, |
| List = 4, |
| Scope = 5, |
| }; |
| #endif // CXXBRIDGE1_ENUM_ValueType |
| |
| extern "C" { |
| void cxxbridge1$196$OutputFile$value(::OutputFile const &self, ::rust::Str *return$) noexcept { |
| std::string_view (::OutputFile::*value$)() const = &::OutputFile::value; |
| new (return$) ::rust::Str(::rust::cxx_to_rust((self.*value$)())); |
| } |
| |
| void cxxbridge1$196$SourceDir$SourceWithNoTrailingSlash(::SourceDir const &self, ::rust::Str *return$) noexcept { |
| std::string_view (::SourceDir::*SourceWithNoTrailingSlash$)() const = &::SourceDir::SourceWithNoTrailingSlash; |
| new (return$) ::rust::Str(::rust::cxx_to_rust((self.*SourceWithNoTrailingSlash$)())); |
| } |
| |
| void cxxbridge1$196$Label$dir(::Label const &self, ::SourceDir const **return$) noexcept { |
| ::SourceDir const &(::Label::*dir$)() const = &::Label::dir; |
| new (return$) ::SourceDir const *(&(self.*dir$)()); |
| } |
| |
| void cxxbridge1$196$Label$name(::Label const &self, ::rust::Str *return$) noexcept { |
| const std::string& (::Label::*name$)() const = &::Label::name; |
| new (return$) ::rust::Str(::rust::cxx_to_rust((self.*name$)())); |
| } |
| |
| void cxxbridge1$196$Settings$toolchain_label(::Settings const &self, ::Label const **return$) noexcept { |
| ::Label const &(::Settings::*toolchain_label$)() const = &::Settings::toolchain_label; |
| new (return$) ::Label const *(&(self.*toolchain_label$)()); |
| } |
| |
| void cxxbridge1$196$NewScope(::Scope const &parent_scope, ::rust::Slice<::rust::Str const> keys, ::std::unique_ptr<::Scope> &out_scope, ::SliceAny *return$) noexcept { |
| ::SliceAny (*NewScope$)(::Scope const &, ::rust::Slice<::rust::Str const>, ::std::unique_ptr<::Scope> &) = ::NewScope; |
| new (return$) ::SliceAny(NewScope$(parent_scope, keys, out_scope)); |
| } |
| |
| void cxxbridge1$196$GetScopeItems(::Scope const &scope, ::SliceAny *return$) noexcept { |
| ::SliceAny (*GetScopeItems$)(::Scope const &) = ::GetScopeItems; |
| new (return$) ::SliceAny(GetScopeItems$(scope)); |
| } |
| |
| ::Settings const *cxxbridge1$196$Scope$settings_cxx(::Scope const &self) noexcept { |
| ::Settings const *(::Scope::*settings_cxx$)() const = &::Scope::settings; |
| return (self.*settings_cxx$)(); |
| } |
| |
| ::TestWithScope *cxxbridge1$196$NewTestWithScope() noexcept { |
| ::std::unique_ptr<::TestWithScope> (*NewTestWithScope$)() = ::NewTestWithScope; |
| return NewTestWithScope$().release(); |
| } |
| |
| ::Scope *cxxbridge1$196$TestWithScope$scope_cxx(::TestWithScope &self) noexcept { |
| ::Scope *(::TestWithScope::*scope_cxx$)() = &::TestWithScope::scope; |
| return (self.*scope_cxx$)(); |
| } |
| |
| ::Value *cxxbridge1$196$NewValueForTesting() noexcept { |
| ::std::unique_ptr<::Value> (*NewValueForTesting$)() = ::NewValueForTesting; |
| return NewValueForTesting$().release(); |
| } |
| |
| ::std::size_t cxxbridge1$196$ValueSize() noexcept { |
| ::std::size_t (*ValueSize$)() = ::ValueSize; |
| return ValueSize$(); |
| } |
| |
| ::ValueType cxxbridge1$196$Value$kind(::Value const &self) noexcept { |
| Value::Type (::Value::*kind$)() const = &::Value::type; |
| return ::rust::cxx_to_rust((self.*kind$)()); |
| } |
| |
| void cxxbridge1$196$Value$boolean_value(::Value const &self, bool const **return$) noexcept { |
| bool const &(::Value::*boolean_value$)() const = &::Value::boolean_value; |
| new (return$) bool const *(&(self.*boolean_value$)()); |
| } |
| |
| void cxxbridge1$196$Value$int_value(::Value const &self, ::std::int64_t const **return$) noexcept { |
| ::std::int64_t const &(::Value::*int_value$)() const = &::Value::int_value; |
| new (return$) ::std::int64_t const *(&(self.*int_value$)()); |
| } |
| |
| void cxxbridge1$196$Value$string_value(::Value const &self, ::rust::Str *return$) noexcept { |
| const std::string& (::Value::*string_value$)() const = &::Value::string_value; |
| new (return$) ::rust::Str(::rust::cxx_to_rust((self.*string_value$)())); |
| } |
| |
| void cxxbridge1$196$list_value_cxx(::Value const &val, ::SliceAny *return$) noexcept { |
| ::SliceAny (*list_value_cxx$)(::Value const &) = ::GetValueList; |
| new (return$) ::SliceAny(list_value_cxx$(val)); |
| } |
| |
| ::Scope const *cxxbridge1$196$Value$scope_value(::Value const &self) noexcept { |
| ::Scope const *(::Value::*scope_value$)() const = &::Value::scope_value; |
| return (self.*scope_value$)(); |
| } |
| |
| void cxxbridge1$196$SetValueNone(::Value &val, ::ParseNode const *origin) noexcept { |
| void (*SetValueNone$)(::Value &, ::ParseNode const *) = ::SetValueNone; |
| SetValueNone$(val, origin); |
| } |
| |
| void cxxbridge1$196$SetValueBool(::Value &val, ::ParseNode const *origin, bool b) noexcept { |
| void (*SetValueBool$)(::Value &, ::ParseNode const *, bool) = ::SetValueBool; |
| SetValueBool$(val, origin, b); |
| } |
| |
| void cxxbridge1$196$SetValueInt(::Value &val, ::ParseNode const *origin, ::std::int64_t i) noexcept { |
| void (*SetValueInt$)(::Value &, ::ParseNode const *, ::std::int64_t) = ::SetValueInt; |
| SetValueInt$(val, origin, i); |
| } |
| |
| void cxxbridge1$196$SetValueString(::Value &val, ::ParseNode const *origin, ::rust::Str s) noexcept { |
| void (*SetValueString$)(::Value &, ::ParseNode const *, ::rust::Str) = ::SetValueString; |
| SetValueString$(val, origin, s); |
| } |
| |
| ::Any *cxxbridge1$196$SetValueList(::Value &val, ::ParseNode const *origin, ::std::size_t size) noexcept { |
| ::Any *(*SetValueList$)(::Value &, ::ParseNode const *, ::std::size_t) = ::SetValueList; |
| return SetValueList$(val, origin, size); |
| } |
| |
| void cxxbridge1$196$SetValueScope(::Value &val, ::ParseNode const *origin, ::Scope *scope) noexcept { |
| void (*SetValueScope$)(::Value &, ::ParseNode const *, ::std::unique_ptr<::Scope>) = ::SetValueScope; |
| SetValueScope$(val, origin, ::std::unique_ptr<::Scope>(scope)); |
| } |
| |
| static_assert(::rust::detail::is_complete<::std::remove_extent<::Scope>::type>::value, "definition of `::Scope` is required"); |
| static_assert(sizeof(::std::unique_ptr<::Scope>) == sizeof(void *), ""); |
| static_assert(alignof(::std::unique_ptr<::Scope>) == alignof(void *), ""); |
| void cxxbridge1$unique_ptr$Scope$null(::std::unique_ptr<::Scope> *ptr) noexcept { |
| ::new (ptr) ::std::unique_ptr<::Scope>(); |
| } |
| void cxxbridge1$unique_ptr$Scope$raw(::std::unique_ptr<::Scope> *ptr, ::std::unique_ptr<::Scope>::pointer raw) noexcept { |
| ::new (ptr) ::std::unique_ptr<::Scope>(raw); |
| } |
| ::std::unique_ptr<::Scope>::element_type const *cxxbridge1$unique_ptr$Scope$get(::std::unique_ptr<::Scope> const &ptr) noexcept { |
| return ptr.get(); |
| } |
| ::std::unique_ptr<::Scope>::pointer cxxbridge1$unique_ptr$Scope$release(::std::unique_ptr<::Scope> &ptr) noexcept { |
| return ptr.release(); |
| } |
| void cxxbridge1$unique_ptr$Scope$drop(::std::unique_ptr<::Scope> *ptr) noexcept { |
| ::rust::deleter_if<::rust::detail::is_complete<::Scope>::value>{}(ptr); |
| } |
| |
| static_assert(::rust::detail::is_complete<::std::remove_extent<::TestWithScope>::type>::value, "definition of `::TestWithScope` is required"); |
| static_assert(sizeof(::std::unique_ptr<::TestWithScope>) == sizeof(void *), ""); |
| static_assert(alignof(::std::unique_ptr<::TestWithScope>) == alignof(void *), ""); |
| void cxxbridge1$unique_ptr$TestWithScope$null(::std::unique_ptr<::TestWithScope> *ptr) noexcept { |
| ::new (ptr) ::std::unique_ptr<::TestWithScope>(); |
| } |
| void cxxbridge1$unique_ptr$TestWithScope$raw(::std::unique_ptr<::TestWithScope> *ptr, ::std::unique_ptr<::TestWithScope>::pointer raw) noexcept { |
| ::new (ptr) ::std::unique_ptr<::TestWithScope>(raw); |
| } |
| ::std::unique_ptr<::TestWithScope>::element_type const *cxxbridge1$unique_ptr$TestWithScope$get(::std::unique_ptr<::TestWithScope> const &ptr) noexcept { |
| return ptr.get(); |
| } |
| ::std::unique_ptr<::TestWithScope>::pointer cxxbridge1$unique_ptr$TestWithScope$release(::std::unique_ptr<::TestWithScope> &ptr) noexcept { |
| return ptr.release(); |
| } |
| void cxxbridge1$unique_ptr$TestWithScope$drop(::std::unique_ptr<::TestWithScope> *ptr) noexcept { |
| ::rust::deleter_if<::rust::detail::is_complete<::TestWithScope>::value>{}(ptr); |
| } |
| |
| static_assert(::rust::detail::is_complete<::std::remove_extent<::Value>::type>::value, "definition of `::Value` is required"); |
| static_assert(sizeof(::std::unique_ptr<::Value>) == sizeof(void *), ""); |
| static_assert(alignof(::std::unique_ptr<::Value>) == alignof(void *), ""); |
| void cxxbridge1$unique_ptr$Value$null(::std::unique_ptr<::Value> *ptr) noexcept { |
| ::new (ptr) ::std::unique_ptr<::Value>(); |
| } |
| void cxxbridge1$unique_ptr$Value$raw(::std::unique_ptr<::Value> *ptr, ::std::unique_ptr<::Value>::pointer raw) noexcept { |
| ::new (ptr) ::std::unique_ptr<::Value>(raw); |
| } |
| ::std::unique_ptr<::Value>::element_type const *cxxbridge1$unique_ptr$Value$get(::std::unique_ptr<::Value> const &ptr) noexcept { |
| return ptr.get(); |
| } |
| ::std::unique_ptr<::Value>::pointer cxxbridge1$unique_ptr$Value$release(::std::unique_ptr<::Value> &ptr) noexcept { |
| return ptr.release(); |
| } |
| void cxxbridge1$unique_ptr$Value$drop(::std::unique_ptr<::Value> *ptr) noexcept { |
| ::rust::deleter_if<::rust::detail::is_complete<::Value>::value>{}(ptr); |
| } |
| } // extern "C" |