Type Alias style::custom_properties::SpecifiedValue
source · pub type SpecifiedValue = VariableValue;
Expand description
Both specified and computed values are VariableValues, the difference is whether var() functions are expanded.
Aliased Type§
struct SpecifiedValue {
css: String,
first_token_type: TokenSerializationType,
last_token_type: TokenSerializationType,
references: VarOrEnvReferences,
}
Fields§
§css: String
§first_token_type: TokenSerializationType
§last_token_type: TokenSerializationType
§references: VarOrEnvReferences
var() or env() references.
Implementations§
source§impl VariableValue
impl VariableValue
fn empty() -> Self
fn push<'i>( &mut self, input: &Parser<'i, '_>, css: &str, css_first_token_type: TokenSerializationType, css_last_token_type: TokenSerializationType ) -> Result<(), ParseError<'i>>
fn push_from<'i>( &mut self, input: &Parser<'i, '_>, position: (SourcePosition, TokenSerializationType), last_token_type: TokenSerializationType ) -> Result<(), ParseError<'i>>
fn push_variable<'i>( &mut self, input: &Parser<'i, '_>, variable: &ComputedValue ) -> Result<(), ParseError<'i>>
sourcepub fn parse<'i, 't>(
input: &mut Parser<'i, 't>
) -> Result<Arc<Self>, ParseError<'i>>
pub fn parse<'i, 't>( input: &mut Parser<'i, 't> ) -> Result<Arc<Self>, ParseError<'i>>
Parse a custom property value.
sourcefn int_pixels(number: i32) -> Self
fn int_pixels(number: i32) -> Self
Create VariableValue from an integer amount of CSS pixels.
fn from_token(token: Token<'_>) -> Self
sourcepub fn has_references(&self) -> bool
pub fn has_references(&self) -> bool
Returns whether this variable value has any reference to the environment or other variables.
Trait Implementations§
source§impl Clone for VariableValue
impl Clone for VariableValue
source§fn clone(&self) -> VariableValue
fn clone(&self) -> VariableValue
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VariableValue
impl Debug for VariableValue
source§impl MallocSizeOf for VariableValue
impl MallocSizeOf for VariableValue
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl PartialEq<VariableValue> for VariableValue
impl PartialEq<VariableValue> for VariableValue
source§fn eq(&self, other: &VariableValue) -> bool
fn eq(&self, other: &VariableValue) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.