-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathmod.rs
70 lines (66 loc) · 1.93 KB
/
mod.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
mod buffer;
mod pool;
/// The prelude module.
///
/// This module provides common constants and types that are used in NGINX modules.
pub mod prelude;
mod status;
mod string;
pub use buffer::*;
pub use pool::*;
pub use status::*;
pub use string::*;
/// Static empty configuration directive initializer for [`ngx_command_t`].
///
/// This is typically used to terminate an array of configuration directives.
///
/// [`ngx_command_t`]: https://nginx.org/en/docs/dev/development_guide.html#config_directives
#[macro_export]
macro_rules! ngx_null_command {
() => {
$crate::ffi::ngx_command_t {
name: $crate::ngx_null_string!(),
type_: 0,
set: None,
conf: 0,
offset: 0,
post: ::core::ptr::null_mut(),
}
};
}
/// Static empty configuration variable initializer for [`ngx_http_variable_t`].
///
/// This is typically used to terminate an array of HTTP variable types.
///
/// [`ngx_http_variable_t`]: https://nginx.org/en/docs/dev/development_guide.html#http_variables
#[macro_export]
macro_rules! ngx_http_null_variable {
() => {
$crate::ffi::ngx_http_variable_t {
name: $crate::ngx_null_string!(),
set_handler: None,
get_handler: None,
data: 0,
flags: 0,
index: 0,
}
};
}
/// Static empty configuration variable initializer for [`ngx_stream_variable_t`].
///
/// This is typically used to terminate an array of Stream variable types.
///
/// [`ngx_stream_variable_t`]: https://github.com/nginx/nginx/blob/1a8ef991d92d22eb8aded7f49595dd31a639e8a4/src/stream/ngx_stream_variables.h#L21
#[macro_export]
macro_rules! ngx_stream_null_variable {
() => {
$crate::ffi::ngx_stream_variable_t {
name: $crate::ngx_null_string!(),
set_handler: None,
get_handler: None,
data: 0,
flags: 0,
index: 0,
}
};
}