varnish 0.6.0

A Rust framework for creating Varnish Caching Proxy extensions
Documentation
---
source: varnish-macros/src/tests.rs
---
mod event {
    #[allow(non_snake_case, unused_imports, unused_qualifications, unused_variables)]
    #[allow(clippy::needless_question_mark, clippy::new_without_default)]
    #[automatically_derived]
    mod varnish_generated {
        use std::ffi::{c_char, c_int, c_uint, c_void, CStr};
        use std::ptr::null;
        use varnish::ffi::{
            VCL_BACKEND, VCL_BLOB, VCL_BOOL, VCL_DURATION, VCL_INT, VCL_IP, VCL_PROBE,
            VCL_REAL, VCL_STRING, VCL_TIME, VCL_VOID, VMOD_ABI_Version, VclEvent,
            vmod_data, vmod_priv, vrt_ctx, VMOD_PRIV_METHODS_MAGIC, vmod_priv_methods,
        };
        use varnish::vcl::{Ctx, IntoVCL, PerVclState, Workspace};
        use super::*;
        unsafe extern "C" fn vmod_c_on_event(
            __ctx: *mut vrt_ctx,
            __vp: *mut vmod_priv,
            __ev: VclEvent,
        ) -> VCL_INT {
            super::on_event(__ev);
            VCL_INT(0)
        }
        #[repr(C)]
        pub struct VmodExports {
            vmod_c_on_event: Option<
                unsafe extern "C" fn(
                    __ctx: *mut vrt_ctx,
                    __vp: *mut vmod_priv,
                    __ev: VclEvent,
                ) -> VCL_INT,
            >,
        }
        pub static VMOD_EXPORTS: VmodExports = VmodExports {
            vmod_c_on_event: Some(vmod_c_on_event),
        };
        #[allow(non_upper_case_globals)]
        #[no_mangle]
        pub static Vmod_event_Data: vmod_data = vmod_data {
            vrt_major: 0,
            vrt_minor: 0,
            file_id: c"4d1200f410ef454f543f699d77aaa0ff7e3c4d4fdc8395b6771c294c71d409a2"
                .as_ptr(),
            name: c"event".as_ptr(),
            func_name: c"Vmod_vmod_event_Func".as_ptr(),
            func_len: ::std::mem::size_of::<VmodExports>() as c_int,
            func: &VMOD_EXPORTS as *const _ as *const c_void,
            abi: VMOD_ABI_Version.as_ptr(),
            json: JSON.as_ptr(),
            proto: null(),
            vcs: c"".as_ptr(),
            version: c"".as_ptr(),
        };
        const JSON: &CStr = c"(moved to @json.snap files)";
    }
    use varnish::vcl::Event;
    /// Event function - the comment is ignored
    pub fn on_event(event: Event) {}
}