pub struct AnyBounds;
Expand description
Default bounds for TypedMap that require keys/values just to implement Any
.
Trait Implementations§
source§impl Bounds for AnyBounds
impl Bounds for AnyBounds
§type KeyContainer = dyn ContainerWithHash<AnyBounds>
type KeyContainer = dyn ContainerWithHash<AnyBounds>
Type used to store keys with those bounds. It should be
dyn ContainerWithHash<Self> + Marker traits
Read more§type Container = dyn Any
type Container = dyn Any
Type used to store values that fulfill specified bounds (e.g.
dyn Any + Send + Sync
or
dyn CloneAny
)fn as_any(this: &Self::Container) -> &dyn Any
fn as_any_mut(this: &mut Self::Container) -> &mut dyn Any
fn as_any_box(this: Box<Self::Container>) -> Box<dyn Any>
source§impl<T: 'static> HasBounds<T> for AnyBounds
impl<T: 'static> HasBounds<T> for AnyBounds
source§fn cast_key_box(this: Box<T>) -> Box<Self::KeyContainer>
fn cast_key_box(this: Box<T>) -> Box<Self::KeyContainer>
Converts from
Box<T>
to Box<KeyContainer>
source§fn box_value(this: T) -> Box<Self::Container>where
Self: Sized,
fn box_value(this: T) -> Box<Self::Container>where
Self: Sized,
Boxes value of type
T
as Box<Container>
source§fn downcast_ref(this: &Self::Container) -> Option<&T>where
Self: 'static + Sized,
fn downcast_ref(this: &Self::Container) -> Option<&T>where
Self: 'static + Sized,
Attempts to downcast
&Container
to &T
Auto Trait Implementations§
impl Freeze for AnyBounds
impl RefUnwindSafe for AnyBounds
impl Send for AnyBounds
impl Sync for AnyBounds
impl Unpin for AnyBounds
impl UnwindSafe for AnyBounds
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more