[−][src]Struct gdnative_bindings::ColorArray
A reference-counted vector of ColorArray
that uses Godot's pool allocator.
Methods
impl ColorArray
[src]
pub fn new() -> ColorArray
[src]
Creates an empty ColorArray
.
pub fn from_variant_array(array: &VariantArray) -> ColorArray
[src]
Creates an array by trying to convert each variant.
See Variant::to_color_array
.
pub fn push(&mut self, color: &Color)
[src]
Appends an element at the end of the array
pub fn push_array(&mut self, array: &ColorArray)
[src]
Appends a ColorArray
at the end of this array.
pub fn insert(&mut self, offset: i32, color: &Color) -> bool
[src]
Insert a new int at a given position in the array.
pub fn invert(&mut self)
[src]
Inverts the order of the elements in the array.
pub fn remove(&mut self, idx: i32)
[src]
Removes an element at the given offset.
pub fn resize(&mut self, size: i32)
[src]
Changes the size of the array, possibly removing elements or pushing default values.
pub fn get(&self, idx: i32) -> Color
[src]
Returns a copy of the element at the given offset.
pub fn set(&mut self, idx: i32, color: &Color)
[src]
Sets the value of the element at the given offset.
pub fn len(&self) -> i32
[src]
Returns the number of elements in the array.
pub fn read(&'a self) -> Aligned<ReadGuard<'a>>
[src]
pub fn write(&'a mut self) -> Aligned<WriteGuard<'a>>
[src]
pub fn new_ref(&self) -> ColorArray
[src]
Trait Implementations
impl Default for ColorArray
[src]
fn default() -> ColorArray
[src]
impl Drop for ColorArray
[src]
impl Export for ColorArray
[src]
type Hint = ()
A type-specific hint type that is valid for the type being exported.
fn export_info(_hint: Option<<ColorArray as Export>::Hint>) -> ExportInfo
[src]
impl<'l> From<&'l ColorArray> for Variant
[src]
fn from(val: &'l ColorArray) -> Variant
[src]
impl FromVariant for ColorArray
[src]
fn from_variant(variant: &Variant) -> Result<ColorArray, FromVariantError>
[src]
impl ToVariant for ColorArray
[src]
fn to_variant(&self) -> Variant
[src]
Auto Trait Implementations
impl RefUnwindSafe for ColorArray
impl Send for ColorArray
impl Sync for ColorArray
impl Unpin for ColorArray
impl UnwindSafe for ColorArray
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Export for T where
T: GodotObject + ToVariant,
[src]
T: GodotObject + ToVariant,
type Hint = ()
A type-specific hint type that is valid for the type being exported.
fn export_info(_hint: Option<<T as Export>::Hint>) -> ExportInfo
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,