Skip to main content

rustolio_web/elements/html/
mod.rs

1//
2// SPDX-License-Identifier: MPL-2.0
3//
4// Copyright (c) 2026 Tobias Binnewies. All rights reserved.
5//
6// This Source Code Form is subject to the terms of the Mozilla Public
7// License, v. 2.0. If a copy of the MPL was not distributed with this
8// file, You can obtain one at http://mozilla.org/MPL/2.0/.
9//
10
11mod attributes;
12
13use super::Element;
14
15pub use attributes::{Attribute, AttributeValue, Attributes, Listener, ListenerExt};
16
17#[doc(hidden)]
18pub use attributes::traits;
19
20pub struct HtmlTag {
21    pub tag: &'static str,
22    pub attributes: Attributes,
23    pub children: Vec<Element>,
24}
25
26impl HtmlTag {
27    /// Should not be used directly
28    #[doc(hidden)]
29    pub fn new(tag: &'static str, attributes: Attributes, children: Vec<Element>) -> Self {
30        HtmlTag {
31            tag,
32            attributes,
33            children,
34        }
35    }
36}