Skip to content

Commit

Permalink
Expose unit_data through a method
Browse files Browse the repository at this point in the history
  • Loading branch information
therealbnut committed Jun 8, 2023
1 parent da47c14 commit 6a1f46f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/rune/src/runtime/unit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ impl<S> Unit<S> {
}
}

/// Access unit data.
pub fn unit_data(&self) -> &UnitData<S> {
&self.data
}

/// Access debug information for the given location if it is available.
pub fn debug_info(&self) -> Option<&DebugInfo> {
let debug = self.debug.as_ref()?;
Expand Down

0 comments on commit 6a1f46f

Please sign in to comment.