pub struct NullLoader;Expand description
Null loader — every load fails. Used as the default when no loader was supplied and the stylesheet doesn’t actually need resolution (i.e. has no xsl:import / xsl:include).
Trait Implementations§
Source§impl Clone for NullLoader
impl Clone for NullLoader
Source§fn clone(&self) -> NullLoader
fn clone(&self) -> NullLoader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NullLoader
Source§impl Debug for NullLoader
impl Debug for NullLoader
Source§impl Default for NullLoader
impl Default for NullLoader
Source§fn default() -> NullLoader
fn default() -> NullLoader
Returns the “default value” for a type. Read more
Source§impl Loader for NullLoader
impl Loader for NullLoader
Source§fn load(&self, href: &str, _base: Option<&str>) -> Result<String, XsltError>
fn load(&self, href: &str, _base: Option<&str>) -> Result<String, XsltError>
Load
href’s contents. Returns the raw source as a UTF-8
string. Implementations should resolve href against
base when href is relative.Source§fn load_parsed(
&self,
href: &str,
base: Option<&str>,
) -> Result<Arc<Document>, XsltError>
fn load_parsed( &self, href: &str, base: Option<&str>, ) -> Result<Arc<Document>, XsltError>
Load
href’s contents and return them as a parsed
sup_xml_tree::dom::Document. Default implementation
calls Self::load and parses fresh each time; loaders
that expect repeated lookups for the same URI (filesystem,
in-memory) should override to cache the parse result
internally so the runtime doc() path doesn’t re-parse
the same XML thousands of times across an apply sweep. Read moreSource§fn resolve(&self, href: &str, base: Option<&str>) -> Result<String, XsltError>
fn resolve(&self, href: &str, base: Option<&str>) -> Result<String, XsltError>
Compute the base URI to use for files imported FROM the
resource at
href. Default: returns href itself
(used as the base for the next level of resolution).Source§fn enumerate(&self, base: Option<&str>) -> Vec<String>
fn enumerate(&self, base: Option<&str>) -> Vec<String>
Enumerate every URI the loader can serve. Returned as
hrefs that, when passed to
Self::load with the same
base, succeed. Called by the XSLT runtime when the
stylesheet uses a dynamic document() / doc() URI
(computed via concat / variables / @attr) — every
enumerated URI is speculatively pre-loaded so that the
runtime call can resolve against the pre-loaded map. Read moreAuto Trait Implementations§
impl Freeze for NullLoader
impl RefUnwindSafe for NullLoader
impl Send for NullLoader
impl Sync for NullLoader
impl Unpin for NullLoader
impl UnsafeUnpin for NullLoader
impl UnwindSafe for NullLoader
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