pub struct VerifyExpr {
pub typecode: Atom,
pub rump: Range<usize>,
pub tail: Box<[ExprFragment]>,
}
Expand description
An expression which can be substituted with variables in the verifier.
All variables are replaced with integers and the expression is broken at each variable into an alternating sequence of literal segments and variable subsitutions. The first symbol is required by the spec to be a constant and has special matching behavior, so it is represented out of band as an atom.
The verifier represents math strings as byte sequences, where the boundaries between math symbols are indicated by setting the 8th bit on the last byte of each symbol. The same compressed representation is used in literal segments so that execution can be simple copying.
Fields§
§typecode: Atom
Atom representation of the first constant symbol in the expression.
rump: Range<usize>
Constant pool reference for the part of the expression after the last variable.
tail: Box<[ExprFragment]>
The parts of the expression up to and including the last variable, as a sequence of literal, variable pairs.
Implementations§
Source§impl VerifyExpr
impl VerifyExpr
Sourcepub fn const_ranges(&self) -> impl Iterator<Item = Range<usize>> + '_
pub fn const_ranges(&self) -> impl Iterator<Item = Range<usize>> + '_
Returns an iterator over runs of constants in the expression, as references into the constant pool.
Trait Implementations§
Source§impl Clone for VerifyExpr
impl Clone for VerifyExpr
Source§fn clone(&self) -> VerifyExpr
fn clone(&self) -> VerifyExpr
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for VerifyExpr
impl Debug for VerifyExpr
Source§impl Default for VerifyExpr
impl Default for VerifyExpr
Source§fn default() -> VerifyExpr
fn default() -> VerifyExpr
Auto Trait Implementations§
impl Freeze for VerifyExpr
impl RefUnwindSafe for VerifyExpr
impl Send for VerifyExpr
impl Sync for VerifyExpr
impl Unpin for VerifyExpr
impl UnwindSafe for VerifyExpr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more