Struct secret_service::blocking::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 fn connect(encryption: EncryptionType) -> Result<Self, Error>
pub fn connect(encryption: EncryptionType) -> Result<Self, Error>
Create a new SecretService
instance
sourcepub fn get_all_collections(&self) -> Result<Vec<Collection<'_>>, Error>
pub fn get_all_collections(&self) -> Result<Vec<Collection<'_>>, Error>
Get all collections
sourcepub fn get_collection_by_alias(
&self,
alias: &str,
) -> Result<Collection<'_>, Error>
pub 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 fn get_default_collection(&self) -> Result<Collection<'_>, Error>
pub fn get_default_collection(&self) -> Result<Collection<'_>, Error>
Get default collection.
(The collection whos alias is default
)
sourcepub fn get_any_collection(&self) -> Result<Collection<'_>, Error>
pub 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 fn create_collection(
&self,
label: &str,
alias: &str,
) -> Result<Collection<'_>, Error>
pub fn create_collection( &self, label: &str, alias: &str, ) -> Result<Collection<'_>, Error>
Creates a new collection with a label and an alias.
sourcepub fn search_items(
&self,
attributes: HashMap<&str, &str>,
) -> Result<SearchItemsResult<Item<'_>>, Error>
pub fn search_items( &self, attributes: HashMap<&str, &str>, ) -> Result<SearchItemsResult<Item<'_>>, Error>
Searches all items by attributes
Auto Trait Implementations§
impl<'a> Freeze for SecretService<'a>
impl<'a> !RefUnwindSafe for SecretService<'a>
impl<'a> Send for SecretService<'a>
impl<'a> Sync for SecretService<'a>
impl<'a> Unpin for SecretService<'a>
impl<'a> !UnwindSafe for SecretService<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more