1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{KnowsValue, HasValue, RootVisitor};

impl<'a, Value> KnowsValue<'a> for RootVisitor<Value> {
    type Value = Value;
}

impl<'a, Value> HasValue<'a> for &'a RootVisitor<Value> {
    fn value(self) -> Self::Value {
        &self.value
    }
}

impl<'a, Value> HasValue<'a> for &'a mut RootVisitor<Value> {
    fn value(self) -> Self::Value {
        &mut self.value
    }
}