pub struct EncodedData { /* private fields */ }Expand description
Encoder for building binary messages.
Implementations§
Source§impl EncodedData
impl EncodedData
Sourcepub fn new() -> EncodedData
pub fn new() -> EncodedData
Create a new empty encoder.
Sourcepub fn mark_needs_flush(&mut self)
pub fn mark_needs_flush(&mut self)
Mark that this batch needs to be flushed before returning. Used for stack-allocated callbacks that require synchronous invocation.
Sourcepub fn prepend_u32(&mut self, value: u32)
pub fn prepend_u32(&mut self, value: u32)
Prepend a u32 to the beginning of the buffer. Used to add the reserved placeholder count at the start of batch messages.
Trait Implementations§
Source§impl Debug for EncodedData
impl Debug for EncodedData
Source§impl Default for EncodedData
impl Default for EncodedData
Source§fn default() -> EncodedData
fn default() -> EncodedData
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EncodedData
impl RefUnwindSafe for EncodedData
impl Send for EncodedData
impl Sync for EncodedData
impl Unpin for EncodedData
impl UnwindSafe for EncodedData
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