pub struct NewTypeModel {
pub vis: Visibility,
pub subject: Ident,
pub generics: Generics,
pub krate: Path,
pub member: Member,
pub inner: Type,
pub kits: Kits,
}Expand description
A declared NEWTYPE, as the device reads it.
Fields§
§vis: VisibilityThe declaration’s own visibility, which a minted reading takes.
subject: IdentThe newtype the faces are OF.
generics: GenericsIts parameters, carried onto every emitted row.
krate: PathThe ingraph root the expansion spells its shelf through.
member: MemberThe single field the value is held in — positional or named.
inner: TypeThat field’s type, which every pass-through delegates to.
kits: KitsThe kits the declaration opted into.
Implementations§
Source§impl NewTypeModel
impl NewTypeModel
Sourcepub fn reading_name(&self) -> Ident
pub fn reading_name(&self) -> Ident
The reading this device mints for the filter kit — <Name>Wire.
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.