Skip to main content

Source

Struct Source 

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

A source package in the APT package manager.

Implementations§

Source§

impl Source

Source

pub fn new() -> Self

Create a new source package

Source

pub fn parse(text: &str) -> Parse<Source>

Parse source package text, returning a Parse result

Note: This expects a single paragraph, not a full deb822 document

Source

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

Get the source name

Source

pub fn set_package(&mut self, package: &str)

Set the package name

Source

pub fn version(&self) -> Option<Version>

Get the version of the package

Source

pub fn set_version(&mut self, version: Version)

Set the version of the package

Source

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

Get the maintainer of the package

Source

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

Set the maintainer of the package

Source

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

Get the uploaders of the package

Source

pub fn set_uploaders(&mut self, uploaders: Vec<String>)

Set the uploaders of the package

Source

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

Get the standards version of the package

Source

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

Set the standards version of the package

Source

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

Get the source format of the package

Source

pub fn set_format(&mut self, format: &str)

Set the format of the package

Source

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

Get the Vcs-Browser field

Source

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

Set the Vcs-Browser field

Source

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

Get 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>

Get the Vcs-Svn field

Source

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

Set the Vcs-Svn field

Source

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

Get the Vcs-Hg field

Source

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

Set the Vcs-Hg field

Source

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

Get 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>

Get 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>

Get the Vcs-Svk field

Source

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

Set the Svk VCS

Source

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

Get the Darcs VCS

Source

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

Set the Darcs VCS

Source

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

Get the Mtn VCS

Source

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

Set the Mtn VCS

Source

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

Get the Cvs VCS

Source

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

Set the Cvs VCS

Source

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

Get the build depends

Source

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

Set the build depends

Source

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

Get the arch-independent build depends

Source

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

Set the arch-independent build depends

Source

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

Get the arch-dependent build depends

Source

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

Set the arch-dependent build depends

Source

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

Get the build conflicts

Source

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

Set the build conflicts

Source

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

Get the build conflicts indep

Source

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

Set the build conflicts indep

Source

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

Get the build conflicts arch

Source

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

Set the build conflicts arch

Source

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

Get the binary relations

Source

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

Set the binary relations

Source

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

Get the homepage of the package.

Source

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

Set the homepage of the package.

Source

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

Get the section of the package.

Source

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

Set the section of the package.

Source

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

Get the priority of the package.

Source

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

Set the priority of the package.

Source

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

The architecture of the package.

Source

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

Set the architecture of the package.

Source

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

Get the directory

Source

pub fn set_directory(&mut self, dir: &str)

Set the directory

Source

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

Get the test suite

Source

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

Set the testsuite

Source

pub fn files(&self) -> Vec<Md5Checksum>

Get the files

Source

pub fn set_files(&mut self, files: Vec<Md5Checksum>)

Set the files

Source

pub fn checksums_sha1(&self) -> Vec<Sha1Checksum>

Get the SHA1 checksums

Source

pub fn set_checksums_sha1(&mut self, checksums: Vec<Sha1Checksum>)

Set the SHA1 checksums

Source

pub fn checksums_sha256(&self) -> Vec<Sha256Checksum>

Get the SHA256 checksums

Source

pub fn set_checksums_sha256(&mut self, checksums: Vec<Sha256Checksum>)

Set the SHA256 checksums

Source

pub fn checksums_sha512(&self) -> Vec<Sha512Checksum>

Get the SHA512 checksums

Source

pub fn set_checksums_sha512(&mut self, checksums: Vec<Sha512Checksum>)

Set the SHA512 checksums

Trait Implementations§

Source§

impl AstNode for Source

Source§

type Language = Lang

Source§

fn can_cast(kind: <Self::Language as Language>::Kind) -> bool

Source§

fn cast(syntax: SyntaxNode<Self::Language>) -> Option<Self>

Source§

fn syntax(&self) -> &SyntaxNode<Self::Language>

Source§

fn clone_for_update(&self) -> Self
where Self: Sized,

Source§

fn clone_subtree(&self) -> Self
where Self: Sized,

Source§

impl Clone for Source

Source§

fn clone(&self) -> Source

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Default for Source

Source§

fn default() -> Self

Returns the “default value” for a type. 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(paragraph: Paragraph) -> Self

Converts to this type from the input type.
Source§

impl FromStr for Source

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
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 (const: unstable) · 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 Send for Source

Source§

impl StructuralPartialEq for Source

Source§

impl Sync for Source

Auto Trait Implementations§

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.