Enum ConstantTime

Source
pub enum ConstantTime {}
Expand description

Indicates that a cloning operation is constant-time, but might involve acquiring a lock or performing some computations that aren’t NearInstant.

Trait Implementations§

Source§

impl<T, const N: usize> IndependentClone<ConstantTime> for [T; N]

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1,)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>, T2: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1, T2)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>, T2: IndependentClone<ConstantTime>, T3: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1, T2, T3)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>, T2: IndependentClone<ConstantTime>, T3: IndependentClone<ConstantTime>, T4: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1, T2, T3, T4)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>, T2: IndependentClone<ConstantTime>, T3: IndependentClone<ConstantTime>, T4: IndependentClone<ConstantTime>, T5: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1, T2, T3, T4, T5)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>, T2: IndependentClone<ConstantTime>, T3: IndependentClone<ConstantTime>, T4: IndependentClone<ConstantTime>, T5: IndependentClone<ConstantTime>, T6: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1, T2, T3, T4, T5, T6)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>, T2: IndependentClone<ConstantTime>, T3: IndependentClone<ConstantTime>, T4: IndependentClone<ConstantTime>, T5: IndependentClone<ConstantTime>, T6: IndependentClone<ConstantTime>, T7: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>, T2: IndependentClone<ConstantTime>, T3: IndependentClone<ConstantTime>, T4: IndependentClone<ConstantTime>, T5: IndependentClone<ConstantTime>, T6: IndependentClone<ConstantTime>, T7: IndependentClone<ConstantTime>, T8: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>, T2: IndependentClone<ConstantTime>, T3: IndependentClone<ConstantTime>, T4: IndependentClone<ConstantTime>, T5: IndependentClone<ConstantTime>, T6: IndependentClone<ConstantTime>, T7: IndependentClone<ConstantTime>, T8: IndependentClone<ConstantTime>, T9: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>, T2: IndependentClone<ConstantTime>, T3: IndependentClone<ConstantTime>, T4: IndependentClone<ConstantTime>, T5: IndependentClone<ConstantTime>, T6: IndependentClone<ConstantTime>, T7: IndependentClone<ConstantTime>, T8: IndependentClone<ConstantTime>, T9: IndependentClone<ConstantTime>, T10: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>, T2: IndependentClone<ConstantTime>, T3: IndependentClone<ConstantTime>, T4: IndependentClone<ConstantTime>, T5: IndependentClone<ConstantTime>, T6: IndependentClone<ConstantTime>, T7: IndependentClone<ConstantTime>, T8: IndependentClone<ConstantTime>, T9: IndependentClone<ConstantTime>, T10: IndependentClone<ConstantTime>, T11: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: IndependentClone<ConstantTime>, T2: IndependentClone<ConstantTime>, T3: IndependentClone<ConstantTime>, T4: IndependentClone<ConstantTime>, T5: IndependentClone<ConstantTime>, T6: IndependentClone<ConstantTime>, T7: IndependentClone<ConstantTime>, T8: IndependentClone<ConstantTime>, T9: IndependentClone<ConstantTime>, T10: IndependentClone<ConstantTime>, T11: IndependentClone<ConstantTime>, T12: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T> IndependentClone<ConstantTime> for Arc<T>

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T> IndependentClone<ConstantTime> for Cell<T>

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for ManuallyDrop<T>

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for Mutex<T>

Source§

fn independent_clone(&self) -> Self

§Panics or Deadlocks

Panics if the Mutex is poisoned.

Will either panic or deadlock if the current thread already holds the mutex.

Source§

impl<T: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for Option<T>

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T> IndependentClone<ConstantTime> for Pin<Arc<T>>

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T> IndependentClone<ConstantTime> for Pin<Rc<T>>

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T> IndependentClone<ConstantTime> for Rc<T>

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for RefCell<T>

Source§

fn independent_clone(&self) -> Self

§Panics

Panics if the value is currently mutably borrowed.

Source§

impl<T: IndependentClone<ConstantTime>, E: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for Result<T, E>

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T: IndependentClone<ConstantTime>> IndependentClone<ConstantTime> for RwLock<T>

Source§

fn independent_clone(&self) -> Self

§Panics

Panics if the RwLock is poisoned.

Source§

