pub struct InstructionsCodegen {
pub code: String,
pub stack_entries: Vec<StackInstructionEntry>,
pub needs_runtime_import: bool,
pub needs_program_runtime_extensions: bool,
pub needs_amount_input: bool,
pub needs_resolve_amount_to_raw: bool,
pub needs_to_raw_amount: bool,
pub warnings: Vec<String>,
pub pda_degradations: Vec<PdaDegradation>,
}Expand description
Result of generating instruction handler code for a stack.
Fields§
§code: StringGenerated TypeScript: program-error consts, per-instruction param/error types and handler consts. Empty when there are no emittable handlers.
stack_entries: Vec<StackInstructionEntry>Entries to wire into the stack definition’s instructions block.
needs_runtime_import: boolWhether the generated code references the @usearete/sdk runtime
(createInstructionHandler / ErrorMetadata).
needs_program_runtime_extensions: boolWhether generated program definitions need runtime semantic wrappers.
needs_amount_input: boolWhether generated semantic wrappers reference AmountInput.
needs_resolve_amount_to_raw: boolWhether generated semantic wrappers reference resolveAmountToRaw.
needs_to_raw_amount: boolWhether generated semantic wrappers reference toRawAmount.
warnings: Vec<String>Human-readable warnings (skipped instructions, degraded PDAs).
pda_degradations: Vec<PdaDegradation>Structured PDA degradation metadata for CLI summaries.
Trait Implementations§
Source§impl Clone for InstructionsCodegen
impl Clone for InstructionsCodegen
Source§fn clone(&self) -> InstructionsCodegen
fn clone(&self) -> InstructionsCodegen
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 InstructionsCodegen
impl Debug for InstructionsCodegen
Source§impl Default for InstructionsCodegen
impl Default for InstructionsCodegen
Source§fn default() -> InstructionsCodegen
fn default() -> InstructionsCodegen
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InstructionsCodegen
impl RefUnwindSafe for InstructionsCodegen
impl Send for InstructionsCodegen
impl Sync for InstructionsCodegen
impl Unpin for InstructionsCodegen
impl UnsafeUnpin for InstructionsCodegen
impl UnwindSafe for InstructionsCodegen
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