Expand description
The implementation behind #[announce], as plain functions, and the helpers for
callbacks and checks. Do not depend on this
crate: go through announce, which re-exports
the public API as announce::machinery and announce::helper.
A proc-macro crate cannot export functions, so the code behind the macros
lives here, in an ordinary library. announce-macros is a thin wrapper
around it. The crate name and layout are not a stable interface.
The API of the generation is announce() and Options (announce::machinery). See their docs, and
announce::machinery for how a library uses them. helper is what
callbacks and checks use (announce::helper): the parser of the tokens a
trampoline sends, and the functions helper::callback() and
helper::transformer().
Modules§
Structs§
- Check
- One check or
metaentry of the attribute:pathorpath(args). - Options
- The parsed arguments of
#[announce(..)].
Enums§
- Layout
- How the generated trampoline holds the item (
layout = .., advanced).
Constants§
- SINGLE_
COPY_ THRESHOLD - Tokens (delimiters of a group counted) from which
layout = autoholds the item once (Layout::Single) instead of copying it into each arm (Layout::Direct), counted on the escaped payload plus META.
Functions§
- announce
- Does what
#[announce(attr)]does toitem. - define_
repeater - Does what
define_repeater!($vis $ident)does: the definition of the repeater trait, as type-leak writes it (type_leak::repeater_definition). - finish
- What the hidden macro
finish!of theannouncecrate does: the end of the attribute query that#[announce(check, ..)]sends through its checks (seecrate::helper::attrsfor the protocol). - try_
announce announce()with the error returned as asyn::Error.- try_
define_ repeater define_repeater()with the error returned as asyn::Error.- try_
finish finish()with the error returned as asyn::Error.