[][src]Struct sxd_xpath_visitor::function::Args

pub struct Args<'d>(pub Vec<Value<'d>>);

Provides common utility functions for dealing with function argument lists.

Implementations

impl<'d> Args<'d>[src]

pub fn len(&self) -> usize[src]

pub fn is_empty(&self) -> bool[src]

pub fn at_least(&self, minimum: usize) -> Result<(), Error>[src]

Ensures that there are at least the requested number of arguments.

pub fn at_most(&self, maximum: usize) -> Result<(), Error>[src]

Ensures that there are no more than the requested number of arguments.

pub fn exactly(&self, expected: usize) -> Result<(), Error>[src]

Ensures that there are exactly the requested number of arguments.

pub fn pop_boolean(&mut self) -> Result<bool, Error>[src]

Removes the last argument and ensures it is a boolean. If the argument is not a boolean, it is converted to one.

pub fn pop_number(&mut self) -> Result<f64, Error>[src]

Removes the last argument and ensures it is a number. If the argument is not a number, it is converted to one.

pub fn pop_string(&mut self) -> Result<String, Error>[src]

Removes the last argument and ensures it is a string. If the argument is not a string, it is converted to one.

pub fn pop_nodeset(&mut self) -> Result<Nodeset<'d>, Error>[src]

Removes the last argument and ensures it is a nodeset. If the argument is not a nodeset, a type mismatch error is returned.

Trait Implementations

impl<'d> Index<usize> for Args<'d>[src]

type Output = Value<'d>

The returned type after indexing.

Auto Trait Implementations

impl<'d> !RefUnwindSafe for Args<'d>[src]

impl<'d> !Send for Args<'d>[src]

impl<'d> !Sync for Args<'d>[src]

impl<'d> Unpin for Args<'d>[src]

impl<'d> !UnwindSafe for Args<'d>[src]

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> Downcast for T where
    T: Any
[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.