pub trait Rpa<T, C> where
C: Connection, {
Show methods
fn into_json(self) -> Json<T>;
fn from_json(json: Json<T>) -> T;
fn save(entity: &T, connection: &C) -> Result<T, RpaError>;
fn save_self(self, connection: &C) -> Result<T, RpaError>;
fn save_batch(entities: Vec<T>, connection: &C) -> Result<usize, RpaError>;
fn find(entity_id: &String, connection: &C) -> Result<T, RpaError>;
fn find_all(connection: &C) -> Result<Vec<T>, RpaError>;
fn exists(entity_id: &String, connection: &C) -> Result<bool, RpaError>;
fn update(
entity_id: &String,
entity: &T,
connection: &C
) -> Result<usize, RpaError>;
fn update_self(self, connection: &C) -> Result<usize, RpaError>;
fn delete(entity_id: &String, connection: &C) -> Result<usize, RpaError>;
fn delete_self(self, connection: &C) -> Result<usize, RpaError>;
fn search(
search_request: SearchRequest,
connection: &C
) -> Result<SearchResponse<T>, RpaError>;
}