mlua
mlua copied to clipboard
Chunk env getter?
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))
}