Registry / utility / intertrait

intertrait

JSON →
library0.2.2rscratesunverified

Allows for casting between trait objects of different traits, enabling dynamic polymorphism.

# Cargo.toml [dependencies] intertrait = "0.2.2"
INSTALL
IMPORT
SIG · INTERTRAIT
I
intertrait
utilityrustv0.2.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Cast
use intertrait::cast::Cast;

Casts a trait object to a concrete type using intertrait.

use intertrait::cast::Cast; fn main() { let value: Box<dyn std::any::Any> = Box::new(42u32); let casted = value.cast::<u32>(); println!("Casted value: {:?}", casted); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
intertrait — cargo add intertrait · libregistry