Introduce #[css(skip)]

This commit is contained in:
Anthony Ramine 2018-03-05 15:37:36 +01:00
parent 7931df716d
commit ca45695db1
8 changed files with 31 additions and 96 deletions

View file

@ -26,10 +26,12 @@ use std::fmt::{self, Write};
/// serialised like unit variants and its fields are surrounded by parentheses;
/// * if `#[css(iterable)]` is found on a function variant, that variant needs
/// to have a single member, and that member needs to be iterable. The
/// iterable will be serialized as the arguments for the function.
/// iterable will be serialized as the arguments for the function;
/// * if `#[css(dimension)]` is found on a variant, that variant needs
/// to have a single member. The variant would be serialized as a CSS
/// dimension token, like: <member><identifier>.
/// dimension token, like: <member><identifier>;
/// * if `#[css(skip)]` is found on a field, the `ToCss` call for that field
/// is skipped;
/// * finally, one can put `#[css(derive_debug)]` on the whole type, to
/// implement `Debug` by a single call to `ToCss::to_css`.
pub trait ToCss {