pub enum Litr {
Uninit,
Int(isize),
Uint(usize),
Float(f64),
Bool(bool),
Func(Function),
Str(String),
Buf(Vec<u8>),
List(Vec<Litr>),
Obj(HashMap<Ident, Litr>),
Inst([usize; 3]),
Ninst(Instance),
}Expand description
Key语言中的基本类型
Variants§
Uninit
(), uninit
Int(isize)
-1, -1i
Uint(usize)
1u
Float(f64)
1.0, 1f
Bool(bool)
true, false
Func(Function)
||{..}
Str(String)
"字符串"
Buf(Vec<u8>)
'buf,可以显示utf8'
List(Vec<Litr>)
[1,2,3]
Obj(HashMap<Ident, Litr>)
哈希表{a:1, b:2}
Inst([usize; 3])
本地声明的类实例, 原生模块不可干涉
Ninst(Instance)
原生模块的类实例m-:A::new()
Trait Implementations§
impl Send for Litr
impl Sync for Litr
Auto Trait Implementations§
impl !Freeze for Litr
impl !RefUnwindSafe for Litr
impl Unpin for Litr
impl UnsafeUnpin for Litr
impl UnwindSafe for Litr
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