Skip to main content

SP1OperationOutput

Trait SP1OperationOutput 

Source
pub trait SP1OperationOutput<T> {
    // Required methods
    fn alloc() -> T;
    fn to_output(&self, ctx: &mut FuncCtx) -> T;
    fn assign(&self, other: T);
}
Expand description

Trait for handling operation outputs in SP1.

This trait provides methods for allocating and assigning operation outputs.

Required Methods§

Source

fn alloc() -> T

Allocates space for the output and returns the allocated value.

Source

fn to_output(&self, ctx: &mut FuncCtx) -> T

Replace all contents with IrVar(Output…)

Source

fn assign(&self, other: T)

Assigns the output.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SP1OperationOutput<()> for ()

Source§

fn alloc()

Source§

fn to_output(&self, _: &mut FuncCtx)

Source§

fn assign(&self, (): Self)

Source§

impl<const N: usize> SP1OperationOutput<[ExprRef<<ConstraintCompiler as AirBuilder>::F>; N]> for [ExprRef<<ConstraintCompiler as AirBuilder>::F>; N]

Source§

fn alloc() -> Self

Source§

fn to_output(&self, ctx: &mut FuncCtx) -> Self

Source§

fn assign(&self, other: Self)

Implementors§