cssengine 0.2.0

CSS Engine to parse and get declarations by class and query
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[derive(Debug)]
pub struct ParseError<'a> {
    pub error: &'static str,
    pub value: &'a str,
}

impl<'a> ParseError<'a> {
    pub const fn new(error: &'static str, value: &'a str) -> Self {
        Self { error, value }
    }
}

impl core::fmt::Display for ParseError<'_> {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}: {}", self.error, self.value)
    }
}