Struct L1Table

Source
pub struct L1Table { /* private fields */ }

Implementations§

Source§

impl L1Table

Source

pub fn new( offset: Option<u64>, data_size: usize, header_entries: u32, bs_bits: u8, ) -> Self

Source

pub fn update_header_entries(&mut self, entries: u32)

Source

pub fn clone_and_grow(&self, at_least_index: usize, cluster_size: usize) -> Self

Create a clone that covers at least at_least_index

Source

pub fn in_bounds(&self, index: usize) -> bool

Source

pub fn map_l2_offset(&mut self, index: usize, l2_offset: u64)

Trait Implementations§

Source§

impl Debug for L1Table

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Qcow2IoBuf<L1Entry>> for L1Table

Source§

fn from(data: Qcow2IoBuf<L1Entry>) -> Self

Converts to this type from the input type.
Source§

impl Table for L1Table

Source§

fn pop_dirty_blk_idx(&self, val: Option<u32>) -> Option<u32>

Remove specified data iff val isn’t None

Source§

type Entry = L1Entry

Source§

fn as_ptr(&self) -> *const u8

Source§

fn as_mut_ptr(&mut self) -> *mut u8

Source§

fn get_offset(&self) -> Option<u64>

Source§

fn set_offset(&mut self, offset: Option<u64>)

Source§

fn entries(&self) -> usize

Source§

fn get(&self, index: usize) -> L1Entry

Source§

fn set(&mut self, index: usize, entry: L1Entry)

Source§

fn set_dirty(&self, idx: usize)

Source§

fn set_with_return( &mut self, index: usize, value: Self::Entry, ) -> Qcow2Result<()>

Source§

fn byte_size(&self) -> usize

Source§

fn cluster_count(&self, qcow2_info: &Qcow2Info) -> usize

Source§

fn is_update(&self) -> bool

Source§

fn new_empty(offset: Option<u64>, size: usize) -> Self

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.