[][src]Struct fasteval::parser::ExpressionI

pub struct ExpressionI(pub usize);

An ExpressionI represents an index into Slab.ps.exprs.

It behaves much like a pointer or reference, but it is 'safe' (unlike a raw pointer) and is not managed by the Rust borrow checker (unlike a reference).

Methods

impl ExpressionI[src]

pub fn from(self, ps: &ParseSlab) -> &Expression[src]

Gets an Expression reference from the ParseSlab.

This is actually just a convenience function built on top of ParseSlab.get_expr, but it enables you to perform the entire parse/compile/eval process in one line without upsetting the Rust borrow checker. (If you didn't have this function, the borrow checker would force you to split the process into at least two lines.)

Trait Implementations

impl Clone for ExpressionI[src]

impl Copy for ExpressionI[src]

impl Debug for ExpressionI[src]

impl PartialEq<ExpressionI> for ExpressionI[src]

impl StructuralPartialEq for ExpressionI[src]

Auto Trait Implementations

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> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.