Enum surrealdb_sql::Value

source ·
pub enum Value {
Show 29 variants None, Null, Bool(bool), Number(Number), Strand(Strand), Duration(Duration), Datetime(Datetime), Uuid(Uuid), Array(Array), Object(Object), Geometry(Geometry), Bytes(Bytes), Thing(Thing), Param(Param), Idiom(Idiom), Table(Table), Mock(Mock), Regex(Regex), Cast(Box<Cast>), Block(Box<Block>), Range(Box<Range>), Edges(Box<Edges>), Future(Box<Future>), Constant(Constant), Function(Box<Function>), Subquery(Box<Subquery>), Expression(Box<Expression>), Query(Query), Model(Box<Model>),
}

Variants§

§

None

§

Null

§

Bool(bool)

§

Number(Number)

§

Strand(Strand)

§

Duration(Duration)

§

Datetime(Datetime)

§

Uuid(Uuid)

§

Array(Array)

§

Object(Object)

§

Geometry(Geometry)

§

Bytes(Bytes)

§

Thing(Thing)

§

Param(Param)

§

Idiom(Idiom)

§

Table(Table)

§

Mock(Mock)

§

Regex(Regex)

§

Cast(Box<Cast>)

§

Block(Box<Block>)

§

Range(Box<Range>)

§

Edges(Box<Edges>)

§

Future(Box<Future>)

§

Constant(Constant)

§

Function(Box<Function>)

§

Subquery(Box<Subquery>)

§

Expression(Box<Expression>)

§

Query(Query)

§

Model(Box<Model>)

Implementations§

source§

impl Value

source

pub fn base() -> Self

Create an empty Object Value

source

pub fn ok(self) -> Result<Value, Error>

Convert this Value to a Result

source

pub fn some(self) -> Option<Value>

Convert this Value to an Option

source

pub fn is_none_or_null(&self) -> bool

Check if this Value is NONE or NULL

source

pub fn is_none(&self) -> bool

Check if this Value is NONE

source

pub fn is_null(&self) -> bool

Check if this Value is NULL

source

pub fn is_some(&self) -> bool

Check if this Value not NONE or NULL

source

pub fn is_bool(&self) -> bool

Check if this Value is a boolean value

source

pub fn is_true(&self) -> bool

Check if this Value is TRUE or ‘true’

source

pub fn is_false(&self) -> bool

Check if this Value is FALSE or ‘false’

source

pub fn is_truthy(&self) -> bool

Check if this Value is truthy

source

pub fn is_uuid(&self) -> bool

Check if this Value is a UUID

source

pub fn is_thing(&self) -> bool

Check if this Value is a Thing

source

pub fn is_mock(&self) -> bool

Check if this Value is a Mock

source

pub fn is_param(&self) -> bool

Check if this Value is a Param

source

pub fn is_range(&self) -> bool

Check if this Value is a Range

source

pub fn is_table(&self) -> bool

Check if this Value is a Table

source

pub fn is_strand(&self) -> bool

Check if this Value is a Strand

source

pub fn is_query(&self) -> bool

Check if this Value is a Query

source

pub fn is_bytes(&self) -> bool

Check if this Value is a float Number

source

pub fn is_array(&self) -> bool

Check if this Value is an Array

source

pub fn is_object(&self) -> bool

Check if this Value is an Object

source

pub fn is_number(&self) -> bool

Check if this Value is a Number

source

pub fn is_datetime(&self) -> bool

Check if this Value is a Datetime

source

pub fn is_duration(&self) -> bool

Check if this Value is a Duration

source

pub fn is_record(&self) -> bool

Check if this Value is a Thing

source

pub fn is_record_of_table(&self, table: String) -> bool

Check if this Value is a Thing, and belongs to a certain table

source

pub fn is_geometry(&self) -> bool

Check if this Value is a Geometry

source

pub fn is_int(&self) -> bool

Check if this Value is an int Number

source

pub fn is_float(&self) -> bool

