Enum symbolic_expressions::Sexp[][src]

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

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

String shape: hello List shape: (…) `Empty shape:

Variants

String(String)

Tuple Fields

0: String

plain String symbolic-expression

List(Vec<Sexp>)

Tuple Fields

0: Vec<Sexp>

list symbolic-expression

Empty

empty, trivial symbolic-expression

Implementations

👎 Deprecated since 4.0.0:

please use Sexp::default() instead

create an empty symbolic-expression

👎 Deprecated since 4.0.3:

please use .into() instead

create a String type symbolic-expression

👎 Deprecated since 4.0.3:

please use .into() instead

create a list type symbolic-expression

create an empty list type symbolic-expression

push an element in a list

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

shape: (name …)

👎 Deprecated since 4.0.3:

please use .into() instead

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

👎 Deprecated since 4.0.5:

please use .into() on a tuple instead

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, extract the Vec<Sexp> from it 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 an &String

access the symbolic-expression as if it is a String

is this expression a string

is this expression a list

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

👎 Deprecated since 4.1.4:

please use iteratom::IterAtom::new instead

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

as named_value but converted to String

👎 Deprecated since 4.1.4:

please use iteratom::IterAtom::new instead

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

This method tests for !=.

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

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.