Enum cynic_parser::executable::Value
source · pub enum Value<'a> {
Variable(&'a str),
Int(i32),
Float(f32),
String(&'a str),
Boolean(bool),
Null,
Enum(&'a str),
List(Vec<Value<'a>>),
Object(Vec<(&'a str, Value<'a>)>),
}
Variants§
Variable(&'a str)
Int(i32)
Float(f32)
String(&'a str)
Boolean(bool)
Null
Enum(&'a str)
List(Vec<Value<'a>>)
Object(Vec<(&'a str, Value<'a>)>)
Implementations§
source§impl<'a> Value<'a>
impl<'a> Value<'a>
sourcepub fn variables_used(&self) -> impl Iterator<Item = &'a str> + '_
pub fn variables_used(&self) -> impl Iterator<Item = &'a str> + '_
Returns an iterator over all the variables that appear somewhere in this Value.
Note that this is not deduplicated - if a variable appears more than once in the value it’ll appear more than once in this iterator.
Trait Implementations§
source§impl<'a> From<ReadContext<'a, ValueId>> for Value<'a>
impl<'a> From<ReadContext<'a, ValueId>> for Value<'a>
source§fn from(reader: ReadContext<'a, ValueId>) -> Self
fn from(reader: ReadContext<'a, ValueId>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for Value<'a>
impl<'a> RefUnwindSafe for Value<'a>
impl<'a> Send for Value<'a>
impl<'a> Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> UnwindSafe for Value<'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