From 65eabed2dfaab05d3aa51cc410429d8c36869a3e Mon Sep 17 00:00:00 2001 From: Flavio Roth Date: Tue, 23 Aug 2022 20:07:00 +0200 Subject: [PATCH] Adds a getter to retrieve title lines --- src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 977f58d306..008d5519da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -277,6 +277,11 @@ impl Table { *self.titles = Some(titles); } + /// Get the optional title line + pub fn titles(&self) -> Option<&Row> { + self.titles.as_ref().into() + } + /// Unset the title line pub fn unset_titles(&mut self) { *self.titles = None;