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
Provided Methods§
Sourcefn delete<P: FnOnce(Result<(), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
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
fn delete_future( &self, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Sourcefn delete_sync(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
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
Sourcefn created(&self) -> u64
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
Sourcefn flags(&self) -> CollectionFlags
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
Sourcefn items(&self) -> Vec<Item>
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()
Sourcefn is_locked(&self) -> bool
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
Sourcefn modified(&self) -> u64
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
Sourcefn service(&self) -> Service
fn service(&self) -> Service
Get the Secret Service object that this collection was created with.
§Returns
the Secret Service object
Sourcefn load_items<P: FnOnce(Result<(), Error>) + 'static>(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
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
fn load_items_future( &self, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Sourcefn load_items_sync(
&self,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
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
Sourcefn refresh(&self)
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.
Sourcefn set_label<P: FnOnce(Result<(), Error>) + 'static>(
&self,
label: &str,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
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>>
Sourcefn set_label_sync(
&self,
label: &str,
cancellable: Option<&impl IsA<Cancellable>>,
) -> Result<(), Error>
fn set_label_sync( &self, label: &str, cancellable: Option<&impl IsA<Cancellable>>, ) -> Result<(), Error>
Sourcefn set_created(&self, created: u64)
fn set_created(&self, created: u64)
The date and time (in seconds since the UNIX epoch) that this collection was created.
Sourcefn set_modified(&self, modified: u64)
fn set_modified(&self, modified: u64)
The date and time (in seconds since the UNIX epoch) that this collection was last modified.
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.