Type Alias StrResult

Source
pub type StrResult<T> = Result<T, EcoString>;
Expand description

A result type with a string error message.

Aliased Type§

pub enum StrResult<T> {
    Ok(T),
    Err(EcoString),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(EcoString)

Contains the error value

Trait Implementations§

Source§

impl<T: IntoValue> IntoResult for StrResult<T>

Source§

fn into_result(self, span: Span) -> SourceResult<Value>

Cast this type into a value.
Source§

impl<T: Reflect> Reflect for StrResult<T>

Source§

fn input() -> CastInfo

Describe what can be cast into this value.
Source§

fn output() -> CastInfo

Describe what this value can be cast into.
Source§

fn castable(value: &Value) -> bool

Whether the given value can be converted to T. Read more
Source§

fn error(found: &Value) -> HintedString

Produce an error message for an unacceptable value type. Read more