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
.
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.