use std::fmt;
/// A card could not be rendered or written.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct RenderFailed(pub String);
impl RenderFailed {
/// A failure with a message.
pub fn new(message: impl Into<String>) -> Self {
Self(message.into())
}
}
impl fmt::Display for RenderFailed {
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter.write_str(&self.0)
}
}
impl std::error::Error for RenderFailed {}