[][src]Struct elvis_shared::State

pub struct State<W, P> {
    pub widget: W,
    pub trigger: Box<dyn FnBox<P>>,
    // some fields omitted
}

state for tree

Fields

widget: W

Host widget

trigger: Box<dyn FnBox<P>>

Function Hook

Implementations

impl<W, P> State<W, P>[src]

pub fn new(widget: W, trigger: Box<dyn FnBox<P>>) -> State<W, P>[src]

New state

pub fn process(&mut self, p: &P) -> Result<(), Error>[src]

Trigger function

pub fn get(&self, k: String) -> String[src]

Get state

pub fn set(&mut self, k: &str, v: &str)[src]

Set state

Auto Trait Implementations

impl<W, P> !RefUnwindSafe for State<W, P>

impl<W, P> !Send for State<W, P>

impl<W, P> !Sync for State<W, P>

impl<W, P> Unpin for State<W, P> where
    W: Unpin

impl<W, P> !UnwindSafe for State<W, P>

Blanket Implementations

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

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

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

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.