pub trait IncludeResolver: Send + Sync {
// Required method
fn resolve(
&self,
name: &str,
request: &IncludeRequest<'_>,
) -> Option<Vec<Token>>;
}Expand description
Produces content for named [include] placeholders.
resolve returns None for a name this resolver does not claim, which is
not an error: it means no handler owns that placeholder, and the include is
dropped so the page renders without it. That matches what a client does with
an unresolved include, so a missing handler looks the same whichever side
notices it.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".