iri-rfc3987 0.1.6

Zero-copy parsing, validation, and resolution for Internationalized Resource Identifiers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Shared parser result type and the `err!` early-return macro.

use crate::error::IriParseError;

pub(super) type Result<T> = core::result::Result<T, IriParseError>;

/// Returns immediately with an error.
macro_rules! err {
    ($index:expr, $kind:ident) => {
        return Err($crate::error::IriParseError {
            index: $index,
            kind: $crate::error::IriParseErrorKind::$kind,
        })
    };
}

pub(super) use err;