mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
add comments
This commit is contained in:
parent
af3d8c620b
commit
82ea70b538
@ -3,12 +3,15 @@ use error::Error;
|
|||||||
|
|
||||||
use gtk::gio::TlsCertificate;
|
use gtk::gio::TlsCertificate;
|
||||||
|
|
||||||
|
/// Gemini identity holder for cached record in application-wide struct format.
|
||||||
|
/// Implements also additional conversion methods.
|
||||||
pub struct Identity {
|
pub struct Identity {
|
||||||
pub pem: String,
|
pub pem: String,
|
||||||
// pub scope: String,
|
// pub scope: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Identity {
|
impl Identity {
|
||||||
|
/// Convert `Self` to [TlsCertificate](https://docs.gtk.org/gio/class.TlsCertificate.html)
|
||||||
pub fn to_tls_certificate(&self) -> Result<TlsCertificate, Error> {
|
pub fn to_tls_certificate(&self) -> Result<TlsCertificate, Error> {
|
||||||
match TlsCertificate::from_pem(&self.pem) {
|
match TlsCertificate::from_pem(&self.pem) {
|
||||||
Ok(certificate) => Ok(certificate),
|
Ok(certificate) => Ok(certificate),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user