pub struct Element { /* private fields */ }Implementations§
Source§impl Element
impl Element
pub fn html( tag: &'static str, attributes: Attributes, children: Elements, ) -> Self
pub fn svg( tag: &'static str, attributes: Attributes, children: Elements, ) -> Self
pub fn text(text: impl ToString) -> Self
pub fn raw( attributes: Attributes, raw: &'static str, supported_type: SupportedType, ) -> Self
pub fn option(option: Option<impl Into<Element>>) -> Self
pub fn result(result: Result<impl Into<Element>>) -> Self
pub fn empty() -> Self
pub fn is_empty(&self) -> bool
Sourcepub fn is_html(&self) -> bool
pub fn is_html(&self) -> bool
Indicates whether attributes or listener can be set on this element. (E.g. a text-node cannot have those)
pub fn non_empty(self) -> Option<Self>
pub fn add_attribute( &mut self, name: &'static str, value: impl Into<AttributeValue>, ) -> bool
pub fn add_listener(&mut self, listener: &Listener) -> bool
Source§impl Element
impl Element
pub fn into_wrapper(self) -> ElementWrapper
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 UnsafeUnpin 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