Enum kicad_parse_gen::Sexp [] [src]

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

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

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

Variants

plain String symbolic-expression

list symbolic-expression

empty, trivial symbolic-expression

Methods

impl Sexp
[src]

[src]

Deprecated since 4.0.0

: please use Sexp::default() instead

create an empty symbolic-expression

[src]

Deprecated since 4.0.3

: please use .into() instead

create a String type symbolic-expression

[src]

Deprecated since 4.0.3

: please use .into() instead

create a list type symbolic-expression

[src]

create an empty list type symbolic-expression

[src]

push an element in a list

[src]

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 ...)

[src]

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

[src]

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

[src]

if the expression is a list, extract the Vec<Sexp> from it and swap it with Empty

[src]

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

[src]

create a symbolic-expression via the IntoSexp trait

[src]

access the symbolic-expression as if it is a List

[src]

access the symbolic-expression as if it is an &String

[src]

access the symbolic-expression as if it is a String

[src]

is this expression a string

[src]

is this expression a list

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

as named_value but converted to i64

[src]

as named_value but converted to f64

[src]

as named_value but converted to &String

[src]

as named_value but converted to String

[src]

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

impl Clone for Sexp
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> From<(&'a str, Sexp)> for Sexp
[src]

[src]

Performs the conversion.

impl<'a> From<&'a String> for Sexp
[src]

[src]

Performs the conversion.

impl<'a, T> From<(&'a str, &'a T)> for Sexp where
    T: Display
[src]

[src]

Performs the conversion.

impl<'a> From<&'a str> for Sexp
[src]

[src]

Performs the conversion.

impl PartialEq<Sexp> for Sexp
[src]

[src]

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

[src]

This method tests for !=.

impl Debug for Sexp
[src]

[src]

Formats the value using the given formatter.

impl Display for Sexp
[src]

[src]

Formats the value using the given formatter. Read more

impl Default for Sexp
[src]

[src]

Returns the "default value" for a type. Read more