use alloc::{
rc::Rc,
string::{String, ToString},
};
use crate::shared::{StyleClass, StyleClassError, StyleProperty};
pub trait NodeBuilder: Sized {
type Node;
type Error;
fn build(self) -> Result<Self::Node, Self::Error>;
fn style_class(self, style_class: Rc<StyleClass>) -> Result<Self, StyleClassError>;
fn style_property(self, property: StyleProperty) -> Result<Self, StyleClassError>;
fn style_properties(&self) -> impl Iterator<Item = &StyleProperty>;
fn label<S: ToString>(self, label: S) -> Result<Self, Self::Error>;
fn get_label(&self) -> Option<&String>;
#[must_use]
fn id(self, id: u64) -> Self;
fn get_id(&self) -> Option<u64>;
}