[−][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)
Implementations
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]
&self,
label: &str,
alias: &str
) -> Result<Collection<'_>>
Creates a new collection with a label and an alias.
pub fn search_items(
&self,
attributes: Vec<(&str, &str)>
) -> Result<Vec<Item<'_>>>
[src]
&self,
attributes: Vec<(&str, &str)>
) -> Result<Vec<Item<'_>>>
Searches all items by attributes
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for SecretService
impl !Send for SecretService
impl !Sync for SecretService
impl Unpin for SecretService
impl !UnwindSafe for SecretService
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,