node/error: add module skeleton
This commit is contained in:
parent
12271d1c88
commit
ebe7890235
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* This Source Code Form is subject to the terms of the
|
||||
* Mozilla Public License, v. 2.0. If a copy of the MPL
|
||||
* was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
//! This module contains the errors that may surface while
|
||||
//! parsing a YAML event stream into memory.
|
||||
|
||||
use crate::{event::error::ParseError, scanner::error::ScanError};
|
||||
|
||||
/// Result type returned by [`yary::node`](super)
|
||||
pub(crate) type NodeResult<T> = std::result::Result<T, NodeError>;
|
||||
|
||||
/// Possible errors that can be encountered while parsing
|
||||
/// YAML graph structures.
|
||||
#[derive(Debug)]
|
||||
pub(crate) enum NodeError
|
||||
{
|
||||
UndefinedAlias,
|
||||
|
||||
Parser(ParseError),
|
||||
Scanner(ScanError),
|
||||
}
|
|
@ -9,5 +9,6 @@
|
|||
|
||||
use crate::event::types::Slice;
|
||||
|
||||
pub(crate) mod error;
|
||||
mod graph;
|
||||
mod nodes;
|
||||
|
|
Loading…
Reference in New Issue