Struct gdnative_visual_script::common::Int32Array [−]
pub struct Int32Array(_);
A reference-counted vector of i32
that uses Godot's pool allocator.
Methods
impl Int32Array
impl Int32Array
pub fn new() -> Int32Array
pub fn new() -> Int32Array
Creates an empty Int32Array
.
pub fn from_variant_array(array: &VariantArray) -> Int32Array
pub fn from_variant_array(array: &VariantArray) -> Int32Array
Creates an array by trying to convert each variant.
See Variant::to_int32_array
.
pub fn push(&mut self, val: i32)
pub fn push(&mut self, val: i32)
Appends an element at the end of the array.
pub fn push_array(&mut self, array: &Int32Array)
pub fn push_array(&mut self, array: &Int32Array)
Appends an Int32Array
at the end of this array.
pub fn insert(&mut self, offset: i32, val: i32) -> bool
pub fn insert(&mut self, offset: i32, val: i32) -> bool
Insert a new int at a given position in the array.
pub fn invert(&mut self)
pub fn invert(&mut self)
Inverts the order of the elements in the array.
pub fn remove(&mut self, idx: i32)
pub fn remove(&mut self, idx: i32)
Removes an element at the given offset.
pub fn resize(&mut self, size: i32)
pub fn resize(&mut self, size: i32)
Changes the size of the array, possibly removing elements or pushing default values.
pub fn get(&self, idx: i32) -> i32
pub fn get(&self, idx: i32) -> i32
Returns a copy of the element at the given offset.
pub fn set(&mut self, idx: i32, val: i32)
pub fn set(&mut self, idx: i32, val: i32)
Sets the value of the element at the given offset.
pub fn len(&self) -> i32
pub fn len(&self) -> i32
Returns the number of elements in the array.
pub fn new_ref(&self) -> Int32Array
pub fn new_ref(&self) -> Int32Array
Trait Implementations
impl ToVariant for Int32Array
impl ToVariant for Int32Array
fn to_variant(&self) -> Variant
fn to_variant(&self) -> Variant
fn from_variant(variant: &Variant) -> Option<Int32Array>
fn from_variant(variant: &Variant) -> Option<Int32Array>
impl<'l> From<&'l Int32Array> for Variant
impl<'l> From<&'l Int32Array> for Variant
fn from(val: &'l Int32Array) -> Variant
fn from(val: &'l Int32Array) -> Variant
Performs the conversion.
impl Default for Int32Array
impl Default for Int32Array
fn default() -> Int32Array
fn default() -> Int32Array
Returns the "default value" for a type. Read more
impl Drop for Int32Array
impl Drop for Int32Array
Auto Trait Implementations
impl Send for Int32Array
impl Send for Int32Array
impl Sync for Int32Array
impl Sync for Int32Array