mirror of
https://github.com/mlua-rs/mlua
synced 2026-06-08 16:05:43 +00:00
15 lines
218 B
Rust
15 lines
218 B
Rust
use mlua::Result;
|
|
|
|
#[derive(Clone, Debug, mlua::UserData)]
|
|
struct Foo;
|
|
|
|
#[mlua::userdata_impl]
|
|
impl Foo {
|
|
#[lua(field)]
|
|
async fn description() -> Result<String> {
|
|
Ok("foo".into())
|
|
}
|
|
}
|
|
|
|
fn main() {}
|