ScalarAllocator

Trait ScalarAllocator 

Source
pub unsafe trait ScalarAllocator {
    type Scalar: Clone + Eq;
    type AutoTraits;

    // Required method
    fn alloc() -> Self::Scalar;
}
Expand description

A type that produces a sequence of unique Scalars

§Safety

  • AutoTraits should not be Send or Sync if the sequence is only guaranteed to be unique wihtin a given thread.
  • alloc should never produces two Scalars that compare equal to each other

Required Associated Types§

Source

type Scalar: Clone + Eq

The types in the sequence

Source

type AutoTraits

This type’s autotraits restrictions that will be applied to both Dynamic and DynamicToken

Required Methods§

Source

fn alloc() -> Self::Scalar

The next item in the sequence

§Panic

If the sequence is exhausted, alloc may panic

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§