1 2 3 4 5 6 7 8 9 10 11 12 13
use crate::{RootVisitor, KnowsRoot, HasRoot}; impl<'a, Value> KnowsRoot<'a> for RootVisitor<Value> { type Root = Self; } impl<'a, Value> HasRoot<'a> for &'a RootVisitor<Value> where Value: Clone { fn root(self) -> Self::Root { self.clone() } }