pub enum ConstValue<'a> {
Int(IntValue<'a>),
Float(FloatValue<'a>),
String(StringValue<'a>),
Boolean(BooleanValue<'a>),
Null(NullValue<'a>),
Enum(EnumValue<'a>),
List(ConstList<'a>),
Object(ConstObject<'a>),
}
Variants§
Int(IntValue<'a>)
Float(FloatValue<'a>)
String(StringValue<'a>)
Boolean(BooleanValue<'a>)
Null(NullValue<'a>)
Enum(EnumValue<'a>)
List(ConstList<'a>)
Object(ConstObject<'a>)
Implementations§
Source§impl<'a> ConstValue<'a>
impl<'a> ConstValue<'a>
pub fn is_int(&self) -> bool
pub fn as_i32(&self) -> Option<i32>
pub fn is_float(&self) -> bool
pub fn as_f64(&self) -> Option<f64>
pub fn is_string(&self) -> bool
pub fn as_str(&self) -> Option<&'a str>
pub fn is_boolean(&self) -> bool
pub fn as_bool(&self) -> Option<bool>
pub fn is_null(&self) -> bool
pub fn as_null(&self) -> Option<()>
pub fn is_enum(&self) -> bool
pub fn as_enum_value(&self) -> Option<&'a str>
pub fn is_list(&self) -> bool
pub fn as_list(&self) -> Option<ConstList<'a>>
pub fn as_items(&self) -> Option<Iter<'a, ConstValue<'a>>>
pub fn is_object(&self) -> bool
pub fn as_object(&self) -> Option<ConstObject<'a>>
pub fn as_fields(&self) -> Option<Iter<'a, ConstObjectField<'a>>>
Trait Implementations§
Source§impl<'a> Clone for ConstValue<'a>
impl<'a> Clone for ConstValue<'a>
Source§fn clone(&self) -> ConstValue<'a>
fn clone(&self) -> ConstValue<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for ConstValue<'a>
impl<'a> Debug for ConstValue<'a>
Source§impl<'a> From<ConstValue<'a>> for Value<'a>
impl<'a> From<ConstValue<'a>> for Value<'a>
Source§fn from(value: ConstValue<'a>) -> Self
fn from(value: ConstValue<'a>) -> Self
Converts to this type from the input type.
Source§impl PartialEq<ConstValue<'_>> for Value<'_>
impl PartialEq<ConstValue<'_>> for Value<'_>
Source§impl PartialEq<Value<'_>> for ConstValue<'_>
impl PartialEq<Value<'_>> for ConstValue<'_>
Source§impl PartialEq for ConstValue<'_>
impl PartialEq for ConstValue<'_>
Source§impl<'a> TryFrom<Value<'a>> for ConstValue<'a>
impl<'a> TryFrom<Value<'a>> for ConstValue<'a>
Source§impl<'a> ValueStoreReader<'a> for ConstValue<'a>
impl<'a> ValueStoreReader<'a> for ConstValue<'a>
type Id = ConstValueId
impl<'a> Copy for ConstValue<'a>
Auto Trait Implementations§
impl<'a> Freeze for ConstValue<'a>
impl<'a> RefUnwindSafe for ConstValue<'a>
impl<'a> Send for ConstValue<'a>
impl<'a> Sync for ConstValue<'a>
impl<'a> Unpin for ConstValue<'a>
impl<'a> UnwindSafe for ConstValue<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more