Diffstat (limited to 'src/protocol.rs')
| -rw-r--r-- | src/protocol.rs | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/src/protocol.rs b/src/protocol.rs index ba5826d..f06f095 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -33,31 +33,11 @@ //! This is done via the help of the [`AnyImpl`] type. This is not required for the core //! idea of DIDETs. -use crate::any::{IndirectLtAny, LtAny, LtTypeId, Mut, Ref, TypeNameable}; +use crate::any::AnyTrait; -#[cfg(test)] -mod test { - use crate::nameable; +pub mod visitor; +pub mod walker; - use super::*; - - #[test] - fn implementer_macro() { - trait Z {} - - nameable! { - ['a, 'ctx] - dyn Z + 'a where {'ctx: 'a} - } - - struct X<T>(T); - - impl<T: Clone> Z for X<T> {} - - implementer! { - impl['a, 'ctx, T: Clone] X<T> = [ - dyn Z + 'a - ]; - } - } -} +pub type Visitor<'a, 'ctx> = &'a mut dyn AnyTrait<'ctx>; +pub type Walker<'a, 'ctx> = &'a mut dyn AnyTrait<'ctx>; +pub type ControlFlow<B = (), C = ()> = core::ops::ControlFlow<B, C>; |