[][src]Struct zi::Callback

pub struct Callback<InputT, OutputT = ()>(pub Rc<dyn Fn(InputT) -> OutputT>);

Callback wrapper. Useful for passing callbacks in child components Properties. An Rc wrapper is used to make it cloneable.

Implementations

impl<InputT, OutputT> Callback<InputT, OutputT>[src]

pub fn emit(&self, value: InputT) -> OutputT[src]

Trait Implementations

impl<InputT, OutputT> Clone for Callback<InputT, OutputT>[src]

impl<InputT, OutputT, FnT> From<FnT> for Callback<InputT, OutputT> where
    FnT: Fn(InputT) -> OutputT + 'static, 
[src]

impl<InputT, OutputT> PartialEq<Callback<InputT, OutputT>> for Callback<InputT, OutputT>[src]

Auto Trait Implementations

impl<InputT, OutputT = ()> !RefUnwindSafe for Callback<InputT, OutputT>

impl<InputT, OutputT = ()> !Send for Callback<InputT, OutputT>

impl<InputT, OutputT = ()> !Sync for Callback<InputT, OutputT>

impl<InputT, OutputT> Unpin for Callback<InputT, OutputT>

impl<InputT, OutputT = ()> !UnwindSafe for Callback<InputT, OutputT>

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.