[][src]Struct reddb::RedDb

pub struct RedDb<SE, ST> { /* fields omitted */ }

Implementations

impl<'a, SE, ST: 'static> RedDb<SE, ST> where
    SE: Serializer<'de> + Debug,
    ST: Storage + Debug + Send + Sync
[src]

pub fn new<T>(db_name: &'static str) -> Result<Self, RedDbError> where
    T: Serialize + Deserialize<'de> + Debug + PartialEq + Send + Sync
[src]

pub async fn insert_one<T>(&self, value: T) -> Result<Document<T>, RedDbError> where
    T: Serialize + Deserialize<'de> + Debug + Clone + PartialEq + Send + Sync
[src]

pub async fn insert<T>(
    &self,
    values: Vec<T>
) -> Result<Vec<Document<T>>, RedDbError> where
    T: Serialize + Deserialize<'de> + Debug + PartialEq + Send + Sync
[src]

pub async fn find_one<T>(&self, id: &Uuid) -> Result<Document<T>, RedDbError> where
    T: Serialize + Deserialize<'de> + Debug + PartialEq
[src]

pub async fn update_one<T>(
    &'a self,
    id: &Uuid,
    new_value: T
) -> Result<bool, RedDbError> where
    T: Serialize + Deserialize<'de> + Debug + PartialEq + Send + Sync
[src]

pub async fn remove_document<T>(
    &self,
    id: Uuid
) -> Result<Document<T>, RedDbError> where
    T: Serialize + Deserialize<'de> + Debug + PartialEq + Send + Sync
[src]

pub async fn delete_one<T>(&self, id: &Uuid) -> Result<Document<T>, RedDbError> where
    T: Serialize + Deserialize<'de> + Debug + PartialEq + Send + Sync
[src]

pub async fn find_all<T>(&self) -> Result<Vec<Document<T>>, RedDbError> where
    T: Serialize + Deserialize<'de> + Debug + PartialEq
[src]

pub async fn find<T>(&self, search: &T) -> Result<Vec<Document<T>>, RedDbError> where
    T: Serialize + Deserialize<'de> + Debug + PartialEq
[src]

pub async fn update<T>(
    &self,
    search: &T,
    new_value: &T
) -> Result<usize, RedDbError> where
    T: Serialize + Deserialize<'de> + Clone + Debug + PartialEq + Send + Sync
[src]

pub async fn delete<T>(&self, search: &T) -> Result<usize, RedDbError> where
    T: Serialize + Deserialize<'de> + Debug + PartialEq + Send + Sync
[src]

Trait Implementations

impl<SE: Debug, ST: Debug> Debug for RedDb<SE, ST>[src]

Auto Trait Implementations

impl<SE, ST> !RefUnwindSafe for RedDb<SE, ST>[src]

impl<SE, ST> Send for RedDb<SE, ST> where
    SE: Send,
    ST: Send
[src]

impl<SE, ST> Sync for RedDb<SE, ST> where
    SE: Sync,
    ST: Sync
[src]

impl<SE, ST> Unpin for RedDb<SE, ST> where
    SE: Unpin,
    ST: Unpin
[src]

impl<SE, ST> !UnwindSafe for RedDb<SE, ST>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,