[−][src]Struct arithmetic_eval::CallContext
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]
&self,
args: &[SpannedValue<'a, T>],
expected_count: impl Into<LvalueLen>
) -> Result<(), SpannedEvalError<'a>>
Checks argument count and returns an error if it doesn't match.
Trait Implementations
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,
'a: 'r,
impl<'r, 'a> !UnwindSafe for CallContext<'r, 'a>
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> From<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>,