[][src]Struct newel::EvalCtx

pub struct EvalCtx<'eval> {
    pub tmp1: &'eval mut [u8],
    pub tmp2: &'eval mut [u8],
    pub out: &'eval mut [u8],
}

Every top-level evaluation step in newel happens against an EvalCtx that holds 3 mutable buffers of some multiple of CHUNKSZ bytes. These buffers (and the EvalCtx itself) get used up during the operation. The first two buffers are for holding possible conversions of 1 or 2 inputs to the operation; the third buffer stores the output.

Fields

tmp1: &'eval mut [u8]tmp2: &'eval mut [u8]out: &'eval mut [u8]

Methods

impl<'eval> EvalCtx<'eval>[src]

pub fn conv<'slice: 'eval>(
    self,
    s: &Operand<'slice>,
    ty: ScalarTy
) -> Result<Operand<'eval>, EvalError>
[src]

Convert an Operand to a given ScalarTy.

pub fn val_binop<'slice>(
    self,
    op: ValBinOpCode,
    lhs: &Operand<'slice>,
    rhs: &Operand<'slice>
) -> Result<Operand<'eval>, EvalError> where
    'slice: 'eval, 
[src]

Perform a given ValBinOpCode on a pair of Operands.

pub fn bool_binop<'slice>(
    self,
    op: BoolBinOpCode,
    lhs: &Operand<'slice>,
    rhs: &Operand<'slice>
) -> Result<Operand<'eval>, EvalError> where
    'slice: 'eval, 
[src]

Perform a given BoolBinOpCode on a pair of Operands.

pub fn val_unop<'slice>(
    self,
    op: ValUnOpCode,
    operand: &Operand<'slice>
) -> Result<Operand<'eval>, EvalError> where
    'slice: 'eval, 
[src]

Perform a given ValUnOpCode on a given Operand.

pub fn bool_unop<'slice>(
    self,
    op: BoolUnOpCode,
    operand: &Operand<'slice>
) -> Result<Operand<'eval>, EvalError> where
    'slice: 'eval, 
[src]

Perform a given BoolUnOpCode on a given Operand.

Auto Trait Implementations

impl<'eval> RefUnwindSafe for EvalCtx<'eval>

impl<'eval> Send for EvalCtx<'eval>

impl<'eval> Sync for EvalCtx<'eval>

impl<'eval> Unpin for EvalCtx<'eval>

impl<'eval> !UnwindSafe for EvalCtx<'eval>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> FromCast<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.