[−][src]Struct cssparser::TokenSerializationType
A category of token. See the needs_separator_when_before
method.
Implementations
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 Clone for TokenSerializationType
[src]
pub fn clone(&self) -> TokenSerializationType
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for TokenSerializationType
[src]
impl Debug for TokenSerializationType
[src]
impl Eq for TokenSerializationType
[src]
impl PartialEq<TokenSerializationType> for TokenSerializationType
[src]
pub fn eq(&self, other: &TokenSerializationType) -> bool
[src]
pub fn ne(&self, other: &TokenSerializationType) -> bool
[src]
impl StructuralEq for TokenSerializationType
[src]
impl StructuralPartialEq for TokenSerializationType
[src]
Auto Trait Implementations
impl RefUnwindSafe for TokenSerializationType
[src]
impl Send for TokenSerializationType
[src]
impl Sync for TokenSerializationType
[src]
impl Unpin for TokenSerializationType
[src]
impl UnwindSafe for TokenSerializationType
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,