pub enum GaiaType {
Show 25 variants
Bool,
I8,
U8,
I16,
U16,
I32,
U32,
I64,
U64,
F16,
F32,
F64,
Pointer(Box<GaiaType>, AddressSpace),
Array(Box<GaiaType>, usize),
Vector(Box<GaiaType>, usize),
Struct(String),
String,
Object,
Class(String),
Interface(String),
Any,
Tensor(Box<GaiaType>, Vec<isize>),
Void,
Opaque(String),
FunctionPtr(Box<GaiaSignature>),
}Expand description
Gaia 类型系统
Variants§
Bool
1位布尔类型
I8
8位有符号整数
U8
8位无符号整数
I16
16位有符号整数
U16
16位无符号整数
I32
32位有符号整数
U32
32位无符号整数
I64
64位有符号整数
U64
64位无符号整数
F16
16位半精度浮点数
F32
32位单精度浮点数
F64
64位双精度浮点数
Pointer(Box<GaiaType>, AddressSpace)
指针类型 (指向类型, 地址空间)
Array(Box<GaiaType>, usize)
数组类型 (元素类型, 长度)
Vector(Box<GaiaType>, usize)
向量类型 (元素类型, 数量)
Struct(String)
结构体类型 (名称/ID)
String
字符串类型 (托管或原始)
Object
动态对象类型 (Python/JS)
Class(String)
托管类 (JVM/CLR)
Interface(String)
接口/特征 (Interface/Trait)
Any
动态/任意类型 (Variant)
Tensor(Box<GaiaType>, Vec<isize>)
张量类型 (元素类型, 形状) 形状中使用 -1 表示动态维度
Void
空类型
Opaque(String)
不透明类型 (用于外部引用)
FunctionPtr(Box<GaiaSignature>)
函数指针
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GaiaType
impl<'de> Deserialize<'de> for GaiaType
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
impl Eq for GaiaType
impl StructuralPartialEq for GaiaType
Auto Trait Implementations§
impl Freeze for GaiaType
impl RefUnwindSafe for GaiaType
impl Send for GaiaType
impl Sync for GaiaType
impl Unpin for GaiaType
impl UnwindSafe for GaiaType
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