DynamicContext

Struct DynamicContext 

Source
pub struct DynamicContext<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> DynamicContext<'a>

Source

pub fn static_context(&self) -> &StaticContext

The static context of the program.

Source

pub fn context_item(&self) -> Option<&Item>

Access the context item, if any.

Source

pub fn documents(&self) -> DocumentsRef

The documents in this context.

Source

pub fn variables(&self) -> &AHashMap<OwnedName, Sequence>

The variables in this context.

Source

pub fn default_collection(&self) -> Option<&Sequence>

Access the default collection

Source

pub fn collection(&self, uri: &RiStr<IriSpec>) -> Option<&Sequence>

Access a collection by URI

Source

pub fn default_uri_collection(&self) -> Option<&Sequence>

Access the default URI collection

Source

pub fn uri_collection(&self, uri: &RiStr<IriSpec>) -> Option<&Sequence>

Access a URI collection by URI

Note that the URI does not have to be a proper URI as the specification defines it as an xs:string

Source

pub fn environment_variable(&self, name: &str) -> Option<&str>

Access an environment variable by name

Source

pub fn environment_variable_names(&self) -> impl Iterator<Item = &str>

Access all environment variable names

Source

pub fn implicit_timezone(&self) -> FixedOffset

Source

pub fn function_info<'b>(&self, function: &'b Function) -> FunctionInfo<'a, 'b>

Access information about a Function.

Trait Implementations§

Source§

impl<'a> Debug for DynamicContext<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for DynamicContext<'a>

§

impl<'a> !RefUnwindSafe for DynamicContext<'a>

§

impl<'a> !Send for DynamicContext<'a>

§

impl<'a> !Sync for DynamicContext<'a>

§

impl<'a> Unpin for DynamicContext<'a>

§

impl<'a> !UnwindSafe for DynamicContext<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<'src, T> IntoMaybe<'src, T> for T
where T: 'src,

Source§

type Proj<U: 'src> = U

Source§

fn map_maybe<R>( self, _f: impl FnOnce(&'src T) -> &'src R, g: impl FnOnce(T) -> R, ) -> <T as IntoMaybe<'src, T>>::Proj<R>
where R: 'src,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T