pub struct MetaPixelPlugin { /* private fields */ }Expand description
Meta Pixel plugin.
ⓘ
autumn_web::app()
.routes(routes![index])
.plugin(MetaPixelPlugin::new())
.run()
.await;Implementations§
Source§impl MetaPixelPlugin
impl MetaPixelPlugin
Sourcepub const fn with_config(config: MetaPixelConfig) -> Self
pub const fn with_config(config: MetaPixelConfig) -> Self
Makes the plugin with this config. It reads no files.
Sourcepub const fn consent_policy_version(self, version: u32) -> Self
pub const fn consent_policy_version(self, version: u32) -> Self
Uses the app’s cookie policy version, not consent_policy_version
in config. Pass the same constant that the app gives to
Consent::allows, so a policy change closes the gate.
Sourcepub fn start(self, state: &AppState) -> Result<(), MetaPixelError>
pub fn start(self, state: &AppState) -> Result<(), MetaPixelError>
Loads and checks the config, then shares it with the
MetaPixel extractor. Plugin::build calls it
at startup.
§Errors
Returns MetaPixelError::Config for bad config, and
MetaPixelError::Csp when the CSP blocks the pixel and
csp_check = "error".
Trait Implementations§
Source§impl Clone for MetaPixelPlugin
impl Clone for MetaPixelPlugin
Source§impl Debug for MetaPixelPlugin
impl Debug for MetaPixelPlugin
Source§impl Default for MetaPixelPlugin
impl Default for MetaPixelPlugin
Source§impl Plugin for MetaPixelPlugin
impl Plugin for MetaPixelPlugin
Source§fn name(&self) -> Cow<'static, str>
fn name(&self) -> Cow<'static, str>
Stable identifier used for duplicate-registration detection. Read more
Source§fn contract(&self) -> Option<PluginContract>
fn contract(&self) -> Option<PluginContract>
Declare which
autumn-web versions this plugin supports, and any
experimental surface it knowingly depends on. Read moreSource§fn build(self, app: AppBuilder) -> AppBuilder
fn build(self, app: AppBuilder) -> AppBuilder
Apply this plugin’s configuration to the builder. Read more
Auto Trait Implementations§
impl Forget for MetaPixelPlugin
impl Freeze for MetaPixelPlugin
impl RefUnwindSafe for MetaPixelPlugin
impl Send for MetaPixelPlugin
impl Sync for MetaPixelPlugin
impl Unpin for MetaPixelPlugin
impl UnsafeUnpin for MetaPixelPlugin
impl UnwindSafe for MetaPixelPlugin
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<P> Plugins for Pwhere
P: Plugin,
impl<P> Plugins for Pwhere
P: Plugin,
Source§fn apply(self, app: AppBuilder) -> AppBuilder
fn apply(self, app: AppBuilder) -> AppBuilder
Apply every plugin in this bundle to the builder, in declaration order.
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
Open a deferred
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.