1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! A [Secret Service](https://specifications.freedesktop.org/secret-service-spec/latest/index.html) implementation.
//!
//! That is usually done with
//! ```no_run
//! use oo7::dbus::Service;
//!
//! # async fn run() -> oo7::Result<()> {
//! let service = Service::new().await?;
//!
//! let mut attributes = std::collections::HashMap::new();
//! attributes.insert("type", "password");
//! attributes.insert("user_id", "some_other_identifier");
//!
//! let collection = service.default_collection().await?;
//! // Store a secret
//! collection
//! .create_item("My App's secret", &attributes, "password", true, None)
//! .await?;
//!
//! // Retrieve it later thanks to it attributes
//! let items = collection.search_items(&attributes).await?;
//! let item = items.first().unwrap();
//! assert_eq!(item.secret().await?, oo7::Secret::text("password"));
//!
//! # Ok(())
//! # }
//! ```
//!
//! ## Timeout
//!
//! If a DBus method call takes longer than 30 seconds (for example, waiting for
//! user input on a prompt), the call will fail with a
//! `zbus::Error::InputOutput(std::io::Error(kind: ErrorKind::TimedOut))`.
/// Barebone DBus API of the Secret Service specifications.
///
/// The API is not supposed to be used by the applications in general unless
/// the wrapper API doesn't provide functionality you need.
pub use Algorithm;
pub use Algorithm;
pub use Item;
pub use ;
pub use Service;
pub use Collection;