Struct debian_control::lossless::control::Control
source · pub struct Control(/* private fields */);Implementations§
source§impl Control
impl Control
pub fn new() -> Self
pub fn as_mut_deb822(&mut self) -> &mut Deb822
pub fn as_deb822(&self) -> &Deb822
pub fn source(&self) -> Option<Source>
pub fn binaries(&self) -> impl Iterator<Item = Binary>
sourcepub fn add_source(&mut self, name: &str) -> Source
pub fn add_source(&mut self, name: &str) -> Source
sourcepub fn add_binary(&mut self, name: &str) -> Binary
pub fn add_binary(&mut self, name: &str) -> Binary
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub fn from_file_relaxed<P: AsRef<Path>>( path: P, ) -> Result<(Self, Vec<String>), Error>
pub fn read<R: Read>(r: R) -> Result<Self, Error>
pub fn read_relaxed<R: Read>(r: R) -> Result<(Self, Vec<String>), Error>
sourcepub fn wrap_and_sort(
&mut self,
indentation: Indentation,
immediate_empty_line: bool,
max_line_length_one_liner: Option<usize>,
)
pub fn wrap_and_sort( &mut self, indentation: Indentation, immediate_empty_line: bool, max_line_length_one_liner: Option<usize>, )
Wrap and sort the control file
§Arguments
indentation- The indentation to useimmediate_empty_line- Whether to add an empty line at the start of multi-line fieldsmax_line_length_one_liner- The maximum line length for one-liner fields
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Control
impl !RefUnwindSafe for Control
impl !Send for Control
impl !Sync for Control
impl Unpin for Control
impl !UnwindSafe for Control
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