use bg::{builder, valid, Maybe, Valid};
mod html {
use bg::builder;
builder! {
#![inheritable]
pub struct ElementProps {
id[borrow? str],
}
}
}
builder! {
#![inheritable]
/// The outer docs go to `mod` and `fn` [`MyCompProps`].
struct MyCompProps {
/// This field is required because there is not a default value.
/// All required fields are generic,
/// because they need to store different types.
/// For this field, it initially stores zero-sized `Unspecified`,
/// if the builder method is called, then *it* stores `Vec`.
///
/// Thus, the field name is also an associated type in trait [`Types`].
///
/// `TypeDefsInitial::required_field` is [`Unspecified`].
/// `TypeDefsValid::required_field` is `Vec`.
///
/// The builder method just changes the type and value.
required_field: Vec,
/// This field is optional because there is a default value `"".into()`.
///
/// This field is not generic because it only stores `std::borrow::Cow<'static,str>`.
///
/// Thus, this field will NOT be in `Types`.
///
/// ```
/// type ShouldFail = TypeDefsInitial::field_with_default;
/// ```
field_with_default: std::borrow::Cow<'static,str> = "".into(),
/// This field is required because there is not a default value.
///
/// `TypeDefsInitial::required_field_with_generic_input` is [`Unspecified`].
/// `TypeDefsValid::required_field_with_generic_input` is `Option`.
///
/// The builder method changes the type to `Option`
/// and run `value.into()` to get the value.
/// The builder method takes generic input.
required_field_with_generic_input[V: Into