1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Internals for [fixed_typemap](https://docs.rs/fixed_typemap), a crate for producing typemaps with extended
//! functionality over a set of known types.
//!
//! This is a set of internal details used by the proc macros, and shouldn't be depended on directly. Instead, depend
//! on and use `fixed_typemap` as this is probably what you're looking for.
pub use *;
/// A trait which represents the ability of a type to key a typemap infallibly.
///
/// `impl InfallibleKey<Typemap> for T` means that `T` is definitely known to be in the typemap, and as a consequence we
/// can return it without having to wrap it in `Option` and the `get_infallible` method may be used to directly retrieve
/// it.
///
/// You should never implement this trait yourself.
pub unsafe
/// A trait which represents the ability to iterate over a typemap with a specific trait object tuype.
///
/// In generic contexts, it is useful to be able to iterate over maps without having to know what the map contains.
/// Unfortunately, Rust coherence rules prevent us from implementing this trait as methods on the typemap, so use it
/// like:
///
/// `<dynMyTrait>::iter_as(&mymap)`.