Struct mesh::payload::protobuf::FieldWriter
source · pub struct FieldWriter<'a, 'buf, R> { /* private fields */ }
Expand description
Type used to write field values.
Implementations§
source§impl<'a, 'buf, R> FieldWriter<'a, 'buf, R>
impl<'a, 'buf, R> FieldWriter<'a, 'buf, R>
sourcepub fn sequence(self) -> SequenceWriter<'a, 'buf, R>
pub fn sequence(self) -> SequenceWriter<'a, 'buf, R>
Returns a sequence writer for writing the field multiple times.
Panics if called while already writing a sequence, since this would result in an invalid protobuf message.
sourcepub fn write_empty(&self) -> bool
pub fn write_empty(&self) -> bool
Returns whether this write is occurring within a sequence.
sourcepub fn message<F>(self, f: F)where
F: FnOnce(MessageWriter<'_, 'buf, R>),
pub fn message<F>(self, f: F)where
F: FnOnce(MessageWriter<'_, 'buf, R>),
Calls f
with a writer for a message.
sourcepub fn packed<F>(self, f: F)where
F: FnOnce(PackedWriter<'_, '_>),
pub fn packed<F>(self, f: F)where
F: FnOnce(PackedWriter<'_, '_>),
Calls f
with a writer for the packed field.
Auto Trait Implementations§
impl<'a, 'buf, R> Freeze for FieldWriter<'a, 'buf, R>
impl<'a, 'buf, R> RefUnwindSafe for FieldWriter<'a, 'buf, R>where
R: RefUnwindSafe,
impl<'a, 'buf, R> Send for FieldWriter<'a, 'buf, R>where
R: Send,
impl<'a, 'buf, R> Sync for FieldWriter<'a, 'buf, R>where
R: Sync,
impl<'a, 'buf, R> Unpin for FieldWriter<'a, 'buf, R>
impl<'a, 'buf, R> !UnwindSafe for FieldWriter<'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