Misc low level stuff
FreeGlue
TypeDesc
Closure
- The representation of a Rust closurebegin_unwind
- Initiate task failurebegin_unwind_
get_type_desc
- Returns a pointer to a type descriptor.log_str
min_align_of
- Returns the ABI-required minimum alignment of a typepref_align_of
- Returns the preferred alignment of a typerefcount
- Returns the refcount of a shared box (as just before calling this)shape_eq
- Compares contents of two pointers using the default methodshape_le
shape_lt
size_of
- Returns the size of a typesys::rusti
sys::rustrt
FreeGlue
type FreeGlue = &fn(*TypeDesc, *c_void)
TypeDesc
pub TypeDesc({size: uint, align: uint, take_glue: uint, drop_glue: uint, free_glue: uint,})
Closure
pub struct Closure {
code: *(),
env: *(),
}
The representation of a Rust closure
begin_unwind
fn begin_unwind(msg: ~str, file: ~str, line: uint) -> !
Initiate task failure
begin_unwind_
fn begin_unwind_(msg: *c_char, file: *c_char, line: size_t) -> !
get_type_desc
fn get_type_desc<T>() -> *TypeDesc
Returns a pointer to a type descriptor.
Useful for calling certain function in the Rust runtime or otherwise performing dark magick.
log_str
fn log_str<T>(t: &T) -> ~str
min_align_of
fn min_align_of<T>() -> uint
Returns the ABI-required minimum alignment of a type
This is the alignment used for struct fields. It may be smaller than the preferred alignment.
pref_align_of
fn pref_align_of<T>() -> uint
Returns the preferred alignment of a type
refcount
fn refcount<T>(t: @T) -> uint
Returns the refcount of a shared box (as just before calling this)
shape_eq
fn shape_eq<T: Eq>(x1: &T, x2: &T) -> bool
Compares contents of two pointers using the default method. Equivalent to *x1 == *x2
. Useful for hashtables.
shape_le
fn shape_le<T: Ord>(x1: &T, x2: &T) -> bool
shape_lt
fn shape_lt<T: Ord>(x1: &T, x2: &T) -> bool
size_of
fn size_of<T>() -> uint
Returns the size of a type