Struct Source

Source
pub struct Source(/* private fields */);
Expand description

A source package paragraph

Implementations§

Source§

impl Source

Source

pub fn name(&self) -> Option<String>

The name of the source package.

Source

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 paragraph

Source

pub fn as_mut_deb822(&mut self) -> &mut Paragraph

Return the underlying deb822 paragraph, mutable

Source

pub fn as_deb822(&self) -> &Paragraph

Return the underlying deb822 paragraph

Source

pub fn set_name(&mut self, name: &str)

Set the name of the source package.

Source

pub fn section(&self) -> Option<String>

The default section of the packages built from this source package.

Source

pub fn set_section(&mut self, section: Option<&str>)

Set the section of the source package

Source

pub fn priority(&self) -> Option<Priority>

The default priority of the packages built from this source package.

Source

pub fn set_priority(&mut self, priority: Option<Priority>)

Set the priority of the source package

Source

pub fn maintainer(&self) -> Option<String>

The maintainer of the package.

Source

pub fn set_maintainer(&mut self, maintainer: &str)

Set the maintainer of the package

Source

pub fn build_depends(&self) -> Option<Relations>

The build dependencies of the package.

Source

pub fn set_build_depends(&mut self, relations: &Relations)

Set the Build-Depends field

Source

pub fn build_depends_indep(&self) -> Option<Relations>

Return the Build-Depends-Indep field

Source

pub fn build_depends_arch(&self) -> Option<Relations>

Return the Build-Depends-Arch field

Source

pub fn build_conflicts(&self) -> Option<Relations>

The build conflicts of the package.

Source

pub fn build_conflicts_indep(&self) -> Option<Relations>

Return the Build-Conflicts-Indep field

Source

pub fn build_conflicts_arch(&self) -> Option<Relations>

Return the Build-Conflicts-Arch field

Source

pub fn standards_version(&self) -> Option<String>

Return the standards version

Source

pub fn set_standards_version(&mut self, version: &str)

Set the Standards-Version field

Source

pub fn homepage(&self) -> Option<Url>

Return the upstrea mHomepage

Source

pub fn set_homepage(&mut self, homepage: &Url)

Set the Homepage field

Source

pub fn vcs_git(&self) -> Option<String>

Return the Vcs-Git field

Source

pub fn set_vcs_git(&mut self, url: &str)

Set the Vcs-Git field

Source

pub fn vcs_svn(&self) -> Option<String>

Return the Vcs-Browser field

Source

pub fn set_vcs_svn(&mut self, url: &str)

Set the Vcs-Svn field

Source

pub fn vcs_bzr(&self) -> Option<String>

Return the Vcs-Bzr field

Source

pub fn set_vcs_bzr(&mut self, url: &str)

Set the Vcs-Bzr field

Source

pub fn vcs_arch(&self) -> Option<String>

Return the Vcs-Arch field

Source

pub fn set_vcs_arch(&mut self, url: &str)

Set the Vcs-Arch field

Source

pub fn vcs_svk(&self) -> Option<String>

Return the Vcs-Svk field

Source

pub fn set_vcs_svk(&mut self, url: &str)

Set the Vcs-Svk field

Source

pub fn vcs_darcs(&self) -> Option<String>

Return the Vcs-Darcs field

Source

pub fn set_vcs_darcs(&mut self, url: &str)

Set the Vcs-Darcs field

Source

pub fn vcs_mtn(&self) -> Option<String>

Return the Vcs-Mtn field

Source

pub fn set_vcs_mtn(&mut self, url: &str)

Set the Vcs-Mtn field

Source

pub fn vcs_cvs(&self) -> Option<String>

Return the Vcs-Cvs field

Source

pub fn set_vcs_cvs(&mut self, url: &str)

Set the Vcs-Cvs field

Source

pub fn vcs_hg(&self) -> Option<String>

Return the Vcs-Hg field

Source

pub fn set_vcs_hg(&mut self, url: &str)

Set the Vcs-Hg field

Source

pub fn vcs_browser(&self) -> Option<String>

Return the Vcs-Browser field

Source

pub fn vcs(&self) -> Option<Vcs>

Return the Vcs used by the package

Source

pub fn set_vcs_browser(&mut self, url: Option<&str>)

Set the Vcs-Browser field

Source

pub fn uploaders(&self) -> Option<Vec<String>>

Return the Uploaders field

Source

pub fn set_uploaders(&mut self, uploaders: &[&str])

Set the uploaders field

Source

pub fn architecture(&self) -> Option<String>

Return the architecture field

Source

pub fn set_architecture(&mut self, arch: Option<&str>)

Set the architecture field

Source

pub fn rules_requires_root(&self) -> Option<bool>

Return the Rules-Requires-Root field

Source

pub fn set_rules_requires_root(&mut self, requires_root: bool)

Set the Rules-Requires-Root field

Source

pub fn testsuite(&self) -> Option<String>

Return the Testsuite field

Source

pub fn set_testsuite(&mut self, testsuite: &str)

Set the Testsuite field

Source

pub fn overlaps_range(&self, range: TextRange) -> bool

Check if this source paragraph’s range overlaps with the given range

§Arguments
  • range - The text range to check for overlap
§Returns

true if the paragraph overlaps with the given range, false otherwise

Source

pub fn fields_in_range( &self, range: TextRange, ) -> impl Iterator<Item = Entry> + '_

Get fields in this source paragraph that overlap with the given range

§Arguments
  • range - The text range to check for overlaps
§Returns

An iterator over Entry items that overlap with the given range

Trait Implementations§

Source§

impl Clone for Source

Source§

fn clone(&self) -> Source

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Source

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Source

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Paragraph> for Source

Source§

fn from(p: Paragraph) -> Self

Converts to this type from the input type.
Source§

impl From<Source> for Paragraph

Source§

fn from(s: Source) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Source

Source§

fn eq(&self, other: &Source) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Source

Source§

impl StructuralPartialEq for Source

Auto Trait Implementations§

§

impl Freeze for Source

§

impl !RefUnwindSafe for Source

§

impl !Send for Source

§

impl !Sync for Source

§

impl Unpin for Source

§

impl !UnwindSafe for Source

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,