pub struct EdgeHeadersPlugin;Expand description
Postprocess plugin that emits per-platform edge header config.
Reads crate::cmd::EdgeHeadersConfig off the plugin context’s
config.edge_headers field; for each recognised entry in
targets, invokes the corresponding emitter. The plugin is a
no-op when targets is empty, when config is None, or when
site_dir does not yet exist.
§Examples
use ssg::plugin::Plugin;
use ssg::postprocess::edge_headers::EdgeHeadersPlugin;
assert_eq!(EdgeHeadersPlugin::new().name(), "edge-headers");Implementations§
Trait Implementations§
Source§impl Clone for EdgeHeadersPlugin
impl Clone for EdgeHeadersPlugin
Source§fn clone(&self) -> EdgeHeadersPlugin
fn clone(&self) -> EdgeHeadersPlugin
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 EdgeHeadersPlugin
Source§impl Debug for EdgeHeadersPlugin
impl Debug for EdgeHeadersPlugin
Source§impl Default for EdgeHeadersPlugin
impl Default for EdgeHeadersPlugin
Source§fn default() -> EdgeHeadersPlugin
fn default() -> EdgeHeadersPlugin
Returns the “default value” for a type. Read more
Source§impl Plugin for EdgeHeadersPlugin
impl Plugin for EdgeHeadersPlugin
Source§fn transform_html(
&self,
html: &str,
path: &Path,
ctx: &PluginContext,
) -> Result<String, SsgError>
fn transform_html( &self, html: &str, path: &Path, ctx: &PluginContext, ) -> Result<String, SsgError>
Pass-through transform that records the page’s hash-strict CSP (spec B4) and re-emits the platform files. Returns the input HTML unchanged — this hook is an observation point, not a rewrite; it runs last in the fused pass so it sees the final shipped bytes (post-CSP-extraction, post-minify).
Source§fn after_compile(&self, ctx: &PluginContext) -> Result<(), SsgError>
fn after_compile(&self, ctx: &PluginContext) -> Result<(), SsgError>
Called after site compilation completes. Read more
Source§fn has_transform(&self) -> bool
fn has_transform(&self) -> bool
Returns
true if this plugin implements transform_html.
Override to true to opt in to the fused transform pass.Source§fn before_compile(&self, _ctx: &PluginContext) -> Result<(), SsgError>
fn before_compile(&self, _ctx: &PluginContext) -> Result<(), SsgError>
Called before site compilation begins. Read more
Source§fn needs_all_files(&self) -> bool
fn needs_all_files(&self) -> bool
Returns
true if this plugin must always observe the full
cache.html_files() list — even during --incremental
rebuilds that only invalidated a handful of pages. Read moreAuto Trait Implementations§
impl Freeze for EdgeHeadersPlugin
impl RefUnwindSafe for EdgeHeadersPlugin
impl Send for EdgeHeadersPlugin
impl Sync for EdgeHeadersPlugin
impl Unpin for EdgeHeadersPlugin
impl UnsafeUnpin for EdgeHeadersPlugin
impl UnwindSafe for EdgeHeadersPlugin
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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