Skip to main content

ComposedField

Struct ComposedField 

Source
pub struct ComposedField {
    pub member: Ident,
    pub ty: Type,
    pub kind: ComposedKind,
    pub condition: Condition,
}
Expand description

ONE field of a composed filter: the member it is held in, its type, and which kind of field it is.

PLAIN, for StandaloneModel’s reason — public fields, no constructor, no validation. What is checked is checked at the FRONT END, where the tokens an author wrote are still in hand and a refusal can point at one.

Fields§

§member: Ident

The struct field this is read from and written back into.

§ty: Type

The field’s own type, which is what the seam resolves the shape from.

§kind: ComposedKind

A slot, or a splice.

§condition: Condition

The CONDITION the member is declared under.

Carried on the field rather than looked up, for crate::unit::FilterColumn’s reason: this door is shared, and only some of the front ends that reach it have a condition seat at all. A hand-written composed struct has none — its members are the author’s own item, which rustc strips before this expansion ever sees it — so Condition::always is that door’s answer and the emission below is byte-identical to the one before this seat existed.

Where a front end DOES have one — the fragment tier, whose members it mints — the predicate has to reach all four walks: the emptiness fold, the parse, the registration and the render. A member present in three of them and absent from the fourth is an input object whose SDL and whose reader disagree.

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.