[][src]Struct pui_core::scalar::OpaqueScalar

pub struct OpaqueScalar<S: ScalarAllocator>(_);

A opaque type that allows the implementation of Pool/ PoolMut to be safe

Implementations

impl<S: ScalarAllocator> OpaqueScalar<S>[src]

pub unsafe fn new(scalar: S::Scalar) -> Self[src]

Create a new OpaqueScalar

Safety

  • You must have goteen this scalar from OpaqueScalar::into_inner
  • You must create at most 1 OpaqueScalar from this scalar

pub fn into_inner(self) -> S::Scalar[src]

Get the underlying scalar from OpaqueScalar

Trait Implementations

impl<A: ScalarAllocator> Eq for OpaqueScalar<A>[src]

impl<A: ScalarAllocator> Hash for OpaqueScalar<A> where
    A::Scalar: Hash
[src]

impl<A: ScalarAllocator> Ord for OpaqueScalar<A> where
    A::Scalar: Ord
[src]

impl<A: ScalarAllocator> PartialEq<OpaqueScalar<A>> for OpaqueScalar<A>[src]

impl<A: ScalarAllocator> PartialOrd<OpaqueScalar<A>> for OpaqueScalar<A> where
    A::Scalar: PartialOrd
[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for OpaqueScalar<S> where
    <S as ScalarAllocator>::Scalar: RefUnwindSafe
[src]

impl<S> Send for OpaqueScalar<S> where
    <S as ScalarAllocator>::Scalar: Send
[src]

impl<S> Sync for OpaqueScalar<S> where
    <S as ScalarAllocator>::Scalar: Sync
[src]

impl<S> Unpin for OpaqueScalar<S> where
    <S as ScalarAllocator>::Scalar: Unpin
[src]

impl<S> UnwindSafe for OpaqueScalar<S> where
    <S as ScalarAllocator>::Scalar: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.