Struct Button

Source
pub struct Button { /* private fields */ }

Trait Implementations§

Source§

impl Component for Button

Source§

type Properties = Props

Properties type of component implementation.
Source§

type Message = Msg

Control message type which update loop get.
Source§

fn create(props: Self::Properties, _: ComponentLink<Self>) -> Self

Initialization routine which could use a context.
Source§

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

Called everytime when a messages of Msg type received. It also takes a reference to a context.
Source§

fn view(&self) -> Html<Self>

Called by rendering loop.
Source§

fn destroy(&mut self)

Called for finalization on the final point of the component’s lifetime.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<COMP> Renderable<COMP> for COMP
where COMP: Component,

Source§

fn render(&self) -> VNode<COMP>

Called by rendering loop.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.