tree: eddc25691f74aea7c984c4098e8d2f860c93994e [path history] [tgz]
  1. examples/
  2. src/
  3. tests/
  4. .cargo-checksum.json
  5. .cargo_vcs_info.json
  6. BUILD.bazel
  7. Cargo.toml
  8. Cargo.toml.orig
  9. clippy.toml
  10. LICENSE-MIT
  11. README.md
third_party/rust_crates/vendor/downcast-0.10.0/README.md

downcast

A trait (& utilities) for downcasting trait objects back to their original types.

link to API documentation

example usage

Add to your Cargo.toml:

[dependencies]
downcast = "0.8"

Add to your crate root:

#[macro_use]
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()).