Struct secret::SecretCollection [] [src]

pub struct SecretCollection(_);

SecretCollection represents a collection of secret items stored in the Secret Service. A collection can be in a locked or unlocked state. Use Lock::lock() or Lock::unlock() to lock or unlock the collection. Use get_items() to lookup the items in the collection. There may not be any items exposed when the collection is locked.

Methods

impl SecretCollection

fn for_alias(alias: &str) -> SecretResult<SecretCollection>

Lookup which collection is assigned to this alias. Aliases help determine well known collections, such as 'default'. Returns the collection, or NULL if none assigned to the alias.

fn create(label: &str, alias: Option<&str>) -> SecretResult<SecretCollection>

Create a new collection in the secret service. If you specify an alias and a collection with that alias already exists, then a new collection will not be created. The previous one will be returned instead. Returns the created Collection.

fn delete(&self) -> SecretResult<()>

Delete this collection. The Secret Service may prompt the user.

fn get_created(&self) -> u64

Get the created date and time of the collection. The return value is the number of seconds since the unix epoch, January 1st 1970.

fn get_modified(&self) -> u64

Get the modified date and time of the collection. The return value is the number of seconds since the unix epoch, January 1st 1970.

fn get_service(&self) -> SecretService

Get the Secret Service object that this collection was created with.

fn are_items_loaded(&self) -> bool

Get if the items are currently loaded. Use load_items() to load them.

fn get_label(&self) -> String

Get the label of this collection.

fn get_items(&self) -> Vec<SecretItem>

Get the SecretItems of the collection

fn load_items(&self) -> SecretResult<()>

Ensure that the SecretCollection proxy has loaded all the items present in the Secret Service.

fn set_alias(&self, alias: &str) -> SecretResult<()>

Assign the collection to this alias. Aliases help determine well known collections, such as 'default'.

fn is_locked(&self) -> bool

Check if the collection is currently locked.

Trait Implementations

impl StaticType for SecretCollection

fn static_type() -> Type

impl Upcast<Object> for SecretCollection

fn upcast(&self) -> VirtualRef<T::GlibType>

impl Wrapper for SecretCollection

type GlibType = SecretCollection

unsafe fn wrap(r: Ref) -> Self

fn as_ref(&self) -> &Ref

fn unwrap(self) -> Ref

impl Lock<SecretCollection> for SecretCollection

fn lock(&self) -> SecretResult<Vec<SecretCollection>>

fn unlock(&self) -> SecretResult<Vec<SecretCollection>>