Struct vparser::ContentLine
source · pub struct ContentLine<'input> { /* private fields */ }
Expand description
A valid content line.
Continuation lines may be wrapped and separated by a CRLF immediately followed by a single linear white-space character (i.e., SPACE or HTAB).
Implementations§
source§impl<'input> ContentLine<'input>
impl<'input> ContentLine<'input>
sourcepub fn name(&self) -> Cow<'input, str>
pub fn name(&self) -> Cow<'input, str>
Return this line’s name, with continuation lines unfolded.
sourcepub fn params(&self) -> Cow<'input, str>
pub fn params(&self) -> Cow<'input, str>
Return this line’s parameter(s), with continuation lines unfolded.
sourcepub fn value(&self) -> Cow<'input, str>
pub fn value(&self) -> Cow<'input, str>
Return this line’s value, with continuation lines unfolded.
sourcepub fn unfolded(&self) -> Cow<'input, str>
pub fn unfolded(&self) -> Cow<'input, str>
Return the entire line unfolded.
Note that the line may exceed the maximum length, making it technically invalid. This is however, suitable for comparing equality between to lines.
sourcepub fn normalise_folds(&self) -> Cow<'input, str>
pub fn normalise_folds(&self) -> Cow<'input, str>
Return this content line with normalised folds
The returned line shall be semantically equivalent to the input line. It will be folded making each logical line as long as possible (e.g.: no more than 75 octets, excluding the line jump).
Trait Implementations§
source§impl<'input> Clone for ContentLine<'input>
impl<'input> Clone for ContentLine<'input>
source§fn clone(&self) -> ContentLine<'input>
fn clone(&self) -> ContentLine<'input>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'input> Debug for ContentLine<'input>
impl<'input> Debug for ContentLine<'input>
source§impl<'input> PartialEq for ContentLine<'input>
impl<'input> PartialEq for ContentLine<'input>
source§fn eq(&self, other: &ContentLine<'input>) -> bool
fn eq(&self, other: &ContentLine<'input>) -> bool
self
and other
values to be equal, and is used
by ==
.