Trait sn0int::models::Updateable

source ·
pub trait Updateable<M> {
    // Required methods
    fn changeset(&mut self, existing: &M);
    fn fmt(&self, updates: &mut Vec<String>, colors: bool);

    // Provided methods
    fn to_plain_str(&self) -> String { ... }
    fn to_term_str(&self) -> String { ... }
    fn clear_if_equal<T: PartialEq>(
        update: &mut Option<T>,
        existing: &Option<T>
    ) { ... }
    fn clear_if_lower_or_equal<T: PartialOrd>(
        update: &mut Option<T>,
        existing: &Option<T>
    ) { ... }
    fn clear_if_greater_or_equal<T: PartialOrd>(
        update: &mut Option<T>,
        existing: &Option<T>
    ) { ... }
    fn push_value<D: Debug>(
        updates: &mut Vec<String>,
        name: &str,
        value: &Option<D>,
        colors: bool
    ) { ... }
    fn push_raw<T: AsRef<str>>(
        updates: &mut Vec<String>,
        name: &str,
        value: Option<T>,
        colors: bool
    ) { ... }
}

Required Methods§

source

fn changeset(&mut self, existing: &M)

source

fn fmt(&self, updates: &mut Vec<String>, colors: bool)

Provided Methods§

source

fn to_plain_str(&self) -> String

source

fn to_term_str(&self) -> String

source

fn clear_if_equal<T: PartialEq>(update: &mut Option<T>, existing: &Option<T>)

source

fn clear_if_lower_or_equal<T: PartialOrd>( update: &mut Option<T>, existing: &Option<T> )

source

fn clear_if_greater_or_equal<T: PartialOrd>( update: &mut Option<T>, existing: &Option<T> )

source

fn push_value<D: Debug>( updates: &mut Vec<String>, name: &str, value: &Option<D>, colors: bool )

source

fn push_raw<T: AsRef<str>>( updates: &mut Vec<String>, name: &str, value: Option<T>, colors: bool )

Implementors§