Struct secret_service::SecretService
source · pub struct SecretService<'a> { /* private fields */ }
Expand description
Secret Service Struct.
This the main entry point for usage of the library.
Creating a new SecretService will also initialize dbus and negotiate a new cryptographic session (EncryptionType::Plain or EncryptionType::Dh)
Implementations§
source§impl<'a> SecretService<'a>
impl<'a> SecretService<'a>
sourcepub async fn connect(
encryption: EncryptionType
) -> Result<SecretService<'a>, Error>
pub async fn connect(
encryption: EncryptionType
) -> Result<SecretService<'a>, Error>
Create a new SecretService
instance.
sourcepub async fn get_all_collections(&self) -> Result<Vec<Collection<'_>>, Error>
pub async fn get_all_collections(&self) -> Result<Vec<Collection<'_>>, Error>
Get all collections
sourcepub async fn get_collection_by_alias(
&self,
alias: &str
) -> Result<Collection<'_>, Error>
pub async fn get_collection_by_alias(
&self,
alias: &str
) -> Result<Collection<'_>, Error>
Get collection by alias.
Most common would be the default
alias, but there
is also a specific method for getting the collection
by default alias.
sourcepub async fn get_default_collection(&self) -> Result<Collection<'_>, Error>
pub async fn get_default_collection(&self) -> Result<Collection<'_>, Error>
Get default collection.
(The collection whos alias is default
)
sourcepub async fn get_any_collection(&self) -> Result<Collection<'_>, Error>
pub async fn get_any_collection(&self) -> Result<Collection<'_>, Error>
Get any collection.
First tries default
collection, then session
collection, then the first collection when it
gets all collections.
sourcepub async fn create_collection(
&self,
label: &str,
alias: &str
) -> Result<Collection<'_>, Error>
pub async fn create_collection(
&self,
label: &str,
alias: &str
) -> Result<Collection<'_>, Error>
Creates a new collection with a label and an alias.
sourcepub async fn search_items(
&self,
attributes: HashMap<&str, &str>
) -> Result<SearchItemsResult<Item<'_>>, Error>
pub async fn search_items(
&self,
attributes: HashMap<&str, &str>
) -> Result<SearchItemsResult<Item<'_>>, Error>
Searches all items by attributes