Skip to main content

from_bson

Function from_bson 

Source
pub fn from_bson(bson: Bson, column: &str) -> Result<Value, QueryError>
Expand description

Convert BSON read from the database to a Value.

Documents and arrays become Value::Json; strings stay Value::Text (dates and times decode from their canonical text through DbType::from_value).

ยงErrors

QueryError::Decode for BSON types with no Value counterpart.