pub struct Query {
pub list: ContList,
pub state: TokenStream,
}Expand description
The query a check receives:
@announce_format "1" @__announce_attrs [ THIS!, NEXT!, .. ] { STATE }. The prefix is
optional when parsing (a query written by hand), and always written by
answer.
Answer it with answer. The module docs have
the protocol. check does this for a proc-macro check.
Fields§
§list: ContListThe macro being called (the head, the check itself), then the elements still
to be called, in order. The last one is finish!.
state: TokenStreamThe state that travels along. Opaque: pass it on unchanged.
Implementations§
Source§impl Query
impl Query
Sourcepub fn answer(&self, owned: &OwnedAttrs) -> TokenStream
pub fn answer(&self, owned: &OwnedAttrs) -> TokenStream
The call that answers the query for a check that owns owned. It calls the
element after the head, with the prefix @announce_format "1", the list from
there on and the state plus attrs(..) (the state unchanged if owned is
empty). A reserved name gives
a compile_error!, and so does a list that is empty or has no element after
its head.