[−][src]Enum asexp::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]
F: Fn(&'a Sexp) -> Option<R>,
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]
I: Iterator<Item = Token<'a>>,
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(&self) -> 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]
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>,
impl PartialEq<Sexp> for Sexp
[src]
impl Debug for Sexp
[src]
impl Display for Sexp
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,