Enum symbolic_expressions::Sexp [] [src]

pub enum Sexp {
    String(String),
    List(Vec<Sexp>),
    Empty,
}

a symbolic-expression Can be a string or a list or nothing

Variants

plain String symbolic-expression

list symbolic-expression

empty, trivial symbolic-expression

Methods

impl Sexp
[src]

create an empty symbolic-expression

create a String type symbolic-expression

create a list type symbolic-expression

create a list type symbolic-expression where the first element of the list is a string that indicates the name, the remainder is filled in via the provided fill function

create a list type symbolic-expression where the first element of the list is a string that indicates the name

create a list type symbolic-expression where the first element of the list is a string that indicates the name, and the second is another symbolic-expression created via the IntoSexp trait

if the expression is a list, take out the list and swap it with Empty

if the expression is a string, take it out and swap it with Empty

create a symbolic-expression via the IntoSexp trait

access the symbolic-expression as if it is a List

access the symbolic-expression as if it is a String

access the symbolic-expression as if it is a String that is a f64

access the symbolic-expression as if it is a String that is an i64

access the symbolic-expression as if it is a List assuming the first element is a String and return that

access the symbolic-expression as if it is a named List where the name is provided and returns the remaining elements after the name as a slice

access the symbolic-expression as if it is a named List with two elements where the name is provided and returns the next element in the list

as named_value but converted to i64

as named_value but converted to f64

as named_value but converted to String

get the symbolic-expression as a list which starts with a string that indicates the name and has num more elements, returns those elements

Trait Implementations

impl Debug for Sexp
[src]

Formats the value using the given formatter.

impl Clone for Sexp
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Sexp
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Display for Sexp
[src]

Formats the value using the given formatter.