Trait css_parser::ASTNode [−][src]
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]
reader: &mut impl TokenReader<CSSToken, Span>
) -> Result<Self, ParseError>
fn to_string_from_buffer(
&self,
buf: &mut ToStringer<'_>,
settings: &ToStringSettings,
depth: u8
)[src]
&self,
buf: &mut ToStringer<'_>,
settings: &ToStringSettings,
depth: u8
)
Depth indicates the indentation of current block
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
Implementors
impl ASTNode for CSSValue[src]
fn from_reader(
reader: &mut impl TokenReader<CSSToken, Span>
) -> Result<Self, ParseError>[src]
reader: &mut impl TokenReader<CSSToken, Span>
) -> Result<Self, ParseError>
fn to_string_from_buffer(
&self,
buf: &mut ToStringer<'_>,
settings: &ToStringSettings,
depth: u8
)[src]
&self,
buf: &mut ToStringer<'_>,
settings: &ToStringSettings,
depth: u8
)
fn get_position(&self) -> Option<&Span>[src]
impl ASTNode for Rule[src]
fn from_reader(
reader: &mut impl TokenReader<CSSToken, Span>
) -> Result<Self, ParseError>[src]
reader: &mut impl TokenReader<CSSToken, Span>
) -> Result<Self, ParseError>
fn to_string_from_buffer(
&self,
buf: &mut ToStringer<'_>,
settings: &ToStringSettings,
depth: u8
)[src]
&self,
buf: &mut ToStringer<'_>,
settings: &ToStringSettings,
depth: u8
)
fn get_position(&self) -> Option<&Span>[src]
impl ASTNode for Selector[src]
fn from_reader(
reader: &mut impl TokenReader<CSSToken, Span>
) -> Result<Self, ParseError>[src]
reader: &mut impl TokenReader<CSSToken, Span>
) -> Result<Self, ParseError>
fn to_string_from_buffer(
&self,
buf: &mut ToStringer<'_>,
settings: &ToStringSettings,
depth: u8
)[src]
&self,
buf: &mut ToStringer<'_>,
settings: &ToStringSettings,
depth: u8
)
fn get_position(&self) -> Option<&Span>[src]
impl ASTNode for StyleSheet[src]
fn from_reader(
reader: &mut impl TokenReader<CSSToken, Span>
) -> Result<Self, ParseError>[src]
reader: &mut impl TokenReader<CSSToken, Span>
) -> Result<Self, ParseError>
fn to_string_from_buffer(
&self,
buf: &mut ToStringer<'_>,
settings: &ToStringSettings,
_depth: u8
)[src]
&self,
buf: &mut ToStringer<'_>,
settings: &ToStringSettings,
_depth: u8
)