Enum rustdoc::clean::DocFragment[][src]

pub enum DocFragment {
    SugaredDoc(usizeSpanString),
    RawDoc(usizeSpanString),
    Include(usizeSpanStringString),
}

A portion of documentation, extracted from a #[doc] attribute.

Each variant contains the line number within the complete doc-comment where the fragment starts, as well as the Span where the corresponding doc comment or attribute is located.

Included files are kept separate from inline doc comments so that proper line-number information can be given when a doctest fails. Sugared doc comments and "raw" doc comments are kept separate because of issue #42760.

Variants

A doc fragment created from a /// or //! doc comment.

A doc fragment created from a "raw" #[doc=""] attribute.

A doc fragment created from a #[doc(include="filename")] attribute. Contains both the given filename and the file contents.

Methods

impl DocFragment
[src]

impl DocFragment
[src]

Trait Implementations

impl Clone for DocFragment
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Encodable for DocFragment
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

impl Decodable for DocFragment
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

impl PartialEq for DocFragment
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for DocFragment
[src]

impl Debug for DocFragment
[src]

Formats the value using the given formatter. Read more

impl Hash for DocFragment
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<'a> FromIterator<&'a DocFragment> for String
[src]

Creates a value from an iterator. Read more

Auto Trait Implementations

impl !Send for DocFragment

impl !Sync for DocFragment