Struct esi::Configuration
source · [−]Expand description
This struct is used to configure optional behaviour within the ESI processor.
Usage Example
let config = esi::Configuration::default()
.with_namespace("app")
.with_recursion();
let processor = esi::Processor::new(config);
Fields
namespace: String
The XML namespace to use when scanning for ESI tags. Defaults to esi
.
recursive: bool
Whether or not to execute nested ESI tags within fetched fragments. Defaults to false
.
Implementations
sourceimpl Configuration
impl Configuration
sourcepub fn with_namespace(self, namespace: impl Into<String>) -> Self
pub fn with_namespace(self, namespace: impl Into<String>) -> Self
Sets an alternative ESI namespace, which is used to identify ESI instructions.
For example, setting this to test
would cause the processor to only match tags like <test:include>
.
sourcepub fn with_recursion(self) -> Self
pub fn with_recursion(self) -> Self
Enables the processing of nested ESI tags within fetched fragments.
Trait Implementations
sourceimpl Clone for Configuration
impl Clone for Configuration
sourcefn clone(&self) -> Configuration
fn clone(&self) -> Configuration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Configuration
impl Debug for Configuration
Auto Trait Implementations
impl RefUnwindSafe for Configuration
impl Send for Configuration
impl Sync for Configuration
impl Unpin for Configuration
impl UnwindSafe for Configuration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more