Crate optional_typeid

Crate optional_typeid 

Source
Expand description

OptionalTypeId is an alternative for Option<TypeId>, uses memory also TypeId.

This crate is #[no_std].

§Example

use std::any::TypeId;
use optional_typeid::OptionalTypeId;

let id = OptionalTypeId::of::<()>();

assert_eq!(size_of::<TypeId>(), size_of_val(&id));
assert_eq!(Some(TypeId::of::<()>()), id.into_option());

Structs§

OptionalTypeId
Option<TypeId> type, uses memory also TypeId