Hello,

The `sys` module in core has `size_of()` and `align_of()` functions. So you could write `sys::size_of::<test_type>()`, for example.


Niko

On 4/10/12 4:07 AM, Alexander Stavonin wrote:
Hi,

I have a type which will be bind to appropriate C structure:

type test_type = {
     val1 : i16;
     val2 : i32;
}

How could I get size of the test_type? How could I provide an information about 
alignment of the test_type?

Regards,
Alexander.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to