pub struct L1Table { /* private fields */ }Implementations§
Source§impl L1Table
impl L1Table
pub fn new( offset: Option<u64>, data_size: usize, header_entries: u32, bs_bits: u8, ) -> Self
pub fn update_header_entries(&mut self, entries: u32)
Sourcepub fn clone_and_grow(&self, at_least_index: usize, cluster_size: usize) -> Self
pub fn clone_and_grow(&self, at_least_index: usize, cluster_size: usize) -> Self
Create a clone that covers at least at_least_index
pub fn in_bounds(&self, index: usize) -> bool
pub fn map_l2_offset(&mut self, index: usize, l2_offset: u64)
Trait Implementations§
Source§impl From<Qcow2IoBuf<L1Entry>> for L1Table
impl From<Qcow2IoBuf<L1Entry>> for L1Table
Source§fn from(data: Qcow2IoBuf<L1Entry>) -> Self
fn from(data: Qcow2IoBuf<L1Entry>) -> Self
Converts to this type from the input type.
Source§impl Table for L1Table
impl Table for L1Table
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 = L1Entry
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) -> L1Entry
fn set(&mut self, index: usize, entry: L1Entry)
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 L1Table
impl !RefUnwindSafe for L1Table
impl Send for L1Table
impl !Sync for L1Table
impl Unpin for L1Table
impl UnwindSafe for L1Table
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