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§
Sourcefn new(
vrt_ctx: &mut Ctx<'_>,
vdp_ctx: &mut DeliveryProcCtx<'_>,
) -> InitResult<Self>
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.
Sourcefn push(
&mut self,
ctx: &mut DeliveryProcCtx<'_>,
act: VdpAction,
buf: &[u8],
) -> PushResult
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", so this trait is not object safe.