Struct gdnative::Variant [] [src]

pub struct Variant(_);

A Variant can represent many of godot's core types.

The underlying data can be either stored inline or reference-counted, dependning on the size of the type and whether the it is trivially copyable.

Methods

impl Variant
[src]

[src]

Creates a Variant wrapping a Vector2.

[src]

Creates a Variant wrapping a Vector3.

[src]

Creates a Variant wrapping a Quat.

[src]

Creates a Variant wrapping a Plane.

[src]

Creates a Variant wrapping a Rect2.

[src]

Creates a Variant wrapping a Transform.

[src]

Creates a Variant wrapping a Transform2D.

[src]

Creates a Variant wrapping a Basis.

[src]

Creates a Variant wrapping a Color.

[src]

Creates a Variant wrapping an Aabb.

[src]

Creates a Variant wrapping an Rid.

[src]

Creates a Variant wrapping a NodePath.

[src]

Creates a Variant wrapping a GodotString.

[src]

Creates an Variant wrapping an array of variants.

[src]

Creates a Variant wrapping a byte array.

[src]

Creates a Variant wrapping an array of 32bit signed integers.

[src]

Creates a Variant wrapping an array of 32bit floats.

[src]

Creates a Variant wrapping an array of godot strings.

[src]

Creates a Variant wrapping an array of 2d vectors.

[src]

Creates a Variant wrapping an array of 3d vectors.

[src]

Creates a Variant wrapping an array of colors.

[src]

Creates a Variant wrapping a dictionary.

[src]

Creates an empty Variant.

[src]

Creates a Variant wrapping a string.

[src]

Creates a Variant wrapping a Godot object.

[src]

Creates a Variant wrapping a signed integer value.

[src]

Creates a Variant wrapping an unsigned integer value.

[src]

Creates a Variant wrapping an boolean.

[src]

Do a best effort to create a Vector2 out of the variant, possibly returning a default value.

[src]

Returns Some(Vector2) if this variant is one, None otherwise.

[src]

Do a best effort to create a Vector3 out of the variant, possibly returning a default value.

[src]

Returns Some(Vector3) if this variant is one, None otherwise.

[src]

Do a best effort to create a Quat out of the variant, possibly returning a default value.

[src]

Returns Some(Quat) if this variant is one, None otherwise.

[src]

Do a best effort to create a Plane out of the variant, possibly returning a default value.

[src]

Returns Some(Plane) if this variant is one, None otherwise.

[src]

Do a best effort to create a Rect2 out of the variant, possibly returning a default value.

[src]

Returns Some(Rect2) if this variant is one, None otherwise.

[src]

Do a best effort to create a Transform out of the variant, possibly returning a default value.

[src]

Returns Some(Transform) if this variant is one, None otherwise.

[src]

Do a best effort to create a Transform2D out of the variant, possibly returning a default value.

[src]

Returns Some(Transform2D) if this variant is one, None otherwise.

[src]

Do a best effort to create a Basis out of the variant, possibly returning a default value.

[src]

Returns Some(Basis) if this variant is one, None otherwise.

[src]

Do a best effort to create a Color out of the variant, possibly returning a default value.

[src]

Returns Some(Color) if this variant is one, None otherwise.

[src]

Do a best effort to create an Aabb out of the variant, possibly returning a default value.

[src]

Returns Some(Aabb) if this variant is one, None otherwise.

[src]

Do a best effort to create a f64 out of the variant, possibly returning a default value.

[src]

Returns Some(f64) if this variant is one, None otherwise.

[src]

Do a best effort to create an i64 out of the variant, possibly returning a default value.

[src]

Returns Some(i64) if this variant is one, None otherwise.

[src]

Do a best effort to create a bool out of the variant, possibly returning a default value.

[src]

Returns Some(bool) if this variant is one, None otherwise.

[src]

Do a best effort to create a NodePath out of the variant, possibly returning a default value.

[src]

Returns Some(NodePath) if this variant is one, None otherwise.

[src]

Do a best effort to create a GodotString out of the variant, possibly returning a default value.

[src]

Returns Some(GodotString) if this variant is one, None otherwise.

[src]

Do a best effort to create a Rid out of the variant, possibly returning a default value.

[src]

Returns Some(Rid) if this variant is one, None otherwise.

[src]

Do a best effort to create a VariantArray out of the variant, possibly returning a default value.

[src]

Returns Some(VariantArray) if this variant is one, None otherwise.

[src]

Do a best effort to create a ByteArray out of the variant, possibly returning a default value.

[src]

Returns Some(ByteArray) if this variant is one, None otherwise.

[src]

Do a best effort to create an Int32Array out of the variant, possibly returning a default value.

[src]

Returns Some(Int32Array) if this variant is one, None otherwise.

[src]

Do a best effort to create a Float32Array out of the variant, possibly returning a default value.

[src]

Returns Some(Float32Array) if this variant is one, None otherwise.

[src]

Do a best effort to create a StringArray out of the variant, possibly returning a default value.

[src]

Returns Some(StringArray) if this variant is one, None otherwise.

[src]

Do a best effort to create a Vector2Array out of the variant, possibly returning a default value.

[src]

Returns Some(Vector2Array) if this variant is one, None otherwise.

[src]

Do a best effort to create a Vector3Array out of the variant, possibly returning a default value.

[src]

Returns Some(Vector3Array) if this variant is one, None otherwise.

[src]

Do a best effort to create a ColorArray out of the variant, possibly returning a default value.

[src]

Returns Some(ColorArray) if this variant is one, None otherwise.

[src]

Do a best effort to create a Dictionary out of the variant, possibly returning a default value.

[src]

Returns Some(Dictionary) if this variant is one, None otherwise.

[src]

[src]

[src]

[src]

Returns this variant's type.

[src]

Returns true if this is an empty variant.

[src]

[src]

[src]

Returns the internal ffi representation of the variant and consumes the rust object without running the destructor.

This should be only used when certain that the receiving side is responsible for running the destructor for the object, otherwise it is leaked.

Trait Implementations

impl Drop for Variant
[src]

[src]

Executes the destructor for this type. Read more

impl Clone for Variant
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Variant
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Default for Variant
[src]

[src]

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

impl Debug for Variant
[src]

[src]

Formats the value using the given formatter. Read more

impl From<i64> for Variant
[src]

[src]

Performs the conversion.

impl From<u64> for Variant
[src]

[src]

Performs the conversion.

impl From<bool> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Vector2> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Vector3> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Quat> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Plane> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Rect2> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Transform> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Transform2D> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Basis> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Color> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Aabb> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l String> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Rid> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l NodePath> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l GodotString> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Dictionary> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l VariantArray> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l ByteArray> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Int32Array> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Float32Array> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Vector2Array> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l Vector3Array> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l ColorArray> for Variant
[src]

[src]

Performs the conversion.

impl<'l> From<&'l str> for Variant
[src]

[src]

Performs the conversion.

impl<T> From<T> for Variant where
    T: GodotObject
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Variant

impl Sync for Variant