Rust

value

Module

The values documents and queries carry.

Contents

use utopia_database::value::BsonValue;
Rust
pub enum BsonValue

Undocumented.

use utopia_database::value::Ext;
Rust
pub enum Ext

The objects (other than stdClass) a Value can hold.

Also implements Extension.
use utopia_database::value::as_document;
Rust
pub fn as_document(value: &Value) -> Option<&Document>

The document a value holds, if it is one ($value instanceof Document).

use utopia_database::value::as_document_mut;
Rust
pub fn as_document_mut(value: &mut Value) -> Option<&mut Document>

The document a value holds, mutably.

use utopia_database::value::as_operator;
Rust
pub fn as_operator(value: &Value) -> Option<&Operator>

The operator a value holds, if it is one ($value instanceof Operator).

use utopia_database::value::as_query;
Rust
pub fn as_query(value: &Value) -> Option<&Query>

The query a value holds, if it is one ($value instanceof Query).

use utopia_database::value::as_str;
Rust
pub fn as_str(value: &Value) -> Option<&str>

The UTF-8 text of a string value; None for other values and for strings that are not UTF-8.

use utopia_database::value::from_plain;
Rust
pub fn from_plain(value: php_std::Value) -> Value

Undocumented.

use utopia_database::value::list;
Rust
pub fn list(items: impl IntoIterator<Item = Value>) -> Value

A list value from values.

use utopia_database::value::string;
Rust
pub fn string(s: impl Into<Str>) -> Value

A string value (Value::Str) from Rust text.

use utopia_database::value::to_long;
Rust
pub fn to_long(value: &Value) -> i64

Undocumented.

use utopia_database::value::to_plain;
Rust
pub fn to_plain(value: &Value) -> php_std::Value

Undocumented.

use utopia_database::value::to_text;
Rust
pub fn to_text(value: &Value) -> String

Undocumented.

Rust
pub type Array = php_std::Array<Ext>

Undocumented.

Rust
pub type Value = php_std::Value<Ext>

Undocumented.

Also implements From.