Skip to main content

NativeVclBackendShim

Struct NativeVclBackendShim 

Source
pub struct NativeVclBackendShim;
Expand description

Placeholder backend implementation for native Varnish backends.

This type exists only to satisfy the trait bounds for Backend<S, T> when wrapping native backends. None of its methods should ever be called.

Trait Implementations§

Source§

impl Debug for NativeVclBackendShim

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl VclBackend<NativeVclResponseShim> for NativeVclBackendShim

Source§

fn get_response( &self, _ctx: &mut Ctx<'_>, ) -> Result<Option<NativeVclResponseShim>, VclError>

If the VCL pick this backend (or a director ended up choosing it), this method gets called so that the VclBackend implementer can: Read more
Source§

fn finish(&self, _ctx: &mut Ctx<'_>)

Once a backend transaction is finished, the Backend has a chance to clean up, collect data and others in the finish methods.
Source§

fn probe(&self, _ctx: &mut Ctx<'_>) -> (bool, SystemTime)

Is your backend healthy, and when did its health change for the last time.
Source§

fn pipe(&self, ctx: &mut Ctx<'_>, _tcp_stream: TcpStream) -> StreamClose

If your backend is used inside vcl_pipe, this method is in charge of sending the request headers that Varnish already read, and then the body. The second argument, a TcpStream is the raw client stream that Varnish was using (converted from a raw fd). Read more
Source§

fn event(&self, _event: VclEvent)

The method will get called when the VCL changes temperature or is discarded. It’s notably a chance to start/stop probes to consume fewer resources.
Source§

fn panic(&self, _vsb: &mut Buffer<'_>)

Source§

fn report(&self, ctx: &mut Ctx<'_>, vsb: &mut Buffer<'_>)

Generate simple report output for varnishadm backend.list (no flags) Read more
Source§

fn report_details(&self, _ctx: &mut Ctx<'_>, _vsb: &mut Buffer<'_>)

Generate detailed report output for varnishadm backend.list -p Read more
Source§

fn report_json(&self, ctx: &mut Ctx<'_>, vsb: &mut Buffer<'_>)

Generate simple JSON report output for varnishadm backend.list -j Read more
Source§

fn report_details_json(&self, _ctx: &mut Ctx<'_>, vsb: &mut Buffer<'_>)

Generate detailed JSON report output for varnishadm backend.list -j -p Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.