[−][src]Struct ipjdb::Collection
Methods
impl Collection
[src]
pub fn get_all<T>(&self) -> Result<Vec<Item<T>>, DbError> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
pub fn find_many<T, F>(&self, f: F) -> Result<Vec<Item<T>>, DbError> where
T: Deserialize<'de>,
F: Fn(&Item<T>) -> bool,
[src]
T: Deserialize<'de>,
F: Fn(&Item<T>) -> bool,
pub fn get_one<T>(&self, id: &Id) -> Result<Item<T>, DbError> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
pub fn add_one<T>(&self, data: &T) -> Result<Id, DbError> where
T: Serialize,
[src]
T: Serialize,
pub fn delete_one(&self, id: &Id) -> Result<(), DbError>
[src]
pub fn replace_one<T>(&self, item: &Item<T>) -> Result<(), DbError> where
T: Serialize,
[src]
T: Serialize,
pub fn update_by_id<T, U>(&self, id: &Id, u: U) -> Result<(), DbError> where
T: Deserialize<'de> + Serialize,
U: Fn(&Id, &T) -> T,
[src]
T: Deserialize<'de> + Serialize,
U: Fn(&Id, &T) -> T,
pub fn update_many<T, F, U>(&self, f: F, u: U) -> Result<(), DbError> where
T: Deserialize<'de> + Serialize,
F: Fn(&Id, &T) -> bool,
U: Fn(&Id, &T) -> T,
[src]
T: Deserialize<'de> + Serialize,
F: Fn(&Id, &T) -> bool,
U: Fn(&Id, &T) -> T,
Trait Implementations
Auto Trait Implementations
impl Send for Collection
impl Sync for Collection
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,