pub enum Type {
Integer,
UInt(u32),
SInt(u32),
Ref(u32),
Vector(Box<Type>, u32),
Bundle(Vec<(String, Type, bool)>),
Enum(Vec<(String, Type)>),
}Variants§
Integer
UInt(u32)
SInt(u32)
Ref(u32)
Vector(Box<Type>, u32)
Bundle(Vec<(String, Type, bool)>)
Enum(Vec<(String, Type)>)
Implementations§
Source§impl Type
impl Type
pub fn unit() -> Type
pub fn uint(width: u32) -> Type
pub fn sint(width: u32) -> Type
pub fn new_ref(width: u32) -> Type
pub fn vector(base: Type, depth: u32) -> Type
pub fn bundle(fields: Vec<(String, Type, bool)>) -> Type
pub fn union(variants: Vec<(String, Option<Type>)>) -> Type
pub fn int_width(&self) -> u32
pub fn int_to_ref(&self) -> Self
pub fn ref_to_int(&self) -> Self
pub fn ref_width(&self) -> u32
pub fn vector_elem_width(&self) -> u32
pub fn vector_depth(&self) -> u32
Trait Implementations§
impl Eq for Type
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
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> Equivalent<K> for Q
impl<Q, K> Equivalent<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.