[fractal/fractal-next] auth_dialog: Add doc comments



commit 8d89ec2d3e96174635414b2d1fb8fa6d8e967ee6
Author: Kai A. Hiller <V02460 gmail com>
Date:   Sat Feb 12 08:04:41 2022 +0100

    auth_dialog: Add doc comments

 src/components/auth_dialog.rs | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/components/auth_dialog.rs b/src/components/auth_dialog.rs
index fd21c54e..04168565 100644
--- a/src/components/auth_dialog.rs
+++ b/src/components/auth_dialog.rs
@@ -197,7 +197,7 @@ mod imp {
 }
 
 glib::wrapper! {
-    /// Button showing a spinner, revealing its label once loaded.
+    /// Dialog to guide the user through an authentication flow.
     pub struct AuthDialog(ObjectSubclass<imp::AuthDialog>)
         @extends gtk::Widget, adw::Window, gtk::Dialog, gtk::Window, @implements gtk::Accessible;
 }
@@ -212,6 +212,10 @@ impl AuthDialog {
         self.imp().session.get().unwrap().upgrade().unwrap()
     }
 
+    /// Authenticates the user to the server via an authentication flow.
+    ///
+    /// The type of flow and the required stages are negotiated at time of
+    /// authentication. Returns the last server response on success.
     pub async fn authenticate<
         Response: Send + 'static,
         F1: Future<Output = Result<Response, Error>> + Send + 'static,
@@ -294,6 +298,7 @@ impl AuthDialog {
         }
     }
 
+    /// Lets the user complete the current stage.
     async fn show_and_wait_for_response(&self) -> bool {
         let (sender, receiver) = futures::channel::oneshot::channel();
         let sender = Cell::new(Some(sender));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]