Enum script::xpath::parser::CoreFunction
source · pub enum CoreFunction {
Show 27 variants
Last,
Position,
Count(Box<Expr>),
Id(Box<Expr>),
LocalName(Option<Box<Expr>>),
NamespaceUri(Option<Box<Expr>>),
Name(Option<Box<Expr>>),
String(Option<Box<Expr>>),
Concat(Vec<Expr>),
StartsWith(Box<Expr>, Box<Expr>),
Contains(Box<Expr>, Box<Expr>),
SubstringBefore(Box<Expr>, Box<Expr>),
SubstringAfter(Box<Expr>, Box<Expr>),
Substring(Box<Expr>, Box<Expr>, Option<Box<Expr>>),
StringLength(Option<Box<Expr>>),
NormalizeSpace(Option<Box<Expr>>),
Translate(Box<Expr>, Box<Expr>, Box<Expr>),
Number(Option<Box<Expr>>),
Sum(Box<Expr>),
Floor(Box<Expr>),
Ceiling(Box<Expr>),
Round(Box<Expr>),
Boolean(Box<Expr>),
Not(Box<Expr>),
True,
False,
Lang(Box<Expr>),
}
Expand description
In the DOM we do not support custom functions, so we can enumerate the usable ones
Variants§
Last
last()
Position
position()
Count(Box<Expr>)
count(node-set)
Id(Box<Expr>)
id(object)
LocalName(Option<Box<Expr>>)
local-name(node-set?)
NamespaceUri(Option<Box<Expr>>)
namespace-uri(node-set?)
Name(Option<Box<Expr>>)
name(node-set?)
String(Option<Box<Expr>>)
string(object?)
Concat(Vec<Expr>)
concat(string, string, …)
StartsWith(Box<Expr>, Box<Expr>)
starts-with(string, string)
Contains(Box<Expr>, Box<Expr>)
contains(string, string)
SubstringBefore(Box<Expr>, Box<Expr>)
substring-before(string, string)
SubstringAfter(Box<Expr>, Box<Expr>)
substring-after(string, string)
Substring(Box<Expr>, Box<Expr>, Option<Box<Expr>>)
substring(string, number, number?)
StringLength(Option<Box<Expr>>)
string-length(string?)
NormalizeSpace(Option<Box<Expr>>)
normalize-space(string?)
Translate(Box<Expr>, Box<Expr>, Box<Expr>)
translate(string, string, string)
Number(Option<Box<Expr>>)
number(object?)
Sum(Box<Expr>)
sum(node-set)
Floor(Box<Expr>)
floor(number)
Ceiling(Box<Expr>)
ceiling(number)
Round(Box<Expr>)
round(number)
Boolean(Box<Expr>)
boolean(object)
Not(Box<Expr>)
not(boolean)
True
true()
False
false()
Lang(Box<Expr>)
lang(string)
Implementations§
Trait Implementations§
source§impl Clone for CoreFunction
impl Clone for CoreFunction
source§fn clone(&self) -> CoreFunction
fn clone(&self) -> CoreFunction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CoreFunction
impl Debug for CoreFunction
source§impl Evaluatable for CoreFunction
impl Evaluatable for CoreFunction
source§impl MallocSizeOf for CoreFunction
impl MallocSizeOf for CoreFunction
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl PartialEq for CoreFunction
impl PartialEq for CoreFunction
impl StructuralPartialEq for CoreFunction
Auto Trait Implementations§
impl Freeze for CoreFunction
impl RefUnwindSafe for CoreFunction
impl Send for CoreFunction
impl Sync for CoreFunction
impl Unpin for CoreFunction
impl UnwindSafe for CoreFunction
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert