serenade-view 1.0.0

HTML view helpers: path, asset, partials (no template engine)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! View helper errors.

use thiserror::Error;

/// Error from view helpers such as [`crate::asset`].
#[derive(Clone, Debug, Eq, Error, PartialEq)]
#[error("{0}")]
pub struct ViewError(pub String);

impl ViewError {
    pub(crate) fn msg(message: impl Into<String>) -> Self {
        Self(message.into())
    }
}