mlua icon indicating copy to clipboard operation
mlua copied to clipboard

Chunk env getter?

Open 1e1001 opened this issue 3 years ago • 0 comments

Would be nice to be able to add things to a chunk's env after loading it (in my case the AsChunk implementation adds its own things to the env, and I want to add my own entries on top of that) I imagine the implementation could probably be something like:

    // in impl Chunk
    fn get_environment(&self) -> Result<Value> {
        self.env.clone().map(|v| v.unwrap_or(Value::Nil))
    }

1e1001 avatar Dec 14 '22 21:12 1e1001