downcast
A trait (& utilities) for downcasting trait objects back to their original types.
link to API documentation
example usage
Add to your Cargo.toml:
[]
= "0.8"
Add to your crate root:
extern crate downcast;
- simple showcases the most simple usage of this library.
- with_params showcases how to deal with traits who have type parameters.
build features
- std (default) enables all functionality requiring the standard library (
Downcast::downcast()
). - nightly enables all functionality requiring rust nightly (
Any::type_name()
).