pub struct KVLines { /* private fields */ }
Expand description
Ordered list of key/value pairs, with no uniqueness constraint for the keys.
Implementations§
source§impl KVLines
impl KVLines
sourcepub fn append<T: ToString, U: ToString>(&mut self, key: T, value: U)
pub fn append<T: ToString, U: ToString>(&mut self, key: T, value: U)
Append a key/value entry to the end of the list.
sourcepub fn calc_buf_size(&self) -> usize
pub fn calc_buf_size(&self) -> usize
Calculate the size of the buffer in serialized form. Each entry will be a newline terminated utf-8 line. Last line will be a single newline character.
sourcepub fn serialize(&self) -> Result<Vec<u8>, Error>
pub fn serialize(&self) -> Result<Vec<u8>, Error>
Serialize object into a Vec<u8>
buffer suitable for transmission.
sourcepub fn encoder_write(&self, buf: &mut BytesMut) -> Result<(), Error>
pub fn encoder_write(&self, buf: &mut BytesMut) -> Result<(), Error>
Write the Params to a buffer.
sourcepub fn into_inner(self) -> Vec<KeyValue>
pub fn into_inner(self) -> Vec<KeyValue>
Consume the Params buffer and return the internal key/value list as a
Vec<KeyValue>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for KVLines
impl Send for KVLines
impl Sync for KVLines
impl Unpin for KVLines
impl UnwindSafe for KVLines
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