Struct cssparser::TokenSerializationType
source · pub struct TokenSerializationType(_);
Expand description
A category of token. See the needs_separator_when_before
method.
Implementations§
source§impl TokenSerializationType
impl TokenSerializationType
sourcepub fn nothing() -> TokenSerializationType
pub fn nothing() -> TokenSerializationType
Return a value that represents the absence of a token, e.g. before the start of the input.
sourcepub fn set_if_nothing(&mut self, new_value: TokenSerializationType)
pub fn set_if_nothing(&mut self, new_value: TokenSerializationType)
If this value is TokenSerializationType::nothing()
, set it to the given value instead.
sourcepub fn needs_separator_when_before(self, other: TokenSerializationType) -> bool
pub fn needs_separator_when_before(self, other: TokenSerializationType) -> bool
Return true if, when a token of category self
is serialized just before
a token of category other
with no whitespace in between,
an empty comment /**/
needs to be inserted between them
so that they are not re-parsed as a single token.
See https://drafts.csswg.org/css-syntax/#serialization
Trait Implementations§
source§impl Clone for TokenSerializationType
impl Clone for TokenSerializationType
source§fn clone(&self) -> TokenSerializationType
fn clone(&self) -> TokenSerializationType
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 more