Enum rustla::doctree::directives::BodyElementDirective [−][src]
An enumeration of different body element directives.
Variants
A topic is like a block quote with a title, or a self-contained section with no subsections. Use the “topic” directive to indicate a self-contained idea that is separate from the flow of the document. Topics may occur anywhere a section or transition may occur. Body elements and topics may not contain nested topics.
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#topic
Sidebars are like miniature, parallel documents that occur inside other documents, providing related or reference material. A sidebar is typically offset by a border and “floats” to the side of the page; the document’s main text may flow around it. Sidebars can also be likened to super-footnotes; their content is outside of the flow of the document’s main text.
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#sidebar
Unlike an ordinary literal block, the “parsed-literal” directive constructs a literal block where the text is parsed for inline markup. It is equivalent to a line block with different rendering: typically in a typewriter/monospaced typeface, like an ordinary literal block. Parsed literal blocks are useful for adding hyperlinks to code examples.
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#parsed-literal-block
Fields of ParsedLiteralBlock
The “code” directive constructs a literal block. If the code language is specified, the content is parsed by the Pygments syntax highlighter and tokens are stored in nested inline elements with class arguments according to their syntactic category. The actual highlighting requires a style-sheet (e.g. one generated by Pygments, see the sandbox/stylesheets for examples).
The parsing can be turned off with the syntax_highlight configuration setting and command line option or by specifying the language as :class: option instead of directive argument. This also avoids warnings when Pygments is not installed or the language is not in the supported languages and markup formats.
For inline code, use the “code” role.
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#code
Fields of Code
The “math” directive inserts blocks with mathematical content (display formulas, equations) into the document. The input format is subset of LaTeX math syntax with support for Unicode symbols. For inline formulas, use the “math” role.
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#math
The “rubric” directive inserts a “rubric” element into the document tree. A rubric is like an informal heading that doesn’t correspond to the document’s structure.
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#rubric
An epigraph is an apposite (suitable, apt, or pertinent) short inscription, often a quotation or poem, at the beginning of a document or section.
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#epigraph
Highlights summarize the main points of a document or section, often consisting of a list.
The “highlights” directive produces a “highlights”-class block quote. See Epigraph above for an analogous example.
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#highlights
A pull-quote is a small selection of text “pulled out and quoted”, typically in a larger typeface. Pull-quotes are used to attract attention, especially in long articles.
The “pull-quote” directive produces a “pull-quote”-class block quote. See Epigraph above for an analogous example.
Details https://docutils.sourceforge.io/docs/ref/rst/directives.html#pull-quote
The “compound” directive is used to create a compound paragraph, which is a single logical paragraph containing multiple physical body elements such as simple paragraphs,literal blocks, tables, lists, etc., instead of directly containing text and inline elements. For example:
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#compound-paragraph
The “container” directive surrounds its contents (arbitrary body elements) with a generic block-level “container” element. Combined with the optional “classes” attribute argument(s), this is an extension mechanism for users & applications. The “container” directive is the equivalent of HTML’s
Details: https://docutils.sourceforge.io/docs/ref/rst/directives.html#container
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for BodyElementDirective
impl Send for BodyElementDirective
impl Sync for BodyElementDirective
impl Unpin for BodyElementDirective
impl UnwindSafe for BodyElementDirective
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,