pub type ddwaf_object = _ddwaf_object;Aliased Type§
#[repr(C)]pub union ddwaf_object {
pub type_: u8,
pub via: _ddwaf_object__bindgen_ty_1,
}Fields§
§type_: u8§via: _ddwaf_object__bindgen_ty_1Implementations§
Source§impl ddwaf_object
impl ddwaf_object
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.
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_objectand [ddwaf_object::drop_key].
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.
The method can’t be called more than once.
Sourcepub unsafe fn drop_string(&mut self)
pub unsafe fn drop_string(&mut self)
Drops the regular string associated with the receiving ddwaf_object.
§Safety
- The
ddwaf_objectmust be a valid representation of a string - The
_ddwaf_object__bindgen_ty_1::str_field must have a_ddwaf_object_string::ptrset from an allocation ofc_charof the size indicated by the_ddwaf_object_string::sizefield done withstd::alloc::alloc.
Sourcepub fn obj_type(&self) -> DDWAF_OBJ_TYPE
pub fn obj_type(&self) -> DDWAF_OBJ_TYPE
Returns the type of the ddwaf_object
Sourcepub fn is_string(&self) -> bool
pub fn is_string(&self) -> bool
Returns true if the ddwaf_object is a string.