toasty 0.4.0

An async ORM for Rust supporting SQL and NoSQL databases
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::Insert;
use crate::schema::Model;

/// Convert a value into an [`Insert`] statement.
///
/// Generated create-builders implement this trait so that they can be passed
/// anywhere an insert is expected (e.g., association [`insert`](Association::insert)
/// calls or batch operations).
///
/// The associated type [`Model`](IntoInsert::Model) identifies which model the
/// insert targets.
pub trait IntoInsert {
    /// The model this insert targets.
    type Model: Model;

    /// Consume `self` and produce the [`Insert`] statement.
    fn into_insert(self) -> Insert<Self::Model>;
}