[−][src]Enum dynasm::Value
A dynamically or statically computed value.
To produce valid binary it is mostly only important to know the correct width of the output but
the value itself can be computed by the caller. This allows freedom on parsing without
requiring the assembler core (this library) to implement an arbitrary expression evaluator. In
particular, the evaluation can even be further delayed by the caller and left to rustc
.
Variants
Number(Number)
A constant number.
Expr(Expr)
An external expression of the caller.
Implementations
impl Value
[src]
pub fn Byte(val: u8) -> Self
[src]
pub fn Word(val: u16) -> Self
[src]
pub fn Dword(val: u32) -> Self
[src]
pub fn Qword(val: u64) -> Self
[src]
pub fn repr(self) -> NumericRepr
[src]
pub fn convert(self, repr: NumericRepr) -> Option<Self>
[src]
pub fn size(self) -> Size
[src]
Trait Implementations
impl Clone for Value
[src]
impl Copy for Value
[src]
impl Debug for Value
[src]
impl<'_> From<&'_ Expr> for Value
[src]
impl<'_> From<&'_ Value> for Stmt
[src]
impl From<Expr> for Value
[src]
impl From<Value> for JumpOffset
[src]
fn from(val: Value) -> JumpOffset
[src]
impl From<Value> for Stmt
[src]
impl From<u8> for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,