pub struct Varnode<'str> { /* private fields */ }Expand description
A named, typed reference to a specific location in a memory Space.
A varnode is identified by its (space, address, size) triple. Registers
are modelled as varnodes in the register space; memory operands are varnodes
in the RAM space.
Implementations§
Source§impl<'str> Varnode<'str>
impl<'str> Varnode<'str>
Sourcepub fn size_bytes(&self) -> usize
pub fn size_bytes(&self) -> usize
Returns the size of this varnode in bytes, without requiring a context reference.
Sourcepub fn make<'ctx>(
ctx: &'ctx mut Context<'str>,
base: i64,
size: usize,
space: SpaceId,
) -> VarnodeMutRef<'str, 'ctx>
pub fn make<'ctx>( ctx: &'ctx mut Context<'str>, base: i64, size: usize, space: SpaceId, ) -> VarnodeMutRef<'str, 'ctx>
Creates a new varnode in the context and returns a mutable reference to it.
Sourcepub fn from_id<'ctx>(
src: impl AsShared<'ctx, 'str>,
id: VarnodeId,
) -> VarnodeRef<'str, 'ctx>
pub fn from_id<'ctx>( src: impl AsShared<'ctx, 'str>, id: VarnodeId, ) -> VarnodeRef<'str, 'ctx>
Retrieves an existing varnode by its ID and returns an immutable reference
to it. Accepts either a &Context or a bare &Shared (via
AsShared).
Sourcepub fn from_id_mut<'ctx>(
ctx: &'ctx mut Context<'str>,
id: VarnodeId,
) -> VarnodeMutRef<'str, 'ctx>
pub fn from_id_mut<'ctx>( ctx: &'ctx mut Context<'str>, id: VarnodeId, ) -> VarnodeMutRef<'str, 'ctx>
Retrieves an existing varnode from the context by its ID and returns a mutable reference to it.
Trait Implementations§
Source§impl<'de, 'str> Deserialize<'de> for Varnode<'str>
impl<'de, 'str> Deserialize<'de> for Varnode<'str>
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
Auto Trait Implementations§
impl<'str> Freeze for Varnode<'str>
impl<'str> RefUnwindSafe for Varnode<'str>
impl<'str> Send for Varnode<'str>
impl<'str> Sync for Varnode<'str>
impl<'str> Unpin for Varnode<'str>
impl<'str> UnsafeUnpin for Varnode<'str>
impl<'str> UnwindSafe for Varnode<'str>
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