Skip to main content

CertifiedSelection

Struct CertifiedSelection 

Source
pub struct CertifiedSelection<W, A> {
    pub wasm: W,
    pub arm: Vec<A>,
    pub witness: Option<Witness>,
}
Expand description

A concrete selection produced by the instruction selector.

Generic over the source op W (initially WasmOp) and target op A (initially ArmOp, later RiscvOp). The witness is None when the selector emits the selection and Some(Witness) after the validator accepts it.

Fields§

§wasm: W

The source operation (e.g. WasmOp::I32Add).

§arm: Vec<A>

The target instruction sequence (e.g. [ArmOp::Add { ... }]).

§witness: Option<Witness>

Witness attached by the validator (None until validated).

Implementations§

Source§

impl<W, A> CertifiedSelection<W, A>

Source

pub fn new(wasm: W, arm: Vec<A>) -> Self

Create a new selection with no witness attached.

Source

pub fn with_witness(self, witness: Witness) -> Self

Attach a witness, marking this selection as validated.

Source

pub fn is_certified(&self) -> bool

Whether this selection has been validated.

Trait Implementations§

Source§

impl<W: Clone, A: Clone> Clone for CertifiedSelection<W, A>

Source§

fn clone(&self) -> CertifiedSelection<W, A>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<W: Debug, A: Debug> Debug for CertifiedSelection<W, A>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<W, A> Freeze for CertifiedSelection<W, A>
where W: Freeze,

§

impl<W, A> RefUnwindSafe for CertifiedSelection<W, A>

§

impl<W, A> Send for CertifiedSelection<W, A>
where W: Send, A: Send,

§

impl<W, A> Sync for CertifiedSelection<W, A>
where W: Sync, A: Sync,

§

impl<W, A> Unpin for CertifiedSelection<W, A>
where W: Unpin, A: Unpin,

§

impl<W, A> UnsafeUnpin for CertifiedSelection<W, A>
where W: UnsafeUnpin,

§

impl<W, A> UnwindSafe for CertifiedSelection<W, A>
where W: UnwindSafe, A: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V