pub enum DocRole {
Endnotes,
Footnote,
NoteRef,
BackLink,
Bibliography,
BiblioRef,
Toc,
}Expand description
A document role: a role in the structure of a document, taken from the
digital-publishing accessibility roles (doc-endnotes, doc-footnote,
…). It says what a block, a span or a link is among the notes, the
cited works and the table of contents of a document, beyond what it looks
like.
A payload carries it in its doc_role field (BlockPayload::doc_role,
SpanPayload::doc_role, LinkPayload::doc_role). A backend that has
such a notion renders it — the HTML backend writes the role attribute,
doc- followed by the role’s stable name, so that
assistive technology such as a screen reader can announce what the element
is; a backend that has none, the text backend among them, ignores it. It is
distinct from the feature-owned role of BlockPayload::role, which says
what kind of container a node is and becomes a CSS class on HTML.
Variants§
Endnotes
A container holding the list of a document’s notes, shown apart from
the running text (doc-endnotes).
Footnote
A note shown where it is written, or one entry of a list of notes
(doc-footnote).
NoteRef
A link from the running text to a note (doc-noteref).
BackLink
A link from a note back to where it is referenced (doc-backlink).
Bibliography
A container holding the list of the works a document cites
(doc-bibliography). The entries of the list carry no document role:
the role once defined for one, doc-biblioentry, is deprecated by
version 1.1 of the digital-publishing accessibility roles, because a
list item inside the bibliography already says what it is.
BiblioRef
A link from the running text to a cited work’s entry in the
bibliography (doc-biblioref).
Toc
A container holding a document’s table of contents (doc-toc).
Implementations§
Trait Implementations§
impl Copy for DocRole
impl Eq for DocRole
impl StructuralPartialEq for DocRole
Auto Trait Implementations§
impl Forget for DocRole
impl Freeze for DocRole
impl Move for DocRole
impl RefUnwindSafe for DocRole
impl Send for DocRole
impl Sync for DocRole
impl Unpin for DocRole
impl UnsafeUnpin for DocRole
impl UnwindSafe for DocRole
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