pub trait CollectionExt: IsA<Collection> + Sealed + 'static {
Show 23 methods // Provided methods fn delete<P: FnOnce(Result<(), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P ) { ... } fn delete_future( &self ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>> { ... } fn delete_sync( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error> { ... } fn created(&self) -> u64 { ... } fn flags(&self) -> CollectionFlags { ... } fn items(&self) -> Vec<Item> { ... } fn label(&self) -> GString { ... } fn is_locked(&self) -> bool { ... } fn modified(&self) -> u64 { ... } fn service(&self) -> Service { ... } fn load_items<P: FnOnce(Result<(), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P ) { ... } fn load_items_future( &self ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>> { ... } fn load_items_sync( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error> { ... } fn refresh(&self) { ... } fn set_label<P: FnOnce(Result<(), Error>) + 'static>( &self, label: &str, cancellable: Option<&impl IsA<Cancellable>>, callback: P ) { ... } fn set_label_future( &self, label: &str ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>> { ... } fn set_label_sync( &self, label: &str, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error> { ... } fn set_created(&self, created: u64) { ... } fn set_modified(&self, modified: u64) { ... } fn connect_created_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_label_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_locked_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... } fn connect_modified_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Collection methods.

§Implementors

Collection

Provided Methods§

source

fn delete<P: FnOnce(Result<(), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P )

Delete this collection.

This method returns immediately and completes asynchronously. The secret service may prompt the user. ServiceExt::prompt() will be used to handle any prompts that show up.

§cancellable

optional cancellation object

§callback

called when the operation completes

source

fn delete_future( &self ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

source

fn delete_sync( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error>

Delete this collection.

This method may block indefinitely and should not be used in user interface threads. The secret service may prompt the user. ServiceExt::prompt() will be used to handle any prompts that show up.

§cancellable

optional cancellation object

§Returns

whether the collection was successfully deleted or not

source

fn 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.

§Returns

the created date and time

source

fn flags(&self) -> CollectionFlags

Get the flags representing what features of the #SecretCollection proxy have been initialized.

Use load_items() to initialize further features and change the flags.

§Returns

the flags for features initialized

source

fn items(&self) -> Vec<Item>

Get the list of items in this collection.

§Returns

a list of items, when done, the list should be freed with GLib::List::free(), and each item should be released with GObject::Object::unref()

source

fn label(&self) -> GString

Get the label of this collection.

§Returns

the label, which should be freed with free()

source

fn is_locked(&self) -> bool

Get whether the collection is locked or not.

Use ServiceExtManual::lock() or ServiceExtManual::unlock() to lock or unlock the collection.

§Returns

whether the collection is locked or not

source

fn 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.

§Returns

the modified date and time

source

fn service(&self) -> Service

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

§Returns

the Secret Service object

source

fn load_items<P: FnOnce(Result<(), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P )

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

This affects the result of items().

For collections returned from ServiceExt::collections() the items will have already been loaded.

This method will return immediately and complete asynchronously.

§cancellable

optional cancellation object

§callback

called when the operation completes

source

fn load_items_future( &self ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

source

fn load_items_sync( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error>

Ensure that the #SecretCollection proxy has loaded all the items present in the Secret Service. This affects the result of items().

For collections returned from ServiceExt::collections() the items will have already been loaded.

This method may block indefinitely and should not be used in user interface threads.

§cancellable

optional cancellation object

§Returns

whether the load was successful or not

source

fn refresh(&self)

Refresh the properties on this collection. This fires off a request to refresh, and the properties will be updated later.

Calling this method is not normally necessary, as the secret service will notify the client when properties change.

source

fn set_label<P: FnOnce(Result<(), Error>) + 'static>( &self, label: &str, cancellable: Option<&impl IsA<Cancellable>>, callback: P )

Set the label of this collection.

This function returns immediately and completes asynchronously.

§label

a new label

§cancellable

optional cancellation object

§callback

called when the operation completes

source

fn set_label_future( &self, label: &str ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

source

fn set_label_sync( &self, label: &str, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error>

Set the label of this collection.

This function may block indefinitely. Use the asynchronous version in user interface threads.

§label

a new label

§cancellable

optional cancellation object

§Returns

whether the change was successful or not

source

fn set_created(&self, created: u64)

The date and time (in seconds since the UNIX epoch) that this collection was created.

source

fn set_modified(&self, modified: u64)

The date and time (in seconds since the UNIX epoch) that this collection was last modified.

source

fn connect_created_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

source

fn connect_label_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

fn connect_locked_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

source

fn connect_modified_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId

Object Safety§

This trait is not object safe.

Implementors§