Struct Changes

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

Changes file

Implementations§

Source§

impl Changes

Source

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

Parse changes text, returning a Parse result

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

Source

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

Returns the format of the Changes file.

Source

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

Set the format of the Changes file.

Source

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

Returns the name of the source package.

Source

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

Returns the list of binary packages generated by the source package.

Source

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

Returns the architecture the source package is intended for.

Source

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

Returns the version of the source package.

Source

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

Returns the distribution the source package is intended for.

Source

pub fn urgency(&self) -> Option<Urgency>

Returns the urgency of the source package.

Source

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

Returns the name and email address of the person who maintains the package.

Source

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

Returns the name and email address of the person who uploaded the package.

Source

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

Returns the description of the source package.

Source

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

Returns the SHA-1 checksums of the files in the source package.

Source

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

Returns the SHA-256 checksums of the files in the source package.

Source

pub fn files(&self) -> Option<Vec<File>>

Returns the list of files in the source package.

Source

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

Returns the path to the pool directory for the source package.

Source

pub fn new() -> Self

Create a new Changes file.

Source

pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, ParseError>

Read a Changes file from a file.

Source

pub fn from_file_relaxed<P: AsRef<Path>>( path: P, ) -> Result<(Self, Vec<String>), Error>

Read a Changes file from a file, allowing syntax errors.

Source

pub fn read<R: Read>(r: R) -> Result<Self, ParseError>

Read a Changes file from a reader.

Source

pub fn read_relaxed<R: Read>(r: R) -> Result<(Self, Vec<String>), Error>

Read a Changes file from a reader, allowing syntax errors.

Trait Implementations§

Source§

impl AstNode for Changes

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 Changes

Source§

fn clone(&self) -> Changes

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 Changes

Source§

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

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

impl Default for Changes

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Changes

Source§

fn eq(&self, other: &Changes) -> 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 Changes

Source§

impl StructuralPartialEq for Changes

Auto Trait Implementations§

§

impl Freeze for Changes

§

impl !RefUnwindSafe for Changes

§

impl !Send for Changes

§

impl !Sync for Changes

§

impl Unpin for Changes

§

impl !UnwindSafe for Changes

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