Struct tantivy::Segment [−][src]
pub struct Segment { /* fields omitted */ }
A segment is a piece of the index.
Methods
impl Segment
[src]
impl Segment
pub fn index(&self) -> &Index
[src]
pub fn index(&self) -> &Index
Returns the index the segment belongs to.
pub fn schema(&self) -> Schema
[src]
pub fn schema(&self) -> Schema
Returns our index's schema.
pub fn meta(&self) -> &SegmentMeta
[src]
pub fn meta(&self) -> &SegmentMeta
Returns the segment meta-information
pub fn id(&self) -> SegmentId
[src]
pub fn id(&self) -> SegmentId
Returns the segment's id.
pub fn relative_path(&self, component: SegmentComponent) -> PathBuf
[src]
pub fn relative_path(&self, component: SegmentComponent) -> PathBuf
Returns the relative path of a component of our segment.
It just joins the segment id with the extension associated to a segment component.
pub fn open_read(
&self,
component: SegmentComponent
) -> Result<ReadOnlySource, OpenReadError>
[src]
pub fn open_read(
&self,
component: SegmentComponent
) -> Result<ReadOnlySource, OpenReadError>
Open one of the component file for a regular read.
pub fn open_write(
&mut self,
component: SegmentComponent
) -> Result<WritePtr, OpenWriteError>
[src]
pub fn open_write(
&mut self,
component: SegmentComponent
) -> Result<WritePtr, OpenWriteError>
Open one of the component file for regular write.
Trait Implementations
impl Clone for Segment
[src]
impl Clone for Segment
fn clone(&self) -> Segment
[src]
fn clone(&self) -> Segment
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Segment
[src]
impl Debug for Segment