Enum mon::bson::bson::Bson [] [src]

pub enum Bson {
    Double(f64),
    String(String),
    Array(Array),
    Document(Document),
    Boolean(bool),
    Null,
    RegExp(StringString),
    JavaScriptCode(String),
    JavaScriptCodeWithScope(StringDocument),
    Int32(i32),
    Int64(i64),
    TimeStamp(i64),
    Binary(BinarySubtypeVec<u8>),
    ObjectId(ObjectId),
    UTCDatetime(DateTime<Utc>),
    Symbol(String),
}

Variants

Methods

impl Bson
[src]

If Bson is Double, return its value. Returns None otherwise

If Bson is String, return its value. Returns None otherwise

If Bson is Array, return its value. Returns None otherwise

If Bson is Document, return its value. Returns None otherwise

If Bson is Boolean, return its value. Returns None otherwise

If Bson is I32, return its value. Returns None otherwise

If Bson is I64, return its value. Returns None otherwise

If Bson is Objectid, return its value. Returns None otherwise

If Bson is UtcDateTime, return its value. Returns None otherwise

If Bson is Symbol, return its value. Returns None otherwise

If Bson is TimeStamp, return its value. Returns None otherwise

If Bson is Null, return its value. Returns None otherwise

Trait Implementations

impl Clone for Bson
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Bson
[src]

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

This method tests for !=.

impl Debug for Bson
[src]

Formats the value using the given formatter.

impl Display for Bson
[src]

Formats the value using the given formatter. Read more

impl From<f32> for Bson
[src]

Performs the conversion.

impl From<f64> for Bson
[src]

Performs the conversion.

impl<'a> From<&'a str> for Bson
[src]

Performs the conversion.

impl From<String> for Bson
[src]

Performs the conversion.

impl<'a> From<&'a String> for Bson
[src]

Performs the conversion.

impl From<Array> for Bson
[src]

Performs the conversion.

impl From<Document> for Bson
[src]

Performs the conversion.

impl From<bool> for Bson
[src]

Performs the conversion.

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

Performs the conversion.

impl From<(String, Document)> for Bson
[src]

Performs the conversion.

impl From<(BinarySubtype, Vec<u8>)> for Bson
[src]

Performs the conversion.

impl From<i32> for Bson
[src]

Performs the conversion.

impl From<i64> for Bson
[src]

Performs the conversion.

impl From<u32> for Bson
[src]

Performs the conversion.

impl From<u64> for Bson
[src]

Performs the conversion.

impl From<[u8; 12]> for Bson
[src]

Performs the conversion.

impl From<ObjectId> for Bson
[src]

Performs the conversion.

impl From<DateTime<Utc>> for Bson
[src]

Performs the conversion.

impl From<Value> for Bson
[src]

Performs the conversion.

impl Into<Value> for Bson
[src]

Performs the conversion.

impl Serialize for Bson
[src]

Serialize this value into the given Serde serializer. Read more

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

Deserialize this value from the given Serde deserializer. Read more

impl From<Role> for Bson
[src]

Performs the conversion.