Enum bson::Bson
[−]
[src]
pub enum Bson { FloatingPoint(f64), String(String), Array(Array), Document(Document), Boolean(bool), Null, RegExp(String, String), JavaScriptCode(String), JavaScriptCodeWithScope(String, Document), I32(i32), I64(i64), TimeStamp(i64), Binary(BinarySubtype, Vec<u8>), ObjectId(ObjectId), UtcDatetime(DateTime<UTC>), }
Possible BSON value types.
Variants
FloatingPoint(f64)
String(String)
Array(Array)
Document(Document)
Boolean(bool)
Null
RegExp(String, String)
JavaScriptCode(String)
JavaScriptCodeWithScope(String, Document)
I32(i32)
I64(i64)
TimeStamp(i64)
Binary(BinarySubtype, Vec<u8>)
ObjectId(ObjectId)
UtcDatetime(DateTime<UTC>)
Methods
impl Bson
[src]
fn element_type(&self) -> ElementType
Get the ElementType
of this value.
fn to_json(&self) -> Json
Convert this value to the best approximate Json
.
fn from_json(j: &Json) -> Bson
Create a Bson
from a Json
.
fn to_extended_document(&self) -> Document
fn from_extended_document(values: Document) -> Bson
Trait Implementations
impl PartialEq for Bson
[src]
fn eq(&self, __arg_0: &Bson) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Bson) -> bool
This method tests for !=
.
impl Clone for Bson
[src]
fn clone(&self) -> Bson
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Bson
[src]
impl Display for Bson
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.
impl From<f32> for Bson
[src]
impl From<f64> for Bson
[src]
impl<'a> From<&'a str> for Bson
[src]
impl From<String> for Bson
[src]
impl<'a> From<&'a String> for Bson
[src]
impl From<Array> for Bson
[src]
impl From<Document> for Bson
[src]
impl From<bool> for Bson
[src]
impl From<(String, String)> for Bson
[src]
impl From<(String, Document)> for Bson
[src]
impl From<(BinarySubtype, Vec<u8>)> for Bson
[src]
impl From<i32> for Bson
[src]
impl From<i64> for Bson
[src]
impl From<u32> for Bson
[src]
impl From<u64> for Bson
[src]
impl From<[u8; 12]> for Bson
[src]
impl From<ObjectId> for Bson
[src]
impl From<DateTime<UTC>> for Bson
[src]
impl Serialize for Bson
[src]
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer
Serializes this value into this serializer.
impl Deserialize for Bson
[src]
fn deserialize<D>(deserializer: &mut D) -> Result<Bson, D::Error> where D: Deserializer
Deserialize this value given this Deserializer
.