WIP
This commit is contained in:
7
api/Cargo.lock
generated
Normal file
7
api/Cargo.lock
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "packager-api"
|
||||
version = "0.1.0"
|
||||
6
api/Cargo.toml
Normal file
6
api/Cargo.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "packager-api"
|
||||
version = "0.1.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
49
api/src/main.rs
Normal file
49
api/src/main.rs
Normal file
@@ -0,0 +1,49 @@
|
||||
#[derive(Debug)]
|
||||
enum ItemUsage {
|
||||
Singleton,
|
||||
Once,
|
||||
Periodic(i32),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct PackageItem {
|
||||
name: String,
|
||||
usage: ItemUsage
|
||||
}
|
||||
|
||||
impl PackageItem {
|
||||
fn new(name: String, usage: ItemUsage) -> PackageItem {
|
||||
PackageItem{
|
||||
name: name,
|
||||
usage: usage,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct PackageList<'a> {
|
||||
name: String,
|
||||
items: &'a[PackageItem],
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let package_list_camping = PackageList {
|
||||
name: String::from("camping"),
|
||||
items: &[
|
||||
PackageItem::new(String::from("Schlafsack"), ItemUsage::Singleton),
|
||||
PackageItem::new(String::from("Zelt"), ItemUsage::Singleton),
|
||||
PackageItem::new(String::from("Luftmatratze"), ItemUsage::Singleton),
|
||||
PackageItem::new(String::from("Campingstuhl"), ItemUsage::Singleton),
|
||||
PackageItem::new(String::from("Regenjacke"), ItemUsage::Singleton),
|
||||
PackageItem::new(String::from("Tasse"), ItemUsage::Singleton),
|
||||
PackageItem::new(String::from("Topf"), ItemUsage::Singleton),
|
||||
PackageItem::new(String::from("Messer"), ItemUsage::Singleton),
|
||||
PackageItem::new(String::from("Messer"), ItemUsage::Singleton),
|
||||
PackageItem::new(String::from("Unterhose"), ItemUsage::Periodic(1)),
|
||||
],
|
||||
};
|
||||
|
||||
println!("Contents for package list {:?}:", package_list_camping.name);
|
||||
for item in package_list_camping.items {
|
||||
println!("{:?}", item);
|
||||
}
|
||||
}
|
||||
1
api/target/.rustc_info.json
Normal file
1
api/target/.rustc_info.json
Normal file
@@ -0,0 +1 @@
|
||||
{"rustc_fingerprint":11215607155405750631,"outputs":{"2797684049618456168":{"success":false,"status":"exit status: 1","code":1,"stdout":"","stderr":"error: `-Csplit-debuginfo` is unstable on this platform\n\n"},"17598535894874457435":{"success":true,"status":"","code":0,"stdout":"rustc 1.54.0\nbinary: rustc\ncommit-hash: unknown\ncommit-date: unknown\nhost: x86_64-unknown-linux-gnu\nrelease: 1.54.0\nLLVM version: 12.0.1\n","stderr":""},"931469667778813386":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/usr\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
|
||||
3
api/target/CACHEDIR.TAG
Normal file
3
api/target/CACHEDIR.TAG
Normal file
@@ -0,0 +1,3 @@
|
||||
Signature: 8a477f597d28d172789f06886806bc55
|
||||
# This file is a cache directory tag created by cargo.
|
||||
# For information about cache directory tags see https://bford.info/cachedir/
|
||||
0
api/target/debug/.cargo-lock
Normal file
0
api/target/debug/.cargo-lock
Normal file
@@ -0,0 +1 @@
|
||||
ea79661483795128
|
||||
@@ -0,0 +1 @@
|
||||
{"rustc":9524402182923608514,"features":"[]","target":3308653904172001685,"profile":18108590124580271077,"path":1036222786711178230,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/packager-api-d975cb7bda540df4/dep-bin-packager-api"}}],"rustflags":[],"metadata":7797948686568424061,"config":0,"compile_kind":0}
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
This file has an mtime of when this was started.
|
||||
@@ -0,0 +1,2 @@
|
||||
{"message":"variant is never constructed: `Once`","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":53,"byte_end":57,"line_start":4,"line_end":4,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":" Once,","highlight_start":5,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: variant is never constructed: `Once`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:4:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m4\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m Once,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"1 warning emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 1 warning emitted\u001b[0m\n\n"}
|
||||
BIN
api/target/debug/deps/packager_api-d975cb7bda540df4
Executable file
BIN
api/target/debug/deps/packager_api-d975cb7bda540df4
Executable file
Binary file not shown.
5
api/target/debug/deps/packager_api-d975cb7bda540df4.d
Normal file
5
api/target/debug/deps/packager_api-d975cb7bda540df4.d
Normal file
@@ -0,0 +1,5 @@
|
||||
/home/hannes/sync/projects/packager/api/target/debug/deps/packager_api-d975cb7bda540df4: src/main.rs
|
||||
|
||||
/home/hannes/sync/projects/packager/api/target/debug/deps/packager_api-d975cb7bda540df4.d: src/main.rs
|
||||
|
||||
src/main.rs:
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
api/target/debug/packager-api
Executable file
BIN
api/target/debug/packager-api
Executable file
Binary file not shown.
1
api/target/debug/packager-api.d
Normal file
1
api/target/debug/packager-api.d
Normal file
@@ -0,0 +1 @@
|
||||
/home/hannes/sync/projects/packager/api/target/debug/packager-api: /home/hannes/sync/projects/packager/api/src/main.rs
|
||||
Reference in New Issue
Block a user