[−][src]Struct moore_vhdl::hir::LitExpr
A literal expression.
Implementations
impl LitExpr
[src]
pub fn new_integer(span: Span, value: BigInt) -> LitExpr
[src]
Create a new integer literal expression.
pub fn new_float(span: Span, value: BigRational) -> LitExpr
[src]
Create a new float literal expression.
pub fn value(&self) -> &LitExprValue
[src]
Return the constant value of the literal.
pub fn is_integer(&self) -> bool
[src]
Check if this is an integer literal.
pub fn is_float(&self) -> bool
[src]
Check if this is a floating-point literal.
pub fn integer_value(&self) -> Option<&BigInt>
[src]
Return the literal's integer value, or None
if it is not an integer.
pub fn float_value(&self) -> Option<&BigRational>
[src]
Return the literal's float value, or None
if it is not an float.
Trait Implementations
impl<'a, 't> Alloc<'a, 'a, LitExpr> for Arenas2<'t> where
't: 'a,
[src]
't: 'a,
impl Debug for LitExpr
[src]
impl<'t> Expr2<'t> for LitExpr
[src]
fn typeval(
&self,
_: Option<&'t dyn Type>,
_: &dyn ExprContext<'t>
) -> Result<&'t dyn Type>
[src]
&self,
_: Option<&'t dyn Type>,
_: &dyn ExprContext<'t>
) -> Result<&'t dyn Type>
fn constant_value(
&self,
ctx: &dyn ExprContext<'t>
) -> Result<&'t dyn Const2<'t>>
[src]
&self,
ctx: &dyn ExprContext<'t>
) -> Result<&'t dyn Const2<'t>>
impl<'t> Node<'t> for LitExpr
[src]
Auto Trait Implementations
impl RefUnwindSafe for LitExpr
impl Send for LitExpr
impl Sync for LitExpr
impl Unpin for LitExpr
impl UnwindSafe for LitExpr
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, 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>,