pub trait XIncludeResourceResolver {
// Provided methods
fn resolve_xml(
&mut self,
href: &URIStr,
accept: Option<&str>,
accept_language: Option<&str>,
) -> Option<XIncludeResource> { ... }
fn resolve_text(
&mut self,
href: &URIStr,
accept: Option<&str>,
accept_language: Option<&str>,
) -> Option<XIncludeResource> { ... }
}Expand description
Resource resolver for processing {http://www.w3.org/2001/XInclude}include elements.
By default, neither method does anything; they simply return None.
Provided Methods§
Sourcefn resolve_xml(
&mut self,
href: &URIStr,
accept: Option<&str>,
accept_language: Option<&str>,
) -> Option<XIncludeResource>
fn resolve_xml( &mut self, href: &URIStr, accept: Option<&str>, accept_language: Option<&str>, ) -> Option<XIncludeResource>
Resolver for XML resources.
When fetching resources via HTTP, accept and accept_language must be set
as the values of the Accept and Accept-Language headers, respectively.
§Reference
Sourcefn resolve_text(
&mut self,
href: &URIStr,
accept: Option<&str>,
accept_language: Option<&str>,
) -> Option<XIncludeResource>
fn resolve_text( &mut self, href: &URIStr, accept: Option<&str>, accept_language: Option<&str>, ) -> Option<XIncludeResource>
Resolver for text resources.
When fetching resources via HTTP, accept and accept_language must be set
as the values of the Accept and Accept-Language headers, respectively.
Since text resources themselves have no encoding resolution mechanisms,
it is recommended to provide as accurate encoding information as possible.
If the acquired resource is an XML resource, setting the media type appropriately
can provide an opportunity to utilize XML’s encoding resolution mechanism.
§Reference
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".