mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
10 lines
181 B
Rust
10 lines
181 B
Rust
use napi::Either;
|
|
|
|
#[napi(transparent)]
|
|
struct MyVec(Vec<Either<u32, String>>);
|
|
|
|
#[napi]
|
|
fn get_my_vec() -> MyVec {
|
|
MyVec(vec![Either::A(42), Either::B("a string".to_owned())])
|
|
}
|