ratex-parser 0.1.1

LaTeX parser for RaTeX
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

#[derive(Debug, Error)]
pub enum MhchemError {
    #[error("mhchem: {0}")]
    Msg(String),
    #[error("extra close brace or missing open brace")]
    ExtraClose,
}

impl MhchemError {
    pub fn msg(s: impl Into<String>) -> Self {
        MhchemError::Msg(s.into())
    }
}

pub type MhchemResult<T> = Result<T, MhchemError>;