pub enum Expression {
Constant(u64),
Symbol(String),
Binary {
left: Box<Expression>,
op: BinaryOp,
right: Box<Expression>,
},
Unary {
op: UnaryOp,
operand: Box<Expression>,
},
Parens(Box<Expression>),
Function {
name: String,
arg: Box<Expression>,
},
}Expand description
An expression in a linker script
Variants§
Constant(u64)
Integer constant: 1234, $ABCD, %1010
Symbol(String)
Symbol reference: BUFFER_START, _end
Binary
Binary operation: a + b, x & $FF
Unary
Unary operation: -x, ~flags
Parens(Box<Expression>)
Parenthesized expression: (a + b)
Function
Function call: sectstart(text), sectbase(1)
Trait Implementations§
Source§impl Clone for Expression
impl Clone for Expression
Source§fn clone(&self) -> Expression
fn clone(&self) -> Expression
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Expression
impl Debug for Expression
Source§impl Display for Expression
impl Display for Expression
Source§impl PartialEq for Expression
impl PartialEq for Expression
impl Eq for Expression
impl StructuralPartialEq for Expression
Auto Trait Implementations§
impl Freeze for Expression
impl RefUnwindSafe for Expression
impl Send for Expression
impl Sync for Expression
impl Unpin for Expression
impl UnwindSafe for Expression
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)