From 82ea70b53859dc9b224f5e057dae06c0d27141f5 Mon Sep 17 00:00:00 2001 From: yggverse Date: Fri, 29 Nov 2024 16:27:14 +0200 Subject: [PATCH] add comments --- src/profile/identity/gemini/identity.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/profile/identity/gemini/identity.rs b/src/profile/identity/gemini/identity.rs index 4c69cbfc..cc704789 100644 --- a/src/profile/identity/gemini/identity.rs +++ b/src/profile/identity/gemini/identity.rs @@ -3,12 +3,15 @@ use error::Error; use gtk::gio::TlsCertificate; +/// Gemini identity holder for cached record in application-wide struct format. +/// Implements also additional conversion methods. pub struct Identity { pub pem: String, // pub scope: String, } impl Identity { + /// Convert `Self` to [TlsCertificate](https://docs.gtk.org/gio/class.TlsCertificate.html) pub fn to_tls_certificate(&self) -> Result { match TlsCertificate::from_pem(&self.pem) { Ok(certificate) => Ok(certificate),