pub enum CSSValue {
Keyword(String),
Function(String, Vec<CSSValue>),
StringLiteral(String),
Number(Number),
NumberWithUnit(Number, String),
Percentage(Number),
Color(String),
List(Vec<CSSValue>),
CommaSeparatedList(Vec<CSSValue>),
}
Variants§
Keyword(String)
Function(String, Vec<CSSValue>)
StringLiteral(String)
Number(Number)
NumberWithUnit(Number, String)
Percentage(Number)
Color(String)
List(Vec<CSSValue>)
CommaSeparatedList(Vec<CSSValue>)
Trait Implementations§
Source§impl ASTNode for CSSValue
impl ASTNode for CSSValue
fn from_reader( reader: &mut impl TokenReader<CSSToken, Span>, ) -> Result<Self, ParseError>
Source§fn to_string_from_buffer(
&self,
buf: &mut impl ToString,
settings: &ToStringSettings,
depth: u8,
)
fn to_string_from_buffer( &self, buf: &mut impl ToString, settings: &ToStringSettings, depth: u8, )
Depth indicates the indentation of current block
Source§fn get_position(&self) -> Option<&Span>
fn get_position(&self) -> Option<&Span>
Returns position of node as span as it was parsed. May be invalid or none after mutation
Source§fn from_string(
string: String,
source_id: SourceId,
offset: Option<usize>,
) -> Result<Self, ParseError>
fn from_string( string: String, source_id: SourceId, offset: Option<usize>, ) -> Result<Self, ParseError>
Parses structure from string
Source§fn to_string(&self, settings: &ToStringSettings) -> String
fn to_string(&self, settings: &ToStringSettings) -> String
Returns structure as valid string. If
SourceMap
passed will add mappings to SourceMapimpl Eq for CSSValue
impl StructuralPartialEq for CSSValue
Auto Trait Implementations§
impl Freeze for CSSValue
impl RefUnwindSafe for CSSValue
impl Send for CSSValue
impl Sync for CSSValue
impl Unpin for CSSValue
impl UnwindSafe for CSSValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more