Skip to main content

DeliveryProcessor

Trait DeliveryProcessor 

Source
pub trait DeliveryProcessor: Sized {
    // Required methods
    fn name() -> &'static CStr;
    fn new(
        vrt_ctx: &mut Ctx<'_>,
        vdp_ctx: &mut DeliveryProcCtx<'_>,
    ) -> InitResult<Self>;
    fn push(
        &mut self,
        ctx: &mut DeliveryProcCtx<'_>,
        act: VdpAction,
        buf: &[u8],
    ) -> PushResult;
}
Expand description

Describes a Varnish Delivery Processor (VDP)

Required Methods§

Source

fn name() -> &'static CStr

The name of the processor.

Source

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

Create a new processor, possibly using knowledge from the pipeline, or from the current request.

Source

fn push( &mut self, ctx: &mut DeliveryProcCtx<'_>, act: VdpAction, buf: &[u8], ) -> PushResult

Handle the data buffer from the previous processor. This function generally uses DeliveryProcCtx::push to push data to the next processor.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§