Struct Release

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

A release in the APT package manager.

Implementations§

Source§

impl Release

Source

pub fn new(paragraph: Paragraph) -> Self

Create a new release

Source

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

Parse release text, returning a Parse result

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

Source

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

Get the origin of the release

Source

pub fn set_origin(&mut self, origin: &str)

Set the origin of the release

Source

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

Get the label of the release

Source

pub fn set_label(&mut self, label: &str)

Set the label of the release

Source

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

Get the suite of the release

Source

pub fn set_suite(&mut self, suite: &str)

Set the suite of the release

Source

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

Get the codename of the release

Source

pub fn set_codename(&mut self, codename: &str)

Set the codename of the release

Source

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

Get the URLs at which the changelogs can be found

Source

pub fn set_changelogs(&mut self, changelogs: Vec<String>)

Set the URLs at which the changelogs can be found

Source

pub fn date(&self) -> Option<DateTime<FixedOffset>>

Get the date of the release

Source

pub fn set_date(&mut self, date: DateTime<FixedOffset>)

Set the date of the release

Source

pub fn valid_until(&self) -> Option<DateTime<FixedOffset>>

Get the date until the release is valid

Source

pub fn set_valid_until(&mut self, date: DateTime<FixedOffset>)

Set the date until the release is valid

Source

pub fn acquire_by_hash(&self) -> bool

Get whether acquire by hash is enabled

Source

pub fn set_acquire_by_hash(&mut self, acquire_by_hash: bool)

Set whether acquire by hash is enabled

Source

pub fn no_support_for_architecture_all(&self) -> bool

Get whether the release has no support for architecture all

Source

pub fn set_no_support_for_architecture_all( &mut self, no_support_for_architecture_all: bool, )

Set whether the release has no support for architecture all

Source

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

Get the architectures

Source

pub fn set_architectures(&mut self, architectures: Vec<String>)

Set the architectures

Source

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

Get the components

Source

pub fn set_components(&mut self, components: Vec<String>)

Set the components

Source

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

Get the description

Source

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

Set the description

Source

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

Get the MD5 checksums

Source

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

Set the MD5 checksums

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 Release

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 FromStr for Release

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 Release

§

impl !RefUnwindSafe for Release

§

impl !Send for Release

§

impl !Sync for Release

§

impl Unpin for Release

§

impl !UnwindSafe for Release

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.
Source§

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