pub struct RawStructSchema { /* private fields */ }Expand description
Type information that gets included in the generated code for every user-defined Cap’n Proto struct.
Implementations§
Source§impl RawStructSchema
impl RawStructSchema
Sourcepub const fn new(
arena: &'static GeneratedCodeArena,
nonunion_members: &'static [u16],
members_by_discriminant: &'static [u16],
members_by_name: &'static [u16],
) -> Self
pub const fn new( arena: &'static GeneratedCodeArena, nonunion_members: &'static [u16], members_by_discriminant: &'static [u16], members_by_name: &'static [u16], ) -> Self
Constructs a new RawStructSchema.
Sourcepub const fn with_field_newtypes(
self,
field_newtypes: &'static [&'static [u64]],
) -> Self
pub const fn with_field_newtypes( self, field_newtypes: &'static [&'static [u64]], ) -> Self
Sets the per-field newtype ids; see crate::schema::Field::get_newtype_ids.
Sourcepub const fn with_any_layout(
self,
newtype_ids: &'static [u64],
offsets: &'static [u32],
discriminant_offset: u32,
) -> Self
pub const fn with_any_layout( self, newtype_ids: &'static [u64], offsets: &'static [u32], discriminant_offset: u32, ) -> Self
Marks this group as a use site of a group or union newtype, so the
dynamic API can downcast it to the newtype’s AnyReader /
AnyBuilder. See crate::traits::AnyReader.
Trait Implementations§
Source§impl Clone for RawStructSchema
impl Clone for RawStructSchema
impl Copy for RawStructSchema
Auto Trait Implementations§
impl Freeze for RawStructSchema
impl RefUnwindSafe for RawStructSchema
impl Send for RawStructSchema
impl Sync for RawStructSchema
impl Unpin for RawStructSchema
impl UnsafeUnpin for RawStructSchema
impl UnwindSafe for RawStructSchema
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more