Skip to content

Commit 3c051ea

Browse files
krallinfacebook-github-bot
authored andcommitted
buck2: starlark-rust: expose OwnedFrozenValue::owner
Summary: This can be helpful to e.g. get stats about said owner. Reviewed By: ndmitchell, stepancheg Differential Revision: D30935640 fbshipit-source-id: db3ecbebee6db6e0673bdb0bcadf05195449d695
1 parent e1961a9 commit 3c051ea

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

starlark/src/values/owned.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ impl OwnedFrozenValue {
114114
})
115115
}
116116

117+
/// Obtain a reference to the FrozenHeap that owns this value.
118+
pub fn owner(&self) -> &FrozenHeapRef {
119+
&self.owner
120+
}
121+
117122
/// Obtain direct access to the [`FrozenValue`] that lives inside. If you drop all
118123
/// references to the [`FrozenHeap`] keeping it alive, any code using the [`FrozenValue`]
119124
/// is likely to segfault. If possible use [`value`](OwnedFrozenValue::value) or

0 commit comments

Comments
 (0)