pub struct ObjectLocatorSegment {
pub entries: Vec<(ObjectId, Vec<SymbolLogOffset>)>,
}Expand description
Maps ObjectId -> Vec<SymbolLogOffset> — accelerator for finding
symbols on disk (§3.6.3).
Rebuildable by scanning symbol logs.
Fields§
§entries: Vec<(ObjectId, Vec<SymbolLogOffset>)>Sorted entries mapping object IDs to their symbol log offsets.
Implementations§
Source§impl ObjectLocatorSegment
impl ObjectLocatorSegment
Sourcepub fn new(entries: Vec<(ObjectId, Vec<SymbolLogOffset>)>) -> Self
pub fn new(entries: Vec<(ObjectId, Vec<SymbolLogOffset>)>) -> Self
Create from unsorted entries. Sorts by ObjectId bytes for
deterministic encoding.
Sourcepub fn lookup(&self, id: &ObjectId) -> Option<&[SymbolLogOffset]>
pub fn lookup(&self, id: &ObjectId) -> Option<&[SymbolLogOffset]>
Look up symbol log offsets for a given ObjectId.
Sourcepub fn rebuild_from_scan(
pairs: impl IntoIterator<Item = (ObjectId, SymbolLogOffset)>,
) -> Self
pub fn rebuild_from_scan( pairs: impl IntoIterator<Item = (ObjectId, SymbolLogOffset)>, ) -> Self
Rebuild from a set of (ObjectId, SymbolLogOffset) pairs, typically
obtained by scanning symbol log files.
Trait Implementations§
Source§impl Clone for ObjectLocatorSegment
impl Clone for ObjectLocatorSegment
Source§fn clone(&self) -> ObjectLocatorSegment
fn clone(&self) -> ObjectLocatorSegment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObjectLocatorSegment
impl Debug for ObjectLocatorSegment
Source§impl PartialEq for ObjectLocatorSegment
impl PartialEq for ObjectLocatorSegment
impl Eq for ObjectLocatorSegment
impl StructuralPartialEq for ObjectLocatorSegment
Auto Trait Implementations§
impl Freeze for ObjectLocatorSegment
impl RefUnwindSafe for ObjectLocatorSegment
impl Send for ObjectLocatorSegment
impl Sync for ObjectLocatorSegment
impl Unpin for ObjectLocatorSegment
impl UnsafeUnpin for ObjectLocatorSegment
impl UnwindSafe for ObjectLocatorSegment
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).