/// Construct a result from an error.
Construct a result from an error.
Construct a result from an error .
fn from_error<E>(
        error: E,
        diagnostics_output: Option<String>,
        diagnostics: Vec<Diagnostic>,
        instructions: Option<String>,
    ) -> Self
    where
        E: fmt::Display,
    {
        Self {
            error: Some(error.to_string()),
            diagnostics_output,
            diagnostics,
            result: None,
            output: core::drain_output(),
            instructions,
        }
    }
fn from_error < E > ( error : E , diagnostics_output : Option < String > , diagnostics : Vec < Diagnostic > , instructions : Option < String > , ) -> Self where E : fmt :: Display , { Self { error : Some ( error . to_string ( ) ) , diagnostics_output , diagnostics , result : None , output : core :: drain_output ( ) , instructions , } }
Construct a result from an error.
Construct a result from an error .
error
E
diagnostics_output
Option<String>
diagnostics
Vec<Diagnostic>
instructions
Option<String>