pub struct DBson<T>(/* private fields */);
Expand description
A wrapper type for BSON data.
Any type that implements serde::Deserialize && serde::Serialize can be wrapped by this type. and used inside of a database as a blob.
This type is useful for storing data that is not easily represented in a relational database. For example, a HashMap or a Vec of structs. Currently only supports rusqlite and sqlx
It’s basically a newtype wrapper over T So it implements many of the same traits as T
Implementations§
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for DBson<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for DBson<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Ord> Ord for DBson<T>
impl<T: Ord> Ord for DBson<T>
Source§impl<T: PartialOrd> PartialOrd for DBson<T>
impl<T: PartialOrd> PartialOrd for DBson<T>
impl<T: Copy> Copy for DBson<T>
impl<T: Eq> Eq for DBson<T>
impl<T> StructuralPartialEq for DBson<T>
Auto Trait Implementations§
impl<T> Freeze for DBson<T>where
T: Freeze,
impl<T> RefUnwindSafe for DBson<T>where
T: RefUnwindSafe,
impl<T> Send for DBson<T>where
T: Send,
impl<T> Sync for DBson<T>where
T: Sync,
impl<T> Unpin for DBson<T>where
T: Unpin,
impl<T> UnwindSafe for DBson<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more