pub struct RevisionLine<'src> { /* private fields */ }Expand description
The revision line is the line directly after the author line in the document
header. When the content on this line is structured correctly, the processor
assigns the content to the built-in revnumber, revdate, and revremark
attributes.
Implementations§
Source§impl<'src> RevisionLine<'src>
impl<'src> RevisionLine<'src>
Sourcepub fn revnumber(&self) -> Option<&str>
pub fn revnumber(&self) -> Option<&str>
Returns the revision number, if present.
The document’s revision number or version is assigned to the built-in
revnumber attribute. When assigned using the revision line, the
version must contain at least one number, and, if it isn’t followed by a
date or remark, it must begin with the letter v (e.g., v7.0.6). Any
letters or symbols preceding the number, including v, are dropped when
the document is rendered. If revnumber is set with an attribute entry,
it doesn’t have to contain a number and the entire value is displayed in
the rendered document.
Sourcepub fn revdate(&self) -> &str
pub fn revdate(&self) -> &str
Returns the revision date.
The date the revision was completed is assigned to the built-in
revdate attribute. If the date is assigned using the revision line, it
must be separated from the version by a comma (e.g., 78.1, 2020-10-10). The date can contain letters, numbers, symbols, and
attribute references.
Trait Implementations§
Source§impl<'src> Clone for RevisionLine<'src>
impl<'src> Clone for RevisionLine<'src>
Source§fn clone(&self) -> RevisionLine<'src>
fn clone(&self) -> RevisionLine<'src>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more