Skip to main content

SmartPointer

Trait SmartPointer 

Source
pub trait SmartPointer: Pointer {
    // Required method
    fn new(t: Self::Target) -> Self;
}

Required Methods§

Source

fn new(t: Self::Target) -> 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.

Implementations on Foreign Types§

Source§

impl<T> SmartPointer for Box<T>

Source§

fn new(inner: T) -> Self

Source§

impl<T> SmartPointer for Rc<T>

Source§

fn new(inner: T) -> Self

Source§

impl<T> SmartPointer for Arc<T>

Source§

fn new(inner: T) -> Self

Implementors§