[][src]Struct fasteval::parser::Parser

pub struct Parser {
    pub expr_len_limit: usize,
    pub expr_depth_limit: usize,
}

Fields

expr_len_limit: usizeexpr_depth_limit: usize

Methods

impl Parser[src]

pub const fn new() -> Self[src]

pub fn parse(
    &self,
    expr_str: &str,
    slab: &mut ParseSlab
) -> Result<ExpressionI, Error>
[src]

Use this function to parse an expression String. The Slab will be cleared first.

pub fn parse_noclear(
    &self,
    expr_str: &str,
    slab: &mut ParseSlab
) -> Result<ExpressionI, Error>
[src]

This is exactly the same as parse() but the Slab will NOT be cleared. This is useful in performance-critical sections, when you know that you already have an empty Slab.

This function cannot return Result<&Expression> because it would prolong the mut ref. / That's why we return an ExpressionI instead.

Trait Implementations

impl Default for Parser[src]

Auto Trait Implementations

impl RefUnwindSafe for Parser

impl Send for Parser

impl Sync for Parser

impl Unpin for Parser

impl UnwindSafe for Parser

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, 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.