Enum DataValue

Source
pub enum DataValue {
    Byte(i8),
    Word(i16),
    Longword(i32),
    Quadword(i64),
    Octoword(i128),
    Floating(FFloating),
    Double(DFloating),
    GFloating(GFloating),
    HFloating(HFloating),
}
Expand description

§Vax Data Values

Variants§

§

Byte(i8)

The VAX Byte data type. Reads into a i8 value.

§

Word(i16)

The VAX Word data type. Reads into a i16 value.

§

Longword(i32)

The VAX Longword data type. Reads into a i32 value.

§

Quadword(i64)

The VAX Quadword data type. Reads into a i64 value.

§

Octoword(i128)

The VAX Octoword data type. Reads into a i128 value.

§

Floating(FFloating)

The VAX Floating data type. Reads into a FFloating value.

§

Double(DFloating)

The VAX Double data type. Reads into a DFloating value.

§

GFloating(GFloating)

The VAX GFloating data type. Reads into a GFloating value.

§

HFloating(HFloating)

The VAX HFloating data type. Reads into a HFloating value.

Implementations§

Source§

impl DataValue

Source

pub fn data_type(&self) -> DataType

Return the DataType for this DataValue.

§Examples
use vax_disassembler::opcode::{DataType, DataValue};
use vax_floating::{FFloating, DFloating, GFloating, HFloating};

assert_eq!(DataValue::Byte(i8::MAX).data_type(), DataType::Byte);
assert_eq!(DataValue::Word(i16::MAX).data_type(), DataType::Word);
assert_eq!(DataValue::Longword(i32::MAX).data_type(), DataType::Longword);
assert_eq!(DataValue::Quadword(i64::MAX).data_type(), DataType::Quadword);
assert_eq!(DataValue::Octoword(i128::MAX).data_type(), DataType::Octoword);
assert_eq!(DataValue::Floating(FFloating::MAX).data_type(), DataType::Floating);
assert_eq!(DataValue::Double(DFloating::MAX).data_type(), DataType::Double);
assert_eq!(DataValue::GFloating(GFloating::MAX).data_type(), DataType::GFloating);
assert_eq!(DataValue::HFloating(HFloating::MAX).data_type(), DataType::HFloating);

Trait Implementations§

Source§

impl Clone for DataValue

Source§

fn clone(&self) -> DataValue

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DataValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DataValue

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for DataValue

Source§

fn eq(&self, other: &DataValue) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for DataValue

Source§

impl Eq for DataValue

Source§

impl StructuralPartialEq for DataValue

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.