pub enum Value {
Str(String, Pos),
Num(f64),
Bool(bool),
Array(Vec<Value>),
Object(Vec<(String, Value)>),
Prop(String),
Theme(String, Pos),
Themed {
light: String,
dark: String,
written: String,
},
}Expand description
An attribute’s value, or a part of one.
Variants§
Str(String, Pos)
A string, and where its opening quote is: a gradient names theme colors inside one.
Num(f64)
A number, within ±MAX_NUMBER.
Bool(bool)
true or false.
Array(Vec<Value>)
[…]: values in order.
Object(Vec<(String, Value)>)
{ key: … }: each key with its value, in the order written.
Prop(String)
A bare name: the value of the prop it names.
Theme(String, Pos)
theme.name, a color from the themes of the file it is written in,
and where theme starts.
Themed
A theme color bound to the themes of the file that wrote it: the
value in each theme — a color, or a gradient with the theme’s colors
in it — and the value as written, for problems. The resolver makes
these from Theme, and from strings that name theme colors, as it
reads a file; the parser never does.
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Forget for Value
impl Freeze for Valuewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<(String, Value)>: Freeze,
impl Move for Value
impl RefUnwindSafe for Value
impl Send for Valuewhere
RawVecInner: Send,
impl Sync for Valuewhere
RawVecInner: Sync,
impl Unpin for Value
impl UnsafeUnpin for Valuewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<(String, Value)>: UnsafeUnpin,
impl UnwindSafe for Valuewhere
RawVecInner: UnwindSafe,
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