Code Explainers

Code explainers tagged #trait-objects

rust
use std::any::{Any, TypeId};
use std::collections::HashMap;
 
pub trait Event: Any {

A type-safe event bus in Rust

type-erasure trait-objects downcasting
Advanced 8 steps