pub struct Field<'a> {
pub name: &'a str,
pub value: String,
}Expand description
A single field in a control file.
All types of fields (simple, folded, multiline) are treated the same: all individual value lines (the part after the colon as well as any continuation lines) are trimmed and concatenated together using a single newline character. This means that field values never begin or end with a newline character, but internal newlines are preserved (and may be transformed or ignored when dealing with folded fields). Leading whitespace and trailing whitespace is always removed, including in continuation lines.
Fields§
§name: &'a str§value: StringTrait Implementations§
impl<'a> Eq for Field<'a>
impl<'a> StructuralPartialEq for Field<'a>
Auto Trait Implementations§
impl<'a> Freeze for Field<'a>
impl<'a> RefUnwindSafe for Field<'a>
impl<'a> Send for Field<'a>
impl<'a> Sync for Field<'a>
impl<'a> Unpin for Field<'a>
impl<'a> UnsafeUnpin for Field<'a>
impl<'a> UnwindSafe for Field<'a>
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
Mutably borrows from an owned value. Read more