[][src]Trait yewtil::NeqAssign

pub trait NeqAssign<NEW> {
    fn neq_assign(&mut self, new: NEW) -> ShouldRender;

Blanket trait to provide a convenience method for assigning props in changed or updating values in update.

Required methods

fn neq_assign(&mut self, new: NEW) -> ShouldRender

If self and new aren't equal, assigns new to self and returns true, otherwise returns false.

Short for "Not equal assign".


#[derive(Properties, PartialEq)]
 struct Props {
    field1: String,
    field2: usize
 struct Model {
    props: Props
 impl Component for Model {
    type Properties = Props;
    // ...
    fn change(&mut self, props: Self::Properties) -> ShouldRender{
Loading content...


impl<T: BorrowMut<U>, U: PartialEq> NeqAssign<U> for T[src]

Loading content...