pub struct CompileResult {
pub ok: bool,
pub disassembly: Option<String>,
pub diagnostics: Vec<MonacoDiagnostic>,
}Expand description
the result of compile. read by the playground’s editor (the diagnostic
underlines) and its bytecode panel (the disassembly).
the flat ok-flag shape rather than a serde-tagged enum: the playground
branches on ok and reads a plain JavaScript object. derives
serde::Serialize so the WASM bridge hands it straight to JS via
serde-wasm-bindgen.
Fields§
§ok: booltrue on a clean compile (warnings are allowed), false on any error.
disassembly: Option<String>the optimized bytecode disassembly; Some on success, None on error.
diagnostics: Vec<MonacoDiagnostic>warnings on success, errors on failure – MonacoDiagnostic::severity
distinguishes the two so the playground renders both from one array.
Trait Implementations§
Source§impl Clone for CompileResult
impl Clone for CompileResult
Source§fn clone(&self) -> CompileResult
fn clone(&self) -> CompileResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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 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