[][src]Enum cpclib_basic::tokens::BasicValue

pub enum BasicValue {
    Integer(u8u8),
    Float(u8u8u8u8u8),
    String(String),
}

Encode a Basic value

Variants

Integer(u8u8)

16bits integer value

Float(u8u8u8u8u8)

5bytes float value

String(String)

String

Methods

impl BasicValue[src]

pub fn new_integer(word: u16) -> Self[src]

pub fn new_string(_value: &str) -> Self[src]

pub fn new_float(_value: i32) -> Self[src]

pub fn as_bytes(&self) -> Vec<u8>[src]

pub fn as_integer(&self) -> Option<u16>[src]

Return the integer value when it is an integer

pub fn int_hexdecimal_representation(&self) -> Option<String>[src]

pub fn int_decimal_representation(&self) -> Option<String>[src]

Trait Implementations

impl Clone for BasicValue[src]

impl Debug for BasicValue[src]

impl PartialEq<BasicValue> for BasicValue[src]

impl StructuralPartialEq for BasicValue[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.