Enum brane_ast::compile::CompileResult
source · pub enum CompileResult {
Workflow(Workflow, Vec<Warning>),
Unresolved(UnresolvedWorkflow, Vec<Warning>),
Program(Program, Vec<Warning>),
Eof(Error),
Err(Vec<Error>),
}
Expand description
Defines the possible results returned by the compile_program
function.
Variants§
Workflow(Workflow, Vec<Warning>)
It’s a fully processed workflow, and a list of any warnings that occured during compilation.
Unresolved(UnresolvedWorkflow, Vec<Warning>)
It’s a workflow but not yet resolved to an executable one, and a list of any warnings that occured during compilation.
Program(Program, Vec<Warning>)
It’s a (possibly preprocessed) program still a,nd a list of any warnings that occured during compilation.
Eof(Error)
A very specific error has occurred that says that the parser (not the scanner) got an EOF before it was expecting it (i.e., it wants more input).
Err(Vec<Error>)
An (or rather, multiple) error(s) ha(s/ve) occurred.
Implementations§
source§impl CompileResult
impl CompileResult
sourcepub fn unresolved(self) -> (UnresolvedWorkflow, Vec<Warning>)
pub fn unresolved(self) -> (UnresolvedWorkflow, Vec<Warning>)
sourcepub fn eof(self) -> Error
pub fn eof(self) -> Error
Force-unwraps the CompileResult as ‘not enough input’ (a special case of Error).
In whole-workflow files, this should be treated as a full error. However, in snippet cases, detecting this separately may allow them to query for more input instead.
§Returns
The carried Error.
§Panics
This function panics if it was not actually an end-of-file error.
Trait Implementations§
source§impl Debug for CompileResult
impl Debug for CompileResult
Auto Trait Implementations§
impl Freeze for CompileResult
impl !RefUnwindSafe for CompileResult
impl !Send for CompileResult
impl !Sync for CompileResult
impl Unpin for CompileResult
impl !UnwindSafe for CompileResult
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request