pub struct ReferenceExtractorBuilder { /* private fields */ }Expand description
Builder for a configurable ReferenceExtractor.
Implementations§
Source§impl ReferenceExtractorBuilder
impl ReferenceExtractorBuilder
Sourcepub fn parser(self, parser: PassageParser) -> ReferenceExtractorBuilder
pub fn parser(self, parser: PassageParser) -> ReferenceExtractorBuilder
Replace the parser used to validate candidate spans.
Sourcepub const fn include_bare_books(
self,
include: bool,
) -> ReferenceExtractorBuilder
pub const fn include_bare_books( self, include: bool, ) -> ReferenceExtractorBuilder
Configure whether whole-book passages are extracted.
Sourcepub const fn max_lookbehind(self, value: usize) -> ReferenceExtractorBuilder
pub const fn max_lookbehind(self, value: usize) -> ReferenceExtractorBuilder
Set the normalized-byte search distance before numeric anchors.
The value is checked by Self::build.
Sourcepub const fn max_lookahead(self, value: usize) -> ReferenceExtractorBuilder
pub const fn max_lookahead(self, value: usize) -> ReferenceExtractorBuilder
Set the normalized-byte search distance after numeric anchors.
The value is checked by Self::build.
Sourcepub fn build(self) -> Result<ReferenceExtractor, ExtractorConfigError>
pub fn build(self) -> Result<ReferenceExtractor, ExtractorConfigError>
Validate the settings and construct an extractor.
Trait Implementations§
Source§impl Clone for ReferenceExtractorBuilder
impl Clone for ReferenceExtractorBuilder
Source§fn clone(&self) -> ReferenceExtractorBuilder
fn clone(&self) -> ReferenceExtractorBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReferenceExtractorBuilder
impl Debug for ReferenceExtractorBuilder
Source§impl Default for ReferenceExtractorBuilder
impl Default for ReferenceExtractorBuilder
Source§fn default() -> ReferenceExtractorBuilder
fn default() -> ReferenceExtractorBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReferenceExtractorBuilder
impl RefUnwindSafe for ReferenceExtractorBuilder
impl Send for ReferenceExtractorBuilder
impl Sync for ReferenceExtractorBuilder
impl Unpin for ReferenceExtractorBuilder
impl UnsafeUnpin for ReferenceExtractorBuilder
impl UnwindSafe for ReferenceExtractorBuilder
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