Struct partial_const::i32::Const[][src]

pub struct Const<const VALUE: i32>(_);

Constant i32 value

Example

let const_value = partial_const::i32::Const::<42>::new();
assert_eq!(core::mem::size_of::<partial_const::i32::Const<42>>(), 0);
assert_eq!(const_value.value(), 42);

Implementations

impl<const VALUE: i32> Const<VALUE>[src]

pub fn new() -> Self[src]

Trait Implementations

impl<const VALUE: i32> Clone for Const<VALUE>[src]

impl<const VALUE: i32> Copy for Const<VALUE>[src]

impl<const VALUE: i32> Debug for Const<VALUE>[src]

impl<const VALUE: i32> Default for Const<VALUE>[src]

impl<const VALUE: i32> Display for Const<VALUE>[src]

impl<const VALUE: i32> Equals<Const<VALUE>> for Const<VALUE>[src]

type ConstSide = Const<VALUE>

The const side of two types. Read more

impl<const VALUE: i32> Equals<Const<VALUE>> for i32[src]

type ConstSide = Const<VALUE>

The const side of two types. Read more

impl<const VALUE: i32> Equals<i32> for Const<VALUE>[src]

type ConstSide = Const<VALUE>

The const side of two types. Read more

impl<const VALUE: i32> MayBeConstAT for Const<VALUE>[src]

type Type = i32

impl<const VALUE1: i32, const VALUE2: i32> PartialEq<Const<VALUE2>> for Const<VALUE1>[src]

impl<const VALUE: i32> PartialEq<i32> for Const<VALUE>[src]

impl<const VALUE1: i32, const VALUE2: i32> PartialOrd<Const<VALUE2>> for Const<VALUE1>[src]

impl<const VALUE: i32> PartialOrd<i32> for Const<VALUE>[src]

Auto Trait Implementations

impl<const VALUE: i32> RefUnwindSafe for Const<VALUE>

impl<const VALUE: i32> Send for Const<VALUE>

impl<const VALUE: i32> Sync for Const<VALUE>

impl<const VALUE: i32> Unpin for Const<VALUE>

impl<const VALUE: i32> UnwindSafe for Const<VALUE>

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.