pub enum FormKind {
Show 29 variants
Nil,
Bool(bool),
Int(i64),
BigInt(String),
Float(f64),
BigDecimal(String),
Ratio(String),
Char(char),
Str(String),
Regex(String),
Symbolic(f64),
Symbol(String),
Keyword(String),
AutoKeyword(String),
AutoSymbol(String),
List(Vec<Form>),
Vector(Vec<Form>),
Map(Vec<Form>),
Set(Vec<Form>),
Quote(Box<Form>),
SyntaxQuote(Box<Form>),
Unquote(Box<Form>),
UnquoteSplice(Box<Form>),
Deref(Box<Form>),
Var(Box<Form>),
Meta(Box<Form>, Box<Form>),
AnonFn(Vec<Form>),
TaggedLiteral(String, Box<Form>),
ReaderCond {
splicing: bool,
clauses: Vec<Form>,
},
}Expand description
The payload of a Form node.
Variants§
Nil
Bool(bool)
Int(i64)
BigInt(String)
Float(f64)
BigDecimal(String)
Ratio(String)
Char(char)
Str(String)
Regex(String)
Symbolic(f64)
##Inf → INFINITY, ##-Inf → NEG_INFINITY, ##NaN → NAN
Symbol(String)
Keyword(String)
AutoKeyword(String)
::kw / ::alias/kw - the namespace is resolved against the reading
namespace by the evaluator, not by the reader.
AutoSymbol(String)
A symbol whose namespace is auto-resolved the same way. There is no
surface syntax for one; the reader produces it for a bare symbol key in
an auto-resolved namespaced map (#::{a 1}, #::alias{a 1}).
List(Vec<Form>)
Vector(Vec<Form>)
Map(Vec<Form>)
Flat key/value pairs; length is always even.
Set(Vec<Form>)
Quote(Box<Form>)
SyntaxQuote(Box<Form>)
Unquote(Box<Form>)
UnquoteSplice(Box<Form>)
Deref(Box<Form>)
Var(Box<Form>)
#'symbol
Meta(Box<Form>, Box<Form>)
^meta-form annotated-form — raw meta form kept as-is; evaluator
expands shorthand (:kw → {:kw true}, Sym → {:tag Sym}).
AnonFn(Vec<Form>)
#(…) anonymous function literal
TaggedLiteral(String, Box<Form>)
#tag form tagged literal
ReaderCond
All branches are kept; the evaluator filters by :rust.
clauses is flat: [keyword, form, keyword, form, …].
Implementations§
Trait Implementations§
impl StructuralPartialEq for FormKind
Auto Trait Implementations§
impl Freeze for FormKind
impl RefUnwindSafe for FormKind
impl Send for FormKind
impl Sync for FormKind
impl Unpin for FormKind
impl UnsafeUnpin for FormKind
impl UnwindSafe for FormKind
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