Struct bson::ordered::OrderedDocument[][src]

pub struct OrderedDocument { /* fields omitted */ }

A BSON document represented as an associative HashMap with insertion ordering.

Methods

impl OrderedDocument
[src]

Creates a new empty OrderedDocument.

Important traits for OrderedDocumentIterator<'a>

Gets an iterator over the entries of the map.

Clears the document, removing all values.

Returns a reference to the Bson corresponding to the key.

Gets a mutable reference to the Bson corresponding to the key

Get a floating point value for this key if it exists and has the correct type.

Get a string slice this key if it exists and has the correct type.

Get a reference to an array for this key if it exists and has the correct type.

Get a reference to a document for this key if it exists and has the correct type.

Get a bool value for this key if it exists and has the correct type.

Returns wether this key has a null value

Get an i32 value for this key if it exists and has the correct type.

Get an i64 value for this key if it exists and has the correct type.

Get a time stamp value for this key if it exists and has the correct type.

Get a generic binary value for this key if it exists and has the correct type.

Get an object id value for this key if it exists and has the correct type.

Get a UTC datetime value for this key if it exists and has the correct type.

Returns true if the map contains a value for the specified key.

Important traits for Keys<'a>

Gets a collection of all keys in the document.

Important traits for Values<'a>

Gets a collection of all values in the document.

Returns the number of elements in the document.

Returns true if the document contains no elements

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.

Sets the value of the entry with the OccupiedEntry's key, and returns the entry's old value.

Takes the value of the entry out of the document, and returns it.

Trait Implementations

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

Deserialize this value given this Deserializer.

impl Clone for OrderedDocument
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for OrderedDocument
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Default for OrderedDocument
[src]

Returns the "default value" for a type. Read more

impl Display for OrderedDocument
[src]

Formats the value using the given formatter. Read more

impl Debug for OrderedDocument
[src]

Formats the value using the given formatter. Read more

impl IntoIterator for OrderedDocument
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

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

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl FromIterator<(String, Bson)> for OrderedDocument
[src]

Creates a value from an iterator. Read more

impl From<LinkedHashMap<String, Bson>> for OrderedDocument
[src]

Performs the conversion.

Auto Trait Implementations