You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
484 B
28 lines
484 B
// use serde::Serialize;
|
|
|
|
// #[derive(Debug, Serialize)]
|
|
// pub struct Line {
|
|
// /// delay before printing the line, in milliseconds
|
|
// pub delay: u64,
|
|
|
|
// /// text of the line
|
|
// pub text: String,
|
|
// }
|
|
|
|
// impl From<&str> for Line {
|
|
// fn from(s: &str) -> Self {
|
|
// Self {
|
|
// delay: 0,
|
|
// text: s.to_owned(),
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
pub trait Line {
|
|
/// delay before printing the line, in milliseconds
|
|
fn delay(&self) -> u64;
|
|
|
|
/// text to print
|
|
fn text(&self) -> &str;
|
|
}
|