[−][src]Enum peepmatic_runtime::part::Constant
A constant value.
Whether an integer is interpreted as signed or unsigned depends on the operations applied to it.
Variants
A boolean of the given width.
An integer constant of the given width,
Implementations
impl Constant
[src]
pub fn as_int(&self) -> Option<u64>
[src]
If this is any kind of integer constant, get it as a 64-bit unsigned integer.
pub fn as_bool(&self) -> Option<bool>
[src]
If this is any kind of boolean constant, get its value.
pub fn bit_width(&self, root_width: u8) -> u8
[src]
The number of bits required to represent this constant value's type.
Trait Implementations
impl Clone for Constant
[src]
impl Copy for Constant
[src]
impl Debug for Constant
[src]
impl Eq for Constant
[src]
impl<I> From<Constant> for Part<I> where
I: Copy + Debug + Eq,
[src]
I: Copy + Debug + Eq,
impl PartialEq<Constant> for Constant
[src]
impl StructuralEq for Constant
[src]
impl StructuralPartialEq for Constant
[src]
Auto Trait Implementations
impl RefUnwindSafe for Constant
impl Send for Constant
impl Sync for Constant
impl Unpin for Constant
impl UnwindSafe for Constant
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<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,