Struct readme_sync::CMarkData[][src]

pub struct CMarkData(_);
Expand description

A CMarkItems container storing a list of events with multiple transformation functions.

Implementations

Creates CMarkData from CMarkItems.

Creates CMarkData from the specified File.

Creates CMarkData from the specified FileDocs.

Creates CMarkData from the specified TextSource.

Consumes the CMarkData, returning CMarkItems.

Iterate over CMarkItems.

Iterate over pulldown-cmark events.

Concatenate adjacent text events.

Use this transformation if you deleted some nodes manually and want to merge the neighboring text nodes.

This transformation is always applied right after readme and docs parsing, because some text events remain ununited. For example Rust attribute parser generate seperate text events for every line of source code, and pulldown_cmark generate seperate text events for character entity reference.

Increment levels of all headings.

In readme, the first level heading is usually used only for the project title. The second level header is usually used in for text section headings in readme. Rustdoc automatically adds the header of a crate name and the first level headers are used for text sections.

So it is necessary to increase the level of all headings in the documentation in order to synchronize the headings.

Add a first level heading with the specified text.

This function could be useful after heading level incremented.

Removes first paragraph that contains only images and image-links, if the specified predicate returns true when passing image urls to it.

Removes first paragraph that contains only badges.

Remove section with the specified heading text and level and its subsections.

Remove sections with heading Documentation and level 2.

Returns self if absolute blob links to the specified repository not found, otherwise returns an error.

Returns self if absolute docs links to the specified repository not found, otherwise returns an error.

Returns self if links with the specified prefix not found, otherwise returns an error.

Convert all relative links into absolute ones using the repository url as the root address.

Convert all relative links into absolute ones using the package documentation url as the root address.

Convert all relative links into absolute ones using specified url prefix.

Converts all links with function func applied to each link address.

Remove the specified fenced code block tag.

Remove the specified fenced code block tags.

Remove fenced code block tags that are used by cargo test.

See https://doc.rust-lang.org/rustdoc/documentation-tests.html for more details.

Use the specified codeblock tag, if they are not specified

Use rust fenced codeblock highlight as default.

Remove hidden rust code from rust fenced codeblocks.

See https://doc.rust-lang.org/rustdoc/documentation-tests.html#hiding-portions-of-the-example for more details.

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

Returns the “default value” for a type. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

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.