pub struct TypedMessage<T: Protobuf> { /* private fields */ }Expand description
A typed non-null message pointer for repeated fields.
Implements Deref<Target=T> so &[TypedMessage<T>] can be used like &[&T].
This is #[repr(transparent)] over *mut T, making it compatible with
table-driven codec that treats it as *mut Object.
Implementations§
Source§impl<T: Protobuf> TypedMessage<T>
impl<T: Protobuf> TypedMessage<T>
Sourcepub fn new_in(arena: &mut Arena<'_>) -> Self
pub fn new_in(arena: &mut Arena<'_>) -> Self
Create a new message allocated in the arena, initialized to default.
Sourcepub const fn from_static(r: &'static T) -> Self
pub const fn from_static(r: &'static T) -> Self
Create from a static reference (for static initializers).
Trait Implementations§
Source§impl<T: Protobuf> Clone for TypedMessage<T>
impl<T: Protobuf> Clone for TypedMessage<T>
Source§impl<T: Protobuf> Debug for TypedMessage<T>
impl<T: Protobuf> Debug for TypedMessage<T>
Source§impl<T: Protobuf> Deref for TypedMessage<T>
impl<T: Protobuf> Deref for TypedMessage<T>
Source§impl<T: Protobuf> DerefMut for TypedMessage<T>
impl<T: Protobuf> DerefMut for TypedMessage<T>
impl<T: Protobuf> Copy for TypedMessage<T>
Auto Trait Implementations§
impl<T> Freeze for TypedMessage<T>
impl<T> RefUnwindSafe for TypedMessage<T>where
T: RefUnwindSafe,
impl<T> Send for TypedMessage<T>where
T: Send,
impl<T> Sync for TypedMessage<T>where
T: Sync,
impl<T> Unpin for TypedMessage<T>where
T: Unpin,
impl<T> UnwindSafe for TypedMessage<T>where
T: UnwindSafe,
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