1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2025 mdcat contributors
// 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/.
//! Typed errors for the rendering library.
//!
//! [`RenderError`] distinguishes IO failures from image-protocol and
//! SVG rasterisation failures so callers can pattern-match on the
//! failure category without probing an `ErrorKind`. `std::io::Error`
//! still drives the state machine internally and auto-wraps via
//! `#[from]`, so `?` on an `io::Result` works directly in any
//! function returning [`RenderResult`].
use Error;
/// Errors that occur while rendering markdown to a terminal.
///
/// This is the error type for the library entry point [`push_tty`][crate::push_tty]
/// and the render module's internal helpers. Callers typically don't need to
/// distinguish the variants — printing the error (including its `Display`
/// implementation, which quotes the inner cause) is enough.
/// `Result` type used throughout the rendering library.
pub type RenderResult<T> = Result;