varnish_sys::vcl

Trait FetchProcessor

Source
pub trait FetchProcessor: Sized {
    // Required methods
    fn name() -> &'static CStr;
    fn new(
        vrt_ctx: &mut Ctx<'_>,
        vfp_ctx: &mut FetchProcCtx<'_>,
    ) -> InitResult<Self>;
    fn pull(&mut self, ctx: &mut FetchProcCtx<'_>, buf: &mut [u8]) -> PullResult;
}
Expand description

Describes a Varnish Fetch Processor (VFP)

Required Methods§

Source

fn name() -> &'static CStr

The name of the processor.

Source

fn new( vrt_ctx: &mut Ctx<'_>, vfp_ctx: &mut FetchProcCtx<'_>, ) -> InitResult<Self>

Create a new processor, possibly using knowledge from the pipeline

Source

fn pull(&mut self, ctx: &mut FetchProcCtx<'_>, buf: &mut [u8]) -> PullResult

Write data into buf, generally using VFP_Suck to collect data from the previous processor.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§