[−][src]Struct readme_sync::CMarkReadme
Parsed readme Markdown with optionally specified package path and package manifest.
Implementations
impl<'a> CMarkReadme<&'a Path, &'a Manifest>
[src]
pub fn from_package(
package: &'a Package
) -> Result<Self, CMarkReadmeFromPackageError>
[src]
package: &'a Package
) -> Result<Self, CMarkReadmeFromPackageError>
Creates readme from package.
It reads readme file by path specified in the package manifest.
impl<'a> CMarkReadme<(), ()>
[src]
impl<'a, P, M> CMarkReadme<P, M>
[src]
pub fn with_package_path(
self,
package_path: &'a Package
) -> CMarkReadme<&'a Package, M>
[src]
self,
package_path: &'a Package
) -> CMarkReadme<&'a Package, M>
Adding the specified package path to the readme.
pub fn with_manifest(
self,
manifest: &'a Manifest
) -> CMarkReadme<P, &'a Manifest>
[src]
self,
manifest: &'a Manifest
) -> CMarkReadme<P, &'a Manifest>
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
[src]
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
[src]
data: CMarkData,
package_path: P,
manifest: M
) -> Self
Creates readme from CMark items, package path and manifest.
pub fn data(&self) -> &CMarkData
[src]
Returns CMark items.
pub fn package_path(&self) -> &P
[src]
Returns the package path.
pub fn manifest(&self) -> &M
[src]
Returns the manifest.
pub fn iter(&self) -> CMarkDataIter<'_>
[src]
Iterate over CMarkItem
s.
pub fn concat_texts(self) -> CMarkReadme<P, M>
[src]
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,
[src]
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.
pub fn remove_badges_paragraph(self) -> CMarkReadme<P, M>
[src]
Removes first paragraph that contains only badges.
pub fn remove_section(self, heading: &str, level: u32) -> Self
[src]
Remove section with the specified heading text and level and its subsections.
pub fn remove_codeblock_tag(self, tag: &str) -> CMarkReadme<P, M>
[src]
Remove the specified fenced code block tag.
pub fn remove_codeblock_tags(self, tags: &[&str]) -> CMarkReadme<P, M>
[src]
Remove the specified fenced code block tags.
pub fn remove_documentation_section(self) -> Self
[src]
Remove sections with heading Documentation
and level 2.
pub fn disallow_absolute_blob_links(
self,
repository_url: &str
) -> Result<CMarkReadme<P, M>, DisallowUrlsWithPrefixError>
[src]
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.
pub fn use_absolute_blob_urls(self, repository_url: &str) -> CMarkReadme<P, M>
[src]
Convert all relative links into absolute ones using the repository url as the root address.
impl<'a, P> CMarkReadme<P, &'a Manifest>
[src]
pub fn disallow_absolute_repository_blob_links(
self
) -> Result<CMarkReadme<P, &'a Manifest>, DisallowAbsoluteRepositoryBlobLinksError>
[src]
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>
[src]
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
impl<P: Clone, M: Clone> Clone for CMarkReadme<P, M>
[src]
pub fn clone(&self) -> CMarkReadme<P, M>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<P: Debug, M: Debug> Debug for CMarkReadme<P, M>
[src]
impl<P: Default, M: Default> Default for CMarkReadme<P, M>
[src]
pub fn default() -> CMarkReadme<P, M>
[src]
impl<P: PartialEq, M: PartialEq> PartialEq<CMarkReadme<P, M>> for CMarkReadme<P, M>
[src]
pub fn eq(&self, other: &CMarkReadme<P, M>) -> bool
[src]
pub fn ne(&self, other: &CMarkReadme<P, M>) -> bool
[src]
impl<P, M> StructuralPartialEq for CMarkReadme<P, M>
[src]
Auto Trait Implementations
impl<P, M> RefUnwindSafe for CMarkReadme<P, M> where
M: RefUnwindSafe,
P: RefUnwindSafe,
M: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, M> Send for CMarkReadme<P, M> where
M: Send,
P: Send,
M: Send,
P: Send,
impl<P, M> Sync for CMarkReadme<P, M> where
M: Sync,
P: Sync,
M: Sync,
P: Sync,
impl<P, M> Unpin for CMarkReadme<P, M> where
M: Unpin,
P: Unpin,
M: Unpin,
P: Unpin,
impl<P, M> UnwindSafe for CMarkReadme<P, M> where
M: UnwindSafe,
P: UnwindSafe,
M: UnwindSafe,
P: UnwindSafe,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,