pub struct TokenSerializationType(/* private fields */);
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
See https://github.com/w3c/csswg-drafts/issues/4088 for the
DelimPercent
bits.
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 moresource§impl Debug for TokenSerializationType
impl Debug for TokenSerializationType
source§impl PartialEq for TokenSerializationType
impl PartialEq for TokenSerializationType
impl Copy for TokenSerializationType
impl Eq for TokenSerializationType
impl StructuralPartialEq for TokenSerializationType
Auto Trait Implementations§
impl Freeze for TokenSerializationType
impl RefUnwindSafe for TokenSerializationType
impl Send for TokenSerializationType
impl Sync for TokenSerializationType
impl Unpin for TokenSerializationType
impl UnwindSafe for TokenSerializationType
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)