Check if this Value is a float Number

source

pub fn is_decimal(&self) -> bool

Check if this Value is a decimal Number

source

pub fn is_nan(&self) -> bool

Check if this Value is a Number but is a NAN

source

pub fn is_integer(&self) -> bool

Check if this Value is a Number and is an integer

source

pub fn is_positive(&self) -> bool

Check if this Value is a Number and is positive

source

pub fn is_negative(&self) -> bool

Check if this Value is a Number and is negative

source

pub fn is_zero_or_positive(&self) -> bool

Check if this Value is a Number and is zero or positive

source

pub fn is_zero_or_negative(&self) -> bool

Check if this Value is a Number and is zero or negative

source

pub fn is_record_type(&self, types: &[Table]) -> bool

Check if this Value is a Thing of a specific type

source

pub fn is_geometry_type(&self, types: &[String]) -> bool

Check if this Value is a Geometry of a specific type

source

pub fn as_string(self) -> String

Convert this Value into a String

source

pub fn as_raw_string(self) -> String

Converts this Value into an unquoted String

source

pub fn to_raw_string(&self) -> String

Converts this Value into an unquoted String

source

pub fn to_idiom(&self) -> Idiom

Converts this Value into a field name

source

pub fn can_start_idiom(&self) -> bool

Returns if this value can be the start of a idiom production.

source

pub fn to_operations(&self) -> Result<Vec<Operation>, Error>

Try to convert this Value into a set of JSONPatch operations

source

pub fn into_json(self) -> Json

Converts a surrealdb::sq::Value into a serde_json::Value

This converts certain types like Thing into their simpler formats instead of the format used internally by SurrealDB.

source

pub fn could_be_table(self) -> Value

Treat a string as a table name

source

pub fn kindof(&self) -> &'static str

Treat a string as a table name

source

pub fn record(self) -> Option<Thing>

Fetch the record id if there is one

source

pub fn equal(&self, other: &Value) -> bool

Check if this Value is equal to another Value

source

pub fn all_equal(&self, other: &Value) -> bool

Check if all Values in an Array are equal to another Value

source

pub fn any_equal(&self, other: &Value) -> bool

Check if any Values in an Array are equal to another Value

source

pub fn fuzzy(&self, other: &Value) -> bool

Fuzzy check if this Value is equal to another Value

source

pub fn all_fuzzy(&self, other: &Value) -> bool

Fuzzy check if all Values in an Array are equal to another Value

source

pub fn any_fuzzy(&self, other: &Value) -> bool

Fuzzy check if any Values in an Array are equal to another Value

source

pub fn contains(&self, other: &Value) -> bool

Check if this Value contains another Value

source

pub fn contains_all(&self, other: &Value) -> bool

Check if all Values in an Array contain another Value

source

pub fn contains_any(&self, other: &Value) -> bool

Check if any Values in an Array contain another Value

source

pub fn intersects(&self, other: &Value) -> bool

Check if this Value intersects another Value

source

pub fn lexical_cmp(&self, other: &Value) -> Option<Ordering>

Compare this Value to another Value lexicographically

source

pub fn natural_cmp(&self, other: &Value) -> Option<Ordering>

Compare this Value to another Value using natural numerical comparison

source

pub fn natural_lexical_cmp(&self, other: &Value) -> Option<Ordering>

Compare this Value to another Value lexicographically and using natural numerical comparison

source§

impl Value

source

pub fn all(&self) -> Self

source§

impl Value

source

pub fn clear(&mut self) -> Result<(), Error>

source§

impl Value

source

pub fn first(&self) -> Self

source§

impl Value

source

pub fn flatten(self) -> Self

source§

impl Value

source

pub fn last(&self) -> Self

source§

impl Value

source

pub fn pick(&self, path: &[Part]) -> Self

Synchronous method for getting a field from a Value

source§

impl Value

source

pub fn put(&mut self, path: &[Part], val: Value)

