indexical::pointer

Trait PointerFamily

Source
pub trait PointerFamily<'a> {
    type Pointer<T: 'a>: Deref<Target = T> + Clone;
}
Expand description

Abstraction over smart pointers.

Used so to make the indexical data structures generic with respect to choice of Rc or Arc (or your own clonable smart pointer!).

Required Associated Types§

Source

type Pointer<T: 'a>: Deref<Target = T> + Clone

Pointer type for a given family.

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.

Implementors§

Source§

impl<'a> PointerFamily<'a> for ArcFamily

Source§

type Pointer<T: 'a> = Arc<T>

Source§

impl<'a> PointerFamily<'a> for RcFamily

Source§

type Pointer<T: 'a> = Rc<T>

Source§

impl<'a> PointerFamily<'a> for RefFamily<'a>

Source§

type Pointer<T: 'a> = &'a T