Skip to main content

MemberModel

Struct MemberModel 

Source
pub struct MemberModel {
    pub field: Ident,
    pub ty: Type,
    pub weight: Option<f64>,
    pub depth: Option<NonZeroU32>,
    pub floor: Option<Path>,
    pub arms: Vec<ArmModel>,
}
Expand description

ONE MEMBER — the field, the index it reads, and the defaults the recipe declares for its route.

Fields§

§field: Ident

The field that names this member — its ONE name, and the span every refusal about it is reported at.

§ty: Type

The INDEX this member reads, as the field declared it.

Carried as the type it was written as and never resolved: whether it is an index, what it is addressed by and whether its coordinates meet this member’s arms are the emission’s questions, asked where the compiler can answer them.

§weight: Option<f64>

This member’s coefficient in the recipe’s fold — weight = 2.0, and this word’s FIRST declaration-side home.

None where the word was omitted, under which the member takes the request layer’s own Route::DEFAULT_WEIGHT — the multiplicative identity, so a recipe where nobody weighted anything runs the unweighted fold exactly rather than an approximation of it.

§depth: Option<NonZeroU32>

How deep this member’s route is asked when nothing asks otherwise — depth = 100.

None where the word was omitted, on SearchModel::limit’s road: it defers rather than defaults, and a declared ceiling CAPS whatever it says wherever it is spent.

§floor: Option<Path>

The FLOOR this member’s route is read at, as a const PATH — floor = "crate::floors::SEM".

A PATH and never a literal, which is §4’s law rather than this grammar’s taste: a floor is a value in the ENGINE’s own currency, an open type this framework never sees, so there is nothing here that could parse one. A const is a value its own crate already built.

None where the word was omitted, under which the read has no declared floor and whatever the request names is the only one.

§arms: Vec<ArmModel>

The towers bound to this member, in declaration order — EMPTY for a plain coordinate member.

Each is one ARM of this member’s question, and its name is that arm’s name.

Trait Implementations§

Source§

impl Clone for MemberModel

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 MemberModel

Source§

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

Formats the value using the given formatter. Read more

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.