Files
archived-tauri-bindgen/wit/records.wit
2023-03-09 16:22:33 +01:00

53 lines
1.0 KiB
Plaintext

interface records {
func tuple_arg(x: tuple<char, u32>)
func tuple_result() -> tuple<char, u32>
record empty {}
func empty_arg(x: empty)
func empty_result() -> empty
/// A record containing two scalar fields
/// that both have the same type
record scalars {
/// The first field, named a
a: u32,
/// The second field, named b
b: u32,
}
func scalar_arg(x: scalars)
func scalar_result() -> scalars
/// A record that is really just flags
/// All of the fields are bool
record really_flags {
a: bool,
b: bool,
c: bool,
d: bool,
e: bool,
f: bool,
g: bool,
h: bool,
i: bool,
}
func flags_arg(x: really_flags)
func flags_result() -> really_flags
record aggregates {
a: scalars,
b: u32,
c: empty,
d: string,
e: really_flags,
}
func aggregate_arg(x: aggregates)
func aggregate_result() -> aggregates
type int_typedef = s32
type tuple_typedef2 = tuple<int_typedef>
func typedef_inout(e: tuple_typedef2) -> s32
}