Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ impl Context {
self.data.get(index)
}

/// Returns a mutable reference to the value at a given key index.
pub fn get_mut(&mut self, index: &str) -> Option<&mut Value> {
self.data.get_mut(index)
}

/// Remove a key from the context, returning the value at the key if the key was previously inserted into the context.
pub fn remove(&mut self, index: &str) -> Option<Value> {
self.data.remove(index)
Expand Down