pub struct View { /* private fields */ }
Expand description
View
is your most fundamental building block for laying out and styling components.
§Example
element! {
View(padding: 2, border_style: BorderStyle::Round) {
Text(content: "Hello!")
}
}
Trait Implementations§
Source§impl Component for View
impl Component for View
Source§fn new(_props: &Self::Props<'_>) -> Self
fn new(_props: &Self::Props<'_>) -> Self
Creates a new instance of the component from a set of properties.
Source§fn update(
&mut self,
props: &mut Self::Props<'_>,
_hooks: Hooks<'_, '_>,
updater: &mut ComponentUpdater<'_, '_, '_>,
)
fn update( &mut self, props: &mut Self::Props<'_>, _hooks: Hooks<'_, '_>, updater: &mut ComponentUpdater<'_, '_, '_>, )
Invoked whenever the properties of the component or layout may have changed.
Source§fn draw(&mut self, drawer: &mut ComponentDrawer<'_>)
fn draw(&mut self, drawer: &mut ComponentDrawer<'_>)
Invoked to draw the component.
Auto Trait Implementations§
impl Freeze for View
impl RefUnwindSafe for View
impl Send for View
impl Sync for View
impl Unpin for View
impl UnwindSafe for View
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