rune icon indicating copy to clipboard operation
rune copied to clipboard

Allow using external objects containing references

Open sapir opened this issue 5 years ago • 0 comments

For example:

#[derive(runestick::Any, Default)]
struct MyObject<'a> {
    something: &'a u32,
}

Currently, runestick::Any requires std::any::Any which requires 'static, and also UnsafeFromValue and UnsafeToValue require 'static, so this is impossible. Also the derive macro doesn't handle the lifetime correctly.

It would be nice if this were allowed when not using async.

sapir avatar Nov 19 '20 01:11 sapir