varnish 0.6.0

A Rust framework for creating Varnish Caching Proxy extensions
Documentation
---
source: varnish-macros/src/tests.rs
---
VmodInfo {
    params: VmodParams {
        docs: None,
    },
    ident: "task",
    docs: "",
    funcs: [
        FuncInfo {
            func_type: Event,
            ident: "on_event",
            docs: "",
            has_optional_args: false,
            args: [
                ParamTypeInfo {
                    ident: "evt",
                    docs: "",
                    ty: Event,
                },
                ParamTypeInfo {
                    ident: "ctx",
                    docs: "",
                    ty: Context {
                        is_mut: true,
                    },
                },
                ParamTypeInfo {
                    ident: "vcl",
                    docs: "",
                    ty: SharedPerVclMut,
                },
            ],
            output_ty: Default,
            out_result: false,
        },
        FuncInfo {
            func_type: Function,
            ident: "per_vcl_val",
            docs: "",
            has_optional_args: false,
            args: [
                ParamTypeInfo {
                    ident: "vcl",
                    docs: "This comment is ignored",
                    ty: SharedPerVclRef,
                },
            ],
            output_ty: Default,
            out_result: false,
        },
        FuncInfo {
            func_type: Function,
            ident: "per_vcl_opt",
            docs: "",
            has_optional_args: true,
            args: [
                ParamTypeInfo {
                    ident: "vcl",
                    docs: "",
                    ty: SharedPerVclRef,
                },
                ParamTypeInfo {
                    ident: "op",
                    docs: "",
                    ty: Value(
                        ParamInfo {
                            kind: Optional,
                            default: Null,
                            ty_info: I64,
                        },
                    ),
                },
            ],
            output_ty: Default,
            out_result: false,
        },
        FuncInfo {
            func_type: Function,
            ident: "per_tsk_val",
            docs: "",
            has_optional_args: false,
            args: [
                ParamTypeInfo {
                    ident: "tsk",
                    docs: "",
                    ty: SharedPerTask,
                },
            ],
            output_ty: Default,
            out_result: false,
        },
        FuncInfo {
            func_type: Function,
            ident: "per_tsk_opt",
            docs: "",
            has_optional_args: true,
            args: [
                ParamTypeInfo {
                    ident: "tsk",
                    docs: "",
                    ty: SharedPerTask,
                },
                ParamTypeInfo {
                    ident: "op",
                    docs: "",
                    ty: Value(
                        ParamInfo {
                            kind: Optional,
                            default: Null,
                            ty_info: I64,
                        },
                    ),
                },
            ],
            output_ty: Default,
            out_result: false,
        },
    ],
    objects: [
        ObjInfo {
            ident: "PerVcl",
            docs: "",
            constructor: FuncInfo {
                func_type: Constructor,
                ident: "new",
                docs: "",
                has_optional_args: false,
                args: [
                    ParamTypeInfo {
                        ident: "vcl",
                        docs: "",
                        ty: SharedPerVclMut,
                    },
                ],
                output_ty: SelfType,
                out_result: false,
            },
            destructor: FuncInfo {
                func_type: Destructor,
                ident: "_fini",
                docs: "",
                has_optional_args: false,
                args: [],
                output_ty: Default,
                out_result: false,
            },
            funcs: [
                FuncInfo {
                    func_type: Method,
                    ident: "both",
                    docs: "",
                    has_optional_args: false,
                    args: [
                        ParamTypeInfo {
                            ident: "self",
                            docs: "",
                            ty: SelfType,
                        },
                        ParamTypeInfo {
                            ident: "tsk",
                            docs: "this comment is ignored too",
                            ty: SharedPerTask,
                        },
                        ParamTypeInfo {
                            ident: "vcl",
                            docs: "",
                            ty: SharedPerVclRef,
                        },
                    ],
                    output_ty: Default,
                    out_result: false,
                },
                FuncInfo {
                    func_type: Method,
                    ident: "both_pos",
                    docs: "",
                    has_optional_args: false,
                    args: [
                        ParamTypeInfo {
                            ident: "self",
                            docs: "",
                            ty: SelfType,
                        },
                        ParamTypeInfo {
                            ident: "tsk",
                            docs: "",
                            ty: SharedPerTask,
                        },
                        ParamTypeInfo {
                            ident: "vcl",
                            docs: "",
                            ty: SharedPerVclRef,
                        },
                        ParamTypeInfo {
                            ident: "val",
                            docs: "",
                            ty: Value(
                                ParamInfo {
                                    kind: Regular,
                                    default: Null,
                                    ty_info: I64,
                                },
                            ),
                        },
                    ],
                    output_ty: Default,
                    out_result: false,
                },
                FuncInfo {
                    func_type: Method,
                    ident: "both_opt",
                    docs: "",
                    has_optional_args: true,
                    args: [
                        ParamTypeInfo {
                            ident: "self",
                            docs: "",
                            ty: SelfType,
                        },
                        ParamTypeInfo {
                            ident: "tsk",
                            docs: "",
                            ty: SharedPerTask,
                        },
                        ParamTypeInfo {
                            ident: "vcl",
                            docs: "",
                            ty: SharedPerVclRef,
                        },
                        ParamTypeInfo {
                            ident: "opt",
                            docs: "",
                            ty: Value(
                                ParamInfo {
                                    kind: Optional,
                                    default: Null,
                                    ty_info: I64,
                                },
                            ),
                        },
                    ],
                    output_ty: Default,
                    out_result: false,
                },
            ],
        },
    ],
    shared_types: SharedTypes {
        shared_per_task_ty: Some(
            "PerTask",
        ),
        shared_per_vcl_ty: Some(
            "PerVcl",
        ),
    },
}