typestate-rs
typestate-rs copied to clipboard
Proc-macro typestate DSL for Rust
It would be helpful if the `enum` produced by `typestate(enumerate = ...)` could be pre-declared such that `#[derive(...)]` can be used upon it or potentially (a subset of?) its members....
Custom `enum`s for every [non-det state](https://rustype.github.io/typestate-rs/chapter_4.html#non-deterministic-transitions) are somewhat limited in that they add a lot of boilerplate if someone wants to make a conversion to Result; with a lack of...
The choice enum results appear to produce weird markup and visual results:  With the following signature: ```rust pub enum ConnectionResult { Connected, Disconnected, } ``` And the following markup......
I just tripped myself up on this one for a little while by porting an `impl` block to trait signatures. The error message is misleading for syntax that would otherwise...
I ran across three related issues when reproducing this issue. Take the following: ```rust #[typestate] mod my_state { #[automaton] struct Aut; #[state] struct State1(HelperEnum); trait State1 { fn new() ->...
When I had this trait for transitions relating to my `Opened` state everything worked as expected with the `new` function making `Opened` the start state. ```rust pub trait Opened {...
First off Amazing library!. I stumbled upon it when writing my own proc macros to try a similar goal, so very happy a much better solution already existed. One thing...
Using generics in any of the states causes the automaton's type to be stripped away. Take the following example: ```rust use typestate::typestate; #[typestate] mod my_state { #[automaton] pub struct Automaton;...
Given the following: ```rust use typestate::typestate; #[typestate] mod my_state { #[automaton] pub struct Automaton; #[state] pub struct State1(bool); pub trait State1: Sized { fn new() -> State1 { Automaton {...
Attempting to do the following results in an error: ```rust #[typestate] mod my_state { #[automaton] pub struct MyState; #[state] pub struct State1 { data: T, } trait State1 { fn...