Struct blather::KVLines[][src]

pub struct KVLines { /* fields omitted */ }

Ordered list of key/value pairs.

Implementations

impl KVLines[src]

pub fn new() -> Self[src]

Create a new empty parameters object.

pub fn clear(&mut self)[src]

Reset all the lines.

pub fn get_inner(&self) -> &Vec<KeyValue>[src]

pub fn append<T: ToString, U: ToString>(&mut self, key: T, value: U)[src]

pub fn calc_buf_size(&self) -> usize[src]

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.

pub fn serialize(&self) -> Result<Vec<u8>, Error>[src]

pub fn encoder_write(&self, buf: &mut BytesMut) -> Result<(), Error>[src]

Write the Params to a buffer.

pub fn into_inner(self) -> Vec<KeyValue>[src]

Consume the Params buffer and return the internal key/value list as a Vec<KeyValue>

Trait Implementations

impl Clone for KVLines[src]

impl Debug for KVLines[src]

impl Default for KVLines[src]

impl Display for KVLines[src]

impl Encoder<&'_ KVLines> for Codec[src]

type Error = Error

The type of encoding errors. Read more

impl From<Vec<(String, String), Global>> for KVLines[src]

impl From<Vec<KeyValue, Global>> for KVLines[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.