pub mod param;
pub mod function_widget;
pub mod into_widget;
pub mod into_widget_set;
use crate::{states::States, WidgetFrame};
use std::{
any::{Any, TypeId},
collections::HashMap,
};
use thiserror::Error;
#[derive(Error, Debug)]
pub enum WidgetError {
#[error(transparent)]
Io(#[from] std::io::Error),
#[error("Chunk doesn't exist")]
ChunkError,
#[error(transparent)]
Misc(#[from] anyhow::Error),
}
pub type WidgetResult = Result<(), WidgetError>;
pub trait Widget {
fn call(&mut self, states: &mut States) -> WidgetResult;
}