This should be analogous to String and str - Ty should be used behind a pointer and be used to save some clones that would usually be done on the owned types.
pub struct Ty {
_type: jit_type_t
}
impl !Sized for Ty {}
impl Ty {
fn get_i8() -> &'static Ty {
....
}
}
impl ToOwned for Ty {
fn to_owned(&self) -> Type {
...
}
}
pub struct Type {
_type: jit_type_t
}
impl Deref for Type {
type Target = Ty;
fn deref(&self) -> &Ty {
...
}
}
This should be analogous to
String
andstr
-Ty
should be used behind a pointer and be used to save some clones that would usually be done on the owned types.