pub struct Element<Message> {
pub kind: ElementKind<Message>,
pub layout: Layout,
pub style: Style,
pub focusable: bool,
pub continuity_key: Option<String>,
pub children: Vec<Element<Message>>,
}Fields§
§kind: ElementKind<Message>§layout: Layout§style: Style§focusable: bool§continuity_key: Option<String>§children: Vec<Element<Message>>Implementations§
Source§impl<Message> Element<Message>
impl<Message> Element<Message>
pub fn new(kind: ElementKind<Message>) -> Self
pub fn new_text(content: impl Into<String>) -> Self
pub fn with_layout(self, layout: Layout) -> Self
pub fn with_style(self, style: Style) -> Self
pub fn with_focusable(self, focusable: bool) -> Self
pub fn with_continuity_key(self, key: impl Into<String>) -> Self
pub fn with_children(self, children: Vec<Element<Message>>) -> Self
pub fn continuity_key(&self) -> Option<&str>
pub fn child_layout_spec(&self, bounds: Rect) -> ChildLayoutSpec
pub fn intrinsic_height(&self, width: u16, child_heights: &[u16]) -> u16
pub fn intrinsic_width(&self, child_widths: &[u16]) -> u16
pub fn invalidates_self_on_layout_change(&self) -> bool
pub fn kind_name(&self) -> &'static str
Trait Implementations§
Source§impl<Message> IntoElement<Message> for Element<Message>
impl<Message> IntoElement<Message> for Element<Message>
fn into_element(self) -> Element<Message>
Auto Trait Implementations§
impl<Message> Freeze for Element<Message>
impl<Message> !RefUnwindSafe for Element<Message>
impl<Message> !Send for Element<Message>
impl<Message> !Sync for Element<Message>
impl<Message> Unpin for Element<Message>
impl<Message> UnsafeUnpin for Element<Message>
impl<Message> !UnwindSafe for Element<Message>
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