pub struct CompileResult {
pub contract: Option<ContractNode>,
pub anf: Option<ANFProgram>,
pub diagnostics: Vec<Diagnostic>,
pub success: bool,
pub artifact: Option<RunarArtifact>,
pub script_hex: Option<String>,
pub script_asm: Option<String>,
}Expand description
Rich compilation result that collects ALL diagnostics from ALL passes and returns partial results as they become available.
Unlike the Result<RunarArtifact, String> API, CompileResult never
returns an error — all errors are captured in the diagnostics vector.
Fields§
§contract: Option<ContractNode>The parsed AST (available after pass 1 — parse).
anf: Option<ANFProgram>The A-Normal Form IR (available after pass 4 — ANF lowering).
diagnostics: Vec<Diagnostic>ALL diagnostics from ALL passes (errors + warnings).
success: boolTrue only if there are no error-severity diagnostics.
artifact: Option<RunarArtifact>The final compiled artifact (available if compilation succeeds).
script_hex: Option<String>The hex-encoded Bitcoin Script (available if compilation succeeds).
script_asm: Option<String>The human-readable ASM (available if compilation succeeds).
Auto Trait Implementations§
impl Freeze for CompileResult
impl RefUnwindSafe for CompileResult
impl Send for CompileResult
impl Sync for CompileResult
impl Unpin for CompileResult
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more