Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
817 B
31 lines
817 B
use crate::opaque_pointee::opaque_pointee; |
|
use crate::{upb_MiniTable, upb_MiniTableField, RawArena}; |
|
use std::ptr::NonNull; |
|
|
|
opaque_pointee!(upb_Message); |
|
pub type RawMessage = NonNull<upb_Message>; |
|
|
|
extern "C" { |
|
/// SAFETY: No constraints. |
|
pub fn upb_Message_New(mini_table: *const upb_MiniTable, arena: RawArena) |
|
-> Option<RawMessage>; |
|
|
|
pub fn upb_Message_DeepCopy( |
|
dst: RawMessage, |
|
src: RawMessage, |
|
mini_table: *const upb_MiniTable, |
|
arena: RawArena, |
|
); |
|
|
|
pub fn upb_Message_DeepClone( |
|
m: RawMessage, |
|
mini_table: *const upb_MiniTable, |
|
arena: RawArena, |
|
) -> Option<RawMessage>; |
|
|
|
pub fn upb_Message_SetBaseField( |
|
m: RawMessage, |
|
mini_table: *const upb_MiniTableField, |
|
val: *const std::ffi::c_void, |
|
); |
|
}
|
|
|