pub trait Table: From<Qcow2IoBuf<Self::Entry>> {
type Entry: TableEntry;
Show 14 methods
// Required methods
fn entries(&self) -> usize;
fn get(&self, index: usize) -> Self::Entry;
fn set(&mut self, index: usize, value: Self::Entry);
fn get_offset(&self) -> Option<u64>;
fn set_offset(&mut self, offset: Option<u64>);
fn as_ptr(&self) -> *const u8;
fn as_mut_ptr(&mut self) -> *mut u8;
// Provided methods
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 { ... }
fn set_dirty(&self, _idx: usize) { ... }
fn pop_dirty_blk_idx(&self, _val: Option<u32>) -> Option<u32> { ... }
}Required Associated Types§
type Entry: TableEntry
Required Methods§
fn entries(&self) -> usize
fn get(&self, index: usize) -> Self::Entry
fn set(&mut self, index: usize, value: Self::Entry)
fn get_offset(&self) -> Option<u64>
fn set_offset(&mut self, offset: Option<u64>)
fn as_ptr(&self) -> *const u8
fn as_mut_ptr(&mut self) -> *mut u8
Provided Methods§
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
fn set_dirty(&self, _idx: usize)
fn pop_dirty_blk_idx(&self, _val: Option<u32>) -> Option<u32>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.