Skip to main content

UnitHeader

Struct UnitHeader 

Source
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 Visibility

The visibility every emitted item carries — the declaration’s own.

§name: Ident

The emitted type’s name.

§subject: String

What 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.

Auto Trait Implementations§

§

impl<'a> !Send for UnitHeader<'a>

§

impl<'a> !Sync for UnitHeader<'a>

§

impl<'a> Freeze for UnitHeader<'a>

§

impl<'a> RefUnwindSafe for UnitHeader<'a>

§

impl<'a> Unpin for UnitHeader<'a>

§

impl<'a> UnsafeUnpin for UnitHeader<'a>

§

impl<'a> UnwindSafe for UnitHeader<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.