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

Method as_ptr

aiscript-arena/src/gc.rs:227–232  ·  view source on GitHub ↗
(gc: Gc<'gc, T>)

Source from the content-addressed store, hash-verified

225
226 #[inline]
227 pub fn as_ptr(gc: Gc<'gc, T>) -> *const T {
228 unsafe {
229 let inner = gc.ptr.as_ptr();
230 core::ptr::addr_of!((*inner).value) as *const T
231 }
232 }
233
234 /// Returns true when a pointer is *dead* during finalization. This is equivalent to
235 /// `GcWeak::is_dead` for strong pointers.

Callers 4

__coerce_uncheckedMethod · 0.45
eraseMethod · 0.45
unerased_valueMethod · 0.45
deallocMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected