Trait lemmy_db_schema::traits::Crud [−][src]
pub trait Crud {
type Form;
type IdType;
fn create(conn: &PgConnection, form: &Self::Form) -> Result<Self, Error>
where
Self: Sized;
fn read(conn: &PgConnection, id: Self::IdType) -> Result<Self, Error>
where
Self: Sized;
fn update(
conn: &PgConnection,
id: Self::IdType,
form: &Self::Form
) -> Result<Self, Error>
where
Self: Sized;
fn delete(_conn: &PgConnection, _id: Self::IdType) -> Result<usize, Error>
where
Self: Sized,
{ ... }
}