]> saetta.ns0.it Git - rust/zakform/commitdiff
Get field's name.
authorAndrea Zagli <azagli@libero.it>
Fri, 6 Jan 2023 10:31:17 +0000 (11:31 +0100)
committerAndrea Zagli <azagli@libero.it>
Fri, 6 Jan 2023 10:31:17 +0000 (11:31 +0100)
src/lib.rs

index 79e48ba367dee270bf4e8408dae67cea5f47de08..918fc1cd1d5acef6e607d77b8da83c91e1d99064 100644 (file)
@@ -59,6 +59,10 @@ impl Field {
                f
        }
 
+       pub fn name(&self) -> String {
+               String::from(self.name.as_str())
+       }
+
        pub fn label(&self) -> String {
                String::from(self.label.as_str())
        }