diff --git a/src/cppgc.rs b/src/cppgc.rs index c5e8cd1f3a..8793d48223 100644 --- a/src/cppgc.rs +++ b/src/cppgc.rs @@ -226,6 +226,10 @@ impl InnerMember { pub unsafe fn get(&self) -> &T { unsafe { self.ptr.cast::().as_ref().unwrap() } } + + pub unsafe fn get_mut(&mut self) -> &mut T { + unsafe { self.ptr.cast::().as_mut().unwrap() } + } } /// Members are used to contain strong pointers to other garbage