Implement dynamic PromptHandlers by using genericized methods that accept impl PromptHandler #59
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
validate() takes no generic arguments which is why it can be made into a dyn Trait. Then, by using validate_typed, we can ensure type safety. We can unwrap safely with the assumption that no public consumer will use the trait.
Side note: Should we make
validate()
a member of the trait? I am unsure. It may be reasonable to make it a member of a sealed trait. In the case of Terminal PromptHandlers, we can implement retry functionality, but in the case of something like headless, we should assume there is no retry mechanism, which means the implementation may be different between the two, but that is something that could possibly be worked around by adding a const retries() -> u8.