pub struct Capabilities {
pub parse: Option<ParseCapability>,
pub transform: Option<TransformCapability>,
pub render: Option<RenderCapability>,
pub max_concurrency: Option<u32>,
pub cache: Option<String>,
pub syntax: Syntax,
}Expand description
What a plugin can do. A phase the plugin does not support is omitted.
Fields§
§parse: Option<ParseCapability>Present if the plugin handles request::Parse.
transform: Option<TransformCapability>Present if the plugin handles the transform requests.
render: Option<RenderCapability>Present if the plugin handles request::Render.
max_concurrency: Option<u32>Most requests the plugin can work on at once; omitted means no limit. Python plugins report 1 because of the GIL.
cache: Option<String>Present if the plugin’s results may be cached: they depend only on the request, the site settings, the plugin’s name, version and options, and this key. A plugin that reads anything else (say, a template file its options name) puts a digest of it in the key, so the cache is invalidated when that changes. Omitted means never cache.
syntax: SyntaxDirectives and roles the plugin handles. The host passes every
plugin’s syntax to parsers (ParseParams::syntax), which turn it
into custom nodes for the plugin to transform.