pub mod element {
#[doc(alias = "nav")]
#[non_exhaustive]
#[derive(Debug, PartialEq, PartialOrd, Clone, Default)]
pub struct Navigation {
sys: html_sys::sections::Navigation,
children: Vec<super::child::NavigationChild>,
}
impl Navigation {
pub fn builder() -> super::builder::NavigationBuilder {
super::builder::NavigationBuilder::new(Default::default())
}
}
impl Navigation {
pub fn access_key(&self) -> std::option::Option<&str> {
self.sys.access_key.as_deref()
}
pub fn set_access_key(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.access_key = value.map(|v| v.into());
}
pub fn auto_capitalize(&self) -> std::option::Option<&str> {
self.sys.auto_capitalize.as_deref()
}
pub fn set_auto_capitalize(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.auto_capitalize = value.map(|v| v.into());
}
pub fn autofocus(&self) -> bool {
self.sys.autofocus
}
pub fn set_autofocus(&mut self, value: bool) {
self.sys.autofocus = value;
}
pub fn class(&self) -> std::option::Option<&str> {
self.sys.class.as_deref()
}
pub fn set_class(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.class = value.map(|v| v.into());
}
pub fn content_editable(&self) -> std::option::Option<&str> {
self.sys.content_editable.as_deref()
}
pub fn set_content_editable(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.content_editable = value.map(|v| v.into());
}
pub fn direction(&self) -> std::option::Option<&str> {
self.sys.direction.as_deref()
}
pub fn set_direction(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.direction = value.map(|v| v.into());
}
pub fn draggable(&self) -> bool {
self.sys.draggable
}
pub fn set_draggable(&mut self, value: bool) {
self.sys.draggable = value;
}
pub fn enter_key_hint(&self) -> std::option::Option<&str> {
self.sys.enter_key_hint.as_deref()
}
pub fn set_enter_key_hint(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.enter_key_hint = value.map(|v| v.into());
}
pub fn export_parts(&self) -> std::option::Option<&str> {
self.sys.export_parts.as_deref()
}
pub fn set_export_parts(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.export_parts = value.map(|v| v.into());
}
pub fn hidden(&self) -> std::option::Option<&str> {
self.sys.hidden.as_deref()
}
pub fn set_hidden(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.hidden = value.map(|v| v.into());
}
pub fn id(&self) -> std::option::Option<&str> {
self.sys.id.as_deref()
}
pub fn set_id(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.id = value.map(|v| v.into());
}
pub fn inert(&self) -> bool {
self.sys.inert
}
pub fn set_inert(&mut self, value: bool) {
self.sys.inert = value;
}
pub fn input_mode(&self) -> std::option::Option<&str> {
self.sys.input_mode.as_deref()
}
pub fn set_input_mode(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.input_mode = value.map(|v| v.into());
}
pub fn is_(&self) -> std::option::Option<&str> {
self.sys.is_.as_deref()
}
pub fn set_is_(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.is_ = value.map(|v| v.into());
}
pub fn item_id(&self) -> std::option::Option<&str> {
self.sys.item_id.as_deref()
}
pub fn set_item_id(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.item_id = value.map(|v| v.into());
}
pub fn item_prop(&self) -> std::option::Option<&str> {
self.sys.item_prop.as_deref()
}
pub fn set_item_prop(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.item_prop = value.map(|v| v.into());
}
pub fn item_ref(&self) -> std::option::Option<&str> {
self.sys.item_ref.as_deref()
}
pub fn set_item_ref(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.item_ref = value.map(|v| v.into());
}
pub fn item_scope(&self) -> std::option::Option<&str> {
self.sys.item_scope.as_deref()
}
pub fn set_item_scope(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.item_scope = value.map(|v| v.into());
}
pub fn item_type(&self) -> std::option::Option<&str> {
self.sys.item_type.as_deref()
}
pub fn set_item_type(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.item_type = value.map(|v| v.into());
}
pub fn lang(&self) -> std::option::Option<&str> {
self.sys.lang.as_deref()
}
pub fn set_lang(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.lang = value.map(|v| v.into());
}
pub fn nonce(&self) -> std::option::Option<&str> {
self.sys.nonce.as_deref()
}
pub fn set_nonce(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.nonce = value.map(|v| v.into());
}
pub fn part(&self) -> std::option::Option<&str> {
self.sys.part.as_deref()
}
pub fn set_part(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.part = value.map(|v| v.into());
}
pub fn slot(&self) -> std::option::Option<&str> {
self.sys.slot.as_deref()
}
pub fn set_slot(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.slot = value.map(|v| v.into());
}
pub fn spellcheck(&self) -> std::option::Option<&str> {
self.sys.spellcheck.as_deref()
}
pub fn set_spellcheck(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.spellcheck = value.map(|v| v.into());
}
pub fn style(&self) -> std::option::Option<&str> {
self.sys.style.as_deref()
}
pub fn set_style(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.style = value.map(|v| v.into());
}
pub fn tab_index(&self) -> std::option::Option<i64> {
self.sys.tab_index
}
pub fn set_tab_index(&mut self, value: std::option::Option<i64>) {
self.sys.tab_index = value;
}
pub fn title(&self) -> std::option::Option<&str> {
self.sys.title.as_deref()
}
pub fn set_title(
&mut self,
value: std::option::Option<impl Into<std::borrow::Cow<'static, str>>>,
) {
self.sys.title = value.map(|v| v.into());
}
pub fn translate(&self) -> bool {
self.sys.translate
}
pub fn set_translate(&mut self, value: bool) {
self.sys.translate = value;
}
}
impl Navigation {
pub fn children(&self) -> &[super::child::NavigationChild] {
self.children.as_ref()
}
pub fn children_mut(&mut self) -> &mut Vec<super::child::NavigationChild> {
&mut self.children
}
}
impl std::fmt::Display for Navigation {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
html_sys::RenderElement::write_opening_tag(&self.sys, f)?;
for el in &self.children {
std::fmt::Display::fmt(&el, f)?;
}
html_sys::RenderElement::write_closing_tag(&self.sys, f)?;
Ok(())
}
}
impl crate::HtmlElement for Navigation {}
impl crate::FlowContent for Navigation {}
impl crate::SectioningContent for Navigation {}
impl crate::PalpableContent for Navigation {}
impl std::convert::Into<html_sys::sections::Navigation> for Navigation {
fn into(self) -> html_sys::sections::Navigation {
self.sys
}
}
impl From<html_sys::sections::Navigation> for Navigation {
fn from(sys: html_sys::sections::Navigation) -> Self {
Self { sys, children: vec![] }
}
}
}
pub mod child {
#[derive(Debug, PartialEq, PartialOrd, Clone)]
pub enum NavigationChild {
Address(crate::generated::all::Address),
Article(crate::generated::all::Article),
Aside(crate::generated::all::Aside),
BlockQuote(crate::generated::all::BlockQuote),
DescriptionList(crate::generated::all::DescriptionList),
Details(crate::generated::all::Details),
Dialog(crate::generated::all::Dialog),
Division(crate::generated::all::Division),
Fieldset(crate::generated::all::Fieldset),
Figure(crate::generated::all::Figure),
Footer(crate::generated::all::Footer),
Form(crate::generated::all::Form),
Header(crate::generated::all::Header),
Main(crate::generated::all::Main),
Menu(crate::generated::all::Menu),
Navigation(crate::generated::all::Navigation),
OrderedList(crate::generated::all::OrderedList),
Paragraph(crate::generated::all::Paragraph),
PreformattedText(crate::generated::all::PreformattedText),
Section(crate::generated::all::Section),
Table(crate::generated::all::Table),
ThematicBreak(crate::generated::all::ThematicBreak),
UnorderedList(crate::generated::all::UnorderedList),
Text(std::borrow::Cow<'static, str>),
}
impl std::convert::From<crate::generated::all::Address> for NavigationChild {
fn from(value: crate::generated::all::Address) -> Self {
Self::Address(value)
}
}
impl std::convert::From<crate::generated::all::Article> for NavigationChild {
fn from(value: crate::generated::all::Article) -> Self {
Self::Article(value)
}
}
impl std::convert::From<crate::generated::all::Aside> for NavigationChild {
fn from(value: crate::generated::all::Aside) -> Self {
Self::Aside(value)
}
}
impl std::convert::From<crate::generated::all::BlockQuote> for NavigationChild {
fn from(value: crate::generated::all::BlockQuote) -> Self {
Self::BlockQuote(value)
}
}
impl std::convert::From<crate::generated::all::DescriptionList> for NavigationChild {
fn from(value: crate::generated::all::DescriptionList) -> Self {
Self::DescriptionList(value)
}
}
impl std::convert::From<crate::generated::all::Details> for NavigationChild {
fn from(value: crate::generated::all::Details) -> Self {
Self::Details(value)
}
}
impl std::convert::From<crate::generated::all::Dialog> for NavigationChild {
fn from(value: crate::generated::all::Dialog) -> Self {
Self::Dialog(value)
}
}
impl std::convert::From<crate::generated::all::Division> for NavigationChild {
fn from(value: crate::generated::all::Division) -> Self {
Self::Division(value)
}
}
impl std::convert::From<crate::generated::all::Fieldset> for NavigationChild {
fn from(value: crate::generated::all::Fieldset) -> Self {
Self::Fieldset(value)
}
}
impl std::convert::From<crate::generated::all::Figure> for NavigationChild {
fn from(value: crate::generated::all::Figure) -> Self {
Self::Figure(value)
}
}
impl std::convert::From<crate::generated::all::Footer> for NavigationChild {
fn from(value: crate::generated::all::Footer) -> Self {
Self::Footer(value)
}
}
impl std::convert::From<crate::generated::all::Form> for NavigationChild {
fn from(value: crate::generated::all::Form) -> Self {
Self::Form(value)
}
}
impl std::convert::From<crate::generated::all::Header> for NavigationChild {
fn from(value: crate::generated::all::Header) -> Self {
Self::Header(value)
}
}
impl std::convert::From<crate::generated::all::Main> for NavigationChild {
fn from(value: crate::generated::all::Main) -> Self {
Self::Main(value)
}
}
impl std::convert::From<crate::generated::all::Menu> for NavigationChild {
fn from(value: crate::generated::all::Menu) -> Self {
Self::Menu(value)
}
}
impl std::convert::From<crate::generated::all::Navigation> for NavigationChild {
fn from(value: crate::generated::all::Navigation) -> Self {
Self::Navigation(value)
}
}
impl std::convert::From<crate::generated::all::OrderedList> for NavigationChild {
fn from(value: crate::generated::all::OrderedList) -> Self {
Self::OrderedList(value)
}
}
impl std::convert::From<crate::generated::all::Paragraph> for NavigationChild {
fn from(value: crate::generated::all::Paragraph) -> Self {
Self::Paragraph(value)
}
}
impl std::convert::From<crate::generated::all::PreformattedText>
for NavigationChild {
fn from(value: crate::generated::all::PreformattedText) -> Self {
Self::PreformattedText(value)
}
}
impl std::convert::From<crate::generated::all::Section> for NavigationChild {
fn from(value: crate::generated::all::Section) -> Self {
Self::Section(value)
}
}
impl std::convert::From<crate::generated::all::Table> for NavigationChild {
fn from(value: crate::generated::all::Table) -> Self {
Self::Table(value)
}
}
impl std::convert::From<crate::generated::all::ThematicBreak> for NavigationChild {
fn from(value: crate::generated::all::ThematicBreak) -> Self {
Self::ThematicBreak(value)
}
}
impl std::convert::From<crate::generated::all::UnorderedList> for NavigationChild {
fn from(value: crate::generated::all::UnorderedList) -> Self {
Self::UnorderedList(value)
}
}
impl std::convert::From<std::borrow::Cow<'static, str>> for NavigationChild {
fn from(value: std::borrow::Cow<'static, str>) -> Self {
Self::Text(value)
}
}
impl std::convert::From<&'static str> for NavigationChild {
fn from(value: &'static str) -> Self {
Self::Text(value.into())
}
}
impl std::convert::From<String> for NavigationChild {
fn from(value: String) -> Self {
Self::Text(value.into())
}
}
impl std::fmt::Display for NavigationChild {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Address(el) => write!(f, "{el}"),
Self::Article(el) => write!(f, "{el}"),
Self::Aside(el) => write!(f, "{el}"),
Self::BlockQuote(el) => write!(f, "{el}"),
Self::DescriptionList(el) => write!(f, "{el}"),
Self::Details(el) => write!(f, "{el}"),
Self::Dialog(el) => write!(f, "{el}"),
Self::Division(el) => write!(f, "{el}"),
Self::Fieldset(el) => write!(f, "{el}"),
Self::Figure(el) => write!(f, "{el}"),
Self::Footer(el) => write!(f, "{el}"),
Self::Form(el) => write!(f, "{el}"),
Self::Header(el) => write!(f, "{el}"),
Self::Main(el) => write!(f, "{el}"),
Self::Menu(el) => write!(f, "{el}"),
Self::Navigation(el) => write!(f, "{el}"),
Self::OrderedList(el) => write!(f, "{el}"),
Self::Paragraph(el) => write!(f, "{el}"),
Self::PreformattedText(el) => write!(f, "{el}"),
Self::Section(el) => write!(f, "{el}"),
Self::Table(el) => write!(f, "{el}"),
Self::ThematicBreak(el) => write!(f, "{el}"),
Self::UnorderedList(el) => write!(f, "{el}"),
Self::Text(el) => write!(f, "{el}"),
}
}
}
}
pub mod builder {
pub struct NavigationBuilder {
element: super::element::Navigation,
}
impl NavigationBuilder {
pub(crate) fn new(element: super::element::Navigation) -> Self {
Self { element }
}
pub fn build(&mut self) -> super::element::Navigation {
self.element.clone()
}
pub fn end(&mut self) {}
pub fn address<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::AddressBuilder),
{
let ty: crate::generated::all::Address = Default::default();
let mut ty_builder = crate::generated::all::builders::AddressBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn article<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::ArticleBuilder),
{
let ty: crate::generated::all::Article = Default::default();
let mut ty_builder = crate::generated::all::builders::ArticleBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn aside<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::AsideBuilder),
{
let ty: crate::generated::all::Aside = Default::default();
let mut ty_builder = crate::generated::all::builders::AsideBuilder::new(ty);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn block_quote<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::BlockQuoteBuilder),
{
let ty: crate::generated::all::BlockQuote = Default::default();
let mut ty_builder = crate::generated::all::builders::BlockQuoteBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn description_list<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::DescriptionListBuilder),
{
let ty: crate::generated::all::DescriptionList = Default::default();
let mut ty_builder = crate::generated::all::builders::DescriptionListBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn details<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::DetailsBuilder),
{
let ty: crate::generated::all::Details = Default::default();
let mut ty_builder = crate::generated::all::builders::DetailsBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn dialog<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::DialogBuilder),
{
let ty: crate::generated::all::Dialog = Default::default();
let mut ty_builder = crate::generated::all::builders::DialogBuilder::new(ty);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn division<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::DivisionBuilder),
{
let ty: crate::generated::all::Division = Default::default();
let mut ty_builder = crate::generated::all::builders::DivisionBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn fieldset<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::FieldsetBuilder),
{
let ty: crate::generated::all::Fieldset = Default::default();
let mut ty_builder = crate::generated::all::builders::FieldsetBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn figure<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::FigureBuilder),
{
let ty: crate::generated::all::Figure = Default::default();
let mut ty_builder = crate::generated::all::builders::FigureBuilder::new(ty);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn footer<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::FooterBuilder),
{
let ty: crate::generated::all::Footer = Default::default();
let mut ty_builder = crate::generated::all::builders::FooterBuilder::new(ty);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn form<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::FormBuilder),
{
let ty: crate::generated::all::Form = Default::default();
let mut ty_builder = crate::generated::all::builders::FormBuilder::new(ty);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn header<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::HeaderBuilder),
{
let ty: crate::generated::all::Header = Default::default();
let mut ty_builder = crate::generated::all::builders::HeaderBuilder::new(ty);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn main<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::MainBuilder),
{
let ty: crate::generated::all::Main = Default::default();
let mut ty_builder = crate::generated::all::builders::MainBuilder::new(ty);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn menu<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::MenuBuilder),
{
let ty: crate::generated::all::Menu = Default::default();
let mut ty_builder = crate::generated::all::builders::MenuBuilder::new(ty);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn navigation<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::NavigationBuilder),
{
let ty: crate::generated::all::Navigation = Default::default();
let mut ty_builder = crate::generated::all::builders::NavigationBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn ordered_list<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::OrderedListBuilder),
{
let ty: crate::generated::all::OrderedList = Default::default();
let mut ty_builder = crate::generated::all::builders::OrderedListBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn paragraph<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::ParagraphBuilder),
{
let ty: crate::generated::all::Paragraph = Default::default();
let mut ty_builder = crate::generated::all::builders::ParagraphBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn preformatted_text<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::PreformattedTextBuilder),
{
let ty: crate::generated::all::PreformattedText = Default::default();
let mut ty_builder = crate::generated::all::builders::PreformattedTextBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn section<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::SectionBuilder),
{
let ty: crate::generated::all::Section = Default::default();
let mut ty_builder = crate::generated::all::builders::SectionBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn table<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::TableBuilder),
{
let ty: crate::generated::all::Table = Default::default();
let mut ty_builder = crate::generated::all::builders::TableBuilder::new(ty);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn thematic_break<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::ThematicBreakBuilder),
{
let ty: crate::generated::all::ThematicBreak = Default::default();
let mut ty_builder = crate::generated::all::builders::ThematicBreakBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn unordered_list<F>(&mut self, f: F) -> &mut Self
where
F: FnOnce(&mut crate::generated::all::builders::UnorderedListBuilder),
{
let ty: crate::generated::all::UnorderedList = Default::default();
let mut ty_builder = crate::generated::all::builders::UnorderedListBuilder::new(
ty,
);
(f)(&mut ty_builder);
let ty = ty_builder.build();
self.element.children_mut().push(ty.into());
self
}
pub fn text(
&mut self,
s: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
let cow = s.into();
self.element.children_mut().push(cow.into());
self
}
pub fn access_key(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_access_key(Some(value.into()));
self
}
pub fn auto_capitalize(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_auto_capitalize(Some(value.into()));
self
}
pub fn autofocus(&mut self, value: bool) -> &mut Self {
self.element.set_autofocus(value);
self
}
pub fn class(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_class(Some(value.into()));
self
}
pub fn content_editable(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_content_editable(Some(value.into()));
self
}
pub fn direction(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_direction(Some(value.into()));
self
}
pub fn draggable(&mut self, value: bool) -> &mut Self {
self.element.set_draggable(value);
self
}
pub fn enter_key_hint(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_enter_key_hint(Some(value.into()));
self
}
pub fn export_parts(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_export_parts(Some(value.into()));
self
}
pub fn hidden(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_hidden(Some(value.into()));
self
}
pub fn id(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_id(Some(value.into()));
self
}
pub fn inert(&mut self, value: bool) -> &mut Self {
self.element.set_inert(value);
self
}
pub fn input_mode(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_input_mode(Some(value.into()));
self
}
pub fn is_(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_is_(Some(value.into()));
self
}
pub fn item_id(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_item_id(Some(value.into()));
self
}
pub fn item_prop(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_item_prop(Some(value.into()));
self
}
pub fn item_ref(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_item_ref(Some(value.into()));
self
}
pub fn item_scope(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_item_scope(Some(value.into()));
self
}
pub fn item_type(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_item_type(Some(value.into()));
self
}
pub fn lang(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_lang(Some(value.into()));
self
}
pub fn nonce(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_nonce(Some(value.into()));
self
}
pub fn part(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_part(Some(value.into()));
self
}
pub fn slot(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_slot(Some(value.into()));
self
}
pub fn spellcheck(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_spellcheck(Some(value.into()));
self
}
pub fn style(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_style(Some(value.into()));
self
}
pub fn tab_index(&mut self, value: i64) -> &mut Self {
self.element.set_tab_index(Some(value));
self
}
pub fn title(
&mut self,
value: impl Into<std::borrow::Cow<'static, str>>,
) -> &mut Self {
self.element.set_title(Some(value.into()));
self
}
pub fn translate(&mut self, value: bool) -> &mut Self {
self.element.set_translate(value);
self
}
}
}