tinymist_std::error

Type Alias Result

Source
pub type Result<T, Err = Error> = Result<T, Err>;
Expand description

The result type used in the tinymist crate.

Aliased Type§

enum Result<T, Err = Error> {
    Ok(T),
    Err(Err),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Err)

Contains the error value

Trait Implementations§

Source§

impl<T, E: Display> IgnoreLogging<T> for Result<T, E>

Source§

fn log_error(self, msg: &str) -> Option<T>

Log an error message and return None.
Source§

fn log_error_with(self, f: impl FnOnce() -> String) -> Option<T>

Log an error message and return None.
Source§

impl<T, E: ErrKindExt> WithContext<T> for Result<T, E>

Source§

fn context(self, loc: &'static str) -> Result<T>

Add a context to the result.
Source§

fn with_context<F>(self, loc: &'static str, f: F) -> Result<T>
where F: FnOnce() -> Option<Box<[(&'static str, String)]>>,

Add a context to the result with additional arguments.
Source§

impl<T, E: Display> WithContextUntyped<T> for Result<T, E>

Source§

fn context_ut(self, loc: &'static str) -> Result<T>

Add a context to the result.
Source§

fn with_context_ut<F>(self, loc: &'static str, f: F) -> Result<T>
where F: FnOnce() -> Option<Box<[(&'static str, String)]>>,

Add a context to the result with additional arguments.