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;
19#[cfg(not(target_family = "wasm"))]
20pub mod thread;
21pub mod user_home;
22#[cfg(not(target_family = "wasm"))]
23pub mod wakeup;
24
25pub fn error_chain(error: &dyn std::error::Error) -> String {
28 let mut message = error.to_string();
29 let mut cause = error.source();
30 while let Some(error) = cause {
31 let text = error.to_string();
32 if !message.ends_with(&text) {
33 message.push_str(": ");
34 message.push_str(&text);
35 }
36 cause = error.source();
37 }
38 message
39}