Struct stumpless_sys::stumpless_param
source · #[repr(C)]pub struct stumpless_param {
pub name: [c_char; 33],
pub name_length: usize,
pub value: *mut c_char,
pub value_length: usize,
pub mutex: *mut c_void,
}Expand description
A parameter within a structured data element.
A parameter must have both a name and a value in compliance with RFC 5424.
Fields§
§name: [c_char; 33]The name of the parameter.
The name must be between 1 and 32 characters long and consist only of ASCII characters between ‘!’ and ‘~’, inclusive, with the exception of the ‘=’, ’ ’, ‘]’, and ‘“’ characters, which are not allowed.
Note that the name will be NULL-terminated as of version 1.6.0. In earlier versions it is not NULL-terminated.
If you need to access the name, use the stumpless_(g|s)et_param_name functions. These will protect you from changes in the struct in future versions.
name_length: usizeThe number of characters in name (not including the NULL character).
value: *mut c_charThe value may be any UTF-8 string.
As specified in RFC 5424, the characters ‘“’ (ABNF %d34), ’' (ABNF %d92), and ‘]’ (ABNF %d93) MUST be escaped by placing a backslash character ’' directly before them.
Unlike the name field, value will always be NULL-terminated. This is done to support their use for wel insertion strings.
If you need to access the value, use the stumpless_(g|s)et_param_value functions. These will protect you from changes in the struct in future versions.
value_length: usizeThe number of characters in value (not including the NULL character).
mutex: *mut c_voidA pointer to a mutex which protects all target fields. The exact type of this mutex depends on the build.
Trait Implementations§
source§impl Clone for stumpless_param
impl Clone for stumpless_param
source§fn clone(&self) -> stumpless_param
fn clone(&self) -> stumpless_param
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more