Trait Abstraction

Source
pub trait Abstraction {
    type AbstractType;

    // Required method
    fn lift(self) -> Self::AbstractType;
}
Expand description

Marks a type as abstractable: its values can be mapped to an idealized version of the type. For instance, machine integers, which have bounds, can be mapped to mathematical integers.

Each type can have only one abstraction.

Required Associated Types§

Source

type AbstractType

What is the ideal type values should be mapped to?

Required Methods§

Source

fn lift(self) -> Self::AbstractType

Maps a concrete value to its abstract counterpart

Implementations on Foreign Types§

Source§

impl Abstraction for bool

Implementors§