Enum llhd::konst::ConstKind
[−]
[src]
pub enum ConstKind { Int(ConstInt), Time(ConstTime), }
Variants
Int(ConstInt)
Time(ConstTime)
Methods
impl ConstKind
[src]
fn as_int(&self) -> &ConstInt
[src]
Yield a reference to this constant's embedded integer. Panics if the constant is not an integer.
fn as_time(&self) -> &ConstTime
[src]
Yield a reference to this constant's embedded time. Panics if the constant is not a time.
Trait Implementations
impl Debug for ConstKind
[src]
impl Clone for ConstKind
[src]
fn clone(&self) -> ConstKind
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for ConstKind
[src]
fn eq(&self, __arg_0: &ConstKind) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ConstKind) -> bool
[src]
This method tests for !=
.
impl Eq for ConstKind
[src]
impl Value for ConstKind
[src]
fn id(&self) -> ValueId
[src]
Get the unique ID of the value.
fn ty(&self) -> Type
[src]
Get the type of the value.
fn name(&self) -> Option<&str>
[src]
Get the optional name of the value.
fn is_global(&self) -> bool
[src]
Whether this value is global or not. Global values are considered during linking, and are visible in a module's symbol table. Local values are not, and are only visible within the surrounding context (module or unit). Read more