Skip to main content

fail

Function fail 

Source
pub(crate) fn fail(ftx: &FunctionContext<'_>) -> ResolveResult
Expand description

A function that gives us access to the [FunctionContext]. All functions have can accept this context as their first argument. The context is helpful for several reasons:

  1. Creating shadowed variables using cloned contexts (see the filter and map functions for example).
  2. Functions that are fallible can return an error message using ftx.error(…) which attaches some helpful context for the error.