Enum asexp::sexp::Sexp
[−]
[src]
pub enum Sexp { Atom(Atom), Tuple(Vec<Sexp>), Array(Vec<Sexp>), Map(Vec<(Sexp, Sexp)>), }
Variants
Atom(Atom)
Tuple(Vec<Sexp>)
Array(Vec<Sexp>)
Map(Vec<(Sexp, Sexp)>)
Methods
impl Sexp
[src]
fn is_atom(&self) -> bool
fn is_flat(&self) -> bool
fn into_map(self) -> Result<BTreeMap<String, Sexp>, &'static str>
Converts a Sexp::Map into a BTreeMap
fn get_uint(&self) -> Option<u64>
fn get_int(&self) -> Option<i64>
fn get_float(&self) -> Option<f64>
fn get_str(&self) -> Option<&str>
fn get_vec<'a, F, R>(&'a self, f: F) -> Option<Vec<R>> where
F: Fn(&'a Sexp) -> Option<R>,
F: Fn(&'a Sexp) -> Option<R>,
fn get_uint_vec(&self) -> Option<Vec<u64>>
fn parse_iter<'a, I>(iter: I) -> Result<Sexp, ()> where
I: Iterator<Item = Token<'a>>,
I: Iterator<Item = Token<'a>>,
fn parse(s: &str) -> Result<Sexp, ()>
fn parse_toplevel(s: &str) -> Result<Sexp, ()>
Trait Implementations
impl Debug for Sexp
[src]
impl PartialEq for Sexp
[src]
fn eq(&self, __arg_0: &Sexp) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Sexp) -> bool
This method tests for !=
.
impl Clone for Sexp
[src]
fn clone(&self) -> Sexp
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T> From<T> for Sexp where
T: Into<Atom>,
[src]
T: Into<Atom>,
impl From<()> for Sexp
[src]
impl<A> From<(A,)> for Sexp where
A: Into<Sexp>,
[src]
A: Into<Sexp>,
impl<A, B> From<(A, B)> for Sexp where
A: Into<Sexp>,
B: Into<Sexp>,
[src]
A: Into<Sexp>,
B: Into<Sexp>,
impl<A, B, C> From<(A, B, C)> for Sexp where
A: Into<Sexp>,
B: Into<Sexp>,
C: Into<Sexp>,
[src]
A: Into<Sexp>,
B: Into<Sexp>,
C: Into<Sexp>,
impl<A, B, C, D> From<(A, B, C, D)> for Sexp where
A: Into<Sexp>,
B: Into<Sexp>,
C: Into<Sexp>,
D: Into<Sexp>,
[src]
A: Into<Sexp>,
B: Into<Sexp>,
C: Into<Sexp>,
D: Into<Sexp>,
impl<A> From<Vec<A>> for Sexp where
A: Into<Sexp>,
[src]
A: Into<Sexp>,