28 lines
697 B
Rust
28 lines
697 B
Rust
use super::Param;
|
|
use crate::point::Point;
|
|
|
|
mod init_border;
|
|
mod init_idcode;
|
|
mod line_dotted;
|
|
mod load_image;
|
|
mod save_image;
|
|
mod wait_space;
|
|
pub use init_border::InitBorder;
|
|
pub use init_idcode::InitIdcode;
|
|
pub use line_dotted::LineDotted;
|
|
pub use load_image::LoadImage;
|
|
pub use save_image::SaveImage;
|
|
pub use wait_space::WaitSpace;
|
|
|
|
pub trait Sequence {
|
|
fn draw(&self, mem: &Param) -> Option<Vec<Point>>;
|
|
fn compute_sequence(&mut self, mem: &mut Param) -> Result<(), Box<dyn std::error::Error>>;
|
|
fn is_capture(&self) -> bool;
|
|
}
|
|
|
|
impl std::fmt::Debug for dyn Sequence {
|
|
fn fmt(self: &Self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
|
write!(f, "{self:?}")
|
|
}
|
|
}
|