pub struct TextSubjectWindowBuilder { /* private fields */ }Expand description
Intern one window’s rows as the partition pages arrive.
push interns each term; finish sorts the ids and splits the parallel
columns. The intermediate (TermId, TermId) buffer is eight bytes per
logged row (TermId::UNBOUND stands in for “no graph id”). Growth can
leave the buffer with up to twice its length in capacity (~16 B/row
transiently), and finish keeps the buffer alive while it writes the two
columns, so its peak is the buffer plus the columns (~16 B/row, ~24 B/row
with growth slack). The memo admits only the final columns: 4 B/row
subject-only, 8 B/row with the graph id.
Implementations§
Source§impl TextSubjectWindowBuilder
impl TextSubjectWindowBuilder
Sourcepub fn new(dict: Arc<TermDict>, with_graph: bool) -> Self
pub fn new(dict: Arc<TermDict>, with_graph: bool) -> Self
One builder over dict; with_graph follows the request’s row shape.
Sourcepub fn push(&mut self, row: TextSubjectRow) -> Result<(), ComputeError>
pub fn push(&mut self, row: TextSubjectRow) -> Result<(), ComputeError>
Intern one streamed row.
Sourcepub fn finish(self) -> TextSubjectWindow
pub fn finish(self) -> TextSubjectWindow
Sort and compact the window.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextSubjectWindowBuilder
impl RefUnwindSafe for TextSubjectWindowBuilder
impl Send for TextSubjectWindowBuilder
impl Sync for TextSubjectWindowBuilder
impl Unpin for TextSubjectWindowBuilder
impl UnsafeUnpin for TextSubjectWindowBuilder
impl UnwindSafe for TextSubjectWindowBuilder
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].