Struct mon::bson::doc::Document
[−]
[src]
pub struct Document { /* fields omitted */ }
Methods
impl Document
[src]
fn new() -> Document
[src]
fn iter<'a>(&'a self) -> DocumentIterator<'a>
[src]
fn clear(&mut self)
[src]
fn get(&self, key: &str) -> Option<&Bson>
[src]
fn get_mut(&mut self, key: &str) -> Option<&mut Bson>
[src]
fn contains_key(&self, key: &str) -> bool
[src]
fn keys<'a>(&'a self) -> Keys<'a>
[src]
fn values<'a>(&'a self) -> Values<'a>
[src]
fn len(&self) -> usize
[src]
fn is_empty(&self) -> bool
[src]
fn insert<K: Into<String>, V: Into<Bson>>(
&mut self,
key: K,
value: V
) -> Option<Bson>
[src]
&mut self,
key: K,
value: V
) -> Option<Bson>
fn insert_bson(&mut self, key: String, value: Bson) -> Option<Bson>
[src]
fn remove(&mut self, key: &str) -> Option<Bson>
[src]
fn get_f64(&self, key: &str) -> Result<f64>
[src]
fn get_str(&self, key: &str) -> Result<&str>
[src]
fn get_array(&self, key: &str) -> Result<&Array>
[src]
fn get_document(&self, key: &str) -> Result<&Document>
[src]
fn get_bool(&self, key: &str) -> Result<bool>
[src]
fn is_null(&self, key: &str) -> bool
[src]
fn get_i32(&self, key: &str) -> Result<i32>
[src]
fn get_i64(&self, key: &str) -> Result<i64>
[src]
fn get_time_stamp(&self, key: &str) -> Result<i64>
[src]
fn get_binary_generic(&self, key: &str) -> Result<&Vec<u8>>
[src]
Get a generic binary value for this key if it exists and has the correct type.
fn get_object_id(&self, key: &str) -> Result<&ObjectId>
[src]
Get an object id value for this key if it exists and has the correct type.
fn get_utc_datetime(&self, key: &str) -> Result<&DateTime<Utc>>
[src]
Get a UTC datetime value for this key if it exists and has the correct type.
Trait Implementations
impl Clone for Document
[src]
fn clone(&self) -> Document
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Document
[src]
fn eq(&self, __arg_0: &Document) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Document) -> bool
[src]
This method tests for !=
.
impl Display for Document
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Debug for Document
[src]
impl IntoIterator for Document
[src]
type Item = (String, Bson)
The type of the elements being iterated over.
type IntoIter = DocumentIntoIterator
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
Creates an iterator from a value. Read more
impl<'a> IntoIterator for &'a Document
[src]
type Item = (&'a String, &'a Bson)
The type of the elements being iterated over.
type IntoIter = DocumentIterator<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
Creates an iterator from a value. Read more
impl FromIterator<(String, Bson)> for Document
[src]
fn from_iter<T: IntoIterator<Item = (String, Bson)>>(iter: T) -> Self
[src]
Creates a value from an iterator. Read more
impl From<LinkedHashMap<String, Bson>> for Document
[src]
impl Serialize for Document
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for Document
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Deserialize this value given this Deserializer
.
impl From<CreateCollectionOptions> for Document
[src]
fn from(options: CreateCollectionOptions) -> Self
[src]
Performs the conversion.
impl From<CreateUserOptions> for Document
[src]
fn from(options: CreateUserOptions) -> Self
[src]
Performs the conversion.
impl From<UserInfoOptions> for Document
[src]
fn from(options: UserInfoOptions) -> Self
[src]
Performs the conversion.
impl From<UpdateModel> for Document
[src]
impl From<AggregateOptions> for Document
[src]
fn from(options: AggregateOptions) -> Self
[src]
Performs the conversion.
impl From<CountOptions> for Document
[src]
fn from(options: CountOptions) -> Self
[src]
Performs the conversion.
impl From<FindOptions> for Document
[src]
fn from(options: FindOptions) -> Self
[src]
Performs the conversion.
impl From<FindOneAndDeleteOptions> for Document
[src]
fn from(options: FindOneAndDeleteOptions) -> Self
[src]
Performs the conversion.
impl From<FindOneAndUpdateOptions> for Document
[src]
fn from(options: FindOneAndUpdateOptions) -> Self
[src]
Performs the conversion.
impl From<InsertManyOptions> for Document
[src]
fn from(options: InsertManyOptions) -> Self
[src]
Performs the conversion.