1#![cfg_attr(docsrs, feature(doc_cfg))]
4
5pub mod cancel;
6#[cfg(not(target_family = "wasm"))]
7pub mod file_inspection;
8pub mod lazy;
9#[cfg(not(target_family = "wasm"))]
10pub mod local_socket;
11#[cfg(not(target_family = "wasm"))]
12pub mod private_document;
13#[cfg(not(target_family = "wasm"))]
14pub mod private_fs;
15#[cfg(not(any(target_os = "ios", target_family = "wasm")))]
17pub mod process;
18pub mod slot;
19pub mod user_home;
20#[cfg(not(target_family = "wasm"))]
21pub mod wakeup;
22
23pub fn error_chain(error: &dyn std::error::Error) -> String {
26 let mut message = error.to_string();
27 let mut cause = error.source();
28 while let Some(error) = cause {
29 let text = error.to_string();
30 if !message.ends_with(&text) {
31 message.push_str(": ");
32 message.push_str(&text);
33 }
34 cause = error.source();
35 }
36 message
37}