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
use crate::{effect::Effect, Walk, WalkerTypes};

use super::value::{BorrowWalker, ValueWalker};

impl<'ctx, M, E: Effect<'ctx>> Walk<'ctx, M, E> for bool {
    type Walker = ValueWalker<bool>;

    fn into_walker(self) -> Self::Walker {
        ValueWalker::new(self)
    }
}

impl WalkerTypes for bool {
    type Error = <ValueWalker<bool> as WalkerTypes>::Error;
    type Output = <ValueWalker<bool> as WalkerTypes>::Output;
}

impl<'ctx, M, E: Effect<'ctx>> Walk<'ctx, M, E> for &'ctx bool {
    type Walker = ValueWalker<bool>;

    fn into_walker(self) -> Self::Walker {
        ValueWalker::new(*self)
    }
}

impl<'ctx> WalkerTypes for &'ctx bool {
    type Error = <ValueWalker<bool> as WalkerTypes>::Error;
    type Output = <ValueWalker<bool> as WalkerTypes>::Output;
}