mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
add comments
This commit is contained in:
parent
af3d8c620b
commit
82ea70b538
1 changed files with 3 additions and 0 deletions
|
|
@ -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<TlsCertificate, Error> {
|
||||
match TlsCertificate::from_pem(&self.pem) {
|
||||
Ok(certificate) => Ok(certificate),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue