Skip to main content

OrderColumn

Struct OrderColumn 

Source
pub struct OrderColumn {
    pub variant: Ident,
    pub name: String,
    pub identity: String,
    pub note: Option<String>,
    pub gate: TokenStream,
}
Expand description

One column, as the ORDER-BY unit reads it.

Fields§

§variant: Ident

The variant this column is ordered by — the member in upper camel, which is what makes the variant rename-proof.

§name: String

The NOUN a doc sentence calls this column, ALREADY SPELLED — see FilterColumn::name.

§identity: String

The SEMANTIC IDENTITY a cursor folds — the member’s own external spelling, which no rename moves.

§note: Option<String>

A paragraph appended to THIS variant’s doc — UnitHeader::note one layer down, and for its reason: whether a page over this column is refused before a row is read is the front end’s answer and not the walk’s.

§gate: TokenStream

The CONDITION the column is declared under, as the attribute to prefix onto every artifact it mints here — empty for a column that wrote none, and for every unit whose front end has no condition seat.

Carried on the ROW rather than looked up, because a unit is shared: the record family knows a field’s #[cfg] and the interface and standalone families have no such word, so the fact arrives with the column exactly as its filter and its noun do. See Condition.

Implementations§

Source§

impl OrderColumn

Source

pub fn of(member: &Ident, name: String) -> Self

One row built from a member and the noun a sentence calls its column — the two derivations written once, so a variant and an identity cannot come to disagree about which column they name.

Source

pub fn with_note(self, note: String) -> Self

The same row, carrying the paragraph this column’s own variant adds.

Source

pub fn with_gate(self, gate: TokenStream) -> Self

The same row, carrying the CONDITION its column is declared under.

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> 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 = !

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.