Crate linear_type

source ·
Expand description

This crate defines a Linear<T> type. This is a type which contents must be eventually consumed with the ‘into_inner()’ method. Failing to do so and dropping a non-consumed Linear<T> will panic. Future versions may implement dropping a non consumed linear type as compile error.

Structs

  • A Cell like struct that wraps a T and can be derefernced to &T. This cell must never be dropped. For destruction of the inner value one has to call .into_inner().