Struct sxd_xpath::function::Args
[−]
[src]
pub struct Args<'d>(pub Vec<Value<'d>>);
Provides common utility functions for dealing with function argument lists.
Methods
impl<'d> Args<'d>
[src]
fn len(&self) -> usize
fn is_empty(&self) -> bool
fn at_least(&self, minimum: usize) -> Result<(), Error>
Ensures that there are at least the requested number of arguments.
fn at_most(&self, maximum: usize) -> Result<(), Error>
Ensures that there are no more than the requested number of arguments.
fn exactly(&self, expected: usize) -> Result<(), Error>
Ensures that there are exactly the requested number of arguments.
fn pop_boolean(&mut self) -> Result<bool, Error>
Removes the last argument and ensures it is a boolean. If the argument is not a boolean, a type mismatch error is returned.
fn pop_number(&mut self) -> Result<f64, Error>
Removes the last argument and ensures it is a number. If the argument is not a number, a type mismatch error is returned.
fn pop_string(&mut self) -> Result<String, Error>
Removes the last argument and ensures it is a string. If the argument is not a string, a type mismatch error is returned.
fn pop_nodeset(&mut self) -> Result<Nodeset<'d>, Error>
Removes the last argument and ensures it is a nodeset. If the argument is not a nodeset, a type mismatch error is returned.