#[repr(C)]pub struct stumpless_element {
pub name: [c_char; 33],
pub name_length: usize,
pub params: *mut *mut stumpless_param,
pub param_count: usize,
pub mutex: *mut c_void,
}Expand description
An element of structured data.
Elements must have a name, but may or may not have any parameters. Their components must comply with RFC 5424.
Fields§
§name: [c_char; 33]The name of the element.
As specified in RFC 5424, the ‘=’, ‘]’, ‘“’ characters are not allowed in element names. In addition, the ‘@’ character is only allowed in names that are private. All other characters between ‘!’ and ‘~’, inclusive, are allowed.
According to the standard names must either be private (of the form
name@
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_element_name functions. These will protect you from changes in the struct in future versions.
name_length: usizeThe number of characters in name.
params: *mut *mut stumpless_paramThe parameters this element contains.
This is an array of pointers to param structures. Use the param_count member to iterate through the array if needed. This may be NULL if there are no params in the element, but not necessarily - the param_count is the only way to tell for sure.
param_count: usizeThe number of params in the array.
mutex: *mut c_voidA pointer to a mutex which protects all element fields. The exact type of this mutex depends on the build.
Trait Implementations§
Source§impl Clone for stumpless_element
impl Clone for stumpless_element
Source§fn clone(&self) -> stumpless_element
fn clone(&self) -> stumpless_element
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more