pub enum ElemType {
Float(FloatKind),
Int(IntKind),
UInt(UIntKind),
Bool,
}Expand description
Conceptual element type, not necessarily the physical type used in the code
Variants§
Implementations§
Source§impl ElemType
impl ElemType
Sourcepub fn constant_from_f64(&self, val: f64) -> Variable
pub fn constant_from_f64(&self, val: f64) -> Variable
Create a constant scalar from a float.
The output will have the same type as the element.
Sourcepub fn constant_from_i64(&self, val: i64) -> Variable
pub fn constant_from_i64(&self, val: i64) -> Variable
Create a constant scalar from a signed integer.
The output will have the same type as the element.
Sourcepub fn constant_from_u64(&self, val: u64) -> Variable
pub fn constant_from_u64(&self, val: u64) -> Variable
Create a constant scalar from a unsigned integer.
The output will have the same type as the element.
Sourcepub fn constant_from_bool(&self, val: bool) -> Variable
pub fn constant_from_bool(&self, val: bool) -> Variable
Create a constant scalar from a boolean.
The output will have the same type as the element.
Sourcepub fn from_constant(&self, constant: Variable) -> Variable
pub fn from_constant(&self, constant: Variable) -> Variable
Ensure that the variable provided, when a constant, is the same type as elem.
pub const fn min_line_size(&self) -> u8
pub fn is_int(&self) -> bool
pub fn is_signed_int(&self) -> bool
pub fn is_unsigned_int(&self) -> bool
pub fn is_float(&self) -> bool
pub fn max_variable(&self) -> Variable
pub fn min_variable(&self) -> Variable
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ElemType
impl<'de> Deserialize<'de> for ElemType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ElemType> for StorageType
impl From<ElemType> for StorageType
Source§impl Ord for ElemType
impl Ord for ElemType
Source§impl PartialOrd for ElemType
impl PartialOrd for ElemType
impl Copy for ElemType
impl Eq for ElemType
impl StructuralPartialEq for ElemType
Auto Trait Implementations§
impl Freeze for ElemType
impl RefUnwindSafe for ElemType
impl Send for ElemType
impl Sync for ElemType
impl Unpin for ElemType
impl UnwindSafe for ElemType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.