IntoGroupOperand

Trait IntoGroupOperand 

Source
pub trait IntoGroupOperand<D: VeScalar, Mapping: M> {
    // Required method
    fn into_group_operand(self) -> GroupOperand<D, Mapping>;
}
Expand description

Trait for converting various types into a group operand.

Uses Into<VeBranchOperand> blanket impl for automatic conversion from types that implement From for VeBranchOperand (i32, f32, Stash, etc.).

§Supported types

  • () - skip operation for this group
  • i32, f32 - constant value (via Into<VeBranchOperand>)
  • Stash - stash read marker (via Into<VeBranchOperand>)
  • StashOperand<D> - stash with branch validity (via Into<VeBranchOperand>)
  • VeBranchOperand<D, Mapping> - explicit operand (via Into<VeBranchOperand>)
  • Option<VeBranchOperand<D, Mapping>> - pass through

Required Methods§

Source

fn into_group_operand(self) -> GroupOperand<D, Mapping>

Converts into a GroupOperand with the specified mapping.

Implementations on Foreign Types§

Source§

impl<D: VeScalar, Mapping: M> IntoGroupOperand<D, Mapping> for Option<VeBranchOperand<D, Mapping>>

Option<VeBranchOperand<D, Mapping>> passes through.

Source§

impl<D: VeScalar, Mapping: M> IntoGroupOperand<D, Mapping> for ()

() represents skipping the operation for this group.

Implementors§

Source§

impl<T, D: VeScalar, Mapping: M> IntoGroupOperand<D, Mapping> for T
where T: Into<VeBranchOperand<D, Mapping>>,

Blanket impl: any type that implements Into<VeBranchOperand> automatically implements IntoGroupOperand by wrapping in Some.