Code structure for fixed width area.

This commit is contained in:
Tom Alexander
2023-04-21 22:04:22 -04:00
parent f97ca7a67d
commit 5ae8ac61e5
7 changed files with 64 additions and 0 deletions

View File

@@ -74,6 +74,11 @@ pub struct Planning<'s> {
pub source: &'s str,
}
#[derive(Debug)]
pub struct FixedWidthArea<'s> {
pub source: &'s str,
}
impl<'s> Paragraph<'s> {
pub fn of_text(input: &'s str) -> Self {
let mut objects = Vec::with_capacity(1);
@@ -146,3 +151,9 @@ impl<'s> Source<'s> for Planning<'s> {
self.source
}
}
impl<'s> Source<'s> for FixedWidthArea<'s> {
fn get_source(&'s self) -> &'s str {
self.source
}
}