pub struct L2Entry(/* private fields */);Implementations§
Source§impl L2Entry
impl L2Entry
pub fn cluster_offset(&self) -> u64
pub fn is_compressed(&self) -> bool
pub fn is_copied(&self) -> bool
pub fn is_zero(&self) -> bool
pub fn reserved_bits(&self) -> u64
pub fn compressed_descriptor(&self) -> u64
Sourcepub fn compressed_range(&self, cluster_bits: u32) -> Option<(u64, usize)>
pub fn compressed_range(&self, cluster_bits: u32) -> Option<(u64, usize)>
If this entry is compressed, return the start host offset and upper limit on the compressed number of bytes
Sourcepub fn allocation(&self, cluster_bits: u32) -> Option<(u64, usize)>
pub fn allocation(&self, cluster_bits: u32) -> Option<(u64, usize)>
If this entry is allocated, return the host cluster offset and the number of clusters it references; otherwise return None.
Sourcepub fn into_mapping(
self,
info: &Qcow2Info,
guest_addr: &SplitGuestOffset,
) -> Mapping
pub fn into_mapping( self, info: &Qcow2Info, guest_addr: &SplitGuestOffset, ) -> Mapping
Convert to mapping
guest_addr is only used for backing offset
pub fn from_mapping(value: Mapping, cluster_bits: u32) -> Self
Trait Implementations§
Source§impl TableEntry for L2Entry
impl TableEntry for L2Entry
fn try_from_plain(value: u64, qcow2_info: &Qcow2Info) -> Qcow2Result<Self>
fn into_plain(self) -> u64
impl Copy for L2Entry
Auto Trait Implementations§
impl Freeze for L2Entry
impl RefUnwindSafe for L2Entry
impl Send for L2Entry
impl Sync for L2Entry
impl Unpin for L2Entry
impl UnwindSafe for L2Entry
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