[][src]Enum trashcan::ast::Literal

pub enum Literal {
    NullPtr,
    NullVar,
    EmptyVar,
    Bool(bool),
    UInt8(u8),
    Int16(i16),
    Int32(i32),
    IntPtr(i64),
    Float32(f32),
    Float64(f64),
    String(String),
    Currency(i64),
    Date(f64),
}

Literals are...

Variants

NullPtr

null pointer literal (= VB6 Nothing)

NullVar

null variant literal (= VB6 Null)

EmptyVar

empty variant literal (= VB6 Empty)

Bool(bool)

bool

UInt8(u8)

u8

Int16(i16)

i16

Int32(i32)

i32

IntPtr(i64)

isize

Float32(f32)

f32

Float64(f64)

f64

String(String)

str

Currency(i64)

currency

Date(f64)

date

Methods

impl Literal[src]

pub fn ty(&self) -> Type[src]

pub fn num_of_type<T>(ty: &Type, val: T) -> Option<Self> where
    T: Into<i64> + Into<f64>, 
[src]

Trait Implementations

impl Emit<()> for Literal[src]

impl PartialEq<Literal> for Literal[src]

impl Clone for Literal[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Literal[src]

impl Display for Literal[src]

Auto Trait Implementations

impl Send for Literal

impl Sync for Literal

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

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

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

The type returned in the event of a conversion error.