pub struct TypeRef(pub u16);Expand description
An index into the running function’s type list, which maps it to a
TypeId.
Used by the instructions that need a type next to two or three
registers (Inst::IsType,
Inst::NewArray, …), for the same reason as
NameRef.
§Examples
use bytecode_lang::TypeRef;
assert_eq!(TypeRef(1).to_string(), "ty1");Tuple Fields§
§0: u16Implementations§
Trait Implementations§
impl Copy for TypeRef
impl Eq for TypeRef
Source§impl Ord for TypeRef
impl Ord for TypeRef
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for TypeRef
impl PartialOrd for TypeRef
impl StructuralPartialEq for TypeRef
Auto Trait Implementations§
impl Freeze for TypeRef
impl RefUnwindSafe for TypeRef
impl Send for TypeRef
impl Sync for TypeRef
impl Unpin for TypeRef
impl UnsafeUnpin for TypeRef
impl UnwindSafe for TypeRef
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