Skip to main content

ElectionLabel

Enum ElectionLabel 

Source
pub enum ElectionLabel {
    Embedding,
    List,
}
Expand description

WHAT AN ELECTED FIELD HOLDS, as its own LABEL states it — embedding or list(embedding).

§The label is what the EXPANSION reads, and it is a WORD because a macro holds tokens

An earlier round read this off the field’s TYPE: peel a Vec<…>, and what is left says one or many. That is a guess at a meaning only rustc has — wrong for type ClipFrames = Vec<…>, wrong for a re-export renamed on the way in, and wrong for every carrier not literally spelled Vec. So the declaration STATES it, exactly as a record’s field states its kind, and the type-read is gone from this crate entirely.

§It restates NO fact, which is what dissolves the disagreement refusal worry

The label carries no width, no element and no space — those are the type’s, projected through [EmbeddingMarker] at rustc time. What it carries is STRUCTURAL INTENT: which faces this declaration emits and which doors it grows. So the two readers cannot disagree about a fact, only about a shape, and that disagreement is settled by the compiler rather than by this crate: the emission states the label’s claim as a bound, and a label that lied is E0277 carrying a sentence that names both sides.

§list(embedding) and not set(embedding)

The container word is the ordered, duplicate-bearing one, because that is what a set election IS: its members are stored under ORDINALS, and set in this grammar’s collection vocabulary promises unordered-and-deduplicated, which the structure does not have. The word set stays reserved for a true unordered container.

Variants§

§

Embedding

embedding — one embedding, the form every declaration written before the set arrived has.

§

List

list(embedding) — a per-entity SET, variable in length, EMPTY being legal.

An empty set is a legal value and is never similarity-matched: a collection has no null state, so no members is what a record with nothing to index says, and a knn over its column simply does not reach it.

Implementations§

Source§

impl ElectionLabel

Source

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

The label as a DECLARATION writes it, which is also how a refusal quotes it.

Source

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

The framework MULTIPLICITY marker this label claims — the type an emitted audit holds the field’s own type to.

Source

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

The framework AUDIT this label is stated as, spanned at the election word.

A function rather than the projection bound itself, for the reason the audit’s own doc gives: Multiplicity = One reports E0271, a type mismatch, and the on_unimplemented attribute rides unsatisfied TRAIT bounds only — so the claim is spelled as a trait that can carry the sentence.

Source

pub const fn is_set(self) -> bool

Whether this label states a SET — the one question the emission asks it twice, at the write face and at the door.

Trait Implementations§

Source§

impl Clone for ElectionLabel

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 ElectionLabel

Source§

impl Debug for ElectionLabel

Source§

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

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

impl Eq for ElectionLabel

Source§

impl PartialEq for ElectionLabel

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 ElectionLabel

Auto Trait Implementations§

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.