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
use crate::{KnowsValue, HasValue, Visitor};

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

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

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

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