Set up the initial code structure for the clock.

This commit is contained in:
Tom Alexander
2023-04-21 19:02:16 -04:00
parent 2d4a592846
commit c2ccf4da37
6 changed files with 52 additions and 0 deletions

View File

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