pub struct BackendRef { /* private fields */ }Expand description
BackendRef can be created from a VCL_BACKEND and will handle proper
refcounting. When dropped, the refcount will be decreased. This is the
type that director vmods should use when storing backend references,
instead of dealing with VCL_BACKEND directly.
Implementations§
Source§impl BackendRef
impl BackendRef
Sourcepub unsafe fn new(bep: VCL_BACKEND) -> Option<Self>
pub unsafe fn new(bep: VCL_BACKEND) -> Option<Self>
Create a BackendRef from a VCL_BACKEND.
Sourcepub fn probe(&self, ctx: &Ctx<'_>) -> ProbeResult
pub fn probe(&self, ctx: &Ctx<'_>) -> ProbeResult
Test the underlying backend for its health.
Sourcepub unsafe fn vcl_ptr(&self) -> VCL_BACKEND
pub unsafe fn vcl_ptr(&self) -> VCL_BACKEND
Return the C pointer to the underlying backend.
Trait Implementations§
Source§impl<S: VclBackend<T>, T: VclResponse> AsRef<BackendRef> for Backend<S, T>
impl<S: VclBackend<T>, T: VclResponse> AsRef<BackendRef> for Backend<S, T>
Source§fn as_ref(&self) -> &BackendRef
fn as_ref(&self) -> &BackendRef
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<D: VclDirector> AsRef<BackendRef> for Director<D>
impl<D: VclDirector> AsRef<BackendRef> for Director<D>
Source§fn as_ref(&self) -> &BackendRef
fn as_ref(&self) -> &BackendRef
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for BackendRef
impl Clone for BackendRef
Source§fn clone(&self) -> BackendRef
fn clone(&self) -> BackendRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BackendRef
impl Debug for BackendRef
Source§impl Drop for BackendRef
impl Drop for BackendRef
Source§impl IntoVCL<VCL_BACKEND> for BackendRef
impl IntoVCL<VCL_BACKEND> for BackendRef
Auto Trait Implementations§
impl !Send for BackendRef
impl !Sync for BackendRef
impl Freeze for BackendRef
impl RefUnwindSafe for BackendRef
impl Unpin for BackendRef
impl UnsafeUnpin for BackendRef
impl UnwindSafe for BackendRef
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