[][src]Struct arithmetic_eval::CallContext

pub struct CallContext<'r, 'a> { /* fields omitted */ }

Opaque context for native calls.

Implementations

impl<'r, 'a> CallContext<'r, 'a>[src]

pub fn mock() -> Self[src]

Creates a mock call context.

pub fn apply_call_span<T>(&self, value: T) -> Spanned<'a, T>[src]

Returns the call span.

pub fn call_site_error(&self, error: EvalError) -> SpannedEvalError<'a>[src]

Creates the error spanning the call site.

pub fn check_args_count<T: Grammar>(
    &self,
    args: &[SpannedValue<'a, T>],
    expected_count: impl Into<LvalueLen>
) -> Result<(), SpannedEvalError<'a>>
[src]

Checks argument count and returns an error if it doesn't match.

Trait Implementations

impl<'r, 'a> Debug for CallContext<'r, 'a>[src]

Auto Trait Implementations

impl<'r, 'a> RefUnwindSafe for CallContext<'r, 'a>

impl<'r, 'a> Send for CallContext<'r, 'a>

impl<'r, 'a> Sync for CallContext<'r, 'a>

impl<'r, 'a> Unpin for CallContext<'r, 'a> where
    'a: 'r, 

impl<'r, 'a> !UnwindSafe for CallContext<'r, 'a>

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.