pub struct SourceModel {
pub krate: Path,
pub name: Ident,
pub awaited: bool,
pub node: Option<Path>,
}Expand description
A validated source declaration, ready to emit.
PLAIN, for the reason every model in this crate has plain fields: the derive today and a manifest front end later reach the same emitter.
Fields§
§krate: PathThe path to the ingraph crate itself — ::ingraph unless #[ingraph(crate = "…")] named
another.
name: IdentThe declared type — the origin the double entry is stated over.
awaited: boolWhether the declaration wore the async word, which is what names the face the bound binds.
node: Option<Path>The mutation(node = "…") word, or nothing — which is the source nobody controls.
Carried as the PATH the word held rather than as a literal, because what the emission does with
it is name a type. Its tokens keep the literal’s own span, which is what puts a mismatch’s
E0271 on the word an author has to change.
Implementations§
Source§impl SourceModel
impl SourceModel
Sourcepub fn emit(&self) -> TokenStream
pub fn emit(&self) -> TokenStream
The double entry and the DECLARATION RECORD — see the module note.