Struct gdnative_core::ColorArray [−][src]
pub struct ColorArray(_);
A reference-counted vector of ColorArray that uses Godot's pool allocator.
Methods
impl ColorArray[src]
impl ColorArraypub fn new() -> Self[src]
pub fn new() -> SelfCreates an empty ColorArray.
pub fn from_variant_array(array: &VariantArray) -> Self[src]
pub fn from_variant_array(array: &VariantArray) -> SelfCreates an array by trying to convert each variant.
See Variant::to_color_array.
pub fn push(&mut self, color: &Color)[src]
pub fn push(&mut self, color: &Color)Appends an element at the end of the array
pub fn push_array(&mut self, array: &ColorArray)[src]
pub fn push_array(&mut self, array: &ColorArray)Appends a ColorArray at the end of this array.
pub fn insert(&mut self, offset: i32, color: &Color) -> bool[src]
pub fn insert(&mut self, offset: i32, color: &Color) -> boolInsert a new int at a given position in the array.
pub fn invert(&mut self)[src]
pub fn invert(&mut self)Inverts the order of the elements in the array.
pub fn remove(&mut self, idx: i32)[src]
pub fn remove(&mut self, idx: i32)Removes an element at the given offset.
pub fn resize(&mut self, size: i32)[src]
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) -> Color[src]
pub fn get(&self, idx: i32) -> ColorReturns a copy of the element at the given offset.
pub fn set(&mut self, idx: i32, color: &Color)[src]
pub fn set(&mut self, idx: i32, color: &Color)Sets the value of the element at the given offset.
pub fn len(&self) -> i32[src]
pub fn len(&self) -> i32Returns the number of elements in the array.
pub fn new_ref(&self) -> ColorArray[src]
pub fn new_ref(&self) -> ColorArrayTrait Implementations
impl<'l> From<&'l ColorArray> for Variant[src]
impl<'l> From<&'l ColorArray> for Variantfn from(val: &'l ColorArray) -> Variant[src]
fn from(val: &'l ColorArray) -> VariantPerforms the conversion.
impl Drop for ColorArray[src]
impl Drop for ColorArrayimpl Default for ColorArray[src]
impl Default for ColorArrayimpl ToVariant for ColorArray[src]
impl ToVariant for ColorArrayfn to_variant(&self) -> Variant[src]
fn to_variant(&self) -> Variantfn from_variant(variant: &Variant) -> Option<Self>[src]
fn from_variant(variant: &Variant) -> Option<Self>Auto Trait Implementations
impl Send for ColorArray
impl Send for ColorArrayimpl Sync for ColorArray
impl Sync for ColorArray