pub struct PatchStagingBuffer<const DC: usize, const EC: usize> { /* private fields */ }Expand description
Fixed-capacity staging buffer for transactional writes.
DC is the data capacity in bytes, EC is the max number of entries.
Implementations§
Trait Implementations§
Source§impl<const DC: usize, const EC: usize> StagingBuffer for PatchStagingBuffer<DC, EC>
impl<const DC: usize, const EC: usize> StagingBuffer for PatchStagingBuffer<DC, EC>
Source§fn any_staged(&self) -> bool
fn any_staged(&self) -> bool
Returns true if any writes are staged.
Source§fn for_each_staged<F>(&self, f: F) -> Result<(), ShadowError>
fn for_each_staged<F>(&self, f: F) -> Result<(), ShadowError>
Iterates over all staged writes in order.
Source§fn write_staged(&mut self, addr: u16, data: &[u8]) -> Result<(), ShadowError>
fn write_staged(&mut self, addr: u16, data: &[u8]) -> Result<(), ShadowError>
Stages a write to be applied on commit.
Source§fn apply_overlay(&self, addr: u16, out: &mut [u8]) -> Result<(), ShadowError>
fn apply_overlay(&self, addr: u16, out: &mut [u8]) -> Result<(), ShadowError>
Applies staged writes to the output buffer for the given address range.
Source§fn clear_staged(&mut self) -> Result<(), ShadowError>
fn clear_staged(&mut self) -> Result<(), ShadowError>
Clears all staged writes.
Auto Trait Implementations§
impl<const DC: usize, const EC: usize> Freeze for PatchStagingBuffer<DC, EC>
impl<const DC: usize, const EC: usize> RefUnwindSafe for PatchStagingBuffer<DC, EC>
impl<const DC: usize, const EC: usize> Send for PatchStagingBuffer<DC, EC>
impl<const DC: usize, const EC: usize> Sync for PatchStagingBuffer<DC, EC>
impl<const DC: usize, const EC: usize> Unpin for PatchStagingBuffer<DC, EC>
impl<const DC: usize, const EC: usize> UnwindSafe for PatchStagingBuffer<DC, EC>
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