[][src]Enum asexp::sexp::Sexp

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]

pub fn is_atom(&self) -> bool[src]

pub fn is_flat(&self) -> bool[src]

pub fn into_map(self) -> Result<BTreeMap<String, Sexp>, &'static str>[src]

Converts a Sexp::Map into a BTreeMap<String, Sexp> if possible.

pub fn get_uint(&self) -> Option<u64>[src]

pub fn get_int(&self) -> Option<i64>[src]

pub fn get_float(&self) -> Option<f64>[src]

pub fn get_str(&self) -> Option<&str>[src]

pub fn get_vec<'a, F, R>(&'a self, f: F) -> Option<Vec<R>> where
    F: Fn(&'a Sexp) -> Option<R>, 
[src]

pub fn get_uint_vec(&self) -> Option<Vec<u64>>[src]

pub fn parse_iter<'a, I>(iter: I) -> Result<Sexp, ()> where
    I: Iterator<Item = Token<'a>>, 
[src]

pub fn parse(s: &str) -> Result<Sexp, ()>[src]

pub fn parse_toplevel(s: &str) -> Result<Sexp, ()>[src]

Trait Implementations

impl Clone for Sexp[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T> From<T> for Sexp where
    T: Into<Atom>, 
[src]

impl From<()> for Sexp[src]

impl<A> From<(A,)> for Sexp where
    A: Into<Sexp>, 
[src]

impl<A, B> From<(A, B)> for Sexp where
    A: Into<Sexp>,
    B: Into<Sexp>, 
[src]

impl<A, B, C> From<(A, B, C)> for Sexp where
    A: Into<Sexp>,
    B: Into<Sexp>,
    C: Into<Sexp>, 
[src]

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]

impl<A> From<Vec<A>> for Sexp where
    A: Into<Sexp>, 
[src]

impl PartialEq<Sexp> for Sexp[src]

impl Debug for Sexp[src]

impl Display for Sexp[src]

Auto Trait Implementations

impl Send for Sexp

impl Sync for Sexp

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]