(&self, f: F)
| 212 | /// but no garbage collection will take place during this method. |
| 213 | #[inline] |
| 214 | pub fn mutate<F, T>(&self, f: F) -> T |
| 215 | where |
| 216 | F: for<'gc> FnOnce(&'gc Mutation<'gc>, &'gc Root<'gc, R>) -> T, |
| 217 | { |
| 218 | unsafe { |
| 219 | let mc: &'static Mutation<'_> = &*(self.context.mutation_context() as *const _); |
| 220 | let root: &'static Root<'_, R> = &*(&self.root as *const _); |
| 221 | f(mc, root) |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | /// An alternative version of [`Arena::mutate`] which allows mutating the root set, at the |
| 226 | /// cost of an extra write barrier. |
nothing calls this directly
no test coverage detected