[−][src]Struct yew::html::Scope
A context which allows sending messages to a component.
Methods
impl<COMP: Component> Scope<COMP>
[src]
pub fn new() -> Self
[src]
visible for testing
pub fn send_message<T>(&self, msg: T) where
T: Into<COMP::Message>,
[src]
T: Into<COMP::Message>,
Send a message to the component
pub fn send_message_batch(&self, messages: Vec<COMP::Message>)
[src]
Send a batch of messages to the component
pub fn callback<F, IN, M>(&self, function: F) -> Callback<IN> where
M: Into<COMP::Message>,
F: Fn(IN) -> M + 'static,
[src]
M: Into<COMP::Message>,
F: Fn(IN) -> M + 'static,
Creates a Callback
which will send a message to the linked component's
update method when invoked.
pub fn callback_once<F, IN, M>(&self, function: F) -> Callback<IN> where
M: Into<COMP::Message>,
F: FnOnce(IN) -> M + 'static,
[src]
M: Into<COMP::Message>,
F: FnOnce(IN) -> M + 'static,
Creates a Callback
from a FnOnce which will send a message to the linked
component's update method when invoked.
pub fn batch_callback<F, IN>(&self, function: F) -> Callback<IN> where
F: Fn(IN) -> Vec<COMP::Message> + 'static,
[src]
F: Fn(IN) -> Vec<COMP::Message> + 'static,
Creates a Callback
which will send a batch of messages back to the linked
component's update method when invoked.
Trait Implementations
impl<COMP: Component> Clone for Scope<COMP>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<COMP: Component> Debug for Scope<COMP>
[src]
impl<COMP: Component> Default for Scope<COMP>
[src]
Auto Trait Implementations
impl<COMP> !RefUnwindSafe for Scope<COMP>
impl<COMP> !Send for Scope<COMP>
impl<COMP> !Sync for Scope<COMP>
impl<COMP> Unpin for Scope<COMP>
impl<COMP> !UnwindSafe for Scope<COMP>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
[src]
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
[src]
T: Clone + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,