Skip to main content

Dedup

Enum Dedup 

Source
pub enum Dedup {
    Hash,
    Eq,
}
Expand description

HOW a retrieve tells two of this index’s keys apart — the dedup(…) word.

A retrieve dedupes the engine’s hit stream BY KEY, first sighting winning, because the store faces are open traits and no backend owes uniqueness across the sources sharing a slot. What a declaration chooses here is not whether that happens; it is the MECHANISM, and the mechanism is a BOUNDS choice on the key type:

wordthe emitted method namesthe key must satisfy
dedup(hash)HashSeenHash + Eq
dedup(eq)EqSeenPartialEq

A CLOSED unit enum, because the vocabulary is the FRAMEWORK’s: each word names one of the framework’s own membership implementations, and a fourth mechanism is an arm here plus an implementor there rather than a redesign. That is the crate’s rule for a framework-owned vocabulary, and the open surface is one level down — a third party’s KEY joins by implementing Hash or PartialEq, which it already does.

Hash is the default when the word is absent: every key a node macro emits today is built from the closed segment vocabulary and every member of it hashes, so the default always compiles. eq is the escape for a key that cannot — a float in an address, a foreign type with no Hash impl — and it asks less of the type, which is why the choice is declared rather than fixed.

Variants§

§

Hash

dedup(hash) — membership through a HashSet.

§

Eq

dedup(eq) — membership through a list walked by field-wise equality.

Implementations§

Source§

impl Dedup

Source

pub const WORDS: [&'static str; 2]

Every word this grammar admits, for the front end that lists them in a refusal.

One list rather than a sentence per message, so a fourth mechanism reaches every refusal by arriving here.

Source

pub const fn as_str(self) -> &'static str

The WORD, as a declaration writes it inside dedup(…).

Trait Implementations§

Source§

impl Clone for Dedup

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Dedup

Source§

impl Debug for Dedup

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Dedup

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Eq for Dedup

Source§

impl PartialEq for Dedup

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Dedup

Auto Trait Implementations§

§

impl Freeze for Dedup

§

impl RefUnwindSafe for Dedup

§

impl Send for Dedup

§

impl Sync for Dedup

§

impl Unpin for Dedup

§

impl UnsafeUnpin for Dedup

§

impl UnwindSafe for Dedup

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.