pub struct DocString {
    pub summary: String,
    pub details: Option<String>,
}
Expand description

The documentation provided by a user for a specific module, object, function, etc.

Fields

summary: String

The first line of a doc string. This has whitespace trimmed from it.

details: Option<String>

The contents of a doc string that follow the summary, and a single blank line. This also has whitespace trimmed from it, and it is dedented.

Implementations

Extracts the docstring from a function or module body, iff the first statement is a string literal.

Do common work to parse a docstring (dedenting, splitting summary and details, etc)

Parse out parameter docs from an “Args:” section of a docstring

args_section should be dedented, and generally should just be the args key of the DocString::parse_params() function call. This is done as a separate function to reduce the number of times that sections are parsed out of docstring (e.g. if a user wants both the Args: and Returns: sections)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Recursively “trace” the value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Get an ARef pointing at this type.

Try and get an ARef pointing at this type. Returns an Err if the type Self is a RefCell which is already mutably borrowed. Read more

Return the underlying RefCell if Self is one, otherwise None.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert between two equal types.

Convert between references to two equal types.

Convert between mutable references to two equal types.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.