Struct mesh::payload::protobuf::MessageWriter
source · pub struct MessageWriter<'a, 'buf, R> { /* private fields */ }
Expand description
A writer for a message.
Implementations§
source§impl<'buf, R> MessageWriter<'_, 'buf, R>
impl<'buf, R> MessageWriter<'_, 'buf, R>
sourcepub fn field(&mut self, n: u32) -> FieldWriter<'_, 'buf, R>
pub fn field(&mut self, n: u32) -> FieldWriter<'_, 'buf, R>
Returns a field writer for field number n
.
It’s legal to write fields in any order and to write fields that duplicate previous fields. By convention, later fields overwrite previous ones (or append, in the case of sequences).
sourcepub fn raw_message(
&mut self,
data: &[u8],
resources: impl IntoIterator<Item = R>,
)
pub fn raw_message( &mut self, data: &[u8], resources: impl IntoIterator<Item = R>, )
Writes a raw message.
Auto Trait Implementations§
impl<'a, 'buf, R> Freeze for MessageWriter<'a, 'buf, R>
impl<'a, 'buf, R> RefUnwindSafe for MessageWriter<'a, 'buf, R>where
R: RefUnwindSafe,
impl<'a, 'buf, R> Send for MessageWriter<'a, 'buf, R>where
R: Send,
impl<'a, 'buf, R> Sync for MessageWriter<'a, 'buf, R>where
R: Sync,
impl<'a, 'buf, R> Unpin for MessageWriter<'a, 'buf, R>
impl<'a, 'buf, R> !UnwindSafe for MessageWriter<'a, 'buf, R>
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