[][src]Struct cssparser::TokenSerializationType

pub struct TokenSerializationType(_);

A category of token. See the needs_separator_when_before method.

Methods

impl TokenSerializationType[src]

pub fn nothing() -> TokenSerializationType[src]

Return a value that represents the absence of a token, e.g. before the start of the input.

pub fn set_if_nothing(&mut self, new_value: TokenSerializationType)[src]

If this value is TokenSerializationType::nothing(), set it to the given value instead.

pub fn needs_separator_when_before(self, other: TokenSerializationType) -> bool[src]

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

impl PartialEq<TokenSerializationType> for TokenSerializationType[src]

impl Copy for TokenSerializationType[src]

impl Eq for TokenSerializationType[src]

impl Clone for TokenSerializationType[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for TokenSerializationType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]