Struct mun_abi::TypeLut

source ·
#[repr(C)]
pub struct TypeLut<'a> { pub num_entries: u32, /* private fields */ }
Expand description

Represents a lookup table for type information. This is used for runtime linking.

Type IDs and handles are stored separately for cache efficiency.

Fields§

§num_entries: u32

Number of types

Implementations§

Returns an iterator over pairs of type IDs and type handles.

Returns an iterator over pairs of type IDs and mutable type handles.

Returns mutable type handles.

Returns type IDs.

Returns a type handle, without doing bounds checking.

This is generally not recommended, use with caution! Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used. For a safe alternative see get_ptr.

Safety

The idx is not bounds checked and should therefor be used with care.

Returns a type handle at the given index, or None if out of bounds.

Returns a mutable reference to a type handle, without doing bounds checking.

This is generally not recommended, use with caution! Calling this method with an out-of-bounds index is undefined behavior even if the resulting reference is not used. For a safe alternative see get_ptr_mut.

Safety

The idx is not bounds checked and should therefor be used with care.

Returns a mutable reference to a type handle at the given index, or None if out of bounds.

Returns type names.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.