use crate::{element::parser::ElementParser, error::WebDynproError};
pub trait WebDynproCommand {
type Result;
fn dispatch(&self, parser: &ElementParser) -> Result<Self::Result, WebDynproError>;
}
pub trait WebDynproCommandExecutor {
fn read<T: WebDynproCommand>(&self, command: T) -> Result<T::Result, WebDynproError>;
}
impl WebDynproCommandExecutor for ElementParser {
fn read<T: WebDynproCommand>(&self, command: T) -> Result<T::Result, WebDynproError> {
command.dispatch(self)
}
}
pub mod element;