pub struct ControlFile<'a> { /* private fields */ }
Expand description
A debian control file.
A control file is an ordered series of paragraphs.
Implementations§
Source§impl<'a> ControlFile<'a>
impl<'a> ControlFile<'a>
Sourcepub fn parse_reader<R: BufRead>(reader: &mut R) -> Result<Self, ControlError>
pub fn parse_reader<R: BufRead>(reader: &mut R) -> Result<Self, ControlError>
Construct a new instance by parsing data from a reader.
Sourcepub fn parse_str(s: &str) -> Result<Self, ControlError>
pub fn parse_str(s: &str) -> Result<Self, ControlError>
Parse a control file from a string.
Sourcepub fn add_paragraph(&mut self, p: ControlParagraph<'a>)
pub fn add_paragraph(&mut self, p: ControlParagraph<'a>)
Add a paragraph to this control file.
Sourcepub fn paragraphs(&self) -> impl Iterator<Item = &ControlParagraph<'a>>
pub fn paragraphs(&self) -> impl Iterator<Item = &ControlParagraph<'a>>
Obtain paragraphs in this control file.
Trait Implementations§
Source§impl<'a> Clone for ControlFile<'a>
impl<'a> Clone for ControlFile<'a>
Source§fn clone(&self) -> ControlFile<'a>
fn clone(&self) -> ControlFile<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for ControlFile<'a>
impl<'a> Debug for ControlFile<'a>
Source§impl<'a> Default for ControlFile<'a>
impl<'a> Default for ControlFile<'a>
Source§fn default() -> ControlFile<'a>
fn default() -> ControlFile<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for ControlFile<'a>
impl<'a> RefUnwindSafe for ControlFile<'a>
impl<'a> Send for ControlFile<'a>
impl<'a> Sync for ControlFile<'a>
impl<'a> Unpin for ControlFile<'a>
impl<'a> UnwindSafe for ControlFile<'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