pub struct SyncCloneBounds;
Expand description

Bounds for Cloneable keys or values which are Send & Sync

Trait Implementations§

source§

impl Bounds for SyncCloneBounds

§

type KeyContainer = dyn ContainerWithHashAndClone<SyncCloneBounds> + Send + Sync

Type used to store keys with those bounds. It should be dyn ContainerWithHash<Self> + Marker traits Read more
§

type Container = dyn CloneAny + Send + Sync

Type used to store values that fulfill specified bounds (e.g. dyn Any + Send + Sync or dyn CloneAny)
source§

fn as_any(this: &Self::Container) -> &dyn Any

source§

fn as_any_mut(this: &mut Self::Container) -> &mut dyn Any

source§

fn as_any_box(this: Box<Self::Container>) -> Box<dyn Any>

source§

impl<T: CloneAny + Any + Send + Sync> HasBounds<T> for SyncCloneBounds

source§

fn cast_box(this: Box<T>) -> Box<Self::Container>

Converts from Box<T> to Box<Container>
source§

fn as_ref(this: &T) -> &Self::Container

Converts from &T to &Container
source§

fn as_mut(this: &mut T) -> &mut Self::Container

Converts from &mut T to &mut Container
source§

fn cast_key_box(this: Box<T>) -> Box<Self::KeyContainer>
where T: 'static + Sized + Hash + Eq,

Converts from Box<T> to Box<KeyContainer>
source§

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,

Attempts to downcast &Container to &T
source§

fn downcast_mut(this: &mut Self::Container) -> Option<&mut T>
where Self: 'static + Sized,

Attempts to downcast &mut Container to &mut T
source§

fn downcast_box( this: Box<Self::Container> ) -> Result<Box<T>, Box<Self::Container>>
where Self: 'static + Sized,

Attempts to downcast Box<Container> to Box<T>

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.