tinymist_std::typst::diag

Trait Hint

pub trait Hint<T> {
    // Required method
    fn hint(self, hint: impl Into<EcoString>) -> Result<T, HintedString>;
}
Expand description

Enrich a StrResult or HintedStrResult with a hint.

Required Methods§

fn hint(self, hint: impl Into<EcoString>) -> Result<T, HintedString>

Add the hint.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl<T> Hint<T> for Result<T, HintedString>

§

fn hint(self, hint: impl Into<EcoString>) -> Result<T, HintedString>

§

impl<T, S> Hint<T> for Result<T, S>
where S: Into<EcoString>,

§

fn hint(self, hint: impl Into<EcoString>) -> Result<T, HintedString>

Implementors§