Struct readme_sync::CMarkReadme [−][src]
pub struct CMarkReadme<P, M> { /* fields omitted */ }
Expand description
Parsed readme Markdown with optionally specified package path and package manifest.
Implementations
Creates readme from package.
It reads readme file by path specified in the package manifest.
Adding the specified package path to the readme.
Adding the specified manifest to the readme.
pub fn from_file_and_package_path_and_manifest(
file: Arc<File>,
package_path: P,
manifest: M
) -> Self
pub fn from_file_and_package_path_and_manifest(
file: Arc<File>,
package_path: P,
manifest: M
) -> Self
Creates readme from file, package path and manifest.
pub fn from_data_and_package_path_and_manifest(
data: CMarkData,
package_path: P,
manifest: M
) -> Self
pub fn from_data_and_package_path_and_manifest(
data: CMarkData,
package_path: P,
manifest: M
) -> Self
Creates readme from CMark items, package path and manifest.
Returns the package path.
Iterate over CMarkItem
s.
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.
pub fn remove_images_only_paragraph<F>(self, predicate: F) -> CMarkReadme<P, M> where
F: FnMut(&[&str]) -> bool,
pub fn remove_images_only_paragraph<F>(self, predicate: F) -> CMarkReadme<P, M> where
F: FnMut(&[&str]) -> bool,
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 the specified fenced code block tag.
Remove the specified fenced code block tags.
Remove sections with heading Documentation
and level 2.
pub fn disallow_absolute_blob_links(
self,
repository_url: &str
) -> Result<CMarkReadme<P, M>, DisallowUrlsWithPrefixError>
pub fn disallow_absolute_blob_links(
self,
repository_url: &str
) -> Result<CMarkReadme<P, M>, DisallowUrlsWithPrefixError>
Returns self if absolute blob links to the specified repository not found, otherwise returns an error.
Convert all relative links into absolute ones using the repository url as the root address.
pub fn disallow_absolute_repository_blob_links(
self
) -> Result<CMarkReadme<P, &'a Manifest>, DisallowAbsoluteRepositoryBlobLinksError>
pub fn disallow_absolute_repository_blob_links(
self
) -> Result<CMarkReadme<P, &'a Manifest>, DisallowAbsoluteRepositoryBlobLinksError>
Returns self if absolute blob links to the manifest repository not found, otherwise returns an error.
pub fn use_absolute_repository_blob_urls(
self
) -> Result<CMarkReadme<P, &'a Manifest>, UseAbsoluteRepositoryBlobUrlsError>
pub fn use_absolute_repository_blob_urls(
self
) -> Result<CMarkReadme<P, &'a Manifest>, UseAbsoluteRepositoryBlobUrlsError>
Convert all relative links into absolute ones using the manifest repository url as the root address.
Trait Implementations
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
impl<P, M> RefUnwindSafe for CMarkReadme<P, M> where
M: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, M> Send for CMarkReadme<P, M> where
M: Send,
P: Send,
impl<P, M> Sync for CMarkReadme<P, M> where
M: Sync,
P: Sync,
impl<P, M> Unpin for CMarkReadme<P, M> where
M: Unpin,
P: Unpin,
impl<P, M> UnwindSafe for CMarkReadme<P, M> where
M: UnwindSafe,
P: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more