[][src]Struct bsonrs::doc::Document

pub struct Document { /* fields omitted */ }

Methods

impl Document
[src]

pub fn new() -> Document
[src]

pub fn clear(&mut self)
[src]

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

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

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

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

pub fn contains_key(&self, key: &str) -> bool
[src]

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

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

pub fn entry(&mut self, key: String) -> Entry<String, Value>
[src]

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

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

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

pub fn insert_full<K: Into<String>, V: Into<Value>>(
    &mut self,
    key: K,
    value: V
) -> (usize, Option<Value>)
[src]

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

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

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

pub fn pop(&mut self) -> Option<(String, Value)>
[src]

pub fn retain<F>(&mut self, keep: F) where
    F: FnMut(&String, &mut Value) -> bool
[src]

pub fn sort_keys(&mut self)
[src]

pub fn sort_by<F>(&mut self, compare: F) where
    F: FnMut(&String, &Value, &String, &Value) -> Ordering
[src]

Important traits for IntoIter<K, V>
pub fn sorted_by<F>(self, compare: F) -> IntoIter<String, Value> where
    F: FnMut(&String, &Value, &String, &Value) -> Ordering
[src]

Important traits for Drain<'a, K, V>
pub fn drain(&mut self, range: RangeFull) -> Drain<String, Value>
[src]

Important traits for Iter<'a, K, V>
pub fn iter(&self) -> Iter<String, Value>
[src]

Important traits for IterMut<'a, K, V>
pub fn iter_mut(&mut self) -> IterMut<String, Value>
[src]

Important traits for Keys<'a, K, V>
pub fn keys(&self) -> Keys<String, Value>
[src]

Important traits for Values<'a, K, V>
pub fn value(&self) -> Values<String, Value>
[src]

Important traits for ValuesMut<'a, K, V>
pub fn value_mut(&mut self) -> ValuesMut<String, Value>
[src]

pub fn get_f64(&self, key: &str) -> Result<f64>
[src]

pub fn get_i32(&self, key: &str) -> Result<i32>
[src]

pub fn get_i64(&self, key: &str) -> Result<i64>
[src]

pub fn get_str(&self, key: &str) -> Result<&str>
[src]

pub fn get_array(&self, key: &str) -> Result<&Array>
[src]

pub fn get_document(&self, key: &str) -> Result<&Document>
[src]

pub fn get_bool(&self, key: &str) -> Result<bool>
[src]

pub fn is_null(&self, key: &str) -> bool
[src]

pub fn get_binary(&self, key: &str) -> Result<&Vec<u8>>
[src]

pub fn get_object_id(&self, key: &str) -> Result<&ObjectId>
[src]

pub fn get_time_stamp(&self, key: &str) -> Result<i64>
[src]

pub fn get_utc_datetime(&self, key: &str) -> Result<&DateTime<Utc>>
[src]

pub fn encode(
    &self,
    writer: &mut impl Write + ?Sized
) -> EncodeResult<()>
[src]

pub fn decode(
    reader: &mut impl Read + ?Sized
) -> DecodeResult<Document>
[src]

pub fn to_vec(&self) -> EncodeResult<Vec<u8>>
[src]

pub fn from_slice(slice: &[u8]) -> DecodeResult<Document>
[src]

pub fn extend<I: Into<Document>>(&mut self, iter: I)
[src]

pub fn get_index(&self, index: usize) -> Option<(&String, &Value)>
[src]

pub fn get_index_mut(
    &mut self,
    index: usize
) -> Option<(&mut String, &mut Value)>
[src]

pub fn swap_remove_index(&mut self, index: usize) -> Option<(String, Value)>
[src]

Trait Implementations

impl From<Document> for Value
[src]

impl From<IndexMap<String, Value, RandomState>> for Document
[src]

impl IntoIterator for Document
[src]

type Item = (String, Value)

The type of the elements being iterated over.

type IntoIter = IntoIter<String, Value>

Which kind of iterator are we turning this into?

impl<'a> IntoIterator for &'a Document
[src]

type Item = (&'a String, &'a Value)

The type of the elements being iterated over.

type IntoIter = Iter<'a, String, Value>

Which kind of iterator are we turning this into?

impl<'a> IntoIterator for &'a mut Document
[src]

type Item = (&'a String, &'a mut Value)

The type of the elements being iterated over.

type IntoIter = IterMut<'a, String, Value>

Which kind of iterator are we turning this into?

impl Eq for Document
[src]

impl Default for Document
[src]

impl PartialEq<Document> for Document
[src]

impl Clone for Document
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Document
[src]

impl Display for Document
[src]

impl FromIterator<(String, Value)> for Document
[src]

impl Serialize for Document
[src]

impl<'de> Deserialize<'de> for Document
[src]

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
    D: Deserializer<'de>, 
[src]

Deserialize this value given this Deserializer.

Auto Trait Implementations

impl Send for Document

impl Sync for Document

Blanket Implementations

impl<T> From for T
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]