pub struct RewritePlugin { /* private fields */ }Expand description
Process-wide RewritePlugin singleton storing a CompiledRewrite.
Implementations§
Source§impl RewritePlugin
Process-wide singleton management for RewritePlugin.
impl RewritePlugin
Process-wide singleton management for RewritePlugin.
Sourcepub fn init(config: RewriteConfig) -> Result<&'static Self, RewriteError>
pub fn init(config: RewriteConfig) -> Result<&'static Self, RewriteError>
Compiles config and initializes the global RewritePlugin once.
§Arguments
RewriteConfig- Rewrite and redirect configuration.
§Returns
Result<&'static Self, RewriteError>- Reference to the initialized global plugin or compilation error.
Sourcepub fn get() -> Option<&'static Self>
pub fn get() -> Option<&'static Self>
Returns the initialized global RewritePlugin, if initialized.
§Returns
Option<&'static Self>- Reference to the global plugin, orNone.
Sourcepub fn get_compiled(&self) -> &CompiledRewrite
pub fn get_compiled(&self) -> &CompiledRewrite
Returns the compiled CompiledRewrite engine.
§Returns
&CompiledRewrite- Precompiled rewrite engine.
Trait Implementations§
Source§impl Clone for RewritePlugin
impl Clone for RewritePlugin
Auto Trait Implementations§
impl Forget for RewritePlugin
impl Freeze for RewritePluginwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<ExactRewriteRule>: Freeze,
PhantomData<PrefixRewriteRule>: Freeze,
PhantomData<RegexRewriteRule>: Freeze,
PhantomData<fn() -> XxHash3_64>: Freeze,
PhantomData<(String, CompiledExactTarget)>: Freeze,
PhantomData<CompiledPrefixRule>: Freeze,
PhantomData<CompiledRegexRule>: Freeze,
impl Move for RewritePlugin
impl RefUnwindSafe for RewritePluginwhere
Atomic<usize>: RefUnwindSafe,
Pool<Cache, Box<dyn Fn() -> Cache + Sync + UnwindSafe + RefUnwindSafe + Send>>: RefUnwindSafe,
impl Send for RewritePlugin
impl Sync for RewritePlugin
impl Unpin for RewritePlugin
impl UnsafeUnpin for RewritePluginwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ExactRewriteRule>: UnsafeUnpin,
PhantomData<PrefixRewriteRule>: UnsafeUnpin,
PhantomData<RegexRewriteRule>: UnsafeUnpin,
PhantomData<fn() -> XxHash3_64>: UnsafeUnpin,
PhantomData<(String, CompiledExactTarget)>: UnsafeUnpin,
PhantomData<CompiledPrefixRule>: UnsafeUnpin,
PhantomData<CompiledRegexRule>: UnsafeUnpin,
impl UnwindSafe for RewritePluginwhere
RawVecInner: UnwindSafe,
HashMap<String, CompiledExactTarget, BuildHasherDefault<XxHash3_64>>: UnwindSafe,
Arc<RegexI>: UnwindSafe,
BoxRaw<Pool<Cache, Box<dyn Fn() -> Cache + Sync + UnwindSafe + RefUnwindSafe + Send>>>: UnwindSafe,
Arc<str>: UnwindSafe,
Blanket Implementations§
impl<T> AnySend for T
impl<T> AnySendClone for T
impl<T> AnySendSync for T
impl<T> AnySendSyncClone for T
impl<T> AnySync for T
impl<T> AnySyncClone for T
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