debian_control::lossless::apt

Struct Package

source
pub struct Package(/* private fields */);
Expand description

A package in the APT package manager.

Implementations§

source§

impl Package

source

pub fn new(paragraph: Paragraph) -> Self

Create a new package.

source

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

Get the name of the package.

source

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

Set the name of the package.

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 installed_size(&self) -> Option<usize>

Get the installed size of the package in bytes.

source

pub fn set_installed_size(&mut self, size: usize)

Set the installed size of the package in bytes.

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 architecture(&self) -> Option<String>

Get the architecture of the package.

source

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

Set the architecture of the package.

source

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

Get the packages that this package depends on.

source

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

Set the packages that this package depends on.

source

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

Get the packages that this package suggests.

source

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

Set the packages that this package recommends.

source

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

Get the packages that this package suggests.

source

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

Set the packages that this package suggests.

source

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

Get the packages that this package enhances.

source

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

Set the packages that this package enhances.

source

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

Get the relations that this package pre-depends on.

source

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

Set the relations that this package pre-depends on.

source

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

Get the relations that this package breaks.

source

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

Set the relations that this package breaks.

source

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

Get the relations that this package conflicts with.

source

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

Set the relations that this package conflicts with.

source

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

Get the relations that this package replaces.

source

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

Set the relations that this package replaces.

source

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

Get the relations that this package provides.

source

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

Set the relations that the package provides.

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 description(&self) -> Option<String>

Get the description of the package.

source

pub fn set_description(&mut self, description: &str)

Set the description of the package.

source

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

Get the upstream homepage of the package.

source

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

Set the upstream homepage of the package.

source

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

Get the source of the package.

source

pub fn set_source(&mut self, source: &str)

Set the source of the package.

source

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

Get the MD5 checksum of the description.

source

pub fn set_description_md5(&mut self, md5: &str)

Set the MD5 checksum of the description.

source

pub fn tags(&self, tag: &str) -> Option<Vec<String>>

Get the tags of the package.

source

pub fn set_tags(&mut self, tag: &str, tags: Vec<String>)

Set the tags of the package.

source

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

Get the filename of the package.

source

pub fn set_filename(&mut self, filename: &str)

Set the filename of the package.

source

pub fn size(&self) -> Option<usize>

Get the size of the package.

source

pub fn set_size(&mut self, size: usize)

Set the size of the package.

source

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

Get the MD5 checksum.

source

pub fn set_md5sum(&mut self, md5sum: &str)

Set the MD5 checksum.

source

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

Get the SHA256 checksum.

source

pub fn set_sha256(&mut self, sha256: &str)

Set the SHA256 checksum.

source

pub fn multi_arch(&self) -> Option<MultiArch>

Get the multi-arch field.

source

pub fn set_multi_arch(&mut self, arch: MultiArch)

Set the multi-arch field.

Trait Implementations§

source§

impl FromStr for Package

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

Auto Trait Implementations§

§

impl Freeze for Package

§

impl !RefUnwindSafe for Package

§

impl !Send for Package

§

impl !Sync for Package

§

impl Unpin for Package

§

impl !UnwindSafe for Package

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> 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, 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.