#[repr(C)]pub struct Definition {
start: u32,
end: u32,
key: i32,
_pad: u16,
program: u8,
is_active: u8,
}
Expand description
Code range and properties for a function or instruction definition.
Fields§
§start: u32
§end: u32
§key: i32
The function number for an FDEF or opcode for an IDEF.
_pad: u16
§program: u8
§is_active: u8
Implementations§
Source§impl Definition
impl Definition
Sourcepub fn new(program: Program, code_range: Range<usize>, key: i32) -> Self
pub fn new(program: Program, code_range: Range<usize>, key: i32) -> Self
Creates a new definition with the given program, code range and key.
The key is either a function number or opcode for function and instruction definitions respectively.
Sourcepub fn code_range(&self) -> Range<usize>
pub fn code_range(&self) -> Range<usize>
Returns the byte range of the code for this definition in the source program.
Trait Implementations§
Source§impl Clone for Definition
impl Clone for Definition
Source§fn clone(&self) -> Definition
fn clone(&self) -> Definition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Definition
impl Debug for Definition
Source§impl Default for Definition
impl Default for Definition
Source§fn default() -> Definition
fn default() -> Definition
Returns the “default value” for a type. Read more
Source§impl PartialEq for Definition
impl PartialEq for Definition
impl Copy for Definition
impl Eq for Definition
impl StructuralPartialEq for Definition
Auto Trait Implementations§
impl Freeze for Definition
impl RefUnwindSafe for Definition
impl Send for Definition
impl Sync for Definition
impl Unpin for Definition
impl UnwindSafe for Definition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more