pub enum Value {
Bool(bool),
Int(i64),
Str(Rc<str>),
List(SliceRef<Value>),
Dict(Rc<NameIDMap<Value>>),
HTML(HTML),
Func(Func),
Regex(Rc<RegexValue>),
}
Expand description
A value represented during compilation of a Papyri source file.
Variants§
Bool(bool)
A Boolean value, either True
or False
.
Int(i64)
A 64-bit signed integer value.
Str(Rc<str>)
A string value.
List(SliceRef<Value>)
A list of values.
Dict(Rc<NameIDMap<Value>>)
A dictionary of values. The dictionary keys are strings, and must be valid identifiers not beginning with underscores.
HTML(HTML)
Some HTML content, represented as a value. HTML text content is instead
represented as Value::Str
.
Func(Func)
A function, either defined in a Papyri source file, or with a native implementation.
Regex(Rc<RegexValue>)
A regular expression.
Implementations§
Trait Implementations§
Source§impl PartialEq for Value
impl PartialEq for Value
impl Eq for Value
Auto Trait Implementations§
impl Freeze for Value
impl !RefUnwindSafe for Value
impl !Send for Value
impl !Sync for Value
impl Unpin for Value
impl !UnwindSafe for Value
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.