[−][src]Struct mongodb::ordered::OrderedDocument
A BSON document represented as an associative HashMap with insertion ordering.
Methods
impl OrderedDocument
[src]
impl OrderedDocument
pub fn new() -> OrderedDocument
[src]
pub fn new() -> OrderedDocument
Creates a new empty OrderedDocument.
ⓘImportant traits for OrderedDocumentIterator<'a>pub fn iter(&'a self) -> OrderedDocumentIterator<'a>
[src]
pub fn iter(&'a self) -> OrderedDocumentIterator<'a>
Gets an iterator over the entries of the map.
pub fn clear(&mut self)
[src]
pub fn clear(&mut self)
Clears the document, removing all values.
pub fn get(&self, key: &str) -> Option<&Bson>
[src]
pub fn get(&self, key: &str) -> Option<&Bson>
Returns a reference to the Bson corresponding to the key.
pub fn get_mut(&mut self, key: &str) -> Option<&mut Bson>
[src]
pub fn get_mut(&mut self, key: &str) -> Option<&mut Bson>
Gets a mutable reference to the Bson corresponding to the key
pub fn get_f64(&self, key: &str) -> Result<f64, ValueAccessError>
[src]
pub fn get_f64(&self, key: &str) -> Result<f64, ValueAccessError>
Get a floating point value for this key if it exists and has the correct type.
pub fn get_str(&self, key: &str) -> Result<&str, ValueAccessError>
[src]
pub fn get_str(&self, key: &str) -> Result<&str, ValueAccessError>
Get a string slice this key if it exists and has the correct type.
pub fn get_array(&self, key: &str) -> Result<&Vec<Bson>, ValueAccessError>
[src]
pub fn get_array(&self, key: &str) -> Result<&Vec<Bson>, ValueAccessError>
Get a reference to an array for this key if it exists and has the correct type.
pub fn get_document(
&self,
key: &str
) -> Result<&OrderedDocument, ValueAccessError>
[src]
pub fn get_document(
&self,
key: &str
) -> Result<&OrderedDocument, ValueAccessError>
Get a reference to a document for this key if it exists and has the correct type.
pub fn get_bool(&self, key: &str) -> Result<bool, ValueAccessError>
[src]
pub fn get_bool(&self, key: &str) -> Result<bool, ValueAccessError>
Get a bool value for this key if it exists and has the correct type.
pub fn is_null(&self, key: &str) -> bool
[src]
pub fn is_null(&self, key: &str) -> bool
Returns wether this key has a null value
pub fn get_i32(&self, key: &str) -> Result<i32, ValueAccessError>
[src]
pub fn get_i32(&self, key: &str) -> Result<i32, ValueAccessError>
Get an i32 value for this key if it exists and has the correct type.
pub fn get_i64(&self, key: &str) -> Result<i64, ValueAccessError>
[src]
pub fn get_i64(&self, key: &str) -> Result<i64, ValueAccessError>
Get an i64 value for this key if it exists and has the correct type.
pub fn get_time_stamp(&self, key: &str) -> Result<i64, ValueAccessError>
[src]
pub fn get_time_stamp(&self, key: &str) -> Result<i64, ValueAccessError>
Get a time stamp value for this key if it exists and has the correct type.
pub fn get_binary_generic(
&self,
key: &str
) -> Result<&Vec<u8>, ValueAccessError>
[src]
pub fn get_binary_generic(
&self,
key: &str
) -> Result<&Vec<u8>, ValueAccessError>
Get a generic binary value for this key if it exists and has the correct type.
pub fn get_object_id(&self, key: &str) -> Result<&ObjectId, ValueAccessError>
[src]
pub fn get_object_id(&self, key: &str) -> Result<&ObjectId, ValueAccessError>
Get an object id value for this key if it exists and has the correct type.
pub fn get_utc_datetime(
&self,
key: &str
) -> Result<&DateTime<Utc>, ValueAccessError>
[src]
pub fn get_utc_datetime(
&self,
key: &str
) -> Result<&DateTime<Utc>, ValueAccessError>
Get a UTC datetime value for this key if it exists and has the correct type.
pub fn contains_key(&self, key: &str) -> bool
[src]
pub fn contains_key(&self, key: &str) -> bool
Returns true if the map contains a value for the specified key.
ⓘImportant traits for Keys<'a>pub fn keys(&'a self) -> Keys<'a>
[src]
pub fn keys(&'a self) -> Keys<'a>
Gets a collection of all keys in the document.
ⓘImportant traits for Values<'a>pub fn values(&'a self) -> Values<'a>
[src]
pub fn values(&'a self) -> Values<'a>
Gets a collection of all values in the document.
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Returns the number of elements in the document.
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
Returns true if the document contains no elements
pub fn insert<KT, BT>(&mut self, key: KT, val: BT) -> Option<Bson> where
BT: Into<Bson>,
KT: Into<String>,
[src]
pub fn insert<KT, BT>(&mut self, key: KT, val: BT) -> Option<Bson> where
BT: Into<Bson>,
KT: Into<String>,
Sets the value of the entry with the OccupiedEntry's key, and returns the entry's old value. Accepts any type that can be converted into Bson.
pub fn insert_bson(&mut self, key: String, val: Bson) -> Option<Bson>
[src]
pub fn insert_bson(&mut self, key: String, val: Bson) -> Option<Bson>
Sets the value of the entry with the OccupiedEntry's key, and returns the entry's old value.
pub fn remove(&mut self, key: &str) -> Option<Bson>
[src]
pub fn remove(&mut self, key: &str) -> Option<Bson>
Takes the value of the entry out of the document, and returns it.
pub fn entry(&mut self, k: String) -> Entry
[src]
pub fn entry(&mut self, k: String) -> Entry
Trait Implementations
impl Clone for OrderedDocument
[src]
impl Clone for OrderedDocument
fn clone(&self) -> OrderedDocument
[src]
fn clone(&self) -> OrderedDocument
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Serialize for OrderedDocument
[src]
impl Serialize for OrderedDocument
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl<'de> Deserialize<'de> for OrderedDocument
[src]
impl<'de> Deserialize<'de> for OrderedDocument
fn deserialize<D>(
deserializer: D
) -> Result<OrderedDocument, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(
deserializer: D
) -> Result<OrderedDocument, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value given this Deserializer
.
impl FromIterator<(String, Bson)> for OrderedDocument
[src]
impl FromIterator<(String, Bson)> for OrderedDocument
fn from_iter<T>(iter: T) -> OrderedDocument where
T: IntoIterator<Item = (String, Bson)>,
[src]
fn from_iter<T>(iter: T) -> OrderedDocument where
T: IntoIterator<Item = (String, Bson)>,
impl Default for OrderedDocument
[src]
impl Default for OrderedDocument
fn default() -> OrderedDocument
[src]
fn default() -> OrderedDocument
impl From<OrderedDocument> for Bson
[src]
impl From<OrderedDocument> for Bson
fn from(a: OrderedDocument) -> Bson
[src]
fn from(a: OrderedDocument) -> Bson
impl From<LinkedHashMap<String, Bson, RandomState>> for OrderedDocument
[src]
impl From<LinkedHashMap<String, Bson, RandomState>> for OrderedDocument
fn from(tree: LinkedHashMap<String, Bson, RandomState>) -> OrderedDocument
[src]
fn from(tree: LinkedHashMap<String, Bson, RandomState>) -> OrderedDocument
impl PartialEq<OrderedDocument> for OrderedDocument
[src]
impl PartialEq<OrderedDocument> for OrderedDocument
fn eq(&self, other: &OrderedDocument) -> bool
[src]
fn eq(&self, other: &OrderedDocument) -> bool
fn ne(&self, other: &OrderedDocument) -> bool
[src]
fn ne(&self, other: &OrderedDocument) -> bool
impl Display for OrderedDocument
[src]
impl Display for OrderedDocument
impl<'a> IntoIterator for &'a OrderedDocument
[src]
impl<'a> IntoIterator for &'a OrderedDocument
type Item = (&'a String, &'a Bson)
The type of the elements being iterated over.
type IntoIter = OrderedDocumentIterator<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> <&'a OrderedDocument as IntoIterator>::IntoIter
[src]
fn into_iter(self) -> <&'a OrderedDocument as IntoIterator>::IntoIter
impl IntoIterator for OrderedDocument
[src]
impl IntoIterator for OrderedDocument
type Item = (String, Bson)
The type of the elements being iterated over.
type IntoIter = OrderedDocumentIntoIterator
Which kind of iterator are we turning this into?
fn into_iter(self) -> <OrderedDocument as IntoIterator>::IntoIter
[src]
fn into_iter(self) -> <OrderedDocument as IntoIterator>::IntoIter
impl Debug for OrderedDocument
[src]
impl Debug for OrderedDocument
Auto Trait Implementations
impl Send for OrderedDocument
impl Send for OrderedDocument
impl Sync for OrderedDocument
impl Sync for OrderedDocument
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T> From for T
impl<I> IntoIterator for I where
I: Iterator,
[src]
impl<I> IntoIterator for I where
I: Iterator,
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?
fn into_iter(self) -> I
[src]
fn into_iter(self) -> I
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
impl<T, U> TryInto for T where
U: TryFrom<T>,
impl<T, U> TryInto for T where
U: TryFrom<T>,
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self