pub struct Element { /* private fields */ }Implementations§
Source§impl Element
impl Element
pub const fn new(name: &'static str) -> Self
pub fn attr( self, key: impl Into<Cow<'static, str>>, value: impl ToString, ) -> Self
pub fn data(self, key: &'static str, value: impl ToString) -> Self
pub fn classes(self, classes: impl IntoIterator<Item = impl ToString>) -> Self
pub fn classes_if( self, condition: bool, if_true: impl IntoIterator<Item = impl ToString>, ) -> Self
pub fn classes_if_else( self, condition: bool, if_true: impl IntoIterator<Item = impl ToString>, if_false: impl IntoIterator<Item = impl ToString>, ) -> Self
pub fn add_class(self, class: impl ToString) -> Self
pub fn charset(self, value: impl ToString) -> Self
pub fn class(self, value: impl ToString) -> Self
pub fn height(self, value: impl ToString) -> Self
pub fn href(self, value: impl ToString) -> Self
pub fn id(self, value: impl ToString) -> Self
pub fn src(self, value: impl ToString) -> Self
pub fn width(self, value: impl ToString) -> Self
pub fn name(self, value: impl ToString) -> Self
pub fn value(self, value: impl ToString) -> Self
pub fn content(self, value: impl ToString) -> Self
pub fn push(self, child: impl Markup) -> Self
pub fn push_map<I, T, F, M>(self, items: I, func: F) -> Self
pub fn push_if(self, condition: bool, child: impl Markup) -> Self
pub fn push_if_else( self, condition: bool, if_true: impl Markup, if_false: impl Markup, ) -> Self
pub fn push_if_some<T, F, M>(self, maybe_t: Option<T>, func: F) -> Self
pub fn tag(&self) -> &'static str
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more