Struct blather::KVLines [−][src]
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
fn encode(&mut self, kvlines: &KVLines, buf: &mut BytesMut) -> Result<(), Error>
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,