Skip to content
This repository was archived by the owner on Jul 19, 2020. It is now read-only.
This repository was archived by the owner on Jul 19, 2020. It is now read-only.

Add a diagram of the Agent lifecycle #23

Open

Description

@jstarry

DOC TODO: https://yew.rs/docs/concepts/agents#lifecycle

Describe the lifecycle methods of an Agent and the lifetime of each type of Agent (Job, Context, Private, Public)

    /// Creates an instance of an agent.
    fn create(link: AgentLink<Self>) -> Self;

    /// This method called on every update message.
    fn update(&mut self, msg: Self::Message);

    /// This method called on when a new bridge created.
    fn connected(&mut self, _id: HandlerId) {}

    /// This method called on every incoming message.
    fn handle_input(&mut self, msg: Self::Input, id: HandlerId);

    /// This method called on when a new bridge destroyed.
    fn disconnected(&mut self, _id: HandlerId) {}

    /// This method called when the agent is destroyed.
    fn destroy(&mut self) {}

Activity

  1. teymour-aldridge commented on Apr 13, 2020

    @teymour-aldridge
    Contributor

    I'm not exactly sure where all the arrows should go, but would a diagram like this do the trick?
    Diagram.
    The diagram was made with nomnoml.com.

  2. jstarry commented on Apr 14, 2020

    @jstarry
    MemberAuthor

    Thanks @teymour-aldridge this is a good start! It'd be great if this was added to the docs :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions