Module cast

Source
Expand description

Casting objects to trait pointers.

Rust supports Any-to-Concrete downcasting via Any; and the downcast_rs crate supports Trait-to-Concrete downcasting. This module adds Trait-to-Trait downcasting for the Object trait.

Structs§

CastTable
A collection of functions to downcast &dyn Object references for some particular concrete object type O into various &dyn Trait references.
Caster 🔒
A single entry in a CastTable.

Statics§

EMPTY_CAST_TABLE 🔒
Static cast table that doesn’t support casting anything to anything.