#[repr(C)]pub struct _ddwaf_object {
pub parameterName: *const c_char,
pub parameterNameLength: u64,
pub __bindgen_anon_1: _ddwaf_object__bindgen_ty_1,
pub nbEntries: u64,
pub type_: DDWAF_OBJ_TYPE,
}Expand description
@struct ddwaf_object
Generic object used to pass data and rules to the WAF.
Fields§
§parameterName: *const c_char§parameterNameLength: u64§__bindgen_anon_1: _ddwaf_object__bindgen_ty_1§nbEntries: u64§type_: DDWAF_OBJ_TYPEImplementations§
Source§impl _ddwaf_object
impl _ddwaf_object
Sourcepub unsafe fn drop_key(&mut self)
pub unsafe fn drop_key(&mut self)
Drops the key associated with the receiving ddwaf_object.
§Safety
The key, if present, must be a raw-converted [Box<[u8]>]. After this method returns, the
values of ddwaf_object::parameterName and ddwaf_object::parameterNameLength must be
replaced as they will no longer be valid.
§Panics
If the key is too large for this platform (can only happens on 32-bit platforms).
Sourcepub unsafe fn drop_array(&mut self)
pub unsafe fn drop_array(&mut self)
Drops the array data associated with the receiving ddwaf_object.
§Safety
- The
ddwaf_objectmust be a valid representation of an array. - The array must be an
std::alloc::allocated array ofddwaf_objectof the proper size. - The individual elements of the array must be valid
ddwaf_objects that can be dropped withddwaf_object::drop_object.
§Panics
If the array is too large for this platform (can only happens on 32-bit platforms).
Sourcepub unsafe fn drop_map(&mut self)
pub unsafe fn drop_map(&mut self)
Drops the map data associated with the receiving ddwaf_object.
§Safety
- The
ddwaf_objectmust be a valid representation of a map. - The map must be an
std::alloc::allocated array ofddwaf_objectof the proper size. - The individual elements of the map must be valid
ddwaf_objects that can be dropped with bothddwaf_object::drop_objectandddwaf_object::drop_key.
§Panics
If the map is too large for this platform (can only happens on 32-bit platforms).
Sourcepub unsafe fn drop_object(&mut self)
pub unsafe fn drop_object(&mut self)
Drops the value associated with the receiving ddwaf_object.
§Safety
If the ddwaf_object is a string, array, or map, the respective requirements of the
ddwaf_object::drop_string, ddwaf_object::drop_array, or ddwaf_object::drop_map
methods apply.
Sourcepub unsafe fn drop_string(&mut self)
pub unsafe fn drop_string(&mut self)
Drops the string associated with the receiving ddwaf_object.
§Safety
- The
ddwaf_objectmust be a valid representation of a string - The
ddwaf_object::__bindgen_anon_1field must have a_ddwaf_object__bindgen_ty_1::stringValueset from a raw-converted [Box<[u8]>]
§Panics
If the string is too large for this platform (can only happens on 32-bit platforms).
Trait Implementations§
Source§impl Clone for _ddwaf_object
impl Clone for _ddwaf_object
Source§fn clone(&self) -> _ddwaf_object
fn clone(&self) -> _ddwaf_object
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more