use crate::{
effect::{Effect, ErasedEffective},
Walk, WalkerTypes,
};
use super::value::ValueWalker;
impl<'ctx, M, E: Effect> Walk<'ctx, M, E> for bool {
type Walker = ValueWalker<bool>;
fn into_walker<'e>(self) -> ErasedEffective<'e, Self::Walker, E> {
E::ready(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> Walk<'ctx, M, E> for &'ctx bool {
type Walker = ValueWalker<bool>;
fn into_walker<'e>(self) -> ErasedEffective<'e, Self::Walker, E> {
E::ready(ValueWalker::new(*self))
}
}
impl<'ctx> WalkerTypes for &'ctx bool {
type Error = <ValueWalker<bool> as WalkerTypes>::Error;
type Output = <ValueWalker<bool> as WalkerTypes>::Output;
}