We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vec<T: Serialize>
Currently, one has to wrap it around another struct and return it. The macro should parse Vec<T> something like this:
Vec<T>
use deno_bindgen::deno_bindgen; #[deno_bindgen] pub struct UsbDevice { // ... } #[deno_bindgen(non_blocking)] pub fn devices() -> Vec<UsbDevice> { let ctx = crate::Context::init().unwrap(); let devices = ctx.devices().unwrap(); devices }
Workaround:
#[deno_bindgen] pub struct Devices { devices: Vec<UsbDevice>, } #[deno_bindgen(non_blocking)] pub fn devices() -> Devices { let ctx = crate::Context::init().unwrap(); let devices = ctx.devices().unwrap(); Devices { devices } }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Currently, one has to wrap it around another struct and return it. The macro should parse
Vec<T>
something like this:Workaround:
The text was updated successfully, but these errors were encountered: