[][src]Struct seed::prelude::Orders

pub struct Orders<Ms> { /* fields omitted */ }

Methods

impl<Ms> Orders<Ms>[src]

pub fn render(&mut self) -> &mut Self[src]

Rerender web page after model update. It's the default behaviour.

pub fn skip(&mut self) -> &mut Self[src]

Don't rerender web page after model update.

pub fn send_msg(&mut self, msg: Ms) -> &mut Self[src]

Call function update with the given msg after model update. You can call this function more times - messages will be sent in the same order.

pub fn perform_cmd<C>(&mut self, cmd: C) -> &mut Self where
    C: Future<Item = Ms, Error = Ms> + 'static, 
[src]

Schedule given future cmd to be executed after model update. You can call this function more times - futures will be scheduled in the same order.

Example

fn write_emoticon_after_delay() -> impl Future<Item=Msg, Error=Msg> {
   TimeoutFuture::new(2_000)
       .map(|_| Msg::WriteEmoticon)
       .map_err(|_| Msg::TimeoutError)
}
orders.perform_cmd(write_emoticon_after_delay());

Trait Implementations

impl<Ms> Default for Orders<Ms>[src]

Auto Trait Implementations

impl<Ms> !Send for Orders<Ms>

impl<Ms> !Sync for Orders<Ms>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]