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ยง
sourceยงimpl Value
impl Value
sourcepub fn as_string(&self) -> Option<&str>
pub fn as_string(&self) -> Option<&str>
Returns the entity value as a string, or None
if the value the wrong
type.
sourcepub fn as_int(&self) -> Option<i32>
pub fn as_int(&self) -> Option<i32>
Returns the entity value as an int, or None
if the value the wrong
type.
sourcepub fn as_big_decimal(&self) -> Option<&BigDecimal>
pub fn as_big_decimal(&self) -> Option<&BigDecimal>
Returns the entity value as a big decimal, or None
if the value the
wrong type.
sourcepub fn as_bool(&self) -> Option<bool>
pub fn as_bool(&self) -> Option<bool>
Returns the entity value as a bool, or None
if the value the wrong
type.
sourcepub fn as_array(&self) -> Option<&[Value]>
pub fn as_array(&self) -> Option<&[Value]>
Returns the entity value as an array, or None
if the value the wrong
type.
sourcepub fn as_null(&self) -> Option<()>
pub fn as_null(&self) -> Option<()>
Returns the entity value as null, or None
if the value the wrong type.
sourcepub fn as_bytes(&self) -> Option<&Vec<u8>>
pub fn as_bytes(&self) -> Option<&Vec<u8>>
Returns the entity value as bytes, or None
if the value the wrong
type.
sourcepub fn as_big_int(&self) -> Option<&BigInt>
pub fn as_big_int(&self) -> Option<&BigInt>
Returns the entity value as a big int, or None
if the value the wrong
type.
Trait Implementationsยง
impl Eq for Value
impl StructuralEq for Value
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.