style: Document style_traits and deny missing docs on it.

This commit is contained in:
Emilio Cobos Álvarez 2016-12-31 03:54:53 +01:00
parent 40a6a1f971
commit 82b6825a86
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 37 additions and 7 deletions

View file

@ -8,14 +8,17 @@ use super::ToCss;
macro_rules! define_cursor {
($( $css: expr => $variant: ident = $value: expr, )+) => {
/// https://drafts.csswg.org/css-ui/#cursor
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize, HeapSizeOf))]
#[repr(u8)]
#[allow(missing_docs)]
pub enum Cursor {
$( $variant = $value ),+
}
impl Cursor {
/// Given a CSS keyword, get the corresponding cursor enum.
pub fn from_css_keyword(keyword: &str) -> Result<Cursor, ()> {
match_ignore_ascii_case! { keyword,
$( concat!($css) => Ok(Cursor::$variant), )+