add comments

This commit is contained in:
yggverse 2025-01-16 23:45:34 +02:00
parent 786286dc3e
commit aa8dc36077
2 changed files with 11 additions and 1 deletions

View file

@ -29,8 +29,11 @@ pub struct Driver {
} }
impl Driver { impl Driver {
// Constructors
/// Init new `Self`
pub fn init(profile: &Rc<Profile>, callback: impl Fn(Status) + 'static) -> Self { pub fn init(profile: &Rc<Profile>, callback: impl Fn(Status) + 'static) -> Self {
// Init protocol driver libraries // Init supported protocol libraries
let gemini = ggemini::Client::new(); let gemini = ggemini::Client::new();
// Translate driver status to `Status` // Translate driver status to `Status`
@ -62,6 +65,10 @@ impl Driver {
} }
} }
// Actions
/// Make new async `Feature` request
/// * return shared `Response` as the callback
pub fn feature_async( pub fn feature_async(
&self, &self,
feature: Feature, feature: Feature,

View file

@ -2,15 +2,18 @@ pub mod certificate;
pub mod failure; pub mod failure;
pub mod input; pub mod input;
// Local dependencies
pub use certificate::Certificate; pub use certificate::Certificate;
pub use failure::Failure; pub use failure::Failure;
pub use input::Input; pub use input::Input;
// Global dependencies
use gtk::{ use gtk::{
gio::{Cancellable, IOStream}, gio::{Cancellable, IOStream},
glib::{GString, Uri}, glib::{GString, Uri},
}; };
/// Single `Client` response API for all protocol drivers
pub enum Response { pub enum Response {
Certificate(Certificate), Certificate(Certificate),
Download { Download {