[][src]Trait pui_core::scalar::ScalarAllocator

pub unsafe trait ScalarAllocator {
    type Scalar: Clone + Eq;
    type AutoTraits;
    pub fn alloc() -> Self::Scalar;
}

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

Associated Types

type Scalar: Clone + Eq[src]

The types in the sequence

type AutoTraits[src]

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

Loading content...

Required methods

pub fn alloc() -> Self::Scalar[src]

The next item in the sequence

Panic

If the sequence is exhausted, alloc may panic

Loading content...

Implementors

impl ScalarAllocator for Global[src]

type Scalar = NonZeroU64

type AutoTraits = ()

impl ScalarAllocator for ThreadLocal[src]

type Scalar = NonZeroU64

type AutoTraits = NoSendSync

Loading content...