pub trait SmartPtr: Sized {
type Content: ?Sized;
type Rebind<U: ?Sized>: SmartPtr<Content = U>;
// Required methods
unsafe fn from_alloc(p: *mut Self::Content) -> Self;
unsafe fn rebind<U>(self) -> Self::Rebind<U>
where U: Pointee<Metadata = <Self::Content as Pointee>::Metadata> + ?Sized;
}Expand description
An abstract of smart pointers.
Required Associated Types§
Required Methods§
Sourceunsafe fn from_alloc(p: *mut Self::Content) -> Self
unsafe fn from_alloc(p: *mut Self::Content) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.