[][src]Struct argmin::prelude::ArgminKV

pub struct ArgminKV {
    pub kv: Vec<(&'static str, String)>,
}

A simple key-value storage

Fields

kv: Vec<(&'static str, String)>

The actual key value storage

Methods

impl ArgminKV[src]

pub fn new() -> ArgminKV[src]

Constructor

pub fn push<T>(&mut self, key: &'static str, val: T) -> &mut ArgminKV where
    T: Display
[src]

Push a key-value pair to the kv vector.

This formats the val using format!. Therefore T has to implement Display.

pub fn merge(self, other: &mut ArgminKV) -> ArgminKV[src]

Merge another kv into self.kv

Trait Implementations

impl Eq for ArgminKV[src]

impl Default for ArgminKV[src]

impl FromIterator<(&'static str, String)> for ArgminKV[src]

impl Clone for ArgminKV[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<ArgminKV> for ArgminKV[src]

impl Display for ArgminKV[src]

impl Serialize for ArgminKV[src]

impl Deserialize<'static> for ArgminKV[src]

impl PartialOrd<ArgminKV> for ArgminKV[src]

impl Extend<(&'static str, String)> for ArgminKV[src]

impl Hash for ArgminKV[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for ArgminKV[src]

impl Ord for ArgminKV[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl<'a> From<&'a ArgminKV> for ArgminSlogKV[src]

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

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

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

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

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized