✨ [pagetop] Añade macro Getters para estructuras
This commit is contained in:
parent
0f76cfe28b
commit
4944af073f
17 changed files with 154 additions and 390 deletions
|
|
@ -8,8 +8,9 @@ const LINK: &str = "<a href=\"https://pagetop.cillero.es\" rel=\"noopener norefe
|
|||
/// Por defecto, usando [`default()`](Self::default) sólo se muestra un reconocimiento a PageTop.
|
||||
/// Sin embargo, se puede usar [`new()`](Self::new) para crear una instancia con un texto de
|
||||
/// copyright predeterminado.
|
||||
#[derive(AutoDefault)]
|
||||
#[derive(AutoDefault, Getters)]
|
||||
pub struct PoweredBy {
|
||||
/// Devuelve el texto de copyright actual, si existe.
|
||||
copyright: Option<String>,
|
||||
}
|
||||
|
||||
|
|
@ -56,11 +57,4 @@ impl PoweredBy {
|
|||
self.copyright = copyright.map(Into::into);
|
||||
self
|
||||
}
|
||||
|
||||
// **< PoweredBy GETTERS >**********************************************************************
|
||||
|
||||
/// Devuelve el texto de copyright actual, si existe.
|
||||
pub fn copyright(&self) -> Option<&str> {
|
||||
self.copyright.as_deref()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue