TypeCode

Enum TypeCode 

Source
#[non_exhaustive]
#[repr(u8)]
pub enum TypeCode {
Show 26 variants NumEntry = 1, Void = 2, Float = 3, Double = 4, Label = 5, Opaque = 6, Integer = 7, Pointer = 8, FunctionOld = 9, Half = 10, Array = 11, Vector = 12, X86Fp80 = 13, Fp128 = 14, PpcFp128 = 15, Metadata = 16, X86Mmx = 17, StructAnon = 18, StructName = 19, StructNamed = 20, Function = 21, Token = 22, BFloat = 23, X86Amx = 24, OpaquePointer = 25, TargetType = 26,
}
Expand description

TYPE blocks have codes for each type primitive they use.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

NumEntry = 1

NUMENTRY

Allows pre-allocating storage

[numentries]

§

Void = 2

VOID

§

Float = 3

FLOAT

§

Double = 4

DOUBLE

§

Label = 5

LABEL

§

Opaque = 6

OPAQUE

§

Integer = 7

INTEGER

[width]

§

Pointer = 8

Typed pointers are obsolete.

[pointee type]

§

FunctionOld = 9

Obsolete

[vararg, attrid, retty, paramty x N]

§

Half = 10

HALF

§

Array = 11

ARRAY

[num_elements, elements_type]

§

Vector = 12

VECTOR

[num_elements, elements_type]

§

X86Fp80 = 13

X86 LONG DOUBLE

§

Fp128 = 14

LONG DOUBLE (112 bit mantissa)

§

PpcFp128 = 15

PPC LONG DOUBLE (2 doubles)

§

Metadata = 16

METADATA

§

X86Mmx = 17

Unused

X86 MMX

§

StructAnon = 18

STRUCT_ANON

[ispacked, elements_type x N]

§

StructName = 19

STRUCT_NAME

[strchr x N]

§

StructNamed = 20

STRUCT_NAMED

[ispacked, elements_type x N]

§

Function = 21

FUNCTION

[vararg, retty, paramty x N]

§

Token = 22

TOKEN

§

BFloat = 23

BRAIN FLOATING POINT

§

X86Amx = 24

X86 AMX

§

OpaquePointer = 25

OPAQUE_POINTER

[addrspace]

§

TargetType = 26

TARGET_TYPE

Trait Implementations§

Source§

impl Clone for TypeCode

Source§

fn clone(&self) -> TypeCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TypeCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TryFrom<u8> for TypeCode

Source§

type Error = TryFromPrimitiveError<TypeCode>

The type returned in the event of a conversion error.
Source§

fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for TypeCode

Source§

impl Copy for TypeCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.