Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 

whiteout

crates.io badge documentation License: MIT

whiteout provides macros that erase the type of any value into an impl Trait for a given trait. This gives you a value that can only be use with the methods of that trait, and whose type is unnameable.

#[macro_use] extern crate whiteout;
fn main() {
    let a = erase!(10, std:ops::Add<i64, Output=i64>);
    assert_eq!(a + 10, 20);
}

Since we sometimes want to use these values together, whiteout provides both a one-time macro and a macro that produces a function which returns a consistent unnameable type, allowing multiple erased values to be used in conjunction. See the documentation for more info.

About

Utilities for describing the types of values by their behavior

Resources

Releases

No releases published

Packages

No packages published

Languages