1// Copyright 2014-2017 The html5ever Project Developers. See the
2// COPYRIGHT file at the top-level directory of this distribution.
3//
4// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7// option. This file may not be copied, modified, or distributed
8// except according to those terms.
9
10#![allow(unexpected_cfgs)]
11// This error is coming from code generated by PHF which we cannot directly fix
12#![allow(clippy::empty_line_after_doc_comments)]
13
14pub use tendril;
15
16/// Create a [`SmallCharSet`], with each space-separated number stored in the set.
17///
18/// # Examples
19///
20/// ```
21/// # #[macro_use] extern crate markup5ever;
22/// # fn main() {
23/// let set = small_char_set!(12 54 42);
24/// assert_eq!(set.bits,
25/// 0b00000000_01000000_00000100_00000000_00000000_00000000_00010000_00000000);
26/// # }
27/// ```
28///
29/// [`SmallCharSet`]: struct.SmallCharSet.html
30#[macro_export]
31macro_rules! small_char_set ( ($($e:expr)+) => (
32 $ crate ::SmallCharSet {
33 bits: $( (1 << ($e as usize)) )|+
34 }
35));
36
37include!(concat!(env!("OUT_DIR"), "/generated.rs"));
38
39pub mod data;
40#[macro_use]
41pub mod interface;
42pub mod serialize;
43mod util {
44 pub mod buffer_queue;
45 pub mod smallcharset;
46}
47
48pub use interface::{Attribute, ExpandedName, QualName};
49pub use util::smallcharset::SmallCharSet;
50pub use util::*;
51

Provided by KDAB

Privacy Policy
Learn Rust with the experts
Find out more