Struct elasticlunr::pipeline::Pipeline [−][src]
pub struct Pipeline { pub queue: Vec<(String, PipelineFn)>, }
A sequence of PipelineFn
s which are run on tokens to prepare them for searching.
Fields
queue: Vec<(String, PipelineFn)>
Methods
impl Pipeline
[src]
impl Pipeline
pub fn for_language(lang: Language) -> Pipeline
[src]
pub fn for_language(lang: Language) -> Pipeline
Deprecating in 2.2.0
: Use Language::make_pipeline()
Returns a pipeline for the given Language
.
pub fn run(&self, tokens: Vec<String>) -> Vec<String>
[src]
pub fn run(&self, tokens: Vec<String>) -> Vec<String>
Run the Pipeline against the given vector of tokens. The returned vector may be shorter
than the input if a pipeline function returns None
for a token.
Trait Implementations
impl Debug for Pipeline
[src]
impl Debug for Pipeline
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Serialize for Pipeline
[src]
impl Serialize for Pipeline
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Default for Pipeline
[src]
impl Default for Pipeline