Struct MessageBuf
pub struct MessageBuf {
buf: Vec<u8>,
args_num: u32,
}Fields§
§buf: Vec<u8>§args_num: u32Implementations§
Source§impl MessageBuf
impl MessageBuf
pub const fn new() -> MessageBuf
pub fn with_capacity(capacity: usize) -> MessageBuf
pub fn clear(&mut self)
pub fn as_buffer_slice(&self) -> &[u8] ⓘ
pub const fn args_num(&self) -> usize
pub fn to_ffi(&mut self) -> (*mut i8, usize, i32)
pub fn write_bool(&mut self, value: bool, name: Option<&str>)
pub fn write_numeric<V>(
&mut self,
value: V,
name: Option<&str>,
unit: Option<&str>,
)where
V: NumericValue,
pub fn write_text(&mut self, text: &str, name: Option<&str>)
Sourcepub fn write_debug(&mut self, value: &dyn Debug, name: Option<&str>)
pub fn write_debug(&mut self, value: &dyn Debug, name: Option<&str>)
Writes a debug representation of the given value to the buffer.
Note that if the Debug implementation returns an error, it will be
silently ignored.
Trait Implementations§
Source§impl Default for MessageBuf
impl Default for MessageBuf
Source§fn default() -> MessageBuf
fn default() -> MessageBuf
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MessageBuf
impl RefUnwindSafe for MessageBuf
impl Send for MessageBuf
impl Sync for MessageBuf
impl Unpin for MessageBuf
impl UnwindSafe for MessageBuf
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