[−][src]Struct secret_service::SecretService
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
, when the gmp
feature is enabled)
Methods
impl SecretService
[src]
pub fn new(encryption: EncryptionType) -> Result<Self>
[src]
Create a new SecretService
instance
Example
let ss = SecretService::new(EncryptionType::Dh).unwrap();
pub fn get_all_collections(&self) -> Result<Vec<Collection>>
[src]
Get all collections
pub fn get_collection_by_alias(&self, alias: &str) -> Result<Collection>
[src]
Get collection by alias.
Most common would be the default
alias, but there
is also a specific method for getting the collection
by default aliasl
pub fn get_default_collection(&self) -> Result<Collection>
[src]
Get default collection.
(The collection whos alias is default
)
pub fn get_any_collection(&self) -> Result<Collection>
[src]
Get any collection.
First tries default
collection, then session
collection, then the first collection when it
gets all collections.
pub fn create_collection(&self, label: &str, alias: &str) -> Result<Collection>
[src]
Creates a new collection with a label and an alias.
pub fn search_items(&self, attributes: Vec<(&str, &str)>) -> Result<Vec<Item>>
[src]
Searches all items by attributes
Trait Implementations
Auto Trait Implementations
impl !Send for SecretService
impl !Sync for SecretService
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self