Struct jmespath::functions::Signature
[−]
[src]
pub struct Signature { pub inputs: Vec<ArgumentType>, pub variadic: Option<ArgumentType>, }
Represents a function's signature.
Fields
inputs: Vec<ArgumentType>
variadic: Option<ArgumentType>
Methods
impl Signature
[src]
fn new(inputs: Vec<ArgumentType>, variadic: Option<ArgumentType>) -> Signature
Creates a new Signature struct.
fn validate_arity(
&self,
actual: usize,
ctx: &Context
) -> Result<(), JmespathError>
&self,
actual: usize,
ctx: &Context
) -> Result<(), JmespathError>
Validates the arity of a function. If the arity is invalid, a runtime error is returned with the relative position of the error and the expression that was being executed.
fn validate(&self, args: &[Rcvar], ctx: &Context) -> Result<(), JmespathError>
Validates the provided function arguments against the signature.
Trait Implementations
impl Clone for Signature
[src]
fn clone(&self) -> Signature
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Signature
[src]
fn eq(&self, __arg_0: &Signature) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Signature) -> bool
This method tests for !=
.