Skip to content

Feature request: impl From<Node<Y>> for Node<X> where Y: Into<X> #653

Open
@sidju

Description

@sidju

I am home rolling a frontend and deeply enjoying the flexibility offered by seed. I have essentially built a half-isolated component structure with a global Msg (views branch down with parts of the model in a tree structure). Overall this works absurdly well with the APIs, but I'd like to be able to return Node from my component view functions instead of manually wrapping my callbacks into the global Msg type.

The way I envision this could be made possible is by having a general implementation to convert Node into Node if LocalMsg can be converted into Msg (infallibly in most reasonable cases, incl. mine). I expect this might be a bit tricky, but hope it can be done relatively easily.

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