[][src]Struct secret_service::SecretService

pub struct SecretService { /* fields omitted */ }

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

impl Debug for SecretService[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self