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

Method unlock

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

Source from the content-addressed store, hash-verified

170 /// Shorthand for [`Gc::write`]`(mc, self).`[`unlock()`](Write::unlock).
171 #[inline]
172 pub fn unlock(self, mc: &Mutation<'gc>) -> &'gc T::Unlocked {
173 Gc::write(mc, self);
174 // SAFETY: see doc-comment.
175 unsafe { self.as_ref().unlock_unchecked() }
176 }
177}
178
179impl<'gc, T: ?Sized + 'gc> Gc<'gc, T> {

Callers 3

setMethod · 0.45
borrow_mutMethod · 0.45
try_borrow_mutMethod · 0.45

Calls 1

as_refMethod · 0.45

Tested by

no test coverage detected