Created
October 13, 2017 03:41
-
-
Save Redrield/cb11307cb6bd85e18f809d248f3ab595 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✘ redrield@redrield-Acer-V3-575T ~/IdeaProjects/Remind/daemon master ●✚ cargo build --verbose | |
Fresh toml v0.2.1 | |
Fresh cfg-if v0.1.2 | |
Fresh pkg-config v0.3.9 | |
Fresh libc v0.2.32 | |
Fresh num-traits v0.1.40 | |
Fresh rustc-demangle v0.1.5 | |
Fresh cc v1.0.0 | |
Fresh lazy_static v0.2.9 | |
Fresh quick-error v1.2.1 | |
Fresh rand v0.3.17 | |
Fresh time v0.1.38 | |
Fresh num-integer v0.1.35 | |
Fresh humantime v1.0.0 | |
Fresh num-iter v0.1.34 | |
Fresh dbus v0.4.1 | |
Fresh num v0.1.40 | |
Fresh backtrace-sys v0.1.14 | |
Fresh chrono v0.4.0 | |
Fresh backtrace v0.3.3 | |
Fresh timer v0.2.0 | |
Fresh error-chain v0.11.0 | |
Fresh error-chain v0.10.0 | |
Fresh metadeps v1.1.2 | |
Fresh notify-rust v3.4.2 | |
Fresh libdbus-sys v0.1.1 | |
Fresh dbus v0.5.4 | |
Compiling remind-daemon v0.1.0 (file:///home/redrield/IdeaProjects/Remind/daemon) | |
Running `rustc --crate-name remind_daemon src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=75cf5b230b4ed009 -C extra-filename=-75cf5b230b4ed009 --out-dir /home/redrield/IdeaProjects/Remind/daemon/target/debug/deps -L dependency=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps --extern dbus=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/libdbus-fef256998f8f7ec7.rlib --extern rand=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/librand-28654f8e067c5779.rlib --extern timer=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/libtimer-67975ca7893d8f36.rlib --extern notify_rust=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/libnotify_rust-bfd6d0a252ba25c8.rlib --extern humantime=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/libhumantime-e4eb88692d85dcac.rlib --extern error_chain=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/liberror_chain-dabad2f0031a4787.rlib --extern lazy_static=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/liblazy_static-6c18af0ce73a160e.rlib --extern time=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/libtime-3c0e03e529189cd3.rlib -L native=/usr/lib -L native=/home/redrield/IdeaProjects/Remind/daemon/target/debug/build/backtrace-sys-3165e04b5604c09c/out/.libs -L native=/usr/lib` | |
error[E0425]: cannot find value `m` in this scope | |
--> src/handlers.rs:10:33 | |
| | |
10 | let (timestamp, reminder) = m.msg.read2::<&str, &str>()?; | |
| ^ not found in this scope | |
error[E0425]: cannot find value `m` in this scope | |
--> src/handlers.rs:12:16 | |
| | |
12 | let mret = m.msg.method_return().append1("Reminder received."); | |
| ^ not found in this scope | |
error: internal compiler error: /checkout/src/librustc_typeck/check/mod.rs:2015: no type for node 102: type str (id=102) in fcx 0x7f82103f1f80 | |
note: the compiler unexpectedly panicked. this is a bug. | |
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports | |
note: rustc 1.22.0-nightly (0e6f4cf51 2017-09-27) running on x86_64-unknown-linux-gnu | |
thread 'rustc' panicked at 'Box<Any>', /checkout/src/librustc_errors/lib.rs:492:8 | |
note: Run with `RUST_BACKTRACE=1` for a backtrace. | |
error: Could not compile `remind-daemon`. | |
Caused by: | |
process didn't exit successfully: `rustc --crate-name remind_daemon src/main.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=75cf5b230b4ed009 -C extra-filename=-75cf5b230b4ed009 --out-dir /home/redrield/IdeaProjects/Remind/daemon/target/debug/deps -L dependency=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps --extern dbus=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/libdbus-fef256998f8f7ec7.rlib --extern rand=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/librand-28654f8e067c5779.rlib --extern timer=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/libtimer-67975ca7893d8f36.rlib --extern notify_rust=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/libnotify_rust-bfd6d0a252ba25c8.rlib --extern humantime=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/libhumantime-e4eb88692d85dcac.rlib --extern error_chain=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/liberror_chain-dabad2f0031a4787.rlib --extern lazy_static=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/liblazy_static-6c18af0ce73a160e.rlib --extern time=/home/redrield/IdeaProjects/Remind/daemon/target/debug/deps/libtime-3c0e03e529189cd3.rlib -L native=/usr/lib -L native=/home/redrield/IdeaProjects/Remind/daemon/target/debug/build/backtrace-sys-3165e04b5604c09c/out/.libs -L native=/usr/lib` (exit code: 101) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use dbus::tree::{MethodInfo, MTFn, MethodResult}; | |
use dbus::Message; | |
pub fn add_reminder(info: &MethodInfo<MTFn<()>, ()>) -> MethodResult { | |
let (timestamp, reminder) = m.msg.read2::<&str, &str>()?; | |
let mret = m.msg.method_return().append1("Reminder received."); | |
let duration = humantime::parse_duration(timestamp).unwrap(); | |
let (id, reminder) = Reminder::new(duration, reminder); | |
{ | |
let mut lock = REMINDERS.write().unwrap(); | |
lock.insert(id, reminder); | |
} | |
process_reminder(id); | |
Ok(vec![mret]) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate dbus; | |
... | |
mod handlers; | |
use dbus::{Connection, BusType, NameFlag, MessageItem}; | |
use dbus::tree::Factory; | |
fn main() { | |
println!("Starting remind daemon."); | |
... | |
let tree = f.tree(()).add(f.object_path("/", ()).introspectable().add( | |
f.interface("com.redrield.remind", ()).add_m( | |
f.method("AddReminder", (), handlers::add_reminder) | |
.outarg::<&str, _>("reply") | |
.inarg::<&str, _>("timestamp") | |
.inarg::<&str, _>("reminder") | |
) | |
... | |
)); | |
tree.set_registered(&conn, true).unwrap(); | |
conn.iter(1000).with(tree).count(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✘ redrield@redrield-Acer-V3-575T ~/IdeaProjects/Remind/daemon master ●✚ rustc --version --verbose | |
rustc 1.22.0-nightly (0e6f4cf51 2017-09-27) | |
binary: rustc | |
commit-hash: 0e6f4cf51cd3b799fb057956f8e733d16605d09b | |
commit-date: 2017-09-27 | |
host: x86_64-unknown-linux-gnu | |
release: 1.22.0-nightly | |
LLVM version: 4.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment