Trait sn0int::models::Upsertable

source ·
pub trait Upsertable<M> {
    type Update: Upsert;

    // Required method
    fn upsert(self, existing: &M) -> Self::Update;

    // Provided method
    fn upsert_opt<T: PartialEq>(
        insert: Option<T>,
        existing: &Option<T>
    ) -> Option<T> { ... }
}

Required Associated Types§

Required Methods§

source

fn upsert(self, existing: &M) -> Self::Update

Provided Methods§

source

fn upsert_opt<T: PartialEq>( insert: Option<T>, existing: &Option<T> ) -> Option<T>

Implementors§