tiptap-rusty-parser 0.3.8

Fast schema-agnostic parser and manipulator for Tiptap/ProseMirror JSONContent documents
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Error types.

use thiserror::Error;

/// Errors produced while parsing or serializing a document.
#[derive(Debug, Error)]
pub enum ParseError {
    /// Underlying `serde_json` (de)serialization failure.
    #[error("json error: {0}")]
    Json(#[from] serde_json::Error),

    /// I/O failure while reading from a reader.
    #[error("io error: {0}")]
    Io(#[from] std::io::Error),
}

/// Crate result alias.
pub type Result<T> = std::result::Result<T, ParseError>;