Struct debian_control::control::Binary

source ·
pub struct Binary(/* private fields */);

Implementations§

source§

impl Binary

source

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

The name of the package.

source

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

source

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

The section of the package.

source

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

source

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

The priority of the package.

source

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

Examples found in repository?
examples/create-file.rs (line 10)
3
4
5
6
7
8
9
10
11
12
13
14
pub fn main() {
    let mut control = Control::new();
    let mut source = control.add_source("hello");
    source.set_section("rust");

    let mut binary = control.add_binary("hello");
    binary.set_architecture("amd64");
    binary.set_priority(Priority::Optional);
    binary.set_description("Hello, world!");

    println!("{}", control.to_string());
}
source

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

The architecture of the package.

source

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

Examples found in repository?
examples/create-file.rs (line 9)
3
4
5
6
7
8
9
10
11
12
13
14
pub fn main() {
    let mut control = Control::new();
    let mut source = control.add_source("hello");
    source.set_section("rust");

    let mut binary = control.add_binary("hello");
    binary.set_architecture("amd64");
    binary.set_priority(Priority::Optional);
    binary.set_description("Hello, world!");

    println!("{}", control.to_string());
}
source

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

The dependencies of the package.

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

pub fn essential(&self) -> bool

source

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

source

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

Binary package description

source

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

Examples found in repository?
examples/create-file.rs (line 11)
3
4
5
6
7
8
9
10
11
12
13
14
pub fn main() {
    let mut control = Control::new();
    let mut source = control.add_source("hello");
    source.set_section("rust");

    let mut binary = control.add_binary("hello");
    binary.set_architecture("amd64");
    binary.set_priority(Priority::Optional);
    binary.set_description("Hello, world!");

    println!("{}", control.to_string());
}
source

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

source

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

source

pub fn get(&self, key: &str) -> Option<String>

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

§

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

§

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.