pub struct PositionStreamEncoder<W: Write> { /* private fields */ }Expand description
Streaming writer of one term’s position stream.
Implementations§
Source§impl<W: Write> PositionStreamEncoder<W>
impl<W: Write> PositionStreamEncoder<W>
pub fn new(writer: W) -> Self
Sourcepub fn with_posting_codec(writer: W, codec: PostingCodec) -> Self
pub fn with_posting_codec(writer: W, codec: PostingCodec) -> Self
Use SIMD packing for Simd4x; other posting policies retain rounded
positions. Copied encoded blocks preserve their own codec tags.
Sourcepub fn with_compact_directory(self) -> Self
pub fn with_compact_directory(self) -> Self
Emit POS6 metadata separately from payloads.
Sourcepub fn push_doc(&mut self, positions: &mut [u32]) -> Result<()>
pub fn push_doc(&mut self, positions: &mut [u32]) -> Result<()>
Append one document’s positions. They are sorted here and stored as deltas; the caller must append documents in posting order and keep the count equal to the term frequency stored in the doc postings.
Sourcepub fn push_values(&mut self, values: &[u32]) -> Result<()>
pub fn push_values(&mut self, values: &[u32]) -> Result<()>
Append already delta-coded values (re-packing another stream).
Auto Trait Implementations§
impl<W> Freeze for PositionStreamEncoder<W>where
W: Freeze,
impl<W> RefUnwindSafe for PositionStreamEncoder<W>where
W: RefUnwindSafe,
impl<W> Send for PositionStreamEncoder<W>where
W: Send,
impl<W> Sync for PositionStreamEncoder<W>where
W: Sync,
impl<W> Unpin for PositionStreamEncoder<W>where
W: Unpin,
impl<W> UnsafeUnpin for PositionStreamEncoder<W>where
W: UnsafeUnpin,
impl<W> UnwindSafe for PositionStreamEncoder<W>where
W: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more