Trait css_parser::ASTNode[][src]

pub trait ASTNode: Sized {
    fn get_position(&self) -> Option<&Span>;
fn from_reader(
        reader: &mut impl TokenReader<CSSToken, Span>
    ) -> Result<Self, ParseError>;
fn to_string_from_buffer(
        &self,
        buf: &mut ToStringer<'_>,
        settings: &ToStringSettings,
        depth: u8
    ); fn from_string(string: String) -> Result<Self, ParseError> { ... }
fn to_string(
        &self,
        settings: &ToStringSettings
    ) -> (String, Option<SourceMap>) { ... } }

Required methods

fn get_position(&self) -> Option<&Span>[src]

Returns position of node as span as it was parsed. May be invalid or none after mutation

fn from_reader(
    reader: &mut impl TokenReader<CSSToken, Span>
) -> Result<Self, ParseError>
[src]

fn to_string_from_buffer(
    &self,
    buf: &mut ToStringer<'_>,
    settings: &ToStringSettings,
    depth: u8
)
[src]

Depth indicates the indentation of current block

Loading content...

Provided methods

fn from_string(string: String) -> Result<Self, ParseError>[src]

Parses structure from string

fn to_string(&self, settings: &ToStringSettings) -> (String, Option<SourceMap>)[src]

Returns structure as valid string. If SourceMap passed will add mappings to SourceMap

Loading content...

Implementors

impl ASTNode for CSSValue[src]

impl ASTNode for Rule[src]

impl ASTNode for Selector[src]

impl ASTNode for StyleSheet[src]

Loading content...