pub trait CloneAny: Any { }Expand description
A marker trait meant for use as the A parameter in TypeMap.
This can be used to construct TypeMaps containing only types which
implement Clone like so: TypeMap::<CloneAny>::custom(), which produces
a TypeMap<CloneAny>. Combine CloneAny with Send or Sync to add
additional bounds.
There is also an exported alias for this type of TypeMap, CloneAny.
Trait Implementations§
Source§impl UnsafeAnyExt for dyn CloneAny
impl UnsafeAnyExt for dyn CloneAny
Source§unsafe fn downcast_ref_unchecked<T>(&self) -> &Twhere
T: Any,
unsafe fn downcast_ref_unchecked<T>(&self) -> &Twhere
T: Any,
Returns a reference to the contained value, assuming that it is of type
T. Read moreSource§impl UnsafeAnyExt for dyn CloneAny + Send
impl UnsafeAnyExt for dyn CloneAny + Send
Source§unsafe fn downcast_ref_unchecked<T>(&self) -> &Twhere
T: Any,
unsafe fn downcast_ref_unchecked<T>(&self) -> &Twhere
T: Any,
Returns a reference to the contained value, assuming that it is of type
T. Read moreSource§impl UnsafeAnyExt for dyn CloneAny + Send + Sync
impl UnsafeAnyExt for dyn CloneAny + Send + Sync
Source§unsafe fn downcast_ref_unchecked<T>(&self) -> &Twhere
T: Any,
unsafe fn downcast_ref_unchecked<T>(&self) -> &Twhere
T: Any,
Returns a reference to the contained value, assuming that it is of type
T. Read moreSource§impl UnsafeAnyExt for dyn CloneAny + Sync
impl UnsafeAnyExt for dyn CloneAny + Sync
Source§unsafe fn downcast_ref_unchecked<T>(&self) -> &Twhere
T: Any,
unsafe fn downcast_ref_unchecked<T>(&self) -> &Twhere
T: Any,
Returns a reference to the contained value, assuming that it is of type
T. Read more