[][src]Struct gridiron::digits::constant_bool::ConstantBool

pub struct ConstantBool<T: NumOps + Copy>(pub T);

Methods

impl<T> ConstantBool<T> where
    Wrapping<T>: Neg<Output = Wrapping<T>> + BitOr<Output = Wrapping<T>>,
    T: NumOps + Copy + BitAnd<Output = T> + BitXor<Output = T> + BitOr<Output = T> + Shr<usize, Output = T> + One + Zero + PartialEq
[src]

pub fn mux(self, x: T, y: T) -> T[src]

This chooses the first value if self is 1 (true), chooses the 2nd value if the value is 0 (false).

pub fn is_zero(i: T) -> Self[src]

pub fn not_zero(i: T) -> Self[src]

pub fn new_true() -> Self[src]

pub fn new_false() -> Self[src]

Trait Implementations

impl<T: NumOps + Copy + BitAnd<Output = T>> BitAnd<ConstantBool<T>> for ConstantBool<T>[src]

type Output = Self

The resulting type after applying the & operator.

impl<T: NumOps + Copy + BitOr<Output = T>> BitOr<ConstantBool<T>> for ConstantBool<T>[src]

type Output = Self

The resulting type after applying the | operator.

impl<T: NumOps + Copy + BitOr<Output = T>> BitOrAssign<ConstantBool<T>> for ConstantBool<T>[src]

impl<T: NumOps + Copy + BitXor<Output = T>> BitXor<ConstantBool<T>> for ConstantBool<T>[src]

type Output = Self

The resulting type after applying the ^ operator.

impl<T: Clone + NumOps + Copy> Clone for ConstantBool<T>[src]

impl<T: Copy + NumOps> Copy for ConstantBool<T>[src]

impl<T: NumOps + Copy + Zero> Default for ConstantBool<T>[src]

impl From<bool> for ConstantBool<u32>[src]

impl From<bool> for ConstantBool<u64>[src]

impl<T: NumOps + Copy + BitXor<Output = T> + One> Not for ConstantBool<T>[src]

type Output = Self

The resulting type after applying the ! operator.

fn not(self) -> ConstantBool<T>[src]

Performs the unary ! operation.

Auto Trait Implementations

impl<T> RefUnwindSafe for ConstantBool<T> where
    T: RefUnwindSafe

impl<T> Send for ConstantBool<T> where
    T: Send

impl<T> Sync for ConstantBool<T> where
    T: Sync

impl<T> Unpin for ConstantBool<T> where
    T: Unpin

impl<T> UnwindSafe for ConstantBool<T> where
    T: UnwindSafe

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