[][src]Enum spirq::ty::ScalarType

pub enum ScalarType {
    Boolean,
    Signed(u32),
    Unsigned(u32),
    Float(u32),
}

Variants

Boolean
Signed(u32)
Unsigned(u32)
Float(u32)

Methods

impl ScalarType[src]

pub fn boolean() -> ScalarType[src]

pub fn int(nbyte: u32, is_signed: bool) -> ScalarType[src]

pub fn float(nbyte: u32) -> ScalarType[src]

pub fn is_signed(&self) -> Option<bool>[src]

Whether the scalar type is signed. A floating-point type is always signed. A boolean type is not Scalar so it's neither signed or unsigned, represented by a None.

pub fn nbyte(&self) -> usize[src]

Number of bytes an instance of the type takes.

pub fn is_boolean(&self) -> bool[src]

pub fn is_sint(&self) -> bool[src]

pub fn is_uint(&self) -> bool[src]

pub fn is_float(&self) -> bool[src]

Trait Implementations

impl Clone for ScalarType[src]

impl Debug for ScalarType[src]

impl Hash for ScalarType[src]

Auto Trait Implementations

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.