File: create-file.rs

package info (click to toggle)
rust-debian-control 0.1.48-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 580 kB
  • sloc: makefile: 2
file content (15 lines) | stat: -rw-r--r-- 449 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use debian_control::fields::Priority;
use debian_control::lossless::Control;

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);
}