pub type ddwaf_object = _ddwaf_object;
Expand description
@struct ddwaf_object
Generic object used to pass data and rules to the WAF.
Aliased Type§
#[repr(C)]pub struct ddwaf_object {
pub parameterName: *const i8,
pub parameterNameLength: u64,
pub __bindgen_anon_1: _ddwaf_object__bindgen_ty_1,
pub nbEntries: u64,
pub type_: u32,
}
Fields§
§parameterName: *const i8
§parameterNameLength: u64
§__bindgen_anon_1: _ddwaf_object__bindgen_ty_1
§nbEntries: u64
§type_: u32
Implementations§
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_object
must be a valid representation of an array. - The array must be an
std::alloc::alloc
ated array ofddwaf_object
of the proper size. - The individual elements of the array must be valid
ddwaf_object
s 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_object
must be a valid representation of a map. - The map must be an
std::alloc::alloc
ated array ofddwaf_object
of the proper size. - The individual elements of the map must be valid
ddwaf_object
s that can be dropped with bothddwaf_object::drop_object
andddwaf_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_object
must be a valid representation of a string - The
ddwaf_object::__bindgen_anon_1
field must have a_ddwaf_object__bindgen_ty_1::stringValue
set from a raw-converted [Box<[u8]>
]
§Panics
If the string is too large for this platform (can only happens on 32-bit platforms).