pub enum NativeTy {
Show 16 variants
Int(String),
Float(String),
Bool,
Str,
String,
RefString,
Slice(Box<NativeTy>),
Vec(Box<NativeTy>),
RefVec(Box<NativeTy>),
Map {
kind: String,
by_ref: bool,
key: Box<NativeTy>,
value: Box<NativeTy>,
},
Option(Box<NativeTy>),
Result(Box<NativeTy>),
Unit,
Named {
name: String,
by_ref: bool,
},
Callback,
Record {
name: String,
by_ref: bool,
},
}Expand description
A Rust type of a native function, in the forms of spec chapter 7, section 8.7, rule 3.
Variants§
Int(String)
An integer type, by name: i32, usize.
Float(String)
f32 or f64.
Bool
bool
Str
&str
String
String
RefString
&String
Slice(Box<NativeTy>)
&[T]
Vec(Box<NativeTy>)
Vec<T>
RefVec(Box<NativeTy>)
&Vec<T>
Map
HashMap<K, V> or BTreeMap<K, V>, by reference or by value.
Fields
Option(Box<NativeTy>)
Option<T>
Result(Box<NativeTy>)
Result<T, E>; the error converts with its Display text.
Unit
(), or no result.
Named
A type of the module, by value or by reference.
Callback
A callback parameter, passed as the backend passes every callback.
Record
A record of the module (spec chapter 7, section 8.7), by value or by reference.
Trait Implementations§
impl StructuralPartialEq for NativeTy
Auto Trait Implementations§
impl Freeze for NativeTy
impl RefUnwindSafe for NativeTy
impl Send for NativeTy
impl Sync for NativeTy
impl Unpin for NativeTy
impl UnsafeUnpin for NativeTy
impl UnwindSafe for NativeTy
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