Enum rbx_types::Variant[][src]

#[non_exhaustive]
pub enum Variant {
Show 34 variants Axes(Axes), BinaryString(BinaryString), Bool(bool), BrickColor(BrickColor), CFrame(CFrame), Color3(Color3), Color3uint8(Color3uint8), ColorSequence(ColorSequence), Content(Content), Enum(Enum), Faces(Faces), Float32(f32), Float64(f64), Int32(i32), Int64(i64), NumberRange(NumberRange), NumberSequence(NumberSequence), PhysicalProperties(PhysicalProperties), Ray(Ray), Rect(Rect), Ref(Ref), Region3(Region3), Region3int16(Region3int16), SharedString(SharedString), String(String), UDim(UDim), UDim2(UDim2), Vector2(Vector2), Vector2int16(Vector2int16), Vector3(Vector3), Vector3int16(Vector3int16), OptionalCFrame(Option<CFrame>), Tags(Tags), Attributes(Attributes),
}
Expand description

Represents any Roblox type. Useful for operating generically on Roblox instances.

Stability

New variants may be added to Variant in minor releases. As such, it is marked #[non_exhaustive].

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Axes(Axes)

Tuple Fields of Axes

0: Axes
BinaryString(BinaryString)

Tuple Fields of BinaryString

0: BinaryString
Bool(bool)

Tuple Fields of Bool

0: bool
BrickColor(BrickColor)

Tuple Fields of BrickColor

0: BrickColor
CFrame(CFrame)

Tuple Fields of CFrame

0: CFrame
Color3(Color3)

Tuple Fields of Color3

0: Color3
Color3uint8(Color3uint8)

Tuple Fields of Color3uint8

0: Color3uint8
ColorSequence(ColorSequence)

Tuple Fields of ColorSequence

0: ColorSequence
Content(Content)

Tuple Fields of Content

0: Content
Enum(Enum)

Tuple Fields of Enum

0: Enum
Faces(Faces)

Tuple Fields of Faces

0: Faces
Float32(f32)

Tuple Fields of Float32

0: f32
Float64(f64)

Tuple Fields of Float64

0: f64
Int32(i32)

Tuple Fields of Int32

0: i32
Int64(i64)

Tuple Fields of Int64

0: i64
NumberRange(NumberRange)

Tuple Fields of NumberRange

0: NumberRange
NumberSequence(NumberSequence)

Tuple Fields of NumberSequence

0: NumberSequence
PhysicalProperties(PhysicalProperties)

Tuple Fields of PhysicalProperties

0: PhysicalProperties
Ray(Ray)

Tuple Fields of Ray

0: Ray
Rect(Rect)

Tuple Fields of Rect

0: Rect
Ref(Ref)

Tuple Fields of Ref

0: Ref
Region3(Region3)

Tuple Fields of Region3

0: Region3
Region3int16(Region3int16)

Tuple Fields of Region3int16

0: Region3int16
SharedString(SharedString)

Tuple Fields of SharedString

0: SharedString
String(String)

Tuple Fields of String

0: String
UDim(UDim)

Tuple Fields of UDim

0: UDim
UDim2(UDim2)

Tuple Fields of UDim2

0: UDim2
Vector2(Vector2)

Tuple Fields of Vector2

0: Vector2
Vector2int16(Vector2int16)

Tuple Fields of Vector2int16

0: Vector2int16
Vector3(Vector3)

Tuple Fields of Vector3

0: Vector3
Vector3int16(Vector3int16)

Tuple Fields of Vector3int16

0: Vector3int16
OptionalCFrame(Option<CFrame>)

Tuple Fields of OptionalCFrame

0: Option<CFrame>
Tags(Tags)

Tuple Fields of Tags

0: Tags
Attributes(Attributes)

Tuple Fields of Attributes

0: Attributes

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.