[][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)

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]

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> Any for T where
    T: 'static + ?Sized
[src]

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

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

impl<T> From<T> for T[src]

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

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]

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.