Skip to content

Consider split() for Box<DynFnOnce> #360

Open
@danakj

Description

@danakj

We lost split() with FnOnceRef: 72968c4#diff-ecdf6bec3f3f1f3c1b27e1acbc1104b1573eab15975d292679e8a4d6a2518cd5L424-L463

We could potentially be able to split a Box into two, where one of them will be called and then the other would panic if called. Since DynFnOnce is not cloneable, there's no way to split with ownership involved at the moment.

For a DynFnOnce& reference, the reference itself is copyable so there's nothing needed.

What does Rust do here for Box?

Metadata

Metadata

Assignees

No one assigned

    Labels

    designDesign of the library systems as a whole, such as concepts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions