Protobuf Team Bot | 219e8ea | 2024-06-28 05:51:01 -0700 | [diff] [blame] | 1 | // Protocol Buffers - Google's data interchange format |
| 2 | // Copyright 2024 Google LLC. All rights reserved. |
| 3 | // |
| 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file or at |
| 6 | // https://developers.google.com/open-source/licenses/bsd |
Derek Benson | 41f12a2 | 2024-07-23 10:56:09 -0700 | [diff] [blame] | 7 | #![deny(unsafe_op_in_unsafe_fn)] |
Derek Benson | 6f58085 | 2024-07-26 08:09:33 -0700 | [diff] [blame] | 8 | #![cfg_attr(not(bzl), allow(unused_imports))] |
Protobuf Team Bot | 219e8ea | 2024-06-28 05:51:01 -0700 | [diff] [blame] | 9 | |
Protobuf Team Bot | 5c7a9fd | 2024-04-16 07:03:22 -0700 | [diff] [blame] | 10 | mod arena; |
Derek Benson | 41f12a2 | 2024-07-23 10:56:09 -0700 | [diff] [blame] | 11 | |
Protobuf Team Bot | 5c7a9fd | 2024-04-16 07:03:22 -0700 | [diff] [blame] | 12 | pub use arena::{upb_Arena, Arena, RawArena}; |
Protobuf Team Bot | 2678e10 | 2024-04-12 13:50:28 -0700 | [diff] [blame] | 13 | |
Protobuf Team Bot | d44ba90 | 2024-04-16 08:05:40 -0700 | [diff] [blame] | 14 | mod array; |
| 15 | pub use array::{ |
| 16 | upb_Array, upb_Array_Append, upb_Array_DataPtr, upb_Array_Get, upb_Array_GetMutable, |
Derek Benson | f2d8c2b | 2024-05-13 05:48:10 -0700 | [diff] [blame] | 17 | upb_Array_MutableDataPtr, upb_Array_New, upb_Array_Reserve, upb_Array_Resize, upb_Array_Set, |
| 18 | upb_Array_Size, RawArray, |
Protobuf Team Bot | d44ba90 | 2024-04-16 08:05:40 -0700 | [diff] [blame] | 19 | }; |
Protobuf Team Bot | 2678e10 | 2024-04-12 13:50:28 -0700 | [diff] [blame] | 20 | |
Protobuf Team Bot | 7ad56e7 | 2024-07-29 11:13:57 -0700 | [diff] [blame] | 21 | mod associated_mini_table; |
| 22 | pub use associated_mini_table::AssociatedMiniTable; |
| 23 | |
Protobuf Team Bot | d44ba90 | 2024-04-16 08:05:40 -0700 | [diff] [blame] | 24 | mod ctype; |
| 25 | pub use ctype::CType; |
Protobuf Team Bot | 2678e10 | 2024-04-12 13:50:28 -0700 | [diff] [blame] | 26 | |
Protobuf Team Bot | d44ba90 | 2024-04-16 08:05:40 -0700 | [diff] [blame] | 27 | mod extension_registry; |
| 28 | pub use extension_registry::{upb_ExtensionRegistry, RawExtensionRegistry}; |
Protobuf Team Bot | 2678e10 | 2024-04-12 13:50:28 -0700 | [diff] [blame] | 29 | |
Protobuf Team Bot | d44ba90 | 2024-04-16 08:05:40 -0700 | [diff] [blame] | 30 | mod map; |
| 31 | pub use map::{ |
| 32 | upb_Map, upb_Map_Clear, upb_Map_Delete, upb_Map_Get, upb_Map_Insert, upb_Map_New, upb_Map_Next, |
Derek Benson | 1e1bf0d | 2024-07-26 11:07:22 -0700 | [diff] [blame] | 33 | upb_Map_Size, MapInsertStatus, RawMap, UPB_MAP_BEGIN, |
Protobuf Team Bot | d44ba90 | 2024-04-16 08:05:40 -0700 | [diff] [blame] | 34 | }; |
Protobuf Team Bot | 2678e10 | 2024-04-12 13:50:28 -0700 | [diff] [blame] | 35 | |
Protobuf Team Bot | d44ba90 | 2024-04-16 08:05:40 -0700 | [diff] [blame] | 36 | mod message; |
Protobuf Team Bot | 9f4f302 | 2024-08-23 12:09:38 -0700 | [diff] [blame] | 37 | pub use message::*; |
Protobuf Team Bot | 2678e10 | 2024-04-12 13:50:28 -0700 | [diff] [blame] | 38 | |
Protobuf Team Bot | d44ba90 | 2024-04-16 08:05:40 -0700 | [diff] [blame] | 39 | mod message_value; |
| 40 | pub use message_value::{upb_MessageValue, upb_MutableMessageValue}; |
Protobuf Team Bot | 2678e10 | 2024-04-12 13:50:28 -0700 | [diff] [blame] | 41 | |
Protobuf Team Bot | d44ba90 | 2024-04-16 08:05:40 -0700 | [diff] [blame] | 42 | mod mini_table; |
Jakob Buchgraber | b6e0a48 | 2024-05-06 05:16:05 -0700 | [diff] [blame] | 43 | pub use mini_table::{ |
Derek Benson | a0f79eb | 2024-09-09 13:27:05 -0700 | [diff] [blame] | 44 | upb_MiniTable, upb_MiniTableField, upb_MiniTable_FindFieldByNumber, |
| 45 | upb_MiniTable_GetFieldByIndex, upb_MiniTable_SubMessage, RawMiniTable, RawMiniTableField, |
Jakob Buchgraber | b6e0a48 | 2024-05-06 05:16:05 -0700 | [diff] [blame] | 46 | }; |
Protobuf Team Bot | 2678e10 | 2024-04-12 13:50:28 -0700 | [diff] [blame] | 47 | |
Protobuf Team Bot | d44ba90 | 2024-04-16 08:05:40 -0700 | [diff] [blame] | 48 | mod opaque_pointee; |
Protobuf Team Bot | 2678e10 | 2024-04-12 13:50:28 -0700 | [diff] [blame] | 49 | |
Protobuf Team Bot | 734729a | 2024-04-24 12:25:37 -0700 | [diff] [blame] | 50 | mod owned_arena_box; |
| 51 | pub use owned_arena_box::OwnedArenaBox; |
| 52 | |
Protobuf Team Bot | d44ba90 | 2024-04-16 08:05:40 -0700 | [diff] [blame] | 53 | mod string_view; |
| 54 | pub use string_view::StringView; |
Protobuf Team Bot | 2678e10 | 2024-04-12 13:50:28 -0700 | [diff] [blame] | 55 | |
Protobuf Team Bot | f9dd9ce | 2024-07-10 12:25:52 -0700 | [diff] [blame] | 56 | mod text; |
| 57 | pub use text::debug_string; |
| 58 | |
Protobuf Team Bot | 734729a | 2024-04-24 12:25:37 -0700 | [diff] [blame] | 59 | pub mod wire; |
| 60 | pub use wire::{upb_Decode, DecodeStatus, EncodeStatus}; |
Derek Benson | a0f79eb | 2024-09-09 13:27:05 -0700 | [diff] [blame] | 61 | |
| 62 | #[cfg(test)] |
| 63 | mod test { |
| 64 | #[macro_export] |
| 65 | /// Force a compiler error if the passed in function is not linked. |
| 66 | macro_rules! assert_linked { |
| 67 | ($($vals:tt)+) => { |
| 68 | let _ = std::hint::black_box($($vals)+ as *const ()); |
| 69 | } |
| 70 | } |
| 71 | } |