Struct Binary

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

A binary package paragraph

Implementations§

Source§

impl Binary

Source

pub fn new() -> Self

Create a new binary package control file

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 wrap_and_sort( &mut self, indentation: Indentation, immediate_empty_line: bool, max_line_length_one_liner: Option<usize>, )

Wrap and sort the control file

Source

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

The name of the package.

Source

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

Set the name of the package

Source

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

The section of the package.

Source

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

Set the section

Source

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

The priority of the package.

Source

pub fn set_priority(&mut self, priority: Option<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: Option<&str>)

Set the architecture of the package

Source

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

The dependencies of the package.

Source

pub fn set_depends(&mut self, depends: Option<&Relations>)

Set the Depends field

Source

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

The package that this package recommends

Source

pub fn set_recommends(&mut self, recommends: Option<&Relations>)

Set the Recommends field

Source

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

Packages that this package suggests

Source

pub fn set_suggests(&mut self, suggests: Option<&Relations>)

Set the Suggests field

Source

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

The package that this package enhances

Source

pub fn set_enhances(&mut self, enhances: Option<&Relations>)

Set the Enhances field

Source

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

The package that this package pre-depends on

Source

pub fn set_pre_depends(&mut self, pre_depends: Option<&Relations>)

Set the Pre-Depends field

Source

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

The package that this package breaks

Source

pub fn set_breaks(&mut self, breaks: Option<&Relations>)

Set the Breaks field

Source

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

The package that this package conflicts with

Source

pub fn set_conflicts(&mut self, conflicts: Option<&Relations>)

Set the Conflicts field

Source

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

The package that this package replaces

Source

pub fn set_replaces(&mut self, replaces: Option<&Relations>)

Set the Replaces field

Source

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

Return the Provides field

Source

pub fn set_provides(&mut self, provides: Option<&Relations>)

Set the Provides field

Source

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

Return the Built-Using field

Source

pub fn set_built_using(&mut self, built_using: Option<&Relations>)

Set the Built-Using field

Source

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

The Multi-Arch field

Source

pub fn set_multi_arch(&mut self, multi_arch: Option<MultiArch>)

Set the Multi-Arch field

Source

pub fn essential(&self) -> bool

Whether the package is essential

Source

pub fn set_essential(&mut self, essential: bool)

Set whether the package is essential

Source

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

Binary package description

Source

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

Set the binary package description

Source

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

Return the upstream homepage

Source

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

Set the upstream homepage

Source

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

Check if this binary 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 binary 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 Binary

Source§

fn clone(&self) -> Binary

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 Binary

Source§

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

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

impl Default for Binary

Source§

fn default() -> Self

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

impl From<Binary> for Paragraph

Source§

fn from(b: Binary) -> Self

Converts to this type from the input type.
Source§

impl From<Paragraph> for Binary

Source§

fn from(p: Paragraph) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Binary

Source§

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

Source§

impl StructuralPartialEq for Binary

Auto Trait Implementations§

§

impl Freeze for Binary

§

impl !RefUnwindSafe for Binary

§

impl !Send for Binary

§

impl !Sync for Binary

§

impl Unpin for Binary

§

impl !UnwindSafe for Binary

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,