Struct reactive_state::middleware::web_logger::WebLoggerMiddleware[][src]

pub struct WebLoggerMiddleware { /* fields omitted */ }
This is supported on crate feature web_logger only.
Expand description

Logging middleware for applications running in the browser.

See web_logger for more details.

Implementations

impl WebLoggerMiddleware[src]

pub fn new() -> Self[src]

pub fn log_level(self, log_level: LogLevel) -> Self[src]

Set the level at which the data from this middleware will be logged to.

pub fn display_type(self, display_type: DisplayType) -> Self[src]

What type of display to use when printing the data from this middleware.

Trait Implementations

impl Default for WebLoggerMiddleware[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl<State, Action, Event, Effect> Middleware<State, Action, Event, Effect> for WebLoggerMiddleware where
    State: Serialize,
    Action: Serialize + Display,
    Event: Clone + Hash + Eq + Serialize,
    Effect: Serialize
[src]

fn on_reduce(
    &self,
    store: &Store<State, Action, Event, Effect>,
    action: Option<&Action>,
    reduce: ReduceFn<State, Action, Event, Effect>
) -> ReduceMiddlewareResult<Event, Effect>
[src]

This method is invoked by the Store during a Store::dispatch() just before the Action is sent to the Reducer. It is necessary to call the provided reduce function, which executes subsequent middleware and runs the Reducer, and usually the events produced by the reduce function are returned from this method. Read more

fn process_effect(
    &self,
    _store: &Store<State, Action, Event, Effect>,
    effect: Effect
) -> Option<Effect>
[src]

Process an Effect. Returns None if the effect was processed/consumed by this handler, otherwise returns Some(effect). Read more

fn on_notify(
    &self,
    store: &Store<State, Action, Event, Effect>,
    events: Vec<Event>,
    notify: NotifyFn<State, Action, Event, Effect>
) -> Vec<Event>
[src]

This method is invoked by the Store during a Store::dispatch() after the Reducer has processed the Action and all Middleware::on_reduce() methods have completed, just before resulting events are sent to the store listeners. It is necessary to call the provided notify function, which executes subsequent middleware and then notifies the listeners. Read more

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, V> IntoOptPropValue<V> for T where
    T: IntoPropValue<Option<V>>, 
[src]

pub fn into_opt_prop_value(self) -> Option<V>[src]

Convert self to an optional value of a Properties struct.

impl<T> IntoPropValue<Option<T>> for T[src]

pub fn into_prop_value(self) -> Option<T>[src]

Convert self to a value of a Properties struct.

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

pub fn into_prop_value(self) -> T[src]

Convert self to a value of a Properties struct.

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.

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

Performs the conversion.

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.

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

Performs the conversion.

impl<T> Any for T where
    T: Any