pub struct DeltaChainTracker { /* private fields */ }Expand description
Delta chain tracker
Manages base references and prevents excessive chain depth
Implementations§
Source§impl DeltaChainTracker
impl DeltaChainTracker
Sourcepub fn register(&mut self, hash: String, metadata: DeltaMetadata)
pub fn register(&mut self, hash: String, metadata: DeltaMetadata)
Register a new version
Sourcepub fn get(&self, hash: &str) -> Option<&DeltaMetadata>
pub fn get(&self, hash: &str) -> Option<&DeltaMetadata>
Get metadata for a version
Sourcepub fn find_best_base(&self, candidates: &[String]) -> Option<String>
pub fn find_best_base(&self, candidates: &[String]) -> Option<String>
Find the best base for a new version
Returns the hash of the best base, or None if no suitable base exists
Trait Implementations§
Source§impl Clone for DeltaChainTracker
impl Clone for DeltaChainTracker
Source§impl Debug for DeltaChainTracker
impl Debug for DeltaChainTracker
Auto Trait Implementations§
impl Forget for DeltaChainTracker
impl Freeze for DeltaChainTracker
impl RefUnwindSafe for DeltaChainTracker
impl Send for DeltaChainTracker
impl Sync for DeltaChainTracker
impl Unpin for DeltaChainTracker
impl UnsafeUnpin for DeltaChainTracker
impl UnwindSafe for DeltaChainTracker
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