[][src]Trait rpa::Rpa

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

Rpa (Rust Persistence API) Library Copyright (C) 2019 Jonathan Franco

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Required methods

pub fn into_json(self) -> Json<T>[src]

pub fn from_json(json: Json<T>) -> T[src]

pub fn save(entity: &T, connection: &C) -> Result<T, RpaError>[src]

pub fn save_self(self, connection: &C) -> Result<T, RpaError>[src]

pub fn save_batch(
    entities: Vec<T, Global>,
    connection: &C
) -> Result<usize, RpaError>
[src]

pub fn find(entity_id: &String, connection: &C) -> Result<T, RpaError>[src]

pub fn find_all(connection: &C) -> Result<Vec<T, Global>, RpaError>[src]

pub fn exists(entity_id: &String, connection: &C) -> Result<bool, RpaError>[src]

pub fn update(
    entity_id: &String,
    entity: &T,
    connection: &C
) -> Result<usize, RpaError>
[src]

pub fn update_self(self, connection: &C) -> Result<usize, RpaError>[src]

pub fn delete(entity_id: &String, connection: &C) -> Result<usize, RpaError>[src]

pub fn delete_self(self, connection: &C) -> Result<usize, RpaError>[src]

pub fn search(
    search_request: SearchRequest,
    connection: &C
) -> Result<SearchResponse<T>, RpaError>
[src]

Loading content...

Implementors

Loading content...