[][src]Struct moore_vhdl::hir::LitExpr

pub struct LitExpr { /* fields omitted */ }

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]

impl Debug for LitExpr[src]

impl<'t> Expr2<'t> for LitExpr[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.