Struct gdnative_physics::common::VariantArray[]

pub struct VariantArray(_);

A reference-counted Variant vector. Godot's generic array data type. Negative indices can be used to count from the right.

Methods

impl VariantArray

Creates an empty VariantArray.

Sets the value of the element at the given offset.

Returns a copy of the element at the given offset.

Returns a reference to the element at the given offset.

Returns a mutable reference to the element at the given offset.

Clears the array, resizing to 0.

Returns true if the VariantArray contains no elements.

Returns the number of elements in the array.

Appends an element at the end of the array.

Removes an element at the end of the array.

Appends an element to the front of the array.

Removes an element at the front of the array.

Insert a new int at a given position in the array.

Searches the array for a value and returns its index. Pass an initial search index as the second argument. Returns -1 if value is not found.

Returns true if the VariantArray contains the specified value.

Searches the array in reverse order. Pass an initial search index as the second argument. If negative, the start index is considered relative to the end of the array.

Searches the array in reverse order for a value. Returns its index or -1 if not found.

Inverts the order of the elements in the array.

Return a hashed i32 value representing the array contents.

Trait Implementations

impl ToVariant for VariantArray

impl<'l> From<&'l VariantArray> for Variant

Performs the conversion.

impl Default for VariantArray

Returns the "default value" for a type. Read more

impl Drop for VariantArray

Executes the destructor for this type. Read more

Auto Trait Implementations