pub struct PreparedGraft {
pub base_generation: u64,
pub write_generation: u64,
pub root: u32,
pub rows: u64,
pub min: Vec<u8>,
pub max: Vec<u8>,
pub last_next: u32,
pub inserted_min: Vec<u8>,
pub inserted_max: Vec<u8>,
pub inserted_rows: u64,
}Expand description
Durable description of an unreachable, independently verified graft.
Persist this beside a resumable build before acknowledging its final
sorter watermark. On reopen, Store::publish_existing_candidate checks
both generations, re-verifies every reachable candidate page through a
fresh handle, reconstructs the standing parent path, and only then flips
the root.
Fields§
§base_generation: u64§write_generation: u64§root: u32§rows: u64§min: Vec<u8>§max: Vec<u8>§last_next: u32§inserted_min: Vec<u8>§inserted_max: Vec<u8>§inserted_rows: u64Implementations§
Source§impl PreparedGraft
impl PreparedGraft
pub fn encode(&self) -> Result<Vec<u8>>
pub fn decode(bytes: &[u8]) -> Result<Self>
Sourcepub fn write_manifest(&self, path: &Path) -> Result<()>
pub fn write_manifest(&self, path: &Path) -> Result<()>
Durably replace a candidate descriptor. A torn next descriptor remains
at .tmp; reopen reads only the last fsynced-and-renamed manifest.
pub fn read_manifest(path: &Path) -> Result<Self>
Trait Implementations§
Source§impl Clone for PreparedGraft
impl Clone for PreparedGraft
Source§impl Debug for PreparedGraft
impl Debug for PreparedGraft
impl Eq for PreparedGraft
Source§impl PartialEq for PreparedGraft
impl PartialEq for PreparedGraft
impl StructuralPartialEq for PreparedGraft
Auto Trait Implementations§
impl Freeze for PreparedGraft
impl RefUnwindSafe for PreparedGraft
impl Send for PreparedGraft
impl Sync for PreparedGraft
impl Unpin for PreparedGraft
impl UnsafeUnpin for PreparedGraft
impl UnwindSafe for PreparedGraft
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