nss_certdata_parser/
lib.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5#[macro_use]
6extern crate nom;
7#[macro_use]
8extern crate quick_error;
9
10pub mod collect;
11pub mod reader;
12pub mod structured;
13pub mod syntax;
14
15pub use collect::CertData;
16pub use reader::{ParseError, ObjectIter};
17pub use structured::{StructureError, TypeError, ValueError,
18                     Object, Certificate, Trust, TrustLevel, Usage};
19
20use std::io;
21
22quick_error! {
23    #[derive(Debug)]
24    pub enum Error {
25        IOError(err: io::Error) {
26            from()
27            description(err.description())
28        }
29        ParseError(err: ParseError) {
30            from()
31            description("parse error")
32        }
33        StructureError(err: StructureError) {
34            from()
35            description(err.description())
36        }
37    }
38}