pub struct MutationModel {
pub krate: Path,
pub name: Ident,
pub vis: Visibility,
pub graphql: Vec<GraphqlKind>,
pub exchanges: Vec<ExchangeModel>,
}Expand description
A validated mutation 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 node the command enum and both impls are emitted for.
vis: VisibilityThe declaration’s own visibility, which the minted command enum wears: a node a caller can name has commands that caller can build.
graphql: Vec<GraphqlKind>The wire backends the graphql(…) word named, in the order it named them.
CARRIED and not yet spent — see the module note. It is a list rather than a flag for the index grammar’s reason: a second backend is a second word inside one block, not a second block.
exchanges: Vec<ExchangeModel>Every exchange, in declaration order — which is the order the command enum’s arms take.
Implementations§
Source§impl MutationModel
impl MutationModel
Sourcepub fn response_name(&self) -> Ident
pub fn response_name(&self) -> Ident
The response sum’s name — the node’s own, with Response after it.
Derived rather than declared, for command_name’s reason: the node’s
name IS the vocabulary’s name, and a second word for it would be a name two spellings could
disagree about.
Sourcepub fn error_name(&self) -> Ident
pub fn error_name(&self) -> Ident
The error sum’s name — the node’s own, with Error after it.
Source§impl MutationModel
impl MutationModel
Sourcepub fn unit_name(&self) -> Ident
pub fn unit_name(&self) -> Ident
The wire unit’s name — the node’s own, with Mutations after it.
default_queries_name’s shape one family over, and
derived for its reason: the node’s name IS the vocabulary’s name, and a second word for it
would be a name two spellings could disagree about.
Source§impl MutationModel
impl MutationModel
Sourcepub fn command_name(&self) -> Ident
pub fn command_name(&self) -> Ident
The command enum’s name — the node’s own, with Command after it.
Derived rather than declared, and there is no command(rename = "…") word: the node’s name IS
the vocabulary’s name, and a second word for it would be a name two spellings could disagree
about. A node that wants another name is renamed.
Sourcepub fn all_sync(&self) -> bool
pub fn all_sync(&self) -> bool
Whether EVERY handler here is blocking — the OR law’s own const, read the other way round.
Sourcepub fn emit(&self) -> TokenStream
pub fn emit(&self) -> TokenStream
The whole expansion: the vocabulary, the row that hands it to a source, the record — and, where
the declaration wore a graphql(…) word, the wire face over all of it.