pub struct NativeVclResponseShim;Expand description
Placeholder response 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 NativeVclResponseShim
impl Debug for NativeVclResponseShim
Source§impl VclBackend<NativeVclResponseShim> for NativeVclBackendShim
impl VclBackend<NativeVclResponseShim> for NativeVclBackendShim
Source§fn get_response(
&self,
_ctx: &mut Ctx<'_>,
) -> Result<Option<NativeVclResponseShim>, VclError>
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 moreSource§fn finish(&self, _ctx: &mut Ctx<'_>)
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)
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
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 moreSource§fn event(&self, _event: VclEvent)
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.
fn panic(&self, _vsb: &mut Buffer<'_>)
Source§fn report(&self, ctx: &mut Ctx<'_>, vsb: &mut Buffer<'_>)
fn report(&self, ctx: &mut Ctx<'_>, vsb: &mut Buffer<'_>)
Generate simple report output for
varnishadm backend.list (no flags) Read moreSource§fn report_details(&self, _ctx: &mut Ctx<'_>, _vsb: &mut Buffer<'_>)
fn report_details(&self, _ctx: &mut Ctx<'_>, _vsb: &mut Buffer<'_>)
Generate detailed report output for
varnishadm backend.list -p Read moreSource§impl VclResponse for NativeVclResponseShim
impl VclResponse for NativeVclResponseShim
Source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, VclError>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, VclError>
The only mandatory method, it will be called repeated so that the
VclResponse object can
fill buf. The transfer will stop if any of its calls returns an error, and it will
complete successfully when Ok(0) is returned. Read moreAuto Trait Implementations§
impl Freeze for NativeVclResponseShim
impl RefUnwindSafe for NativeVclResponseShim
impl Send for NativeVclResponseShim
impl Sync for NativeVclResponseShim
impl Unpin for NativeVclResponseShim
impl UnsafeUnpin for NativeVclResponseShim
impl UnwindSafe for NativeVclResponseShim
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more