[][src]Struct gdnative_common::StringArray

pub struct StringArray(_);

A vector of GodotString that uses Godot's pool allocator.

Methods

impl StringArray[src]

pub fn new() -> StringArray[src]

Creates an empty StringArray.

pub fn from_variant_array(array: &VariantArray) -> StringArray[src]

Creates an array by trying to convert each variant.

See Variant::to_string_array.

pub fn push(&mut self, s: &GodotString)[src]

Appends an element at the end of the array.

pub fn push_string_array(&mut self, strings: &StringArray)[src]

Appends a StringArray at the end of this array.

pub fn insert(&mut self, offset: i32, string: &GodotString) -> bool[src]

Insert a new GodotString 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) -> GodotString[src]

Returns a copy of the element at the given offset.

pub fn set(&mut self, idx: i32, string: &GodotString)[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 new_ref(&self) -> StringArray[src]

Trait Implementations

impl Default for StringArray[src]

impl Drop for StringArray[src]

impl ToVariant for StringArray[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.