Skip to main content

Role

Enum Role 

Source
pub enum Role {
Show 30 variants Key, Lineage, Row(DatabaseKind), Kind, UnwrapError, Id, Fields, Derivations, Comparison(DatabaseKind), Cursor(DatabaseKind), Input, Output, KeyOutput, KeyInput, Filter, OrderBy, Queries, In, Out, OutKind, Downstream, Due, Channels, Grants, Lending, Sweeps, Election(Ident), Slot(Slot), Fuse, Answer(Ident),
}
Expand description

Which of a declaration’s emitted types one is — the phrase a refusal names it by.

A vocabulary rather than a description built at the site, so the sentence a front end writes about a type has one author. method::Owner asks a neighbouring question and is deliberately not this: it names the types that host METHODS, so it carries the record itself — which no emission declares — and lacks the wire key, which declares none.

§It is NOT Copy, and the two variants that took that away are the ones that had to

Every role above Election names a type a declaration has AT MOST ONE of, so the variant alone identified it. A derived index mints one marker per ELECTION and one per (field × engine) SLOT, so a slot’s marker names as many types as the declaration has slots — and a refusal that could not say WHICH would leave an author with two markers of one name and no way to tell which pair minted either. The identifying tokens therefore ride the variants, which costs the trait’s bit-copy and buys the sentence.

Variants§

§

Key

The *Key.

§

Lineage

The *Lineage, for a record that has one.

§

Row(DatabaseKind)

One database’s row.

§

Kind

An INTERFACE’s discriminant — which member a row of its projection came from.

The four variants below it are an interface’s too, and they are here rather than in a vocabulary of the interface’s own because the question this enum answers is which of a declaration’s emitted types is this — and an interface is a declaration. Two vocabularies would make a front end’s collision refusal read differently depending on which derive wrote the type. That a record’s emission produces none of them is what every variant here already is for some declaration and not for another.

§

UnwrapError

The refusal a wrong-variant unwrap answers with.

§

Id

An INTERFACE’s address — the sum over its members’ own ids.

§

Fields

An interface’s CONTRACT trait.

§

Derivations

An interface’s DERIVATIONS trait.

§

Comparison(DatabaseKind)

One database’s comparison.

§

Cursor(DatabaseKind)

One database’s cursor value — the record’s sum over its orderable columns, in the types that database stores.

§

Input

The wire argument object.

§

Output

The wire output object.

§

KeyOutput

The wire key object.

§

KeyInput

The wire key ARGUMENT object — the address a client SENDS, for a record whose key has more than one column.

Conditional where every other wire face here is unconditional, and the condition is the key’s own arity rather than a word: a ROOT record’s key is its id, and an id already crosses inward through ToGraphqlInput at every filter and get position — so wrapping one in a single-field object would publish a shape the id’s own row already answers. A COMPOUND key has no such row, and this is the type that gives it one.

§

Filter

The wire filter.

§

OrderBy

The wire order-by.

§

Queries

The wire QUERY UNIT — the trio a root folds, for a record whose declaration reaches one.

§

In

The FAN-IN sum — one variant per upstream of a subscribe(…) container.

§

Out

The PRODUCT sum — one variant per product emits named, for a node that declares several.

§

OutKind

The product VOCABULARY — the identities of an Out’s arms.

§

Downstream

The node’s own DOWNSTREAM — one out-edge slot per declared product.

§

Due

The POLL vocabulary — one variant per poll(…) entry, for a node that declares any.

§

Channels

The CHANNELS shelf — one field per upstream(…) entry, for a node that declares a container.

§

Grants

A CLOCK’s GRANTS CONTEXT — one per poll(…) entry that wrote a write word.

§

Lending

The LENDING — the value a deployment hands the runtime, holding one clock’s context per granting entry, the citizen each mounted entry runs and the executor each detached one runs on.

§

Sweeps

The SWEEP TRAIT — one entry per light clock, which is where an author writes a sweep.

§

Election(Ident)

A DERIVED INDEX’s ELECTION MARKER — <Index>By<Field>, carrying the field it elected.

§

Slot(Slot)

A DERIVED INDEX’s SLOT MARKER — <Index><Field><Engine>, carrying the pairing that minted it.

The pairing and not the name, because the name is what a collision has TWO of: the durable slot NAME keeps its segment boundary (__-joined) where the marker’s camel-case join cannot, so the only way to tell two colliding markers apart is the field and the engine each came from.

§

Fuse

One type of a derived index’s FUSE FAMILY — an options package, a question package, a fold vocabulary or the column vocabulary. The NAME says which; the role says only whose family.

§

Answer(Ident)

One type of an ELECTION’s ANSWER FAMILY — the question a query field takes, and the hit shapes it answers with — carrying the election it is about.

Separate from Fuse because the two families sit on opposite sides of a call: a fuse type is what a REQUEST is built from and is minted whether or not the declaration wears a backend word, where these exist only where a query field does. The field is carried for Election’s reason — it is the token an author moves to clear a collision, where an engine word names a real engine and is not free to be renamed.

Implementations§

Source§

impl Role

Source

pub const fn at(&self) -> Option<&Ident>

The DECLARED token a refusal about this type points at, or None for a name no declaration wrote a part of.

Origin::column one axis over, and the same argument: a name built through format_ident! carries the macro’s own call site, which is the span E0428 already reports at and the reason these rules exist. Every role a record or an interface emits is either renamed by a word the front end holds or defaulted off the declaration’s own ident, so those front ends point at what they hold; a derived index’s markers are built from a FIELD and an ENGINE WORD, and the field is the token an author moves to fix a collision — an engine word names a real engine and is not free to be renamed.

Trait Implementations§

Source§

impl Clone for Role

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 Debug for Role

Source§

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

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

impl Display for Role

Source§

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

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

impl Eq for Role

Source§

impl PartialEq for Role

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 Role

Auto Trait Implementations§

§

impl !Send for Role

§

impl !Sync for Role

§

impl Freeze for Role

§

impl RefUnwindSafe for Role

§

impl Unpin for Role

§

impl UnsafeUnpin for Role

§

impl UnwindSafe for Role

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.