pub struct StateDiff<'a> { /* private fields */ }Expand description
A diff between two states of account data.
Implementations§
Source§impl<'a> StateDiff<'a>
impl<'a> StateDiff<'a>
Sourcepub fn has_changes(&self) -> bool
pub fn has_changes(&self) -> bool
Whether the data changed at all.
Sourcepub fn was_resized(&self) -> bool
pub fn was_resized(&self) -> bool
Whether the account was resized.
Sourcepub fn field_changed(&self, offset: usize, size: usize) -> bool
pub fn field_changed(&self, offset: usize, size: usize) -> bool
Check if a specific field (by offset and size) changed.
Sourcepub fn changed_byte_count(&self) -> usize
pub fn changed_byte_count(&self) -> usize
Count the number of bytes that changed.
Sourcepub fn changed_regions<const MAX_REGIONS: usize>(
&self,
) -> ChangedRegions<MAX_REGIONS>
pub fn changed_regions<const MAX_REGIONS: usize>( &self, ) -> ChangedRegions<MAX_REGIONS>
Iterate over changed regions (runs of consecutive changed bytes).
Returns up to MAX_REGIONS contiguous changed regions.
Auto Trait Implementations§
impl<'a> Freeze for StateDiff<'a>
impl<'a> RefUnwindSafe for StateDiff<'a>
impl<'a> Send for StateDiff<'a>
impl<'a> Sync for StateDiff<'a>
impl<'a> Unpin for StateDiff<'a>
impl<'a> UnsafeUnpin for StateDiff<'a>
impl<'a> UnwindSafe for StateDiff<'a>
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