Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 110 |
1 files changed, 54 insertions, 56 deletions
@@ -8,15 +8,13 @@ extern crate alloc; pub mod any; -mod build; +// mod build; pub mod effect; pub mod hkt; -pub mod protocol; +// pub mod protocol; pub mod symbol; -mod walk; - -// pub mod impls; -mod transform; +// mod walk; +// mod transform; // pub use build::Build; // pub use build::Builder; @@ -26,12 +24,12 @@ mod transform; use core::ops::ControlFlow; -pub use build::*; -use effect::{Effect, Future}; -use protocol::{visitor::tag::TagError, Visitor}; +// pub use build::*; +// use effect::{Effect, Future}; +// use protocol::{visitor::tag::TagError, Visitor}; use symbol::Symbol; -pub use transform::*; -pub use walk::*; +// pub use transform::*; +// pub use walk::*; // #[doc(hidden)] pub mod macros; @@ -139,7 +137,7 @@ macro_rules! Walk { let key_walker = $crate::walkers::core::value::ValueWalker::new(stringify!($field)); let value_walker = <&'ctx $type as $crate::Walk::<'ctx, M, E>>::into_walker(&value.$field); - + let walker = $crate::walkers::core::key_value::KeyValueWalker::<$crate::protocol::visitor::tag::TagConst<{ $crate::TAG_FIELD.to_int() }>, _, _>::new($crate::protocol::visitor::tag::TagConst, key_walker, value_walker); E::map($crate::Walker::<'ctx, E>::walk(walker, visitor), |result| match result { @@ -164,48 +162,48 @@ pub struct Demo { pub b: bool, } -Walk! { - pub struct Demo { - a: bool, - b: bool, - } -} - -#[cfg(test)] -mod test { - use crate::effect::{BlockOn, Blocking, Spin}; - - use super::*; - use macro_rules_attribute::derive; - - #[derive(Walk!)] - struct Demo { - a: bool, - b: bool, - other: Other, - } - - #[derive(Walk!)] - struct Other { - value: bool, - } - - #[test] - fn demo() { - let value = Demo { - a: true, - b: false, - other: Other { value: true }, - }; +// Walk! { +// pub struct Demo { +// a: bool, +// b: bool, +// } +// } - let walker = Walk::<DefaultMode, Blocking>::into_walker(&value); - let mut visitor = builders::debug::Visitor::<Blocking>::new(); - - dbg!(Spin::block_on(Walker::<Blocking>::walk( - walker, - &mut visitor - ))); - - todo!(); - } -} +// #[cfg(test)] +// mod test { +// use crate::effect::{BlockOn, Blocking, Spin}; +// +// use super::*; +// use macro_rules_attribute::derive; +// +// #[derive(Walk!)] +// struct Demo { +// a: bool, +// b: bool, +// other: Other, +// } +// +// #[derive(Walk!)] +// struct Other { +// value: bool, +// } +// +// #[test] +// fn demo() { +// let value = Demo { +// a: true, +// b: false, +// other: Other { value: true }, +// }; +// +// let walker = Walk::<DefaultMode, Blocking>::into_walker(&value); +// let mut visitor = builders::debug::Visitor::<Blocking>::new(); +// +// dbg!(Spin::block_on(Walker::<Blocking>::walk( +// walker, +// &mut visitor +// ))); +// +// todo!(); +// } +// } |