crate docs

Multireferences for Rust

Allowing to pass from [&T] to (an analogue of) &[T] safely without copying anything.

More precisely

This crate provides two helper types Slice and Pair that allow the following conversions:

The inverse distributive law

The forward distributive law

What for?

To move lifetimes from the depths of a type expression closer to its head.

Such a manipulation can be useful in a cps-heavy code.

Details

HERE

Usage

Simply include

multiref = "0.1"

in your Cargo.toml.

The crate doesn't use any of the std library and has the #![no_std] attribute.

Similiar crates

There is a similiarly named crate multi_mut. It allows to extract multiple nonintersecting mutable references from the std::collections maps.

However it has nothing to do with the distributive laws.

Versions