[][src]Struct polodb_bson::Document

pub struct Document { /* fields omitted */ }

Implementations

impl Document[src]

pub fn new(id_maker: &mut ObjectIdMaker) -> Document[src]

pub fn new_without_id() -> Document[src]

pub fn insert(&mut self, key: String, value: Value) -> Option<Value>[src]

pub fn remove(&mut self, key: &str) -> Option<Value>[src]

pub fn get(&self, key: &str) -> Option<&Value>[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn pkey_id(&self) -> Option<Value>[src]

pub fn from_bytes(bytes: &[u8]) -> BsonResult<Document>[src]

pub fn parse_key(bytes: &[u8], ptr: usize) -> BsonResult<(String, usize)>[src]

pub fn to_bytes(&self) -> BsonResult<Vec<u8>>[src]

pub fn iter(&self) -> Iter<'_, String, Value>

Notable traits for Iter<'a, K, V>

impl<'a, K, V> Iterator for Iter<'a, K, V> type Item = (&'a K, &'a V);
[src]

Trait Implementations

impl AsMut<Document> for Document[src]

impl AsRef<Document> for Document[src]

impl Clone for Document[src]

impl Debug for Document[src]

impl Display for Document[src]

impl From<Document> for Value[src]

Auto Trait Implementations

impl !RefUnwindSafe for Document

impl !Send for Document

impl !Sync for Document

impl Unpin for Document

impl !UnwindSafe for Document

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.