Struct ext_php_rs::bindings::_zend_array[][src]

#[repr(C)]
pub struct _zend_array { pub gc: zend_refcounted_h, pub u: _zend_array__bindgen_ty_1, pub nTableMask: u32, pub arData: *mut Bucket, pub nNumUsed: u32, pub nNumOfElements: u32, pub nTableSize: u32, pub nInternalPointer: u32, pub nNextFreeElement: zend_long, pub pDestructor: dtor_func_t, }

Fields

gc: zend_refcounted_hu: _zend_array__bindgen_ty_1nTableMask: u32arData: *mut BucketnNumUsed: u32nNumOfElements: u32nTableSize: u32nInternalPointer: u32nNextFreeElement: zend_longpDestructor: dtor_func_t

Implementations

Returns the current number of elements in the array.

Returns whether the hash table is empty.

Clears the hash table, removing all values.

Attempts to retrieve a value from the hash table with a string key.

Parameters

  • key - The key to search for in the hash table.

Returns

  • Some(&Zval) - A reference to the zval at the position in the hash table.
  • None - No value at the given position was found.

Attempts to retrieve a value from the hash table with an index.

Parameters

  • key - The key to search for in the hash table.

Returns

  • Some(&Zval) - A reference to the zval at the position in the hash table.
  • None - No value at the given position was found.

Attempts to remove a value from the hash table with a string key.

Parameters

  • key - The key to remove from the hash table.

Returns

  • Some(()) - Key was successfully removed.
  • None - No key was removed, did not exist.

Attempts to remove a value from the hash table with a string key.

Parameters

  • key - The key to remove from the hash table.

Returns

  • Ok(()) - Key was successfully removed.
  • None - No key was removed, did not exist.

Attempts to insert an item into the hash table, or update if the key already exists. Returns nothing in a result if successful.

Parameters

  • key - The key to insert the value at in the hash table.
  • value - The value to insert into the hash table.

Inserts an item into the hash table at a specified index, or updates if the key already exists. Returns nothing in a result if successful.

Parameters

  • key - The index at which the value should be inserted.
  • val - The value to insert into the hash table.

Pushes an item onto the end of the hash table. Returns a result containing nothing if the element was sucessfully inserted.

Parameters

  • val - The value to insert into the hash table.

Returns an iterator over the key(s) and value contained inside the hashtable.

Returns an iterator over the values contained inside the hashtable, as if it was a set or list.

Clones the hash table, returning an OwnedHashTable.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.