pub trait FromLisp<T>: Sized {
// Required method
fn from_lisp(self, mem: &mut Arena) -> Result<T, Error>;
}
Expand description
The mem
parameter is necessary here, because some of the conversions
may need to create an SPV reference-counter
Required Methods§
Implementors§
impl<T> FromLisp<Gc<T>> for PVwhere T: Userdata,
Safety
This is safe for Userdata, because of the additional indirection. They are not stored inline by the GC, the GC only has a pointer to it. This means that unlike other PV ref-types the pointer does not move, and it is therefore sufficient to keep an SPV reference-counter to avoid dangling-pointer references.