Enum yew::callback::Callback [−][src]
pub enum Callback<IN> { Callback(Rc<dyn Fn(IN)>), CallbackOnce(Rc<RefCell<Option<Box<dyn FnOnce(IN)>>>>), }
Expand description
Universal callback wrapper.
An `Rc` wrapper is used to make it cloneable.Variants
Expand description
A callback which can be called multiple times
Expand description
A callback which can only be called once. The callback will panic if it is called more than once.
Implementations
impl<IN> Callback<IN>
[src]
impl<IN> Callback<IN>
[src]Trait Implementations
impl<T> ImplicitClone for Callback<T>
[src]
Auto Trait Implementations
impl<IN> !RefUnwindSafe for Callback<IN>
impl<IN> !Send for Callback<IN>
impl<IN> !Sync for Callback<IN>
impl<IN> Unpin for Callback<IN>
impl<IN> !UnwindSafe for Callback<IN>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> Any for T where
T: Any,
[src]
T: Any,
impl<T> CloneAny for T where
T: Any + Clone,
[src]
T: Any + Clone,