Enum subgraph::entity::Value

source ยท
pub enum Value {
    String(String),
    Int(i32),
    BigDecimal(BigDecimal),
    Bool(bool),
    Array(Vec<Value>),
    Null,
    Bytes(Vec<u8>),
    BigInt(BigInt),
}
Expand description

A Subgraph entity value.

Variantsยง

ยง

String(String)

ยง

Int(i32)

ยง

BigDecimal(BigDecimal)

ยง

Bool(bool)

ยง

Array(Vec<Value>)

ยง

Null

ยง

Bytes(Vec<u8>)

ยง

BigInt(BigInt)

Implementationsยง

Returns the entity value as a string, or None if the value the wrong type.

Returns the entity value as an int, or None if the value the wrong type.

Returns the entity value as a big decimal, or None if the value the wrong type.

Returns the entity value as a bool, or None if the value the wrong type.

Returns the entity value as an array, or None if the value the wrong type.

Returns the entity value as null, or None if the value the wrong type.

Returns the entity value as bytes, or None if the value the wrong type.

Returns the entity value as a big int, or None if the value the wrong type.

Trait Implementationsยง

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the โ€œdefault valueโ€ for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementationsยง

Blanket Implementationsยง

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.