You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
408 B
Rust
20 lines
408 B
Rust
use multi_trait_object::MultitraitObject;
|
|
use std::any::TypeId;
|
|
use std::marker::PhantomData;
|
|
|
|
pub struct TypeMapEntry<T> {
|
|
pub type_id: TypeId,
|
|
pub mto: MultitraitObject,
|
|
_marker: PhantomData<T>,
|
|
}
|
|
|
|
impl<T> TypeMapEntry<T> {
|
|
pub fn new(type_id: TypeId, mto: MultitraitObject) -> Self {
|
|
Self {
|
|
type_id,
|
|
mto,
|
|
_marker: PhantomData,
|
|
}
|
|
}
|
|
}
|