pub struct ContentLine<'input> { /* private fields */ }
Expand description
A valid content line.
Continuation lines may be folded; wrapped with continuation lines 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>
impl<'input> StructuralPartialEq for ContentLine<'input>
Auto Trait Implementations§
impl<'input> Freeze for ContentLine<'input>
impl<'input> RefUnwindSafe for ContentLine<'input>
impl<'input> Send for ContentLine<'input>
impl<'input> Sync for ContentLine<'input>
impl<'input> Unpin for ContentLine<'input>
impl<'input> UnwindSafe for ContentLine<'input>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)