MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / write

Method write

aiscript-arena/src/gc.rs:207–213  ·  view source on GitHub ↗
(mc: &Mutation<'gc>, gc: Self)

Source from the content-addressed store, hash-verified

205 /// unrestricted mutation on the held type or any of its directly held fields.
206 #[inline]
207 pub fn write(mc: &Mutation<'gc>, gc: Self) -> &'gc Write<T> {
208 unsafe {
209 mc.backward_barrier(Gc::erase(gc), None);
210 // SAFETY: the write barrier stays valid until the end of the current callback.
211 Write::assume(gc.as_ref())
212 }
213 }
214
215 /// Returns true if two `Gc`s point to the same allocation.
216 ///

Callers 1

str_hashFunction · 0.80

Calls 2

backward_barrierMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected