pub struct RefBlock { /* private fields */ }Implementations§
Source§impl RefBlock
impl RefBlock
pub fn new(refcount_order: u8, size: usize, offset: Option<u64>) -> Self
pub fn set_refcount_order(&mut self, refcount_order: u8)
pub fn increment(&mut self, index: usize) -> Qcow2Result<()>
pub fn decrement(&mut self, index: usize) -> Qcow2Result<()>
pub fn get_free_range(&self, start: usize, count: usize) -> Option<Range<usize>>
pub fn get_tail_free_range(&self) -> Option<Range<usize>>
pub fn alloc_range(&mut self, s: usize, e: usize) -> Qcow2Result<()>
Trait Implementations§
Source§impl From<Qcow2IoBuf<RefBlockEntry>> for RefBlock
impl From<Qcow2IoBuf<RefBlockEntry>> for RefBlock
Source§fn from(data: Qcow2IoBuf<RefBlockEntry>) -> Self
fn from(data: Qcow2IoBuf<RefBlockEntry>) -> Self
Converts to this type from the input type.
Source§impl Table for RefBlock
impl Table for RefBlock
type Entry = RefBlockEntry
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) -> Self::Entry
fn set(&mut self, index: usize, value: Self::Entry)
fn set_with_return( &mut self, index: usize, value: Self::Entry, ) -> Qcow2Result<()>
fn cluster_count(&self, qcow2_info: &Qcow2Info) -> usize
fn is_update(&self) -> bool
fn new_empty(offset: Option<u64>, size: usize) -> Self
fn set_dirty(&self, _idx: usize)
fn pop_dirty_blk_idx(&self, _val: Option<u32>) -> Option<u32>
Auto Trait Implementations§
impl Freeze for RefBlock
impl RefUnwindSafe for RefBlock
impl Send for RefBlock
impl Sync for RefBlock
impl Unpin for RefBlock
impl UnwindSafe for RefBlock
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