pub struct StaticContext { /* private fields */ }
Implementations§
Source§impl StaticContext
impl StaticContext
pub fn from_namespaces(namespaces: Namespaces) -> StaticContext
pub fn namespaces(&self) -> &Namespaces
pub fn variable_names(&self) -> &HashSet<OwnedName, RandomState>
pub fn default_collation(&self) -> Result<Rc<Collation>, Error>
pub fn default_collation_uri(&self) -> &RiReferenceStr<IriSpec>
pub fn static_base_uri(&self) -> Option<&RiAbsoluteStr<IriSpec>>
Sourcepub fn parse_xpath(&self, s: &str) -> Result<XPath, ParserError>
pub fn parse_xpath(&self, s: &str) -> Result<XPath, ParserError>
Given an XPath string, parse into an XPath AST
This uses the namespaces and variable names with which this static context has been initialized.
Sourcepub fn parse_value_template_xpath(&self, s: &str) -> Result<XPath, ParserError>
pub fn parse_value_template_xpath(&self, s: &str) -> Result<XPath, ParserError>
Parse an XPath string as it would appear in an XSLT value template.
This means it should have a closing }
following the xpath expression.
Sourcepub fn function_by_id(
&self,
static_function_id: StaticFunctionId,
) -> &StaticFunction
pub fn function_by_id( &self, static_function_id: StaticFunctionId, ) -> &StaticFunction
Get a static function by id
Sourcepub fn function_id_by_name(
&self,
name: &OwnedName,
arity: u8,
) -> Option<StaticFunctionId>
pub fn function_id_by_name( &self, name: &OwnedName, arity: u8, ) -> Option<StaticFunctionId>
Get a static function by name and arity
Sourcepub fn function_id_by_internal_name(
&self,
name: &OwnedName,
arity: u8,
) -> Option<StaticFunctionId>
pub fn function_id_by_internal_name( &self, name: &OwnedName, arity: u8, ) -> Option<StaticFunctionId>
Get an internal static function by name and arity
Trait Implementations§
Source§impl Debug for StaticContext
impl Debug for StaticContext
Source§impl Default for StaticContext
impl Default for StaticContext
Source§fn default() -> StaticContext
fn default() -> StaticContext
Returns the “default value” for a type. Read more
Source§impl From<XPathParserContext> for StaticContext
impl From<XPathParserContext> for StaticContext
Source§fn from(parser_context: XPathParserContext) -> StaticContext
fn from(parser_context: XPathParserContext) -> StaticContext
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for StaticContext
impl !RefUnwindSafe for StaticContext
impl !Send for StaticContext
impl !Sync for StaticContext
impl Unpin for StaticContext
impl UnwindSafe for StaticContext
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> 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 more