pub trait Repos {
Show 13 methods
// Required methods
fn get_value<'a>(&'a self, field_name: &'static str) -> &'a dyn ToSql;
fn delete(id: i32) -> bool;
fn get(id: i32) -> Option<Self>
where Self: Sized;
fn new(&self) -> bool;
fn partial_update(&self, fields: Vec<&'static str>) -> bool;
fn update(&self) -> bool;
fn exclude_update(&self, exclude_fields: Vec<&'static str>) -> bool;
fn list() -> Vec<Self>
where Self: Sized;
fn list2(query: &str, params: &[&dyn ToSql]) -> Vec<Self>
where Self: Sized;
fn page_list(page_size: i32, page_num: i32, order_field: &str) -> Vec<Self>
where Self: Sized;
fn page_list2(
query: &str,
params: &[&dyn ToSql],
page_size: i32,
page_num: i32,
order_field: &str,
) -> Vec<Self>
where Self: Sized;
fn count() -> i32;
fn count2(query: &str, params: &[&dyn ToSql]) -> i32;
}
Required Methods§
fn get_value<'a>(&'a self, field_name: &'static str) -> &'a dyn ToSql
fn delete(id: i32) -> bool
fn get(id: i32) -> Option<Self>where
Self: Sized,
fn new(&self) -> bool
fn partial_update(&self, fields: Vec<&'static str>) -> bool
fn update(&self) -> bool
fn exclude_update(&self, exclude_fields: Vec<&'static str>) -> bool
fn list() -> Vec<Self>where
Self: Sized,
fn list2(query: &str, params: &[&dyn ToSql]) -> Vec<Self>where
Self: Sized,
fn page_list(page_size: i32, page_num: i32, order_field: &str) -> Vec<Self>where
Self: Sized,
fn page_list2(
query: &str,
params: &[&dyn ToSql],
page_size: i32,
page_num: i32,
order_field: &str,
) -> Vec<Self>where
Self: Sized,
fn count() -> i32
fn count2(query: &str, params: &[&dyn ToSql]) -> i32
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.