pub struct Button { /* private fields */ }
Trait Implementations§
Source§impl Component for Button
impl Component for Button
Source§type Properties = Props
type Properties = Props
Properties type of component implementation.
Source§fn create(props: Self::Properties, _: ComponentLink<Self>) -> Self
fn create(props: Self::Properties, _: ComponentLink<Self>) -> Self
Initialization routine which could use a context.
Source§fn mounted(&mut self) -> ShouldRender
fn mounted(&mut self) -> ShouldRender
Called after the component has been attached to the VDOM and it is safe to receive messages
from agents but before the browser updates the screen. If true is returned, the view will
be re-rendered and the user will not see the initial render.
Source§fn update(&mut self, msg: Self::Message) -> ShouldRender
fn update(&mut self, msg: Self::Message) -> ShouldRender
Called everytime when a messages of
Msg
type received. It also takes a
reference to a context.Source§fn change(&mut self, _props: Self::Properties) -> bool
fn change(&mut self, _props: Self::Properties) -> bool
Called when the component’s parent component re-renders and the
component’s place in the DOM tree remains unchanged. If the component’s
place in the DOM tree changes, calling this method is unnecessary as the
component is recreated from scratch. It defaults to true if not implemented
and Self::Properties is not the unit type
()
.Auto Trait Implementations§
impl Freeze for Button
impl !RefUnwindSafe for Button
impl !Send for Button
impl !Sync for Button
impl Unpin for Button
impl !UnwindSafe for Button
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