[−][src]Trait yew::agent::Agent
Declares the behavior of the agent.
Associated Types
type Reach: Discoverer<Agent = Self>
Reach capability of the agent.
type Message
Type of an input message.
type Input
Incoming message type.
type Output
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.
fn is_module() -> bool
Signifies if resource is a module. This has pending browser support.