Skip to main content

Module pointer

Module pointer 

Source
Expand description

A hierarchy of traits for abstracting over different types of pointers, specifically focusing on reference-counted pointers (Rc, Arc) and their capabilities.

The hierarchy is as follows:

Additionally, UnsizedCoercible and SendUnsizedCoercible are provided to support coercing sized closures into trait objects (dyn Fn).

§Examples

use fp_library::{brands::*, functions::*};

let ptr = pointer_new::<RcBrand, _>(42);
assert_eq!(*ptr, 42);

Traits§

Pointer
Base type class for heap-allocated pointers.

Functions§

new
Wraps a sized value in the pointer.