pub struct TextWritePlugin { /* private fields */ }Expand description
Write-path hook building text-index documents.
allow is the optional predicate allowlist from text.toml: when set,
string literals under any other predicate are not indexed at all. The
document identity is (predicate, literal), so the same literal under two
allowed predicates produces two documents.
There is deliberately no Default: an implicit construction would index
every predicate, while the plugin’s own default config indexes the built-in
text-predicate list. Every caller states its policy through Self::new.
Implementations§
Trait Implementations§
Source§impl Debug for TextWritePlugin
impl Debug for TextWritePlugin
Source§impl WritePlugin for TextWritePlugin
impl WritePlugin for TextWritePlugin
Source§fn prepare_insert(
&self,
quads: &[Quad],
_commit_ts: CommitTs,
_op: StorageOp,
) -> Result<PreparedInsert, ComputeError>
fn prepare_insert( &self, quads: &[Quad], _commit_ts: CommitTs, _op: StorageOp, ) -> Result<PreparedInsert, ComputeError>
Prepare one batch.
commit_ts is the batch’s assigned timestamp; the
plugin stamps postings with it. op distinguishes a put from a delete:
a plugin may rewrite both to the same native term key, while only puts
contribute index postings. Must be pure (no I/O, no storage). Term
rewrites are sparse (PreparedInsert::object_rewrites) so several
write plugins compose over one plain encoding.Auto Trait Implementations§
impl Freeze for TextWritePlugin
impl RefUnwindSafe for TextWritePlugin
impl Send for TextWritePlugin
impl Sync for TextWritePlugin
impl Unpin for TextWritePlugin
impl UnsafeUnpin for TextWritePlugin
impl UnwindSafe for TextWritePlugin
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
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§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].