Struct debian_control::control::Binary

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

Implementations§

source§

impl Binary

source

pub fn as_mut_deb822(&mut self) -> &mut Paragraph

source

pub fn as_deb822(&self) -> &Paragraph

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: Option<&str>)

source

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

The priority of the package.

source

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

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

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

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

The architecture of the package.

source

pub fn set_architecture(&mut self, arch: Option<&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(Some("rust"));

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

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

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

The dependencies of the package.

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

pub fn set_built_using(&mut self, built_using: 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: Option<&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(Some("rust"));

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

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

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

source

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

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.