5 /// Clone `self` into a new `Box<Any>` object.
6 fn clone_to_any(&self) -> Box
<Any
>;
9 impl<T
: '
static + Clone
> CloneToAny
for T
{
10 fn clone_to_any(&self) -> Box
<Any
> {
11 Box
::new(self.clone())
16 /// Pretty much just `std::any::Any + Clone`.
17 pub trait Any
: ::std
::any
::Any
+ CloneToAny
{ }
19 impl<T
: '
static + Clone
> Any
for T
{ }
21 impl Clone
for Box
<Any
> {
22 fn clone(&self) -> Box
<Any
> {
23 (**self).clone_to_any()
27 impl<'a
> fmt
::Debug
for &'a Any
{
28 fn fmt(&self, f
: &mut fmt
::Formatter
) -> fmt
::Result
{
33 impl<'a
> fmt
::Debug
for Box
<Any
> {
34 fn fmt(&self, f
: &mut fmt
::Formatter
) -> fmt
::Result
{