Skip to main content

BatchQueryBuilder

Struct BatchQueryBuilder 

Source
pub struct BatchQueryBuilder<'d> { /* private fields */ }
Expand description

A builder for configuring and executing batch dictionary lookups.

Implementations§

Source§

impl<'d> BatchQueryBuilder<'d>

Source

pub fn mode(self, mode: MatchMode) -> Self

Set the match mode for this batch query.

Source

pub fn common_only(self, common: bool) -> Self

Filter to entries where any KanjiEntry or KanaEntry has common: true.

Source

pub fn pos(self, pos: &[&str]) -> Self

Filter to entries with matching part_of_speech values in any SenseEntry.

Source

pub fn misc(self, misc: &[&str]) -> Self

Filter to entries with any of the given JMdict misc codes.

Source

pub fn field(self, field: &[&str]) -> Self

Filter to entries with any of the given JMdict field codes.

Source

pub fn dialect(self, dialect: &[&str]) -> Self

Filter to entries with any of the given JMdict dialect codes.

Source

pub fn limit(self, limit: usize) -> Self

Cap results per term after filtering and sorting.

Source

pub fn max_distance(self, n: u32) -> Self

Set the maximum edit distance for fuzzy search (default: 2).

Clamped to a maximum of MAX_FUZZY_DISTANCE.

Source

pub fn execute(self) -> Result<Vec<(String, Vec<LookupResult>)>, JmdictError>

Execute the batch query and return results paired with each input term.

Auto Trait Implementations§

§

impl<'d> Freeze for BatchQueryBuilder<'d>

§

impl<'d> RefUnwindSafe for BatchQueryBuilder<'d>

§

impl<'d> Send for BatchQueryBuilder<'d>

§

impl<'d> Sync for BatchQueryBuilder<'d>

§

impl<'d> Unpin for BatchQueryBuilder<'d>

§

impl<'d> UnsafeUnpin for BatchQueryBuilder<'d>

§

impl<'d> UnwindSafe for BatchQueryBuilder<'d>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.