pub struct Matcher<'a> { /* private fields */ }Expand description
Matcher for determining if references share the same primary contributors.
Uses the style’s substitution configuration to determine which contributor (author, editor, translator) should be used for comparison.
Implementations§
Source§impl<'a> Matcher<'a>
impl<'a> Matcher<'a>
Sourcepub fn new(style: &'a Style, config: &'a Config, locale: &'a Locale) -> Self
pub fn new(style: &'a Style, config: &'a Config, locale: &'a Locale) -> Self
Build a matcher from the active style, effective configuration, and locale.
Sourcepub fn contributors_match(&self, prev: &Reference, current: &Reference) -> bool
pub fn contributors_match(&self, prev: &Reference, current: &Reference) -> bool
Check if primary contributors (authors/editors) match between two references.
Delegates to the shared effective-primary resolver
(crate::values::contributor::substitute::effective_primary_names) so
matching honors type overrides and merged-role candidates identically to
rendering, sorting, and disambiguation. Two references match only when
both resolve non-empty, equal name lists; a title-substitute result
(empty names) never matches.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Matcher<'a>
impl<'a> !UnwindSafe for Matcher<'a>
impl<'a> Freeze for Matcher<'a>
impl<'a> Send for Matcher<'a>
impl<'a> Sync for Matcher<'a>
impl<'a> Unpin for Matcher<'a>
impl<'a> UnsafeUnpin for Matcher<'a>
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