pub enum VariableType {
Let,
Int(VariableIntType),
Float(VariableFloatType),
Bool,
Char,
String,
List,
}
Expand description
Represents the type of a variable in the plugin system.
VariableType defines all supported data types that can be passed between plugins and the host application. It provides a type-safe way to represent different kinds of data.
§Variants
Let
- Unspecified type (default)Int
- Integer types (signed/unsigned with various sizes)Float
- Floating point types (f32, f64)Bool
- Boolean valuesChar
- Unicode charactersString
- UTF-8 stringsList
- Lists/arrays of variables
§Examples
use plux_rs::variable::VariableType;
// Create specific types
let int_type = VariableType::I32;
let string_type = VariableType::String;
let list_type = VariableType::List;
// Use in function arguments
let arg = plux_rs::function::Arg::new("count", VariableType::I32);
Variants§
Let
Unspecified or default type
Int(VariableIntType)
Integer types (signed/unsigned)
Float(VariableFloatType)
Floating point types
Bool
Boolean values
Char
Unicode characters
String
UTF-8 strings
List
Lists/arrays of variables
Implementations§
Source§impl VariableType
impl VariableType
Sourcepub const I8: VariableType
pub const I8: VariableType
8-bit signed integer type
Sourcepub const I16: VariableType
pub const I16: VariableType
16-bit signed integer type
Sourcepub const I32: VariableType
pub const I32: VariableType
32-bit signed integer type
Sourcepub const I64: VariableType
pub const I64: VariableType
64-bit signed integer type
Sourcepub const U8: VariableType
pub const U8: VariableType
8-bit unsigned integer type
Sourcepub const U16: VariableType
pub const U16: VariableType
16-bit unsigned integer type
Sourcepub const U32: VariableType
pub const U32: VariableType
32-bit unsigned integer type
Sourcepub const U64: VariableType
pub const U64: VariableType
64-bit unsigned integer type
Sourcepub const F32: VariableType
pub const F32: VariableType
32-bit floating point type
Sourcepub const F64: VariableType
pub const F64: VariableType
64-bit floating point type
Trait Implementations§
Source§impl Clone for VariableType
impl Clone for VariableType
Source§fn clone(&self) -> VariableType
fn clone(&self) -> VariableType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for VariableType
impl Debug for VariableType
Source§impl Default for VariableType
impl Default for VariableType
Source§fn default() -> VariableType
fn default() -> VariableType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for VariableType
impl<'de> Deserialize<'de> for VariableType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for VariableType
impl Display for VariableType
Source§impl PartialEq for VariableType
impl PartialEq for VariableType
Source§impl PartialOrd for VariableType
impl PartialOrd for VariableType
Source§impl Serialize for VariableType
impl Serialize for VariableType
impl Copy for VariableType
impl Eq for VariableType
impl StructuralPartialEq for VariableType
Auto Trait Implementations§
impl Freeze for VariableType
impl RefUnwindSafe for VariableType
impl Send for VariableType
impl Sync for VariableType
impl Unpin for VariableType
impl UnwindSafe for VariableType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more