Trait gluon_vm::gc::FromPtr

source ·
pub unsafe trait FromPtr<D> {
    // Required method
    unsafe fn make_ptr(data: D, ptr: *mut ()) -> *mut Self;
}
Expand description

Trait which creates a typed pointer from a *mut () pointer. For Sized types this is just a cast but for unsized types some more metadata must be taken from the provided D value to make it initialize correctly.

Required Methods§

source

unsafe fn make_ptr(data: D, ptr: *mut ()) -> *mut Self

Implementations on Foreign Types§

source§

impl<'s, 't, T> FromPtr<&'s &'t [T]> for [T]

source§

unsafe fn make_ptr(v: &'s &'t [T], ptr: *mut ()) -> *mut [T]

Implementors§

source§

impl<D, T> FromPtr<D> for T