Skip to main content

Crate any_container

Crate any_container 

Source
Expand description

Type-erased containers

This crate provides type-erased container types that allow storing values of different types behind a common interface.

§Overview

The crate provides several type-erased container types:

  • AnyMap - A map from types to a single value of each type
  • AnyMultiMap - A map from types to multiple values of each type
  • AnyVec - A type-erased vector that stores values of a single type
  • AnyCloneBox - A type-erased box that allows cloning the boxed value

Re-exports§

pub use vec::AnyVec;

Modules§

vec
AnyVec implementation and supplemental types.

Structs§

AnyCloneBox
A type-erased cloneable box that stores any Clone + Send + Sync type.
AnyMap
A type-erased map storing values of different types by their TypeId.
AnyMultiMap
A type-erased multimap storing multiple values per type.