pub struct IdModel {
pub vis: Visibility,
pub subject: Ident,
pub krate: Path,
pub inner: Type,
}Expand description
A declared ID WRAPPER, as the device reads it.
PLAIN, for Kits’ 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§
§vis: VisibilityThe declaration’s own visibility, which the minted reading and the casts take: a door minted for a type nobody outside the module can name has no business being wider than the type.
subject: IdentThe wrapper the faces are OF.
krate: PathThe ingraph root the expansion spells its shelf through.
inner: TypeThe ONE type this wrapper holds, at position zero.
Implementations§
Source§impl IdModel
impl IdModel
Sourcepub fn reading_name(&self) -> Ident
pub fn reading_name(&self) -> Ident
The reading this device mints for the filter face — <Name>Wire, the shape both live registers
wrote by hand.
Sourcepub fn emit(&self) -> TokenStream
pub fn emit(&self) -> TokenStream
The whole device, emitted.
TWO scopes, and the split is the one every emitter here draws: a name the declaring scope has
to be able to WRITE goes outside — the minted reading is named by an associated type a
downstream crate resolves — and everything else goes inside an anonymous const, which is
where an emission puts what it owes the declaring scope no name for.
The INHERENT face is outside too, and for the stronger version of the same reason: an inherent
impl inside a const _ block is invisible to every caller, which would make the casts a door
nobody can open.