use crate::error::WebDynproError;
use definition::SubElementDefinition;
use scraper::ElementRef;
pub mod definition;
pub trait SubElement<'a>: Sized {
const SUBCONTROL_ID: &'static str;
const ELEMENT_NAME: &'static str;
type SubElementLSData;
type Def: SubElementDefinition<'a>;
fn from_ref(
elem_def: &impl SubElementDefinition<'a>,
element: ElementRef<'a>,
) -> Result<Self, WebDynproError>;
fn lsdata(&self) -> &Self::SubElementLSData;
fn id(&self) -> &str;
fn element_ref(&self) -> &ElementRef<'a>;
}