Crate linear_type
source ·Expand description
About
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.
Features
When this crates is compile with ‘–feature compile_error’ then it will use the ‘no-panic’
crate to generate compile errors whenever a non-consumed Linear<T> will be dropped.
Please read https://github.com/dtolnay/no-panic#caveats for details.
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().