Enum kicad_parse_gen::Sexp []

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

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

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

Formats the value using the given formatter.

impl Clone for Sexp

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Display for Sexp

Formats the value using the given formatter.