impl<T: NonRecursive + IndependentClone<NearInstant>> IndependentClone<ConstantTime> for T

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T> IndependentClone<ConstantTime> for Weak<T>

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T> IndependentClone<ConstantTime> for Weak<T>

Source§

fn independent_clone(&self) -> Self

Get a deep clone of a value, which does not share any semantically-important mutable state. Read more
Source§

impl<T1: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1,)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T1: MirroredClone<ConstantTime>, T2: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1, T2)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T1: MirroredClone<ConstantTime>, T2: MirroredClone<ConstantTime>, T3: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1, T2, T3)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T1: MirroredClone<ConstantTime>, T2: MirroredClone<ConstantTime>, T3: MirroredClone<ConstantTime>, T4: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1, T2, T3, T4)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T1: MirroredClone<ConstantTime>, T2: MirroredClone<ConstantTime>, T3: MirroredClone<ConstantTime>, T4: MirroredClone<ConstantTime>, T5: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1, T2, T3, T4, T5)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T1: MirroredClone<ConstantTime>, T2: MirroredClone<ConstantTime>, T3: MirroredClone<ConstantTime>, T4: MirroredClone<ConstantTime>, T5: MirroredClone<ConstantTime>, T6: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1, T2, T3, T4, T5, T6)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T1: MirroredClone<ConstantTime>, T2: MirroredClone<ConstantTime>, T3: MirroredClone<ConstantTime>, T4: MirroredClone<ConstantTime>, T5: MirroredClone<ConstantTime>, T6: MirroredClone<ConstantTime>, T7: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T1: MirroredClone<ConstantTime>, T2: MirroredClone<ConstantTime>, T3: MirroredClone<ConstantTime>, T4: MirroredClone<ConstantTime>, T5: MirroredClone<ConstantTime>, T6: MirroredClone<ConstantTime>, T7: MirroredClone<ConstantTime>, T8: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7, T8)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T1: MirroredClone<ConstantTime>, T2: MirroredClone<ConstantTime>, T3: MirroredClone<ConstantTime>, T4: MirroredClone<ConstantTime>, T5: MirroredClone<ConstantTime>, T6: MirroredClone<ConstantTime>, T7: MirroredClone<ConstantTime>, T8: MirroredClone<ConstantTime>, T9: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T1: MirroredClone<ConstantTime>, T2: MirroredClone<ConstantTime>, T3: MirroredClone<ConstantTime>, T4: MirroredClone<ConstantTime>, T5: MirroredClone<ConstantTime>, T6: MirroredClone<ConstantTime>, T7: MirroredClone<ConstantTime>, T8: MirroredClone<ConstantTime>, T9: MirroredClone<ConstantTime>, T10: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T1: MirroredClone<ConstantTime>, T2: MirroredClone<ConstantTime>, T3: MirroredClone<ConstantTime>, T4: MirroredClone<ConstantTime>, T5: MirroredClone<ConstantTime>, T6: MirroredClone<ConstantTime>, T7: MirroredClone<ConstantTime>, T8: MirroredClone<ConstantTime>, T9: MirroredClone<ConstantTime>, T10: MirroredClone<ConstantTime>, T11: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T1: MirroredClone<ConstantTime>, T2: MirroredClone<ConstantTime>, T3: MirroredClone<ConstantTime>, T4: MirroredClone<ConstantTime>, T5: MirroredClone<ConstantTime>, T6: MirroredClone<ConstantTime>, T7: MirroredClone<ConstantTime>, T8: MirroredClone<ConstantTime>, T9: MirroredClone<ConstantTime>, T10: MirroredClone<ConstantTime>, T11: MirroredClone<ConstantTime>, T12: MirroredClone<ConstantTime>> MirroredClone<ConstantTime> for (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T: NonRecursive + MirroredClone<NearInstant>> MirroredClone<ConstantTime> for T

Source§

fn mirrored_clone(&self) -> Self

Get a clone that shares all semantically-important mutable state with its source. Read more
Source§

impl<T: NonRecursive + MixedClone<NearInstant>> MixedClone<ConstantTime> for T

Source§

fn mixed_clone(&self) -> Self

Get a clone that could share some but not all semantically-important mutable state. Read more
Source§

impl Speed for ConstantTime

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>,

Source§

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>,

Source§

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.