[][src]Struct yew::agent::AgentLink

pub struct AgentLink<AGN: Agent> { /* fields omitted */ }

Link to agent's scope for creating callbacks.

Implementations

impl<AGN: Agent> AgentLink<AGN>[src]

pub fn respond(&self, id: HandlerId, output: AGN::Output)[src]

Send response to an agent.

pub fn send_message<T>(&self, msg: T) where
    T: Into<AGN::Message>, 
[src]

Send a message to the agent

pub fn send_input<T>(&self, input: T) where
    T: Into<AGN::Input>, 
[src]

Send an input to self

pub fn callback<F, IN, M>(&self, function: F) -> Callback<IN> where
    M: Into<AGN::Message>,
    F: Fn(IN) -> M + 'static, 
[src]

Create a callback which will send a message to the agent when invoked.

Trait Implementations

impl<AGN: Agent> Clone for AgentLink<AGN>[src]

impl<AGN: Agent> Debug for AgentLink<AGN>[src]

Auto Trait Implementations

impl<AGN> !RefUnwindSafe for AgentLink<AGN>

impl<AGN> !Send for AgentLink<AGN>

impl<AGN> !Sync for AgentLink<AGN>

impl<AGN> Unpin for AgentLink<AGN>

impl<AGN> !UnwindSafe for AgentLink<AGN>

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

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

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

impl<T> CloneAny for T where
    T: Clone + Any
[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.