pub struct Varnode {
pub space: SpaceId,
pub offset: u64,
pub size: usize,
}Expand description
A storage location or constant used as an input or output of a p-code op.
space and offset identify the location; size is its width in bytes.
A constant is represented by SPACE_CONST and stores its value in
offset.
Fields§
§space: SpaceIdAddress space containing this varnode, or SPACE_CONST for a constant.
offset: u64Byte offset in space, or the value for a constant-space varnode.
size: usizeWidth in bytes.
Implementations§
Source§impl Varnode
impl Varnode
Sourcepub const fn new(space: SpaceId, offset: u64, size: usize) -> Self
pub const fn new(space: SpaceId, offset: u64, size: usize) -> Self
Creates a varnode at offset in space with byte width size.
Sourcepub const fn constant(value: u64, size: usize) -> Self
pub const fn constant(value: u64, size: usize) -> Self
Creates a constant-space varnode containing value with byte width size.
Sourcepub fn is_constant(self) -> bool
pub fn is_constant(self) -> bool
Returns whether this is a constant-space varnode.
Trait Implementations§
impl Copy for Varnode
Source§impl<'de> Deserialize<'de> for Varnode
impl<'de> Deserialize<'de> for Varnode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Varnode
impl StructuralPartialEq for Varnode
Auto Trait Implementations§
impl Freeze for Varnode
impl RefUnwindSafe for Varnode
impl Send for Varnode
impl Sync for Varnode
impl Unpin for Varnode
impl UnsafeUnpin for Varnode
impl UnwindSafe for Varnode
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