You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#288 (comment) suggests that Vm::call should accept references, but when modifying the vector.rs example I can't get either &Vec or &[] to work:
error[E0277]: the trait bound `&std::vec::Vec<{integer}>:AnyMarker` is not satisfied
--> examples/examples/vector.rs:40:37
|
40 | let output = vm.call(["calc"],(&input,))?;
| ---- ^^^^^^ the trait `AnyMarker` is not implemented for `&std::vec::Vec<{integer}>`
| |
| required by a bound introduced by this call
error[E0277]: the trait bound `&[{integer}]:AnyMarker` is not satisfied
--> examples/examples/vector.rs:40:37
|
40 | let output = vm.call(["calc"],(input.as_slice(),))?;
| ---- ^^^^^^^^^^^^^^^^ the trait `AnyMarker` is not implemented for `&[{integer}]`
| |
| required by a bound introduced by this call
Also to confirm, if it did compile, will the input still be used by the function as a reference or is it internally cloned/serialized? It's important not to clone it to avoid performance bottlenecks.
The text was updated successfully, but these errors were encountered:
It cannot accept slices directly, since we wouldn't know what yo do with them. You'd have to wrap the type passed in into something deriving Any. Like a newtype. That gives it a type hash anf a name which is needed for Rune to deal with it directly.
#288 (comment) suggests that
Vm::call
should accept references, but when modifying thevector.rs
example I can't get either&Vec
or&[]
to work:Also to confirm, if it did compile, will the input still be used by the function as a reference or is it internally cloned/serialized? It's important not to clone it to avoid performance bottlenecks.
The text was updated successfully, but these errors were encountered: