[−][src]Struct mongodb_cwal::ordered::OrderedDocument
A BSON document represented as an associative HashMap with insertion ordering.
Implementations
impl OrderedDocument
[src]
pub fn new() -> OrderedDocument
[src]
Creates a new empty OrderedDocument.
pub fn iter(&self) -> OrderedDocumentIterator
[src]
Gets an iterator over the entries of the map.
pub fn clear(&mut self)
[src]
Clears the document, removing all values.
pub fn get(&self, key: &str) -> Option<&Bson>
[src]
Returns a reference to the Bson corresponding to the key.
pub fn get_mut(&mut self, key: &str) -> Option<&mut Bson>
[src]
Gets a mutable reference to the Bson corresponding to the key
pub fn get_f64(&self, key: &str) -> Result<f64, ValueAccessError>
[src]
Get a floating point value for this key if it exists and has the correct type.
pub fn get_f64_mut(&mut self, key: &str) -> Result<&mut f64, ValueAccessError>
[src]
Get a mutable reference to 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]
Get a string slice this key if it exists and has the correct type.
pub fn get_str_mut(&mut self, key: &str) -> Result<&mut str, ValueAccessError>
[src]
Get a mutable string slice this key if it exists and has the correct type.
pub fn get_array(&self, key: &str) -> Result<&Vec<Bson>, ValueAccessError>
[src]
Get a reference to an array for this key if it exists and has the correct type.
pub fn get_array_mut(
&mut self,
key: &str
) -> Result<&mut Vec<Bson>, ValueAccessError>
[src]
&mut self,
key: &str
) -> Result<&mut Vec<Bson>, ValueAccessError>
Get a mutable 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]
&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_document_mut(
&mut self,
key: &str
) -> Result<&mut OrderedDocument, ValueAccessError>
[src]
&mut self,
key: &str
) -> Result<&mut OrderedDocument, ValueAccessError>
Get a mutable 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]
Get a bool value for this key if it exists and has the correct type.
pub fn get_bool_mut(&mut self, key: &str) -> Result<&mut bool, ValueAccessError>
[src]
Get a mutable reference to a bool value for this key if it exists and has the correct type.
pub fn is_null(&self, key: &str) -> bool
[src]
Returns wether this key has a null value
pub fn get_i32(&self, key: &str) -> Result<i32, ValueAccessError>
[src]
Get an i32 value for this key if it exists and has the correct type.
pub fn get_i32_mut(&mut self, key: &str) -> Result<&mut i32, ValueAccessError>
[src]
Get a mutable reference to 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]
Get an i64 value for this key if it exists and has the correct type.
pub fn get_i64_mut(&mut self, key: &str) -> Result<&mut i64, ValueAccessError>
[src]
Get a mutable reference to 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]
Get a time stamp value for this key if it exists and has the correct type.
pub fn get_time_stamp_mut(
&mut self,
key: &str
) -> Result<&mut i64, ValueAccessError>
[src]
&mut self,
key: &str
) -> Result<&mut i64, ValueAccessError>
Get a mutable reference to 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]
&self,
key: &str
) -> Result<&Vec<u8>, ValueAccessError>
Get a reference to a generic binary value for this key if it exists and has the correct type.
pub fn get_binary_generic_mut(
&mut self,
key: &str
) -> Result<&mut Vec<u8>, ValueAccessError>
[src]
&mut self,
key: &str
) -> Result<&mut Vec<u8>, ValueAccessError>
Get a mutable reference 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]
Get a reference to an object id value for this key if it exists and has the correct type.
pub fn get_object_id_mut(
&mut self,
key: &str
) -> Result<&mut ObjectId, ValueAccessError>
[src]
&mut self,
key: &str
) -> Result<&mut ObjectId, ValueAccessError>
Get a mutable reference to 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]
&self,
key: &str
) -> Result<&DateTime<Utc>, ValueAccessError>
Get a reference to a UTC datetime value for this key if it exists and has the correct type.
pub fn get_utc_datetime_mut(
&mut self,
key: &str
) -> Result<&mut DateTime<Utc>, ValueAccessError>
[src]
&mut self,
key: &str
) -> Result<&mut DateTime<Utc>, ValueAccessError>
Get a mutable reference to a UTC datetime value for this key if it exists and has the correct type.
pub fn contains_key(&self, key: &str) -> bool
[src]
Returns true if the map contains a value for the specified key.
pub fn keys(&'a self) -> Keys<'a>
[src]
Gets a collection of all keys in the document.
pub fn values(&'a self) -> Values<'a>
[src]
Gets a collection of all values in the document.
pub fn len(&self) -> usize
[src]
Returns the number of elements in the document.
pub fn is_empty(&self) -> bool
[src]
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]
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]
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]
Takes the value of the entry out of the document, and returns it.
pub fn entry(&mut self, k: String) -> Entry
[src]
Trait Implementations
impl Clone for OrderedDocument
[src]
fn clone(&self) -> OrderedDocument
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for OrderedDocument
[src]
impl Default for OrderedDocument
[src]
fn default() -> OrderedDocument
[src]
impl<'de> Deserialize<'de> for OrderedDocument
[src]
fn deserialize<D>(
deserializer: D
) -> Result<OrderedDocument, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<OrderedDocument, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value given this Deserializer
.
impl Display for OrderedDocument
[src]
impl Extend<(String, Bson)> for OrderedDocument
[src]
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = (String, Bson)>,
[src]
T: IntoIterator<Item = (String, Bson)>,
fn extend_one(&mut self, item: A)
[src]
fn extend_reserve(&mut self, additional: usize)
[src]
impl From<LinkedHashMap<String, Bson, RandomState>> for OrderedDocument
[src]
fn from(tree: LinkedHashMap<String, Bson, RandomState>) -> OrderedDocument
[src]
impl From<OrderedDocument> for Bson
[src]
fn from(a: OrderedDocument) -> Bson
[src]
impl FromIterator<(String, Bson)> for OrderedDocument
[src]
fn from_iter<T>(iter: T) -> OrderedDocument where
T: IntoIterator<Item = (String, Bson)>,
[src]
T: IntoIterator<Item = (String, Bson)>,
impl IntoIterator for OrderedDocument
[src]
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]
impl<'a> IntoIterator for &'a OrderedDocument
[src]
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]
impl PartialEq<OrderedDocument> for OrderedDocument
[src]
fn eq(&self, other: &OrderedDocument) -> bool
[src]
fn ne(&self, other: &OrderedDocument) -> bool
[src]
impl Serialize for OrderedDocument
[src]
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl StructuralPartialEq for OrderedDocument
[src]
Auto Trait Implementations
impl RefUnwindSafe for OrderedDocument
impl Send for OrderedDocument
impl Sync for OrderedDocument
impl Unpin for OrderedDocument
impl UnwindSafe for OrderedDocument
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<I> IntoIterator for I where
I: Iterator,
[src]
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]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,