pub struct DebcargoSource<'a> { /* private fields */ }Expand description
The source package in a debcargo.toml file.
Implementations§
Source§impl DebcargoSource<'_>
impl DebcargoSource<'_>
Sourcepub fn toml_section_mut(&mut self) -> &mut Table
pub fn toml_section_mut(&mut self) -> &mut Table
Return the source section of the debcargo.toml file.
Sourcepub fn set_standards_version(&mut self, version: &str) -> &mut Self
pub fn set_standards_version(&mut self, version: &str) -> &mut Self
Set the standards version.
Sourcepub fn standards_version(&self) -> &str
pub fn standards_version(&self) -> &str
Return the standards version.
Sourcepub fn set_homepage(&mut self, homepage: &str) -> &mut Self
pub fn set_homepage(&mut self, homepage: &str) -> &mut Self
Set the homepage.
Sourcepub fn set_vcs_git(&mut self, git: &str) -> &mut Self
pub fn set_vcs_git(&mut self, git: &str) -> &mut Self
Set the VCS Git URL.
Sourcepub fn vcs_browser(&self) -> Option<String>
pub fn vcs_browser(&self) -> Option<String>
Get the VCS browser URL.
Sourcepub fn set_vcs_browser(&mut self, browser: &str) -> &mut Self
pub fn set_vcs_browser(&mut self, browser: &str) -> &mut Self
Set the VCS browser URL.
Sourcepub fn set_section(&mut self, section: &str) -> &mut Self
pub fn set_section(&mut self, section: &str) -> &mut Self
Set the section.
Sourcepub fn set_priority(&mut self, priority: Priority) -> &mut Self
pub fn set_priority(&mut self, priority: Priority) -> &mut Self
Set the priority.
Sourcepub fn rules_requires_root(&self) -> bool
pub fn rules_requires_root(&self) -> bool
Get whether the package build requires root.
Sourcepub fn set_rules_requires_root(&mut self, requires_root: bool) -> &mut Self
pub fn set_rules_requires_root(&mut self, requires_root: bool) -> &mut Self
Set whether the package build requires root.
Sourcepub fn maintainer(&self) -> &str
pub fn maintainer(&self) -> &str
Get the maintainer.
Sourcepub fn set_maintainer(&mut self, maintainer: &str) -> &mut Self
pub fn set_maintainer(&mut self, maintainer: &str) -> &mut Self
Set the maintainer.
Sourcepub fn set_uploaders(&mut self, uploaders: Vec<String>) -> &mut Self
pub fn set_uploaders(&mut self, uploaders: Vec<String>) -> &mut Self
Set the uploaders.
Sourcepub fn extra_lines(&self) -> Vec<String>
pub fn extra_lines(&self) -> Vec<String>
Get the extra_lines field as a vector of strings.
Sourcepub fn set_extra_lines(&mut self, lines: Vec<String>) -> &mut Self
pub fn set_extra_lines(&mut self, lines: Vec<String>) -> &mut Self
Set the extra_lines field.
Sourcepub fn add_extra_line(&mut self, line: String) -> &mut Self
pub fn add_extra_line(&mut self, line: String) -> &mut Self
Add a line to extra_lines if it doesn’t already exist.
Sourcepub fn remove_extra_line(&mut self, line: &str) -> &mut Self
pub fn remove_extra_line(&mut self, line: &str) -> &mut Self
Remove a line from extra_lines.
Sourcepub fn get_extra_field(&self, field_name: &str) -> Option<String>
pub fn get_extra_field(&self, field_name: &str) -> Option<String>
Get a field value from extra_lines (for debian/control fields). Looks for lines in the format “Field: value” and returns the value.
Sourcepub fn set_extra_field(&mut self, field_name: &str, value: &str) -> &mut Self
pub fn set_extra_field(&mut self, field_name: &str, value: &str) -> &mut Self
Set a field in extra_lines (for debian/control fields). Updates existing field or adds new one if not present.
Sourcepub fn remove_extra_field(&mut self, field_name: &str) -> &mut Self
pub fn remove_extra_field(&mut self, field_name: &str) -> &mut Self
Remove a field from extra_lines.
Sourcepub fn set_vcs_url(&mut self, vcs_type: &str, url: &str) -> &mut Self
pub fn set_vcs_url(&mut self, vcs_type: &str, url: &str) -> &mut Self
Set a VCS URL using the appropriate method. Uses native fields for Git and Browser, extra_lines for others.
Sourcepub fn get_vcs_url(&self, vcs_type: &str) -> Option<String>
pub fn get_vcs_url(&self, vcs_type: &str) -> Option<String>
Get a VCS URL using the appropriate method. Uses native fields for Git and Browser, extra_lines for others.