#[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.
Trait Implementations§
Source§impl Clone for _ddwaf_object
impl Clone for _ddwaf_object
Source§fn clone(&self) -> _ddwaf_object
fn clone(&self) -> _ddwaf_object
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for _ddwaf_object
impl Default for _ddwaf_object
impl Copy for _ddwaf_object
Auto Trait Implementations§
impl Freeze for _ddwaf_object
impl RefUnwindSafe for _ddwaf_object
impl Unpin for _ddwaf_object
impl UnwindSafe for _ddwaf_object
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more