Module any_vec::any_value

source ·
Expand description

AnyValue is concept of type-erased object, that can be moved around without type knowledge.

With default trait implementation, all “consume” operations boils down to move_into. By redefining move_into and Drop1 behavior - you can have some additional logic on AnyValue consumption. (Consumption - is any operation that “move out” data from AnyValue)

AnyValueSizeless -> AnyValueTypeless -> AnyValue

§Usage

Some AnyVec operations will accept and return AnyValue. This allows to move data between AnyVecs in fast, safe, type erased way.


  1. AnyValue could have blanket implementation for Drop as well, but that is unstable Rust now. 

Modules§

Structs§

Traits§