pub struct Processor { /* private fields */ }
Expand description
An instance of the ESI processor with a given configuration.
Implementations
sourceimpl Processor
impl Processor
sourcepub fn new(configuration: Configuration) -> Self
pub fn new(configuration: Configuration) -> Self
Construct a new ESI processor with the given configuration.
sourceimpl Processor
impl Processor
sourcepub fn execute_esi(
&self,
original_request: Request,
document: Response,
request_handler: &dyn Fn(Request) -> Result<Response, ExecutionError>
) -> Result<(), ExecutionError>
pub fn execute_esi(
&self,
original_request: Request,
document: Response,
request_handler: &dyn Fn(Request) -> Result<Response, ExecutionError>
) -> Result<(), ExecutionError>
Execute the ESI document (document
) using the provided client request (original_request
) as context,
and stream the resulting output to the client.
The request_handler
parameter is a closure that is called for each ESI fragment request.
sourcepub fn execute_esi_fragment(
&self,
original_request: Request,
xml_reader: Reader<Body>,
xml_writer: &mut Writer<StreamingBody>,
request_handler: &dyn Fn(Request) -> Result<Response, ExecutionError>
) -> Result<(), ExecutionError>
pub fn execute_esi_fragment(
&self,
original_request: Request,
xml_reader: Reader<Body>,
xml_writer: &mut Writer<StreamingBody>,
request_handler: &dyn Fn(Request) -> Result<Response, ExecutionError>
) -> Result<(), ExecutionError>
Execute the ESI fragment (fragment
) using the provided client request (original_request
) as context.
Rather than sending the result of the execution to the client, this function will write XML tags directly
to the given xml_writer
, allowing for nesting.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Processor
impl Send for Processor
impl Sync for Processor
impl Unpin for Processor
impl UnwindSafe for Processor
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