Struct symbolic_expressions::iteratom::IterAtom[][src]

pub struct IterAtom<'a> {
    pub iter: Peekable<Iter<'a, Sexp>>,
    // some fields omitted
}
Expand description

Atom iterator wrapper

Fields

iter: Peekable<Iter<'a, Sexp>>

containing iterable (pub for now)

Implementations

deconstruct a Sexp that is a list and starts with ‘name’

deconstruct a Sexp that is a list and doesn’t start with a name

expect an integer while iterating a Sexp list

shape: (… … 42 …)

expect a float while iterating a Sexp list

shape: (… … 42.7 …)

expect a String while iterating a Sexp list

shape: (… … hello …)

expect a list contained String while iterating a Sexp list

shape: (… … hello …)

expect a list contained i64 while iterating a Sexp list

shape: (… … (name 42) …)

expect a list contained f64 while iterating a Sexp list

shape: (… … (name 42.7) …)

expect a Sexp while iterating a Sexp list

shape: (… … (…) …)

expect a list containing a Sexp while iterating a Sexp list

shape: (… … (name (…)) …)

expect remainder of iterator to be a Vec<T>

shape: (… T T T)

maybe a FromSexp while iterating a Sexp list

shape: (… … (…) …)

maybe a String while iterating a Sexp list

shape: (… … hello …)

maybe a String while iterating a Sexp list

shape: (… … literal …)

maybe an i64 while iterating a Sexp list

shape: (… … 42 …)

maybe an f64 while iterating a Sexp list

shape: (… … 42.7 …)

maybe a list containing a String while iterating a Sexp list

shape: (… … (name hello) …)

maybe a list containing an i64 while iterating a Sexp list

shape: (… … (name 42) …)

maybe a list containing an f64 while iterating a Sexp list

shape: (… … (name 42.7) …)

make sure we consumed all of the iterator

shape: )

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.