mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
15 lines
214 B
Rust
15 lines
214 B
Rust
use mlua::Result;
|
|
|
|
#[derive(Clone, Debug, mlua::UserData)]
|
|
struct Foo(u64);
|
|
|
|
#[mlua::userdata_impl]
|
|
impl Foo {
|
|
#[lua(getter)]
|
|
async fn value(&self) -> Result<u64> {
|
|
Ok(self.0)
|
|
}
|
|
}
|
|
|
|
fn main() {}
|