pub enum Written {
Own(&'static str),
Data(&'static str),
Style,
Ratio(&'static str, &'static str),
RoleClass,
BlockClass,
Entry(&'static str),
EntryData(&'static str),
Dropped(&'static str),
}Expand description
What the emitter does with one field of a presentation payload.
Variants§
Own(&'static str)
An attribute HTML itself defines, written under this name: id,
href, src, alt, width, srcset, and the two attributes of
accessibility, role (a document role, written as
doc_role_value spells it) and aria-label.
Data(&'static str)
An attribute under the prefix data-flm- (data_attribute), named
after the token given here — the field’s own name, except in two
cases. Where one attribute carries what two fields spell differently:
a kinds list and a single kind are both written as data-flm-kind.
And where the attribute is named after what an author writes: a
heading’s name is data-flm-heading, and its in_toc is
data-flm-toc, after the key toc of a heading’s options.
Style
A custom property in the element’s style attribute
(STYLE_ATTRIBUTE), named after the field by style_property
(indent_left is --flm-element-indent-left) and valued with the
field’s Length as css_length spells it. For a length field
alone; a zero length writes nothing.
This is the only thing the style attribute ever holds, with the
ratios of Written::Ratio: the custom properties of a payload’s
length fields, which a stylesheet applies, and never a CSS property,
which would outrank every stylesheet rule. A length field is written
this way and in no other: never also as a data-flm-… attribute,
whose text (2tab) a stylesheet can do nothing with.
Ratio(&'static str, &'static str)
A custom property in the element’s style attribute holding the
ratio of the two length fields named here, first over second, as
css_ratio spells it — written only where both are set, greater
than zero and in physical units. The entry’s own name is not a field
of the payload but the name of the property, derived as a length
field’s is (style_property): aspect_ratio is
--flm-element-aspect-ratio. It lets a stylesheet keep a box’s
proportions, which CSS cannot compute from two lengths.
RoleClass
The node’s second class, derived from the role’s name
(class_of_role).
BlockClass
The block class, flm-pres-block: the class of a block container,
pres::BLOCK, which the core stylesheet spaces, written before the
element’s own class where the field says the node is a block, and
nothing where it says the node is inline: an image that is a direct
child of a float’s body is spaced and stacked as a block, and one
inside a line of text is not.
Entry(&'static str)
An attribute HTML itself defines, written under this name on the
element of each entry of a list: id, rowspan, colspan and
scope.
An entry is an item of a list — its element is the <li>, or a
description list’s <dt> — or a cell of a table of cells — its
<td> or <th>. The field holds one value per entry, in the order of
the entries, and each entry’s attribute is written from that entry’s
value; an entry with no value gets no attribute. It is never written
on the element of the list or the table itself. The same holds of
Written::EntryData.
EntryData(&'static str)
An attribute under the prefix data-flm- (data_attribute),
written on the element of each entry as Written::Entry is, and
named after the token given here — the field’s own name, except where
one attribute carries what two fields spell differently: a list’s
entry_levels and a heading’s level are both written as
data-flm-level. A token ending in a hyphen is a family, one
attribute per value, the value’s name appended (a cell’s custom style
orange is data-flm-style-orange, with an empty value).
Dropped(&'static str)
Nothing is written for it, for the reason given: the output cannot express it, or it reaches the page as content rather than as an attribute.
Trait Implementations§
impl Copy for Written
impl Eq for Written
impl StructuralPartialEq for Written
Auto Trait Implementations§
impl Forget for Written
impl Freeze for Written
impl Move for Written
impl RefUnwindSafe for Written
impl Send for Written
impl Sync for Written
impl Unpin for Written
impl UnsafeUnpin for Writtenwhere
&'static str: UnsafeUnpin,
impl UnwindSafe for Writtenwhere
&'static str: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more