tinymist_std::typst::foundations

Trait IntoResult

pub trait IntoResult {
    // Required method
    fn into_result(self, span: Span) -> Result<Value, EcoVec<SourceDiagnostic>>;
}
Expand description

Cast a Rust type or result into a SourceResult<Value>.

Converts T, StrResult<T>, or SourceResult<T> into SourceResult<Value> by Ok-wrapping or adding span information.

Required Methods§

fn into_result(self, span: Span) -> Result<Value, EcoVec<SourceDiagnostic>>

Cast this type into a value.

Implementations on Foreign Types§

§

impl<T> IntoResult for Result<T, HintedString>
where T: IntoValue,

§

fn into_result(self, span: Span) -> Result<Value, EcoVec<SourceDiagnostic>>

§

impl<T> IntoResult for Result<T, EcoString>
where T: IntoValue,

§

fn into_result(self, span: Span) -> Result<Value, EcoVec<SourceDiagnostic>>

§

impl<T> IntoResult for Result<T, EcoVec<SourceDiagnostic>>
where T: IntoValue,

Implementors§

§

impl<T> IntoResult for T
where T: IntoValue,