pub struct Segment {
pub meta: SegmentMeta,
pub data: MmapPostingData,
/* private fields */
}Expand description
An open segment: its manifest entry and its mapping.
Fields§
§meta: SegmentMeta§data: MmapPostingDataImplementations§
Source§impl Segment
impl Segment
pub fn open(base: &Path, meta: SegmentMeta) -> Result<Self, String>
Sourcepub fn holds(&self, id: u64) -> Result<bool, String>
pub fn holds(&self, id: u64) -> Result<bool, String>
Whether this segment was written with id (deleted or not).
Sourcepub fn tombstone(&mut self, id: u64) -> bool
pub fn tombstone(&mut self, id: u64) -> bool
Mark id deleted here. Answers whether it changed anything.
pub fn path(&self) -> PathBuf
pub fn ids_path(&self) -> PathBuf
Auto Trait Implementations§
impl !Freeze for Segment
impl !RefUnwindSafe for Segment
impl !Sync for Segment
impl Send for Segment
impl Unpin for Segment
impl UnsafeUnpin for Segment
impl UnwindSafe for Segment
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