[−][src]Enum moore_svlog::ty::TypeKind
Type data.
Variants
An error occurred during type computation.
The void
type.
The time
type.
Bit(Domain)
A single bit type.
An integer type.
A named type.
The first field represents how the type was originally named by the user. The second field represents the binding of the resolved name. The third field represents the actual type.
Struct(NodeId)
A struct type.
A packed array type.
A single bit type.
A simple bit vector type (SBVT).
The innermost dimension of a multi-dimensional bit vector type is always represented as a SBVT.
Methods
impl<'t> TypeKind<'t>
[src]
pub fn is_error(&self) -> bool
[src]
Check if this is the error type.
pub fn is_void(&self) -> bool
[src]
Check if this is the void type.
pub fn is_struct(&self) -> bool
[src]
Check if this is a struct type.
pub fn is_array(&self) -> bool
[src]
Check if this is an array type.
pub fn get_struct_def(&self) -> Option<NodeId>
[src]
Get the definition of a struct.
pub fn get_array_element(&self) -> Option<Type<'t>>
[src]
Get the element type of an array.
pub fn get_array_length(&self) -> Option<usize>
[src]
Get the length of an array.
pub fn width(&self) -> usize
[src]
Get the width of the type.
Panics if the type is not an integer.
pub fn is_bit_vector(&self) -> bool
[src]
Check if this is a bit vector type.
pub fn is_bit_scalar(&self) -> bool
[src]
Check if this is a bit scalar type.
pub fn resolve_name(&'t self) -> Type<'t>
[src]
Remove all typedefs and reveal the concrete fundamental type.
pub fn get_value_domain(&self) -> Option<Domain>
[src]
Return the domain of the type, if it has one.
pub fn get_sign(&self) -> Option<Sign>
[src]
Return the sign of the type, if it has one.
pub fn is_unsigned(&self) -> bool
[src]
Check whether the type is unsigned.
Returns false for types which have no sign.
pub fn is_signed(&self) -> bool
[src]
Check whether the type is signed.
Returns false for types which have no sign.
pub fn change_sign<'gcx>(
&'gcx self,
cx: &impl Context<'gcx>,
sign: Sign
) -> Type<'gcx>
[src]
&'gcx self,
cx: &impl Context<'gcx>,
sign: Sign
) -> Type<'gcx>
Change the sign of a simple bit type.
Trait Implementations
impl<'t> Debug for TypeKind<'t>
[src]
impl<'t> Display for TypeKind<'t>
[src]
impl<'t> Eq for TypeKind<'t>
[src]
impl<'a> From<&'a TypeKind<'a>> for TypeContext<'a>
[src]
impl<'t> Hash for TypeKind<'t>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'t> PartialEq<TypeKind<'t>> for TypeKind<'t>
[src]
impl<'t> StructuralEq for TypeKind<'t>
[src]
impl<'t> StructuralPartialEq for TypeKind<'t>
[src]
Auto Trait Implementations
impl<'t> RefUnwindSafe for TypeKind<'t>
impl<'t> Send for TypeKind<'t>
impl<'t> Sync for TypeKind<'t>
impl<'t> Unpin for TypeKind<'t>
impl<'t> UnwindSafe for TypeKind<'t>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,