pub enum RawBsonRef<'a> {
Show 21 variants Double(f64), String(&'a str), Array(&'a RawArray), Document(&'a RawDocument), Boolean(bool), Null, RegularExpression(RawRegexRef<'a>), JavaScriptCode(&'a str), JavaScriptCodeWithScope(RawJavaScriptCodeWithScopeRef<'a>), Int32(i32), Int64(i64), Timestamp(Timestamp), Binary(RawBinaryRef<'a>), ObjectId(ObjectId), DateTime(DateTime), Symbol(&'a str), Decimal128(Decimal128), Undefined, MaxKey, MinKey, DbPointer(RawDbPointerRef<'a>),
}
Expand description

A BSON value referencing raw bytes stored elsewhere.

Variants

Double(f64)

64-bit binary floating point

String(&'a str)

UTF-8 string

Array(&'a RawArray)

Array

Document(&'a RawDocument)

Embedded document

Boolean(bool)

Boolean value

Null

Null value

RegularExpression(RawRegexRef<'a>)

Regular expression

JavaScriptCode(&'a str)

JavaScript code

JavaScriptCodeWithScope(RawJavaScriptCodeWithScopeRef<'a>)

JavaScript code w/ scope

Int32(i32)

32-bit signed integer

Int64(i64)

64-bit signed integer

Timestamp(Timestamp)

Timestamp

Binary(RawBinaryRef<'a>)

Binary data

ObjectId(ObjectId)

DateTime(DateTime)

UTC datetime

Symbol(&'a str)

Symbol (Deprecated)

Decimal128(Decimal128)

Undefined

Undefined value (Deprecated)

MaxKey

Max key

MinKey

Min key

DbPointer(RawDbPointerRef<'a>)

DBPointer (Deprecated)

Implementations

Get the ElementType of this value.

Gets the f64 that’s referenced or returns None if the referenced value isn’t a BSON double.

Gets the &str that’s referenced or returns None if the referenced value isn’t a BSON String.

Gets the RawArray that’s referenced or returns None if the referenced value isn’t a BSON array.

Gets the RawDocument that’s referenced or returns None if the referenced value isn’t a BSON document.

Gets the bool that’s referenced or returns None if the referenced value isn’t a BSON boolean.

Gets the i32 that’s referenced or returns None if the referenced value isn’t a BSON Int32.

Gets the i64 that’s referenced or returns None if the referenced value isn’t a BSON Int64.

Gets the crate::oid::ObjectId that’s referenced or returns None if the referenced value isn’t a BSON ObjectID.

Gets the RawBinaryRef that’s referenced or returns None if the referenced value isn’t a BSON binary.

Gets the RawRegexRef that’s referenced or returns None if the referenced value isn’t a BSON regular expression.

Gets the crate::DateTime that’s referenced or returns None if the referenced value isn’t a BSON datetime.

Gets the symbol that’s referenced or returns None if the referenced value isn’t a BSON symbol.

Gets the crate::Timestamp that’s referenced or returns None if the referenced value isn’t a BSON timestamp.

Gets the null value that’s referenced or returns None if the referenced value isn’t a BSON null.

Gets the RawDbPointerRef that’s referenced or returns None if the referenced value isn’t a BSON DB pointer.

Gets the code that’s referenced or returns None if the referenced value isn’t a BSON JavaScript.

Gets the RawJavaScriptCodeWithScope that’s referenced or returns None if the referenced value isn’t a BSON JavaScript with scope.

Convert this RawBsonRef to the equivalent RawBson.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.