pub struct RefTable { /* private fields */ }Implementations§
Source§impl RefTable
impl RefTable
pub fn new(offset: Option<u64>, size: usize, bs_bits: u8) -> Self
Sourcepub fn clone_and_grow(
&self,
clusters: usize,
cluster_size: usize,
bs: usize,
) -> Self
pub fn clone_and_grow( &self, clusters: usize, cluster_size: usize, bs: usize, ) -> Self
Create a clone that covers at least at_least_index
pub fn in_bounds(&self, index: usize) -> bool
pub fn set_refblock_offset(&mut self, index: usize, rb_offset: u64)
Trait Implementations§
Source§impl From<Qcow2IoBuf<RefTableEntry>> for RefTable
impl From<Qcow2IoBuf<RefTableEntry>> for RefTable
Source§fn from(data: Qcow2IoBuf<RefTableEntry>) -> Self
fn from(data: Qcow2IoBuf<RefTableEntry>) -> Self
Converts to this type from the input type.
Source§impl Table for RefTable
impl Table for RefTable
Source§fn pop_dirty_blk_idx(&self, val: Option<u32>) -> Option<u32>
fn pop_dirty_blk_idx(&self, val: Option<u32>) -> Option<u32>
Remove specified data iff val isn’t None
type Entry = RefTableEntry
fn as_ptr(&self) -> *const u8
fn as_mut_ptr(&mut self) -> *mut u8
fn get_offset(&self) -> Option<u64>
fn set_offset(&mut self, offset: Option<u64>)
fn entries(&self) -> usize
fn get(&self, index: usize) -> RefTableEntry
fn set(&mut self, index: usize, entry: RefTableEntry)
fn set_dirty(&self, idx: usize)
fn set_with_return( &mut self, index: usize, value: Self::Entry, ) -> Qcow2Result<()>
fn byte_size(&self) -> usize
fn cluster_count(&self, qcow2_info: &Qcow2Info) -> usize
fn is_update(&self) -> bool
fn new_empty(offset: Option<u64>, size: usize) -> Self
Auto Trait Implementations§
impl !Freeze for RefTable
impl !RefUnwindSafe for RefTable
impl Send for RefTable
impl !Sync for RefTable
impl Unpin for RefTable
impl UnwindSafe for RefTable
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