use crate::Formatted;
pub trait Extra<K: ?Sized> {
fn extra(&self) -> Formatted<'_>;
}
pub enum ReasonKey {}
pub trait Reason {
fn reason(&self) -> Formatted<'_>;
}
impl<T: Extra<ReasonKey> + ?Sized> Reason for T {
#[inline]
fn reason(&self) -> Formatted<'_> {
Extra::<ReasonKey>::extra(self)
}
}
pub enum BlurbKey {}
pub trait Blurb {
fn blurb(&self) -> Formatted<'_>;
}
impl<T: Extra<BlurbKey> + ?Sized> Blurb for T {
#[inline]
fn blurb(&self) -> Formatted<'_> {
Extra::<BlurbKey>::extra(self)
}
}
pub enum HintKey {}
pub trait Hint {
fn hint(&self) -> Formatted<'_>;
}
impl<T: Extra<HintKey> + ?Sized> Hint for T {
#[inline]
fn hint(&self) -> Formatted<'_> {
Extra::<HintKey>::extra(self)
}
}
pub enum HelpKey {}
pub trait Help {
fn help(&self) -> Formatted<'_>;
}
impl<T: Extra<HelpKey> + ?Sized> Help for T {
#[inline]
fn help(&self) -> Formatted<'_> {
Extra::<HelpKey>::extra(self)
}
}