Synchronous method for setting a field on a Value

source§

impl Value

source

pub fn rid(&self) -> Value

source§

impl Value

source

pub fn walk(&self, path: &[Part]) -> Vec<(Idiom, Self)>

Trait Implementations§

source§

impl Add<Value> for Array

§

type Output = Array

The resulting type after applying the + operator.
source§

fn add(self, other: Value) -> Self

Performs the + operation. Read more
source§

impl Clone for Value

source§

fn clone(&self) -> Value

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Value

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Value

source§

fn default() -> Value

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for Value

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Value

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<&'a Value> for Cow<'a, Value>

source§

fn from(v: &'a Value) -> Cow<'a, Value>

Converts to this type from the input type.
source§

impl From<&Value> for Vec<u8>

source§

fn from(v: &Value) -> Vec<u8>

Converts to this type from the input type.
source§

impl From<&Vec<u8>> for Value

source§

fn from(v: &Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl From<&str> for Value

source§

fn from(v: &str) -> Self

Converts to this type from the input type.
source§

impl From<[f64; 2]> for Value

source§

fn from(v: [f64; 2]) -> Self

Converts to this type from the input type.
source§

impl From<(f64, f64)> for Value

source§

fn from(v: (f64, f64)) -> Self

Converts to this type from the input type.
source§

impl From<Array> for Value

source§

fn from(v: Array) -> Self

Converts to this type from the input type.
source§

impl From<BTreeMap<&str, Value>> for Value

source§

fn from(v: BTreeMap<&str, Value>) -> Self

Converts to this type from the input type.
source§

impl From<BTreeMap<String, Value>> for Value

source§

fn from(v: BTreeMap<String, Value>) -> Self

Converts to this type from the input type.
source§

impl From<Block> for Value

source§

fn from(v: Block) -> Self

Converts to this type from the input type.
source§

impl From<Box<Edges>> for Value

source§

fn from(v: Box<Edges>) -> Self

Converts to this type from the input type.
source§

impl From<Bytes> for Value

source§

fn from(v: Bytes) -> Self

Converts to this type from the input type.
source§

impl From<Cast> for Value

source§

fn from(v: Cast) -> Self

Converts to this type from the input type.
source§

impl From<Constant> for Value

source§

fn from(v: Constant) -> Self

Converts to this type from the input type.
source§

impl From<DateTime<Utc>> for Value

source§

fn from(v: DateTime<Utc>) -> Self

Converts to this type from the input type.
source§

impl From<Datetime> for Value

source§

fn from(v: Datetime) -> Self

Converts to this type from the input type.
source§

impl From<Decimal> for Value

source§

fn from(v: Decimal) -> Self

Converts to this type from the input type.
source§

impl From<DefineTableStatement> for Value

source§

fn from(v: DefineTableStatement) -> Self

Converts to this type from the input type.
source§

impl From<Duration> for Value

source§

fn from(v: Duration) -> Self

Converts to this type from the input type.
source§

impl From<Edges> for Value

source§

fn from(v: Edges) -> Self

Converts to this type from the input type.
source§

impl From<Expression> for Value

source§

fn from(v: Expression) -> Self

Converts to this type from the input type.
source§

impl From<Function> for Value

source§

fn from(v: Function) -> Self

Converts to this type from the input type.
source§

impl From<Future> for Value

source§

fn from(v: Future) -> Self

Converts to this type from the input type.
source§

impl From<Geometry> for Value

source§

fn from(v: Geometry) -> Self

Converts to this type from the input type.
source§

impl From<HashMap<&str, Value>> for Value

source§

fn from(v: HashMap<&str, Value>) -> Self

Converts to this type from the input type.
source§

impl From<HashMap<String, Value>> for Value

source§

fn from(v: HashMap<String, Value>) -> Self

Converts to this type from the input type.
source§

impl From<Id> for Value

source§

fn from(v: Id) -> Self

Converts to this type from the input type.
source§

impl From<Idiom> for Value

source§

fn from(v: Idiom) -> Self

Converts to this type from the input type.
source§

impl From<Mock> for Value

source§

fn from(v: Mock) -> Self

Converts to this type from the input type.
source§

impl From<Model> for Value

source§

fn from(v: Model) -> Self

Converts to this type from the input type.
source§

impl From<Number> for Value

source§

fn from(v: Number) -> Self

Converts to this type from the input type.
source§

impl From<Object> for Value

source§

fn from(v: Object) -> Self

Converts to this type from the input type.
source§

impl From<Operation> for Value

source§

fn from(v: Operation) -> Self

Converts to this type from the input type.
source§

impl From<Option<String>> for Value

source§

fn from(v: Option<String>) -> Self

Converts to this type from the input type.
source§

impl From<Option<Value>> for Value

source§

fn from(v: Option<Value>) -> Self

Converts to this type from the input type.
source§

impl From<Param> for Value

source§

fn from(v: Param) -> Self

Converts to this type from the input type.
source§

impl From<Point> for Value

source§

fn from(v: Point<f64>) -> Self

Converts to this type from the input type.
source§

impl From<Query> for Value

source§

fn from(q: Query) -> Self

Converts to this type from the input type.
source§

impl From<Range> for Value

source§

fn from(v: Range) -> Self

Converts to this type from the input type.
source§

impl From<Regex> for Value

source§

fn from(v: Regex) -> Self

Converts to this type from the input type.
source§

impl From<Strand> for Value

source§

fn from(v: Strand) -> Self

Converts to this type from the input type.
source§

impl From<String> for Value

source§

fn from(v: String) -> Self

Converts to this type from the input type.
source§

impl From<Subquery> for Value

source§

fn from(v: Subquery) -> Self

Converts to this type from the input type.
source§

impl From<Table> for Value

source§

fn from(v: Table) -> Self

Converts to this type from the input type.
source§

impl From<Thing> for Value

source§

fn from(v: Thing) -> Self

Converts to this type from the input type.
source§

impl From<Uuid> for Value

source§

fn from(v: Uuid) -> Self

Converts to this type from the input type.
source§

impl From<Uuid> for Value

source§

fn from(v: Uuid) -> Self

Converts to this type from the input type.
source§

impl From<Value> for Array

source§

fn from(v: Value) -> Self

Converts to this type from the input type.
source§

impl From<Value> for Block

source§

fn from(v: Value) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Value> for Cow<'a, Value>

source§

fn from(v: Value) -> Cow<'a, Value>

Converts to this type from the input type.
source§

impl From<Value> for Future

source§

fn from(v: Value) -> Self

Converts to this type from the input type.
source§

impl From<Value> for Value

source§

fn from(value: Value) -> Self

Converts to this type from the input type.
source§

impl From<Value> for Vec<u8>

source§

fn from(v: Value) -> Vec<u8>

Converts to this type from the input type.
source§

impl From<Vec<&str>> for Value

source§

fn from(v: Vec<&str>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Number>> for Value

source§

fn from(v: Vec<Number>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Operation>> for Value

source§

fn from(v: Vec<Operation>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<String>> for Value

source§

fn from(v: Vec<String>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<Value>> for Value

source§

fn from(v: Vec<Value>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<bool>> for Value

source§

fn from(v: Vec<bool>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<i32>> for Value

source§

fn from(v: Vec<i32>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<u8>> for Value

source§

fn from(v: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl From<bool> for Value

source§

fn from(v: bool) -> Self

Converts to this type from the input type.
source§

impl From<f32> for Value

source§

fn from(v: f32) -> Self

Converts to this type from the input type.
source§

impl From<f64> for Value

source§

fn from(v: f64) -> Self

Converts to this type from the input type.
source§

impl From<i128> for Value

source§

fn from(v: i128) -> Self

Converts to this type from the input type.
source§

impl From<i16> for Value

source§

fn from(v: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for Value

source§

fn from(v: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for Value

source§

fn from(v: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for Value

source§

fn from(v: i8) -> Self

Converts to this type from the input type.
source§

impl From<isize> for Value

source§

fn from(v: isize) -> Self

Converts to this type from the input type.
source§

impl From<u128> for Value

source§

fn from(v: u128) -> Self

Converts to this type from the input type.
source§

impl From<u16> for Value

source§

fn from(v: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for Value

source§

fn from(v: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for Value

source§

fn from(v: u64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Value

source§

fn from(v: u8) -> Self

Converts to this type from the input type.
source§

impl From<usize> for Value

source§

fn from(v: usize) -> Self

Converts to this type from the input type.
source§

impl FromIterator<(String, Value)> for Value

source§

fn from_iter<I: IntoIterator<Item = (String, Value)>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl FromIterator<Value> for Array

source§

fn from_iter<I: IntoIterator<Item = Value>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl FromIterator<Value> for Value

source§

fn from_iter<I: IntoIterator<Item = Value>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl<'js> FromJs<'js> for Value

source§

fn from_js(ctx: &Ctx<'js>, val: Value<'js>) -> Result<Self, Error>

source§

impl Hash for Value

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<'js> IntoJs<'js> for &Value

source§

fn into_js(self, ctx: &Ctx<'js>) -> Result<Value<'js>, Error>

source§

impl<'js> IntoJs<'js> for Value

source§

fn into_js(self, ctx: &Ctx<'js>) -> Result<Value<'js>, Error>

source§

impl Ord for Value

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Value

source§

fn eq(&self, other: &Value) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Value

source§

fn partial_cmp(&self, other: &Value) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Revisioned for Value

source§

fn revision() -> u16

Returns the current revision of this type.

source§

fn serialize_revisioned<W: Write>(&self, writer: &mut W) -> Result<(), Error>

Serializes the struct using the specficifed writer.

source§

fn deserialize_revisioned<R: Read>(reader: &mut R) -> Result<Self, Error>

Deserializes a new instance of the struct from the specficifed reader.

source§

fn type_id() -> TypeId
where Self: 'static,

Returns the type id of this type.
source§

impl Serialize for Value

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Sub<Value> for Array

§

type Output = Array

The resulting type after applying the - operator.
source§

fn sub(self, other: Value) -> Self

Performs the - operation. Read more
source§

impl TryFrom<Value> for DateTime<Utc>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for Datetime

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for Decimal

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for Duration

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for Number

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for Object

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for String

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for Uuid

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for Vec<Value>

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for bool

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for f32

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for f64

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for i128

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for i16

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for i32

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for i64

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for i8

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for u128

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for u16

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for u32

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for u64

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Value> for u8

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: Value) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Eq for Value

source§

impl StructuralPartialEq for Value

Auto Trait Implementations§

§

impl RefUnwindSafe for Value

§

impl Send for Value

§

impl Sync for Value

§

impl Unpin for Value

§

impl UnwindSafe for Value

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'js, T> AsProperty<'js, T> for T
where T: IntoJs<'js>,

§

fn config( self, ctx: &Ctx<'js> ) -> Result<(i32, Value<'js>, Value<'js>, Value<'js>), Error>

Property configuration Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<'js, T> FromParam<'js> for T
where T: FromJs<'js>,

§

fn param_requirement() -> ParamRequirement

The parameters requirements this value requires.
§

fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>

Convert from a parameter value.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

§

impl<'js, T> IntoArg<'js> for T
where T: IntoJs<'js>,

§

fn num_args(&self) -> usize

The number of arguments this value produces.
§

fn into_arg(self, args: &mut Args<'js>) -> Result<(), Error>

Convert the value into an argument.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

source§

fn is_within(&self, b: &G2) -> bool

source§

impl<G1, G2> Within<G2> for G1
where G2: Contains<G1>,

source§

fn is_within(&self, b: &G2) -> bool

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ParallelSend for T
where T: Send,