pub enum AdmonitionVariant {
Note,
Tip,
Important,
Caution,
Warning,
}Expand description
The five admonition types provided by the AsciiDoc language.
An admonition draws attention to a statement by taking it out of the
content’s flow and labeling it with a priority. The variant is determined by
the assigned type (i.e., the uppercase label), which is specified either as
a special paragraph prefix (e.g., NOTE:) or as the block style in an
attribute list (e.g., [NOTE]).
Variants§
Note
The NOTE admonition type.
Tip
The TIP admonition type.
Important
The IMPORTANT admonition type.
Caution
The CAUTION admonition type.
Warning
The WARNING admonition type.
Implementations§
Source§impl AdmonitionVariant
impl AdmonitionVariant
Sourcepub fn style(self) -> &'static str
pub fn style(self) -> &'static str
Returns the uppercase style label for this variant (e.g., NOTE).
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
Returns the lowercase name for this variant (e.g., note).
This is the name used for the block’s CSS class and for the
<type>-caption document attribute that controls the label text.
Sourcepub fn default_caption(self) -> &'static str
pub fn default_caption(self) -> &'static str
Returns the default caption (label) text for this variant (e.g.,
Note).
This text is shown to the reader (in place of an icon) unless it is
overridden by setting the <type>-caption document attribute.
Trait Implementations§
Source§impl Clone for AdmonitionVariant
impl Clone for AdmonitionVariant
Source§fn clone(&self) -> AdmonitionVariant
fn clone(&self) -> AdmonitionVariant
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AdmonitionVariant
Source§impl Debug for AdmonitionVariant
impl Debug for AdmonitionVariant
impl Eq for AdmonitionVariant
Source§impl PartialEq for AdmonitionVariant
impl PartialEq for AdmonitionVariant
Source§fn eq(&self, other: &AdmonitionVariant) -> bool
fn eq(&self, other: &AdmonitionVariant) -> bool
self and other values to be equal, and is used by ==.