Trait mem_query::relation::Insert[][src]

pub trait Insert<H: Header>: RelationImpl {
    type Remainder: Sized;
    type Op: RevertableOp<Self>;
    fn insert_op<FromRec: Record<Cols = H>>(
        rec: FromRec
    ) -> (Self::Op, Self::Remainder); fn insert<FromRec: Record<Cols = H>>(
        &mut self,
        rec: FromRec
    ) -> Result<(), Either<<Self::Op as RevertableOp<Self>>::Err, Infallible>> { ... }
fn insert_multi(
        &mut self,
        recs: impl IntoIterator<Item = impl Record<Cols = H>>
    ) -> Result<(), Either<<Self::Op as RevertableOp<Self>>::Err, Infallible>> { ... } }

Associated Types

type Remainder: Sized[src]

The fields from H that aren’t consumed

type Op: RevertableOp<Self>[src]

Required methods

fn insert_op<FromRec: Record<Cols = H>>(
    rec: FromRec
) -> (Self::Op, Self::Remainder)
[src]

Provided methods

fn insert<FromRec: Record<Cols = H>>(
    &mut self,
    rec: FromRec
) -> Result<(), Either<<Self::Op as RevertableOp<Self>>::Err, Infallible>>
[src]

fn insert_multi(
    &mut self,
    recs: impl IntoIterator<Item = impl Record<Cols = H>>
) -> Result<(), Either<<Self::Op as RevertableOp<Self>>::Err, Infallible>>
[src]

Implementations on Foreign Types

impl<R: Record, H: Header> Insert<H> for Vec<R> where
    R: FromRecord<H>, 
[src]

type Remainder = R::Remainder

type Op = RevertablePush<R>

fn insert_op<FromRec: Record<Cols = H>>(
    rec: FromRec
) -> (Self::Op, Self::Remainder)
[src]

impl<R: Record, H: Header> Insert<H> for Option<R> where
    R: FromRecord<H>, 
[src]

type Remainder = R::Remainder

type Op = RevertableSetOption<R>

fn insert_op<FromRec: Record<Cols = H>>(
    rec: FromRec
) -> (Self::Op, Self::Remainder)
[src]

Implementors

impl<K2, K1, Store, H: Header> Insert<H> for RedundantIndex<K2, K1, Store> where
    K1: Col + Ord,
    K2: Col + Ord,
    H: HasCol<K1> + HasCol<K2>,
    Store: Insert<H> + Default,
    Self: RelationImpl
[src]

type Remainder = Store::Remainder

type Op = InsertRequest<K2, K1, Store::Op>

fn insert_op<FromRec: Record<Cols = H>>(
    rec: FromRec
) -> (Self::Op, Self::Remainder)
[src]

impl<K, R, H: Header> Insert<H> for BTreeIndex<K, R> where
    K: Col + Ord + Eq,
    H: HasCol<K>,
    R: Insert<H> + Default,
    Self: RelationImpl
[src]

type Remainder = R::Remainder

type Op = InsertRequest<K, R, H>

fn insert_op<FromRec: Record<Cols = H>>(
    rec: FromRec
) -> (Self::Op, Self::Remainder)
[src]

impl<Ptr: DerefMut<Target = R>, R, H> Insert<H> for RelProxy<Ptr> where
    R: Insert<H>,
    H: Header
[src]

type Remainder = R::Remainder

type Op = ProxyOp<R::Op>

fn insert_op<FromRec: Record<Cols = H>>(
    rec: FromRec
) -> (Self::Op, Self::Remainder)
[src]

impl<R, H: Header> Insert<H> for OpaqueRel<R> where
    R: Insert<H>, 
[src]

type Remainder = R::Remainder

The fields from H that aren’t consumed

type Op = OpaqueOp<R::Op>

fn insert_op<FromRec: Record<Cols = H>>(
    rec: FromRec
) -> (Self::Op, Self::Remainder)
[src]