pub struct Stamp { /* private fields */ }Expand description
The complete declared payload one published stamp is rendered from: the name it is exported under, the pattern it stamps, and every site that adopts it.
§Bounds
Structurally non-empty — a definition nobody invokes is an artifact with no reader — and the site namespace is closed at declaration, because two rows naming one site is a manifest that says one thing twice. Every site’s arguments are settled against the pattern here rather than left to the consumer’s compiler, which would report a mismatch inside an expansion nobody wrote.
Implementations§
Source§impl Stamp
impl Stamp
Sourcepub fn declared(
name: StampName,
pattern: Pattern,
sites: Vec<Site>,
) -> Result<Self, StampError>
pub fn declared( name: StampName, pattern: Pattern, sites: Vec<Site>, ) -> Result<Self, StampError>
Declare the complete payload one published stamp is rendered from.
§Errors
Returns StampError::SiteNameDoubled where two sites carry one name, StampError::ArgumentsUnmatched where a site supplies a different number of arguments than the pattern declares seats, StampError::ReachUnseated where a site declares a reach the pattern gives no coordinate to, StampError::SitesAbsent where no site was stated, and StampError::SitesUnbounded where the sites outgrow the declared magnitude.
The namespace is closed first, then each site is settled against the pattern in the order the sites were stated, and the magnitude last.