[−][src]Trait wasi_worker_yew::Agent
Declares the behavior of the agent.
Associated Types
type Reach: Discoverer
Reach capability of the agent.
type Message
Type of an input message.
type Input: Deserialize<'de> + Serialize
Incoming message type.
type Output: Deserialize<'de> + Serialize
Outgoing message type.
Required methods
fn create(link: AgentLink<Self>) -> Self
Creates an instance of an agent.
fn update(&mut self, msg: Self::Message)
This method called on every update message.
fn handle_input(&mut self, msg: Self::Input, id: HandlerId)
This method called on every incoming message.
Provided methods
fn connected(&mut self, _id: HandlerId)
This method called on when a new bridge created.
fn disconnected(&mut self, _id: HandlerId)
This method called on when a new bridge destroyed.
fn destroy(&mut self)
This method called when the agent is destroyed.
fn name_of_resource() -> &'static str
Represents the name of loading resorce for remote workers which have to live in a separate files.