//! A trait for types that have a root.
usecrate::KnowsVisitor;/// A trait for types that have a root.
pubtraitHasRoot: KnowsVisitor {/// Gets the root of the object.
fnroot(&self)->Self::Visitor;}/// A trait for types that have a root mutably.
/// By design, accessing a Visitor parent is unsafe.
pubunsafetraitHasRootMut: KnowsVisitor {/// Gets the root of the object.
unsafefnroot_mut(&mutself)->Self::VisitorMut;}impl<T> HasRoot forBox<T>where T: HasRoot
{fnroot(&self)->Self::Visitor{self.as_ref().root()}}unsafeimpl<T> HasRootMut forBox<T>where T: HasRootMut
{unsafefnroot_mut(&mutself)->Self::VisitorMut{self.as_mut().root_mut()}}