Skip to main content

wasmtime_c_api/
types.rs

1#[repr(C)]
2#[derive(Clone)]
3pub struct wasm_limits_t {
4    pub min: u32,
5    pub max: u32,
6}
7
8impl wasm_limits_t {
9    pub(crate) fn max(&self) -> Option<u32> {
10        if self.max == u32::max_value() {
11            None
12        } else {
13            Some(self.max)
14        }
15    }
16}
17
18mod arrayref;
19mod exn;
20mod export;
21mod r#extern;
22mod func;
23mod global;
24mod import;
25mod memory;
26mod structref;
27mod table;
28mod tag;
29mod val;
30pub use self::arrayref::*;
31pub use self::exn::*;
32pub use self::export::*;
33pub use self::r#extern::*;
34pub use self::func::*;
35pub use self::global::*;
36pub use self::import::*;
37pub use self::memory::*;
38pub use self::structref::*;
39pub use self::table::*;
40pub use self::tag::*;
41pub use self::val::*;