[−][src]Struct newel::EvalCtx
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]
self,
s: &Operand<'slice>,
ty: ScalarTy
) -> Result<Operand<'eval>, EvalError>
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]
self,
op: ValBinOpCode,
lhs: &Operand<'slice>,
rhs: &Operand<'slice>
) -> Result<Operand<'eval>, EvalError> where
'slice: 'eval,
Perform a given ValBinOpCode
on a pair of Operand
s.
pub fn bool_binop<'slice>(
self,
op: BoolBinOpCode,
lhs: &Operand<'slice>,
rhs: &Operand<'slice>
) -> Result<Operand<'eval>, EvalError> where
'slice: 'eval,
[src]
self,
op: BoolBinOpCode,
lhs: &Operand<'slice>,
rhs: &Operand<'slice>
) -> Result<Operand<'eval>, EvalError> where
'slice: 'eval,
Perform a given BoolBinOpCode
on a pair of Operand
s.
pub fn val_unop<'slice>(
self,
op: ValUnOpCode,
operand: &Operand<'slice>
) -> Result<Operand<'eval>, EvalError> where
'slice: 'eval,
[src]
self,
op: ValUnOpCode,
operand: &Operand<'slice>
) -> Result<Operand<'eval>, EvalError> where
'slice: 'eval,
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]
self,
op: BoolUnOpCode,
operand: &Operand<'slice>
) -> Result<Operand<'eval>, EvalError> where
'slice: 'eval,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
[src]
U: FromCast<T>,
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]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,