pub struct UnitHeader<'a> {
pub vis: &'a Visibility,
pub name: Ident,
pub subject: String,
pub note: Option<String>,
}Expand description
What every unit needs of its caller before it reads a single column.
The subject is a NOUN and not a type path: the doc sentences read a predicate over the stored
columns of a Cue, and the word in that sentence is the declaration’s, which a standalone
derive spells as the struct’s own name.
Fields§
§vis: &'a VisibilityThe visibility every emitted item carries — the declaration’s own.
name: IdentThe emitted type’s name.
subject: StringWhat the doc sentences call the thing these columns belong to, ALREADY SPELLED — a link where the caller knows one resolves at the doc site, plain code otherwise.
Spelled by the caller rather than built here, because whether [Cue] resolves is a fact
about where the expansion lands and the caller is the only party that knows it. A broken doc
link is a warning in a DECLARING crate’s own build, which is the one place an emitter must not
put one.
note: Option<String>A paragraph appended to the emitted face’s own doc — what a reader of THIS subject’s face has to know that the SHAPE’s sentence cannot state.
The shape is the unit’s and the sentence about it is too; what a front end knows on top of it is a fact about the SUBJECT. An interface’s filter is one per contract where a record’s page has one per database, and no sentence written from rows alone could say so — so the paragraph arrives from the party that knows it, rather than the walk growing a mode to tell them apart.
None where the shape’s own sentence is the whole of it.